"node_modules/individual/one-version.js",
"node_modules/is-object/index.js",
"node_modules/latlon-geohash/latlon-geohash.js",
+ "node_modules/martinez-polygon-clipping/dist/martinez.umd.js",
"node_modules/path-browserify/index.js",
"node_modules/pbf/index.js",
- "node_modules/quickselect/index.js",
+ "node_modules/quickselect/quickselect.js",
"node_modules/rbush/index.js",
- "node_modules/rxjs/BehaviorSubject.js",
- "node_modules/rxjs/InnerSubscriber.js",
- "node_modules/rxjs/Notification.js",
- "node_modules/rxjs/Observable.js",
- "node_modules/rxjs/Observer.js",
- "node_modules/rxjs/OuterSubscriber.js",
- "node_modules/rxjs/ReplaySubject.js",
- "node_modules/rxjs/Scheduler.js",
- "node_modules/rxjs/Subject.js",
- "node_modules/rxjs/SubjectSubscription.js",
- "node_modules/rxjs/Subscriber.js",
- "node_modules/rxjs/Subscription.js",
- "node_modules/rxjs/add/observable/combineLatest.js",
- "node_modules/rxjs/add/observable/defer.js",
- "node_modules/rxjs/add/observable/empty.js",
- "node_modules/rxjs/add/observable/from.js",
- "node_modules/rxjs/add/observable/fromEvent.js",
- "node_modules/rxjs/add/observable/fromPromise.js",
- "node_modules/rxjs/add/observable/merge.js",
- "node_modules/rxjs/add/observable/of.js",
- "node_modules/rxjs/add/observable/throw.js",
- "node_modules/rxjs/add/observable/timer.js",
- "node_modules/rxjs/add/observable/zip.js",
- "node_modules/rxjs/add/operator/buffer.js",
- "node_modules/rxjs/add/operator/bufferCount.js",
- "node_modules/rxjs/add/operator/bufferWhen.js",
- "node_modules/rxjs/add/operator/catch.js",
- "node_modules/rxjs/add/operator/combineLatest.js",
- "node_modules/rxjs/add/operator/concat.js",
- "node_modules/rxjs/add/operator/debounceTime.js",
- "node_modules/rxjs/add/operator/delay.js",
- "node_modules/rxjs/add/operator/distinct.js",
- "node_modules/rxjs/add/operator/distinctUntilChanged.js",
- "node_modules/rxjs/add/operator/do.js",
- "node_modules/rxjs/add/operator/expand.js",
- "node_modules/rxjs/add/operator/filter.js",
- "node_modules/rxjs/add/operator/finally.js",
- "node_modules/rxjs/add/operator/first.js",
- "node_modules/rxjs/add/operator/last.js",
- "node_modules/rxjs/add/operator/map.js",
- "node_modules/rxjs/add/operator/merge.js",
- "node_modules/rxjs/add/operator/mergeAll.js",
- "node_modules/rxjs/add/operator/mergeMap.js",
- "node_modules/rxjs/add/operator/pairwise.js",
- "node_modules/rxjs/add/operator/pluck.js",
- "node_modules/rxjs/add/operator/publish.js",
- "node_modules/rxjs/add/operator/publishReplay.js",
- "node_modules/rxjs/add/operator/scan.js",
- "node_modules/rxjs/add/operator/share.js",
- "node_modules/rxjs/add/operator/skip.js",
- "node_modules/rxjs/add/operator/skipUntil.js",
- "node_modules/rxjs/add/operator/skipWhile.js",
- "node_modules/rxjs/add/operator/startWith.js",
- "node_modules/rxjs/add/operator/switchMap.js",
- "node_modules/rxjs/add/operator/take.js",
- "node_modules/rxjs/add/operator/takeUntil.js",
- "node_modules/rxjs/add/operator/throttleTime.js",
- "node_modules/rxjs/add/operator/withLatestFrom.js",
- "node_modules/rxjs/add/operator/zip.js",
- "node_modules/rxjs/observable/ArrayLikeObservable.js",
- "node_modules/rxjs/observable/ArrayObservable.js",
- "node_modules/rxjs/observable/ConnectableObservable.js",
- "node_modules/rxjs/observable/DeferObservable.js",
- "node_modules/rxjs/observable/EmptyObservable.js",
- "node_modules/rxjs/observable/ErrorObservable.js",
- "node_modules/rxjs/observable/FromEventObservable.js",
- "node_modules/rxjs/observable/FromObservable.js",
- "node_modules/rxjs/observable/IteratorObservable.js",
- "node_modules/rxjs/observable/PromiseObservable.js",
- "node_modules/rxjs/observable/ScalarObservable.js",
- "node_modules/rxjs/observable/TimerObservable.js",
- "node_modules/rxjs/observable/combineLatest.js",
- "node_modules/rxjs/observable/defer.js",
- "node_modules/rxjs/observable/empty.js",
- "node_modules/rxjs/observable/from.js",
- "node_modules/rxjs/observable/fromEvent.js",
- "node_modules/rxjs/observable/fromPromise.js",
- "node_modules/rxjs/observable/merge.js",
- "node_modules/rxjs/observable/of.js",
- "node_modules/rxjs/observable/throw.js",
- "node_modules/rxjs/observable/timer.js",
- "node_modules/rxjs/observable/zip.js",
- "node_modules/rxjs/operator/buffer.js",
- "node_modules/rxjs/operator/bufferCount.js",
- "node_modules/rxjs/operator/bufferWhen.js",
- "node_modules/rxjs/operator/catch.js",
- "node_modules/rxjs/operator/combineLatest.js",
- "node_modules/rxjs/operator/concat.js",
- "node_modules/rxjs/operator/debounceTime.js",
- "node_modules/rxjs/operator/delay.js",
- "node_modules/rxjs/operator/distinct.js",
- "node_modules/rxjs/operator/distinctUntilChanged.js",
- "node_modules/rxjs/operator/do.js",
- "node_modules/rxjs/operator/expand.js",
- "node_modules/rxjs/operator/filter.js",
- "node_modules/rxjs/operator/finally.js",
- "node_modules/rxjs/operator/first.js",
- "node_modules/rxjs/operator/last.js",
- "node_modules/rxjs/operator/map.js",
- "node_modules/rxjs/operator/merge.js",
- "node_modules/rxjs/operator/mergeAll.js",
- "node_modules/rxjs/operator/mergeMap.js",
- "node_modules/rxjs/operator/multicast.js",
- "node_modules/rxjs/operator/observeOn.js",
- "node_modules/rxjs/operator/pairwise.js",
- "node_modules/rxjs/operator/pluck.js",
- "node_modules/rxjs/operator/publish.js",
- "node_modules/rxjs/operator/publishReplay.js",
- "node_modules/rxjs/operator/scan.js",
- "node_modules/rxjs/operator/share.js",
- "node_modules/rxjs/operator/skip.js",
- "node_modules/rxjs/operator/skipUntil.js",
- "node_modules/rxjs/operator/skipWhile.js",
- "node_modules/rxjs/operator/startWith.js",
- "node_modules/rxjs/operator/switchMap.js",
- "node_modules/rxjs/operator/take.js",
- "node_modules/rxjs/operator/takeUntil.js",
- "node_modules/rxjs/operator/throttle.js",
- "node_modules/rxjs/operator/throttleTime.js",
- "node_modules/rxjs/operator/withLatestFrom.js",
- "node_modules/rxjs/operator/zip.js",
- "node_modules/rxjs/scheduler/Action.js",
- "node_modules/rxjs/scheduler/AsyncAction.js",
- "node_modules/rxjs/scheduler/AsyncScheduler.js",
- "node_modules/rxjs/scheduler/QueueAction.js",
- "node_modules/rxjs/scheduler/QueueScheduler.js",
- "node_modules/rxjs/scheduler/async.js",
- "node_modules/rxjs/scheduler/queue.js",
- "node_modules/rxjs/symbol/iterator.js",
- "node_modules/rxjs/symbol/observable.js",
- "node_modules/rxjs/symbol/rxSubscriber.js",
- "node_modules/rxjs/util/AnimationFrame.js",
- "node_modules/rxjs/util/ArgumentOutOfRangeError.js",
- "node_modules/rxjs/util/EmptyError.js",
- "node_modules/rxjs/util/ObjectUnsubscribedError.js",
- "node_modules/rxjs/util/Set.js",
- "node_modules/rxjs/util/UnsubscriptionError.js",
- "node_modules/rxjs/util/errorObject.js",
- "node_modules/rxjs/util/isArray.js",
- "node_modules/rxjs/util/isArrayLike.js",
- "node_modules/rxjs/util/isDate.js",
- "node_modules/rxjs/util/isFunction.js",
- "node_modules/rxjs/util/isNumeric.js",
- "node_modules/rxjs/util/isObject.js",
- "node_modules/rxjs/util/isPromise.js",
- "node_modules/rxjs/util/isScheduler.js",
- "node_modules/rxjs/util/root.js",
- "node_modules/rxjs/util/subscribeToResult.js",
- "node_modules/rxjs/util/toSubscriber.js",
- "node_modules/rxjs/util/tryCatch.js",
+ "node_modules/rxjs/index.js",
+ "node_modules/rxjs/internal/AsyncSubject.js",
+ "node_modules/rxjs/internal/BehaviorSubject.js",
+ "node_modules/rxjs/internal/InnerSubscriber.js",
+ "node_modules/rxjs/internal/Notification.js",
+ "node_modules/rxjs/internal/Observable.js",
+ "node_modules/rxjs/internal/Observer.js",
+ "node_modules/rxjs/internal/OuterSubscriber.js",
+ "node_modules/rxjs/internal/ReplaySubject.js",
+ "node_modules/rxjs/internal/Scheduler.js",
+ "node_modules/rxjs/internal/Subject.js",
+ "node_modules/rxjs/internal/SubjectSubscription.js",
+ "node_modules/rxjs/internal/Subscriber.js",
+ "node_modules/rxjs/internal/Subscription.js",
+ "node_modules/rxjs/internal/config.js",
+ "node_modules/rxjs/internal/observable/ConnectableObservable.js",
+ "node_modules/rxjs/internal/observable/SubscribeOnObservable.js",
+ "node_modules/rxjs/internal/observable/bindCallback.js",
+ "node_modules/rxjs/internal/observable/bindNodeCallback.js",
+ "node_modules/rxjs/internal/observable/combineLatest.js",
+ "node_modules/rxjs/internal/observable/concat.js",
+ "node_modules/rxjs/internal/observable/defer.js",
+ "node_modules/rxjs/internal/observable/empty.js",
+ "node_modules/rxjs/internal/observable/forkJoin.js",
+ "node_modules/rxjs/internal/observable/from.js",
+ "node_modules/rxjs/internal/observable/fromArray.js",
+ "node_modules/rxjs/internal/observable/fromEvent.js",
+ "node_modules/rxjs/internal/observable/fromEventPattern.js",
+ "node_modules/rxjs/internal/observable/fromIterable.js",
+ "node_modules/rxjs/internal/observable/fromObservable.js",
+ "node_modules/rxjs/internal/observable/fromPromise.js",
+ "node_modules/rxjs/internal/observable/generate.js",
+ "node_modules/rxjs/internal/observable/iif.js",
+ "node_modules/rxjs/internal/observable/interval.js",
+ "node_modules/rxjs/internal/observable/merge.js",
+ "node_modules/rxjs/internal/observable/never.js",
+ "node_modules/rxjs/internal/observable/of.js",
+ "node_modules/rxjs/internal/observable/onErrorResumeNext.js",
+ "node_modules/rxjs/internal/observable/pairs.js",
+ "node_modules/rxjs/internal/observable/race.js",
+ "node_modules/rxjs/internal/observable/range.js",
+ "node_modules/rxjs/internal/observable/scalar.js",
+ "node_modules/rxjs/internal/observable/throwError.js",
+ "node_modules/rxjs/internal/observable/timer.js",
+ "node_modules/rxjs/internal/observable/using.js",
+ "node_modules/rxjs/internal/observable/zip.js",
+ "node_modules/rxjs/internal/operators/audit.js",
+ "node_modules/rxjs/internal/operators/auditTime.js",
+ "node_modules/rxjs/internal/operators/buffer.js",
+ "node_modules/rxjs/internal/operators/bufferCount.js",
+ "node_modules/rxjs/internal/operators/bufferTime.js",
+ "node_modules/rxjs/internal/operators/bufferToggle.js",
+ "node_modules/rxjs/internal/operators/bufferWhen.js",
+ "node_modules/rxjs/internal/operators/catchError.js",
+ "node_modules/rxjs/internal/operators/combineAll.js",
+ "node_modules/rxjs/internal/operators/combineLatest.js",
+ "node_modules/rxjs/internal/operators/concat.js",
+ "node_modules/rxjs/internal/operators/concatAll.js",
+ "node_modules/rxjs/internal/operators/concatMap.js",
+ "node_modules/rxjs/internal/operators/concatMapTo.js",
+ "node_modules/rxjs/internal/operators/count.js",
+ "node_modules/rxjs/internal/operators/debounce.js",
+ "node_modules/rxjs/internal/operators/debounceTime.js",
+ "node_modules/rxjs/internal/operators/defaultIfEmpty.js",
+ "node_modules/rxjs/internal/operators/delay.js",
+ "node_modules/rxjs/internal/operators/delayWhen.js",
+ "node_modules/rxjs/internal/operators/dematerialize.js",
+ "node_modules/rxjs/internal/operators/distinct.js",
+ "node_modules/rxjs/internal/operators/distinctUntilChanged.js",
+ "node_modules/rxjs/internal/operators/distinctUntilKeyChanged.js",
+ "node_modules/rxjs/internal/operators/elementAt.js",
+ "node_modules/rxjs/internal/operators/endWith.js",
+ "node_modules/rxjs/internal/operators/every.js",
+ "node_modules/rxjs/internal/operators/exhaust.js",
+ "node_modules/rxjs/internal/operators/exhaustMap.js",
+ "node_modules/rxjs/internal/operators/expand.js",
+ "node_modules/rxjs/internal/operators/filter.js",
+ "node_modules/rxjs/internal/operators/finalize.js",
+ "node_modules/rxjs/internal/operators/find.js",
+ "node_modules/rxjs/internal/operators/findIndex.js",
+ "node_modules/rxjs/internal/operators/first.js",
+ "node_modules/rxjs/internal/operators/groupBy.js",
+ "node_modules/rxjs/internal/operators/ignoreElements.js",
+ "node_modules/rxjs/internal/operators/isEmpty.js",
+ "node_modules/rxjs/internal/operators/last.js",
+ "node_modules/rxjs/internal/operators/map.js",
+ "node_modules/rxjs/internal/operators/mapTo.js",
+ "node_modules/rxjs/internal/operators/materialize.js",
+ "node_modules/rxjs/internal/operators/max.js",
+ "node_modules/rxjs/internal/operators/merge.js",
+ "node_modules/rxjs/internal/operators/mergeAll.js",
+ "node_modules/rxjs/internal/operators/mergeMap.js",
+ "node_modules/rxjs/internal/operators/mergeMapTo.js",
+ "node_modules/rxjs/internal/operators/mergeScan.js",
+ "node_modules/rxjs/internal/operators/min.js",
+ "node_modules/rxjs/internal/operators/multicast.js",
+ "node_modules/rxjs/internal/operators/observeOn.js",
+ "node_modules/rxjs/internal/operators/onErrorResumeNext.js",
+ "node_modules/rxjs/internal/operators/pairwise.js",
+ "node_modules/rxjs/internal/operators/partition.js",
+ "node_modules/rxjs/internal/operators/pluck.js",
+ "node_modules/rxjs/internal/operators/publish.js",
+ "node_modules/rxjs/internal/operators/publishBehavior.js",
+ "node_modules/rxjs/internal/operators/publishLast.js",
+ "node_modules/rxjs/internal/operators/publishReplay.js",
+ "node_modules/rxjs/internal/operators/race.js",
+ "node_modules/rxjs/internal/operators/reduce.js",
+ "node_modules/rxjs/internal/operators/refCount.js",
+ "node_modules/rxjs/internal/operators/repeat.js",
+ "node_modules/rxjs/internal/operators/repeatWhen.js",
+ "node_modules/rxjs/internal/operators/retry.js",
+ "node_modules/rxjs/internal/operators/retryWhen.js",
+ "node_modules/rxjs/internal/operators/sample.js",
+ "node_modules/rxjs/internal/operators/sampleTime.js",
+ "node_modules/rxjs/internal/operators/scan.js",
+ "node_modules/rxjs/internal/operators/sequenceEqual.js",
+ "node_modules/rxjs/internal/operators/share.js",
+ "node_modules/rxjs/internal/operators/shareReplay.js",
+ "node_modules/rxjs/internal/operators/single.js",
+ "node_modules/rxjs/internal/operators/skip.js",
+ "node_modules/rxjs/internal/operators/skipLast.js",
+ "node_modules/rxjs/internal/operators/skipUntil.js",
+ "node_modules/rxjs/internal/operators/skipWhile.js",
+ "node_modules/rxjs/internal/operators/startWith.js",
+ "node_modules/rxjs/internal/operators/subscribeOn.js",
+ "node_modules/rxjs/internal/operators/switchAll.js",
+ "node_modules/rxjs/internal/operators/switchMap.js",
+ "node_modules/rxjs/internal/operators/switchMapTo.js",
+ "node_modules/rxjs/internal/operators/take.js",
+ "node_modules/rxjs/internal/operators/takeLast.js",
+ "node_modules/rxjs/internal/operators/takeUntil.js",
+ "node_modules/rxjs/internal/operators/takeWhile.js",
+ "node_modules/rxjs/internal/operators/tap.js",
+ "node_modules/rxjs/internal/operators/throttle.js",
+ "node_modules/rxjs/internal/operators/throttleTime.js",
+ "node_modules/rxjs/internal/operators/throwIfEmpty.js",
+ "node_modules/rxjs/internal/operators/timeInterval.js",
+ "node_modules/rxjs/internal/operators/timeout.js",
+ "node_modules/rxjs/internal/operators/timeoutWith.js",
+ "node_modules/rxjs/internal/operators/timestamp.js",
+ "node_modules/rxjs/internal/operators/toArray.js",
+ "node_modules/rxjs/internal/operators/window.js",
+ "node_modules/rxjs/internal/operators/windowCount.js",
+ "node_modules/rxjs/internal/operators/windowTime.js",
+ "node_modules/rxjs/internal/operators/windowToggle.js",
+ "node_modules/rxjs/internal/operators/windowWhen.js",
+ "node_modules/rxjs/internal/operators/withLatestFrom.js",
+ "node_modules/rxjs/internal/operators/zip.js",
+ "node_modules/rxjs/internal/operators/zipAll.js",
+ "node_modules/rxjs/internal/scheduler/Action.js",
+ "node_modules/rxjs/internal/scheduler/AnimationFrameAction.js",
+ "node_modules/rxjs/internal/scheduler/AnimationFrameScheduler.js",
+ "node_modules/rxjs/internal/scheduler/AsapAction.js",
+ "node_modules/rxjs/internal/scheduler/AsapScheduler.js",
+ "node_modules/rxjs/internal/scheduler/AsyncAction.js",
+ "node_modules/rxjs/internal/scheduler/AsyncScheduler.js",
+ "node_modules/rxjs/internal/scheduler/QueueAction.js",
+ "node_modules/rxjs/internal/scheduler/QueueScheduler.js",
+ "node_modules/rxjs/internal/scheduler/VirtualTimeScheduler.js",
+ "node_modules/rxjs/internal/scheduler/animationFrame.js",
+ "node_modules/rxjs/internal/scheduler/asap.js",
+ "node_modules/rxjs/internal/scheduler/async.js",
+ "node_modules/rxjs/internal/scheduler/queue.js",
+ "node_modules/rxjs/internal/symbol/iterator.js",
+ "node_modules/rxjs/internal/symbol/observable.js",
+ "node_modules/rxjs/internal/symbol/rxSubscriber.js",
+ "node_modules/rxjs/internal/util/ArgumentOutOfRangeError.js",
+ "node_modules/rxjs/internal/util/EmptyError.js",
+ "node_modules/rxjs/internal/util/Immediate.js",
+ "node_modules/rxjs/internal/util/ObjectUnsubscribedError.js",
+ "node_modules/rxjs/internal/util/TimeoutError.js",
+ "node_modules/rxjs/internal/util/UnsubscriptionError.js",
+ "node_modules/rxjs/internal/util/canReportError.js",
+ "node_modules/rxjs/internal/util/errorObject.js",
+ "node_modules/rxjs/internal/util/hostReportError.js",
+ "node_modules/rxjs/internal/util/identity.js",
+ "node_modules/rxjs/internal/util/isArray.js",
+ "node_modules/rxjs/internal/util/isArrayLike.js",
+ "node_modules/rxjs/internal/util/isDate.js",
+ "node_modules/rxjs/internal/util/isFunction.js",
+ "node_modules/rxjs/internal/util/isInteropObservable.js",
+ "node_modules/rxjs/internal/util/isIterable.js",
+ "node_modules/rxjs/internal/util/isNumeric.js",
+ "node_modules/rxjs/internal/util/isObject.js",
+ "node_modules/rxjs/internal/util/isObservable.js",
+ "node_modules/rxjs/internal/util/isPromise.js",
+ "node_modules/rxjs/internal/util/isScheduler.js",
+ "node_modules/rxjs/internal/util/noop.js",
+ "node_modules/rxjs/internal/util/not.js",
+ "node_modules/rxjs/internal/util/pipe.js",
+ "node_modules/rxjs/internal/util/subscribeTo.js",
+ "node_modules/rxjs/internal/util/subscribeToArray.js",
+ "node_modules/rxjs/internal/util/subscribeToIterable.js",
+ "node_modules/rxjs/internal/util/subscribeToObservable.js",
+ "node_modules/rxjs/internal/util/subscribeToPromise.js",
+ "node_modules/rxjs/internal/util/subscribeToResult.js",
+ "node_modules/rxjs/internal/util/toSubscriber.js",
+ "node_modules/rxjs/internal/util/tryCatch.js",
+ "node_modules/rxjs/operators/index.js",
"node_modules/three/build/three.min.js",
"node_modules/tinyqueue/index.js",
- "node_modules/underscore/underscore.js",
"node_modules/virtual-dom/create-element.js",
"node_modules/virtual-dom/diff.js",
"node_modules/virtual-dom/h.js",
"src/Mapillary.ts",
"src/Render.ts",
"src/State.ts",
+ "src/Support.ts",
"src/Tiles.ts",
"src/Utils.ts",
"src/Viewer.ts",
"src/component/CoverComponent.ts",
"src/component/DebugComponent.ts",
"src/component/ImageComponent.ts",
- "src/component/KeyboardComponent.ts",
"src/component/LoadingComponent.ts",
"src/component/NavigationComponent.ts",
"src/component/RouteComponent.ts",
"src/component/direction/DirectionDOMCalculator.ts",
"src/component/direction/DirectionDOMRenderer.ts",
"src/component/imageplane/ImagePlaneComponent.ts",
- "src/component/imageplane/ImagePlaneFactory.ts",
"src/component/imageplane/ImagePlaneGLRenderer.ts",
- "src/component/imageplane/ImagePlaneScene.ts",
- "src/component/imageplane/ImagePlaneShaders.ts",
- "src/component/imageplane/SliderComponent.ts",
+ "src/component/interfaces/ICoverConfiguration.ts",
+ "src/component/interfaces/ISliderConfiguration.ts",
+ "src/component/interfaces/interfaces.ts",
+ "src/component/keyboard/KeyPlayHandler.ts",
+ "src/component/keyboard/KeySequenceNavigationHandler.ts",
+ "src/component/keyboard/KeySpatialNavigationHandler.ts",
+ "src/component/keyboard/KeyZoomHandler.ts",
+ "src/component/keyboard/KeyboardComponent.ts",
"src/component/marker/Marker.ts",
"src/component/marker/MarkerComponent.ts",
"src/component/marker/MarkerScene.ts",
"src/component/mouse/BounceHandler.ts",
"src/component/mouse/DoubleClickZoomHandler.ts",
"src/component/mouse/DragPanHandler.ts",
+ "src/component/mouse/EarthControlHandler.ts",
+ "src/component/mouse/ImageBoundary.ts",
"src/component/mouse/MouseComponent.ts",
- "src/component/mouse/MouseHandlerBase.ts",
"src/component/mouse/ScrollZoomHandler.ts",
"src/component/mouse/TouchZoomHandler.ts",
"src/component/popup/Popup.ts",
"src/component/popup/PopupComponent.ts",
"src/component/popup/popup/Popup.ts",
"src/component/sequence/SequenceComponent.ts",
- "src/component/sequence/SequenceDOMInteraction.ts",
"src/component/sequence/SequenceDOMRenderer.ts",
+ "src/component/sequence/SequenceMode.ts",
+ "src/component/shaders/Shaders.ts",
+ "src/component/slider/SliderComponent.ts",
+ "src/component/slider/SliderDOMRenderer.ts",
+ "src/component/slider/SliderGLRenderer.ts",
+ "src/component/spatialdata/SpatialDataCache.ts",
+ "src/component/spatialdata/SpatialDataComponent.ts",
+ "src/component/spatialdata/SpatialDataScene.ts",
"src/component/tag/Tag.ts",
"src/component/tag/TagComponent.ts",
"src/component/tag/TagCreator.ts",
"src/component/tag/geometry/PolygonGeometry.ts",
"src/component/tag/geometry/RectGeometry.ts",
"src/component/tag/geometry/VertexGeometry.ts",
+ "src/component/tag/handlers/CreateHandlerBase.ts",
+ "src/component/tag/handlers/CreatePointHandler.ts",
+ "src/component/tag/handlers/CreatePolygonHandler.ts",
+ "src/component/tag/handlers/CreateRectDragHandler.ts",
+ "src/component/tag/handlers/CreateRectHandler.ts",
+ "src/component/tag/handlers/CreateVertexHandler.ts",
+ "src/component/tag/handlers/EditVertexHandler.ts",
+ "src/component/tag/handlers/TagHandlerBase.ts",
"src/component/tag/tag/OutlineCreateTag.ts",
"src/component/tag/tag/OutlineRenderTag.ts",
"src/component/tag/tag/OutlineTag.ts",
"src/component/tag/tag/SpotRenderTag.ts",
"src/component/tag/tag/SpotTag.ts",
"src/component/tag/tag/Tag.ts",
+ "src/component/tag/tag/TagDomain.ts",
+ "src/component/utils/ComponentSize.ts",
+ "src/component/utils/HandlerBase.ts",
+ "src/component/utils/MeshFactory.ts",
+ "src/component/utils/MeshScene.ts",
+ "src/component/utils/MouseOperator.ts",
+ "src/component/zoom/ZoomComponent.ts",
+ "src/error/AbortMapillaryError.ts",
"src/error/ArgumentMapillaryError.ts",
"src/error/GraphMapillaryError.ts",
"src/error/MapillaryError.ts",
"src/geo/Camera.ts",
+ "src/geo/Geo.ts",
"src/geo/GeoCoords.ts",
+ "src/geo/Lines.ts",
"src/geo/Spatial.ts",
"src/geo/Transform.ts",
"src/geo/ViewportCoords.ts",
"src/graph/FilterCreator.ts",
"src/graph/Graph.ts",
"src/graph/GraphCalculator.ts",
+ "src/graph/GraphMode.ts",
"src/graph/GraphService.ts",
"src/graph/ImageLoadingService.ts",
"src/graph/MeshReader.ts",
"src/render/RenderCamera.ts",
"src/render/RenderMode.ts",
"src/render/RenderService.ts",
+ "src/state/FrameGenerator.ts",
+ "src/state/RotationDelta.ts",
"src/state/State.ts",
"src/state/StateContext.ts",
"src/state/StateService.ts",
+ "src/state/TransitionMode.ts",
+ "src/state/states/EarthState.ts",
+ "src/state/states/InteractiveStateBase.ts",
+ "src/state/states/InteractiveWaitingState.ts",
"src/state/states/StateBase.ts",
"src/state/states/TraversingState.ts",
"src/state/states/WaitingState.ts",
"src/tiles/ImageTileStore.ts",
"src/tiles/RegionOfInterestCalculator.ts",
"src/tiles/TextureProvider.ts",
+ "src/utils/DOM.ts",
"src/utils/EventEmitter.ts",
"src/utils/Settings.ts",
+ "src/utils/Support.ts",
"src/utils/Urls.ts",
"src/viewer/Alignment.ts",
"src/viewer/CacheService.ts",
"src/viewer/ComponentController.ts",
"src/viewer/Container.ts",
"src/viewer/ImageSize.ts",
+ "src/viewer/KeyboardService.ts",
"src/viewer/LoadingService.ts",
"src/viewer/MouseService.ts",
"src/viewer/Navigator.ts",
"src/viewer/Observer.ts",
+ "src/viewer/PanService.ts",
+ "src/viewer/PlayService.ts",
"src/viewer/Projection.ts",
"src/viewer/SpriteService.ts",
"src/viewer/TouchService.ts",
"src/viewer/Viewer.ts"
],
"names": [],
- "mappings": "AAAA;ACAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AC5JA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;ACzGA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AClHA;;ACAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AC1GA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;ACxLA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AC1qDA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;ACpoBA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;ACpBA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;ACnGA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;AC3BA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;ACZA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;ACxBA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;AC7NA;AACA;AACA;AACA;AACA;;;;;ACJA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;ACjBA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;ACpFA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;ACnBA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;ACtBA;AACA;AACA;AACA;AACA;AACA;;ACLA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;ACpPA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;AChOA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AC1mBA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AC5DA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;ACjjBA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AChDA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;ACnCA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AC9HA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AC/PA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;ACPA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AC7BA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;ACrGA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AChDA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;ACvKA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;ACvCA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;ACvQA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AChMA;AACA;AACA;AACA;AACA;;ACJA;AACA;AACA;AACA;AACA;;ACJA;AACA;AACA;AACA;AACA;;ACJA;AACA;AACA;AACA;AACA;;ACJA;AACA;AACA;AACA;AACA;;ACJA;AACA;AACA;AACA;AACA;;ACJA;AACA;AACA;AACA;AACA;;ACJA;AACA;AACA;AACA;AACA;;ACJA;AACA;AACA;AACA;AACA;;ACJA;AACA;AACA;AACA;AACA;;ACJA;AACA;AACA;AACA;AACA;;ACJA;AACA;AACA;AACA;AACA;;ACJA;AACA;AACA;AACA;AACA;;ACJA;AACA;AACA;AACA;AACA;;ACJA;AACA;AACA;AACA;AACA;AACA;;ACLA;AACA;AACA;AACA;AACA;;ACJA;AACA;AACA;AACA;AACA;;ACJA;AACA;AACA;AACA;AACA;;ACJA;AACA;AACA;AACA;AACA;;ACJA;AACA;AACA;AACA;AACA;;ACJA;AACA;AACA;AACA;AACA;;ACJA;AACA;AACA;AACA;AACA;AACA;;ACLA;AACA;AACA;AACA;AACA;;ACJA;AACA;AACA;AACA;AACA;;ACJA;AACA;AACA;AACA;AACA;AACA;;ACLA;AACA;AACA;AACA;AACA;;ACJA;AACA;AACA;AACA;AACA;;ACJA;AACA;AACA;AACA;AACA;;ACJA;AACA;AACA;AACA;AACA;;ACJA;AACA;AACA;AACA;AACA;;ACJA;AACA;AACA;AACA;AACA;AACA;;ACLA;AACA;AACA;AACA;AACA;;ACJA;AACA;AACA;AACA;AACA;;ACJA;AACA;AACA;AACA;AACA;;ACJA;AACA;AACA;AACA;AACA;;ACJA;AACA;AACA;AACA;AACA;;ACJA;AACA;AACA;AACA;AACA;;ACJA;AACA;AACA;AACA;AACA;;ACJA;AACA;AACA;AACA;AACA;;ACJA;AACA;AACA;AACA;AACA;;ACJA;AACA;AACA;AACA;AACA;;ACJA;AACA;AACA;AACA;AACA;;ACJA;AACA;AACA;AACA;AACA;;ACJA;AACA;AACA;AACA;AACA;;ACJA;AACA;AACA;AACA;AACA;;ACJA;AACA;AACA;AACA;AACA;;ACJA;AACA;AACA;AACA;AACA;;ACJA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;ACrEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;ACzHA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;ACxKA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AClGA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AChFA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AClFA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AC3IA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;ACzHA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AClKA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;ACxHA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;ACzDA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AC1GA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;ACvIA;AACA;AACA;AACA;;ACHA;AACA;AACA;AACA;;ACHA;AACA;AACA;AACA;;ACHA;AACA;AACA;AACA;;ACHA;AACA;AACA;AACA;;ACHA;AACA;AACA;AACA;;ACHA;AACA;AACA;AACA;;ACHA;AACA;AACA;AACA;;ACHA;AACA;AACA;AACA;;ACHA;AACA;AACA;AACA;;ACHA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AC3EA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AC3IA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;ACzHA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;ACnHA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;ACvJA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AC7KA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;ACnHA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;ACtIA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;ACvHA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AC3GA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AChHA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;ACtJA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AC5FA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AC1CA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;ACvJA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;ACtHA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;ACtFA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AChJA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AC9GA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AC1KA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;ACxDA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AChHA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AC5EA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;ACxDA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;ACtBA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;ACjBA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;ACtHA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;ACvBA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AClDA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;ACtEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;ACjEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AC7CA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AC3IA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;ACxFA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AC1EA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AC7IA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;ACnHA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;ACjIA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;ACtRA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AC3CA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AC7IA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AClDA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AChDA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;ACfA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AC9CA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;ACjEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;ACrCA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;ACzBA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;ACTA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;ACjCA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AC3BA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AC3BA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AC1BA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AChCA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;ACxBA;AACA;AACA;AACA;;ACHA;AACA;AACA;;ACFA;AACA;AACA;;ACFA;AACA;AACA;AACA;AACA;AACA;;ACLA;AACA;AACA;AACA;AACA;AACA;;ACLA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;ACXA;AACA;AACA;AACA;AACA;AACA;;ACLA;AACA;AACA;AACA;AACA;AACA;;ACLA;AACA;AACA;AACA;AACA;AACA;;;ACLA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;AClBA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AC7EA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;ACnBA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AClBA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AC12BA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;ACrFA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AC5gDA;AACA;AACA;AACA;;ACHA;AACA;AACA;AACA;;ACHA;AACA;AACA;AACA;;ACHA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;ACfA;AACA;AACA;AACA;;ACHA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;ACjGA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AC9CA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;ACrFA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;ACvJA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AChFA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;ACfA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AC3BA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;ACjBA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;ACzIA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;ACtDA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;ACxCA;AACA;AACA;AACA;AACA;AACA;;ACLA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;ACPA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;ACPA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;ACPA;AACA;AACA;AACA;AACA;AACA;;ACLA;AACA;;ACDA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;ACxEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;ACtBA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;ACVA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AC1DA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AC3aA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;ACjBA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AChFA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AC1BA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;ACvDA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AC3SA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AChKA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AC3BA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;ACpBA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;ACjEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;ACxBA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AC9EA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;ACtFA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;ACtCA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;ACzEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;ACxDA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;AC37BA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;ACnCA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;ACpOA;AACA;AACA;AACA;AACA;AACA;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IAE5C;;;;OAIG;IACW,qBAAc,GAAW,gBAAgB,CAAC;IAExD;;;;OAIG;IACW,gBAAS,GAAW,WAAW,CAAC;IAE9C;;;;;OAKG;IACW,gBAAS,GAAW,WAAW,CAAC;IAE9C;;;;OAIG;IACW,eAAQ,GAAW,UAAU,CAAC;IAE5C;;;;OAIG;IACW,gBAAS,GAAW,WAAW,CAAC;IAE9C;;;;OAIG;IACW,cAAO,GAAW,SAAS,CAAC;IAE1C;;;;OAIG;IACW,cAAO,GAAW,SAAS,CAAC;IAE1C;;;;;OAKG;IACW,gBAAS,GAAW,WAAW,CAAC;IAE9C;;;;OAIG;IACW,kBAAW,GAAW,aAAa,CAAC;IAElD;;;;OAIG;IACW,2BAAoB,GAAW,sBAAsB,CAAC;IAEpE;;;;OAIG;IACW,0BAAmB,GAAW,qBAAqB,CAAC;IAojBtE,aAAC;CAjqBD,AAiqBC,CAjqB2B,oBAAY,GAiqBvC;AAjqBY,wBAAM",
+ "mappings": "AAAA;ACAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AC5JA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;ACzGA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AClHA;;ACAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AC1GA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;ACxLA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AClrDA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AC1oBA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;ACpBA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;ACnGA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;AC3BA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;ACZA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;ACxBA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;AC7NA;AACA;AACA;AACA;AACA;;;;;ACJA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;ACjBA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;ACpFA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;ACnBA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;ACtBA;AACA;AACA;AACA;AACA;AACA;;ACLA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;ACpPA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;ACvrDA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;AChOA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AC1mBA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AC/DA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;ACljBA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AC7GA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AC3DA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;ACvDA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;ACxCA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;ACtEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;ACpHA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;ACjBA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;ACjCA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AC7HA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AChBA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AC1KA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AC5CA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;ACzPA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;ACpIA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;ACnBA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AC3JA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;ACvDA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AC1GA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AClHA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AClHA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;ACjBA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;ACpBA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;ACZA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;ACvFA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;ACpCA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AC5BA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AChEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;ACjCA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;ACrDA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AC1BA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;ACzBA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AC9HA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;ACVA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;ACzBA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AC7BA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;ACTA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AC5BA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AC5BA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;ACzCA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AC3FA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AC7CA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;ACbA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AChBA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;ACxCA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AClCA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;ACrOA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AClFA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;ACVA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AClDA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;ACrGA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;ACjKA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;ACxHA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AC/FA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AC7DA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;ACPA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;ACrBA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;ACXA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;ACPA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;ACPA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;ACPA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;ACnEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;ACzFA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AC3EA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AClDA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;ACxGA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;ACjJA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;ACxCA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AC9EA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;ACxEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;ACPA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;ACjBA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;ACjCA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AChEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AC1DA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AC/FA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;ACjHA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;ACxDA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;ACvCA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;ACxEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;ACPA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;ACbA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;ACnMA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;ACvCA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AC9CA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;ACbA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AC1DA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;ACzCA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;ACnDA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;ACVA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;ACXA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;ACTA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AC3GA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;ACdA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AC5GA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;ACVA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;ACvCA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AC5EA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;ACzFA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AC9CA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;ACXA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AC/BA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;ACVA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;ACRA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;ACRA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;ACbA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;ACjBA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;ACjBA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;ACvEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AChEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AC9FA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;ACrDA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;ACvFA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AC1DA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AC3DA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AClFA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AChIA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;ACZA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AC1CA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;ACjFA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AC5CA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AC/DA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;ACzDA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AC1DA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;ACjCA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;ACpBA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;ACRA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;ACzFA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;ACPA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AC9DA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AC7EA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;ACnDA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AC5DA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;ACxFA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;ACtGA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AC1FA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;ACnBA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AC3BA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;ACXA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AC/EA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;ACjBA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;ACdA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AChFA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;ACzFA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;ACxKA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AC/IA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AC/FA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AChGA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;ACbA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;ACPA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AC5BA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AC9CA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AC7CA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AC/CA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AC7CA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;ACpGA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AClEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;ACjDA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;ACxBA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AC5GA;AACA;AACA;AACA;AACA;AACA;;ACLA;AACA;AACA;AACA;AACA;AACA;;ACLA;AACA;AACA;AACA;AACA;AACA;;ACLA;AACA;AACA;AACA;AACA;AACA;;ACLA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;ACXA;AACA;AACA;AACA;;ACHA;AACA;AACA;AACA;AACA;AACA;AACA;;ACNA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;ACVA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;ACVA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;ACrBA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;ACVA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;ACVA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;ACZA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;ACnBA;AACA;AACA;AACA;;ACHA;AACA;AACA;AACA;AACA;AACA;AACA;;ACNA;AACA;AACA;AACA;AACA;AACA;AACA;;ACNA;AACA;AACA;AACA;;ACHA;AACA;AACA;AACA;;ACHA;AACA;AACA;AACA;AACA;AACA;AACA;;ACNA;AACA;AACA;AACA;AACA;AACA;AACA;;ACNA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;ACPA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;ACPA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;ACPA;AACA;AACA;AACA;AACA;AACA;AACA;;ACNA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;ACPA;AACA;AACA;AACA;AACA;AACA;AACA;;ACNA;AACA;AACA;AACA;AACA;AACA;AACA;;ACNA;AACA;AACA;AACA;AACA;;ACJA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;ACXA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;ACvBA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AC5CA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;ACVA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;ACzBA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;ACZA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;ACbA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;ACZA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;ACpBA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AClBA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AClNA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;ACr7BA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;ACrFA;AACA;AACA;AACA;;ACHA;AACA;AACA;AACA;;ACHA;AACA;AACA;AACA;;ACHA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;ACfA;AACA;AACA;AACA;;ACHA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;ACjGA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AC9CA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;ACrFA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;ACvJA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AChFA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;ACfA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AC3BA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;ACjBA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;ACzIA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;ACtDA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;ACxCA;AACA;AACA;AACA;AACA;AACA;;ACLA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;ACPA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;ACPA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;ACPA;AACA;AACA;AACA;AACA;AACA;;ACLA;AACA;;ACDA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;ACxEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;ACtBA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;ACVA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AC1DA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AC3aA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;ACjBA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AChFA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AC1BA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;ACvDA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AC3SA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AChKA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AC3BA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;ACpBA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;ACjEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;ACxBA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AC9EA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;ACtFA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;ACtCA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;ACzEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;ACxDA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;AC37BA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;ACnCA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;ACpOA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;ACRA,qCAAkC;AAA1B,wBAAA,KAAK,CAAA;AACb,mDAAgD;AAAxC,sCAAA,YAAY,CAAA;;;;;;;;ACDpB,mDAAgD;AAAxC,gCAAA,SAAS,CAAA;AACjB,iEAA8D;AAAtD,8CAAA,gBAAgB,CAAA;AACxB,6DAA0D;AAAlD,oCAAA,WAAW,CAAA;AACnB,6DAA0D;AAAlD,oCAAA,WAAW,CAAA;AACnB,yDAAsD;AAA9C,gCAAA,SAAS,CAAA;AACjB,iEAA8D;AAAtD,wCAAA,aA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;;;;OAYG;IACW,uBAAgB,GAAW,kBAAkB,CAAC;IAE5D;;;;OAIG;IACW,kBAAW,GAAW,aAAa,CAAC;IAElD;;;;OAIG;IACW,2BAAoB,GAAW,sBAAsB,CAAC;IAEpE;;;;OAIG;IACW,0BAAmB,GAAW,qBAAqB,CAAC;IAqrBtE,aAAC;CAtzBD,AAszBC,CAtzB2B,oBAAY,GAszBvC;AAtzBY,wBAAM",
"file": "generated.js",
"sourceRoot": "",
"sourcesContent": [
"",
"/*!\n * Cross-Browser Split 1.1.1\n * Copyright 2007-2012 Steven Levithan <stevenlevithan.com>\n * Available under the MIT License\n * ECMAScript compliant, uniform cross-browser split method\n */\n\n/**\n * Splits a string into an array of strings using a regex or string separator. Matches of the\n * separator are not included in the result array. However, if `separator` is a regex that contains\n * capturing groups, backreferences are spliced into the result each time `separator` is matched.\n * Fixes browser bugs compared to the native `String.prototype.split` and can be used reliably\n * cross-browser.\n * @param {String} str String to split.\n * @param {RegExp|String} separator Regex or string to use for separating the string.\n * @param {Number} [limit] Maximum number of items to include in the result array.\n * @returns {Array} Array of substrings.\n * @example\n *\n * // Basic use\n * split('a b c d', ' ');\n * // -> ['a', 'b', 'c', 'd']\n *\n * // With limit\n * split('a b c d', ' ', 2);\n * // -> ['a', 'b']\n *\n * // Backreferences in result array\n * split('..word1 word2..', /([a-z]+)(\\d+)/i);\n * // -> ['..', 'word', '1', ' ', 'word', '2', '..']\n */\nmodule.exports = (function split(undef) {\n\n var nativeSplit = String.prototype.split,\n compliantExecNpcg = /()??/.exec(\"\")[1] === undef,\n // NPCG: nonparticipating capturing group\n self;\n\n self = function(str, separator, limit) {\n // If `separator` is not a regex, use `nativeSplit`\n if (Object.prototype.toString.call(separator) !== \"[object RegExp]\") {\n return nativeSplit.call(str, separator, limit);\n }\n var output = [],\n flags = (separator.ignoreCase ? \"i\" : \"\") + (separator.multiline ? \"m\" : \"\") + (separator.extended ? \"x\" : \"\") + // Proposed for ES6\n (separator.sticky ? \"y\" : \"\"),\n // Firefox 3+\n lastLastIndex = 0,\n // Make `global` and avoid `lastIndex` issues by working with a copy\n separator = new RegExp(separator.source, flags + \"g\"),\n separator2, match, lastIndex, lastLength;\n str += \"\"; // Type-convert\n if (!compliantExecNpcg) {\n // Doesn't need flags gy, but they don't hurt\n separator2 = new RegExp(\"^\" + separator.source + \"$(?!\\\\s)\", flags);\n }\n /* Values for `limit`, per the spec:\n * If undefined: 4294967295 // Math.pow(2, 32) - 1\n * If 0, Infinity, or NaN: 0\n * If positive number: limit = Math.floor(limit); if (limit > 4294967295) limit -= 4294967296;\n * If negative number: 4294967296 - Math.floor(Math.abs(limit))\n * If other: Type-convert, then use the above rules\n */\n limit = limit === undef ? -1 >>> 0 : // Math.pow(2, 32) - 1\n limit >>> 0; // ToUint32(limit)\n while (match = separator.exec(str)) {\n // `separator.lastIndex` is not reliable cross-browser\n lastIndex = match.index + match[0].length;\n if (lastIndex > lastLastIndex) {\n output.push(str.slice(lastLastIndex, match.index));\n // Fix browsers whose `exec` methods don't consistently return `undefined` for\n // nonparticipating capturing groups\n if (!compliantExecNpcg && match.length > 1) {\n match[0].replace(separator2, function() {\n for (var i = 1; i < arguments.length - 2; i++) {\n if (arguments[i] === undef) {\n match[i] = undef;\n }\n }\n });\n }\n if (match.length > 1 && match.index < str.length) {\n Array.prototype.push.apply(output, match.slice(1));\n }\n lastLength = match[0].length;\n lastLastIndex = lastIndex;\n if (output.length >= limit) {\n break;\n }\n }\n if (separator.lastIndex === match.index) {\n separator.lastIndex++; // Avoid an infinite loop\n }\n }\n if (lastLastIndex === str.length) {\n if (lastLength || !separator.test(\"\")) {\n output.push(\"\");\n }\n } else {\n output.push(str.slice(lastLastIndex));\n }\n return output.length > limit ? output.slice(0, limit) : output;\n };\n\n return self;\n})();\n",
"// shim for using process in browser\nvar process = module.exports = {};\n\n// cached from whatever global is present so that test runners that stub it\n// don't break things. But we need to wrap it in a try catch in case it is\n// wrapped in strict mode code which doesn't define any globals. It's inside a\n// function because try/catches deoptimize in certain engines.\n\nvar cachedSetTimeout;\nvar cachedClearTimeout;\n\nfunction defaultSetTimout() {\n throw new Error('setTimeout has not been defined');\n}\nfunction defaultClearTimeout () {\n throw new Error('clearTimeout has not been defined');\n}\n(function () {\n try {\n if (typeof setTimeout === 'function') {\n cachedSetTimeout = setTimeout;\n } else {\n cachedSetTimeout = defaultSetTimout;\n }\n } catch (e) {\n cachedSetTimeout = defaultSetTimout;\n }\n try {\n if (typeof clearTimeout === 'function') {\n cachedClearTimeout = clearTimeout;\n } else {\n cachedClearTimeout = defaultClearTimeout;\n }\n } catch (e) {\n cachedClearTimeout = defaultClearTimeout;\n }\n} ())\nfunction runTimeout(fun) {\n if (cachedSetTimeout === setTimeout) {\n //normal enviroments in sane situations\n return setTimeout(fun, 0);\n }\n // if setTimeout wasn't available but was latter defined\n if ((cachedSetTimeout === defaultSetTimout || !cachedSetTimeout) && setTimeout) {\n cachedSetTimeout = setTimeout;\n return setTimeout(fun, 0);\n }\n try {\n // when when somebody has screwed with setTimeout but no I.E. maddness\n return cachedSetTimeout(fun, 0);\n } catch(e){\n try {\n // When we are in I.E. but the script has been evaled so I.E. doesn't trust the global object when called normally\n return cachedSetTimeout.call(null, fun, 0);\n } catch(e){\n // same as above but when it's a version of I.E. that must have the global object for 'this', hopfully our context correct otherwise it will throw a global error\n return cachedSetTimeout.call(this, fun, 0);\n }\n }\n\n\n}\nfunction runClearTimeout(marker) {\n if (cachedClearTimeout === clearTimeout) {\n //normal enviroments in sane situations\n return clearTimeout(marker);\n }\n // if clearTimeout wasn't available but was latter defined\n if ((cachedClearTimeout === defaultClearTimeout || !cachedClearTimeout) && clearTimeout) {\n cachedClearTimeout = clearTimeout;\n return clearTimeout(marker);\n }\n try {\n // when when somebody has screwed with setTimeout but no I.E. maddness\n return cachedClearTimeout(marker);\n } catch (e){\n try {\n // When we are in I.E. but the script has been evaled so I.E. doesn't trust the global object when called normally\n return cachedClearTimeout.call(null, marker);\n } catch (e){\n // same as above but when it's a version of I.E. that must have the global object for 'this', hopfully our context correct otherwise it will throw a global error.\n // Some versions of I.E. have different rules for clearTimeout vs setTimeout\n return cachedClearTimeout.call(this, marker);\n }\n }\n\n\n\n}\nvar queue = [];\nvar draining = false;\nvar currentQueue;\nvar queueIndex = -1;\n\nfunction cleanUpNextTick() {\n if (!draining || !currentQueue) {\n return;\n }\n draining = false;\n if (currentQueue.length) {\n queue = currentQueue.concat(queue);\n } else {\n queueIndex = -1;\n }\n if (queue.length) {\n drainQueue();\n }\n}\n\nfunction drainQueue() {\n if (draining) {\n return;\n }\n var timeout = runTimeout(cleanUpNextTick);\n draining = true;\n\n var len = queue.length;\n while(len) {\n currentQueue = queue;\n queue = [];\n while (++queueIndex < len) {\n if (currentQueue) {\n currentQueue[queueIndex].run();\n }\n }\n queueIndex = -1;\n len = queue.length;\n }\n currentQueue = null;\n draining = false;\n runClearTimeout(timeout);\n}\n\nprocess.nextTick = function (fun) {\n var args = new Array(arguments.length - 1);\n if (arguments.length > 1) {\n for (var i = 1; i < arguments.length; i++) {\n args[i - 1] = arguments[i];\n }\n }\n queue.push(new Item(fun, args));\n if (queue.length === 1 && !draining) {\n runTimeout(drainQueue);\n }\n};\n\n// v8 likes predictible objects\nfunction Item(fun, array) {\n this.fun = fun;\n this.array = array;\n}\nItem.prototype.run = function () {\n this.fun.apply(null, this.array);\n};\nprocess.title = 'browser';\nprocess.browser = true;\nprocess.env = {};\nprocess.argv = [];\nprocess.version = ''; // empty string to avoid regexp issues\nprocess.versions = {};\n\nfunction noop() {}\n\nprocess.on = noop;\nprocess.addListener = noop;\nprocess.once = noop;\nprocess.off = noop;\nprocess.removeListener = noop;\nprocess.removeAllListeners = noop;\nprocess.emit = noop;\nprocess.prependListener = noop;\nprocess.prependOnceListener = noop;\n\nprocess.listeners = function (name) { return [] }\n\nprocess.binding = function (name) {\n throw new Error('process.binding is not supported');\n};\n\nprocess.cwd = function () { return '/' };\nprocess.chdir = function (dir) {\n throw new Error('process.chdir is not supported');\n};\nprocess.umask = function() { return 0; };\n",
- "/*!\n * The buffer module from node.js, for the browser.\n *\n * @author Feross Aboukhadijeh <feross@feross.org> <http://feross.org>\n * @license MIT\n */\n/* eslint-disable no-proto */\n\n'use strict'\n\nvar base64 = require('base64-js')\nvar ieee754 = require('ieee754')\n\nexports.Buffer = Buffer\nexports.SlowBuffer = SlowBuffer\nexports.INSPECT_MAX_BYTES = 50\n\nvar K_MAX_LENGTH = 0x7fffffff\nexports.kMaxLength = K_MAX_LENGTH\n\n/**\n * If `Buffer.TYPED_ARRAY_SUPPORT`:\n * === true Use Uint8Array implementation (fastest)\n * === false Print warning and recommend using `buffer` v4.x which has an Object\n * implementation (most compatible, even IE6)\n *\n * Browsers that support typed arrays are IE 10+, Firefox 4+, Chrome 7+, Safari 5.1+,\n * Opera 11.6+, iOS 4.2+.\n *\n * We report that the browser does not support typed arrays if the are not subclassable\n * using __proto__. Firefox 4-29 lacks support for adding new properties to `Uint8Array`\n * (See: https://bugzilla.mozilla.org/show_bug.cgi?id=695438). IE 10 lacks support\n * for __proto__ and has a buggy typed array implementation.\n */\nBuffer.TYPED_ARRAY_SUPPORT = typedArraySupport()\n\nif (!Buffer.TYPED_ARRAY_SUPPORT && typeof console !== 'undefined' &&\n typeof console.error === 'function') {\n console.error(\n 'This browser lacks typed array (Uint8Array) support which is required by ' +\n '`buffer` v5.x. Use `buffer` v4.x if you require old browser support.'\n )\n}\n\nfunction typedArraySupport () {\n // Can typed array instances can be augmented?\n try {\n var arr = new Uint8Array(1)\n arr.__proto__ = {__proto__: Uint8Array.prototype, foo: function () { return 42 }}\n return arr.foo() === 42\n } catch (e) {\n return false\n }\n}\n\nfunction createBuffer (length) {\n if (length > K_MAX_LENGTH) {\n throw new RangeError('Invalid typed array length')\n }\n // Return an augmented `Uint8Array` instance\n var buf = new Uint8Array(length)\n buf.__proto__ = Buffer.prototype\n return buf\n}\n\n/**\n * The Buffer constructor returns instances of `Uint8Array` that have their\n * prototype changed to `Buffer.prototype`. Furthermore, `Buffer` is a subclass of\n * `Uint8Array`, so the returned instances will have all the node `Buffer` methods\n * and the `Uint8Array` methods. Square bracket notation works as expected -- it\n * returns a single octet.\n *\n * The `Uint8Array` prototype remains unmodified.\n */\n\nfunction Buffer (arg, encodingOrOffset, length) {\n // Common case.\n if (typeof arg === 'number') {\n if (typeof encodingOrOffset === 'string') {\n throw new Error(\n 'If encoding is specified then the first argument must be a string'\n )\n }\n return allocUnsafe(arg)\n }\n return from(arg, encodingOrOffset, length)\n}\n\n// Fix subarray() in ES2016. See: https://github.com/feross/buffer/pull/97\nif (typeof Symbol !== 'undefined' && Symbol.species &&\n Buffer[Symbol.species] === Buffer) {\n Object.defineProperty(Buffer, Symbol.species, {\n value: null,\n configurable: true,\n enumerable: false,\n writable: false\n })\n}\n\nBuffer.poolSize = 8192 // not used by this implementation\n\nfunction from (value, encodingOrOffset, length) {\n if (typeof value === 'number') {\n throw new TypeError('\"value\" argument must not be a number')\n }\n\n if (value instanceof ArrayBuffer) {\n return fromArrayBuffer(value, encodingOrOffset, length)\n }\n\n if (typeof value === 'string') {\n return fromString(value, encodingOrOffset)\n }\n\n return fromObject(value)\n}\n\n/**\n * Functionally equivalent to Buffer(arg, encoding) but throws a TypeError\n * if value is a number.\n * Buffer.from(str[, encoding])\n * Buffer.from(array)\n * Buffer.from(buffer)\n * Buffer.from(arrayBuffer[, byteOffset[, length]])\n **/\nBuffer.from = function (value, encodingOrOffset, length) {\n return from(value, encodingOrOffset, length)\n}\n\n// Note: Change prototype *after* Buffer.from is defined to workaround Chrome bug:\n// https://github.com/feross/buffer/pull/148\nBuffer.prototype.__proto__ = Uint8Array.prototype\nBuffer.__proto__ = Uint8Array\n\nfunction assertSize (size) {\n if (typeof size !== 'number') {\n throw new TypeError('\"size\" argument must be a number')\n } else if (size < 0) {\n throw new RangeError('\"size\" argument must not be negative')\n }\n}\n\nfunction alloc (size, fill, encoding) {\n assertSize(size)\n if (size <= 0) {\n return createBuffer(size)\n }\n if (fill !== undefined) {\n // Only pay attention to encoding if it's a string. This\n // prevents accidentally sending in a number that would\n // be interpretted as a start offset.\n return typeof encoding === 'string'\n ? createBuffer(size).fill(fill, encoding)\n : createBuffer(size).fill(fill)\n }\n return createBuffer(size)\n}\n\n/**\n * Creates a new filled Buffer instance.\n * alloc(size[, fill[, encoding]])\n **/\nBuffer.alloc = function (size, fill, encoding) {\n return alloc(size, fill, encoding)\n}\n\nfunction allocUnsafe (size) {\n assertSize(size)\n return createBuffer(size < 0 ? 0 : checked(size) | 0)\n}\n\n/**\n * Equivalent to Buffer(num), by default creates a non-zero-filled Buffer instance.\n * */\nBuffer.allocUnsafe = function (size) {\n return allocUnsafe(size)\n}\n/**\n * Equivalent to SlowBuffer(num), by default creates a non-zero-filled Buffer instance.\n */\nBuffer.allocUnsafeSlow = function (size) {\n return allocUnsafe(size)\n}\n\nfunction fromString (string, encoding) {\n if (typeof encoding !== 'string' || encoding === '') {\n encoding = 'utf8'\n }\n\n if (!Buffer.isEncoding(encoding)) {\n throw new TypeError('\"encoding\" must be a valid string encoding')\n }\n\n var length = byteLength(string, encoding) | 0\n var buf = createBuffer(length)\n\n var actual = buf.write(string, encoding)\n\n if (actual !== length) {\n // Writing a hex string, for example, that contains invalid characters will\n // cause everything after the first invalid character to be ignored. (e.g.\n // 'abxxcd' will be treated as 'ab')\n buf = buf.slice(0, actual)\n }\n\n return buf\n}\n\nfunction fromArrayLike (array) {\n var length = array.length < 0 ? 0 : checked(array.length) | 0\n var buf = createBuffer(length)\n for (var i = 0; i < length; i += 1) {\n buf[i] = array[i] & 255\n }\n return buf\n}\n\nfunction fromArrayBuffer (array, byteOffset, length) {\n if (byteOffset < 0 || array.byteLength < byteOffset) {\n throw new RangeError('\\'offset\\' is out of bounds')\n }\n\n if (array.byteLength < byteOffset + (length || 0)) {\n throw new RangeError('\\'length\\' is out of bounds')\n }\n\n var buf\n if (byteOffset === undefined && length === undefined) {\n buf = new Uint8Array(array)\n } else if (length === undefined) {\n buf = new Uint8Array(array, byteOffset)\n } else {\n buf = new Uint8Array(array, byteOffset, length)\n }\n\n // Return an augmented `Uint8Array` instance\n buf.__proto__ = Buffer.prototype\n return buf\n}\n\nfunction fromObject (obj) {\n if (Buffer.isBuffer(obj)) {\n var len = checked(obj.length) | 0\n var buf = createBuffer(len)\n\n if (buf.length === 0) {\n return buf\n }\n\n obj.copy(buf, 0, 0, len)\n return buf\n }\n\n if (obj) {\n if (isArrayBufferView(obj) || 'length' in obj) {\n if (typeof obj.length !== 'number' || numberIsNaN(obj.length)) {\n return createBuffer(0)\n }\n return fromArrayLike(obj)\n }\n\n if (obj.type === 'Buffer' && Array.isArray(obj.data)) {\n return fromArrayLike(obj.data)\n }\n }\n\n throw new TypeError('First argument must be a string, Buffer, ArrayBuffer, Array, or array-like object.')\n}\n\nfunction checked (length) {\n // Note: cannot use `length < K_MAX_LENGTH` here because that fails when\n // length is NaN (which is otherwise coerced to zero.)\n if (length >= K_MAX_LENGTH) {\n throw new RangeError('Attempt to allocate Buffer larger than maximum ' +\n 'size: 0x' + K_MAX_LENGTH.toString(16) + ' bytes')\n }\n return length | 0\n}\n\nfunction SlowBuffer (length) {\n if (+length != length) { // eslint-disable-line eqeqeq\n length = 0\n }\n return Buffer.alloc(+length)\n}\n\nBuffer.isBuffer = function isBuffer (b) {\n return b != null && b._isBuffer === true\n}\n\nBuffer.compare = function compare (a, b) {\n if (!Buffer.isBuffer(a) || !Buffer.isBuffer(b)) {\n throw new TypeError('Arguments must be Buffers')\n }\n\n if (a === b) return 0\n\n var x = a.length\n var y = b.length\n\n for (var i = 0, len = Math.min(x, y); i < len; ++i) {\n if (a[i] !== b[i]) {\n x = a[i]\n y = b[i]\n break\n }\n }\n\n if (x < y) return -1\n if (y < x) return 1\n return 0\n}\n\nBuffer.isEncoding = function isEncoding (encoding) {\n switch (String(encoding).toLowerCase()) {\n case 'hex':\n case 'utf8':\n case 'utf-8':\n case 'ascii':\n case 'latin1':\n case 'binary':\n case 'base64':\n case 'ucs2':\n case 'ucs-2':\n case 'utf16le':\n case 'utf-16le':\n return true\n default:\n return false\n }\n}\n\nBuffer.concat = function concat (list, length) {\n if (!Array.isArray(list)) {\n throw new TypeError('\"list\" argument must be an Array of Buffers')\n }\n\n if (list.length === 0) {\n return Buffer.alloc(0)\n }\n\n var i\n if (length === undefined) {\n length = 0\n for (i = 0; i < list.length; ++i) {\n length += list[i].length\n }\n }\n\n var buffer = Buffer.allocUnsafe(length)\n var pos = 0\n for (i = 0; i < list.length; ++i) {\n var buf = list[i]\n if (!Buffer.isBuffer(buf)) {\n throw new TypeError('\"list\" argument must be an Array of Buffers')\n }\n buf.copy(buffer, pos)\n pos += buf.length\n }\n return buffer\n}\n\nfunction byteLength (string, encoding) {\n if (Buffer.isBuffer(string)) {\n return string.length\n }\n if (isArrayBufferView(string) || string instanceof ArrayBuffer) {\n return string.byteLength\n }\n if (typeof string !== 'string') {\n string = '' + string\n }\n\n var len = string.length\n if (len === 0) return 0\n\n // Use a for loop to avoid recursion\n var loweredCase = false\n for (;;) {\n switch (encoding) {\n case 'ascii':\n case 'latin1':\n case 'binary':\n return len\n case 'utf8':\n case 'utf-8':\n case undefined:\n return utf8ToBytes(string).length\n case 'ucs2':\n case 'ucs-2':\n case 'utf16le':\n case 'utf-16le':\n return len * 2\n case 'hex':\n return len >>> 1\n case 'base64':\n return base64ToBytes(string).length\n default:\n if (loweredCase) return utf8ToBytes(string).length // assume utf8\n encoding = ('' + encoding).toLowerCase()\n loweredCase = true\n }\n }\n}\nBuffer.byteLength = byteLength\n\nfunction slowToString (encoding, start, end) {\n var loweredCase = false\n\n // No need to verify that \"this.length <= MAX_UINT32\" since it's a read-only\n // property of a typed array.\n\n // This behaves neither like String nor Uint8Array in that we set start/end\n // to their upper/lower bounds if the value passed is out of range.\n // undefined is handled specially as per ECMA-262 6th Edition,\n // Section 13.3.3.7 Runtime Semantics: KeyedBindingInitialization.\n if (start === undefined || start < 0) {\n start = 0\n }\n // Return early if start > this.length. Done here to prevent potential uint32\n // coercion fail below.\n if (start > this.length) {\n return ''\n }\n\n if (end === undefined || end > this.length) {\n end = this.length\n }\n\n if (end <= 0) {\n return ''\n }\n\n // Force coersion to uint32. This will also coerce falsey/NaN values to 0.\n end >>>= 0\n start >>>= 0\n\n if (end <= start) {\n return ''\n }\n\n if (!encoding) encoding = 'utf8'\n\n while (true) {\n switch (encoding) {\n case 'hex':\n return hexSlice(this, start, end)\n\n case 'utf8':\n case 'utf-8':\n return utf8Slice(this, start, end)\n\n case 'ascii':\n return asciiSlice(this, start, end)\n\n case 'latin1':\n case 'binary':\n return latin1Slice(this, start, end)\n\n case 'base64':\n return base64Slice(this, start, end)\n\n case 'ucs2':\n case 'ucs-2':\n case 'utf16le':\n case 'utf-16le':\n return utf16leSlice(this, start, end)\n\n default:\n if (loweredCase) throw new TypeError('Unknown encoding: ' + encoding)\n encoding = (encoding + '').toLowerCase()\n loweredCase = true\n }\n }\n}\n\n// This property is used by `Buffer.isBuffer` (and the `is-buffer` npm package)\n// to detect a Buffer instance. It's not possible to use `instanceof Buffer`\n// reliably in a browserify context because there could be multiple different\n// copies of the 'buffer' package in use. This method works even for Buffer\n// instances that were created from another copy of the `buffer` package.\n// See: https://github.com/feross/buffer/issues/154\nBuffer.prototype._isBuffer = true\n\nfunction swap (b, n, m) {\n var i = b[n]\n b[n] = b[m]\n b[m] = i\n}\n\nBuffer.prototype.swap16 = function swap16 () {\n var len = this.length\n if (len % 2 !== 0) {\n throw new RangeError('Buffer size must be a multiple of 16-bits')\n }\n for (var i = 0; i < len; i += 2) {\n swap(this, i, i + 1)\n }\n return this\n}\n\nBuffer.prototype.swap32 = function swap32 () {\n var len = this.length\n if (len % 4 !== 0) {\n throw new RangeError('Buffer size must be a multiple of 32-bits')\n }\n for (var i = 0; i < len; i += 4) {\n swap(this, i, i + 3)\n swap(this, i + 1, i + 2)\n }\n return this\n}\n\nBuffer.prototype.swap64 = function swap64 () {\n var len = this.length\n if (len % 8 !== 0) {\n throw new RangeError('Buffer size must be a multiple of 64-bits')\n }\n for (var i = 0; i < len; i += 8) {\n swap(this, i, i + 7)\n swap(this, i + 1, i + 6)\n swap(this, i + 2, i + 5)\n swap(this, i + 3, i + 4)\n }\n return this\n}\n\nBuffer.prototype.toString = function toString () {\n var length = this.length\n if (length === 0) return ''\n if (arguments.length === 0) return utf8Slice(this, 0, length)\n return slowToString.apply(this, arguments)\n}\n\nBuffer.prototype.equals = function equals (b) {\n if (!Buffer.isBuffer(b)) throw new TypeError('Argument must be a Buffer')\n if (this === b) return true\n return Buffer.compare(this, b) === 0\n}\n\nBuffer.prototype.inspect = function inspect () {\n var str = ''\n var max = exports.INSPECT_MAX_BYTES\n if (this.length > 0) {\n str = this.toString('hex', 0, max).match(/.{2}/g).join(' ')\n if (this.length > max) str += ' ... '\n }\n return '<Buffer ' + str + '>'\n}\n\nBuffer.prototype.compare = function compare (target, start, end, thisStart, thisEnd) {\n if (!Buffer.isBuffer(target)) {\n throw new TypeError('Argument must be a Buffer')\n }\n\n if (start === undefined) {\n start = 0\n }\n if (end === undefined) {\n end = target ? target.length : 0\n }\n if (thisStart === undefined) {\n thisStart = 0\n }\n if (thisEnd === undefined) {\n thisEnd = this.length\n }\n\n if (start < 0 || end > target.length || thisStart < 0 || thisEnd > this.length) {\n throw new RangeError('out of range index')\n }\n\n if (thisStart >= thisEnd && start >= end) {\n return 0\n }\n if (thisStart >= thisEnd) {\n return -1\n }\n if (start >= end) {\n return 1\n }\n\n start >>>= 0\n end >>>= 0\n thisStart >>>= 0\n thisEnd >>>= 0\n\n if (this === target) return 0\n\n var x = thisEnd - thisStart\n var y = end - start\n var len = Math.min(x, y)\n\n var thisCopy = this.slice(thisStart, thisEnd)\n var targetCopy = target.slice(start, end)\n\n for (var i = 0; i < len; ++i) {\n if (thisCopy[i] !== targetCopy[i]) {\n x = thisCopy[i]\n y = targetCopy[i]\n break\n }\n }\n\n if (x < y) return -1\n if (y < x) return 1\n return 0\n}\n\n// Finds either the first index of `val` in `buffer` at offset >= `byteOffset`,\n// OR the last index of `val` in `buffer` at offset <= `byteOffset`.\n//\n// Arguments:\n// - buffer - a Buffer to search\n// - val - a string, Buffer, or number\n// - byteOffset - an index into `buffer`; will be clamped to an int32\n// - encoding - an optional encoding, relevant is val is a string\n// - dir - true for indexOf, false for lastIndexOf\nfunction bidirectionalIndexOf (buffer, val, byteOffset, encoding, dir) {\n // Empty buffer means no match\n if (buffer.length === 0) return -1\n\n // Normalize byteOffset\n if (typeof byteOffset === 'string') {\n encoding = byteOffset\n byteOffset = 0\n } else if (byteOffset > 0x7fffffff) {\n byteOffset = 0x7fffffff\n } else if (byteOffset < -0x80000000) {\n byteOffset = -0x80000000\n }\n byteOffset = +byteOffset // Coerce to Number.\n if (numberIsNaN(byteOffset)) {\n // byteOffset: it it's undefined, null, NaN, \"foo\", etc, search whole buffer\n byteOffset = dir ? 0 : (buffer.length - 1)\n }\n\n // Normalize byteOffset: negative offsets start from the end of the buffer\n if (byteOffset < 0) byteOffset = buffer.length + byteOffset\n if (byteOffset >= buffer.length) {\n if (dir) return -1\n else byteOffset = buffer.length - 1\n } else if (byteOffset < 0) {\n if (dir) byteOffset = 0\n else return -1\n }\n\n // Normalize val\n if (typeof val === 'string') {\n val = Buffer.from(val, encoding)\n }\n\n // Finally, search either indexOf (if dir is true) or lastIndexOf\n if (Buffer.isBuffer(val)) {\n // Special case: looking for empty string/buffer always fails\n if (val.length === 0) {\n return -1\n }\n return arrayIndexOf(buffer, val, byteOffset, encoding, dir)\n } else if (typeof val === 'number') {\n val = val & 0xFF // Search for a byte value [0-255]\n if (typeof Uint8Array.prototype.indexOf === 'function') {\n if (dir) {\n return Uint8Array.prototype.indexOf.call(buffer, val, byteOffset)\n } else {\n return Uint8Array.prototype.lastIndexOf.call(buffer, val, byteOffset)\n }\n }\n return arrayIndexOf(buffer, [ val ], byteOffset, encoding, dir)\n }\n\n throw new TypeError('val must be string, number or Buffer')\n}\n\nfunction arrayIndexOf (arr, val, byteOffset, encoding, dir) {\n var indexSize = 1\n var arrLength = arr.length\n var valLength = val.length\n\n if (encoding !== undefined) {\n encoding = String(encoding).toLowerCase()\n if (encoding === 'ucs2' || encoding === 'ucs-2' ||\n encoding === 'utf16le' || encoding === 'utf-16le') {\n if (arr.length < 2 || val.length < 2) {\n return -1\n }\n indexSize = 2\n arrLength /= 2\n valLength /= 2\n byteOffset /= 2\n }\n }\n\n function read (buf, i) {\n if (indexSize === 1) {\n return buf[i]\n } else {\n return buf.readUInt16BE(i * indexSize)\n }\n }\n\n var i\n if (dir) {\n var foundIndex = -1\n for (i = byteOffset; i < arrLength; i++) {\n if (read(arr, i) === read(val, foundIndex === -1 ? 0 : i - foundIndex)) {\n if (foundIndex === -1) foundIndex = i\n if (i - foundIndex + 1 === valLength) return foundIndex * indexSize\n } else {\n if (foundIndex !== -1) i -= i - foundIndex\n foundIndex = -1\n }\n }\n } else {\n if (byteOffset + valLength > arrLength) byteOffset = arrLength - valLength\n for (i = byteOffset; i >= 0; i--) {\n var found = true\n for (var j = 0; j < valLength; j++) {\n if (read(arr, i + j) !== read(val, j)) {\n found = false\n break\n }\n }\n if (found) return i\n }\n }\n\n return -1\n}\n\nBuffer.prototype.includes = function includes (val, byteOffset, encoding) {\n return this.indexOf(val, byteOffset, encoding) !== -1\n}\n\nBuffer.prototype.indexOf = function indexOf (val, byteOffset, encoding) {\n return bidirectionalIndexOf(this, val, byteOffset, encoding, true)\n}\n\nBuffer.prototype.lastIndexOf = function lastIndexOf (val, byteOffset, encoding) {\n return bidirectionalIndexOf(this, val, byteOffset, encoding, false)\n}\n\nfunction hexWrite (buf, string, offset, length) {\n offset = Number(offset) || 0\n var remaining = buf.length - offset\n if (!length) {\n length = remaining\n } else {\n length = Number(length)\n if (length > remaining) {\n length = remaining\n }\n }\n\n // must be an even number of digits\n var strLen = string.length\n if (strLen % 2 !== 0) throw new TypeError('Invalid hex string')\n\n if (length > strLen / 2) {\n length = strLen / 2\n }\n for (var i = 0; i < length; ++i) {\n var parsed = parseInt(string.substr(i * 2, 2), 16)\n if (numberIsNaN(parsed)) return i\n buf[offset + i] = parsed\n }\n return i\n}\n\nfunction utf8Write (buf, string, offset, length) {\n return blitBuffer(utf8ToBytes(string, buf.length - offset), buf, offset, length)\n}\n\nfunction asciiWrite (buf, string, offset, length) {\n return blitBuffer(asciiToBytes(string), buf, offset, length)\n}\n\nfunction latin1Write (buf, string, offset, length) {\n return asciiWrite(buf, string, offset, length)\n}\n\nfunction base64Write (buf, string, offset, length) {\n return blitBuffer(base64ToBytes(string), buf, offset, length)\n}\n\nfunction ucs2Write (buf, string, offset, length) {\n return blitBuffer(utf16leToBytes(string, buf.length - offset), buf, offset, length)\n}\n\nBuffer.prototype.write = function write (string, offset, length, encoding) {\n // Buffer#write(string)\n if (offset === undefined) {\n encoding = 'utf8'\n length = this.length\n offset = 0\n // Buffer#write(string, encoding)\n } else if (length === undefined && typeof offset === 'string') {\n encoding = offset\n length = this.length\n offset = 0\n // Buffer#write(string, offset[, length][, encoding])\n } else if (isFinite(offset)) {\n offset = offset >>> 0\n if (isFinite(length)) {\n length = length >>> 0\n if (encoding === undefined) encoding = 'utf8'\n } else {\n encoding = length\n length = undefined\n }\n } else {\n throw new Error(\n 'Buffer.write(string, encoding, offset[, length]) is no longer supported'\n )\n }\n\n var remaining = this.length - offset\n if (length === undefined || length > remaining) length = remaining\n\n if ((string.length > 0 && (length < 0 || offset < 0)) || offset > this.length) {\n throw new RangeError('Attempt to write outside buffer bounds')\n }\n\n if (!encoding) encoding = 'utf8'\n\n var loweredCase = false\n for (;;) {\n switch (encoding) {\n case 'hex':\n return hexWrite(this, string, offset, length)\n\n case 'utf8':\n case 'utf-8':\n return utf8Write(this, string, offset, length)\n\n case 'ascii':\n return asciiWrite(this, string, offset, length)\n\n case 'latin1':\n case 'binary':\n return latin1Write(this, string, offset, length)\n\n case 'base64':\n // Warning: maxLength not taken into account in base64Write\n return base64Write(this, string, offset, length)\n\n case 'ucs2':\n case 'ucs-2':\n case 'utf16le':\n case 'utf-16le':\n return ucs2Write(this, string, offset, length)\n\n default:\n if (loweredCase) throw new TypeError('Unknown encoding: ' + encoding)\n encoding = ('' + encoding).toLowerCase()\n loweredCase = true\n }\n }\n}\n\nBuffer.prototype.toJSON = function toJSON () {\n return {\n type: 'Buffer',\n data: Array.prototype.slice.call(this._arr || this, 0)\n }\n}\n\nfunction base64Slice (buf, start, end) {\n if (start === 0 && end === buf.length) {\n return base64.fromByteArray(buf)\n } else {\n return base64.fromByteArray(buf.slice(start, end))\n }\n}\n\nfunction utf8Slice (buf, start, end) {\n end = Math.min(buf.length, end)\n var res = []\n\n var i = start\n while (i < end) {\n var firstByte = buf[i]\n var codePoint = null\n var bytesPerSequence = (firstByte > 0xEF) ? 4\n : (firstByte > 0xDF) ? 3\n : (firstByte > 0xBF) ? 2\n : 1\n\n if (i + bytesPerSequence <= end) {\n var secondByte, thirdByte, fourthByte, tempCodePoint\n\n switch (bytesPerSequence) {\n case 1:\n if (firstByte < 0x80) {\n codePoint = firstByte\n }\n break\n case 2:\n secondByte = buf[i + 1]\n if ((secondByte & 0xC0) === 0x80) {\n tempCodePoint = (firstByte & 0x1F) << 0x6 | (secondByte & 0x3F)\n if (tempCodePoint > 0x7F) {\n codePoint = tempCodePoint\n }\n }\n break\n case 3:\n secondByte = buf[i + 1]\n thirdByte = buf[i + 2]\n if ((secondByte & 0xC0) === 0x80 && (thirdByte & 0xC0) === 0x80) {\n tempCodePoint = (firstByte & 0xF) << 0xC | (secondByte & 0x3F) << 0x6 | (thirdByte & 0x3F)\n if (tempCodePoint > 0x7FF && (tempCodePoint < 0xD800 || tempCodePoint > 0xDFFF)) {\n codePoint = tempCodePoint\n }\n }\n break\n case 4:\n secondByte = buf[i + 1]\n thirdByte = buf[i + 2]\n fourthByte = buf[i + 3]\n if ((secondByte & 0xC0) === 0x80 && (thirdByte & 0xC0) === 0x80 && (fourthByte & 0xC0) === 0x80) {\n tempCodePoint = (firstByte & 0xF) << 0x12 | (secondByte & 0x3F) << 0xC | (thirdByte & 0x3F) << 0x6 | (fourthByte & 0x3F)\n if (tempCodePoint > 0xFFFF && tempCodePoint < 0x110000) {\n codePoint = tempCodePoint\n }\n }\n }\n }\n\n if (codePoint === null) {\n // we did not generate a valid codePoint so insert a\n // replacement char (U+FFFD) and advance only 1 byte\n codePoint = 0xFFFD\n bytesPerSequence = 1\n } else if (codePoint > 0xFFFF) {\n // encode to utf16 (surrogate pair dance)\n codePoint -= 0x10000\n res.push(codePoint >>> 10 & 0x3FF | 0xD800)\n codePoint = 0xDC00 | codePoint & 0x3FF\n }\n\n res.push(codePoint)\n i += bytesPerSequence\n }\n\n return decodeCodePointsArray(res)\n}\n\n// Based on http://stackoverflow.com/a/22747272/680742, the browser with\n// the lowest limit is Chrome, with 0x10000 args.\n// We go 1 magnitude less, for safety\nvar MAX_ARGUMENTS_LENGTH = 0x1000\n\nfunction decodeCodePointsArray (codePoints) {\n var len = codePoints.length\n if (len <= MAX_ARGUMENTS_LENGTH) {\n return String.fromCharCode.apply(String, codePoints) // avoid extra slice()\n }\n\n // Decode in chunks to avoid \"call stack size exceeded\".\n var res = ''\n var i = 0\n while (i < len) {\n res += String.fromCharCode.apply(\n String,\n codePoints.slice(i, i += MAX_ARGUMENTS_LENGTH)\n )\n }\n return res\n}\n\nfunction asciiSlice (buf, start, end) {\n var ret = ''\n end = Math.min(buf.length, end)\n\n for (var i = start; i < end; ++i) {\n ret += String.fromCharCode(buf[i] & 0x7F)\n }\n return ret\n}\n\nfunction latin1Slice (buf, start, end) {\n var ret = ''\n end = Math.min(buf.length, end)\n\n for (var i = start; i < end; ++i) {\n ret += String.fromCharCode(buf[i])\n }\n return ret\n}\n\nfunction hexSlice (buf, start, end) {\n var len = buf.length\n\n if (!start || start < 0) start = 0\n if (!end || end < 0 || end > len) end = len\n\n var out = ''\n for (var i = start; i < end; ++i) {\n out += toHex(buf[i])\n }\n return out\n}\n\nfunction utf16leSlice (buf, start, end) {\n var bytes = buf.slice(start, end)\n var res = ''\n for (var i = 0; i < bytes.length; i += 2) {\n res += String.fromCharCode(bytes[i] + (bytes[i + 1] * 256))\n }\n return res\n}\n\nBuffer.prototype.slice = function slice (start, end) {\n var len = this.length\n start = ~~start\n end = end === undefined ? len : ~~end\n\n if (start < 0) {\n start += len\n if (start < 0) start = 0\n } else if (start > len) {\n start = len\n }\n\n if (end < 0) {\n end += len\n if (end < 0) end = 0\n } else if (end > len) {\n end = len\n }\n\n if (end < start) end = start\n\n var newBuf = this.subarray(start, end)\n // Return an augmented `Uint8Array` instance\n newBuf.__proto__ = Buffer.prototype\n return newBuf\n}\n\n/*\n * Need to make sure that buffer isn't trying to write out of bounds.\n */\nfunction checkOffset (offset, ext, length) {\n if ((offset % 1) !== 0 || offset < 0) throw new RangeError('offset is not uint')\n if (offset + ext > length) throw new RangeError('Trying to access beyond buffer length')\n}\n\nBuffer.prototype.readUIntLE = function readUIntLE (offset, byteLength, noAssert) {\n offset = offset >>> 0\n byteLength = byteLength >>> 0\n if (!noAssert) checkOffset(offset, byteLength, this.length)\n\n var val = this[offset]\n var mul = 1\n var i = 0\n while (++i < byteLength && (mul *= 0x100)) {\n val += this[offset + i] * mul\n }\n\n return val\n}\n\nBuffer.prototype.readUIntBE = function readUIntBE (offset, byteLength, noAssert) {\n offset = offset >>> 0\n byteLength = byteLength >>> 0\n if (!noAssert) {\n checkOffset(offset, byteLength, this.length)\n }\n\n var val = this[offset + --byteLength]\n var mul = 1\n while (byteLength > 0 && (mul *= 0x100)) {\n val += this[offset + --byteLength] * mul\n }\n\n return val\n}\n\nBuffer.prototype.readUInt8 = function readUInt8 (offset, noAssert) {\n offset = offset >>> 0\n if (!noAssert) checkOffset(offset, 1, this.length)\n return this[offset]\n}\n\nBuffer.prototype.readUInt16LE = function readUInt16LE (offset, noAssert) {\n offset = offset >>> 0\n if (!noAssert) checkOffset(offset, 2, this.length)\n return this[offset] | (this[offset + 1] << 8)\n}\n\nBuffer.prototype.readUInt16BE = function readUInt16BE (offset, noAssert) {\n offset = offset >>> 0\n if (!noAssert) checkOffset(offset, 2, this.length)\n return (this[offset] << 8) | this[offset + 1]\n}\n\nBuffer.prototype.readUInt32LE = function readUInt32LE (offset, noAssert) {\n offset = offset >>> 0\n if (!noAssert) checkOffset(offset, 4, this.length)\n\n return ((this[offset]) |\n (this[offset + 1] << 8) |\n (this[offset + 2] << 16)) +\n (this[offset + 3] * 0x1000000)\n}\n\nBuffer.prototype.readUInt32BE = function readUInt32BE (offset, noAssert) {\n offset = offset >>> 0\n if (!noAssert) checkOffset(offset, 4, this.length)\n\n return (this[offset] * 0x1000000) +\n ((this[offset + 1] << 16) |\n (this[offset + 2] << 8) |\n this[offset + 3])\n}\n\nBuffer.prototype.readIntLE = function readIntLE (offset, byteLength, noAssert) {\n offset = offset >>> 0\n byteLength = byteLength >>> 0\n if (!noAssert) checkOffset(offset, byteLength, this.length)\n\n var val = this[offset]\n var mul = 1\n var i = 0\n while (++i < byteLength && (mul *= 0x100)) {\n val += this[offset + i] * mul\n }\n mul *= 0x80\n\n if (val >= mul) val -= Math.pow(2, 8 * byteLength)\n\n return val\n}\n\nBuffer.prototype.readIntBE = function readIntBE (offset, byteLength, noAssert) {\n offset = offset >>> 0\n byteLength = byteLength >>> 0\n if (!noAssert) checkOffset(offset, byteLength, this.length)\n\n var i = byteLength\n var mul = 1\n var val = this[offset + --i]\n while (i > 0 && (mul *= 0x100)) {\n val += this[offset + --i] * mul\n }\n mul *= 0x80\n\n if (val >= mul) val -= Math.pow(2, 8 * byteLength)\n\n return val\n}\n\nBuffer.prototype.readInt8 = function readInt8 (offset, noAssert) {\n offset = offset >>> 0\n if (!noAssert) checkOffset(offset, 1, this.length)\n if (!(this[offset] & 0x80)) return (this[offset])\n return ((0xff - this[offset] + 1) * -1)\n}\n\nBuffer.prototype.readInt16LE = function readInt16LE (offset, noAssert) {\n offset = offset >>> 0\n if (!noAssert) checkOffset(offset, 2, this.length)\n var val = this[offset] | (this[offset + 1] << 8)\n return (val & 0x8000) ? val | 0xFFFF0000 : val\n}\n\nBuffer.prototype.readInt16BE = function readInt16BE (offset, noAssert) {\n offset = offset >>> 0\n if (!noAssert) checkOffset(offset, 2, this.length)\n var val = this[offset + 1] | (this[offset] << 8)\n return (val & 0x8000) ? val | 0xFFFF0000 : val\n}\n\nBuffer.prototype.readInt32LE = function readInt32LE (offset, noAssert) {\n offset = offset >>> 0\n if (!noAssert) checkOffset(offset, 4, this.length)\n\n return (this[offset]) |\n (this[offset + 1] << 8) |\n (this[offset + 2] << 16) |\n (this[offset + 3] << 24)\n}\n\nBuffer.prototype.readInt32BE = function readInt32BE (offset, noAssert) {\n offset = offset >>> 0\n if (!noAssert) checkOffset(offset, 4, this.length)\n\n return (this[offset] << 24) |\n (this[offset + 1] << 16) |\n (this[offset + 2] << 8) |\n (this[offset + 3])\n}\n\nBuffer.prototype.readFloatLE = function readFloatLE (offset, noAssert) {\n offset = offset >>> 0\n if (!noAssert) checkOffset(offset, 4, this.length)\n return ieee754.read(this, offset, true, 23, 4)\n}\n\nBuffer.prototype.readFloatBE = function readFloatBE (offset, noAssert) {\n offset = offset >>> 0\n if (!noAssert) checkOffset(offset, 4, this.length)\n return ieee754.read(this, offset, false, 23, 4)\n}\n\nBuffer.prototype.readDoubleLE = function readDoubleLE (offset, noAssert) {\n offset = offset >>> 0\n if (!noAssert) checkOffset(offset, 8, this.length)\n return ieee754.read(this, offset, true, 52, 8)\n}\n\nBuffer.prototype.readDoubleBE = function readDoubleBE (offset, noAssert) {\n offset = offset >>> 0\n if (!noAssert) checkOffset(offset, 8, this.length)\n return ieee754.read(this, offset, false, 52, 8)\n}\n\nfunction checkInt (buf, value, offset, ext, max, min) {\n if (!Buffer.isBuffer(buf)) throw new TypeError('\"buffer\" argument must be a Buffer instance')\n if (value > max || value < min) throw new RangeError('\"value\" argument is out of bounds')\n if (offset + ext > buf.length) throw new RangeError('Index out of range')\n}\n\nBuffer.prototype.writeUIntLE = function writeUIntLE (value, offset, byteLength, noAssert) {\n value = +value\n offset = offset >>> 0\n byteLength = byteLength >>> 0\n if (!noAssert) {\n var maxBytes = Math.pow(2, 8 * byteLength) - 1\n checkInt(this, value, offset, byteLength, maxBytes, 0)\n }\n\n var mul = 1\n var i = 0\n this[offset] = value & 0xFF\n while (++i < byteLength && (mul *= 0x100)) {\n this[offset + i] = (value / mul) & 0xFF\n }\n\n return offset + byteLength\n}\n\nBuffer.prototype.writeUIntBE = function writeUIntBE (value, offset, byteLength, noAssert) {\n value = +value\n offset = offset >>> 0\n byteLength = byteLength >>> 0\n if (!noAssert) {\n var maxBytes = Math.pow(2, 8 * byteLength) - 1\n checkInt(this, value, offset, byteLength, maxBytes, 0)\n }\n\n var i = byteLength - 1\n var mul = 1\n this[offset + i] = value & 0xFF\n while (--i >= 0 && (mul *= 0x100)) {\n this[offset + i] = (value / mul) & 0xFF\n }\n\n return offset + byteLength\n}\n\nBuffer.prototype.writeUInt8 = function writeUInt8 (value, offset, noAssert) {\n value = +value\n offset = offset >>> 0\n if (!noAssert) checkInt(this, value, offset, 1, 0xff, 0)\n this[offset] = (value & 0xff)\n return offset + 1\n}\n\nBuffer.prototype.writeUInt16LE = function writeUInt16LE (value, offset, noAssert) {\n value = +value\n offset = offset >>> 0\n if (!noAssert) checkInt(this, value, offset, 2, 0xffff, 0)\n this[offset] = (value & 0xff)\n this[offset + 1] = (value >>> 8)\n return offset + 2\n}\n\nBuffer.prototype.writeUInt16BE = function writeUInt16BE (value, offset, noAssert) {\n value = +value\n offset = offset >>> 0\n if (!noAssert) checkInt(this, value, offset, 2, 0xffff, 0)\n this[offset] = (value >>> 8)\n this[offset + 1] = (value & 0xff)\n return offset + 2\n}\n\nBuffer.prototype.writeUInt32LE = function writeUInt32LE (value, offset, noAssert) {\n value = +value\n offset = offset >>> 0\n if (!noAssert) checkInt(this, value, offset, 4, 0xffffffff, 0)\n this[offset + 3] = (value >>> 24)\n this[offset + 2] = (value >>> 16)\n this[offset + 1] = (value >>> 8)\n this[offset] = (value & 0xff)\n return offset + 4\n}\n\nBuffer.prototype.writeUInt32BE = function writeUInt32BE (value, offset, noAssert) {\n value = +value\n offset = offset >>> 0\n if (!noAssert) checkInt(this, value, offset, 4, 0xffffffff, 0)\n this[offset] = (value >>> 24)\n this[offset + 1] = (value >>> 16)\n this[offset + 2] = (value >>> 8)\n this[offset + 3] = (value & 0xff)\n return offset + 4\n}\n\nBuffer.prototype.writeIntLE = function writeIntLE (value, offset, byteLength, noAssert) {\n value = +value\n offset = offset >>> 0\n if (!noAssert) {\n var limit = Math.pow(2, (8 * byteLength) - 1)\n\n checkInt(this, value, offset, byteLength, limit - 1, -limit)\n }\n\n var i = 0\n var mul = 1\n var sub = 0\n this[offset] = value & 0xFF\n while (++i < byteLength && (mul *= 0x100)) {\n if (value < 0 && sub === 0 && this[offset + i - 1] !== 0) {\n sub = 1\n }\n this[offset + i] = ((value / mul) >> 0) - sub & 0xFF\n }\n\n return offset + byteLength\n}\n\nBuffer.prototype.writeIntBE = function writeIntBE (value, offset, byteLength, noAssert) {\n value = +value\n offset = offset >>> 0\n if (!noAssert) {\n var limit = Math.pow(2, (8 * byteLength) - 1)\n\n checkInt(this, value, offset, byteLength, limit - 1, -limit)\n }\n\n var i = byteLength - 1\n var mul = 1\n var sub = 0\n this[offset + i] = value & 0xFF\n while (--i >= 0 && (mul *= 0x100)) {\n if (value < 0 && sub === 0 && this[offset + i + 1] !== 0) {\n sub = 1\n }\n this[offset + i] = ((value / mul) >> 0) - sub & 0xFF\n }\n\n return offset + byteLength\n}\n\nBuffer.prototype.writeInt8 = function writeInt8 (value, offset, noAssert) {\n value = +value\n offset = offset >>> 0\n if (!noAssert) checkInt(this, value, offset, 1, 0x7f, -0x80)\n if (value < 0) value = 0xff + value + 1\n this[offset] = (value & 0xff)\n return offset + 1\n}\n\nBuffer.prototype.writeInt16LE = function writeInt16LE (value, offset, noAssert) {\n value = +value\n offset = offset >>> 0\n if (!noAssert) checkInt(this, value, offset, 2, 0x7fff, -0x8000)\n this[offset] = (value & 0xff)\n this[offset + 1] = (value >>> 8)\n return offset + 2\n}\n\nBuffer.prototype.writeInt16BE = function writeInt16BE (value, offset, noAssert) {\n value = +value\n offset = offset >>> 0\n if (!noAssert) checkInt(this, value, offset, 2, 0x7fff, -0x8000)\n this[offset] = (value >>> 8)\n this[offset + 1] = (value & 0xff)\n return offset + 2\n}\n\nBuffer.prototype.writeInt32LE = function writeInt32LE (value, offset, noAssert) {\n value = +value\n offset = offset >>> 0\n if (!noAssert) checkInt(this, value, offset, 4, 0x7fffffff, -0x80000000)\n this[offset] = (value & 0xff)\n this[offset + 1] = (value >>> 8)\n this[offset + 2] = (value >>> 16)\n this[offset + 3] = (value >>> 24)\n return offset + 4\n}\n\nBuffer.prototype.writeInt32BE = function writeInt32BE (value, offset, noAssert) {\n value = +value\n offset = offset >>> 0\n if (!noAssert) checkInt(this, value, offset, 4, 0x7fffffff, -0x80000000)\n if (value < 0) value = 0xffffffff + value + 1\n this[offset] = (value >>> 24)\n this[offset + 1] = (value >>> 16)\n this[offset + 2] = (value >>> 8)\n this[offset + 3] = (value & 0xff)\n return offset + 4\n}\n\nfunction checkIEEE754 (buf, value, offset, ext, max, min) {\n if (offset + ext > buf.length) throw new RangeError('Index out of range')\n if (offset < 0) throw new RangeError('Index out of range')\n}\n\nfunction writeFloat (buf, value, offset, littleEndian, noAssert) {\n value = +value\n offset = offset >>> 0\n if (!noAssert) {\n checkIEEE754(buf, value, offset, 4, 3.4028234663852886e+38, -3.4028234663852886e+38)\n }\n ieee754.write(buf, value, offset, littleEndian, 23, 4)\n return offset + 4\n}\n\nBuffer.prototype.writeFloatLE = function writeFloatLE (value, offset, noAssert) {\n return writeFloat(this, value, offset, true, noAssert)\n}\n\nBuffer.prototype.writeFloatBE = function writeFloatBE (value, offset, noAssert) {\n return writeFloat(this, value, offset, false, noAssert)\n}\n\nfunction writeDouble (buf, value, offset, littleEndian, noAssert) {\n value = +value\n offset = offset >>> 0\n if (!noAssert) {\n checkIEEE754(buf, value, offset, 8, 1.7976931348623157E+308, -1.7976931348623157E+308)\n }\n ieee754.write(buf, value, offset, littleEndian, 52, 8)\n return offset + 8\n}\n\nBuffer.prototype.writeDoubleLE = function writeDoubleLE (value, offset, noAssert) {\n return writeDouble(this, value, offset, true, noAssert)\n}\n\nBuffer.prototype.writeDoubleBE = function writeDoubleBE (value, offset, noAssert) {\n return writeDouble(this, value, offset, false, noAssert)\n}\n\n// copy(targetBuffer, targetStart=0, sourceStart=0, sourceEnd=buffer.length)\nBuffer.prototype.copy = function copy (target, targetStart, start, end) {\n if (!start) start = 0\n if (!end && end !== 0) end = this.length\n if (targetStart >= target.length) targetStart = target.length\n if (!targetStart) targetStart = 0\n if (end > 0 && end < start) end = start\n\n // Copy 0 bytes; we're done\n if (end === start) return 0\n if (target.length === 0 || this.length === 0) return 0\n\n // Fatal error conditions\n if (targetStart < 0) {\n throw new RangeError('targetStart out of bounds')\n }\n if (start < 0 || start >= this.length) throw new RangeError('sourceStart out of bounds')\n if (end < 0) throw new RangeError('sourceEnd out of bounds')\n\n // Are we oob?\n if (end > this.length) end = this.length\n if (target.length - targetStart < end - start) {\n end = target.length - targetStart + start\n }\n\n var len = end - start\n var i\n\n if (this === target && start < targetStart && targetStart < end) {\n // descending copy from end\n for (i = len - 1; i >= 0; --i) {\n target[i + targetStart] = this[i + start]\n }\n } else if (len < 1000) {\n // ascending copy from start\n for (i = 0; i < len; ++i) {\n target[i + targetStart] = this[i + start]\n }\n } else {\n Uint8Array.prototype.set.call(\n target,\n this.subarray(start, start + len),\n targetStart\n )\n }\n\n return len\n}\n\n// Usage:\n// buffer.fill(number[, offset[, end]])\n// buffer.fill(buffer[, offset[, end]])\n// buffer.fill(string[, offset[, end]][, encoding])\nBuffer.prototype.fill = function fill (val, start, end, encoding) {\n // Handle string cases:\n if (typeof val === 'string') {\n if (typeof start === 'string') {\n encoding = start\n start = 0\n end = this.length\n } else if (typeof end === 'string') {\n encoding = end\n end = this.length\n }\n if (val.length === 1) {\n var code = val.charCodeAt(0)\n if (code < 256) {\n val = code\n }\n }\n if (encoding !== undefined && typeof encoding !== 'string') {\n throw new TypeError('encoding must be a string')\n }\n if (typeof encoding === 'string' && !Buffer.isEncoding(encoding)) {\n throw new TypeError('Unknown encoding: ' + encoding)\n }\n } else if (typeof val === 'number') {\n val = val & 255\n }\n\n // Invalid ranges are not set to a default, so can range check early.\n if (start < 0 || this.length < start || this.length < end) {\n throw new RangeError('Out of range index')\n }\n\n if (end <= start) {\n return this\n }\n\n start = start >>> 0\n end = end === undefined ? this.length : end >>> 0\n\n if (!val) val = 0\n\n var i\n if (typeof val === 'number') {\n for (i = start; i < end; ++i) {\n this[i] = val\n }\n } else {\n var bytes = Buffer.isBuffer(val)\n ? val\n : new Buffer(val, encoding)\n var len = bytes.length\n for (i = 0; i < end - start; ++i) {\n this[i + start] = bytes[i % len]\n }\n }\n\n return this\n}\n\n// HELPER FUNCTIONS\n// ================\n\nvar INVALID_BASE64_RE = /[^+/0-9A-Za-z-_]/g\n\nfunction base64clean (str) {\n // Node strips out invalid characters like \\n and \\t from the string, base64-js does not\n str = str.trim().replace(INVALID_BASE64_RE, '')\n // Node converts strings with length < 2 to ''\n if (str.length < 2) return ''\n // Node allows for non-padded base64 strings (missing trailing ===), base64-js does not\n while (str.length % 4 !== 0) {\n str = str + '='\n }\n return str\n}\n\nfunction toHex (n) {\n if (n < 16) return '0' + n.toString(16)\n return n.toString(16)\n}\n\nfunction utf8ToBytes (string, units) {\n units = units || Infinity\n var codePoint\n var length = string.length\n var leadSurrogate = null\n var bytes = []\n\n for (var i = 0; i < length; ++i) {\n codePoint = string.charCodeAt(i)\n\n // is surrogate component\n if (codePoint > 0xD7FF && codePoint < 0xE000) {\n // last char was a lead\n if (!leadSurrogate) {\n // no lead yet\n if (codePoint > 0xDBFF) {\n // unexpected trail\n if ((units -= 3) > -1) bytes.push(0xEF, 0xBF, 0xBD)\n continue\n } else if (i + 1 === length) {\n // unpaired lead\n if ((units -= 3) > -1) bytes.push(0xEF, 0xBF, 0xBD)\n continue\n }\n\n // valid lead\n leadSurrogate = codePoint\n\n continue\n }\n\n // 2 leads in a row\n if (codePoint < 0xDC00) {\n if ((units -= 3) > -1) bytes.push(0xEF, 0xBF, 0xBD)\n leadSurrogate = codePoint\n continue\n }\n\n // valid surrogate pair\n codePoint = (leadSurrogate - 0xD800 << 10 | codePoint - 0xDC00) + 0x10000\n } else if (leadSurrogate) {\n // valid bmp char, but last char was a lead\n if ((units -= 3) > -1) bytes.push(0xEF, 0xBF, 0xBD)\n }\n\n leadSurrogate = null\n\n // encode utf8\n if (codePoint < 0x80) {\n if ((units -= 1) < 0) break\n bytes.push(codePoint)\n } else if (codePoint < 0x800) {\n if ((units -= 2) < 0) break\n bytes.push(\n codePoint >> 0x6 | 0xC0,\n codePoint & 0x3F | 0x80\n )\n } else if (codePoint < 0x10000) {\n if ((units -= 3) < 0) break\n bytes.push(\n codePoint >> 0xC | 0xE0,\n codePoint >> 0x6 & 0x3F | 0x80,\n codePoint & 0x3F | 0x80\n )\n } else if (codePoint < 0x110000) {\n if ((units -= 4) < 0) break\n bytes.push(\n codePoint >> 0x12 | 0xF0,\n codePoint >> 0xC & 0x3F | 0x80,\n codePoint >> 0x6 & 0x3F | 0x80,\n codePoint & 0x3F | 0x80\n )\n } else {\n throw new Error('Invalid code point')\n }\n }\n\n return bytes\n}\n\nfunction asciiToBytes (str) {\n var byteArray = []\n for (var i = 0; i < str.length; ++i) {\n // Node's code seems to be doing this and not & 0x7F..\n byteArray.push(str.charCodeAt(i) & 0xFF)\n }\n return byteArray\n}\n\nfunction utf16leToBytes (str, units) {\n var c, hi, lo\n var byteArray = []\n for (var i = 0; i < str.length; ++i) {\n if ((units -= 2) < 0) break\n\n c = str.charCodeAt(i)\n hi = c >> 8\n lo = c % 256\n byteArray.push(lo)\n byteArray.push(hi)\n }\n\n return byteArray\n}\n\nfunction base64ToBytes (str) {\n return base64.toByteArray(base64clean(str))\n}\n\nfunction blitBuffer (src, dst, offset, length) {\n for (var i = 0; i < length; ++i) {\n if ((i + offset >= dst.length) || (i >= src.length)) break\n dst[i + offset] = src[i]\n }\n return i\n}\n\n// Node 0.10 supports `ArrayBuffer` but lacks `ArrayBuffer.isView`\nfunction isArrayBufferView (obj) {\n return (typeof ArrayBuffer.isView === 'function') && ArrayBuffer.isView(obj)\n}\n\nfunction numberIsNaN (obj) {\n return obj !== obj // eslint-disable-line no-self-compare\n}\n",
- "'use strict';\n\nmodule.exports = earcut;\n\nfunction earcut(data, holeIndices, dim) {\n\n dim = dim || 2;\n\n var hasHoles = holeIndices && holeIndices.length,\n outerLen = hasHoles ? holeIndices[0] * dim : data.length,\n outerNode = linkedList(data, 0, outerLen, dim, true),\n triangles = [];\n\n if (!outerNode) return triangles;\n\n var minX, minY, maxX, maxY, x, y, size;\n\n if (hasHoles) outerNode = eliminateHoles(data, holeIndices, outerNode, dim);\n\n // if the shape is not too simple, we'll use z-order curve hash later; calculate polygon bbox\n if (data.length > 80 * dim) {\n minX = maxX = data[0];\n minY = maxY = data[1];\n\n for (var i = dim; i < outerLen; i += dim) {\n x = data[i];\n y = data[i + 1];\n if (x < minX) minX = x;\n if (y < minY) minY = y;\n if (x > maxX) maxX = x;\n if (y > maxY) maxY = y;\n }\n\n // minX, minY and size are later used to transform coords into integers for z-order calculation\n size = Math.max(maxX - minX, maxY - minY);\n }\n\n earcutLinked(outerNode, triangles, dim, minX, minY, size);\n\n return triangles;\n}\n\n// create a circular doubly linked list from polygon points in the specified winding order\nfunction linkedList(data, start, end, dim, clockwise) {\n var i, last;\n\n if (clockwise === (signedArea(data, start, end, dim) > 0)) {\n for (i = start; i < end; i += dim) last = insertNode(i, data[i], data[i + 1], last);\n } else {\n for (i = end - dim; i >= start; i -= dim) last = insertNode(i, data[i], data[i + 1], last);\n }\n\n if (last && equals(last, last.next)) {\n removeNode(last);\n last = last.next;\n }\n\n return last;\n}\n\n// eliminate colinear or duplicate points\nfunction filterPoints(start, end) {\n if (!start) return start;\n if (!end) end = start;\n\n var p = start,\n again;\n do {\n again = false;\n\n if (!p.steiner && (equals(p, p.next) || area(p.prev, p, p.next) === 0)) {\n removeNode(p);\n p = end = p.prev;\n if (p === p.next) return null;\n again = true;\n\n } else {\n p = p.next;\n }\n } while (again || p !== end);\n\n return end;\n}\n\n// main ear slicing loop which triangulates a polygon (given as a linked list)\nfunction earcutLinked(ear, triangles, dim, minX, minY, size, pass) {\n if (!ear) return;\n\n // interlink polygon nodes in z-order\n if (!pass && size) indexCurve(ear, minX, minY, size);\n\n var stop = ear,\n prev, next;\n\n // iterate through ears, slicing them one by one\n while (ear.prev !== ear.next) {\n prev = ear.prev;\n next = ear.next;\n\n if (size ? isEarHashed(ear, minX, minY, size) : isEar(ear)) {\n // cut off the triangle\n triangles.push(prev.i / dim);\n triangles.push(ear.i / dim);\n triangles.push(next.i / dim);\n\n removeNode(ear);\n\n // skipping the next vertice leads to less sliver triangles\n ear = next.next;\n stop = next.next;\n\n continue;\n }\n\n ear = next;\n\n // if we looped through the whole remaining polygon and can't find any more ears\n if (ear === stop) {\n // try filtering points and slicing again\n if (!pass) {\n earcutLinked(filterPoints(ear), triangles, dim, minX, minY, size, 1);\n\n // if this didn't work, try curing all small self-intersections locally\n } else if (pass === 1) {\n ear = cureLocalIntersections(ear, triangles, dim);\n earcutLinked(ear, triangles, dim, minX, minY, size, 2);\n\n // as a last resort, try splitting the remaining polygon into two\n } else if (pass === 2) {\n splitEarcut(ear, triangles, dim, minX, minY, size);\n }\n\n break;\n }\n }\n}\n\n// check whether a polygon node forms a valid ear with adjacent nodes\nfunction isEar(ear) {\n var a = ear.prev,\n b = ear,\n c = ear.next;\n\n if (area(a, b, c) >= 0) return false; // reflex, can't be an ear\n\n // now make sure we don't have other points inside the potential ear\n var p = ear.next.next;\n\n while (p !== ear.prev) {\n if (pointInTriangle(a.x, a.y, b.x, b.y, c.x, c.y, p.x, p.y) &&\n area(p.prev, p, p.next) >= 0) return false;\n p = p.next;\n }\n\n return true;\n}\n\nfunction isEarHashed(ear, minX, minY, size) {\n var a = ear.prev,\n b = ear,\n c = ear.next;\n\n if (area(a, b, c) >= 0) return false; // reflex, can't be an ear\n\n // triangle bbox; min & max are calculated like this for speed\n var minTX = a.x < b.x ? (a.x < c.x ? a.x : c.x) : (b.x < c.x ? b.x : c.x),\n minTY = a.y < b.y ? (a.y < c.y ? a.y : c.y) : (b.y < c.y ? b.y : c.y),\n maxTX = a.x > b.x ? (a.x > c.x ? a.x : c.x) : (b.x > c.x ? b.x : c.x),\n maxTY = a.y > b.y ? (a.y > c.y ? a.y : c.y) : (b.y > c.y ? b.y : c.y);\n\n // z-order range for the current triangle bbox;\n var minZ = zOrder(minTX, minTY, minX, minY, size),\n maxZ = zOrder(maxTX, maxTY, minX, minY, size);\n\n // first look for points inside the triangle in increasing z-order\n var p = ear.nextZ;\n\n while (p && p.z <= maxZ) {\n if (p !== ear.prev && p !== ear.next &&\n pointInTriangle(a.x, a.y, b.x, b.y, c.x, c.y, p.x, p.y) &&\n area(p.prev, p, p.next) >= 0) return false;\n p = p.nextZ;\n }\n\n // then look for points in decreasing z-order\n p = ear.prevZ;\n\n while (p && p.z >= minZ) {\n if (p !== ear.prev && p !== ear.next &&\n pointInTriangle(a.x, a.y, b.x, b.y, c.x, c.y, p.x, p.y) &&\n area(p.prev, p, p.next) >= 0) return false;\n p = p.prevZ;\n }\n\n return true;\n}\n\n// go through all polygon nodes and cure small local self-intersections\nfunction cureLocalIntersections(start, triangles, dim) {\n var p = start;\n do {\n var a = p.prev,\n b = p.next.next;\n\n if (!equals(a, b) && intersects(a, p, p.next, b) && locallyInside(a, b) && locallyInside(b, a)) {\n\n triangles.push(a.i / dim);\n triangles.push(p.i / dim);\n triangles.push(b.i / dim);\n\n // remove two nodes involved\n removeNode(p);\n removeNode(p.next);\n\n p = start = b;\n }\n p = p.next;\n } while (p !== start);\n\n return p;\n}\n\n// try splitting polygon into two and triangulate them independently\nfunction splitEarcut(start, triangles, dim, minX, minY, size) {\n // look for a valid diagonal that divides the polygon into two\n var a = start;\n do {\n var b = a.next.next;\n while (b !== a.prev) {\n if (a.i !== b.i && isValidDiagonal(a, b)) {\n // split the polygon in two by the diagonal\n var c = splitPolygon(a, b);\n\n // filter colinear points around the cuts\n a = filterPoints(a, a.next);\n c = filterPoints(c, c.next);\n\n // run earcut on each half\n earcutLinked(a, triangles, dim, minX, minY, size);\n earcutLinked(c, triangles, dim, minX, minY, size);\n return;\n }\n b = b.next;\n }\n a = a.next;\n } while (a !== start);\n}\n\n// link every hole into the outer loop, producing a single-ring polygon without holes\nfunction eliminateHoles(data, holeIndices, outerNode, dim) {\n var queue = [],\n i, len, start, end, list;\n\n for (i = 0, len = holeIndices.length; i < len; i++) {\n start = holeIndices[i] * dim;\n end = i < len - 1 ? holeIndices[i + 1] * dim : data.length;\n list = linkedList(data, start, end, dim, false);\n if (list === list.next) list.steiner = true;\n queue.push(getLeftmost(list));\n }\n\n queue.sort(compareX);\n\n // process holes from left to right\n for (i = 0; i < queue.length; i++) {\n eliminateHole(queue[i], outerNode);\n outerNode = filterPoints(outerNode, outerNode.next);\n }\n\n return outerNode;\n}\n\nfunction compareX(a, b) {\n return a.x - b.x;\n}\n\n// find a bridge between vertices that connects hole with an outer ring and and link it\nfunction eliminateHole(hole, outerNode) {\n outerNode = findHoleBridge(hole, outerNode);\n if (outerNode) {\n var b = splitPolygon(outerNode, hole);\n filterPoints(b, b.next);\n }\n}\n\n// David Eberly's algorithm for finding a bridge between hole and outer polygon\nfunction findHoleBridge(hole, outerNode) {\n var p = outerNode,\n hx = hole.x,\n hy = hole.y,\n qx = -Infinity,\n m;\n\n // find a segment intersected by a ray from the hole's leftmost point to the left;\n // segment's endpoint with lesser x will be potential connection point\n do {\n if (hy <= p.y && hy >= p.next.y) {\n var x = p.x + (hy - p.y) * (p.next.x - p.x) / (p.next.y - p.y);\n if (x <= hx && x > qx) {\n qx = x;\n if (x === hx) {\n if (hy === p.y) return p;\n if (hy === p.next.y) return p.next;\n }\n m = p.x < p.next.x ? p : p.next;\n }\n }\n p = p.next;\n } while (p !== outerNode);\n\n if (!m) return null;\n\n if (hx === qx) return m.prev; // hole touches outer segment; pick lower endpoint\n\n // look for points inside the triangle of hole point, segment intersection and endpoint;\n // if there are no points found, we have a valid connection;\n // otherwise choose the point of the minimum angle with the ray as connection point\n\n var stop = m,\n mx = m.x,\n my = m.y,\n tanMin = Infinity,\n tan;\n\n p = m.next;\n\n while (p !== stop) {\n if (hx >= p.x && p.x >= mx &&\n pointInTriangle(hy < my ? hx : qx, hy, mx, my, hy < my ? qx : hx, hy, p.x, p.y)) {\n\n tan = Math.abs(hy - p.y) / (hx - p.x); // tangential\n\n if ((tan < tanMin || (tan === tanMin && p.x > m.x)) && locallyInside(p, hole)) {\n m = p;\n tanMin = tan;\n }\n }\n\n p = p.next;\n }\n\n return m;\n}\n\n// interlink polygon nodes in z-order\nfunction indexCurve(start, minX, minY, size) {\n var p = start;\n do {\n if (p.z === null) p.z = zOrder(p.x, p.y, minX, minY, size);\n p.prevZ = p.prev;\n p.nextZ = p.next;\n p = p.next;\n } while (p !== start);\n\n p.prevZ.nextZ = null;\n p.prevZ = null;\n\n sortLinked(p);\n}\n\n// Simon Tatham's linked list merge sort algorithm\n// http://www.chiark.greenend.org.uk/~sgtatham/algorithms/listsort.html\nfunction sortLinked(list) {\n var i, p, q, e, tail, numMerges, pSize, qSize,\n inSize = 1;\n\n do {\n p = list;\n list = null;\n tail = null;\n numMerges = 0;\n\n while (p) {\n numMerges++;\n q = p;\n pSize = 0;\n for (i = 0; i < inSize; i++) {\n pSize++;\n q = q.nextZ;\n if (!q) break;\n }\n\n qSize = inSize;\n\n while (pSize > 0 || (qSize > 0 && q)) {\n\n if (pSize === 0) {\n e = q;\n q = q.nextZ;\n qSize--;\n } else if (qSize === 0 || !q) {\n e = p;\n p = p.nextZ;\n pSize--;\n } else if (p.z <= q.z) {\n e = p;\n p = p.nextZ;\n pSize--;\n } else {\n e = q;\n q = q.nextZ;\n qSize--;\n }\n\n if (tail) tail.nextZ = e;\n else list = e;\n\n e.prevZ = tail;\n tail = e;\n }\n\n p = q;\n }\n\n tail.nextZ = null;\n inSize *= 2;\n\n } while (numMerges > 1);\n\n return list;\n}\n\n// z-order of a point given coords and size of the data bounding box\nfunction zOrder(x, y, minX, minY, size) {\n // coords are transformed into non-negative 15-bit integer range\n x = 32767 * (x - minX) / size;\n y = 32767 * (y - minY) / size;\n\n x = (x | (x << 8)) & 0x00FF00FF;\n x = (x | (x << 4)) & 0x0F0F0F0F;\n x = (x | (x << 2)) & 0x33333333;\n x = (x | (x << 1)) & 0x55555555;\n\n y = (y | (y << 8)) & 0x00FF00FF;\n y = (y | (y << 4)) & 0x0F0F0F0F;\n y = (y | (y << 2)) & 0x33333333;\n y = (y | (y << 1)) & 0x55555555;\n\n return x | (y << 1);\n}\n\n// find the leftmost node of a polygon ring\nfunction getLeftmost(start) {\n var p = start,\n leftmost = start;\n do {\n if (p.x < leftmost.x) leftmost = p;\n p = p.next;\n } while (p !== start);\n\n return leftmost;\n}\n\n// check if a point lies within a convex triangle\nfunction pointInTriangle(ax, ay, bx, by, cx, cy, px, py) {\n return (cx - px) * (ay - py) - (ax - px) * (cy - py) >= 0 &&\n (ax - px) * (by - py) - (bx - px) * (ay - py) >= 0 &&\n (bx - px) * (cy - py) - (cx - px) * (by - py) >= 0;\n}\n\n// check if a diagonal between two polygon nodes is valid (lies in polygon interior)\nfunction isValidDiagonal(a, b) {\n return a.next.i !== b.i && a.prev.i !== b.i && !intersectsPolygon(a, b) &&\n locallyInside(a, b) && locallyInside(b, a) && middleInside(a, b);\n}\n\n// signed area of a triangle\nfunction area(p, q, r) {\n return (q.y - p.y) * (r.x - q.x) - (q.x - p.x) * (r.y - q.y);\n}\n\n// check if two points are equal\nfunction equals(p1, p2) {\n return p1.x === p2.x && p1.y === p2.y;\n}\n\n// check if two segments intersect\nfunction intersects(p1, q1, p2, q2) {\n if ((equals(p1, q1) && equals(p2, q2)) ||\n (equals(p1, q2) && equals(p2, q1))) return true;\n return area(p1, q1, p2) > 0 !== area(p1, q1, q2) > 0 &&\n area(p2, q2, p1) > 0 !== area(p2, q2, q1) > 0;\n}\n\n// check if a polygon diagonal intersects any polygon segments\nfunction intersectsPolygon(a, b) {\n var p = a;\n do {\n if (p.i !== a.i && p.next.i !== a.i && p.i !== b.i && p.next.i !== b.i &&\n intersects(p, p.next, a, b)) return true;\n p = p.next;\n } while (p !== a);\n\n return false;\n}\n\n// check if a polygon diagonal is locally inside the polygon\nfunction locallyInside(a, b) {\n return area(a.prev, a, a.next) < 0 ?\n area(a, b, a.next) >= 0 && area(a, a.prev, b) >= 0 :\n area(a, b, a.prev) < 0 || area(a, a.next, b) < 0;\n}\n\n// check if the middle point of a polygon diagonal is inside the polygon\nfunction middleInside(a, b) {\n var p = a,\n inside = false,\n px = (a.x + b.x) / 2,\n py = (a.y + b.y) / 2;\n do {\n if (((p.y > py) !== (p.next.y > py)) && (px < (p.next.x - p.x) * (py - p.y) / (p.next.y - p.y) + p.x))\n inside = !inside;\n p = p.next;\n } while (p !== a);\n\n return inside;\n}\n\n// link two polygon vertices with a bridge; if the vertices belong to the same ring, it splits polygon into two;\n// if one belongs to the outer ring and another to a hole, it merges it into a single ring\nfunction splitPolygon(a, b) {\n var a2 = new Node(a.i, a.x, a.y),\n b2 = new Node(b.i, b.x, b.y),\n an = a.next,\n bp = b.prev;\n\n a.next = b;\n b.prev = a;\n\n a2.next = an;\n an.prev = a2;\n\n b2.next = a2;\n a2.prev = b2;\n\n bp.next = b2;\n b2.prev = bp;\n\n return b2;\n}\n\n// create a node and optionally link it with previous one (in a circular doubly linked list)\nfunction insertNode(i, x, y, last) {\n var p = new Node(i, x, y);\n\n if (!last) {\n p.prev = p;\n p.next = p;\n\n } else {\n p.next = last.next;\n p.prev = last;\n last.next.prev = p;\n last.next = p;\n }\n return p;\n}\n\nfunction removeNode(p) {\n p.next.prev = p.prev;\n p.prev.next = p.next;\n\n if (p.prevZ) p.prevZ.nextZ = p.nextZ;\n if (p.nextZ) p.nextZ.prevZ = p.prevZ;\n}\n\nfunction Node(i, x, y) {\n // vertice index in coordinates array\n this.i = i;\n\n // vertex coordinates\n this.x = x;\n this.y = y;\n\n // previous and next vertice nodes in a polygon ring\n this.prev = null;\n this.next = null;\n\n // z-order curve value\n this.z = null;\n\n // previous and next nodes in z-order\n this.prevZ = null;\n this.nextZ = null;\n\n // indicates whether this is a steiner point\n this.steiner = false;\n}\n\n// return a percentage difference between the polygon area and its triangulation area;\n// used to verify correctness of triangulation\nearcut.deviation = function (data, holeIndices, dim, triangles) {\n var hasHoles = holeIndices && holeIndices.length;\n var outerLen = hasHoles ? holeIndices[0] * dim : data.length;\n\n var polygonArea = Math.abs(signedArea(data, 0, outerLen, dim));\n if (hasHoles) {\n for (var i = 0, len = holeIndices.length; i < len; i++) {\n var start = holeIndices[i] * dim;\n var end = i < len - 1 ? holeIndices[i + 1] * dim : data.length;\n polygonArea -= Math.abs(signedArea(data, start, end, dim));\n }\n }\n\n var trianglesArea = 0;\n for (i = 0; i < triangles.length; i += 3) {\n var a = triangles[i] * dim;\n var b = triangles[i + 1] * dim;\n var c = triangles[i + 2] * dim;\n trianglesArea += Math.abs(\n (data[a] - data[c]) * (data[b + 1] - data[a + 1]) -\n (data[a] - data[b]) * (data[c + 1] - data[a + 1]));\n }\n\n return polygonArea === 0 && trianglesArea === 0 ? 0 :\n Math.abs((trianglesArea - polygonArea) / polygonArea);\n};\n\nfunction signedArea(data, start, end, dim) {\n var sum = 0;\n for (var i = start, j = end - dim; i < end; i += dim) {\n sum += (data[j] - data[i]) * (data[i + 1] + data[j + 1]);\n j = i;\n }\n return sum;\n}\n\n// turn a polygon in a multi-dimensional array form (e.g. as in GeoJSON) into a form Earcut accepts\nearcut.flatten = function (data) {\n var dim = data[0][0].length,\n result = {vertices: [], holes: [], dimensions: dim},\n holeIndex = 0;\n\n for (var i = 0; i < data.length; i++) {\n for (var j = 0; j < data[i].length; j++) {\n for (var d = 0; d < dim; d++) result.vertices.push(data[i][j][d]);\n }\n if (i > 0) {\n holeIndex += data[i - 1].length;\n result.holes.push(holeIndex);\n }\n }\n return result;\n};\n",
+ "/*!\n * The buffer module from node.js, for the browser.\n *\n * @author Feross Aboukhadijeh <https://feross.org>\n * @license MIT\n */\n/* eslint-disable no-proto */\n\n'use strict'\n\nvar base64 = require('base64-js')\nvar ieee754 = require('ieee754')\n\nexports.Buffer = Buffer\nexports.SlowBuffer = SlowBuffer\nexports.INSPECT_MAX_BYTES = 50\n\nvar K_MAX_LENGTH = 0x7fffffff\nexports.kMaxLength = K_MAX_LENGTH\n\n/**\n * If `Buffer.TYPED_ARRAY_SUPPORT`:\n * === true Use Uint8Array implementation (fastest)\n * === false Print warning and recommend using `buffer` v4.x which has an Object\n * implementation (most compatible, even IE6)\n *\n * Browsers that support typed arrays are IE 10+, Firefox 4+, Chrome 7+, Safari 5.1+,\n * Opera 11.6+, iOS 4.2+.\n *\n * We report that the browser does not support typed arrays if the are not subclassable\n * using __proto__. Firefox 4-29 lacks support for adding new properties to `Uint8Array`\n * (See: https://bugzilla.mozilla.org/show_bug.cgi?id=695438). IE 10 lacks support\n * for __proto__ and has a buggy typed array implementation.\n */\nBuffer.TYPED_ARRAY_SUPPORT = typedArraySupport()\n\nif (!Buffer.TYPED_ARRAY_SUPPORT && typeof console !== 'undefined' &&\n typeof console.error === 'function') {\n console.error(\n 'This browser lacks typed array (Uint8Array) support which is required by ' +\n '`buffer` v5.x. Use `buffer` v4.x if you require old browser support.'\n )\n}\n\nfunction typedArraySupport () {\n // Can typed array instances can be augmented?\n try {\n var arr = new Uint8Array(1)\n arr.__proto__ = {__proto__: Uint8Array.prototype, foo: function () { return 42 }}\n return arr.foo() === 42\n } catch (e) {\n return false\n }\n}\n\nfunction createBuffer (length) {\n if (length > K_MAX_LENGTH) {\n throw new RangeError('Invalid typed array length')\n }\n // Return an augmented `Uint8Array` instance\n var buf = new Uint8Array(length)\n buf.__proto__ = Buffer.prototype\n return buf\n}\n\n/**\n * The Buffer constructor returns instances of `Uint8Array` that have their\n * prototype changed to `Buffer.prototype`. Furthermore, `Buffer` is a subclass of\n * `Uint8Array`, so the returned instances will have all the node `Buffer` methods\n * and the `Uint8Array` methods. Square bracket notation works as expected -- it\n * returns a single octet.\n *\n * The `Uint8Array` prototype remains unmodified.\n */\n\nfunction Buffer (arg, encodingOrOffset, length) {\n // Common case.\n if (typeof arg === 'number') {\n if (typeof encodingOrOffset === 'string') {\n throw new Error(\n 'If encoding is specified then the first argument must be a string'\n )\n }\n return allocUnsafe(arg)\n }\n return from(arg, encodingOrOffset, length)\n}\n\n// Fix subarray() in ES2016. See: https://github.com/feross/buffer/pull/97\nif (typeof Symbol !== 'undefined' && Symbol.species &&\n Buffer[Symbol.species] === Buffer) {\n Object.defineProperty(Buffer, Symbol.species, {\n value: null,\n configurable: true,\n enumerable: false,\n writable: false\n })\n}\n\nBuffer.poolSize = 8192 // not used by this implementation\n\nfunction from (value, encodingOrOffset, length) {\n if (typeof value === 'number') {\n throw new TypeError('\"value\" argument must not be a number')\n }\n\n if (isArrayBuffer(value)) {\n return fromArrayBuffer(value, encodingOrOffset, length)\n }\n\n if (typeof value === 'string') {\n return fromString(value, encodingOrOffset)\n }\n\n return fromObject(value)\n}\n\n/**\n * Functionally equivalent to Buffer(arg, encoding) but throws a TypeError\n * if value is a number.\n * Buffer.from(str[, encoding])\n * Buffer.from(array)\n * Buffer.from(buffer)\n * Buffer.from(arrayBuffer[, byteOffset[, length]])\n **/\nBuffer.from = function (value, encodingOrOffset, length) {\n return from(value, encodingOrOffset, length)\n}\n\n// Note: Change prototype *after* Buffer.from is defined to workaround Chrome bug:\n// https://github.com/feross/buffer/pull/148\nBuffer.prototype.__proto__ = Uint8Array.prototype\nBuffer.__proto__ = Uint8Array\n\nfunction assertSize (size) {\n if (typeof size !== 'number') {\n throw new TypeError('\"size\" argument must be a number')\n } else if (size < 0) {\n throw new RangeError('\"size\" argument must not be negative')\n }\n}\n\nfunction alloc (size, fill, encoding) {\n assertSize(size)\n if (size <= 0) {\n return createBuffer(size)\n }\n if (fill !== undefined) {\n // Only pay attention to encoding if it's a string. This\n // prevents accidentally sending in a number that would\n // be interpretted as a start offset.\n return typeof encoding === 'string'\n ? createBuffer(size).fill(fill, encoding)\n : createBuffer(size).fill(fill)\n }\n return createBuffer(size)\n}\n\n/**\n * Creates a new filled Buffer instance.\n * alloc(size[, fill[, encoding]])\n **/\nBuffer.alloc = function (size, fill, encoding) {\n return alloc(size, fill, encoding)\n}\n\nfunction allocUnsafe (size) {\n assertSize(size)\n return createBuffer(size < 0 ? 0 : checked(size) | 0)\n}\n\n/**\n * Equivalent to Buffer(num), by default creates a non-zero-filled Buffer instance.\n * */\nBuffer.allocUnsafe = function (size) {\n return allocUnsafe(size)\n}\n/**\n * Equivalent to SlowBuffer(num), by default creates a non-zero-filled Buffer instance.\n */\nBuffer.allocUnsafeSlow = function (size) {\n return allocUnsafe(size)\n}\n\nfunction fromString (string, encoding) {\n if (typeof encoding !== 'string' || encoding === '') {\n encoding = 'utf8'\n }\n\n if (!Buffer.isEncoding(encoding)) {\n throw new TypeError('\"encoding\" must be a valid string encoding')\n }\n\n var length = byteLength(string, encoding) | 0\n var buf = createBuffer(length)\n\n var actual = buf.write(string, encoding)\n\n if (actual !== length) {\n // Writing a hex string, for example, that contains invalid characters will\n // cause everything after the first invalid character to be ignored. (e.g.\n // 'abxxcd' will be treated as 'ab')\n buf = buf.slice(0, actual)\n }\n\n return buf\n}\n\nfunction fromArrayLike (array) {\n var length = array.length < 0 ? 0 : checked(array.length) | 0\n var buf = createBuffer(length)\n for (var i = 0; i < length; i += 1) {\n buf[i] = array[i] & 255\n }\n return buf\n}\n\nfunction fromArrayBuffer (array, byteOffset, length) {\n if (byteOffset < 0 || array.byteLength < byteOffset) {\n throw new RangeError('\\'offset\\' is out of bounds')\n }\n\n if (array.byteLength < byteOffset + (length || 0)) {\n throw new RangeError('\\'length\\' is out of bounds')\n }\n\n var buf\n if (byteOffset === undefined && length === undefined) {\n buf = new Uint8Array(array)\n } else if (length === undefined) {\n buf = new Uint8Array(array, byteOffset)\n } else {\n buf = new Uint8Array(array, byteOffset, length)\n }\n\n // Return an augmented `Uint8Array` instance\n buf.__proto__ = Buffer.prototype\n return buf\n}\n\nfunction fromObject (obj) {\n if (Buffer.isBuffer(obj)) {\n var len = checked(obj.length) | 0\n var buf = createBuffer(len)\n\n if (buf.length === 0) {\n return buf\n }\n\n obj.copy(buf, 0, 0, len)\n return buf\n }\n\n if (obj) {\n if (isArrayBufferView(obj) || 'length' in obj) {\n if (typeof obj.length !== 'number' || numberIsNaN(obj.length)) {\n return createBuffer(0)\n }\n return fromArrayLike(obj)\n }\n\n if (obj.type === 'Buffer' && Array.isArray(obj.data)) {\n return fromArrayLike(obj.data)\n }\n }\n\n throw new TypeError('First argument must be a string, Buffer, ArrayBuffer, Array, or array-like object.')\n}\n\nfunction checked (length) {\n // Note: cannot use `length < K_MAX_LENGTH` here because that fails when\n // length is NaN (which is otherwise coerced to zero.)\n if (length >= K_MAX_LENGTH) {\n throw new RangeError('Attempt to allocate Buffer larger than maximum ' +\n 'size: 0x' + K_MAX_LENGTH.toString(16) + ' bytes')\n }\n return length | 0\n}\n\nfunction SlowBuffer (length) {\n if (+length != length) { // eslint-disable-line eqeqeq\n length = 0\n }\n return Buffer.alloc(+length)\n}\n\nBuffer.isBuffer = function isBuffer (b) {\n return b != null && b._isBuffer === true\n}\n\nBuffer.compare = function compare (a, b) {\n if (!Buffer.isBuffer(a) || !Buffer.isBuffer(b)) {\n throw new TypeError('Arguments must be Buffers')\n }\n\n if (a === b) return 0\n\n var x = a.length\n var y = b.length\n\n for (var i = 0, len = Math.min(x, y); i < len; ++i) {\n if (a[i] !== b[i]) {\n x = a[i]\n y = b[i]\n break\n }\n }\n\n if (x < y) return -1\n if (y < x) return 1\n return 0\n}\n\nBuffer.isEncoding = function isEncoding (encoding) {\n switch (String(encoding).toLowerCase()) {\n case 'hex':\n case 'utf8':\n case 'utf-8':\n case 'ascii':\n case 'latin1':\n case 'binary':\n case 'base64':\n case 'ucs2':\n case 'ucs-2':\n case 'utf16le':\n case 'utf-16le':\n return true\n default:\n return false\n }\n}\n\nBuffer.concat = function concat (list, length) {\n if (!Array.isArray(list)) {\n throw new TypeError('\"list\" argument must be an Array of Buffers')\n }\n\n if (list.length === 0) {\n return Buffer.alloc(0)\n }\n\n var i\n if (length === undefined) {\n length = 0\n for (i = 0; i < list.length; ++i) {\n length += list[i].length\n }\n }\n\n var buffer = Buffer.allocUnsafe(length)\n var pos = 0\n for (i = 0; i < list.length; ++i) {\n var buf = list[i]\n if (!Buffer.isBuffer(buf)) {\n throw new TypeError('\"list\" argument must be an Array of Buffers')\n }\n buf.copy(buffer, pos)\n pos += buf.length\n }\n return buffer\n}\n\nfunction byteLength (string, encoding) {\n if (Buffer.isBuffer(string)) {\n return string.length\n }\n if (isArrayBufferView(string) || isArrayBuffer(string)) {\n return string.byteLength\n }\n if (typeof string !== 'string') {\n string = '' + string\n }\n\n var len = string.length\n if (len === 0) return 0\n\n // Use a for loop to avoid recursion\n var loweredCase = false\n for (;;) {\n switch (encoding) {\n case 'ascii':\n case 'latin1':\n case 'binary':\n return len\n case 'utf8':\n case 'utf-8':\n case undefined:\n return utf8ToBytes(string).length\n case 'ucs2':\n case 'ucs-2':\n case 'utf16le':\n case 'utf-16le':\n return len * 2\n case 'hex':\n return len >>> 1\n case 'base64':\n return base64ToBytes(string).length\n default:\n if (loweredCase) return utf8ToBytes(string).length // assume utf8\n encoding = ('' + encoding).toLowerCase()\n loweredCase = true\n }\n }\n}\nBuffer.byteLength = byteLength\n\nfunction slowToString (encoding, start, end) {\n var loweredCase = false\n\n // No need to verify that \"this.length <= MAX_UINT32\" since it's a read-only\n // property of a typed array.\n\n // This behaves neither like String nor Uint8Array in that we set start/end\n // to their upper/lower bounds if the value passed is out of range.\n // undefined is handled specially as per ECMA-262 6th Edition,\n // Section 13.3.3.7 Runtime Semantics: KeyedBindingInitialization.\n if (start === undefined || start < 0) {\n start = 0\n }\n // Return early if start > this.length. Done here to prevent potential uint32\n // coercion fail below.\n if (start > this.length) {\n return ''\n }\n\n if (end === undefined || end > this.length) {\n end = this.length\n }\n\n if (end <= 0) {\n return ''\n }\n\n // Force coersion to uint32. This will also coerce falsey/NaN values to 0.\n end >>>= 0\n start >>>= 0\n\n if (end <= start) {\n return ''\n }\n\n if (!encoding) encoding = 'utf8'\n\n while (true) {\n switch (encoding) {\n case 'hex':\n return hexSlice(this, start, end)\n\n case 'utf8':\n case 'utf-8':\n return utf8Slice(this, start, end)\n\n case 'ascii':\n return asciiSlice(this, start, end)\n\n case 'latin1':\n case 'binary':\n return latin1Slice(this, start, end)\n\n case 'base64':\n return base64Slice(this, start, end)\n\n case 'ucs2':\n case 'ucs-2':\n case 'utf16le':\n case 'utf-16le':\n return utf16leSlice(this, start, end)\n\n default:\n if (loweredCase) throw new TypeError('Unknown encoding: ' + encoding)\n encoding = (encoding + '').toLowerCase()\n loweredCase = true\n }\n }\n}\n\n// This property is used by `Buffer.isBuffer` (and the `is-buffer` npm package)\n// to detect a Buffer instance. It's not possible to use `instanceof Buffer`\n// reliably in a browserify context because there could be multiple different\n// copies of the 'buffer' package in use. This method works even for Buffer\n// instances that were created from another copy of the `buffer` package.\n// See: https://github.com/feross/buffer/issues/154\nBuffer.prototype._isBuffer = true\n\nfunction swap (b, n, m) {\n var i = b[n]\n b[n] = b[m]\n b[m] = i\n}\n\nBuffer.prototype.swap16 = function swap16 () {\n var len = this.length\n if (len % 2 !== 0) {\n throw new RangeError('Buffer size must be a multiple of 16-bits')\n }\n for (var i = 0; i < len; i += 2) {\n swap(this, i, i + 1)\n }\n return this\n}\n\nBuffer.prototype.swap32 = function swap32 () {\n var len = this.length\n if (len % 4 !== 0) {\n throw new RangeError('Buffer size must be a multiple of 32-bits')\n }\n for (var i = 0; i < len; i += 4) {\n swap(this, i, i + 3)\n swap(this, i + 1, i + 2)\n }\n return this\n}\n\nBuffer.prototype.swap64 = function swap64 () {\n var len = this.length\n if (len % 8 !== 0) {\n throw new RangeError('Buffer size must be a multiple of 64-bits')\n }\n for (var i = 0; i < len; i += 8) {\n swap(this, i, i + 7)\n swap(this, i + 1, i + 6)\n swap(this, i + 2, i + 5)\n swap(this, i + 3, i + 4)\n }\n return this\n}\n\nBuffer.prototype.toString = function toString () {\n var length = this.length\n if (length === 0) return ''\n if (arguments.length === 0) return utf8Slice(this, 0, length)\n return slowToString.apply(this, arguments)\n}\n\nBuffer.prototype.equals = function equals (b) {\n if (!Buffer.isBuffer(b)) throw new TypeError('Argument must be a Buffer')\n if (this === b) return true\n return Buffer.compare(this, b) === 0\n}\n\nBuffer.prototype.inspect = function inspect () {\n var str = ''\n var max = exports.INSPECT_MAX_BYTES\n if (this.length > 0) {\n str = this.toString('hex', 0, max).match(/.{2}/g).join(' ')\n if (this.length > max) str += ' ... '\n }\n return '<Buffer ' + str + '>'\n}\n\nBuffer.prototype.compare = function compare (target, start, end, thisStart, thisEnd) {\n if (!Buffer.isBuffer(target)) {\n throw new TypeError('Argument must be a Buffer')\n }\n\n if (start === undefined) {\n start = 0\n }\n if (end === undefined) {\n end = target ? target.length : 0\n }\n if (thisStart === undefined) {\n thisStart = 0\n }\n if (thisEnd === undefined) {\n thisEnd = this.length\n }\n\n if (start < 0 || end > target.length || thisStart < 0 || thisEnd > this.length) {\n throw new RangeError('out of range index')\n }\n\n if (thisStart >= thisEnd && start >= end) {\n return 0\n }\n if (thisStart >= thisEnd) {\n return -1\n }\n if (start >= end) {\n return 1\n }\n\n start >>>= 0\n end >>>= 0\n thisStart >>>= 0\n thisEnd >>>= 0\n\n if (this === target) return 0\n\n var x = thisEnd - thisStart\n var y = end - start\n var len = Math.min(x, y)\n\n var thisCopy = this.slice(thisStart, thisEnd)\n var targetCopy = target.slice(start, end)\n\n for (var i = 0; i < len; ++i) {\n if (thisCopy[i] !== targetCopy[i]) {\n x = thisCopy[i]\n y = targetCopy[i]\n break\n }\n }\n\n if (x < y) return -1\n if (y < x) return 1\n return 0\n}\n\n// Finds either the first index of `val` in `buffer` at offset >= `byteOffset`,\n// OR the last index of `val` in `buffer` at offset <= `byteOffset`.\n//\n// Arguments:\n// - buffer - a Buffer to search\n// - val - a string, Buffer, or number\n// - byteOffset - an index into `buffer`; will be clamped to an int32\n// - encoding - an optional encoding, relevant is val is a string\n// - dir - true for indexOf, false for lastIndexOf\nfunction bidirectionalIndexOf (buffer, val, byteOffset, encoding, dir) {\n // Empty buffer means no match\n if (buffer.length === 0) return -1\n\n // Normalize byteOffset\n if (typeof byteOffset === 'string') {\n encoding = byteOffset\n byteOffset = 0\n } else if (byteOffset > 0x7fffffff) {\n byteOffset = 0x7fffffff\n } else if (byteOffset < -0x80000000) {\n byteOffset = -0x80000000\n }\n byteOffset = +byteOffset // Coerce to Number.\n if (numberIsNaN(byteOffset)) {\n // byteOffset: it it's undefined, null, NaN, \"foo\", etc, search whole buffer\n byteOffset = dir ? 0 : (buffer.length - 1)\n }\n\n // Normalize byteOffset: negative offsets start from the end of the buffer\n if (byteOffset < 0) byteOffset = buffer.length + byteOffset\n if (byteOffset >= buffer.length) {\n if (dir) return -1\n else byteOffset = buffer.length - 1\n } else if (byteOffset < 0) {\n if (dir) byteOffset = 0\n else return -1\n }\n\n // Normalize val\n if (typeof val === 'string') {\n val = Buffer.from(val, encoding)\n }\n\n // Finally, search either indexOf (if dir is true) or lastIndexOf\n if (Buffer.isBuffer(val)) {\n // Special case: looking for empty string/buffer always fails\n if (val.length === 0) {\n return -1\n }\n return arrayIndexOf(buffer, val, byteOffset, encoding, dir)\n } else if (typeof val === 'number') {\n val = val & 0xFF // Search for a byte value [0-255]\n if (typeof Uint8Array.prototype.indexOf === 'function') {\n if (dir) {\n return Uint8Array.prototype.indexOf.call(buffer, val, byteOffset)\n } else {\n return Uint8Array.prototype.lastIndexOf.call(buffer, val, byteOffset)\n }\n }\n return arrayIndexOf(buffer, [ val ], byteOffset, encoding, dir)\n }\n\n throw new TypeError('val must be string, number or Buffer')\n}\n\nfunction arrayIndexOf (arr, val, byteOffset, encoding, dir) {\n var indexSize = 1\n var arrLength = arr.length\n var valLength = val.length\n\n if (encoding !== undefined) {\n encoding = String(encoding).toLowerCase()\n if (encoding === 'ucs2' || encoding === 'ucs-2' ||\n encoding === 'utf16le' || encoding === 'utf-16le') {\n if (arr.length < 2 || val.length < 2) {\n return -1\n }\n indexSize = 2\n arrLength /= 2\n valLength /= 2\n byteOffset /= 2\n }\n }\n\n function read (buf, i) {\n if (indexSize === 1) {\n return buf[i]\n } else {\n return buf.readUInt16BE(i * indexSize)\n }\n }\n\n var i\n if (dir) {\n var foundIndex = -1\n for (i = byteOffset; i < arrLength; i++) {\n if (read(arr, i) === read(val, foundIndex === -1 ? 0 : i - foundIndex)) {\n if (foundIndex === -1) foundIndex = i\n if (i - foundIndex + 1 === valLength) return foundIndex * indexSize\n } else {\n if (foundIndex !== -1) i -= i - foundIndex\n foundIndex = -1\n }\n }\n } else {\n if (byteOffset + valLength > arrLength) byteOffset = arrLength - valLength\n for (i = byteOffset; i >= 0; i--) {\n var found = true\n for (var j = 0; j < valLength; j++) {\n if (read(arr, i + j) !== read(val, j)) {\n found = false\n break\n }\n }\n if (found) return i\n }\n }\n\n return -1\n}\n\nBuffer.prototype.includes = function includes (val, byteOffset, encoding) {\n return this.indexOf(val, byteOffset, encoding) !== -1\n}\n\nBuffer.prototype.indexOf = function indexOf (val, byteOffset, encoding) {\n return bidirectionalIndexOf(this, val, byteOffset, encoding, true)\n}\n\nBuffer.prototype.lastIndexOf = function lastIndexOf (val, byteOffset, encoding) {\n return bidirectionalIndexOf(this, val, byteOffset, encoding, false)\n}\n\nfunction hexWrite (buf, string, offset, length) {\n offset = Number(offset) || 0\n var remaining = buf.length - offset\n if (!length) {\n length = remaining\n } else {\n length = Number(length)\n if (length > remaining) {\n length = remaining\n }\n }\n\n // must be an even number of digits\n var strLen = string.length\n if (strLen % 2 !== 0) throw new TypeError('Invalid hex string')\n\n if (length > strLen / 2) {\n length = strLen / 2\n }\n for (var i = 0; i < length; ++i) {\n var parsed = parseInt(string.substr(i * 2, 2), 16)\n if (numberIsNaN(parsed)) return i\n buf[offset + i] = parsed\n }\n return i\n}\n\nfunction utf8Write (buf, string, offset, length) {\n return blitBuffer(utf8ToBytes(string, buf.length - offset), buf, offset, length)\n}\n\nfunction asciiWrite (buf, string, offset, length) {\n return blitBuffer(asciiToBytes(string), buf, offset, length)\n}\n\nfunction latin1Write (buf, string, offset, length) {\n return asciiWrite(buf, string, offset, length)\n}\n\nfunction base64Write (buf, string, offset, length) {\n return blitBuffer(base64ToBytes(string), buf, offset, length)\n}\n\nfunction ucs2Write (buf, string, offset, length) {\n return blitBuffer(utf16leToBytes(string, buf.length - offset), buf, offset, length)\n}\n\nBuffer.prototype.write = function write (string, offset, length, encoding) {\n // Buffer#write(string)\n if (offset === undefined) {\n encoding = 'utf8'\n length = this.length\n offset = 0\n // Buffer#write(string, encoding)\n } else if (length === undefined && typeof offset === 'string') {\n encoding = offset\n length = this.length\n offset = 0\n // Buffer#write(string, offset[, length][, encoding])\n } else if (isFinite(offset)) {\n offset = offset >>> 0\n if (isFinite(length)) {\n length = length >>> 0\n if (encoding === undefined) encoding = 'utf8'\n } else {\n encoding = length\n length = undefined\n }\n } else {\n throw new Error(\n 'Buffer.write(string, encoding, offset[, length]) is no longer supported'\n )\n }\n\n var remaining = this.length - offset\n if (length === undefined || length > remaining) length = remaining\n\n if ((string.length > 0 && (length < 0 || offset < 0)) || offset > this.length) {\n throw new RangeError('Attempt to write outside buffer bounds')\n }\n\n if (!encoding) encoding = 'utf8'\n\n var loweredCase = false\n for (;;) {\n switch (encoding) {\n case 'hex':\n return hexWrite(this, string, offset, length)\n\n case 'utf8':\n case 'utf-8':\n return utf8Write(this, string, offset, length)\n\n case 'ascii':\n return asciiWrite(this, string, offset, length)\n\n case 'latin1':\n case 'binary':\n return latin1Write(this, string, offset, length)\n\n case 'base64':\n // Warning: maxLength not taken into account in base64Write\n return base64Write(this, string, offset, length)\n\n case 'ucs2':\n case 'ucs-2':\n case 'utf16le':\n case 'utf-16le':\n return ucs2Write(this, string, offset, length)\n\n default:\n if (loweredCase) throw new TypeError('Unknown encoding: ' + encoding)\n encoding = ('' + encoding).toLowerCase()\n loweredCase = true\n }\n }\n}\n\nBuffer.prototype.toJSON = function toJSON () {\n return {\n type: 'Buffer',\n data: Array.prototype.slice.call(this._arr || this, 0)\n }\n}\n\nfunction base64Slice (buf, start, end) {\n if (start === 0 && end === buf.length) {\n return base64.fromByteArray(buf)\n } else {\n return base64.fromByteArray(buf.slice(start, end))\n }\n}\n\nfunction utf8Slice (buf, start, end) {\n end = Math.min(buf.length, end)\n var res = []\n\n var i = start\n while (i < end) {\n var firstByte = buf[i]\n var codePoint = null\n var bytesPerSequence = (firstByte > 0xEF) ? 4\n : (firstByte > 0xDF) ? 3\n : (firstByte > 0xBF) ? 2\n : 1\n\n if (i + bytesPerSequence <= end) {\n var secondByte, thirdByte, fourthByte, tempCodePoint\n\n switch (bytesPerSequence) {\n case 1:\n if (firstByte < 0x80) {\n codePoint = firstByte\n }\n break\n case 2:\n secondByte = buf[i + 1]\n if ((secondByte & 0xC0) === 0x80) {\n tempCodePoint = (firstByte & 0x1F) << 0x6 | (secondByte & 0x3F)\n if (tempCodePoint > 0x7F) {\n codePoint = tempCodePoint\n }\n }\n break\n case 3:\n secondByte = buf[i + 1]\n thirdByte = buf[i + 2]\n if ((secondByte & 0xC0) === 0x80 && (thirdByte & 0xC0) === 0x80) {\n tempCodePoint = (firstByte & 0xF) << 0xC | (secondByte & 0x3F) << 0x6 | (thirdByte & 0x3F)\n if (tempCodePoint > 0x7FF && (tempCodePoint < 0xD800 || tempCodePoint > 0xDFFF)) {\n codePoint = tempCodePoint\n }\n }\n break\n case 4:\n secondByte = buf[i + 1]\n thirdByte = buf[i + 2]\n fourthByte = buf[i + 3]\n if ((secondByte & 0xC0) === 0x80 && (thirdByte & 0xC0) === 0x80 && (fourthByte & 0xC0) === 0x80) {\n tempCodePoint = (firstByte & 0xF) << 0x12 | (secondByte & 0x3F) << 0xC | (thirdByte & 0x3F) << 0x6 | (fourthByte & 0x3F)\n if (tempCodePoint > 0xFFFF && tempCodePoint < 0x110000) {\n codePoint = tempCodePoint\n }\n }\n }\n }\n\n if (codePoint === null) {\n // we did not generate a valid codePoint so insert a\n // replacement char (U+FFFD) and advance only 1 byte\n codePoint = 0xFFFD\n bytesPerSequence = 1\n } else if (codePoint > 0xFFFF) {\n // encode to utf16 (surrogate pair dance)\n codePoint -= 0x10000\n res.push(codePoint >>> 10 & 0x3FF | 0xD800)\n codePoint = 0xDC00 | codePoint & 0x3FF\n }\n\n res.push(codePoint)\n i += bytesPerSequence\n }\n\n return decodeCodePointsArray(res)\n}\n\n// Based on http://stackoverflow.com/a/22747272/680742, the browser with\n// the lowest limit is Chrome, with 0x10000 args.\n// We go 1 magnitude less, for safety\nvar MAX_ARGUMENTS_LENGTH = 0x1000\n\nfunction decodeCodePointsArray (codePoints) {\n var len = codePoints.length\n if (len <= MAX_ARGUMENTS_LENGTH) {\n return String.fromCharCode.apply(String, codePoints) // avoid extra slice()\n }\n\n // Decode in chunks to avoid \"call stack size exceeded\".\n var res = ''\n var i = 0\n while (i < len) {\n res += String.fromCharCode.apply(\n String,\n codePoints.slice(i, i += MAX_ARGUMENTS_LENGTH)\n )\n }\n return res\n}\n\nfunction asciiSlice (buf, start, end) {\n var ret = ''\n end = Math.min(buf.length, end)\n\n for (var i = start; i < end; ++i) {\n ret += String.fromCharCode(buf[i] & 0x7F)\n }\n return ret\n}\n\nfunction latin1Slice (buf, start, end) {\n var ret = ''\n end = Math.min(buf.length, end)\n\n for (var i = start; i < end; ++i) {\n ret += String.fromCharCode(buf[i])\n }\n return ret\n}\n\nfunction hexSlice (buf, start, end) {\n var len = buf.length\n\n if (!start || start < 0) start = 0\n if (!end || end < 0 || end > len) end = len\n\n var out = ''\n for (var i = start; i < end; ++i) {\n out += toHex(buf[i])\n }\n return out\n}\n\nfunction utf16leSlice (buf, start, end) {\n var bytes = buf.slice(start, end)\n var res = ''\n for (var i = 0; i < bytes.length; i += 2) {\n res += String.fromCharCode(bytes[i] + (bytes[i + 1] * 256))\n }\n return res\n}\n\nBuffer.prototype.slice = function slice (start, end) {\n var len = this.length\n start = ~~start\n end = end === undefined ? len : ~~end\n\n if (start < 0) {\n start += len\n if (start < 0) start = 0\n } else if (start > len) {\n start = len\n }\n\n if (end < 0) {\n end += len\n if (end < 0) end = 0\n } else if (end > len) {\n end = len\n }\n\n if (end < start) end = start\n\n var newBuf = this.subarray(start, end)\n // Return an augmented `Uint8Array` instance\n newBuf.__proto__ = Buffer.prototype\n return newBuf\n}\n\n/*\n * Need to make sure that buffer isn't trying to write out of bounds.\n */\nfunction checkOffset (offset, ext, length) {\n if ((offset % 1) !== 0 || offset < 0) throw new RangeError('offset is not uint')\n if (offset + ext > length) throw new RangeError('Trying to access beyond buffer length')\n}\n\nBuffer.prototype.readUIntLE = function readUIntLE (offset, byteLength, noAssert) {\n offset = offset >>> 0\n byteLength = byteLength >>> 0\n if (!noAssert) checkOffset(offset, byteLength, this.length)\n\n var val = this[offset]\n var mul = 1\n var i = 0\n while (++i < byteLength && (mul *= 0x100)) {\n val += this[offset + i] * mul\n }\n\n return val\n}\n\nBuffer.prototype.readUIntBE = function readUIntBE (offset, byteLength, noAssert) {\n offset = offset >>> 0\n byteLength = byteLength >>> 0\n if (!noAssert) {\n checkOffset(offset, byteLength, this.length)\n }\n\n var val = this[offset + --byteLength]\n var mul = 1\n while (byteLength > 0 && (mul *= 0x100)) {\n val += this[offset + --byteLength] * mul\n }\n\n return val\n}\n\nBuffer.prototype.readUInt8 = function readUInt8 (offset, noAssert) {\n offset = offset >>> 0\n if (!noAssert) checkOffset(offset, 1, this.length)\n return this[offset]\n}\n\nBuffer.prototype.readUInt16LE = function readUInt16LE (offset, noAssert) {\n offset = offset >>> 0\n if (!noAssert) checkOffset(offset, 2, this.length)\n return this[offset] | (this[offset + 1] << 8)\n}\n\nBuffer.prototype.readUInt16BE = function readUInt16BE (offset, noAssert) {\n offset = offset >>> 0\n if (!noAssert) checkOffset(offset, 2, this.length)\n return (this[offset] << 8) | this[offset + 1]\n}\n\nBuffer.prototype.readUInt32LE = function readUInt32LE (offset, noAssert) {\n offset = offset >>> 0\n if (!noAssert) checkOffset(offset, 4, this.length)\n\n return ((this[offset]) |\n (this[offset + 1] << 8) |\n (this[offset + 2] << 16)) +\n (this[offset + 3] * 0x1000000)\n}\n\nBuffer.prototype.readUInt32BE = function readUInt32BE (offset, noAssert) {\n offset = offset >>> 0\n if (!noAssert) checkOffset(offset, 4, this.length)\n\n return (this[offset] * 0x1000000) +\n ((this[offset + 1] << 16) |\n (this[offset + 2] << 8) |\n this[offset + 3])\n}\n\nBuffer.prototype.readIntLE = function readIntLE (offset, byteLength, noAssert) {\n offset = offset >>> 0\n byteLength = byteLength >>> 0\n if (!noAssert) checkOffset(offset, byteLength, this.length)\n\n var val = this[offset]\n var mul = 1\n var i = 0\n while (++i < byteLength && (mul *= 0x100)) {\n val += this[offset + i] * mul\n }\n mul *= 0x80\n\n if (val >= mul) val -= Math.pow(2, 8 * byteLength)\n\n return val\n}\n\nBuffer.prototype.readIntBE = function readIntBE (offset, byteLength, noAssert) {\n offset = offset >>> 0\n byteLength = byteLength >>> 0\n if (!noAssert) checkOffset(offset, byteLength, this.length)\n\n var i = byteLength\n var mul = 1\n var val = this[offset + --i]\n while (i > 0 && (mul *= 0x100)) {\n val += this[offset + --i] * mul\n }\n mul *= 0x80\n\n if (val >= mul) val -= Math.pow(2, 8 * byteLength)\n\n return val\n}\n\nBuffer.prototype.readInt8 = function readInt8 (offset, noAssert) {\n offset = offset >>> 0\n if (!noAssert) checkOffset(offset, 1, this.length)\n if (!(this[offset] & 0x80)) return (this[offset])\n return ((0xff - this[offset] + 1) * -1)\n}\n\nBuffer.prototype.readInt16LE = function readInt16LE (offset, noAssert) {\n offset = offset >>> 0\n if (!noAssert) checkOffset(offset, 2, this.length)\n var val = this[offset] | (this[offset + 1] << 8)\n return (val & 0x8000) ? val | 0xFFFF0000 : val\n}\n\nBuffer.prototype.readInt16BE = function readInt16BE (offset, noAssert) {\n offset = offset >>> 0\n if (!noAssert) checkOffset(offset, 2, this.length)\n var val = this[offset + 1] | (this[offset] << 8)\n return (val & 0x8000) ? val | 0xFFFF0000 : val\n}\n\nBuffer.prototype.readInt32LE = function readInt32LE (offset, noAssert) {\n offset = offset >>> 0\n if (!noAssert) checkOffset(offset, 4, this.length)\n\n return (this[offset]) |\n (this[offset + 1] << 8) |\n (this[offset + 2] << 16) |\n (this[offset + 3] << 24)\n}\n\nBuffer.prototype.readInt32BE = function readInt32BE (offset, noAssert) {\n offset = offset >>> 0\n if (!noAssert) checkOffset(offset, 4, this.length)\n\n return (this[offset] << 24) |\n (this[offset + 1] << 16) |\n (this[offset + 2] << 8) |\n (this[offset + 3])\n}\n\nBuffer.prototype.readFloatLE = function readFloatLE (offset, noAssert) {\n offset = offset >>> 0\n if (!noAssert) checkOffset(offset, 4, this.length)\n return ieee754.read(this, offset, true, 23, 4)\n}\n\nBuffer.prototype.readFloatBE = function readFloatBE (offset, noAssert) {\n offset = offset >>> 0\n if (!noAssert) checkOffset(offset, 4, this.length)\n return ieee754.read(this, offset, false, 23, 4)\n}\n\nBuffer.prototype.readDoubleLE = function readDoubleLE (offset, noAssert) {\n offset = offset >>> 0\n if (!noAssert) checkOffset(offset, 8, this.length)\n return ieee754.read(this, offset, true, 52, 8)\n}\n\nBuffer.prototype.readDoubleBE = function readDoubleBE (offset, noAssert) {\n offset = offset >>> 0\n if (!noAssert) checkOffset(offset, 8, this.length)\n return ieee754.read(this, offset, false, 52, 8)\n}\n\nfunction checkInt (buf, value, offset, ext, max, min) {\n if (!Buffer.isBuffer(buf)) throw new TypeError('\"buffer\" argument must be a Buffer instance')\n if (value > max || value < min) throw new RangeError('\"value\" argument is out of bounds')\n if (offset + ext > buf.length) throw new RangeError('Index out of range')\n}\n\nBuffer.prototype.writeUIntLE = function writeUIntLE (value, offset, byteLength, noAssert) {\n value = +value\n offset = offset >>> 0\n byteLength = byteLength >>> 0\n if (!noAssert) {\n var maxBytes = Math.pow(2, 8 * byteLength) - 1\n checkInt(this, value, offset, byteLength, maxBytes, 0)\n }\n\n var mul = 1\n var i = 0\n this[offset] = value & 0xFF\n while (++i < byteLength && (mul *= 0x100)) {\n this[offset + i] = (value / mul) & 0xFF\n }\n\n return offset + byteLength\n}\n\nBuffer.prototype.writeUIntBE = function writeUIntBE (value, offset, byteLength, noAssert) {\n value = +value\n offset = offset >>> 0\n byteLength = byteLength >>> 0\n if (!noAssert) {\n var maxBytes = Math.pow(2, 8 * byteLength) - 1\n checkInt(this, value, offset, byteLength, maxBytes, 0)\n }\n\n var i = byteLength - 1\n var mul = 1\n this[offset + i] = value & 0xFF\n while (--i >= 0 && (mul *= 0x100)) {\n this[offset + i] = (value / mul) & 0xFF\n }\n\n return offset + byteLength\n}\n\nBuffer.prototype.writeUInt8 = function writeUInt8 (value, offset, noAssert) {\n value = +value\n offset = offset >>> 0\n if (!noAssert) checkInt(this, value, offset, 1, 0xff, 0)\n this[offset] = (value & 0xff)\n return offset + 1\n}\n\nBuffer.prototype.writeUInt16LE = function writeUInt16LE (value, offset, noAssert) {\n value = +value\n offset = offset >>> 0\n if (!noAssert) checkInt(this, value, offset, 2, 0xffff, 0)\n this[offset] = (value & 0xff)\n this[offset + 1] = (value >>> 8)\n return offset + 2\n}\n\nBuffer.prototype.writeUInt16BE = function writeUInt16BE (value, offset, noAssert) {\n value = +value\n offset = offset >>> 0\n if (!noAssert) checkInt(this, value, offset, 2, 0xffff, 0)\n this[offset] = (value >>> 8)\n this[offset + 1] = (value & 0xff)\n return offset + 2\n}\n\nBuffer.prototype.writeUInt32LE = function writeUInt32LE (value, offset, noAssert) {\n value = +value\n offset = offset >>> 0\n if (!noAssert) checkInt(this, value, offset, 4, 0xffffffff, 0)\n this[offset + 3] = (value >>> 24)\n this[offset + 2] = (value >>> 16)\n this[offset + 1] = (value >>> 8)\n this[offset] = (value & 0xff)\n return offset + 4\n}\n\nBuffer.prototype.writeUInt32BE = function writeUInt32BE (value, offset, noAssert) {\n value = +value\n offset = offset >>> 0\n if (!noAssert) checkInt(this, value, offset, 4, 0xffffffff, 0)\n this[offset] = (value >>> 24)\n this[offset + 1] = (value >>> 16)\n this[offset + 2] = (value >>> 8)\n this[offset + 3] = (value & 0xff)\n return offset + 4\n}\n\nBuffer.prototype.writeIntLE = function writeIntLE (value, offset, byteLength, noAssert) {\n value = +value\n offset = offset >>> 0\n if (!noAssert) {\n var limit = Math.pow(2, (8 * byteLength) - 1)\n\n checkInt(this, value, offset, byteLength, limit - 1, -limit)\n }\n\n var i = 0\n var mul = 1\n var sub = 0\n this[offset] = value & 0xFF\n while (++i < byteLength && (mul *= 0x100)) {\n if (value < 0 && sub === 0 && this[offset + i - 1] !== 0) {\n sub = 1\n }\n this[offset + i] = ((value / mul) >> 0) - sub & 0xFF\n }\n\n return offset + byteLength\n}\n\nBuffer.prototype.writeIntBE = function writeIntBE (value, offset, byteLength, noAssert) {\n value = +value\n offset = offset >>> 0\n if (!noAssert) {\n var limit = Math.pow(2, (8 * byteLength) - 1)\n\n checkInt(this, value, offset, byteLength, limit - 1, -limit)\n }\n\n var i = byteLength - 1\n var mul = 1\n var sub = 0\n this[offset + i] = value & 0xFF\n while (--i >= 0 && (mul *= 0x100)) {\n if (value < 0 && sub === 0 && this[offset + i + 1] !== 0) {\n sub = 1\n }\n this[offset + i] = ((value / mul) >> 0) - sub & 0xFF\n }\n\n return offset + byteLength\n}\n\nBuffer.prototype.writeInt8 = function writeInt8 (value, offset, noAssert) {\n value = +value\n offset = offset >>> 0\n if (!noAssert) checkInt(this, value, offset, 1, 0x7f, -0x80)\n if (value < 0) value = 0xff + value + 1\n this[offset] = (value & 0xff)\n return offset + 1\n}\n\nBuffer.prototype.writeInt16LE = function writeInt16LE (value, offset, noAssert) {\n value = +value\n offset = offset >>> 0\n if (!noAssert) checkInt(this, value, offset, 2, 0x7fff, -0x8000)\n this[offset] = (value & 0xff)\n this[offset + 1] = (value >>> 8)\n return offset + 2\n}\n\nBuffer.prototype.writeInt16BE = function writeInt16BE (value, offset, noAssert) {\n value = +value\n offset = offset >>> 0\n if (!noAssert) checkInt(this, value, offset, 2, 0x7fff, -0x8000)\n this[offset] = (value >>> 8)\n this[offset + 1] = (value & 0xff)\n return offset + 2\n}\n\nBuffer.prototype.writeInt32LE = function writeInt32LE (value, offset, noAssert) {\n value = +value\n offset = offset >>> 0\n if (!noAssert) checkInt(this, value, offset, 4, 0x7fffffff, -0x80000000)\n this[offset] = (value & 0xff)\n this[offset + 1] = (value >>> 8)\n this[offset + 2] = (value >>> 16)\n this[offset + 3] = (value >>> 24)\n return offset + 4\n}\n\nBuffer.prototype.writeInt32BE = function writeInt32BE (value, offset, noAssert) {\n value = +value\n offset = offset >>> 0\n if (!noAssert) checkInt(this, value, offset, 4, 0x7fffffff, -0x80000000)\n if (value < 0) value = 0xffffffff + value + 1\n this[offset] = (value >>> 24)\n this[offset + 1] = (value >>> 16)\n this[offset + 2] = (value >>> 8)\n this[offset + 3] = (value & 0xff)\n return offset + 4\n}\n\nfunction checkIEEE754 (buf, value, offset, ext, max, min) {\n if (offset + ext > buf.length) throw new RangeError('Index out of range')\n if (offset < 0) throw new RangeError('Index out of range')\n}\n\nfunction writeFloat (buf, value, offset, littleEndian, noAssert) {\n value = +value\n offset = offset >>> 0\n if (!noAssert) {\n checkIEEE754(buf, value, offset, 4, 3.4028234663852886e+38, -3.4028234663852886e+38)\n }\n ieee754.write(buf, value, offset, littleEndian, 23, 4)\n return offset + 4\n}\n\nBuffer.prototype.writeFloatLE = function writeFloatLE (value, offset, noAssert) {\n return writeFloat(this, value, offset, true, noAssert)\n}\n\nBuffer.prototype.writeFloatBE = function writeFloatBE (value, offset, noAssert) {\n return writeFloat(this, value, offset, false, noAssert)\n}\n\nfunction writeDouble (buf, value, offset, littleEndian, noAssert) {\n value = +value\n offset = offset >>> 0\n if (!noAssert) {\n checkIEEE754(buf, value, offset, 8, 1.7976931348623157E+308, -1.7976931348623157E+308)\n }\n ieee754.write(buf, value, offset, littleEndian, 52, 8)\n return offset + 8\n}\n\nBuffer.prototype.writeDoubleLE = function writeDoubleLE (value, offset, noAssert) {\n return writeDouble(this, value, offset, true, noAssert)\n}\n\nBuffer.prototype.writeDoubleBE = function writeDoubleBE (value, offset, noAssert) {\n return writeDouble(this, value, offset, false, noAssert)\n}\n\n// copy(targetBuffer, targetStart=0, sourceStart=0, sourceEnd=buffer.length)\nBuffer.prototype.copy = function copy (target, targetStart, start, end) {\n if (!start) start = 0\n if (!end && end !== 0) end = this.length\n if (targetStart >= target.length) targetStart = target.length\n if (!targetStart) targetStart = 0\n if (end > 0 && end < start) end = start\n\n // Copy 0 bytes; we're done\n if (end === start) return 0\n if (target.length === 0 || this.length === 0) return 0\n\n // Fatal error conditions\n if (targetStart < 0) {\n throw new RangeError('targetStart out of bounds')\n }\n if (start < 0 || start >= this.length) throw new RangeError('sourceStart out of bounds')\n if (end < 0) throw new RangeError('sourceEnd out of bounds')\n\n // Are we oob?\n if (end > this.length) end = this.length\n if (target.length - targetStart < end - start) {\n end = target.length - targetStart + start\n }\n\n var len = end - start\n var i\n\n if (this === target && start < targetStart && targetStart < end) {\n // descending copy from end\n for (i = len - 1; i >= 0; --i) {\n target[i + targetStart] = this[i + start]\n }\n } else if (len < 1000) {\n // ascending copy from start\n for (i = 0; i < len; ++i) {\n target[i + targetStart] = this[i + start]\n }\n } else {\n Uint8Array.prototype.set.call(\n target,\n this.subarray(start, start + len),\n targetStart\n )\n }\n\n return len\n}\n\n// Usage:\n// buffer.fill(number[, offset[, end]])\n// buffer.fill(buffer[, offset[, end]])\n// buffer.fill(string[, offset[, end]][, encoding])\nBuffer.prototype.fill = function fill (val, start, end, encoding) {\n // Handle string cases:\n if (typeof val === 'string') {\n if (typeof start === 'string') {\n encoding = start\n start = 0\n end = this.length\n } else if (typeof end === 'string') {\n encoding = end\n end = this.length\n }\n if (val.length === 1) {\n var code = val.charCodeAt(0)\n if (code < 256) {\n val = code\n }\n }\n if (encoding !== undefined && typeof encoding !== 'string') {\n throw new TypeError('encoding must be a string')\n }\n if (typeof encoding === 'string' && !Buffer.isEncoding(encoding)) {\n throw new TypeError('Unknown encoding: ' + encoding)\n }\n } else if (typeof val === 'number') {\n val = val & 255\n }\n\n // Invalid ranges are not set to a default, so can range check early.\n if (start < 0 || this.length < start || this.length < end) {\n throw new RangeError('Out of range index')\n }\n\n if (end <= start) {\n return this\n }\n\n start = start >>> 0\n end = end === undefined ? this.length : end >>> 0\n\n if (!val) val = 0\n\n var i\n if (typeof val === 'number') {\n for (i = start; i < end; ++i) {\n this[i] = val\n }\n } else {\n var bytes = Buffer.isBuffer(val)\n ? val\n : new Buffer(val, encoding)\n var len = bytes.length\n for (i = 0; i < end - start; ++i) {\n this[i + start] = bytes[i % len]\n }\n }\n\n return this\n}\n\n// HELPER FUNCTIONS\n// ================\n\nvar INVALID_BASE64_RE = /[^+/0-9A-Za-z-_]/g\n\nfunction base64clean (str) {\n // Node strips out invalid characters like \\n and \\t from the string, base64-js does not\n str = str.trim().replace(INVALID_BASE64_RE, '')\n // Node converts strings with length < 2 to ''\n if (str.length < 2) return ''\n // Node allows for non-padded base64 strings (missing trailing ===), base64-js does not\n while (str.length % 4 !== 0) {\n str = str + '='\n }\n return str\n}\n\nfunction toHex (n) {\n if (n < 16) return '0' + n.toString(16)\n return n.toString(16)\n}\n\nfunction utf8ToBytes (string, units) {\n units = units || Infinity\n var codePoint\n var length = string.length\n var leadSurrogate = null\n var bytes = []\n\n for (var i = 0; i < length; ++i) {\n codePoint = string.charCodeAt(i)\n\n // is surrogate component\n if (codePoint > 0xD7FF && codePoint < 0xE000) {\n // last char was a lead\n if (!leadSurrogate) {\n // no lead yet\n if (codePoint > 0xDBFF) {\n // unexpected trail\n if ((units -= 3) > -1) bytes.push(0xEF, 0xBF, 0xBD)\n continue\n } else if (i + 1 === length) {\n // unpaired lead\n if ((units -= 3) > -1) bytes.push(0xEF, 0xBF, 0xBD)\n continue\n }\n\n // valid lead\n leadSurrogate = codePoint\n\n continue\n }\n\n // 2 leads in a row\n if (codePoint < 0xDC00) {\n if ((units -= 3) > -1) bytes.push(0xEF, 0xBF, 0xBD)\n leadSurrogate = codePoint\n continue\n }\n\n // valid surrogate pair\n codePoint = (leadSurrogate - 0xD800 << 10 | codePoint - 0xDC00) + 0x10000\n } else if (leadSurrogate) {\n // valid bmp char, but last char was a lead\n if ((units -= 3) > -1) bytes.push(0xEF, 0xBF, 0xBD)\n }\n\n leadSurrogate = null\n\n // encode utf8\n if (codePoint < 0x80) {\n if ((units -= 1) < 0) break\n bytes.push(codePoint)\n } else if (codePoint < 0x800) {\n if ((units -= 2) < 0) break\n bytes.push(\n codePoint >> 0x6 | 0xC0,\n codePoint & 0x3F | 0x80\n )\n } else if (codePoint < 0x10000) {\n if ((units -= 3) < 0) break\n bytes.push(\n codePoint >> 0xC | 0xE0,\n codePoint >> 0x6 & 0x3F | 0x80,\n codePoint & 0x3F | 0x80\n )\n } else if (codePoint < 0x110000) {\n if ((units -= 4) < 0) break\n bytes.push(\n codePoint >> 0x12 | 0xF0,\n codePoint >> 0xC & 0x3F | 0x80,\n codePoint >> 0x6 & 0x3F | 0x80,\n codePoint & 0x3F | 0x80\n )\n } else {\n throw new Error('Invalid code point')\n }\n }\n\n return bytes\n}\n\nfunction asciiToBytes (str) {\n var byteArray = []\n for (var i = 0; i < str.length; ++i) {\n // Node's code seems to be doing this and not & 0x7F..\n byteArray.push(str.charCodeAt(i) & 0xFF)\n }\n return byteArray\n}\n\nfunction utf16leToBytes (str, units) {\n var c, hi, lo\n var byteArray = []\n for (var i = 0; i < str.length; ++i) {\n if ((units -= 2) < 0) break\n\n c = str.charCodeAt(i)\n hi = c >> 8\n lo = c % 256\n byteArray.push(lo)\n byteArray.push(hi)\n }\n\n return byteArray\n}\n\nfunction base64ToBytes (str) {\n return base64.toByteArray(base64clean(str))\n}\n\nfunction blitBuffer (src, dst, offset, length) {\n for (var i = 0; i < length; ++i) {\n if ((i + offset >= dst.length) || (i >= src.length)) break\n dst[i + offset] = src[i]\n }\n return i\n}\n\n// ArrayBuffers from another context (i.e. an iframe) do not pass the `instanceof` check\n// but they should be treated as valid. See: https://github.com/feross/buffer/issues/166\nfunction isArrayBuffer (obj) {\n return obj instanceof ArrayBuffer ||\n (obj != null && obj.constructor != null && obj.constructor.name === 'ArrayBuffer' &&\n typeof obj.byteLength === 'number')\n}\n\n// Node 0.10 supports `ArrayBuffer` but lacks `ArrayBuffer.isView`\nfunction isArrayBufferView (obj) {\n return (typeof ArrayBuffer.isView === 'function') && ArrayBuffer.isView(obj)\n}\n\nfunction numberIsNaN (obj) {\n return obj !== obj // eslint-disable-line no-self-compare\n}\n",
+ "'use strict';\n\nmodule.exports = earcut;\nmodule.exports.default = earcut;\n\nfunction earcut(data, holeIndices, dim) {\n\n dim = dim || 2;\n\n var hasHoles = holeIndices && holeIndices.length,\n outerLen = hasHoles ? holeIndices[0] * dim : data.length,\n outerNode = linkedList(data, 0, outerLen, dim, true),\n triangles = [];\n\n if (!outerNode) return triangles;\n\n var minX, minY, maxX, maxY, x, y, invSize;\n\n if (hasHoles) outerNode = eliminateHoles(data, holeIndices, outerNode, dim);\n\n // if the shape is not too simple, we'll use z-order curve hash later; calculate polygon bbox\n if (data.length > 80 * dim) {\n minX = maxX = data[0];\n minY = maxY = data[1];\n\n for (var i = dim; i < outerLen; i += dim) {\n x = data[i];\n y = data[i + 1];\n if (x < minX) minX = x;\n if (y < minY) minY = y;\n if (x > maxX) maxX = x;\n if (y > maxY) maxY = y;\n }\n\n // minX, minY and invSize are later used to transform coords into integers for z-order calculation\n invSize = Math.max(maxX - minX, maxY - minY);\n invSize = invSize !== 0 ? 1 / invSize : 0;\n }\n\n earcutLinked(outerNode, triangles, dim, minX, minY, invSize);\n\n return triangles;\n}\n\n// create a circular doubly linked list from polygon points in the specified winding order\nfunction linkedList(data, start, end, dim, clockwise) {\n var i, last;\n\n if (clockwise === (signedArea(data, start, end, dim) > 0)) {\n for (i = start; i < end; i += dim) last = insertNode(i, data[i], data[i + 1], last);\n } else {\n for (i = end - dim; i >= start; i -= dim) last = insertNode(i, data[i], data[i + 1], last);\n }\n\n if (last && equals(last, last.next)) {\n removeNode(last);\n last = last.next;\n }\n\n return last;\n}\n\n// eliminate colinear or duplicate points\nfunction filterPoints(start, end) {\n if (!start) return start;\n if (!end) end = start;\n\n var p = start,\n again;\n do {\n again = false;\n\n if (!p.steiner && (equals(p, p.next) || area(p.prev, p, p.next) === 0)) {\n removeNode(p);\n p = end = p.prev;\n if (p === p.next) break;\n again = true;\n\n } else {\n p = p.next;\n }\n } while (again || p !== end);\n\n return end;\n}\n\n// main ear slicing loop which triangulates a polygon (given as a linked list)\nfunction earcutLinked(ear, triangles, dim, minX, minY, invSize, pass) {\n if (!ear) return;\n\n // interlink polygon nodes in z-order\n if (!pass && invSize) indexCurve(ear, minX, minY, invSize);\n\n var stop = ear,\n prev, next;\n\n // iterate through ears, slicing them one by one\n while (ear.prev !== ear.next) {\n prev = ear.prev;\n next = ear.next;\n\n if (invSize ? isEarHashed(ear, minX, minY, invSize) : isEar(ear)) {\n // cut off the triangle\n triangles.push(prev.i / dim);\n triangles.push(ear.i / dim);\n triangles.push(next.i / dim);\n\n removeNode(ear);\n\n // skipping the next vertice leads to less sliver triangles\n ear = next.next;\n stop = next.next;\n\n continue;\n }\n\n ear = next;\n\n // if we looped through the whole remaining polygon and can't find any more ears\n if (ear === stop) {\n // try filtering points and slicing again\n if (!pass) {\n earcutLinked(filterPoints(ear), triangles, dim, minX, minY, invSize, 1);\n\n // if this didn't work, try curing all small self-intersections locally\n } else if (pass === 1) {\n ear = cureLocalIntersections(ear, triangles, dim);\n earcutLinked(ear, triangles, dim, minX, minY, invSize, 2);\n\n // as a last resort, try splitting the remaining polygon into two\n } else if (pass === 2) {\n splitEarcut(ear, triangles, dim, minX, minY, invSize);\n }\n\n break;\n }\n }\n}\n\n// check whether a polygon node forms a valid ear with adjacent nodes\nfunction isEar(ear) {\n var a = ear.prev,\n b = ear,\n c = ear.next;\n\n if (area(a, b, c) >= 0) return false; // reflex, can't be an ear\n\n // now make sure we don't have other points inside the potential ear\n var p = ear.next.next;\n\n while (p !== ear.prev) {\n if (pointInTriangle(a.x, a.y, b.x, b.y, c.x, c.y, p.x, p.y) &&\n area(p.prev, p, p.next) >= 0) return false;\n p = p.next;\n }\n\n return true;\n}\n\nfunction isEarHashed(ear, minX, minY, invSize) {\n var a = ear.prev,\n b = ear,\n c = ear.next;\n\n if (area(a, b, c) >= 0) return false; // reflex, can't be an ear\n\n // triangle bbox; min & max are calculated like this for speed\n var minTX = a.x < b.x ? (a.x < c.x ? a.x : c.x) : (b.x < c.x ? b.x : c.x),\n minTY = a.y < b.y ? (a.y < c.y ? a.y : c.y) : (b.y < c.y ? b.y : c.y),\n maxTX = a.x > b.x ? (a.x > c.x ? a.x : c.x) : (b.x > c.x ? b.x : c.x),\n maxTY = a.y > b.y ? (a.y > c.y ? a.y : c.y) : (b.y > c.y ? b.y : c.y);\n\n // z-order range for the current triangle bbox;\n var minZ = zOrder(minTX, minTY, minX, minY, invSize),\n maxZ = zOrder(maxTX, maxTY, minX, minY, invSize);\n\n var p = ear.prevZ,\n n = ear.nextZ;\n\n // look for points inside the triangle in both directions\n while (p && p.z >= minZ && n && n.z <= maxZ) {\n if (p !== ear.prev && p !== ear.next &&\n pointInTriangle(a.x, a.y, b.x, b.y, c.x, c.y, p.x, p.y) &&\n area(p.prev, p, p.next) >= 0) return false;\n p = p.prevZ;\n\n if (n !== ear.prev && n !== ear.next &&\n pointInTriangle(a.x, a.y, b.x, b.y, c.x, c.y, n.x, n.y) &&\n area(n.prev, n, n.next) >= 0) return false;\n n = n.nextZ;\n }\n\n // look for remaining points in decreasing z-order\n while (p && p.z >= minZ) {\n if (p !== ear.prev && p !== ear.next &&\n pointInTriangle(a.x, a.y, b.x, b.y, c.x, c.y, p.x, p.y) &&\n area(p.prev, p, p.next) >= 0) return false;\n p = p.prevZ;\n }\n\n // look for remaining points in increasing z-order\n while (n && n.z <= maxZ) {\n if (n !== ear.prev && n !== ear.next &&\n pointInTriangle(a.x, a.y, b.x, b.y, c.x, c.y, n.x, n.y) &&\n area(n.prev, n, n.next) >= 0) return false;\n n = n.nextZ;\n }\n\n return true;\n}\n\n// go through all polygon nodes and cure small local self-intersections\nfunction cureLocalIntersections(start, triangles, dim) {\n var p = start;\n do {\n var a = p.prev,\n b = p.next.next;\n\n if (!equals(a, b) && intersects(a, p, p.next, b) && locallyInside(a, b) && locallyInside(b, a)) {\n\n triangles.push(a.i / dim);\n triangles.push(p.i / dim);\n triangles.push(b.i / dim);\n\n // remove two nodes involved\n removeNode(p);\n removeNode(p.next);\n\n p = start = b;\n }\n p = p.next;\n } while (p !== start);\n\n return p;\n}\n\n// try splitting polygon into two and triangulate them independently\nfunction splitEarcut(start, triangles, dim, minX, minY, invSize) {\n // look for a valid diagonal that divides the polygon into two\n var a = start;\n do {\n var b = a.next.next;\n while (b !== a.prev) {\n if (a.i !== b.i && isValidDiagonal(a, b)) {\n // split the polygon in two by the diagonal\n var c = splitPolygon(a, b);\n\n // filter colinear points around the cuts\n a = filterPoints(a, a.next);\n c = filterPoints(c, c.next);\n\n // run earcut on each half\n earcutLinked(a, triangles, dim, minX, minY, invSize);\n earcutLinked(c, triangles, dim, minX, minY, invSize);\n return;\n }\n b = b.next;\n }\n a = a.next;\n } while (a !== start);\n}\n\n// link every hole into the outer loop, producing a single-ring polygon without holes\nfunction eliminateHoles(data, holeIndices, outerNode, dim) {\n var queue = [],\n i, len, start, end, list;\n\n for (i = 0, len = holeIndices.length; i < len; i++) {\n start = holeIndices[i] * dim;\n end = i < len - 1 ? holeIndices[i + 1] * dim : data.length;\n list = linkedList(data, start, end, dim, false);\n if (list === list.next) list.steiner = true;\n queue.push(getLeftmost(list));\n }\n\n queue.sort(compareX);\n\n // process holes from left to right\n for (i = 0; i < queue.length; i++) {\n eliminateHole(queue[i], outerNode);\n outerNode = filterPoints(outerNode, outerNode.next);\n }\n\n return outerNode;\n}\n\nfunction compareX(a, b) {\n return a.x - b.x;\n}\n\n// find a bridge between vertices that connects hole with an outer ring and and link it\nfunction eliminateHole(hole, outerNode) {\n outerNode = findHoleBridge(hole, outerNode);\n if (outerNode) {\n var b = splitPolygon(outerNode, hole);\n filterPoints(b, b.next);\n }\n}\n\n// David Eberly's algorithm for finding a bridge between hole and outer polygon\nfunction findHoleBridge(hole, outerNode) {\n var p = outerNode,\n hx = hole.x,\n hy = hole.y,\n qx = -Infinity,\n m;\n\n // find a segment intersected by a ray from the hole's leftmost point to the left;\n // segment's endpoint with lesser x will be potential connection point\n do {\n if (hy <= p.y && hy >= p.next.y && p.next.y !== p.y) {\n var x = p.x + (hy - p.y) * (p.next.x - p.x) / (p.next.y - p.y);\n if (x <= hx && x > qx) {\n qx = x;\n if (x === hx) {\n if (hy === p.y) return p;\n if (hy === p.next.y) return p.next;\n }\n m = p.x < p.next.x ? p : p.next;\n }\n }\n p = p.next;\n } while (p !== outerNode);\n\n if (!m) return null;\n\n if (hx === qx) return m.prev; // hole touches outer segment; pick lower endpoint\n\n // look for points inside the triangle of hole point, segment intersection and endpoint;\n // if there are no points found, we have a valid connection;\n // otherwise choose the point of the minimum angle with the ray as connection point\n\n var stop = m,\n mx = m.x,\n my = m.y,\n tanMin = Infinity,\n tan;\n\n p = m.next;\n\n while (p !== stop) {\n if (hx >= p.x && p.x >= mx && hx !== p.x &&\n pointInTriangle(hy < my ? hx : qx, hy, mx, my, hy < my ? qx : hx, hy, p.x, p.y)) {\n\n tan = Math.abs(hy - p.y) / (hx - p.x); // tangential\n\n if ((tan < tanMin || (tan === tanMin && p.x > m.x)) && locallyInside(p, hole)) {\n m = p;\n tanMin = tan;\n }\n }\n\n p = p.next;\n }\n\n return m;\n}\n\n// interlink polygon nodes in z-order\nfunction indexCurve(start, minX, minY, invSize) {\n var p = start;\n do {\n if (p.z === null) p.z = zOrder(p.x, p.y, minX, minY, invSize);\n p.prevZ = p.prev;\n p.nextZ = p.next;\n p = p.next;\n } while (p !== start);\n\n p.prevZ.nextZ = null;\n p.prevZ = null;\n\n sortLinked(p);\n}\n\n// Simon Tatham's linked list merge sort algorithm\n// http://www.chiark.greenend.org.uk/~sgtatham/algorithms/listsort.html\nfunction sortLinked(list) {\n var i, p, q, e, tail, numMerges, pSize, qSize,\n inSize = 1;\n\n do {\n p = list;\n list = null;\n tail = null;\n numMerges = 0;\n\n while (p) {\n numMerges++;\n q = p;\n pSize = 0;\n for (i = 0; i < inSize; i++) {\n pSize++;\n q = q.nextZ;\n if (!q) break;\n }\n qSize = inSize;\n\n while (pSize > 0 || (qSize > 0 && q)) {\n\n if (pSize !== 0 && (qSize === 0 || !q || p.z <= q.z)) {\n e = p;\n p = p.nextZ;\n pSize--;\n } else {\n e = q;\n q = q.nextZ;\n qSize--;\n }\n\n if (tail) tail.nextZ = e;\n else list = e;\n\n e.prevZ = tail;\n tail = e;\n }\n\n p = q;\n }\n\n tail.nextZ = null;\n inSize *= 2;\n\n } while (numMerges > 1);\n\n return list;\n}\n\n// z-order of a point given coords and inverse of the longer side of data bbox\nfunction zOrder(x, y, minX, minY, invSize) {\n // coords are transformed into non-negative 15-bit integer range\n x = 32767 * (x - minX) * invSize;\n y = 32767 * (y - minY) * invSize;\n\n x = (x | (x << 8)) & 0x00FF00FF;\n x = (x | (x << 4)) & 0x0F0F0F0F;\n x = (x | (x << 2)) & 0x33333333;\n x = (x | (x << 1)) & 0x55555555;\n\n y = (y | (y << 8)) & 0x00FF00FF;\n y = (y | (y << 4)) & 0x0F0F0F0F;\n y = (y | (y << 2)) & 0x33333333;\n y = (y | (y << 1)) & 0x55555555;\n\n return x | (y << 1);\n}\n\n// find the leftmost node of a polygon ring\nfunction getLeftmost(start) {\n var p = start,\n leftmost = start;\n do {\n if (p.x < leftmost.x) leftmost = p;\n p = p.next;\n } while (p !== start);\n\n return leftmost;\n}\n\n// check if a point lies within a convex triangle\nfunction pointInTriangle(ax, ay, bx, by, cx, cy, px, py) {\n return (cx - px) * (ay - py) - (ax - px) * (cy - py) >= 0 &&\n (ax - px) * (by - py) - (bx - px) * (ay - py) >= 0 &&\n (bx - px) * (cy - py) - (cx - px) * (by - py) >= 0;\n}\n\n// check if a diagonal between two polygon nodes is valid (lies in polygon interior)\nfunction isValidDiagonal(a, b) {\n return a.next.i !== b.i && a.prev.i !== b.i && !intersectsPolygon(a, b) &&\n locallyInside(a, b) && locallyInside(b, a) && middleInside(a, b);\n}\n\n// signed area of a triangle\nfunction area(p, q, r) {\n return (q.y - p.y) * (r.x - q.x) - (q.x - p.x) * (r.y - q.y);\n}\n\n// check if two points are equal\nfunction equals(p1, p2) {\n return p1.x === p2.x && p1.y === p2.y;\n}\n\n// check if two segments intersect\nfunction intersects(p1, q1, p2, q2) {\n if ((equals(p1, q1) && equals(p2, q2)) ||\n (equals(p1, q2) && equals(p2, q1))) return true;\n return area(p1, q1, p2) > 0 !== area(p1, q1, q2) > 0 &&\n area(p2, q2, p1) > 0 !== area(p2, q2, q1) > 0;\n}\n\n// check if a polygon diagonal intersects any polygon segments\nfunction intersectsPolygon(a, b) {\n var p = a;\n do {\n if (p.i !== a.i && p.next.i !== a.i && p.i !== b.i && p.next.i !== b.i &&\n intersects(p, p.next, a, b)) return true;\n p = p.next;\n } while (p !== a);\n\n return false;\n}\n\n// check if a polygon diagonal is locally inside the polygon\nfunction locallyInside(a, b) {\n return area(a.prev, a, a.next) < 0 ?\n area(a, b, a.next) >= 0 && area(a, a.prev, b) >= 0 :\n area(a, b, a.prev) < 0 || area(a, a.next, b) < 0;\n}\n\n// check if the middle point of a polygon diagonal is inside the polygon\nfunction middleInside(a, b) {\n var p = a,\n inside = false,\n px = (a.x + b.x) / 2,\n py = (a.y + b.y) / 2;\n do {\n if (((p.y > py) !== (p.next.y > py)) && p.next.y !== p.y &&\n (px < (p.next.x - p.x) * (py - p.y) / (p.next.y - p.y) + p.x))\n inside = !inside;\n p = p.next;\n } while (p !== a);\n\n return inside;\n}\n\n// link two polygon vertices with a bridge; if the vertices belong to the same ring, it splits polygon into two;\n// if one belongs to the outer ring and another to a hole, it merges it into a single ring\nfunction splitPolygon(a, b) {\n var a2 = new Node(a.i, a.x, a.y),\n b2 = new Node(b.i, b.x, b.y),\n an = a.next,\n bp = b.prev;\n\n a.next = b;\n b.prev = a;\n\n a2.next = an;\n an.prev = a2;\n\n b2.next = a2;\n a2.prev = b2;\n\n bp.next = b2;\n b2.prev = bp;\n\n return b2;\n}\n\n// create a node and optionally link it with previous one (in a circular doubly linked list)\nfunction insertNode(i, x, y, last) {\n var p = new Node(i, x, y);\n\n if (!last) {\n p.prev = p;\n p.next = p;\n\n } else {\n p.next = last.next;\n p.prev = last;\n last.next.prev = p;\n last.next = p;\n }\n return p;\n}\n\nfunction removeNode(p) {\n p.next.prev = p.prev;\n p.prev.next = p.next;\n\n if (p.prevZ) p.prevZ.nextZ = p.nextZ;\n if (p.nextZ) p.nextZ.prevZ = p.prevZ;\n}\n\nfunction Node(i, x, y) {\n // vertice index in coordinates array\n this.i = i;\n\n // vertex coordinates\n this.x = x;\n this.y = y;\n\n // previous and next vertice nodes in a polygon ring\n this.prev = null;\n this.next = null;\n\n // z-order curve value\n this.z = null;\n\n // previous and next nodes in z-order\n this.prevZ = null;\n this.nextZ = null;\n\n // indicates whether this is a steiner point\n this.steiner = false;\n}\n\n// return a percentage difference between the polygon area and its triangulation area;\n// used to verify correctness of triangulation\nearcut.deviation = function (data, holeIndices, dim, triangles) {\n var hasHoles = holeIndices && holeIndices.length;\n var outerLen = hasHoles ? holeIndices[0] * dim : data.length;\n\n var polygonArea = Math.abs(signedArea(data, 0, outerLen, dim));\n if (hasHoles) {\n for (var i = 0, len = holeIndices.length; i < len; i++) {\n var start = holeIndices[i] * dim;\n var end = i < len - 1 ? holeIndices[i + 1] * dim : data.length;\n polygonArea -= Math.abs(signedArea(data, start, end, dim));\n }\n }\n\n var trianglesArea = 0;\n for (i = 0; i < triangles.length; i += 3) {\n var a = triangles[i] * dim;\n var b = triangles[i + 1] * dim;\n var c = triangles[i + 2] * dim;\n trianglesArea += Math.abs(\n (data[a] - data[c]) * (data[b + 1] - data[a + 1]) -\n (data[a] - data[b]) * (data[c + 1] - data[a + 1]));\n }\n\n return polygonArea === 0 && trianglesArea === 0 ? 0 :\n Math.abs((trianglesArea - polygonArea) / polygonArea);\n};\n\nfunction signedArea(data, start, end, dim) {\n var sum = 0;\n for (var i = start, j = end - dim; i < end; i += dim) {\n sum += (data[j] - data[i]) * (data[i + 1] + data[j + 1]);\n j = i;\n }\n return sum;\n}\n\n// turn a polygon in a multi-dimensional array form (e.g. as in GeoJSON) into a form Earcut accepts\nearcut.flatten = function (data) {\n var dim = data[0][0].length,\n result = {vertices: [], holes: [], dimensions: dim},\n holeIndex = 0;\n\n for (var i = 0; i < data.length; i++) {\n for (var j = 0; j < data[i].length; j++) {\n for (var d = 0; d < dim; d++) result.vertices.push(data[i][j][d]);\n }\n if (i > 0) {\n holeIndex += data[i - 1].length;\n result.holes.push(holeIndex);\n }\n }\n return result;\n};\n",
"'use strict';\n\nvar OneVersionConstraint = require('individual/one-version');\n\nvar MY_VERSION = '7';\nOneVersionConstraint('ev-store', MY_VERSION);\n\nvar hashKey = '__EV_STORE_KEY@' + MY_VERSION;\n\nmodule.exports = EvStore;\n\nfunction EvStore(elem) {\n var hash = elem[hashKey];\n\n if (!hash) {\n hash = elem[hashKey] = {};\n }\n\n return hash;\n}\n",
"'use strict';\nvar request = require('./request');\nvar buildQueryObject = require('./buildQueryObject');\nvar isArray = Array.isArray;\n\nfunction simpleExtend(obj, obj2) {\n var prop;\n for (prop in obj2) {\n obj[prop] = obj2[prop];\n }\n return obj;\n}\n\nfunction XMLHttpSource(jsongUrl, config) {\n this._jsongUrl = jsongUrl;\n if (typeof config === 'number') {\n var newConfig = {\n timeout: config\n };\n config = newConfig;\n }\n this._config = simpleExtend({\n timeout: 15000,\n headers: {}\n }, config || {});\n}\n\nXMLHttpSource.prototype = {\n // because javascript\n constructor: XMLHttpSource,\n /**\n * buildQueryObject helper\n */\n buildQueryObject: buildQueryObject,\n\n /**\n * @inheritDoc DataSource#get\n */\n get: function httpSourceGet(pathSet) {\n var method = 'GET';\n var queryObject = this.buildQueryObject(this._jsongUrl, method, {\n paths: pathSet,\n method: 'get'\n });\n var config = simpleExtend(queryObject, this._config);\n // pass context for onBeforeRequest callback\n var context = this;\n return request(method, config, context);\n },\n\n /**\n * @inheritDoc DataSource#set\n */\n set: function httpSourceSet(jsongEnv) {\n var method = 'POST';\n var queryObject = this.buildQueryObject(this._jsongUrl, method, {\n jsonGraph: jsongEnv,\n method: 'set'\n });\n var config = simpleExtend(queryObject, this._config);\n config.headers[\"Content-Type\"] = \"application/x-www-form-urlencoded\";\n \n // pass context for onBeforeRequest callback\n var context = this;\n return request(method, config, context);\n\n },\n\n /**\n * @inheritDoc DataSource#call\n */\n call: function httpSourceCall(callPath, args, pathSuffix, paths) {\n // arguments defaults\n args = args || [];\n pathSuffix = pathSuffix || [];\n paths = paths || [];\n\n var method = 'POST';\n var queryData = [];\n queryData.push('method=call');\n queryData.push('callPath=' + encodeURIComponent(JSON.stringify(callPath)));\n queryData.push('arguments=' + encodeURIComponent(JSON.stringify(args)));\n queryData.push('pathSuffixes=' + encodeURIComponent(JSON.stringify(pathSuffix)));\n queryData.push('paths=' + encodeURIComponent(JSON.stringify(paths)));\n\n var queryObject = this.buildQueryObject(this._jsongUrl, method, queryData.join('&'));\n var config = simpleExtend(queryObject, this._config);\n config.headers[\"Content-Type\"] = \"application/x-www-form-urlencoded\";\n \n // pass context for onBeforeRequest callback\n var context = this;\n return request(method, config, context);\n }\n};\n// ES6 modules\nXMLHttpSource.XMLHttpSource = XMLHttpSource;\nXMLHttpSource['default'] = XMLHttpSource;\n// commonjs\nmodule.exports = XMLHttpSource;\n",
"'use strict';\nmodule.exports = function buildQueryObject(url, method, queryData) {\n var qData = [];\n var keys;\n var data = {url: url};\n var isQueryParamUrl = url.indexOf('?') !== -1;\n var startUrl = (isQueryParamUrl) ? '&' : '?';\n\n if (typeof queryData === 'string') {\n qData.push(queryData);\n } else {\n\n keys = Object.keys(queryData);\n keys.forEach(function (k) {\n var value = (typeof queryData[k] === 'object') ? JSON.stringify(queryData[k]) : queryData[k];\n qData.push(k + '=' + encodeURIComponent(value));\n });\n }\n\n if (method === 'GET') {\n data.url += startUrl + qData.join('&');\n } else {\n data.data = qData.join('&');\n }\n\n return data;\n};\n",
"'use strict';\n\nvar Individual = require('./index.js');\n\nmodule.exports = OneVersion;\n\nfunction OneVersion(moduleName, version, defaultValue) {\n var key = '__INDIVIDUAL_ONE_VERSION_' + moduleName;\n var enforceKey = key + '_ENFORCE_SINGLETON';\n\n var versionValue = Individual(enforceKey, version);\n\n if (versionValue !== version) {\n throw new Error('Can only have one copy of ' +\n moduleName + '.\\n' +\n 'You already have version ' + versionValue +\n ' installed.\\n' +\n 'This means you cannot install version ' + version);\n }\n\n return Individual(key, defaultValue);\n}\n",
"\"use strict\";\n\nmodule.exports = function isObject(x) {\n\treturn typeof x === \"object\" && x !== null;\n};\n",
"/* - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - */\n/* Geohash encoding/decoding and associated functions (c) Chris Veness 2014-2016 / MIT Licence */\n/* - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - */\n\n'use strict';\n\n\n/**\n * Geohash encode, decode, bounds, neighbours.\n *\n * @namespace\n */\nvar Geohash = {};\n\n/* (Geohash-specific) Base32 map */\nGeohash.base32 = '0123456789bcdefghjkmnpqrstuvwxyz';\n\n/**\n * Encodes latitude/longitude to geohash, either to specified precision or to automatically\n * evaluated precision.\n *\n * @param {number} lat - Latitude in degrees.\n * @param {number} lon - Longitude in degrees.\n * @param {number} [precision] - Number of characters in resulting geohash.\n * @returns {string} Geohash of supplied latitude/longitude.\n * @throws Invalid geohash.\n *\n * @example\n * var geohash = Geohash.encode(52.205, 0.119, 7); // geohash: 'u120fxw'\n */\nGeohash.encode = function(lat, lon, precision) {\n // infer precision?\n if (typeof precision == 'undefined') {\n // refine geohash until it matches precision of supplied lat/lon\n for (var p=1; p<=12; p++) {\n var hash = Geohash.encode(lat, lon, p);\n var posn = Geohash.decode(hash);\n if (posn.lat==lat && posn.lon==lon) return hash;\n }\n precision = 12; // set to maximum\n }\n\n lat = Number(lat);\n lon = Number(lon);\n precision = Number(precision);\n\n if (isNaN(lat) || isNaN(lon) || isNaN(precision)) throw new Error('Invalid geohash');\n\n var idx = 0; // index into base32 map\n var bit = 0; // each char holds 5 bits\n var evenBit = true;\n var geohash = '';\n\n var latMin = -90, latMax = 90;\n var lonMin = -180, lonMax = 180;\n\n while (geohash.length < precision) {\n if (evenBit) {\n // bisect E-W longitude\n var lonMid = (lonMin + lonMax) / 2;\n if (lon >= lonMid) {\n idx = idx*2 + 1;\n lonMin = lonMid;\n } else {\n idx = idx*2;\n lonMax = lonMid;\n }\n } else {\n // bisect N-S latitude\n var latMid = (latMin + latMax) / 2;\n if (lat >= latMid) {\n idx = idx*2 + 1;\n latMin = latMid;\n } else {\n idx = idx*2;\n latMax = latMid;\n }\n }\n evenBit = !evenBit;\n\n if (++bit == 5) {\n // 5 bits gives us a character: append it and start over\n geohash += Geohash.base32.charAt(idx);\n bit = 0;\n idx = 0;\n }\n }\n\n return geohash;\n};\n\n\n/**\n * Decode geohash to latitude/longitude (location is approximate centre of geohash cell,\n * to reasonable precision).\n *\n * @param {string} geohash - Geohash string to be converted to latitude/longitude.\n * @returns {{lat:number, lon:number}} (Center of) geohashed location.\n * @throws Invalid geohash.\n *\n * @example\n * var latlon = Geohash.decode('u120fxw'); // latlon: { lat: 52.205, lon: 0.1188 }\n */\nGeohash.decode = function(geohash) {\n\n var bounds = Geohash.bounds(geohash); // <-- the hard work\n // now just determine the centre of the cell...\n\n var latMin = bounds.sw.lat, lonMin = bounds.sw.lon;\n var latMax = bounds.ne.lat, lonMax = bounds.ne.lon;\n\n // cell centre\n var lat = (latMin + latMax)/2;\n var lon = (lonMin + lonMax)/2;\n\n // round to close to centre without excessive precision: ⌊2-log10(Δ°)⌋ decimal places\n lat = lat.toFixed(Math.floor(2-Math.log(latMax-latMin)/Math.LN10));\n lon = lon.toFixed(Math.floor(2-Math.log(lonMax-lonMin)/Math.LN10));\n\n return { lat: Number(lat), lon: Number(lon) };\n};\n\n\n/**\n * Returns SW/NE latitude/longitude bounds of specified geohash.\n *\n * @param {string} geohash - Cell that bounds are required of.\n * @returns {{sw: {lat: number, lon: number}, ne: {lat: number, lon: number}}}\n * @throws Invalid geohash.\n */\nGeohash.bounds = function(geohash) {\n if (geohash.length === 0) throw new Error('Invalid geohash');\n\n geohash = geohash.toLowerCase();\n\n var evenBit = true;\n var latMin = -90, latMax = 90;\n var lonMin = -180, lonMax = 180;\n\n for (var i=0; i<geohash.length; i++) {\n var chr = geohash.charAt(i);\n var idx = Geohash.base32.indexOf(chr);\n if (idx == -1) throw new Error('Invalid geohash');\n\n for (var n=4; n>=0; n--) {\n var bitN = idx >> n & 1;\n if (evenBit) {\n // longitude\n var lonMid = (lonMin+lonMax) / 2;\n if (bitN == 1) {\n lonMin = lonMid;\n } else {\n lonMax = lonMid;\n }\n } else {\n // latitude\n var latMid = (latMin+latMax) / 2;\n if (bitN == 1) {\n latMin = latMid;\n } else {\n latMax = latMid;\n }\n }\n evenBit = !evenBit;\n }\n }\n\n var bounds = {\n sw: { lat: latMin, lon: lonMin },\n ne: { lat: latMax, lon: lonMax },\n };\n\n return bounds;\n};\n\n\n/**\n * Determines adjacent cell in given direction.\n *\n * @param geohash - Cell to which adjacent cell is required.\n * @param direction - Direction from geohash (N/S/E/W).\n * @returns {string} Geocode of adjacent cell.\n * @throws Invalid geohash.\n */\nGeohash.adjacent = function(geohash, direction) {\n // based on github.com/davetroy/geohash-js\n\n geohash = geohash.toLowerCase();\n direction = direction.toLowerCase();\n\n if (geohash.length === 0) throw new Error('Invalid geohash');\n if ('nsew'.indexOf(direction) == -1) throw new Error('Invalid direction');\n\n var neighbour = {\n n: [ 'p0r21436x8zb9dcf5h7kjnmqesgutwvy', 'bc01fg45238967deuvhjyznpkmstqrwx' ],\n s: [ '14365h7k9dcfesgujnmqp0r2twvyx8zb', '238967debc01fg45kmstqrwxuvhjyznp' ],\n e: [ 'bc01fg45238967deuvhjyznpkmstqrwx', 'p0r21436x8zb9dcf5h7kjnmqesgutwvy' ],\n w: [ '238967debc01fg45kmstqrwxuvhjyznp', '14365h7k9dcfesgujnmqp0r2twvyx8zb' ],\n };\n var border = {\n n: [ 'prxz', 'bcfguvyz' ],\n s: [ '028b', '0145hjnp' ],\n e: [ 'bcfguvyz', 'prxz' ],\n w: [ '0145hjnp', '028b' ],\n };\n\n var lastCh = geohash.slice(-1); // last character of hash\n var parent = geohash.slice(0, -1); // hash without last character\n\n var type = geohash.length % 2;\n\n // check for edge-cases which don't share common prefix\n if (border[direction][type].indexOf(lastCh) != -1 && parent !== '') {\n parent = Geohash.adjacent(parent, direction);\n }\n\n // append letter for direction to parent\n return parent + Geohash.base32.charAt(neighbour[direction][type].indexOf(lastCh));\n};\n\n\n/**\n * Returns all 8 adjacent cells to specified geohash.\n *\n * @param {string} geohash - Geohash neighbours are required of.\n * @returns {{n,ne,e,se,s,sw,w,nw: string}}\n * @throws Invalid geohash.\n */\nGeohash.neighbours = function(geohash) {\n return {\n 'n': Geohash.adjacent(geohash, 'n'),\n 'ne': Geohash.adjacent(Geohash.adjacent(geohash, 'n'), 'e'),\n 'e': Geohash.adjacent(geohash, 'e'),\n 'se': Geohash.adjacent(Geohash.adjacent(geohash, 's'), 'e'),\n 's': Geohash.adjacent(geohash, 's'),\n 'sw': Geohash.adjacent(Geohash.adjacent(geohash, 's'), 'w'),\n 'w': Geohash.adjacent(geohash, 'w'),\n 'nw': Geohash.adjacent(Geohash.adjacent(geohash, 'n'), 'w'),\n };\n};\n\n\n/* - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - */\nif (typeof module != 'undefined' && module.exports) module.exports = Geohash; // CommonJS, node.js\n",
+ "/**\n * martinez v0.5.0\n * Martinez polygon clipping algorithm, does boolean operation on polygons (multipolygons, polygons with holes etc): intersection, union, difference, xor\n *\n * @author Alex Milevski <info@w8r.name>\n * @license MIT\n * @preserve\n */\n\n(function (global, factory) {\n typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports) :\n typeof define === 'function' && define.amd ? define(['exports'], factory) :\n (factory((global.martinez = {})));\n}(this, (function (exports) { 'use strict';\n\n function DEFAULT_COMPARE (a, b) { return a > b ? 1 : a < b ? -1 : 0; }\n\n var SplayTree = function SplayTree(compare, noDuplicates) {\n if ( compare === void 0 ) compare = DEFAULT_COMPARE;\n if ( noDuplicates === void 0 ) noDuplicates = false;\n\n this._compare = compare;\n this._root = null;\n this._size = 0;\n this._noDuplicates = !!noDuplicates;\n };\n\n var prototypeAccessors = { size: { configurable: true } };\n\n\n SplayTree.prototype.rotateLeft = function rotateLeft (x) {\n var y = x.right;\n if (y) {\n x.right = y.left;\n if (y.left) { y.left.parent = x; }\n y.parent = x.parent;\n }\n\n if (!x.parent) { this._root = y; }\n else if (x === x.parent.left) { x.parent.left = y; }\n else { x.parent.right = y; }\n if (y) { y.left = x; }\n x.parent = y;\n };\n\n\n SplayTree.prototype.rotateRight = function rotateRight (x) {\n var y = x.left;\n if (y) {\n x.left = y.right;\n if (y.right) { y.right.parent = x; }\n y.parent = x.parent;\n }\n\n if (!x.parent) { this._root = y; }\n else if(x === x.parent.left) { x.parent.left = y; }\n else { x.parent.right = y; }\n if (y) { y.right = x; }\n x.parent = y;\n };\n\n\n SplayTree.prototype._splay = function _splay (x) {\n var this$1 = this;\n\n while (x.parent) {\n var p = x.parent;\n if (!p.parent) {\n if (p.left === x) { this$1.rotateRight(p); }\n else { this$1.rotateLeft(p); }\n } else if (p.left === x && p.parent.left === p) {\n this$1.rotateRight(p.parent);\n this$1.rotateRight(p);\n } else if (p.right === x && p.parent.right === p) {\n this$1.rotateLeft(p.parent);\n this$1.rotateLeft(p);\n } else if (p.left === x && p.parent.right === p) {\n this$1.rotateRight(p);\n this$1.rotateLeft(p);\n } else {\n this$1.rotateLeft(p);\n this$1.rotateRight(p);\n }\n }\n };\n\n\n SplayTree.prototype.splay = function splay (x) {\n var this$1 = this;\n\n var p, gp, ggp, l, r;\n\n while (x.parent) {\n p = x.parent;\n gp = p.parent;\n\n if (gp && gp.parent) {\n ggp = gp.parent;\n if (ggp.left === gp) { ggp.left= x; }\n else { ggp.right = x; }\n x.parent = ggp;\n } else {\n x.parent = null;\n this$1._root = x;\n }\n\n l = x.left; r = x.right;\n\n if (x === p.left) { // left\n if (gp) {\n if (gp.left === p) {\n /* zig-zig */\n if (p.right) {\n gp.left = p.right;\n gp.left.parent = gp;\n } else { gp.left = null; }\n\n p.right = gp;\n gp.parent = p;\n } else {\n /* zig-zag */\n if (l) {\n gp.right = l;\n l.parent = gp;\n } else { gp.right = null; }\n\n x.left = gp;\n gp.parent = x;\n }\n }\n if (r) {\n p.left = r;\n r.parent = p;\n } else { p.left = null; }\n\n x.right= p;\n p.parent = x;\n } else { // right\n if (gp) {\n if (gp.right === p) {\n /* zig-zig */\n if (p.left) {\n gp.right = p.left;\n gp.right.parent = gp;\n } else { gp.right = null; }\n\n p.left = gp;\n gp.parent = p;\n } else {\n /* zig-zag */\n if (r) {\n gp.left = r;\n r.parent = gp;\n } else { gp.left = null; }\n\n x.right = gp;\n gp.parent = x;\n }\n }\n if (l) {\n p.right = l;\n l.parent = p;\n } else { p.right = null; }\n\n x.left = p;\n p.parent = x;\n }\n }\n };\n\n\n SplayTree.prototype.replace = function replace (u, v) {\n if (!u.parent) { this._root = v; }\n else if (u === u.parent.left) { u.parent.left = v; }\n else { u.parent.right = v; }\n if (v) { v.parent = u.parent; }\n };\n\n\n SplayTree.prototype.minNode = function minNode (u) {\n if ( u === void 0 ) u = this._root;\n\n if (u) { while (u.left) { u = u.left; } }\n return u;\n };\n\n\n SplayTree.prototype.maxNode = function maxNode (u) {\n if ( u === void 0 ) u = this._root;\n\n if (u) { while (u.right) { u = u.right; } }\n return u;\n };\n\n\n SplayTree.prototype.insert = function insert (key, data) {\n var z = this._root;\n var p = null;\n var comp = this._compare;\n var cmp;\n\n if (this._noDuplicates) {\n while (z) {\n p = z;\n cmp = comp(z.key, key);\n if (cmp === 0) { return; }\n else if (comp(z.key, key) < 0) { z = z.right; }\n else { z = z.left; }\n }\n } else {\n while (z) {\n p = z;\n if (comp(z.key, key) < 0) { z = z.right; }\n else { z = z.left; }\n }\n }\n\n z = { key: key, data: data, left: null, right: null, parent: p };\n\n if (!p) { this._root = z; }\n else if (comp(p.key, z.key) < 0) { p.right = z; }\n else { p.left= z; }\n\n this.splay(z);\n this._size++;\n return z;\n };\n\n\n SplayTree.prototype.find = function find (key) {\n var z = this._root;\n var comp = this._compare;\n while (z) {\n var cmp = comp(z.key, key);\n if (cmp < 0) { z = z.right; }\n else if (cmp > 0) { z = z.left; }\n else { return z; }\n }\n return null;\n };\n\n /**\n * Whether the tree contains a node with the given key\n * @param{Key} key\n * @return {boolean} true/false\n */\n SplayTree.prototype.contains = function contains (key) {\n var node = this._root;\n var comparator = this._compare;\n while (node){\n var cmp = comparator(key, node.key);\n if (cmp === 0) { return true; }\n else if (cmp < 0) { node = node.left; }\n else { node = node.right; }\n }\n\n return false;\n };\n\n\n SplayTree.prototype.remove = function remove (key) {\n var z = this.find(key);\n\n if (!z) { return false; }\n\n this.splay(z);\n\n if (!z.left) { this.replace(z, z.right); }\n else if (!z.right) { this.replace(z, z.left); }\n else {\n var y = this.minNode(z.right);\n if (y.parent !== z) {\n this.replace(y, y.right);\n y.right = z.right;\n y.right.parent = y;\n }\n this.replace(z, y);\n y.left = z.left;\n y.left.parent = y;\n }\n\n this._size--;\n return true;\n };\n\n\n SplayTree.prototype.removeNode = function removeNode (z) {\n if (!z) { return false; }\n\n this.splay(z);\n\n if (!z.left) { this.replace(z, z.right); }\n else if (!z.right) { this.replace(z, z.left); }\n else {\n var y = this.minNode(z.right);\n if (y.parent !== z) {\n this.replace(y, y.right);\n y.right = z.right;\n y.right.parent = y;\n }\n this.replace(z, y);\n y.left = z.left;\n y.left.parent = y;\n }\n\n this._size--;\n return true;\n };\n\n\n SplayTree.prototype.erase = function erase (key) {\n var z = this.find(key);\n if (!z) { return; }\n\n this.splay(z);\n\n var s = z.left;\n var t = z.right;\n\n var sMax = null;\n if (s) {\n s.parent = null;\n sMax = this.maxNode(s);\n this.splay(sMax);\n this._root = sMax;\n }\n if (t) {\n if (s) { sMax.right = t; }\n else { this._root = t; }\n t.parent = sMax;\n }\n\n this._size--;\n };\n\n /**\n * Removes and returns the node with smallest key\n * @return {?Node}\n */\n SplayTree.prototype.pop = function pop () {\n var node = this._root, returnValue = null;\n if (node) {\n while (node.left) { node = node.left; }\n returnValue = { key: node.key, data: node.data };\n this.remove(node.key);\n }\n return returnValue;\n };\n\n\n /* eslint-disable class-methods-use-this */\n\n /**\n * Successor node\n * @param{Node} node\n * @return {?Node}\n */\n SplayTree.prototype.next = function next (node) {\n var successor = node;\n if (successor) {\n if (successor.right) {\n successor = successor.right;\n while (successor && successor.left) { successor = successor.left; }\n } else {\n successor = node.parent;\n while (successor && successor.right === node) {\n node = successor; successor = successor.parent;\n }\n }\n }\n return successor;\n };\n\n\n /**\n * Predecessor node\n * @param{Node} node\n * @return {?Node}\n */\n SplayTree.prototype.prev = function prev (node) {\n var predecessor = node;\n if (predecessor) {\n if (predecessor.left) {\n predecessor = predecessor.left;\n while (predecessor && predecessor.right) { predecessor = predecessor.right; }\n } else {\n predecessor = node.parent;\n while (predecessor && predecessor.left === node) {\n node = predecessor;\n predecessor = predecessor.parent;\n }\n }\n }\n return predecessor;\n };\n /* eslint-enable class-methods-use-this */\n\n\n /**\n * @param{forEachCallback} callback\n * @return {SplayTree}\n */\n SplayTree.prototype.forEach = function forEach (callback) {\n var current = this._root;\n var s = [], done = false, i = 0;\n\n while (!done) {\n // Reach the left most Node of the current Node\n if (current) {\n // Place pointer to a tree node on the stack\n // before traversing the node's left subtree\n s.push(current);\n current = current.left;\n } else {\n // BackTrack from the empty subtree and visit the Node\n // at the top of the stack; however, if the stack is\n // empty you are done\n if (s.length > 0) {\n current = s.pop();\n callback(current, i++);\n\n // We have visited the node and its left\n // subtree. Now, it's right subtree's turn\n current = current.right;\n } else { done = true; }\n }\n }\n return this;\n };\n\n\n /**\n * Walk key range from `low` to `high`. Stops if `fn` returns a value.\n * @param{Key} low\n * @param{Key} high\n * @param{Function} fn\n * @param{*?} ctx\n * @return {SplayTree}\n */\n SplayTree.prototype.range = function range (low, high, fn, ctx) {\n var this$1 = this;\n\n var Q = [];\n var compare = this._compare;\n var node = this._root, cmp;\n\n while (Q.length !== 0 || node) {\n if (node) {\n Q.push(node);\n node = node.left;\n } else {\n node = Q.pop();\n cmp = compare(node.key, high);\n if (cmp > 0) {\n break;\n } else if (compare(node.key, low) >= 0) {\n if (fn.call(ctx, node)) { return this$1; } // stop if smth is returned\n }\n node = node.right;\n }\n }\n return this;\n };\n\n /**\n * Returns all keys in order\n * @return {Array<Key>}\n */\n SplayTree.prototype.keys = function keys () {\n var current = this._root;\n var s = [], r = [], done = false;\n\n while (!done) {\n if (current) {\n s.push(current);\n current = current.left;\n } else {\n if (s.length > 0) {\n current = s.pop();\n r.push(current.key);\n current = current.right;\n } else { done = true; }\n }\n }\n return r;\n };\n\n\n /**\n * Returns `data` fields of all nodes in order.\n * @return {Array<Value>}\n */\n SplayTree.prototype.values = function values () {\n var current = this._root;\n var s = [], r = [], done = false;\n\n while (!done) {\n if (current) {\n s.push(current);\n current = current.left;\n } else {\n if (s.length > 0) {\n current = s.pop();\n r.push(current.data);\n current = current.right;\n } else { done = true; }\n }\n }\n return r;\n };\n\n\n /**\n * Returns node at given index\n * @param{number} index\n * @return {?Node}\n */\n SplayTree.prototype.at = function at (index) {\n // removed after a consideration, more misleading than useful\n // index = index % this.size;\n // if (index < 0) index = this.size - index;\n\n var current = this._root;\n var s = [], done = false, i = 0;\n\n while (!done) {\n if (current) {\n s.push(current);\n current = current.left;\n } else {\n if (s.length > 0) {\n current = s.pop();\n if (i === index) { return current; }\n i++;\n current = current.right;\n } else { done = true; }\n }\n }\n return null;\n };\n\n /**\n * Bulk-load items. Both array have to be same size\n * @param{Array<Key>} keys\n * @param{Array<Value>}[values]\n * @param{Boolean} [presort=false] Pre-sort keys and values, using\n * tree's comparator. Sorting is done\n * in-place\n * @return {AVLTree}\n */\n SplayTree.prototype.load = function load (keys, values, presort) {\n if ( keys === void 0 ) keys = [];\n if ( values === void 0 ) values = [];\n if ( presort === void 0 ) presort = false;\n\n if (this._size !== 0) { throw new Error('bulk-load: tree is not empty'); }\n var size = keys.length;\n if (presort) { sort(keys, values, 0, size - 1, this._compare); }\n this._root = loadRecursive(null, keys, values, 0, size);\n this._size = size;\n return this;\n };\n\n\n SplayTree.prototype.min = function min () {\n var node = this.minNode(this._root);\n if (node) { return node.key; }\n else { return null; }\n };\n\n\n SplayTree.prototype.max = function max () {\n var node = this.maxNode(this._root);\n if (node) { return node.key; }\n else { return null; }\n };\n\n SplayTree.prototype.isEmpty = function isEmpty () { return this._root === null; };\n prototypeAccessors.size.get = function () { return this._size; };\n\n\n /**\n * Create a tree and load it with items\n * @param{Array<Key>} keys\n * @param{Array<Value>?} [values]\n\n * @param{Function?} [comparator]\n * @param{Boolean?} [presort=false] Pre-sort keys and values, using\n * tree's comparator. Sorting is done\n * in-place\n * @param{Boolean?} [noDuplicates=false] Allow duplicates\n * @return {SplayTree}\n */\n SplayTree.createTree = function createTree (keys, values, comparator, presort, noDuplicates) {\n return new SplayTree(comparator, noDuplicates).load(keys, values, presort);\n };\n\n Object.defineProperties( SplayTree.prototype, prototypeAccessors );\n\n\n function loadRecursive (parent, keys, values, start, end) {\n var size = end - start;\n if (size > 0) {\n var middle = start + Math.floor(size / 2);\n var key = keys[middle];\n var data = values[middle];\n var node = { key: key, data: data, parent: parent };\n node.left = loadRecursive(node, keys, values, start, middle);\n node.right = loadRecursive(node, keys, values, middle + 1, end);\n return node;\n }\n return null;\n }\n\n\n function sort(keys, values, left, right, compare) {\n if (left >= right) { return; }\n\n var pivot = keys[(left + right) >> 1];\n var i = left - 1;\n var j = right + 1;\n\n while (true) {\n do { i++; } while (compare(keys[i], pivot) < 0);\n do { j--; } while (compare(keys[j], pivot) > 0);\n if (i >= j) { break; }\n\n var tmp = keys[i];\n keys[i] = keys[j];\n keys[j] = tmp;\n\n tmp = values[i];\n values[i] = values[j];\n values[j] = tmp;\n }\n\n sort(keys, values, left, j, compare);\n sort(keys, values, j + 1, right, compare);\n }\n\n var NORMAL = 0;\n var NON_CONTRIBUTING = 1;\n var SAME_TRANSITION = 2;\n var DIFFERENT_TRANSITION = 3;\n\n var INTERSECTION = 0;\n var UNION = 1;\n var DIFFERENCE = 2;\n var XOR = 3;\n\n /**\n * @param {SweepEvent} event\n * @param {SweepEvent} prev\n * @param {Operation} operation\n */\n function computeFields (event, prev, operation) {\n // compute inOut and otherInOut fields\n if (prev === null) {\n event.inOut = false;\n event.otherInOut = true;\n\n // previous line segment in sweepline belongs to the same polygon\n } else {\n if (event.isSubject === prev.isSubject) {\n event.inOut = !prev.inOut;\n event.otherInOut = prev.otherInOut;\n\n // previous line segment in sweepline belongs to the clipping polygon\n } else {\n event.inOut = !prev.otherInOut;\n event.otherInOut = prev.isVertical() ? !prev.inOut : prev.inOut;\n }\n\n // compute prevInResult field\n if (prev) {\n event.prevInResult = (!inResult(prev, operation) || prev.isVertical())\n ? prev.prevInResult : prev;\n }\n }\n\n // check if the line segment belongs to the Boolean operation\n event.inResult = inResult(event, operation);\n }\n\n\n /* eslint-disable indent */\n function inResult(event, operation) {\n switch (event.type) {\n case NORMAL:\n switch (operation) {\n case INTERSECTION:\n return !event.otherInOut;\n case UNION:\n return event.otherInOut;\n case DIFFERENCE:\n // return (event.isSubject && !event.otherInOut) ||\n // (!event.isSubject && event.otherInOut);\n return (event.isSubject && event.otherInOut) ||\n (!event.isSubject && !event.otherInOut);\n case XOR:\n return true;\n }\n break;\n case SAME_TRANSITION:\n return operation === INTERSECTION || operation === UNION;\n case DIFFERENT_TRANSITION:\n return operation === DIFFERENCE;\n case NON_CONTRIBUTING:\n return false;\n }\n return false;\n }\n /* eslint-enable indent */\n\n var SweepEvent = function SweepEvent (point, left, otherEvent, isSubject, edgeType) {\n\n /**\n * Is left endpoint?\n * @type {Boolean}\n */\n this.left = left;\n\n /**\n * @type {Array.<Number>}\n */\n this.point = point;\n\n /**\n * Other edge reference\n * @type {SweepEvent}\n */\n this.otherEvent = otherEvent;\n\n /**\n * Belongs to source or clipping polygon\n * @type {Boolean}\n */\n this.isSubject = isSubject;\n\n /**\n * Edge contribution type\n * @type {Number}\n */\n this.type = edgeType || NORMAL;\n\n\n /**\n * In-out transition for the sweepline crossing polygon\n * @type {Boolean}\n */\n this.inOut = false;\n\n\n /**\n * @type {Boolean}\n */\n this.otherInOut = false;\n\n /**\n * Previous event in result?\n * @type {SweepEvent}\n */\n this.prevInResult = null;\n\n /**\n * Does event belong to result?\n * @type {Boolean}\n */\n this.inResult = false;\n\n\n // connection step\n\n /**\n * @type {Boolean}\n */\n this.resultInOut = false;\n\n this.isExteriorRing = true;\n };\n\n\n /**\n * @param{Array.<Number>}p\n * @return {Boolean}\n */\n SweepEvent.prototype.isBelow = function isBelow (p) {\n var p0 = this.point, p1 = this.otherEvent.point;\n return this.left\n ? (p0[0] - p[0]) * (p1[1] - p[1]) - (p1[0] - p[0]) * (p0[1] - p[1]) > 0\n // signedArea(this.point, this.otherEvent.point, p) > 0 :\n : (p1[0] - p[0]) * (p0[1] - p[1]) - (p0[0] - p[0]) * (p1[1] - p[1]) > 0;\n //signedArea(this.otherEvent.point, this.point, p) > 0;\n };\n\n\n /**\n * @param{Array.<Number>}p\n * @return {Boolean}\n */\n SweepEvent.prototype.isAbove = function isAbove (p) {\n return !this.isBelow(p);\n };\n\n\n /**\n * @return {Boolean}\n */\n SweepEvent.prototype.isVertical = function isVertical () {\n return this.point[0] === this.otherEvent.point[0];\n };\n\n\n SweepEvent.prototype.clone = function clone () {\n var copy = new SweepEvent(\n this.point, this.left, this.otherEvent, this.isSubject, this.type);\n\n copy.inResult = this.inResult;\n copy.prevInResult = this.prevInResult;\n copy.isExteriorRing = this.isExteriorRing;\n copy.inOut = this.inOut;\n copy.otherInOut = this.otherInOut;\n\n return copy;\n };\n\n function equals(p1, p2) {\n if (p1[0] === p2[0]) {\n if (p1[1] === p2[1]) {\n return true;\n } else {\n return false;\n }\n }\n return false;\n }\n\n // const EPSILON = 1e-9;\n // const abs = Math.abs;\n // TODO https://github.com/w8r/martinez/issues/6#issuecomment-262847164\n // Precision problem.\n //\n // module.exports = function equals(p1, p2) {\n // return abs(p1[0] - p2[0]) <= EPSILON && abs(p1[1] - p2[1]) <= EPSILON;\n // };\n\n /**\n * Signed area of the triangle (p0, p1, p2)\n * @param {Array.<Number>} p0\n * @param {Array.<Number>} p1\n * @param {Array.<Number>} p2\n * @return {Number}\n */\n function signedArea(p0, p1, p2) {\n return (p0[0] - p2[0]) * (p1[1] - p2[1]) - (p1[0] - p2[0]) * (p0[1] - p2[1]);\n }\n\n /**\n * @param {SweepEvent} e1\n * @param {SweepEvent} e2\n * @return {Number}\n */\n function compareEvents(e1, e2) {\n var p1 = e1.point;\n var p2 = e2.point;\n\n // Different x-coordinate\n if (p1[0] > p2[0]) { return 1; }\n if (p1[0] < p2[0]) { return -1; }\n\n // Different points, but same x-coordinate\n // Event with lower y-coordinate is processed first\n if (p1[1] !== p2[1]) { return p1[1] > p2[1] ? 1 : -1; }\n\n return specialCases(e1, e2, p1, p2);\n }\n\n\n /* eslint-disable no-unused-vars */\n function specialCases(e1, e2, p1, p2) {\n // Same coordinates, but one is a left endpoint and the other is\n // a right endpoint. The right endpoint is processed first\n if (e1.left !== e2.left)\n { return e1.left ? 1 : -1; }\n\n // const p2 = e1.otherEvent.point, p3 = e2.otherEvent.point;\n // const sa = (p1[0] - p3[0]) * (p2[1] - p3[1]) - (p2[0] - p3[0]) * (p1[1] - p3[1])\n // Same coordinates, both events\n // are left endpoints or right endpoints.\n // not collinear\n if (signedArea(p1, e1.otherEvent.point, e2.otherEvent.point) !== 0) {\n // the event associate to the bottom segment is processed first\n return (!e1.isBelow(e2.otherEvent.point)) ? 1 : -1;\n }\n\n return (!e1.isSubject && e2.isSubject) ? 1 : -1;\n }\n /* eslint-enable no-unused-vars */\n\n /**\n * @param {SweepEvent} se\n * @param {Array.<Number>} p\n * @param {Queue} queue\n * @return {Queue}\n */\n function divideSegment(se, p, queue) {\n var r = new SweepEvent(p, false, se, se.isSubject);\n var l = new SweepEvent(p, true, se.otherEvent, se.isSubject);\n\n /* eslint-disable no-console */\n if (equals(se.point, se.otherEvent.point)) {\n\n console.warn('what is that, a collapsed segment?', se);\n }\n /* eslint-enable no-console */\n\n r.contourId = l.contourId = se.contourId;\n\n // avoid a rounding error. The left event would be processed after the right event\n if (compareEvents(l, se.otherEvent) > 0) {\n se.otherEvent.left = true;\n l.left = false;\n }\n\n // avoid a rounding error. The left event would be processed after the right event\n // if (compareEvents(se, r) > 0) {}\n\n se.otherEvent.otherEvent = l;\n se.otherEvent = r;\n\n queue.push(l);\n queue.push(r);\n\n return queue;\n }\n\n //const EPS = 1e-9;\n\n /**\n * Finds the magnitude of the cross product of two vectors (if we pretend\n * they're in three dimensions)\n *\n * @param {Object} a First vector\n * @param {Object} b Second vector\n * @private\n * @returns {Number} The magnitude of the cross product\n */\n function crossProduct(a, b) {\n return (a[0] * b[1]) - (a[1] * b[0]);\n }\n\n /**\n * Finds the dot product of two vectors.\n *\n * @param {Object} a First vector\n * @param {Object} b Second vector\n * @private\n * @returns {Number} The dot product\n */\n function dotProduct(a, b) {\n return (a[0] * b[0]) + (a[1] * b[1]);\n }\n\n /**\n * Finds the intersection (if any) between two line segments a and b, given the\n * line segments' end points a1, a2 and b1, b2.\n *\n * This algorithm is based on Schneider and Eberly.\n * http://www.cimec.org.ar/~ncalvo/Schneider_Eberly.pdf\n * Page 244.\n *\n * @param {Array.<Number>} a1 point of first line\n * @param {Array.<Number>} a2 point of first line\n * @param {Array.<Number>} b1 point of second line\n * @param {Array.<Number>} b2 point of second line\n * @param {Boolean=} noEndpointTouch whether to skip single touchpoints\n * (meaning connected segments) as\n * intersections\n * @returns {Array.<Array.<Number>>|Null} If the lines intersect, the point of\n * intersection. If they overlap, the two end points of the overlapping segment.\n * Otherwise, null.\n */\n function intersection (a1, a2, b1, b2, noEndpointTouch) {\n // The algorithm expects our lines in the form P + sd, where P is a point,\n // s is on the interval [0, 1], and d is a vector.\n // We are passed two points. P can be the first point of each pair. The\n // vector, then, could be thought of as the distance (in x and y components)\n // from the first point to the second point.\n // So first, let's make our vectors:\n var va = [a2[0] - a1[0], a2[1] - a1[1]];\n var vb = [b2[0] - b1[0], b2[1] - b1[1]];\n // We also define a function to convert back to regular point form:\n\n /* eslint-disable arrow-body-style */\n\n function toPoint(p, s, d) {\n return [\n p[0] + s * d[0],\n p[1] + s * d[1]\n ];\n }\n\n /* eslint-enable arrow-body-style */\n\n // The rest is pretty much a straight port of the algorithm.\n var e = [b1[0] - a1[0], b1[1] - a1[1]];\n var kross = crossProduct(va, vb);\n var sqrKross = kross * kross;\n var sqrLenA = dotProduct(va, va);\n //const sqrLenB = dotProduct(vb, vb);\n\n // Check for line intersection. This works because of the properties of the\n // cross product -- specifically, two vectors are parallel if and only if the\n // cross product is the 0 vector. The full calculation involves relative error\n // to account for possible very small line segments. See Schneider & Eberly\n // for details.\n if (sqrKross > 0/* EPS * sqrLenB * sqLenA */) {\n // If they're not parallel, then (because these are line segments) they\n // still might not actually intersect. This code checks that the\n // intersection point of the lines is actually on both line segments.\n var s = crossProduct(e, vb) / kross;\n if (s < 0 || s > 1) {\n // not on line segment a\n return null;\n }\n var t = crossProduct(e, va) / kross;\n if (t < 0 || t > 1) {\n // not on line segment b\n return null;\n }\n if (s === 0 || s === 1) {\n // on an endpoint of line segment a\n return noEndpointTouch ? null : [toPoint(a1, s, va)];\n }\n if (t === 0 || t === 1) {\n // on an endpoint of line segment b\n return noEndpointTouch ? null : [toPoint(b1, t, vb)];\n }\n return [toPoint(a1, s, va)];\n }\n\n // If we've reached this point, then the lines are either parallel or the\n // same, but the segments could overlap partially or fully, or not at all.\n // So we need to find the overlap, if any. To do that, we can use e, which is\n // the (vector) difference between the two initial points. If this is parallel\n // with the line itself, then the two lines are the same line, and there will\n // be overlap.\n //const sqrLenE = dotProduct(e, e);\n kross = crossProduct(e, va);\n sqrKross = kross * kross;\n\n if (sqrKross > 0 /* EPS * sqLenB * sqLenE */) {\n // Lines are just parallel, not the same. No overlap.\n return null;\n }\n\n var sa = dotProduct(va, e) / sqrLenA;\n var sb = sa + dotProduct(va, vb) / sqrLenA;\n var smin = Math.min(sa, sb);\n var smax = Math.max(sa, sb);\n\n // this is, essentially, the FindIntersection acting on floats from\n // Schneider & Eberly, just inlined into this function.\n if (smin <= 1 && smax >= 0) {\n\n // overlap on an end point\n if (smin === 1) {\n return noEndpointTouch ? null : [toPoint(a1, smin > 0 ? smin : 0, va)];\n }\n\n if (smax === 0) {\n return noEndpointTouch ? null : [toPoint(a1, smax < 1 ? smax : 1, va)];\n }\n\n if (noEndpointTouch && smin === 0 && smax === 1) { return null; }\n\n // There's overlap on a segment -- two points of intersection. Return both.\n return [\n toPoint(a1, smin > 0 ? smin : 0, va),\n toPoint(a1, smax < 1 ? smax : 1, va)\n ];\n }\n\n return null;\n }\n\n /**\n * @param {SweepEvent} se1\n * @param {SweepEvent} se2\n * @param {Queue} queue\n * @return {Number}\n */\n function possibleIntersection (se1, se2, queue) {\n // that disallows self-intersecting polygons,\n // did cost us half a day, so I'll leave it\n // out of respect\n // if (se1.isSubject === se2.isSubject) return;\n var inter = intersection(\n se1.point, se1.otherEvent.point,\n se2.point, se2.otherEvent.point\n );\n\n var nintersections = inter ? inter.length : 0;\n if (nintersections === 0) { return 0; } // no intersection\n\n // the line segments intersect at an endpoint of both line segments\n if ((nintersections === 1) &&\n (equals(se1.point, se2.point) ||\n equals(se1.otherEvent.point, se2.otherEvent.point))) {\n return 0;\n }\n\n if (nintersections === 2 && se1.isSubject === se2.isSubject) {\n // if(se1.contourId === se2.contourId){\n // console.warn('Edges of the same polygon overlap',\n // se1.point, se1.otherEvent.point, se2.point, se2.otherEvent.point);\n // }\n //throw new Error('Edges of the same polygon overlap');\n return 0;\n }\n\n // The line segments associated to se1 and se2 intersect\n if (nintersections === 1) {\n\n // if the intersection point is not an endpoint of se1\n if (!equals(se1.point, inter[0]) && !equals(se1.otherEvent.point, inter[0])) {\n divideSegment(se1, inter[0], queue);\n }\n\n // if the intersection point is not an endpoint of se2\n if (!equals(se2.point, inter[0]) && !equals(se2.otherEvent.point, inter[0])) {\n divideSegment(se2, inter[0], queue);\n }\n return 1;\n }\n\n // The line segments associated to se1 and se2 overlap\n var events = [];\n var leftCoincide = false;\n var rightCoincide = false;\n\n if (equals(se1.point, se2.point)) {\n leftCoincide = true; // linked\n } else if (compareEvents(se1, se2) === 1) {\n events.push(se2, se1);\n } else {\n events.push(se1, se2);\n }\n\n if (equals(se1.otherEvent.point, se2.otherEvent.point)) {\n rightCoincide = true;\n } else if (compareEvents(se1.otherEvent, se2.otherEvent) === 1) {\n events.push(se2.otherEvent, se1.otherEvent);\n } else {\n events.push(se1.otherEvent, se2.otherEvent);\n }\n\n if ((leftCoincide && rightCoincide) || leftCoincide) {\n // both line segments are equal or share the left endpoint\n se2.type = NON_CONTRIBUTING;\n se1.type = (se2.inOut === se1.inOut)\n ? SAME_TRANSITION : DIFFERENT_TRANSITION;\n\n if (leftCoincide && !rightCoincide) {\n // honestly no idea, but changing events selection from [2, 1]\n // to [0, 1] fixes the overlapping self-intersecting polygons issue\n divideSegment(events[1].otherEvent, events[0].point, queue);\n }\n return 2;\n }\n\n // the line segments share the right endpoint\n if (rightCoincide) {\n divideSegment(events[0], events[1].point, queue);\n return 3;\n }\n\n // no line segment includes totally the other one\n if (events[0] !== events[3].otherEvent) {\n divideSegment(events[0], events[1].point, queue);\n divideSegment(events[1], events[2].point, queue);\n return 3;\n }\n\n // one line segment includes the other one\n divideSegment(events[0], events[1].point, queue);\n divideSegment(events[3].otherEvent, events[2].point, queue);\n\n return 3;\n }\n\n /**\n * @param {SweepEvent} le1\n * @param {SweepEvent} le2\n * @return {Number}\n */\n function compareSegments(le1, le2) {\n if (le1 === le2) { return 0; }\n\n // Segments are not collinear\n if (signedArea(le1.point, le1.otherEvent.point, le2.point) !== 0 ||\n signedArea(le1.point, le1.otherEvent.point, le2.otherEvent.point) !== 0) {\n\n // If they share their left endpoint use the right endpoint to sort\n if (equals(le1.point, le2.point)) { return le1.isBelow(le2.otherEvent.point) ? -1 : 1; }\n\n // Different left endpoint: use the left endpoint to sort\n if (le1.point[0] === le2.point[0]) { return le1.point[1] < le2.point[1] ? -1 : 1; }\n\n // has the line segment associated to e1 been inserted\n // into S after the line segment associated to e2 ?\n if (compareEvents(le1, le2) === 1) { return le2.isAbove(le1.point) ? -1 : 1; }\n\n // The line segment associated to e2 has been inserted\n // into S after the line segment associated to e1\n return le1.isBelow(le2.point) ? -1 : 1;\n }\n\n if (le1.isSubject === le2.isSubject) { // same polygon\n var p1 = le1.point, p2 = le2.point;\n if (p1[0] === p2[0] && p1[1] === p2[1]/*equals(le1.point, le2.point)*/) {\n p1 = le1.otherEvent.point; p2 = le2.otherEvent.point;\n if (p1[0] === p2[0] && p1[1] === p2[1]) { return 0; }\n else { return le1.contourId > le2.contourId ? 1 : -1; }\n }\n } else { // Segments are collinear, but belong to separate polygons\n return le1.isSubject ? -1 : 1;\n }\n\n return compareEvents(le1, le2) === 1 ? 1 : -1;\n }\n\n function subdivide(eventQueue, subject, clipping, sbbox, cbbox, operation) {\n var sweepLine = new SplayTree(compareSegments);\n var sortedEvents = [];\n\n var rightbound = Math.min(sbbox[2], cbbox[2]);\n\n var prev, next, begin;\n\n while (eventQueue.length !== 0) {\n var event = eventQueue.pop();\n sortedEvents.push(event);\n\n // optimization by bboxes for intersection and difference goes here\n if ((operation === INTERSECTION && event.point[0] > rightbound) ||\n (operation === DIFFERENCE && event.point[0] > sbbox[2])) {\n break;\n }\n\n if (event.left) {\n next = prev = sweepLine.insert(event);\n begin = sweepLine.minNode();\n\n if (prev !== begin) { prev = sweepLine.prev(prev); }\n else { prev = null; }\n\n next = sweepLine.next(next);\n\n var prevEvent = prev ? prev.key : null;\n var prevprevEvent = (void 0);\n computeFields(event, prevEvent, operation);\n if (next) {\n if (possibleIntersection(event, next.key, eventQueue) === 2) {\n computeFields(event, prevEvent, operation);\n computeFields(event, next.key, operation);\n }\n }\n\n if (prev) {\n if (possibleIntersection(prev.key, event, eventQueue) === 2) {\n var prevprev = prev;\n if (prevprev !== begin) { prevprev = sweepLine.prev(prevprev); }\n else { prevprev = null; }\n\n prevprevEvent = prevprev ? prevprev.key : null;\n computeFields(prevEvent, prevprevEvent, operation);\n computeFields(event, prevEvent, operation);\n }\n }\n } else {\n event = event.otherEvent;\n next = prev = sweepLine.find(event);\n\n if (prev && next) {\n\n if (prev !== begin) { prev = sweepLine.prev(prev); }\n else { prev = null; }\n\n next = sweepLine.next(next);\n sweepLine.remove(event);\n\n if (next && prev) {\n possibleIntersection(prev.key, next.key, eventQueue);\n }\n }\n }\n }\n return sortedEvents;\n }\n\n /**\n * @param {Array.<SweepEvent>} sortedEvents\n * @return {Array.<SweepEvent>}\n */\n function orderEvents(sortedEvents) {\n var event, i, len, tmp;\n var resultEvents = [];\n for (i = 0, len = sortedEvents.length; i < len; i++) {\n event = sortedEvents[i];\n if ((event.left && event.inResult) ||\n (!event.left && event.otherEvent.inResult)) {\n resultEvents.push(event);\n }\n }\n // Due to overlapping edges the resultEvents array can be not wholly sorted\n var sorted = false;\n while (!sorted) {\n sorted = true;\n for (i = 0, len = resultEvents.length; i < len; i++) {\n if ((i + 1) < len &&\n compareEvents(resultEvents[i], resultEvents[i + 1]) === 1) {\n tmp = resultEvents[i];\n resultEvents[i] = resultEvents[i + 1];\n resultEvents[i + 1] = tmp;\n sorted = false;\n }\n }\n }\n\n\n for (i = 0, len = resultEvents.length; i < len; i++) {\n event = resultEvents[i];\n event.pos = i;\n }\n\n // imagine, the right event is found in the beginning of the queue,\n // when his left counterpart is not marked yet\n for (i = 0, len = resultEvents.length; i < len; i++) {\n event = resultEvents[i];\n if (!event.left) {\n tmp = event.pos;\n event.pos = event.otherEvent.pos;\n event.otherEvent.pos = tmp;\n }\n }\n\n return resultEvents;\n }\n\n\n /**\n * @param {Number} pos\n * @param {Array.<SweepEvent>} resultEvents\n * @param {Object>} processed\n * @return {Number}\n */\n function nextPos(pos, resultEvents, processed, origIndex) {\n var p, p1;\n var newPos = pos + 1;\n var length = resultEvents.length;\n\n p = resultEvents[pos].point;\n\n if (newPos < length)\n { p1 = resultEvents[newPos].point; }\n\n\n // while in range and not the current one by value\n while (newPos < length && p1[0] === p[0] && p1[1] === p[1]) {\n if (!processed[newPos]) {\n return newPos;\n } else {\n newPos++;\n }\n p1 = resultEvents[newPos].point;\n }\n\n newPos = pos - 1;\n\n while (processed[newPos] && newPos >= origIndex) {\n newPos--;\n }\n return newPos;\n }\n\n\n /**\n * @param {Array.<SweepEvent>} sortedEvents\n * @return {Array.<*>} polygons\n */\n function connectEdges(sortedEvents, operation) {\n var i, len;\n var resultEvents = orderEvents(sortedEvents);\n\n // \"false\"-filled array\n var processed = {};\n var result = [];\n var event;\n\n for (i = 0, len = resultEvents.length; i < len; i++) {\n if (processed[i]) { continue; }\n var contour = [[]];\n\n if (!resultEvents[i].isExteriorRing) {\n if (operation === DIFFERENCE && !resultEvents[i].isSubject && result.length === 0) {\n result.push(contour);\n } else if (result.length === 0) {\n result.push([[contour]]);\n } else {\n result[result.length - 1].push(contour[0]);\n }\n } else if (operation === DIFFERENCE && !resultEvents[i].isSubject && result.length > 1) {\n result[result.length - 1].push(contour[0]);\n } else {\n result.push(contour);\n }\n\n var ringId = result.length - 1;\n var pos = i;\n\n var initial = resultEvents[i].point;\n contour[0].push(initial);\n\n while (pos >= i) {\n event = resultEvents[pos];\n processed[pos] = true;\n\n if (event.left) {\n event.resultInOut = false;\n event.contourId = ringId;\n } else {\n event.otherEvent.resultInOut = true;\n event.otherEvent.contourId = ringId;\n }\n\n pos = event.pos;\n processed[pos] = true;\n contour[0].push(resultEvents[pos].point);\n pos = nextPos(pos, resultEvents, processed, i);\n }\n\n pos = pos === -1 ? i : pos;\n\n event = resultEvents[pos];\n processed[pos] = processed[event.pos] = true;\n event.otherEvent.resultInOut = true;\n event.otherEvent.contourId = ringId;\n }\n\n // Handle if the result is a polygon (eg not multipoly)\n // Commented it again, let's see what do we mean by that\n // if (result.length === 1) result = result[0];\n return result;\n }\n\n var tinyqueue = TinyQueue;\n var default_1 = TinyQueue;\n\n function TinyQueue(data, compare) {\n var this$1 = this;\n\n if (!(this instanceof TinyQueue)) { return new TinyQueue(data, compare); }\n\n this.data = data || [];\n this.length = this.data.length;\n this.compare = compare || defaultCompare;\n\n if (this.length > 0) {\n for (var i = (this.length >> 1) - 1; i >= 0; i--) { this$1._down(i); }\n }\n }\n\n function defaultCompare(a, b) {\n return a < b ? -1 : a > b ? 1 : 0;\n }\n\n TinyQueue.prototype = {\n\n push: function (item) {\n this.data.push(item);\n this.length++;\n this._up(this.length - 1);\n },\n\n pop: function () {\n if (this.length === 0) { return undefined; }\n\n var top = this.data[0];\n this.length--;\n\n if (this.length > 0) {\n this.data[0] = this.data[this.length];\n this._down(0);\n }\n this.data.pop();\n\n return top;\n },\n\n peek: function () {\n return this.data[0];\n },\n\n _up: function (pos) {\n var data = this.data;\n var compare = this.compare;\n var item = data[pos];\n\n while (pos > 0) {\n var parent = (pos - 1) >> 1;\n var current = data[parent];\n if (compare(item, current) >= 0) { break; }\n data[pos] = current;\n pos = parent;\n }\n\n data[pos] = item;\n },\n\n _down: function (pos) {\n var this$1 = this;\n\n var data = this.data;\n var compare = this.compare;\n var halfLength = this.length >> 1;\n var item = data[pos];\n\n while (pos < halfLength) {\n var left = (pos << 1) + 1;\n var right = left + 1;\n var best = data[left];\n\n if (right < this$1.length && compare(data[right], best) < 0) {\n left = right;\n best = data[right];\n }\n if (compare(best, item) >= 0) { break; }\n\n data[pos] = best;\n pos = left;\n }\n\n data[pos] = item;\n }\n };\n tinyqueue.default = default_1;\n\n var max = Math.max;\n var min = Math.min;\n\n var contourId = 0;\n\n\n function processPolygon(contourOrHole, isSubject, depth, Q, bbox, isExteriorRing) {\n var i, len, s1, s2, e1, e2;\n for (i = 0, len = contourOrHole.length - 1; i < len; i++) {\n s1 = contourOrHole[i];\n s2 = contourOrHole[i + 1];\n e1 = new SweepEvent(s1, false, undefined, isSubject);\n e2 = new SweepEvent(s2, false, e1, isSubject);\n e1.otherEvent = e2;\n\n if (s1[0] === s2[0] && s1[1] === s2[1]) {\n continue; // skip collapsed edges, or it breaks\n }\n\n e1.contourId = e2.contourId = depth;\n if (!isExteriorRing) {\n e1.isExteriorRing = false;\n e2.isExteriorRing = false;\n }\n if (compareEvents(e1, e2) > 0) {\n e2.left = true;\n } else {\n e1.left = true;\n }\n\n var x = s1[0], y = s1[1];\n bbox[0] = min(bbox[0], x);\n bbox[1] = min(bbox[1], y);\n bbox[2] = max(bbox[2], x);\n bbox[3] = max(bbox[3], y);\n\n // Pushing it so the queue is sorted from left to right,\n // with object on the left having the highest priority.\n Q.push(e1);\n Q.push(e2);\n }\n }\n\n\n function fillQueue(subject, clipping, sbbox, cbbox, operation) {\n var eventQueue = new tinyqueue(null, compareEvents);\n var polygonSet, isExteriorRing, i, ii, j, jj; //, k, kk;\n\n for (i = 0, ii = subject.length; i < ii; i++) {\n polygonSet = subject[i];\n for (j = 0, jj = polygonSet.length; j < jj; j++) {\n isExteriorRing = j === 0;\n if (isExteriorRing) { contourId++; }\n processPolygon(polygonSet[j], true, contourId, eventQueue, sbbox, isExteriorRing);\n }\n }\n\n for (i = 0, ii = clipping.length; i < ii; i++) {\n polygonSet = clipping[i];\n for (j = 0, jj = polygonSet.length; j < jj; j++) {\n isExteriorRing = j === 0;\n if (operation === DIFFERENCE) { isExteriorRing = false; }\n if (isExteriorRing) { contourId++; }\n processPolygon(polygonSet[j], false, contourId, eventQueue, cbbox, isExteriorRing);\n }\n }\n\n return eventQueue;\n }\n\n var EMPTY = [];\n\n\n function trivialOperation(subject, clipping, operation) {\n var result = null;\n if (subject.length * clipping.length === 0) {\n if (operation === INTERSECTION) {\n result = EMPTY;\n } else if (operation === DIFFERENCE) {\n result = subject;\n } else if (operation === UNION ||\n operation === XOR) {\n result = (subject.length === 0) ? clipping : subject;\n }\n }\n return result;\n }\n\n\n function compareBBoxes(subject, clipping, sbbox, cbbox, operation) {\n var result = null;\n if (sbbox[0] > cbbox[2] ||\n cbbox[0] > sbbox[2] ||\n sbbox[1] > cbbox[3] ||\n cbbox[1] > sbbox[3]) {\n if (operation === INTERSECTION) {\n result = EMPTY;\n } else if (operation === DIFFERENCE) {\n result = subject;\n } else if (operation === UNION ||\n operation === XOR) {\n result = subject.concat(clipping);\n }\n }\n return result;\n }\n\n\n function boolean(subject, clipping, operation) {\n if (typeof subject[0][0][0] === 'number') {\n subject = [subject];\n }\n if (typeof clipping[0][0][0] === 'number') {\n clipping = [clipping];\n }\n var trivial = trivialOperation(subject, clipping, operation);\n if (trivial) {\n return trivial === EMPTY ? null : trivial;\n }\n var sbbox = [Infinity, Infinity, -Infinity, -Infinity];\n var cbbox = [Infinity, Infinity, -Infinity, -Infinity];\n\n //console.time('fill queue');\n var eventQueue = fillQueue(subject, clipping, sbbox, cbbox, operation);\n //console.timeEnd('fill queue');\n\n trivial = compareBBoxes(subject, clipping, sbbox, cbbox, operation);\n if (trivial) {\n return trivial === EMPTY ? null : trivial;\n }\n //console.time('subdivide edges');\n var sortedEvents = subdivide(eventQueue, subject, clipping, sbbox, cbbox, operation);\n //console.timeEnd('subdivide edges');\n\n //console.time('connect vertices');\n var result = connectEdges(sortedEvents, operation);\n //console.timeEnd('connect vertices');\n return result;\n }\n\n function union (subject, clipping) {\n return boolean(subject, clipping, UNION);\n }\n\n function diff (subject, clipping) {\n return boolean(subject, clipping, DIFFERENCE);\n }\n\n function xor (subject, clipping){\n return boolean(subject, clipping, XOR);\n }\n\n function intersection$1 (subject, clipping) {\n return boolean(subject, clipping, INTERSECTION);\n }\n\n /**\n * @enum {Number}\n */\n var operations = { UNION: UNION, DIFFERENCE: DIFFERENCE, INTERSECTION: INTERSECTION, XOR: XOR };\n\n exports.union = union;\n exports.diff = diff;\n exports.xor = xor;\n exports.intersection = intersection$1;\n exports.operations = operations;\n\n Object.defineProperty(exports, '__esModule', { value: true });\n\n})));\n//# sourceMappingURL=martinez.umd.js.map\n",
"// Copyright Joyent, Inc. and other Node contributors.\n//\n// Permission is hereby granted, free of charge, to any person obtaining a\n// copy of this software and associated documentation files (the\n// \"Software\"), to deal in the Software without restriction, including\n// without limitation the rights to use, copy, modify, merge, publish,\n// distribute, sublicense, and/or sell copies of the Software, and to permit\n// persons to whom the Software is furnished to do so, subject to the\n// following conditions:\n//\n// The above copyright notice and this permission notice shall be included\n// in all copies or substantial portions of the Software.\n//\n// THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS\n// OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF\n// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN\n// NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,\n// DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR\n// OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE\n// USE OR OTHER DEALINGS IN THE SOFTWARE.\n\n// resolves . and .. elements in a path array with directory names there\n// must be no slashes, empty elements, or device names (c:\\) in the array\n// (so also no leading and trailing slashes - it does not distinguish\n// relative and absolute paths)\nfunction normalizeArray(parts, allowAboveRoot) {\n // if the path tries to go above the root, `up` ends up > 0\n var up = 0;\n for (var i = parts.length - 1; i >= 0; i--) {\n var last = parts[i];\n if (last === '.') {\n parts.splice(i, 1);\n } else if (last === '..') {\n parts.splice(i, 1);\n up++;\n } else if (up) {\n parts.splice(i, 1);\n up--;\n }\n }\n\n // if the path is allowed to go above the root, restore leading ..s\n if (allowAboveRoot) {\n for (; up--; up) {\n parts.unshift('..');\n }\n }\n\n return parts;\n}\n\n// Split a filename into [root, dir, basename, ext], unix version\n// 'root' is just a slash, or nothing.\nvar splitPathRe =\n /^(\\/?|)([\\s\\S]*?)((?:\\.{1,2}|[^\\/]+?|)(\\.[^.\\/]*|))(?:[\\/]*)$/;\nvar splitPath = function(filename) {\n return splitPathRe.exec(filename).slice(1);\n};\n\n// path.resolve([from ...], to)\n// posix version\nexports.resolve = function() {\n var resolvedPath = '',\n resolvedAbsolute = false;\n\n for (var i = arguments.length - 1; i >= -1 && !resolvedAbsolute; i--) {\n var path = (i >= 0) ? arguments[i] : process.cwd();\n\n // Skip empty and invalid entries\n if (typeof path !== 'string') {\n throw new TypeError('Arguments to path.resolve must be strings');\n } else if (!path) {\n continue;\n }\n\n resolvedPath = path + '/' + resolvedPath;\n resolvedAbsolute = path.charAt(0) === '/';\n }\n\n // At this point the path should be resolved to a full absolute path, but\n // handle relative paths to be safe (might happen when process.cwd() fails)\n\n // Normalize the path\n resolvedPath = normalizeArray(filter(resolvedPath.split('/'), function(p) {\n return !!p;\n }), !resolvedAbsolute).join('/');\n\n return ((resolvedAbsolute ? '/' : '') + resolvedPath) || '.';\n};\n\n// path.normalize(path)\n// posix version\nexports.normalize = function(path) {\n var isAbsolute = exports.isAbsolute(path),\n trailingSlash = substr(path, -1) === '/';\n\n // Normalize the path\n path = normalizeArray(filter(path.split('/'), function(p) {\n return !!p;\n }), !isAbsolute).join('/');\n\n if (!path && !isAbsolute) {\n path = '.';\n }\n if (path && trailingSlash) {\n path += '/';\n }\n\n return (isAbsolute ? '/' : '') + path;\n};\n\n// posix version\nexports.isAbsolute = function(path) {\n return path.charAt(0) === '/';\n};\n\n// posix version\nexports.join = function() {\n var paths = Array.prototype.slice.call(arguments, 0);\n return exports.normalize(filter(paths, function(p, index) {\n if (typeof p !== 'string') {\n throw new TypeError('Arguments to path.join must be strings');\n }\n return p;\n }).join('/'));\n};\n\n\n// path.relative(from, to)\n// posix version\nexports.relative = function(from, to) {\n from = exports.resolve(from).substr(1);\n to = exports.resolve(to).substr(1);\n\n function trim(arr) {\n var start = 0;\n for (; start < arr.length; start++) {\n if (arr[start] !== '') break;\n }\n\n var end = arr.length - 1;\n for (; end >= 0; end--) {\n if (arr[end] !== '') break;\n }\n\n if (start > end) return [];\n return arr.slice(start, end - start + 1);\n }\n\n var fromParts = trim(from.split('/'));\n var toParts = trim(to.split('/'));\n\n var length = Math.min(fromParts.length, toParts.length);\n var samePartsLength = length;\n for (var i = 0; i < length; i++) {\n if (fromParts[i] !== toParts[i]) {\n samePartsLength = i;\n break;\n }\n }\n\n var outputParts = [];\n for (var i = samePartsLength; i < fromParts.length; i++) {\n outputParts.push('..');\n }\n\n outputParts = outputParts.concat(toParts.slice(samePartsLength));\n\n return outputParts.join('/');\n};\n\nexports.sep = '/';\nexports.delimiter = ':';\n\nexports.dirname = function(path) {\n var result = splitPath(path),\n root = result[0],\n dir = result[1];\n\n if (!root && !dir) {\n // No dirname whatsoever\n return '.';\n }\n\n if (dir) {\n // It has a dirname, strip trailing slash\n dir = dir.substr(0, dir.length - 1);\n }\n\n return root + dir;\n};\n\n\nexports.basename = function(path, ext) {\n var f = splitPath(path)[2];\n // TODO: make this comparison case-insensitive on windows?\n if (ext && f.substr(-1 * ext.length) === ext) {\n f = f.substr(0, f.length - ext.length);\n }\n return f;\n};\n\n\nexports.extname = function(path) {\n return splitPath(path)[3];\n};\n\nfunction filter (xs, f) {\n if (xs.filter) return xs.filter(f);\n var res = [];\n for (var i = 0; i < xs.length; i++) {\n if (f(xs[i], i, xs)) res.push(xs[i]);\n }\n return res;\n}\n\n// String.prototype.substr - negative index don't work in IE8\nvar substr = 'ab'.substr(-1) === 'b'\n ? function (str, start, len) { return str.substr(start, len) }\n : function (str, start, len) {\n if (start < 0) start = str.length + start;\n return str.substr(start, len);\n }\n;\n",
"'use strict';\n\nmodule.exports = Pbf;\n\nvar ieee754 = require('ieee754');\n\nfunction Pbf(buf) {\n this.buf = ArrayBuffer.isView && ArrayBuffer.isView(buf) ? buf : new Uint8Array(buf || 0);\n this.pos = 0;\n this.type = 0;\n this.length = this.buf.length;\n}\n\nPbf.Varint = 0; // varint: int32, int64, uint32, uint64, sint32, sint64, bool, enum\nPbf.Fixed64 = 1; // 64-bit: double, fixed64, sfixed64\nPbf.Bytes = 2; // length-delimited: string, bytes, embedded messages, packed repeated fields\nPbf.Fixed32 = 5; // 32-bit: float, fixed32, sfixed32\n\nvar SHIFT_LEFT_32 = (1 << 16) * (1 << 16),\n SHIFT_RIGHT_32 = 1 / SHIFT_LEFT_32;\n\nPbf.prototype = {\n\n destroy: function() {\n this.buf = null;\n },\n\n // === READING =================================================================\n\n readFields: function(readField, result, end) {\n end = end || this.length;\n\n while (this.pos < end) {\n var val = this.readVarint(),\n tag = val >> 3,\n startPos = this.pos;\n\n this.type = val & 0x7;\n readField(tag, result, this);\n\n if (this.pos === startPos) this.skip(val);\n }\n return result;\n },\n\n readMessage: function(readField, result) {\n return this.readFields(readField, result, this.readVarint() + this.pos);\n },\n\n readFixed32: function() {\n var val = readUInt32(this.buf, this.pos);\n this.pos += 4;\n return val;\n },\n\n readSFixed32: function() {\n var val = readInt32(this.buf, this.pos);\n this.pos += 4;\n return val;\n },\n\n // 64-bit int handling is based on github.com/dpw/node-buffer-more-ints (MIT-licensed)\n\n readFixed64: function() {\n var val = readUInt32(this.buf, this.pos) + readUInt32(this.buf, this.pos + 4) * SHIFT_LEFT_32;\n this.pos += 8;\n return val;\n },\n\n readSFixed64: function() {\n var val = readUInt32(this.buf, this.pos) + readInt32(this.buf, this.pos + 4) * SHIFT_LEFT_32;\n this.pos += 8;\n return val;\n },\n\n readFloat: function() {\n var val = ieee754.read(this.buf, this.pos, true, 23, 4);\n this.pos += 4;\n return val;\n },\n\n readDouble: function() {\n var val = ieee754.read(this.buf, this.pos, true, 52, 8);\n this.pos += 8;\n return val;\n },\n\n readVarint: function(isSigned) {\n var buf = this.buf,\n val, b;\n\n b = buf[this.pos++]; val = b & 0x7f; if (b < 0x80) return val;\n b = buf[this.pos++]; val |= (b & 0x7f) << 7; if (b < 0x80) return val;\n b = buf[this.pos++]; val |= (b & 0x7f) << 14; if (b < 0x80) return val;\n b = buf[this.pos++]; val |= (b & 0x7f) << 21; if (b < 0x80) return val;\n b = buf[this.pos]; val |= (b & 0x0f) << 28;\n\n return readVarintRemainder(val, isSigned, this);\n },\n\n readVarint64: function() { // for compatibility with v2.0.1\n return this.readVarint(true);\n },\n\n readSVarint: function() {\n var num = this.readVarint();\n return num % 2 === 1 ? (num + 1) / -2 : num / 2; // zigzag encoding\n },\n\n readBoolean: function() {\n return Boolean(this.readVarint());\n },\n\n readString: function() {\n var end = this.readVarint() + this.pos,\n str = readUtf8(this.buf, this.pos, end);\n this.pos = end;\n return str;\n },\n\n readBytes: function() {\n var end = this.readVarint() + this.pos,\n buffer = this.buf.subarray(this.pos, end);\n this.pos = end;\n return buffer;\n },\n\n // verbose for performance reasons; doesn't affect gzipped size\n\n readPackedVarint: function(arr, isSigned) {\n var end = readPackedEnd(this);\n arr = arr || [];\n while (this.pos < end) arr.push(this.readVarint(isSigned));\n return arr;\n },\n readPackedSVarint: function(arr) {\n var end = readPackedEnd(this);\n arr = arr || [];\n while (this.pos < end) arr.push(this.readSVarint());\n return arr;\n },\n readPackedBoolean: function(arr) {\n var end = readPackedEnd(this);\n arr = arr || [];\n while (this.pos < end) arr.push(this.readBoolean());\n return arr;\n },\n readPackedFloat: function(arr) {\n var end = readPackedEnd(this);\n arr = arr || [];\n while (this.pos < end) arr.push(this.readFloat());\n return arr;\n },\n readPackedDouble: function(arr) {\n var end = readPackedEnd(this);\n arr = arr || [];\n while (this.pos < end) arr.push(this.readDouble());\n return arr;\n },\n readPackedFixed32: function(arr) {\n var end = readPackedEnd(this);\n arr = arr || [];\n while (this.pos < end) arr.push(this.readFixed32());\n return arr;\n },\n readPackedSFixed32: function(arr) {\n var end = readPackedEnd(this);\n arr = arr || [];\n while (this.pos < end) arr.push(this.readSFixed32());\n return arr;\n },\n readPackedFixed64: function(arr) {\n var end = readPackedEnd(this);\n arr = arr || [];\n while (this.pos < end) arr.push(this.readFixed64());\n return arr;\n },\n readPackedSFixed64: function(arr) {\n var end = readPackedEnd(this);\n arr = arr || [];\n while (this.pos < end) arr.push(this.readSFixed64());\n return arr;\n },\n\n skip: function(val) {\n var type = val & 0x7;\n if (type === Pbf.Varint) while (this.buf[this.pos++] > 0x7f) {}\n else if (type === Pbf.Bytes) this.pos = this.readVarint() + this.pos;\n else if (type === Pbf.Fixed32) this.pos += 4;\n else if (type === Pbf.Fixed64) this.pos += 8;\n else throw new Error('Unimplemented type: ' + type);\n },\n\n // === WRITING =================================================================\n\n writeTag: function(tag, type) {\n this.writeVarint((tag << 3) | type);\n },\n\n realloc: function(min) {\n var length = this.length || 16;\n\n while (length < this.pos + min) length *= 2;\n\n if (length !== this.length) {\n var buf = new Uint8Array(length);\n buf.set(this.buf);\n this.buf = buf;\n this.length = length;\n }\n },\n\n finish: function() {\n this.length = this.pos;\n this.pos = 0;\n return this.buf.subarray(0, this.length);\n },\n\n writeFixed32: function(val) {\n this.realloc(4);\n writeInt32(this.buf, val, this.pos);\n this.pos += 4;\n },\n\n writeSFixed32: function(val) {\n this.realloc(4);\n writeInt32(this.buf, val, this.pos);\n this.pos += 4;\n },\n\n writeFixed64: function(val) {\n this.realloc(8);\n writeInt32(this.buf, val & -1, this.pos);\n writeInt32(this.buf, Math.floor(val * SHIFT_RIGHT_32), this.pos + 4);\n this.pos += 8;\n },\n\n writeSFixed64: function(val) {\n this.realloc(8);\n writeInt32(this.buf, val & -1, this.pos);\n writeInt32(this.buf, Math.floor(val * SHIFT_RIGHT_32), this.pos + 4);\n this.pos += 8;\n },\n\n writeVarint: function(val) {\n val = +val || 0;\n\n if (val > 0xfffffff || val < 0) {\n writeBigVarint(val, this);\n return;\n }\n\n this.realloc(4);\n\n this.buf[this.pos++] = val & 0x7f | (val > 0x7f ? 0x80 : 0); if (val <= 0x7f) return;\n this.buf[this.pos++] = ((val >>>= 7) & 0x7f) | (val > 0x7f ? 0x80 : 0); if (val <= 0x7f) return;\n this.buf[this.pos++] = ((val >>>= 7) & 0x7f) | (val > 0x7f ? 0x80 : 0); if (val <= 0x7f) return;\n this.buf[this.pos++] = (val >>> 7) & 0x7f;\n },\n\n writeSVarint: function(val) {\n this.writeVarint(val < 0 ? -val * 2 - 1 : val * 2);\n },\n\n writeBoolean: function(val) {\n this.writeVarint(Boolean(val));\n },\n\n writeString: function(str) {\n str = String(str);\n this.realloc(str.length * 4);\n\n this.pos++; // reserve 1 byte for short string length\n\n var startPos = this.pos;\n // write the string directly to the buffer and see how much was written\n this.pos = writeUtf8(this.buf, str, this.pos);\n var len = this.pos - startPos;\n\n if (len >= 0x80) makeRoomForExtraLength(startPos, len, this);\n\n // finally, write the message length in the reserved place and restore the position\n this.pos = startPos - 1;\n this.writeVarint(len);\n this.pos += len;\n },\n\n writeFloat: function(val) {\n this.realloc(4);\n ieee754.write(this.buf, val, this.pos, true, 23, 4);\n this.pos += 4;\n },\n\n writeDouble: function(val) {\n this.realloc(8);\n ieee754.write(this.buf, val, this.pos, true, 52, 8);\n this.pos += 8;\n },\n\n writeBytes: function(buffer) {\n var len = buffer.length;\n this.writeVarint(len);\n this.realloc(len);\n for (var i = 0; i < len; i++) this.buf[this.pos++] = buffer[i];\n },\n\n writeRawMessage: function(fn, obj) {\n this.pos++; // reserve 1 byte for short message length\n\n // write the message directly to the buffer and see how much was written\n var startPos = this.pos;\n fn(obj, this);\n var len = this.pos - startPos;\n\n if (len >= 0x80) makeRoomForExtraLength(startPos, len, this);\n\n // finally, write the message length in the reserved place and restore the position\n this.pos = startPos - 1;\n this.writeVarint(len);\n this.pos += len;\n },\n\n writeMessage: function(tag, fn, obj) {\n this.writeTag(tag, Pbf.Bytes);\n this.writeRawMessage(fn, obj);\n },\n\n writePackedVarint: function(tag, arr) { this.writeMessage(tag, writePackedVarint, arr); },\n writePackedSVarint: function(tag, arr) { this.writeMessage(tag, writePackedSVarint, arr); },\n writePackedBoolean: function(tag, arr) { this.writeMessage(tag, writePackedBoolean, arr); },\n writePackedFloat: function(tag, arr) { this.writeMessage(tag, writePackedFloat, arr); },\n writePackedDouble: function(tag, arr) { this.writeMessage(tag, writePackedDouble, arr); },\n writePackedFixed32: function(tag, arr) { this.writeMessage(tag, writePackedFixed32, arr); },\n writePackedSFixed32: function(tag, arr) { this.writeMessage(tag, writePackedSFixed32, arr); },\n writePackedFixed64: function(tag, arr) { this.writeMessage(tag, writePackedFixed64, arr); },\n writePackedSFixed64: function(tag, arr) { this.writeMessage(tag, writePackedSFixed64, arr); },\n\n writeBytesField: function(tag, buffer) {\n this.writeTag(tag, Pbf.Bytes);\n this.writeBytes(buffer);\n },\n writeFixed32Field: function(tag, val) {\n this.writeTag(tag, Pbf.Fixed32);\n this.writeFixed32(val);\n },\n writeSFixed32Field: function(tag, val) {\n this.writeTag(tag, Pbf.Fixed32);\n this.writeSFixed32(val);\n },\n writeFixed64Field: function(tag, val) {\n this.writeTag(tag, Pbf.Fixed64);\n this.writeFixed64(val);\n },\n writeSFixed64Field: function(tag, val) {\n this.writeTag(tag, Pbf.Fixed64);\n this.writeSFixed64(val);\n },\n writeVarintField: function(tag, val) {\n this.writeTag(tag, Pbf.Varint);\n this.writeVarint(val);\n },\n writeSVarintField: function(tag, val) {\n this.writeTag(tag, Pbf.Varint);\n this.writeSVarint(val);\n },\n writeStringField: function(tag, str) {\n this.writeTag(tag, Pbf.Bytes);\n this.writeString(str);\n },\n writeFloatField: function(tag, val) {\n this.writeTag(tag, Pbf.Fixed32);\n this.writeFloat(val);\n },\n writeDoubleField: function(tag, val) {\n this.writeTag(tag, Pbf.Fixed64);\n this.writeDouble(val);\n },\n writeBooleanField: function(tag, val) {\n this.writeVarintField(tag, Boolean(val));\n }\n};\n\nfunction readVarintRemainder(l, s, p) {\n var buf = p.buf,\n h, b;\n\n b = buf[p.pos++]; h = (b & 0x70) >> 4; if (b < 0x80) return toNum(l, h, s);\n b = buf[p.pos++]; h |= (b & 0x7f) << 3; if (b < 0x80) return toNum(l, h, s);\n b = buf[p.pos++]; h |= (b & 0x7f) << 10; if (b < 0x80) return toNum(l, h, s);\n b = buf[p.pos++]; h |= (b & 0x7f) << 17; if (b < 0x80) return toNum(l, h, s);\n b = buf[p.pos++]; h |= (b & 0x7f) << 24; if (b < 0x80) return toNum(l, h, s);\n b = buf[p.pos++]; h |= (b & 0x01) << 31; if (b < 0x80) return toNum(l, h, s);\n\n throw new Error('Expected varint not more than 10 bytes');\n}\n\nfunction readPackedEnd(pbf) {\n return pbf.type === Pbf.Bytes ?\n pbf.readVarint() + pbf.pos : pbf.pos + 1;\n}\n\nfunction toNum(low, high, isSigned) {\n if (isSigned) {\n return high * 0x100000000 + (low >>> 0);\n }\n\n return ((high >>> 0) * 0x100000000) + (low >>> 0);\n}\n\nfunction writeBigVarint(val, pbf) {\n var low, high;\n\n if (val >= 0) {\n low = (val % 0x100000000) | 0;\n high = (val / 0x100000000) | 0;\n } else {\n low = ~(-val % 0x100000000);\n high = ~(-val / 0x100000000);\n\n if (low ^ 0xffffffff) {\n low = (low + 1) | 0;\n } else {\n low = 0;\n high = (high + 1) | 0;\n }\n }\n\n if (val >= 0x10000000000000000 || val < -0x10000000000000000) {\n throw new Error('Given varint doesn\\'t fit into 10 bytes');\n }\n\n pbf.realloc(10);\n\n writeBigVarintLow(low, high, pbf);\n writeBigVarintHigh(high, pbf);\n}\n\nfunction writeBigVarintLow(low, high, pbf) {\n pbf.buf[pbf.pos++] = low & 0x7f | 0x80; low >>>= 7;\n pbf.buf[pbf.pos++] = low & 0x7f | 0x80; low >>>= 7;\n pbf.buf[pbf.pos++] = low & 0x7f | 0x80; low >>>= 7;\n pbf.buf[pbf.pos++] = low & 0x7f | 0x80; low >>>= 7;\n pbf.buf[pbf.pos] = low & 0x7f;\n}\n\nfunction writeBigVarintHigh(high, pbf) {\n var lsb = (high & 0x07) << 4;\n\n pbf.buf[pbf.pos++] |= lsb | ((high >>>= 3) ? 0x80 : 0); if (!high) return;\n pbf.buf[pbf.pos++] = high & 0x7f | ((high >>>= 7) ? 0x80 : 0); if (!high) return;\n pbf.buf[pbf.pos++] = high & 0x7f | ((high >>>= 7) ? 0x80 : 0); if (!high) return;\n pbf.buf[pbf.pos++] = high & 0x7f | ((high >>>= 7) ? 0x80 : 0); if (!high) return;\n pbf.buf[pbf.pos++] = high & 0x7f | ((high >>>= 7) ? 0x80 : 0); if (!high) return;\n pbf.buf[pbf.pos++] = high & 0x7f;\n}\n\nfunction makeRoomForExtraLength(startPos, len, pbf) {\n var extraLen =\n len <= 0x3fff ? 1 :\n len <= 0x1fffff ? 2 :\n len <= 0xfffffff ? 3 : Math.ceil(Math.log(len) / (Math.LN2 * 7));\n\n // if 1 byte isn't enough for encoding message length, shift the data to the right\n pbf.realloc(extraLen);\n for (var i = pbf.pos - 1; i >= startPos; i--) pbf.buf[i + extraLen] = pbf.buf[i];\n}\n\nfunction writePackedVarint(arr, pbf) { for (var i = 0; i < arr.length; i++) pbf.writeVarint(arr[i]); }\nfunction writePackedSVarint(arr, pbf) { for (var i = 0; i < arr.length; i++) pbf.writeSVarint(arr[i]); }\nfunction writePackedFloat(arr, pbf) { for (var i = 0; i < arr.length; i++) pbf.writeFloat(arr[i]); }\nfunction writePackedDouble(arr, pbf) { for (var i = 0; i < arr.length; i++) pbf.writeDouble(arr[i]); }\nfunction writePackedBoolean(arr, pbf) { for (var i = 0; i < arr.length; i++) pbf.writeBoolean(arr[i]); }\nfunction writePackedFixed32(arr, pbf) { for (var i = 0; i < arr.length; i++) pbf.writeFixed32(arr[i]); }\nfunction writePackedSFixed32(arr, pbf) { for (var i = 0; i < arr.length; i++) pbf.writeSFixed32(arr[i]); }\nfunction writePackedFixed64(arr, pbf) { for (var i = 0; i < arr.length; i++) pbf.writeFixed64(arr[i]); }\nfunction writePackedSFixed64(arr, pbf) { for (var i = 0; i < arr.length; i++) pbf.writeSFixed64(arr[i]); }\n\n// Buffer code below from https://github.com/feross/buffer, MIT-licensed\n\nfunction readUInt32(buf, pos) {\n return ((buf[pos]) |\n (buf[pos + 1] << 8) |\n (buf[pos + 2] << 16)) +\n (buf[pos + 3] * 0x1000000);\n}\n\nfunction writeInt32(buf, val, pos) {\n buf[pos] = val;\n buf[pos + 1] = (val >>> 8);\n buf[pos + 2] = (val >>> 16);\n buf[pos + 3] = (val >>> 24);\n}\n\nfunction readInt32(buf, pos) {\n return ((buf[pos]) |\n (buf[pos + 1] << 8) |\n (buf[pos + 2] << 16)) +\n (buf[pos + 3] << 24);\n}\n\nfunction readUtf8(buf, pos, end) {\n var str = '';\n var i = pos;\n\n while (i < end) {\n var b0 = buf[i];\n var c = null; // codepoint\n var bytesPerSequence =\n b0 > 0xEF ? 4 :\n b0 > 0xDF ? 3 :\n b0 > 0xBF ? 2 : 1;\n\n if (i + bytesPerSequence > end) break;\n\n var b1, b2, b3;\n\n if (bytesPerSequence === 1) {\n if (b0 < 0x80) {\n c = b0;\n }\n } else if (bytesPerSequence === 2) {\n b1 = buf[i + 1];\n if ((b1 & 0xC0) === 0x80) {\n c = (b0 & 0x1F) << 0x6 | (b1 & 0x3F);\n if (c <= 0x7F) {\n c = null;\n }\n }\n } else if (bytesPerSequence === 3) {\n b1 = buf[i + 1];\n b2 = buf[i + 2];\n if ((b1 & 0xC0) === 0x80 && (b2 & 0xC0) === 0x80) {\n c = (b0 & 0xF) << 0xC | (b1 & 0x3F) << 0x6 | (b2 & 0x3F);\n if (c <= 0x7FF || (c >= 0xD800 && c <= 0xDFFF)) {\n c = null;\n }\n }\n } else if (bytesPerSequence === 4) {\n b1 = buf[i + 1];\n b2 = buf[i + 2];\n b3 = buf[i + 3];\n if ((b1 & 0xC0) === 0x80 && (b2 & 0xC0) === 0x80 && (b3 & 0xC0) === 0x80) {\n c = (b0 & 0xF) << 0x12 | (b1 & 0x3F) << 0xC | (b2 & 0x3F) << 0x6 | (b3 & 0x3F);\n if (c <= 0xFFFF || c >= 0x110000) {\n c = null;\n }\n }\n }\n\n if (c === null) {\n c = 0xFFFD;\n bytesPerSequence = 1;\n\n } else if (c > 0xFFFF) {\n c -= 0x10000;\n str += String.fromCharCode(c >>> 10 & 0x3FF | 0xD800);\n c = 0xDC00 | c & 0x3FF;\n }\n\n str += String.fromCharCode(c);\n i += bytesPerSequence;\n }\n\n return str;\n}\n\nfunction writeUtf8(buf, str, pos) {\n for (var i = 0, c, lead; i < str.length; i++) {\n c = str.charCodeAt(i); // code point\n\n if (c > 0xD7FF && c < 0xE000) {\n if (lead) {\n if (c < 0xDC00) {\n buf[pos++] = 0xEF;\n buf[pos++] = 0xBF;\n buf[pos++] = 0xBD;\n lead = c;\n continue;\n } else {\n c = lead - 0xD800 << 10 | c - 0xDC00 | 0x10000;\n lead = null;\n }\n } else {\n if (c > 0xDBFF || (i + 1 === str.length)) {\n buf[pos++] = 0xEF;\n buf[pos++] = 0xBF;\n buf[pos++] = 0xBD;\n } else {\n lead = c;\n }\n continue;\n }\n } else if (lead) {\n buf[pos++] = 0xEF;\n buf[pos++] = 0xBF;\n buf[pos++] = 0xBD;\n lead = null;\n }\n\n if (c < 0x80) {\n buf[pos++] = c;\n } else {\n if (c < 0x800) {\n buf[pos++] = c >> 0x6 | 0xC0;\n } else {\n if (c < 0x10000) {\n buf[pos++] = c >> 0xC | 0xE0;\n } else {\n buf[pos++] = c >> 0x12 | 0xF0;\n buf[pos++] = c >> 0xC & 0x3F | 0x80;\n }\n buf[pos++] = c >> 0x6 & 0x3F | 0x80;\n }\n buf[pos++] = c & 0x3F | 0x80;\n }\n }\n return pos;\n}\n",
- "'use strict';\n\nmodule.exports = partialSort;\n\n// Floyd-Rivest selection algorithm:\n// Rearrange items so that all items in the [left, k] range are smaller than all items in (k, right];\n// The k-th element will have the (k - left + 1)th smallest value in [left, right]\n\nfunction partialSort(arr, k, left, right, compare) {\n left = left || 0;\n right = right || (arr.length - 1);\n compare = compare || defaultCompare;\n\n while (right > left) {\n if (right - left > 600) {\n var n = right - left + 1;\n var m = k - left + 1;\n var z = Math.log(n);\n var s = 0.5 * Math.exp(2 * z / 3);\n var sd = 0.5 * Math.sqrt(z * s * (n - s) / n) * (m - n / 2 < 0 ? -1 : 1);\n var newLeft = Math.max(left, Math.floor(k - m * s / n + sd));\n var newRight = Math.min(right, Math.floor(k + (n - m) * s / n + sd));\n partialSort(arr, k, newLeft, newRight, compare);\n }\n\n var t = arr[k];\n var i = left;\n var j = right;\n\n swap(arr, left, k);\n if (compare(arr[right], t) > 0) swap(arr, left, right);\n\n while (i < j) {\n swap(arr, i, j);\n i++;\n j--;\n while (compare(arr[i], t) < 0) i++;\n while (compare(arr[j], t) > 0) j--;\n }\n\n if (compare(arr[left], t) === 0) swap(arr, left, j);\n else {\n j++;\n swap(arr, j, right);\n }\n\n if (j <= k) left = j + 1;\n if (k <= j) right = j - 1;\n }\n}\n\nfunction swap(arr, i, j) {\n var tmp = arr[i];\n arr[i] = arr[j];\n arr[j] = tmp;\n}\n\nfunction defaultCompare(a, b) {\n return a < b ? -1 : a > b ? 1 : 0;\n}\n",
- "'use strict';\n\nmodule.exports = rbush;\n\nvar quickselect = require('quickselect');\n\nfunction rbush(maxEntries, format) {\n if (!(this instanceof rbush)) return new rbush(maxEntries, format);\n\n // max entries in a node is 9 by default; min node fill is 40% for best performance\n this._maxEntries = Math.max(4, maxEntries || 9);\n this._minEntries = Math.max(2, Math.ceil(this._maxEntries * 0.4));\n\n if (format) {\n this._initFormat(format);\n }\n\n this.clear();\n}\n\nrbush.prototype = {\n\n all: function () {\n return this._all(this.data, []);\n },\n\n search: function (bbox) {\n\n var node = this.data,\n result = [],\n toBBox = this.toBBox;\n\n if (!intersects(bbox, node)) return result;\n\n var nodesToSearch = [],\n i, len, child, childBBox;\n\n while (node) {\n for (i = 0, len = node.children.length; i < len; i++) {\n\n child = node.children[i];\n childBBox = node.leaf ? toBBox(child) : child;\n\n if (intersects(bbox, childBBox)) {\n if (node.leaf) result.push(child);\n else if (contains(bbox, childBBox)) this._all(child, result);\n else nodesToSearch.push(child);\n }\n }\n node = nodesToSearch.pop();\n }\n\n return result;\n },\n\n collides: function (bbox) {\n\n var node = this.data,\n toBBox = this.toBBox;\n\n if (!intersects(bbox, node)) return false;\n\n var nodesToSearch = [],\n i, len, child, childBBox;\n\n while (node) {\n for (i = 0, len = node.children.length; i < len; i++) {\n\n child = node.children[i];\n childBBox = node.leaf ? toBBox(child) : child;\n\n if (intersects(bbox, childBBox)) {\n if (node.leaf || contains(bbox, childBBox)) return true;\n nodesToSearch.push(child);\n }\n }\n node = nodesToSearch.pop();\n }\n\n return false;\n },\n\n load: function (data) {\n if (!(data && data.length)) return this;\n\n if (data.length < this._minEntries) {\n for (var i = 0, len = data.length; i < len; i++) {\n this.insert(data[i]);\n }\n return this;\n }\n\n // recursively build the tree with the given data from stratch using OMT algorithm\n var node = this._build(data.slice(), 0, data.length - 1, 0);\n\n if (!this.data.children.length) {\n // save as is if tree is empty\n this.data = node;\n\n } else if (this.data.height === node.height) {\n // split root if trees have the same height\n this._splitRoot(this.data, node);\n\n } else {\n if (this.data.height < node.height) {\n // swap trees if inserted one is bigger\n var tmpNode = this.data;\n this.data = node;\n node = tmpNode;\n }\n\n // insert the small tree into the large tree at appropriate level\n this._insert(node, this.data.height - node.height - 1, true);\n }\n\n return this;\n },\n\n insert: function (item) {\n if (item) this._insert(item, this.data.height - 1);\n return this;\n },\n\n clear: function () {\n this.data = createNode([]);\n return this;\n },\n\n remove: function (item, equalsFn) {\n if (!item) return this;\n\n var node = this.data,\n bbox = this.toBBox(item),\n path = [],\n indexes = [],\n i, parent, index, goingUp;\n\n // depth-first iterative tree traversal\n while (node || path.length) {\n\n if (!node) { // go up\n node = path.pop();\n parent = path[path.length - 1];\n i = indexes.pop();\n goingUp = true;\n }\n\n if (node.leaf) { // check current node\n index = findItem(item, node.children, equalsFn);\n\n if (index !== -1) {\n // item found, remove the item and condense tree upwards\n node.children.splice(index, 1);\n path.push(node);\n this._condense(path);\n return this;\n }\n }\n\n if (!goingUp && !node.leaf && contains(node, bbox)) { // go down\n path.push(node);\n indexes.push(i);\n i = 0;\n parent = node;\n node = node.children[0];\n\n } else if (parent) { // go right\n i++;\n node = parent.children[i];\n goingUp = false;\n\n } else node = null; // nothing found\n }\n\n return this;\n },\n\n toBBox: function (item) { return item; },\n\n compareMinX: compareNodeMinX,\n compareMinY: compareNodeMinY,\n\n toJSON: function () { return this.data; },\n\n fromJSON: function (data) {\n this.data = data;\n return this;\n },\n\n _all: function (node, result) {\n var nodesToSearch = [];\n while (node) {\n if (node.leaf) result.push.apply(result, node.children);\n else nodesToSearch.push.apply(nodesToSearch, node.children);\n\n node = nodesToSearch.pop();\n }\n return result;\n },\n\n _build: function (items, left, right, height) {\n\n var N = right - left + 1,\n M = this._maxEntries,\n node;\n\n if (N <= M) {\n // reached leaf level; return leaf\n node = createNode(items.slice(left, right + 1));\n calcBBox(node, this.toBBox);\n return node;\n }\n\n if (!height) {\n // target height of the bulk-loaded tree\n height = Math.ceil(Math.log(N) / Math.log(M));\n\n // target number of root entries to maximize storage utilization\n M = Math.ceil(N / Math.pow(M, height - 1));\n }\n\n node = createNode([]);\n node.leaf = false;\n node.height = height;\n\n // split the items into M mostly square tiles\n\n var N2 = Math.ceil(N / M),\n N1 = N2 * Math.ceil(Math.sqrt(M)),\n i, j, right2, right3;\n\n multiSelect(items, left, right, N1, this.compareMinX);\n\n for (i = left; i <= right; i += N1) {\n\n right2 = Math.min(i + N1 - 1, right);\n\n multiSelect(items, i, right2, N2, this.compareMinY);\n\n for (j = i; j <= right2; j += N2) {\n\n right3 = Math.min(j + N2 - 1, right2);\n\n // pack each entry recursively\n node.children.push(this._build(items, j, right3, height - 1));\n }\n }\n\n calcBBox(node, this.toBBox);\n\n return node;\n },\n\n _chooseSubtree: function (bbox, node, level, path) {\n\n var i, len, child, targetNode, area, enlargement, minArea, minEnlargement;\n\n while (true) {\n path.push(node);\n\n if (node.leaf || path.length - 1 === level) break;\n\n minArea = minEnlargement = Infinity;\n\n for (i = 0, len = node.children.length; i < len; i++) {\n child = node.children[i];\n area = bboxArea(child);\n enlargement = enlargedArea(bbox, child) - area;\n\n // choose entry with the least area enlargement\n if (enlargement < minEnlargement) {\n minEnlargement = enlargement;\n minArea = area < minArea ? area : minArea;\n targetNode = child;\n\n } else if (enlargement === minEnlargement) {\n // otherwise choose one with the smallest area\n if (area < minArea) {\n minArea = area;\n targetNode = child;\n }\n }\n }\n\n node = targetNode || node.children[0];\n }\n\n return node;\n },\n\n _insert: function (item, level, isNode) {\n\n var toBBox = this.toBBox,\n bbox = isNode ? item : toBBox(item),\n insertPath = [];\n\n // find the best node for accommodating the item, saving all nodes along the path too\n var node = this._chooseSubtree(bbox, this.data, level, insertPath);\n\n // put the item into the node\n node.children.push(item);\n extend(node, bbox);\n\n // split on node overflow; propagate upwards if necessary\n while (level >= 0) {\n if (insertPath[level].children.length > this._maxEntries) {\n this._split(insertPath, level);\n level--;\n } else break;\n }\n\n // adjust bboxes along the insertion path\n this._adjustParentBBoxes(bbox, insertPath, level);\n },\n\n // split overflowed node into two\n _split: function (insertPath, level) {\n\n var node = insertPath[level],\n M = node.children.length,\n m = this._minEntries;\n\n this._chooseSplitAxis(node, m, M);\n\n var splitIndex = this._chooseSplitIndex(node, m, M);\n\n var newNode = createNode(node.children.splice(splitIndex, node.children.length - splitIndex));\n newNode.height = node.height;\n newNode.leaf = node.leaf;\n\n calcBBox(node, this.toBBox);\n calcBBox(newNode, this.toBBox);\n\n if (level) insertPath[level - 1].children.push(newNode);\n else this._splitRoot(node, newNode);\n },\n\n _splitRoot: function (node, newNode) {\n // split root node\n this.data = createNode([node, newNode]);\n this.data.height = node.height + 1;\n this.data.leaf = false;\n calcBBox(this.data, this.toBBox);\n },\n\n _chooseSplitIndex: function (node, m, M) {\n\n var i, bbox1, bbox2, overlap, area, minOverlap, minArea, index;\n\n minOverlap = minArea = Infinity;\n\n for (i = m; i <= M - m; i++) {\n bbox1 = distBBox(node, 0, i, this.toBBox);\n bbox2 = distBBox(node, i, M, this.toBBox);\n\n overlap = intersectionArea(bbox1, bbox2);\n area = bboxArea(bbox1) + bboxArea(bbox2);\n\n // choose distribution with minimum overlap\n if (overlap < minOverlap) {\n minOverlap = overlap;\n index = i;\n\n minArea = area < minArea ? area : minArea;\n\n } else if (overlap === minOverlap) {\n // otherwise choose distribution with minimum area\n if (area < minArea) {\n minArea = area;\n index = i;\n }\n }\n }\n\n return index;\n },\n\n // sorts node children by the best axis for split\n _chooseSplitAxis: function (node, m, M) {\n\n var compareMinX = node.leaf ? this.compareMinX : compareNodeMinX,\n compareMinY = node.leaf ? this.compareMinY : compareNodeMinY,\n xMargin = this._allDistMargin(node, m, M, compareMinX),\n yMargin = this._allDistMargin(node, m, M, compareMinY);\n\n // if total distributions margin value is minimal for x, sort by minX,\n // otherwise it's already sorted by minY\n if (xMargin < yMargin) node.children.sort(compareMinX);\n },\n\n // total margin of all possible split distributions where each node is at least m full\n _allDistMargin: function (node, m, M, compare) {\n\n node.children.sort(compare);\n\n var toBBox = this.toBBox,\n leftBBox = distBBox(node, 0, m, toBBox),\n rightBBox = distBBox(node, M - m, M, toBBox),\n margin = bboxMargin(leftBBox) + bboxMargin(rightBBox),\n i, child;\n\n for (i = m; i < M - m; i++) {\n child = node.children[i];\n extend(leftBBox, node.leaf ? toBBox(child) : child);\n margin += bboxMargin(leftBBox);\n }\n\n for (i = M - m - 1; i >= m; i--) {\n child = node.children[i];\n extend(rightBBox, node.leaf ? toBBox(child) : child);\n margin += bboxMargin(rightBBox);\n }\n\n return margin;\n },\n\n _adjustParentBBoxes: function (bbox, path, level) {\n // adjust bboxes along the given tree path\n for (var i = level; i >= 0; i--) {\n extend(path[i], bbox);\n }\n },\n\n _condense: function (path) {\n // go through the path, removing empty nodes and updating bboxes\n for (var i = path.length - 1, siblings; i >= 0; i--) {\n if (path[i].children.length === 0) {\n if (i > 0) {\n siblings = path[i - 1].children;\n siblings.splice(siblings.indexOf(path[i]), 1);\n\n } else this.clear();\n\n } else calcBBox(path[i], this.toBBox);\n }\n },\n\n _initFormat: function (format) {\n // data format (minX, minY, maxX, maxY accessors)\n\n // uses eval-type function compilation instead of just accepting a toBBox function\n // because the algorithms are very sensitive to sorting functions performance,\n // so they should be dead simple and without inner calls\n\n var compareArr = ['return a', ' - b', ';'];\n\n this.compareMinX = new Function('a', 'b', compareArr.join(format[0]));\n this.compareMinY = new Function('a', 'b', compareArr.join(format[1]));\n\n this.toBBox = new Function('a',\n 'return {minX: a' + format[0] +\n ', minY: a' + format[1] +\n ', maxX: a' + format[2] +\n ', maxY: a' + format[3] + '};');\n }\n};\n\nfunction findItem(item, items, equalsFn) {\n if (!equalsFn) return items.indexOf(item);\n\n for (var i = 0; i < items.length; i++) {\n if (equalsFn(item, items[i])) return i;\n }\n return -1;\n}\n\n// calculate node's bbox from bboxes of its children\nfunction calcBBox(node, toBBox) {\n distBBox(node, 0, node.children.length, toBBox, node);\n}\n\n// min bounding rectangle of node children from k to p-1\nfunction distBBox(node, k, p, toBBox, destNode) {\n if (!destNode) destNode = createNode(null);\n destNode.minX = Infinity;\n destNode.minY = Infinity;\n destNode.maxX = -Infinity;\n destNode.maxY = -Infinity;\n\n for (var i = k, child; i < p; i++) {\n child = node.children[i];\n extend(destNode, node.leaf ? toBBox(child) : child);\n }\n\n return destNode;\n}\n\nfunction extend(a, b) {\n a.minX = Math.min(a.minX, b.minX);\n a.minY = Math.min(a.minY, b.minY);\n a.maxX = Math.max(a.maxX, b.maxX);\n a.maxY = Math.max(a.maxY, b.maxY);\n return a;\n}\n\nfunction compareNodeMinX(a, b) { return a.minX - b.minX; }\nfunction compareNodeMinY(a, b) { return a.minY - b.minY; }\n\nfunction bboxArea(a) { return (a.maxX - a.minX) * (a.maxY - a.minY); }\nfunction bboxMargin(a) { return (a.maxX - a.minX) + (a.maxY - a.minY); }\n\nfunction enlargedArea(a, b) {\n return (Math.max(b.maxX, a.maxX) - Math.min(b.minX, a.minX)) *\n (Math.max(b.maxY, a.maxY) - Math.min(b.minY, a.minY));\n}\n\nfunction intersectionArea(a, b) {\n var minX = Math.max(a.minX, b.minX),\n minY = Math.max(a.minY, b.minY),\n maxX = Math.min(a.maxX, b.maxX),\n maxY = Math.min(a.maxY, b.maxY);\n\n return Math.max(0, maxX - minX) *\n Math.max(0, maxY - minY);\n}\n\nfunction contains(a, b) {\n return a.minX <= b.minX &&\n a.minY <= b.minY &&\n b.maxX <= a.maxX &&\n b.maxY <= a.maxY;\n}\n\nfunction intersects(a, b) {\n return b.minX <= a.maxX &&\n b.minY <= a.maxY &&\n b.maxX >= a.minX &&\n b.maxY >= a.minY;\n}\n\nfunction createNode(children) {\n return {\n children: children,\n height: 1,\n leaf: true,\n minX: Infinity,\n minY: Infinity,\n maxX: -Infinity,\n maxY: -Infinity\n };\n}\n\n// sort an array so that items come in groups of n unsorted items, with groups sorted between each other;\n// combines selection algorithm with binary divide & conquer approach\n\nfunction multiSelect(arr, left, right, n, compare) {\n var stack = [left, right],\n mid;\n\n while (stack.length) {\n right = stack.pop();\n left = stack.pop();\n\n if (right - left <= n) continue;\n\n mid = left + Math.ceil((right - left) / n / 2) * n;\n quickselect(arr, mid, left, right, compare);\n\n stack.push(left, mid, mid, right);\n }\n}\n",
- "\"use strict\";\nvar __extends = (this && this.__extends) || function (d, b) {\n for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p];\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n};\nvar Subject_1 = require('./Subject');\nvar ObjectUnsubscribedError_1 = require('./util/ObjectUnsubscribedError');\n/**\n * @class BehaviorSubject<T>\n */\nvar BehaviorSubject = (function (_super) {\n __extends(BehaviorSubject, _super);\n function BehaviorSubject(_value) {\n _super.call(this);\n this._value = _value;\n }\n Object.defineProperty(BehaviorSubject.prototype, \"value\", {\n get: function () {\n return this.getValue();\n },\n enumerable: true,\n configurable: true\n });\n BehaviorSubject.prototype._subscribe = function (subscriber) {\n var subscription = _super.prototype._subscribe.call(this, subscriber);\n if (subscription && !subscription.closed) {\n subscriber.next(this._value);\n }\n return subscription;\n };\n BehaviorSubject.prototype.getValue = function () {\n if (this.hasError) {\n throw this.thrownError;\n }\n else if (this.closed) {\n throw new ObjectUnsubscribedError_1.ObjectUnsubscribedError();\n }\n else {\n return this._value;\n }\n };\n BehaviorSubject.prototype.next = function (value) {\n _super.prototype.next.call(this, this._value = value);\n };\n return BehaviorSubject;\n}(Subject_1.Subject));\nexports.BehaviorSubject = BehaviorSubject;\n//# sourceMappingURL=BehaviorSubject.js.map",
- "\"use strict\";\nvar __extends = (this && this.__extends) || function (d, b) {\n for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p];\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n};\nvar Subscriber_1 = require('./Subscriber');\n/**\n * We need this JSDoc comment for affecting ESDoc.\n * @ignore\n * @extends {Ignored}\n */\nvar InnerSubscriber = (function (_super) {\n __extends(InnerSubscriber, _super);\n function InnerSubscriber(parent, outerValue, outerIndex) {\n _super.call(this);\n this.parent = parent;\n this.outerValue = outerValue;\n this.outerIndex = outerIndex;\n this.index = 0;\n }\n InnerSubscriber.prototype._next = function (value) {\n this.parent.notifyNext(this.outerValue, value, this.outerIndex, this.index++, this);\n };\n InnerSubscriber.prototype._error = function (error) {\n this.parent.notifyError(error, this);\n this.unsubscribe();\n };\n InnerSubscriber.prototype._complete = function () {\n this.parent.notifyComplete(this);\n this.unsubscribe();\n };\n return InnerSubscriber;\n}(Subscriber_1.Subscriber));\nexports.InnerSubscriber = InnerSubscriber;\n//# sourceMappingURL=InnerSubscriber.js.map",
- "\"use strict\";\nvar Observable_1 = require('./Observable');\n/**\n * Represents a push-based event or value that an {@link Observable} can emit.\n * This class is particularly useful for operators that manage notifications,\n * like {@link materialize}, {@link dematerialize}, {@link observeOn}, and\n * others. Besides wrapping the actual delivered value, it also annotates it\n * with metadata of, for instance, what type of push message it is (`next`,\n * `error`, or `complete`).\n *\n * @see {@link materialize}\n * @see {@link dematerialize}\n * @see {@link observeOn}\n *\n * @class Notification<T>\n */\nvar Notification = (function () {\n function Notification(kind, value, error) {\n this.kind = kind;\n this.value = value;\n this.error = error;\n this.hasValue = kind === 'N';\n }\n /**\n * Delivers to the given `observer` the value wrapped by this Notification.\n * @param {Observer} observer\n * @return\n */\n Notification.prototype.observe = function (observer) {\n switch (this.kind) {\n case 'N':\n return observer.next && observer.next(this.value);\n case 'E':\n return observer.error && observer.error(this.error);\n case 'C':\n return observer.complete && observer.complete();\n }\n };\n /**\n * Given some {@link Observer} callbacks, deliver the value represented by the\n * current Notification to the correctly corresponding callback.\n * @param {function(value: T): void} next An Observer `next` callback.\n * @param {function(err: any): void} [error] An Observer `error` callback.\n * @param {function(): void} [complete] An Observer `complete` callback.\n * @return {any}\n */\n Notification.prototype.do = function (next, error, complete) {\n var kind = this.kind;\n switch (kind) {\n case 'N':\n return next && next(this.value);\n case 'E':\n return error && error(this.error);\n case 'C':\n return complete && complete();\n }\n };\n /**\n * Takes an Observer or its individual callback functions, and calls `observe`\n * or `do` methods accordingly.\n * @param {Observer|function(value: T): void} nextOrObserver An Observer or\n * the `next` callback.\n * @param {function(err: any): void} [error] An Observer `error` callback.\n * @param {function(): void} [complete] An Observer `complete` callback.\n * @return {any}\n */\n Notification.prototype.accept = function (nextOrObserver, error, complete) {\n if (nextOrObserver && typeof nextOrObserver.next === 'function') {\n return this.observe(nextOrObserver);\n }\n else {\n return this.do(nextOrObserver, error, complete);\n }\n };\n /**\n * Returns a simple Observable that just delivers the notification represented\n * by this Notification instance.\n * @return {any}\n */\n Notification.prototype.toObservable = function () {\n var kind = this.kind;\n switch (kind) {\n case 'N':\n return Observable_1.Observable.of(this.value);\n case 'E':\n return Observable_1.Observable.throw(this.error);\n case 'C':\n return Observable_1.Observable.empty();\n }\n throw new Error('unexpected notification kind value');\n };\n /**\n * A shortcut to create a Notification instance of the type `next` from a\n * given value.\n * @param {T} value The `next` value.\n * @return {Notification<T>} The \"next\" Notification representing the\n * argument.\n */\n Notification.createNext = function (value) {\n if (typeof value !== 'undefined') {\n return new Notification('N', value);\n }\n return Notification.undefinedValueNotification;\n };\n /**\n * A shortcut to create a Notification instance of the type `error` from a\n * given error.\n * @param {any} [err] The `error` error.\n * @return {Notification<T>} The \"error\" Notification representing the\n * argument.\n */\n Notification.createError = function (err) {\n return new Notification('E', undefined, err);\n };\n /**\n * A shortcut to create a Notification instance of the type `complete`.\n * @return {Notification<any>} The valueless \"complete\" Notification.\n */\n Notification.createComplete = function () {\n return Notification.completeNotification;\n };\n Notification.completeNotification = new Notification('C');\n Notification.undefinedValueNotification = new Notification('N', undefined);\n return Notification;\n}());\nexports.Notification = Notification;\n//# sourceMappingURL=Notification.js.map",
- "\"use strict\";\nvar root_1 = require('./util/root');\nvar toSubscriber_1 = require('./util/toSubscriber');\nvar observable_1 = require('./symbol/observable');\n/**\n * A representation of any set of values over any amount of time. This the most basic building block\n * of RxJS.\n *\n * @class Observable<T>\n */\nvar Observable = (function () {\n /**\n * @constructor\n * @param {Function} subscribe the function that is called when the Observable is\n * initially subscribed to. This function is given a Subscriber, to which new values\n * can be `next`ed, or an `error` method can be called to raise an error, or\n * `complete` can be called to notify of a successful completion.\n */\n function Observable(subscribe) {\n this._isScalar = false;\n if (subscribe) {\n this._subscribe = subscribe;\n }\n }\n /**\n * Creates a new Observable, with this Observable as the source, and the passed\n * operator defined as the new observable's operator.\n * @method lift\n * @param {Operator} operator the operator defining the operation to take on the observable\n * @return {Observable} a new observable with the Operator applied\n */\n Observable.prototype.lift = function (operator) {\n var observable = new Observable();\n observable.source = this;\n observable.operator = operator;\n return observable;\n };\n /**\n * Invokes an execution of an Observable and registers Observer handlers for notifications it will emit.\n *\n * <span class=\"informal\">Use it when you have all these Observables, but still nothing is happening.</span>\n *\n * `subscribe` is not a regular operator, but a method that calls Observables internal `subscribe` function. It\n * might be for example a function that you passed to a {@link create} static factory, but most of the time it is\n * a library implementation, which defines what and when will be emitted by an Observable. This means that calling\n * `subscribe` is actually the moment when Observable starts its work, not when it is created, as it is often\n * thought.\n *\n * Apart from starting the execution of an Observable, this method allows you to listen for values\n * that an Observable emits, as well as for when it completes or errors. You can achieve this in two\n * following ways.\n *\n * The first way is creating an object that implements {@link Observer} interface. It should have methods\n * defined by that interface, but note that it should be just a regular JavaScript object, which you can create\n * yourself in any way you want (ES6 class, classic function constructor, object literal etc.). In particular do\n * not attempt to use any RxJS implementation details to create Observers - you don't need them. Remember also\n * that your object does not have to implement all methods. If you find yourself creating a method that doesn't\n * do anything, you can simply omit it. Note however, that if `error` method is not provided, all errors will\n * be left uncaught.\n *\n * The second way is to give up on Observer object altogether and simply provide callback functions in place of its methods.\n * This means you can provide three functions as arguments to `subscribe`, where first function is equivalent\n * of a `next` method, second of an `error` method and third of a `complete` method. Just as in case of Observer,\n * if you do not need to listen for something, you can omit a function, preferably by passing `undefined` or `null`,\n * since `subscribe` recognizes these functions by where they were placed in function call. When it comes\n * to `error` function, just as before, if not provided, errors emitted by an Observable will be thrown.\n *\n * Whatever style of calling `subscribe` you use, in both cases it returns a Subscription object.\n * This object allows you to call `unsubscribe` on it, which in turn will stop work that an Observable does and will clean\n * up all resources that an Observable used. Note that cancelling a subscription will not call `complete` callback\n * provided to `subscribe` function, which is reserved for a regular completion signal that comes from an Observable.\n *\n * Remember that callbacks provided to `subscribe` are not guaranteed to be called asynchronously.\n * It is an Observable itself that decides when these functions will be called. For example {@link of}\n * by default emits all its values synchronously. Always check documentation for how given Observable\n * will behave when subscribed and if its default behavior can be modified with a {@link Scheduler}.\n *\n * @example <caption>Subscribe with an Observer</caption>\n * const sumObserver = {\n * sum: 0,\n * next(value) {\n * console.log('Adding: ' + value);\n * this.sum = this.sum + value;\n * },\n * error() { // We actually could just remote this method,\n * }, // since we do not really care about errors right now.\n * complete() {\n * console.log('Sum equals: ' + this.sum);\n * }\n * };\n *\n * Rx.Observable.of(1, 2, 3) // Synchronously emits 1, 2, 3 and then completes.\n * .subscribe(sumObserver);\n *\n * // Logs:\n * // \"Adding: 1\"\n * // \"Adding: 2\"\n * // \"Adding: 3\"\n * // \"Sum equals: 6\"\n *\n *\n * @example <caption>Subscribe with functions</caption>\n * let sum = 0;\n *\n * Rx.Observable.of(1, 2, 3)\n * .subscribe(\n * function(value) {\n * console.log('Adding: ' + value);\n * sum = sum + value;\n * },\n * undefined,\n * function() {\n * console.log('Sum equals: ' + sum);\n * }\n * );\n *\n * // Logs:\n * // \"Adding: 1\"\n * // \"Adding: 2\"\n * // \"Adding: 3\"\n * // \"Sum equals: 6\"\n *\n *\n * @example <caption>Cancel a subscription</caption>\n * const subscription = Rx.Observable.interval(1000).subscribe(\n * num => console.log(num),\n * undefined,\n * () => console.log('completed!') // Will not be called, even\n * ); // when cancelling subscription\n *\n *\n * setTimeout(() => {\n * subscription.unsubscribe();\n * console.log('unsubscribed!');\n * }, 2500);\n *\n * // Logs:\n * // 0 after 1s\n * // 1 after 2s\n * // \"unsubscribed!\" after 2,5s\n *\n *\n * @param {Observer|Function} observerOrNext (optional) Either an observer with methods to be called,\n * or the first of three possible handlers, which is the handler for each value emitted from the subscribed\n * Observable.\n * @param {Function} error (optional) A handler for a terminal event resulting from an error. If no error handler is provided,\n * the error will be thrown as unhandled.\n * @param {Function} complete (optional) A handler for a terminal event resulting from successful completion.\n * @return {ISubscription} a subscription reference to the registered handlers\n * @method subscribe\n */\n Observable.prototype.subscribe = function (observerOrNext, error, complete) {\n var operator = this.operator;\n var sink = toSubscriber_1.toSubscriber(observerOrNext, error, complete);\n if (operator) {\n operator.call(sink, this.source);\n }\n else {\n sink.add(this.source ? this._subscribe(sink) : this._trySubscribe(sink));\n }\n if (sink.syncErrorThrowable) {\n sink.syncErrorThrowable = false;\n if (sink.syncErrorThrown) {\n throw sink.syncErrorValue;\n }\n }\n return sink;\n };\n Observable.prototype._trySubscribe = function (sink) {\n try {\n return this._subscribe(sink);\n }\n catch (err) {\n sink.syncErrorThrown = true;\n sink.syncErrorValue = err;\n sink.error(err);\n }\n };\n /**\n * @method forEach\n * @param {Function} next a handler for each value emitted by the observable\n * @param {PromiseConstructor} [PromiseCtor] a constructor function used to instantiate the Promise\n * @return {Promise} a promise that either resolves on observable completion or\n * rejects with the handled error\n */\n Observable.prototype.forEach = function (next, PromiseCtor) {\n var _this = this;\n if (!PromiseCtor) {\n if (root_1.root.Rx && root_1.root.Rx.config && root_1.root.Rx.config.Promise) {\n PromiseCtor = root_1.root.Rx.config.Promise;\n }\n else if (root_1.root.Promise) {\n PromiseCtor = root_1.root.Promise;\n }\n }\n if (!PromiseCtor) {\n throw new Error('no Promise impl found');\n }\n return new PromiseCtor(function (resolve, reject) {\n // Must be declared in a separate statement to avoid a RefernceError when\n // accessing subscription below in the closure due to Temporal Dead Zone.\n var subscription;\n subscription = _this.subscribe(function (value) {\n if (subscription) {\n // if there is a subscription, then we can surmise\n // the next handling is asynchronous. Any errors thrown\n // need to be rejected explicitly and unsubscribe must be\n // called manually\n try {\n next(value);\n }\n catch (err) {\n reject(err);\n subscription.unsubscribe();\n }\n }\n else {\n // if there is NO subscription, then we're getting a nexted\n // value synchronously during subscription. We can just call it.\n // If it errors, Observable's `subscribe` will ensure the\n // unsubscription logic is called, then synchronously rethrow the error.\n // After that, Promise will trap the error and send it\n // down the rejection path.\n next(value);\n }\n }, reject, resolve);\n });\n };\n Observable.prototype._subscribe = function (subscriber) {\n return this.source.subscribe(subscriber);\n };\n /**\n * An interop point defined by the es7-observable spec https://github.com/zenparsing/es-observable\n * @method Symbol.observable\n * @return {Observable} this instance of the observable\n */\n Observable.prototype[observable_1.observable] = function () {\n return this;\n };\n // HACK: Since TypeScript inherits static properties too, we have to\n // fight against TypeScript here so Subject can have a different static create signature\n /**\n * Creates a new cold Observable by calling the Observable constructor\n * @static true\n * @owner Observable\n * @method create\n * @param {Function} subscribe? the subscriber function to be passed to the Observable constructor\n * @return {Observable} a new cold observable\n */\n Observable.create = function (subscribe) {\n return new Observable(subscribe);\n };\n return Observable;\n}());\nexports.Observable = Observable;\n//# sourceMappingURL=Observable.js.map",
- "\"use strict\";\nexports.empty = {\n closed: true,\n next: function (value) { },\n error: function (err) { throw err; },\n complete: function () { }\n};\n//# sourceMappingURL=Observer.js.map",
- "\"use strict\";\nvar __extends = (this && this.__extends) || function (d, b) {\n for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p];\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n};\nvar Subscriber_1 = require('./Subscriber');\n/**\n * We need this JSDoc comment for affecting ESDoc.\n * @ignore\n * @extends {Ignored}\n */\nvar OuterSubscriber = (function (_super) {\n __extends(OuterSubscriber, _super);\n function OuterSubscriber() {\n _super.apply(this, arguments);\n }\n OuterSubscriber.prototype.notifyNext = function (outerValue, innerValue, outerIndex, innerIndex, innerSub) {\n this.destination.next(innerValue);\n };\n OuterSubscriber.prototype.notifyError = function (error, innerSub) {\n this.destination.error(error);\n };\n OuterSubscriber.prototype.notifyComplete = function (innerSub) {\n this.destination.complete();\n };\n return OuterSubscriber;\n}(Subscriber_1.Subscriber));\nexports.OuterSubscriber = OuterSubscriber;\n//# sourceMappingURL=OuterSubscriber.js.map",
- "\"use strict\";\nvar __extends = (this && this.__extends) || function (d, b) {\n for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p];\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n};\nvar Subject_1 = require('./Subject');\nvar queue_1 = require('./scheduler/queue');\nvar Subscription_1 = require('./Subscription');\nvar observeOn_1 = require('./operator/observeOn');\nvar ObjectUnsubscribedError_1 = require('./util/ObjectUnsubscribedError');\nvar SubjectSubscription_1 = require('./SubjectSubscription');\n/**\n * @class ReplaySubject<T>\n */\nvar ReplaySubject = (function (_super) {\n __extends(ReplaySubject, _super);\n function ReplaySubject(bufferSize, windowTime, scheduler) {\n if (bufferSize === void 0) { bufferSize = Number.POSITIVE_INFINITY; }\n if (windowTime === void 0) { windowTime = Number.POSITIVE_INFINITY; }\n _super.call(this);\n this.scheduler = scheduler;\n this._events = [];\n this._bufferSize = bufferSize < 1 ? 1 : bufferSize;\n this._windowTime = windowTime < 1 ? 1 : windowTime;\n }\n ReplaySubject.prototype.next = function (value) {\n var now = this._getNow();\n this._events.push(new ReplayEvent(now, value));\n this._trimBufferThenGetEvents();\n _super.prototype.next.call(this, value);\n };\n ReplaySubject.prototype._subscribe = function (subscriber) {\n var _events = this._trimBufferThenGetEvents();\n var scheduler = this.scheduler;\n var subscription;\n if (this.closed) {\n throw new ObjectUnsubscribedError_1.ObjectUnsubscribedError();\n }\n else if (this.hasError) {\n subscription = Subscription_1.Subscription.EMPTY;\n }\n else if (this.isStopped) {\n subscription = Subscription_1.Subscription.EMPTY;\n }\n else {\n this.observers.push(subscriber);\n subscription = new SubjectSubscription_1.SubjectSubscription(this, subscriber);\n }\n if (scheduler) {\n subscriber.add(subscriber = new observeOn_1.ObserveOnSubscriber(subscriber, scheduler));\n }\n var len = _events.length;\n for (var i = 0; i < len && !subscriber.closed; i++) {\n subscriber.next(_events[i].value);\n }\n if (this.hasError) {\n subscriber.error(this.thrownError);\n }\n else if (this.isStopped) {\n subscriber.complete();\n }\n return subscription;\n };\n ReplaySubject.prototype._getNow = function () {\n return (this.scheduler || queue_1.queue).now();\n };\n ReplaySubject.prototype._trimBufferThenGetEvents = function () {\n var now = this._getNow();\n var _bufferSize = this._bufferSize;\n var _windowTime = this._windowTime;\n var _events = this._events;\n var eventsCount = _events.length;\n var spliceCount = 0;\n // Trim events that fall out of the time window.\n // Start at the front of the list. Break early once\n // we encounter an event that falls within the window.\n while (spliceCount < eventsCount) {\n if ((now - _events[spliceCount].time) < _windowTime) {\n break;\n }\n spliceCount++;\n }\n if (eventsCount > _bufferSize) {\n spliceCount = Math.max(spliceCount, eventsCount - _bufferSize);\n }\n if (spliceCount > 0) {\n _events.splice(0, spliceCount);\n }\n return _events;\n };\n return ReplaySubject;\n}(Subject_1.Subject));\nexports.ReplaySubject = ReplaySubject;\nvar ReplayEvent = (function () {\n function ReplayEvent(time, value) {\n this.time = time;\n this.value = value;\n }\n return ReplayEvent;\n}());\n//# sourceMappingURL=ReplaySubject.js.map",
- "\"use strict\";\n/**\n * An execution context and a data structure to order tasks and schedule their\n * execution. Provides a notion of (potentially virtual) time, through the\n * `now()` getter method.\n *\n * Each unit of work in a Scheduler is called an {@link Action}.\n *\n * ```ts\n * class Scheduler {\n * now(): number;\n * schedule(work, delay?, state?): Subscription;\n * }\n * ```\n *\n * @class Scheduler\n */\nvar Scheduler = (function () {\n function Scheduler(SchedulerAction, now) {\n if (now === void 0) { now = Scheduler.now; }\n this.SchedulerAction = SchedulerAction;\n this.now = now;\n }\n /**\n * Schedules a function, `work`, for execution. May happen at some point in\n * the future, according to the `delay` parameter, if specified. May be passed\n * some context object, `state`, which will be passed to the `work` function.\n *\n * The given arguments will be processed an stored as an Action object in a\n * queue of actions.\n *\n * @param {function(state: ?T): ?Subscription} work A function representing a\n * task, or some unit of work to be executed by the Scheduler.\n * @param {number} [delay] Time to wait before executing the work, where the\n * time unit is implicit and defined by the Scheduler itself.\n * @param {T} [state] Some contextual data that the `work` function uses when\n * called by the Scheduler.\n * @return {Subscription} A subscription in order to be able to unsubscribe\n * the scheduled work.\n */\n Scheduler.prototype.schedule = function (work, delay, state) {\n if (delay === void 0) { delay = 0; }\n return new this.SchedulerAction(this, work).schedule(state, delay);\n };\n Scheduler.now = Date.now ? Date.now : function () { return +new Date(); };\n return Scheduler;\n}());\nexports.Scheduler = Scheduler;\n//# sourceMappingURL=Scheduler.js.map",
- "\"use strict\";\nvar __extends = (this && this.__extends) || function (d, b) {\n for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p];\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n};\nvar Observable_1 = require('./Observable');\nvar Subscriber_1 = require('./Subscriber');\nvar Subscription_1 = require('./Subscription');\nvar ObjectUnsubscribedError_1 = require('./util/ObjectUnsubscribedError');\nvar SubjectSubscription_1 = require('./SubjectSubscription');\nvar rxSubscriber_1 = require('./symbol/rxSubscriber');\n/**\n * @class SubjectSubscriber<T>\n */\nvar SubjectSubscriber = (function (_super) {\n __extends(SubjectSubscriber, _super);\n function SubjectSubscriber(destination) {\n _super.call(this, destination);\n this.destination = destination;\n }\n return SubjectSubscriber;\n}(Subscriber_1.Subscriber));\nexports.SubjectSubscriber = SubjectSubscriber;\n/**\n * @class Subject<T>\n */\nvar Subject = (function (_super) {\n __extends(Subject, _super);\n function Subject() {\n _super.call(this);\n this.observers = [];\n this.closed = false;\n this.isStopped = false;\n this.hasError = false;\n this.thrownError = null;\n }\n Subject.prototype[rxSubscriber_1.rxSubscriber] = function () {\n return new SubjectSubscriber(this);\n };\n Subject.prototype.lift = function (operator) {\n var subject = new AnonymousSubject(this, this);\n subject.operator = operator;\n return subject;\n };\n Subject.prototype.next = function (value) {\n if (this.closed) {\n throw new ObjectUnsubscribedError_1.ObjectUnsubscribedError();\n }\n if (!this.isStopped) {\n var observers = this.observers;\n var len = observers.length;\n var copy = observers.slice();\n for (var i = 0; i < len; i++) {\n copy[i].next(value);\n }\n }\n };\n Subject.prototype.error = function (err) {\n if (this.closed) {\n throw new ObjectUnsubscribedError_1.ObjectUnsubscribedError();\n }\n this.hasError = true;\n this.thrownError = err;\n this.isStopped = true;\n var observers = this.observers;\n var len = observers.length;\n var copy = observers.slice();\n for (var i = 0; i < len; i++) {\n copy[i].error(err);\n }\n this.observers.length = 0;\n };\n Subject.prototype.complete = function () {\n if (this.closed) {\n throw new ObjectUnsubscribedError_1.ObjectUnsubscribedError();\n }\n this.isStopped = true;\n var observers = this.observers;\n var len = observers.length;\n var copy = observers.slice();\n for (var i = 0; i < len; i++) {\n copy[i].complete();\n }\n this.observers.length = 0;\n };\n Subject.prototype.unsubscribe = function () {\n this.isStopped = true;\n this.closed = true;\n this.observers = null;\n };\n Subject.prototype._trySubscribe = function (subscriber) {\n if (this.closed) {\n throw new ObjectUnsubscribedError_1.ObjectUnsubscribedError();\n }\n else {\n return _super.prototype._trySubscribe.call(this, subscriber);\n }\n };\n Subject.prototype._subscribe = function (subscriber) {\n if (this.closed) {\n throw new ObjectUnsubscribedError_1.ObjectUnsubscribedError();\n }\n else if (this.hasError) {\n subscriber.error(this.thrownError);\n return Subscription_1.Subscription.EMPTY;\n }\n else if (this.isStopped) {\n subscriber.complete();\n return Subscription_1.Subscription.EMPTY;\n }\n else {\n this.observers.push(subscriber);\n return new SubjectSubscription_1.SubjectSubscription(this, subscriber);\n }\n };\n Subject.prototype.asObservable = function () {\n var observable = new Observable_1.Observable();\n observable.source = this;\n return observable;\n };\n Subject.create = function (destination, source) {\n return new AnonymousSubject(destination, source);\n };\n return Subject;\n}(Observable_1.Observable));\nexports.Subject = Subject;\n/**\n * @class AnonymousSubject<T>\n */\nvar AnonymousSubject = (function (_super) {\n __extends(AnonymousSubject, _super);\n function AnonymousSubject(destination, source) {\n _super.call(this);\n this.destination = destination;\n this.source = source;\n }\n AnonymousSubject.prototype.next = function (value) {\n var destination = this.destination;\n if (destination && destination.next) {\n destination.next(value);\n }\n };\n AnonymousSubject.prototype.error = function (err) {\n var destination = this.destination;\n if (destination && destination.error) {\n this.destination.error(err);\n }\n };\n AnonymousSubject.prototype.complete = function () {\n var destination = this.destination;\n if (destination && destination.complete) {\n this.destination.complete();\n }\n };\n AnonymousSubject.prototype._subscribe = function (subscriber) {\n var source = this.source;\n if (source) {\n return this.source.subscribe(subscriber);\n }\n else {\n return Subscription_1.Subscription.EMPTY;\n }\n };\n return AnonymousSubject;\n}(Subject));\nexports.AnonymousSubject = AnonymousSubject;\n//# sourceMappingURL=Subject.js.map",
- "\"use strict\";\nvar __extends = (this && this.__extends) || function (d, b) {\n for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p];\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n};\nvar Subscription_1 = require('./Subscription');\n/**\n * We need this JSDoc comment for affecting ESDoc.\n * @ignore\n * @extends {Ignored}\n */\nvar SubjectSubscription = (function (_super) {\n __extends(SubjectSubscription, _super);\n function SubjectSubscription(subject, subscriber) {\n _super.call(this);\n this.subject = subject;\n this.subscriber = subscriber;\n this.closed = false;\n }\n SubjectSubscription.prototype.unsubscribe = function () {\n if (this.closed) {\n return;\n }\n this.closed = true;\n var subject = this.subject;\n var observers = subject.observers;\n this.subject = null;\n if (!observers || observers.length === 0 || subject.isStopped || subject.closed) {\n return;\n }\n var subscriberIndex = observers.indexOf(this.subscriber);\n if (subscriberIndex !== -1) {\n observers.splice(subscriberIndex, 1);\n }\n };\n return SubjectSubscription;\n}(Subscription_1.Subscription));\nexports.SubjectSubscription = SubjectSubscription;\n//# sourceMappingURL=SubjectSubscription.js.map",
- "\"use strict\";\nvar __extends = (this && this.__extends) || function (d, b) {\n for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p];\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n};\nvar isFunction_1 = require('./util/isFunction');\nvar Subscription_1 = require('./Subscription');\nvar Observer_1 = require('./Observer');\nvar rxSubscriber_1 = require('./symbol/rxSubscriber');\n/**\n * Implements the {@link Observer} interface and extends the\n * {@link Subscription} class. While the {@link Observer} is the public API for\n * consuming the values of an {@link Observable}, all Observers get converted to\n * a Subscriber, in order to provide Subscription-like capabilities such as\n * `unsubscribe`. Subscriber is a common type in RxJS, and crucial for\n * implementing operators, but it is rarely used as a public API.\n *\n * @class Subscriber<T>\n */\nvar Subscriber = (function (_super) {\n __extends(Subscriber, _super);\n /**\n * @param {Observer|function(value: T): void} [destinationOrNext] A partially\n * defined Observer or a `next` callback function.\n * @param {function(e: ?any): void} [error] The `error` callback of an\n * Observer.\n * @param {function(): void} [complete] The `complete` callback of an\n * Observer.\n */\n function Subscriber(destinationOrNext, error, complete) {\n _super.call(this);\n this.syncErrorValue = null;\n this.syncErrorThrown = false;\n this.syncErrorThrowable = false;\n this.isStopped = false;\n switch (arguments.length) {\n case 0:\n this.destination = Observer_1.empty;\n break;\n case 1:\n if (!destinationOrNext) {\n this.destination = Observer_1.empty;\n break;\n }\n if (typeof destinationOrNext === 'object') {\n if (destinationOrNext instanceof Subscriber) {\n this.destination = destinationOrNext;\n this.destination.add(this);\n }\n else {\n this.syncErrorThrowable = true;\n this.destination = new SafeSubscriber(this, destinationOrNext);\n }\n break;\n }\n default:\n this.syncErrorThrowable = true;\n this.destination = new SafeSubscriber(this, destinationOrNext, error, complete);\n break;\n }\n }\n Subscriber.prototype[rxSubscriber_1.rxSubscriber] = function () { return this; };\n /**\n * A static factory for a Subscriber, given a (potentially partial) definition\n * of an Observer.\n * @param {function(x: ?T): void} [next] The `next` callback of an Observer.\n * @param {function(e: ?any): void} [error] The `error` callback of an\n * Observer.\n * @param {function(): void} [complete] The `complete` callback of an\n * Observer.\n * @return {Subscriber<T>} A Subscriber wrapping the (partially defined)\n * Observer represented by the given arguments.\n */\n Subscriber.create = function (next, error, complete) {\n var subscriber = new Subscriber(next, error, complete);\n subscriber.syncErrorThrowable = false;\n return subscriber;\n };\n /**\n * The {@link Observer} callback to receive notifications of type `next` from\n * the Observable, with a value. The Observable may call this method 0 or more\n * times.\n * @param {T} [value] The `next` value.\n * @return {void}\n */\n Subscriber.prototype.next = function (value) {\n if (!this.isStopped) {\n this._next(value);\n }\n };\n /**\n * The {@link Observer} callback to receive notifications of type `error` from\n * the Observable, with an attached {@link Error}. Notifies the Observer that\n * the Observable has experienced an error condition.\n * @param {any} [err] The `error` exception.\n * @return {void}\n */\n Subscriber.prototype.error = function (err) {\n if (!this.isStopped) {\n this.isStopped = true;\n this._error(err);\n }\n };\n /**\n * The {@link Observer} callback to receive a valueless notification of type\n * `complete` from the Observable. Notifies the Observer that the Observable\n * has finished sending push-based notifications.\n * @return {void}\n */\n Subscriber.prototype.complete = function () {\n if (!this.isStopped) {\n this.isStopped = true;\n this._complete();\n }\n };\n Subscriber.prototype.unsubscribe = function () {\n if (this.closed) {\n return;\n }\n this.isStopped = true;\n _super.prototype.unsubscribe.call(this);\n };\n Subscriber.prototype._next = function (value) {\n this.destination.next(value);\n };\n Subscriber.prototype._error = function (err) {\n this.destination.error(err);\n this.unsubscribe();\n };\n Subscriber.prototype._complete = function () {\n this.destination.complete();\n this.unsubscribe();\n };\n Subscriber.prototype._unsubscribeAndRecycle = function () {\n var _a = this, _parent = _a._parent, _parents = _a._parents;\n this._parent = null;\n this._parents = null;\n this.unsubscribe();\n this.closed = false;\n this.isStopped = false;\n this._parent = _parent;\n this._parents = _parents;\n return this;\n };\n return Subscriber;\n}(Subscription_1.Subscription));\nexports.Subscriber = Subscriber;\n/**\n * We need this JSDoc comment for affecting ESDoc.\n * @ignore\n * @extends {Ignored}\n */\nvar SafeSubscriber = (function (_super) {\n __extends(SafeSubscriber, _super);\n function SafeSubscriber(_parentSubscriber, observerOrNext, error, complete) {\n _super.call(this);\n this._parentSubscriber = _parentSubscriber;\n var next;\n var context = this;\n if (isFunction_1.isFunction(observerOrNext)) {\n next = observerOrNext;\n }\n else if (observerOrNext) {\n next = observerOrNext.next;\n error = observerOrNext.error;\n complete = observerOrNext.complete;\n if (observerOrNext !== Observer_1.empty) {\n context = Object.create(observerOrNext);\n if (isFunction_1.isFunction(context.unsubscribe)) {\n this.add(context.unsubscribe.bind(context));\n }\n context.unsubscribe = this.unsubscribe.bind(this);\n }\n }\n this._context = context;\n this._next = next;\n this._error = error;\n this._complete = complete;\n }\n SafeSubscriber.prototype.next = function (value) {\n if (!this.isStopped && this._next) {\n var _parentSubscriber = this._parentSubscriber;\n if (!_parentSubscriber.syncErrorThrowable) {\n this.__tryOrUnsub(this._next, value);\n }\n else if (this.__tryOrSetError(_parentSubscriber, this._next, value)) {\n this.unsubscribe();\n }\n }\n };\n SafeSubscriber.prototype.error = function (err) {\n if (!this.isStopped) {\n var _parentSubscriber = this._parentSubscriber;\n if (this._error) {\n if (!_parentSubscriber.syncErrorThrowable) {\n this.__tryOrUnsub(this._error, err);\n this.unsubscribe();\n }\n else {\n this.__tryOrSetError(_parentSubscriber, this._error, err);\n this.unsubscribe();\n }\n }\n else if (!_parentSubscriber.syncErrorThrowable) {\n this.unsubscribe();\n throw err;\n }\n else {\n _parentSubscriber.syncErrorValue = err;\n _parentSubscriber.syncErrorThrown = true;\n this.unsubscribe();\n }\n }\n };\n SafeSubscriber.prototype.complete = function () {\n var _this = this;\n if (!this.isStopped) {\n var _parentSubscriber = this._parentSubscriber;\n if (this._complete) {\n var wrappedComplete = function () { return _this._complete.call(_this._context); };\n if (!_parentSubscriber.syncErrorThrowable) {\n this.__tryOrUnsub(wrappedComplete);\n this.unsubscribe();\n }\n else {\n this.__tryOrSetError(_parentSubscriber, wrappedComplete);\n this.unsubscribe();\n }\n }\n else {\n this.unsubscribe();\n }\n }\n };\n SafeSubscriber.prototype.__tryOrUnsub = function (fn, value) {\n try {\n fn.call(this._context, value);\n }\n catch (err) {\n this.unsubscribe();\n throw err;\n }\n };\n SafeSubscriber.prototype.__tryOrSetError = function (parent, fn, value) {\n try {\n fn.call(this._context, value);\n }\n catch (err) {\n parent.syncErrorValue = err;\n parent.syncErrorThrown = true;\n return true;\n }\n return false;\n };\n SafeSubscriber.prototype._unsubscribe = function () {\n var _parentSubscriber = this._parentSubscriber;\n this._context = null;\n this._parentSubscriber = null;\n _parentSubscriber.unsubscribe();\n };\n return SafeSubscriber;\n}(Subscriber));\n//# sourceMappingURL=Subscriber.js.map",
- "\"use strict\";\nvar isArray_1 = require('./util/isArray');\nvar isObject_1 = require('./util/isObject');\nvar isFunction_1 = require('./util/isFunction');\nvar tryCatch_1 = require('./util/tryCatch');\nvar errorObject_1 = require('./util/errorObject');\nvar UnsubscriptionError_1 = require('./util/UnsubscriptionError');\n/**\n * Represents a disposable resource, such as the execution of an Observable. A\n * Subscription has one important method, `unsubscribe`, that takes no argument\n * and just disposes the resource held by the subscription.\n *\n * Additionally, subscriptions may be grouped together through the `add()`\n * method, which will attach a child Subscription to the current Subscription.\n * When a Subscription is unsubscribed, all its children (and its grandchildren)\n * will be unsubscribed as well.\n *\n * @class Subscription\n */\nvar Subscription = (function () {\n /**\n * @param {function(): void} [unsubscribe] A function describing how to\n * perform the disposal of resources when the `unsubscribe` method is called.\n */\n function Subscription(unsubscribe) {\n /**\n * A flag to indicate whether this Subscription has already been unsubscribed.\n * @type {boolean}\n */\n this.closed = false;\n this._parent = null;\n this._parents = null;\n this._subscriptions = null;\n if (unsubscribe) {\n this._unsubscribe = unsubscribe;\n }\n }\n /**\n * Disposes the resources held by the subscription. May, for instance, cancel\n * an ongoing Observable execution or cancel any other type of work that\n * started when the Subscription was created.\n * @return {void}\n */\n Subscription.prototype.unsubscribe = function () {\n var hasErrors = false;\n var errors;\n if (this.closed) {\n return;\n }\n var _a = this, _parent = _a._parent, _parents = _a._parents, _unsubscribe = _a._unsubscribe, _subscriptions = _a._subscriptions;\n this.closed = true;\n this._parent = null;\n this._parents = null;\n // null out _subscriptions first so any child subscriptions that attempt\n // to remove themselves from this subscription will noop\n this._subscriptions = null;\n var index = -1;\n var len = _parents ? _parents.length : 0;\n // if this._parent is null, then so is this._parents, and we\n // don't have to remove ourselves from any parent subscriptions.\n while (_parent) {\n _parent.remove(this);\n // if this._parents is null or index >= len,\n // then _parent is set to null, and the loop exits\n _parent = ++index < len && _parents[index] || null;\n }\n if (isFunction_1.isFunction(_unsubscribe)) {\n var trial = tryCatch_1.tryCatch(_unsubscribe).call(this);\n if (trial === errorObject_1.errorObject) {\n hasErrors = true;\n errors = errors || (errorObject_1.errorObject.e instanceof UnsubscriptionError_1.UnsubscriptionError ?\n flattenUnsubscriptionErrors(errorObject_1.errorObject.e.errors) : [errorObject_1.errorObject.e]);\n }\n }\n if (isArray_1.isArray(_subscriptions)) {\n index = -1;\n len = _subscriptions.length;\n while (++index < len) {\n var sub = _subscriptions[index];\n if (isObject_1.isObject(sub)) {\n var trial = tryCatch_1.tryCatch(sub.unsubscribe).call(sub);\n if (trial === errorObject_1.errorObject) {\n hasErrors = true;\n errors = errors || [];\n var err = errorObject_1.errorObject.e;\n if (err instanceof UnsubscriptionError_1.UnsubscriptionError) {\n errors = errors.concat(flattenUnsubscriptionErrors(err.errors));\n }\n else {\n errors.push(err);\n }\n }\n }\n }\n }\n if (hasErrors) {\n throw new UnsubscriptionError_1.UnsubscriptionError(errors);\n }\n };\n /**\n * Adds a tear down to be called during the unsubscribe() of this\n * Subscription.\n *\n * If the tear down being added is a subscription that is already\n * unsubscribed, is the same reference `add` is being called on, or is\n * `Subscription.EMPTY`, it will not be added.\n *\n * If this subscription is already in an `closed` state, the passed\n * tear down logic will be executed immediately.\n *\n * @param {TeardownLogic} teardown The additional logic to execute on\n * teardown.\n * @return {Subscription} Returns the Subscription used or created to be\n * added to the inner subscriptions list. This Subscription can be used with\n * `remove()` to remove the passed teardown logic from the inner subscriptions\n * list.\n */\n Subscription.prototype.add = function (teardown) {\n if (!teardown || (teardown === Subscription.EMPTY)) {\n return Subscription.EMPTY;\n }\n if (teardown === this) {\n return this;\n }\n var subscription = teardown;\n switch (typeof teardown) {\n case 'function':\n subscription = new Subscription(teardown);\n case 'object':\n if (subscription.closed || typeof subscription.unsubscribe !== 'function') {\n return subscription;\n }\n else if (this.closed) {\n subscription.unsubscribe();\n return subscription;\n }\n else if (typeof subscription._addParent !== 'function' /* quack quack */) {\n var tmp = subscription;\n subscription = new Subscription();\n subscription._subscriptions = [tmp];\n }\n break;\n default:\n throw new Error('unrecognized teardown ' + teardown + ' added to Subscription.');\n }\n var subscriptions = this._subscriptions || (this._subscriptions = []);\n subscriptions.push(subscription);\n subscription._addParent(this);\n return subscription;\n };\n /**\n * Removes a Subscription from the internal list of subscriptions that will\n * unsubscribe during the unsubscribe process of this Subscription.\n * @param {Subscription} subscription The subscription to remove.\n * @return {void}\n */\n Subscription.prototype.remove = function (subscription) {\n var subscriptions = this._subscriptions;\n if (subscriptions) {\n var subscriptionIndex = subscriptions.indexOf(subscription);\n if (subscriptionIndex !== -1) {\n subscriptions.splice(subscriptionIndex, 1);\n }\n }\n };\n Subscription.prototype._addParent = function (parent) {\n var _a = this, _parent = _a._parent, _parents = _a._parents;\n if (!_parent || _parent === parent) {\n // If we don't have a parent, or the new parent is the same as the\n // current parent, then set this._parent to the new parent.\n this._parent = parent;\n }\n else if (!_parents) {\n // If there's already one parent, but not multiple, allocate an Array to\n // store the rest of the parent Subscriptions.\n this._parents = [parent];\n }\n else if (_parents.indexOf(parent) === -1) {\n // Only add the new parent to the _parents list if it's not already there.\n _parents.push(parent);\n }\n };\n Subscription.EMPTY = (function (empty) {\n empty.closed = true;\n return empty;\n }(new Subscription()));\n return Subscription;\n}());\nexports.Subscription = Subscription;\nfunction flattenUnsubscriptionErrors(errors) {\n return errors.reduce(function (errs, err) { return errs.concat((err instanceof UnsubscriptionError_1.UnsubscriptionError) ? err.errors : err); }, []);\n}\n//# sourceMappingURL=Subscription.js.map",
- "\"use strict\";\nvar Observable_1 = require('../../Observable');\nvar combineLatest_1 = require('../../observable/combineLatest');\nObservable_1.Observable.combineLatest = combineLatest_1.combineLatest;\n//# sourceMappingURL=combineLatest.js.map",
- "\"use strict\";\nvar Observable_1 = require('../../Observable');\nvar defer_1 = require('../../observable/defer');\nObservable_1.Observable.defer = defer_1.defer;\n//# sourceMappingURL=defer.js.map",
- "\"use strict\";\nvar Observable_1 = require('../../Observable');\nvar empty_1 = require('../../observable/empty');\nObservable_1.Observable.empty = empty_1.empty;\n//# sourceMappingURL=empty.js.map",
- "\"use strict\";\nvar Observable_1 = require('../../Observable');\nvar from_1 = require('../../observable/from');\nObservable_1.Observable.from = from_1.from;\n//# sourceMappingURL=from.js.map",
- "\"use strict\";\nvar Observable_1 = require('../../Observable');\nvar fromEvent_1 = require('../../observable/fromEvent');\nObservable_1.Observable.fromEvent = fromEvent_1.fromEvent;\n//# sourceMappingURL=fromEvent.js.map",
- "\"use strict\";\nvar Observable_1 = require('../../Observable');\nvar fromPromise_1 = require('../../observable/fromPromise');\nObservable_1.Observable.fromPromise = fromPromise_1.fromPromise;\n//# sourceMappingURL=fromPromise.js.map",
- "\"use strict\";\nvar Observable_1 = require('../../Observable');\nvar merge_1 = require('../../observable/merge');\nObservable_1.Observable.merge = merge_1.merge;\n//# sourceMappingURL=merge.js.map",
- "\"use strict\";\nvar Observable_1 = require('../../Observable');\nvar of_1 = require('../../observable/of');\nObservable_1.Observable.of = of_1.of;\n//# sourceMappingURL=of.js.map",
- "\"use strict\";\nvar Observable_1 = require('../../Observable');\nvar throw_1 = require('../../observable/throw');\nObservable_1.Observable.throw = throw_1._throw;\n//# sourceMappingURL=throw.js.map",
- "\"use strict\";\nvar Observable_1 = require('../../Observable');\nvar timer_1 = require('../../observable/timer');\nObservable_1.Observable.timer = timer_1.timer;\n//# sourceMappingURL=timer.js.map",
- "\"use strict\";\nvar Observable_1 = require('../../Observable');\nvar zip_1 = require('../../observable/zip');\nObservable_1.Observable.zip = zip_1.zip;\n//# sourceMappingURL=zip.js.map",
- "\"use strict\";\nvar Observable_1 = require('../../Observable');\nvar buffer_1 = require('../../operator/buffer');\nObservable_1.Observable.prototype.buffer = buffer_1.buffer;\n//# sourceMappingURL=buffer.js.map",
- "\"use strict\";\nvar Observable_1 = require('../../Observable');\nvar bufferCount_1 = require('../../operator/bufferCount');\nObservable_1.Observable.prototype.bufferCount = bufferCount_1.bufferCount;\n//# sourceMappingURL=bufferCount.js.map",
- "\"use strict\";\nvar Observable_1 = require('../../Observable');\nvar bufferWhen_1 = require('../../operator/bufferWhen');\nObservable_1.Observable.prototype.bufferWhen = bufferWhen_1.bufferWhen;\n//# sourceMappingURL=bufferWhen.js.map",
- "\"use strict\";\nvar Observable_1 = require('../../Observable');\nvar catch_1 = require('../../operator/catch');\nObservable_1.Observable.prototype.catch = catch_1._catch;\nObservable_1.Observable.prototype._catch = catch_1._catch;\n//# sourceMappingURL=catch.js.map",
- "\"use strict\";\nvar Observable_1 = require('../../Observable');\nvar combineLatest_1 = require('../../operator/combineLatest');\nObservable_1.Observable.prototype.combineLatest = combineLatest_1.combineLatest;\n//# sourceMappingURL=combineLatest.js.map",
- "\"use strict\";\nvar Observable_1 = require('../../Observable');\nvar concat_1 = require('../../operator/concat');\nObservable_1.Observable.prototype.concat = concat_1.concat;\n//# sourceMappingURL=concat.js.map",
- "\"use strict\";\nvar Observable_1 = require('../../Observable');\nvar debounceTime_1 = require('../../operator/debounceTime');\nObservable_1.Observable.prototype.debounceTime = debounceTime_1.debounceTime;\n//# sourceMappingURL=debounceTime.js.map",
- "\"use strict\";\nvar Observable_1 = require('../../Observable');\nvar delay_1 = require('../../operator/delay');\nObservable_1.Observable.prototype.delay = delay_1.delay;\n//# sourceMappingURL=delay.js.map",
- "\"use strict\";\nvar Observable_1 = require('../../Observable');\nvar distinct_1 = require('../../operator/distinct');\nObservable_1.Observable.prototype.distinct = distinct_1.distinct;\n//# sourceMappingURL=distinct.js.map",
- "\"use strict\";\nvar Observable_1 = require('../../Observable');\nvar distinctUntilChanged_1 = require('../../operator/distinctUntilChanged');\nObservable_1.Observable.prototype.distinctUntilChanged = distinctUntilChanged_1.distinctUntilChanged;\n//# sourceMappingURL=distinctUntilChanged.js.map",
- "\"use strict\";\nvar Observable_1 = require('../../Observable');\nvar do_1 = require('../../operator/do');\nObservable_1.Observable.prototype.do = do_1._do;\nObservable_1.Observable.prototype._do = do_1._do;\n//# sourceMappingURL=do.js.map",
- "\"use strict\";\nvar Observable_1 = require('../../Observable');\nvar expand_1 = require('../../operator/expand');\nObservable_1.Observable.prototype.expand = expand_1.expand;\n//# sourceMappingURL=expand.js.map",
- "\"use strict\";\nvar Observable_1 = require('../../Observable');\nvar filter_1 = require('../../operator/filter');\nObservable_1.Observable.prototype.filter = filter_1.filter;\n//# sourceMappingURL=filter.js.map",
- "\"use strict\";\nvar Observable_1 = require('../../Observable');\nvar finally_1 = require('../../operator/finally');\nObservable_1.Observable.prototype.finally = finally_1._finally;\nObservable_1.Observable.prototype._finally = finally_1._finally;\n//# sourceMappingURL=finally.js.map",
- "\"use strict\";\nvar Observable_1 = require('../../Observable');\nvar first_1 = require('../../operator/first');\nObservable_1.Observable.prototype.first = first_1.first;\n//# sourceMappingURL=first.js.map",
- "\"use strict\";\nvar Observable_1 = require('../../Observable');\nvar last_1 = require('../../operator/last');\nObservable_1.Observable.prototype.last = last_1.last;\n//# sourceMappingURL=last.js.map",
- "\"use strict\";\nvar Observable_1 = require('../../Observable');\nvar map_1 = require('../../operator/map');\nObservable_1.Observable.prototype.map = map_1.map;\n//# sourceMappingURL=map.js.map",
- "\"use strict\";\nvar Observable_1 = require('../../Observable');\nvar merge_1 = require('../../operator/merge');\nObservable_1.Observable.prototype.merge = merge_1.merge;\n//# sourceMappingURL=merge.js.map",
- "\"use strict\";\nvar Observable_1 = require('../../Observable');\nvar mergeAll_1 = require('../../operator/mergeAll');\nObservable_1.Observable.prototype.mergeAll = mergeAll_1.mergeAll;\n//# sourceMappingURL=mergeAll.js.map",
- "\"use strict\";\nvar Observable_1 = require('../../Observable');\nvar mergeMap_1 = require('../../operator/mergeMap');\nObservable_1.Observable.prototype.mergeMap = mergeMap_1.mergeMap;\nObservable_1.Observable.prototype.flatMap = mergeMap_1.mergeMap;\n//# sourceMappingURL=mergeMap.js.map",
- "\"use strict\";\nvar Observable_1 = require('../../Observable');\nvar pairwise_1 = require('../../operator/pairwise');\nObservable_1.Observable.prototype.pairwise = pairwise_1.pairwise;\n//# sourceMappingURL=pairwise.js.map",
- "\"use strict\";\nvar Observable_1 = require('../../Observable');\nvar pluck_1 = require('../../operator/pluck');\nObservable_1.Observable.prototype.pluck = pluck_1.pluck;\n//# sourceMappingURL=pluck.js.map",
- "\"use strict\";\nvar Observable_1 = require('../../Observable');\nvar publish_1 = require('../../operator/publish');\nObservable_1.Observable.prototype.publish = publish_1.publish;\n//# sourceMappingURL=publish.js.map",
- "\"use strict\";\nvar Observable_1 = require('../../Observable');\nvar publishReplay_1 = require('../../operator/publishReplay');\nObservable_1.Observable.prototype.publishReplay = publishReplay_1.publishReplay;\n//# sourceMappingURL=publishReplay.js.map",
- "\"use strict\";\nvar Observable_1 = require('../../Observable');\nvar scan_1 = require('../../operator/scan');\nObservable_1.Observable.prototype.scan = scan_1.scan;\n//# sourceMappingURL=scan.js.map",
- "\"use strict\";\nvar Observable_1 = require('../../Observable');\nvar share_1 = require('../../operator/share');\nObservable_1.Observable.prototype.share = share_1.share;\n//# sourceMappingURL=share.js.map",
- "\"use strict\";\nvar Observable_1 = require('../../Observable');\nvar skip_1 = require('../../operator/skip');\nObservable_1.Observable.prototype.skip = skip_1.skip;\n//# sourceMappingURL=skip.js.map",
- "\"use strict\";\nvar Observable_1 = require('../../Observable');\nvar skipUntil_1 = require('../../operator/skipUntil');\nObservable_1.Observable.prototype.skipUntil = skipUntil_1.skipUntil;\n//# sourceMappingURL=skipUntil.js.map",
- "\"use strict\";\nvar Observable_1 = require('../../Observable');\nvar skipWhile_1 = require('../../operator/skipWhile');\nObservable_1.Observable.prototype.skipWhile = skipWhile_1.skipWhile;\n//# sourceMappingURL=skipWhile.js.map",
- "\"use strict\";\nvar Observable_1 = require('../../Observable');\nvar startWith_1 = require('../../operator/startWith');\nObservable_1.Observable.prototype.startWith = startWith_1.startWith;\n//# sourceMappingURL=startWith.js.map",
- "\"use strict\";\nvar Observable_1 = require('../../Observable');\nvar switchMap_1 = require('../../operator/switchMap');\nObservable_1.Observable.prototype.switchMap = switchMap_1.switchMap;\n//# sourceMappingURL=switchMap.js.map",
- "\"use strict\";\nvar Observable_1 = require('../../Observable');\nvar take_1 = require('../../operator/take');\nObservable_1.Observable.prototype.take = take_1.take;\n//# sourceMappingURL=take.js.map",
- "\"use strict\";\nvar Observable_1 = require('../../Observable');\nvar takeUntil_1 = require('../../operator/takeUntil');\nObservable_1.Observable.prototype.takeUntil = takeUntil_1.takeUntil;\n//# sourceMappingURL=takeUntil.js.map",
- "\"use strict\";\nvar Observable_1 = require('../../Observable');\nvar throttleTime_1 = require('../../operator/throttleTime');\nObservable_1.Observable.prototype.throttleTime = throttleTime_1.throttleTime;\n//# sourceMappingURL=throttleTime.js.map",
- "\"use strict\";\nvar Observable_1 = require('../../Observable');\nvar withLatestFrom_1 = require('../../operator/withLatestFrom');\nObservable_1.Observable.prototype.withLatestFrom = withLatestFrom_1.withLatestFrom;\n//# sourceMappingURL=withLatestFrom.js.map",
- "\"use strict\";\nvar Observable_1 = require('../../Observable');\nvar zip_1 = require('../../operator/zip');\nObservable_1.Observable.prototype.zip = zip_1.zipProto;\n//# sourceMappingURL=zip.js.map",
- "\"use strict\";\nvar __extends = (this && this.__extends) || function (d, b) {\n for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p];\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n};\nvar Observable_1 = require('../Observable');\nvar ScalarObservable_1 = require('./ScalarObservable');\nvar EmptyObservable_1 = require('./EmptyObservable');\n/**\n * We need this JSDoc comment for affecting ESDoc.\n * @extends {Ignored}\n * @hide true\n */\nvar ArrayLikeObservable = (function (_super) {\n __extends(ArrayLikeObservable, _super);\n function ArrayLikeObservable(arrayLike, scheduler) {\n _super.call(this);\n this.arrayLike = arrayLike;\n this.scheduler = scheduler;\n if (!scheduler && arrayLike.length === 1) {\n this._isScalar = true;\n this.value = arrayLike[0];\n }\n }\n ArrayLikeObservable.create = function (arrayLike, scheduler) {\n var length = arrayLike.length;\n if (length === 0) {\n return new EmptyObservable_1.EmptyObservable();\n }\n else if (length === 1) {\n return new ScalarObservable_1.ScalarObservable(arrayLike[0], scheduler);\n }\n else {\n return new ArrayLikeObservable(arrayLike, scheduler);\n }\n };\n ArrayLikeObservable.dispatch = function (state) {\n var arrayLike = state.arrayLike, index = state.index, length = state.length, subscriber = state.subscriber;\n if (subscriber.closed) {\n return;\n }\n if (index >= length) {\n subscriber.complete();\n return;\n }\n subscriber.next(arrayLike[index]);\n state.index = index + 1;\n this.schedule(state);\n };\n ArrayLikeObservable.prototype._subscribe = function (subscriber) {\n var index = 0;\n var _a = this, arrayLike = _a.arrayLike, scheduler = _a.scheduler;\n var length = arrayLike.length;\n if (scheduler) {\n return scheduler.schedule(ArrayLikeObservable.dispatch, 0, {\n arrayLike: arrayLike, index: index, length: length, subscriber: subscriber\n });\n }\n else {\n for (var i = 0; i < length && !subscriber.closed; i++) {\n subscriber.next(arrayLike[i]);\n }\n subscriber.complete();\n }\n };\n return ArrayLikeObservable;\n}(Observable_1.Observable));\nexports.ArrayLikeObservable = ArrayLikeObservable;\n//# sourceMappingURL=ArrayLikeObservable.js.map",
- "\"use strict\";\nvar __extends = (this && this.__extends) || function (d, b) {\n for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p];\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n};\nvar Observable_1 = require('../Observable');\nvar ScalarObservable_1 = require('./ScalarObservable');\nvar EmptyObservable_1 = require('./EmptyObservable');\nvar isScheduler_1 = require('../util/isScheduler');\n/**\n * We need this JSDoc comment for affecting ESDoc.\n * @extends {Ignored}\n * @hide true\n */\nvar ArrayObservable = (function (_super) {\n __extends(ArrayObservable, _super);\n function ArrayObservable(array, scheduler) {\n _super.call(this);\n this.array = array;\n this.scheduler = scheduler;\n if (!scheduler && array.length === 1) {\n this._isScalar = true;\n this.value = array[0];\n }\n }\n ArrayObservable.create = function (array, scheduler) {\n return new ArrayObservable(array, scheduler);\n };\n /**\n * Creates an Observable that emits some values you specify as arguments,\n * immediately one after the other, and then emits a complete notification.\n *\n * <span class=\"informal\">Emits the arguments you provide, then completes.\n * </span>\n *\n * <img src=\"./img/of.png\" width=\"100%\">\n *\n * This static operator is useful for creating a simple Observable that only\n * emits the arguments given, and the complete notification thereafter. It can\n * be used for composing with other Observables, such as with {@link concat}.\n * By default, it uses a `null` IScheduler, which means the `next`\n * notifications are sent synchronously, although with a different IScheduler\n * it is possible to determine when those notifications will be delivered.\n *\n * @example <caption>Emit 10, 20, 30, then 'a', 'b', 'c', then start ticking every second.</caption>\n * var numbers = Rx.Observable.of(10, 20, 30);\n * var letters = Rx.Observable.of('a', 'b', 'c');\n * var interval = Rx.Observable.interval(1000);\n * var result = numbers.concat(letters).concat(interval);\n * result.subscribe(x => console.log(x));\n *\n * @see {@link create}\n * @see {@link empty}\n * @see {@link never}\n * @see {@link throw}\n *\n * @param {...T} values Arguments that represent `next` values to be emitted.\n * @param {Scheduler} [scheduler] A {@link IScheduler} to use for scheduling\n * the emissions of the `next` notifications.\n * @return {Observable<T>} An Observable that emits each given input value.\n * @static true\n * @name of\n * @owner Observable\n */\n ArrayObservable.of = function () {\n var array = [];\n for (var _i = 0; _i < arguments.length; _i++) {\n array[_i - 0] = arguments[_i];\n }\n var scheduler = array[array.length - 1];\n if (isScheduler_1.isScheduler(scheduler)) {\n array.pop();\n }\n else {\n scheduler = null;\n }\n var len = array.length;\n if (len > 1) {\n return new ArrayObservable(array, scheduler);\n }\n else if (len === 1) {\n return new ScalarObservable_1.ScalarObservable(array[0], scheduler);\n }\n else {\n return new EmptyObservable_1.EmptyObservable(scheduler);\n }\n };\n ArrayObservable.dispatch = function (state) {\n var array = state.array, index = state.index, count = state.count, subscriber = state.subscriber;\n if (index >= count) {\n subscriber.complete();\n return;\n }\n subscriber.next(array[index]);\n if (subscriber.closed) {\n return;\n }\n state.index = index + 1;\n this.schedule(state);\n };\n ArrayObservable.prototype._subscribe = function (subscriber) {\n var index = 0;\n var array = this.array;\n var count = array.length;\n var scheduler = this.scheduler;\n if (scheduler) {\n return scheduler.schedule(ArrayObservable.dispatch, 0, {\n array: array, index: index, count: count, subscriber: subscriber\n });\n }\n else {\n for (var i = 0; i < count && !subscriber.closed; i++) {\n subscriber.next(array[i]);\n }\n subscriber.complete();\n }\n };\n return ArrayObservable;\n}(Observable_1.Observable));\nexports.ArrayObservable = ArrayObservable;\n//# sourceMappingURL=ArrayObservable.js.map",
- "\"use strict\";\nvar __extends = (this && this.__extends) || function (d, b) {\n for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p];\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n};\nvar Subject_1 = require('../Subject');\nvar Observable_1 = require('../Observable');\nvar Subscriber_1 = require('../Subscriber');\nvar Subscription_1 = require('../Subscription');\n/**\n * @class ConnectableObservable<T>\n */\nvar ConnectableObservable = (function (_super) {\n __extends(ConnectableObservable, _super);\n function ConnectableObservable(source, subjectFactory) {\n _super.call(this);\n this.source = source;\n this.subjectFactory = subjectFactory;\n this._refCount = 0;\n this._isComplete = false;\n }\n ConnectableObservable.prototype._subscribe = function (subscriber) {\n return this.getSubject().subscribe(subscriber);\n };\n ConnectableObservable.prototype.getSubject = function () {\n var subject = this._subject;\n if (!subject || subject.isStopped) {\n this._subject = this.subjectFactory();\n }\n return this._subject;\n };\n ConnectableObservable.prototype.connect = function () {\n var connection = this._connection;\n if (!connection) {\n this._isComplete = false;\n connection = this._connection = new Subscription_1.Subscription();\n connection.add(this.source\n .subscribe(new ConnectableSubscriber(this.getSubject(), this)));\n if (connection.closed) {\n this._connection = null;\n connection = Subscription_1.Subscription.EMPTY;\n }\n else {\n this._connection = connection;\n }\n }\n return connection;\n };\n ConnectableObservable.prototype.refCount = function () {\n return this.lift(new RefCountOperator(this));\n };\n return ConnectableObservable;\n}(Observable_1.Observable));\nexports.ConnectableObservable = ConnectableObservable;\nvar connectableProto = ConnectableObservable.prototype;\nexports.connectableObservableDescriptor = {\n operator: { value: null },\n _refCount: { value: 0, writable: true },\n _subject: { value: null, writable: true },\n _connection: { value: null, writable: true },\n _subscribe: { value: connectableProto._subscribe },\n _isComplete: { value: connectableProto._isComplete, writable: true },\n getSubject: { value: connectableProto.getSubject },\n connect: { value: connectableProto.connect },\n refCount: { value: connectableProto.refCount }\n};\nvar ConnectableSubscriber = (function (_super) {\n __extends(ConnectableSubscriber, _super);\n function ConnectableSubscriber(destination, connectable) {\n _super.call(this, destination);\n this.connectable = connectable;\n }\n ConnectableSubscriber.prototype._error = function (err) {\n this._unsubscribe();\n _super.prototype._error.call(this, err);\n };\n ConnectableSubscriber.prototype._complete = function () {\n this.connectable._isComplete = true;\n this._unsubscribe();\n _super.prototype._complete.call(this);\n };\n ConnectableSubscriber.prototype._unsubscribe = function () {\n var connectable = this.connectable;\n if (connectable) {\n this.connectable = null;\n var connection = connectable._connection;\n connectable._refCount = 0;\n connectable._subject = null;\n connectable._connection = null;\n if (connection) {\n connection.unsubscribe();\n }\n }\n };\n return ConnectableSubscriber;\n}(Subject_1.SubjectSubscriber));\nvar RefCountOperator = (function () {\n function RefCountOperator(connectable) {\n this.connectable = connectable;\n }\n RefCountOperator.prototype.call = function (subscriber, source) {\n var connectable = this.connectable;\n connectable._refCount++;\n var refCounter = new RefCountSubscriber(subscriber, connectable);\n var subscription = source.subscribe(refCounter);\n if (!refCounter.closed) {\n refCounter.connection = connectable.connect();\n }\n return subscription;\n };\n return RefCountOperator;\n}());\nvar RefCountSubscriber = (function (_super) {\n __extends(RefCountSubscriber, _super);\n function RefCountSubscriber(destination, connectable) {\n _super.call(this, destination);\n this.connectable = connectable;\n }\n RefCountSubscriber.prototype._unsubscribe = function () {\n var connectable = this.connectable;\n if (!connectable) {\n this.connection = null;\n return;\n }\n this.connectable = null;\n var refCount = connectable._refCount;\n if (refCount <= 0) {\n this.connection = null;\n return;\n }\n connectable._refCount = refCount - 1;\n if (refCount > 1) {\n this.connection = null;\n return;\n }\n ///\n // Compare the local RefCountSubscriber's connection Subscription to the\n // connection Subscription on the shared ConnectableObservable. In cases\n // where the ConnectableObservable source synchronously emits values, and\n // the RefCountSubscriber's downstream Observers synchronously unsubscribe,\n // execution continues to here before the RefCountOperator has a chance to\n // supply the RefCountSubscriber with the shared connection Subscription.\n // For example:\n // ```\n // Observable.range(0, 10)\n // .publish()\n // .refCount()\n // .take(5)\n // .subscribe();\n // ```\n // In order to account for this case, RefCountSubscriber should only dispose\n // the ConnectableObservable's shared connection Subscription if the\n // connection Subscription exists, *and* either:\n // a. RefCountSubscriber doesn't have a reference to the shared connection\n // Subscription yet, or,\n // b. RefCountSubscriber's connection Subscription reference is identical\n // to the shared connection Subscription\n ///\n var connection = this.connection;\n var sharedConnection = connectable._connection;\n this.connection = null;\n if (sharedConnection && (!connection || sharedConnection === connection)) {\n sharedConnection.unsubscribe();\n }\n };\n return RefCountSubscriber;\n}(Subscriber_1.Subscriber));\n//# sourceMappingURL=ConnectableObservable.js.map",
- "\"use strict\";\nvar __extends = (this && this.__extends) || function (d, b) {\n for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p];\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n};\nvar Observable_1 = require('../Observable');\nvar subscribeToResult_1 = require('../util/subscribeToResult');\nvar OuterSubscriber_1 = require('../OuterSubscriber');\n/**\n * We need this JSDoc comment for affecting ESDoc.\n * @extends {Ignored}\n * @hide true\n */\nvar DeferObservable = (function (_super) {\n __extends(DeferObservable, _super);\n function DeferObservable(observableFactory) {\n _super.call(this);\n this.observableFactory = observableFactory;\n }\n /**\n * Creates an Observable that, on subscribe, calls an Observable factory to\n * make an Observable for each new Observer.\n *\n * <span class=\"informal\">Creates the Observable lazily, that is, only when it\n * is subscribed.\n * </span>\n *\n * <img src=\"./img/defer.png\" width=\"100%\">\n *\n * `defer` allows you to create the Observable only when the Observer\n * subscribes, and create a fresh Observable for each Observer. It waits until\n * an Observer subscribes to it, and then it generates an Observable,\n * typically with an Observable factory function. It does this afresh for each\n * subscriber, so although each subscriber may think it is subscribing to the\n * same Observable, in fact each subscriber gets its own individual\n * Observable.\n *\n * @example <caption>Subscribe to either an Observable of clicks or an Observable of interval, at random</caption>\n * var clicksOrInterval = Rx.Observable.defer(function () {\n * if (Math.random() > 0.5) {\n * return Rx.Observable.fromEvent(document, 'click');\n * } else {\n * return Rx.Observable.interval(1000);\n * }\n * });\n * clicksOrInterval.subscribe(x => console.log(x));\n *\n * // Results in the following behavior:\n * // If the result of Math.random() is greater than 0.5 it will listen\n * // for clicks anywhere on the \"document\"; when document is clicked it\n * // will log a MouseEvent object to the console. If the result is less\n * // than 0.5 it will emit ascending numbers, one every second(1000ms).\n *\n * @see {@link create}\n *\n * @param {function(): SubscribableOrPromise} observableFactory The Observable\n * factory function to invoke for each Observer that subscribes to the output\n * Observable. May also return a Promise, which will be converted on the fly\n * to an Observable.\n * @return {Observable} An Observable whose Observers' subscriptions trigger\n * an invocation of the given Observable factory function.\n * @static true\n * @name defer\n * @owner Observable\n */\n DeferObservable.create = function (observableFactory) {\n return new DeferObservable(observableFactory);\n };\n DeferObservable.prototype._subscribe = function (subscriber) {\n return new DeferSubscriber(subscriber, this.observableFactory);\n };\n return DeferObservable;\n}(Observable_1.Observable));\nexports.DeferObservable = DeferObservable;\nvar DeferSubscriber = (function (_super) {\n __extends(DeferSubscriber, _super);\n function DeferSubscriber(destination, factory) {\n _super.call(this, destination);\n this.factory = factory;\n this.tryDefer();\n }\n DeferSubscriber.prototype.tryDefer = function () {\n try {\n this._callFactory();\n }\n catch (err) {\n this._error(err);\n }\n };\n DeferSubscriber.prototype._callFactory = function () {\n var result = this.factory();\n if (result) {\n this.add(subscribeToResult_1.subscribeToResult(this, result));\n }\n };\n return DeferSubscriber;\n}(OuterSubscriber_1.OuterSubscriber));\n//# sourceMappingURL=DeferObservable.js.map",
- "\"use strict\";\nvar __extends = (this && this.__extends) || function (d, b) {\n for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p];\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n};\nvar Observable_1 = require('../Observable');\n/**\n * We need this JSDoc comment for affecting ESDoc.\n * @extends {Ignored}\n * @hide true\n */\nvar EmptyObservable = (function (_super) {\n __extends(EmptyObservable, _super);\n function EmptyObservable(scheduler) {\n _super.call(this);\n this.scheduler = scheduler;\n }\n /**\n * Creates an Observable that emits no items to the Observer and immediately\n * emits a complete notification.\n *\n * <span class=\"informal\">Just emits 'complete', and nothing else.\n * </span>\n *\n * <img src=\"./img/empty.png\" width=\"100%\">\n *\n * This static operator is useful for creating a simple Observable that only\n * emits the complete notification. It can be used for composing with other\n * Observables, such as in a {@link mergeMap}.\n *\n * @example <caption>Emit the number 7, then complete.</caption>\n * var result = Rx.Observable.empty().startWith(7);\n * result.subscribe(x => console.log(x));\n *\n * @example <caption>Map and flatten only odd numbers to the sequence 'a', 'b', 'c'</caption>\n * var interval = Rx.Observable.interval(1000);\n * var result = interval.mergeMap(x =>\n * x % 2 === 1 ? Rx.Observable.of('a', 'b', 'c') : Rx.Observable.empty()\n * );\n * result.subscribe(x => console.log(x));\n *\n * // Results in the following to the console:\n * // x is equal to the count on the interval eg(0,1,2,3,...)\n * // x will occur every 1000ms\n * // if x % 2 is equal to 1 print abc\n * // if x % 2 is not equal to 1 nothing will be output\n *\n * @see {@link create}\n * @see {@link never}\n * @see {@link of}\n * @see {@link throw}\n *\n * @param {Scheduler} [scheduler] A {@link IScheduler} to use for scheduling\n * the emission of the complete notification.\n * @return {Observable} An \"empty\" Observable: emits only the complete\n * notification.\n * @static true\n * @name empty\n * @owner Observable\n */\n EmptyObservable.create = function (scheduler) {\n return new EmptyObservable(scheduler);\n };\n EmptyObservable.dispatch = function (arg) {\n var subscriber = arg.subscriber;\n subscriber.complete();\n };\n EmptyObservable.prototype._subscribe = function (subscriber) {\n var scheduler = this.scheduler;\n if (scheduler) {\n return scheduler.schedule(EmptyObservable.dispatch, 0, { subscriber: subscriber });\n }\n else {\n subscriber.complete();\n }\n };\n return EmptyObservable;\n}(Observable_1.Observable));\nexports.EmptyObservable = EmptyObservable;\n//# sourceMappingURL=EmptyObservable.js.map",
- "\"use strict\";\nvar __extends = (this && this.__extends) || function (d, b) {\n for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p];\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n};\nvar Observable_1 = require('../Observable');\n/**\n * We need this JSDoc comment for affecting ESDoc.\n * @extends {Ignored}\n * @hide true\n */\nvar ErrorObservable = (function (_super) {\n __extends(ErrorObservable, _super);\n function ErrorObservable(error, scheduler) {\n _super.call(this);\n this.error = error;\n this.scheduler = scheduler;\n }\n /**\n * Creates an Observable that emits no items to the Observer and immediately\n * emits an error notification.\n *\n * <span class=\"informal\">Just emits 'error', and nothing else.\n * </span>\n *\n * <img src=\"./img/throw.png\" width=\"100%\">\n *\n * This static operator is useful for creating a simple Observable that only\n * emits the error notification. It can be used for composing with other\n * Observables, such as in a {@link mergeMap}.\n *\n * @example <caption>Emit the number 7, then emit an error.</caption>\n * var result = Rx.Observable.throw(new Error('oops!')).startWith(7);\n * result.subscribe(x => console.log(x), e => console.error(e));\n *\n * @example <caption>Map and flatten numbers to the sequence 'a', 'b', 'c', but throw an error for 13</caption>\n * var interval = Rx.Observable.interval(1000);\n * var result = interval.mergeMap(x =>\n * x === 13 ?\n * Rx.Observable.throw('Thirteens are bad') :\n * Rx.Observable.of('a', 'b', 'c')\n * );\n * result.subscribe(x => console.log(x), e => console.error(e));\n *\n * @see {@link create}\n * @see {@link empty}\n * @see {@link never}\n * @see {@link of}\n *\n * @param {any} error The particular Error to pass to the error notification.\n * @param {Scheduler} [scheduler] A {@link IScheduler} to use for scheduling\n * the emission of the error notification.\n * @return {Observable} An error Observable: emits only the error notification\n * using the given error argument.\n * @static true\n * @name throw\n * @owner Observable\n */\n ErrorObservable.create = function (error, scheduler) {\n return new ErrorObservable(error, scheduler);\n };\n ErrorObservable.dispatch = function (arg) {\n var error = arg.error, subscriber = arg.subscriber;\n subscriber.error(error);\n };\n ErrorObservable.prototype._subscribe = function (subscriber) {\n var error = this.error;\n var scheduler = this.scheduler;\n subscriber.syncErrorThrowable = true;\n if (scheduler) {\n return scheduler.schedule(ErrorObservable.dispatch, 0, {\n error: error, subscriber: subscriber\n });\n }\n else {\n subscriber.error(error);\n }\n };\n return ErrorObservable;\n}(Observable_1.Observable));\nexports.ErrorObservable = ErrorObservable;\n//# sourceMappingURL=ErrorObservable.js.map",
- "\"use strict\";\nvar __extends = (this && this.__extends) || function (d, b) {\n for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p];\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n};\nvar Observable_1 = require('../Observable');\nvar tryCatch_1 = require('../util/tryCatch');\nvar isFunction_1 = require('../util/isFunction');\nvar errorObject_1 = require('../util/errorObject');\nvar Subscription_1 = require('../Subscription');\nvar toString = Object.prototype.toString;\nfunction isNodeStyleEventEmitter(sourceObj) {\n return !!sourceObj && typeof sourceObj.addListener === 'function' && typeof sourceObj.removeListener === 'function';\n}\nfunction isJQueryStyleEventEmitter(sourceObj) {\n return !!sourceObj && typeof sourceObj.on === 'function' && typeof sourceObj.off === 'function';\n}\nfunction isNodeList(sourceObj) {\n return !!sourceObj && toString.call(sourceObj) === '[object NodeList]';\n}\nfunction isHTMLCollection(sourceObj) {\n return !!sourceObj && toString.call(sourceObj) === '[object HTMLCollection]';\n}\nfunction isEventTarget(sourceObj) {\n return !!sourceObj && typeof sourceObj.addEventListener === 'function' && typeof sourceObj.removeEventListener === 'function';\n}\n/**\n * We need this JSDoc comment for affecting ESDoc.\n * @extends {Ignored}\n * @hide true\n */\nvar FromEventObservable = (function (_super) {\n __extends(FromEventObservable, _super);\n function FromEventObservable(sourceObj, eventName, selector, options) {\n _super.call(this);\n this.sourceObj = sourceObj;\n this.eventName = eventName;\n this.selector = selector;\n this.options = options;\n }\n /* tslint:enable:max-line-length */\n /**\n * Creates an Observable that emits events of a specific type coming from the\n * given event target.\n *\n * <span class=\"informal\">Creates an Observable from DOM events, or Node\n * EventEmitter events or others.</span>\n *\n * <img src=\"./img/fromEvent.png\" width=\"100%\">\n *\n * Creates an Observable by attaching an event listener to an \"event target\",\n * which may be an object with `addEventListener` and `removeEventListener`,\n * a Node.js EventEmitter, a jQuery style EventEmitter, a NodeList from the\n * DOM, or an HTMLCollection from the DOM. The event handler is attached when\n * the output Observable is subscribed, and removed when the Subscription is\n * unsubscribed.\n *\n * @example <caption>Emits clicks happening on the DOM document</caption>\n * var clicks = Rx.Observable.fromEvent(document, 'click');\n * clicks.subscribe(x => console.log(x));\n *\n * // Results in:\n * // MouseEvent object logged to console everytime a click\n * // occurs on the document.\n *\n * @see {@link from}\n * @see {@link fromEventPattern}\n *\n * @param {EventTargetLike} target The DOMElement, event target, Node.js\n * EventEmitter, NodeList or HTMLCollection to attach the event handler to.\n * @param {string} eventName The event name of interest, being emitted by the\n * `target`.\n * @param {EventListenerOptions} [options] Options to pass through to addEventListener\n * @param {SelectorMethodSignature<T>} [selector] An optional function to\n * post-process results. It takes the arguments from the event handler and\n * should return a single value.\n * @return {Observable<T>}\n * @static true\n * @name fromEvent\n * @owner Observable\n */\n FromEventObservable.create = function (target, eventName, options, selector) {\n if (isFunction_1.isFunction(options)) {\n selector = options;\n options = undefined;\n }\n return new FromEventObservable(target, eventName, selector, options);\n };\n FromEventObservable.setupSubscription = function (sourceObj, eventName, handler, subscriber, options) {\n var unsubscribe;\n if (isNodeList(sourceObj) || isHTMLCollection(sourceObj)) {\n for (var i = 0, len = sourceObj.length; i < len; i++) {\n FromEventObservable.setupSubscription(sourceObj[i], eventName, handler, subscriber, options);\n }\n }\n else if (isEventTarget(sourceObj)) {\n var source_1 = sourceObj;\n sourceObj.addEventListener(eventName, handler, options);\n unsubscribe = function () { return source_1.removeEventListener(eventName, handler); };\n }\n else if (isJQueryStyleEventEmitter(sourceObj)) {\n var source_2 = sourceObj;\n sourceObj.on(eventName, handler);\n unsubscribe = function () { return source_2.off(eventName, handler); };\n }\n else if (isNodeStyleEventEmitter(sourceObj)) {\n var source_3 = sourceObj;\n sourceObj.addListener(eventName, handler);\n unsubscribe = function () { return source_3.removeListener(eventName, handler); };\n }\n else {\n throw new TypeError('Invalid event target');\n }\n subscriber.add(new Subscription_1.Subscription(unsubscribe));\n };\n FromEventObservable.prototype._subscribe = function (subscriber) {\n var sourceObj = this.sourceObj;\n var eventName = this.eventName;\n var options = this.options;\n var selector = this.selector;\n var handler = selector ? function () {\n var args = [];\n for (var _i = 0; _i < arguments.length; _i++) {\n args[_i - 0] = arguments[_i];\n }\n var result = tryCatch_1.tryCatch(selector).apply(void 0, args);\n if (result === errorObject_1.errorObject) {\n subscriber.error(errorObject_1.errorObject.e);\n }\n else {\n subscriber.next(result);\n }\n } : function (e) { return subscriber.next(e); };\n FromEventObservable.setupSubscription(sourceObj, eventName, handler, subscriber, options);\n };\n return FromEventObservable;\n}(Observable_1.Observable));\nexports.FromEventObservable = FromEventObservable;\n//# sourceMappingURL=FromEventObservable.js.map",
- "\"use strict\";\nvar __extends = (this && this.__extends) || function (d, b) {\n for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p];\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n};\nvar isArray_1 = require('../util/isArray');\nvar isArrayLike_1 = require('../util/isArrayLike');\nvar isPromise_1 = require('../util/isPromise');\nvar PromiseObservable_1 = require('./PromiseObservable');\nvar IteratorObservable_1 = require('./IteratorObservable');\nvar ArrayObservable_1 = require('./ArrayObservable');\nvar ArrayLikeObservable_1 = require('./ArrayLikeObservable');\nvar iterator_1 = require('../symbol/iterator');\nvar Observable_1 = require('../Observable');\nvar observeOn_1 = require('../operator/observeOn');\nvar observable_1 = require('../symbol/observable');\n/**\n * We need this JSDoc comment for affecting ESDoc.\n * @extends {Ignored}\n * @hide true\n */\nvar FromObservable = (function (_super) {\n __extends(FromObservable, _super);\n function FromObservable(ish, scheduler) {\n _super.call(this, null);\n this.ish = ish;\n this.scheduler = scheduler;\n }\n /**\n * Creates an Observable from an Array, an array-like object, a Promise, an\n * iterable object, or an Observable-like object.\n *\n * <span class=\"informal\">Converts almost anything to an Observable.</span>\n *\n * <img src=\"./img/from.png\" width=\"100%\">\n *\n * Convert various other objects and data types into Observables. `from`\n * converts a Promise or an array-like or an\n * [iterable](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Iteration_protocols#iterable)\n * object into an Observable that emits the items in that promise or array or\n * iterable. A String, in this context, is treated as an array of characters.\n * Observable-like objects (contains a function named with the ES2015 Symbol\n * for Observable) can also be converted through this operator.\n *\n * @example <caption>Converts an array to an Observable</caption>\n * var array = [10, 20, 30];\n * var result = Rx.Observable.from(array);\n * result.subscribe(x => console.log(x));\n *\n * // Results in the following:\n * // 10 20 30\n *\n * @example <caption>Convert an infinite iterable (from a generator) to an Observable</caption>\n * function* generateDoubles(seed) {\n * var i = seed;\n * while (true) {\n * yield i;\n * i = 2 * i; // double it\n * }\n * }\n *\n * var iterator = generateDoubles(3);\n * var result = Rx.Observable.from(iterator).take(10);\n * result.subscribe(x => console.log(x));\n *\n * // Results in the following:\n * // 3 6 12 24 48 96 192 384 768 1536\n *\n * @see {@link create}\n * @see {@link fromEvent}\n * @see {@link fromEventPattern}\n * @see {@link fromPromise}\n *\n * @param {ObservableInput<T>} ish A subscribable object, a Promise, an\n * Observable-like, an Array, an iterable or an array-like object to be\n * converted.\n * @param {Scheduler} [scheduler] The scheduler on which to schedule the\n * emissions of values.\n * @return {Observable<T>} The Observable whose values are originally from the\n * input object that was converted.\n * @static true\n * @name from\n * @owner Observable\n */\n FromObservable.create = function (ish, scheduler) {\n if (ish != null) {\n if (typeof ish[observable_1.observable] === 'function') {\n if (ish instanceof Observable_1.Observable && !scheduler) {\n return ish;\n }\n return new FromObservable(ish, scheduler);\n }\n else if (isArray_1.isArray(ish)) {\n return new ArrayObservable_1.ArrayObservable(ish, scheduler);\n }\n else if (isPromise_1.isPromise(ish)) {\n return new PromiseObservable_1.PromiseObservable(ish, scheduler);\n }\n else if (typeof ish[iterator_1.iterator] === 'function' || typeof ish === 'string') {\n return new IteratorObservable_1.IteratorObservable(ish, scheduler);\n }\n else if (isArrayLike_1.isArrayLike(ish)) {\n return new ArrayLikeObservable_1.ArrayLikeObservable(ish, scheduler);\n }\n }\n throw new TypeError((ish !== null && typeof ish || ish) + ' is not observable');\n };\n FromObservable.prototype._subscribe = function (subscriber) {\n var ish = this.ish;\n var scheduler = this.scheduler;\n if (scheduler == null) {\n return ish[observable_1.observable]().subscribe(subscriber);\n }\n else {\n return ish[observable_1.observable]().subscribe(new observeOn_1.ObserveOnSubscriber(subscriber, scheduler, 0));\n }\n };\n return FromObservable;\n}(Observable_1.Observable));\nexports.FromObservable = FromObservable;\n//# sourceMappingURL=FromObservable.js.map",
- "\"use strict\";\nvar __extends = (this && this.__extends) || function (d, b) {\n for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p];\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n};\nvar root_1 = require('../util/root');\nvar Observable_1 = require('../Observable');\nvar iterator_1 = require('../symbol/iterator');\n/**\n * We need this JSDoc comment for affecting ESDoc.\n * @extends {Ignored}\n * @hide true\n */\nvar IteratorObservable = (function (_super) {\n __extends(IteratorObservable, _super);\n function IteratorObservable(iterator, scheduler) {\n _super.call(this);\n this.scheduler = scheduler;\n if (iterator == null) {\n throw new Error('iterator cannot be null.');\n }\n this.iterator = getIterator(iterator);\n }\n IteratorObservable.create = function (iterator, scheduler) {\n return new IteratorObservable(iterator, scheduler);\n };\n IteratorObservable.dispatch = function (state) {\n var index = state.index, hasError = state.hasError, iterator = state.iterator, subscriber = state.subscriber;\n if (hasError) {\n subscriber.error(state.error);\n return;\n }\n var result = iterator.next();\n if (result.done) {\n subscriber.complete();\n return;\n }\n subscriber.next(result.value);\n state.index = index + 1;\n if (subscriber.closed) {\n if (typeof iterator.return === 'function') {\n iterator.return();\n }\n return;\n }\n this.schedule(state);\n };\n IteratorObservable.prototype._subscribe = function (subscriber) {\n var index = 0;\n var _a = this, iterator = _a.iterator, scheduler = _a.scheduler;\n if (scheduler) {\n return scheduler.schedule(IteratorObservable.dispatch, 0, {\n index: index, iterator: iterator, subscriber: subscriber\n });\n }\n else {\n do {\n var result = iterator.next();\n if (result.done) {\n subscriber.complete();\n break;\n }\n else {\n subscriber.next(result.value);\n }\n if (subscriber.closed) {\n if (typeof iterator.return === 'function') {\n iterator.return();\n }\n break;\n }\n } while (true);\n }\n };\n return IteratorObservable;\n}(Observable_1.Observable));\nexports.IteratorObservable = IteratorObservable;\nvar StringIterator = (function () {\n function StringIterator(str, idx, len) {\n if (idx === void 0) { idx = 0; }\n if (len === void 0) { len = str.length; }\n this.str = str;\n this.idx = idx;\n this.len = len;\n }\n StringIterator.prototype[iterator_1.iterator] = function () { return (this); };\n StringIterator.prototype.next = function () {\n return this.idx < this.len ? {\n done: false,\n value: this.str.charAt(this.idx++)\n } : {\n done: true,\n value: undefined\n };\n };\n return StringIterator;\n}());\nvar ArrayIterator = (function () {\n function ArrayIterator(arr, idx, len) {\n if (idx === void 0) { idx = 0; }\n if (len === void 0) { len = toLength(arr); }\n this.arr = arr;\n this.idx = idx;\n this.len = len;\n }\n ArrayIterator.prototype[iterator_1.iterator] = function () { return this; };\n ArrayIterator.prototype.next = function () {\n return this.idx < this.len ? {\n done: false,\n value: this.arr[this.idx++]\n } : {\n done: true,\n value: undefined\n };\n };\n return ArrayIterator;\n}());\nfunction getIterator(obj) {\n var i = obj[iterator_1.iterator];\n if (!i && typeof obj === 'string') {\n return new StringIterator(obj);\n }\n if (!i && obj.length !== undefined) {\n return new ArrayIterator(obj);\n }\n if (!i) {\n throw new TypeError('object is not iterable');\n }\n return obj[iterator_1.iterator]();\n}\nvar maxSafeInteger = Math.pow(2, 53) - 1;\nfunction toLength(o) {\n var len = +o.length;\n if (isNaN(len)) {\n return 0;\n }\n if (len === 0 || !numberIsFinite(len)) {\n return len;\n }\n len = sign(len) * Math.floor(Math.abs(len));\n if (len <= 0) {\n return 0;\n }\n if (len > maxSafeInteger) {\n return maxSafeInteger;\n }\n return len;\n}\nfunction numberIsFinite(value) {\n return typeof value === 'number' && root_1.root.isFinite(value);\n}\nfunction sign(value) {\n var valueAsNumber = +value;\n if (valueAsNumber === 0) {\n return valueAsNumber;\n }\n if (isNaN(valueAsNumber)) {\n return valueAsNumber;\n }\n return valueAsNumber < 0 ? -1 : 1;\n}\n//# sourceMappingURL=IteratorObservable.js.map",
- "\"use strict\";\nvar __extends = (this && this.__extends) || function (d, b) {\n for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p];\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n};\nvar root_1 = require('../util/root');\nvar Observable_1 = require('../Observable');\n/**\n * We need this JSDoc comment for affecting ESDoc.\n * @extends {Ignored}\n * @hide true\n */\nvar PromiseObservable = (function (_super) {\n __extends(PromiseObservable, _super);\n function PromiseObservable(promise, scheduler) {\n _super.call(this);\n this.promise = promise;\n this.scheduler = scheduler;\n }\n /**\n * Converts a Promise to an Observable.\n *\n * <span class=\"informal\">Returns an Observable that just emits the Promise's\n * resolved value, then completes.</span>\n *\n * Converts an ES2015 Promise or a Promises/A+ spec compliant Promise to an\n * Observable. If the Promise resolves with a value, the output Observable\n * emits that resolved value as a `next`, and then completes. If the Promise\n * is rejected, then the output Observable emits the corresponding Error.\n *\n * @example <caption>Convert the Promise returned by Fetch to an Observable</caption>\n * var result = Rx.Observable.fromPromise(fetch('http://myserver.com/'));\n * result.subscribe(x => console.log(x), e => console.error(e));\n *\n * @see {@link bindCallback}\n * @see {@link from}\n *\n * @param {PromiseLike<T>} promise The promise to be converted.\n * @param {Scheduler} [scheduler] An optional IScheduler to use for scheduling\n * the delivery of the resolved value (or the rejection).\n * @return {Observable<T>} An Observable which wraps the Promise.\n * @static true\n * @name fromPromise\n * @owner Observable\n */\n PromiseObservable.create = function (promise, scheduler) {\n return new PromiseObservable(promise, scheduler);\n };\n PromiseObservable.prototype._subscribe = function (subscriber) {\n var _this = this;\n var promise = this.promise;\n var scheduler = this.scheduler;\n if (scheduler == null) {\n if (this._isScalar) {\n if (!subscriber.closed) {\n subscriber.next(this.value);\n subscriber.complete();\n }\n }\n else {\n promise.then(function (value) {\n _this.value = value;\n _this._isScalar = true;\n if (!subscriber.closed) {\n subscriber.next(value);\n subscriber.complete();\n }\n }, function (err) {\n if (!subscriber.closed) {\n subscriber.error(err);\n }\n })\n .then(null, function (err) {\n // escape the promise trap, throw unhandled errors\n root_1.root.setTimeout(function () { throw err; });\n });\n }\n }\n else {\n if (this._isScalar) {\n if (!subscriber.closed) {\n return scheduler.schedule(dispatchNext, 0, { value: this.value, subscriber: subscriber });\n }\n }\n else {\n promise.then(function (value) {\n _this.value = value;\n _this._isScalar = true;\n if (!subscriber.closed) {\n subscriber.add(scheduler.schedule(dispatchNext, 0, { value: value, subscriber: subscriber }));\n }\n }, function (err) {\n if (!subscriber.closed) {\n subscriber.add(scheduler.schedule(dispatchError, 0, { err: err, subscriber: subscriber }));\n }\n })\n .then(null, function (err) {\n // escape the promise trap, throw unhandled errors\n root_1.root.setTimeout(function () { throw err; });\n });\n }\n }\n };\n return PromiseObservable;\n}(Observable_1.Observable));\nexports.PromiseObservable = PromiseObservable;\nfunction dispatchNext(arg) {\n var value = arg.value, subscriber = arg.subscriber;\n if (!subscriber.closed) {\n subscriber.next(value);\n subscriber.complete();\n }\n}\nfunction dispatchError(arg) {\n var err = arg.err, subscriber = arg.subscriber;\n if (!subscriber.closed) {\n subscriber.error(err);\n }\n}\n//# sourceMappingURL=PromiseObservable.js.map",
- "\"use strict\";\nvar __extends = (this && this.__extends) || function (d, b) {\n for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p];\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n};\nvar Observable_1 = require('../Observable');\n/**\n * We need this JSDoc comment for affecting ESDoc.\n * @extends {Ignored}\n * @hide true\n */\nvar ScalarObservable = (function (_super) {\n __extends(ScalarObservable, _super);\n function ScalarObservable(value, scheduler) {\n _super.call(this);\n this.value = value;\n this.scheduler = scheduler;\n this._isScalar = true;\n if (scheduler) {\n this._isScalar = false;\n }\n }\n ScalarObservable.create = function (value, scheduler) {\n return new ScalarObservable(value, scheduler);\n };\n ScalarObservable.dispatch = function (state) {\n var done = state.done, value = state.value, subscriber = state.subscriber;\n if (done) {\n subscriber.complete();\n return;\n }\n subscriber.next(value);\n if (subscriber.closed) {\n return;\n }\n state.done = true;\n this.schedule(state);\n };\n ScalarObservable.prototype._subscribe = function (subscriber) {\n var value = this.value;\n var scheduler = this.scheduler;\n if (scheduler) {\n return scheduler.schedule(ScalarObservable.dispatch, 0, {\n done: false, value: value, subscriber: subscriber\n });\n }\n else {\n subscriber.next(value);\n if (!subscriber.closed) {\n subscriber.complete();\n }\n }\n };\n return ScalarObservable;\n}(Observable_1.Observable));\nexports.ScalarObservable = ScalarObservable;\n//# sourceMappingURL=ScalarObservable.js.map",
- "\"use strict\";\nvar __extends = (this && this.__extends) || function (d, b) {\n for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p];\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n};\nvar isNumeric_1 = require('../util/isNumeric');\nvar Observable_1 = require('../Observable');\nvar async_1 = require('../scheduler/async');\nvar isScheduler_1 = require('../util/isScheduler');\nvar isDate_1 = require('../util/isDate');\n/**\n * We need this JSDoc comment for affecting ESDoc.\n * @extends {Ignored}\n * @hide true\n */\nvar TimerObservable = (function (_super) {\n __extends(TimerObservable, _super);\n function TimerObservable(dueTime, period, scheduler) {\n if (dueTime === void 0) { dueTime = 0; }\n _super.call(this);\n this.period = -1;\n this.dueTime = 0;\n if (isNumeric_1.isNumeric(period)) {\n this.period = Number(period) < 1 && 1 || Number(period);\n }\n else if (isScheduler_1.isScheduler(period)) {\n scheduler = period;\n }\n if (!isScheduler_1.isScheduler(scheduler)) {\n scheduler = async_1.async;\n }\n this.scheduler = scheduler;\n this.dueTime = isDate_1.isDate(dueTime) ?\n (+dueTime - this.scheduler.now()) :\n dueTime;\n }\n /**\n * Creates an Observable that starts emitting after an `initialDelay` and\n * emits ever increasing numbers after each `period` of time thereafter.\n *\n * <span class=\"informal\">Its like {@link interval}, but you can specify when\n * should the emissions start.</span>\n *\n * <img src=\"./img/timer.png\" width=\"100%\">\n *\n * `timer` returns an Observable that emits an infinite sequence of ascending\n * integers, with a constant interval of time, `period` of your choosing\n * between those emissions. The first emission happens after the specified\n * `initialDelay`. The initial delay may be a {@link Date}. By default, this\n * operator uses the `async` IScheduler to provide a notion of time, but you\n * may pass any IScheduler to it. If `period` is not specified, the output\n * Observable emits only one value, `0`. Otherwise, it emits an infinite\n * sequence.\n *\n * @example <caption>Emits ascending numbers, one every second (1000ms), starting after 3 seconds</caption>\n * var numbers = Rx.Observable.timer(3000, 1000);\n * numbers.subscribe(x => console.log(x));\n *\n * @example <caption>Emits one number after five seconds</caption>\n * var numbers = Rx.Observable.timer(5000);\n * numbers.subscribe(x => console.log(x));\n *\n * @see {@link interval}\n * @see {@link delay}\n *\n * @param {number|Date} initialDelay The initial delay time to wait before\n * emitting the first value of `0`.\n * @param {number} [period] The period of time between emissions of the\n * subsequent numbers.\n * @param {Scheduler} [scheduler=async] The IScheduler to use for scheduling\n * the emission of values, and providing a notion of \"time\".\n * @return {Observable} An Observable that emits a `0` after the\n * `initialDelay` and ever increasing numbers after each `period` of time\n * thereafter.\n * @static true\n * @name timer\n * @owner Observable\n */\n TimerObservable.create = function (initialDelay, period, scheduler) {\n if (initialDelay === void 0) { initialDelay = 0; }\n return new TimerObservable(initialDelay, period, scheduler);\n };\n TimerObservable.dispatch = function (state) {\n var index = state.index, period = state.period, subscriber = state.subscriber;\n var action = this;\n subscriber.next(index);\n if (subscriber.closed) {\n return;\n }\n else if (period === -1) {\n return subscriber.complete();\n }\n state.index = index + 1;\n action.schedule(state, period);\n };\n TimerObservable.prototype._subscribe = function (subscriber) {\n var index = 0;\n var _a = this, period = _a.period, dueTime = _a.dueTime, scheduler = _a.scheduler;\n return scheduler.schedule(TimerObservable.dispatch, dueTime, {\n index: index, period: period, subscriber: subscriber\n });\n };\n return TimerObservable;\n}(Observable_1.Observable));\nexports.TimerObservable = TimerObservable;\n//# sourceMappingURL=TimerObservable.js.map",
- "\"use strict\";\nvar isScheduler_1 = require('../util/isScheduler');\nvar isArray_1 = require('../util/isArray');\nvar ArrayObservable_1 = require('./ArrayObservable');\nvar combineLatest_1 = require('../operator/combineLatest');\n/* tslint:enable:max-line-length */\n/**\n * Combines multiple Observables to create an Observable whose values are\n * calculated from the latest values of each of its input Observables.\n *\n * <span class=\"informal\">Whenever any input Observable emits a value, it\n * computes a formula using the latest values from all the inputs, then emits\n * the output of that formula.</span>\n *\n * <img src=\"./img/combineLatest.png\" width=\"100%\">\n *\n * `combineLatest` combines the values from all the Observables passed as\n * arguments. This is done by subscribing to each Observable in order and,\n * whenever any Observable emits, collecting an array of the most recent\n * values from each Observable. So if you pass `n` Observables to operator,\n * returned Observable will always emit an array of `n` values, in order\n * corresponding to order of passed Observables (value from the first Observable\n * on the first place and so on).\n *\n * Static version of `combineLatest` accepts either an array of Observables\n * or each Observable can be put directly as an argument. Note that array of\n * Observables is good choice, if you don't know beforehand how many Observables\n * you will combine. Passing empty array will result in Observable that\n * completes immediately.\n *\n * To ensure output array has always the same length, `combineLatest` will\n * actually wait for all input Observables to emit at least once,\n * before it starts emitting results. This means if some Observable emits\n * values before other Observables started emitting, all that values but last\n * will be lost. On the other hand, is some Observable does not emit value but\n * completes, resulting Observable will complete at the same moment without\n * emitting anything, since it will be now impossible to include value from\n * completed Observable in resulting array. Also, if some input Observable does\n * not emit any value and never completes, `combineLatest` will also never emit\n * and never complete, since, again, it will wait for all streams to emit some\n * value.\n *\n * If at least one Observable was passed to `combineLatest` and all passed Observables\n * emitted something, resulting Observable will complete when all combined\n * streams complete. So even if some Observable completes, result of\n * `combineLatest` will still emit values when other Observables do. In case\n * of completed Observable, its value from now on will always be the last\n * emitted value. On the other hand, if any Observable errors, `combineLatest`\n * will error immediately as well, and all other Observables will be unsubscribed.\n *\n * `combineLatest` accepts as optional parameter `project` function, which takes\n * as arguments all values that would normally be emitted by resulting Observable.\n * `project` can return any kind of value, which will be then emitted by Observable\n * instead of default array. Note that `project` does not take as argument that array\n * of values, but values themselves. That means default `project` can be imagined\n * as function that takes all its arguments and puts them into an array.\n *\n *\n * @example <caption>Combine two timer Observables</caption>\n * const firstTimer = Rx.Observable.timer(0, 1000); // emit 0, 1, 2... after every second, starting from now\n * const secondTimer = Rx.Observable.timer(500, 1000); // emit 0, 1, 2... after every second, starting 0,5s from now\n * const combinedTimers = Rx.Observable.combineLatest(firstTimer, secondTimer);\n * combinedTimers.subscribe(value => console.log(value));\n * // Logs\n * // [0, 0] after 0.5s\n * // [1, 0] after 1s\n * // [1, 1] after 1.5s\n * // [2, 1] after 2s\n *\n *\n * @example <caption>Combine an array of Observables</caption>\n * const observables = [1, 5, 10].map(\n * n => Rx.Observable.of(n).delay(n * 1000).startWith(0) // emit 0 and then emit n after n seconds\n * );\n * const combined = Rx.Observable.combineLatest(observables);\n * combined.subscribe(value => console.log(value));\n * // Logs\n * // [0, 0, 0] immediately\n * // [1, 0, 0] after 1s\n * // [1, 5, 0] after 5s\n * // [1, 5, 10] after 10s\n *\n *\n * @example <caption>Use project function to dynamically calculate the Body-Mass Index</caption>\n * var weight = Rx.Observable.of(70, 72, 76, 79, 75);\n * var height = Rx.Observable.of(1.76, 1.77, 1.78);\n * var bmi = Rx.Observable.combineLatest(weight, height, (w, h) => w / (h * h));\n * bmi.subscribe(x => console.log('BMI is ' + x));\n *\n * // With output to console:\n * // BMI is 24.212293388429753\n * // BMI is 23.93948099205209\n * // BMI is 23.671253629592222\n *\n *\n * @see {@link combineAll}\n * @see {@link merge}\n * @see {@link withLatestFrom}\n *\n * @param {ObservableInput} observable1 An input Observable to combine with other Observables.\n * @param {ObservableInput} observable2 An input Observable to combine with other Observables.\n * More than one input Observables may be given as arguments\n * or an array of Observables may be given as the first argument.\n * @param {function} [project] An optional function to project the values from\n * the combined latest values into a new value on the output Observable.\n * @param {Scheduler} [scheduler=null] The IScheduler to use for subscribing to\n * each input 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 * @static true\n * @name combineLatest\n * @owner Observable\n */\nfunction combineLatest() {\n var observables = [];\n for (var _i = 0; _i < arguments.length; _i++) {\n observables[_i - 0] = arguments[_i];\n }\n var project = null;\n var scheduler = null;\n if (isScheduler_1.isScheduler(observables[observables.length - 1])) {\n scheduler = observables.pop();\n }\n if (typeof observables[observables.length - 1] === 'function') {\n project = observables.pop();\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_1.isArray(observables[0])) {\n observables = observables[0];\n }\n return new ArrayObservable_1.ArrayObservable(observables, scheduler).lift(new combineLatest_1.CombineLatestOperator(project));\n}\nexports.combineLatest = combineLatest;\n//# sourceMappingURL=combineLatest.js.map",
- "\"use strict\";\nvar DeferObservable_1 = require('./DeferObservable');\nexports.defer = DeferObservable_1.DeferObservable.create;\n//# sourceMappingURL=defer.js.map",
- "\"use strict\";\nvar EmptyObservable_1 = require('./EmptyObservable');\nexports.empty = EmptyObservable_1.EmptyObservable.create;\n//# sourceMappingURL=empty.js.map",
- "\"use strict\";\nvar FromObservable_1 = require('./FromObservable');\nexports.from = FromObservable_1.FromObservable.create;\n//# sourceMappingURL=from.js.map",
- "\"use strict\";\nvar FromEventObservable_1 = require('./FromEventObservable');\nexports.fromEvent = FromEventObservable_1.FromEventObservable.create;\n//# sourceMappingURL=fromEvent.js.map",
- "\"use strict\";\nvar PromiseObservable_1 = require('./PromiseObservable');\nexports.fromPromise = PromiseObservable_1.PromiseObservable.create;\n//# sourceMappingURL=fromPromise.js.map",
- "\"use strict\";\nvar merge_1 = require('../operator/merge');\nexports.merge = merge_1.mergeStatic;\n//# sourceMappingURL=merge.js.map",
- "\"use strict\";\nvar ArrayObservable_1 = require('./ArrayObservable');\nexports.of = ArrayObservable_1.ArrayObservable.of;\n//# sourceMappingURL=of.js.map",
- "\"use strict\";\nvar ErrorObservable_1 = require('./ErrorObservable');\nexports._throw = ErrorObservable_1.ErrorObservable.create;\n//# sourceMappingURL=throw.js.map",
- "\"use strict\";\nvar TimerObservable_1 = require('./TimerObservable');\nexports.timer = TimerObservable_1.TimerObservable.create;\n//# sourceMappingURL=timer.js.map",
- "\"use strict\";\nvar zip_1 = require('../operator/zip');\nexports.zip = zip_1.zipStatic;\n//# sourceMappingURL=zip.js.map",
- "\"use strict\";\nvar __extends = (this && this.__extends) || function (d, b) {\n for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p];\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n};\nvar OuterSubscriber_1 = require('../OuterSubscriber');\nvar subscribeToResult_1 = require('../util/subscribeToResult');\n/**\n * Buffers the source Observable values until `closingNotifier` emits.\n *\n * <span class=\"informal\">Collects values from the past as an array, and emits\n * that array only when another Observable emits.</span>\n *\n * <img src=\"./img/buffer.png\" width=\"100%\">\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 <caption>On every click, emit array of most recent interval events</caption>\n * var clicks = Rx.Observable.fromEvent(document, 'click');\n * var interval = Rx.Observable.interval(1000);\n * var buffered = interval.buffer(clicks);\n * buffered.subscribe(x => console.log(x));\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<any>} closingNotifier An Observable that signals the\n * buffer to be emitted on the output Observable.\n * @return {Observable<T[]>} An Observable of buffers, which are arrays of\n * values.\n * @method buffer\n * @owner Observable\n */\nfunction buffer(closingNotifier) {\n return this.lift(new BufferOperator(closingNotifier));\n}\nexports.buffer = buffer;\nvar BufferOperator = (function () {\n function BufferOperator(closingNotifier) {\n this.closingNotifier = closingNotifier;\n }\n BufferOperator.prototype.call = function (subscriber, source) {\n return source.subscribe(new BufferSubscriber(subscriber, this.closingNotifier));\n };\n return BufferOperator;\n}());\n/**\n * We need this JSDoc comment for affecting ESDoc.\n * @ignore\n * @extends {Ignored}\n */\nvar BufferSubscriber = (function (_super) {\n __extends(BufferSubscriber, _super);\n function BufferSubscriber(destination, closingNotifier) {\n _super.call(this, destination);\n this.buffer = [];\n this.add(subscribeToResult_1.subscribeToResult(this, closingNotifier));\n }\n BufferSubscriber.prototype._next = function (value) {\n this.buffer.push(value);\n };\n BufferSubscriber.prototype.notifyNext = function (outerValue, innerValue, outerIndex, innerIndex, innerSub) {\n var buffer = this.buffer;\n this.buffer = [];\n this.destination.next(buffer);\n };\n return BufferSubscriber;\n}(OuterSubscriber_1.OuterSubscriber));\n//# sourceMappingURL=buffer.js.map",
- "\"use strict\";\nvar __extends = (this && this.__extends) || function (d, b) {\n for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p];\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n};\nvar Subscriber_1 = require('../Subscriber');\n/**\n * Buffers the source Observable values until the size hits the maximum\n * `bufferSize` given.\n *\n * <span class=\"informal\">Collects values from the past as an array, and emits\n * that array only when its size reaches `bufferSize`.</span>\n *\n * <img src=\"./img/bufferCount.png\" width=\"100%\">\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 * @example <caption>Emit the last two click events as an array</caption>\n * var clicks = Rx.Observable.fromEvent(document, 'click');\n * var buffered = clicks.bufferCount(2);\n * buffered.subscribe(x => console.log(x));\n *\n * @example <caption>On every click, emit the last two click events as an array</caption>\n * var clicks = Rx.Observable.fromEvent(document, 'click');\n * var buffered = clicks.bufferCount(2, 1);\n * buffered.subscribe(x => console.log(x));\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<T[]>} An Observable of arrays of buffered values.\n * @method bufferCount\n * @owner Observable\n */\nfunction bufferCount(bufferSize, startBufferEvery) {\n if (startBufferEvery === void 0) { startBufferEvery = null; }\n return this.lift(new BufferCountOperator(bufferSize, startBufferEvery));\n}\nexports.bufferCount = bufferCount;\nvar BufferCountOperator = (function () {\n function BufferCountOperator(bufferSize, startBufferEvery) {\n this.bufferSize = bufferSize;\n this.startBufferEvery = startBufferEvery;\n if (!startBufferEvery || bufferSize === startBufferEvery) {\n this.subscriberClass = BufferCountSubscriber;\n }\n else {\n this.subscriberClass = BufferSkipCountSubscriber;\n }\n }\n BufferCountOperator.prototype.call = function (subscriber, source) {\n return source.subscribe(new this.subscriberClass(subscriber, this.bufferSize, this.startBufferEvery));\n };\n return BufferCountOperator;\n}());\n/**\n * We need this JSDoc comment for affecting ESDoc.\n * @ignore\n * @extends {Ignored}\n */\nvar BufferCountSubscriber = (function (_super) {\n __extends(BufferCountSubscriber, _super);\n function BufferCountSubscriber(destination, bufferSize) {\n _super.call(this, destination);\n this.bufferSize = bufferSize;\n this.buffer = [];\n }\n BufferCountSubscriber.prototype._next = function (value) {\n var buffer = this.buffer;\n buffer.push(value);\n if (buffer.length == this.bufferSize) {\n this.destination.next(buffer);\n this.buffer = [];\n }\n };\n BufferCountSubscriber.prototype._complete = function () {\n var buffer = this.buffer;\n if (buffer.length > 0) {\n this.destination.next(buffer);\n }\n _super.prototype._complete.call(this);\n };\n return BufferCountSubscriber;\n}(Subscriber_1.Subscriber));\n/**\n * We need this JSDoc comment for affecting ESDoc.\n * @ignore\n * @extends {Ignored}\n */\nvar BufferSkipCountSubscriber = (function (_super) {\n __extends(BufferSkipCountSubscriber, _super);\n function BufferSkipCountSubscriber(destination, bufferSize, startBufferEvery) {\n _super.call(this, destination);\n this.bufferSize = bufferSize;\n this.startBufferEvery = startBufferEvery;\n this.buffers = [];\n this.count = 0;\n }\n BufferSkipCountSubscriber.prototype._next = function (value) {\n var _a = this, bufferSize = _a.bufferSize, startBufferEvery = _a.startBufferEvery, buffers = _a.buffers, count = _a.count;\n this.count++;\n if (count % startBufferEvery === 0) {\n buffers.push([]);\n }\n for (var i = buffers.length; i--;) {\n var 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 BufferSkipCountSubscriber.prototype._complete = function () {\n var _a = this, buffers = _a.buffers, destination = _a.destination;\n while (buffers.length > 0) {\n var buffer = buffers.shift();\n if (buffer.length > 0) {\n destination.next(buffer);\n }\n }\n _super.prototype._complete.call(this);\n };\n return BufferSkipCountSubscriber;\n}(Subscriber_1.Subscriber));\n//# sourceMappingURL=bufferCount.js.map",
- "\"use strict\";\nvar __extends = (this && this.__extends) || function (d, b) {\n for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p];\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n};\nvar Subscription_1 = require('../Subscription');\nvar tryCatch_1 = require('../util/tryCatch');\nvar errorObject_1 = require('../util/errorObject');\nvar OuterSubscriber_1 = require('../OuterSubscriber');\nvar subscribeToResult_1 = require('../util/subscribeToResult');\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 * <span class=\"informal\">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.</span>\n *\n * <img src=\"./img/bufferWhen.png\" width=\"100%\">\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 <caption>Emit an array of the last clicks every [1-5] random seconds</caption>\n * var clicks = Rx.Observable.fromEvent(document, 'click');\n * var buffered = clicks.bufferWhen(() =>\n * Rx.Observable.interval(1000 + Math.random() * 4000)\n * );\n * buffered.subscribe(x => console.log(x));\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<T[]>} An observable of arrays of buffered values.\n * @method bufferWhen\n * @owner Observable\n */\nfunction bufferWhen(closingSelector) {\n return this.lift(new BufferWhenOperator(closingSelector));\n}\nexports.bufferWhen = bufferWhen;\nvar BufferWhenOperator = (function () {\n function BufferWhenOperator(closingSelector) {\n this.closingSelector = closingSelector;\n }\n BufferWhenOperator.prototype.call = function (subscriber, source) {\n return source.subscribe(new BufferWhenSubscriber(subscriber, this.closingSelector));\n };\n return BufferWhenOperator;\n}());\n/**\n * We need this JSDoc comment for affecting ESDoc.\n * @ignore\n * @extends {Ignored}\n */\nvar BufferWhenSubscriber = (function (_super) {\n __extends(BufferWhenSubscriber, _super);\n function BufferWhenSubscriber(destination, closingSelector) {\n _super.call(this, destination);\n this.closingSelector = closingSelector;\n this.subscribing = false;\n this.openBuffer();\n }\n BufferWhenSubscriber.prototype._next = function (value) {\n this.buffer.push(value);\n };\n BufferWhenSubscriber.prototype._complete = function () {\n var buffer = this.buffer;\n if (buffer) {\n this.destination.next(buffer);\n }\n _super.prototype._complete.call(this);\n };\n BufferWhenSubscriber.prototype._unsubscribe = function () {\n this.buffer = null;\n this.subscribing = false;\n };\n BufferWhenSubscriber.prototype.notifyNext = function (outerValue, innerValue, outerIndex, innerIndex, innerSub) {\n this.openBuffer();\n };\n BufferWhenSubscriber.prototype.notifyComplete = function () {\n if (this.subscribing) {\n this.complete();\n }\n else {\n this.openBuffer();\n }\n };\n BufferWhenSubscriber.prototype.openBuffer = function () {\n var closingSubscription = this.closingSubscription;\n if (closingSubscription) {\n this.remove(closingSubscription);\n closingSubscription.unsubscribe();\n }\n var buffer = this.buffer;\n if (this.buffer) {\n this.destination.next(buffer);\n }\n this.buffer = [];\n var closingNotifier = tryCatch_1.tryCatch(this.closingSelector)();\n if (closingNotifier === errorObject_1.errorObject) {\n this.error(errorObject_1.errorObject.e);\n }\n else {\n closingSubscription = new Subscription_1.Subscription();\n this.closingSubscription = closingSubscription;\n this.add(closingSubscription);\n this.subscribing = true;\n closingSubscription.add(subscribeToResult_1.subscribeToResult(this, closingNotifier));\n this.subscribing = false;\n }\n };\n return BufferWhenSubscriber;\n}(OuterSubscriber_1.OuterSubscriber));\n//# sourceMappingURL=bufferWhen.js.map",
- "\"use strict\";\nvar __extends = (this && this.__extends) || function (d, b) {\n for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p];\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n};\nvar OuterSubscriber_1 = require('../OuterSubscriber');\nvar subscribeToResult_1 = require('../util/subscribeToResult');\n/**\n * Catches errors on the observable to be handled by returning a new observable or throwing an error.\n *\n * <img src=\"./img/catch.png\" width=\"100%\">\n *\n * @example <caption>Continues with a different Observable when there's an error</caption>\n *\n * Observable.of(1, 2, 3, 4, 5)\n * .map(n => {\n * \t if (n == 4) {\n * \t throw 'four!';\n * }\n *\t return n;\n * })\n * .catch(err => Observable.of('I', 'II', 'III', 'IV', 'V'))\n * .subscribe(x => console.log(x));\n * // 1, 2, 3, I, II, III, IV, V\n *\n * @example <caption>Retries the caught source Observable again in case of error, similar to retry() operator</caption>\n *\n * Observable.of(1, 2, 3, 4, 5)\n * .map(n => {\n * \t if (n === 4) {\n * \t throw 'four!';\n * }\n * \t return n;\n * })\n * .catch((err, caught) => caught)\n * .take(30)\n * .subscribe(x => console.log(x));\n * // 1, 2, 3, 1, 2, 3, ...\n *\n * @example <caption>Throws a new error when the source Observable throws an error</caption>\n *\n * Observable.of(1, 2, 3, 4, 5)\n * .map(n => {\n * if (n == 4) {\n * throw 'four!';\n * }\n * return n;\n * })\n * .catch(err => {\n * throw 'error in source. Details: ' + err;\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 * @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 * @method catch\n * @name catch\n * @owner Observable\n */\nfunction _catch(selector) {\n var operator = new CatchOperator(selector);\n var caught = this.lift(operator);\n return (operator.caught = caught);\n}\nexports._catch = _catch;\nvar CatchOperator = (function () {\n function CatchOperator(selector) {\n this.selector = selector;\n }\n CatchOperator.prototype.call = function (subscriber, source) {\n return source.subscribe(new CatchSubscriber(subscriber, this.selector, this.caught));\n };\n return CatchOperator;\n}());\n/**\n * We need this JSDoc comment for affecting ESDoc.\n * @ignore\n * @extends {Ignored}\n */\nvar CatchSubscriber = (function (_super) {\n __extends(CatchSubscriber, _super);\n function CatchSubscriber(destination, selector, caught) {\n _super.call(this, destination);\n this.selector = selector;\n this.caught = caught;\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 CatchSubscriber.prototype.error = function (err) {\n if (!this.isStopped) {\n var result = void 0;\n try {\n result = this.selector(err, this.caught);\n }\n catch (err2) {\n _super.prototype.error.call(this, err2);\n return;\n }\n this._unsubscribeAndRecycle();\n this.add(subscribeToResult_1.subscribeToResult(this, result));\n }\n };\n return CatchSubscriber;\n}(OuterSubscriber_1.OuterSubscriber));\n//# sourceMappingURL=catch.js.map",
- "\"use strict\";\nvar __extends = (this && this.__extends) || function (d, b) {\n for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p];\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n};\nvar ArrayObservable_1 = require('../observable/ArrayObservable');\nvar isArray_1 = require('../util/isArray');\nvar OuterSubscriber_1 = require('../OuterSubscriber');\nvar subscribeToResult_1 = require('../util/subscribeToResult');\nvar none = {};\n/* tslint:enable:max-line-length */\n/**\n * Combines multiple Observables to create an Observable whose values are\n * calculated from the latest values of each of its input Observables.\n *\n * <span class=\"informal\">Whenever any input Observable emits a value, it\n * computes a formula using the latest values from all the inputs, then emits\n * the output of that formula.</span>\n *\n * <img src=\"./img/combineLatest.png\" width=\"100%\">\n *\n * `combineLatest` combines the values from this Observable with values from\n * Observables passed as arguments. This is done by subscribing to each\n * Observable, in order, and collecting an array of each of the most recent\n * values any time any of the input Observables emits, then either taking that\n * array and passing it as arguments to an optional `project` function and\n * emitting the return value of that, or just emitting the array of recent\n * values directly if there is no `project` function.\n *\n * @example <caption>Dynamically calculate the Body-Mass Index from an Observable of weight and one for height</caption>\n * var weight = Rx.Observable.of(70, 72, 76, 79, 75);\n * var height = Rx.Observable.of(1.76, 1.77, 1.78);\n * var bmi = weight.combineLatest(height, (w, h) => w / (h * h));\n * bmi.subscribe(x => console.log('BMI is ' + x));\n *\n * // With output to console:\n * // BMI is 24.212293388429753\n * // BMI is 23.93948099205209\n * // BMI is 23.671253629592222\n *\n * @see {@link combineAll}\n * @see {@link merge}\n * @see {@link withLatestFrom}\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] An optional function to project the values from\n * the combined latest values into a new value 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 combineLatest\n * @owner Observable\n */\nfunction combineLatest() {\n var observables = [];\n for (var _i = 0; _i < arguments.length; _i++) {\n observables[_i - 0] = arguments[_i];\n }\n var project = null;\n if (typeof observables[observables.length - 1] === 'function') {\n project = observables.pop();\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_1.isArray(observables[0])) {\n observables = observables[0].slice();\n }\n observables.unshift(this);\n return this.lift.call(new ArrayObservable_1.ArrayObservable(observables), new CombineLatestOperator(project));\n}\nexports.combineLatest = combineLatest;\nvar CombineLatestOperator = (function () {\n function CombineLatestOperator(project) {\n this.project = project;\n }\n CombineLatestOperator.prototype.call = function (subscriber, source) {\n return source.subscribe(new CombineLatestSubscriber(subscriber, this.project));\n };\n return CombineLatestOperator;\n}());\nexports.CombineLatestOperator = CombineLatestOperator;\n/**\n * We need this JSDoc comment for affecting ESDoc.\n * @ignore\n * @extends {Ignored}\n */\nvar CombineLatestSubscriber = (function (_super) {\n __extends(CombineLatestSubscriber, _super);\n function CombineLatestSubscriber(destination, project) {\n _super.call(this, destination);\n this.project = project;\n this.active = 0;\n this.values = [];\n this.observables = [];\n }\n CombineLatestSubscriber.prototype._next = function (observable) {\n this.values.push(none);\n this.observables.push(observable);\n };\n CombineLatestSubscriber.prototype._complete = function () {\n var observables = this.observables;\n var len = observables.length;\n if (len === 0) {\n this.destination.complete();\n }\n else {\n this.active = len;\n this.toRespond = len;\n for (var i = 0; i < len; i++) {\n var observable = observables[i];\n this.add(subscribeToResult_1.subscribeToResult(this, observable, observable, i));\n }\n }\n };\n CombineLatestSubscriber.prototype.notifyComplete = function (unused) {\n if ((this.active -= 1) === 0) {\n this.destination.complete();\n }\n };\n CombineLatestSubscriber.prototype.notifyNext = function (outerValue, innerValue, outerIndex, innerIndex, innerSub) {\n var values = this.values;\n var oldVal = values[outerIndex];\n var toRespond = !this.toRespond\n ? 0\n : oldVal === none ? --this.toRespond : this.toRespond;\n values[outerIndex] = innerValue;\n if (toRespond === 0) {\n if (this.project) {\n this._tryProject(values);\n }\n else {\n this.destination.next(values.slice());\n }\n }\n };\n CombineLatestSubscriber.prototype._tryProject = function (values) {\n var result;\n try {\n result = this.project.apply(this, values);\n }\n catch (err) {\n this.destination.error(err);\n return;\n }\n this.destination.next(result);\n };\n return CombineLatestSubscriber;\n}(OuterSubscriber_1.OuterSubscriber));\nexports.CombineLatestSubscriber = CombineLatestSubscriber;\n//# sourceMappingURL=combineLatest.js.map",
- "\"use strict\";\nvar Observable_1 = require('../Observable');\nvar isScheduler_1 = require('../util/isScheduler');\nvar ArrayObservable_1 = require('../observable/ArrayObservable');\nvar mergeAll_1 = require('./mergeAll');\n/* tslint:enable:max-line-length */\n/**\n * Creates an output Observable which sequentially emits all values from every\n * given input Observable after the current Observable.\n *\n * <span class=\"informal\">Concatenates multiple Observables together by\n * sequentially emitting their values, one Observable after the other.</span>\n *\n * <img src=\"./img/concat.png\" width=\"100%\">\n *\n * Joins this Observable with multiple other Observables by subscribing to them\n * one at a time, starting with the source, and merging their results into the\n * output Observable. Will wait for each Observable to complete before moving\n * on to the next.\n *\n * @example <caption>Concatenate a timer counting from 0 to 3 with a synchronous sequence from 1 to 10</caption>\n * var timer = Rx.Observable.interval(1000).take(4);\n * var sequence = Rx.Observable.range(1, 10);\n * var result = timer.concat(sequence);\n * result.subscribe(x => console.log(x));\n *\n * // results in:\n * // 1000ms-> 0 -1000ms-> 1 -1000ms-> 2 -1000ms-> 3 -immediate-> 1 ... 10\n *\n * @example <caption>Concatenate 3 Observables</caption>\n * var timer1 = Rx.Observable.interval(1000).take(10);\n * var timer2 = Rx.Observable.interval(2000).take(6);\n * var timer3 = Rx.Observable.interval(500).take(10);\n * var result = timer1.concat(timer2, timer3);\n * result.subscribe(x => console.log(x));\n *\n * // results in the following:\n * // (Prints to console sequentially)\n * // -1000ms-> 0 -1000ms-> 1 -1000ms-> ... 9\n * // -2000ms-> 0 -2000ms-> 1 -2000ms-> ... 5\n * // -500ms-> 0 -500ms-> 1 -500ms-> ... 9\n *\n * @see {@link concatAll}\n * @see {@link concatMap}\n * @see {@link concatMapTo}\n *\n * @param {ObservableInput} other An input Observable to concatenate after the source\n * Observable. More than one input Observables may be given as argument.\n * @param {Scheduler} [scheduler=null] An optional IScheduler to schedule each\n * Observable subscription on.\n * @return {Observable} All values of each passed Observable merged into a\n * single Observable, in order, in serial fashion.\n * @method concat\n * @owner Observable\n */\nfunction concat() {\n var observables = [];\n for (var _i = 0; _i < arguments.length; _i++) {\n observables[_i - 0] = arguments[_i];\n }\n return this.lift.call(concatStatic.apply(void 0, [this].concat(observables)));\n}\nexports.concat = concat;\n/* tslint:enable:max-line-length */\n/**\n * Creates an output Observable which sequentially emits all values from given\n * Observable and then moves on to the next.\n *\n * <span class=\"informal\">Concatenates multiple Observables together by\n * sequentially emitting their values, one Observable after the other.</span>\n *\n * <img src=\"./img/concat.png\" width=\"100%\">\n *\n * `concat` joins multiple Observables together, by subscribing to them one at a time and\n * merging their results into the output Observable. You can pass either an array of\n * Observables, or put them directly as arguments. Passing an empty array will result\n * in Observable that completes immediately.\n *\n * `concat` will subscribe to first input Observable and emit all its values, without\n * changing or affecting them in any way. When that Observable completes, it will\n * subscribe to then next Observable passed and, again, emit its values. This will be\n * repeated, until the operator runs out of Observables. When last input Observable completes,\n * `concat` will complete as well. At any given moment only one Observable passed to operator\n * emits values. If you would like to emit values from passed Observables concurrently, check out\n * {@link merge} instead, especially with optional `concurrent` parameter. As a matter of fact,\n * `concat` is an equivalent of `merge` operator with `concurrent` parameter set to `1`.\n *\n * Note that if some input Observable never completes, `concat` will also never complete\n * and Observables following the one that did not complete will never be subscribed. On the other\n * hand, if some Observable simply completes immediately after it is subscribed, it will be\n * invisible for `concat`, which will just move on to the next Observable.\n *\n * If any Observable in chain errors, instead of passing control to the next Observable,\n * `concat` will error immediately as well. Observables that would be subscribed after\n * the one that emitted error, never will.\n *\n * If you pass to `concat` the same Observable many times, its stream of values\n * will be \"replayed\" on every subscription, which means you can repeat given Observable\n * as many times as you like. If passing the same Observable to `concat` 1000 times becomes tedious,\n * you can always use {@link repeat}.\n *\n * @example <caption>Concatenate a timer counting from 0 to 3 with a synchronous sequence from 1 to 10</caption>\n * var timer = Rx.Observable.interval(1000).take(4);\n * var sequence = Rx.Observable.range(1, 10);\n * var result = Rx.Observable.concat(timer, sequence);\n * result.subscribe(x => console.log(x));\n *\n * // results in:\n * // 0 -1000ms-> 1 -1000ms-> 2 -1000ms-> 3 -immediate-> 1 ... 10\n *\n *\n * @example <caption>Concatenate an array of 3 Observables</caption>\n * var timer1 = Rx.Observable.interval(1000).take(10);\n * var timer2 = Rx.Observable.interval(2000).take(6);\n * var timer3 = Rx.Observable.interval(500).take(10);\n * var result = Rx.Observable.concat([timer1, timer2, timer3]); // note that array is passed\n * result.subscribe(x => console.log(x));\n *\n * // results in the following:\n * // (Prints to console sequentially)\n * // -1000ms-> 0 -1000ms-> 1 -1000ms-> ... 9\n * // -2000ms-> 0 -2000ms-> 1 -2000ms-> ... 5\n * // -500ms-> 0 -500ms-> 1 -500ms-> ... 9\n *\n *\n * @example <caption>Concatenate the same Observable to repeat it</caption>\n * const timer = Rx.Observable.interval(1000).take(2);\n *\n * Rx.Observable.concat(timer, timer) // concating the same Observable!\n * .subscribe(\n * value => console.log(value),\n * err => {},\n * () => console.log('...and it is done!')\n * );\n *\n * // Logs:\n * // 0 after 1s\n * // 1 after 2s\n * // 0 after 3s\n * // 1 after 4s\n * // \"...and it is done!\" also after 4s\n *\n * @see {@link concatAll}\n * @see {@link concatMap}\n * @see {@link concatMapTo}\n *\n * @param {ObservableInput} input1 An input Observable to concatenate with others.\n * @param {ObservableInput} input2 An input Observable to concatenate with others.\n * More than one input Observables may be given as argument.\n * @param {Scheduler} [scheduler=null] An optional IScheduler to schedule each\n * Observable subscription on.\n * @return {Observable} All values of each passed Observable merged into a\n * single Observable, in order, in serial fashion.\n * @static true\n * @name concat\n * @owner Observable\n */\nfunction concatStatic() {\n var observables = [];\n for (var _i = 0; _i < arguments.length; _i++) {\n observables[_i - 0] = arguments[_i];\n }\n var scheduler = null;\n var args = observables;\n if (isScheduler_1.isScheduler(args[observables.length - 1])) {\n scheduler = args.pop();\n }\n if (scheduler === null && observables.length === 1 && observables[0] instanceof Observable_1.Observable) {\n return observables[0];\n }\n return new ArrayObservable_1.ArrayObservable(observables, scheduler).lift(new mergeAll_1.MergeAllOperator(1));\n}\nexports.concatStatic = concatStatic;\n//# sourceMappingURL=concat.js.map",
- "\"use strict\";\nvar __extends = (this && this.__extends) || function (d, b) {\n for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p];\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n};\nvar Subscriber_1 = require('../Subscriber');\nvar async_1 = require('../scheduler/async');\n/**\n * Emits a value from the source Observable only after a particular time span\n * has passed without another source emission.\n *\n * <span class=\"informal\">It's like {@link delay}, but passes only the most\n * recent value from each burst of emissions.</span>\n *\n * <img src=\"./img/debounceTime.png\" width=\"100%\">\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 IScheduler} for\n * managing timers.\n *\n * @example <caption>Emit the most recent click after a burst of clicks</caption>\n * var clicks = Rx.Observable.fromEvent(document, 'click');\n * var result = clicks.debounceTime(1000);\n * result.subscribe(x => console.log(x));\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 {Scheduler} [scheduler=async] The {@link IScheduler} 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 */\nfunction debounceTime(dueTime, scheduler) {\n if (scheduler === void 0) { scheduler = async_1.async; }\n return this.lift(new DebounceTimeOperator(dueTime, scheduler));\n}\nexports.debounceTime = debounceTime;\nvar DebounceTimeOperator = (function () {\n function DebounceTimeOperator(dueTime, scheduler) {\n this.dueTime = dueTime;\n this.scheduler = scheduler;\n }\n DebounceTimeOperator.prototype.call = function (subscriber, source) {\n return source.subscribe(new DebounceTimeSubscriber(subscriber, this.dueTime, this.scheduler));\n };\n return DebounceTimeOperator;\n}());\n/**\n * We need this JSDoc comment for affecting ESDoc.\n * @ignore\n * @extends {Ignored}\n */\nvar DebounceTimeSubscriber = (function (_super) {\n __extends(DebounceTimeSubscriber, _super);\n function DebounceTimeSubscriber(destination, dueTime, scheduler) {\n _super.call(this, destination);\n this.dueTime = dueTime;\n this.scheduler = scheduler;\n this.debouncedSubscription = null;\n this.lastValue = null;\n this.hasValue = false;\n }\n DebounceTimeSubscriber.prototype._next = function (value) {\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 DebounceTimeSubscriber.prototype._complete = function () {\n this.debouncedNext();\n this.destination.complete();\n };\n DebounceTimeSubscriber.prototype.debouncedNext = function () {\n this.clearDebounce();\n if (this.hasValue) {\n this.destination.next(this.lastValue);\n this.lastValue = null;\n this.hasValue = false;\n }\n };\n DebounceTimeSubscriber.prototype.clearDebounce = function () {\n var debouncedSubscription = this.debouncedSubscription;\n if (debouncedSubscription !== null) {\n this.remove(debouncedSubscription);\n debouncedSubscription.unsubscribe();\n this.debouncedSubscription = null;\n }\n };\n return DebounceTimeSubscriber;\n}(Subscriber_1.Subscriber));\nfunction dispatchNext(subscriber) {\n subscriber.debouncedNext();\n}\n//# sourceMappingURL=debounceTime.js.map",
- "\"use strict\";\nvar __extends = (this && this.__extends) || function (d, b) {\n for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p];\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n};\nvar async_1 = require('../scheduler/async');\nvar isDate_1 = require('../util/isDate');\nvar Subscriber_1 = require('../Subscriber');\nvar Notification_1 = require('../Notification');\n/**\n * Delays the emission of items from the source Observable by a given timeout or\n * until a given Date.\n *\n * <span class=\"informal\">Time shifts each item by some specified amount of\n * milliseconds.</span>\n *\n * <img src=\"./img/delay.png\" width=\"100%\">\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 * @example <caption>Delay each click by one second</caption>\n * var clicks = Rx.Observable.fromEvent(document, 'click');\n * var delayedClicks = clicks.delay(1000); // each click emitted after 1 second\n * delayedClicks.subscribe(x => console.log(x));\n *\n * @example <caption>Delay all clicks until a future date happens</caption>\n * var clicks = Rx.Observable.fromEvent(document, 'click');\n * var date = new Date('March 15, 2050 12:00:00'); // in the future\n * var delayedClicks = clicks.delay(date); // click emitted only after that date\n * delayedClicks.subscribe(x => console.log(x));\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 {Scheduler} [scheduler=async] The IScheduler 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 */\nfunction delay(delay, scheduler) {\n if (scheduler === void 0) { scheduler = async_1.async; }\n var absoluteDelay = isDate_1.isDate(delay);\n var delayFor = absoluteDelay ? (+delay - scheduler.now()) : Math.abs(delay);\n return this.lift(new DelayOperator(delayFor, scheduler));\n}\nexports.delay = delay;\nvar DelayOperator = (function () {\n function DelayOperator(delay, scheduler) {\n this.delay = delay;\n this.scheduler = scheduler;\n }\n DelayOperator.prototype.call = function (subscriber, source) {\n return source.subscribe(new DelaySubscriber(subscriber, this.delay, this.scheduler));\n };\n return DelayOperator;\n}());\n/**\n * We need this JSDoc comment for affecting ESDoc.\n * @ignore\n * @extends {Ignored}\n */\nvar DelaySubscriber = (function (_super) {\n __extends(DelaySubscriber, _super);\n function DelaySubscriber(destination, delay, scheduler) {\n _super.call(this, destination);\n this.delay = delay;\n this.scheduler = scheduler;\n this.queue = [];\n this.active = false;\n this.errored = false;\n }\n DelaySubscriber.dispatch = function (state) {\n var source = state.source;\n var queue = source.queue;\n var scheduler = state.scheduler;\n var destination = state.destination;\n while (queue.length > 0 && (queue[0].time - scheduler.now()) <= 0) {\n queue.shift().notification.observe(destination);\n }\n if (queue.length > 0) {\n var delay_1 = Math.max(0, queue[0].time - scheduler.now());\n this.schedule(state, delay_1);\n }\n else {\n source.active = false;\n }\n };\n DelaySubscriber.prototype._schedule = function (scheduler) {\n this.active = true;\n this.add(scheduler.schedule(DelaySubscriber.dispatch, this.delay, {\n source: this, destination: this.destination, scheduler: scheduler\n }));\n };\n DelaySubscriber.prototype.scheduleNotification = function (notification) {\n if (this.errored === true) {\n return;\n }\n var scheduler = this.scheduler;\n var message = new DelayMessage(scheduler.now() + this.delay, notification);\n this.queue.push(message);\n if (this.active === false) {\n this._schedule(scheduler);\n }\n };\n DelaySubscriber.prototype._next = function (value) {\n this.scheduleNotification(Notification_1.Notification.createNext(value));\n };\n DelaySubscriber.prototype._error = function (err) {\n this.errored = true;\n this.queue = [];\n this.destination.error(err);\n };\n DelaySubscriber.prototype._complete = function () {\n this.scheduleNotification(Notification_1.Notification.createComplete());\n };\n return DelaySubscriber;\n}(Subscriber_1.Subscriber));\nvar DelayMessage = (function () {\n function DelayMessage(time, notification) {\n this.time = time;\n this.notification = notification;\n }\n return DelayMessage;\n}());\n//# sourceMappingURL=delay.js.map",
- "\"use strict\";\nvar __extends = (this && this.__extends) || function (d, b) {\n for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p];\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n};\nvar OuterSubscriber_1 = require('../OuterSubscriber');\nvar subscribeToResult_1 = require('../util/subscribeToResult');\nvar Set_1 = require('../util/Set');\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 * @example <caption>A simple example with numbers</caption>\n * Observable.of(1, 1, 2, 2, 2, 1, 2, 3, 4, 3, 2, 1)\n * .distinct()\n * .subscribe(x => console.log(x)); // 1, 2, 3, 4\n *\n * @example <caption>An example using a keySelector function</caption>\n * interface Person {\n * age: number,\n * name: string\n * }\n *\n * Observable.of<Person>(\n * { age: 4, name: 'Foo'},\n * { age: 7, name: 'Bar'},\n * { age: 5, name: 'Foo'})\n * .distinct((p: Person) => p.name)\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 */\nfunction distinct(keySelector, flushes) {\n return this.lift(new DistinctOperator(keySelector, flushes));\n}\nexports.distinct = distinct;\nvar DistinctOperator = (function () {\n function DistinctOperator(keySelector, flushes) {\n this.keySelector = keySelector;\n this.flushes = flushes;\n }\n DistinctOperator.prototype.call = function (subscriber, source) {\n return source.subscribe(new DistinctSubscriber(subscriber, this.keySelector, this.flushes));\n };\n return DistinctOperator;\n}());\n/**\n * We need this JSDoc comment for affecting ESDoc.\n * @ignore\n * @extends {Ignored}\n */\nvar DistinctSubscriber = (function (_super) {\n __extends(DistinctSubscriber, _super);\n function DistinctSubscriber(destination, keySelector, flushes) {\n _super.call(this, destination);\n this.keySelector = keySelector;\n this.values = new Set_1.Set();\n if (flushes) {\n this.add(subscribeToResult_1.subscribeToResult(this, flushes));\n }\n }\n DistinctSubscriber.prototype.notifyNext = function (outerValue, innerValue, outerIndex, innerIndex, innerSub) {\n this.values.clear();\n };\n DistinctSubscriber.prototype.notifyError = function (error, innerSub) {\n this._error(error);\n };\n DistinctSubscriber.prototype._next = function (value) {\n if (this.keySelector) {\n this._useKeySelector(value);\n }\n else {\n this._finalizeNext(value, value);\n }\n };\n DistinctSubscriber.prototype._useKeySelector = function (value) {\n var key;\n var destination = this.destination;\n try {\n key = this.keySelector(value);\n }\n catch (err) {\n destination.error(err);\n return;\n }\n this._finalizeNext(key, value);\n };\n DistinctSubscriber.prototype._finalizeNext = function (key, value) {\n var values = this.values;\n if (!values.has(key)) {\n values.add(key);\n this.destination.next(value);\n }\n };\n return DistinctSubscriber;\n}(OuterSubscriber_1.OuterSubscriber));\nexports.DistinctSubscriber = DistinctSubscriber;\n//# sourceMappingURL=distinct.js.map",
- "\"use strict\";\nvar __extends = (this && this.__extends) || function (d, b) {\n for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p];\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n};\nvar Subscriber_1 = require('../Subscriber');\nvar tryCatch_1 = require('../util/tryCatch');\nvar errorObject_1 = require('../util/errorObject');\n/* tslint:enable:max-line-length */\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 <caption>A simple example with numbers</caption>\n * Observable.of(1, 1, 2, 2, 2, 1, 1, 2, 3, 3, 4)\n * .distinctUntilChanged()\n * .subscribe(x => console.log(x)); // 1, 2, 1, 2, 3, 4\n *\n * @example <caption>An example using a compare function</caption>\n * interface Person {\n * age: number,\n * name: string\n * }\n *\n * Observable.of<Person>(\n * { age: 4, name: 'Foo'},\n * { age: 7, name: 'Bar'},\n * { age: 5, name: 'Foo'})\n * { age: 6, name: 'Foo'})\n * .distinctUntilChanged((p: Person, q: Person) => p.name === q.name)\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 * @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 */\nfunction distinctUntilChanged(compare, keySelector) {\n return this.lift(new DistinctUntilChangedOperator(compare, keySelector));\n}\nexports.distinctUntilChanged = distinctUntilChanged;\nvar DistinctUntilChangedOperator = (function () {\n function DistinctUntilChangedOperator(compare, keySelector) {\n this.compare = compare;\n this.keySelector = keySelector;\n }\n DistinctUntilChangedOperator.prototype.call = function (subscriber, source) {\n return source.subscribe(new DistinctUntilChangedSubscriber(subscriber, this.compare, this.keySelector));\n };\n return DistinctUntilChangedOperator;\n}());\n/**\n * We need this JSDoc comment for affecting ESDoc.\n * @ignore\n * @extends {Ignored}\n */\nvar DistinctUntilChangedSubscriber = (function (_super) {\n __extends(DistinctUntilChangedSubscriber, _super);\n function DistinctUntilChangedSubscriber(destination, compare, keySelector) {\n _super.call(this, destination);\n this.keySelector = keySelector;\n this.hasKey = false;\n if (typeof compare === 'function') {\n this.compare = compare;\n }\n }\n DistinctUntilChangedSubscriber.prototype.compare = function (x, y) {\n return x === y;\n };\n DistinctUntilChangedSubscriber.prototype._next = function (value) {\n var keySelector = this.keySelector;\n var key = value;\n if (keySelector) {\n key = tryCatch_1.tryCatch(this.keySelector)(value);\n if (key === errorObject_1.errorObject) {\n return this.destination.error(errorObject_1.errorObject.e);\n }\n }\n var result = false;\n if (this.hasKey) {\n result = tryCatch_1.tryCatch(this.compare)(this.key, key);\n if (result === errorObject_1.errorObject) {\n return this.destination.error(errorObject_1.errorObject.e);\n }\n }\n else {\n this.hasKey = true;\n }\n if (Boolean(result) === false) {\n this.key = key;\n this.destination.next(value);\n }\n };\n return DistinctUntilChangedSubscriber;\n}(Subscriber_1.Subscriber));\n//# sourceMappingURL=distinctUntilChanged.js.map",
- "\"use strict\";\nvar __extends = (this && this.__extends) || function (d, b) {\n for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p];\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n};\nvar Subscriber_1 = require('../Subscriber');\n/* tslint:enable:max-line-length */\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 * <span class=\"informal\">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.</span>\n *\n * <img src=\"./img/do.png\" width=\"100%\">\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 `do` is not subscribed, the side effects specified by the\n * Observer will never happen. `do` therefore simply spies on existing\n * execution, it does not trigger an execution to happen like `subscribe` does.\n *\n * @example <caption>Map every click to the clientX position of that click, while also logging the click event</caption>\n * var clicks = Rx.Observable.fromEvent(document, 'click');\n * var positions = clicks\n * .do(ev => console.log(ev))\n * .map(ev => ev.clientX);\n * positions.subscribe(x => console.log(x));\n *\n * @see {@link map}\n * @see {@link 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 * @method do\n * @name do\n * @owner Observable\n */\nfunction _do(nextOrObserver, error, complete) {\n return this.lift(new DoOperator(nextOrObserver, error, complete));\n}\nexports._do = _do;\nvar DoOperator = (function () {\n function DoOperator(nextOrObserver, error, complete) {\n this.nextOrObserver = nextOrObserver;\n this.error = error;\n this.complete = complete;\n }\n DoOperator.prototype.call = function (subscriber, source) {\n return source.subscribe(new DoSubscriber(subscriber, this.nextOrObserver, this.error, this.complete));\n };\n return DoOperator;\n}());\n/**\n * We need this JSDoc comment for affecting ESDoc.\n * @ignore\n * @extends {Ignored}\n */\nvar DoSubscriber = (function (_super) {\n __extends(DoSubscriber, _super);\n function DoSubscriber(destination, nextOrObserver, error, complete) {\n _super.call(this, destination);\n var safeSubscriber = new Subscriber_1.Subscriber(nextOrObserver, error, complete);\n safeSubscriber.syncErrorThrowable = true;\n this.add(safeSubscriber);\n this.safeSubscriber = safeSubscriber;\n }\n DoSubscriber.prototype._next = function (value) {\n var safeSubscriber = this.safeSubscriber;\n safeSubscriber.next(value);\n if (safeSubscriber.syncErrorThrown) {\n this.destination.error(safeSubscriber.syncErrorValue);\n }\n else {\n this.destination.next(value);\n }\n };\n DoSubscriber.prototype._error = function (err) {\n var safeSubscriber = this.safeSubscriber;\n safeSubscriber.error(err);\n if (safeSubscriber.syncErrorThrown) {\n this.destination.error(safeSubscriber.syncErrorValue);\n }\n else {\n this.destination.error(err);\n }\n };\n DoSubscriber.prototype._complete = function () {\n var safeSubscriber = this.safeSubscriber;\n safeSubscriber.complete();\n if (safeSubscriber.syncErrorThrown) {\n this.destination.error(safeSubscriber.syncErrorValue);\n }\n else {\n this.destination.complete();\n }\n };\n return DoSubscriber;\n}(Subscriber_1.Subscriber));\n//# sourceMappingURL=do.js.map",
- "\"use strict\";\nvar __extends = (this && this.__extends) || function (d, b) {\n for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p];\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n};\nvar tryCatch_1 = require('../util/tryCatch');\nvar errorObject_1 = require('../util/errorObject');\nvar OuterSubscriber_1 = require('../OuterSubscriber');\nvar subscribeToResult_1 = require('../util/subscribeToResult');\n/* tslint:enable:max-line-length */\n/**\n * Recursively projects each source value to an Observable which is merged in\n * the output Observable.\n *\n * <span class=\"informal\">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.</span>\n *\n * <img src=\"./img/expand.png\" width=\"100%\">\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 <caption>Start emitting the powers of two on every click, at most 10 of them</caption>\n * var clicks = Rx.Observable.fromEvent(document, 'click');\n * var powersOfTwo = clicks\n * .mapTo(1)\n * .expand(x => Rx.Observable.of(2 * x).delay(1000))\n * .take(10);\n * powersOfTwo.subscribe(x => console.log(x));\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 {Scheduler} [scheduler=null] The IScheduler 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 */\nfunction expand(project, concurrent, scheduler) {\n if (concurrent === void 0) { concurrent = Number.POSITIVE_INFINITY; }\n if (scheduler === void 0) { scheduler = undefined; }\n concurrent = (concurrent || 0) < 1 ? Number.POSITIVE_INFINITY : concurrent;\n return this.lift(new ExpandOperator(project, concurrent, scheduler));\n}\nexports.expand = expand;\nvar ExpandOperator = (function () {\n function ExpandOperator(project, concurrent, scheduler) {\n this.project = project;\n this.concurrent = concurrent;\n this.scheduler = scheduler;\n }\n ExpandOperator.prototype.call = function (subscriber, source) {\n return source.subscribe(new ExpandSubscriber(subscriber, this.project, this.concurrent, this.scheduler));\n };\n return ExpandOperator;\n}());\nexports.ExpandOperator = ExpandOperator;\n/**\n * We need this JSDoc comment for affecting ESDoc.\n * @ignore\n * @extends {Ignored}\n */\nvar ExpandSubscriber = (function (_super) {\n __extends(ExpandSubscriber, _super);\n function ExpandSubscriber(destination, project, concurrent, scheduler) {\n _super.call(this, destination);\n this.project = project;\n this.concurrent = concurrent;\n this.scheduler = scheduler;\n this.index = 0;\n this.active = 0;\n this.hasCompleted = false;\n if (concurrent < Number.POSITIVE_INFINITY) {\n this.buffer = [];\n }\n }\n ExpandSubscriber.dispatch = function (arg) {\n var subscriber = arg.subscriber, result = arg.result, value = arg.value, index = arg.index;\n subscriber.subscribeToProjection(result, value, index);\n };\n ExpandSubscriber.prototype._next = function (value) {\n var destination = this.destination;\n if (destination.closed) {\n this._complete();\n return;\n }\n var index = this.index++;\n if (this.active < this.concurrent) {\n destination.next(value);\n var result = tryCatch_1.tryCatch(this.project)(value, index);\n if (result === errorObject_1.errorObject) {\n destination.error(errorObject_1.errorObject.e);\n }\n else if (!this.scheduler) {\n this.subscribeToProjection(result, value, index);\n }\n else {\n var state = { subscriber: this, result: result, value: value, index: index };\n this.add(this.scheduler.schedule(ExpandSubscriber.dispatch, 0, state));\n }\n }\n else {\n this.buffer.push(value);\n }\n };\n ExpandSubscriber.prototype.subscribeToProjection = function (result, value, index) {\n this.active++;\n this.add(subscribeToResult_1.subscribeToResult(this, result, value, index));\n };\n ExpandSubscriber.prototype._complete = function () {\n this.hasCompleted = true;\n if (this.hasCompleted && this.active === 0) {\n this.destination.complete();\n }\n };\n ExpandSubscriber.prototype.notifyNext = function (outerValue, innerValue, outerIndex, innerIndex, innerSub) {\n this._next(innerValue);\n };\n ExpandSubscriber.prototype.notifyComplete = function (innerSub) {\n var buffer = this.buffer;\n this.remove(innerSub);\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 return ExpandSubscriber;\n}(OuterSubscriber_1.OuterSubscriber));\nexports.ExpandSubscriber = ExpandSubscriber;\n//# sourceMappingURL=expand.js.map",
- "\"use strict\";\nvar __extends = (this && this.__extends) || function (d, b) {\n for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p];\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n};\nvar Subscriber_1 = require('../Subscriber');\n/* tslint:enable:max-line-length */\n/**\n * Filter items emitted by the source Observable by only emitting those that\n * satisfy a specified predicate.\n *\n * <span class=\"informal\">Like\n * [Array.prototype.filter()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/filter),\n * it only emits a value from the source if it passes a criterion function.</span>\n *\n * <img src=\"./img/filter.png\" width=\"100%\">\n *\n * Similar to the well-known `Array.prototype.filter` method, this operator\n * takes values from the source Observable, passes them through a `predicate`\n * function and only emits those values that yielded `true`.\n *\n * @example <caption>Emit only click events whose target was a DIV element</caption>\n * var clicks = Rx.Observable.fromEvent(document, 'click');\n * var clicksOnDivs = clicks.filter(ev => ev.target.tagName === 'DIV');\n * clicksOnDivs.subscribe(x => console.log(x));\n *\n * @see {@link distinct}\n * @see {@link distinctUntilChanged}\n * @see {@link distinctUntilKeyChanged}\n * @see {@link ignoreElements}\n * @see {@link partition}\n * @see {@link skip}\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, if `false` the value is not passed to the output\n * Observable. The `index` parameter is the number `i` for the i-th source\n * emission that has happened since the subscription, starting from the number\n * `0`.\n * @param {any} [thisArg] An optional argument to determine the value of `this`\n * in the `predicate` function.\n * @return {Observable} An Observable of values from the source that were\n * allowed by the `predicate` function.\n * @method filter\n * @owner Observable\n */\nfunction filter(predicate, thisArg) {\n return this.lift(new FilterOperator(predicate, thisArg));\n}\nexports.filter = filter;\nvar FilterOperator = (function () {\n function FilterOperator(predicate, thisArg) {\n this.predicate = predicate;\n this.thisArg = thisArg;\n }\n FilterOperator.prototype.call = function (subscriber, source) {\n return source.subscribe(new FilterSubscriber(subscriber, this.predicate, this.thisArg));\n };\n return FilterOperator;\n}());\n/**\n * We need this JSDoc comment for affecting ESDoc.\n * @ignore\n * @extends {Ignored}\n */\nvar FilterSubscriber = (function (_super) {\n __extends(FilterSubscriber, _super);\n function FilterSubscriber(destination, predicate, thisArg) {\n _super.call(this, destination);\n this.predicate = predicate;\n this.thisArg = thisArg;\n this.count = 0;\n this.predicate = predicate;\n }\n // the try catch block below is left specifically for\n // optimization and perf reasons. a tryCatcher is not necessary here.\n FilterSubscriber.prototype._next = function (value) {\n var result;\n try {\n result = this.predicate.call(this.thisArg, value, this.count++);\n }\n catch (err) {\n this.destination.error(err);\n return;\n }\n if (result) {\n this.destination.next(value);\n }\n };\n return FilterSubscriber;\n}(Subscriber_1.Subscriber));\n//# sourceMappingURL=filter.js.map",
- "\"use strict\";\nvar __extends = (this && this.__extends) || function (d, b) {\n for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p];\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n};\nvar Subscriber_1 = require('../Subscriber');\nvar Subscription_1 = require('../Subscription');\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 */\nfunction _finally(callback) {\n return this.lift(new FinallyOperator(callback));\n}\nexports._finally = _finally;\nvar FinallyOperator = (function () {\n function FinallyOperator(callback) {\n this.callback = callback;\n }\n FinallyOperator.prototype.call = function (subscriber, source) {\n return source.subscribe(new FinallySubscriber(subscriber, this.callback));\n };\n return FinallyOperator;\n}());\n/**\n * We need this JSDoc comment for affecting ESDoc.\n * @ignore\n * @extends {Ignored}\n */\nvar FinallySubscriber = (function (_super) {\n __extends(FinallySubscriber, _super);\n function FinallySubscriber(destination, callback) {\n _super.call(this, destination);\n this.add(new Subscription_1.Subscription(callback));\n }\n return FinallySubscriber;\n}(Subscriber_1.Subscriber));\n//# sourceMappingURL=finally.js.map",
- "\"use strict\";\nvar __extends = (this && this.__extends) || function (d, b) {\n for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p];\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n};\nvar Subscriber_1 = require('../Subscriber');\nvar EmptyError_1 = require('../util/EmptyError');\n/**\n * Emits only the first value (or the first value that meets some condition)\n * emitted by the source Observable.\n *\n * <span class=\"informal\">Emits only the first value. Or emits only the first\n * value that passes some test.</span>\n *\n * <img src=\"./img/first.png\" width=\"100%\">\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 `resultSelector` function to produce the output value from\n * the input value, and a `defaultValue` to emit in case the source completes\n * before it is able to emit a valid value. Throws an error if `defaultValue`\n * was not provided and a matching element is not found.\n *\n * @example <caption>Emit only the first click that happens on the DOM</caption>\n * var clicks = Rx.Observable.fromEvent(document, 'click');\n * var result = clicks.first();\n * result.subscribe(x => console.log(x));\n *\n * @example <caption>Emits the first click that happens on a DIV</caption>\n * var clicks = Rx.Observable.fromEvent(document, 'click');\n * var result = clicks.first(ev => ev.target.tagName === 'DIV');\n * result.subscribe(x => console.log(x));\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<T>): boolean} [predicate]\n * An optional function called with each item to test for condition matching.\n * @param {function(value: T, index: number): R} [resultSelector] A function to\n * produce the value on the output Observable based on the values\n * and the indices of the source Observable. The arguments passed to this\n * function are:\n * - `value`: the value that was emitted on the source.\n * - `index`: the \"index\" of the value from the source.\n * @param {R} [defaultValue] The default value emitted in case no valid value\n * was found on the source.\n * @return {Observable<T|R>} An Observable of the first item that matches the\n * condition.\n * @method first\n * @owner Observable\n */\nfunction first(predicate, resultSelector, defaultValue) {\n return this.lift(new FirstOperator(predicate, resultSelector, defaultValue, this));\n}\nexports.first = first;\nvar FirstOperator = (function () {\n function FirstOperator(predicate, resultSelector, defaultValue, source) {\n this.predicate = predicate;\n this.resultSelector = resultSelector;\n this.defaultValue = defaultValue;\n this.source = source;\n }\n FirstOperator.prototype.call = function (observer, source) {\n return source.subscribe(new FirstSubscriber(observer, this.predicate, this.resultSelector, this.defaultValue, this.source));\n };\n return FirstOperator;\n}());\n/**\n * We need this JSDoc comment for affecting ESDoc.\n * @ignore\n * @extends {Ignored}\n */\nvar FirstSubscriber = (function (_super) {\n __extends(FirstSubscriber, _super);\n function FirstSubscriber(destination, predicate, resultSelector, defaultValue, source) {\n _super.call(this, destination);\n this.predicate = predicate;\n this.resultSelector = resultSelector;\n this.defaultValue = defaultValue;\n this.source = source;\n this.index = 0;\n this.hasCompleted = false;\n this._emitted = false;\n }\n FirstSubscriber.prototype._next = function (value) {\n var index = this.index++;\n if (this.predicate) {\n this._tryPredicate(value, index);\n }\n else {\n this._emit(value, index);\n }\n };\n FirstSubscriber.prototype._tryPredicate = function (value, index) {\n var result;\n try {\n result = this.predicate(value, index, this.source);\n }\n catch (err) {\n this.destination.error(err);\n return;\n }\n if (result) {\n this._emit(value, index);\n }\n };\n FirstSubscriber.prototype._emit = function (value, index) {\n if (this.resultSelector) {\n this._tryResultSelector(value, index);\n return;\n }\n this._emitFinal(value);\n };\n FirstSubscriber.prototype._tryResultSelector = function (value, index) {\n var result;\n try {\n result = this.resultSelector(value, index);\n }\n catch (err) {\n this.destination.error(err);\n return;\n }\n this._emitFinal(result);\n };\n FirstSubscriber.prototype._emitFinal = function (value) {\n var destination = this.destination;\n if (!this._emitted) {\n this._emitted = true;\n destination.next(value);\n destination.complete();\n this.hasCompleted = true;\n }\n };\n FirstSubscriber.prototype._complete = function () {\n var destination = this.destination;\n if (!this.hasCompleted && typeof this.defaultValue !== 'undefined') {\n destination.next(this.defaultValue);\n destination.complete();\n }\n else if (!this.hasCompleted) {\n destination.error(new EmptyError_1.EmptyError);\n }\n };\n return FirstSubscriber;\n}(Subscriber_1.Subscriber));\n//# sourceMappingURL=first.js.map",
- "\"use strict\";\nvar __extends = (this && this.__extends) || function (d, b) {\n for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p];\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n};\nvar Subscriber_1 = require('../Subscriber');\nvar EmptyError_1 = require('../util/EmptyError');\n/* tslint:enable:max-line-length */\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 * <img src=\"./img/last.png\" width=\"100%\">\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 * @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 * @method last\n * @owner Observable\n */\nfunction last(predicate, resultSelector, defaultValue) {\n return this.lift(new LastOperator(predicate, resultSelector, defaultValue, this));\n}\nexports.last = last;\nvar LastOperator = (function () {\n function LastOperator(predicate, resultSelector, defaultValue, source) {\n this.predicate = predicate;\n this.resultSelector = resultSelector;\n this.defaultValue = defaultValue;\n this.source = source;\n }\n LastOperator.prototype.call = function (observer, source) {\n return source.subscribe(new LastSubscriber(observer, this.predicate, this.resultSelector, this.defaultValue, this.source));\n };\n return LastOperator;\n}());\n/**\n * We need this JSDoc comment for affecting ESDoc.\n * @ignore\n * @extends {Ignored}\n */\nvar LastSubscriber = (function (_super) {\n __extends(LastSubscriber, _super);\n function LastSubscriber(destination, predicate, resultSelector, defaultValue, source) {\n _super.call(this, destination);\n this.predicate = predicate;\n this.resultSelector = resultSelector;\n this.defaultValue = defaultValue;\n this.source = source;\n this.hasValue = false;\n this.index = 0;\n if (typeof defaultValue !== 'undefined') {\n this.lastValue = defaultValue;\n this.hasValue = true;\n }\n }\n LastSubscriber.prototype._next = function (value) {\n var index = this.index++;\n if (this.predicate) {\n this._tryPredicate(value, index);\n }\n else {\n if (this.resultSelector) {\n this._tryResultSelector(value, index);\n return;\n }\n this.lastValue = value;\n this.hasValue = true;\n }\n };\n LastSubscriber.prototype._tryPredicate = function (value, index) {\n var result;\n try {\n result = this.predicate(value, index, this.source);\n }\n catch (err) {\n this.destination.error(err);\n return;\n }\n if (result) {\n if (this.resultSelector) {\n this._tryResultSelector(value, index);\n return;\n }\n this.lastValue = value;\n this.hasValue = true;\n }\n };\n LastSubscriber.prototype._tryResultSelector = function (value, index) {\n var result;\n try {\n result = this.resultSelector(value, index);\n }\n catch (err) {\n this.destination.error(err);\n return;\n }\n this.lastValue = result;\n this.hasValue = true;\n };\n LastSubscriber.prototype._complete = function () {\n var destination = this.destination;\n if (this.hasValue) {\n destination.next(this.lastValue);\n destination.complete();\n }\n else {\n destination.error(new EmptyError_1.EmptyError);\n }\n };\n return LastSubscriber;\n}(Subscriber_1.Subscriber));\n//# sourceMappingURL=last.js.map",
- "\"use strict\";\nvar __extends = (this && this.__extends) || function (d, b) {\n for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p];\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n};\nvar Subscriber_1 = require('../Subscriber');\n/**\n * Applies a given `project` function to each value emitted by the source\n * Observable, and emits the resulting values as an Observable.\n *\n * <span class=\"informal\">Like [Array.prototype.map()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/map),\n * it passes each source value through a transformation function to get\n * corresponding output values.</span>\n *\n * <img src=\"./img/map.png\" width=\"100%\">\n *\n * Similar to the well known `Array.prototype.map` function, this operator\n * applies a projection to each value and emits that projection in the output\n * Observable.\n *\n * @example <caption>Map every click to the clientX position of that click</caption>\n * var clicks = Rx.Observable.fromEvent(document, 'click');\n * var positions = clicks.map(ev => ev.clientX);\n * positions.subscribe(x => console.log(x));\n *\n * @see {@link mapTo}\n * @see {@link pluck}\n *\n * @param {function(value: T, index: number): R} project The function to apply\n * to each `value` emitted by the source Observable. The `index` parameter is\n * the number `i` for the i-th emission that has happened since the\n * subscription, starting from the number `0`.\n * @param {any} [thisArg] An optional argument to define what `this` is in the\n * `project` function.\n * @return {Observable<R>} An Observable that emits the values from the source\n * Observable transformed by the given `project` function.\n * @method map\n * @owner Observable\n */\nfunction map(project, thisArg) {\n if (typeof project !== 'function') {\n throw new TypeError('argument is not a function. Are you looking for `mapTo()`?');\n }\n return this.lift(new MapOperator(project, thisArg));\n}\nexports.map = map;\nvar MapOperator = (function () {\n function MapOperator(project, thisArg) {\n this.project = project;\n this.thisArg = thisArg;\n }\n MapOperator.prototype.call = function (subscriber, source) {\n return source.subscribe(new MapSubscriber(subscriber, this.project, this.thisArg));\n };\n return MapOperator;\n}());\nexports.MapOperator = MapOperator;\n/**\n * We need this JSDoc comment for affecting ESDoc.\n * @ignore\n * @extends {Ignored}\n */\nvar MapSubscriber = (function (_super) {\n __extends(MapSubscriber, _super);\n function MapSubscriber(destination, project, thisArg) {\n _super.call(this, destination);\n this.project = project;\n this.count = 0;\n this.thisArg = thisArg || this;\n }\n // NOTE: This looks unoptimized, but it's actually purposefully NOT\n // using try/catch optimizations.\n MapSubscriber.prototype._next = function (value) {\n var result;\n try {\n result = this.project.call(this.thisArg, value, this.count++);\n }\n catch (err) {\n this.destination.error(err);\n return;\n }\n this.destination.next(result);\n };\n return MapSubscriber;\n}(Subscriber_1.Subscriber));\n//# sourceMappingURL=map.js.map",
- "\"use strict\";\nvar Observable_1 = require('../Observable');\nvar ArrayObservable_1 = require('../observable/ArrayObservable');\nvar mergeAll_1 = require('./mergeAll');\nvar isScheduler_1 = require('../util/isScheduler');\n/* tslint:enable:max-line-length */\n/**\n * Creates an output Observable which concurrently emits all values from every\n * given input Observable.\n *\n * <span class=\"informal\">Flattens multiple Observables together by blending\n * their values into one Observable.</span>\n *\n * <img src=\"./img/merge.png\" width=\"100%\">\n *\n * `merge` subscribes to each given input Observable (either the source or an\n * Observable given as argument), and simply forwards (without doing any\n * transformation) all the values from all the input Observables to the output\n * Observable. The output Observable only completes once all input Observables\n * have completed. Any error delivered by an input Observable will be immediately\n * emitted on the output Observable.\n *\n * @example <caption>Merge together two Observables: 1s interval and clicks</caption>\n * var clicks = Rx.Observable.fromEvent(document, 'click');\n * var timer = Rx.Observable.interval(1000);\n * var clicksOrTimer = clicks.merge(timer);\n * clicksOrTimer.subscribe(x => console.log(x));\n *\n * @example <caption>Merge together 3 Observables, but only 2 run concurrently</caption>\n * var timer1 = Rx.Observable.interval(1000).take(10);\n * var timer2 = Rx.Observable.interval(2000).take(6);\n * var timer3 = Rx.Observable.interval(500).take(10);\n * var concurrent = 2; // the argument\n * var merged = timer1.merge(timer2, timer3, concurrent);\n * merged.subscribe(x => console.log(x));\n *\n * @see {@link mergeAll}\n * @see {@link mergeMap}\n * @see {@link mergeMapTo}\n * @see {@link mergeScan}\n *\n * @param {ObservableInput} other An input Observable to merge with the source\n * Observable. More than one input Observables may be given as argument.\n * @param {number} [concurrent=Number.POSITIVE_INFINITY] Maximum number of input\n * Observables being subscribed to concurrently.\n * @param {Scheduler} [scheduler=null] The IScheduler to use for managing\n * concurrency of input Observables.\n * @return {Observable} An Observable that emits items that are the result of\n * every input Observable.\n * @method merge\n * @owner Observable\n */\nfunction merge() {\n var observables = [];\n for (var _i = 0; _i < arguments.length; _i++) {\n observables[_i - 0] = arguments[_i];\n }\n return this.lift.call(mergeStatic.apply(void 0, [this].concat(observables)));\n}\nexports.merge = merge;\n/* tslint:enable:max-line-length */\n/**\n * Creates an output Observable which concurrently emits all values from every\n * given input Observable.\n *\n * <span class=\"informal\">Flattens multiple Observables together by blending\n * their values into one Observable.</span>\n *\n * <img src=\"./img/merge.png\" width=\"100%\">\n *\n * `merge` subscribes to each given input Observable (as arguments), and simply\n * forwards (without doing any transformation) all the values from all the input\n * Observables to the output Observable. The output Observable only completes\n * once all input Observables have completed. Any error delivered by an input\n * Observable will be immediately emitted on the output Observable.\n *\n * @example <caption>Merge together two Observables: 1s interval and clicks</caption>\n * var clicks = Rx.Observable.fromEvent(document, 'click');\n * var timer = Rx.Observable.interval(1000);\n * var clicksOrTimer = Rx.Observable.merge(clicks, timer);\n * clicksOrTimer.subscribe(x => console.log(x));\n *\n * // Results in the following:\n * // timer will emit ascending values, one every second(1000ms) to console\n * // clicks logs MouseEvents to console everytime the \"document\" is clicked\n * // Since the two streams are merged you see these happening\n * // as they occur.\n *\n * @example <caption>Merge together 3 Observables, but only 2 run concurrently</caption>\n * var timer1 = Rx.Observable.interval(1000).take(10);\n * var timer2 = Rx.Observable.interval(2000).take(6);\n * var timer3 = Rx.Observable.interval(500).take(10);\n * var concurrent = 2; // the argument\n * var merged = Rx.Observable.merge(timer1, timer2, timer3, concurrent);\n * merged.subscribe(x => console.log(x));\n *\n * // Results in the following:\n * // - First timer1 and timer2 will run concurrently\n * // - timer1 will emit a value every 1000ms for 10 iterations\n * // - timer2 will emit a value every 2000ms for 6 iterations\n * // - after timer1 hits it's max iteration, timer2 will\n * // continue, and timer3 will start to run concurrently with timer2\n * // - when timer2 hits it's max iteration it terminates, and\n * // timer3 will continue to emit a value every 500ms until it is complete\n *\n * @see {@link mergeAll}\n * @see {@link mergeMap}\n * @see {@link mergeMapTo}\n * @see {@link mergeScan}\n *\n * @param {...ObservableInput} observables Input Observables to merge together.\n * @param {number} [concurrent=Number.POSITIVE_INFINITY] Maximum number of input\n * Observables being subscribed to concurrently.\n * @param {Scheduler} [scheduler=null] The IScheduler to use for managing\n * concurrency of input Observables.\n * @return {Observable} an Observable that emits items that are the result of\n * every input Observable.\n * @static true\n * @name merge\n * @owner Observable\n */\nfunction mergeStatic() {\n var observables = [];\n for (var _i = 0; _i < arguments.length; _i++) {\n observables[_i - 0] = arguments[_i];\n }\n var concurrent = Number.POSITIVE_INFINITY;\n var scheduler = null;\n var last = observables[observables.length - 1];\n if (isScheduler_1.isScheduler(last)) {\n scheduler = observables.pop();\n if (observables.length > 1 && typeof observables[observables.length - 1] === 'number') {\n concurrent = observables.pop();\n }\n }\n else if (typeof last === 'number') {\n concurrent = observables.pop();\n }\n if (scheduler === null && observables.length === 1 && observables[0] instanceof Observable_1.Observable) {\n return observables[0];\n }\n return new ArrayObservable_1.ArrayObservable(observables, scheduler).lift(new mergeAll_1.MergeAllOperator(concurrent));\n}\nexports.mergeStatic = mergeStatic;\n//# sourceMappingURL=merge.js.map",
- "\"use strict\";\nvar __extends = (this && this.__extends) || function (d, b) {\n for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p];\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n};\nvar OuterSubscriber_1 = require('../OuterSubscriber');\nvar subscribeToResult_1 = require('../util/subscribeToResult');\n/**\n * Converts a higher-order Observable into a first-order Observable which\n * concurrently delivers all values that are emitted on the inner Observables.\n *\n * <span class=\"informal\">Flattens an Observable-of-Observables.</span>\n *\n * <img src=\"./img/mergeAll.png\" width=\"100%\">\n *\n * `mergeAll` subscribes to an Observable that emits Observables, also known as\n * a higher-order Observable. Each time it observes one of these emitted inner\n * Observables, it subscribes to that and delivers all the values from the\n * inner Observable on the output Observable. The output Observable only\n * completes once all inner Observables have completed. Any error delivered by\n * a inner Observable will be immediately emitted on the output Observable.\n *\n * @example <caption>Spawn a new interval Observable for each click event, and blend their outputs as one Observable</caption>\n * var clicks = Rx.Observable.fromEvent(document, 'click');\n * var higherOrder = clicks.map((ev) => Rx.Observable.interval(1000));\n * var firstOrder = higherOrder.mergeAll();\n * firstOrder.subscribe(x => console.log(x));\n *\n * @example <caption>Count from 0 to 9 every second for each click, but only allow 2 concurrent timers</caption>\n * var clicks = Rx.Observable.fromEvent(document, 'click');\n * var higherOrder = clicks.map((ev) => Rx.Observable.interval(1000).take(10));\n * var firstOrder = higherOrder.mergeAll(2);\n * firstOrder.subscribe(x => console.log(x));\n *\n * @see {@link combineAll}\n * @see {@link concatAll}\n * @see {@link exhaust}\n * @see {@link merge}\n * @see {@link mergeMap}\n * @see {@link mergeMapTo}\n * @see {@link mergeScan}\n * @see {@link switch}\n * @see {@link zipAll}\n *\n * @param {number} [concurrent=Number.POSITIVE_INFINITY] Maximum number of inner\n * Observables being subscribed to concurrently.\n * @return {Observable} An Observable that emits values coming from all the\n * inner Observables emitted by the source Observable.\n * @method mergeAll\n * @owner Observable\n */\nfunction mergeAll(concurrent) {\n if (concurrent === void 0) { concurrent = Number.POSITIVE_INFINITY; }\n return this.lift(new MergeAllOperator(concurrent));\n}\nexports.mergeAll = mergeAll;\nvar MergeAllOperator = (function () {\n function MergeAllOperator(concurrent) {\n this.concurrent = concurrent;\n }\n MergeAllOperator.prototype.call = function (observer, source) {\n return source.subscribe(new MergeAllSubscriber(observer, this.concurrent));\n };\n return MergeAllOperator;\n}());\nexports.MergeAllOperator = MergeAllOperator;\n/**\n * We need this JSDoc comment for affecting ESDoc.\n * @ignore\n * @extends {Ignored}\n */\nvar MergeAllSubscriber = (function (_super) {\n __extends(MergeAllSubscriber, _super);\n function MergeAllSubscriber(destination, concurrent) {\n _super.call(this, destination);\n this.concurrent = concurrent;\n this.hasCompleted = false;\n this.buffer = [];\n this.active = 0;\n }\n MergeAllSubscriber.prototype._next = function (observable) {\n if (this.active < this.concurrent) {\n this.active++;\n this.add(subscribeToResult_1.subscribeToResult(this, observable));\n }\n else {\n this.buffer.push(observable);\n }\n };\n MergeAllSubscriber.prototype._complete = function () {\n this.hasCompleted = true;\n if (this.active === 0 && this.buffer.length === 0) {\n this.destination.complete();\n }\n };\n MergeAllSubscriber.prototype.notifyComplete = function (innerSub) {\n var buffer = this.buffer;\n this.remove(innerSub);\n this.active--;\n if (buffer.length > 0) {\n this._next(buffer.shift());\n }\n else if (this.active === 0 && this.hasCompleted) {\n this.destination.complete();\n }\n };\n return MergeAllSubscriber;\n}(OuterSubscriber_1.OuterSubscriber));\nexports.MergeAllSubscriber = MergeAllSubscriber;\n//# sourceMappingURL=mergeAll.js.map",
- "\"use strict\";\nvar __extends = (this && this.__extends) || function (d, b) {\n for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p];\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n};\nvar subscribeToResult_1 = require('../util/subscribeToResult');\nvar OuterSubscriber_1 = require('../OuterSubscriber');\n/* tslint:enable:max-line-length */\n/**\n * Projects each source value to an Observable which is merged in the output\n * Observable.\n *\n * <span class=\"informal\">Maps each value to an Observable, then flattens all of\n * these inner Observables using {@link mergeAll}.</span>\n *\n * <img src=\"./img/mergeMap.png\" width=\"100%\">\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.\n *\n * @example <caption>Map and flatten each letter to an Observable ticking every 1 second</caption>\n * var letters = Rx.Observable.of('a', 'b', 'c');\n * var result = letters.mergeMap(x =>\n * Rx.Observable.interval(1000).map(i => x+i)\n * );\n * result.subscribe(x => console.log(x));\n *\n * // Results in the following:\n * // a0\n * // b0\n * // c0\n * // a1\n * // b1\n * // c1\n * // continues to list a,b,c with respective ascending integers\n *\n * @see {@link concatMap}\n * @see {@link exhaustMap}\n * @see {@link merge}\n * @see {@link mergeAll}\n * @see {@link mergeMapTo}\n * @see {@link mergeScan}\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 * @param {function(outerValue: T, innerValue: I, outerIndex: number, innerIndex: number): any} [resultSelector]\n * A function to produce the value on the output Observable based on the values\n * and the indices of the source (outer) emission and the inner Observable\n * emission. The arguments passed to this function are:\n * - `outerValue`: the value that came from the source\n * - `innerValue`: the value that came from the projected Observable\n * - `outerIndex`: the \"index\" of the value that came from the source\n * - `innerIndex`: the \"index\" of the value from the projected 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 the result of applying the\n * projection function (and the optional `resultSelector`) to each item emitted\n * by the source Observable and merging the results of the Observables obtained\n * from this transformation.\n * @method mergeMap\n * @owner Observable\n */\nfunction mergeMap(project, resultSelector, concurrent) {\n if (concurrent === void 0) { concurrent = Number.POSITIVE_INFINITY; }\n if (typeof resultSelector === 'number') {\n concurrent = resultSelector;\n resultSelector = null;\n }\n return this.lift(new MergeMapOperator(project, resultSelector, concurrent));\n}\nexports.mergeMap = mergeMap;\nvar MergeMapOperator = (function () {\n function MergeMapOperator(project, resultSelector, concurrent) {\n if (concurrent === void 0) { concurrent = Number.POSITIVE_INFINITY; }\n this.project = project;\n this.resultSelector = resultSelector;\n this.concurrent = concurrent;\n }\n MergeMapOperator.prototype.call = function (observer, source) {\n return source.subscribe(new MergeMapSubscriber(observer, this.project, this.resultSelector, this.concurrent));\n };\n return MergeMapOperator;\n}());\nexports.MergeMapOperator = MergeMapOperator;\n/**\n * We need this JSDoc comment for affecting ESDoc.\n * @ignore\n * @extends {Ignored}\n */\nvar MergeMapSubscriber = (function (_super) {\n __extends(MergeMapSubscriber, _super);\n function MergeMapSubscriber(destination, project, resultSelector, concurrent) {\n if (concurrent === void 0) { concurrent = Number.POSITIVE_INFINITY; }\n _super.call(this, destination);\n this.project = project;\n this.resultSelector = resultSelector;\n this.concurrent = concurrent;\n this.hasCompleted = false;\n this.buffer = [];\n this.active = 0;\n this.index = 0;\n }\n MergeMapSubscriber.prototype._next = function (value) {\n if (this.active < this.concurrent) {\n this._tryNext(value);\n }\n else {\n this.buffer.push(value);\n }\n };\n MergeMapSubscriber.prototype._tryNext = function (value) {\n var result;\n var index = this.index++;\n try {\n result = this.project(value, index);\n }\n catch (err) {\n this.destination.error(err);\n return;\n }\n this.active++;\n this._innerSub(result, value, index);\n };\n MergeMapSubscriber.prototype._innerSub = function (ish, value, index) {\n this.add(subscribeToResult_1.subscribeToResult(this, ish, value, index));\n };\n MergeMapSubscriber.prototype._complete = function () {\n this.hasCompleted = true;\n if (this.active === 0 && this.buffer.length === 0) {\n this.destination.complete();\n }\n };\n MergeMapSubscriber.prototype.notifyNext = function (outerValue, innerValue, outerIndex, innerIndex, innerSub) {\n if (this.resultSelector) {\n this._notifyResultSelector(outerValue, innerValue, outerIndex, innerIndex);\n }\n else {\n this.destination.next(innerValue);\n }\n };\n MergeMapSubscriber.prototype._notifyResultSelector = function (outerValue, innerValue, outerIndex, innerIndex) {\n var result;\n try {\n result = this.resultSelector(outerValue, innerValue, outerIndex, innerIndex);\n }\n catch (err) {\n this.destination.error(err);\n return;\n }\n this.destination.next(result);\n };\n MergeMapSubscriber.prototype.notifyComplete = function (innerSub) {\n var buffer = this.buffer;\n this.remove(innerSub);\n this.active--;\n if (buffer.length > 0) {\n this._next(buffer.shift());\n }\n else if (this.active === 0 && this.hasCompleted) {\n this.destination.complete();\n }\n };\n return MergeMapSubscriber;\n}(OuterSubscriber_1.OuterSubscriber));\nexports.MergeMapSubscriber = MergeMapSubscriber;\n//# sourceMappingURL=mergeMap.js.map",
- "\"use strict\";\nvar ConnectableObservable_1 = require('../observable/ConnectableObservable');\n/* tslint:enable:max-line-length */\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 * <img src=\"./img/multicast.png\" width=\"100%\">\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 */\nfunction multicast(subjectOrSubjectFactory, selector) {\n var subjectFactory;\n if (typeof subjectOrSubjectFactory === 'function') {\n subjectFactory = subjectOrSubjectFactory;\n }\n else {\n subjectFactory = function subjectFactory() {\n return subjectOrSubjectFactory;\n };\n }\n if (typeof selector === 'function') {\n return this.lift(new MulticastOperator(subjectFactory, selector));\n }\n var connectable = Object.create(this, ConnectableObservable_1.connectableObservableDescriptor);\n connectable.source = this;\n connectable.subjectFactory = subjectFactory;\n return connectable;\n}\nexports.multicast = multicast;\nvar MulticastOperator = (function () {\n function MulticastOperator(subjectFactory, selector) {\n this.subjectFactory = subjectFactory;\n this.selector = selector;\n }\n MulticastOperator.prototype.call = function (subscriber, source) {\n var selector = this.selector;\n var subject = this.subjectFactory();\n var subscription = selector(subject).subscribe(subscriber);\n subscription.add(source.subscribe(subject));\n return subscription;\n };\n return MulticastOperator;\n}());\nexports.MulticastOperator = MulticastOperator;\n//# sourceMappingURL=multicast.js.map",
- "\"use strict\";\nvar __extends = (this && this.__extends) || function (d, b) {\n for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p];\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n};\nvar Subscriber_1 = require('../Subscriber');\nvar Notification_1 = require('../Notification');\n/**\n *\n * Re-emits all notifications from source Observable with specified scheduler.\n *\n * <span class=\"informal\">Ensure a specific scheduler is used, from outside of an Observable.</span>\n *\n * `observeOn` is an operator that accepts a scheduler as a first parameter, which will be used to reschedule\n * notifications emitted by the source Observable. It might be useful, if you do not have control over\n * internal scheduler of a given Observable, but want to control when its values are emitted nevertheless.\n *\n * Returned Observable emits the same notifications (nexted values, complete and error events) as the source Observable,\n * but rescheduled with provided scheduler. Note that this doesn't mean that source Observables internal\n * scheduler will be replaced in any way. Original scheduler still will be used, but when the source Observable emits\n * notification, it will be immediately scheduled again - this time with scheduler passed to `observeOn`.\n * An anti-pattern would be calling `observeOn` on Observable that emits lots of values synchronously, to split\n * that emissions into asynchronous chunks. For this to happen, scheduler would have to be passed into the source\n * Observable directly (usually into the operator that creates it). `observeOn` simply delays notifications a\n * little bit more, to ensure that they are emitted at expected moments.\n *\n * As a matter of fact, `observeOn` accepts second parameter, which specifies in milliseconds with what delay notifications\n * will be emitted. The main difference between {@link delay} operator and `observeOn` is that `observeOn`\n * will delay all notifications - including error notifications - while `delay` will pass through error\n * from source Observable immediately when it is emitted. In general it is highly recommended to use `delay` operator\n * for any kind of delaying of values in the stream, while using `observeOn` to specify which scheduler should be used\n * for notification emissions in general.\n *\n * @example <caption>Ensure values in subscribe are called just before browser repaint.</caption>\n * const intervals = Rx.Observable.interval(10); // Intervals are scheduled\n * // with async scheduler by default...\n *\n * intervals\n * .observeOn(Rx.Scheduler.animationFrame) // ...but we will observe on animationFrame\n * .subscribe(val => { // scheduler to ensure smooth animation.\n * someDiv.style.height = val + 'px';\n * });\n *\n * @see {@link delay}\n *\n * @param {IScheduler} scheduler Scheduler that will be used to reschedule notifications from source Observable.\n * @param {number} [delay] Number of milliseconds that states with what delay every notification should be rescheduled.\n * @return {Observable<T>} Observable that emits the same notifications as the source Observable,\n * but with provided scheduler.\n *\n * @method observeOn\n * @owner Observable\n */\nfunction observeOn(scheduler, delay) {\n if (delay === void 0) { delay = 0; }\n return this.lift(new ObserveOnOperator(scheduler, delay));\n}\nexports.observeOn = observeOn;\nvar ObserveOnOperator = (function () {\n function ObserveOnOperator(scheduler, delay) {\n if (delay === void 0) { delay = 0; }\n this.scheduler = scheduler;\n this.delay = delay;\n }\n ObserveOnOperator.prototype.call = function (subscriber, source) {\n return source.subscribe(new ObserveOnSubscriber(subscriber, this.scheduler, this.delay));\n };\n return ObserveOnOperator;\n}());\nexports.ObserveOnOperator = ObserveOnOperator;\n/**\n * We need this JSDoc comment for affecting ESDoc.\n * @ignore\n * @extends {Ignored}\n */\nvar ObserveOnSubscriber = (function (_super) {\n __extends(ObserveOnSubscriber, _super);\n function ObserveOnSubscriber(destination, scheduler, delay) {\n if (delay === void 0) { delay = 0; }\n _super.call(this, destination);\n this.scheduler = scheduler;\n this.delay = delay;\n }\n ObserveOnSubscriber.dispatch = function (arg) {\n var notification = arg.notification, destination = arg.destination;\n notification.observe(destination);\n this.unsubscribe();\n };\n ObserveOnSubscriber.prototype.scheduleMessage = function (notification) {\n this.add(this.scheduler.schedule(ObserveOnSubscriber.dispatch, this.delay, new ObserveOnMessage(notification, this.destination)));\n };\n ObserveOnSubscriber.prototype._next = function (value) {\n this.scheduleMessage(Notification_1.Notification.createNext(value));\n };\n ObserveOnSubscriber.prototype._error = function (err) {\n this.scheduleMessage(Notification_1.Notification.createError(err));\n };\n ObserveOnSubscriber.prototype._complete = function () {\n this.scheduleMessage(Notification_1.Notification.createComplete());\n };\n return ObserveOnSubscriber;\n}(Subscriber_1.Subscriber));\nexports.ObserveOnSubscriber = ObserveOnSubscriber;\nvar ObserveOnMessage = (function () {\n function ObserveOnMessage(notification, destination) {\n this.notification = notification;\n this.destination = destination;\n }\n return ObserveOnMessage;\n}());\nexports.ObserveOnMessage = ObserveOnMessage;\n//# sourceMappingURL=observeOn.js.map",
- "\"use strict\";\nvar __extends = (this && this.__extends) || function (d, b) {\n for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p];\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n};\nvar Subscriber_1 = require('../Subscriber');\n/**\n * Groups pairs of consecutive emissions together and emits them as an array of\n * two values.\n *\n * <span class=\"informal\">Puts the current value and previous value together as\n * an array, and emits that.</span>\n *\n * <img src=\"./img/pairwise.png\" width=\"100%\">\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 <caption>On every click (starting from the second), emit the relative distance to the previous click</caption>\n * var clicks = Rx.Observable.fromEvent(document, 'click');\n * var pairs = clicks.pairwise();\n * var distance = pairs.map(pair => {\n * var x0 = pair[0].clientX;\n * var y0 = pair[0].clientY;\n * var x1 = pair[1].clientX;\n * var y1 = pair[1].clientY;\n * return Math.sqrt(Math.pow(x0 - x1, 2) + Math.pow(y0 - y1, 2));\n * });\n * distance.subscribe(x => console.log(x));\n *\n * @see {@link buffer}\n * @see {@link bufferCount}\n *\n * @return {Observable<Array<T>>} An Observable of pairs (as arrays) of\n * consecutive values from the source Observable.\n * @method pairwise\n * @owner Observable\n */\nfunction pairwise() {\n return this.lift(new PairwiseOperator());\n}\nexports.pairwise = pairwise;\nvar PairwiseOperator = (function () {\n function PairwiseOperator() {\n }\n PairwiseOperator.prototype.call = function (subscriber, source) {\n return source.subscribe(new PairwiseSubscriber(subscriber));\n };\n return PairwiseOperator;\n}());\n/**\n * We need this JSDoc comment for affecting ESDoc.\n * @ignore\n * @extends {Ignored}\n */\nvar PairwiseSubscriber = (function (_super) {\n __extends(PairwiseSubscriber, _super);\n function PairwiseSubscriber(destination) {\n _super.call(this, destination);\n this.hasPrev = false;\n }\n PairwiseSubscriber.prototype._next = function (value) {\n if (this.hasPrev) {\n this.destination.next([this.prev, value]);\n }\n else {\n this.hasPrev = true;\n }\n this.prev = value;\n };\n return PairwiseSubscriber;\n}(Subscriber_1.Subscriber));\n//# sourceMappingURL=pairwise.js.map",
- "\"use strict\";\nvar map_1 = require('./map');\n/**\n * Maps each source value (an object) to its specified nested property.\n *\n * <span class=\"informal\">Like {@link map}, but meant only for picking one of\n * the nested properties of every emitted object.</span>\n *\n * <img src=\"./img/pluck.png\" width=\"100%\">\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 <caption>Map every click to the tagName of the clicked target element</caption>\n * var clicks = Rx.Observable.fromEvent(document, 'click');\n * var tagNames = clicks.pluck('target', 'tagName');\n * tagNames.subscribe(x => console.log(x));\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 */\nfunction pluck() {\n var properties = [];\n for (var _i = 0; _i < arguments.length; _i++) {\n properties[_i - 0] = arguments[_i];\n }\n var length = properties.length;\n if (length === 0) {\n throw new Error('list of properties cannot be empty.');\n }\n return map_1.map.call(this, plucker(properties, length));\n}\nexports.pluck = pluck;\nfunction plucker(props, length) {\n var mapper = function (x) {\n var currentProp = x;\n for (var i = 0; i < length; i++) {\n var p = currentProp[props[i]];\n if (typeof p !== 'undefined') {\n currentProp = p;\n }\n else {\n return undefined;\n }\n }\n return currentProp;\n };\n return mapper;\n}\n//# sourceMappingURL=pluck.js.map",
- "\"use strict\";\nvar Subject_1 = require('../Subject');\nvar multicast_1 = require('./multicast');\n/* tslint:enable:max-line-length */\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 * <img src=\"./img/publish.png\" width=\"100%\">\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 */\nfunction publish(selector) {\n return selector ? multicast_1.multicast.call(this, function () { return new Subject_1.Subject(); }, selector) :\n multicast_1.multicast.call(this, new Subject_1.Subject());\n}\nexports.publish = publish;\n//# sourceMappingURL=publish.js.map",
- "\"use strict\";\nvar ReplaySubject_1 = require('../ReplaySubject');\nvar multicast_1 = require('./multicast');\n/**\n * @param bufferSize\n * @param windowTime\n * @param scheduler\n * @return {ConnectableObservable<T>}\n * @method publishReplay\n * @owner Observable\n */\nfunction publishReplay(bufferSize, windowTime, scheduler) {\n if (bufferSize === void 0) { bufferSize = Number.POSITIVE_INFINITY; }\n if (windowTime === void 0) { windowTime = Number.POSITIVE_INFINITY; }\n return multicast_1.multicast.call(this, new ReplaySubject_1.ReplaySubject(bufferSize, windowTime, scheduler));\n}\nexports.publishReplay = publishReplay;\n//# sourceMappingURL=publishReplay.js.map",
- "\"use strict\";\nvar __extends = (this && this.__extends) || function (d, b) {\n for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p];\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n};\nvar Subscriber_1 = require('../Subscriber');\n/* tslint:enable:max-line-length */\n/**\n * Applies an accumulator function over the source Observable, and returns each\n * intermediate result, with an optional seed value.\n *\n * <span class=\"informal\">It's like {@link reduce}, but emits the current\n * accumulation whenever the source emits a value.</span>\n *\n * <img src=\"./img/scan.png\" width=\"100%\">\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 <caption>Count the number of click events</caption>\n * var clicks = Rx.Observable.fromEvent(document, 'click');\n * var ones = clicks.mapTo(1);\n * var seed = 0;\n * var count = ones.scan((acc, one) => acc + one, seed);\n * count.subscribe(x => console.log(x));\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<R>} An observable of the accumulated values.\n * @method scan\n * @owner Observable\n */\nfunction scan(accumulator, seed) {\n var 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 return this.lift(new ScanOperator(accumulator, seed, hasSeed));\n}\nexports.scan = scan;\nvar ScanOperator = (function () {\n function ScanOperator(accumulator, seed, hasSeed) {\n if (hasSeed === void 0) { hasSeed = false; }\n this.accumulator = accumulator;\n this.seed = seed;\n this.hasSeed = hasSeed;\n }\n ScanOperator.prototype.call = function (subscriber, source) {\n return source.subscribe(new ScanSubscriber(subscriber, this.accumulator, this.seed, this.hasSeed));\n };\n return ScanOperator;\n}());\n/**\n * We need this JSDoc comment for affecting ESDoc.\n * @ignore\n * @extends {Ignored}\n */\nvar ScanSubscriber = (function (_super) {\n __extends(ScanSubscriber, _super);\n function ScanSubscriber(destination, accumulator, _seed, hasSeed) {\n _super.call(this, destination);\n this.accumulator = accumulator;\n this._seed = _seed;\n this.hasSeed = hasSeed;\n this.index = 0;\n }\n Object.defineProperty(ScanSubscriber.prototype, \"seed\", {\n get: function () {\n return this._seed;\n },\n set: function (value) {\n this.hasSeed = true;\n this._seed = value;\n },\n enumerable: true,\n configurable: true\n });\n ScanSubscriber.prototype._next = function (value) {\n if (!this.hasSeed) {\n this.seed = value;\n this.destination.next(value);\n }\n else {\n return this._tryNext(value);\n }\n };\n ScanSubscriber.prototype._tryNext = function (value) {\n var index = this.index++;\n var result;\n try {\n result = this.accumulator(this.seed, value, index);\n }\n catch (err) {\n this.destination.error(err);\n }\n this.seed = result;\n this.destination.next(result);\n };\n return ScanSubscriber;\n}(Subscriber_1.Subscriber));\n//# sourceMappingURL=scan.js.map",
- "\"use strict\";\nvar multicast_1 = require('./multicast');\nvar Subject_1 = require('../Subject');\nfunction shareSubjectFactory() {\n return new Subject_1.Subject();\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 .publish().refCount().\n *\n * <img src=\"./img/share.png\" width=\"100%\">\n *\n * @return {Observable<T>} An Observable that upon connection causes the source Observable to emit items to its Observers.\n * @method share\n * @owner Observable\n */\nfunction share() {\n return multicast_1.multicast.call(this, shareSubjectFactory).refCount();\n}\nexports.share = share;\n;\n//# sourceMappingURL=share.js.map",
- "\"use strict\";\nvar __extends = (this && this.__extends) || function (d, b) {\n for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p];\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n};\nvar Subscriber_1 = require('../Subscriber');\n/**\n * Returns an Observable that skips the first `count` items emitted by the source Observable.\n *\n * <img src=\"./img/skip.png\" width=\"100%\">\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 */\nfunction skip(count) {\n return this.lift(new SkipOperator(count));\n}\nexports.skip = skip;\nvar SkipOperator = (function () {\n function SkipOperator(total) {\n this.total = total;\n }\n SkipOperator.prototype.call = function (subscriber, source) {\n return source.subscribe(new SkipSubscriber(subscriber, this.total));\n };\n return SkipOperator;\n}());\n/**\n * We need this JSDoc comment for affecting ESDoc.\n * @ignore\n * @extends {Ignored}\n */\nvar SkipSubscriber = (function (_super) {\n __extends(SkipSubscriber, _super);\n function SkipSubscriber(destination, total) {\n _super.call(this, destination);\n this.total = total;\n this.count = 0;\n }\n SkipSubscriber.prototype._next = function (x) {\n if (++this.count > this.total) {\n this.destination.next(x);\n }\n };\n return SkipSubscriber;\n}(Subscriber_1.Subscriber));\n//# sourceMappingURL=skip.js.map",
- "\"use strict\";\nvar __extends = (this && this.__extends) || function (d, b) {\n for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p];\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n};\nvar OuterSubscriber_1 = require('../OuterSubscriber');\nvar subscribeToResult_1 = require('../util/subscribeToResult');\n/**\n * Returns an Observable that skips items emitted by the source Observable until a second Observable emits an item.\n *\n * <img src=\"./img/skipUntil.png\" width=\"100%\">\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<T>} 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 */\nfunction skipUntil(notifier) {\n return this.lift(new SkipUntilOperator(notifier));\n}\nexports.skipUntil = skipUntil;\nvar SkipUntilOperator = (function () {\n function SkipUntilOperator(notifier) {\n this.notifier = notifier;\n }\n SkipUntilOperator.prototype.call = function (subscriber, source) {\n return source.subscribe(new SkipUntilSubscriber(subscriber, this.notifier));\n };\n return SkipUntilOperator;\n}());\n/**\n * We need this JSDoc comment for affecting ESDoc.\n * @ignore\n * @extends {Ignored}\n */\nvar SkipUntilSubscriber = (function (_super) {\n __extends(SkipUntilSubscriber, _super);\n function SkipUntilSubscriber(destination, notifier) {\n _super.call(this, destination);\n this.hasValue = false;\n this.isInnerStopped = false;\n this.add(subscribeToResult_1.subscribeToResult(this, notifier));\n }\n SkipUntilSubscriber.prototype._next = function (value) {\n if (this.hasValue) {\n _super.prototype._next.call(this, value);\n }\n };\n SkipUntilSubscriber.prototype._complete = function () {\n if (this.isInnerStopped) {\n _super.prototype._complete.call(this);\n }\n else {\n this.unsubscribe();\n }\n };\n SkipUntilSubscriber.prototype.notifyNext = function (outerValue, innerValue, outerIndex, innerIndex, innerSub) {\n this.hasValue = true;\n };\n SkipUntilSubscriber.prototype.notifyComplete = function () {\n this.isInnerStopped = true;\n if (this.isStopped) {\n _super.prototype._complete.call(this);\n }\n };\n return SkipUntilSubscriber;\n}(OuterSubscriber_1.OuterSubscriber));\n//# sourceMappingURL=skipUntil.js.map",
- "\"use strict\";\nvar __extends = (this && this.__extends) || function (d, b) {\n for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p];\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n};\nvar Subscriber_1 = require('../Subscriber');\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 * <img src=\"./img/skipWhile.png\" width=\"100%\">\n *\n * @param {Function} predicate - A function to test each item emitted from the source Observable.\n * @return {Observable<T>} 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 */\nfunction skipWhile(predicate) {\n return this.lift(new SkipWhileOperator(predicate));\n}\nexports.skipWhile = skipWhile;\nvar SkipWhileOperator = (function () {\n function SkipWhileOperator(predicate) {\n this.predicate = predicate;\n }\n SkipWhileOperator.prototype.call = function (subscriber, source) {\n return source.subscribe(new SkipWhileSubscriber(subscriber, this.predicate));\n };\n return SkipWhileOperator;\n}());\n/**\n * We need this JSDoc comment for affecting ESDoc.\n * @ignore\n * @extends {Ignored}\n */\nvar SkipWhileSubscriber = (function (_super) {\n __extends(SkipWhileSubscriber, _super);\n function SkipWhileSubscriber(destination, predicate) {\n _super.call(this, destination);\n this.predicate = predicate;\n this.skipping = true;\n this.index = 0;\n }\n SkipWhileSubscriber.prototype._next = function (value) {\n var destination = this.destination;\n if (this.skipping) {\n this.tryCallPredicate(value);\n }\n if (!this.skipping) {\n destination.next(value);\n }\n };\n SkipWhileSubscriber.prototype.tryCallPredicate = function (value) {\n try {\n var result = this.predicate(value, this.index++);\n this.skipping = Boolean(result);\n }\n catch (err) {\n this.destination.error(err);\n }\n };\n return SkipWhileSubscriber;\n}(Subscriber_1.Subscriber));\n//# sourceMappingURL=skipWhile.js.map",
- "\"use strict\";\nvar ArrayObservable_1 = require('../observable/ArrayObservable');\nvar ScalarObservable_1 = require('../observable/ScalarObservable');\nvar EmptyObservable_1 = require('../observable/EmptyObservable');\nvar concat_1 = require('./concat');\nvar isScheduler_1 = require('../util/isScheduler');\n/* tslint:enable:max-line-length */\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 * <img src=\"./img/startWith.png\" width=\"100%\">\n *\n * @param {...T} values - Items you want the modified Observable to emit first.\n * @param {Scheduler} [scheduler] - A {@link IScheduler} 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 */\nfunction startWith() {\n var array = [];\n for (var _i = 0; _i < arguments.length; _i++) {\n array[_i - 0] = arguments[_i];\n }\n var scheduler = array[array.length - 1];\n if (isScheduler_1.isScheduler(scheduler)) {\n array.pop();\n }\n else {\n scheduler = null;\n }\n var len = array.length;\n if (len === 1) {\n return concat_1.concatStatic(new ScalarObservable_1.ScalarObservable(array[0], scheduler), this);\n }\n else if (len > 1) {\n return concat_1.concatStatic(new ArrayObservable_1.ArrayObservable(array, scheduler), this);\n }\n else {\n return concat_1.concatStatic(new EmptyObservable_1.EmptyObservable(scheduler), this);\n }\n}\nexports.startWith = startWith;\n//# sourceMappingURL=startWith.js.map",
- "\"use strict\";\nvar __extends = (this && this.__extends) || function (d, b) {\n for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p];\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n};\nvar OuterSubscriber_1 = require('../OuterSubscriber');\nvar subscribeToResult_1 = require('../util/subscribeToResult');\n/* tslint:enable:max-line-length */\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 * <span class=\"informal\">Maps each value to an Observable, then flattens all of\n * these inner Observables using {@link switch}.</span>\n *\n * <img src=\"./img/switchMap.png\" width=\"100%\">\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 <caption>Rerun an interval Observable on every click event</caption>\n * var clicks = Rx.Observable.fromEvent(document, 'click');\n * var result = clicks.switchMap((ev) => Rx.Observable.interval(1000));\n * result.subscribe(x => console.log(x));\n *\n * @see {@link concatMap}\n * @see {@link exhaustMap}\n * @see {@link mergeMap}\n * @see {@link switch}\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 * @param {function(outerValue: T, innerValue: I, outerIndex: number, innerIndex: number): any} [resultSelector]\n * A function to produce the value on the output Observable based on the values\n * and the indices of the source (outer) emission and the inner Observable\n * emission. The arguments passed to this function are:\n * - `outerValue`: the value that came from the source\n * - `innerValue`: the value that came from the projected Observable\n * - `outerIndex`: the \"index\" of the value that came from the source\n * - `innerIndex`: the \"index\" of the value from the projected Observable\n * @return {Observable} An Observable that emits the result of applying the\n * projection function (and the optional `resultSelector`) to each item emitted\n * by the source Observable and taking only the values from the most recently\n * projected inner Observable.\n * @method switchMap\n * @owner Observable\n */\nfunction switchMap(project, resultSelector) {\n return this.lift(new SwitchMapOperator(project, resultSelector));\n}\nexports.switchMap = switchMap;\nvar SwitchMapOperator = (function () {\n function SwitchMapOperator(project, resultSelector) {\n this.project = project;\n this.resultSelector = resultSelector;\n }\n SwitchMapOperator.prototype.call = function (subscriber, source) {\n return source.subscribe(new SwitchMapSubscriber(subscriber, this.project, this.resultSelector));\n };\n return SwitchMapOperator;\n}());\n/**\n * We need this JSDoc comment for affecting ESDoc.\n * @ignore\n * @extends {Ignored}\n */\nvar SwitchMapSubscriber = (function (_super) {\n __extends(SwitchMapSubscriber, _super);\n function SwitchMapSubscriber(destination, project, resultSelector) {\n _super.call(this, destination);\n this.project = project;\n this.resultSelector = resultSelector;\n this.index = 0;\n }\n SwitchMapSubscriber.prototype._next = function (value) {\n var result;\n var index = this.index++;\n try {\n result = this.project(value, index);\n }\n catch (error) {\n this.destination.error(error);\n return;\n }\n this._innerSub(result, value, index);\n };\n SwitchMapSubscriber.prototype._innerSub = function (result, value, index) {\n var innerSubscription = this.innerSubscription;\n if (innerSubscription) {\n innerSubscription.unsubscribe();\n }\n this.add(this.innerSubscription = subscribeToResult_1.subscribeToResult(this, result, value, index));\n };\n SwitchMapSubscriber.prototype._complete = function () {\n var innerSubscription = this.innerSubscription;\n if (!innerSubscription || innerSubscription.closed) {\n _super.prototype._complete.call(this);\n }\n };\n SwitchMapSubscriber.prototype._unsubscribe = function () {\n this.innerSubscription = null;\n };\n SwitchMapSubscriber.prototype.notifyComplete = function (innerSub) {\n this.remove(innerSub);\n this.innerSubscription = null;\n if (this.isStopped) {\n _super.prototype._complete.call(this);\n }\n };\n SwitchMapSubscriber.prototype.notifyNext = function (outerValue, innerValue, outerIndex, innerIndex, innerSub) {\n if (this.resultSelector) {\n this._tryNotifyNext(outerValue, innerValue, outerIndex, innerIndex);\n }\n else {\n this.destination.next(innerValue);\n }\n };\n SwitchMapSubscriber.prototype._tryNotifyNext = function (outerValue, innerValue, outerIndex, innerIndex) {\n var result;\n try {\n result = this.resultSelector(outerValue, innerValue, outerIndex, innerIndex);\n }\n catch (err) {\n this.destination.error(err);\n return;\n }\n this.destination.next(result);\n };\n return SwitchMapSubscriber;\n}(OuterSubscriber_1.OuterSubscriber));\n//# sourceMappingURL=switchMap.js.map",
- "\"use strict\";\nvar __extends = (this && this.__extends) || function (d, b) {\n for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p];\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n};\nvar Subscriber_1 = require('../Subscriber');\nvar ArgumentOutOfRangeError_1 = require('../util/ArgumentOutOfRangeError');\nvar EmptyObservable_1 = require('../observable/EmptyObservable');\n/**\n * Emits only the first `count` values emitted by the source Observable.\n *\n * <span class=\"informal\">Takes the first `count` values from the source, then\n * completes.</span>\n *\n * <img src=\"./img/take.png\" width=\"100%\">\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 <caption>Take the first 5 seconds of an infinite 1-second interval Observable</caption>\n * var interval = Rx.Observable.interval(1000);\n * var five = interval.take(5);\n * five.subscribe(x => console.log(x));\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<T>} 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 */\nfunction take(count) {\n if (count === 0) {\n return new EmptyObservable_1.EmptyObservable();\n }\n else {\n return this.lift(new TakeOperator(count));\n }\n}\nexports.take = take;\nvar TakeOperator = (function () {\n function TakeOperator(total) {\n this.total = total;\n if (this.total < 0) {\n throw new ArgumentOutOfRangeError_1.ArgumentOutOfRangeError;\n }\n }\n TakeOperator.prototype.call = function (subscriber, source) {\n return source.subscribe(new TakeSubscriber(subscriber, this.total));\n };\n return TakeOperator;\n}());\n/**\n * We need this JSDoc comment for affecting ESDoc.\n * @ignore\n * @extends {Ignored}\n */\nvar TakeSubscriber = (function (_super) {\n __extends(TakeSubscriber, _super);\n function TakeSubscriber(destination, total) {\n _super.call(this, destination);\n this.total = total;\n this.count = 0;\n }\n TakeSubscriber.prototype._next = function (value) {\n var total = this.total;\n var 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 return TakeSubscriber;\n}(Subscriber_1.Subscriber));\n//# sourceMappingURL=take.js.map",
- "\"use strict\";\nvar __extends = (this && this.__extends) || function (d, b) {\n for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p];\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n};\nvar OuterSubscriber_1 = require('../OuterSubscriber');\nvar subscribeToResult_1 = require('../util/subscribeToResult');\n/**\n * Emits the values emitted by the source Observable until a `notifier`\n * Observable emits a value.\n *\n * <span class=\"informal\">Lets values pass until a second Observable,\n * `notifier`, emits something. Then, it completes.</span>\n *\n * <img src=\"./img/takeUntil.png\" width=\"100%\">\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 or a complete notification, the output Observable stops\n * mirroring the source Observable and completes.\n *\n * @example <caption>Tick every second until the first click happens</caption>\n * var interval = Rx.Observable.interval(1000);\n * var clicks = Rx.Observable.fromEvent(document, 'click');\n * var result = interval.takeUntil(clicks);\n * result.subscribe(x => console.log(x));\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<T>} 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 */\nfunction takeUntil(notifier) {\n return this.lift(new TakeUntilOperator(notifier));\n}\nexports.takeUntil = takeUntil;\nvar TakeUntilOperator = (function () {\n function TakeUntilOperator(notifier) {\n this.notifier = notifier;\n }\n TakeUntilOperator.prototype.call = function (subscriber, source) {\n return source.subscribe(new TakeUntilSubscriber(subscriber, this.notifier));\n };\n return TakeUntilOperator;\n}());\n/**\n * We need this JSDoc comment for affecting ESDoc.\n * @ignore\n * @extends {Ignored}\n */\nvar TakeUntilSubscriber = (function (_super) {\n __extends(TakeUntilSubscriber, _super);\n function TakeUntilSubscriber(destination, notifier) {\n _super.call(this, destination);\n this.notifier = notifier;\n this.add(subscribeToResult_1.subscribeToResult(this, notifier));\n }\n TakeUntilSubscriber.prototype.notifyNext = function (outerValue, innerValue, outerIndex, innerIndex, innerSub) {\n this.complete();\n };\n TakeUntilSubscriber.prototype.notifyComplete = function () {\n // noop\n };\n return TakeUntilSubscriber;\n}(OuterSubscriber_1.OuterSubscriber));\n//# sourceMappingURL=takeUntil.js.map",
- "\"use strict\";\nvar __extends = (this && this.__extends) || function (d, b) {\n for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p];\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n};\nvar OuterSubscriber_1 = require('../OuterSubscriber');\nvar subscribeToResult_1 = require('../util/subscribeToResult');\nexports.defaultThrottleConfig = {\n leading: true,\n trailing: false\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 * <span class=\"informal\">It's like {@link throttleTime}, but the silencing\n * duration is determined by a second Observable.</span>\n *\n * <img src=\"./img/throttle.png\" width=\"100%\">\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 <caption>Emit clicks at a rate of at most one click per second</caption>\n * var clicks = Rx.Observable.fromEvent(document, 'click');\n * var result = clicks.throttle(ev => Rx.Observable.interval(1000));\n * result.subscribe(x => console.log(x));\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<T>} An Observable that performs the throttle operation to\n * limit the rate of emissions from the source.\n * @method throttle\n * @owner Observable\n */\nfunction throttle(durationSelector, config) {\n if (config === void 0) { config = exports.defaultThrottleConfig; }\n return this.lift(new ThrottleOperator(durationSelector, config.leading, config.trailing));\n}\nexports.throttle = throttle;\nvar ThrottleOperator = (function () {\n function ThrottleOperator(durationSelector, leading, trailing) {\n this.durationSelector = durationSelector;\n this.leading = leading;\n this.trailing = trailing;\n }\n ThrottleOperator.prototype.call = function (subscriber, source) {\n return source.subscribe(new ThrottleSubscriber(subscriber, this.durationSelector, this.leading, this.trailing));\n };\n return ThrottleOperator;\n}());\n/**\n * We need this JSDoc comment for affecting ESDoc\n * @ignore\n * @extends {Ignored}\n */\nvar ThrottleSubscriber = (function (_super) {\n __extends(ThrottleSubscriber, _super);\n function ThrottleSubscriber(destination, durationSelector, _leading, _trailing) {\n _super.call(this, destination);\n this.destination = destination;\n this.durationSelector = durationSelector;\n this._leading = _leading;\n this._trailing = _trailing;\n this._hasTrailingValue = false;\n }\n ThrottleSubscriber.prototype._next = function (value) {\n if (this.throttled) {\n if (this._trailing) {\n this._hasTrailingValue = true;\n this._trailingValue = value;\n }\n }\n else {\n var duration = this.tryDurationSelector(value);\n if (duration) {\n this.add(this.throttled = subscribeToResult_1.subscribeToResult(this, duration));\n }\n if (this._leading) {\n this.destination.next(value);\n if (this._trailing) {\n this._hasTrailingValue = true;\n this._trailingValue = value;\n }\n }\n }\n };\n ThrottleSubscriber.prototype.tryDurationSelector = function (value) {\n try {\n return this.durationSelector(value);\n }\n catch (err) {\n this.destination.error(err);\n return null;\n }\n };\n ThrottleSubscriber.prototype._unsubscribe = function () {\n var _a = this, throttled = _a.throttled, _trailingValue = _a._trailingValue, _hasTrailingValue = _a._hasTrailingValue, _trailing = _a._trailing;\n this._trailingValue = null;\n this._hasTrailingValue = false;\n if (throttled) {\n this.remove(throttled);\n this.throttled = null;\n throttled.unsubscribe();\n }\n };\n ThrottleSubscriber.prototype._sendTrailing = function () {\n var _a = this, destination = _a.destination, throttled = _a.throttled, _trailing = _a._trailing, _trailingValue = _a._trailingValue, _hasTrailingValue = _a._hasTrailingValue;\n if (throttled && _trailing && _hasTrailingValue) {\n destination.next(_trailingValue);\n this._trailingValue = null;\n this._hasTrailingValue = false;\n }\n };\n ThrottleSubscriber.prototype.notifyNext = function (outerValue, innerValue, outerIndex, innerIndex, innerSub) {\n this._sendTrailing();\n this._unsubscribe();\n };\n ThrottleSubscriber.prototype.notifyComplete = function () {\n this._sendTrailing();\n this._unsubscribe();\n };\n return ThrottleSubscriber;\n}(OuterSubscriber_1.OuterSubscriber));\n//# sourceMappingURL=throttle.js.map",
- "\"use strict\";\nvar __extends = (this && this.__extends) || function (d, b) {\n for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p];\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n};\nvar Subscriber_1 = require('../Subscriber');\nvar async_1 = require('../scheduler/async');\nvar throttle_1 = require('./throttle');\n/**\n * Emits a value from the source Observable, then ignores subsequent source\n * values for `duration` milliseconds, then repeats this process.\n *\n * <span class=\"informal\">Lets a value pass, then ignores source values for the\n * next `duration` milliseconds.</span>\n *\n * <img src=\"./img/throttleTime.png\" width=\"100%\">\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 IScheduler} for managing timers.\n *\n * @example <caption>Emit clicks at a rate of at most one click per second</caption>\n * var clicks = Rx.Observable.fromEvent(document, 'click');\n * var result = clicks.throttleTime(1000);\n * result.subscribe(x => console.log(x));\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 {Scheduler} [scheduler=async] The {@link IScheduler} to use for\n * managing the timers that handle the throttling.\n * @return {Observable<T>} An Observable that performs the throttle operation to\n * limit the rate of emissions from the source.\n * @method throttleTime\n * @owner Observable\n */\nfunction throttleTime(duration, scheduler, config) {\n if (scheduler === void 0) { scheduler = async_1.async; }\n if (config === void 0) { config = throttle_1.defaultThrottleConfig; }\n return this.lift(new ThrottleTimeOperator(duration, scheduler, config.leading, config.trailing));\n}\nexports.throttleTime = throttleTime;\nvar ThrottleTimeOperator = (function () {\n function ThrottleTimeOperator(duration, scheduler, leading, trailing) {\n this.duration = duration;\n this.scheduler = scheduler;\n this.leading = leading;\n this.trailing = trailing;\n }\n ThrottleTimeOperator.prototype.call = function (subscriber, source) {\n return source.subscribe(new ThrottleTimeSubscriber(subscriber, this.duration, this.scheduler, this.leading, this.trailing));\n };\n return ThrottleTimeOperator;\n}());\n/**\n * We need this JSDoc comment for affecting ESDoc.\n * @ignore\n * @extends {Ignored}\n */\nvar ThrottleTimeSubscriber = (function (_super) {\n __extends(ThrottleTimeSubscriber, _super);\n function ThrottleTimeSubscriber(destination, duration, scheduler, leading, trailing) {\n _super.call(this, destination);\n this.duration = duration;\n this.scheduler = scheduler;\n this.leading = leading;\n this.trailing = trailing;\n this._hasTrailingValue = false;\n this._trailingValue = null;\n }\n ThrottleTimeSubscriber.prototype._next = function (value) {\n if (this.throttled) {\n if (this.trailing) {\n this._trailingValue = value;\n this._hasTrailingValue = true;\n }\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 }\n }\n };\n ThrottleTimeSubscriber.prototype.clearThrottle = function () {\n var 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 return ThrottleTimeSubscriber;\n}(Subscriber_1.Subscriber));\nfunction dispatchNext(arg) {\n var subscriber = arg.subscriber;\n subscriber.clearThrottle();\n}\n//# sourceMappingURL=throttleTime.js.map",
- "\"use strict\";\nvar __extends = (this && this.__extends) || function (d, b) {\n for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p];\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n};\nvar OuterSubscriber_1 = require('../OuterSubscriber');\nvar subscribeToResult_1 = require('../util/subscribeToResult');\n/* tslint:enable:max-line-length */\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 * <span class=\"informal\">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.</span>\n *\n * <img src=\"./img/withLatestFrom.png\" width=\"100%\">\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 <caption>On every click event, emit an array with the latest timer event plus the click event</caption>\n * var clicks = Rx.Observable.fromEvent(document, 'click');\n * var timer = Rx.Observable.interval(1000);\n * var result = clicks.withLatestFrom(timer);\n * result.subscribe(x => console.log(x));\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.withLatestFrom(b, c, (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 */\nfunction withLatestFrom() {\n var args = [];\n for (var _i = 0; _i < arguments.length; _i++) {\n args[_i - 0] = arguments[_i];\n }\n var project;\n if (typeof args[args.length - 1] === 'function') {\n project = args.pop();\n }\n var observables = args;\n return this.lift(new WithLatestFromOperator(observables, project));\n}\nexports.withLatestFrom = withLatestFrom;\nvar WithLatestFromOperator = (function () {\n function WithLatestFromOperator(observables, project) {\n this.observables = observables;\n this.project = project;\n }\n WithLatestFromOperator.prototype.call = function (subscriber, source) {\n return source.subscribe(new WithLatestFromSubscriber(subscriber, this.observables, this.project));\n };\n return WithLatestFromOperator;\n}());\n/**\n * We need this JSDoc comment for affecting ESDoc.\n * @ignore\n * @extends {Ignored}\n */\nvar WithLatestFromSubscriber = (function (_super) {\n __extends(WithLatestFromSubscriber, _super);\n function WithLatestFromSubscriber(destination, observables, project) {\n _super.call(this, destination);\n this.observables = observables;\n this.project = project;\n this.toRespond = [];\n var len = observables.length;\n this.values = new Array(len);\n for (var i = 0; i < len; i++) {\n this.toRespond.push(i);\n }\n for (var i = 0; i < len; i++) {\n var observable = observables[i];\n this.add(subscribeToResult_1.subscribeToResult(this, observable, observable, i));\n }\n }\n WithLatestFromSubscriber.prototype.notifyNext = function (outerValue, innerValue, outerIndex, innerIndex, innerSub) {\n this.values[outerIndex] = innerValue;\n var toRespond = this.toRespond;\n if (toRespond.length > 0) {\n var found = toRespond.indexOf(outerIndex);\n if (found !== -1) {\n toRespond.splice(found, 1);\n }\n }\n };\n WithLatestFromSubscriber.prototype.notifyComplete = function () {\n // noop\n };\n WithLatestFromSubscriber.prototype._next = function (value) {\n if (this.toRespond.length === 0) {\n var args = [value].concat(this.values);\n if (this.project) {\n this._tryProject(args);\n }\n else {\n this.destination.next(args);\n }\n }\n };\n WithLatestFromSubscriber.prototype._tryProject = function (args) {\n var result;\n try {\n result = this.project.apply(this, args);\n }\n catch (err) {\n this.destination.error(err);\n return;\n }\n this.destination.next(result);\n };\n return WithLatestFromSubscriber;\n}(OuterSubscriber_1.OuterSubscriber));\n//# sourceMappingURL=withLatestFrom.js.map",
- "\"use strict\";\nvar __extends = (this && this.__extends) || function (d, b) {\n for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p];\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n};\nvar ArrayObservable_1 = require('../observable/ArrayObservable');\nvar isArray_1 = require('../util/isArray');\nvar Subscriber_1 = require('../Subscriber');\nvar OuterSubscriber_1 = require('../OuterSubscriber');\nvar subscribeToResult_1 = require('../util/subscribeToResult');\nvar iterator_1 = require('../symbol/iterator');\n/* tslint:enable:max-line-length */\n/**\n * @param observables\n * @return {Observable<R>}\n * @method zip\n * @owner Observable\n */\nfunction zipProto() {\n var observables = [];\n for (var _i = 0; _i < arguments.length; _i++) {\n observables[_i - 0] = arguments[_i];\n }\n return this.lift.call(zipStatic.apply(void 0, [this].concat(observables)));\n}\nexports.zipProto = zipProto;\n/* tslint:enable:max-line-length */\n/**\n * Combines multiple Observables to create an Observable whose values are calculated from the values, in order, of each\n * of its input Observables.\n *\n * If the latest parameter is a function, this function is used to compute the created value from the input values.\n * Otherwise, an array of the input values is returned.\n *\n * @example <caption>Combine age and name from different sources</caption>\n *\n * let age$ = Observable.of<number>(27, 25, 29);\n * let name$ = Observable.of<string>('Foo', 'Bar', 'Beer');\n * let isDev$ = Observable.of<boolean>(true, true, false);\n *\n * Observable\n * .zip(age$,\n * name$,\n * isDev$,\n * (age: number, name: string, isDev: boolean) => ({ age, name, isDev }))\n * .subscribe(x => console.log(x));\n *\n * // outputs\n * // { age: 27, name: 'Foo', isDev: true }\n * // { age: 25, name: 'Bar', isDev: true }\n * // { age: 29, name: 'Beer', isDev: false }\n *\n * @param observables\n * @return {Observable<R>}\n * @static true\n * @name zip\n * @owner Observable\n */\nfunction zipStatic() {\n var observables = [];\n for (var _i = 0; _i < arguments.length; _i++) {\n observables[_i - 0] = arguments[_i];\n }\n var project = observables[observables.length - 1];\n if (typeof project === 'function') {\n observables.pop();\n }\n return new ArrayObservable_1.ArrayObservable(observables).lift(new ZipOperator(project));\n}\nexports.zipStatic = zipStatic;\nvar ZipOperator = (function () {\n function ZipOperator(project) {\n this.project = project;\n }\n ZipOperator.prototype.call = function (subscriber, source) {\n return source.subscribe(new ZipSubscriber(subscriber, this.project));\n };\n return ZipOperator;\n}());\nexports.ZipOperator = ZipOperator;\n/**\n * We need this JSDoc comment for affecting ESDoc.\n * @ignore\n * @extends {Ignored}\n */\nvar ZipSubscriber = (function (_super) {\n __extends(ZipSubscriber, _super);\n function ZipSubscriber(destination, project, values) {\n if (values === void 0) { values = Object.create(null); }\n _super.call(this, destination);\n this.iterators = [];\n this.active = 0;\n this.project = (typeof project === 'function') ? project : null;\n this.values = values;\n }\n ZipSubscriber.prototype._next = function (value) {\n var iterators = this.iterators;\n if (isArray_1.isArray(value)) {\n iterators.push(new StaticArrayIterator(value));\n }\n else if (typeof value[iterator_1.iterator] === 'function') {\n iterators.push(new StaticIterator(value[iterator_1.iterator]()));\n }\n else {\n iterators.push(new ZipBufferIterator(this.destination, this, value));\n }\n };\n ZipSubscriber.prototype._complete = function () {\n var iterators = this.iterators;\n var len = iterators.length;\n if (len === 0) {\n this.destination.complete();\n return;\n }\n this.active = len;\n for (var i = 0; i < len; i++) {\n var iterator = iterators[i];\n if (iterator.stillUnsubscribed) {\n this.add(iterator.subscribe(iterator, i));\n }\n else {\n this.active--; // not an observable\n }\n }\n };\n ZipSubscriber.prototype.notifyInactive = function () {\n this.active--;\n if (this.active === 0) {\n this.destination.complete();\n }\n };\n ZipSubscriber.prototype.checkIterators = function () {\n var iterators = this.iterators;\n var len = iterators.length;\n var destination = this.destination;\n // abort if not all of them have values\n for (var i = 0; i < len; i++) {\n var iterator = iterators[i];\n if (typeof iterator.hasValue === 'function' && !iterator.hasValue()) {\n return;\n }\n }\n var shouldComplete = false;\n var args = [];\n for (var i = 0; i < len; i++) {\n var iterator = iterators[i];\n var result = iterator.next();\n // check to see if it's completed now that you've gotten\n // the next value.\n if (iterator.hasCompleted()) {\n shouldComplete = true;\n }\n if (result.done) {\n destination.complete();\n return;\n }\n args.push(result.value);\n }\n if (this.project) {\n this._tryProject(args);\n }\n else {\n destination.next(args);\n }\n if (shouldComplete) {\n destination.complete();\n }\n };\n ZipSubscriber.prototype._tryProject = function (args) {\n var result;\n try {\n result = this.project.apply(this, args);\n }\n catch (err) {\n this.destination.error(err);\n return;\n }\n this.destination.next(result);\n };\n return ZipSubscriber;\n}(Subscriber_1.Subscriber));\nexports.ZipSubscriber = ZipSubscriber;\nvar StaticIterator = (function () {\n function StaticIterator(iterator) {\n this.iterator = iterator;\n this.nextResult = iterator.next();\n }\n StaticIterator.prototype.hasValue = function () {\n return true;\n };\n StaticIterator.prototype.next = function () {\n var result = this.nextResult;\n this.nextResult = this.iterator.next();\n return result;\n };\n StaticIterator.prototype.hasCompleted = function () {\n var nextResult = this.nextResult;\n return nextResult && nextResult.done;\n };\n return StaticIterator;\n}());\nvar StaticArrayIterator = (function () {\n function StaticArrayIterator(array) {\n this.array = array;\n this.index = 0;\n this.length = 0;\n this.length = array.length;\n }\n StaticArrayIterator.prototype[iterator_1.iterator] = function () {\n return this;\n };\n StaticArrayIterator.prototype.next = function (value) {\n var i = this.index++;\n var array = this.array;\n return i < this.length ? { value: array[i], done: false } : { value: null, done: true };\n };\n StaticArrayIterator.prototype.hasValue = function () {\n return this.array.length > this.index;\n };\n StaticArrayIterator.prototype.hasCompleted = function () {\n return this.array.length === this.index;\n };\n return StaticArrayIterator;\n}());\n/**\n * We need this JSDoc comment for affecting ESDoc.\n * @ignore\n * @extends {Ignored}\n */\nvar ZipBufferIterator = (function (_super) {\n __extends(ZipBufferIterator, _super);\n function ZipBufferIterator(destination, parent, observable) {\n _super.call(this, destination);\n this.parent = parent;\n this.observable = observable;\n this.stillUnsubscribed = true;\n this.buffer = [];\n this.isComplete = false;\n }\n ZipBufferIterator.prototype[iterator_1.iterator] = function () {\n return this;\n };\n // NOTE: there is actually a name collision here with Subscriber.next and Iterator.next\n // this is legit because `next()` will never be called by a subscription in this case.\n ZipBufferIterator.prototype.next = function () {\n var buffer = this.buffer;\n if (buffer.length === 0 && this.isComplete) {\n return { value: null, done: true };\n }\n else {\n return { value: buffer.shift(), done: false };\n }\n };\n ZipBufferIterator.prototype.hasValue = function () {\n return this.buffer.length > 0;\n };\n ZipBufferIterator.prototype.hasCompleted = function () {\n return this.buffer.length === 0 && this.isComplete;\n };\n ZipBufferIterator.prototype.notifyComplete = function () {\n if (this.buffer.length > 0) {\n this.isComplete = true;\n this.parent.notifyInactive();\n }\n else {\n this.destination.complete();\n }\n };\n ZipBufferIterator.prototype.notifyNext = function (outerValue, innerValue, outerIndex, innerIndex, innerSub) {\n this.buffer.push(innerValue);\n this.parent.checkIterators();\n };\n ZipBufferIterator.prototype.subscribe = function (value, index) {\n return subscribeToResult_1.subscribeToResult(this, this.observable, this, index);\n };\n return ZipBufferIterator;\n}(OuterSubscriber_1.OuterSubscriber));\n//# sourceMappingURL=zip.js.map",
- "\"use strict\";\nvar __extends = (this && this.__extends) || function (d, b) {\n for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p];\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n};\nvar Subscription_1 = require('../Subscription');\n/**\n * A unit of work to be executed in a {@link Scheduler}. An action is typically\n * created from within a Scheduler and an RxJS user does not need to concern\n * themselves about creating and manipulating an Action.\n *\n * ```ts\n * class Action<T> extends Subscription {\n * new (scheduler: Scheduler, work: (state?: T) => void);\n * schedule(state?: T, delay: number = 0): Subscription;\n * }\n * ```\n *\n * @class Action<T>\n */\nvar Action = (function (_super) {\n __extends(Action, _super);\n function Action(scheduler, work) {\n _super.call(this);\n }\n /**\n * Schedules this action on its parent Scheduler for execution. May be passed\n * some context object, `state`. May happen at some point in the future,\n * according to the `delay` parameter, if specified.\n * @param {T} [state] Some contextual data that the `work` function uses when\n * called by the Scheduler.\n * @param {number} [delay] Time to wait before executing the work, where the\n * time unit is implicit and defined by the Scheduler.\n * @return {void}\n */\n Action.prototype.schedule = function (state, delay) {\n if (delay === void 0) { delay = 0; }\n return this;\n };\n return Action;\n}(Subscription_1.Subscription));\nexports.Action = Action;\n//# sourceMappingURL=Action.js.map",
- "\"use strict\";\nvar __extends = (this && this.__extends) || function (d, b) {\n for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p];\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n};\nvar root_1 = require('../util/root');\nvar Action_1 = require('./Action');\n/**\n * We need this JSDoc comment for affecting ESDoc.\n * @ignore\n * @extends {Ignored}\n */\nvar AsyncAction = (function (_super) {\n __extends(AsyncAction, _super);\n function AsyncAction(scheduler, work) {\n _super.call(this, scheduler, work);\n this.scheduler = scheduler;\n this.work = work;\n this.pending = false;\n }\n AsyncAction.prototype.schedule = function (state, delay) {\n if (delay === void 0) { delay = 0; }\n if (this.closed) {\n return this;\n }\n // Always replace the current state with the new state.\n this.state = state;\n // Set the pending flag indicating that this action has been scheduled, or\n // has recursively rescheduled itself.\n this.pending = true;\n var id = this.id;\n var scheduler = this.scheduler;\n //\n // Important implementation note:\n //\n // Actions only execute once by default, unless rescheduled from within the\n // scheduled callback. This allows us to implement single and repeat\n // actions via the same code path, without adding API surface area, as well\n // as mimic traditional recursion but across asynchronous boundaries.\n //\n // However, JS runtimes and timers distinguish between intervals achieved by\n // serial `setTimeout` calls vs. a single `setInterval` call. An interval of\n // serial `setTimeout` calls can be individually delayed, which delays\n // scheduling the next `setTimeout`, and so on. `setInterval` attempts to\n // guarantee the interval callback will be invoked more precisely to the\n // interval period, regardless of load.\n //\n // Therefore, we use `setInterval` to schedule single and repeat actions.\n // If the action reschedules itself with the same delay, the interval is not\n // canceled. If the action doesn't reschedule, or reschedules with a\n // different delay, the interval will be canceled after scheduled callback\n // execution.\n //\n if (id != null) {\n this.id = this.recycleAsyncId(scheduler, id, delay);\n }\n this.delay = delay;\n // If this action has already an async Id, don't request a new one.\n this.id = this.id || this.requestAsyncId(scheduler, this.id, delay);\n return this;\n };\n AsyncAction.prototype.requestAsyncId = function (scheduler, id, delay) {\n if (delay === void 0) { delay = 0; }\n return root_1.root.setInterval(scheduler.flush.bind(scheduler, this), delay);\n };\n AsyncAction.prototype.recycleAsyncId = function (scheduler, id, delay) {\n if (delay === void 0) { delay = 0; }\n // If this action is rescheduled with the same delay time, don't clear the interval id.\n if (delay !== null && this.delay === delay && this.pending === false) {\n return id;\n }\n // Otherwise, if the action's delay time is different from the current delay,\n // or the action has been rescheduled before it's executed, clear the interval id\n return root_1.root.clearInterval(id) && undefined || undefined;\n };\n /**\n * Immediately executes this action and the `work` it contains.\n * @return {any}\n */\n AsyncAction.prototype.execute = function (state, delay) {\n if (this.closed) {\n return new Error('executing a cancelled action');\n }\n this.pending = false;\n var error = this._execute(state, delay);\n if (error) {\n return error;\n }\n else if (this.pending === false && this.id != null) {\n // Dequeue if the action didn't reschedule itself. Don't call\n // unsubscribe(), because the action could reschedule later.\n // For example:\n // ```\n // scheduler.schedule(function doWork(counter) {\n // /* ... I'm a busy worker bee ... */\n // var originalAction = this;\n // /* wait 100ms before rescheduling the action */\n // setTimeout(function () {\n // originalAction.schedule(counter + 1);\n // }, 100);\n // }, 1000);\n // ```\n this.id = this.recycleAsyncId(this.scheduler, this.id, null);\n }\n };\n AsyncAction.prototype._execute = function (state, delay) {\n var errored = false;\n var errorValue = undefined;\n try {\n this.work(state);\n }\n catch (e) {\n errored = true;\n errorValue = !!e && e || new Error(e);\n }\n if (errored) {\n this.unsubscribe();\n return errorValue;\n }\n };\n AsyncAction.prototype._unsubscribe = function () {\n var id = this.id;\n var scheduler = this.scheduler;\n var actions = scheduler.actions;\n var index = actions.indexOf(this);\n this.work = null;\n this.state = null;\n this.pending = false;\n this.scheduler = null;\n if (index !== -1) {\n actions.splice(index, 1);\n }\n if (id != null) {\n this.id = this.recycleAsyncId(scheduler, id, null);\n }\n this.delay = null;\n };\n return AsyncAction;\n}(Action_1.Action));\nexports.AsyncAction = AsyncAction;\n//# sourceMappingURL=AsyncAction.js.map",
- "\"use strict\";\nvar __extends = (this && this.__extends) || function (d, b) {\n for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p];\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n};\nvar Scheduler_1 = require('../Scheduler');\nvar AsyncScheduler = (function (_super) {\n __extends(AsyncScheduler, _super);\n function AsyncScheduler() {\n _super.apply(this, arguments);\n this.actions = [];\n /**\n * A flag to indicate whether the Scheduler is currently executing a batch of\n * queued actions.\n * @type {boolean}\n */\n this.active = false;\n /**\n * An internal ID used to track the latest asynchronous task such as those\n * coming from `setTimeout`, `setInterval`, `requestAnimationFrame`, and\n * others.\n * @type {any}\n */\n this.scheduled = undefined;\n }\n AsyncScheduler.prototype.flush = function (action) {\n var actions = this.actions;\n if (this.active) {\n actions.push(action);\n return;\n }\n var error;\n this.active = true;\n do {\n if (error = action.execute(action.state, action.delay)) {\n break;\n }\n } while (action = actions.shift()); // exhaust the scheduler queue\n this.active = false;\n if (error) {\n while (action = actions.shift()) {\n action.unsubscribe();\n }\n throw error;\n }\n };\n return AsyncScheduler;\n}(Scheduler_1.Scheduler));\nexports.AsyncScheduler = AsyncScheduler;\n//# sourceMappingURL=AsyncScheduler.js.map",
- "\"use strict\";\nvar __extends = (this && this.__extends) || function (d, b) {\n for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p];\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n};\nvar AsyncAction_1 = require('./AsyncAction');\n/**\n * We need this JSDoc comment for affecting ESDoc.\n * @ignore\n * @extends {Ignored}\n */\nvar QueueAction = (function (_super) {\n __extends(QueueAction, _super);\n function QueueAction(scheduler, work) {\n _super.call(this, scheduler, work);\n this.scheduler = scheduler;\n this.work = work;\n }\n QueueAction.prototype.schedule = function (state, delay) {\n if (delay === void 0) { delay = 0; }\n if (delay > 0) {\n return _super.prototype.schedule.call(this, state, delay);\n }\n this.delay = delay;\n this.state = state;\n this.scheduler.flush(this);\n return this;\n };\n QueueAction.prototype.execute = function (state, delay) {\n return (delay > 0 || this.closed) ?\n _super.prototype.execute.call(this, state, delay) :\n this._execute(state, delay);\n };\n QueueAction.prototype.requestAsyncId = function (scheduler, id, delay) {\n if (delay === void 0) { delay = 0; }\n // If delay exists and is greater than 0, or if the delay is null (the\n // action wasn't rescheduled) but was originally scheduled as an async\n // action, then recycle as an async action.\n if ((delay !== null && delay > 0) || (delay === null && this.delay > 0)) {\n return _super.prototype.requestAsyncId.call(this, scheduler, id, delay);\n }\n // Otherwise flush the scheduler starting with this action.\n return scheduler.flush(this);\n };\n return QueueAction;\n}(AsyncAction_1.AsyncAction));\nexports.QueueAction = QueueAction;\n//# sourceMappingURL=QueueAction.js.map",
- "\"use strict\";\nvar __extends = (this && this.__extends) || function (d, b) {\n for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p];\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n};\nvar AsyncScheduler_1 = require('./AsyncScheduler');\nvar QueueScheduler = (function (_super) {\n __extends(QueueScheduler, _super);\n function QueueScheduler() {\n _super.apply(this, arguments);\n }\n return QueueScheduler;\n}(AsyncScheduler_1.AsyncScheduler));\nexports.QueueScheduler = QueueScheduler;\n//# sourceMappingURL=QueueScheduler.js.map",
- "\"use strict\";\nvar AsyncAction_1 = require('./AsyncAction');\nvar AsyncScheduler_1 = require('./AsyncScheduler');\n/**\n *\n * Async Scheduler\n *\n * <span class=\"informal\">Schedule task as if you used setTimeout(task, duration)</span>\n *\n * `async` scheduler schedules tasks asynchronously, by putting them on the JavaScript\n * event loop queue. It is best used to delay tasks in time or to schedule tasks repeating\n * in intervals.\n *\n * If you just want to \"defer\" task, that is to perform it right after currently\n * executing synchronous code ends (commonly achieved by `setTimeout(deferredTask, 0)`),\n * better choice will be the {@link asap} scheduler.\n *\n * @example <caption>Use async scheduler to delay task</caption>\n * const task = () => console.log('it works!');\n *\n * Rx.Scheduler.async.schedule(task, 2000);\n *\n * // After 2 seconds logs:\n * // \"it works!\"\n *\n *\n * @example <caption>Use async scheduler to repeat task in intervals</caption>\n * function task(state) {\n * console.log(state);\n * this.schedule(state + 1, 1000); // `this` references currently executing Action,\n * // which we reschedule with new state and delay\n * }\n *\n * Rx.Scheduler.async.schedule(task, 3000, 0);\n *\n * // Logs:\n * // 0 after 3s\n * // 1 after 4s\n * // 2 after 5s\n * // 3 after 6s\n *\n * @static true\n * @name async\n * @owner Scheduler\n */\nexports.async = new AsyncScheduler_1.AsyncScheduler(AsyncAction_1.AsyncAction);\n//# sourceMappingURL=async.js.map",
- "\"use strict\";\nvar QueueAction_1 = require('./QueueAction');\nvar QueueScheduler_1 = require('./QueueScheduler');\n/**\n *\n * Queue Scheduler\n *\n * <span class=\"informal\">Put every next task on a queue, instead of executing it immediately</span>\n *\n * `queue` scheduler, when used with delay, behaves the same as {@link async} scheduler.\n *\n * When used without delay, it schedules given task synchronously - executes it right when\n * it is scheduled. However when called recursively, that is when inside the scheduled task,\n * another task is scheduled with queue scheduler, instead of executing immediately as well,\n * that task will be put on a queue and wait for current one to finish.\n *\n * This means that when you execute task with `queue` scheduler, you are sure it will end\n * before any other task scheduled with that scheduler will start.\n *\n * @examples <caption>Schedule recursively first, then do something</caption>\n *\n * Rx.Scheduler.queue.schedule(() => {\n * Rx.Scheduler.queue.schedule(() => console.log('second')); // will not happen now, but will be put on a queue\n *\n * console.log('first');\n * });\n *\n * // Logs:\n * // \"first\"\n * // \"second\"\n *\n *\n * @example <caption>Reschedule itself recursively</caption>\n *\n * Rx.Scheduler.queue.schedule(function(state) {\n * if (state !== 0) {\n * console.log('before', state);\n * this.schedule(state - 1); // `this` references currently executing Action,\n * // which we reschedule with new state\n * console.log('after', state);\n * }\n * }, 0, 3);\n *\n * // In scheduler that runs recursively, you would expect:\n * // \"before\", 3\n * // \"before\", 2\n * // \"before\", 1\n * // \"after\", 1\n * // \"after\", 2\n * // \"after\", 3\n *\n * // But with queue it logs:\n * // \"before\", 3\n * // \"after\", 3\n * // \"before\", 2\n * // \"after\", 2\n * // \"before\", 1\n * // \"after\", 1\n *\n *\n * @static true\n * @name queue\n * @owner Scheduler\n */\nexports.queue = new QueueScheduler_1.QueueScheduler(QueueAction_1.QueueAction);\n//# sourceMappingURL=queue.js.map",
- "\"use strict\";\nvar root_1 = require('../util/root');\nfunction symbolIteratorPonyfill(root) {\n var Symbol = root.Symbol;\n if (typeof Symbol === 'function') {\n if (!Symbol.iterator) {\n Symbol.iterator = Symbol('iterator polyfill');\n }\n return Symbol.iterator;\n }\n else {\n // [for Mozilla Gecko 27-35:](https://mzl.la/2ewE1zC)\n var Set_1 = root.Set;\n if (Set_1 && typeof new Set_1()['@@iterator'] === 'function') {\n return '@@iterator';\n }\n var Map_1 = root.Map;\n // required for compatability with es6-shim\n if (Map_1) {\n var keys = Object.getOwnPropertyNames(Map_1.prototype);\n for (var i = 0; i < keys.length; ++i) {\n var key = keys[i];\n // according to spec, Map.prototype[@@iterator] and Map.orototype.entries must be equal.\n if (key !== 'entries' && key !== 'size' && Map_1.prototype[key] === Map_1.prototype['entries']) {\n return key;\n }\n }\n }\n return '@@iterator';\n }\n}\nexports.symbolIteratorPonyfill = symbolIteratorPonyfill;\nexports.iterator = symbolIteratorPonyfill(root_1.root);\n/**\n * @deprecated use iterator instead\n */\nexports.$$iterator = exports.iterator;\n//# sourceMappingURL=iterator.js.map",
- "\"use strict\";\nvar root_1 = require('../util/root');\nfunction getSymbolObservable(context) {\n var $$observable;\n var Symbol = context.Symbol;\n if (typeof Symbol === 'function') {\n if (Symbol.observable) {\n $$observable = Symbol.observable;\n }\n else {\n $$observable = Symbol('observable');\n Symbol.observable = $$observable;\n }\n }\n else {\n $$observable = '@@observable';\n }\n return $$observable;\n}\nexports.getSymbolObservable = getSymbolObservable;\nexports.observable = getSymbolObservable(root_1.root);\n/**\n * @deprecated use observable instead\n */\nexports.$$observable = exports.observable;\n//# sourceMappingURL=observable.js.map",
- "\"use strict\";\nvar root_1 = require('../util/root');\nvar Symbol = root_1.root.Symbol;\nexports.rxSubscriber = (typeof Symbol === 'function' && typeof Symbol.for === 'function') ?\n Symbol.for('rxSubscriber') : '@@rxSubscriber';\n/**\n * @deprecated use rxSubscriber instead\n */\nexports.$$rxSubscriber = exports.rxSubscriber;\n//# sourceMappingURL=rxSubscriber.js.map",
- "\"use strict\";\nvar root_1 = require('./root');\nvar RequestAnimationFrameDefinition = (function () {\n function RequestAnimationFrameDefinition(root) {\n if (root.requestAnimationFrame) {\n this.cancelAnimationFrame = root.cancelAnimationFrame.bind(root);\n this.requestAnimationFrame = root.requestAnimationFrame.bind(root);\n }\n else if (root.mozRequestAnimationFrame) {\n this.cancelAnimationFrame = root.mozCancelAnimationFrame.bind(root);\n this.requestAnimationFrame = root.mozRequestAnimationFrame.bind(root);\n }\n else if (root.webkitRequestAnimationFrame) {\n this.cancelAnimationFrame = root.webkitCancelAnimationFrame.bind(root);\n this.requestAnimationFrame = root.webkitRequestAnimationFrame.bind(root);\n }\n else if (root.msRequestAnimationFrame) {\n this.cancelAnimationFrame = root.msCancelAnimationFrame.bind(root);\n this.requestAnimationFrame = root.msRequestAnimationFrame.bind(root);\n }\n else if (root.oRequestAnimationFrame) {\n this.cancelAnimationFrame = root.oCancelAnimationFrame.bind(root);\n this.requestAnimationFrame = root.oRequestAnimationFrame.bind(root);\n }\n else {\n this.cancelAnimationFrame = root.clearTimeout.bind(root);\n this.requestAnimationFrame = function (cb) { return root.setTimeout(cb, 1000 / 60); };\n }\n }\n return RequestAnimationFrameDefinition;\n}());\nexports.RequestAnimationFrameDefinition = RequestAnimationFrameDefinition;\nexports.AnimationFrame = new RequestAnimationFrameDefinition(root_1.root);\n//# sourceMappingURL=AnimationFrame.js.map",
- "\"use strict\";\nvar __extends = (this && this.__extends) || function (d, b) {\n for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p];\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n};\n/**\n * An error thrown when an element was queried at a certain index of an\n * Observable, but no such index or position exists in that sequence.\n *\n * @see {@link elementAt}\n * @see {@link take}\n * @see {@link takeLast}\n *\n * @class ArgumentOutOfRangeError\n */\nvar ArgumentOutOfRangeError = (function (_super) {\n __extends(ArgumentOutOfRangeError, _super);\n function ArgumentOutOfRangeError() {\n var err = _super.call(this, 'argument out of range');\n this.name = err.name = 'ArgumentOutOfRangeError';\n this.stack = err.stack;\n this.message = err.message;\n }\n return ArgumentOutOfRangeError;\n}(Error));\nexports.ArgumentOutOfRangeError = ArgumentOutOfRangeError;\n//# sourceMappingURL=ArgumentOutOfRangeError.js.map",
- "\"use strict\";\nvar __extends = (this && this.__extends) || function (d, b) {\n for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p];\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n};\n/**\n * An error thrown when an Observable or a sequence was queried but has no\n * elements.\n *\n * @see {@link first}\n * @see {@link last}\n * @see {@link single}\n *\n * @class EmptyError\n */\nvar EmptyError = (function (_super) {\n __extends(EmptyError, _super);\n function EmptyError() {\n var err = _super.call(this, 'no elements in sequence');\n this.name = err.name = 'EmptyError';\n this.stack = err.stack;\n this.message = err.message;\n }\n return EmptyError;\n}(Error));\nexports.EmptyError = EmptyError;\n//# sourceMappingURL=EmptyError.js.map",
- "\"use strict\";\nvar __extends = (this && this.__extends) || function (d, b) {\n for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p];\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n};\n/**\n * An error thrown when an action is invalid because the object has been\n * unsubscribed.\n *\n * @see {@link Subject}\n * @see {@link BehaviorSubject}\n *\n * @class ObjectUnsubscribedError\n */\nvar ObjectUnsubscribedError = (function (_super) {\n __extends(ObjectUnsubscribedError, _super);\n function ObjectUnsubscribedError() {\n var err = _super.call(this, 'object unsubscribed');\n this.name = err.name = 'ObjectUnsubscribedError';\n this.stack = err.stack;\n this.message = err.message;\n }\n return ObjectUnsubscribedError;\n}(Error));\nexports.ObjectUnsubscribedError = ObjectUnsubscribedError;\n//# sourceMappingURL=ObjectUnsubscribedError.js.map",
- "\"use strict\";\nvar root_1 = require('./root');\nfunction minimalSetImpl() {\n // THIS IS NOT a full impl of Set, this is just the minimum\n // bits of functionality we need for this library.\n return (function () {\n function MinimalSet() {\n this._values = [];\n }\n MinimalSet.prototype.add = function (value) {\n if (!this.has(value)) {\n this._values.push(value);\n }\n };\n MinimalSet.prototype.has = function (value) {\n return this._values.indexOf(value) !== -1;\n };\n Object.defineProperty(MinimalSet.prototype, \"size\", {\n get: function () {\n return this._values.length;\n },\n enumerable: true,\n configurable: true\n });\n MinimalSet.prototype.clear = function () {\n this._values.length = 0;\n };\n return MinimalSet;\n }());\n}\nexports.minimalSetImpl = minimalSetImpl;\nexports.Set = root_1.root.Set || minimalSetImpl();\n//# sourceMappingURL=Set.js.map",
- "\"use strict\";\nvar __extends = (this && this.__extends) || function (d, b) {\n for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p];\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n};\n/**\n * An error thrown when one or more errors have occurred during the\n * `unsubscribe` of a {@link Subscription}.\n */\nvar UnsubscriptionError = (function (_super) {\n __extends(UnsubscriptionError, _super);\n function UnsubscriptionError(errors) {\n _super.call(this);\n this.errors = errors;\n var err = Error.call(this, errors ?\n errors.length + \" errors occurred during unsubscription:\\n \" + errors.map(function (err, i) { return ((i + 1) + \") \" + err.toString()); }).join('\\n ') : '');\n this.name = err.name = 'UnsubscriptionError';\n this.stack = err.stack;\n this.message = err.message;\n }\n return UnsubscriptionError;\n}(Error));\nexports.UnsubscriptionError = UnsubscriptionError;\n//# sourceMappingURL=UnsubscriptionError.js.map",
- "\"use strict\";\n// typeof any so that it we don't have to cast when comparing a result to the error object\nexports.errorObject = { e: {} };\n//# sourceMappingURL=errorObject.js.map",
- "\"use strict\";\nexports.isArray = Array.isArray || (function (x) { return x && typeof x.length === 'number'; });\n//# sourceMappingURL=isArray.js.map",
- "\"use strict\";\nexports.isArrayLike = (function (x) { return x && typeof x.length === 'number'; });\n//# sourceMappingURL=isArrayLike.js.map",
- "\"use strict\";\nfunction isDate(value) {\n return value instanceof Date && !isNaN(+value);\n}\nexports.isDate = isDate;\n//# sourceMappingURL=isDate.js.map",
- "\"use strict\";\nfunction isFunction(x) {\n return typeof x === 'function';\n}\nexports.isFunction = isFunction;\n//# sourceMappingURL=isFunction.js.map",
- "\"use strict\";\nvar isArray_1 = require('../util/isArray');\nfunction isNumeric(val) {\n // parseFloat NaNs numeric-cast false positives (null|true|false|\"\")\n // ...but misinterprets leading-number strings, particularly hex literals (\"0x...\")\n // subtraction forces infinities to NaN\n // adding 1 corrects loss of precision from parseFloat (#15100)\n return !isArray_1.isArray(val) && (val - parseFloat(val) + 1) >= 0;\n}\nexports.isNumeric = isNumeric;\n;\n//# sourceMappingURL=isNumeric.js.map",
- "\"use strict\";\nfunction isObject(x) {\n return x != null && typeof x === 'object';\n}\nexports.isObject = isObject;\n//# sourceMappingURL=isObject.js.map",
- "\"use strict\";\nfunction isPromise(value) {\n return value && typeof value.subscribe !== 'function' && typeof value.then === 'function';\n}\nexports.isPromise = isPromise;\n//# sourceMappingURL=isPromise.js.map",
- "\"use strict\";\nfunction isScheduler(value) {\n return value && typeof value.schedule === 'function';\n}\nexports.isScheduler = isScheduler;\n//# sourceMappingURL=isScheduler.js.map",
- "\"use strict\";\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.\nvar __window = typeof window !== 'undefined' && window;\nvar __self = typeof self !== 'undefined' && typeof WorkerGlobalScope !== 'undefined' &&\n self instanceof WorkerGlobalScope && self;\nvar __global = typeof global !== 'undefined' && global;\nvar _root = __window || __global || __self;\nexports.root = _root;\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//# sourceMappingURL=root.js.map",
- "\"use strict\";\nvar root_1 = require('./root');\nvar isArrayLike_1 = require('./isArrayLike');\nvar isPromise_1 = require('./isPromise');\nvar isObject_1 = require('./isObject');\nvar Observable_1 = require('../Observable');\nvar iterator_1 = require('../symbol/iterator');\nvar InnerSubscriber_1 = require('../InnerSubscriber');\nvar observable_1 = require('../symbol/observable');\nfunction subscribeToResult(outerSubscriber, result, outerValue, outerIndex) {\n var destination = new InnerSubscriber_1.InnerSubscriber(outerSubscriber, outerValue, outerIndex);\n if (destination.closed) {\n return null;\n }\n if (result instanceof Observable_1.Observable) {\n if (result._isScalar) {\n destination.next(result.value);\n destination.complete();\n return null;\n }\n else {\n return result.subscribe(destination);\n }\n }\n else if (isArrayLike_1.isArrayLike(result)) {\n for (var i = 0, len = result.length; i < len && !destination.closed; i++) {\n destination.next(result[i]);\n }\n if (!destination.closed) {\n destination.complete();\n }\n }\n else if (isPromise_1.isPromise(result)) {\n result.then(function (value) {\n if (!destination.closed) {\n destination.next(value);\n destination.complete();\n }\n }, function (err) { return destination.error(err); })\n .then(null, function (err) {\n // Escaping the Promise trap: globally throw unhandled errors\n root_1.root.setTimeout(function () { throw err; });\n });\n return destination;\n }\n else if (result && typeof result[iterator_1.iterator] === 'function') {\n var iterator = result[iterator_1.iterator]();\n do {\n var item = iterator.next();\n if (item.done) {\n destination.complete();\n break;\n }\n destination.next(item.value);\n if (destination.closed) {\n break;\n }\n } while (true);\n }\n else if (result && typeof result[observable_1.observable] === 'function') {\n var obs = result[observable_1.observable]();\n if (typeof obs.subscribe !== 'function') {\n destination.error(new TypeError('Provided object does not correctly implement Symbol.observable'));\n }\n else {\n return obs.subscribe(new InnerSubscriber_1.InnerSubscriber(outerSubscriber, outerValue, outerIndex));\n }\n }\n else {\n var value = isObject_1.isObject(result) ? 'an invalid object' : \"'\" + result + \"'\";\n var msg = (\"You provided \" + value + \" where a stream was expected.\")\n + ' You can provide an Observable, Promise, Array, or Iterable.';\n destination.error(new TypeError(msg));\n }\n return null;\n}\nexports.subscribeToResult = subscribeToResult;\n//# sourceMappingURL=subscribeToResult.js.map",
- "\"use strict\";\nvar Subscriber_1 = require('../Subscriber');\nvar rxSubscriber_1 = require('../symbol/rxSubscriber');\nvar Observer_1 = require('../Observer');\nfunction toSubscriber(nextOrObserver, error, complete) {\n if (nextOrObserver) {\n if (nextOrObserver instanceof Subscriber_1.Subscriber) {\n return nextOrObserver;\n }\n if (nextOrObserver[rxSubscriber_1.rxSubscriber]) {\n return nextOrObserver[rxSubscriber_1.rxSubscriber]();\n }\n }\n if (!nextOrObserver && !error && !complete) {\n return new Subscriber_1.Subscriber(Observer_1.empty);\n }\n return new Subscriber_1.Subscriber(nextOrObserver, error, complete);\n}\nexports.toSubscriber = toSubscriber;\n//# sourceMappingURL=toSubscriber.js.map",
- "\"use strict\";\nvar errorObject_1 = require('./errorObject');\nvar tryCatchTarget;\nfunction tryCatcher() {\n try {\n return tryCatchTarget.apply(this, arguments);\n }\n catch (e) {\n errorObject_1.errorObject.e = e;\n return errorObject_1.errorObject;\n }\n}\nfunction tryCatch(fn) {\n tryCatchTarget = fn;\n return tryCatcher;\n}\nexports.tryCatch = tryCatch;\n;\n//# sourceMappingURL=tryCatch.js.map",
- "// threejs.org/license\n(function(l,xa){\"object\"===typeof exports&&\"undefined\"!==typeof module?xa(exports):\"function\"===typeof define&&define.amd?define([\"exports\"],xa):xa(l.THREE=l.THREE||{})})(this,function(l){function xa(){}function C(a,b){this.x=a||0;this.y=b||0}function ba(a,b,c,d,e,f,g,h,k,m){Object.defineProperty(this,\"id\",{value:hf++});this.uuid=Y.generateUUID();this.name=\"\";this.image=void 0!==a?a:ba.DEFAULT_IMAGE;this.mipmaps=[];this.mapping=void 0!==b?b:ba.DEFAULT_MAPPING;this.wrapS=void 0!==c?c:1001;this.wrapT=\nvoid 0!==d?d:1001;this.magFilter=void 0!==e?e:1006;this.minFilter=void 0!==f?f:1008;this.anisotropy=void 0!==k?k:1;this.format=void 0!==g?g:1023;this.type=void 0!==h?h:1009;this.offset=new C(0,0);this.repeat=new C(1,1);this.generateMipmaps=!0;this.premultiplyAlpha=!1;this.flipY=!0;this.unpackAlignment=4;this.encoding=void 0!==m?m:3E3;this.version=0;this.onUpdate=null}function fa(a,b,c,d){this.x=a||0;this.y=b||0;this.z=c||0;this.w=void 0!==d?d:1}function Cb(a,b,c){this.uuid=Y.generateUUID();this.width=\na;this.height=b;this.scissor=new fa(0,0,a,b);this.scissorTest=!1;this.viewport=new fa(0,0,a,b);c=c||{};void 0===c.minFilter&&(c.minFilter=1006);this.texture=new ba(void 0,void 0,c.wrapS,c.wrapT,c.magFilter,c.minFilter,c.format,c.type,c.anisotropy,c.encoding);this.depthBuffer=void 0!==c.depthBuffer?c.depthBuffer:!0;this.stencilBuffer=void 0!==c.stencilBuffer?c.stencilBuffer:!0;this.depthTexture=void 0!==c.depthTexture?c.depthTexture:null}function Db(a,b,c){Cb.call(this,a,b,c);this.activeMipMapLevel=\nthis.activeCubeFace=0}function oa(a,b,c,d){this._x=a||0;this._y=b||0;this._z=c||0;this._w=void 0!==d?d:1}function n(a,b,c){this.x=a||0;this.y=b||0;this.z=c||0}function K(){this.elements=[1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1];0<arguments.length&&console.error(\"THREE.Matrix4: the constructor no longer reads arguments. use .set() instead.\")}function db(a,b,c,d,e,f,g,h,k,m,q,v){ba.call(this,null,f,g,h,k,m,d,e,q,v);this.image={data:a,width:b,height:c};this.magFilter=void 0!==k?k:1003;this.minFilter=void 0!==\nm?m:1003;this.flipY=this.generateMipmaps=!1;this.unpackAlignment=1}function Xa(a,b,c,d,e,f,g,h,k,m){a=void 0!==a?a:[];ba.call(this,a,void 0!==b?b:301,c,d,e,f,g,h,k,m);this.flipY=!1}function Eb(a,b,c){var d=a[0];if(0>=d||0<d)return a;var e=b*c,f=xe[e];void 0===f&&(f=new Float32Array(e),xe[e]=f);if(0!==b)for(d.toArray(f,0),d=1,e=0;d!==b;++d)e+=c,a[d].toArray(f,e);return f}function ye(a,b){var c=ze[b];void 0===c&&(c=new Int32Array(b),ze[b]=c);for(var d=0;d!==b;++d)c[d]=a.allocTextureUnit();return c}\nfunction jf(a,b){a.uniform1f(this.addr,b)}function kf(a,b){a.uniform1i(this.addr,b)}function lf(a,b){void 0===b.x?a.uniform2fv(this.addr,b):a.uniform2f(this.addr,b.x,b.y)}function mf(a,b){void 0!==b.x?a.uniform3f(this.addr,b.x,b.y,b.z):void 0!==b.r?a.uniform3f(this.addr,b.r,b.g,b.b):a.uniform3fv(this.addr,b)}function nf(a,b){void 0===b.x?a.uniform4fv(this.addr,b):a.uniform4f(this.addr,b.x,b.y,b.z,b.w)}function of(a,b){a.uniformMatrix2fv(this.addr,!1,b.elements||b)}function pf(a,b){void 0===b.elements?\na.uniformMatrix3fv(this.addr,!1,b):(Ae.set(b.elements),a.uniformMatrix3fv(this.addr,!1,Ae))}function qf(a,b){void 0===b.elements?a.uniformMatrix4fv(this.addr,!1,b):(Be.set(b.elements),a.uniformMatrix4fv(this.addr,!1,Be))}function rf(a,b,c){var d=c.allocTextureUnit();a.uniform1i(this.addr,d);c.setTexture2D(b||Ce,d)}function sf(a,b,c){var d=c.allocTextureUnit();a.uniform1i(this.addr,d);c.setTextureCube(b||De,d)}function Ee(a,b){a.uniform2iv(this.addr,b)}function Fe(a,b){a.uniform3iv(this.addr,b)}function Ge(a,\nb){a.uniform4iv(this.addr,b)}function tf(a){switch(a){case 5126:return jf;case 35664:return lf;case 35665:return mf;case 35666:return nf;case 35674:return of;case 35675:return pf;case 35676:return qf;case 35678:case 36198:return rf;case 35680:return sf;case 5124:case 35670:return kf;case 35667:case 35671:return Ee;case 35668:case 35672:return Fe;case 35669:case 35673:return Ge}}function uf(a,b){a.uniform1fv(this.addr,b)}function vf(a,b){a.uniform1iv(this.addr,b)}function wf(a,b){a.uniform2fv(this.addr,\nEb(b,this.size,2))}function xf(a,b){a.uniform3fv(this.addr,Eb(b,this.size,3))}function yf(a,b){a.uniform4fv(this.addr,Eb(b,this.size,4))}function zf(a,b){a.uniformMatrix2fv(this.addr,!1,Eb(b,this.size,4))}function Af(a,b){a.uniformMatrix3fv(this.addr,!1,Eb(b,this.size,9))}function Bf(a,b){a.uniformMatrix4fv(this.addr,!1,Eb(b,this.size,16))}function Cf(a,b,c){var d=b.length,e=ye(c,d);a.uniform1iv(this.addr,e);for(a=0;a!==d;++a)c.setTexture2D(b[a]||Ce,e[a])}function Df(a,b,c){var d=b.length,e=ye(c,\nd);a.uniform1iv(this.addr,e);for(a=0;a!==d;++a)c.setTextureCube(b[a]||De,e[a])}function Ef(a){switch(a){case 5126:return uf;case 35664:return wf;case 35665:return xf;case 35666:return yf;case 35674:return zf;case 35675:return Af;case 35676:return Bf;case 35678:return Cf;case 35680:return Df;case 5124:case 35670:return vf;case 35667:case 35671:return Ee;case 35668:case 35672:return Fe;case 35669:case 35673:return Ge}}function Ff(a,b,c){this.id=a;this.addr=c;this.setValue=tf(b.type)}function Gf(a,b,\nc){this.id=a;this.addr=c;this.size=b.size;this.setValue=Ef(b.type)}function He(a){this.id=a;this.seq=[];this.map={}}function eb(a,b,c){this.seq=[];this.map={};this.renderer=c;c=a.getProgramParameter(b,a.ACTIVE_UNIFORMS);for(var d=0;d<c;++d){var e=a.getActiveUniform(b,d),f=a.getUniformLocation(b,e.name),g=this,h=e.name,k=h.length;for(Pd.lastIndex=0;;){var m=Pd.exec(h),q=Pd.lastIndex,v=m[1],p=m[3];\"]\"===m[2]&&(v|=0);if(void 0===p||\"[\"===p&&q+2===k){h=g;e=void 0===p?new Ff(v,e,f):new Gf(v,e,f);h.seq.push(e);\nh.map[e.id]=e;break}else p=g.map[v],void 0===p&&(p=new He(v),v=g,g=p,v.seq.push(g),v.map[g.id]=g),g=p}}}function G(a,b,c){return void 0===b&&void 0===c?this.set(a):this.setRGB(a,b,c)}function fd(a,b){this.min=void 0!==a?a:new C(Infinity,Infinity);this.max=void 0!==b?b:new C(-Infinity,-Infinity)}function Hf(a,b){var c,d,e,f,g,h,k,m,q,v,p=a.context,r=a.state,l,t,y,x,u,H;this.render=function(w,I,W){if(0!==b.length){w=new n;var D=W.w/W.z,O=.5*W.z,aa=.5*W.w,F=16/W.w,ja=new C(F*D,F),T=new n(1,1,0),fb=new C(1,\n1),Ya=new fd;Ya.min.set(W.x,W.y);Ya.max.set(W.x+(W.z-16),W.y+(W.w-16));if(void 0===x){var F=new Float32Array([-1,-1,0,0,1,-1,1,0,1,1,1,1,-1,1,0,1]),ka=new Uint16Array([0,1,2,0,2,3]);l=p.createBuffer();t=p.createBuffer();p.bindBuffer(p.ARRAY_BUFFER,l);p.bufferData(p.ARRAY_BUFFER,F,p.STATIC_DRAW);p.bindBuffer(p.ELEMENT_ARRAY_BUFFER,t);p.bufferData(p.ELEMENT_ARRAY_BUFFER,ka,p.STATIC_DRAW);u=p.createTexture();H=p.createTexture();r.bindTexture(p.TEXTURE_2D,u);p.texImage2D(p.TEXTURE_2D,0,p.RGB,16,16,0,\np.RGB,p.UNSIGNED_BYTE,null);p.texParameteri(p.TEXTURE_2D,p.TEXTURE_WRAP_S,p.CLAMP_TO_EDGE);p.texParameteri(p.TEXTURE_2D,p.TEXTURE_WRAP_T,p.CLAMP_TO_EDGE);p.texParameteri(p.TEXTURE_2D,p.TEXTURE_MAG_FILTER,p.NEAREST);p.texParameteri(p.TEXTURE_2D,p.TEXTURE_MIN_FILTER,p.NEAREST);r.bindTexture(p.TEXTURE_2D,H);p.texImage2D(p.TEXTURE_2D,0,p.RGBA,16,16,0,p.RGBA,p.UNSIGNED_BYTE,null);p.texParameteri(p.TEXTURE_2D,p.TEXTURE_WRAP_S,p.CLAMP_TO_EDGE);p.texParameteri(p.TEXTURE_2D,p.TEXTURE_WRAP_T,p.CLAMP_TO_EDGE);\np.texParameteri(p.TEXTURE_2D,p.TEXTURE_MAG_FILTER,p.NEAREST);p.texParameteri(p.TEXTURE_2D,p.TEXTURE_MIN_FILTER,p.NEAREST);var F=y={vertexShader:\"uniform lowp int renderType;\\nuniform vec3 screenPosition;\\nuniform vec2 scale;\\nuniform float rotation;\\nuniform sampler2D occlusionMap;\\nattribute vec2 position;\\nattribute vec2 uv;\\nvarying vec2 vUV;\\nvarying float vVisibility;\\nvoid main() {\\nvUV = uv;\\nvec2 pos = position;\\nif ( renderType == 2 ) {\\nvec4 visibility = texture2D( occlusionMap, vec2( 0.1, 0.1 ) );\\nvisibility += texture2D( occlusionMap, vec2( 0.5, 0.1 ) );\\nvisibility += texture2D( occlusionMap, vec2( 0.9, 0.1 ) );\\nvisibility += texture2D( occlusionMap, vec2( 0.9, 0.5 ) );\\nvisibility += texture2D( occlusionMap, vec2( 0.9, 0.9 ) );\\nvisibility += texture2D( occlusionMap, vec2( 0.5, 0.9 ) );\\nvisibility += texture2D( occlusionMap, vec2( 0.1, 0.9 ) );\\nvisibility += texture2D( occlusionMap, vec2( 0.1, 0.5 ) );\\nvisibility += texture2D( occlusionMap, vec2( 0.5, 0.5 ) );\\nvVisibility = visibility.r / 9.0;\\nvVisibility *= 1.0 - visibility.g / 9.0;\\nvVisibility *= visibility.b / 9.0;\\nvVisibility *= 1.0 - visibility.a / 9.0;\\npos.x = cos( rotation ) * position.x - sin( rotation ) * position.y;\\npos.y = sin( rotation ) * position.x + cos( rotation ) * position.y;\\n}\\ngl_Position = vec4( ( pos * scale + screenPosition.xy ).xy, screenPosition.z, 1.0 );\\n}\",\nfragmentShader:\"uniform lowp int renderType;\\nuniform sampler2D map;\\nuniform float opacity;\\nuniform vec3 color;\\nvarying vec2 vUV;\\nvarying float vVisibility;\\nvoid main() {\\nif ( renderType == 0 ) {\\ngl_FragColor = vec4( 1.0, 0.0, 1.0, 0.0 );\\n} else if ( renderType == 1 ) {\\ngl_FragColor = texture2D( map, vUV );\\n} else {\\nvec4 texture = texture2D( map, vUV );\\ntexture.a *= opacity * vVisibility;\\ngl_FragColor = texture;\\ngl_FragColor.rgb *= color;\\n}\\n}\"},ka=p.createProgram(),P=p.createShader(p.FRAGMENT_SHADER),\nM=p.createShader(p.VERTEX_SHADER),V=\"precision \"+a.getPrecision()+\" float;\\n\";p.shaderSource(P,V+F.fragmentShader);p.shaderSource(M,V+F.vertexShader);p.compileShader(P);p.compileShader(M);p.attachShader(ka,P);p.attachShader(ka,M);p.linkProgram(ka);x=ka;q=p.getAttribLocation(x,\"position\");v=p.getAttribLocation(x,\"uv\");c=p.getUniformLocation(x,\"renderType\");d=p.getUniformLocation(x,\"map\");e=p.getUniformLocation(x,\"occlusionMap\");f=p.getUniformLocation(x,\"opacity\");g=p.getUniformLocation(x,\"color\");\nh=p.getUniformLocation(x,\"scale\");k=p.getUniformLocation(x,\"rotation\");m=p.getUniformLocation(x,\"screenPosition\")}p.useProgram(x);r.initAttributes();r.enableAttribute(q);r.enableAttribute(v);r.disableUnusedAttributes();p.uniform1i(e,0);p.uniform1i(d,1);p.bindBuffer(p.ARRAY_BUFFER,l);p.vertexAttribPointer(q,2,p.FLOAT,!1,16,0);p.vertexAttribPointer(v,2,p.FLOAT,!1,16,8);p.bindBuffer(p.ELEMENT_ARRAY_BUFFER,t);r.disable(p.CULL_FACE);r.buffers.depth.setMask(!1);ka=0;for(P=b.length;ka<P;ka++)if(F=16/W.w,\nja.set(F*D,F),M=b[ka],w.set(M.matrixWorld.elements[12],M.matrixWorld.elements[13],M.matrixWorld.elements[14]),w.applyMatrix4(I.matrixWorldInverse),w.applyMatrix4(I.projectionMatrix),T.copy(w),fb.x=W.x+T.x*O+O-8,fb.y=W.y+T.y*aa+aa-8,!0===Ya.containsPoint(fb)){r.activeTexture(p.TEXTURE0);r.bindTexture(p.TEXTURE_2D,null);r.activeTexture(p.TEXTURE1);r.bindTexture(p.TEXTURE_2D,u);p.copyTexImage2D(p.TEXTURE_2D,0,p.RGB,fb.x,fb.y,16,16,0);p.uniform1i(c,0);p.uniform2f(h,ja.x,ja.y);p.uniform3f(m,T.x,T.y,T.z);\nr.disable(p.BLEND);r.enable(p.DEPTH_TEST);p.drawElements(p.TRIANGLES,6,p.UNSIGNED_SHORT,0);r.activeTexture(p.TEXTURE0);r.bindTexture(p.TEXTURE_2D,H);p.copyTexImage2D(p.TEXTURE_2D,0,p.RGBA,fb.x,fb.y,16,16,0);p.uniform1i(c,1);r.disable(p.DEPTH_TEST);r.activeTexture(p.TEXTURE1);r.bindTexture(p.TEXTURE_2D,u);p.drawElements(p.TRIANGLES,6,p.UNSIGNED_SHORT,0);M.positionScreen.copy(T);M.customUpdateCallback?M.customUpdateCallback(M):M.updateLensFlares();p.uniform1i(c,2);r.enable(p.BLEND);for(var V=0,pa=M.lensFlares.length;V<\npa;V++){var S=M.lensFlares[V];.001<S.opacity&&.001<S.scale&&(T.x=S.x,T.y=S.y,T.z=S.z,F=S.size*S.scale/W.w,ja.x=F*D,ja.y=F,p.uniform3f(m,T.x,T.y,T.z),p.uniform2f(h,ja.x,ja.y),p.uniform1f(k,S.rotation),p.uniform1f(f,S.opacity),p.uniform3f(g,S.color.r,S.color.g,S.color.b),r.setBlending(S.blending,S.blendEquation,S.blendSrc,S.blendDst),a.setTexture2D(S.texture,1),p.drawElements(p.TRIANGLES,6,p.UNSIGNED_SHORT,0))}}r.enable(p.CULL_FACE);r.enable(p.DEPTH_TEST);r.buffers.depth.setMask(!0);a.resetGLState()}}}\nfunction If(a,b){var c,d,e,f,g,h,k,m,q,v,p,r,l,t,y,x,u;function H(a,b){return a.renderOrder!==b.renderOrder?a.renderOrder-b.renderOrder:a.z!==b.z?b.z-a.z:b.id-a.id}var w=a.context,I=a.state,W,D,O,aa,F=new n,ja=new oa,T=new n;this.render=function(n,Ya){if(0!==b.length){if(void 0===O){var ka=new Float32Array([-.5,-.5,0,0,.5,-.5,1,0,.5,.5,1,1,-.5,.5,0,1]),P=new Uint16Array([0,1,2,0,2,3]);W=w.createBuffer();D=w.createBuffer();w.bindBuffer(w.ARRAY_BUFFER,W);w.bufferData(w.ARRAY_BUFFER,ka,w.STATIC_DRAW);\nw.bindBuffer(w.ELEMENT_ARRAY_BUFFER,D);w.bufferData(w.ELEMENT_ARRAY_BUFFER,P,w.STATIC_DRAW);var ka=w.createProgram(),P=w.createShader(w.VERTEX_SHADER),M=w.createShader(w.FRAGMENT_SHADER);w.shaderSource(P,[\"precision \"+a.getPrecision()+\" float;\",\"#define SHADER_NAME SpriteMaterial\\nuniform mat4 modelViewMatrix;\\nuniform mat4 projectionMatrix;\\nuniform float rotation;\\nuniform vec2 scale;\\nuniform vec2 uvOffset;\\nuniform vec2 uvScale;\\nattribute vec2 position;\\nattribute vec2 uv;\\nvarying vec2 vUV;\\nvoid main() {\\nvUV = uvOffset + uv * uvScale;\\nvec2 alignedPosition = position * scale;\\nvec2 rotatedPosition;\\nrotatedPosition.x = cos( rotation ) * alignedPosition.x - sin( rotation ) * alignedPosition.y;\\nrotatedPosition.y = sin( rotation ) * alignedPosition.x + cos( rotation ) * alignedPosition.y;\\nvec4 finalPosition;\\nfinalPosition = modelViewMatrix * vec4( 0.0, 0.0, 0.0, 1.0 );\\nfinalPosition.xy += rotatedPosition;\\nfinalPosition = projectionMatrix * finalPosition;\\ngl_Position = finalPosition;\\n}\"].join(\"\\n\"));\nw.shaderSource(M,[\"precision \"+a.getPrecision()+\" float;\",\"#define SHADER_NAME SpriteMaterial\\nuniform vec3 color;\\nuniform sampler2D map;\\nuniform float opacity;\\nuniform int fogType;\\nuniform vec3 fogColor;\\nuniform float fogDensity;\\nuniform float fogNear;\\nuniform float fogFar;\\nuniform float alphaTest;\\nvarying vec2 vUV;\\nvoid main() {\\nvec4 texture = texture2D( map, vUV );\\nif ( texture.a < alphaTest ) discard;\\ngl_FragColor = vec4( color * texture.xyz, texture.a * opacity );\\nif ( fogType > 0 ) {\\nfloat depth = gl_FragCoord.z / gl_FragCoord.w;\\nfloat fogFactor = 0.0;\\nif ( fogType == 1 ) {\\nfogFactor = smoothstep( fogNear, fogFar, depth );\\n} else {\\nconst float LOG2 = 1.442695;\\nfogFactor = exp2( - fogDensity * fogDensity * depth * depth * LOG2 );\\nfogFactor = 1.0 - clamp( fogFactor, 0.0, 1.0 );\\n}\\ngl_FragColor = mix( gl_FragColor, vec4( fogColor, gl_FragColor.w ), fogFactor );\\n}\\n}\"].join(\"\\n\"));\nw.compileShader(P);w.compileShader(M);w.attachShader(ka,P);w.attachShader(ka,M);w.linkProgram(ka);O=ka;x=w.getAttribLocation(O,\"position\");u=w.getAttribLocation(O,\"uv\");c=w.getUniformLocation(O,\"uvOffset\");d=w.getUniformLocation(O,\"uvScale\");e=w.getUniformLocation(O,\"rotation\");f=w.getUniformLocation(O,\"scale\");g=w.getUniformLocation(O,\"color\");h=w.getUniformLocation(O,\"map\");k=w.getUniformLocation(O,\"opacity\");m=w.getUniformLocation(O,\"modelViewMatrix\");q=w.getUniformLocation(O,\"projectionMatrix\");\nv=w.getUniformLocation(O,\"fogType\");p=w.getUniformLocation(O,\"fogDensity\");r=w.getUniformLocation(O,\"fogNear\");l=w.getUniformLocation(O,\"fogFar\");t=w.getUniformLocation(O,\"fogColor\");y=w.getUniformLocation(O,\"alphaTest\");ka=document.createElementNS(\"http://www.w3.org/1999/xhtml\",\"canvas\");ka.width=8;ka.height=8;P=ka.getContext(\"2d\");P.fillStyle=\"white\";P.fillRect(0,0,8,8);aa=new ba(ka);aa.needsUpdate=!0}w.useProgram(O);I.initAttributes();I.enableAttribute(x);I.enableAttribute(u);I.disableUnusedAttributes();\nI.disable(w.CULL_FACE);I.enable(w.BLEND);w.bindBuffer(w.ARRAY_BUFFER,W);w.vertexAttribPointer(x,2,w.FLOAT,!1,16,0);w.vertexAttribPointer(u,2,w.FLOAT,!1,16,8);w.bindBuffer(w.ELEMENT_ARRAY_BUFFER,D);w.uniformMatrix4fv(q,!1,Ya.projectionMatrix.elements);I.activeTexture(w.TEXTURE0);w.uniform1i(h,0);P=ka=0;(M=n.fog)?(w.uniform3f(t,M.color.r,M.color.g,M.color.b),M.isFog?(w.uniform1f(r,M.near),w.uniform1f(l,M.far),w.uniform1i(v,1),P=ka=1):M.isFogExp2&&(w.uniform1f(p,M.density),w.uniform1i(v,2),P=ka=2)):\n(w.uniform1i(v,0),P=ka=0);for(var M=0,V=b.length;M<V;M++){var pa=b[M];pa.modelViewMatrix.multiplyMatrices(Ya.matrixWorldInverse,pa.matrixWorld);pa.z=-pa.modelViewMatrix.elements[14]}b.sort(H);for(var S=[],M=0,V=b.length;M<V;M++){var pa=b[M],N=pa.material;if(!1!==N.visible){pa.onBeforeRender(a,n,Ya,void 0,N,void 0);w.uniform1f(y,N.alphaTest);w.uniformMatrix4fv(m,!1,pa.modelViewMatrix.elements);pa.matrixWorld.decompose(F,ja,T);S[0]=T.x;S[1]=T.y;var C=0;n.fog&&N.fog&&(C=P);ka!==C&&(w.uniform1i(v,C),\nka=C);null!==N.map?(w.uniform2f(c,N.map.offset.x,N.map.offset.y),w.uniform2f(d,N.map.repeat.x,N.map.repeat.y)):(w.uniform2f(c,0,0),w.uniform2f(d,1,1));w.uniform1f(k,N.opacity);w.uniform3f(g,N.color.r,N.color.g,N.color.b);w.uniform1f(e,N.rotation);w.uniform2fv(f,S);I.setBlending(N.blending,N.blendEquation,N.blendSrc,N.blendDst,N.blendEquationAlpha,N.blendSrcAlpha,N.blendDstAlpha,N.premultipliedAlpha);I.buffers.depth.setTest(N.depthTest);I.buffers.depth.setMask(N.depthWrite);N.map?a.setTexture2D(N.map,\n0):a.setTexture2D(aa,0);w.drawElements(w.TRIANGLES,6,w.UNSIGNED_SHORT,0);pa.onAfterRender(a,n,Ya,void 0,N,void 0)}}I.enable(w.CULL_FACE);a.resetGLState()}}}function U(){Object.defineProperty(this,\"id\",{value:Jf++});this.uuid=Y.generateUUID();this.name=\"\";this.type=\"Material\";this.lights=this.fog=!0;this.blending=1;this.side=0;this.shading=2;this.vertexColors=0;this.opacity=1;this.transparent=!1;this.blendSrc=204;this.blendDst=205;this.blendEquation=100;this.blendEquationAlpha=this.blendDstAlpha=this.blendSrcAlpha=\nnull;this.depthFunc=3;this.depthWrite=this.depthTest=!0;this.clippingPlanes=null;this.clipShadows=this.clipIntersection=!1;this.colorWrite=!0;this.precision=null;this.polygonOffset=!1;this.polygonOffsetUnits=this.polygonOffsetFactor=0;this.dithering=!1;this.alphaTest=0;this.premultipliedAlpha=!1;this.overdraw=0;this.needsUpdate=this.visible=!0}function ra(a){U.call(this);this.type=\"ShaderMaterial\";this.defines={};this.uniforms={};this.vertexShader=\"void main() {\\n\\tgl_Position = projectionMatrix * modelViewMatrix * vec4( position, 1.0 );\\n}\";\nthis.fragmentShader=\"void main() {\\n\\tgl_FragColor = vec4( 1.0, 0.0, 0.0, 1.0 );\\n}\";this.linewidth=1;this.wireframe=!1;this.wireframeLinewidth=1;this.morphNormals=this.morphTargets=this.skinning=this.clipping=this.lights=this.fog=!1;this.extensions={derivatives:!1,fragDepth:!1,drawBuffers:!1,shaderTextureLOD:!1};this.defaultAttributeValues={color:[1,1,1],uv:[0,0],uv2:[0,0]};this.index0AttributeName=void 0;void 0!==a&&(void 0!==a.attributes&&console.error(\"THREE.ShaderMaterial: attributes should now be defined in THREE.BufferGeometry instead.\"),\nthis.setValues(a))}function Za(a){U.call(this);this.type=\"MeshDepthMaterial\";this.depthPacking=3200;this.morphTargets=this.skinning=!1;this.displacementMap=this.alphaMap=this.map=null;this.displacementScale=1;this.displacementBias=0;this.wireframe=!1;this.wireframeLinewidth=1;this.lights=this.fog=!1;this.setValues(a)}function Ra(a,b){this.min=void 0!==a?a:new n(Infinity,Infinity,Infinity);this.max=void 0!==b?b:new n(-Infinity,-Infinity,-Infinity)}function Ea(a,b){this.center=void 0!==a?a:new n;this.radius=\nvoid 0!==b?b:0}function Ba(){this.elements=[1,0,0,0,1,0,0,0,1];0<arguments.length&&console.error(\"THREE.Matrix3: the constructor no longer reads arguments. use .set() instead.\")}function Aa(a,b){this.normal=void 0!==a?a:new n(1,0,0);this.constant=void 0!==b?b:0}function gd(a,b,c,d,e,f){this.planes=[void 0!==a?a:new Aa,void 0!==b?b:new Aa,void 0!==c?c:new Aa,void 0!==d?d:new Aa,void 0!==e?e:new Aa,void 0!==f?f:new Aa]}function Ie(a,b,c,d){function e(b,c,d,e){var f=b.geometry,g;g=t;var h=b.customDepthMaterial;\nd&&(g=y,h=b.customDistanceMaterial);h?g=h:(h=!1,c.morphTargets&&(f&&f.isBufferGeometry?h=f.morphAttributes&&f.morphAttributes.position&&0<f.morphAttributes.position.length:f&&f.isGeometry&&(h=f.morphTargets&&0<f.morphTargets.length)),b.isSkinnedMesh&&!1===c.skinning&&console.warn(\"THREE.WebGLShadowMap: THREE.SkinnedMesh with material.skinning set to false:\",b),b=b.isSkinnedMesh&&c.skinning,f=0,h&&(f|=1),b&&(f|=2),g=g[f]);a.localClippingEnabled&&!0===c.clipShadows&&0!==c.clippingPlanes.length&&(f=\ng.uuid,h=c.uuid,b=x[f],void 0===b&&(b={},x[f]=b),f=b[h],void 0===f&&(f=g.clone(),b[h]=f),g=f);g.visible=c.visible;g.wireframe=c.wireframe;h=c.side;F.renderSingleSided&&2==h&&(h=0);F.renderReverseSided&&(0===h?h=1:1===h&&(h=0));g.side=h;g.clipShadows=c.clipShadows;g.clippingPlanes=c.clippingPlanes;g.wireframeLinewidth=c.wireframeLinewidth;g.linewidth=c.linewidth;d&&void 0!==g.uniforms.lightPos&&g.uniforms.lightPos.value.copy(e);return g}function f(b,d,g,h){if(!1!==b.visible){if(b.layers.test(d.layers)&&\n(b.isMesh||b.isLine||b.isPoints)&&b.castShadow&&(!b.frustumCulled||k.intersectsObject(b))){b.modelViewMatrix.multiplyMatrices(g.matrixWorldInverse,b.matrixWorld);var m=c.update(b),p=b.material;if(Array.isArray(p))for(var q=m.groups,v=0,r=q.length;v<r;v++){var u=q[v],w=p[u.materialIndex];w&&w.visible&&(w=e(b,w,h,l),a.renderBufferDirect(g,null,m,w,b,u))}else p.visible&&(w=e(b,p,h,l),a.renderBufferDirect(g,null,m,w,b,null))}b=b.children;m=0;for(p=b.length;m<p;m++)f(b[m],d,g,h)}}var g=a.context,h=a.state,\nk=new gd,m=new K,q=b.shadows,v=new C,p=new C(d.maxTextureSize,d.maxTextureSize),r=new n,l=new n,t=Array(4),y=Array(4),x={},u=[new n(1,0,0),new n(-1,0,0),new n(0,0,1),new n(0,0,-1),new n(0,1,0),new n(0,-1,0)],H=[new n(0,1,0),new n(0,1,0),new n(0,1,0),new n(0,1,0),new n(0,0,1),new n(0,0,-1)],w=[new fa,new fa,new fa,new fa,new fa,new fa];b=new Za;b.depthPacking=3201;b.clipping=!0;d=$a.distanceRGBA;for(var I=Ca.clone(d.uniforms),W=0;4!==W;++W){var D=0!==(W&1),O=0!==(W&2),aa=b.clone();aa.morphTargets=\nD;aa.skinning=O;t[W]=aa;D=new ra({defines:{USE_SHADOWMAP:\"\"},uniforms:I,vertexShader:d.vertexShader,fragmentShader:d.fragmentShader,morphTargets:D,skinning:O,clipping:!0});y[W]=D}var F=this;this.enabled=!1;this.autoUpdate=!0;this.needsUpdate=!1;this.type=1;this.renderSingleSided=this.renderReverseSided=!0;this.render=function(b,c){if(!1!==F.enabled&&(!1!==F.autoUpdate||!1!==F.needsUpdate)&&0!==q.length){h.disable(g.BLEND);h.buffers.color.setClear(1,1,1,1);h.buffers.depth.setTest(!0);h.setScissorTest(!1);\nfor(var d,e=0,t=q.length;e<t;e++){var n=q[e];d=n.shadow;var y=n&&n.isPointLight;if(void 0===d)console.warn(\"THREE.WebGLShadowMap:\",n,\"has no shadow.\");else{var x=d.camera;v.copy(d.mapSize);v.min(p);if(y){var D=v.x,I=v.y;w[0].set(2*D,I,D,I);w[1].set(0,I,D,I);w[2].set(3*D,I,D,I);w[3].set(D,I,D,I);w[4].set(3*D,0,D,I);w[5].set(D,0,D,I);v.x*=4;v.y*=2}null===d.map&&(d.map=new Cb(v.x,v.y,{minFilter:1003,magFilter:1003,format:1023}),d.map.texture.name=n.name+\".shadowMap\",x.updateProjectionMatrix());d.isSpotLightShadow&&\nd.update(n);D=d.map;I=d.matrix;l.setFromMatrixPosition(n.matrixWorld);x.position.copy(l);y?(d=6,I.makeTranslation(-l.x,-l.y,-l.z)):(d=1,r.setFromMatrixPosition(n.target.matrixWorld),x.lookAt(r),x.updateMatrixWorld(),I.set(.5,0,0,.5,0,.5,0,.5,0,0,.5,.5,0,0,0,1),I.multiply(x.projectionMatrix),I.multiply(x.matrixWorldInverse));a.setRenderTarget(D);a.clear();for(n=0;n<d;n++)y&&(r.copy(x.position),r.add(u[n]),x.up.copy(H[n]),x.lookAt(r),x.updateMatrixWorld(),h.viewport(w[n])),m.multiplyMatrices(x.projectionMatrix,\nx.matrixWorldInverse),k.setFromMatrix(m),f(b,c,x,y)}}e=a.getClearColor();t=a.getClearAlpha();a.setClearColor(e,t);F.needsUpdate=!1}}}function Kf(a){var b={};return{get:function(a){a.isInterleavedBufferAttribute&&(a=a.data);return b[a.uuid]},remove:function(c){c.isInterleavedBufferAttribute&&(c=c.data);var d=b[c.uuid];d&&(a.deleteBuffer(d.buffer),delete b[c.uuid])},update:function(c,d){c.isInterleavedBufferAttribute&&(c=c.data);var e=b[c.uuid];if(void 0===e){var e=c.uuid,f=c,g=f.array,h=f.dynamic?\na.DYNAMIC_DRAW:a.STATIC_DRAW,k=a.createBuffer();a.bindBuffer(d,k);a.bufferData(d,g,h);f.onUploadCallback();h=a.FLOAT;g instanceof Float32Array?h=a.FLOAT:g instanceof Float64Array?console.warn(\"THREE.WebGLAttributes: Unsupported data buffer format: Float64Array.\"):g instanceof Uint16Array?h=a.UNSIGNED_SHORT:g instanceof Int16Array?h=a.SHORT:g instanceof Uint32Array?h=a.UNSIGNED_INT:g instanceof Int32Array?h=a.INT:g instanceof Int8Array?h=a.BYTE:g instanceof Uint8Array&&(h=a.UNSIGNED_BYTE);b[e]={buffer:k,\ntype:h,bytesPerElement:g.BYTES_PER_ELEMENT,version:f.version}}else e.version<c.version&&(f=c,g=f.array,k=f.updateRange,a.bindBuffer(d,e.buffer),!1===f.dynamic?a.bufferData(d,g,a.STATIC_DRAW):-1===k.count?a.bufferSubData(d,0,g):0===k.count?console.error(\"THREE.WebGLObjects.updateBuffer: dynamic THREE.BufferAttribute marked as needsUpdate but updateRange.count is 0, ensure you are using set methods or updating manually.\"):(a.bufferSubData(d,k.offset*g.BYTES_PER_ELEMENT,g.subarray(k.offset,k.offset+\nk.count)),k.count=-1),e.version=c.version)}}}function ab(a,b,c,d){this._x=a||0;this._y=b||0;this._z=c||0;this._order=d||ab.DefaultOrder}function Qd(){this.mask=1}function z(){Object.defineProperty(this,\"id\",{value:Lf++});this.uuid=Y.generateUUID();this.name=\"\";this.type=\"Object3D\";this.parent=null;this.children=[];this.up=z.DefaultUp.clone();var a=new n,b=new ab,c=new oa,d=new n(1,1,1);b.onChange(function(){c.setFromEuler(b,!1)});c.onChange(function(){b.setFromQuaternion(c,void 0,!1)});Object.defineProperties(this,\n{position:{enumerable:!0,value:a},rotation:{enumerable:!0,value:b},quaternion:{enumerable:!0,value:c},scale:{enumerable:!0,value:d},modelViewMatrix:{value:new K},normalMatrix:{value:new Ba}});this.matrix=new K;this.matrixWorld=new K;this.matrixAutoUpdate=z.DefaultMatrixAutoUpdate;this.matrixWorldNeedsUpdate=!1;this.layers=new Qd;this.visible=!0;this.receiveShadow=this.castShadow=!1;this.frustumCulled=!0;this.renderOrder=0;this.userData={}}function Na(){z.call(this);this.type=\"Camera\";this.matrixWorldInverse=\nnew K;this.projectionMatrix=new K}function Fb(a,b,c,d,e,f){Na.call(this);this.type=\"OrthographicCamera\";this.zoom=1;this.view=null;this.left=a;this.right=b;this.top=c;this.bottom=d;this.near=void 0!==e?e:.1;this.far=void 0!==f?f:2E3;this.updateProjectionMatrix()}function qa(a,b,c,d){Na.call(this);this.type=\"PerspectiveCamera\";this.fov=void 0!==a?a:50;this.zoom=1;this.near=void 0!==c?c:.1;this.far=void 0!==d?d:2E3;this.focus=10;this.aspect=void 0!==b?b:1;this.view=null;this.filmGauge=35;this.filmOffset=\n0;this.updateProjectionMatrix()}function Sa(a,b,c,d,e,f){this.a=a;this.b=b;this.c=c;this.normal=d&&d.isVector3?d:new n;this.vertexNormals=Array.isArray(d)?d:[];this.color=e&&e.isColor?e:new G;this.vertexColors=Array.isArray(e)?e:[];this.materialIndex=void 0!==f?f:0}function J(){Object.defineProperty(this,\"id\",{value:Rd++});this.uuid=Y.generateUUID();this.name=\"\";this.type=\"Geometry\";this.vertices=[];this.colors=[];this.faces=[];this.faceVertexUvs=[[]];this.morphTargets=[];this.morphNormals=[];this.skinWeights=\n[];this.skinIndices=[];this.lineDistances=[];this.boundingSphere=this.boundingBox=null;this.groupsNeedUpdate=this.lineDistancesNeedUpdate=this.colorsNeedUpdate=this.normalsNeedUpdate=this.uvsNeedUpdate=this.verticesNeedUpdate=this.elementsNeedUpdate=!1}function Z(a,b,c){if(Array.isArray(a))throw new TypeError(\"THREE.BufferAttribute: array should be a Typed Array.\");this.uuid=Y.generateUUID();this.name=\"\";this.array=a;this.itemSize=b;this.count=void 0!==a?a.length/b:0;this.normalized=!0===c;this.dynamic=\n!1;this.updateRange={offset:0,count:-1};this.onUploadCallback=function(){};this.version=0}function pc(a,b){Z.call(this,new Int8Array(a),b)}function qc(a,b){Z.call(this,new Uint8Array(a),b)}function rc(a,b){Z.call(this,new Uint8ClampedArray(a),b)}function sc(a,b){Z.call(this,new Int16Array(a),b)}function gb(a,b){Z.call(this,new Uint16Array(a),b)}function tc(a,b){Z.call(this,new Int32Array(a),b)}function hb(a,b){Z.call(this,new Uint32Array(a),b)}function B(a,b){Z.call(this,new Float32Array(a),b)}function uc(a,\nb){Z.call(this,new Float64Array(a),b)}function Je(){this.indices=[];this.vertices=[];this.normals=[];this.colors=[];this.uvs=[];this.uvs2=[];this.groups=[];this.morphTargets={};this.skinWeights=[];this.skinIndices=[];this.boundingSphere=this.boundingBox=null;this.groupsNeedUpdate=this.uvsNeedUpdate=this.colorsNeedUpdate=this.normalsNeedUpdate=this.verticesNeedUpdate=!1}function Sd(a){if(0===a.length)return-Infinity;for(var b=a[0],c=1,d=a.length;c<d;++c)a[c]>b&&(b=a[c]);return b}function E(){Object.defineProperty(this,\n\"id\",{value:Rd++});this.uuid=Y.generateUUID();this.name=\"\";this.type=\"BufferGeometry\";this.index=null;this.attributes={};this.morphAttributes={};this.groups=[];this.boundingSphere=this.boundingBox=null;this.drawRange={start:0,count:Infinity}}function Gb(a,b,c,d,e,f){J.call(this);this.type=\"BoxGeometry\";this.parameters={width:a,height:b,depth:c,widthSegments:d,heightSegments:e,depthSegments:f};this.fromBufferGeometry(new ib(a,b,c,d,e,f));this.mergeVertices()}function ib(a,b,c,d,e,f){function g(a,b,\nc,d,e,f,g,l,W,D,O){var aa=f/W,F=g/D,ja=f/2,T=g/2,C=l/2;g=W+1;var B=D+1,z=f=0,P,M,V=new n;for(M=0;M<B;M++){var pa=M*F-T;for(P=0;P<g;P++)V[a]=(P*aa-ja)*d,V[b]=pa*e,V[c]=C,m.push(V.x,V.y,V.z),V[a]=0,V[b]=0,V[c]=0<l?1:-1,q.push(V.x,V.y,V.z),v.push(P/W),v.push(1-M/D),f+=1}for(M=0;M<D;M++)for(P=0;P<W;P++)a=p+P+g*(M+1),b=p+(P+1)+g*(M+1),c=p+(P+1)+g*M,k.push(p+P+g*M,a,c),k.push(a,b,c),z+=6;h.addGroup(r,z,O);r+=z;p+=f}E.call(this);this.type=\"BoxBufferGeometry\";this.parameters={width:a,height:b,depth:c,widthSegments:d,\nheightSegments:e,depthSegments:f};var h=this;d=Math.floor(d)||1;e=Math.floor(e)||1;f=Math.floor(f)||1;var k=[],m=[],q=[],v=[],p=0,r=0;g(\"z\",\"y\",\"x\",-1,-1,c,b,a,f,e,0);g(\"z\",\"y\",\"x\",1,-1,c,b,-a,f,e,1);g(\"x\",\"z\",\"y\",1,1,a,c,b,d,f,2);g(\"x\",\"z\",\"y\",1,-1,a,c,-b,d,f,3);g(\"x\",\"y\",\"z\",1,-1,a,b,c,d,e,4);g(\"x\",\"y\",\"z\",-1,-1,a,b,-c,d,e,5);this.setIndex(k);this.addAttribute(\"position\",new B(m,3));this.addAttribute(\"normal\",new B(q,3));this.addAttribute(\"uv\",new B(v,2))}function vc(a,b,c,d){J.call(this);this.type=\n\"PlaneGeometry\";this.parameters={width:a,height:b,widthSegments:c,heightSegments:d};this.fromBufferGeometry(new jb(a,b,c,d));this.mergeVertices()}function jb(a,b,c,d){E.call(this);this.type=\"PlaneBufferGeometry\";this.parameters={width:a,height:b,widthSegments:c,heightSegments:d};var e=a/2,f=b/2;c=Math.floor(c)||1;d=Math.floor(d)||1;var g=c+1,h=d+1,k=a/c,m=b/d,q=[],v=[],p=[],r=[];for(a=0;a<h;a++){var l=a*m-f;for(b=0;b<g;b++)v.push(b*k-e,-l,0),p.push(0,0,1),r.push(b/c),r.push(1-a/d)}for(a=0;a<d;a++)for(b=\n0;b<c;b++)e=b+g*(a+1),f=b+1+g*(a+1),h=b+1+g*a,q.push(b+g*a,e,h),q.push(e,f,h);this.setIndex(q);this.addAttribute(\"position\",new B(v,3));this.addAttribute(\"normal\",new B(p,3));this.addAttribute(\"uv\",new B(r,2))}function ya(a){U.call(this);this.type=\"MeshBasicMaterial\";this.color=new G(16777215);this.lightMap=this.map=null;this.lightMapIntensity=1;this.aoMap=null;this.aoMapIntensity=1;this.envMap=this.alphaMap=this.specularMap=null;this.combine=0;this.reflectivity=1;this.refractionRatio=.98;this.wireframe=\n!1;this.wireframeLinewidth=1;this.wireframeLinejoin=this.wireframeLinecap=\"round\";this.lights=this.morphTargets=this.skinning=!1;this.setValues(a)}function kb(a,b){this.origin=void 0!==a?a:new n;this.direction=void 0!==b?b:new n}function Hb(a,b){this.start=void 0!==a?a:new n;this.end=void 0!==b?b:new n}function Ta(a,b,c){this.a=void 0!==a?a:new n;this.b=void 0!==b?b:new n;this.c=void 0!==c?c:new n}function la(a,b){z.call(this);this.type=\"Mesh\";this.geometry=void 0!==a?a:new E;this.material=void 0!==\nb?b:new ya({color:16777215*Math.random()});this.drawMode=0;this.updateMorphTargets()}function Mf(a,b,c,d){function e(a,c){b.buffers.color.setClear(a.r,a.g,a.b,c,d)}var f=new G(0),g=0,h,k,m,q;return{getClearColor:function(){return f},setClearColor:function(a,b){f.set(a);g=void 0!==b?b:1;e(f,g)},getClearAlpha:function(){return g},setClearAlpha:function(a){g=a;e(f,g)},render:function(b,d,r){b=b.background;null===b?e(f,g):b&&b.isColor&&(e(b,1),r=!0);(a.autoClear||r)&&a.clear(a.autoClearColor,a.autoClearDepth,\na.autoClearStencil);b&&b.isCubeTexture?(void 0===m&&(m=new qa,q=new la(new ib(5,5,5),new ra({uniforms:$a.cube.uniforms,vertexShader:$a.cube.vertexShader,fragmentShader:$a.cube.fragmentShader,side:1,depthTest:!1,depthWrite:!1,fog:!1}))),m.projectionMatrix.copy(d.projectionMatrix),m.matrixWorld.extractRotation(d.matrixWorld),m.matrixWorldInverse.getInverse(m.matrixWorld),q.material.uniforms.tCube.value=b,q.modelViewMatrix.multiplyMatrices(m.matrixWorldInverse,q.matrixWorld),c.update(q),a.renderBufferDirect(m,\nnull,q.geometry,q.material,q,null)):b&&b.isTexture&&(void 0===h&&(h=new Fb(-1,1,1,-1,0,1),k=new la(new jb(2,2),new ya({depthTest:!1,depthWrite:!1,fog:!1}))),k.material.map=b,c.update(k),a.renderBufferDirect(h,null,k.geometry,k.material,k,null))}}}function Nf(a,b){return a.renderOrder!==b.renderOrder?a.renderOrder-b.renderOrder:a.program&&b.program&&a.program!==b.program?a.program.id-b.program.id:a.material.id!==b.material.id?a.material.id-b.material.id:a.z!==b.z?a.z-b.z:a.id-b.id}function Of(a,b){return a.renderOrder!==\nb.renderOrder?a.renderOrder-b.renderOrder:a.z!==b.z?b.z-a.z:a.id-b.id}function Pf(){var a=[],b=-1,c=[],d=-1;return{opaque:a,transparent:c,init:function(){d=b=-1},push:function(e,f,g,h,k){var m,q;g.transparent?(m=c,q=++d):(m=a,q=++b);(q=m[q])?(q.id=e.id,q.object=e,q.geometry=f,q.material=g,q.program=g.program,q.renderOrder=e.renderOrder,q.z=h,q.group=k):(q={id:e.id,object:e,geometry:f,material:g,program:g.program,renderOrder:e.renderOrder,z:h,group:k},m.push(q))},finish:function(){a.length=b+1;c.length=\nd+1},sort:function(){a.sort(Nf);c.sort(Of)}}}function Qf(){var a={};return{get:function(b,c){var d=b.id+\",\"+c.id,e=a[d];void 0===e&&(e=new Pf,a[d]=e);return e},dispose:function(){a={}}}}function Rf(a,b,c){var d,e,f;this.setMode=function(a){d=a};this.setIndex=function(a){e=a.type;f=a.bytesPerElement};this.render=function(b,h){a.drawElements(d,h,e,b*f);c.calls++;c.vertices+=h;d===a.TRIANGLES&&(c.faces+=h/3)};this.renderInstances=function(g,h,k){var m=b.get(\"ANGLE_instanced_arrays\");null===m?console.error(\"THREE.WebGLIndexedBufferRenderer: using THREE.InstancedBufferGeometry but hardware does not support extension ANGLE_instanced_arrays.\"):\n(m.drawElementsInstancedANGLE(d,k,e,h*f,g.maxInstancedCount),c.calls++,c.vertices+=k*g.maxInstancedCount,d===a.TRIANGLES&&(c.faces+=g.maxInstancedCount*k/3))}}function Sf(a,b,c){var d;this.setMode=function(a){d=a};this.render=function(b,f){a.drawArrays(d,b,f);c.calls++;c.vertices+=f;d===a.TRIANGLES&&(c.faces+=f/3)};this.renderInstances=function(e,f,g){var h=b.get(\"ANGLE_instanced_arrays\");if(null===h)console.error(\"THREE.WebGLBufferRenderer: using THREE.InstancedBufferGeometry but hardware does not support extension ANGLE_instanced_arrays.\");\nelse{var k=e.attributes.position;k.isInterleavedBufferAttribute?(g=k.data.count,h.drawArraysInstancedANGLE(d,0,g,e.maxInstancedCount)):h.drawArraysInstancedANGLE(d,f,g,e.maxInstancedCount);c.calls++;c.vertices+=g*e.maxInstancedCount;d===a.TRIANGLES&&(c.faces+=e.maxInstancedCount*g/3)}}}function Tf(a,b,c){function d(a){a=a.target;var h=e[a.id];null!==h.index&&b.remove(h.index);for(var k in h.attributes)b.remove(h.attributes[k]);a.removeEventListener(\"dispose\",d);delete e[a.id];if(k=f[a.id])b.remove(k),\ndelete f[a.id];if(k=f[h.id])b.remove(k),delete f[h.id];c.geometries--}var e={},f={};return{get:function(a,b){var f=e[b.id];if(f)return f;b.addEventListener(\"dispose\",d);b.isBufferGeometry?f=b:b.isGeometry&&(void 0===b._bufferGeometry&&(b._bufferGeometry=(new E).setFromObject(a)),f=b._bufferGeometry);e[b.id]=f;c.geometries++;return f},update:function(c){var d=c.index,e=c.attributes;null!==d&&b.update(d,a.ELEMENT_ARRAY_BUFFER);for(var f in e)b.update(e[f],a.ARRAY_BUFFER);c=c.morphAttributes;for(f in c)for(var d=\nc[f],e=0,q=d.length;e<q;e++)b.update(d[e],a.ARRAY_BUFFER)},getWireframeAttribute:function(c){var d=f[c.id];if(d)return d;var d=[],e=c.index,m=c.attributes;if(null!==e)for(var e=e.array,m=0,q=e.length;m<q;m+=3){var v=e[m+0],p=e[m+1],r=e[m+2];d.push(v,p,p,r,r,v)}else for(e=m.position.array,m=0,q=e.length/3-1;m<q;m+=3)v=m+0,p=m+1,r=m+2,d.push(v,p,p,r,r,v);d=new (65535<Sd(d)?hb:gb)(d,1);b.update(d,a.ELEMENT_ARRAY_BUFFER);return f[c.id]=d}}}function Uf(){var a={};return{get:function(b){if(void 0!==a[b.id])return a[b.id];\nvar c;switch(b.type){case \"DirectionalLight\":c={direction:new n,color:new G,shadow:!1,shadowBias:0,shadowRadius:1,shadowMapSize:new C};break;case \"SpotLight\":c={position:new n,direction:new n,color:new G,distance:0,coneCos:0,penumbraCos:0,decay:0,shadow:!1,shadowBias:0,shadowRadius:1,shadowMapSize:new C};break;case \"PointLight\":c={position:new n,color:new G,distance:0,decay:0,shadow:!1,shadowBias:0,shadowRadius:1,shadowMapSize:new C};break;case \"HemisphereLight\":c={direction:new n,skyColor:new G,\ngroundColor:new G};break;case \"RectAreaLight\":c={color:new G,position:new n,halfWidth:new n,halfHeight:new n}}return a[b.id]=c}}}function Vf(a,b,c){var d={};return{update:function(a){var f=c.frame,g=a.geometry,h=b.get(a,g);d[h.id]!==f&&(g.isGeometry&&h.updateFromObject(a),b.update(h),d[h.id]=f);return h},clear:function(){d={}}}}function Wf(a){a=a.split(\"\\n\");for(var b=0;b<a.length;b++)a[b]=b+1+\": \"+a[b];return a.join(\"\\n\")}function Ke(a,b,c){var d=a.createShader(b);a.shaderSource(d,c);a.compileShader(d);\n!1===a.getShaderParameter(d,a.COMPILE_STATUS)&&console.error(\"THREE.WebGLShader: Shader couldn't compile.\");\"\"!==a.getShaderInfoLog(d)&&console.warn(\"THREE.WebGLShader: gl.getShaderInfoLog()\",b===a.VERTEX_SHADER?\"vertex\":\"fragment\",a.getShaderInfoLog(d),Wf(c));return d}function Le(a){switch(a){case 3E3:return[\"Linear\",\"( value )\"];case 3001:return[\"sRGB\",\"( value )\"];case 3002:return[\"RGBE\",\"( value )\"];case 3004:return[\"RGBM\",\"( value, 7.0 )\"];case 3005:return[\"RGBM\",\"( value, 16.0 )\"];case 3006:return[\"RGBD\",\n\"( value, 256.0 )\"];case 3007:return[\"Gamma\",\"( value, float( GAMMA_FACTOR ) )\"];default:throw Error(\"unsupported encoding: \"+a);}}function Td(a,b){var c=Le(b);return\"vec4 \"+a+\"( vec4 value ) { return \"+c[0]+\"ToLinear\"+c[1]+\"; }\"}function Xf(a,b){var c=Le(b);return\"vec4 \"+a+\"( vec4 value ) { return LinearTo\"+c[0]+c[1]+\"; }\"}function Yf(a,b){var c;switch(b){case 1:c=\"Linear\";break;case 2:c=\"Reinhard\";break;case 3:c=\"Uncharted2\";break;case 4:c=\"OptimizedCineon\";break;default:throw Error(\"unsupported toneMapping: \"+\nb);}return\"vec3 \"+a+\"( vec3 color ) { return \"+c+\"ToneMapping( color ); }\"}function Zf(a,b,c){a=a||{};return[a.derivatives||b.envMapCubeUV||b.bumpMap||b.normalMap||b.flatShading?\"#extension GL_OES_standard_derivatives : enable\":\"\",(a.fragDepth||b.logarithmicDepthBuffer)&&c.get(\"EXT_frag_depth\")?\"#extension GL_EXT_frag_depth : enable\":\"\",a.drawBuffers&&c.get(\"WEBGL_draw_buffers\")?\"#extension GL_EXT_draw_buffers : require\":\"\",(a.shaderTextureLOD||b.envMap)&&c.get(\"EXT_shader_texture_lod\")?\"#extension GL_EXT_shader_texture_lod : enable\":\n\"\"].filter(wc).join(\"\\n\")}function $f(a){var b=[],c;for(c in a){var d=a[c];!1!==d&&b.push(\"#define \"+c+\" \"+d)}return b.join(\"\\n\")}function wc(a){return\"\"!==a}function Me(a,b){return a.replace(/NUM_DIR_LIGHTS/g,b.numDirLights).replace(/NUM_SPOT_LIGHTS/g,b.numSpotLights).replace(/NUM_RECT_AREA_LIGHTS/g,b.numRectAreaLights).replace(/NUM_POINT_LIGHTS/g,b.numPointLights).replace(/NUM_HEMI_LIGHTS/g,b.numHemiLights)}function Ud(a){return a.replace(/^[ \\t]*#include +<([\\w\\d.]+)>/gm,function(a,c){var d=X[c];\nif(void 0===d)throw Error(\"Can not resolve #include <\"+c+\">\");return Ud(d)})}function Ne(a){return a.replace(/for \\( int i \\= (\\d+)\\; i < (\\d+)\\; i \\+\\+ \\) \\{([\\s\\S]+?)(?=\\})\\}/g,function(a,c,d,e){a=\"\";for(c=parseInt(c);c<parseInt(d);c++)a+=e.replace(/\\[ i \\]/g,\"[ \"+c+\" ]\");return a})}function ag(a,b,c,d,e){var f=a.context,g=c.extensions,h=c.defines,k=d.vertexShader,m=d.fragmentShader,q=\"SHADOWMAP_TYPE_BASIC\";1===e.shadowMapType?q=\"SHADOWMAP_TYPE_PCF\":2===e.shadowMapType&&(q=\"SHADOWMAP_TYPE_PCF_SOFT\");\nvar v=\"ENVMAP_TYPE_CUBE\",p=\"ENVMAP_MODE_REFLECTION\",r=\"ENVMAP_BLENDING_MULTIPLY\";if(e.envMap){switch(c.envMap.mapping){case 301:case 302:v=\"ENVMAP_TYPE_CUBE\";break;case 306:case 307:v=\"ENVMAP_TYPE_CUBE_UV\";break;case 303:case 304:v=\"ENVMAP_TYPE_EQUIREC\";break;case 305:v=\"ENVMAP_TYPE_SPHERE\"}switch(c.envMap.mapping){case 302:case 304:p=\"ENVMAP_MODE_REFRACTION\"}switch(c.combine){case 0:r=\"ENVMAP_BLENDING_MULTIPLY\";break;case 1:r=\"ENVMAP_BLENDING_MIX\";break;case 2:r=\"ENVMAP_BLENDING_ADD\"}}var l=0<a.gammaFactor?\na.gammaFactor:1,g=Zf(g,e,a.extensions),t=$f(h),n=f.createProgram();c.isRawShaderMaterial?(h=[t,\"\\n\"].filter(wc).join(\"\\n\"),d=[g,t,\"\\n\"].filter(wc).join(\"\\n\")):(h=[\"precision \"+e.precision+\" float;\",\"precision \"+e.precision+\" int;\",\"#define SHADER_NAME \"+d.name,t,e.supportsVertexTextures?\"#define VERTEX_TEXTURES\":\"\",\"#define GAMMA_FACTOR \"+l,\"#define MAX_BONES \"+e.maxBones,e.useFog&&e.fog?\"#define USE_FOG\":\"\",e.useFog&&e.fogExp?\"#define FOG_EXP2\":\"\",e.map?\"#define USE_MAP\":\"\",e.envMap?\"#define USE_ENVMAP\":\n\"\",e.envMap?\"#define \"+p:\"\",e.lightMap?\"#define USE_LIGHTMAP\":\"\",e.aoMap?\"#define USE_AOMAP\":\"\",e.emissiveMap?\"#define USE_EMISSIVEMAP\":\"\",e.bumpMap?\"#define USE_BUMPMAP\":\"\",e.normalMap?\"#define USE_NORMALMAP\":\"\",e.displacementMap&&e.supportsVertexTextures?\"#define USE_DISPLACEMENTMAP\":\"\",e.specularMap?\"#define USE_SPECULARMAP\":\"\",e.roughnessMap?\"#define USE_ROUGHNESSMAP\":\"\",e.metalnessMap?\"#define USE_METALNESSMAP\":\"\",e.alphaMap?\"#define USE_ALPHAMAP\":\"\",e.vertexColors?\"#define USE_COLOR\":\"\",e.flatShading?\n\"#define FLAT_SHADED\":\"\",e.skinning?\"#define USE_SKINNING\":\"\",e.useVertexTexture?\"#define BONE_TEXTURE\":\"\",e.morphTargets?\"#define USE_MORPHTARGETS\":\"\",e.morphNormals&&!1===e.flatShading?\"#define USE_MORPHNORMALS\":\"\",e.doubleSided?\"#define DOUBLE_SIDED\":\"\",e.flipSided?\"#define FLIP_SIDED\":\"\",\"#define NUM_CLIPPING_PLANES \"+e.numClippingPlanes,e.shadowMapEnabled?\"#define USE_SHADOWMAP\":\"\",e.shadowMapEnabled?\"#define \"+q:\"\",e.sizeAttenuation?\"#define USE_SIZEATTENUATION\":\"\",e.logarithmicDepthBuffer?\n\"#define USE_LOGDEPTHBUF\":\"\",e.logarithmicDepthBuffer&&a.extensions.get(\"EXT_frag_depth\")?\"#define USE_LOGDEPTHBUF_EXT\":\"\",\"uniform mat4 modelMatrix;\",\"uniform mat4 modelViewMatrix;\",\"uniform mat4 projectionMatrix;\",\"uniform mat4 viewMatrix;\",\"uniform mat3 normalMatrix;\",\"uniform vec3 cameraPosition;\",\"attribute vec3 position;\",\"attribute vec3 normal;\",\"attribute vec2 uv;\",\"#ifdef USE_COLOR\",\"\\tattribute vec3 color;\",\"#endif\",\"#ifdef USE_MORPHTARGETS\",\"\\tattribute vec3 morphTarget0;\",\"\\tattribute vec3 morphTarget1;\",\n\"\\tattribute vec3 morphTarget2;\",\"\\tattribute vec3 morphTarget3;\",\"\\t#ifdef USE_MORPHNORMALS\",\"\\t\\tattribute vec3 morphNormal0;\",\"\\t\\tattribute vec3 morphNormal1;\",\"\\t\\tattribute vec3 morphNormal2;\",\"\\t\\tattribute vec3 morphNormal3;\",\"\\t#else\",\"\\t\\tattribute vec3 morphTarget4;\",\"\\t\\tattribute vec3 morphTarget5;\",\"\\t\\tattribute vec3 morphTarget6;\",\"\\t\\tattribute vec3 morphTarget7;\",\"\\t#endif\",\"#endif\",\"#ifdef USE_SKINNING\",\"\\tattribute vec4 skinIndex;\",\"\\tattribute vec4 skinWeight;\",\"#endif\",\"\\n\"].filter(wc).join(\"\\n\"),\nd=[g,\"precision \"+e.precision+\" float;\",\"precision \"+e.precision+\" int;\",\"#define SHADER_NAME \"+d.name,t,e.alphaTest?\"#define ALPHATEST \"+e.alphaTest:\"\",\"#define GAMMA_FACTOR \"+l,e.useFog&&e.fog?\"#define USE_FOG\":\"\",e.useFog&&e.fogExp?\"#define FOG_EXP2\":\"\",e.map?\"#define USE_MAP\":\"\",e.envMap?\"#define USE_ENVMAP\":\"\",e.envMap?\"#define \"+v:\"\",e.envMap?\"#define \"+p:\"\",e.envMap?\"#define \"+r:\"\",e.lightMap?\"#define USE_LIGHTMAP\":\"\",e.aoMap?\"#define USE_AOMAP\":\"\",e.emissiveMap?\"#define USE_EMISSIVEMAP\":\"\",\ne.bumpMap?\"#define USE_BUMPMAP\":\"\",e.normalMap?\"#define USE_NORMALMAP\":\"\",e.specularMap?\"#define USE_SPECULARMAP\":\"\",e.roughnessMap?\"#define USE_ROUGHNESSMAP\":\"\",e.metalnessMap?\"#define USE_METALNESSMAP\":\"\",e.alphaMap?\"#define USE_ALPHAMAP\":\"\",e.vertexColors?\"#define USE_COLOR\":\"\",e.gradientMap?\"#define USE_GRADIENTMAP\":\"\",e.flatShading?\"#define FLAT_SHADED\":\"\",e.doubleSided?\"#define DOUBLE_SIDED\":\"\",e.flipSided?\"#define FLIP_SIDED\":\"\",\"#define NUM_CLIPPING_PLANES \"+e.numClippingPlanes,\"#define UNION_CLIPPING_PLANES \"+\n(e.numClippingPlanes-e.numClipIntersection),e.shadowMapEnabled?\"#define USE_SHADOWMAP\":\"\",e.shadowMapEnabled?\"#define \"+q:\"\",e.premultipliedAlpha?\"#define PREMULTIPLIED_ALPHA\":\"\",e.physicallyCorrectLights?\"#define PHYSICALLY_CORRECT_LIGHTS\":\"\",e.logarithmicDepthBuffer?\"#define USE_LOGDEPTHBUF\":\"\",e.logarithmicDepthBuffer&&a.extensions.get(\"EXT_frag_depth\")?\"#define USE_LOGDEPTHBUF_EXT\":\"\",e.envMap&&a.extensions.get(\"EXT_shader_texture_lod\")?\"#define TEXTURE_LOD_EXT\":\"\",\"uniform mat4 viewMatrix;\",\n\"uniform vec3 cameraPosition;\",0!==e.toneMapping?\"#define TONE_MAPPING\":\"\",0!==e.toneMapping?X.tonemapping_pars_fragment:\"\",0!==e.toneMapping?Yf(\"toneMapping\",e.toneMapping):\"\",e.dithering?\"#define DITHERING\":\"\",e.outputEncoding||e.mapEncoding||e.envMapEncoding||e.emissiveMapEncoding?X.encodings_pars_fragment:\"\",e.mapEncoding?Td(\"mapTexelToLinear\",e.mapEncoding):\"\",e.envMapEncoding?Td(\"envMapTexelToLinear\",e.envMapEncoding):\"\",e.emissiveMapEncoding?Td(\"emissiveMapTexelToLinear\",e.emissiveMapEncoding):\n\"\",e.outputEncoding?Xf(\"linearToOutputTexel\",e.outputEncoding):\"\",e.depthPacking?\"#define DEPTH_PACKING \"+c.depthPacking:\"\",\"\\n\"].filter(wc).join(\"\\n\"));k=Ud(k);k=Me(k,e);m=Ud(m);m=Me(m,e);c.isShaderMaterial||(k=Ne(k),m=Ne(m));m=d+m;k=Ke(f,f.VERTEX_SHADER,h+k);m=Ke(f,f.FRAGMENT_SHADER,m);f.attachShader(n,k);f.attachShader(n,m);void 0!==c.index0AttributeName?f.bindAttribLocation(n,0,c.index0AttributeName):!0===e.morphTargets&&f.bindAttribLocation(n,0,\"position\");f.linkProgram(n);e=f.getProgramInfoLog(n);\nq=f.getShaderInfoLog(k);v=f.getShaderInfoLog(m);r=p=!0;if(!1===f.getProgramParameter(n,f.LINK_STATUS))p=!1,console.error(\"THREE.WebGLProgram: shader error: \",f.getError(),\"gl.VALIDATE_STATUS\",f.getProgramParameter(n,f.VALIDATE_STATUS),\"gl.getProgramInfoLog\",e,q,v);else if(\"\"!==e)console.warn(\"THREE.WebGLProgram: gl.getProgramInfoLog()\",e);else if(\"\"===q||\"\"===v)r=!1;r&&(this.diagnostics={runnable:p,material:c,programLog:e,vertexShader:{log:q,prefix:h},fragmentShader:{log:v,prefix:d}});f.deleteShader(k);\nf.deleteShader(m);var x;this.getUniforms=function(){void 0===x&&(x=new eb(f,n,a));return x};var u;this.getAttributes=function(){if(void 0===u){for(var a={},b=f.getProgramParameter(n,f.ACTIVE_ATTRIBUTES),c=0;c<b;c++){var d=f.getActiveAttrib(n,c).name;a[d]=f.getAttribLocation(n,d)}u=a}return u};this.destroy=function(){f.deleteProgram(n);this.program=void 0};Object.defineProperties(this,{uniforms:{get:function(){console.warn(\"THREE.WebGLProgram: .uniforms is now .getUniforms().\");return this.getUniforms()}},\nattributes:{get:function(){console.warn(\"THREE.WebGLProgram: .attributes is now .getAttributes().\");return this.getAttributes()}}});this.id=bg++;this.code=b;this.usedTimes=1;this.program=n;this.vertexShader=k;this.fragmentShader=m;return this}function cg(a,b){function c(a,b){var c;a?a.isTexture?c=a.encoding:a.isWebGLRenderTarget&&(console.warn(\"THREE.WebGLPrograms.getTextureEncodingFromMap: don't use render targets as textures. Use their .texture property instead.\"),c=a.texture.encoding):c=3E3;3E3===\nc&&b&&(c=3007);return c}var d=[],e={MeshDepthMaterial:\"depth\",MeshNormalMaterial:\"normal\",MeshBasicMaterial:\"basic\",MeshLambertMaterial:\"lambert\",MeshPhongMaterial:\"phong\",MeshToonMaterial:\"phong\",MeshStandardMaterial:\"physical\",MeshPhysicalMaterial:\"physical\",LineBasicMaterial:\"basic\",LineDashedMaterial:\"dashed\",PointsMaterial:\"points\"},f=\"precision supportsVertexTextures map mapEncoding envMap envMapMode envMapEncoding lightMap aoMap emissiveMap emissiveMapEncoding bumpMap normalMap displacementMap specularMap roughnessMap metalnessMap gradientMap alphaMap combine vertexColors fog useFog fogExp flatShading sizeAttenuation logarithmicDepthBuffer skinning maxBones useVertexTexture morphTargets morphNormals maxMorphTargets maxMorphNormals premultipliedAlpha numDirLights numPointLights numSpotLights numHemiLights numRectAreaLights shadowMapEnabled shadowMapType toneMapping physicallyCorrectLights alphaTest doubleSided flipSided numClippingPlanes numClipIntersection depthPacking dithering\".split(\" \");\nthis.getParameters=function(d,f,k,m,q,v){var p=e[d.type],r;if(v.isSkinnedMesh)if(r=v.skeleton.bones,b.floatVertexTextures)r=1024;else{var l=Math.min(Math.floor((b.maxVertexUniforms-20)/4),r.length);l<r.length?(console.warn(\"THREE.WebGLRenderer: Skeleton has \"+r.length+\" bones. This GPU supports \"+l+\".\"),r=0):r=l}else r=0;l=a.getPrecision();null!==d.precision&&(l=b.getMaxPrecision(d.precision),l!==d.precision&&console.warn(\"THREE.WebGLProgram.getParameters:\",d.precision,\"not supported, using\",l,\"instead.\"));\nvar t=a.getRenderTarget();return{shaderID:p,precision:l,supportsVertexTextures:b.vertexTextures,outputEncoding:c(t?t.texture:null,a.gammaOutput),map:!!d.map,mapEncoding:c(d.map,a.gammaInput),envMap:!!d.envMap,envMapMode:d.envMap&&d.envMap.mapping,envMapEncoding:c(d.envMap,a.gammaInput),envMapCubeUV:!!d.envMap&&(306===d.envMap.mapping||307===d.envMap.mapping),lightMap:!!d.lightMap,aoMap:!!d.aoMap,emissiveMap:!!d.emissiveMap,emissiveMapEncoding:c(d.emissiveMap,a.gammaInput),bumpMap:!!d.bumpMap,normalMap:!!d.normalMap,\ndisplacementMap:!!d.displacementMap,roughnessMap:!!d.roughnessMap,metalnessMap:!!d.metalnessMap,specularMap:!!d.specularMap,alphaMap:!!d.alphaMap,gradientMap:!!d.gradientMap,combine:d.combine,vertexColors:d.vertexColors,fog:!!k,useFog:d.fog,fogExp:k&&k.isFogExp2,flatShading:1===d.shading,sizeAttenuation:d.sizeAttenuation,logarithmicDepthBuffer:b.logarithmicDepthBuffer,skinning:d.skinning&&0<r,maxBones:r,useVertexTexture:b.floatVertexTextures,morphTargets:d.morphTargets,morphNormals:d.morphNormals,\nmaxMorphTargets:a.maxMorphTargets,maxMorphNormals:a.maxMorphNormals,numDirLights:f.directional.length,numPointLights:f.point.length,numSpotLights:f.spot.length,numRectAreaLights:f.rectArea.length,numHemiLights:f.hemi.length,numClippingPlanes:m,numClipIntersection:q,dithering:d.dithering,shadowMapEnabled:a.shadowMap.enabled&&v.receiveShadow&&0<f.shadows.length,shadowMapType:a.shadowMap.type,toneMapping:a.toneMapping,physicallyCorrectLights:a.physicallyCorrectLights,premultipliedAlpha:d.premultipliedAlpha,\nalphaTest:d.alphaTest,doubleSided:2===d.side,flipSided:1===d.side,depthPacking:void 0!==d.depthPacking?d.depthPacking:!1}};this.getProgramCode=function(b,c){var d=[];c.shaderID?d.push(c.shaderID):(d.push(b.fragmentShader),d.push(b.vertexShader));if(void 0!==b.defines)for(var e in b.defines)d.push(e),d.push(b.defines[e]);for(e=0;e<f.length;e++)d.push(c[f[e]]);d.push(b.onBeforeCompile.toString());d.push(a.gammaOutput);return d.join()};this.acquireProgram=function(b,c,e,f){for(var q,v=0,p=d.length;v<\np;v++){var r=d[v];if(r.code===f){q=r;++q.usedTimes;break}}void 0===q&&(q=new ag(a,f,b,c,e),d.push(q));return q};this.releaseProgram=function(a){if(0===--a.usedTimes){var b=d.indexOf(a);d[b]=d[d.length-1];d.pop();a.destroy()}};this.programs=d}function dg(a,b,c,d,e,f,g){function h(a,b){if(a.width>b||a.height>b){var c=b/Math.max(a.width,a.height),d=document.createElementNS(\"http://www.w3.org/1999/xhtml\",\"canvas\");d.width=Math.floor(a.width*c);d.height=Math.floor(a.height*c);d.getContext(\"2d\").drawImage(a,\n0,0,a.width,a.height,0,0,d.width,d.height);console.warn(\"THREE.WebGLRenderer: image is too big (\"+a.width+\"x\"+a.height+\"). Resized to \"+d.width+\"x\"+d.height,a);return d}return a}function k(a){return Y.isPowerOfTwo(a.width)&&Y.isPowerOfTwo(a.height)}function m(a,b){return a.generateMipmaps&&b&&1003!==a.minFilter&&1006!==a.minFilter}function q(b){return 1003===b||1004===b||1005===b?a.NEAREST:a.LINEAR}function v(b){b=b.target;b.removeEventListener(\"dispose\",v);a:{var c=d.get(b);if(b.image&&c.__image__webglTextureCube)a.deleteTexture(c.__image__webglTextureCube);\nelse{if(void 0===c.__webglInit)break a;a.deleteTexture(c.__webglTexture)}d.remove(b)}g.textures--}function p(b){b=b.target;b.removeEventListener(\"dispose\",p);var c=d.get(b),e=d.get(b.texture);if(b){void 0!==e.__webglTexture&&a.deleteTexture(e.__webglTexture);b.depthTexture&&b.depthTexture.dispose();if(b.isWebGLRenderTargetCube)for(e=0;6>e;e++)a.deleteFramebuffer(c.__webglFramebuffer[e]),c.__webglDepthbuffer&&a.deleteRenderbuffer(c.__webglDepthbuffer[e]);else a.deleteFramebuffer(c.__webglFramebuffer),\nc.__webglDepthbuffer&&a.deleteRenderbuffer(c.__webglDepthbuffer);d.remove(b.texture);d.remove(b)}g.textures--}function r(b,p){var q=d.get(b);if(0<b.version&&q.__version!==b.version){var r=b.image;if(void 0===r)console.warn(\"THREE.WebGLRenderer: Texture marked for update but image is undefined\",b);else if(!1===r.complete)console.warn(\"THREE.WebGLRenderer: Texture marked for update but image is incomplete\",b);else{void 0===q.__webglInit&&(q.__webglInit=!0,b.addEventListener(\"dispose\",v),q.__webglTexture=\na.createTexture(),g.textures++);c.activeTexture(a.TEXTURE0+p);c.bindTexture(a.TEXTURE_2D,q.__webglTexture);a.pixelStorei(a.UNPACK_FLIP_Y_WEBGL,b.flipY);a.pixelStorei(a.UNPACK_PREMULTIPLY_ALPHA_WEBGL,b.premultiplyAlpha);a.pixelStorei(a.UNPACK_ALIGNMENT,b.unpackAlignment);var t=h(b.image,e.maxTextureSize);if((1001!==b.wrapS||1001!==b.wrapT||1003!==b.minFilter&&1006!==b.minFilter)&&!1===k(t))if(r=t,r instanceof HTMLImageElement||r instanceof HTMLCanvasElement){var n=document.createElementNS(\"http://www.w3.org/1999/xhtml\",\n\"canvas\");n.width=Y.nearestPowerOfTwo(r.width);n.height=Y.nearestPowerOfTwo(r.height);n.getContext(\"2d\").drawImage(r,0,0,n.width,n.height);console.warn(\"THREE.WebGLRenderer: image is not power of two (\"+r.width+\"x\"+r.height+\"). Resized to \"+n.width+\"x\"+n.height,r);t=n}else t=r;var r=k(t),n=f(b.format),y=f(b.type);l(a.TEXTURE_2D,b,r);var aa=b.mipmaps;if(b.isDepthTexture){aa=a.DEPTH_COMPONENT;if(1015===b.type){if(!x)throw Error(\"Float Depth Texture only supported in WebGL2.0\");aa=a.DEPTH_COMPONENT32F}else x&&\n(aa=a.DEPTH_COMPONENT16);1026===b.format&&aa===a.DEPTH_COMPONENT&&1012!==b.type&&1014!==b.type&&(console.warn(\"THREE.WebGLRenderer: Use UnsignedShortType or UnsignedIntType for DepthFormat DepthTexture.\"),b.type=1012,y=f(b.type));1027===b.format&&(aa=a.DEPTH_STENCIL,1020!==b.type&&(console.warn(\"THREE.WebGLRenderer: Use UnsignedInt248Type for DepthStencilFormat DepthTexture.\"),b.type=1020,y=f(b.type)));c.texImage2D(a.TEXTURE_2D,0,aa,t.width,t.height,0,n,y,null)}else if(b.isDataTexture)if(0<aa.length&&\nr){for(var F=0,ja=aa.length;F<ja;F++)t=aa[F],c.texImage2D(a.TEXTURE_2D,F,n,t.width,t.height,0,n,y,t.data);b.generateMipmaps=!1}else c.texImage2D(a.TEXTURE_2D,0,n,t.width,t.height,0,n,y,t.data);else if(b.isCompressedTexture)for(F=0,ja=aa.length;F<ja;F++)t=aa[F],1023!==b.format&&1022!==b.format?-1<c.getCompressedTextureFormats().indexOf(n)?c.compressedTexImage2D(a.TEXTURE_2D,F,n,t.width,t.height,0,t.data):console.warn(\"THREE.WebGLRenderer: Attempt to load unsupported compressed texture format in .uploadTexture()\"):\nc.texImage2D(a.TEXTURE_2D,F,n,t.width,t.height,0,n,y,t.data);else if(0<aa.length&&r){F=0;for(ja=aa.length;F<ja;F++)t=aa[F],c.texImage2D(a.TEXTURE_2D,F,n,n,y,t);b.generateMipmaps=!1}else c.texImage2D(a.TEXTURE_2D,0,n,n,y,t);m(b,r)&&a.generateMipmap(a.TEXTURE_2D);q.__version=b.version;if(b.onUpdate)b.onUpdate(b);return}}c.activeTexture(a.TEXTURE0+p);c.bindTexture(a.TEXTURE_2D,q.__webglTexture)}function l(c,g,h){h?(a.texParameteri(c,a.TEXTURE_WRAP_S,f(g.wrapS)),a.texParameteri(c,a.TEXTURE_WRAP_T,f(g.wrapT)),\na.texParameteri(c,a.TEXTURE_MAG_FILTER,f(g.magFilter)),a.texParameteri(c,a.TEXTURE_MIN_FILTER,f(g.minFilter))):(a.texParameteri(c,a.TEXTURE_WRAP_S,a.CLAMP_TO_EDGE),a.texParameteri(c,a.TEXTURE_WRAP_T,a.CLAMP_TO_EDGE),1001===g.wrapS&&1001===g.wrapT||console.warn(\"THREE.WebGLRenderer: Texture is not power of two. Texture.wrapS and Texture.wrapT should be set to THREE.ClampToEdgeWrapping.\",g),a.texParameteri(c,a.TEXTURE_MAG_FILTER,q(g.magFilter)),a.texParameteri(c,a.TEXTURE_MIN_FILTER,q(g.minFilter)),\n1003!==g.minFilter&&1006!==g.minFilter&&console.warn(\"THREE.WebGLRenderer: Texture is not power of two. Texture.minFilter should be set to THREE.NearestFilter or THREE.LinearFilter.\",g));!(h=b.get(\"EXT_texture_filter_anisotropic\"))||1015===g.type&&null===b.get(\"OES_texture_float_linear\")||1016===g.type&&null===b.get(\"OES_texture_half_float_linear\")||!(1<g.anisotropy||d.get(g).__currentAnisotropy)||(a.texParameterf(c,h.TEXTURE_MAX_ANISOTROPY_EXT,Math.min(g.anisotropy,e.getMaxAnisotropy())),d.get(g).__currentAnisotropy=\ng.anisotropy)}function t(b,e,g,h){var k=f(e.texture.format),m=f(e.texture.type);c.texImage2D(h,0,k,e.width,e.height,0,k,m,null);a.bindFramebuffer(a.FRAMEBUFFER,b);a.framebufferTexture2D(a.FRAMEBUFFER,g,h,d.get(e.texture).__webglTexture,0);a.bindFramebuffer(a.FRAMEBUFFER,null)}function n(b,c){a.bindRenderbuffer(a.RENDERBUFFER,b);c.depthBuffer&&!c.stencilBuffer?(a.renderbufferStorage(a.RENDERBUFFER,a.DEPTH_COMPONENT16,c.width,c.height),a.framebufferRenderbuffer(a.FRAMEBUFFER,a.DEPTH_ATTACHMENT,a.RENDERBUFFER,\nb)):c.depthBuffer&&c.stencilBuffer?(a.renderbufferStorage(a.RENDERBUFFER,a.DEPTH_STENCIL,c.width,c.height),a.framebufferRenderbuffer(a.FRAMEBUFFER,a.DEPTH_STENCIL_ATTACHMENT,a.RENDERBUFFER,b)):a.renderbufferStorage(a.RENDERBUFFER,a.RGBA4,c.width,c.height);a.bindRenderbuffer(a.RENDERBUFFER,null)}var x=\"undefined\"!==typeof WebGL2RenderingContext&&a instanceof WebGL2RenderingContext;this.setTexture2D=r;this.setTextureCube=function(b,p){var q=d.get(b);if(6===b.image.length)if(0<b.version&&q.__version!==\nb.version){q.__image__webglTextureCube||(b.addEventListener(\"dispose\",v),q.__image__webglTextureCube=a.createTexture(),g.textures++);c.activeTexture(a.TEXTURE0+p);c.bindTexture(a.TEXTURE_CUBE_MAP,q.__image__webglTextureCube);a.pixelStorei(a.UNPACK_FLIP_Y_WEBGL,b.flipY);for(var r=b&&b.isCompressedTexture,t=b.image[0]&&b.image[0].isDataTexture,n=[],y=0;6>y;y++)n[y]=r||t?t?b.image[y].image:b.image[y]:h(b.image[y],e.maxCubemapSize);var x=k(n[0]),F=f(b.format),ja=f(b.type);l(a.TEXTURE_CUBE_MAP,b,x);for(y=\n0;6>y;y++)if(r)for(var T,C=n[y].mipmaps,z=0,B=C.length;z<B;z++)T=C[z],1023!==b.format&&1022!==b.format?-1<c.getCompressedTextureFormats().indexOf(F)?c.compressedTexImage2D(a.TEXTURE_CUBE_MAP_POSITIVE_X+y,z,F,T.width,T.height,0,T.data):console.warn(\"THREE.WebGLRenderer: Attempt to load unsupported compressed texture format in .setTextureCube()\"):c.texImage2D(a.TEXTURE_CUBE_MAP_POSITIVE_X+y,z,F,T.width,T.height,0,F,ja,T.data);else t?c.texImage2D(a.TEXTURE_CUBE_MAP_POSITIVE_X+y,0,F,n[y].width,n[y].height,\n0,F,ja,n[y].data):c.texImage2D(a.TEXTURE_CUBE_MAP_POSITIVE_X+y,0,F,F,ja,n[y]);m(b,x)&&a.generateMipmap(a.TEXTURE_CUBE_MAP);q.__version=b.version;if(b.onUpdate)b.onUpdate(b)}else c.activeTexture(a.TEXTURE0+p),c.bindTexture(a.TEXTURE_CUBE_MAP,q.__image__webglTextureCube)};this.setTextureCubeDynamic=function(b,e){c.activeTexture(a.TEXTURE0+e);c.bindTexture(a.TEXTURE_CUBE_MAP,d.get(b).__webglTexture)};this.setupRenderTarget=function(b){var e=d.get(b),f=d.get(b.texture);b.addEventListener(\"dispose\",p);\nf.__webglTexture=a.createTexture();g.textures++;var h=!0===b.isWebGLRenderTargetCube,q=k(b);if(h){e.__webglFramebuffer=[];for(var v=0;6>v;v++)e.__webglFramebuffer[v]=a.createFramebuffer()}else e.__webglFramebuffer=a.createFramebuffer();if(h){c.bindTexture(a.TEXTURE_CUBE_MAP,f.__webglTexture);l(a.TEXTURE_CUBE_MAP,b.texture,q);for(v=0;6>v;v++)t(e.__webglFramebuffer[v],b,a.COLOR_ATTACHMENT0,a.TEXTURE_CUBE_MAP_POSITIVE_X+v);m(b.texture,q)&&a.generateMipmap(a.TEXTURE_CUBE_MAP);c.bindTexture(a.TEXTURE_CUBE_MAP,\nnull)}else c.bindTexture(a.TEXTURE_2D,f.__webglTexture),l(a.TEXTURE_2D,b.texture,q),t(e.__webglFramebuffer,b,a.COLOR_ATTACHMENT0,a.TEXTURE_2D),m(b.texture,q)&&a.generateMipmap(a.TEXTURE_2D),c.bindTexture(a.TEXTURE_2D,null);if(b.depthBuffer){e=d.get(b);f=!0===b.isWebGLRenderTargetCube;if(b.depthTexture){if(f)throw Error(\"target.depthTexture not supported in Cube render targets\");if(b&&b.isWebGLRenderTargetCube)throw Error(\"Depth Texture with cube render targets is not supported!\");a.bindFramebuffer(a.FRAMEBUFFER,\ne.__webglFramebuffer);if(!b.depthTexture||!b.depthTexture.isDepthTexture)throw Error(\"renderTarget.depthTexture must be an instance of THREE.DepthTexture\");d.get(b.depthTexture).__webglTexture&&b.depthTexture.image.width===b.width&&b.depthTexture.image.height===b.height||(b.depthTexture.image.width=b.width,b.depthTexture.image.height=b.height,b.depthTexture.needsUpdate=!0);r(b.depthTexture,0);e=d.get(b.depthTexture).__webglTexture;if(1026===b.depthTexture.format)a.framebufferTexture2D(a.FRAMEBUFFER,\na.DEPTH_ATTACHMENT,a.TEXTURE_2D,e,0);else if(1027===b.depthTexture.format)a.framebufferTexture2D(a.FRAMEBUFFER,a.DEPTH_STENCIL_ATTACHMENT,a.TEXTURE_2D,e,0);else throw Error(\"Unknown depthTexture format\");}else if(f)for(e.__webglDepthbuffer=[],f=0;6>f;f++)a.bindFramebuffer(a.FRAMEBUFFER,e.__webglFramebuffer[f]),e.__webglDepthbuffer[f]=a.createRenderbuffer(),n(e.__webglDepthbuffer[f],b);else a.bindFramebuffer(a.FRAMEBUFFER,e.__webglFramebuffer),e.__webglDepthbuffer=a.createRenderbuffer(),n(e.__webglDepthbuffer,\nb);a.bindFramebuffer(a.FRAMEBUFFER,null)}};this.updateRenderTargetMipmap=function(b){var e=b.texture,f=k(b);m(e,f)&&(b=b.isWebGLRenderTargetCube?a.TEXTURE_CUBE_MAP:a.TEXTURE_2D,e=d.get(e).__webglTexture,c.bindTexture(b,e),a.generateMipmap(b),c.bindTexture(b,null))}}function eg(){var a={};return{get:function(b){b=b.uuid;var c=a[b];void 0===c&&(c={},a[b]=c);return c},remove:function(b){delete a[b.uuid]},clear:function(){a={}}}}function fg(a,b,c){function d(b,c,d){var e=new Uint8Array(4),f=a.createTexture();\na.bindTexture(b,f);a.texParameteri(b,a.TEXTURE_MIN_FILTER,a.NEAREST);a.texParameteri(b,a.TEXTURE_MAG_FILTER,a.NEAREST);for(b=0;b<d;b++)a.texImage2D(c+b,0,a.RGBA,1,1,0,a.RGBA,a.UNSIGNED_BYTE,e);return f}function e(b){!0!==u[b]&&(a.enable(b),u[b]=!0)}function f(b){!1!==u[b]&&(a.disable(b),u[b]=!1)}function g(b,d,g,h,k,m,p,q){0!==b?e(a.BLEND):f(a.BLEND);5===b||b===w&&q===ja||(2===b?q?(a.blendEquationSeparate(a.FUNC_ADD,a.FUNC_ADD),a.blendFuncSeparate(a.ONE,a.ONE,a.ONE,a.ONE)):(a.blendEquation(a.FUNC_ADD),\na.blendFunc(a.SRC_ALPHA,a.ONE)):3===b?q?(a.blendEquationSeparate(a.FUNC_ADD,a.FUNC_ADD),a.blendFuncSeparate(a.ZERO,a.ZERO,a.ONE_MINUS_SRC_COLOR,a.ONE_MINUS_SRC_ALPHA)):(a.blendEquation(a.FUNC_ADD),a.blendFunc(a.ZERO,a.ONE_MINUS_SRC_COLOR)):4===b?q?(a.blendEquationSeparate(a.FUNC_ADD,a.FUNC_ADD),a.blendFuncSeparate(a.ZERO,a.SRC_COLOR,a.ZERO,a.SRC_ALPHA)):(a.blendEquation(a.FUNC_ADD),a.blendFunc(a.ZERO,a.SRC_COLOR)):q?(a.blendEquationSeparate(a.FUNC_ADD,a.FUNC_ADD),a.blendFuncSeparate(a.ONE,a.ONE_MINUS_SRC_ALPHA,\na.ONE,a.ONE_MINUS_SRC_ALPHA)):(a.blendEquationSeparate(a.FUNC_ADD,a.FUNC_ADD),a.blendFuncSeparate(a.SRC_ALPHA,a.ONE_MINUS_SRC_ALPHA,a.ONE,a.ONE_MINUS_SRC_ALPHA)),w=b,ja=q);if(5===b){k=k||d;m=m||g;p=p||h;if(d!==I||k!==O)a.blendEquationSeparate(c(d),c(k)),I=d,O=k;if(g!==W||h!==D||m!==aa||p!==F)a.blendFuncSeparate(c(g),c(h),c(m),c(p)),W=g,D=h,aa=m,F=p}else F=aa=O=D=W=I=null}function h(b){T!==b&&(b?a.frontFace(a.CW):a.frontFace(a.CCW),T=b)}function k(b){0!==b?(e(a.CULL_FACE),b!==C&&(1===b?a.cullFace(a.BACK):\n2===b?a.cullFace(a.FRONT):a.cullFace(a.FRONT_AND_BACK))):f(a.CULL_FACE);C=b}function m(b,c,d){if(b){if(e(a.POLYGON_OFFSET_FILL),B!==c||P!==d)a.polygonOffset(c,d),B=c,P=d}else f(a.POLYGON_OFFSET_FILL)}function q(b){void 0===b&&(b=a.TEXTURE0+V-1);S!==b&&(a.activeTexture(b),S=b)}var v=new function(){var b=!1,c=new fa,d=null,e=new fa;return{setMask:function(c){d===c||b||(a.colorMask(c,c,c,c),d=c)},setLocked:function(a){b=a},setClear:function(b,d,f,g,h){!0===h&&(b*=g,d*=g,f*=g);c.set(b,d,f,g);!1===e.equals(c)&&\n(a.clearColor(b,d,f,g),e.copy(c))},reset:function(){b=!1;d=null;e.set(0,0,0,1)}}},p=new function(){var b=!1,c=null,d=null,g=null;return{setTest:function(b){b?e(a.DEPTH_TEST):f(a.DEPTH_TEST)},setMask:function(d){c===d||b||(a.depthMask(d),c=d)},setFunc:function(b){if(d!==b){if(b)switch(b){case 0:a.depthFunc(a.NEVER);break;case 1:a.depthFunc(a.ALWAYS);break;case 2:a.depthFunc(a.LESS);break;case 3:a.depthFunc(a.LEQUAL);break;case 4:a.depthFunc(a.EQUAL);break;case 5:a.depthFunc(a.GEQUAL);break;case 6:a.depthFunc(a.GREATER);\nbreak;case 7:a.depthFunc(a.NOTEQUAL);break;default:a.depthFunc(a.LEQUAL)}else a.depthFunc(a.LEQUAL);d=b}},setLocked:function(a){b=a},setClear:function(b){g!==b&&(a.clearDepth(b),g=b)},reset:function(){b=!1;g=d=c=null}}},r=new function(){var b=!1,c=null,d=null,g=null,h=null,k=null,m=null,p=null,q=null;return{setTest:function(b){b?e(a.STENCIL_TEST):f(a.STENCIL_TEST)},setMask:function(d){c===d||b||(a.stencilMask(d),c=d)},setFunc:function(b,c,e){if(d!==b||g!==c||h!==e)a.stencilFunc(b,c,e),d=b,g=c,h=e},\nsetOp:function(b,c,d){if(k!==b||m!==c||p!==d)a.stencilOp(b,c,d),k=b,m=c,p=d},setLocked:function(a){b=a},setClear:function(b){q!==b&&(a.clearStencil(b),q=b)},reset:function(){b=!1;q=p=m=k=h=g=d=c=null}}},l=a.getParameter(a.MAX_VERTEX_ATTRIBS),t=new Uint8Array(l),n=new Uint8Array(l),x=new Uint8Array(l),u={},H=null,w=null,I=null,W=null,D=null,O=null,aa=null,F=null,ja=!1,T=null,C=null,z=null,B=null,P=null,M=null,V=a.getParameter(a.MAX_COMBINED_TEXTURE_IMAGE_UNITS),l=parseFloat(/^WebGL\\ ([0-9])/.exec(a.getParameter(a.VERSION))[1]),\npa=1<=parseFloat(l),S=null,N={},E=new fa,G=new fa,K={};K[a.TEXTURE_2D]=d(a.TEXTURE_2D,a.TEXTURE_2D,1);K[a.TEXTURE_CUBE_MAP]=d(a.TEXTURE_CUBE_MAP,a.TEXTURE_CUBE_MAP_POSITIVE_X,6);return{buffers:{color:v,depth:p,stencil:r},init:function(){v.setClear(0,0,0,1);p.setClear(1);r.setClear(0);e(a.DEPTH_TEST);p.setFunc(3);h(!1);k(1);e(a.CULL_FACE);e(a.BLEND);g(1)},initAttributes:function(){for(var a=0,b=t.length;a<b;a++)t[a]=0},enableAttribute:function(c){t[c]=1;0===n[c]&&(a.enableVertexAttribArray(c),n[c]=\n1);0!==x[c]&&(b.get(\"ANGLE_instanced_arrays\").vertexAttribDivisorANGLE(c,0),x[c]=0)},enableAttributeAndDivisor:function(c,d){t[c]=1;0===n[c]&&(a.enableVertexAttribArray(c),n[c]=1);x[c]!==d&&(b.get(\"ANGLE_instanced_arrays\").vertexAttribDivisorANGLE(c,d),x[c]=d)},disableUnusedAttributes:function(){for(var b=0,c=n.length;b!==c;++b)n[b]!==t[b]&&(a.disableVertexAttribArray(b),n[b]=0)},enable:e,disable:f,getCompressedTextureFormats:function(){if(null===H&&(H=[],b.get(\"WEBGL_compressed_texture_pvrtc\")||\nb.get(\"WEBGL_compressed_texture_s3tc\")||b.get(\"WEBGL_compressed_texture_etc1\")))for(var c=a.getParameter(a.COMPRESSED_TEXTURE_FORMATS),d=0;d<c.length;d++)H.push(c[d]);return H},setBlending:g,setMaterial:function(b){2===b.side?f(a.CULL_FACE):e(a.CULL_FACE);h(1===b.side);!0===b.transparent?g(b.blending,b.blendEquation,b.blendSrc,b.blendDst,b.blendEquationAlpha,b.blendSrcAlpha,b.blendDstAlpha,b.premultipliedAlpha):g(0);p.setFunc(b.depthFunc);p.setTest(b.depthTest);p.setMask(b.depthWrite);v.setMask(b.colorWrite);\nm(b.polygonOffset,b.polygonOffsetFactor,b.polygonOffsetUnits)},setFlipSided:h,setCullFace:k,setLineWidth:function(b){b!==z&&(pa&&a.lineWidth(b),z=b)},setPolygonOffset:m,getScissorTest:function(){return M},setScissorTest:function(b){(M=b)?e(a.SCISSOR_TEST):f(a.SCISSOR_TEST)},activeTexture:q,bindTexture:function(b,c){null===S&&q();var d=N[S];void 0===d&&(d={type:void 0,texture:void 0},N[S]=d);if(d.type!==b||d.texture!==c)a.bindTexture(b,c||K[b]),d.type=b,d.texture=c},compressedTexImage2D:function(){try{a.compressedTexImage2D.apply(a,\narguments)}catch(b){console.error(\"THREE.WebGLState:\",b)}},texImage2D:function(){try{a.texImage2D.apply(a,arguments)}catch(b){console.error(\"THREE.WebGLState:\",b)}},scissor:function(b){!1===E.equals(b)&&(a.scissor(b.x,b.y,b.z,b.w),E.copy(b))},viewport:function(b){!1===G.equals(b)&&(a.viewport(b.x,b.y,b.z,b.w),G.copy(b))},reset:function(){for(var b=0;b<n.length;b++)1===n[b]&&(a.disableVertexAttribArray(b),n[b]=0);u={};S=H=null;N={};C=T=w=null;v.reset();p.reset();r.reset()}}}function gg(a,b,c){function d(b){if(\"highp\"===\nb){if(0<a.getShaderPrecisionFormat(a.VERTEX_SHADER,a.HIGH_FLOAT).precision&&0<a.getShaderPrecisionFormat(a.FRAGMENT_SHADER,a.HIGH_FLOAT).precision)return\"highp\";b=\"mediump\"}return\"mediump\"===b&&0<a.getShaderPrecisionFormat(a.VERTEX_SHADER,a.MEDIUM_FLOAT).precision&&0<a.getShaderPrecisionFormat(a.FRAGMENT_SHADER,a.MEDIUM_FLOAT).precision?\"mediump\":\"lowp\"}var e,f=void 0!==c.precision?c.precision:\"highp\",g=d(f);g!==f&&(console.warn(\"THREE.WebGLRenderer:\",f,\"not supported, using\",g,\"instead.\"),f=g);c=\n!0===c.logarithmicDepthBuffer&&!!b.get(\"EXT_frag_depth\");var g=a.getParameter(a.MAX_TEXTURE_IMAGE_UNITS),h=a.getParameter(a.MAX_VERTEX_TEXTURE_IMAGE_UNITS),k=a.getParameter(a.MAX_TEXTURE_SIZE),m=a.getParameter(a.MAX_CUBE_MAP_TEXTURE_SIZE),q=a.getParameter(a.MAX_VERTEX_ATTRIBS),v=a.getParameter(a.MAX_VERTEX_UNIFORM_VECTORS),p=a.getParameter(a.MAX_VARYING_VECTORS),r=a.getParameter(a.MAX_FRAGMENT_UNIFORM_VECTORS),l=0<h,t=!!b.get(\"OES_texture_float\");return{getMaxAnisotropy:function(){if(void 0!==e)return e;\nvar c=b.get(\"EXT_texture_filter_anisotropic\");return e=null!==c?a.getParameter(c.MAX_TEXTURE_MAX_ANISOTROPY_EXT):0},getMaxPrecision:d,precision:f,logarithmicDepthBuffer:c,maxTextures:g,maxVertexTextures:h,maxTextureSize:k,maxCubemapSize:m,maxAttributes:q,maxVertexUniforms:v,maxVaryings:p,maxFragmentUniforms:r,vertexTextures:l,floatFragmentTextures:t,floatVertexTextures:l&&t}}function kd(a){qa.call(this);this.cameras=a||[]}function hg(a){var b=this,c=null,d=null;\"VRFrameData\"in window&&(d=new window.VRFrameData);\nvar e=new K,f=new K,g=new K,h=new qa;h.bounds=new fa(0,0,.5,1);h.layers.enable(1);var k=new qa;k.bounds=new fa(.5,0,.5,1);k.layers.enable(2);var m=new kd([h,k]);m.layers.enable(1);m.layers.enable(2);var q,v;window.addEventListener(\"vrdisplaypresentchange\",function(){if(c.isPresenting){var d=c.getEyeParameters(\"left\"),e=d.renderWidth,d=d.renderHeight;v=a.getPixelRatio();q=a.getSize();a.setDrawingBufferSize(2*e,d,1)}else b.enabled&&a.setDrawingBufferSize(q.width,q.height,v)},!1);this.standing=this.enabled=\n!1;this.getDevice=function(){return c};this.setDevice=function(a){void 0!==a&&(c=a)};this.getCamera=function(a){if(null===c)return a;c.depthNear=a.near;c.depthFar=a.far;c.getFrameData(d);var b=d.pose;null!==b.position?a.position.fromArray(b.position):a.position.set(0,0,0);null!==b.orientation&&a.quaternion.fromArray(b.orientation);a.updateMatrixWorld();b=c.stageParameters;this.standing&&b&&(f.fromArray(b.sittingToStandingTransform),g.getInverse(f),a.matrixWorld.multiply(f),a.matrixWorldInverse.multiply(g));\nif(!1===c.isPresenting)return a;m.matrixWorld.copy(a.matrixWorld);m.matrixWorldInverse.copy(a.matrixWorldInverse);h.matrixWorldInverse.fromArray(d.leftViewMatrix);k.matrixWorldInverse.fromArray(d.rightViewMatrix);this.standing&&b&&(h.matrixWorldInverse.multiply(g),k.matrixWorldInverse.multiply(g));a=a.parent;null!==a&&(e.getInverse(a.matrixWorld),h.matrixWorldInverse.multiply(e),k.matrixWorldInverse.multiply(e));h.matrixWorld.getInverse(h.matrixWorldInverse);k.matrixWorld.getInverse(k.matrixWorldInverse);\nh.projectionMatrix.fromArray(d.leftProjectionMatrix);k.projectionMatrix.fromArray(d.rightProjectionMatrix);m.projectionMatrix.copy(h.projectionMatrix);a=c.getLayers();a.length&&(a=a[0],null!==a.leftBounds&&4===a.leftBounds.length&&h.bounds.fromArray(a.leftBounds),null!==a.rightBounds&&4===a.rightBounds.length&&k.bounds.fromArray(a.rightBounds));return m};this.getStandingMatrix=function(){return f};this.submitFrame=function(){c&&c.isPresenting&&c.submitFrame()}}function ig(a){var b={};return{get:function(c){if(void 0!==\nb[c])return b[c];var d;switch(c){case \"WEBGL_depth_texture\":d=a.getExtension(\"WEBGL_depth_texture\")||a.getExtension(\"MOZ_WEBGL_depth_texture\")||a.getExtension(\"WEBKIT_WEBGL_depth_texture\");break;case \"EXT_texture_filter_anisotropic\":d=a.getExtension(\"EXT_texture_filter_anisotropic\")||a.getExtension(\"MOZ_EXT_texture_filter_anisotropic\")||a.getExtension(\"WEBKIT_EXT_texture_filter_anisotropic\");break;case \"WEBGL_compressed_texture_s3tc\":d=a.getExtension(\"WEBGL_compressed_texture_s3tc\")||a.getExtension(\"MOZ_WEBGL_compressed_texture_s3tc\")||\na.getExtension(\"WEBKIT_WEBGL_compressed_texture_s3tc\");break;case \"WEBGL_compressed_texture_pvrtc\":d=a.getExtension(\"WEBGL_compressed_texture_pvrtc\")||a.getExtension(\"WEBKIT_WEBGL_compressed_texture_pvrtc\");break;case \"WEBGL_compressed_texture_etc1\":d=a.getExtension(\"WEBGL_compressed_texture_etc1\");break;default:d=a.getExtension(c)}null===d&&console.warn(\"THREE.WebGLRenderer: \"+c+\" extension not supported.\");return b[c]=d}}}function jg(){function a(){m.value!==d&&(m.value=d,m.needsUpdate=0<e);c.numPlanes=\ne;c.numIntersection=0}function b(a,b,d,e){var f=null!==a?a.length:0,g=null;if(0!==f){g=m.value;if(!0!==e||null===g){e=d+4*f;b=b.matrixWorldInverse;k.getNormalMatrix(b);if(null===g||g.length<e)g=new Float32Array(e);for(e=0;e!==f;++e,d+=4)h.copy(a[e]).applyMatrix4(b,k),h.normal.toArray(g,d),g[d+3]=h.constant}m.value=g;m.needsUpdate=!0}c.numPlanes=f;return g}var c=this,d=null,e=0,f=!1,g=!1,h=new Aa,k=new Ba,m={value:null,needsUpdate:!1};this.uniform=m;this.numIntersection=this.numPlanes=0;this.init=\nfunction(a,c,g){var h=0!==a.length||c||0!==e||f;f=c;d=b(a,g,0);e=a.length;return h};this.beginShadows=function(){g=!0;b(null)};this.endShadows=function(){g=!1;a()};this.setState=function(c,h,k,r,l,t){if(!f||null===c||0===c.length||g&&!k)g?b(null):a();else{k=g?0:e;var n=4*k,x=l.clippingState||null;m.value=x;x=b(c,r,n,t);for(c=0;c!==n;++c)x[c]=d[c];l.clippingState=x;this.numIntersection=h?this.numPlanes:0;this.numPlanes+=k}}}function Xd(a){function b(){ga.init();ga.scissor(J.copy(ea).multiplyScalar(Q));\nga.viewport(U.copy(hd).multiplyScalar(Q))}function c(){S=G=null;pa=\"\";V=-1;ga.reset()}function d(a){a.preventDefault();c();b();ha.clear();xa.clear()}function e(a){a=a.target;a.removeEventListener(\"dispose\",e);f(a);ha.remove(a)}function f(a){var b=ha.get(a).program;a.program=void 0;void 0!==b&&va.releaseProgram(b)}function g(a,b,c){a.render(function(a){B.renderBufferImmediate(a,b,c)})}function h(a,b){return Math.abs(b[0])-Math.abs(a[0])}function k(a,b,c){if(a.visible){if(a.layers.test(b.layers))if(a.isLight)aa.push(a);\nelse if(a.isSprite)a.frustumCulled&&!Vd.intersectsSprite(a)||C.push(a);else if(a.isLensFlare)z.push(a);else if(a.isImmediateRenderObject)c&&Oa.setFromMatrixPosition(a.matrixWorld).applyMatrix4(jd),F.push(a,null,a.material,Oa.z,null);else if(a.isMesh||a.isLine||a.isPoints)if(a.isSkinnedMesh&&a.skeleton.update(),!a.frustumCulled||Vd.intersectsObject(a)){c&&Oa.setFromMatrixPosition(a.matrixWorld).applyMatrix4(jd);var d=xa.update(a),e=a.material;if(Array.isArray(e))for(var f=d.groups,g=0,h=f.length;g<\nh;g++){var m=f[g],q=e[m.materialIndex];q&&q.visible&&F.push(a,d,q,Oa.z,m)}else e.visible&&F.push(a,d,e,Oa.z,null)}a=a.children;g=0;for(h=a.length;g<h;g++)k(a[g],b,c)}}function m(a,b,c,d){for(var e=0,f=a.length;e<f;e++){var g=a[e],h=g.object,k=g.geometry,m=void 0===d?g.material:d,g=g.group;if(c.isArrayCamera){N=c;for(var p=c.cameras,v=0,r=p.length;v<r;v++){var l=p[v];if(h.layers.test(l.layers)){var t=l.bounds,n=t.x*ba,ca=t.y*L,u=t.z*ba,t=t.w*L;B.setViewport(n,ca,u,t);B.setScissor(n,ca,u,t);B.setScissorTest(!0);\nq(h,b,l,k,m,g)}}}else N=null,q(h,b,c,k,m,g)}}function q(a,b,c,d,e,f){a.modelViewMatrix.multiplyMatrices(c.matrixWorldInverse,a.matrixWorld);a.normalMatrix.getNormalMatrix(a.modelViewMatrix);a.onBeforeRender(B,b,c,d,e,f);if(a.isImmediateRenderObject){ga.setMaterial(e);var h=p(c,b.fog,e,a);pa=\"\";g(a,h,e)}else B.renderBufferDirect(c,b.fog,d,e,a,f);a.onAfterRender(B,b,c,d,e,f)}function v(a,b,c){var d=ha.get(a);c=va.getParameters(a,da,b,Ha.numPlanes,Ha.numIntersection,c);var g=va.getProgramCode(a,c),h=\nd.program,k=!0;if(void 0===h)a.addEventListener(\"dispose\",e);else if(h.code!==g)f(a);else{if(void 0!==c.shaderID)return;k=!1}k&&(c.shaderID?(h=$a[c.shaderID],d.shader={name:a.type,uniforms:Ca.clone(h.uniforms),vertexShader:h.vertexShader,fragmentShader:h.fragmentShader}):d.shader={name:a.type,uniforms:a.uniforms,vertexShader:a.vertexShader,fragmentShader:a.fragmentShader},a.onBeforeCompile(d.shader),h=va.acquireProgram(a,d.shader,c,g),d.program=h,a.program=h);c=h.getAttributes();if(a.morphTargets)for(g=\na.numSupportedMorphTargets=0;g<B.maxMorphTargets;g++)0<=c[\"morphTarget\"+g]&&a.numSupportedMorphTargets++;if(a.morphNormals)for(g=a.numSupportedMorphNormals=0;g<B.maxMorphNormals;g++)0<=c[\"morphNormal\"+g]&&a.numSupportedMorphNormals++;c=d.shader.uniforms;if(!a.isShaderMaterial&&!a.isRawShaderMaterial||!0===a.clipping)d.numClippingPlanes=Ha.numPlanes,d.numIntersection=Ha.numIntersection,c.clippingPlanes=Ha.uniform;d.fog=b;d.lightsHash=da.hash;a.lights&&(c.ambientLightColor.value=da.ambient,c.directionalLights.value=\nda.directional,c.spotLights.value=da.spot,c.rectAreaLights.value=da.rectArea,c.pointLights.value=da.point,c.hemisphereLights.value=da.hemi,c.directionalShadowMap.value=da.directionalShadowMap,c.directionalShadowMatrix.value=da.directionalShadowMatrix,c.spotShadowMap.value=da.spotShadowMap,c.spotShadowMatrix.value=da.spotShadowMatrix,c.pointShadowMap.value=da.pointShadowMap,c.pointShadowMatrix.value=da.pointShadowMatrix);a=d.program.getUniforms();a=eb.seqWithValue(a.seq,c);d.uniformsList=a}function p(a,\nb,c,d){X=0;var e=ha.get(c);id&&(Wd||a!==S)&&Ha.setState(c.clippingPlanes,c.clipIntersection,c.clipShadows,a,e,a===S&&c.id===V);!1===c.needsUpdate&&(void 0===e.program?c.needsUpdate=!0:c.fog&&e.fog!==b?c.needsUpdate=!0:c.lights&&e.lightsHash!==da.hash?c.needsUpdate=!0:void 0===e.numClippingPlanes||e.numClippingPlanes===Ha.numPlanes&&e.numIntersection===Ha.numIntersection||(c.needsUpdate=!0));c.needsUpdate&&(v(c,b,d),c.needsUpdate=!1);var f=!1,g=!1,h=!1,k=e.program,m=k.getUniforms(),q=e.shader.uniforms;\nk.id!==G&&(A.useProgram(k.program),G=k.id,h=g=f=!0);c.id!==V&&(V=c.id,g=!0);if(f||a!==S){m.setValue(A,\"projectionMatrix\",a.projectionMatrix);ia.logarithmicDepthBuffer&&m.setValue(A,\"logDepthBufFC\",2/(Math.log(a.far+1)/Math.LN2));S!==(N||a)&&(S=N||a,h=g=!0);if(c.isShaderMaterial||c.isMeshPhongMaterial||c.isMeshStandardMaterial||c.envMap)f=m.map.cameraPosition,void 0!==f&&f.setValue(A,Oa.setFromMatrixPosition(a.matrixWorld));(c.isMeshPhongMaterial||c.isMeshLambertMaterial||c.isMeshBasicMaterial||c.isMeshStandardMaterial||\nc.isShaderMaterial||c.skinning)&&m.setValue(A,\"viewMatrix\",a.matrixWorldInverse)}if(c.skinning&&(m.setOptional(A,d,\"bindMatrix\"),m.setOptional(A,d,\"bindMatrixInverse\"),a=d.skeleton))if(f=a.bones,ia.floatVertexTextures){if(void 0===a.boneTexture){var f=Math.sqrt(4*f.length),f=Y.nextPowerOfTwo(Math.ceil(f)),f=Math.max(f,4),p=new Float32Array(f*f*4);p.set(a.boneMatrices);var t=new db(p,f,f,1023,1015);a.boneMatrices=p;a.boneTexture=t;a.boneTextureSize=f}m.setValue(A,\"boneTexture\",a.boneTexture);m.setValue(A,\n\"boneTextureSize\",a.boneTextureSize)}else m.setOptional(A,a,\"boneMatrices\");if(g){m.setValue(A,\"toneMappingExposure\",B.toneMappingExposure);m.setValue(A,\"toneMappingWhitePoint\",B.toneMappingWhitePoint);c.lights&&(g=h,q.ambientLightColor.needsUpdate=g,q.directionalLights.needsUpdate=g,q.pointLights.needsUpdate=g,q.spotLights.needsUpdate=g,q.rectAreaLights.needsUpdate=g,q.hemisphereLights.needsUpdate=g);b&&c.fog&&(q.fogColor.value=b.color,b.isFog?(q.fogNear.value=b.near,q.fogFar.value=b.far):b.isFogExp2&&\n(q.fogDensity.value=b.density));if(c.isMeshBasicMaterial||c.isMeshLambertMaterial||c.isMeshPhongMaterial||c.isMeshStandardMaterial||c.isMeshNormalMaterial||c.isMeshDepthMaterial){q.opacity.value=c.opacity;q.diffuse.value=c.color;c.emissive&&q.emissive.value.copy(c.emissive).multiplyScalar(c.emissiveIntensity);q.map.value=c.map;q.specularMap.value=c.specularMap;q.alphaMap.value=c.alphaMap;c.lightMap&&(q.lightMap.value=c.lightMap,q.lightMapIntensity.value=c.lightMapIntensity);c.aoMap&&(q.aoMap.value=\nc.aoMap,q.aoMapIntensity.value=c.aoMapIntensity);var n;c.map?n=c.map:c.specularMap?n=c.specularMap:c.displacementMap?n=c.displacementMap:c.normalMap?n=c.normalMap:c.bumpMap?n=c.bumpMap:c.roughnessMap?n=c.roughnessMap:c.metalnessMap?n=c.metalnessMap:c.alphaMap?n=c.alphaMap:c.emissiveMap&&(n=c.emissiveMap);void 0!==n&&(n.isWebGLRenderTarget&&(n=n.texture),b=n.offset,n=n.repeat,q.offsetRepeat.value.set(b.x,b.y,n.x,n.y));q.envMap.value=c.envMap;q.flipEnvMap.value=c.envMap&&c.envMap.isCubeTexture?-1:1;\nq.reflectivity.value=c.reflectivity;q.refractionRatio.value=c.refractionRatio}c.isLineBasicMaterial?(q.diffuse.value=c.color,q.opacity.value=c.opacity):c.isLineDashedMaterial?(q.diffuse.value=c.color,q.opacity.value=c.opacity,q.dashSize.value=c.dashSize,q.totalSize.value=c.dashSize+c.gapSize,q.scale.value=c.scale):c.isPointsMaterial?(q.diffuse.value=c.color,q.opacity.value=c.opacity,q.size.value=c.size*Q,q.scale.value=.5*L,q.map.value=c.map,null!==c.map&&(n=c.map.offset,c=c.map.repeat,q.offsetRepeat.value.set(n.x,\nn.y,c.x,c.y))):c.isMeshLambertMaterial?c.emissiveMap&&(q.emissiveMap.value=c.emissiveMap):c.isMeshToonMaterial?(r(q,c),c.gradientMap&&(q.gradientMap.value=c.gradientMap)):c.isMeshPhongMaterial?r(q,c):c.isMeshPhysicalMaterial?(q.clearCoat.value=c.clearCoat,q.clearCoatRoughness.value=c.clearCoatRoughness,l(q,c)):c.isMeshStandardMaterial?l(q,c):c.isMeshDepthMaterial?c.displacementMap&&(q.displacementMap.value=c.displacementMap,q.displacementScale.value=c.displacementScale,q.displacementBias.value=c.displacementBias):\nc.isMeshNormalMaterial&&(c.bumpMap&&(q.bumpMap.value=c.bumpMap,q.bumpScale.value=c.bumpScale),c.normalMap&&(q.normalMap.value=c.normalMap,q.normalScale.value.copy(c.normalScale)),c.displacementMap&&(q.displacementMap.value=c.displacementMap,q.displacementScale.value=c.displacementScale,q.displacementBias.value=c.displacementBias));void 0!==q.ltcMat&&(q.ltcMat.value=R.LTC_MAT_TEXTURE);void 0!==q.ltcMag&&(q.ltcMag.value=R.LTC_MAG_TEXTURE);eb.upload(A,e.uniformsList,q,B)}m.setValue(A,\"modelViewMatrix\",\nd.modelViewMatrix);m.setValue(A,\"normalMatrix\",d.normalMatrix);m.setValue(A,\"modelMatrix\",d.matrixWorld);return k}function r(a,b){a.specular.value=b.specular;a.shininess.value=Math.max(b.shininess,1E-4);b.emissiveMap&&(a.emissiveMap.value=b.emissiveMap);b.bumpMap&&(a.bumpMap.value=b.bumpMap,a.bumpScale.value=b.bumpScale);b.normalMap&&(a.normalMap.value=b.normalMap,a.normalScale.value.copy(b.normalScale));b.displacementMap&&(a.displacementMap.value=b.displacementMap,a.displacementScale.value=b.displacementScale,\na.displacementBias.value=b.displacementBias)}function l(a,b){a.roughness.value=b.roughness;a.metalness.value=b.metalness;b.roughnessMap&&(a.roughnessMap.value=b.roughnessMap);b.metalnessMap&&(a.metalnessMap.value=b.metalnessMap);b.emissiveMap&&(a.emissiveMap.value=b.emissiveMap);b.bumpMap&&(a.bumpMap.value=b.bumpMap,a.bumpScale.value=b.bumpScale);b.normalMap&&(a.normalMap.value=b.normalMap,a.normalScale.value.copy(b.normalScale));b.displacementMap&&(a.displacementMap.value=b.displacementMap,a.displacementScale.value=\nb.displacementScale,a.displacementBias.value=b.displacementBias);b.envMap&&(a.envMapIntensity.value=b.envMapIntensity)}function t(a,b){var c,d,e,f,g=0,h=0,k=0,m,q,p,v=b.matrixWorldInverse,r=0,l=0,n=0,t=0,ca=0;c=0;for(d=a.length;c<d;c++)if(e=a[c],f=e.color,m=e.intensity,q=e.distance,p=e.shadow&&e.shadow.map?e.shadow.map.texture:null,e.isAmbientLight)g+=f.r*m,h+=f.g*m,k+=f.b*m;else if(e.isDirectionalLight){var u=wa.get(e);u.color.copy(e.color).multiplyScalar(e.intensity);u.direction.setFromMatrixPosition(e.matrixWorld);\nOa.setFromMatrixPosition(e.target.matrixWorld);u.direction.sub(Oa);u.direction.transformDirection(v);if(u.shadow=e.castShadow)f=e.shadow,u.shadowBias=f.bias,u.shadowRadius=f.radius,u.shadowMapSize=f.mapSize;da.directionalShadowMap[r]=p;da.directionalShadowMatrix[r]=e.shadow.matrix;da.directional[r]=u;r++}else if(e.isSpotLight){u=wa.get(e);u.position.setFromMatrixPosition(e.matrixWorld);u.position.applyMatrix4(v);u.color.copy(f).multiplyScalar(m);u.distance=q;u.direction.setFromMatrixPosition(e.matrixWorld);\nOa.setFromMatrixPosition(e.target.matrixWorld);u.direction.sub(Oa);u.direction.transformDirection(v);u.coneCos=Math.cos(e.angle);u.penumbraCos=Math.cos(e.angle*(1-e.penumbra));u.decay=0===e.distance?0:e.decay;if(u.shadow=e.castShadow)f=e.shadow,u.shadowBias=f.bias,u.shadowRadius=f.radius,u.shadowMapSize=f.mapSize;da.spotShadowMap[n]=p;da.spotShadowMatrix[n]=e.shadow.matrix;da.spot[n]=u;n++}else if(e.isRectAreaLight)u=wa.get(e),u.color.copy(f).multiplyScalar(m/(e.width*e.height)),u.position.setFromMatrixPosition(e.matrixWorld),\nu.position.applyMatrix4(v),oa.identity(),qa.copy(e.matrixWorld),qa.premultiply(v),oa.extractRotation(qa),u.halfWidth.set(.5*e.width,0,0),u.halfHeight.set(0,.5*e.height,0),u.halfWidth.applyMatrix4(oa),u.halfHeight.applyMatrix4(oa),da.rectArea[t]=u,t++;else if(e.isPointLight){u=wa.get(e);u.position.setFromMatrixPosition(e.matrixWorld);u.position.applyMatrix4(v);u.color.copy(e.color).multiplyScalar(e.intensity);u.distance=e.distance;u.decay=0===e.distance?0:e.decay;if(u.shadow=e.castShadow)f=e.shadow,\nu.shadowBias=f.bias,u.shadowRadius=f.radius,u.shadowMapSize=f.mapSize;da.pointShadowMap[l]=p;da.pointShadowMatrix[l]=e.shadow.matrix;da.point[l]=u;l++}else e.isHemisphereLight&&(u=wa.get(e),u.direction.setFromMatrixPosition(e.matrixWorld),u.direction.transformDirection(v),u.direction.normalize(),u.skyColor.copy(e.color).multiplyScalar(m),u.groundColor.copy(e.groundColor).multiplyScalar(m),da.hemi[ca]=u,ca++);da.ambient[0]=g;da.ambient[1]=h;da.ambient[2]=k;da.directional.length=r;da.spot.length=n;\nda.rectArea.length=t;da.point.length=l;da.hemi.length=ca;da.hash=r+\",\"+l+\",\"+n+\",\"+t+\",\"+ca+\",\"+da.shadows.length}function y(a){var b;if(1E3===a)return A.REPEAT;if(1001===a)return A.CLAMP_TO_EDGE;if(1002===a)return A.MIRRORED_REPEAT;if(1003===a)return A.NEAREST;if(1004===a)return A.NEAREST_MIPMAP_NEAREST;if(1005===a)return A.NEAREST_MIPMAP_LINEAR;if(1006===a)return A.LINEAR;if(1007===a)return A.LINEAR_MIPMAP_NEAREST;if(1008===a)return A.LINEAR_MIPMAP_LINEAR;if(1009===a)return A.UNSIGNED_BYTE;if(1017===\na)return A.UNSIGNED_SHORT_4_4_4_4;if(1018===a)return A.UNSIGNED_SHORT_5_5_5_1;if(1019===a)return A.UNSIGNED_SHORT_5_6_5;if(1010===a)return A.BYTE;if(1011===a)return A.SHORT;if(1012===a)return A.UNSIGNED_SHORT;if(1013===a)return A.INT;if(1014===a)return A.UNSIGNED_INT;if(1015===a)return A.FLOAT;if(1016===a&&(b=ma.get(\"OES_texture_half_float\"),null!==b))return b.HALF_FLOAT_OES;if(1021===a)return A.ALPHA;if(1022===a)return A.RGB;if(1023===a)return A.RGBA;if(1024===a)return A.LUMINANCE;if(1025===a)return A.LUMINANCE_ALPHA;\nif(1026===a)return A.DEPTH_COMPONENT;if(1027===a)return A.DEPTH_STENCIL;if(100===a)return A.FUNC_ADD;if(101===a)return A.FUNC_SUBTRACT;if(102===a)return A.FUNC_REVERSE_SUBTRACT;if(200===a)return A.ZERO;if(201===a)return A.ONE;if(202===a)return A.SRC_COLOR;if(203===a)return A.ONE_MINUS_SRC_COLOR;if(204===a)return A.SRC_ALPHA;if(205===a)return A.ONE_MINUS_SRC_ALPHA;if(206===a)return A.DST_ALPHA;if(207===a)return A.ONE_MINUS_DST_ALPHA;if(208===a)return A.DST_COLOR;if(209===a)return A.ONE_MINUS_DST_COLOR;\nif(210===a)return A.SRC_ALPHA_SATURATE;if(2001===a||2002===a||2003===a||2004===a)if(b=ma.get(\"WEBGL_compressed_texture_s3tc\"),null!==b){if(2001===a)return b.COMPRESSED_RGB_S3TC_DXT1_EXT;if(2002===a)return b.COMPRESSED_RGBA_S3TC_DXT1_EXT;if(2003===a)return b.COMPRESSED_RGBA_S3TC_DXT3_EXT;if(2004===a)return b.COMPRESSED_RGBA_S3TC_DXT5_EXT}if(2100===a||2101===a||2102===a||2103===a)if(b=ma.get(\"WEBGL_compressed_texture_pvrtc\"),null!==b){if(2100===a)return b.COMPRESSED_RGB_PVRTC_4BPPV1_IMG;if(2101===a)return b.COMPRESSED_RGB_PVRTC_2BPPV1_IMG;\nif(2102===a)return b.COMPRESSED_RGBA_PVRTC_4BPPV1_IMG;if(2103===a)return b.COMPRESSED_RGBA_PVRTC_2BPPV1_IMG}if(2151===a&&(b=ma.get(\"WEBGL_compressed_texture_etc1\"),null!==b))return b.COMPRESSED_RGB_ETC1_WEBGL;if(103===a||104===a)if(b=ma.get(\"EXT_blend_minmax\"),null!==b){if(103===a)return b.MIN_EXT;if(104===a)return b.MAX_EXT}return 1020===a&&(b=ma.get(\"WEBGL_depth_texture\"),null!==b)?b.UNSIGNED_INT_24_8_WEBGL:0}console.log(\"THREE.WebGLRenderer\",\"86\");a=a||{};var x=void 0!==a.canvas?a.canvas:document.createElementNS(\"http://www.w3.org/1999/xhtml\",\n\"canvas\"),u=void 0!==a.context?a.context:null,H=void 0!==a.alpha?a.alpha:!1,w=void 0!==a.depth?a.depth:!0,I=void 0!==a.stencil?a.stencil:!0,W=void 0!==a.antialias?a.antialias:!1,D=void 0!==a.premultipliedAlpha?a.premultipliedAlpha:!0,O=void 0!==a.preserveDrawingBuffer?a.preserveDrawingBuffer:!1,aa=[],F=null,ja=new Float32Array(8),C=[],z=[];this.domElement=x;this.context=null;this.sortObjects=this.autoClearStencil=this.autoClearDepth=this.autoClearColor=this.autoClear=!0;this.clippingPlanes=[];this.localClippingEnabled=\n!1;this.gammaFactor=2;this.physicallyCorrectLights=this.gammaOutput=this.gammaInput=!1;this.toneMappingWhitePoint=this.toneMappingExposure=this.toneMapping=1;this.maxMorphTargets=8;this.maxMorphNormals=4;var B=this,G=null,P=null,M=null,V=-1,pa=\"\",S=null,N=null,J=new fa,Z=null,U=new fa,X=0,ba=x.width,L=x.height,Q=1,ea=new fa(0,0,ba,L),na=!1,hd=new fa(0,0,ba,L),Vd=new gd,Ha=new jg,id=!1,Wd=!1,jd=new K,Oa=new n,qa=new K,oa=new K,da={hash:\"\",ambient:[0,0,0],directional:[],directionalShadowMap:[],directionalShadowMatrix:[],\nspot:[],spotShadowMap:[],spotShadowMatrix:[],rectArea:[],point:[],pointShadowMap:[],pointShadowMatrix:[],hemi:[],shadows:[]},ta={geometries:0,textures:0},la={frame:0,calls:0,vertices:0,faces:0,points:0};this.info={render:la,memory:ta,programs:null};var A;try{H={alpha:H,depth:w,stencil:I,antialias:W,premultipliedAlpha:D,preserveDrawingBuffer:O};A=u||x.getContext(\"webgl\",H)||x.getContext(\"experimental-webgl\",H);if(null===A){if(null!==x.getContext(\"webgl\"))throw\"Error creating WebGL context with your selected attributes.\";\nthrow\"Error creating WebGL context.\";}void 0===A.getShaderPrecisionFormat&&(A.getShaderPrecisionFormat=function(){return{rangeMin:1,rangeMax:1,precision:1}});x.addEventListener(\"webglcontextlost\",d,!1)}catch(kg){console.error(\"THREE.WebGLRenderer: \"+kg)}var ma=new ig(A);ma.get(\"WEBGL_depth_texture\");ma.get(\"OES_texture_float\");ma.get(\"OES_texture_float_linear\");ma.get(\"OES_texture_half_float\");ma.get(\"OES_texture_half_float_linear\");ma.get(\"OES_standard_derivatives\");ma.get(\"ANGLE_instanced_arrays\");\nma.get(\"OES_element_index_uint\")&&(E.MaxIndex=4294967296);var ia=new gg(A,ma,a),ga=new fg(A,ma,y),ha=new eg,ra=new dg(A,ma,ga,ha,ia,y,ta),ua=new Kf(A),za=new Tf(A,ua,ta),xa=new Vf(A,za,la),va=new cg(this,ia),wa=new Uf,Aa=new Qf,ya=new Mf(this,ga,xa,D),sa=new hg(this);this.info.programs=va.programs;var Da=new Sf(A,ma,la),Ea=new Rf(A,ma,la);b();this.context=A;this.capabilities=ia;this.extensions=ma;this.properties=ha;this.renderLists=Aa;this.state=ga;this.vr=sa;var Ba=new Ie(this,da,xa,ia);this.shadowMap=\nBa;var Fa=new If(this,C),Ga=new Hf(this,z);this.getContext=function(){return A};this.getContextAttributes=function(){return A.getContextAttributes()};this.forceContextLoss=function(){var a=ma.get(\"WEBGL_lose_context\");a&&a.loseContext()};this.getMaxAnisotropy=function(){return ia.getMaxAnisotropy()};this.getPrecision=function(){return ia.precision};this.getPixelRatio=function(){return Q};this.setPixelRatio=function(a){void 0!==a&&(Q=a,this.setSize(ba,L,!1))};this.getSize=function(){return{width:ba,\nheight:L}};this.setSize=function(a,b,c){var d=sa.getDevice();d&&d.isPresenting?console.warn(\"THREE.WebGLRenderer: Can't change size while VR device is presenting.\"):(ba=a,L=b,x.width=a*Q,x.height=b*Q,!1!==c&&(x.style.width=a+\"px\",x.style.height=b+\"px\"),this.setViewport(0,0,a,b))};this.getDrawingBufferSize=function(){return{width:ba*Q,height:L*Q}};this.setDrawingBufferSize=function(a,b,c){ba=a;L=b;Q=c;x.width=a*c;x.height=b*c;this.setViewport(0,0,a,b)};this.setViewport=function(a,b,c,d){hd.set(a,L-\nb-d,c,d);ga.viewport(U.copy(hd).multiplyScalar(Q))};this.setScissor=function(a,b,c,d){ea.set(a,L-b-d,c,d);ga.scissor(J.copy(ea).multiplyScalar(Q))};this.setScissorTest=function(a){ga.setScissorTest(na=a)};this.getClearColor=ya.getClearColor;this.setClearColor=ya.setClearColor;this.getClearAlpha=ya.getClearAlpha;this.setClearAlpha=ya.setClearAlpha;this.clear=function(a,b,c){var d=0;if(void 0===a||a)d|=A.COLOR_BUFFER_BIT;if(void 0===b||b)d|=A.DEPTH_BUFFER_BIT;if(void 0===c||c)d|=A.STENCIL_BUFFER_BIT;\nA.clear(d)};this.clearColor=function(){this.clear(!0,!1,!1)};this.clearDepth=function(){this.clear(!1,!0,!1)};this.clearStencil=function(){this.clear(!1,!1,!0)};this.clearTarget=function(a,b,c,d){this.setRenderTarget(a);this.clear(b,c,d)};this.resetGLState=c;this.dispose=function(){x.removeEventListener(\"webglcontextlost\",d,!1);Aa.dispose()};this.renderBufferImmediate=function(a,b,c){ga.initAttributes();var d=ha.get(a);a.hasPositions&&!d.position&&(d.position=A.createBuffer());a.hasNormals&&!d.normal&&\n(d.normal=A.createBuffer());a.hasUvs&&!d.uv&&(d.uv=A.createBuffer());a.hasColors&&!d.color&&(d.color=A.createBuffer());b=b.getAttributes();a.hasPositions&&(A.bindBuffer(A.ARRAY_BUFFER,d.position),A.bufferData(A.ARRAY_BUFFER,a.positionArray,A.DYNAMIC_DRAW),ga.enableAttribute(b.position),A.vertexAttribPointer(b.position,3,A.FLOAT,!1,0,0));if(a.hasNormals){A.bindBuffer(A.ARRAY_BUFFER,d.normal);if(!c.isMeshPhongMaterial&&!c.isMeshStandardMaterial&&!c.isMeshNormalMaterial&&1===c.shading)for(var e=0,f=\n3*a.count;e<f;e+=9){var g=a.normalArray,h=(g[e+0]+g[e+3]+g[e+6])/3,k=(g[e+1]+g[e+4]+g[e+7])/3,m=(g[e+2]+g[e+5]+g[e+8])/3;g[e+0]=h;g[e+1]=k;g[e+2]=m;g[e+3]=h;g[e+4]=k;g[e+5]=m;g[e+6]=h;g[e+7]=k;g[e+8]=m}A.bufferData(A.ARRAY_BUFFER,a.normalArray,A.DYNAMIC_DRAW);ga.enableAttribute(b.normal);A.vertexAttribPointer(b.normal,3,A.FLOAT,!1,0,0)}a.hasUvs&&c.map&&(A.bindBuffer(A.ARRAY_BUFFER,d.uv),A.bufferData(A.ARRAY_BUFFER,a.uvArray,A.DYNAMIC_DRAW),ga.enableAttribute(b.uv),A.vertexAttribPointer(ua.uv,2,A.FLOAT,\n!1,0,0));a.hasColors&&0!==c.vertexColors&&(A.bindBuffer(A.ARRAY_BUFFER,d.color),A.bufferData(A.ARRAY_BUFFER,a.colorArray,A.DYNAMIC_DRAW),ga.enableAttribute(b.color),A.vertexAttribPointer(b.color,3,A.FLOAT,!1,0,0));ga.disableUnusedAttributes();A.drawArrays(A.TRIANGLES,0,a.count);a.count=0};this.renderBufferDirect=function(a,b,c,d,e,f){ga.setMaterial(d);var g=p(a,b,d,e);a=c.id+\"_\"+g.id+\"_\"+(!0===d.wireframe);var k=!1;a!==pa&&(pa=a,k=!0);b=e.morphTargetInfluences;if(void 0!==b){var m=[];a=0;for(var q=\nb.length;a<q;a++)k=b[a],m.push([k,a]);m.sort(h);8<m.length&&(m.length=8);var v=c.morphAttributes;a=0;for(q=m.length;a<q;a++)k=m[a],ja[a]=k[0],0!==k[0]?(b=k[1],!0===d.morphTargets&&v.position&&c.addAttribute(\"morphTarget\"+a,v.position[b]),!0===d.morphNormals&&v.normal&&c.addAttribute(\"morphNormal\"+a,v.normal[b])):(!0===d.morphTargets&&c.removeAttribute(\"morphTarget\"+a),!0===d.morphNormals&&c.removeAttribute(\"morphNormal\"+a));a=m.length;for(b=ja.length;a<b;a++)ja[a]=0;g.getUniforms().setValue(A,\"morphTargetInfluences\",\nja);k=!0}b=c.index;q=c.attributes.position;m=1;!0===d.wireframe&&(b=za.getWireframeAttribute(c),m=2);var r;a=Da;null!==b&&(r=ua.get(b),a=Ea,a.setIndex(r));if(k){k=void 0;if(c&&c.isInstancedBufferGeometry&&null===ma.get(\"ANGLE_instanced_arrays\"))console.error(\"THREE.WebGLRenderer.setupVertexAttributes: using THREE.InstancedBufferGeometry but hardware does not support extension ANGLE_instanced_arrays.\");else{void 0===k&&(k=0);ga.initAttributes();var v=c.attributes,g=g.getAttributes(),l=d.defaultAttributeValues,\nn;for(n in g){var t=g[n];if(0<=t){var u=v[n];if(void 0!==u){var ca=u.normalized,w=u.itemSize,x=ua.get(u),y=x.buffer,H=x.type,x=x.bytesPerElement;if(u.isInterleavedBufferAttribute){var I=u.data,D=I.stride,u=u.offset;I&&I.isInstancedInterleavedBuffer?(ga.enableAttributeAndDivisor(t,I.meshPerAttribute),void 0===c.maxInstancedCount&&(c.maxInstancedCount=I.meshPerAttribute*I.count)):ga.enableAttribute(t);A.bindBuffer(A.ARRAY_BUFFER,y);A.vertexAttribPointer(t,w,H,ca,D*x,(k*D+u)*x)}else u.isInstancedBufferAttribute?\n(ga.enableAttributeAndDivisor(t,u.meshPerAttribute),void 0===c.maxInstancedCount&&(c.maxInstancedCount=u.meshPerAttribute*u.count)):ga.enableAttribute(t),A.bindBuffer(A.ARRAY_BUFFER,y),A.vertexAttribPointer(t,w,H,ca,0,k*w*x)}else if(void 0!==l&&(ca=l[n],void 0!==ca))switch(ca.length){case 2:A.vertexAttrib2fv(t,ca);break;case 3:A.vertexAttrib3fv(t,ca);break;case 4:A.vertexAttrib4fv(t,ca);break;default:A.vertexAttrib1fv(t,ca)}}}ga.disableUnusedAttributes()}null!==b&&A.bindBuffer(A.ELEMENT_ARRAY_BUFFER,\nr.buffer)}r=0;null!==b?r=b.count:void 0!==q&&(r=q.count);b=c.drawRange.start*m;q=null!==f?f.start*m:0;n=Math.max(b,q);f=Math.max(0,Math.min(r,b+c.drawRange.count*m,q+(null!==f?f.count*m:Infinity))-1-n+1);if(0!==f){if(e.isMesh)if(!0===d.wireframe)ga.setLineWidth(d.wireframeLinewidth*(null===P?Q:1)),a.setMode(A.LINES);else switch(e.drawMode){case 0:a.setMode(A.TRIANGLES);break;case 1:a.setMode(A.TRIANGLE_STRIP);break;case 2:a.setMode(A.TRIANGLE_FAN)}else e.isLine?(d=d.linewidth,void 0===d&&(d=1),ga.setLineWidth(d*\n(null===P?Q:1)),e.isLineSegments?a.setMode(A.LINES):e.isLineLoop?a.setMode(A.LINE_LOOP):a.setMode(A.LINE_STRIP)):e.isPoints&&a.setMode(A.POINTS);c&&c.isInstancedBufferGeometry?0<c.maxInstancedCount&&a.renderInstances(c,n,f):a.render(n,f)}};this.compile=function(a,b){aa=[];a.traverse(function(a){a.isLight&&aa.push(a)});t(aa,b);a.traverse(function(b){if(b.material)if(Array.isArray(b.material))for(var c=0;c<b.material.length;c++)v(b.material[c],a.fog,b);else v(b.material,a.fog,b)})};this.animate=function(a){function b(){a();\n(sa.getDevice()||window).requestAnimationFrame(b)}(sa.getDevice()||window).requestAnimationFrame(b)};this.render=function(a,b,c,d){if(b&&b.isCamera){pa=\"\";V=-1;S=null;!0===a.autoUpdate&&a.updateMatrixWorld();null===b.parent&&b.updateMatrixWorld();sa.enabled&&(b=sa.getCamera(b));jd.multiplyMatrices(b.projectionMatrix,b.matrixWorldInverse);Vd.setFromMatrix(jd);aa.length=0;C.length=0;z.length=0;Wd=this.localClippingEnabled;id=Ha.init(this.clippingPlanes,Wd,b);F=Aa.get(a,b);F.init();k(a,b,B.sortObjects);\nF.finish();!0===B.sortObjects&&F.sort();id&&Ha.beginShadows();for(var e=aa,f=0,g=0,h=e.length;g<h;g++){var q=e[g];q.castShadow&&(da.shadows[f]=q,f++)}da.shadows.length=f;Ba.render(a,b);t(aa,b);id&&Ha.endShadows();la.frame++;la.calls=0;la.vertices=0;la.faces=0;la.points=0;void 0===c&&(c=null);this.setRenderTarget(c);ya.render(a,b,d);d=F.opaque;e=F.transparent;a.overrideMaterial?(f=a.overrideMaterial,d.length&&m(d,a,b,f),e.length&&m(e,a,b,f)):(d.length&&m(d,a,b),e.length&&m(e,a,b));Fa.render(a,b);Ga.render(a,\nb,U);c&&ra.updateRenderTargetMipmap(c);ga.buffers.depth.setTest(!0);ga.buffers.depth.setMask(!0);ga.buffers.color.setMask(!0);b.isArrayCamera&&B.setScissorTest(!1);sa.enabled&&sa.submitFrame()}else console.error(\"THREE.WebGLRenderer.render: camera is not an instance of THREE.Camera.\")};this.setFaceCulling=function(a,b){ga.setCullFace(a);ga.setFlipSided(0===b)};this.allocTextureUnit=function(){var a=X;a>=ia.maxTextures&&console.warn(\"THREE.WebGLRenderer: Trying to use \"+a+\" texture units while this GPU supports only \"+\nia.maxTextures);X+=1;return a};this.setTexture2D=function(){var a=!1;return function(b,c){b&&b.isWebGLRenderTarget&&(a||(console.warn(\"THREE.WebGLRenderer.setTexture2D: don't use render targets as textures. Use their .texture property instead.\"),a=!0),b=b.texture);ra.setTexture2D(b,c)}}();this.setTexture=function(){var a=!1;return function(b,c){a||(console.warn(\"THREE.WebGLRenderer: .setTexture is deprecated, use setTexture2D instead.\"),a=!0);ra.setTexture2D(b,c)}}();this.setTextureCube=function(){var a=\n!1;return function(b,c){b&&b.isWebGLRenderTargetCube&&(a||(console.warn(\"THREE.WebGLRenderer.setTextureCube: don't use cube render targets as textures. Use their .texture property instead.\"),a=!0),b=b.texture);b&&b.isCubeTexture||Array.isArray(b.image)&&6===b.image.length?ra.setTextureCube(b,c):ra.setTextureCubeDynamic(b,c)}}();this.getRenderTarget=function(){return P};this.setRenderTarget=function(a){(P=a)&&void 0===ha.get(a).__webglFramebuffer&&ra.setupRenderTarget(a);var b=a&&a.isWebGLRenderTargetCube,\nc;a?(c=ha.get(a),c=b?c.__webglFramebuffer[a.activeCubeFace]:c.__webglFramebuffer,J.copy(a.scissor),Z=a.scissorTest,U.copy(a.viewport)):(c=null,J.copy(ea).multiplyScalar(Q),Z=na,U.copy(hd).multiplyScalar(Q));M!==c&&(A.bindFramebuffer(A.FRAMEBUFFER,c),M=c);ga.scissor(J);ga.setScissorTest(Z);ga.viewport(U);b&&(b=ha.get(a.texture),A.framebufferTexture2D(A.FRAMEBUFFER,A.COLOR_ATTACHMENT0,A.TEXTURE_CUBE_MAP_POSITIVE_X+a.activeCubeFace,b.__webglTexture,a.activeMipMapLevel))};this.readRenderTargetPixels=\nfunction(a,b,c,d,e,f){if(a&&a.isWebGLRenderTarget){var g=ha.get(a).__webglFramebuffer;if(g){var h=!1;g!==M&&(A.bindFramebuffer(A.FRAMEBUFFER,g),h=!0);try{var k=a.texture,m=k.format,q=k.type;1023!==m&&y(m)!==A.getParameter(A.IMPLEMENTATION_COLOR_READ_FORMAT)?console.error(\"THREE.WebGLRenderer.readRenderTargetPixels: renderTarget is not in RGBA or implementation defined format.\"):1009===q||y(q)===A.getParameter(A.IMPLEMENTATION_COLOR_READ_TYPE)||1015===q&&(ma.get(\"OES_texture_float\")||ma.get(\"WEBGL_color_buffer_float\"))||\n1016===q&&ma.get(\"EXT_color_buffer_half_float\")?A.checkFramebufferStatus(A.FRAMEBUFFER)===A.FRAMEBUFFER_COMPLETE?0<=b&&b<=a.width-d&&0<=c&&c<=a.height-e&&A.readPixels(b,c,d,e,y(m),y(q),f):console.error(\"THREE.WebGLRenderer.readRenderTargetPixels: readPixels from renderTarget failed. Framebuffer not complete.\"):console.error(\"THREE.WebGLRenderer.readRenderTargetPixels: renderTarget is not in UnsignedByteType or implementation defined type.\")}finally{h&&A.bindFramebuffer(A.FRAMEBUFFER,M)}}}else console.error(\"THREE.WebGLRenderer.readRenderTargetPixels: renderTarget is not THREE.WebGLRenderTarget.\")}}\nfunction Ib(a,b){this.name=\"\";this.color=new G(a);this.density=void 0!==b?b:2.5E-4}function Jb(a,b,c){this.name=\"\";this.color=new G(a);this.near=void 0!==b?b:1;this.far=void 0!==c?c:1E3}function ld(){z.call(this);this.type=\"Scene\";this.overrideMaterial=this.fog=this.background=null;this.autoUpdate=!0}function Yd(a,b,c,d,e){z.call(this);this.lensFlares=[];this.positionScreen=new n;this.customUpdateCallback=void 0;void 0!==a&&this.add(a,b,c,d,e)}function bb(a){U.call(this);this.type=\"SpriteMaterial\";\nthis.color=new G(16777215);this.map=null;this.rotation=0;this.lights=this.fog=!1;this.setValues(a)}function xc(a){z.call(this);this.type=\"Sprite\";this.material=void 0!==a?a:new bb}function yc(){z.call(this);this.type=\"LOD\";Object.defineProperties(this,{levels:{enumerable:!0,value:[]}})}function zc(a,b){a=a||[];this.bones=a.slice(0);this.boneMatrices=new Float32Array(16*this.bones.length);if(void 0===b)this.calculateInverses();else if(this.bones.length===b.length)this.boneInverses=b.slice(0);else{console.warn(\"THREE.Skeleton boneInverses is the wrong length.\");\nthis.boneInverses=[];for(var c=0,d=this.bones.length;c<d;c++)this.boneInverses.push(new K)}}function md(){z.call(this);this.type=\"Bone\"}function nd(a,b){la.call(this,a,b);this.type=\"SkinnedMesh\";this.bindMode=\"attached\";this.bindMatrix=new K;this.bindMatrixInverse=new K;var c=this.initBones(),c=new zc(c);this.bind(c,this.matrixWorld);this.normalizeSkinWeights()}function ea(a){U.call(this);this.type=\"LineBasicMaterial\";this.color=new G(16777215);this.linewidth=1;this.linejoin=this.linecap=\"round\";\nthis.lights=!1;this.setValues(a)}function sa(a,b,c){if(1===c)return console.warn(\"THREE.Line: parameter THREE.LinePieces no longer supported. Created THREE.LineSegments instead.\"),new Q(a,b);z.call(this);this.type=\"Line\";this.geometry=void 0!==a?a:new E;this.material=void 0!==b?b:new ea({color:16777215*Math.random()})}function Q(a,b){sa.call(this,a,b);this.type=\"LineSegments\"}function od(a,b){sa.call(this,a,b);this.type=\"LineLoop\"}function Fa(a){U.call(this);this.type=\"PointsMaterial\";this.color=\nnew G(16777215);this.map=null;this.size=1;this.sizeAttenuation=!0;this.lights=!1;this.setValues(a)}function Kb(a,b){z.call(this);this.type=\"Points\";this.geometry=void 0!==a?a:new E;this.material=void 0!==b?b:new Fa({color:16777215*Math.random()})}function Ac(){z.call(this);this.type=\"Group\"}function pd(a,b,c,d,e,f,g,h,k){function m(){requestAnimationFrame(m);a.readyState>=a.HAVE_CURRENT_DATA&&(q.needsUpdate=!0)}ba.call(this,a,b,c,d,e,f,g,h,k);this.generateMipmaps=!1;var q=this;m()}function Lb(a,b,\nc,d,e,f,g,h,k,m,q,v){ba.call(this,null,f,g,h,k,m,d,e,q,v);this.image={width:b,height:c};this.mipmaps=a;this.generateMipmaps=this.flipY=!1}function qd(a,b,c,d,e,f,g,h,k){ba.call(this,a,b,c,d,e,f,g,h,k);this.needsUpdate=!0}function Bc(a,b,c,d,e,f,g,h,k,m){m=void 0!==m?m:1026;if(1026!==m&&1027!==m)throw Error(\"DepthTexture format must be either THREE.DepthFormat or THREE.DepthStencilFormat\");void 0===c&&1026===m&&(c=1012);void 0===c&&1027===m&&(c=1020);ba.call(this,null,d,e,f,g,h,m,c,k);this.image={width:a,\nheight:b};this.magFilter=void 0!==g?g:1003;this.minFilter=void 0!==h?h:1003;this.generateMipmaps=this.flipY=!1}function Mb(a){E.call(this);this.type=\"WireframeGeometry\";var b=[],c,d,e,f,g=[0,0],h={},k,m,q=[\"a\",\"b\",\"c\"];if(a&&a.isGeometry){var v=a.faces;c=0;for(e=v.length;c<e;c++){var p=v[c];for(d=0;3>d;d++)k=p[q[d]],m=p[q[(d+1)%3]],g[0]=Math.min(k,m),g[1]=Math.max(k,m),k=g[0]+\",\"+g[1],void 0===h[k]&&(h[k]={index1:g[0],index2:g[1]})}for(k in h)c=h[k],q=a.vertices[c.index1],b.push(q.x,q.y,q.z),q=a.vertices[c.index2],\nb.push(q.x,q.y,q.z)}else if(a&&a.isBufferGeometry){var r,q=new n;if(null!==a.index){v=a.attributes.position;p=a.index;r=a.groups;0===r.length&&(r=[{start:0,count:p.count,materialIndex:0}]);a=0;for(f=r.length;a<f;++a)for(c=r[a],d=c.start,e=c.count,c=d,e=d+e;c<e;c+=3)for(d=0;3>d;d++)k=p.getX(c+d),m=p.getX(c+(d+1)%3),g[0]=Math.min(k,m),g[1]=Math.max(k,m),k=g[0]+\",\"+g[1],void 0===h[k]&&(h[k]={index1:g[0],index2:g[1]});for(k in h)c=h[k],q.fromBufferAttribute(v,c.index1),b.push(q.x,q.y,q.z),q.fromBufferAttribute(v,\nc.index2),b.push(q.x,q.y,q.z)}else for(v=a.attributes.position,c=0,e=v.count/3;c<e;c++)for(d=0;3>d;d++)h=3*c+d,q.fromBufferAttribute(v,h),b.push(q.x,q.y,q.z),h=3*c+(d+1)%3,q.fromBufferAttribute(v,h),b.push(q.x,q.y,q.z)}this.addAttribute(\"position\",new B(b,3))}function Cc(a,b,c){J.call(this);this.type=\"ParametricGeometry\";this.parameters={func:a,slices:b,stacks:c};this.fromBufferGeometry(new Nb(a,b,c));this.mergeVertices()}function Nb(a,b,c){E.call(this);this.type=\"ParametricBufferGeometry\";this.parameters=\n{func:a,slices:b,stacks:c};var d=[],e=[],f=[],g=[],h=new n,k=new n,m=new n,q=new n,v=new n,p,r,l=b+1;for(p=0;p<=c;p++){var t=p/c;for(r=0;r<=b;r++){var y=r/b,k=a(y,t,k);e.push(k.x,k.y,k.z);0<=y-1E-5?(m=a(y-1E-5,t,m),q.subVectors(k,m)):(m=a(y+1E-5,t,m),q.subVectors(m,k));0<=t-1E-5?(m=a(y,t-1E-5,m),v.subVectors(k,m)):(m=a(y,t+1E-5,m),v.subVectors(m,k));h.crossVectors(q,v).normalize();f.push(h.x,h.y,h.z);g.push(y,t)}}for(p=0;p<c;p++)for(r=0;r<b;r++)a=p*l+r+1,h=(p+1)*l+r+1,k=(p+1)*l+r,d.push(p*l+r,a,k),\nd.push(a,h,k);this.setIndex(d);this.addAttribute(\"position\",new B(e,3));this.addAttribute(\"normal\",new B(f,3));this.addAttribute(\"uv\",new B(g,2))}function Dc(a,b,c,d){J.call(this);this.type=\"PolyhedronGeometry\";this.parameters={vertices:a,indices:b,radius:c,detail:d};this.fromBufferGeometry(new za(a,b,c,d));this.mergeVertices()}function za(a,b,c,d){function e(a){h.push(a.x,a.y,a.z)}function f(b,c){var d=3*b;c.x=a[d+0];c.y=a[d+1];c.z=a[d+2]}function g(a,b,c,d){0>d&&1===a.x&&(k[b]=a.x-1);0===c.x&&0===\nc.z&&(k[b]=d/2/Math.PI+.5)}E.call(this);this.type=\"PolyhedronBufferGeometry\";this.parameters={vertices:a,indices:b,radius:c,detail:d};c=c||1;d=d||0;var h=[],k=[];(function(a){for(var c=new n,d=new n,g=new n,h=0;h<b.length;h+=3){f(b[h+0],c);f(b[h+1],d);f(b[h+2],g);var k=c,l=d,y=g,x=Math.pow(2,a),u=[],H,w;for(H=0;H<=x;H++){u[H]=[];var I=k.clone().lerp(y,H/x),W=l.clone().lerp(y,H/x),D=x-H;for(w=0;w<=D;w++)u[H][w]=0===w&&H===x?I:I.clone().lerp(W,w/D)}for(H=0;H<x;H++)for(w=0;w<2*(x-H)-1;w++)k=Math.floor(w/\n2),0===w%2?(e(u[H][k+1]),e(u[H+1][k]),e(u[H][k])):(e(u[H][k+1]),e(u[H+1][k+1]),e(u[H+1][k]))}})(d);(function(a){for(var b=new n,c=0;c<h.length;c+=3)b.x=h[c+0],b.y=h[c+1],b.z=h[c+2],b.normalize().multiplyScalar(a),h[c+0]=b.x,h[c+1]=b.y,h[c+2]=b.z})(c);(function(){for(var a=new n,b=0;b<h.length;b+=3)a.x=h[b+0],a.y=h[b+1],a.z=h[b+2],k.push(Math.atan2(a.z,-a.x)/2/Math.PI+.5,1-(Math.atan2(-a.y,Math.sqrt(a.x*a.x+a.z*a.z))/Math.PI+.5));for(var a=new n,b=new n,c=new n,d=new n,e=new C,f=new C,l=new C,y=0,\nx=0;y<h.length;y+=9,x+=6){a.set(h[y+0],h[y+1],h[y+2]);b.set(h[y+3],h[y+4],h[y+5]);c.set(h[y+6],h[y+7],h[y+8]);e.set(k[x+0],k[x+1]);f.set(k[x+2],k[x+3]);l.set(k[x+4],k[x+5]);d.copy(a).add(b).add(c).divideScalar(3);var u=Math.atan2(d.z,-d.x);g(e,x+0,a,u);g(f,x+2,b,u);g(l,x+4,c,u)}for(a=0;a<k.length;a+=6)b=k[a+0],c=k[a+2],d=k[a+4],e=Math.min(b,c,d),.9<Math.max(b,c,d)&&.1>e&&(.2>b&&(k[a+0]+=1),.2>c&&(k[a+2]+=1),.2>d&&(k[a+4]+=1))})();this.addAttribute(\"position\",new B(h,3));this.addAttribute(\"normal\",\nnew B(h.slice(),3));this.addAttribute(\"uv\",new B(k,2));0===d?this.computeVertexNormals():this.normalizeNormals()}function Ec(a,b){J.call(this);this.type=\"TetrahedronGeometry\";this.parameters={radius:a,detail:b};this.fromBufferGeometry(new Ob(a,b));this.mergeVertices()}function Ob(a,b){za.call(this,[1,1,1,-1,-1,1,-1,1,-1,1,-1,-1],[2,1,0,0,3,2,1,3,0,2,3,1],a,b);this.type=\"TetrahedronBufferGeometry\";this.parameters={radius:a,detail:b}}function Fc(a,b){J.call(this);this.type=\"OctahedronGeometry\";this.parameters=\n{radius:a,detail:b};this.fromBufferGeometry(new lb(a,b));this.mergeVertices()}function lb(a,b){za.call(this,[1,0,0,-1,0,0,0,1,0,0,-1,0,0,0,1,0,0,-1],[0,2,4,0,4,3,0,3,5,0,5,2,1,2,5,1,5,3,1,3,4,1,4,2],a,b);this.type=\"OctahedronBufferGeometry\";this.parameters={radius:a,detail:b}}function Gc(a,b){J.call(this);this.type=\"IcosahedronGeometry\";this.parameters={radius:a,detail:b};this.fromBufferGeometry(new Pb(a,b));this.mergeVertices()}function Pb(a,b){var c=(1+Math.sqrt(5))/2;za.call(this,[-1,c,0,1,c,0,\n-1,-c,0,1,-c,0,0,-1,c,0,1,c,0,-1,-c,0,1,-c,c,0,-1,c,0,1,-c,0,-1,-c,0,1],[0,11,5,0,5,1,0,1,7,0,7,10,0,10,11,1,5,9,5,11,4,11,10,2,10,7,6,7,1,8,3,9,4,3,4,2,3,2,6,3,6,8,3,8,9,4,9,5,2,4,11,6,2,10,8,6,7,9,8,1],a,b);this.type=\"IcosahedronBufferGeometry\";this.parameters={radius:a,detail:b}}function Hc(a,b){J.call(this);this.type=\"DodecahedronGeometry\";this.parameters={radius:a,detail:b};this.fromBufferGeometry(new Qb(a,b));this.mergeVertices()}function Qb(a,b){var c=(1+Math.sqrt(5))/2,d=1/c;za.call(this,\n[-1,-1,-1,-1,-1,1,-1,1,-1,-1,1,1,1,-1,-1,1,-1,1,1,1,-1,1,1,1,0,-d,-c,0,-d,c,0,d,-c,0,d,c,-d,-c,0,-d,c,0,d,-c,0,d,c,0,-c,0,-d,c,0,-d,-c,0,d,c,0,d],[3,11,7,3,7,15,3,15,13,7,19,17,7,17,6,7,6,15,17,4,8,17,8,10,17,10,6,8,0,16,8,16,2,8,2,10,0,12,1,0,1,18,0,18,16,6,10,2,6,2,13,6,13,15,2,16,18,2,18,3,2,3,13,18,1,9,18,9,11,18,11,3,4,14,12,4,12,0,4,0,8,11,9,5,11,5,19,11,19,7,19,5,14,19,14,4,19,4,17,1,12,14,1,14,5,1,5,9],a,b);this.type=\"DodecahedronBufferGeometry\";this.parameters={radius:a,detail:b}}function Ic(a,\nb,c,d,e,f){J.call(this);this.type=\"TubeGeometry\";this.parameters={path:a,tubularSegments:b,radius:c,radialSegments:d,closed:e};void 0!==f&&console.warn(\"THREE.TubeGeometry: taper has been removed.\");a=new Rb(a,b,c,d,e);this.tangents=a.tangents;this.normals=a.normals;this.binormals=a.binormals;this.fromBufferGeometry(a);this.mergeVertices()}function Rb(a,b,c,d,e){function f(e){var f=a.getPointAt(e/b),m=g.normals[e];e=g.binormals[e];for(v=0;v<=d;v++){var q=v/d*Math.PI*2,l=Math.sin(q),q=-Math.cos(q);\nk.x=q*m.x+l*e.x;k.y=q*m.y+l*e.y;k.z=q*m.z+l*e.z;k.normalize();r.push(k.x,k.y,k.z);h.x=f.x+c*k.x;h.y=f.y+c*k.y;h.z=f.z+c*k.z;p.push(h.x,h.y,h.z)}}E.call(this);this.type=\"TubeBufferGeometry\";this.parameters={path:a,tubularSegments:b,radius:c,radialSegments:d,closed:e};b=b||64;c=c||1;d=d||8;e=e||!1;var g=a.computeFrenetFrames(b,e);this.tangents=g.tangents;this.normals=g.normals;this.binormals=g.binormals;var h=new n,k=new n,m=new C,q,v,p=[],r=[],l=[],t=[];for(q=0;q<b;q++)f(q);f(!1===e?b:0);for(q=0;q<=\nb;q++)for(v=0;v<=d;v++)m.x=q/b,m.y=v/d,l.push(m.x,m.y);(function(){for(v=1;v<=b;v++)for(q=1;q<=d;q++){var a=(d+1)*v+(q-1),c=(d+1)*v+q,e=(d+1)*(v-1)+q;t.push((d+1)*(v-1)+(q-1),a,e);t.push(a,c,e)}})();this.setIndex(t);this.addAttribute(\"position\",new B(p,3));this.addAttribute(\"normal\",new B(r,3));this.addAttribute(\"uv\",new B(l,2))}function Jc(a,b,c,d,e,f,g){J.call(this);this.type=\"TorusKnotGeometry\";this.parameters={radius:a,tube:b,tubularSegments:c,radialSegments:d,p:e,q:f};void 0!==g&&console.warn(\"THREE.TorusKnotGeometry: heightScale has been deprecated. Use .scale( x, y, z ) instead.\");\nthis.fromBufferGeometry(new Sb(a,b,c,d,e,f));this.mergeVertices()}function Sb(a,b,c,d,e,f){function g(a,b,c,d,e){var f=Math.sin(a);b=c/b*a;c=Math.cos(b);e.x=d*(2+c)*.5*Math.cos(a);e.y=d*(2+c)*f*.5;e.z=d*Math.sin(b)*.5}E.call(this);this.type=\"TorusKnotBufferGeometry\";this.parameters={radius:a,tube:b,tubularSegments:c,radialSegments:d,p:e,q:f};a=a||100;b=b||40;c=Math.floor(c)||64;d=Math.floor(d)||8;e=e||2;f=f||3;var h=[],k=[],m=[],q=[],v,p,r=new n,l=new n,t=new n,y=new n,x=new n,u=new n,H=new n;for(v=\n0;v<=c;++v)for(p=v/c*e*Math.PI*2,g(p,e,f,a,t),g(p+.01,e,f,a,y),u.subVectors(y,t),H.addVectors(y,t),x.crossVectors(u,H),H.crossVectors(x,u),x.normalize(),H.normalize(),p=0;p<=d;++p){var w=p/d*Math.PI*2,I=-b*Math.cos(w),w=b*Math.sin(w);r.x=t.x+(I*H.x+w*x.x);r.y=t.y+(I*H.y+w*x.y);r.z=t.z+(I*H.z+w*x.z);k.push(r.x,r.y,r.z);l.subVectors(r,t).normalize();m.push(l.x,l.y,l.z);q.push(v/c);q.push(p/d)}for(p=1;p<=c;p++)for(v=1;v<=d;v++)a=(d+1)*p+(v-1),b=(d+1)*p+v,e=(d+1)*(p-1)+v,h.push((d+1)*(p-1)+(v-1),a,e),\nh.push(a,b,e);this.setIndex(h);this.addAttribute(\"position\",new B(k,3));this.addAttribute(\"normal\",new B(m,3));this.addAttribute(\"uv\",new B(q,2))}function Kc(a,b,c,d,e){J.call(this);this.type=\"TorusGeometry\";this.parameters={radius:a,tube:b,radialSegments:c,tubularSegments:d,arc:e};this.fromBufferGeometry(new Tb(a,b,c,d,e));this.mergeVertices()}function Tb(a,b,c,d,e){E.call(this);this.type=\"TorusBufferGeometry\";this.parameters={radius:a,tube:b,radialSegments:c,tubularSegments:d,arc:e};a=a||100;b=\nb||40;c=Math.floor(c)||8;d=Math.floor(d)||6;e=e||2*Math.PI;var f=[],g=[],h=[],k=[],m=new n,q=new n,v=new n,p,r;for(p=0;p<=c;p++)for(r=0;r<=d;r++){var l=r/d*e,t=p/c*Math.PI*2;q.x=(a+b*Math.cos(t))*Math.cos(l);q.y=(a+b*Math.cos(t))*Math.sin(l);q.z=b*Math.sin(t);g.push(q.x,q.y,q.z);m.x=a*Math.cos(l);m.y=a*Math.sin(l);v.subVectors(q,m).normalize();h.push(v.x,v.y,v.z);k.push(r/d);k.push(p/c)}for(p=1;p<=c;p++)for(r=1;r<=d;r++)a=(d+1)*(p-1)+r-1,b=(d+1)*(p-1)+r,e=(d+1)*p+r,f.push((d+1)*p+r-1,a,e),f.push(a,\nb,e);this.setIndex(f);this.addAttribute(\"position\",new B(g,3));this.addAttribute(\"normal\",new B(h,3));this.addAttribute(\"uv\",new B(k,2))}function cb(a,b){J.call(this);this.type=\"ExtrudeGeometry\";this.parameters={shapes:a,options:b};this.fromBufferGeometry(new Ga(a,b));this.mergeVertices()}function Ga(a,b){\"undefined\"!==typeof a&&(E.call(this),this.type=\"ExtrudeBufferGeometry\",a=Array.isArray(a)?a:[a],this.addShapeList(a,b),this.computeVertexNormals())}function Lc(a,b){J.call(this);this.type=\"TextGeometry\";\nthis.parameters={text:a,parameters:b};this.fromBufferGeometry(new Ub(a,b));this.mergeVertices()}function Ub(a,b){b=b||{};var c=b.font;if(!c||!c.isFont)return console.error(\"THREE.TextGeometry: font parameter is not an instance of THREE.Font.\"),new J;c=c.generateShapes(a,b.size,b.curveSegments);b.amount=void 0!==b.height?b.height:50;void 0===b.bevelThickness&&(b.bevelThickness=10);void 0===b.bevelSize&&(b.bevelSize=8);void 0===b.bevelEnabled&&(b.bevelEnabled=!1);Ga.call(this,c,b);this.type=\"TextBufferGeometry\"}\nfunction Mc(a,b,c,d,e,f,g){J.call(this);this.type=\"SphereGeometry\";this.parameters={radius:a,widthSegments:b,heightSegments:c,phiStart:d,phiLength:e,thetaStart:f,thetaLength:g};this.fromBufferGeometry(new mb(a,b,c,d,e,f,g));this.mergeVertices()}function mb(a,b,c,d,e,f,g){E.call(this);this.type=\"SphereBufferGeometry\";this.parameters={radius:a,widthSegments:b,heightSegments:c,phiStart:d,phiLength:e,thetaStart:f,thetaLength:g};a=a||50;b=Math.max(3,Math.floor(b)||8);c=Math.max(2,Math.floor(c)||6);d=void 0!==\nd?d:0;e=void 0!==e?e:2*Math.PI;f=void 0!==f?f:0;g=void 0!==g?g:Math.PI;var h=f+g,k,m,q=0,v=[],p=new n,r=new n,l=[],t=[],y=[],x=[];for(m=0;m<=c;m++){var u=[],H=m/c;for(k=0;k<=b;k++){var w=k/b;p.x=-a*Math.cos(d+w*e)*Math.sin(f+H*g);p.y=a*Math.cos(f+H*g);p.z=a*Math.sin(d+w*e)*Math.sin(f+H*g);t.push(p.x,p.y,p.z);r.set(p.x,p.y,p.z).normalize();y.push(r.x,r.y,r.z);x.push(w,1-H);u.push(q++)}v.push(u)}for(m=0;m<c;m++)for(k=0;k<b;k++)a=v[m][k+1],d=v[m][k],e=v[m+1][k],g=v[m+1][k+1],(0!==m||0<f)&&l.push(a,d,\ng),(m!==c-1||h<Math.PI)&&l.push(d,e,g);this.setIndex(l);this.addAttribute(\"position\",new B(t,3));this.addAttribute(\"normal\",new B(y,3));this.addAttribute(\"uv\",new B(x,2))}function Nc(a,b,c,d,e,f){J.call(this);this.type=\"RingGeometry\";this.parameters={innerRadius:a,outerRadius:b,thetaSegments:c,phiSegments:d,thetaStart:e,thetaLength:f};this.fromBufferGeometry(new Vb(a,b,c,d,e,f));this.mergeVertices()}function Vb(a,b,c,d,e,f){E.call(this);this.type=\"RingBufferGeometry\";this.parameters={innerRadius:a,\nouterRadius:b,thetaSegments:c,phiSegments:d,thetaStart:e,thetaLength:f};a=a||20;b=b||50;e=void 0!==e?e:0;f=void 0!==f?f:2*Math.PI;c=void 0!==c?Math.max(3,c):8;d=void 0!==d?Math.max(1,d):1;var g=[],h=[],k=[],m=[],q=a,v=(b-a)/d,p=new n,r=new C,l,t;for(l=0;l<=d;l++){for(t=0;t<=c;t++)a=e+t/c*f,p.x=q*Math.cos(a),p.y=q*Math.sin(a),h.push(p.x,p.y,p.z),k.push(0,0,1),r.x=(p.x/b+1)/2,r.y=(p.y/b+1)/2,m.push(r.x,r.y);q+=v}for(l=0;l<d;l++)for(b=l*(c+1),t=0;t<c;t++)a=t+b,e=a+c+1,f=a+c+2,q=a+1,g.push(a,e,q),g.push(e,\nf,q);this.setIndex(g);this.addAttribute(\"position\",new B(h,3));this.addAttribute(\"normal\",new B(k,3));this.addAttribute(\"uv\",new B(m,2))}function Oc(a,b,c,d){J.call(this);this.type=\"LatheGeometry\";this.parameters={points:a,segments:b,phiStart:c,phiLength:d};this.fromBufferGeometry(new Wb(a,b,c,d));this.mergeVertices()}function Wb(a,b,c,d){E.call(this);this.type=\"LatheBufferGeometry\";this.parameters={points:a,segments:b,phiStart:c,phiLength:d};b=Math.floor(b)||12;c=c||0;d=d||2*Math.PI;d=Y.clamp(d,\n0,2*Math.PI);var e=[],f=[],g=[],h=1/b,k=new n,m=new C,q,v;for(q=0;q<=b;q++){v=c+q*h*d;var p=Math.sin(v),r=Math.cos(v);for(v=0;v<=a.length-1;v++)k.x=a[v].x*p,k.y=a[v].y,k.z=a[v].x*r,f.push(k.x,k.y,k.z),m.x=q/b,m.y=v/(a.length-1),g.push(m.x,m.y)}for(q=0;q<b;q++)for(v=0;v<a.length-1;v++)c=v+q*a.length,h=c+a.length,k=c+a.length+1,m=c+1,e.push(c,h,m),e.push(h,k,m);this.setIndex(e);this.addAttribute(\"position\",new B(f,3));this.addAttribute(\"uv\",new B(g,2));this.computeVertexNormals();if(d===2*Math.PI)for(d=\nthis.attributes.normal.array,e=new n,f=new n,g=new n,c=b*a.length*3,v=q=0;q<a.length;q++,v+=3)e.x=d[v+0],e.y=d[v+1],e.z=d[v+2],f.x=d[c+v+0],f.y=d[c+v+1],f.z=d[c+v+2],g.addVectors(e,f).normalize(),d[v+0]=d[c+v+0]=g.x,d[v+1]=d[c+v+1]=g.y,d[v+2]=d[c+v+2]=g.z}function Xb(a,b){J.call(this);this.type=\"ShapeGeometry\";\"object\"===typeof b&&(console.warn(\"THREE.ShapeGeometry: Options parameter has been removed.\"),b=b.curveSegments);this.parameters={shapes:a,curveSegments:b};this.fromBufferGeometry(new Yb(a,\nb));this.mergeVertices()}function Yb(a,b){function c(a){var c,h,m=e.length/3;a=a.extractPoints(b);var l=a.shape,n=a.holes;if(!1===Ia.isClockWise(l))for(l=l.reverse(),a=0,c=n.length;a<c;a++)h=n[a],!0===Ia.isClockWise(h)&&(n[a]=h.reverse());var y=Ia.triangulateShape(l,n);a=0;for(c=n.length;a<c;a++)h=n[a],l=l.concat(h);a=0;for(c=l.length;a<c;a++)h=l[a],e.push(h.x,h.y,0),f.push(0,0,1),g.push(h.x,h.y);a=0;for(c=y.length;a<c;a++)l=y[a],d.push(l[0]+m,l[1]+m,l[2]+m),k+=3}E.call(this);this.type=\"ShapeBufferGeometry\";\nthis.parameters={shapes:a,curveSegments:b};b=b||12;var d=[],e=[],f=[],g=[],h=0,k=0;if(!1===Array.isArray(a))c(a);else for(var m=0;m<a.length;m++)c(a[m]),this.addGroup(h,k,m),h+=k,k=0;this.setIndex(d);this.addAttribute(\"position\",new B(e,3));this.addAttribute(\"normal\",new B(f,3));this.addAttribute(\"uv\",new B(g,2))}function Zb(a,b){E.call(this);this.type=\"EdgesGeometry\";this.parameters={thresholdAngle:b};var c=[],d=Math.cos(Y.DEG2RAD*(void 0!==b?b:1)),e=[0,0],f={},g,h,k=[\"a\",\"b\",\"c\"],m;a.isBufferGeometry?\n(m=new J,m.fromBufferGeometry(a)):m=a.clone();m.mergeVertices();m.computeFaceNormals();var q=m.vertices;m=m.faces;for(var v=0,p=m.length;v<p;v++)for(var l=m[v],n=0;3>n;n++)g=l[k[n]],h=l[k[(n+1)%3]],e[0]=Math.min(g,h),e[1]=Math.max(g,h),g=e[0]+\",\"+e[1],void 0===f[g]?f[g]={index1:e[0],index2:e[1],face1:v,face2:void 0}:f[g].face2=v;for(g in f)if(e=f[g],void 0===e.face2||m[e.face1].normal.dot(m[e.face2].normal)<=d)k=q[e.index1],c.push(k.x,k.y,k.z),k=q[e.index2],c.push(k.x,k.y,k.z);this.addAttribute(\"position\",\nnew B(c,3))}function nb(a,b,c,d,e,f,g,h){J.call(this);this.type=\"CylinderGeometry\";this.parameters={radiusTop:a,radiusBottom:b,height:c,radialSegments:d,heightSegments:e,openEnded:f,thetaStart:g,thetaLength:h};this.fromBufferGeometry(new Ua(a,b,c,d,e,f,g,h));this.mergeVertices()}function Ua(a,b,c,d,e,f,g,h){function k(c){var e,f,k,t=new C,D=new n,O=0,aa=!0===c?a:b,F=!0===c?1:-1;f=ca;for(e=1;e<=d;e++)v.push(0,y*F,0),p.push(0,F,0),l.push(.5,.5),ca++;k=ca;for(e=0;e<=d;e++){var B=e/d*h+g,z=Math.cos(B),\nB=Math.sin(B);D.x=aa*B;D.y=y*F;D.z=aa*z;v.push(D.x,D.y,D.z);p.push(0,F,0);t.x=.5*z+.5;t.y=.5*B*F+.5;l.push(t.x,t.y);ca++}for(e=0;e<d;e++)t=f+e,D=k+e,!0===c?q.push(D,D+1,t):q.push(D+1,D,t),O+=3;m.addGroup(x,O,!0===c?1:2);x+=O}E.call(this);this.type=\"CylinderBufferGeometry\";this.parameters={radiusTop:a,radiusBottom:b,height:c,radialSegments:d,heightSegments:e,openEnded:f,thetaStart:g,thetaLength:h};var m=this;a=void 0!==a?a:20;b=void 0!==b?b:20;c=void 0!==c?c:100;d=Math.floor(d)||8;e=Math.floor(e)||\n1;f=void 0!==f?f:!1;g=void 0!==g?g:0;h=void 0!==h?h:2*Math.PI;var q=[],v=[],p=[],l=[],ca=0,t=[],y=c/2,x=0;(function(){var f,k,w=new n,I=new n,W=0,D=(b-a)/c;for(k=0;k<=e;k++){var O=[],aa=k/e,F=aa*(b-a)+a;for(f=0;f<=d;f++){var B=f/d,C=B*h+g,z=Math.sin(C),C=Math.cos(C);I.x=F*z;I.y=-aa*c+y;I.z=F*C;v.push(I.x,I.y,I.z);w.set(z,D,C).normalize();p.push(w.x,w.y,w.z);l.push(B,1-aa);O.push(ca++)}t.push(O)}for(f=0;f<d;f++)for(k=0;k<e;k++)w=t[k+1][f],I=t[k+1][f+1],D=t[k][f+1],q.push(t[k][f],w,D),q.push(w,I,D),\nW+=6;m.addGroup(x,W,0);x+=W})();!1===f&&(0<a&&k(!0),0<b&&k(!1));this.setIndex(q);this.addAttribute(\"position\",new B(v,3));this.addAttribute(\"normal\",new B(p,3));this.addAttribute(\"uv\",new B(l,2))}function Pc(a,b,c,d,e,f,g){nb.call(this,0,a,b,c,d,e,f,g);this.type=\"ConeGeometry\";this.parameters={radius:a,height:b,radialSegments:c,heightSegments:d,openEnded:e,thetaStart:f,thetaLength:g}}function Qc(a,b,c,d,e,f,g){Ua.call(this,0,a,b,c,d,e,f,g);this.type=\"ConeBufferGeometry\";this.parameters={radius:a,\nheight:b,radialSegments:c,heightSegments:d,openEnded:e,thetaStart:f,thetaLength:g}}function Rc(a,b,c,d){J.call(this);this.type=\"CircleGeometry\";this.parameters={radius:a,segments:b,thetaStart:c,thetaLength:d};this.fromBufferGeometry(new $b(a,b,c,d));this.mergeVertices()}function $b(a,b,c,d){E.call(this);this.type=\"CircleBufferGeometry\";this.parameters={radius:a,segments:b,thetaStart:c,thetaLength:d};a=a||50;b=void 0!==b?Math.max(3,b):8;c=void 0!==c?c:0;d=void 0!==d?d:2*Math.PI;var e=[],f=[],g=[],\nh=[],k,m,q=new n,v=new C;f.push(0,0,0);g.push(0,0,1);h.push(.5,.5);m=0;for(k=3;m<=b;m++,k+=3){var p=c+m/b*d;q.x=a*Math.cos(p);q.y=a*Math.sin(p);f.push(q.x,q.y,q.z);g.push(0,0,1);v.x=(f[k]/a+1)/2;v.y=(f[k+1]/a+1)/2;h.push(v.x,v.y)}for(k=1;k<=b;k++)e.push(k,k+1,0);this.setIndex(e);this.addAttribute(\"position\",new B(f,3));this.addAttribute(\"normal\",new B(g,3));this.addAttribute(\"uv\",new B(h,2))}function ac(a){ra.call(this,{uniforms:Ca.merge([R.lights,{opacity:{value:1}}]),vertexShader:X.shadow_vert,\nfragmentShader:X.shadow_frag});this.transparent=this.lights=!0;Object.defineProperties(this,{opacity:{enumerable:!0,get:function(){return this.uniforms.opacity.value},set:function(a){this.uniforms.opacity.value=a}}});this.setValues(a)}function bc(a){ra.call(this,a);this.type=\"RawShaderMaterial\"}function Pa(a){U.call(this);this.defines={STANDARD:\"\"};this.type=\"MeshStandardMaterial\";this.color=new G(16777215);this.metalness=this.roughness=.5;this.lightMap=this.map=null;this.lightMapIntensity=1;this.aoMap=\nnull;this.aoMapIntensity=1;this.emissive=new G(0);this.emissiveIntensity=1;this.bumpMap=this.emissiveMap=null;this.bumpScale=1;this.normalMap=null;this.normalScale=new C(1,1);this.displacementMap=null;this.displacementScale=1;this.displacementBias=0;this.envMap=this.alphaMap=this.metalnessMap=this.roughnessMap=null;this.envMapIntensity=1;this.refractionRatio=.98;this.wireframe=!1;this.wireframeLinewidth=1;this.wireframeLinejoin=this.wireframeLinecap=\"round\";this.morphNormals=this.morphTargets=this.skinning=\n!1;this.setValues(a)}function ob(a){Pa.call(this);this.defines={PHYSICAL:\"\"};this.type=\"MeshPhysicalMaterial\";this.reflectivity=.5;this.clearCoatRoughness=this.clearCoat=0;this.setValues(a)}function Ja(a){U.call(this);this.type=\"MeshPhongMaterial\";this.color=new G(16777215);this.specular=new G(1118481);this.shininess=30;this.lightMap=this.map=null;this.lightMapIntensity=1;this.aoMap=null;this.aoMapIntensity=1;this.emissive=new G(0);this.emissiveIntensity=1;this.bumpMap=this.emissiveMap=null;this.bumpScale=\n1;this.normalMap=null;this.normalScale=new C(1,1);this.displacementMap=null;this.displacementScale=1;this.displacementBias=0;this.envMap=this.alphaMap=this.specularMap=null;this.combine=0;this.reflectivity=1;this.refractionRatio=.98;this.wireframe=!1;this.wireframeLinewidth=1;this.wireframeLinejoin=this.wireframeLinecap=\"round\";this.morphNormals=this.morphTargets=this.skinning=!1;this.setValues(a)}function pb(a){Ja.call(this);this.defines={TOON:\"\"};this.type=\"MeshToonMaterial\";this.gradientMap=null;\nthis.setValues(a)}function qb(a){U.call(this);this.type=\"MeshNormalMaterial\";this.bumpMap=null;this.bumpScale=1;this.normalMap=null;this.normalScale=new C(1,1);this.displacementMap=null;this.displacementScale=1;this.displacementBias=0;this.wireframe=!1;this.wireframeLinewidth=1;this.morphNormals=this.morphTargets=this.skinning=this.lights=this.fog=!1;this.setValues(a)}function rb(a){U.call(this);this.type=\"MeshLambertMaterial\";this.color=new G(16777215);this.lightMap=this.map=null;this.lightMapIntensity=\n1;this.aoMap=null;this.aoMapIntensity=1;this.emissive=new G(0);this.emissiveIntensity=1;this.envMap=this.alphaMap=this.specularMap=this.emissiveMap=null;this.combine=0;this.reflectivity=1;this.refractionRatio=.98;this.wireframe=!1;this.wireframeLinewidth=1;this.wireframeLinejoin=this.wireframeLinecap=\"round\";this.morphNormals=this.morphTargets=this.skinning=!1;this.setValues(a)}function sb(a){U.call(this);this.type=\"LineDashedMaterial\";this.color=new G(16777215);this.scale=this.linewidth=1;this.dashSize=\n3;this.gapSize=1;this.lights=!1;this.setValues(a)}function Zd(a,b,c){var d=this,e=!1,f=0,g=0;this.onStart=void 0;this.onLoad=a;this.onProgress=b;this.onError=c;this.itemStart=function(a){g++;if(!1===e&&void 0!==d.onStart)d.onStart(a,f,g);e=!0};this.itemEnd=function(a){f++;if(void 0!==d.onProgress)d.onProgress(a,f,g);if(f===g&&(e=!1,void 0!==d.onLoad))d.onLoad()};this.itemError=function(a){if(void 0!==d.onError)d.onError(a)}}function Ka(a){this.manager=void 0!==a?a:va}function Oe(a){this.manager=void 0!==\na?a:va;this._parser=null}function $d(a){this.manager=void 0!==a?a:va;this._parser=null}function Sc(a){this.manager=void 0!==a?a:va}function ae(a){this.manager=void 0!==a?a:va}function rd(a){this.manager=void 0!==a?a:va}function na(a,b){z.call(this);this.type=\"Light\";this.color=new G(a);this.intensity=void 0!==b?b:1;this.receiveShadow=void 0}function sd(a,b,c){na.call(this,a,c);this.type=\"HemisphereLight\";this.castShadow=void 0;this.position.copy(z.DefaultUp);this.updateMatrix();this.groundColor=new G(b)}\nfunction tb(a){this.camera=a;this.bias=0;this.radius=1;this.mapSize=new C(512,512);this.map=null;this.matrix=new K}function td(){tb.call(this,new qa(50,1,.5,500))}function ud(a,b,c,d,e,f){na.call(this,a,b);this.type=\"SpotLight\";this.position.copy(z.DefaultUp);this.updateMatrix();this.target=new z;Object.defineProperty(this,\"power\",{get:function(){return this.intensity*Math.PI},set:function(a){this.intensity=a/Math.PI}});this.distance=void 0!==c?c:0;this.angle=void 0!==d?d:Math.PI/3;this.penumbra=\nvoid 0!==e?e:0;this.decay=void 0!==f?f:1;this.shadow=new td}function vd(a,b,c,d){na.call(this,a,b);this.type=\"PointLight\";Object.defineProperty(this,\"power\",{get:function(){return 4*this.intensity*Math.PI},set:function(a){this.intensity=a/(4*Math.PI)}});this.distance=void 0!==c?c:0;this.decay=void 0!==d?d:1;this.shadow=new tb(new qa(90,1,.5,500))}function wd(){tb.call(this,new Fb(-5,5,5,-5,.5,500))}function xd(a,b){na.call(this,a,b);this.type=\"DirectionalLight\";this.position.copy(z.DefaultUp);this.updateMatrix();\nthis.target=new z;this.shadow=new wd}function yd(a,b){na.call(this,a,b);this.type=\"AmbientLight\";this.castShadow=void 0}function zd(a,b,c,d){na.call(this,a,b);this.type=\"RectAreaLight\";this.position.set(0,1,0);this.updateMatrix();this.width=void 0!==c?c:10;this.height=void 0!==d?d:10}function wa(a,b,c,d){this.parameterPositions=a;this._cachedIndex=0;this.resultBuffer=void 0!==d?d:new b.constructor(c);this.sampleValues=b;this.valueSize=c}function Ad(a,b,c,d){wa.call(this,a,b,c,d);this._offsetNext=\nthis._weightNext=this._offsetPrev=this._weightPrev=-0}function Tc(a,b,c,d){wa.call(this,a,b,c,d)}function Bd(a,b,c,d){wa.call(this,a,b,c,d)}function ub(a,b,c,d){if(void 0===a)throw Error(\"track name is undefined\");if(void 0===b||0===b.length)throw Error(\"no keyframes in track named \"+a);this.name=a;this.times=ia.convertArray(b,this.TimeBufferType);this.values=ia.convertArray(c,this.ValueBufferType);this.setInterpolation(d||this.DefaultInterpolation);this.validate();this.optimize()}function cc(a,b,\nc,d){ub.call(this,a,b,c,d)}function Cd(a,b,c,d){wa.call(this,a,b,c,d)}function Uc(a,b,c,d){ub.call(this,a,b,c,d)}function dc(a,b,c,d){ub.call(this,a,b,c,d)}function Dd(a,b,c,d){ub.call(this,a,b,c,d)}function Ed(a,b,c){ub.call(this,a,b,c)}function Fd(a,b,c,d){ub.call(this,a,b,c,d)}function vb(a,b,c,d){ub.apply(this,arguments)}function Da(a,b,c){this.name=a;this.tracks=c;this.duration=void 0!==b?b:-1;this.uuid=Y.generateUUID();0>this.duration&&this.resetDuration();this.optimize()}function Gd(a){this.manager=\nvoid 0!==a?a:va;this.textures={}}function be(a){this.manager=void 0!==a?a:va}function ec(){this.onLoadStart=function(){};this.onLoadProgress=function(){};this.onLoadComplete=function(){}}function ce(a){\"boolean\"===typeof a&&(console.warn(\"THREE.JSONLoader: showStatus parameter has been removed from constructor.\"),a=void 0);this.manager=void 0!==a?a:va;this.withCredentials=!1}function Pe(a){this.manager=void 0!==a?a:va;this.texturePath=\"\"}function Qe(a,b,c,d,e){b=.5*(d-b);e=.5*(e-c);var f=a*a;return(2*\nc-2*d+b+e)*a*f+(-3*c+3*d-2*b-e)*f+b*a+c}function wb(a,b,c,d){var e=1-a;return e*e*b+2*(1-a)*a*c+a*a*d}function xb(a,b,c,d,e){var f=1-a,g=1-a;return f*f*f*b+3*g*g*a*c+3*(1-a)*a*a*d+a*a*a*e}function ua(){this.arcLengthDivisions=200}function Qa(a,b){this.arcLengthDivisions=200;this.v1=a;this.v2=b}function Vc(){this.arcLengthDivisions=200;this.curves=[];this.autoClose=!1}function Va(a,b,c,d,e,f,g,h){this.arcLengthDivisions=200;this.aX=a;this.aY=b;this.xRadius=c;this.yRadius=d;this.aStartAngle=e;this.aEndAngle=\nf;this.aClockwise=g;this.aRotation=h||0}function yb(a){this.arcLengthDivisions=200;this.points=void 0===a?[]:a}function fc(a,b,c,d){this.arcLengthDivisions=200;this.v0=a;this.v1=b;this.v2=c;this.v3=d}function gc(a,b,c){this.arcLengthDivisions=200;this.v0=a;this.v1=b;this.v2=c}function Wc(a){Vc.call(this);this.currentPoint=new C;a&&this.fromPoints(a)}function zb(){Wc.apply(this,arguments);this.holes=[]}function de(){this.subPaths=[];this.currentPath=null}function ee(a){this.data=a}function Re(a){this.manager=\nvoid 0!==a?a:va}function fe(a){this.manager=void 0!==a?a:va}function Se(){this.type=\"StereoCamera\";this.aspect=1;this.eyeSep=.064;this.cameraL=new qa;this.cameraL.layers.enable(1);this.cameraL.matrixAutoUpdate=!1;this.cameraR=new qa;this.cameraR.layers.enable(2);this.cameraR.matrixAutoUpdate=!1}function Hd(a,b,c){z.call(this);this.type=\"CubeCamera\";var d=new qa(90,1,a,b);d.up.set(0,-1,0);d.lookAt(new n(1,0,0));this.add(d);var e=new qa(90,1,a,b);e.up.set(0,-1,0);e.lookAt(new n(-1,0,0));this.add(e);\nvar f=new qa(90,1,a,b);f.up.set(0,0,1);f.lookAt(new n(0,1,0));this.add(f);var g=new qa(90,1,a,b);g.up.set(0,0,-1);g.lookAt(new n(0,-1,0));this.add(g);var h=new qa(90,1,a,b);h.up.set(0,-1,0);h.lookAt(new n(0,0,1));this.add(h);var k=new qa(90,1,a,b);k.up.set(0,-1,0);k.lookAt(new n(0,0,-1));this.add(k);this.renderTarget=new Db(c,c,{format:1022,magFilter:1006,minFilter:1006});this.renderTarget.texture.name=\"CubeCamera\";this.updateCubeMap=function(a,b){null===this.parent&&this.updateMatrixWorld();var c=\nthis.renderTarget,p=c.texture.generateMipmaps;c.texture.generateMipmaps=!1;c.activeCubeFace=0;a.render(b,d,c);c.activeCubeFace=1;a.render(b,e,c);c.activeCubeFace=2;a.render(b,f,c);c.activeCubeFace=3;a.render(b,g,c);c.activeCubeFace=4;a.render(b,h,c);c.texture.generateMipmaps=p;c.activeCubeFace=5;a.render(b,k,c);a.setRenderTarget(null)}}function ge(){z.call(this);this.type=\"AudioListener\";this.context=he.getContext();this.gain=this.context.createGain();this.gain.connect(this.context.destination);this.filter=\nnull}function hc(a){z.call(this);this.type=\"Audio\";this.context=a.context;this.gain=this.context.createGain();this.gain.connect(a.getInput());this.autoplay=!1;this.buffer=null;this.loop=!1;this.startTime=0;this.playbackRate=1;this.isPlaying=!1;this.hasPlaybackControl=!0;this.sourceType=\"empty\";this.filters=[]}function ie(a){hc.call(this,a);this.panner=this.context.createPanner();this.panner.connect(this.gain)}function je(a,b){this.analyser=a.context.createAnalyser();this.analyser.fftSize=void 0!==\nb?b:2048;this.data=new Uint8Array(this.analyser.frequencyBinCount);a.getOutput().connect(this.analyser)}function ke(a,b,c){this.binding=a;this.valueSize=c;a=Float64Array;switch(b){case \"quaternion\":b=this._slerp;break;case \"string\":case \"bool\":a=Array;b=this._select;break;default:b=this._lerp}this.buffer=new a(4*c);this._mixBufferRegion=b;this.referenceCount=this.useCount=this.cumulativeWeight=0}function Te(a,b,c){c=c||ha.parseTrackName(b);this._targetGroup=a;this._bindings=a.subscribe_(b,c)}function ha(a,\nb,c){this.path=b;this.parsedPath=c||ha.parseTrackName(b);this.node=ha.findNode(a,this.parsedPath.nodeName)||a;this.rootNode=a}function Ue(a){this.uuid=Y.generateUUID();this._objects=Array.prototype.slice.call(arguments);this.nCachedObjects_=0;var b={};this._indicesByUUID=b;for(var c=0,d=arguments.length;c!==d;++c)b[arguments[c].uuid]=c;this._paths=[];this._parsedPaths=[];this._bindings=[];this._bindingsIndicesByPath={};var e=this;this.stats={objects:{get total(){return e._objects.length},get inUse(){return this.total-\ne.nCachedObjects_}},get bindingsPerObject(){return e._bindings.length}}}function Ve(a,b,c){this._mixer=a;this._clip=b;this._localRoot=c||null;a=b.tracks;b=a.length;c=Array(b);for(var d={endingStart:2400,endingEnd:2400},e=0;e!==b;++e){var f=a[e].createInterpolant(null);c[e]=f;f.settings=d}this._interpolantSettings=d;this._interpolants=c;this._propertyBindings=Array(b);this._weightInterpolant=this._timeScaleInterpolant=this._byClipCacheIndex=this._cacheIndex=null;this.loop=2201;this._loopCount=-1;this._startTime=\nnull;this.time=0;this._effectiveWeight=this.weight=this._effectiveTimeScale=this.timeScale=1;this.repetitions=Infinity;this.paused=!1;this.enabled=!0;this.clampWhenFinished=!1;this.zeroSlopeAtEnd=this.zeroSlopeAtStart=!0}function We(a){this._root=a;this._initMemoryManager();this.time=this._accuIndex=0;this.timeScale=1}function Id(a,b){\"string\"===typeof a&&(console.warn(\"THREE.Uniform: Type parameter is no longer needed.\"),a=b);this.value=a}function le(){E.call(this);this.type=\"InstancedBufferGeometry\";\nthis.maxInstancedCount=void 0}function me(a,b,c,d){this.uuid=Y.generateUUID();this.data=a;this.itemSize=b;this.offset=c;this.normalized=!0===d}function ic(a,b){this.uuid=Y.generateUUID();this.array=a;this.stride=b;this.count=void 0!==a?a.length/b:0;this.dynamic=!1;this.updateRange={offset:0,count:-1};this.onUploadCallback=function(){};this.version=0}function ne(a,b,c){ic.call(this,a,b);this.meshPerAttribute=c||1}function oe(a,b,c){Z.call(this,a,b);this.meshPerAttribute=c||1}function Xe(a,b,c,d){this.ray=\nnew kb(a,b);this.near=c||0;this.far=d||Infinity;this.params={Mesh:{},Line:{},LOD:{},Points:{threshold:1},Sprite:{}};Object.defineProperties(this.params,{PointCloud:{get:function(){console.warn(\"THREE.Raycaster: params.PointCloud has been renamed to params.Points.\");return this.Points}}})}function Ye(a,b){return a.distance-b.distance}function pe(a,b,c,d){if(!1!==a.visible&&(a.raycast(b,c),!0===d)){a=a.children;d=0;for(var e=a.length;d<e;d++)pe(a[d],b,c,!0)}}function Ze(a){this.autoStart=void 0!==a?\na:!0;this.elapsedTime=this.oldTime=this.startTime=0;this.running=!1}function $e(a,b,c){this.radius=void 0!==a?a:1;this.phi=void 0!==b?b:0;this.theta=void 0!==c?c:0;return this}function af(a,b,c){this.radius=void 0!==a?a:1;this.theta=void 0!==b?b:0;this.y=void 0!==c?c:0;return this}function ta(a,b){la.call(this,a,b);this.animationsMap={};this.animationsList=[];var c=this.geometry.morphTargets.length;this.createAnimation(\"__default\",0,c-1,c/1);this.setAnimationWeight(\"__default\",1)}function Xc(a){z.call(this);\nthis.material=a;this.render=function(a){}}function Yc(a,b,c,d){this.object=a;this.size=void 0!==b?b:1;a=void 0!==c?c:16711680;d=void 0!==d?d:1;b=0;(c=this.object.geometry)&&c.isGeometry?b=3*c.faces.length:c&&c.isBufferGeometry&&(b=c.attributes.normal.count);c=new E;b=new B(6*b,3);c.addAttribute(\"position\",b);Q.call(this,c,new ea({color:a,linewidth:d}));this.matrixAutoUpdate=!1;this.update()}function jc(a){z.call(this);this.light=a;this.light.updateMatrixWorld();this.matrix=a.matrixWorld;this.matrixAutoUpdate=\n!1;a=new E;for(var b=[0,0,0,0,0,1,0,0,0,1,0,1,0,0,0,-1,0,1,0,0,0,0,1,1,0,0,0,0,-1,1],c=0,d=1;32>c;c++,d++){var e=c/32*Math.PI*2,f=d/32*Math.PI*2;b.push(Math.cos(e),Math.sin(e),1,Math.cos(f),Math.sin(f),1)}a.addAttribute(\"position\",new B(b,3));b=new ea({fog:!1});this.cone=new Q(a,b);this.add(this.cone);this.update()}function bf(a){var b=[];a&&a.isBone&&b.push(a);for(var c=0;c<a.children.length;c++)b.push.apply(b,bf(a.children[c]));return b}function kc(a){for(var b=bf(a),c=new E,d=[],e=[],f=new G(0,\n0,1),g=new G(0,1,0),h=0;h<b.length;h++){var k=b[h];k.parent&&k.parent.isBone&&(d.push(0,0,0),d.push(0,0,0),e.push(f.r,f.g,f.b),e.push(g.r,g.g,g.b))}c.addAttribute(\"position\",new B(d,3));c.addAttribute(\"color\",new B(e,3));d=new ea({vertexColors:2,depthTest:!1,depthWrite:!1,transparent:!0});Q.call(this,c,d);this.root=a;this.bones=b;this.matrix=a.matrixWorld;this.matrixAutoUpdate=!1;this.onBeforeRender()}function lc(a,b){this.light=a;this.light.updateMatrixWorld();var c=new mb(b,4,2),d=new ya({wireframe:!0,\nfog:!1});d.color.copy(this.light.color);la.call(this,c,d);this.matrix=this.light.matrixWorld;this.matrixAutoUpdate=!1}function mc(a){z.call(this);this.light=a;this.light.updateMatrixWorld();this.matrix=a.matrixWorld;this.matrixAutoUpdate=!1;a=new ea({color:a.color});var b=new E;b.addAttribute(\"position\",new Z(new Float32Array(15),3));this.add(new sa(b,a));this.update()}function nc(a,b){z.call(this);this.light=a;this.light.updateMatrixWorld();this.matrix=a.matrixWorld;this.matrixAutoUpdate=!1;var c=\nnew lb(b);c.rotateY(.5*Math.PI);var d=new ya({vertexColors:2,wireframe:!0}),e=c.getAttribute(\"position\"),e=new Float32Array(3*e.count);c.addAttribute(\"color\",new Z(e,3));this.add(new la(c,d));this.update()}function Zc(a,b,c,d){a=a||10;b=b||10;c=new G(void 0!==c?c:4473924);d=new G(void 0!==d?d:8947848);var e=b/2,f=a/b,g=a/2;a=[];for(var h=[],k=0,m=0,q=-g;k<=b;k++,q+=f){a.push(-g,0,q,g,0,q);a.push(q,0,-g,q,0,g);var l=k===e?c:d;l.toArray(h,m);m+=3;l.toArray(h,m);m+=3;l.toArray(h,m);m+=3;l.toArray(h,\nm);m+=3}b=new E;b.addAttribute(\"position\",new B(a,3));b.addAttribute(\"color\",new B(h,3));c=new ea({vertexColors:2});Q.call(this,b,c)}function Jd(a,b,c,d,e,f){a=a||10;b=b||16;c=c||8;d=d||64;e=new G(void 0!==e?e:4473924);f=new G(void 0!==f?f:8947848);var g=[],h=[],k,m,q,l,p;for(q=0;q<=b;q++)m=q/b*2*Math.PI,k=Math.sin(m)*a,m=Math.cos(m)*a,g.push(0,0,0),g.push(k,0,m),p=q&1?e:f,h.push(p.r,p.g,p.b),h.push(p.r,p.g,p.b);for(q=0;q<=c;q++)for(p=q&1?e:f,l=a-a/c*q,b=0;b<d;b++)m=b/d*2*Math.PI,k=Math.sin(m)*l,\nm=Math.cos(m)*l,g.push(k,0,m),h.push(p.r,p.g,p.b),m=(b+1)/d*2*Math.PI,k=Math.sin(m)*l,m=Math.cos(m)*l,g.push(k,0,m),h.push(p.r,p.g,p.b);a=new E;a.addAttribute(\"position\",new B(g,3));a.addAttribute(\"color\",new B(h,3));g=new ea({vertexColors:2});Q.call(this,a,g)}function $c(a,b,c,d){this.object=a;this.size=void 0!==b?b:1;a=void 0!==c?c:16776960;d=void 0!==d?d:1;b=0;(c=this.object.geometry)&&c.isGeometry?b=c.faces.length:console.warn(\"THREE.FaceNormalsHelper: only THREE.Geometry is supported. Use THREE.VertexNormalsHelper, instead.\");\nc=new E;b=new B(6*b,3);c.addAttribute(\"position\",b);Q.call(this,c,new ea({color:a,linewidth:d}));this.matrixAutoUpdate=!1;this.update()}function oc(a,b){z.call(this);this.light=a;this.light.updateMatrixWorld();this.matrix=a.matrixWorld;this.matrixAutoUpdate=!1;void 0===b&&(b=1);var c=new E;c.addAttribute(\"position\",new B([-b,b,0,b,b,0,b,-b,0,-b,-b,0,-b,b,0],3));var d=new ea({fog:!1});this.add(new sa(c,d));c=new E;c.addAttribute(\"position\",new B([0,0,0,0,0,1],3));this.add(new sa(c,d));this.update()}\nfunction ad(a){function b(a,b,d){c(a,d);c(b,d)}function c(a,b){f.push(0,0,0);g.push(b.r,b.g,b.b);void 0===h[a]&&(h[a]=[]);h[a].push(f.length/3-1)}var d=new E,e=new ea({color:16777215,vertexColors:1}),f=[],g=[],h={},k=new G(16755200),m=new G(16711680),q=new G(43775),l=new G(16777215),p=new G(3355443);b(\"n1\",\"n2\",k);b(\"n2\",\"n4\",k);b(\"n4\",\"n3\",k);b(\"n3\",\"n1\",k);b(\"f1\",\"f2\",k);b(\"f2\",\"f4\",k);b(\"f4\",\"f3\",k);b(\"f3\",\"f1\",k);b(\"n1\",\"f1\",k);b(\"n2\",\"f2\",k);b(\"n3\",\"f3\",k);b(\"n4\",\"f4\",k);b(\"p\",\"n1\",m);b(\"p\",\n\"n2\",m);b(\"p\",\"n3\",m);b(\"p\",\"n4\",m);b(\"u1\",\"u2\",q);b(\"u2\",\"u3\",q);b(\"u3\",\"u1\",q);b(\"c\",\"t\",l);b(\"p\",\"c\",p);b(\"cn1\",\"cn2\",p);b(\"cn3\",\"cn4\",p);b(\"cf1\",\"cf2\",p);b(\"cf3\",\"cf4\",p);d.addAttribute(\"position\",new B(f,3));d.addAttribute(\"color\",new B(g,3));Q.call(this,d,e);this.camera=a;this.camera.updateProjectionMatrix&&this.camera.updateProjectionMatrix();this.matrix=a.matrixWorld;this.matrixAutoUpdate=!1;this.pointMap=h;this.update()}function Ab(a,b){this.object=a;void 0===b&&(b=16776960);var c=new Uint16Array([0,\n1,1,2,2,3,3,0,4,5,5,6,6,7,7,4,0,4,1,5,2,6,3,7]),d=new Float32Array(24),e=new E;e.setIndex(new Z(c,1));e.addAttribute(\"position\",new Z(d,3));Q.call(this,e,new ea({color:b}));this.matrixAutoUpdate=!1;this.update()}function Bb(a,b,c,d,e,f){z.call(this);void 0===d&&(d=16776960);void 0===c&&(c=1);void 0===e&&(e=.2*c);void 0===f&&(f=.2*e);void 0===Kd&&(Kd=new E,Kd.addAttribute(\"position\",new B([0,0,0,0,1,0],3)),qe=new Ua(0,.5,1,5,1),qe.translate(0,-.5,0));this.position.copy(b);this.line=new sa(Kd,new ea({color:d}));\nthis.line.matrixAutoUpdate=!1;this.add(this.line);this.cone=new la(qe,new ya({color:d}));this.cone.matrixAutoUpdate=!1;this.add(this.cone);this.setDirection(a);this.setLength(c,e,f)}function Ld(a){a=a||1;var b=[0,0,0,a,0,0,0,0,0,0,a,0,0,0,0,0,0,a];a=new E;a.addAttribute(\"position\",new B(b,3));a.addAttribute(\"color\",new B([1,0,0,1,.6,0,0,1,0,.6,1,0,0,0,1,0,.6,1],3));b=new ea({vertexColors:2});Q.call(this,a,b)}function re(){var a=0,b=0,c=0,d=0;return{initCatmullRom:function(e,f,g,h,k){e=k*(g-e);h=k*\n(h-f);a=f;b=e;c=-3*f+3*g-2*e-h;d=2*f-2*g+e+h},initNonuniformCatmullRom:function(e,f,g,h,k,m,q){e=((f-e)/k-(g-e)/(k+m)+(g-f)/m)*m;h=((g-f)/m-(h-f)/(m+q)+(h-g)/q)*m;a=f;b=e;c=-3*f+3*g-2*e-h;d=2*f-2*g+e+h},calc:function(e){var f=e*e;return a+b*e+c*f+d*f*e}}}function La(a){this.arcLengthDivisions=200;2>a.length&&console.warn(\"THREE.CatmullRomCurve3: Points array needs at least two entries.\");this.points=a||[];this.closed=!1}function bd(a,b,c,d){this.arcLengthDivisions=200;this.v0=a;this.v1=b;this.v2=\nc;this.v3=d}function cd(a,b,c){this.arcLengthDivisions=200;this.v0=a;this.v1=b;this.v2=c}function dd(a,b){this.arcLengthDivisions=200;this.v1=a;this.v2=b}function Md(a,b,c,d,e,f){Va.call(this,a,b,c,c,d,e,f)}function cf(a){console.warn(\"THREE.ClosedSplineCurve3 has been deprecated. Use THREE.CatmullRomCurve3 instead.\");La.call(this,a);this.type=\"catmullrom\";this.closed=!0}function df(a){console.warn(\"THREE.SplineCurve3 has been deprecated. Use THREE.CatmullRomCurve3 instead.\");La.call(this,a);this.type=\n\"catmullrom\"}function se(a){console.warn(\"THREE.Spline has been removed. Use THREE.CatmullRomCurve3 instead.\");La.call(this,a);this.type=\"catmullrom\"}void 0===Number.EPSILON&&(Number.EPSILON=Math.pow(2,-52));void 0===Number.isInteger&&(Number.isInteger=function(a){return\"number\"===typeof a&&isFinite(a)&&Math.floor(a)===a});void 0===Math.sign&&(Math.sign=function(a){return 0>a?-1:0<a?1:+a});void 0===Function.prototype.name&&Object.defineProperty(Function.prototype,\"name\",{get:function(){return this.toString().match(/^\\s*function\\s*([^\\(\\s]*)/)[1]}});\nvoid 0===Object.assign&&function(){Object.assign=function(a){if(void 0===a||null===a)throw new TypeError(\"Cannot convert undefined or null to object\");for(var b=Object(a),c=1;c<arguments.length;c++){var d=arguments[c];if(void 0!==d&&null!==d)for(var e in d)Object.prototype.hasOwnProperty.call(d,e)&&(b[e]=d[e])}return b}}();Object.assign(xa.prototype,{addEventListener:function(a,b){void 0===this._listeners&&(this._listeners={});var c=this._listeners;void 0===c[a]&&(c[a]=[]);-1===c[a].indexOf(b)&&c[a].push(b)},\nhasEventListener:function(a,b){if(void 0===this._listeners)return!1;var c=this._listeners;return void 0!==c[a]&&-1!==c[a].indexOf(b)},removeEventListener:function(a,b){if(void 0!==this._listeners){var c=this._listeners[a];if(void 0!==c){var d=c.indexOf(b);-1!==d&&c.splice(d,1)}}},dispatchEvent:function(a){if(void 0!==this._listeners){var b=this._listeners[a.type];if(void 0!==b){a.target=this;for(var b=b.slice(0),c=0,d=b.length;c<d;c++)b[c].call(this,a)}}}});var Y={DEG2RAD:Math.PI/180,RAD2DEG:180/\nMath.PI,generateUUID:function(){var a=\"0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz\".split(\"\"),b=Array(36),c=0,d;return function(){for(var e=0;36>e;e++)8===e||13===e||18===e||23===e?b[e]=\"-\":14===e?b[e]=\"4\":(2>=c&&(c=33554432+16777216*Math.random()|0),d=c&15,c>>=4,b[e]=a[19===e?d&3|8:d]);return b.join(\"\")}}(),clamp:function(a,b,c){return Math.max(b,Math.min(c,a))},euclideanModulo:function(a,b){return(a%b+b)%b},mapLinear:function(a,b,c,d,e){return d+(a-b)*(e-d)/(c-b)},lerp:function(a,\nb,c){return(1-c)*a+c*b},smoothstep:function(a,b,c){if(a<=b)return 0;if(a>=c)return 1;a=(a-b)/(c-b);return a*a*(3-2*a)},smootherstep:function(a,b,c){if(a<=b)return 0;if(a>=c)return 1;a=(a-b)/(c-b);return a*a*a*(a*(6*a-15)+10)},randInt:function(a,b){return a+Math.floor(Math.random()*(b-a+1))},randFloat:function(a,b){return a+Math.random()*(b-a)},randFloatSpread:function(a){return a*(.5-Math.random())},degToRad:function(a){return a*Y.DEG2RAD},radToDeg:function(a){return a*Y.RAD2DEG},isPowerOfTwo:function(a){return 0===\n(a&a-1)&&0!==a},nearestPowerOfTwo:function(a){return Math.pow(2,Math.round(Math.log(a)/Math.LN2))},nextPowerOfTwo:function(a){a--;a|=a>>1;a|=a>>2;a|=a>>4;a|=a>>8;a|=a>>16;a++;return a}};Object.defineProperties(C.prototype,{width:{get:function(){return this.x},set:function(a){this.x=a}},height:{get:function(){return this.y},set:function(a){this.y=a}}});Object.assign(C.prototype,{isVector2:!0,set:function(a,b){this.x=a;this.y=b;return this},setScalar:function(a){this.y=this.x=a;return this},setX:function(a){this.x=\na;return this},setY:function(a){this.y=a;return this},setComponent:function(a,b){switch(a){case 0:this.x=b;break;case 1:this.y=b;break;default:throw Error(\"index is out of range: \"+a);}return this},getComponent:function(a){switch(a){case 0:return this.x;case 1:return this.y;default:throw Error(\"index is out of range: \"+a);}},clone:function(){return new this.constructor(this.x,this.y)},copy:function(a){this.x=a.x;this.y=a.y;return this},add:function(a,b){if(void 0!==b)return console.warn(\"THREE.Vector2: .add() now only accepts one argument. Use .addVectors( a, b ) instead.\"),\nthis.addVectors(a,b);this.x+=a.x;this.y+=a.y;return this},addScalar:function(a){this.x+=a;this.y+=a;return this},addVectors:function(a,b){this.x=a.x+b.x;this.y=a.y+b.y;return this},addScaledVector:function(a,b){this.x+=a.x*b;this.y+=a.y*b;return this},sub:function(a,b){if(void 0!==b)return console.warn(\"THREE.Vector2: .sub() now only accepts one argument. Use .subVectors( a, b ) instead.\"),this.subVectors(a,b);this.x-=a.x;this.y-=a.y;return this},subScalar:function(a){this.x-=a;this.y-=a;return this},\nsubVectors:function(a,b){this.x=a.x-b.x;this.y=a.y-b.y;return this},multiply:function(a){this.x*=a.x;this.y*=a.y;return this},multiplyScalar:function(a){this.x*=a;this.y*=a;return this},divide:function(a){this.x/=a.x;this.y/=a.y;return this},divideScalar:function(a){return this.multiplyScalar(1/a)},min:function(a){this.x=Math.min(this.x,a.x);this.y=Math.min(this.y,a.y);return this},max:function(a){this.x=Math.max(this.x,a.x);this.y=Math.max(this.y,a.y);return this},clamp:function(a,b){this.x=Math.max(a.x,\nMath.min(b.x,this.x));this.y=Math.max(a.y,Math.min(b.y,this.y));return this},clampScalar:function(){var a=new C,b=new C;return function(c,d){a.set(c,c);b.set(d,d);return this.clamp(a,b)}}(),clampLength:function(a,b){var c=this.length();return this.divideScalar(c||1).multiplyScalar(Math.max(a,Math.min(b,c)))},floor:function(){this.x=Math.floor(this.x);this.y=Math.floor(this.y);return this},ceil:function(){this.x=Math.ceil(this.x);this.y=Math.ceil(this.y);return this},round:function(){this.x=Math.round(this.x);\nthis.y=Math.round(this.y);return this},roundToZero:function(){this.x=0>this.x?Math.ceil(this.x):Math.floor(this.x);this.y=0>this.y?Math.ceil(this.y):Math.floor(this.y);return this},negate:function(){this.x=-this.x;this.y=-this.y;return this},dot:function(a){return this.x*a.x+this.y*a.y},lengthSq:function(){return this.x*this.x+this.y*this.y},length:function(){return Math.sqrt(this.x*this.x+this.y*this.y)},lengthManhattan:function(){return Math.abs(this.x)+Math.abs(this.y)},normalize:function(){return this.divideScalar(this.length()||\n1)},angle:function(){var a=Math.atan2(this.y,this.x);0>a&&(a+=2*Math.PI);return a},distanceTo:function(a){return Math.sqrt(this.distanceToSquared(a))},distanceToSquared:function(a){var b=this.x-a.x;a=this.y-a.y;return b*b+a*a},distanceToManhattan:function(a){return Math.abs(this.x-a.x)+Math.abs(this.y-a.y)},setLength:function(a){return this.normalize().multiplyScalar(a)},lerp:function(a,b){this.x+=(a.x-this.x)*b;this.y+=(a.y-this.y)*b;return this},lerpVectors:function(a,b,c){return this.subVectors(b,\na).multiplyScalar(c).add(a)},equals:function(a){return a.x===this.x&&a.y===this.y},fromArray:function(a,b){void 0===b&&(b=0);this.x=a[b];this.y=a[b+1];return this},toArray:function(a,b){void 0===a&&(a=[]);void 0===b&&(b=0);a[b]=this.x;a[b+1]=this.y;return a},fromBufferAttribute:function(a,b,c){void 0!==c&&console.warn(\"THREE.Vector2: offset has been removed from .fromBufferAttribute().\");this.x=a.getX(b);this.y=a.getY(b);return this},rotateAround:function(a,b){var c=Math.cos(b),d=Math.sin(b),e=this.x-\na.x,f=this.y-a.y;this.x=e*c-f*d+a.x;this.y=e*d+f*c+a.y;return this}});var hf=0;ba.DEFAULT_IMAGE=void 0;ba.DEFAULT_MAPPING=300;Object.defineProperty(ba.prototype,\"needsUpdate\",{set:function(a){!0===a&&this.version++}});Object.assign(ba.prototype,xa.prototype,{constructor:ba,isTexture:!0,clone:function(){return(new this.constructor).copy(this)},copy:function(a){this.name=a.name;this.image=a.image;this.mipmaps=a.mipmaps.slice(0);this.mapping=a.mapping;this.wrapS=a.wrapS;this.wrapT=a.wrapT;this.magFilter=\na.magFilter;this.minFilter=a.minFilter;this.anisotropy=a.anisotropy;this.format=a.format;this.type=a.type;this.offset.copy(a.offset);this.repeat.copy(a.repeat);this.generateMipmaps=a.generateMipmaps;this.premultiplyAlpha=a.premultiplyAlpha;this.flipY=a.flipY;this.unpackAlignment=a.unpackAlignment;this.encoding=a.encoding;return this},toJSON:function(a){if(void 0!==a.textures[this.uuid])return a.textures[this.uuid];var b={metadata:{version:4.5,type:\"Texture\",generator:\"Texture.toJSON\"},uuid:this.uuid,\nname:this.name,mapping:this.mapping,repeat:[this.repeat.x,this.repeat.y],offset:[this.offset.x,this.offset.y],wrap:[this.wrapS,this.wrapT],minFilter:this.minFilter,magFilter:this.magFilter,anisotropy:this.anisotropy,flipY:this.flipY};if(void 0!==this.image){var c=this.image;void 0===c.uuid&&(c.uuid=Y.generateUUID());if(void 0===a.images[c.uuid]){var d=a.images,e=c.uuid,f=c.uuid,g;void 0!==c.toDataURL?g=c:(g=document.createElementNS(\"http://www.w3.org/1999/xhtml\",\"canvas\"),g.width=c.width,g.height=\nc.height,g.getContext(\"2d\").drawImage(c,0,0,c.width,c.height));g=2048<g.width||2048<g.height?g.toDataURL(\"image/jpeg\",.6):g.toDataURL(\"image/png\");d[e]={uuid:f,url:g}}b.image=c.uuid}return a.textures[this.uuid]=b},dispose:function(){this.dispatchEvent({type:\"dispose\"})},transformUv:function(a){if(300===this.mapping){a.multiply(this.repeat);a.add(this.offset);if(0>a.x||1<a.x)switch(this.wrapS){case 1E3:a.x-=Math.floor(a.x);break;case 1001:a.x=0>a.x?0:1;break;case 1002:a.x=1===Math.abs(Math.floor(a.x)%\n2)?Math.ceil(a.x)-a.x:a.x-Math.floor(a.x)}if(0>a.y||1<a.y)switch(this.wrapT){case 1E3:a.y-=Math.floor(a.y);break;case 1001:a.y=0>a.y?0:1;break;case 1002:a.y=1===Math.abs(Math.floor(a.y)%2)?Math.ceil(a.y)-a.y:a.y-Math.floor(a.y)}this.flipY&&(a.y=1-a.y)}}});Object.assign(fa.prototype,{isVector4:!0,set:function(a,b,c,d){this.x=a;this.y=b;this.z=c;this.w=d;return this},setScalar:function(a){this.w=this.z=this.y=this.x=a;return this},setX:function(a){this.x=a;return this},setY:function(a){this.y=a;return this},\nsetZ:function(a){this.z=a;return this},setW:function(a){this.w=a;return this},setComponent:function(a,b){switch(a){case 0:this.x=b;break;case 1:this.y=b;break;case 2:this.z=b;break;case 3:this.w=b;break;default:throw Error(\"index is out of range: \"+a);}return this},getComponent:function(a){switch(a){case 0:return this.x;case 1:return this.y;case 2:return this.z;case 3:return this.w;default:throw Error(\"index is out of range: \"+a);}},clone:function(){return new this.constructor(this.x,this.y,this.z,\nthis.w)},copy:function(a){this.x=a.x;this.y=a.y;this.z=a.z;this.w=void 0!==a.w?a.w:1;return this},add:function(a,b){if(void 0!==b)return console.warn(\"THREE.Vector4: .add() now only accepts one argument. Use .addVectors( a, b ) instead.\"),this.addVectors(a,b);this.x+=a.x;this.y+=a.y;this.z+=a.z;this.w+=a.w;return this},addScalar:function(a){this.x+=a;this.y+=a;this.z+=a;this.w+=a;return this},addVectors:function(a,b){this.x=a.x+b.x;this.y=a.y+b.y;this.z=a.z+b.z;this.w=a.w+b.w;return this},addScaledVector:function(a,\nb){this.x+=a.x*b;this.y+=a.y*b;this.z+=a.z*b;this.w+=a.w*b;return this},sub:function(a,b){if(void 0!==b)return console.warn(\"THREE.Vector4: .sub() now only accepts one argument. Use .subVectors( a, b ) instead.\"),this.subVectors(a,b);this.x-=a.x;this.y-=a.y;this.z-=a.z;this.w-=a.w;return this},subScalar:function(a){this.x-=a;this.y-=a;this.z-=a;this.w-=a;return this},subVectors:function(a,b){this.x=a.x-b.x;this.y=a.y-b.y;this.z=a.z-b.z;this.w=a.w-b.w;return this},multiplyScalar:function(a){this.x*=\na;this.y*=a;this.z*=a;this.w*=a;return this},applyMatrix4:function(a){var b=this.x,c=this.y,d=this.z,e=this.w;a=a.elements;this.x=a[0]*b+a[4]*c+a[8]*d+a[12]*e;this.y=a[1]*b+a[5]*c+a[9]*d+a[13]*e;this.z=a[2]*b+a[6]*c+a[10]*d+a[14]*e;this.w=a[3]*b+a[7]*c+a[11]*d+a[15]*e;return this},divideScalar:function(a){return this.multiplyScalar(1/a)},setAxisAngleFromQuaternion:function(a){this.w=2*Math.acos(a.w);var b=Math.sqrt(1-a.w*a.w);1E-4>b?(this.x=1,this.z=this.y=0):(this.x=a.x/b,this.y=a.y/b,this.z=a.z/\nb);return this},setAxisAngleFromRotationMatrix:function(a){var b,c,d;a=a.elements;var e=a[0];d=a[4];var f=a[8],g=a[1],h=a[5],k=a[9];c=a[2];b=a[6];var m=a[10];if(.01>Math.abs(d-g)&&.01>Math.abs(f-c)&&.01>Math.abs(k-b)){if(.1>Math.abs(d+g)&&.1>Math.abs(f+c)&&.1>Math.abs(k+b)&&.1>Math.abs(e+h+m-3))return this.set(1,0,0,0),this;a=Math.PI;e=(e+1)/2;h=(h+1)/2;m=(m+1)/2;d=(d+g)/4;f=(f+c)/4;k=(k+b)/4;e>h&&e>m?.01>e?(b=0,d=c=.707106781):(b=Math.sqrt(e),c=d/b,d=f/b):h>m?.01>h?(b=.707106781,c=0,d=.707106781):\n(c=Math.sqrt(h),b=d/c,d=k/c):.01>m?(c=b=.707106781,d=0):(d=Math.sqrt(m),b=f/d,c=k/d);this.set(b,c,d,a);return this}a=Math.sqrt((b-k)*(b-k)+(f-c)*(f-c)+(g-d)*(g-d));.001>Math.abs(a)&&(a=1);this.x=(b-k)/a;this.y=(f-c)/a;this.z=(g-d)/a;this.w=Math.acos((e+h+m-1)/2);return this},min:function(a){this.x=Math.min(this.x,a.x);this.y=Math.min(this.y,a.y);this.z=Math.min(this.z,a.z);this.w=Math.min(this.w,a.w);return this},max:function(a){this.x=Math.max(this.x,a.x);this.y=Math.max(this.y,a.y);this.z=Math.max(this.z,\na.z);this.w=Math.max(this.w,a.w);return this},clamp:function(a,b){this.x=Math.max(a.x,Math.min(b.x,this.x));this.y=Math.max(a.y,Math.min(b.y,this.y));this.z=Math.max(a.z,Math.min(b.z,this.z));this.w=Math.max(a.w,Math.min(b.w,this.w));return this},clampScalar:function(){var a,b;return function(c,d){void 0===a&&(a=new fa,b=new fa);a.set(c,c,c,c);b.set(d,d,d,d);return this.clamp(a,b)}}(),clampLength:function(a,b){var c=this.length();return this.divideScalar(c||1).multiplyScalar(Math.max(a,Math.min(b,\nc)))},floor:function(){this.x=Math.floor(this.x);this.y=Math.floor(this.y);this.z=Math.floor(this.z);this.w=Math.floor(this.w);return this},ceil:function(){this.x=Math.ceil(this.x);this.y=Math.ceil(this.y);this.z=Math.ceil(this.z);this.w=Math.ceil(this.w);return this},round:function(){this.x=Math.round(this.x);this.y=Math.round(this.y);this.z=Math.round(this.z);this.w=Math.round(this.w);return this},roundToZero:function(){this.x=0>this.x?Math.ceil(this.x):Math.floor(this.x);this.y=0>this.y?Math.ceil(this.y):\nMath.floor(this.y);this.z=0>this.z?Math.ceil(this.z):Math.floor(this.z);this.w=0>this.w?Math.ceil(this.w):Math.floor(this.w);return this},negate:function(){this.x=-this.x;this.y=-this.y;this.z=-this.z;this.w=-this.w;return this},dot:function(a){return this.x*a.x+this.y*a.y+this.z*a.z+this.w*a.w},lengthSq:function(){return this.x*this.x+this.y*this.y+this.z*this.z+this.w*this.w},length:function(){return Math.sqrt(this.x*this.x+this.y*this.y+this.z*this.z+this.w*this.w)},lengthManhattan:function(){return Math.abs(this.x)+\nMath.abs(this.y)+Math.abs(this.z)+Math.abs(this.w)},normalize:function(){return this.divideScalar(this.length()||1)},setLength:function(a){return this.normalize().multiplyScalar(a)},lerp:function(a,b){this.x+=(a.x-this.x)*b;this.y+=(a.y-this.y)*b;this.z+=(a.z-this.z)*b;this.w+=(a.w-this.w)*b;return this},lerpVectors:function(a,b,c){return this.subVectors(b,a).multiplyScalar(c).add(a)},equals:function(a){return a.x===this.x&&a.y===this.y&&a.z===this.z&&a.w===this.w},fromArray:function(a,b){void 0===\nb&&(b=0);this.x=a[b];this.y=a[b+1];this.z=a[b+2];this.w=a[b+3];return this},toArray:function(a,b){void 0===a&&(a=[]);void 0===b&&(b=0);a[b]=this.x;a[b+1]=this.y;a[b+2]=this.z;a[b+3]=this.w;return a},fromBufferAttribute:function(a,b,c){void 0!==c&&console.warn(\"THREE.Vector4: offset has been removed from .fromBufferAttribute().\");this.x=a.getX(b);this.y=a.getY(b);this.z=a.getZ(b);this.w=a.getW(b);return this}});Object.assign(Cb.prototype,xa.prototype,{isWebGLRenderTarget:!0,setSize:function(a,b){if(this.width!==\na||this.height!==b)this.width=a,this.height=b,this.dispose();this.viewport.set(0,0,a,b);this.scissor.set(0,0,a,b)},clone:function(){return(new this.constructor).copy(this)},copy:function(a){this.width=a.width;this.height=a.height;this.viewport.copy(a.viewport);this.texture=a.texture.clone();this.depthBuffer=a.depthBuffer;this.stencilBuffer=a.stencilBuffer;this.depthTexture=a.depthTexture;return this},dispose:function(){this.dispatchEvent({type:\"dispose\"})}});Db.prototype=Object.create(Cb.prototype);\nDb.prototype.constructor=Db;Db.prototype.isWebGLRenderTargetCube=!0;Object.assign(oa,{slerp:function(a,b,c,d){return c.copy(a).slerp(b,d)},slerpFlat:function(a,b,c,d,e,f,g){var h=c[d+0],k=c[d+1],m=c[d+2];c=c[d+3];d=e[f+0];var q=e[f+1],l=e[f+2];e=e[f+3];if(c!==e||h!==d||k!==q||m!==l){f=1-g;var p=h*d+k*q+m*l+c*e,r=0<=p?1:-1,n=1-p*p;n>Number.EPSILON&&(n=Math.sqrt(n),p=Math.atan2(n,p*r),f=Math.sin(f*p)/n,g=Math.sin(g*p)/n);r*=g;h=h*f+d*r;k=k*f+q*r;m=m*f+l*r;c=c*f+e*r;f===1-g&&(g=1/Math.sqrt(h*h+k*k+m*\nm+c*c),h*=g,k*=g,m*=g,c*=g)}a[b]=h;a[b+1]=k;a[b+2]=m;a[b+3]=c}});Object.defineProperties(oa.prototype,{x:{get:function(){return this._x},set:function(a){this._x=a;this.onChangeCallback()}},y:{get:function(){return this._y},set:function(a){this._y=a;this.onChangeCallback()}},z:{get:function(){return this._z},set:function(a){this._z=a;this.onChangeCallback()}},w:{get:function(){return this._w},set:function(a){this._w=a;this.onChangeCallback()}}});Object.assign(oa.prototype,{set:function(a,b,c,d){this._x=\na;this._y=b;this._z=c;this._w=d;this.onChangeCallback();return this},clone:function(){return new this.constructor(this._x,this._y,this._z,this._w)},copy:function(a){this._x=a.x;this._y=a.y;this._z=a.z;this._w=a.w;this.onChangeCallback();return this},setFromEuler:function(a,b){if(!a||!a.isEuler)throw Error(\"THREE.Quaternion: .setFromEuler() now expects an Euler rotation rather than a Vector3 and order.\");var c=a._x,d=a._y,e=a._z,f=a.order,g=Math.cos,h=Math.sin,k=g(c/2),m=g(d/2),g=g(e/2),c=h(c/2),d=\nh(d/2),e=h(e/2);\"XYZ\"===f?(this._x=c*m*g+k*d*e,this._y=k*d*g-c*m*e,this._z=k*m*e+c*d*g,this._w=k*m*g-c*d*e):\"YXZ\"===f?(this._x=c*m*g+k*d*e,this._y=k*d*g-c*m*e,this._z=k*m*e-c*d*g,this._w=k*m*g+c*d*e):\"ZXY\"===f?(this._x=c*m*g-k*d*e,this._y=k*d*g+c*m*e,this._z=k*m*e+c*d*g,this._w=k*m*g-c*d*e):\"ZYX\"===f?(this._x=c*m*g-k*d*e,this._y=k*d*g+c*m*e,this._z=k*m*e-c*d*g,this._w=k*m*g+c*d*e):\"YZX\"===f?(this._x=c*m*g+k*d*e,this._y=k*d*g+c*m*e,this._z=k*m*e-c*d*g,this._w=k*m*g-c*d*e):\"XZY\"===f&&(this._x=c*m*g-\nk*d*e,this._y=k*d*g-c*m*e,this._z=k*m*e+c*d*g,this._w=k*m*g+c*d*e);if(!1!==b)this.onChangeCallback();return this},setFromAxisAngle:function(a,b){var c=b/2,d=Math.sin(c);this._x=a.x*d;this._y=a.y*d;this._z=a.z*d;this._w=Math.cos(c);this.onChangeCallback();return this},setFromRotationMatrix:function(a){var b=a.elements,c=b[0];a=b[4];var d=b[8],e=b[1],f=b[5],g=b[9],h=b[2],k=b[6],b=b[10],m=c+f+b;0<m?(c=.5/Math.sqrt(m+1),this._w=.25/c,this._x=(k-g)*c,this._y=(d-h)*c,this._z=(e-a)*c):c>f&&c>b?(c=2*Math.sqrt(1+\nc-f-b),this._w=(k-g)/c,this._x=.25*c,this._y=(a+e)/c,this._z=(d+h)/c):f>b?(c=2*Math.sqrt(1+f-c-b),this._w=(d-h)/c,this._x=(a+e)/c,this._y=.25*c,this._z=(g+k)/c):(c=2*Math.sqrt(1+b-c-f),this._w=(e-a)/c,this._x=(d+h)/c,this._y=(g+k)/c,this._z=.25*c);this.onChangeCallback();return this},setFromUnitVectors:function(){var a=new n,b;return function(c,d){void 0===a&&(a=new n);b=c.dot(d)+1;1E-6>b?(b=0,Math.abs(c.x)>Math.abs(c.z)?a.set(-c.y,c.x,0):a.set(0,-c.z,c.y)):a.crossVectors(c,d);this._x=a.x;this._y=\na.y;this._z=a.z;this._w=b;return this.normalize()}}(),inverse:function(){return this.conjugate().normalize()},conjugate:function(){this._x*=-1;this._y*=-1;this._z*=-1;this.onChangeCallback();return this},dot:function(a){return this._x*a._x+this._y*a._y+this._z*a._z+this._w*a._w},lengthSq:function(){return this._x*this._x+this._y*this._y+this._z*this._z+this._w*this._w},length:function(){return Math.sqrt(this._x*this._x+this._y*this._y+this._z*this._z+this._w*this._w)},normalize:function(){var a=this.length();\n0===a?(this._z=this._y=this._x=0,this._w=1):(a=1/a,this._x*=a,this._y*=a,this._z*=a,this._w*=a);this.onChangeCallback();return this},multiply:function(a,b){return void 0!==b?(console.warn(\"THREE.Quaternion: .multiply() now only accepts one argument. Use .multiplyQuaternions( a, b ) instead.\"),this.multiplyQuaternions(a,b)):this.multiplyQuaternions(this,a)},premultiply:function(a){return this.multiplyQuaternions(a,this)},multiplyQuaternions:function(a,b){var c=a._x,d=a._y,e=a._z,f=a._w,g=b._x,h=b._y,\nk=b._z,m=b._w;this._x=c*m+f*g+d*k-e*h;this._y=d*m+f*h+e*g-c*k;this._z=e*m+f*k+c*h-d*g;this._w=f*m-c*g-d*h-e*k;this.onChangeCallback();return this},slerp:function(a,b){if(0===b)return this;if(1===b)return this.copy(a);var c=this._x,d=this._y,e=this._z,f=this._w,g=f*a._w+c*a._x+d*a._y+e*a._z;0>g?(this._w=-a._w,this._x=-a._x,this._y=-a._y,this._z=-a._z,g=-g):this.copy(a);if(1<=g)return this._w=f,this._x=c,this._y=d,this._z=e,this;var h=Math.sqrt(1-g*g);if(.001>Math.abs(h))return this._w=.5*(f+this._w),\nthis._x=.5*(c+this._x),this._y=.5*(d+this._y),this._z=.5*(e+this._z),this;var k=Math.atan2(h,g),g=Math.sin((1-b)*k)/h,h=Math.sin(b*k)/h;this._w=f*g+this._w*h;this._x=c*g+this._x*h;this._y=d*g+this._y*h;this._z=e*g+this._z*h;this.onChangeCallback();return this},equals:function(a){return a._x===this._x&&a._y===this._y&&a._z===this._z&&a._w===this._w},fromArray:function(a,b){void 0===b&&(b=0);this._x=a[b];this._y=a[b+1];this._z=a[b+2];this._w=a[b+3];this.onChangeCallback();return this},toArray:function(a,\nb){void 0===a&&(a=[]);void 0===b&&(b=0);a[b]=this._x;a[b+1]=this._y;a[b+2]=this._z;a[b+3]=this._w;return a},onChange:function(a){this.onChangeCallback=a;return this},onChangeCallback:function(){}});Object.assign(n.prototype,{isVector3:!0,set:function(a,b,c){this.x=a;this.y=b;this.z=c;return this},setScalar:function(a){this.z=this.y=this.x=a;return this},setX:function(a){this.x=a;return this},setY:function(a){this.y=a;return this},setZ:function(a){this.z=a;return this},setComponent:function(a,b){switch(a){case 0:this.x=\nb;break;case 1:this.y=b;break;case 2:this.z=b;break;default:throw Error(\"index is out of range: \"+a);}return this},getComponent:function(a){switch(a){case 0:return this.x;case 1:return this.y;case 2:return this.z;default:throw Error(\"index is out of range: \"+a);}},clone:function(){return new this.constructor(this.x,this.y,this.z)},copy:function(a){this.x=a.x;this.y=a.y;this.z=a.z;return this},add:function(a,b){if(void 0!==b)return console.warn(\"THREE.Vector3: .add() now only accepts one argument. Use .addVectors( a, b ) instead.\"),\nthis.addVectors(a,b);this.x+=a.x;this.y+=a.y;this.z+=a.z;return this},addScalar:function(a){this.x+=a;this.y+=a;this.z+=a;return this},addVectors:function(a,b){this.x=a.x+b.x;this.y=a.y+b.y;this.z=a.z+b.z;return this},addScaledVector:function(a,b){this.x+=a.x*b;this.y+=a.y*b;this.z+=a.z*b;return this},sub:function(a,b){if(void 0!==b)return console.warn(\"THREE.Vector3: .sub() now only accepts one argument. Use .subVectors( a, b ) instead.\"),this.subVectors(a,b);this.x-=a.x;this.y-=a.y;this.z-=a.z;\nreturn this},subScalar:function(a){this.x-=a;this.y-=a;this.z-=a;return this},subVectors:function(a,b){this.x=a.x-b.x;this.y=a.y-b.y;this.z=a.z-b.z;return this},multiply:function(a,b){if(void 0!==b)return console.warn(\"THREE.Vector3: .multiply() now only accepts one argument. Use .multiplyVectors( a, b ) instead.\"),this.multiplyVectors(a,b);this.x*=a.x;this.y*=a.y;this.z*=a.z;return this},multiplyScalar:function(a){this.x*=a;this.y*=a;this.z*=a;return this},multiplyVectors:function(a,b){this.x=a.x*\nb.x;this.y=a.y*b.y;this.z=a.z*b.z;return this},applyEuler:function(){var a=new oa;return function(b){b&&b.isEuler||console.error(\"THREE.Vector3: .applyEuler() now expects an Euler rotation rather than a Vector3 and order.\");return this.applyQuaternion(a.setFromEuler(b))}}(),applyAxisAngle:function(){var a=new oa;return function(b,c){return this.applyQuaternion(a.setFromAxisAngle(b,c))}}(),applyMatrix3:function(a){var b=this.x,c=this.y,d=this.z;a=a.elements;this.x=a[0]*b+a[3]*c+a[6]*d;this.y=a[1]*\nb+a[4]*c+a[7]*d;this.z=a[2]*b+a[5]*c+a[8]*d;return this},applyMatrix4:function(a){var b=this.x,c=this.y,d=this.z;a=a.elements;var e=1/(a[3]*b+a[7]*c+a[11]*d+a[15]);this.x=(a[0]*b+a[4]*c+a[8]*d+a[12])*e;this.y=(a[1]*b+a[5]*c+a[9]*d+a[13])*e;this.z=(a[2]*b+a[6]*c+a[10]*d+a[14])*e;return this},applyQuaternion:function(a){var b=this.x,c=this.y,d=this.z,e=a.x,f=a.y,g=a.z;a=a.w;var h=a*b+f*d-g*c,k=a*c+g*b-e*d,m=a*d+e*c-f*b,b=-e*b-f*c-g*d;this.x=h*a+b*-e+k*-g-m*-f;this.y=k*a+b*-f+m*-e-h*-g;this.z=m*a+b*\n-g+h*-f-k*-e;return this},project:function(){var a=new K;return function(b){a.multiplyMatrices(b.projectionMatrix,a.getInverse(b.matrixWorld));return this.applyMatrix4(a)}}(),unproject:function(){var a=new K;return function(b){a.multiplyMatrices(b.matrixWorld,a.getInverse(b.projectionMatrix));return this.applyMatrix4(a)}}(),transformDirection:function(a){var b=this.x,c=this.y,d=this.z;a=a.elements;this.x=a[0]*b+a[4]*c+a[8]*d;this.y=a[1]*b+a[5]*c+a[9]*d;this.z=a[2]*b+a[6]*c+a[10]*d;return this.normalize()},\ndivide:function(a){this.x/=a.x;this.y/=a.y;this.z/=a.z;return this},divideScalar:function(a){return this.multiplyScalar(1/a)},min:function(a){this.x=Math.min(this.x,a.x);this.y=Math.min(this.y,a.y);this.z=Math.min(this.z,a.z);return this},max:function(a){this.x=Math.max(this.x,a.x);this.y=Math.max(this.y,a.y);this.z=Math.max(this.z,a.z);return this},clamp:function(a,b){this.x=Math.max(a.x,Math.min(b.x,this.x));this.y=Math.max(a.y,Math.min(b.y,this.y));this.z=Math.max(a.z,Math.min(b.z,this.z));return this},\nclampScalar:function(){var a=new n,b=new n;return function(c,d){a.set(c,c,c);b.set(d,d,d);return this.clamp(a,b)}}(),clampLength:function(a,b){var c=this.length();return this.divideScalar(c||1).multiplyScalar(Math.max(a,Math.min(b,c)))},floor:function(){this.x=Math.floor(this.x);this.y=Math.floor(this.y);this.z=Math.floor(this.z);return this},ceil:function(){this.x=Math.ceil(this.x);this.y=Math.ceil(this.y);this.z=Math.ceil(this.z);return this},round:function(){this.x=Math.round(this.x);this.y=Math.round(this.y);\nthis.z=Math.round(this.z);return this},roundToZero:function(){this.x=0>this.x?Math.ceil(this.x):Math.floor(this.x);this.y=0>this.y?Math.ceil(this.y):Math.floor(this.y);this.z=0>this.z?Math.ceil(this.z):Math.floor(this.z);return this},negate:function(){this.x=-this.x;this.y=-this.y;this.z=-this.z;return this},dot:function(a){return this.x*a.x+this.y*a.y+this.z*a.z},lengthSq:function(){return this.x*this.x+this.y*this.y+this.z*this.z},length:function(){return Math.sqrt(this.x*this.x+this.y*this.y+this.z*\nthis.z)},lengthManhattan:function(){return Math.abs(this.x)+Math.abs(this.y)+Math.abs(this.z)},normalize:function(){return this.divideScalar(this.length()||1)},setLength:function(a){return this.normalize().multiplyScalar(a)},lerp:function(a,b){this.x+=(a.x-this.x)*b;this.y+=(a.y-this.y)*b;this.z+=(a.z-this.z)*b;return this},lerpVectors:function(a,b,c){return this.subVectors(b,a).multiplyScalar(c).add(a)},cross:function(a,b){if(void 0!==b)return console.warn(\"THREE.Vector3: .cross() now only accepts one argument. Use .crossVectors( a, b ) instead.\"),\nthis.crossVectors(a,b);var c=this.x,d=this.y,e=this.z;this.x=d*a.z-e*a.y;this.y=e*a.x-c*a.z;this.z=c*a.y-d*a.x;return this},crossVectors:function(a,b){var c=a.x,d=a.y,e=a.z,f=b.x,g=b.y,h=b.z;this.x=d*h-e*g;this.y=e*f-c*h;this.z=c*g-d*f;return this},projectOnVector:function(a){var b=a.dot(this)/a.lengthSq();return this.copy(a).multiplyScalar(b)},projectOnPlane:function(){var a=new n;return function(b){a.copy(this).projectOnVector(b);return this.sub(a)}}(),reflect:function(){var a=new n;return function(b){return this.sub(a.copy(b).multiplyScalar(2*\nthis.dot(b)))}}(),angleTo:function(a){a=this.dot(a)/Math.sqrt(this.lengthSq()*a.lengthSq());return Math.acos(Y.clamp(a,-1,1))},distanceTo:function(a){return Math.sqrt(this.distanceToSquared(a))},distanceToSquared:function(a){var b=this.x-a.x,c=this.y-a.y;a=this.z-a.z;return b*b+c*c+a*a},distanceToManhattan:function(a){return Math.abs(this.x-a.x)+Math.abs(this.y-a.y)+Math.abs(this.z-a.z)},setFromSpherical:function(a){var b=Math.sin(a.phi)*a.radius;this.x=b*Math.sin(a.theta);this.y=Math.cos(a.phi)*\na.radius;this.z=b*Math.cos(a.theta);return this},setFromCylindrical:function(a){this.x=a.radius*Math.sin(a.theta);this.y=a.y;this.z=a.radius*Math.cos(a.theta);return this},setFromMatrixPosition:function(a){a=a.elements;this.x=a[12];this.y=a[13];this.z=a[14];return this},setFromMatrixScale:function(a){var b=this.setFromMatrixColumn(a,0).length(),c=this.setFromMatrixColumn(a,1).length();a=this.setFromMatrixColumn(a,2).length();this.x=b;this.y=c;this.z=a;return this},setFromMatrixColumn:function(a,b){return this.fromArray(a.elements,\n4*b)},equals:function(a){return a.x===this.x&&a.y===this.y&&a.z===this.z},fromArray:function(a,b){void 0===b&&(b=0);this.x=a[b];this.y=a[b+1];this.z=a[b+2];return this},toArray:function(a,b){void 0===a&&(a=[]);void 0===b&&(b=0);a[b]=this.x;a[b+1]=this.y;a[b+2]=this.z;return a},fromBufferAttribute:function(a,b,c){void 0!==c&&console.warn(\"THREE.Vector3: offset has been removed from .fromBufferAttribute().\");this.x=a.getX(b);this.y=a.getY(b);this.z=a.getZ(b);return this}});Object.assign(K.prototype,\n{isMatrix4:!0,set:function(a,b,c,d,e,f,g,h,k,m,q,l,p,r,n,t){var y=this.elements;y[0]=a;y[4]=b;y[8]=c;y[12]=d;y[1]=e;y[5]=f;y[9]=g;y[13]=h;y[2]=k;y[6]=m;y[10]=q;y[14]=l;y[3]=p;y[7]=r;y[11]=n;y[15]=t;return this},identity:function(){this.set(1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1);return this},clone:function(){return(new K).fromArray(this.elements)},copy:function(a){var b=this.elements;a=a.elements;b[0]=a[0];b[1]=a[1];b[2]=a[2];b[3]=a[3];b[4]=a[4];b[5]=a[5];b[6]=a[6];b[7]=a[7];b[8]=a[8];b[9]=a[9];b[10]=a[10];\nb[11]=a[11];b[12]=a[12];b[13]=a[13];b[14]=a[14];b[15]=a[15];return this},copyPosition:function(a){var b=this.elements;a=a.elements;b[12]=a[12];b[13]=a[13];b[14]=a[14];return this},extractBasis:function(a,b,c){a.setFromMatrixColumn(this,0);b.setFromMatrixColumn(this,1);c.setFromMatrixColumn(this,2);return this},makeBasis:function(a,b,c){this.set(a.x,b.x,c.x,0,a.y,b.y,c.y,0,a.z,b.z,c.z,0,0,0,0,1);return this},extractRotation:function(){var a=new n;return function(b){var c=this.elements,d=b.elements,\ne=1/a.setFromMatrixColumn(b,0).length(),f=1/a.setFromMatrixColumn(b,1).length();b=1/a.setFromMatrixColumn(b,2).length();c[0]=d[0]*e;c[1]=d[1]*e;c[2]=d[2]*e;c[4]=d[4]*f;c[5]=d[5]*f;c[6]=d[6]*f;c[8]=d[8]*b;c[9]=d[9]*b;c[10]=d[10]*b;return this}}(),makeRotationFromEuler:function(a){a&&a.isEuler||console.error(\"THREE.Matrix: .makeRotationFromEuler() now expects a Euler rotation rather than a Vector3 and order.\");var b=this.elements,c=a.x,d=a.y,e=a.z,f=Math.cos(c),c=Math.sin(c),g=Math.cos(d),d=Math.sin(d),\nh=Math.cos(e),e=Math.sin(e);if(\"XYZ\"===a.order){a=f*h;var k=f*e,m=c*h,q=c*e;b[0]=g*h;b[4]=-g*e;b[8]=d;b[1]=k+m*d;b[5]=a-q*d;b[9]=-c*g;b[2]=q-a*d;b[6]=m+k*d;b[10]=f*g}else\"YXZ\"===a.order?(a=g*h,k=g*e,m=d*h,q=d*e,b[0]=a+q*c,b[4]=m*c-k,b[8]=f*d,b[1]=f*e,b[5]=f*h,b[9]=-c,b[2]=k*c-m,b[6]=q+a*c,b[10]=f*g):\"ZXY\"===a.order?(a=g*h,k=g*e,m=d*h,q=d*e,b[0]=a-q*c,b[4]=-f*e,b[8]=m+k*c,b[1]=k+m*c,b[5]=f*h,b[9]=q-a*c,b[2]=-f*d,b[6]=c,b[10]=f*g):\"ZYX\"===a.order?(a=f*h,k=f*e,m=c*h,q=c*e,b[0]=g*h,b[4]=m*d-k,b[8]=a*\nd+q,b[1]=g*e,b[5]=q*d+a,b[9]=k*d-m,b[2]=-d,b[6]=c*g,b[10]=f*g):\"YZX\"===a.order?(a=f*g,k=f*d,m=c*g,q=c*d,b[0]=g*h,b[4]=q-a*e,b[8]=m*e+k,b[1]=e,b[5]=f*h,b[9]=-c*h,b[2]=-d*h,b[6]=k*e+m,b[10]=a-q*e):\"XZY\"===a.order&&(a=f*g,k=f*d,m=c*g,q=c*d,b[0]=g*h,b[4]=-e,b[8]=d*h,b[1]=a*e+q,b[5]=f*h,b[9]=k*e-m,b[2]=m*e-k,b[6]=c*h,b[10]=q*e+a);b[3]=0;b[7]=0;b[11]=0;b[12]=0;b[13]=0;b[14]=0;b[15]=1;return this},makeRotationFromQuaternion:function(a){var b=this.elements,c=a._x,d=a._y,e=a._z,f=a._w,g=c+c,h=d+d,k=e+e;a=\nc*g;var m=c*h,c=c*k,q=d*h,d=d*k,e=e*k,g=f*g,h=f*h,f=f*k;b[0]=1-(q+e);b[4]=m-f;b[8]=c+h;b[1]=m+f;b[5]=1-(a+e);b[9]=d-g;b[2]=c-h;b[6]=d+g;b[10]=1-(a+q);b[3]=0;b[7]=0;b[11]=0;b[12]=0;b[13]=0;b[14]=0;b[15]=1;return this},lookAt:function(){var a=new n,b=new n,c=new n;return function(d,e,f){var g=this.elements;c.subVectors(d,e);0===c.lengthSq()&&(c.z=1);c.normalize();a.crossVectors(f,c);0===a.lengthSq()&&(1===Math.abs(f.z)?c.x+=1E-4:c.z+=1E-4,c.normalize(),a.crossVectors(f,c));a.normalize();b.crossVectors(c,\na);g[0]=a.x;g[4]=b.x;g[8]=c.x;g[1]=a.y;g[5]=b.y;g[9]=c.y;g[2]=a.z;g[6]=b.z;g[10]=c.z;return this}}(),multiply:function(a,b){return void 0!==b?(console.warn(\"THREE.Matrix4: .multiply() now only accepts one argument. Use .multiplyMatrices( a, b ) instead.\"),this.multiplyMatrices(a,b)):this.multiplyMatrices(this,a)},premultiply:function(a){return this.multiplyMatrices(a,this)},multiplyMatrices:function(a,b){var c=a.elements,d=b.elements,e=this.elements,f=c[0],g=c[4],h=c[8],k=c[12],m=c[1],q=c[5],l=c[9],\np=c[13],r=c[2],n=c[6],t=c[10],y=c[14],x=c[3],u=c[7],H=c[11],c=c[15],w=d[0],I=d[4],W=d[8],D=d[12],O=d[1],B=d[5],F=d[9],C=d[13],z=d[2],E=d[6],G=d[10],K=d[14],P=d[3],M=d[7],V=d[11],d=d[15];e[0]=f*w+g*O+h*z+k*P;e[4]=f*I+g*B+h*E+k*M;e[8]=f*W+g*F+h*G+k*V;e[12]=f*D+g*C+h*K+k*d;e[1]=m*w+q*O+l*z+p*P;e[5]=m*I+q*B+l*E+p*M;e[9]=m*W+q*F+l*G+p*V;e[13]=m*D+q*C+l*K+p*d;e[2]=r*w+n*O+t*z+y*P;e[6]=r*I+n*B+t*E+y*M;e[10]=r*W+n*F+t*G+y*V;e[14]=r*D+n*C+t*K+y*d;e[3]=x*w+u*O+H*z+c*P;e[7]=x*I+u*B+H*E+c*M;e[11]=x*W+u*F+H*G+\nc*V;e[15]=x*D+u*C+H*K+c*d;return this},multiplyScalar:function(a){var b=this.elements;b[0]*=a;b[4]*=a;b[8]*=a;b[12]*=a;b[1]*=a;b[5]*=a;b[9]*=a;b[13]*=a;b[2]*=a;b[6]*=a;b[10]*=a;b[14]*=a;b[3]*=a;b[7]*=a;b[11]*=a;b[15]*=a;return this},applyToBufferAttribute:function(){var a=new n;return function(b){for(var c=0,d=b.count;c<d;c++)a.x=b.getX(c),a.y=b.getY(c),a.z=b.getZ(c),a.applyMatrix4(this),b.setXYZ(c,a.x,a.y,a.z);return b}}(),determinant:function(){var a=this.elements,b=a[0],c=a[4],d=a[8],e=a[12],f=\na[1],g=a[5],h=a[9],k=a[13],m=a[2],q=a[6],l=a[10],p=a[14];return a[3]*(+e*h*q-d*k*q-e*g*l+c*k*l+d*g*p-c*h*p)+a[7]*(+b*h*p-b*k*l+e*f*l-d*f*p+d*k*m-e*h*m)+a[11]*(+b*k*q-b*g*p-e*f*q+c*f*p+e*g*m-c*k*m)+a[15]*(-d*g*m-b*h*q+b*g*l+d*f*q-c*f*l+c*h*m)},transpose:function(){var a=this.elements,b;b=a[1];a[1]=a[4];a[4]=b;b=a[2];a[2]=a[8];a[8]=b;b=a[6];a[6]=a[9];a[9]=b;b=a[3];a[3]=a[12];a[12]=b;b=a[7];a[7]=a[13];a[13]=b;b=a[11];a[11]=a[14];a[14]=b;return this},setPosition:function(a){var b=this.elements;b[12]=\na.x;b[13]=a.y;b[14]=a.z;return this},getInverse:function(a,b){var c=this.elements,d=a.elements,e=d[0],f=d[1],g=d[2],h=d[3],k=d[4],m=d[5],q=d[6],l=d[7],p=d[8],r=d[9],n=d[10],t=d[11],y=d[12],x=d[13],u=d[14],d=d[15],H=r*u*l-x*n*l+x*q*t-m*u*t-r*q*d+m*n*d,w=y*n*l-p*u*l-y*q*t+k*u*t+p*q*d-k*n*d,I=p*x*l-y*r*l+y*m*t-k*x*t-p*m*d+k*r*d,W=y*r*q-p*x*q-y*m*n+k*x*n+p*m*u-k*r*u,D=e*H+f*w+g*I+h*W;if(0===D){if(!0===b)throw Error(\"THREE.Matrix4.getInverse(): can't invert matrix, determinant is 0\");console.warn(\"THREE.Matrix4.getInverse(): can't invert matrix, determinant is 0\");\nreturn this.identity()}D=1/D;c[0]=H*D;c[1]=(x*n*h-r*u*h-x*g*t+f*u*t+r*g*d-f*n*d)*D;c[2]=(m*u*h-x*q*h+x*g*l-f*u*l-m*g*d+f*q*d)*D;c[3]=(r*q*h-m*n*h-r*g*l+f*n*l+m*g*t-f*q*t)*D;c[4]=w*D;c[5]=(p*u*h-y*n*h+y*g*t-e*u*t-p*g*d+e*n*d)*D;c[6]=(y*q*h-k*u*h-y*g*l+e*u*l+k*g*d-e*q*d)*D;c[7]=(k*n*h-p*q*h+p*g*l-e*n*l-k*g*t+e*q*t)*D;c[8]=I*D;c[9]=(y*r*h-p*x*h-y*f*t+e*x*t+p*f*d-e*r*d)*D;c[10]=(k*x*h-y*m*h+y*f*l-e*x*l-k*f*d+e*m*d)*D;c[11]=(p*m*h-k*r*h-p*f*l+e*r*l+k*f*t-e*m*t)*D;c[12]=W*D;c[13]=(p*x*g-y*r*g+y*f*n-e*x*\nn-p*f*u+e*r*u)*D;c[14]=(y*m*g-k*x*g-y*f*q+e*x*q+k*f*u-e*m*u)*D;c[15]=(k*r*g-p*m*g+p*f*q-e*r*q-k*f*n+e*m*n)*D;return this},scale:function(a){var b=this.elements,c=a.x,d=a.y;a=a.z;b[0]*=c;b[4]*=d;b[8]*=a;b[1]*=c;b[5]*=d;b[9]*=a;b[2]*=c;b[6]*=d;b[10]*=a;b[3]*=c;b[7]*=d;b[11]*=a;return this},getMaxScaleOnAxis:function(){var a=this.elements;return Math.sqrt(Math.max(a[0]*a[0]+a[1]*a[1]+a[2]*a[2],a[4]*a[4]+a[5]*a[5]+a[6]*a[6],a[8]*a[8]+a[9]*a[9]+a[10]*a[10]))},makeTranslation:function(a,b,c){this.set(1,\n0,0,a,0,1,0,b,0,0,1,c,0,0,0,1);return this},makeRotationX:function(a){var b=Math.cos(a);a=Math.sin(a);this.set(1,0,0,0,0,b,-a,0,0,a,b,0,0,0,0,1);return this},makeRotationY:function(a){var b=Math.cos(a);a=Math.sin(a);this.set(b,0,a,0,0,1,0,0,-a,0,b,0,0,0,0,1);return this},makeRotationZ:function(a){var b=Math.cos(a);a=Math.sin(a);this.set(b,-a,0,0,a,b,0,0,0,0,1,0,0,0,0,1);return this},makeRotationAxis:function(a,b){var c=Math.cos(b),d=Math.sin(b),e=1-c,f=a.x,g=a.y,h=a.z,k=e*f,m=e*g;this.set(k*f+c,k*\ng-d*h,k*h+d*g,0,k*g+d*h,m*g+c,m*h-d*f,0,k*h-d*g,m*h+d*f,e*h*h+c,0,0,0,0,1);return this},makeScale:function(a,b,c){this.set(a,0,0,0,0,b,0,0,0,0,c,0,0,0,0,1);return this},makeShear:function(a,b,c){this.set(1,b,c,0,a,1,c,0,a,b,1,0,0,0,0,1);return this},compose:function(a,b,c){this.makeRotationFromQuaternion(b);this.scale(c);this.setPosition(a);return this},decompose:function(){var a=new n,b=new K;return function(c,d,e){var f=this.elements,g=a.set(f[0],f[1],f[2]).length(),h=a.set(f[4],f[5],f[6]).length(),\nk=a.set(f[8],f[9],f[10]).length();0>this.determinant()&&(g=-g);c.x=f[12];c.y=f[13];c.z=f[14];b.copy(this);c=1/g;var f=1/h,m=1/k;b.elements[0]*=c;b.elements[1]*=c;b.elements[2]*=c;b.elements[4]*=f;b.elements[5]*=f;b.elements[6]*=f;b.elements[8]*=m;b.elements[9]*=m;b.elements[10]*=m;d.setFromRotationMatrix(b);e.x=g;e.y=h;e.z=k;return this}}(),makePerspective:function(a,b,c,d,e,f){void 0===f&&console.warn(\"THREE.Matrix4: .makePerspective() has been redefined and has a new signature. Please check the docs.\");\nvar g=this.elements;g[0]=2*e/(b-a);g[4]=0;g[8]=(b+a)/(b-a);g[12]=0;g[1]=0;g[5]=2*e/(c-d);g[9]=(c+d)/(c-d);g[13]=0;g[2]=0;g[6]=0;g[10]=-(f+e)/(f-e);g[14]=-2*f*e/(f-e);g[3]=0;g[7]=0;g[11]=-1;g[15]=0;return this},makeOrthographic:function(a,b,c,d,e,f){var g=this.elements,h=1/(b-a),k=1/(c-d),m=1/(f-e);g[0]=2*h;g[4]=0;g[8]=0;g[12]=-((b+a)*h);g[1]=0;g[5]=2*k;g[9]=0;g[13]=-((c+d)*k);g[2]=0;g[6]=0;g[10]=-2*m;g[14]=-((f+e)*m);g[3]=0;g[7]=0;g[11]=0;g[15]=1;return this},equals:function(a){var b=this.elements;\na=a.elements;for(var c=0;16>c;c++)if(b[c]!==a[c])return!1;return!0},fromArray:function(a,b){void 0===b&&(b=0);for(var c=0;16>c;c++)this.elements[c]=a[c+b];return this},toArray:function(a,b){void 0===a&&(a=[]);void 0===b&&(b=0);var c=this.elements;a[b]=c[0];a[b+1]=c[1];a[b+2]=c[2];a[b+3]=c[3];a[b+4]=c[4];a[b+5]=c[5];a[b+6]=c[6];a[b+7]=c[7];a[b+8]=c[8];a[b+9]=c[9];a[b+10]=c[10];a[b+11]=c[11];a[b+12]=c[12];a[b+13]=c[13];a[b+14]=c[14];a[b+15]=c[15];return a}});db.prototype=Object.create(ba.prototype);\ndb.prototype.constructor=db;db.prototype.isDataTexture=!0;Xa.prototype=Object.create(ba.prototype);Xa.prototype.constructor=Xa;Xa.prototype.isCubeTexture=!0;Object.defineProperty(Xa.prototype,\"images\",{get:function(){return this.image},set:function(a){this.image=a}});var Ce=new ba,De=new Xa,xe=[],ze=[],Be=new Float32Array(16),Ae=new Float32Array(9);He.prototype.setValue=function(a,b){for(var c=this.seq,d=0,e=c.length;d!==e;++d){var f=c[d];f.setValue(a,b[f.id])}};var Pd=/([\\w\\d_]+)(\\])?(\\[|\\.)?/g;\neb.prototype.setValue=function(a,b,c){b=this.map[b];void 0!==b&&b.setValue(a,c,this.renderer)};eb.prototype.setOptional=function(a,b,c){b=b[c];void 0!==b&&this.setValue(a,c,b)};eb.upload=function(a,b,c,d){for(var e=0,f=b.length;e!==f;++e){var g=b[e],h=c[g.id];!1!==h.needsUpdate&&g.setValue(a,h.value,d)}};eb.seqWithValue=function(a,b){for(var c=[],d=0,e=a.length;d!==e;++d){var f=a[d];f.id in b&&c.push(f)}return c};var lg={aliceblue:15792383,antiquewhite:16444375,aqua:65535,aquamarine:8388564,azure:15794175,\nbeige:16119260,bisque:16770244,black:0,blanchedalmond:16772045,blue:255,blueviolet:9055202,brown:10824234,burlywood:14596231,cadetblue:6266528,chartreuse:8388352,chocolate:13789470,coral:16744272,cornflowerblue:6591981,cornsilk:16775388,crimson:14423100,cyan:65535,darkblue:139,darkcyan:35723,darkgoldenrod:12092939,darkgray:11119017,darkgreen:25600,darkgrey:11119017,darkkhaki:12433259,darkmagenta:9109643,darkolivegreen:5597999,darkorange:16747520,darkorchid:10040012,darkred:9109504,darksalmon:15308410,\ndarkseagreen:9419919,darkslateblue:4734347,darkslategray:3100495,darkslategrey:3100495,darkturquoise:52945,darkviolet:9699539,deeppink:16716947,deepskyblue:49151,dimgray:6908265,dimgrey:6908265,dodgerblue:2003199,firebrick:11674146,floralwhite:16775920,forestgreen:2263842,fuchsia:16711935,gainsboro:14474460,ghostwhite:16316671,gold:16766720,goldenrod:14329120,gray:8421504,green:32768,greenyellow:11403055,grey:8421504,honeydew:15794160,hotpink:16738740,indianred:13458524,indigo:4915330,ivory:16777200,\nkhaki:15787660,lavender:15132410,lavenderblush:16773365,lawngreen:8190976,lemonchiffon:16775885,lightblue:11393254,lightcoral:15761536,lightcyan:14745599,lightgoldenrodyellow:16448210,lightgray:13882323,lightgreen:9498256,lightgrey:13882323,lightpink:16758465,lightsalmon:16752762,lightseagreen:2142890,lightskyblue:8900346,lightslategray:7833753,lightslategrey:7833753,lightsteelblue:11584734,lightyellow:16777184,lime:65280,limegreen:3329330,linen:16445670,magenta:16711935,maroon:8388608,mediumaquamarine:6737322,\nmediumblue:205,mediumorchid:12211667,mediumpurple:9662683,mediumseagreen:3978097,mediumslateblue:8087790,mediumspringgreen:64154,mediumturquoise:4772300,mediumvioletred:13047173,midnightblue:1644912,mintcream:16121850,mistyrose:16770273,moccasin:16770229,navajowhite:16768685,navy:128,oldlace:16643558,olive:8421376,olivedrab:7048739,orange:16753920,orangered:16729344,orchid:14315734,palegoldenrod:15657130,palegreen:10025880,paleturquoise:11529966,palevioletred:14381203,papayawhip:16773077,peachpuff:16767673,\nperu:13468991,pink:16761035,plum:14524637,powderblue:11591910,purple:8388736,red:16711680,rosybrown:12357519,royalblue:4286945,saddlebrown:9127187,salmon:16416882,sandybrown:16032864,seagreen:3050327,seashell:16774638,sienna:10506797,silver:12632256,skyblue:8900331,slateblue:6970061,slategray:7372944,slategrey:7372944,snow:16775930,springgreen:65407,steelblue:4620980,tan:13808780,teal:32896,thistle:14204888,tomato:16737095,turquoise:4251856,violet:15631086,wheat:16113331,white:16777215,whitesmoke:16119285,\nyellow:16776960,yellowgreen:10145074};Object.assign(G.prototype,{isColor:!0,r:1,g:1,b:1,set:function(a){a&&a.isColor?this.copy(a):\"number\"===typeof a?this.setHex(a):\"string\"===typeof a&&this.setStyle(a);return this},setScalar:function(a){this.b=this.g=this.r=a;return this},setHex:function(a){a=Math.floor(a);this.r=(a>>16&255)/255;this.g=(a>>8&255)/255;this.b=(a&255)/255;return this},setRGB:function(a,b,c){this.r=a;this.g=b;this.b=c;return this},setHSL:function(){function a(a,c,d){0>d&&(d+=1);1<d&&\n--d;return d<1/6?a+6*(c-a)*d:.5>d?c:d<2/3?a+6*(c-a)*(2/3-d):a}return function(b,c,d){b=Y.euclideanModulo(b,1);c=Y.clamp(c,0,1);d=Y.clamp(d,0,1);0===c?this.r=this.g=this.b=d:(c=.5>=d?d*(1+c):d+c-d*c,d=2*d-c,this.r=a(d,c,b+1/3),this.g=a(d,c,b),this.b=a(d,c,b-1/3));return this}}(),setStyle:function(a){function b(b){void 0!==b&&1>parseFloat(b)&&console.warn(\"THREE.Color: Alpha component of \"+a+\" will be ignored.\")}var c;if(c=/^((?:rgb|hsl)a?)\\(\\s*([^\\)]*)\\)/.exec(a)){var d=c[2];switch(c[1]){case \"rgb\":case \"rgba\":if(c=\n/^(\\d+)\\s*,\\s*(\\d+)\\s*,\\s*(\\d+)\\s*(,\\s*([0-9]*\\.?[0-9]+)\\s*)?$/.exec(d))return this.r=Math.min(255,parseInt(c[1],10))/255,this.g=Math.min(255,parseInt(c[2],10))/255,this.b=Math.min(255,parseInt(c[3],10))/255,b(c[5]),this;if(c=/^(\\d+)\\%\\s*,\\s*(\\d+)\\%\\s*,\\s*(\\d+)\\%\\s*(,\\s*([0-9]*\\.?[0-9]+)\\s*)?$/.exec(d))return this.r=Math.min(100,parseInt(c[1],10))/100,this.g=Math.min(100,parseInt(c[2],10))/100,this.b=Math.min(100,parseInt(c[3],10))/100,b(c[5]),this;break;case \"hsl\":case \"hsla\":if(c=/^([0-9]*\\.?[0-9]+)\\s*,\\s*(\\d+)\\%\\s*,\\s*(\\d+)\\%\\s*(,\\s*([0-9]*\\.?[0-9]+)\\s*)?$/.exec(d)){var d=\nparseFloat(c[1])/360,e=parseInt(c[2],10)/100,f=parseInt(c[3],10)/100;b(c[5]);return this.setHSL(d,e,f)}}}else if(c=/^\\#([A-Fa-f0-9]+)$/.exec(a)){c=c[1];d=c.length;if(3===d)return this.r=parseInt(c.charAt(0)+c.charAt(0),16)/255,this.g=parseInt(c.charAt(1)+c.charAt(1),16)/255,this.b=parseInt(c.charAt(2)+c.charAt(2),16)/255,this;if(6===d)return this.r=parseInt(c.charAt(0)+c.charAt(1),16)/255,this.g=parseInt(c.charAt(2)+c.charAt(3),16)/255,this.b=parseInt(c.charAt(4)+c.charAt(5),16)/255,this}a&&0<a.length&&\n(c=lg[a],void 0!==c?this.setHex(c):console.warn(\"THREE.Color: Unknown color \"+a));return this},clone:function(){return new this.constructor(this.r,this.g,this.b)},copy:function(a){this.r=a.r;this.g=a.g;this.b=a.b;return this},copyGammaToLinear:function(a,b){void 0===b&&(b=2);this.r=Math.pow(a.r,b);this.g=Math.pow(a.g,b);this.b=Math.pow(a.b,b);return this},copyLinearToGamma:function(a,b){void 0===b&&(b=2);var c=0<b?1/b:1;this.r=Math.pow(a.r,c);this.g=Math.pow(a.g,c);this.b=Math.pow(a.b,c);return this},\nconvertGammaToLinear:function(){var a=this.r,b=this.g,c=this.b;this.r=a*a;this.g=b*b;this.b=c*c;return this},convertLinearToGamma:function(){this.r=Math.sqrt(this.r);this.g=Math.sqrt(this.g);this.b=Math.sqrt(this.b);return this},getHex:function(){return 255*this.r<<16^255*this.g<<8^255*this.b<<0},getHexString:function(){return(\"000000\"+this.getHex().toString(16)).slice(-6)},getHSL:function(a){a=a||{h:0,s:0,l:0};var b=this.r,c=this.g,d=this.b,e=Math.max(b,c,d),f=Math.min(b,c,d),g,h=(f+e)/2;if(f===\ne)f=g=0;else{var k=e-f,f=.5>=h?k/(e+f):k/(2-e-f);switch(e){case b:g=(c-d)/k+(c<d?6:0);break;case c:g=(d-b)/k+2;break;case d:g=(b-c)/k+4}g/=6}a.h=g;a.s=f;a.l=h;return a},getStyle:function(){return\"rgb(\"+(255*this.r|0)+\",\"+(255*this.g|0)+\",\"+(255*this.b|0)+\")\"},offsetHSL:function(a,b,c){var d=this.getHSL();d.h+=a;d.s+=b;d.l+=c;this.setHSL(d.h,d.s,d.l);return this},add:function(a){this.r+=a.r;this.g+=a.g;this.b+=a.b;return this},addColors:function(a,b){this.r=a.r+b.r;this.g=a.g+b.g;this.b=a.b+b.b;return this},\naddScalar:function(a){this.r+=a;this.g+=a;this.b+=a;return this},sub:function(a){this.r=Math.max(0,this.r-a.r);this.g=Math.max(0,this.g-a.g);this.b=Math.max(0,this.b-a.b);return this},multiply:function(a){this.r*=a.r;this.g*=a.g;this.b*=a.b;return this},multiplyScalar:function(a){this.r*=a;this.g*=a;this.b*=a;return this},lerp:function(a,b){this.r+=(a.r-this.r)*b;this.g+=(a.g-this.g)*b;this.b+=(a.b-this.b)*b;return this},equals:function(a){return a.r===this.r&&a.g===this.g&&a.b===this.b},fromArray:function(a,\nb){void 0===b&&(b=0);this.r=a[b];this.g=a[b+1];this.b=a[b+2];return this},toArray:function(a,b){void 0===a&&(a=[]);void 0===b&&(b=0);a[b]=this.r;a[b+1]=this.g;a[b+2]=this.b;return a},toJSON:function(){return this.getHex()}});var R={common:{diffuse:{value:new G(15658734)},opacity:{value:1},map:{value:null},offsetRepeat:{value:new fa(0,0,1,1)},specularMap:{value:null},alphaMap:{value:null},envMap:{value:null},flipEnvMap:{value:-1},reflectivity:{value:1},refractionRatio:{value:.98}},aomap:{aoMap:{value:null},\naoMapIntensity:{value:1}},lightmap:{lightMap:{value:null},lightMapIntensity:{value:1}},emissivemap:{emissiveMap:{value:null}},bumpmap:{bumpMap:{value:null},bumpScale:{value:1}},normalmap:{normalMap:{value:null},normalScale:{value:new C(1,1)}},displacementmap:{displacementMap:{value:null},displacementScale:{value:1},displacementBias:{value:0}},roughnessmap:{roughnessMap:{value:null}},metalnessmap:{metalnessMap:{value:null}},gradientmap:{gradientMap:{value:null}},fog:{fogDensity:{value:2.5E-4},fogNear:{value:1},\nfogFar:{value:2E3},fogColor:{value:new G(16777215)}},lights:{ambientLightColor:{value:[]},directionalLights:{value:[],properties:{direction:{},color:{},shadow:{},shadowBias:{},shadowRadius:{},shadowMapSize:{}}},directionalShadowMap:{value:[]},directionalShadowMatrix:{value:[]},spotLights:{value:[],properties:{color:{},position:{},direction:{},distance:{},coneCos:{},penumbraCos:{},decay:{},shadow:{},shadowBias:{},shadowRadius:{},shadowMapSize:{}}},spotShadowMap:{value:[]},spotShadowMatrix:{value:[]},\npointLights:{value:[],properties:{color:{},position:{},decay:{},distance:{},shadow:{},shadowBias:{},shadowRadius:{},shadowMapSize:{}}},pointShadowMap:{value:[]},pointShadowMatrix:{value:[]},hemisphereLights:{value:[],properties:{direction:{},skyColor:{},groundColor:{}}},rectAreaLights:{value:[],properties:{color:{},position:{},width:{},height:{}}}},points:{diffuse:{value:new G(15658734)},opacity:{value:1},size:{value:1},scale:{value:1},map:{value:null},offsetRepeat:{value:new fa(0,0,1,1)}}},Ca={merge:function(a){for(var b=\n{},c=0;c<a.length;c++){var d=this.clone(a[c]),e;for(e in d)b[e]=d[e]}return b},clone:function(a){var b={},c;for(c in a){b[c]={};for(var d in a[c]){var e=a[c][d];e&&(e.isColor||e.isMatrix3||e.isMatrix4||e.isVector2||e.isVector3||e.isVector4||e.isTexture)?b[c][d]=e.clone():Array.isArray(e)?b[c][d]=e.slice():b[c][d]=e}}return b}},X={alphamap_fragment:\"#ifdef USE_ALPHAMAP\\n\\tdiffuseColor.a *= texture2D( alphaMap, vUv ).g;\\n#endif\\n\",alphamap_pars_fragment:\"#ifdef USE_ALPHAMAP\\n\\tuniform sampler2D alphaMap;\\n#endif\\n\",\nalphatest_fragment:\"#ifdef ALPHATEST\\n\\tif ( diffuseColor.a < ALPHATEST ) discard;\\n#endif\\n\",aomap_fragment:\"#ifdef USE_AOMAP\\n\\tfloat ambientOcclusion = ( texture2D( aoMap, vUv2 ).r - 1.0 ) * aoMapIntensity + 1.0;\\n\\treflectedLight.indirectDiffuse *= ambientOcclusion;\\n\\t#if defined( USE_ENVMAP ) && defined( PHYSICAL )\\n\\t\\tfloat dotNV = saturate( dot( geometry.normal, geometry.viewDir ) );\\n\\t\\treflectedLight.indirectSpecular *= computeSpecularOcclusion( dotNV, ambientOcclusion, material.specularRoughness );\\n\\t#endif\\n#endif\\n\",\naomap_pars_fragment:\"#ifdef USE_AOMAP\\n\\tuniform sampler2D aoMap;\\n\\tuniform float aoMapIntensity;\\n#endif\",begin_vertex:\"\\nvec3 transformed = vec3( position );\\n\",beginnormal_vertex:\"\\nvec3 objectNormal = vec3( normal );\\n\",bsdfs:\"float punctualLightIntensityToIrradianceFactor( const in float lightDistance, const in float cutoffDistance, const in float decayExponent ) {\\n\\tif( decayExponent > 0.0 ) {\\n#if defined ( PHYSICALLY_CORRECT_LIGHTS )\\n\\t\\tfloat distanceFalloff = 1.0 / max( pow( lightDistance, decayExponent ), 0.01 );\\n\\t\\tfloat maxDistanceCutoffFactor = pow2( saturate( 1.0 - pow4( lightDistance / cutoffDistance ) ) );\\n\\t\\treturn distanceFalloff * maxDistanceCutoffFactor;\\n#else\\n\\t\\treturn pow( saturate( -lightDistance / cutoffDistance + 1.0 ), decayExponent );\\n#endif\\n\\t}\\n\\treturn 1.0;\\n}\\nvec3 BRDF_Diffuse_Lambert( const in vec3 diffuseColor ) {\\n\\treturn RECIPROCAL_PI * diffuseColor;\\n}\\nvec3 F_Schlick( const in vec3 specularColor, const in float dotLH ) {\\n\\tfloat fresnel = exp2( ( -5.55473 * dotLH - 6.98316 ) * dotLH );\\n\\treturn ( 1.0 - specularColor ) * fresnel + specularColor;\\n}\\nfloat G_GGX_Smith( const in float alpha, const in float dotNL, const in float dotNV ) {\\n\\tfloat a2 = pow2( alpha );\\n\\tfloat gl = dotNL + sqrt( a2 + ( 1.0 - a2 ) * pow2( dotNL ) );\\n\\tfloat gv = dotNV + sqrt( a2 + ( 1.0 - a2 ) * pow2( dotNV ) );\\n\\treturn 1.0 / ( gl * gv );\\n}\\nfloat G_GGX_SmithCorrelated( const in float alpha, const in float dotNL, const in float dotNV ) {\\n\\tfloat a2 = pow2( alpha );\\n\\tfloat gv = dotNL * sqrt( a2 + ( 1.0 - a2 ) * pow2( dotNV ) );\\n\\tfloat gl = dotNV * sqrt( a2 + ( 1.0 - a2 ) * pow2( dotNL ) );\\n\\treturn 0.5 / max( gv + gl, EPSILON );\\n}\\nfloat D_GGX( const in float alpha, const in float dotNH ) {\\n\\tfloat a2 = pow2( alpha );\\n\\tfloat denom = pow2( dotNH ) * ( a2 - 1.0 ) + 1.0;\\n\\treturn RECIPROCAL_PI * a2 / pow2( denom );\\n}\\nvec3 BRDF_Specular_GGX( const in IncidentLight incidentLight, const in GeometricContext geometry, const in vec3 specularColor, const in float roughness ) {\\n\\tfloat alpha = pow2( roughness );\\n\\tvec3 halfDir = normalize( incidentLight.direction + geometry.viewDir );\\n\\tfloat dotNL = saturate( dot( geometry.normal, incidentLight.direction ) );\\n\\tfloat dotNV = saturate( dot( geometry.normal, geometry.viewDir ) );\\n\\tfloat dotNH = saturate( dot( geometry.normal, halfDir ) );\\n\\tfloat dotLH = saturate( dot( incidentLight.direction, halfDir ) );\\n\\tvec3 F = F_Schlick( specularColor, dotLH );\\n\\tfloat G = G_GGX_SmithCorrelated( alpha, dotNL, dotNV );\\n\\tfloat D = D_GGX( alpha, dotNH );\\n\\treturn F * ( G * D );\\n}\\nvec2 LTC_Uv( const in vec3 N, const in vec3 V, const in float roughness ) {\\n\\tconst float LUT_SIZE = 64.0;\\n\\tconst float LUT_SCALE = ( LUT_SIZE - 1.0 ) / LUT_SIZE;\\n\\tconst float LUT_BIAS = 0.5 / LUT_SIZE;\\n\\tfloat theta = acos( dot( N, V ) );\\n\\tvec2 uv = vec2(\\n\\t\\tsqrt( saturate( roughness ) ),\\n\\t\\tsaturate( theta / ( 0.5 * PI ) ) );\\n\\tuv = uv * LUT_SCALE + LUT_BIAS;\\n\\treturn uv;\\n}\\nfloat LTC_ClippedSphereFormFactor( const in vec3 f ) {\\n\\tfloat l = length( f );\\n\\treturn max( ( l * l + f.z ) / ( l + 1.0 ), 0.0 );\\n}\\nvec3 LTC_EdgeVectorFormFactor( const in vec3 v1, const in vec3 v2 ) {\\n\\tfloat x = dot( v1, v2 );\\n\\tfloat y = abs( x );\\n\\tfloat a = 0.86267 + (0.49788 + 0.01436 * y ) * y;\\n\\tfloat b = 3.45068 + (4.18814 + y) * y;\\n\\tfloat v = a / b;\\n\\tfloat theta_sintheta = (x > 0.0) ? v : 0.5 * inversesqrt( 1.0 - x * x ) - v;\\n\\treturn cross( v1, v2 ) * theta_sintheta;\\n}\\nvec3 LTC_Evaluate( const in vec3 N, const in vec3 V, const in vec3 P, const in mat3 mInv, const in vec3 rectCoords[ 4 ] ) {\\n\\tvec3 v1 = rectCoords[ 1 ] - rectCoords[ 0 ];\\n\\tvec3 v2 = rectCoords[ 3 ] - rectCoords[ 0 ];\\n\\tvec3 lightNormal = cross( v1, v2 );\\n\\tif( dot( lightNormal, P - rectCoords[ 0 ] ) < 0.0 ) return vec3( 0.0 );\\n\\tvec3 T1, T2;\\n\\tT1 = normalize( V - N * dot( V, N ) );\\n\\tT2 = - cross( N, T1 );\\n\\tmat3 mat = mInv * transpose( mat3( T1, T2, N ) );\\n\\tvec3 coords[ 4 ];\\n\\tcoords[ 0 ] = mat * ( rectCoords[ 0 ] - P );\\n\\tcoords[ 1 ] = mat * ( rectCoords[ 1 ] - P );\\n\\tcoords[ 2 ] = mat * ( rectCoords[ 2 ] - P );\\n\\tcoords[ 3 ] = mat * ( rectCoords[ 3 ] - P );\\n\\tcoords[ 0 ] = normalize( coords[ 0 ] );\\n\\tcoords[ 1 ] = normalize( coords[ 1 ] );\\n\\tcoords[ 2 ] = normalize( coords[ 2 ] );\\n\\tcoords[ 3 ] = normalize( coords[ 3 ] );\\n\\tvec3 vectorFormFactor = vec3( 0.0 );\\n\\tvectorFormFactor += LTC_EdgeVectorFormFactor( coords[ 0 ], coords[ 1 ] );\\n\\tvectorFormFactor += LTC_EdgeVectorFormFactor( coords[ 1 ], coords[ 2 ] );\\n\\tvectorFormFactor += LTC_EdgeVectorFormFactor( coords[ 2 ], coords[ 3 ] );\\n\\tvectorFormFactor += LTC_EdgeVectorFormFactor( coords[ 3 ], coords[ 0 ] );\\n\\tvec3 result = vec3( LTC_ClippedSphereFormFactor( vectorFormFactor ) );\\n\\treturn result;\\n}\\nvec3 BRDF_Specular_GGX_Environment( const in GeometricContext geometry, const in vec3 specularColor, const in float roughness ) {\\n\\tfloat dotNV = saturate( dot( geometry.normal, geometry.viewDir ) );\\n\\tconst vec4 c0 = vec4( - 1, - 0.0275, - 0.572, 0.022 );\\n\\tconst vec4 c1 = vec4( 1, 0.0425, 1.04, - 0.04 );\\n\\tvec4 r = roughness * c0 + c1;\\n\\tfloat a004 = min( r.x * r.x, exp2( - 9.28 * dotNV ) ) * r.x + r.y;\\n\\tvec2 AB = vec2( -1.04, 1.04 ) * a004 + r.zw;\\n\\treturn specularColor * AB.x + AB.y;\\n}\\nfloat G_BlinnPhong_Implicit( ) {\\n\\treturn 0.25;\\n}\\nfloat D_BlinnPhong( const in float shininess, const in float dotNH ) {\\n\\treturn RECIPROCAL_PI * ( shininess * 0.5 + 1.0 ) * pow( dotNH, shininess );\\n}\\nvec3 BRDF_Specular_BlinnPhong( const in IncidentLight incidentLight, const in GeometricContext geometry, const in vec3 specularColor, const in float shininess ) {\\n\\tvec3 halfDir = normalize( incidentLight.direction + geometry.viewDir );\\n\\tfloat dotNH = saturate( dot( geometry.normal, halfDir ) );\\n\\tfloat dotLH = saturate( dot( incidentLight.direction, halfDir ) );\\n\\tvec3 F = F_Schlick( specularColor, dotLH );\\n\\tfloat G = G_BlinnPhong_Implicit( );\\n\\tfloat D = D_BlinnPhong( shininess, dotNH );\\n\\treturn F * ( G * D );\\n}\\nfloat GGXRoughnessToBlinnExponent( const in float ggxRoughness ) {\\n\\treturn ( 2.0 / pow2( ggxRoughness + 0.0001 ) - 2.0 );\\n}\\nfloat BlinnExponentToGGXRoughness( const in float blinnExponent ) {\\n\\treturn sqrt( 2.0 / ( blinnExponent + 2.0 ) );\\n}\\n\",\nbumpmap_pars_fragment:\"#ifdef USE_BUMPMAP\\n\\tuniform sampler2D bumpMap;\\n\\tuniform float bumpScale;\\n\\tvec2 dHdxy_fwd() {\\n\\t\\tvec2 dSTdx = dFdx( vUv );\\n\\t\\tvec2 dSTdy = dFdy( vUv );\\n\\t\\tfloat Hll = bumpScale * texture2D( bumpMap, vUv ).x;\\n\\t\\tfloat dBx = bumpScale * texture2D( bumpMap, vUv + dSTdx ).x - Hll;\\n\\t\\tfloat dBy = bumpScale * texture2D( bumpMap, vUv + dSTdy ).x - Hll;\\n\\t\\treturn vec2( dBx, dBy );\\n\\t}\\n\\tvec3 perturbNormalArb( vec3 surf_pos, vec3 surf_norm, vec2 dHdxy ) {\\n\\t\\tvec3 vSigmaX = vec3( dFdx( surf_pos.x ), dFdx( surf_pos.y ), dFdx( surf_pos.z ) );\\n\\t\\tvec3 vSigmaY = vec3( dFdy( surf_pos.x ), dFdy( surf_pos.y ), dFdy( surf_pos.z ) );\\n\\t\\tvec3 vN = surf_norm;\\n\\t\\tvec3 R1 = cross( vSigmaY, vN );\\n\\t\\tvec3 R2 = cross( vN, vSigmaX );\\n\\t\\tfloat fDet = dot( vSigmaX, R1 );\\n\\t\\tvec3 vGrad = sign( fDet ) * ( dHdxy.x * R1 + dHdxy.y * R2 );\\n\\t\\treturn normalize( abs( fDet ) * surf_norm - vGrad );\\n\\t}\\n#endif\\n\",\nclipping_planes_fragment:\"#if NUM_CLIPPING_PLANES > 0\\n\\tfor ( int i = 0; i < UNION_CLIPPING_PLANES; ++ i ) {\\n\\t\\tvec4 plane = clippingPlanes[ i ];\\n\\t\\tif ( dot( vViewPosition, plane.xyz ) > plane.w ) discard;\\n\\t}\\n\\t\\t\\n\\t#if UNION_CLIPPING_PLANES < NUM_CLIPPING_PLANES\\n\\t\\tbool clipped = true;\\n\\t\\tfor ( int i = UNION_CLIPPING_PLANES; i < NUM_CLIPPING_PLANES; ++ i ) {\\n\\t\\t\\tvec4 plane = clippingPlanes[ i ];\\n\\t\\t\\tclipped = ( dot( vViewPosition, plane.xyz ) > plane.w ) && clipped;\\n\\t\\t}\\n\\t\\tif ( clipped ) discard;\\n\\t\\n\\t#endif\\n#endif\\n\",\nclipping_planes_pars_fragment:\"#if NUM_CLIPPING_PLANES > 0\\n\\t#if ! defined( PHYSICAL ) && ! defined( PHONG )\\n\\t\\tvarying vec3 vViewPosition;\\n\\t#endif\\n\\tuniform vec4 clippingPlanes[ NUM_CLIPPING_PLANES ];\\n#endif\\n\",clipping_planes_pars_vertex:\"#if NUM_CLIPPING_PLANES > 0 && ! defined( PHYSICAL ) && ! defined( PHONG )\\n\\tvarying vec3 vViewPosition;\\n#endif\\n\",clipping_planes_vertex:\"#if NUM_CLIPPING_PLANES > 0 && ! defined( PHYSICAL ) && ! defined( PHONG )\\n\\tvViewPosition = - mvPosition.xyz;\\n#endif\\n\",\ncolor_fragment:\"#ifdef USE_COLOR\\n\\tdiffuseColor.rgb *= vColor;\\n#endif\",color_pars_fragment:\"#ifdef USE_COLOR\\n\\tvarying vec3 vColor;\\n#endif\\n\",color_pars_vertex:\"#ifdef USE_COLOR\\n\\tvarying vec3 vColor;\\n#endif\",color_vertex:\"#ifdef USE_COLOR\\n\\tvColor.xyz = color.xyz;\\n#endif\",common:\"#define PI 3.14159265359\\n#define PI2 6.28318530718\\n#define PI_HALF 1.5707963267949\\n#define RECIPROCAL_PI 0.31830988618\\n#define RECIPROCAL_PI2 0.15915494\\n#define LOG2 1.442695\\n#define EPSILON 1e-6\\n#define saturate(a) clamp( a, 0.0, 1.0 )\\n#define whiteCompliment(a) ( 1.0 - saturate( a ) )\\nfloat pow2( const in float x ) { return x*x; }\\nfloat pow3( const in float x ) { return x*x*x; }\\nfloat pow4( const in float x ) { float x2 = x*x; return x2*x2; }\\nfloat average( const in vec3 color ) { return dot( color, vec3( 0.3333 ) ); }\\nhighp float rand( const in vec2 uv ) {\\n\\tconst highp float a = 12.9898, b = 78.233, c = 43758.5453;\\n\\thighp float dt = dot( uv.xy, vec2( a,b ) ), sn = mod( dt, PI );\\n\\treturn fract(sin(sn) * c);\\n}\\nstruct IncidentLight {\\n\\tvec3 color;\\n\\tvec3 direction;\\n\\tbool visible;\\n};\\nstruct ReflectedLight {\\n\\tvec3 directDiffuse;\\n\\tvec3 directSpecular;\\n\\tvec3 indirectDiffuse;\\n\\tvec3 indirectSpecular;\\n};\\nstruct GeometricContext {\\n\\tvec3 position;\\n\\tvec3 normal;\\n\\tvec3 viewDir;\\n};\\nvec3 transformDirection( in vec3 dir, in mat4 matrix ) {\\n\\treturn normalize( ( matrix * vec4( dir, 0.0 ) ).xyz );\\n}\\nvec3 inverseTransformDirection( in vec3 dir, in mat4 matrix ) {\\n\\treturn normalize( ( vec4( dir, 0.0 ) * matrix ).xyz );\\n}\\nvec3 projectOnPlane(in vec3 point, in vec3 pointOnPlane, in vec3 planeNormal ) {\\n\\tfloat distance = dot( planeNormal, point - pointOnPlane );\\n\\treturn - distance * planeNormal + point;\\n}\\nfloat sideOfPlane( in vec3 point, in vec3 pointOnPlane, in vec3 planeNormal ) {\\n\\treturn sign( dot( point - pointOnPlane, planeNormal ) );\\n}\\nvec3 linePlaneIntersect( in vec3 pointOnLine, in vec3 lineDirection, in vec3 pointOnPlane, in vec3 planeNormal ) {\\n\\treturn lineDirection * ( dot( planeNormal, pointOnPlane - pointOnLine ) / dot( planeNormal, lineDirection ) ) + pointOnLine;\\n}\\nmat3 transpose( const in mat3 v ) {\\n\\tmat3 tmp;\\n\\ttmp[0] = vec3(v[0].x, v[1].x, v[2].x);\\n\\ttmp[1] = vec3(v[0].y, v[1].y, v[2].y);\\n\\ttmp[2] = vec3(v[0].z, v[1].z, v[2].z);\\n\\treturn tmp;\\n}\\n\",\ncube_uv_reflection_fragment:\"#ifdef ENVMAP_TYPE_CUBE_UV\\n#define cubeUV_textureSize (1024.0)\\nint getFaceFromDirection(vec3 direction) {\\n\\tvec3 absDirection = abs(direction);\\n\\tint face = -1;\\n\\tif( absDirection.x > absDirection.z ) {\\n\\t\\tif(absDirection.x > absDirection.y )\\n\\t\\t\\tface = direction.x > 0.0 ? 0 : 3;\\n\\t\\telse\\n\\t\\t\\tface = direction.y > 0.0 ? 1 : 4;\\n\\t}\\n\\telse {\\n\\t\\tif(absDirection.z > absDirection.y )\\n\\t\\t\\tface = direction.z > 0.0 ? 2 : 5;\\n\\t\\telse\\n\\t\\t\\tface = direction.y > 0.0 ? 1 : 4;\\n\\t}\\n\\treturn face;\\n}\\n#define cubeUV_maxLods1 (log2(cubeUV_textureSize*0.25) - 1.0)\\n#define cubeUV_rangeClamp (exp2((6.0 - 1.0) * 2.0))\\nvec2 MipLevelInfo( vec3 vec, float roughnessLevel, float roughness ) {\\n\\tfloat scale = exp2(cubeUV_maxLods1 - roughnessLevel);\\n\\tfloat dxRoughness = dFdx(roughness);\\n\\tfloat dyRoughness = dFdy(roughness);\\n\\tvec3 dx = dFdx( vec * scale * dxRoughness );\\n\\tvec3 dy = dFdy( vec * scale * dyRoughness );\\n\\tfloat d = max( dot( dx, dx ), dot( dy, dy ) );\\n\\td = clamp(d, 1.0, cubeUV_rangeClamp);\\n\\tfloat mipLevel = 0.5 * log2(d);\\n\\treturn vec2(floor(mipLevel), fract(mipLevel));\\n}\\n#define cubeUV_maxLods2 (log2(cubeUV_textureSize*0.25) - 2.0)\\n#define cubeUV_rcpTextureSize (1.0 / cubeUV_textureSize)\\nvec2 getCubeUV(vec3 direction, float roughnessLevel, float mipLevel) {\\n\\tmipLevel = roughnessLevel > cubeUV_maxLods2 - 3.0 ? 0.0 : mipLevel;\\n\\tfloat a = 16.0 * cubeUV_rcpTextureSize;\\n\\tvec2 exp2_packed = exp2( vec2( roughnessLevel, mipLevel ) );\\n\\tvec2 rcp_exp2_packed = vec2( 1.0 ) / exp2_packed;\\n\\tfloat powScale = exp2_packed.x * exp2_packed.y;\\n\\tfloat scale = rcp_exp2_packed.x * rcp_exp2_packed.y * 0.25;\\n\\tfloat mipOffset = 0.75*(1.0 - rcp_exp2_packed.y) * rcp_exp2_packed.x;\\n\\tbool bRes = mipLevel == 0.0;\\n\\tscale = bRes && (scale < a) ? a : scale;\\n\\tvec3 r;\\n\\tvec2 offset;\\n\\tint face = getFaceFromDirection(direction);\\n\\tfloat rcpPowScale = 1.0 / powScale;\\n\\tif( face == 0) {\\n\\t\\tr = vec3(direction.x, -direction.z, direction.y);\\n\\t\\toffset = vec2(0.0+mipOffset,0.75 * rcpPowScale);\\n\\t\\toffset.y = bRes && (offset.y < 2.0*a) ? a : offset.y;\\n\\t}\\n\\telse if( face == 1) {\\n\\t\\tr = vec3(direction.y, direction.x, direction.z);\\n\\t\\toffset = vec2(scale+mipOffset, 0.75 * rcpPowScale);\\n\\t\\toffset.y = bRes && (offset.y < 2.0*a) ? a : offset.y;\\n\\t}\\n\\telse if( face == 2) {\\n\\t\\tr = vec3(direction.z, direction.x, direction.y);\\n\\t\\toffset = vec2(2.0*scale+mipOffset, 0.75 * rcpPowScale);\\n\\t\\toffset.y = bRes && (offset.y < 2.0*a) ? a : offset.y;\\n\\t}\\n\\telse if( face == 3) {\\n\\t\\tr = vec3(direction.x, direction.z, direction.y);\\n\\t\\toffset = vec2(0.0+mipOffset,0.5 * rcpPowScale);\\n\\t\\toffset.y = bRes && (offset.y < 2.0*a) ? 0.0 : offset.y;\\n\\t}\\n\\telse if( face == 4) {\\n\\t\\tr = vec3(direction.y, direction.x, -direction.z);\\n\\t\\toffset = vec2(scale+mipOffset, 0.5 * rcpPowScale);\\n\\t\\toffset.y = bRes && (offset.y < 2.0*a) ? 0.0 : offset.y;\\n\\t}\\n\\telse {\\n\\t\\tr = vec3(direction.z, -direction.x, direction.y);\\n\\t\\toffset = vec2(2.0*scale+mipOffset, 0.5 * rcpPowScale);\\n\\t\\toffset.y = bRes && (offset.y < 2.0*a) ? 0.0 : offset.y;\\n\\t}\\n\\tr = normalize(r);\\n\\tfloat texelOffset = 0.5 * cubeUV_rcpTextureSize;\\n\\tvec2 s = ( r.yz / abs( r.x ) + vec2( 1.0 ) ) * 0.5;\\n\\tvec2 base = offset + vec2( texelOffset );\\n\\treturn base + s * ( scale - 2.0 * texelOffset );\\n}\\n#define cubeUV_maxLods3 (log2(cubeUV_textureSize*0.25) - 3.0)\\nvec4 textureCubeUV(vec3 reflectedDirection, float roughness ) {\\n\\tfloat roughnessVal = roughness* cubeUV_maxLods3;\\n\\tfloat r1 = floor(roughnessVal);\\n\\tfloat r2 = r1 + 1.0;\\n\\tfloat t = fract(roughnessVal);\\n\\tvec2 mipInfo = MipLevelInfo(reflectedDirection, r1, roughness);\\n\\tfloat s = mipInfo.y;\\n\\tfloat level0 = mipInfo.x;\\n\\tfloat level1 = level0 + 1.0;\\n\\tlevel1 = level1 > 5.0 ? 5.0 : level1;\\n\\tlevel0 += min( floor( s + 0.5 ), 5.0 );\\n\\tvec2 uv_10 = getCubeUV(reflectedDirection, r1, level0);\\n\\tvec4 color10 = envMapTexelToLinear(texture2D(envMap, uv_10));\\n\\tvec2 uv_20 = getCubeUV(reflectedDirection, r2, level0);\\n\\tvec4 color20 = envMapTexelToLinear(texture2D(envMap, uv_20));\\n\\tvec4 result = mix(color10, color20, t);\\n\\treturn vec4(result.rgb, 1.0);\\n}\\n#endif\\n\",\ndefaultnormal_vertex:\"vec3 transformedNormal = normalMatrix * objectNormal;\\n#ifdef FLIP_SIDED\\n\\ttransformedNormal = - transformedNormal;\\n#endif\\n\",displacementmap_pars_vertex:\"#ifdef USE_DISPLACEMENTMAP\\n\\tuniform sampler2D displacementMap;\\n\\tuniform float displacementScale;\\n\\tuniform float displacementBias;\\n#endif\\n\",displacementmap_vertex:\"#ifdef USE_DISPLACEMENTMAP\\n\\ttransformed += normalize( objectNormal ) * ( texture2D( displacementMap, uv ).x * displacementScale + displacementBias );\\n#endif\\n\",\nemissivemap_fragment:\"#ifdef USE_EMISSIVEMAP\\n\\tvec4 emissiveColor = texture2D( emissiveMap, vUv );\\n\\temissiveColor.rgb = emissiveMapTexelToLinear( emissiveColor ).rgb;\\n\\ttotalEmissiveRadiance *= emissiveColor.rgb;\\n#endif\\n\",emissivemap_pars_fragment:\"#ifdef USE_EMISSIVEMAP\\n\\tuniform sampler2D emissiveMap;\\n#endif\\n\",encodings_fragment:\" gl_FragColor = linearToOutputTexel( gl_FragColor );\\n\",encodings_pars_fragment:\"\\nvec4 LinearToLinear( in vec4 value ) {\\n\\treturn value;\\n}\\nvec4 GammaToLinear( in vec4 value, in float gammaFactor ) {\\n\\treturn vec4( pow( value.xyz, vec3( gammaFactor ) ), value.w );\\n}\\nvec4 LinearToGamma( in vec4 value, in float gammaFactor ) {\\n\\treturn vec4( pow( value.xyz, vec3( 1.0 / gammaFactor ) ), value.w );\\n}\\nvec4 sRGBToLinear( in vec4 value ) {\\n\\treturn vec4( mix( pow( value.rgb * 0.9478672986 + vec3( 0.0521327014 ), vec3( 2.4 ) ), value.rgb * 0.0773993808, vec3( lessThanEqual( value.rgb, vec3( 0.04045 ) ) ) ), value.w );\\n}\\nvec4 LinearTosRGB( in vec4 value ) {\\n\\treturn vec4( mix( pow( value.rgb, vec3( 0.41666 ) ) * 1.055 - vec3( 0.055 ), value.rgb * 12.92, vec3( lessThanEqual( value.rgb, vec3( 0.0031308 ) ) ) ), value.w );\\n}\\nvec4 RGBEToLinear( in vec4 value ) {\\n\\treturn vec4( value.rgb * exp2( value.a * 255.0 - 128.0 ), 1.0 );\\n}\\nvec4 LinearToRGBE( in vec4 value ) {\\n\\tfloat maxComponent = max( max( value.r, value.g ), value.b );\\n\\tfloat fExp = clamp( ceil( log2( maxComponent ) ), -128.0, 127.0 );\\n\\treturn vec4( value.rgb / exp2( fExp ), ( fExp + 128.0 ) / 255.0 );\\n}\\nvec4 RGBMToLinear( in vec4 value, in float maxRange ) {\\n\\treturn vec4( value.xyz * value.w * maxRange, 1.0 );\\n}\\nvec4 LinearToRGBM( in vec4 value, in float maxRange ) {\\n\\tfloat maxRGB = max( value.x, max( value.g, value.b ) );\\n\\tfloat M = clamp( maxRGB / maxRange, 0.0, 1.0 );\\n\\tM = ceil( M * 255.0 ) / 255.0;\\n\\treturn vec4( value.rgb / ( M * maxRange ), M );\\n}\\nvec4 RGBDToLinear( in vec4 value, in float maxRange ) {\\n\\treturn vec4( value.rgb * ( ( maxRange / 255.0 ) / value.a ), 1.0 );\\n}\\nvec4 LinearToRGBD( in vec4 value, in float maxRange ) {\\n\\tfloat maxRGB = max( value.x, max( value.g, value.b ) );\\n\\tfloat D = max( maxRange / maxRGB, 1.0 );\\n\\tD = min( floor( D ) / 255.0, 1.0 );\\n\\treturn vec4( value.rgb * ( D * ( 255.0 / maxRange ) ), D );\\n}\\nconst mat3 cLogLuvM = mat3( 0.2209, 0.3390, 0.4184, 0.1138, 0.6780, 0.7319, 0.0102, 0.1130, 0.2969 );\\nvec4 LinearToLogLuv( in vec4 value ) {\\n\\tvec3 Xp_Y_XYZp = value.rgb * cLogLuvM;\\n\\tXp_Y_XYZp = max(Xp_Y_XYZp, vec3(1e-6, 1e-6, 1e-6));\\n\\tvec4 vResult;\\n\\tvResult.xy = Xp_Y_XYZp.xy / Xp_Y_XYZp.z;\\n\\tfloat Le = 2.0 * log2(Xp_Y_XYZp.y) + 127.0;\\n\\tvResult.w = fract(Le);\\n\\tvResult.z = (Le - (floor(vResult.w*255.0))/255.0)/255.0;\\n\\treturn vResult;\\n}\\nconst mat3 cLogLuvInverseM = mat3( 6.0014, -2.7008, -1.7996, -1.3320, 3.1029, -5.7721, 0.3008, -1.0882, 5.6268 );\\nvec4 LogLuvToLinear( in vec4 value ) {\\n\\tfloat Le = value.z * 255.0 + value.w;\\n\\tvec3 Xp_Y_XYZp;\\n\\tXp_Y_XYZp.y = exp2((Le - 127.0) / 2.0);\\n\\tXp_Y_XYZp.z = Xp_Y_XYZp.y / value.y;\\n\\tXp_Y_XYZp.x = value.x * Xp_Y_XYZp.z;\\n\\tvec3 vRGB = Xp_Y_XYZp.rgb * cLogLuvInverseM;\\n\\treturn vec4( max(vRGB, 0.0), 1.0 );\\n}\\n\",\nenvmap_fragment:\"#ifdef USE_ENVMAP\\n\\t#if defined( USE_BUMPMAP ) || defined( USE_NORMALMAP ) || defined( PHONG )\\n\\t\\tvec3 cameraToVertex = normalize( vWorldPosition - cameraPosition );\\n\\t\\tvec3 worldNormal = inverseTransformDirection( normal, viewMatrix );\\n\\t\\t#ifdef ENVMAP_MODE_REFLECTION\\n\\t\\t\\tvec3 reflectVec = reflect( cameraToVertex, worldNormal );\\n\\t\\t#else\\n\\t\\t\\tvec3 reflectVec = refract( cameraToVertex, worldNormal, refractionRatio );\\n\\t\\t#endif\\n\\t#else\\n\\t\\tvec3 reflectVec = vReflect;\\n\\t#endif\\n\\t#ifdef ENVMAP_TYPE_CUBE\\n\\t\\tvec4 envColor = textureCube( envMap, flipNormal * vec3( flipEnvMap * reflectVec.x, reflectVec.yz ) );\\n\\t#elif defined( ENVMAP_TYPE_EQUIREC )\\n\\t\\tvec2 sampleUV;\\n\\t\\tsampleUV.y = asin( flipNormal * reflectVec.y ) * RECIPROCAL_PI + 0.5;\\n\\t\\tsampleUV.x = atan( flipNormal * reflectVec.z, flipNormal * reflectVec.x ) * RECIPROCAL_PI2 + 0.5;\\n\\t\\tvec4 envColor = texture2D( envMap, sampleUV );\\n\\t#elif defined( ENVMAP_TYPE_SPHERE )\\n\\t\\tvec3 reflectView = flipNormal * normalize( ( viewMatrix * vec4( reflectVec, 0.0 ) ).xyz + vec3( 0.0, 0.0, 1.0 ) );\\n\\t\\tvec4 envColor = texture2D( envMap, reflectView.xy * 0.5 + 0.5 );\\n\\t#else\\n\\t\\tvec4 envColor = vec4( 0.0 );\\n\\t#endif\\n\\tenvColor = envMapTexelToLinear( envColor );\\n\\t#ifdef ENVMAP_BLENDING_MULTIPLY\\n\\t\\toutgoingLight = mix( outgoingLight, outgoingLight * envColor.xyz, specularStrength * reflectivity );\\n\\t#elif defined( ENVMAP_BLENDING_MIX )\\n\\t\\toutgoingLight = mix( outgoingLight, envColor.xyz, specularStrength * reflectivity );\\n\\t#elif defined( ENVMAP_BLENDING_ADD )\\n\\t\\toutgoingLight += envColor.xyz * specularStrength * reflectivity;\\n\\t#endif\\n#endif\\n\",\nenvmap_pars_fragment:\"#if defined( USE_ENVMAP ) || defined( PHYSICAL )\\n\\tuniform float reflectivity;\\n\\tuniform float envMapIntensity;\\n#endif\\n#ifdef USE_ENVMAP\\n\\t#if ! defined( PHYSICAL ) && ( defined( USE_BUMPMAP ) || defined( USE_NORMALMAP ) || defined( PHONG ) )\\n\\t\\tvarying vec3 vWorldPosition;\\n\\t#endif\\n\\t#ifdef ENVMAP_TYPE_CUBE\\n\\t\\tuniform samplerCube envMap;\\n\\t#else\\n\\t\\tuniform sampler2D envMap;\\n\\t#endif\\n\\tuniform float flipEnvMap;\\n\\t#if defined( USE_BUMPMAP ) || defined( USE_NORMALMAP ) || defined( PHONG ) || defined( PHYSICAL )\\n\\t\\tuniform float refractionRatio;\\n\\t#else\\n\\t\\tvarying vec3 vReflect;\\n\\t#endif\\n#endif\\n\",\nenvmap_pars_vertex:\"#ifdef USE_ENVMAP\\n\\t#if defined( USE_BUMPMAP ) || defined( USE_NORMALMAP ) || defined( PHONG )\\n\\t\\tvarying vec3 vWorldPosition;\\n\\t#else\\n\\t\\tvarying vec3 vReflect;\\n\\t\\tuniform float refractionRatio;\\n\\t#endif\\n#endif\\n\",envmap_vertex:\"#ifdef USE_ENVMAP\\n\\t#if defined( USE_BUMPMAP ) || defined( USE_NORMALMAP ) || defined( PHONG )\\n\\t\\tvWorldPosition = worldPosition.xyz;\\n\\t#else\\n\\t\\tvec3 cameraToVertex = normalize( worldPosition.xyz - cameraPosition );\\n\\t\\tvec3 worldNormal = inverseTransformDirection( transformedNormal, viewMatrix );\\n\\t\\t#ifdef ENVMAP_MODE_REFLECTION\\n\\t\\t\\tvReflect = reflect( cameraToVertex, worldNormal );\\n\\t\\t#else\\n\\t\\t\\tvReflect = refract( cameraToVertex, worldNormal, refractionRatio );\\n\\t\\t#endif\\n\\t#endif\\n#endif\\n\",\nfog_vertex:\"\\n#ifdef USE_FOG\\nfogDepth = -mvPosition.z;\\n#endif\",fog_pars_vertex:\"#ifdef USE_FOG\\n varying float fogDepth;\\n#endif\\n\",fog_fragment:\"#ifdef USE_FOG\\n\\t#ifdef FOG_EXP2\\n\\t\\tfloat fogFactor = whiteCompliment( exp2( - fogDensity * fogDensity * fogDepth * fogDepth * LOG2 ) );\\n\\t#else\\n\\t\\tfloat fogFactor = smoothstep( fogNear, fogFar, fogDepth );\\n\\t#endif\\n\\tgl_FragColor.rgb = mix( gl_FragColor.rgb, fogColor, fogFactor );\\n#endif\\n\",fog_pars_fragment:\"#ifdef USE_FOG\\n\\tuniform vec3 fogColor;\\n\\tvarying float fogDepth;\\n\\t#ifdef FOG_EXP2\\n\\t\\tuniform float fogDensity;\\n\\t#else\\n\\t\\tuniform float fogNear;\\n\\t\\tuniform float fogFar;\\n\\t#endif\\n#endif\\n\",\ngradientmap_pars_fragment:\"#ifdef TOON\\n\\tuniform sampler2D gradientMap;\\n\\tvec3 getGradientIrradiance( vec3 normal, vec3 lightDirection ) {\\n\\t\\tfloat dotNL = dot( normal, lightDirection );\\n\\t\\tvec2 coord = vec2( dotNL * 0.5 + 0.5, 0.0 );\\n\\t\\t#ifdef USE_GRADIENTMAP\\n\\t\\t\\treturn texture2D( gradientMap, coord ).rgb;\\n\\t\\t#else\\n\\t\\t\\treturn ( coord.x < 0.7 ) ? vec3( 0.7 ) : vec3( 1.0 );\\n\\t\\t#endif\\n\\t}\\n#endif\\n\",lightmap_fragment:\"#ifdef USE_LIGHTMAP\\n\\treflectedLight.indirectDiffuse += PI * texture2D( lightMap, vUv2 ).xyz * lightMapIntensity;\\n#endif\\n\",\nlightmap_pars_fragment:\"#ifdef USE_LIGHTMAP\\n\\tuniform sampler2D lightMap;\\n\\tuniform float lightMapIntensity;\\n#endif\",lights_lambert_vertex:\"vec3 diffuse = vec3( 1.0 );\\nGeometricContext geometry;\\ngeometry.position = mvPosition.xyz;\\ngeometry.normal = normalize( transformedNormal );\\ngeometry.viewDir = normalize( -mvPosition.xyz );\\nGeometricContext backGeometry;\\nbackGeometry.position = geometry.position;\\nbackGeometry.normal = -geometry.normal;\\nbackGeometry.viewDir = geometry.viewDir;\\nvLightFront = vec3( 0.0 );\\n#ifdef DOUBLE_SIDED\\n\\tvLightBack = vec3( 0.0 );\\n#endif\\nIncidentLight directLight;\\nfloat dotNL;\\nvec3 directLightColor_Diffuse;\\n#if NUM_POINT_LIGHTS > 0\\n\\tfor ( int i = 0; i < NUM_POINT_LIGHTS; i ++ ) {\\n\\t\\tgetPointDirectLightIrradiance( pointLights[ i ], geometry, directLight );\\n\\t\\tdotNL = dot( geometry.normal, directLight.direction );\\n\\t\\tdirectLightColor_Diffuse = PI * directLight.color;\\n\\t\\tvLightFront += saturate( dotNL ) * directLightColor_Diffuse;\\n\\t\\t#ifdef DOUBLE_SIDED\\n\\t\\t\\tvLightBack += saturate( -dotNL ) * directLightColor_Diffuse;\\n\\t\\t#endif\\n\\t}\\n#endif\\n#if NUM_SPOT_LIGHTS > 0\\n\\tfor ( int i = 0; i < NUM_SPOT_LIGHTS; i ++ ) {\\n\\t\\tgetSpotDirectLightIrradiance( spotLights[ i ], geometry, directLight );\\n\\t\\tdotNL = dot( geometry.normal, directLight.direction );\\n\\t\\tdirectLightColor_Diffuse = PI * directLight.color;\\n\\t\\tvLightFront += saturate( dotNL ) * directLightColor_Diffuse;\\n\\t\\t#ifdef DOUBLE_SIDED\\n\\t\\t\\tvLightBack += saturate( -dotNL ) * directLightColor_Diffuse;\\n\\t\\t#endif\\n\\t}\\n#endif\\n#if NUM_DIR_LIGHTS > 0\\n\\tfor ( int i = 0; i < NUM_DIR_LIGHTS; i ++ ) {\\n\\t\\tgetDirectionalDirectLightIrradiance( directionalLights[ i ], geometry, directLight );\\n\\t\\tdotNL = dot( geometry.normal, directLight.direction );\\n\\t\\tdirectLightColor_Diffuse = PI * directLight.color;\\n\\t\\tvLightFront += saturate( dotNL ) * directLightColor_Diffuse;\\n\\t\\t#ifdef DOUBLE_SIDED\\n\\t\\t\\tvLightBack += saturate( -dotNL ) * directLightColor_Diffuse;\\n\\t\\t#endif\\n\\t}\\n#endif\\n#if NUM_HEMI_LIGHTS > 0\\n\\tfor ( int i = 0; i < NUM_HEMI_LIGHTS; i ++ ) {\\n\\t\\tvLightFront += getHemisphereLightIrradiance( hemisphereLights[ i ], geometry );\\n\\t\\t#ifdef DOUBLE_SIDED\\n\\t\\t\\tvLightBack += getHemisphereLightIrradiance( hemisphereLights[ i ], backGeometry );\\n\\t\\t#endif\\n\\t}\\n#endif\\n\",\nlights_pars:\"uniform vec3 ambientLightColor;\\nvec3 getAmbientLightIrradiance( const in vec3 ambientLightColor ) {\\n\\tvec3 irradiance = ambientLightColor;\\n\\t#ifndef PHYSICALLY_CORRECT_LIGHTS\\n\\t\\tirradiance *= PI;\\n\\t#endif\\n\\treturn irradiance;\\n}\\n#if NUM_DIR_LIGHTS > 0\\n\\tstruct DirectionalLight {\\n\\t\\tvec3 direction;\\n\\t\\tvec3 color;\\n\\t\\tint shadow;\\n\\t\\tfloat shadowBias;\\n\\t\\tfloat shadowRadius;\\n\\t\\tvec2 shadowMapSize;\\n\\t};\\n\\tuniform DirectionalLight directionalLights[ NUM_DIR_LIGHTS ];\\n\\tvoid getDirectionalDirectLightIrradiance( const in DirectionalLight directionalLight, const in GeometricContext geometry, out IncidentLight directLight ) {\\n\\t\\tdirectLight.color = directionalLight.color;\\n\\t\\tdirectLight.direction = directionalLight.direction;\\n\\t\\tdirectLight.visible = true;\\n\\t}\\n#endif\\n#if NUM_POINT_LIGHTS > 0\\n\\tstruct PointLight {\\n\\t\\tvec3 position;\\n\\t\\tvec3 color;\\n\\t\\tfloat distance;\\n\\t\\tfloat decay;\\n\\t\\tint shadow;\\n\\t\\tfloat shadowBias;\\n\\t\\tfloat shadowRadius;\\n\\t\\tvec2 shadowMapSize;\\n\\t};\\n\\tuniform PointLight pointLights[ NUM_POINT_LIGHTS ];\\n\\tvoid getPointDirectLightIrradiance( const in PointLight pointLight, const in GeometricContext geometry, out IncidentLight directLight ) {\\n\\t\\tvec3 lVector = pointLight.position - geometry.position;\\n\\t\\tdirectLight.direction = normalize( lVector );\\n\\t\\tfloat lightDistance = length( lVector );\\n\\t\\tdirectLight.color = pointLight.color;\\n\\t\\tdirectLight.color *= punctualLightIntensityToIrradianceFactor( lightDistance, pointLight.distance, pointLight.decay );\\n\\t\\tdirectLight.visible = ( directLight.color != vec3( 0.0 ) );\\n\\t}\\n#endif\\n#if NUM_SPOT_LIGHTS > 0\\n\\tstruct SpotLight {\\n\\t\\tvec3 position;\\n\\t\\tvec3 direction;\\n\\t\\tvec3 color;\\n\\t\\tfloat distance;\\n\\t\\tfloat decay;\\n\\t\\tfloat coneCos;\\n\\t\\tfloat penumbraCos;\\n\\t\\tint shadow;\\n\\t\\tfloat shadowBias;\\n\\t\\tfloat shadowRadius;\\n\\t\\tvec2 shadowMapSize;\\n\\t};\\n\\tuniform SpotLight spotLights[ NUM_SPOT_LIGHTS ];\\n\\tvoid getSpotDirectLightIrradiance( const in SpotLight spotLight, const in GeometricContext geometry, out IncidentLight directLight ) {\\n\\t\\tvec3 lVector = spotLight.position - geometry.position;\\n\\t\\tdirectLight.direction = normalize( lVector );\\n\\t\\tfloat lightDistance = length( lVector );\\n\\t\\tfloat angleCos = dot( directLight.direction, spotLight.direction );\\n\\t\\tif ( angleCos > spotLight.coneCos ) {\\n\\t\\t\\tfloat spotEffect = smoothstep( spotLight.coneCos, spotLight.penumbraCos, angleCos );\\n\\t\\t\\tdirectLight.color = spotLight.color;\\n\\t\\t\\tdirectLight.color *= spotEffect * punctualLightIntensityToIrradianceFactor( lightDistance, spotLight.distance, spotLight.decay );\\n\\t\\t\\tdirectLight.visible = true;\\n\\t\\t} else {\\n\\t\\t\\tdirectLight.color = vec3( 0.0 );\\n\\t\\t\\tdirectLight.visible = false;\\n\\t\\t}\\n\\t}\\n#endif\\n#if NUM_RECT_AREA_LIGHTS > 0\\n\\tstruct RectAreaLight {\\n\\t\\tvec3 color;\\n\\t\\tvec3 position;\\n\\t\\tvec3 halfWidth;\\n\\t\\tvec3 halfHeight;\\n\\t};\\n\\tuniform sampler2D ltcMat;\\tuniform sampler2D ltcMag;\\n\\tuniform RectAreaLight rectAreaLights[ NUM_RECT_AREA_LIGHTS ];\\n#endif\\n#if NUM_HEMI_LIGHTS > 0\\n\\tstruct HemisphereLight {\\n\\t\\tvec3 direction;\\n\\t\\tvec3 skyColor;\\n\\t\\tvec3 groundColor;\\n\\t};\\n\\tuniform HemisphereLight hemisphereLights[ NUM_HEMI_LIGHTS ];\\n\\tvec3 getHemisphereLightIrradiance( const in HemisphereLight hemiLight, const in GeometricContext geometry ) {\\n\\t\\tfloat dotNL = dot( geometry.normal, hemiLight.direction );\\n\\t\\tfloat hemiDiffuseWeight = 0.5 * dotNL + 0.5;\\n\\t\\tvec3 irradiance = mix( hemiLight.groundColor, hemiLight.skyColor, hemiDiffuseWeight );\\n\\t\\t#ifndef PHYSICALLY_CORRECT_LIGHTS\\n\\t\\t\\tirradiance *= PI;\\n\\t\\t#endif\\n\\t\\treturn irradiance;\\n\\t}\\n#endif\\n#if defined( USE_ENVMAP ) && defined( PHYSICAL )\\n\\tvec3 getLightProbeIndirectIrradiance( const in GeometricContext geometry, const in int maxMIPLevel ) {\\n\\t\\tvec3 worldNormal = inverseTransformDirection( geometry.normal, viewMatrix );\\n\\t\\t#ifdef ENVMAP_TYPE_CUBE\\n\\t\\t\\tvec3 queryVec = vec3( flipEnvMap * worldNormal.x, worldNormal.yz );\\n\\t\\t\\t#ifdef TEXTURE_LOD_EXT\\n\\t\\t\\t\\tvec4 envMapColor = textureCubeLodEXT( envMap, queryVec, float( maxMIPLevel ) );\\n\\t\\t\\t#else\\n\\t\\t\\t\\tvec4 envMapColor = textureCube( envMap, queryVec, float( maxMIPLevel ) );\\n\\t\\t\\t#endif\\n\\t\\t\\tenvMapColor.rgb = envMapTexelToLinear( envMapColor ).rgb;\\n\\t\\t#elif defined( ENVMAP_TYPE_CUBE_UV )\\n\\t\\t\\tvec3 queryVec = vec3( flipEnvMap * worldNormal.x, worldNormal.yz );\\n\\t\\t\\tvec4 envMapColor = textureCubeUV( queryVec, 1.0 );\\n\\t\\t#else\\n\\t\\t\\tvec4 envMapColor = vec4( 0.0 );\\n\\t\\t#endif\\n\\t\\treturn PI * envMapColor.rgb * envMapIntensity;\\n\\t}\\n\\tfloat getSpecularMIPLevel( const in float blinnShininessExponent, const in int maxMIPLevel ) {\\n\\t\\tfloat maxMIPLevelScalar = float( maxMIPLevel );\\n\\t\\tfloat desiredMIPLevel = maxMIPLevelScalar - 0.79248 - 0.5 * log2( pow2( blinnShininessExponent ) + 1.0 );\\n\\t\\treturn clamp( desiredMIPLevel, 0.0, maxMIPLevelScalar );\\n\\t}\\n\\tvec3 getLightProbeIndirectRadiance( const in GeometricContext geometry, const in float blinnShininessExponent, const in int maxMIPLevel ) {\\n\\t\\t#ifdef ENVMAP_MODE_REFLECTION\\n\\t\\t\\tvec3 reflectVec = reflect( -geometry.viewDir, geometry.normal );\\n\\t\\t#else\\n\\t\\t\\tvec3 reflectVec = refract( -geometry.viewDir, geometry.normal, refractionRatio );\\n\\t\\t#endif\\n\\t\\treflectVec = inverseTransformDirection( reflectVec, viewMatrix );\\n\\t\\tfloat specularMIPLevel = getSpecularMIPLevel( blinnShininessExponent, maxMIPLevel );\\n\\t\\t#ifdef ENVMAP_TYPE_CUBE\\n\\t\\t\\tvec3 queryReflectVec = vec3( flipEnvMap * reflectVec.x, reflectVec.yz );\\n\\t\\t\\t#ifdef TEXTURE_LOD_EXT\\n\\t\\t\\t\\tvec4 envMapColor = textureCubeLodEXT( envMap, queryReflectVec, specularMIPLevel );\\n\\t\\t\\t#else\\n\\t\\t\\t\\tvec4 envMapColor = textureCube( envMap, queryReflectVec, specularMIPLevel );\\n\\t\\t\\t#endif\\n\\t\\t\\tenvMapColor.rgb = envMapTexelToLinear( envMapColor ).rgb;\\n\\t\\t#elif defined( ENVMAP_TYPE_CUBE_UV )\\n\\t\\t\\tvec3 queryReflectVec = vec3( flipEnvMap * reflectVec.x, reflectVec.yz );\\n\\t\\t\\tvec4 envMapColor = textureCubeUV(queryReflectVec, BlinnExponentToGGXRoughness(blinnShininessExponent));\\n\\t\\t#elif defined( ENVMAP_TYPE_EQUIREC )\\n\\t\\t\\tvec2 sampleUV;\\n\\t\\t\\tsampleUV.y = saturate( reflectVec.y * 0.5 + 0.5 );\\n\\t\\t\\tsampleUV.x = atan( reflectVec.z, reflectVec.x ) * RECIPROCAL_PI2 + 0.5;\\n\\t\\t\\t#ifdef TEXTURE_LOD_EXT\\n\\t\\t\\t\\tvec4 envMapColor = texture2DLodEXT( envMap, sampleUV, specularMIPLevel );\\n\\t\\t\\t#else\\n\\t\\t\\t\\tvec4 envMapColor = texture2D( envMap, sampleUV, specularMIPLevel );\\n\\t\\t\\t#endif\\n\\t\\t\\tenvMapColor.rgb = envMapTexelToLinear( envMapColor ).rgb;\\n\\t\\t#elif defined( ENVMAP_TYPE_SPHERE )\\n\\t\\t\\tvec3 reflectView = normalize( ( viewMatrix * vec4( reflectVec, 0.0 ) ).xyz + vec3( 0.0,0.0,1.0 ) );\\n\\t\\t\\t#ifdef TEXTURE_LOD_EXT\\n\\t\\t\\t\\tvec4 envMapColor = texture2DLodEXT( envMap, reflectView.xy * 0.5 + 0.5, specularMIPLevel );\\n\\t\\t\\t#else\\n\\t\\t\\t\\tvec4 envMapColor = texture2D( envMap, reflectView.xy * 0.5 + 0.5, specularMIPLevel );\\n\\t\\t\\t#endif\\n\\t\\t\\tenvMapColor.rgb = envMapTexelToLinear( envMapColor ).rgb;\\n\\t\\t#endif\\n\\t\\treturn envMapColor.rgb * envMapIntensity;\\n\\t}\\n#endif\\n\",\nlights_phong_fragment:\"BlinnPhongMaterial material;\\nmaterial.diffuseColor = diffuseColor.rgb;\\nmaterial.specularColor = specular;\\nmaterial.specularShininess = shininess;\\nmaterial.specularStrength = specularStrength;\\n\",lights_phong_pars_fragment:\"varying vec3 vViewPosition;\\n#ifndef FLAT_SHADED\\n\\tvarying vec3 vNormal;\\n#endif\\nstruct BlinnPhongMaterial {\\n\\tvec3\\tdiffuseColor;\\n\\tvec3\\tspecularColor;\\n\\tfloat\\tspecularShininess;\\n\\tfloat\\tspecularStrength;\\n};\\nvoid RE_Direct_BlinnPhong( const in IncidentLight directLight, const in GeometricContext geometry, const in BlinnPhongMaterial material, inout ReflectedLight reflectedLight ) {\\n\\t#ifdef TOON\\n\\t\\tvec3 irradiance = getGradientIrradiance( geometry.normal, directLight.direction ) * directLight.color;\\n\\t#else\\n\\t\\tfloat dotNL = saturate( dot( geometry.normal, directLight.direction ) );\\n\\t\\tvec3 irradiance = dotNL * directLight.color;\\n\\t#endif\\n\\t#ifndef PHYSICALLY_CORRECT_LIGHTS\\n\\t\\tirradiance *= PI;\\n\\t#endif\\n\\treflectedLight.directDiffuse += irradiance * BRDF_Diffuse_Lambert( material.diffuseColor );\\n\\treflectedLight.directSpecular += irradiance * BRDF_Specular_BlinnPhong( directLight, geometry, material.specularColor, material.specularShininess ) * material.specularStrength;\\n}\\nvoid RE_IndirectDiffuse_BlinnPhong( const in vec3 irradiance, const in GeometricContext geometry, const in BlinnPhongMaterial material, inout ReflectedLight reflectedLight ) {\\n\\treflectedLight.indirectDiffuse += irradiance * BRDF_Diffuse_Lambert( material.diffuseColor );\\n}\\n#define RE_Direct\\t\\t\\t\\tRE_Direct_BlinnPhong\\n#define RE_IndirectDiffuse\\t\\tRE_IndirectDiffuse_BlinnPhong\\n#define Material_LightProbeLOD( material )\\t(0)\\n\",\nlights_physical_fragment:\"PhysicalMaterial material;\\nmaterial.diffuseColor = diffuseColor.rgb * ( 1.0 - metalnessFactor );\\nmaterial.specularRoughness = clamp( roughnessFactor, 0.04, 1.0 );\\n#ifdef STANDARD\\n\\tmaterial.specularColor = mix( vec3( DEFAULT_SPECULAR_COEFFICIENT ), diffuseColor.rgb, metalnessFactor );\\n#else\\n\\tmaterial.specularColor = mix( vec3( MAXIMUM_SPECULAR_COEFFICIENT * pow2( reflectivity ) ), diffuseColor.rgb, metalnessFactor );\\n\\tmaterial.clearCoat = saturate( clearCoat );\\tmaterial.clearCoatRoughness = clamp( clearCoatRoughness, 0.04, 1.0 );\\n#endif\\n\",\nlights_physical_pars_fragment:\"struct PhysicalMaterial {\\n\\tvec3\\tdiffuseColor;\\n\\tfloat\\tspecularRoughness;\\n\\tvec3\\tspecularColor;\\n\\t#ifndef STANDARD\\n\\t\\tfloat clearCoat;\\n\\t\\tfloat clearCoatRoughness;\\n\\t#endif\\n};\\n#define MAXIMUM_SPECULAR_COEFFICIENT 0.16\\n#define DEFAULT_SPECULAR_COEFFICIENT 0.04\\nfloat clearCoatDHRApprox( const in float roughness, const in float dotNL ) {\\n\\treturn DEFAULT_SPECULAR_COEFFICIENT + ( 1.0 - DEFAULT_SPECULAR_COEFFICIENT ) * ( pow( 1.0 - dotNL, 5.0 ) * pow( 1.0 - roughness, 2.0 ) );\\n}\\n#if NUM_RECT_AREA_LIGHTS > 0\\n\\tvoid RE_Direct_RectArea_Physical( const in RectAreaLight rectAreaLight, const in GeometricContext geometry, const in PhysicalMaterial material, inout ReflectedLight reflectedLight ) {\\n\\t\\tvec3 normal = geometry.normal;\\n\\t\\tvec3 viewDir = geometry.viewDir;\\n\\t\\tvec3 position = geometry.position;\\n\\t\\tvec3 lightPos = rectAreaLight.position;\\n\\t\\tvec3 halfWidth = rectAreaLight.halfWidth;\\n\\t\\tvec3 halfHeight = rectAreaLight.halfHeight;\\n\\t\\tvec3 lightColor = rectAreaLight.color;\\n\\t\\tfloat roughness = material.specularRoughness;\\n\\t\\tvec3 rectCoords[ 4 ];\\n\\t\\trectCoords[ 0 ] = lightPos - halfWidth - halfHeight;\\t\\trectCoords[ 1 ] = lightPos + halfWidth - halfHeight;\\n\\t\\trectCoords[ 2 ] = lightPos + halfWidth + halfHeight;\\n\\t\\trectCoords[ 3 ] = lightPos - halfWidth + halfHeight;\\n\\t\\tvec2 uv = LTC_Uv( normal, viewDir, roughness );\\n\\t\\tfloat norm = texture2D( ltcMag, uv ).a;\\n\\t\\tvec4 t = texture2D( ltcMat, uv );\\n\\t\\tmat3 mInv = mat3(\\n\\t\\t\\tvec3( 1, 0, t.y ),\\n\\t\\t\\tvec3( 0, t.z, 0 ),\\n\\t\\t\\tvec3( t.w, 0, t.x )\\n\\t\\t);\\n\\t\\treflectedLight.directSpecular += lightColor * material.specularColor * norm * LTC_Evaluate( normal, viewDir, position, mInv, rectCoords );\\n\\t\\treflectedLight.directDiffuse += lightColor * material.diffuseColor * LTC_Evaluate( normal, viewDir, position, mat3( 1 ), rectCoords );\\n\\t}\\n#endif\\nvoid RE_Direct_Physical( const in IncidentLight directLight, const in GeometricContext geometry, const in PhysicalMaterial material, inout ReflectedLight reflectedLight ) {\\n\\tfloat dotNL = saturate( dot( geometry.normal, directLight.direction ) );\\n\\tvec3 irradiance = dotNL * directLight.color;\\n\\t#ifndef PHYSICALLY_CORRECT_LIGHTS\\n\\t\\tirradiance *= PI;\\n\\t#endif\\n\\t#ifndef STANDARD\\n\\t\\tfloat clearCoatDHR = material.clearCoat * clearCoatDHRApprox( material.clearCoatRoughness, dotNL );\\n\\t#else\\n\\t\\tfloat clearCoatDHR = 0.0;\\n\\t#endif\\n\\treflectedLight.directSpecular += ( 1.0 - clearCoatDHR ) * irradiance * BRDF_Specular_GGX( directLight, geometry, material.specularColor, material.specularRoughness );\\n\\treflectedLight.directDiffuse += ( 1.0 - clearCoatDHR ) * irradiance * BRDF_Diffuse_Lambert( material.diffuseColor );\\n\\t#ifndef STANDARD\\n\\t\\treflectedLight.directSpecular += irradiance * material.clearCoat * BRDF_Specular_GGX( directLight, geometry, vec3( DEFAULT_SPECULAR_COEFFICIENT ), material.clearCoatRoughness );\\n\\t#endif\\n}\\nvoid RE_IndirectDiffuse_Physical( const in vec3 irradiance, const in GeometricContext geometry, const in PhysicalMaterial material, inout ReflectedLight reflectedLight ) {\\n\\treflectedLight.indirectDiffuse += irradiance * BRDF_Diffuse_Lambert( material.diffuseColor );\\n}\\nvoid RE_IndirectSpecular_Physical( const in vec3 radiance, const in vec3 clearCoatRadiance, const in GeometricContext geometry, const in PhysicalMaterial material, inout ReflectedLight reflectedLight ) {\\n\\t#ifndef STANDARD\\n\\t\\tfloat dotNV = saturate( dot( geometry.normal, geometry.viewDir ) );\\n\\t\\tfloat dotNL = dotNV;\\n\\t\\tfloat clearCoatDHR = material.clearCoat * clearCoatDHRApprox( material.clearCoatRoughness, dotNL );\\n\\t#else\\n\\t\\tfloat clearCoatDHR = 0.0;\\n\\t#endif\\n\\treflectedLight.indirectSpecular += ( 1.0 - clearCoatDHR ) * radiance * BRDF_Specular_GGX_Environment( geometry, material.specularColor, material.specularRoughness );\\n\\t#ifndef STANDARD\\n\\t\\treflectedLight.indirectSpecular += clearCoatRadiance * material.clearCoat * BRDF_Specular_GGX_Environment( geometry, vec3( DEFAULT_SPECULAR_COEFFICIENT ), material.clearCoatRoughness );\\n\\t#endif\\n}\\n#define RE_Direct\\t\\t\\t\\tRE_Direct_Physical\\n#define RE_Direct_RectArea\\t\\tRE_Direct_RectArea_Physical\\n#define RE_IndirectDiffuse\\t\\tRE_IndirectDiffuse_Physical\\n#define RE_IndirectSpecular\\t\\tRE_IndirectSpecular_Physical\\n#define Material_BlinnShininessExponent( material ) GGXRoughnessToBlinnExponent( material.specularRoughness )\\n#define Material_ClearCoat_BlinnShininessExponent( material ) GGXRoughnessToBlinnExponent( material.clearCoatRoughness )\\nfloat computeSpecularOcclusion( const in float dotNV, const in float ambientOcclusion, const in float roughness ) {\\n\\treturn saturate( pow( dotNV + ambientOcclusion, exp2( - 16.0 * roughness - 1.0 ) ) - 1.0 + ambientOcclusion );\\n}\\n\",\nlights_template:\"\\nGeometricContext geometry;\\ngeometry.position = - vViewPosition;\\ngeometry.normal = normal;\\ngeometry.viewDir = normalize( vViewPosition );\\nIncidentLight directLight;\\n#if ( NUM_POINT_LIGHTS > 0 ) && defined( RE_Direct )\\n\\tPointLight pointLight;\\n\\tfor ( int i = 0; i < NUM_POINT_LIGHTS; i ++ ) {\\n\\t\\tpointLight = pointLights[ i ];\\n\\t\\tgetPointDirectLightIrradiance( pointLight, geometry, directLight );\\n\\t\\t#ifdef USE_SHADOWMAP\\n\\t\\tdirectLight.color *= all( bvec2( pointLight.shadow, directLight.visible ) ) ? getPointShadow( pointShadowMap[ i ], pointLight.shadowMapSize, pointLight.shadowBias, pointLight.shadowRadius, vPointShadowCoord[ i ] ) : 1.0;\\n\\t\\t#endif\\n\\t\\tRE_Direct( directLight, geometry, material, reflectedLight );\\n\\t}\\n#endif\\n#if ( NUM_SPOT_LIGHTS > 0 ) && defined( RE_Direct )\\n\\tSpotLight spotLight;\\n\\tfor ( int i = 0; i < NUM_SPOT_LIGHTS; i ++ ) {\\n\\t\\tspotLight = spotLights[ i ];\\n\\t\\tgetSpotDirectLightIrradiance( spotLight, geometry, directLight );\\n\\t\\t#ifdef USE_SHADOWMAP\\n\\t\\tdirectLight.color *= all( bvec2( spotLight.shadow, directLight.visible ) ) ? getShadow( spotShadowMap[ i ], spotLight.shadowMapSize, spotLight.shadowBias, spotLight.shadowRadius, vSpotShadowCoord[ i ] ) : 1.0;\\n\\t\\t#endif\\n\\t\\tRE_Direct( directLight, geometry, material, reflectedLight );\\n\\t}\\n#endif\\n#if ( NUM_DIR_LIGHTS > 0 ) && defined( RE_Direct )\\n\\tDirectionalLight directionalLight;\\n\\tfor ( int i = 0; i < NUM_DIR_LIGHTS; i ++ ) {\\n\\t\\tdirectionalLight = directionalLights[ i ];\\n\\t\\tgetDirectionalDirectLightIrradiance( directionalLight, geometry, directLight );\\n\\t\\t#ifdef USE_SHADOWMAP\\n\\t\\tdirectLight.color *= all( bvec2( directionalLight.shadow, directLight.visible ) ) ? getShadow( directionalShadowMap[ i ], directionalLight.shadowMapSize, directionalLight.shadowBias, directionalLight.shadowRadius, vDirectionalShadowCoord[ i ] ) : 1.0;\\n\\t\\t#endif\\n\\t\\tRE_Direct( directLight, geometry, material, reflectedLight );\\n\\t}\\n#endif\\n#if ( NUM_RECT_AREA_LIGHTS > 0 ) && defined( RE_Direct_RectArea )\\n\\tRectAreaLight rectAreaLight;\\n\\tfor ( int i = 0; i < NUM_RECT_AREA_LIGHTS; i ++ ) {\\n\\t\\trectAreaLight = rectAreaLights[ i ];\\n\\t\\tRE_Direct_RectArea( rectAreaLight, geometry, material, reflectedLight );\\n\\t}\\n#endif\\n#if defined( RE_IndirectDiffuse )\\n\\tvec3 irradiance = getAmbientLightIrradiance( ambientLightColor );\\n\\t#ifdef USE_LIGHTMAP\\n\\t\\tvec3 lightMapIrradiance = texture2D( lightMap, vUv2 ).xyz * lightMapIntensity;\\n\\t\\t#ifndef PHYSICALLY_CORRECT_LIGHTS\\n\\t\\t\\tlightMapIrradiance *= PI;\\n\\t\\t#endif\\n\\t\\tirradiance += lightMapIrradiance;\\n\\t#endif\\n\\t#if ( NUM_HEMI_LIGHTS > 0 )\\n\\t\\tfor ( int i = 0; i < NUM_HEMI_LIGHTS; i ++ ) {\\n\\t\\t\\tirradiance += getHemisphereLightIrradiance( hemisphereLights[ i ], geometry );\\n\\t\\t}\\n\\t#endif\\n\\t#if defined( USE_ENVMAP ) && defined( PHYSICAL ) && defined( ENVMAP_TYPE_CUBE_UV )\\n\\t\\tirradiance += getLightProbeIndirectIrradiance( geometry, 8 );\\n\\t#endif\\n\\tRE_IndirectDiffuse( irradiance, geometry, material, reflectedLight );\\n#endif\\n#if defined( USE_ENVMAP ) && defined( RE_IndirectSpecular )\\n\\tvec3 radiance = getLightProbeIndirectRadiance( geometry, Material_BlinnShininessExponent( material ), 8 );\\n\\t#ifndef STANDARD\\n\\t\\tvec3 clearCoatRadiance = getLightProbeIndirectRadiance( geometry, Material_ClearCoat_BlinnShininessExponent( material ), 8 );\\n\\t#else\\n\\t\\tvec3 clearCoatRadiance = vec3( 0.0 );\\n\\t#endif\\n\\tRE_IndirectSpecular( radiance, clearCoatRadiance, geometry, material, reflectedLight );\\n#endif\\n\",\nlogdepthbuf_fragment:\"#if defined(USE_LOGDEPTHBUF) && defined(USE_LOGDEPTHBUF_EXT)\\n\\tgl_FragDepthEXT = log2(vFragDepth) * logDepthBufFC * 0.5;\\n#endif\",logdepthbuf_pars_fragment:\"#ifdef USE_LOGDEPTHBUF\\n\\tuniform float logDepthBufFC;\\n\\t#ifdef USE_LOGDEPTHBUF_EXT\\n\\t\\tvarying float vFragDepth;\\n\\t#endif\\n#endif\\n\",logdepthbuf_pars_vertex:\"#ifdef USE_LOGDEPTHBUF\\n\\t#ifdef USE_LOGDEPTHBUF_EXT\\n\\t\\tvarying float vFragDepth;\\n\\t#endif\\n\\tuniform float logDepthBufFC;\\n#endif\",logdepthbuf_vertex:\"#ifdef USE_LOGDEPTHBUF\\n\\tgl_Position.z = log2(max( EPSILON, gl_Position.w + 1.0 )) * logDepthBufFC;\\n\\t#ifdef USE_LOGDEPTHBUF_EXT\\n\\t\\tvFragDepth = 1.0 + gl_Position.w;\\n\\t#else\\n\\t\\tgl_Position.z = (gl_Position.z - 1.0) * gl_Position.w;\\n\\t#endif\\n#endif\\n\",\nmap_fragment:\"#ifdef USE_MAP\\n\\tvec4 texelColor = texture2D( map, vUv );\\n\\ttexelColor = mapTexelToLinear( texelColor );\\n\\tdiffuseColor *= texelColor;\\n#endif\\n\",map_pars_fragment:\"#ifdef USE_MAP\\n\\tuniform sampler2D map;\\n#endif\\n\",map_particle_fragment:\"#ifdef USE_MAP\\n\\tvec4 mapTexel = texture2D( map, vec2( gl_PointCoord.x, 1.0 - gl_PointCoord.y ) * offsetRepeat.zw + offsetRepeat.xy );\\n\\tdiffuseColor *= mapTexelToLinear( mapTexel );\\n#endif\\n\",map_particle_pars_fragment:\"#ifdef USE_MAP\\n\\tuniform vec4 offsetRepeat;\\n\\tuniform sampler2D map;\\n#endif\\n\",\nmetalnessmap_fragment:\"float metalnessFactor = metalness;\\n#ifdef USE_METALNESSMAP\\n\\tvec4 texelMetalness = texture2D( metalnessMap, vUv );\\n\\tmetalnessFactor *= texelMetalness.b;\\n#endif\\n\",metalnessmap_pars_fragment:\"#ifdef USE_METALNESSMAP\\n\\tuniform sampler2D metalnessMap;\\n#endif\",morphnormal_vertex:\"#ifdef USE_MORPHNORMALS\\n\\tobjectNormal += ( morphNormal0 - normal ) * morphTargetInfluences[ 0 ];\\n\\tobjectNormal += ( morphNormal1 - normal ) * morphTargetInfluences[ 1 ];\\n\\tobjectNormal += ( morphNormal2 - normal ) * morphTargetInfluences[ 2 ];\\n\\tobjectNormal += ( morphNormal3 - normal ) * morphTargetInfluences[ 3 ];\\n#endif\\n\",\nmorphtarget_pars_vertex:\"#ifdef USE_MORPHTARGETS\\n\\t#ifndef USE_MORPHNORMALS\\n\\tuniform float morphTargetInfluences[ 8 ];\\n\\t#else\\n\\tuniform float morphTargetInfluences[ 4 ];\\n\\t#endif\\n#endif\",morphtarget_vertex:\"#ifdef USE_MORPHTARGETS\\n\\ttransformed += ( morphTarget0 - position ) * morphTargetInfluences[ 0 ];\\n\\ttransformed += ( morphTarget1 - position ) * morphTargetInfluences[ 1 ];\\n\\ttransformed += ( morphTarget2 - position ) * morphTargetInfluences[ 2 ];\\n\\ttransformed += ( morphTarget3 - position ) * morphTargetInfluences[ 3 ];\\n\\t#ifndef USE_MORPHNORMALS\\n\\ttransformed += ( morphTarget4 - position ) * morphTargetInfluences[ 4 ];\\n\\ttransformed += ( morphTarget5 - position ) * morphTargetInfluences[ 5 ];\\n\\ttransformed += ( morphTarget6 - position ) * morphTargetInfluences[ 6 ];\\n\\ttransformed += ( morphTarget7 - position ) * morphTargetInfluences[ 7 ];\\n\\t#endif\\n#endif\\n\",\nnormal_flip:\"#ifdef DOUBLE_SIDED\\n\\tfloat flipNormal = ( float( gl_FrontFacing ) * 2.0 - 1.0 );\\n#else\\n\\tfloat flipNormal = 1.0;\\n#endif\\n\",normal_fragment:\"#ifdef FLAT_SHADED\\n\\tvec3 fdx = vec3( dFdx( vViewPosition.x ), dFdx( vViewPosition.y ), dFdx( vViewPosition.z ) );\\n\\tvec3 fdy = vec3( dFdy( vViewPosition.x ), dFdy( vViewPosition.y ), dFdy( vViewPosition.z ) );\\n\\tvec3 normal = normalize( cross( fdx, fdy ) );\\n#else\\n\\tvec3 normal = normalize( vNormal ) * flipNormal;\\n#endif\\n#ifdef USE_NORMALMAP\\n\\tnormal = perturbNormal2Arb( -vViewPosition, normal );\\n#elif defined( USE_BUMPMAP )\\n\\tnormal = perturbNormalArb( -vViewPosition, normal, dHdxy_fwd() );\\n#endif\\n\",\nnormalmap_pars_fragment:\"#ifdef USE_NORMALMAP\\n\\tuniform sampler2D normalMap;\\n\\tuniform vec2 normalScale;\\n\\tvec3 perturbNormal2Arb( vec3 eye_pos, vec3 surf_norm ) {\\n\\t\\tvec3 q0 = vec3( dFdx( eye_pos.x ), dFdx( eye_pos.y ), dFdx( eye_pos.z ) );\\n\\t\\tvec3 q1 = vec3( dFdy( eye_pos.x ), dFdy( eye_pos.y ), dFdy( eye_pos.z ) );\\n\\t\\tvec2 st0 = dFdx( vUv.st );\\n\\t\\tvec2 st1 = dFdy( vUv.st );\\n\\t\\tvec3 S = normalize( q0 * st1.t - q1 * st0.t );\\n\\t\\tvec3 T = normalize( -q0 * st1.s + q1 * st0.s );\\n\\t\\tvec3 N = normalize( surf_norm );\\n\\t\\tvec3 mapN = texture2D( normalMap, vUv ).xyz * 2.0 - 1.0;\\n\\t\\tmapN.xy = normalScale * mapN.xy;\\n\\t\\tmat3 tsn = mat3( S, T, N );\\n\\t\\treturn normalize( tsn * mapN );\\n\\t}\\n#endif\\n\",\npacking:\"vec3 packNormalToRGB( const in vec3 normal ) {\\n\\treturn normalize( normal ) * 0.5 + 0.5;\\n}\\nvec3 unpackRGBToNormal( const in vec3 rgb ) {\\n\\treturn 1.0 - 2.0 * rgb.xyz;\\n}\\nconst float PackUpscale = 256. / 255.;const float UnpackDownscale = 255. / 256.;\\nconst vec3 PackFactors = vec3( 256. * 256. * 256., 256. * 256., 256. );\\nconst vec4 UnpackFactors = UnpackDownscale / vec4( PackFactors, 1. );\\nconst float ShiftRight8 = 1. / 256.;\\nvec4 packDepthToRGBA( const in float v ) {\\n\\tvec4 r = vec4( fract( v * PackFactors ), v );\\n\\tr.yzw -= r.xyz * ShiftRight8;\\treturn r * PackUpscale;\\n}\\nfloat unpackRGBAToDepth( const in vec4 v ) {\\n\\treturn dot( v, UnpackFactors );\\n}\\nfloat viewZToOrthographicDepth( const in float viewZ, const in float near, const in float far ) {\\n\\treturn ( viewZ + near ) / ( near - far );\\n}\\nfloat orthographicDepthToViewZ( const in float linearClipZ, const in float near, const in float far ) {\\n\\treturn linearClipZ * ( near - far ) - near;\\n}\\nfloat viewZToPerspectiveDepth( const in float viewZ, const in float near, const in float far ) {\\n\\treturn (( near + viewZ ) * far ) / (( far - near ) * viewZ );\\n}\\nfloat perspectiveDepthToViewZ( const in float invClipZ, const in float near, const in float far ) {\\n\\treturn ( near * far ) / ( ( far - near ) * invClipZ - far );\\n}\\n\",\npremultiplied_alpha_fragment:\"#ifdef PREMULTIPLIED_ALPHA\\n\\tgl_FragColor.rgb *= gl_FragColor.a;\\n#endif\\n\",project_vertex:\"vec4 mvPosition = modelViewMatrix * vec4( transformed, 1.0 );\\ngl_Position = projectionMatrix * mvPosition;\\n\",dithering_fragment:\"#if defined( DITHERING )\\n gl_FragColor.rgb = dithering( gl_FragColor.rgb );\\n#endif\\n\",dithering_pars_fragment:\"#if defined( DITHERING )\\n\\tvec3 dithering( vec3 color ) {\\n\\t\\tfloat grid_position = rand( gl_FragCoord.xy );\\n\\t\\tvec3 dither_shift_RGB = vec3( 0.25 / 255.0, -0.25 / 255.0, 0.25 / 255.0 );\\n\\t\\tdither_shift_RGB = mix( 2.0 * dither_shift_RGB, -2.0 * dither_shift_RGB, grid_position );\\n\\t\\treturn color + dither_shift_RGB;\\n\\t}\\n#endif\\n\",\nroughnessmap_fragment:\"float roughnessFactor = roughness;\\n#ifdef USE_ROUGHNESSMAP\\n\\tvec4 texelRoughness = texture2D( roughnessMap, vUv );\\n\\troughnessFactor *= texelRoughness.g;\\n#endif\\n\",roughnessmap_pars_fragment:\"#ifdef USE_ROUGHNESSMAP\\n\\tuniform sampler2D roughnessMap;\\n#endif\",shadowmap_pars_fragment:\"#ifdef USE_SHADOWMAP\\n\\t#if NUM_DIR_LIGHTS > 0\\n\\t\\tuniform sampler2D directionalShadowMap[ NUM_DIR_LIGHTS ];\\n\\t\\tvarying vec4 vDirectionalShadowCoord[ NUM_DIR_LIGHTS ];\\n\\t#endif\\n\\t#if NUM_SPOT_LIGHTS > 0\\n\\t\\tuniform sampler2D spotShadowMap[ NUM_SPOT_LIGHTS ];\\n\\t\\tvarying vec4 vSpotShadowCoord[ NUM_SPOT_LIGHTS ];\\n\\t#endif\\n\\t#if NUM_POINT_LIGHTS > 0\\n\\t\\tuniform sampler2D pointShadowMap[ NUM_POINT_LIGHTS ];\\n\\t\\tvarying vec4 vPointShadowCoord[ NUM_POINT_LIGHTS ];\\n\\t#endif\\n\\tfloat texture2DCompare( sampler2D depths, vec2 uv, float compare ) {\\n\\t\\treturn step( compare, unpackRGBAToDepth( texture2D( depths, uv ) ) );\\n\\t}\\n\\tfloat texture2DShadowLerp( sampler2D depths, vec2 size, vec2 uv, float compare ) {\\n\\t\\tconst vec2 offset = vec2( 0.0, 1.0 );\\n\\t\\tvec2 texelSize = vec2( 1.0 ) / size;\\n\\t\\tvec2 centroidUV = floor( uv * size + 0.5 ) / size;\\n\\t\\tfloat lb = texture2DCompare( depths, centroidUV + texelSize * offset.xx, compare );\\n\\t\\tfloat lt = texture2DCompare( depths, centroidUV + texelSize * offset.xy, compare );\\n\\t\\tfloat rb = texture2DCompare( depths, centroidUV + texelSize * offset.yx, compare );\\n\\t\\tfloat rt = texture2DCompare( depths, centroidUV + texelSize * offset.yy, compare );\\n\\t\\tvec2 f = fract( uv * size + 0.5 );\\n\\t\\tfloat a = mix( lb, lt, f.y );\\n\\t\\tfloat b = mix( rb, rt, f.y );\\n\\t\\tfloat c = mix( a, b, f.x );\\n\\t\\treturn c;\\n\\t}\\n\\tfloat getShadow( sampler2D shadowMap, vec2 shadowMapSize, float shadowBias, float shadowRadius, vec4 shadowCoord ) {\\n\\t\\tfloat shadow = 1.0;\\n\\t\\tshadowCoord.xyz /= shadowCoord.w;\\n\\t\\tshadowCoord.z += shadowBias;\\n\\t\\tbvec4 inFrustumVec = bvec4 ( shadowCoord.x >= 0.0, shadowCoord.x <= 1.0, shadowCoord.y >= 0.0, shadowCoord.y <= 1.0 );\\n\\t\\tbool inFrustum = all( inFrustumVec );\\n\\t\\tbvec2 frustumTestVec = bvec2( inFrustum, shadowCoord.z <= 1.0 );\\n\\t\\tbool frustumTest = all( frustumTestVec );\\n\\t\\tif ( frustumTest ) {\\n\\t\\t#if defined( SHADOWMAP_TYPE_PCF )\\n\\t\\t\\tvec2 texelSize = vec2( 1.0 ) / shadowMapSize;\\n\\t\\t\\tfloat dx0 = - texelSize.x * shadowRadius;\\n\\t\\t\\tfloat dy0 = - texelSize.y * shadowRadius;\\n\\t\\t\\tfloat dx1 = + texelSize.x * shadowRadius;\\n\\t\\t\\tfloat dy1 = + texelSize.y * shadowRadius;\\n\\t\\t\\tshadow = (\\n\\t\\t\\t\\ttexture2DCompare( shadowMap, shadowCoord.xy + vec2( dx0, dy0 ), shadowCoord.z ) +\\n\\t\\t\\t\\ttexture2DCompare( shadowMap, shadowCoord.xy + vec2( 0.0, dy0 ), shadowCoord.z ) +\\n\\t\\t\\t\\ttexture2DCompare( shadowMap, shadowCoord.xy + vec2( dx1, dy0 ), shadowCoord.z ) +\\n\\t\\t\\t\\ttexture2DCompare( shadowMap, shadowCoord.xy + vec2( dx0, 0.0 ), shadowCoord.z ) +\\n\\t\\t\\t\\ttexture2DCompare( shadowMap, shadowCoord.xy, shadowCoord.z ) +\\n\\t\\t\\t\\ttexture2DCompare( shadowMap, shadowCoord.xy + vec2( dx1, 0.0 ), shadowCoord.z ) +\\n\\t\\t\\t\\ttexture2DCompare( shadowMap, shadowCoord.xy + vec2( dx0, dy1 ), shadowCoord.z ) +\\n\\t\\t\\t\\ttexture2DCompare( shadowMap, shadowCoord.xy + vec2( 0.0, dy1 ), shadowCoord.z ) +\\n\\t\\t\\t\\ttexture2DCompare( shadowMap, shadowCoord.xy + vec2( dx1, dy1 ), shadowCoord.z )\\n\\t\\t\\t) * ( 1.0 / 9.0 );\\n\\t\\t#elif defined( SHADOWMAP_TYPE_PCF_SOFT )\\n\\t\\t\\tvec2 texelSize = vec2( 1.0 ) / shadowMapSize;\\n\\t\\t\\tfloat dx0 = - texelSize.x * shadowRadius;\\n\\t\\t\\tfloat dy0 = - texelSize.y * shadowRadius;\\n\\t\\t\\tfloat dx1 = + texelSize.x * shadowRadius;\\n\\t\\t\\tfloat dy1 = + texelSize.y * shadowRadius;\\n\\t\\t\\tshadow = (\\n\\t\\t\\t\\ttexture2DShadowLerp( shadowMap, shadowMapSize, shadowCoord.xy + vec2( dx0, dy0 ), shadowCoord.z ) +\\n\\t\\t\\t\\ttexture2DShadowLerp( shadowMap, shadowMapSize, shadowCoord.xy + vec2( 0.0, dy0 ), shadowCoord.z ) +\\n\\t\\t\\t\\ttexture2DShadowLerp( shadowMap, shadowMapSize, shadowCoord.xy + vec2( dx1, dy0 ), shadowCoord.z ) +\\n\\t\\t\\t\\ttexture2DShadowLerp( shadowMap, shadowMapSize, shadowCoord.xy + vec2( dx0, 0.0 ), shadowCoord.z ) +\\n\\t\\t\\t\\ttexture2DShadowLerp( shadowMap, shadowMapSize, shadowCoord.xy, shadowCoord.z ) +\\n\\t\\t\\t\\ttexture2DShadowLerp( shadowMap, shadowMapSize, shadowCoord.xy + vec2( dx1, 0.0 ), shadowCoord.z ) +\\n\\t\\t\\t\\ttexture2DShadowLerp( shadowMap, shadowMapSize, shadowCoord.xy + vec2( dx0, dy1 ), shadowCoord.z ) +\\n\\t\\t\\t\\ttexture2DShadowLerp( shadowMap, shadowMapSize, shadowCoord.xy + vec2( 0.0, dy1 ), shadowCoord.z ) +\\n\\t\\t\\t\\ttexture2DShadowLerp( shadowMap, shadowMapSize, shadowCoord.xy + vec2( dx1, dy1 ), shadowCoord.z )\\n\\t\\t\\t) * ( 1.0 / 9.0 );\\n\\t\\t#else\\n\\t\\t\\tshadow = texture2DCompare( shadowMap, shadowCoord.xy, shadowCoord.z );\\n\\t\\t#endif\\n\\t\\t}\\n\\t\\treturn shadow;\\n\\t}\\n\\tvec2 cubeToUV( vec3 v, float texelSizeY ) {\\n\\t\\tvec3 absV = abs( v );\\n\\t\\tfloat scaleToCube = 1.0 / max( absV.x, max( absV.y, absV.z ) );\\n\\t\\tabsV *= scaleToCube;\\n\\t\\tv *= scaleToCube * ( 1.0 - 2.0 * texelSizeY );\\n\\t\\tvec2 planar = v.xy;\\n\\t\\tfloat almostATexel = 1.5 * texelSizeY;\\n\\t\\tfloat almostOne = 1.0 - almostATexel;\\n\\t\\tif ( absV.z >= almostOne ) {\\n\\t\\t\\tif ( v.z > 0.0 )\\n\\t\\t\\t\\tplanar.x = 4.0 - v.x;\\n\\t\\t} else if ( absV.x >= almostOne ) {\\n\\t\\t\\tfloat signX = sign( v.x );\\n\\t\\t\\tplanar.x = v.z * signX + 2.0 * signX;\\n\\t\\t} else if ( absV.y >= almostOne ) {\\n\\t\\t\\tfloat signY = sign( v.y );\\n\\t\\t\\tplanar.x = v.x + 2.0 * signY + 2.0;\\n\\t\\t\\tplanar.y = v.z * signY - 2.0;\\n\\t\\t}\\n\\t\\treturn vec2( 0.125, 0.25 ) * planar + vec2( 0.375, 0.75 );\\n\\t}\\n\\tfloat getPointShadow( sampler2D shadowMap, vec2 shadowMapSize, float shadowBias, float shadowRadius, vec4 shadowCoord ) {\\n\\t\\tvec2 texelSize = vec2( 1.0 ) / ( shadowMapSize * vec2( 4.0, 2.0 ) );\\n\\t\\tvec3 lightToPosition = shadowCoord.xyz;\\n\\t\\tvec3 bd3D = normalize( lightToPosition );\\n\\t\\tfloat dp = ( length( lightToPosition ) - shadowBias ) / 1000.0;\\n\\t\\t#if defined( SHADOWMAP_TYPE_PCF ) || defined( SHADOWMAP_TYPE_PCF_SOFT )\\n\\t\\t\\tvec2 offset = vec2( - 1, 1 ) * shadowRadius * texelSize.y;\\n\\t\\t\\treturn (\\n\\t\\t\\t\\ttexture2DCompare( shadowMap, cubeToUV( bd3D + offset.xyy, texelSize.y ), dp ) +\\n\\t\\t\\t\\ttexture2DCompare( shadowMap, cubeToUV( bd3D + offset.yyy, texelSize.y ), dp ) +\\n\\t\\t\\t\\ttexture2DCompare( shadowMap, cubeToUV( bd3D + offset.xyx, texelSize.y ), dp ) +\\n\\t\\t\\t\\ttexture2DCompare( shadowMap, cubeToUV( bd3D + offset.yyx, texelSize.y ), dp ) +\\n\\t\\t\\t\\ttexture2DCompare( shadowMap, cubeToUV( bd3D, texelSize.y ), dp ) +\\n\\t\\t\\t\\ttexture2DCompare( shadowMap, cubeToUV( bd3D + offset.xxy, texelSize.y ), dp ) +\\n\\t\\t\\t\\ttexture2DCompare( shadowMap, cubeToUV( bd3D + offset.yxy, texelSize.y ), dp ) +\\n\\t\\t\\t\\ttexture2DCompare( shadowMap, cubeToUV( bd3D + offset.xxx, texelSize.y ), dp ) +\\n\\t\\t\\t\\ttexture2DCompare( shadowMap, cubeToUV( bd3D + offset.yxx, texelSize.y ), dp )\\n\\t\\t\\t) * ( 1.0 / 9.0 );\\n\\t\\t#else\\n\\t\\t\\treturn texture2DCompare( shadowMap, cubeToUV( bd3D, texelSize.y ), dp );\\n\\t\\t#endif\\n\\t}\\n#endif\\n\",\nshadowmap_pars_vertex:\"#ifdef USE_SHADOWMAP\\n\\t#if NUM_DIR_LIGHTS > 0\\n\\t\\tuniform mat4 directionalShadowMatrix[ NUM_DIR_LIGHTS ];\\n\\t\\tvarying vec4 vDirectionalShadowCoord[ NUM_DIR_LIGHTS ];\\n\\t#endif\\n\\t#if NUM_SPOT_LIGHTS > 0\\n\\t\\tuniform mat4 spotShadowMatrix[ NUM_SPOT_LIGHTS ];\\n\\t\\tvarying vec4 vSpotShadowCoord[ NUM_SPOT_LIGHTS ];\\n\\t#endif\\n\\t#if NUM_POINT_LIGHTS > 0\\n\\t\\tuniform mat4 pointShadowMatrix[ NUM_POINT_LIGHTS ];\\n\\t\\tvarying vec4 vPointShadowCoord[ NUM_POINT_LIGHTS ];\\n\\t#endif\\n#endif\\n\",\nshadowmap_vertex:\"#ifdef USE_SHADOWMAP\\n\\t#if NUM_DIR_LIGHTS > 0\\n\\tfor ( int i = 0; i < NUM_DIR_LIGHTS; i ++ ) {\\n\\t\\tvDirectionalShadowCoord[ i ] = directionalShadowMatrix[ i ] * worldPosition;\\n\\t}\\n\\t#endif\\n\\t#if NUM_SPOT_LIGHTS > 0\\n\\tfor ( int i = 0; i < NUM_SPOT_LIGHTS; i ++ ) {\\n\\t\\tvSpotShadowCoord[ i ] = spotShadowMatrix[ i ] * worldPosition;\\n\\t}\\n\\t#endif\\n\\t#if NUM_POINT_LIGHTS > 0\\n\\tfor ( int i = 0; i < NUM_POINT_LIGHTS; i ++ ) {\\n\\t\\tvPointShadowCoord[ i ] = pointShadowMatrix[ i ] * worldPosition;\\n\\t}\\n\\t#endif\\n#endif\\n\",\nshadowmask_pars_fragment:\"float getShadowMask() {\\n\\tfloat shadow = 1.0;\\n\\t#ifdef USE_SHADOWMAP\\n\\t#if NUM_DIR_LIGHTS > 0\\n\\tDirectionalLight directionalLight;\\n\\tfor ( int i = 0; i < NUM_DIR_LIGHTS; i ++ ) {\\n\\t\\tdirectionalLight = directionalLights[ i ];\\n\\t\\tshadow *= bool( directionalLight.shadow ) ? getShadow( directionalShadowMap[ i ], directionalLight.shadowMapSize, directionalLight.shadowBias, directionalLight.shadowRadius, vDirectionalShadowCoord[ i ] ) : 1.0;\\n\\t}\\n\\t#endif\\n\\t#if NUM_SPOT_LIGHTS > 0\\n\\tSpotLight spotLight;\\n\\tfor ( int i = 0; i < NUM_SPOT_LIGHTS; i ++ ) {\\n\\t\\tspotLight = spotLights[ i ];\\n\\t\\tshadow *= bool( spotLight.shadow ) ? getShadow( spotShadowMap[ i ], spotLight.shadowMapSize, spotLight.shadowBias, spotLight.shadowRadius, vSpotShadowCoord[ i ] ) : 1.0;\\n\\t}\\n\\t#endif\\n\\t#if NUM_POINT_LIGHTS > 0\\n\\tPointLight pointLight;\\n\\tfor ( int i = 0; i < NUM_POINT_LIGHTS; i ++ ) {\\n\\t\\tpointLight = pointLights[ i ];\\n\\t\\tshadow *= bool( pointLight.shadow ) ? getPointShadow( pointShadowMap[ i ], pointLight.shadowMapSize, pointLight.shadowBias, pointLight.shadowRadius, vPointShadowCoord[ i ] ) : 1.0;\\n\\t}\\n\\t#endif\\n\\t#endif\\n\\treturn shadow;\\n}\\n\",\nskinbase_vertex:\"#ifdef USE_SKINNING\\n\\tmat4 boneMatX = getBoneMatrix( skinIndex.x );\\n\\tmat4 boneMatY = getBoneMatrix( skinIndex.y );\\n\\tmat4 boneMatZ = getBoneMatrix( skinIndex.z );\\n\\tmat4 boneMatW = getBoneMatrix( skinIndex.w );\\n#endif\",skinning_pars_vertex:\"#ifdef USE_SKINNING\\n\\tuniform mat4 bindMatrix;\\n\\tuniform mat4 bindMatrixInverse;\\n\\t#ifdef BONE_TEXTURE\\n\\t\\tuniform sampler2D boneTexture;\\n\\t\\tuniform int boneTextureSize;\\n\\t\\tmat4 getBoneMatrix( const in float i ) {\\n\\t\\t\\tfloat j = i * 4.0;\\n\\t\\t\\tfloat x = mod( j, float( boneTextureSize ) );\\n\\t\\t\\tfloat y = floor( j / float( boneTextureSize ) );\\n\\t\\t\\tfloat dx = 1.0 / float( boneTextureSize );\\n\\t\\t\\tfloat dy = 1.0 / float( boneTextureSize );\\n\\t\\t\\ty = dy * ( y + 0.5 );\\n\\t\\t\\tvec4 v1 = texture2D( boneTexture, vec2( dx * ( x + 0.5 ), y ) );\\n\\t\\t\\tvec4 v2 = texture2D( boneTexture, vec2( dx * ( x + 1.5 ), y ) );\\n\\t\\t\\tvec4 v3 = texture2D( boneTexture, vec2( dx * ( x + 2.5 ), y ) );\\n\\t\\t\\tvec4 v4 = texture2D( boneTexture, vec2( dx * ( x + 3.5 ), y ) );\\n\\t\\t\\tmat4 bone = mat4( v1, v2, v3, v4 );\\n\\t\\t\\treturn bone;\\n\\t\\t}\\n\\t#else\\n\\t\\tuniform mat4 boneMatrices[ MAX_BONES ];\\n\\t\\tmat4 getBoneMatrix( const in float i ) {\\n\\t\\t\\tmat4 bone = boneMatrices[ int(i) ];\\n\\t\\t\\treturn bone;\\n\\t\\t}\\n\\t#endif\\n#endif\\n\",\nskinning_vertex:\"#ifdef USE_SKINNING\\n\\tvec4 skinVertex = bindMatrix * vec4( transformed, 1.0 );\\n\\tvec4 skinned = vec4( 0.0 );\\n\\tskinned += boneMatX * skinVertex * skinWeight.x;\\n\\tskinned += boneMatY * skinVertex * skinWeight.y;\\n\\tskinned += boneMatZ * skinVertex * skinWeight.z;\\n\\tskinned += boneMatW * skinVertex * skinWeight.w;\\n\\ttransformed = ( bindMatrixInverse * skinned ).xyz;\\n#endif\\n\",skinnormal_vertex:\"#ifdef USE_SKINNING\\n\\tmat4 skinMatrix = mat4( 0.0 );\\n\\tskinMatrix += skinWeight.x * boneMatX;\\n\\tskinMatrix += skinWeight.y * boneMatY;\\n\\tskinMatrix += skinWeight.z * boneMatZ;\\n\\tskinMatrix += skinWeight.w * boneMatW;\\n\\tskinMatrix = bindMatrixInverse * skinMatrix * bindMatrix;\\n\\tobjectNormal = vec4( skinMatrix * vec4( objectNormal, 0.0 ) ).xyz;\\n#endif\\n\",\nspecularmap_fragment:\"float specularStrength;\\n#ifdef USE_SPECULARMAP\\n\\tvec4 texelSpecular = texture2D( specularMap, vUv );\\n\\tspecularStrength = texelSpecular.r;\\n#else\\n\\tspecularStrength = 1.0;\\n#endif\",specularmap_pars_fragment:\"#ifdef USE_SPECULARMAP\\n\\tuniform sampler2D specularMap;\\n#endif\",tonemapping_fragment:\"#if defined( TONE_MAPPING )\\n gl_FragColor.rgb = toneMapping( gl_FragColor.rgb );\\n#endif\\n\",tonemapping_pars_fragment:\"#define saturate(a) clamp( a, 0.0, 1.0 )\\nuniform float toneMappingExposure;\\nuniform float toneMappingWhitePoint;\\nvec3 LinearToneMapping( vec3 color ) {\\n\\treturn toneMappingExposure * color;\\n}\\nvec3 ReinhardToneMapping( vec3 color ) {\\n\\tcolor *= toneMappingExposure;\\n\\treturn saturate( color / ( vec3( 1.0 ) + color ) );\\n}\\n#define Uncharted2Helper( x ) max( ( ( x * ( 0.15 * x + 0.10 * 0.50 ) + 0.20 * 0.02 ) / ( x * ( 0.15 * x + 0.50 ) + 0.20 * 0.30 ) ) - 0.02 / 0.30, vec3( 0.0 ) )\\nvec3 Uncharted2ToneMapping( vec3 color ) {\\n\\tcolor *= toneMappingExposure;\\n\\treturn saturate( Uncharted2Helper( color ) / Uncharted2Helper( vec3( toneMappingWhitePoint ) ) );\\n}\\nvec3 OptimizedCineonToneMapping( vec3 color ) {\\n\\tcolor *= toneMappingExposure;\\n\\tcolor = max( vec3( 0.0 ), color - 0.004 );\\n\\treturn pow( ( color * ( 6.2 * color + 0.5 ) ) / ( color * ( 6.2 * color + 1.7 ) + 0.06 ), vec3( 2.2 ) );\\n}\\n\",\nuv_pars_fragment:\"#if defined( USE_MAP ) || defined( USE_BUMPMAP ) || defined( USE_NORMALMAP ) || defined( USE_SPECULARMAP ) || defined( USE_ALPHAMAP ) || defined( USE_EMISSIVEMAP ) || defined( USE_ROUGHNESSMAP ) || defined( USE_METALNESSMAP )\\n\\tvarying vec2 vUv;\\n#endif\",uv_pars_vertex:\"#if defined( USE_MAP ) || defined( USE_BUMPMAP ) || defined( USE_NORMALMAP ) || defined( USE_SPECULARMAP ) || defined( USE_ALPHAMAP ) || defined( USE_EMISSIVEMAP ) || defined( USE_ROUGHNESSMAP ) || defined( USE_METALNESSMAP )\\n\\tvarying vec2 vUv;\\n\\tuniform vec4 offsetRepeat;\\n#endif\\n\",\nuv_vertex:\"#if defined( USE_MAP ) || defined( USE_BUMPMAP ) || defined( USE_NORMALMAP ) || defined( USE_SPECULARMAP ) || defined( USE_ALPHAMAP ) || defined( USE_EMISSIVEMAP ) || defined( USE_ROUGHNESSMAP ) || defined( USE_METALNESSMAP )\\n\\tvUv = uv * offsetRepeat.zw + offsetRepeat.xy;\\n#endif\",uv2_pars_fragment:\"#if defined( USE_LIGHTMAP ) || defined( USE_AOMAP )\\n\\tvarying vec2 vUv2;\\n#endif\",uv2_pars_vertex:\"#if defined( USE_LIGHTMAP ) || defined( USE_AOMAP )\\n\\tattribute vec2 uv2;\\n\\tvarying vec2 vUv2;\\n#endif\",\nuv2_vertex:\"#if defined( USE_LIGHTMAP ) || defined( USE_AOMAP )\\n\\tvUv2 = uv2;\\n#endif\",worldpos_vertex:\"#if defined( USE_ENVMAP ) || defined( PHONG ) || defined( PHYSICAL ) || defined( LAMBERT ) || defined ( USE_SHADOWMAP )\\n\\tvec4 worldPosition = modelMatrix * vec4( transformed, 1.0 );\\n#endif\\n\",cube_frag:\"uniform samplerCube tCube;\\nuniform float tFlip;\\nuniform float opacity;\\nvarying vec3 vWorldPosition;\\n#include <common>\\nvoid main() {\\n\\tgl_FragColor = textureCube( tCube, vec3( tFlip * vWorldPosition.x, vWorldPosition.yz ) );\\n\\tgl_FragColor.a *= opacity;\\n}\\n\",\ncube_vert:\"varying vec3 vWorldPosition;\\n#include <common>\\nvoid main() {\\n\\tvWorldPosition = transformDirection( position, modelMatrix );\\n\\t#include <begin_vertex>\\n\\t#include <project_vertex>\\n}\\n\",depth_frag:\"#if DEPTH_PACKING == 3200\\n\\tuniform float opacity;\\n#endif\\n#include <common>\\n#include <packing>\\n#include <uv_pars_fragment>\\n#include <map_pars_fragment>\\n#include <alphamap_pars_fragment>\\n#include <logdepthbuf_pars_fragment>\\n#include <clipping_planes_pars_fragment>\\nvoid main() {\\n\\t#include <clipping_planes_fragment>\\n\\tvec4 diffuseColor = vec4( 1.0 );\\n\\t#if DEPTH_PACKING == 3200\\n\\t\\tdiffuseColor.a = opacity;\\n\\t#endif\\n\\t#include <map_fragment>\\n\\t#include <alphamap_fragment>\\n\\t#include <alphatest_fragment>\\n\\t#include <logdepthbuf_fragment>\\n\\t#if DEPTH_PACKING == 3200\\n\\t\\tgl_FragColor = vec4( vec3( gl_FragCoord.z ), opacity );\\n\\t#elif DEPTH_PACKING == 3201\\n\\t\\tgl_FragColor = packDepthToRGBA( gl_FragCoord.z );\\n\\t#endif\\n}\\n\",\ndepth_vert:\"#include <common>\\n#include <uv_pars_vertex>\\n#include <displacementmap_pars_vertex>\\n#include <morphtarget_pars_vertex>\\n#include <skinning_pars_vertex>\\n#include <logdepthbuf_pars_vertex>\\n#include <clipping_planes_pars_vertex>\\nvoid main() {\\n\\t#include <uv_vertex>\\n\\t#include <skinbase_vertex>\\n\\t#ifdef USE_DISPLACEMENTMAP\\n\\t\\t#include <beginnormal_vertex>\\n\\t\\t#include <morphnormal_vertex>\\n\\t\\t#include <skinnormal_vertex>\\n\\t#endif\\n\\t#include <begin_vertex>\\n\\t#include <morphtarget_vertex>\\n\\t#include <skinning_vertex>\\n\\t#include <displacementmap_vertex>\\n\\t#include <project_vertex>\\n\\t#include <logdepthbuf_vertex>\\n\\t#include <clipping_planes_vertex>\\n}\\n\",\ndistanceRGBA_frag:\"uniform vec3 lightPos;\\nvarying vec4 vWorldPosition;\\n#include <common>\\n#include <packing>\\n#include <clipping_planes_pars_fragment>\\nvoid main () {\\n\\t#include <clipping_planes_fragment>\\n\\tgl_FragColor = packDepthToRGBA( length( vWorldPosition.xyz - lightPos.xyz ) / 1000.0 );\\n}\\n\",distanceRGBA_vert:\"varying vec4 vWorldPosition;\\n#include <common>\\n#include <morphtarget_pars_vertex>\\n#include <skinning_pars_vertex>\\n#include <clipping_planes_pars_vertex>\\nvoid main() {\\n\\t#include <skinbase_vertex>\\n\\t#include <begin_vertex>\\n\\t#include <morphtarget_vertex>\\n\\t#include <skinning_vertex>\\n\\t#include <project_vertex>\\n\\t#include <worldpos_vertex>\\n\\t#include <clipping_planes_vertex>\\n\\tvWorldPosition = worldPosition;\\n}\\n\",\nequirect_frag:\"uniform sampler2D tEquirect;\\nuniform float tFlip;\\nvarying vec3 vWorldPosition;\\n#include <common>\\nvoid main() {\\n\\tvec3 direction = normalize( vWorldPosition );\\n\\tvec2 sampleUV;\\n\\tsampleUV.y = saturate( tFlip * direction.y * -0.5 + 0.5 );\\n\\tsampleUV.x = atan( direction.z, direction.x ) * RECIPROCAL_PI2 + 0.5;\\n\\tgl_FragColor = texture2D( tEquirect, sampleUV );\\n}\\n\",equirect_vert:\"varying vec3 vWorldPosition;\\n#include <common>\\nvoid main() {\\n\\tvWorldPosition = transformDirection( position, modelMatrix );\\n\\t#include <begin_vertex>\\n\\t#include <project_vertex>\\n}\\n\",\nlinedashed_frag:\"uniform vec3 diffuse;\\nuniform float opacity;\\nuniform float dashSize;\\nuniform float totalSize;\\nvarying float vLineDistance;\\n#include <common>\\n#include <color_pars_fragment>\\n#include <fog_pars_fragment>\\n#include <logdepthbuf_pars_fragment>\\n#include <clipping_planes_pars_fragment>\\nvoid main() {\\n\\t#include <clipping_planes_fragment>\\n\\tif ( mod( vLineDistance, totalSize ) > dashSize ) {\\n\\t\\tdiscard;\\n\\t}\\n\\tvec3 outgoingLight = vec3( 0.0 );\\n\\tvec4 diffuseColor = vec4( diffuse, opacity );\\n\\t#include <logdepthbuf_fragment>\\n\\t#include <color_fragment>\\n\\toutgoingLight = diffuseColor.rgb;\\n\\tgl_FragColor = vec4( outgoingLight, diffuseColor.a );\\n\\t#include <premultiplied_alpha_fragment>\\n\\t#include <tonemapping_fragment>\\n\\t#include <encodings_fragment>\\n\\t#include <fog_fragment>\\n}\\n\",\nlinedashed_vert:\"uniform float scale;\\nattribute float lineDistance;\\nvarying float vLineDistance;\\n#include <common>\\n#include <color_pars_vertex>\\n#include <fog_pars_vertex>\\n#include <logdepthbuf_pars_vertex>\\n#include <clipping_planes_pars_vertex>\\nvoid main() {\\n\\t#include <color_vertex>\\n\\tvLineDistance = scale * lineDistance;\\n\\tvec4 mvPosition = modelViewMatrix * vec4( position, 1.0 );\\n\\tgl_Position = projectionMatrix * mvPosition;\\n\\t#include <logdepthbuf_vertex>\\n\\t#include <clipping_planes_vertex>\\n\\t#include <fog_vertex>\\n}\\n\",\nmeshbasic_frag:\"uniform vec3 diffuse;\\nuniform float opacity;\\n#ifndef FLAT_SHADED\\n\\tvarying vec3 vNormal;\\n#endif\\n#include <common>\\n#include <color_pars_fragment>\\n#include <uv_pars_fragment>\\n#include <uv2_pars_fragment>\\n#include <map_pars_fragment>\\n#include <alphamap_pars_fragment>\\n#include <aomap_pars_fragment>\\n#include <lightmap_pars_fragment>\\n#include <envmap_pars_fragment>\\n#include <fog_pars_fragment>\\n#include <specularmap_pars_fragment>\\n#include <logdepthbuf_pars_fragment>\\n#include <clipping_planes_pars_fragment>\\nvoid main() {\\n\\t#include <clipping_planes_fragment>\\n\\tvec4 diffuseColor = vec4( diffuse, opacity );\\n\\t#include <logdepthbuf_fragment>\\n\\t#include <map_fragment>\\n\\t#include <color_fragment>\\n\\t#include <alphamap_fragment>\\n\\t#include <alphatest_fragment>\\n\\t#include <specularmap_fragment>\\n\\tReflectedLight reflectedLight = ReflectedLight( vec3( 0.0 ), vec3( 0.0 ), vec3( 0.0 ), vec3( 0.0 ) );\\n\\t#ifdef USE_LIGHTMAP\\n\\t\\treflectedLight.indirectDiffuse += texture2D( lightMap, vUv2 ).xyz * lightMapIntensity;\\n\\t#else\\n\\t\\treflectedLight.indirectDiffuse += vec3( 1.0 );\\n\\t#endif\\n\\t#include <aomap_fragment>\\n\\treflectedLight.indirectDiffuse *= diffuseColor.rgb;\\n\\tvec3 outgoingLight = reflectedLight.indirectDiffuse;\\n\\t#include <normal_flip>\\n\\t#include <envmap_fragment>\\n\\tgl_FragColor = vec4( outgoingLight, diffuseColor.a );\\n\\t#include <premultiplied_alpha_fragment>\\n\\t#include <tonemapping_fragment>\\n\\t#include <encodings_fragment>\\n\\t#include <fog_fragment>\\n}\\n\",\nmeshbasic_vert:\"#include <common>\\n#include <uv_pars_vertex>\\n#include <uv2_pars_vertex>\\n#include <envmap_pars_vertex>\\n#include <color_pars_vertex>\\n#include <fog_pars_vertex>\\n#include <morphtarget_pars_vertex>\\n#include <skinning_pars_vertex>\\n#include <logdepthbuf_pars_vertex>\\n#include <clipping_planes_pars_vertex>\\nvoid main() {\\n\\t#include <uv_vertex>\\n\\t#include <uv2_vertex>\\n\\t#include <color_vertex>\\n\\t#include <skinbase_vertex>\\n\\t#ifdef USE_ENVMAP\\n\\t#include <beginnormal_vertex>\\n\\t#include <morphnormal_vertex>\\n\\t#include <skinnormal_vertex>\\n\\t#include <defaultnormal_vertex>\\n\\t#endif\\n\\t#include <begin_vertex>\\n\\t#include <morphtarget_vertex>\\n\\t#include <skinning_vertex>\\n\\t#include <project_vertex>\\n\\t#include <logdepthbuf_vertex>\\n\\t#include <worldpos_vertex>\\n\\t#include <clipping_planes_vertex>\\n\\t#include <envmap_vertex>\\n\\t#include <fog_vertex>\\n}\\n\",\nmeshlambert_frag:\"uniform vec3 diffuse;\\nuniform vec3 emissive;\\nuniform float opacity;\\nvarying vec3 vLightFront;\\n#ifdef DOUBLE_SIDED\\n\\tvarying vec3 vLightBack;\\n#endif\\n#include <common>\\n#include <packing>\\n#include <dithering_pars_fragment>\\n#include <color_pars_fragment>\\n#include <uv_pars_fragment>\\n#include <uv2_pars_fragment>\\n#include <map_pars_fragment>\\n#include <alphamap_pars_fragment>\\n#include <aomap_pars_fragment>\\n#include <lightmap_pars_fragment>\\n#include <emissivemap_pars_fragment>\\n#include <envmap_pars_fragment>\\n#include <bsdfs>\\n#include <lights_pars>\\n#include <fog_pars_fragment>\\n#include <shadowmap_pars_fragment>\\n#include <shadowmask_pars_fragment>\\n#include <specularmap_pars_fragment>\\n#include <logdepthbuf_pars_fragment>\\n#include <clipping_planes_pars_fragment>\\nvoid main() {\\n\\t#include <clipping_planes_fragment>\\n\\tvec4 diffuseColor = vec4( diffuse, opacity );\\n\\tReflectedLight reflectedLight = ReflectedLight( vec3( 0.0 ), vec3( 0.0 ), vec3( 0.0 ), vec3( 0.0 ) );\\n\\tvec3 totalEmissiveRadiance = emissive;\\n\\t#include <logdepthbuf_fragment>\\n\\t#include <map_fragment>\\n\\t#include <color_fragment>\\n\\t#include <alphamap_fragment>\\n\\t#include <alphatest_fragment>\\n\\t#include <specularmap_fragment>\\n\\t#include <emissivemap_fragment>\\n\\treflectedLight.indirectDiffuse = getAmbientLightIrradiance( ambientLightColor );\\n\\t#include <lightmap_fragment>\\n\\treflectedLight.indirectDiffuse *= BRDF_Diffuse_Lambert( diffuseColor.rgb );\\n\\t#ifdef DOUBLE_SIDED\\n\\t\\treflectedLight.directDiffuse = ( gl_FrontFacing ) ? vLightFront : vLightBack;\\n\\t#else\\n\\t\\treflectedLight.directDiffuse = vLightFront;\\n\\t#endif\\n\\treflectedLight.directDiffuse *= BRDF_Diffuse_Lambert( diffuseColor.rgb ) * getShadowMask();\\n\\t#include <aomap_fragment>\\n\\tvec3 outgoingLight = reflectedLight.directDiffuse + reflectedLight.indirectDiffuse + totalEmissiveRadiance;\\n\\t#include <normal_flip>\\n\\t#include <envmap_fragment>\\n\\tgl_FragColor = vec4( outgoingLight, diffuseColor.a );\\n\\t#include <tonemapping_fragment>\\n\\t#include <encodings_fragment>\\n\\t#include <fog_fragment>\\n\\t#include <premultiplied_alpha_fragment>\\n\\t#include <dithering_fragment>\\n}\\n\",\nmeshlambert_vert:\"#define LAMBERT\\nvarying vec3 vLightFront;\\n#ifdef DOUBLE_SIDED\\n\\tvarying vec3 vLightBack;\\n#endif\\n#include <common>\\n#include <uv_pars_vertex>\\n#include <uv2_pars_vertex>\\n#include <envmap_pars_vertex>\\n#include <bsdfs>\\n#include <lights_pars>\\n#include <color_pars_vertex>\\n#include <fog_pars_vertex>\\n#include <morphtarget_pars_vertex>\\n#include <skinning_pars_vertex>\\n#include <shadowmap_pars_vertex>\\n#include <logdepthbuf_pars_vertex>\\n#include <clipping_planes_pars_vertex>\\nvoid main() {\\n\\t#include <uv_vertex>\\n\\t#include <uv2_vertex>\\n\\t#include <color_vertex>\\n\\t#include <beginnormal_vertex>\\n\\t#include <morphnormal_vertex>\\n\\t#include <skinbase_vertex>\\n\\t#include <skinnormal_vertex>\\n\\t#include <defaultnormal_vertex>\\n\\t#include <begin_vertex>\\n\\t#include <morphtarget_vertex>\\n\\t#include <skinning_vertex>\\n\\t#include <project_vertex>\\n\\t#include <logdepthbuf_vertex>\\n\\t#include <clipping_planes_vertex>\\n\\t#include <worldpos_vertex>\\n\\t#include <envmap_vertex>\\n\\t#include <lights_lambert_vertex>\\n\\t#include <shadowmap_vertex>\\n\\t#include <fog_vertex>\\n}\\n\",\nmeshphong_frag:\"#define PHONG\\nuniform vec3 diffuse;\\nuniform vec3 emissive;\\nuniform vec3 specular;\\nuniform float shininess;\\nuniform float opacity;\\n#include <common>\\n#include <packing>\\n#include <dithering_pars_fragment>\\n#include <color_pars_fragment>\\n#include <uv_pars_fragment>\\n#include <uv2_pars_fragment>\\n#include <map_pars_fragment>\\n#include <alphamap_pars_fragment>\\n#include <aomap_pars_fragment>\\n#include <lightmap_pars_fragment>\\n#include <emissivemap_pars_fragment>\\n#include <envmap_pars_fragment>\\n#include <gradientmap_pars_fragment>\\n#include <fog_pars_fragment>\\n#include <bsdfs>\\n#include <lights_pars>\\n#include <lights_phong_pars_fragment>\\n#include <shadowmap_pars_fragment>\\n#include <bumpmap_pars_fragment>\\n#include <normalmap_pars_fragment>\\n#include <specularmap_pars_fragment>\\n#include <logdepthbuf_pars_fragment>\\n#include <clipping_planes_pars_fragment>\\nvoid main() {\\n\\t#include <clipping_planes_fragment>\\n\\tvec4 diffuseColor = vec4( diffuse, opacity );\\n\\tReflectedLight reflectedLight = ReflectedLight( vec3( 0.0 ), vec3( 0.0 ), vec3( 0.0 ), vec3( 0.0 ) );\\n\\tvec3 totalEmissiveRadiance = emissive;\\n\\t#include <logdepthbuf_fragment>\\n\\t#include <map_fragment>\\n\\t#include <color_fragment>\\n\\t#include <alphamap_fragment>\\n\\t#include <alphatest_fragment>\\n\\t#include <specularmap_fragment>\\n\\t#include <normal_flip>\\n\\t#include <normal_fragment>\\n\\t#include <emissivemap_fragment>\\n\\t#include <lights_phong_fragment>\\n\\t#include <lights_template>\\n\\t#include <aomap_fragment>\\n\\tvec3 outgoingLight = reflectedLight.directDiffuse + reflectedLight.indirectDiffuse + reflectedLight.directSpecular + reflectedLight.indirectSpecular + totalEmissiveRadiance;\\n\\t#include <envmap_fragment>\\n\\tgl_FragColor = vec4( outgoingLight, diffuseColor.a );\\n\\t#include <tonemapping_fragment>\\n\\t#include <encodings_fragment>\\n\\t#include <fog_fragment>\\n\\t#include <premultiplied_alpha_fragment>\\n\\t#include <dithering_fragment>\\n}\\n\",\nmeshphong_vert:\"#define PHONG\\nvarying vec3 vViewPosition;\\n#ifndef FLAT_SHADED\\n\\tvarying vec3 vNormal;\\n#endif\\n#include <common>\\n#include <uv_pars_vertex>\\n#include <uv2_pars_vertex>\\n#include <displacementmap_pars_vertex>\\n#include <envmap_pars_vertex>\\n#include <color_pars_vertex>\\n#include <fog_pars_vertex>\\n#include <morphtarget_pars_vertex>\\n#include <skinning_pars_vertex>\\n#include <shadowmap_pars_vertex>\\n#include <logdepthbuf_pars_vertex>\\n#include <clipping_planes_pars_vertex>\\nvoid main() {\\n\\t#include <uv_vertex>\\n\\t#include <uv2_vertex>\\n\\t#include <color_vertex>\\n\\t#include <beginnormal_vertex>\\n\\t#include <morphnormal_vertex>\\n\\t#include <skinbase_vertex>\\n\\t#include <skinnormal_vertex>\\n\\t#include <defaultnormal_vertex>\\n#ifndef FLAT_SHADED\\n\\tvNormal = normalize( transformedNormal );\\n#endif\\n\\t#include <begin_vertex>\\n\\t#include <morphtarget_vertex>\\n\\t#include <skinning_vertex>\\n\\t#include <displacementmap_vertex>\\n\\t#include <project_vertex>\\n\\t#include <logdepthbuf_vertex>\\n\\t#include <clipping_planes_vertex>\\n\\tvViewPosition = - mvPosition.xyz;\\n\\t#include <worldpos_vertex>\\n\\t#include <envmap_vertex>\\n\\t#include <shadowmap_vertex>\\n\\t#include <fog_vertex>\\n}\\n\",\nmeshphysical_frag:\"#define PHYSICAL\\nuniform vec3 diffuse;\\nuniform vec3 emissive;\\nuniform float roughness;\\nuniform float metalness;\\nuniform float opacity;\\n#ifndef STANDARD\\n\\tuniform float clearCoat;\\n\\tuniform float clearCoatRoughness;\\n#endif\\nvarying vec3 vViewPosition;\\n#ifndef FLAT_SHADED\\n\\tvarying vec3 vNormal;\\n#endif\\n#include <common>\\n#include <packing>\\n#include <dithering_pars_fragment>\\n#include <color_pars_fragment>\\n#include <uv_pars_fragment>\\n#include <uv2_pars_fragment>\\n#include <map_pars_fragment>\\n#include <alphamap_pars_fragment>\\n#include <aomap_pars_fragment>\\n#include <lightmap_pars_fragment>\\n#include <emissivemap_pars_fragment>\\n#include <envmap_pars_fragment>\\n#include <fog_pars_fragment>\\n#include <bsdfs>\\n#include <cube_uv_reflection_fragment>\\n#include <lights_pars>\\n#include <lights_physical_pars_fragment>\\n#include <shadowmap_pars_fragment>\\n#include <bumpmap_pars_fragment>\\n#include <normalmap_pars_fragment>\\n#include <roughnessmap_pars_fragment>\\n#include <metalnessmap_pars_fragment>\\n#include <logdepthbuf_pars_fragment>\\n#include <clipping_planes_pars_fragment>\\nvoid main() {\\n\\t#include <clipping_planes_fragment>\\n\\tvec4 diffuseColor = vec4( diffuse, opacity );\\n\\tReflectedLight reflectedLight = ReflectedLight( vec3( 0.0 ), vec3( 0.0 ), vec3( 0.0 ), vec3( 0.0 ) );\\n\\tvec3 totalEmissiveRadiance = emissive;\\n\\t#include <logdepthbuf_fragment>\\n\\t#include <map_fragment>\\n\\t#include <color_fragment>\\n\\t#include <alphamap_fragment>\\n\\t#include <alphatest_fragment>\\n\\t#include <roughnessmap_fragment>\\n\\t#include <metalnessmap_fragment>\\n\\t#include <normal_flip>\\n\\t#include <normal_fragment>\\n\\t#include <emissivemap_fragment>\\n\\t#include <lights_physical_fragment>\\n\\t#include <lights_template>\\n\\t#include <aomap_fragment>\\n\\tvec3 outgoingLight = reflectedLight.directDiffuse + reflectedLight.indirectDiffuse + reflectedLight.directSpecular + reflectedLight.indirectSpecular + totalEmissiveRadiance;\\n\\tgl_FragColor = vec4( outgoingLight, diffuseColor.a );\\n\\t#include <tonemapping_fragment>\\n\\t#include <encodings_fragment>\\n\\t#include <fog_fragment>\\n\\t#include <premultiplied_alpha_fragment>\\n\\t#include <dithering_fragment>\\n}\\n\",\nmeshphysical_vert:\"#define PHYSICAL\\nvarying vec3 vViewPosition;\\n#ifndef FLAT_SHADED\\n\\tvarying vec3 vNormal;\\n#endif\\n#include <common>\\n#include <uv_pars_vertex>\\n#include <uv2_pars_vertex>\\n#include <displacementmap_pars_vertex>\\n#include <color_pars_vertex>\\n#include <fog_pars_vertex>\\n#include <morphtarget_pars_vertex>\\n#include <skinning_pars_vertex>\\n#include <shadowmap_pars_vertex>\\n#include <logdepthbuf_pars_vertex>\\n#include <clipping_planes_pars_vertex>\\nvoid main() {\\n\\t#include <uv_vertex>\\n\\t#include <uv2_vertex>\\n\\t#include <color_vertex>\\n\\t#include <beginnormal_vertex>\\n\\t#include <morphnormal_vertex>\\n\\t#include <skinbase_vertex>\\n\\t#include <skinnormal_vertex>\\n\\t#include <defaultnormal_vertex>\\n#ifndef FLAT_SHADED\\n\\tvNormal = normalize( transformedNormal );\\n#endif\\n\\t#include <begin_vertex>\\n\\t#include <morphtarget_vertex>\\n\\t#include <skinning_vertex>\\n\\t#include <displacementmap_vertex>\\n\\t#include <project_vertex>\\n\\t#include <logdepthbuf_vertex>\\n\\t#include <clipping_planes_vertex>\\n\\tvViewPosition = - mvPosition.xyz;\\n\\t#include <worldpos_vertex>\\n\\t#include <shadowmap_vertex>\\n\\t#include <fog_vertex>\\n}\\n\",\nnormal_frag:\"#define NORMAL\\nuniform float opacity;\\n#if defined( FLAT_SHADED ) || defined( USE_BUMPMAP ) || defined( USE_NORMALMAP )\\n\\tvarying vec3 vViewPosition;\\n#endif\\n#ifndef FLAT_SHADED\\n\\tvarying vec3 vNormal;\\n#endif\\n#include <packing>\\n#include <uv_pars_fragment>\\n#include <bumpmap_pars_fragment>\\n#include <normalmap_pars_fragment>\\n#include <logdepthbuf_pars_fragment>\\nvoid main() {\\n\\t#include <logdepthbuf_fragment>\\n\\t#include <normal_flip>\\n\\t#include <normal_fragment>\\n\\tgl_FragColor = vec4( packNormalToRGB( normal ), opacity );\\n}\\n\",\nnormal_vert:\"#define NORMAL\\n#if defined( FLAT_SHADED ) || defined( USE_BUMPMAP ) || defined( USE_NORMALMAP )\\n\\tvarying vec3 vViewPosition;\\n#endif\\n#ifndef FLAT_SHADED\\n\\tvarying vec3 vNormal;\\n#endif\\n#include <uv_pars_vertex>\\n#include <displacementmap_pars_vertex>\\n#include <morphtarget_pars_vertex>\\n#include <skinning_pars_vertex>\\n#include <logdepthbuf_pars_vertex>\\nvoid main() {\\n\\t#include <uv_vertex>\\n\\t#include <beginnormal_vertex>\\n\\t#include <morphnormal_vertex>\\n\\t#include <skinbase_vertex>\\n\\t#include <skinnormal_vertex>\\n\\t#include <defaultnormal_vertex>\\n#ifndef FLAT_SHADED\\n\\tvNormal = normalize( transformedNormal );\\n#endif\\n\\t#include <begin_vertex>\\n\\t#include <morphtarget_vertex>\\n\\t#include <skinning_vertex>\\n\\t#include <displacementmap_vertex>\\n\\t#include <project_vertex>\\n\\t#include <logdepthbuf_vertex>\\n#if defined( FLAT_SHADED ) || defined( USE_BUMPMAP ) || defined( USE_NORMALMAP )\\n\\tvViewPosition = - mvPosition.xyz;\\n#endif\\n}\\n\",\npoints_frag:\"uniform vec3 diffuse;\\nuniform float opacity;\\n#include <common>\\n#include <packing>\\n#include <color_pars_fragment>\\n#include <map_particle_pars_fragment>\\n#include <fog_pars_fragment>\\n#include <shadowmap_pars_fragment>\\n#include <logdepthbuf_pars_fragment>\\n#include <clipping_planes_pars_fragment>\\nvoid main() {\\n\\t#include <clipping_planes_fragment>\\n\\tvec3 outgoingLight = vec3( 0.0 );\\n\\tvec4 diffuseColor = vec4( diffuse, opacity );\\n\\t#include <logdepthbuf_fragment>\\n\\t#include <map_particle_fragment>\\n\\t#include <color_fragment>\\n\\t#include <alphatest_fragment>\\n\\toutgoingLight = diffuseColor.rgb;\\n\\tgl_FragColor = vec4( outgoingLight, diffuseColor.a );\\n\\t#include <premultiplied_alpha_fragment>\\n\\t#include <tonemapping_fragment>\\n\\t#include <encodings_fragment>\\n\\t#include <fog_fragment>\\n}\\n\",\npoints_vert:\"uniform float size;\\nuniform float scale;\\n#include <common>\\n#include <color_pars_vertex>\\n#include <fog_pars_vertex>\\n#include <shadowmap_pars_vertex>\\n#include <logdepthbuf_pars_vertex>\\n#include <clipping_planes_pars_vertex>\\nvoid main() {\\n\\t#include <color_vertex>\\n\\t#include <begin_vertex>\\n\\t#include <project_vertex>\\n\\t#ifdef USE_SIZEATTENUATION\\n\\t\\tgl_PointSize = size * ( scale / - mvPosition.z );\\n\\t#else\\n\\t\\tgl_PointSize = size;\\n\\t#endif\\n\\t#include <logdepthbuf_vertex>\\n\\t#include <clipping_planes_vertex>\\n\\t#include <worldpos_vertex>\\n\\t#include <shadowmap_vertex>\\n\\t#include <fog_vertex>\\n}\\n\",\nshadow_frag:\"uniform float opacity;\\n#include <common>\\n#include <packing>\\n#include <bsdfs>\\n#include <lights_pars>\\n#include <shadowmap_pars_fragment>\\n#include <shadowmask_pars_fragment>\\nvoid main() {\\n\\tgl_FragColor = vec4( 0.0, 0.0, 0.0, opacity * ( 1.0 - getShadowMask() ) );\\n}\\n\",shadow_vert:\"#include <shadowmap_pars_vertex>\\nvoid main() {\\n\\t#include <begin_vertex>\\n\\t#include <project_vertex>\\n\\t#include <worldpos_vertex>\\n\\t#include <shadowmap_vertex>\\n}\\n\"},$a={basic:{uniforms:Ca.merge([R.common,\nR.aomap,R.lightmap,R.fog]),vertexShader:X.meshbasic_vert,fragmentShader:X.meshbasic_frag},lambert:{uniforms:Ca.merge([R.common,R.aomap,R.lightmap,R.emissivemap,R.fog,R.lights,{emissive:{value:new G(0)}}]),vertexShader:X.meshlambert_vert,fragmentShader:X.meshlambert_frag},phong:{uniforms:Ca.merge([R.common,R.aomap,R.lightmap,R.emissivemap,R.bumpmap,R.normalmap,R.displacementmap,R.gradientmap,R.fog,R.lights,{emissive:{value:new G(0)},specular:{value:new G(1118481)},shininess:{value:30}}]),vertexShader:X.meshphong_vert,\nfragmentShader:X.meshphong_frag},standard:{uniforms:Ca.merge([R.common,R.aomap,R.lightmap,R.emissivemap,R.bumpmap,R.normalmap,R.displacementmap,R.roughnessmap,R.metalnessmap,R.fog,R.lights,{emissive:{value:new G(0)},roughness:{value:.5},metalness:{value:.5},envMapIntensity:{value:1}}]),vertexShader:X.meshphysical_vert,fragmentShader:X.meshphysical_frag},points:{uniforms:Ca.merge([R.points,R.fog]),vertexShader:X.points_vert,fragmentShader:X.points_frag},dashed:{uniforms:Ca.merge([R.common,R.fog,{scale:{value:1},\ndashSize:{value:1},totalSize:{value:2}}]),vertexShader:X.linedashed_vert,fragmentShader:X.linedashed_frag},depth:{uniforms:Ca.merge([R.common,R.displacementmap]),vertexShader:X.depth_vert,fragmentShader:X.depth_frag},normal:{uniforms:Ca.merge([R.common,R.bumpmap,R.normalmap,R.displacementmap,{opacity:{value:1}}]),vertexShader:X.normal_vert,fragmentShader:X.normal_frag},cube:{uniforms:{tCube:{value:null},tFlip:{value:-1},opacity:{value:1}},vertexShader:X.cube_vert,fragmentShader:X.cube_frag},equirect:{uniforms:{tEquirect:{value:null},\ntFlip:{value:-1}},vertexShader:X.equirect_vert,fragmentShader:X.equirect_frag},distanceRGBA:{uniforms:{lightPos:{value:new n}},vertexShader:X.distanceRGBA_vert,fragmentShader:X.distanceRGBA_frag}};$a.physical={uniforms:Ca.merge([$a.standard.uniforms,{clearCoat:{value:0},clearCoatRoughness:{value:0}}]),vertexShader:X.meshphysical_vert,fragmentShader:X.meshphysical_frag};Object.assign(fd.prototype,{set:function(a,b){this.min.copy(a);this.max.copy(b);return this},setFromPoints:function(a){this.makeEmpty();\nfor(var b=0,c=a.length;b<c;b++)this.expandByPoint(a[b]);return this},setFromCenterAndSize:function(){var a=new C;return function(b,c){var d=a.copy(c).multiplyScalar(.5);this.min.copy(b).sub(d);this.max.copy(b).add(d);return this}}(),clone:function(){return(new this.constructor).copy(this)},copy:function(a){this.min.copy(a.min);this.max.copy(a.max);return this},makeEmpty:function(){this.min.x=this.min.y=Infinity;this.max.x=this.max.y=-Infinity;return this},isEmpty:function(){return this.max.x<this.min.x||\nthis.max.y<this.min.y},getCenter:function(a){a=a||new C;return this.isEmpty()?a.set(0,0):a.addVectors(this.min,this.max).multiplyScalar(.5)},getSize:function(a){a=a||new C;return this.isEmpty()?a.set(0,0):a.subVectors(this.max,this.min)},expandByPoint:function(a){this.min.min(a);this.max.max(a);return this},expandByVector:function(a){this.min.sub(a);this.max.add(a);return this},expandByScalar:function(a){this.min.addScalar(-a);this.max.addScalar(a);return this},containsPoint:function(a){return a.x<\nthis.min.x||a.x>this.max.x||a.y<this.min.y||a.y>this.max.y?!1:!0},containsBox:function(a){return this.min.x<=a.min.x&&a.max.x<=this.max.x&&this.min.y<=a.min.y&&a.max.y<=this.max.y},getParameter:function(a,b){return(b||new C).set((a.x-this.min.x)/(this.max.x-this.min.x),(a.y-this.min.y)/(this.max.y-this.min.y))},intersectsBox:function(a){return a.max.x<this.min.x||a.min.x>this.max.x||a.max.y<this.min.y||a.min.y>this.max.y?!1:!0},clampPoint:function(a,b){return(b||new C).copy(a).clamp(this.min,this.max)},\ndistanceToPoint:function(){var a=new C;return function(b){return a.copy(b).clamp(this.min,this.max).sub(b).length()}}(),intersect:function(a){this.min.max(a.min);this.max.min(a.max);return this},union:function(a){this.min.min(a.min);this.max.max(a.max);return this},translate:function(a){this.min.add(a);this.max.add(a);return this},equals:function(a){return a.min.equals(this.min)&&a.max.equals(this.max)}});var Jf=0;Object.assign(U.prototype,xa.prototype,{isMaterial:!0,onBeforeCompile:function(){},\nsetValues:function(a){if(void 0!==a)for(var b in a){var c=a[b];if(void 0===c)console.warn(\"THREE.Material: '\"+b+\"' parameter is undefined.\");else{var d=this[b];void 0===d?console.warn(\"THREE.\"+this.type+\": '\"+b+\"' is not a property of this material.\"):d&&d.isColor?d.set(c):d&&d.isVector3&&c&&c.isVector3?d.copy(c):this[b]=\"overdraw\"===b?Number(c):c}}},toJSON:function(a){function b(a){var b=[],c;for(c in a){var d=a[c];delete d.metadata;b.push(d)}return b}var c=void 0===a;c&&(a={textures:{},images:{}});\nvar d={metadata:{version:4.5,type:\"Material\",generator:\"Material.toJSON\"}};d.uuid=this.uuid;d.type=this.type;\"\"!==this.name&&(d.name=this.name);this.color&&this.color.isColor&&(d.color=this.color.getHex());void 0!==this.roughness&&(d.roughness=this.roughness);void 0!==this.metalness&&(d.metalness=this.metalness);this.emissive&&this.emissive.isColor&&(d.emissive=this.emissive.getHex());this.specular&&this.specular.isColor&&(d.specular=this.specular.getHex());void 0!==this.shininess&&(d.shininess=this.shininess);\nvoid 0!==this.clearCoat&&(d.clearCoat=this.clearCoat);void 0!==this.clearCoatRoughness&&(d.clearCoatRoughness=this.clearCoatRoughness);this.map&&this.map.isTexture&&(d.map=this.map.toJSON(a).uuid);this.alphaMap&&this.alphaMap.isTexture&&(d.alphaMap=this.alphaMap.toJSON(a).uuid);this.lightMap&&this.lightMap.isTexture&&(d.lightMap=this.lightMap.toJSON(a).uuid);this.bumpMap&&this.bumpMap.isTexture&&(d.bumpMap=this.bumpMap.toJSON(a).uuid,d.bumpScale=this.bumpScale);this.normalMap&&this.normalMap.isTexture&&\n(d.normalMap=this.normalMap.toJSON(a).uuid,d.normalScale=this.normalScale.toArray());this.displacementMap&&this.displacementMap.isTexture&&(d.displacementMap=this.displacementMap.toJSON(a).uuid,d.displacementScale=this.displacementScale,d.displacementBias=this.displacementBias);this.roughnessMap&&this.roughnessMap.isTexture&&(d.roughnessMap=this.roughnessMap.toJSON(a).uuid);this.metalnessMap&&this.metalnessMap.isTexture&&(d.metalnessMap=this.metalnessMap.toJSON(a).uuid);this.emissiveMap&&this.emissiveMap.isTexture&&\n(d.emissiveMap=this.emissiveMap.toJSON(a).uuid);this.specularMap&&this.specularMap.isTexture&&(d.specularMap=this.specularMap.toJSON(a).uuid);this.envMap&&this.envMap.isTexture&&(d.envMap=this.envMap.toJSON(a).uuid,d.reflectivity=this.reflectivity);this.gradientMap&&this.gradientMap.isTexture&&(d.gradientMap=this.gradientMap.toJSON(a).uuid);void 0!==this.size&&(d.size=this.size);void 0!==this.sizeAttenuation&&(d.sizeAttenuation=this.sizeAttenuation);1!==this.blending&&(d.blending=this.blending);2!==\nthis.shading&&(d.shading=this.shading);0!==this.side&&(d.side=this.side);0!==this.vertexColors&&(d.vertexColors=this.vertexColors);1>this.opacity&&(d.opacity=this.opacity);!0===this.transparent&&(d.transparent=this.transparent);d.depthFunc=this.depthFunc;d.depthTest=this.depthTest;d.depthWrite=this.depthWrite;0<this.alphaTest&&(d.alphaTest=this.alphaTest);!0===this.premultipliedAlpha&&(d.premultipliedAlpha=this.premultipliedAlpha);!0===this.wireframe&&(d.wireframe=this.wireframe);1<this.wireframeLinewidth&&\n(d.wireframeLinewidth=this.wireframeLinewidth);\"round\"!==this.wireframeLinecap&&(d.wireframeLinecap=this.wireframeLinecap);\"round\"!==this.wireframeLinejoin&&(d.wireframeLinejoin=this.wireframeLinejoin);d.skinning=this.skinning;d.morphTargets=this.morphTargets;d.dithering=this.dithering;c&&(c=b(a.textures),a=b(a.images),0<c.length&&(d.textures=c),0<a.length&&(d.images=a));return d},clone:function(){return(new this.constructor).copy(this)},copy:function(a){this.name=a.name;this.fog=a.fog;this.lights=\na.lights;this.blending=a.blending;this.side=a.side;this.shading=a.shading;this.vertexColors=a.vertexColors;this.opacity=a.opacity;this.transparent=a.transparent;this.blendSrc=a.blendSrc;this.blendDst=a.blendDst;this.blendEquation=a.blendEquation;this.blendSrcAlpha=a.blendSrcAlpha;this.blendDstAlpha=a.blendDstAlpha;this.blendEquationAlpha=a.blendEquationAlpha;this.depthFunc=a.depthFunc;this.depthTest=a.depthTest;this.depthWrite=a.depthWrite;this.colorWrite=a.colorWrite;this.precision=a.precision;this.polygonOffset=\na.polygonOffset;this.polygonOffsetFactor=a.polygonOffsetFactor;this.polygonOffsetUnits=a.polygonOffsetUnits;this.dithering=a.dithering;this.alphaTest=a.alphaTest;this.premultipliedAlpha=a.premultipliedAlpha;this.overdraw=a.overdraw;this.visible=a.visible;this.clipShadows=a.clipShadows;this.clipIntersection=a.clipIntersection;a=a.clippingPlanes;var b=null;if(null!==a)for(var c=a.length,b=Array(c),d=0;d!==c;++d)b[d]=a[d].clone();this.clippingPlanes=b;return this},dispose:function(){this.dispatchEvent({type:\"dispose\"})}});\nra.prototype=Object.create(U.prototype);ra.prototype.constructor=ra;ra.prototype.isShaderMaterial=!0;ra.prototype.copy=function(a){U.prototype.copy.call(this,a);this.fragmentShader=a.fragmentShader;this.vertexShader=a.vertexShader;this.uniforms=Ca.clone(a.uniforms);this.defines=a.defines;this.wireframe=a.wireframe;this.wireframeLinewidth=a.wireframeLinewidth;this.lights=a.lights;this.clipping=a.clipping;this.skinning=a.skinning;this.morphTargets=a.morphTargets;this.morphNormals=a.morphNormals;this.extensions=\na.extensions;return this};ra.prototype.toJSON=function(a){a=U.prototype.toJSON.call(this,a);a.uniforms=this.uniforms;a.vertexShader=this.vertexShader;a.fragmentShader=this.fragmentShader;return a};Za.prototype=Object.create(U.prototype);Za.prototype.constructor=Za;Za.prototype.isMeshDepthMaterial=!0;Za.prototype.copy=function(a){U.prototype.copy.call(this,a);this.depthPacking=a.depthPacking;this.skinning=a.skinning;this.morphTargets=a.morphTargets;this.map=a.map;this.alphaMap=a.alphaMap;this.displacementMap=\na.displacementMap;this.displacementScale=a.displacementScale;this.displacementBias=a.displacementBias;this.wireframe=a.wireframe;this.wireframeLinewidth=a.wireframeLinewidth;return this};Object.assign(Ra.prototype,{isBox3:!0,set:function(a,b){this.min.copy(a);this.max.copy(b);return this},setFromArray:function(a){for(var b=Infinity,c=Infinity,d=Infinity,e=-Infinity,f=-Infinity,g=-Infinity,h=0,k=a.length;h<k;h+=3){var m=a[h],q=a[h+1],l=a[h+2];m<b&&(b=m);q<c&&(c=q);l<d&&(d=l);m>e&&(e=m);q>f&&(f=q);\nl>g&&(g=l)}this.min.set(b,c,d);this.max.set(e,f,g);return this},setFromBufferAttribute:function(a){for(var b=Infinity,c=Infinity,d=Infinity,e=-Infinity,f=-Infinity,g=-Infinity,h=0,k=a.count;h<k;h++){var m=a.getX(h),q=a.getY(h),l=a.getZ(h);m<b&&(b=m);q<c&&(c=q);l<d&&(d=l);m>e&&(e=m);q>f&&(f=q);l>g&&(g=l)}this.min.set(b,c,d);this.max.set(e,f,g);return this},setFromPoints:function(a){this.makeEmpty();for(var b=0,c=a.length;b<c;b++)this.expandByPoint(a[b]);return this},setFromCenterAndSize:function(){var a=\nnew n;return function(b,c){var d=a.copy(c).multiplyScalar(.5);this.min.copy(b).sub(d);this.max.copy(b).add(d);return this}}(),setFromObject:function(a){this.makeEmpty();return this.expandByObject(a)},clone:function(){return(new this.constructor).copy(this)},copy:function(a){this.min.copy(a.min);this.max.copy(a.max);return this},makeEmpty:function(){this.min.x=this.min.y=this.min.z=Infinity;this.max.x=this.max.y=this.max.z=-Infinity;return this},isEmpty:function(){return this.max.x<this.min.x||this.max.y<\nthis.min.y||this.max.z<this.min.z},getCenter:function(a){a=a||new n;return this.isEmpty()?a.set(0,0,0):a.addVectors(this.min,this.max).multiplyScalar(.5)},getSize:function(a){a=a||new n;return this.isEmpty()?a.set(0,0,0):a.subVectors(this.max,this.min)},expandByPoint:function(a){this.min.min(a);this.max.max(a);return this},expandByVector:function(a){this.min.sub(a);this.max.add(a);return this},expandByScalar:function(a){this.min.addScalar(-a);this.max.addScalar(a);return this},expandByObject:function(){var a=\nnew n;return function(b){var c=this;b.updateMatrixWorld(!0);b.traverse(function(b){var e,f;e=b.geometry;if(void 0!==e)if(e.isGeometry){var g=e.vertices;e=0;for(f=g.length;e<f;e++)a.copy(g[e]),a.applyMatrix4(b.matrixWorld),c.expandByPoint(a)}else if(e.isBufferGeometry&&(g=e.attributes.position,void 0!==g))for(e=0,f=g.count;e<f;e++)a.fromBufferAttribute(g,e).applyMatrix4(b.matrixWorld),c.expandByPoint(a)});return this}}(),containsPoint:function(a){return a.x<this.min.x||a.x>this.max.x||a.y<this.min.y||\na.y>this.max.y||a.z<this.min.z||a.z>this.max.z?!1:!0},containsBox:function(a){return this.min.x<=a.min.x&&a.max.x<=this.max.x&&this.min.y<=a.min.y&&a.max.y<=this.max.y&&this.min.z<=a.min.z&&a.max.z<=this.max.z},getParameter:function(a,b){return(b||new n).set((a.x-this.min.x)/(this.max.x-this.min.x),(a.y-this.min.y)/(this.max.y-this.min.y),(a.z-this.min.z)/(this.max.z-this.min.z))},intersectsBox:function(a){return a.max.x<this.min.x||a.min.x>this.max.x||a.max.y<this.min.y||a.min.y>this.max.y||a.max.z<\nthis.min.z||a.min.z>this.max.z?!1:!0},intersectsSphere:function(){var a=new n;return function(b){this.clampPoint(b.center,a);return a.distanceToSquared(b.center)<=b.radius*b.radius}}(),intersectsPlane:function(a){var b,c;0<a.normal.x?(b=a.normal.x*this.min.x,c=a.normal.x*this.max.x):(b=a.normal.x*this.max.x,c=a.normal.x*this.min.x);0<a.normal.y?(b+=a.normal.y*this.min.y,c+=a.normal.y*this.max.y):(b+=a.normal.y*this.max.y,c+=a.normal.y*this.min.y);0<a.normal.z?(b+=a.normal.z*this.min.z,c+=a.normal.z*\nthis.max.z):(b+=a.normal.z*this.max.z,c+=a.normal.z*this.min.z);return b<=a.constant&&c>=a.constant},clampPoint:function(a,b){return(b||new n).copy(a).clamp(this.min,this.max)},distanceToPoint:function(){var a=new n;return function(b){return a.copy(b).clamp(this.min,this.max).sub(b).length()}}(),getBoundingSphere:function(){var a=new n;return function(b){b=b||new Ea;this.getCenter(b.center);b.radius=.5*this.getSize(a).length();return b}}(),intersect:function(a){this.min.max(a.min);this.max.min(a.max);\nthis.isEmpty()&&this.makeEmpty();return this},union:function(a){this.min.min(a.min);this.max.max(a.max);return this},applyMatrix4:function(){var a=[new n,new n,new n,new n,new n,new n,new n,new n];return function(b){if(this.isEmpty())return this;a[0].set(this.min.x,this.min.y,this.min.z).applyMatrix4(b);a[1].set(this.min.x,this.min.y,this.max.z).applyMatrix4(b);a[2].set(this.min.x,this.max.y,this.min.z).applyMatrix4(b);a[3].set(this.min.x,this.max.y,this.max.z).applyMatrix4(b);a[4].set(this.max.x,\nthis.min.y,this.min.z).applyMatrix4(b);a[5].set(this.max.x,this.min.y,this.max.z).applyMatrix4(b);a[6].set(this.max.x,this.max.y,this.min.z).applyMatrix4(b);a[7].set(this.max.x,this.max.y,this.max.z).applyMatrix4(b);this.setFromPoints(a);return this}}(),translate:function(a){this.min.add(a);this.max.add(a);return this},equals:function(a){return a.min.equals(this.min)&&a.max.equals(this.max)}});Object.assign(Ea.prototype,{set:function(a,b){this.center.copy(a);this.radius=b;return this},setFromPoints:function(){var a=\nnew Ra;return function(b,c){var d=this.center;void 0!==c?d.copy(c):a.setFromPoints(b).getCenter(d);for(var e=0,f=0,g=b.length;f<g;f++)e=Math.max(e,d.distanceToSquared(b[f]));this.radius=Math.sqrt(e);return this}}(),clone:function(){return(new this.constructor).copy(this)},copy:function(a){this.center.copy(a.center);this.radius=a.radius;return this},empty:function(){return 0>=this.radius},containsPoint:function(a){return a.distanceToSquared(this.center)<=this.radius*this.radius},distanceToPoint:function(a){return a.distanceTo(this.center)-\nthis.radius},intersectsSphere:function(a){var b=this.radius+a.radius;return a.center.distanceToSquared(this.center)<=b*b},intersectsBox:function(a){return a.intersectsSphere(this)},intersectsPlane:function(a){return Math.abs(this.center.dot(a.normal)-a.constant)<=this.radius},clampPoint:function(a,b){var c=this.center.distanceToSquared(a),d=b||new n;d.copy(a);c>this.radius*this.radius&&(d.sub(this.center).normalize(),d.multiplyScalar(this.radius).add(this.center));return d},getBoundingBox:function(a){a=\na||new Ra;a.set(this.center,this.center);a.expandByScalar(this.radius);return a},applyMatrix4:function(a){this.center.applyMatrix4(a);this.radius*=a.getMaxScaleOnAxis();return this},translate:function(a){this.center.add(a);return this},equals:function(a){return a.center.equals(this.center)&&a.radius===this.radius}});Object.assign(Ba.prototype,{isMatrix3:!0,set:function(a,b,c,d,e,f,g,h,k){var m=this.elements;m[0]=a;m[1]=d;m[2]=g;m[3]=b;m[4]=e;m[5]=h;m[6]=c;m[7]=f;m[8]=k;return this},identity:function(){this.set(1,\n0,0,0,1,0,0,0,1);return this},clone:function(){return(new this.constructor).fromArray(this.elements)},copy:function(a){var b=this.elements;a=a.elements;b[0]=a[0];b[1]=a[1];b[2]=a[2];b[3]=a[3];b[4]=a[4];b[5]=a[5];b[6]=a[6];b[7]=a[7];b[8]=a[8];return this},setFromMatrix4:function(a){a=a.elements;this.set(a[0],a[4],a[8],a[1],a[5],a[9],a[2],a[6],a[10]);return this},applyToBufferAttribute:function(){var a=new n;return function(b){for(var c=0,d=b.count;c<d;c++)a.x=b.getX(c),a.y=b.getY(c),a.z=b.getZ(c),\na.applyMatrix3(this),b.setXYZ(c,a.x,a.y,a.z);return b}}(),multiply:function(a){return this.multiplyMatrices(this,a)},premultiply:function(a){return this.multiplyMatrices(a,this)},multiplyMatrices:function(a,b){var c=a.elements,d=b.elements,e=this.elements,f=c[0],g=c[3],h=c[6],k=c[1],m=c[4],q=c[7],l=c[2],p=c[5],c=c[8],r=d[0],n=d[3],t=d[6],y=d[1],x=d[4],u=d[7],H=d[2],w=d[5],d=d[8];e[0]=f*r+g*y+h*H;e[3]=f*n+g*x+h*w;e[6]=f*t+g*u+h*d;e[1]=k*r+m*y+q*H;e[4]=k*n+m*x+q*w;e[7]=k*t+m*u+q*d;e[2]=l*r+p*y+c*H;\ne[5]=l*n+p*x+c*w;e[8]=l*t+p*u+c*d;return this},multiplyScalar:function(a){var b=this.elements;b[0]*=a;b[3]*=a;b[6]*=a;b[1]*=a;b[4]*=a;b[7]*=a;b[2]*=a;b[5]*=a;b[8]*=a;return this},determinant:function(){var a=this.elements,b=a[0],c=a[1],d=a[2],e=a[3],f=a[4],g=a[5],h=a[6],k=a[7],a=a[8];return b*f*a-b*g*k-c*e*a+c*g*h+d*e*k-d*f*h},getInverse:function(a,b){a&&a.isMatrix4&&console.error(\"THREE.Matrix3.getInverse no longer takes a Matrix4 argument.\");var c=a.elements,d=this.elements,e=c[0],f=c[1],g=c[2],\nh=c[3],k=c[4],m=c[5],q=c[6],l=c[7],c=c[8],p=c*k-m*l,r=m*q-c*h,n=l*h-k*q,t=e*p+f*r+g*n;if(0===t){if(!0===b)throw Error(\"THREE.Matrix3.getInverse(): can't invert matrix, determinant is 0\");console.warn(\"THREE.Matrix3.getInverse(): can't invert matrix, determinant is 0\");return this.identity()}t=1/t;d[0]=p*t;d[1]=(g*l-c*f)*t;d[2]=(m*f-g*k)*t;d[3]=r*t;d[4]=(c*e-g*q)*t;d[5]=(g*h-m*e)*t;d[6]=n*t;d[7]=(f*q-l*e)*t;d[8]=(k*e-f*h)*t;return this},transpose:function(){var a,b=this.elements;a=b[1];b[1]=b[3];b[3]=\na;a=b[2];b[2]=b[6];b[6]=a;a=b[5];b[5]=b[7];b[7]=a;return this},getNormalMatrix:function(a){return this.setFromMatrix4(a).getInverse(this).transpose()},transposeIntoArray:function(a){var b=this.elements;a[0]=b[0];a[1]=b[3];a[2]=b[6];a[3]=b[1];a[4]=b[4];a[5]=b[7];a[6]=b[2];a[7]=b[5];a[8]=b[8];return this},equals:function(a){var b=this.elements;a=a.elements;for(var c=0;9>c;c++)if(b[c]!==a[c])return!1;return!0},fromArray:function(a,b){void 0===b&&(b=0);for(var c=0;9>c;c++)this.elements[c]=a[c+b];return this},\ntoArray:function(a,b){void 0===a&&(a=[]);void 0===b&&(b=0);var c=this.elements;a[b]=c[0];a[b+1]=c[1];a[b+2]=c[2];a[b+3]=c[3];a[b+4]=c[4];a[b+5]=c[5];a[b+6]=c[6];a[b+7]=c[7];a[b+8]=c[8];return a}});Object.assign(Aa.prototype,{set:function(a,b){this.normal.copy(a);this.constant=b;return this},setComponents:function(a,b,c,d){this.normal.set(a,b,c);this.constant=d;return this},setFromNormalAndCoplanarPoint:function(a,b){this.normal.copy(a);this.constant=-b.dot(this.normal);return this},setFromCoplanarPoints:function(){var a=\nnew n,b=new n;return function(c,d,e){d=a.subVectors(e,d).cross(b.subVectors(c,d)).normalize();this.setFromNormalAndCoplanarPoint(d,c);return this}}(),clone:function(){return(new this.constructor).copy(this)},copy:function(a){this.normal.copy(a.normal);this.constant=a.constant;return this},normalize:function(){var a=1/this.normal.length();this.normal.multiplyScalar(a);this.constant*=a;return this},negate:function(){this.constant*=-1;this.normal.negate();return this},distanceToPoint:function(a){return this.normal.dot(a)+\nthis.constant},distanceToSphere:function(a){return this.distanceToPoint(a.center)-a.radius},projectPoint:function(a,b){return this.orthoPoint(a,b).sub(a).negate()},orthoPoint:function(a,b){var c=this.distanceToPoint(a);return(b||new n).copy(this.normal).multiplyScalar(c)},intersectLine:function(){var a=new n;return function(b,c){var d=c||new n,e=b.delta(a),f=this.normal.dot(e);if(0===f){if(0===this.distanceToPoint(b.start))return d.copy(b.start)}else return f=-(b.start.dot(this.normal)+this.constant)/\nf,0>f||1<f?void 0:d.copy(e).multiplyScalar(f).add(b.start)}}(),intersectsLine:function(a){var b=this.distanceToPoint(a.start);a=this.distanceToPoint(a.end);return 0>b&&0<a||0>a&&0<b},intersectsBox:function(a){return a.intersectsPlane(this)},intersectsSphere:function(a){return a.intersectsPlane(this)},coplanarPoint:function(a){return(a||new n).copy(this.normal).multiplyScalar(-this.constant)},applyMatrix4:function(){var a=new n,b=new Ba;return function(c,d){var e=this.coplanarPoint(a).applyMatrix4(c),\nf=d||b.getNormalMatrix(c),f=this.normal.applyMatrix3(f).normalize();this.constant=-e.dot(f);return this}}(),translate:function(a){this.constant-=a.dot(this.normal);return this},equals:function(a){return a.normal.equals(this.normal)&&a.constant===this.constant}});Object.assign(gd.prototype,{set:function(a,b,c,d,e,f){var g=this.planes;g[0].copy(a);g[1].copy(b);g[2].copy(c);g[3].copy(d);g[4].copy(e);g[5].copy(f);return this},clone:function(){return(new this.constructor).copy(this)},copy:function(a){for(var b=\nthis.planes,c=0;6>c;c++)b[c].copy(a.planes[c]);return this},setFromMatrix:function(a){var b=this.planes,c=a.elements;a=c[0];var d=c[1],e=c[2],f=c[3],g=c[4],h=c[5],k=c[6],m=c[7],q=c[8],l=c[9],p=c[10],r=c[11],n=c[12],t=c[13],y=c[14],c=c[15];b[0].setComponents(f-a,m-g,r-q,c-n).normalize();b[1].setComponents(f+a,m+g,r+q,c+n).normalize();b[2].setComponents(f+d,m+h,r+l,c+t).normalize();b[3].setComponents(f-d,m-h,r-l,c-t).normalize();b[4].setComponents(f-e,m-k,r-p,c-y).normalize();b[5].setComponents(f+e,\nm+k,r+p,c+y).normalize();return this},intersectsObject:function(){var a=new Ea;return function(b){var c=b.geometry;null===c.boundingSphere&&c.computeBoundingSphere();a.copy(c.boundingSphere).applyMatrix4(b.matrixWorld);return this.intersectsSphere(a)}}(),intersectsSprite:function(){var a=new Ea;return function(b){a.center.set(0,0,0);a.radius=.7071067811865476;a.applyMatrix4(b.matrixWorld);return this.intersectsSphere(a)}}(),intersectsSphere:function(a){var b=this.planes,c=a.center;a=-a.radius;for(var d=\n0;6>d;d++)if(b[d].distanceToPoint(c)<a)return!1;return!0},intersectsBox:function(){var a=new n,b=new n;return function(c){for(var d=this.planes,e=0;6>e;e++){var f=d[e];a.x=0<f.normal.x?c.min.x:c.max.x;b.x=0<f.normal.x?c.max.x:c.min.x;a.y=0<f.normal.y?c.min.y:c.max.y;b.y=0<f.normal.y?c.max.y:c.min.y;a.z=0<f.normal.z?c.min.z:c.max.z;b.z=0<f.normal.z?c.max.z:c.min.z;var g=f.distanceToPoint(a),f=f.distanceToPoint(b);if(0>g&&0>f)return!1}return!0}}(),containsPoint:function(a){for(var b=this.planes,c=0;6>\nc;c++)if(0>b[c].distanceToPoint(a))return!1;return!0}});ab.RotationOrders=\"XYZ YZX ZXY XZY YXZ ZYX\".split(\" \");ab.DefaultOrder=\"XYZ\";Object.defineProperties(ab.prototype,{x:{get:function(){return this._x},set:function(a){this._x=a;this.onChangeCallback()}},y:{get:function(){return this._y},set:function(a){this._y=a;this.onChangeCallback()}},z:{get:function(){return this._z},set:function(a){this._z=a;this.onChangeCallback()}},order:{get:function(){return this._order},set:function(a){this._order=a;\nthis.onChangeCallback()}}});Object.assign(ab.prototype,{isEuler:!0,set:function(a,b,c,d){this._x=a;this._y=b;this._z=c;this._order=d||this._order;this.onChangeCallback();return this},clone:function(){return new this.constructor(this._x,this._y,this._z,this._order)},copy:function(a){this._x=a._x;this._y=a._y;this._z=a._z;this._order=a._order;this.onChangeCallback();return this},setFromRotationMatrix:function(a,b,c){var d=Y.clamp,e=a.elements;a=e[0];var f=e[4],g=e[8],h=e[1],k=e[5],m=e[9],q=e[2],l=e[6],\ne=e[10];b=b||this._order;\"XYZ\"===b?(this._y=Math.asin(d(g,-1,1)),.99999>Math.abs(g)?(this._x=Math.atan2(-m,e),this._z=Math.atan2(-f,a)):(this._x=Math.atan2(l,k),this._z=0)):\"YXZ\"===b?(this._x=Math.asin(-d(m,-1,1)),.99999>Math.abs(m)?(this._y=Math.atan2(g,e),this._z=Math.atan2(h,k)):(this._y=Math.atan2(-q,a),this._z=0)):\"ZXY\"===b?(this._x=Math.asin(d(l,-1,1)),.99999>Math.abs(l)?(this._y=Math.atan2(-q,e),this._z=Math.atan2(-f,k)):(this._y=0,this._z=Math.atan2(h,a))):\"ZYX\"===b?(this._y=Math.asin(-d(q,\n-1,1)),.99999>Math.abs(q)?(this._x=Math.atan2(l,e),this._z=Math.atan2(h,a)):(this._x=0,this._z=Math.atan2(-f,k))):\"YZX\"===b?(this._z=Math.asin(d(h,-1,1)),.99999>Math.abs(h)?(this._x=Math.atan2(-m,k),this._y=Math.atan2(-q,a)):(this._x=0,this._y=Math.atan2(g,e))):\"XZY\"===b?(this._z=Math.asin(-d(f,-1,1)),.99999>Math.abs(f)?(this._x=Math.atan2(l,k),this._y=Math.atan2(g,a)):(this._x=Math.atan2(-m,e),this._y=0)):console.warn(\"THREE.Euler: .setFromRotationMatrix() given unsupported order: \"+b);this._order=\nb;if(!1!==c)this.onChangeCallback();return this},setFromQuaternion:function(){var a=new K;return function(b,c,d){a.makeRotationFromQuaternion(b);return this.setFromRotationMatrix(a,c,d)}}(),setFromVector3:function(a,b){return this.set(a.x,a.y,a.z,b||this._order)},reorder:function(){var a=new oa;return function(b){a.setFromEuler(this);return this.setFromQuaternion(a,b)}}(),equals:function(a){return a._x===this._x&&a._y===this._y&&a._z===this._z&&a._order===this._order},fromArray:function(a){this._x=\na[0];this._y=a[1];this._z=a[2];void 0!==a[3]&&(this._order=a[3]);this.onChangeCallback();return this},toArray:function(a,b){void 0===a&&(a=[]);void 0===b&&(b=0);a[b]=this._x;a[b+1]=this._y;a[b+2]=this._z;a[b+3]=this._order;return a},toVector3:function(a){return a?a.set(this._x,this._y,this._z):new n(this._x,this._y,this._z)},onChange:function(a){this.onChangeCallback=a;return this},onChangeCallback:function(){}});Object.assign(Qd.prototype,{set:function(a){this.mask=1<<a|0},enable:function(a){this.mask=\nthis.mask|1<<a|0},toggle:function(a){this.mask^=1<<a|0},disable:function(a){this.mask&=~(1<<a|0)},test:function(a){return 0!==(this.mask&a.mask)}});var Lf=0;z.DefaultUp=new n(0,1,0);z.DefaultMatrixAutoUpdate=!0;Object.assign(z.prototype,xa.prototype,{isObject3D:!0,onBeforeRender:function(){},onAfterRender:function(){},applyMatrix:function(a){this.matrix.multiplyMatrices(a,this.matrix);this.matrix.decompose(this.position,this.quaternion,this.scale)},applyQuaternion:function(a){this.quaternion.premultiply(a);\nreturn this},setRotationFromAxisAngle:function(a,b){this.quaternion.setFromAxisAngle(a,b)},setRotationFromEuler:function(a){this.quaternion.setFromEuler(a,!0)},setRotationFromMatrix:function(a){this.quaternion.setFromRotationMatrix(a)},setRotationFromQuaternion:function(a){this.quaternion.copy(a)},rotateOnAxis:function(){var a=new oa;return function(b,c){a.setFromAxisAngle(b,c);this.quaternion.multiply(a);return this}}(),rotateX:function(){var a=new n(1,0,0);return function(b){return this.rotateOnAxis(a,\nb)}}(),rotateY:function(){var a=new n(0,1,0);return function(b){return this.rotateOnAxis(a,b)}}(),rotateZ:function(){var a=new n(0,0,1);return function(b){return this.rotateOnAxis(a,b)}}(),translateOnAxis:function(){var a=new n;return function(b,c){a.copy(b).applyQuaternion(this.quaternion);this.position.add(a.multiplyScalar(c));return this}}(),translateX:function(){var a=new n(1,0,0);return function(b){return this.translateOnAxis(a,b)}}(),translateY:function(){var a=new n(0,1,0);return function(b){return this.translateOnAxis(a,\nb)}}(),translateZ:function(){var a=new n(0,0,1);return function(b){return this.translateOnAxis(a,b)}}(),localToWorld:function(a){return a.applyMatrix4(this.matrixWorld)},worldToLocal:function(){var a=new K;return function(b){return b.applyMatrix4(a.getInverse(this.matrixWorld))}}(),lookAt:function(){var a=new K;return function(b){this.isCamera?a.lookAt(this.position,b,this.up):a.lookAt(b,this.position,this.up);this.quaternion.setFromRotationMatrix(a)}}(),add:function(a){if(1<arguments.length){for(var b=\n0;b<arguments.length;b++)this.add(arguments[b]);return this}if(a===this)return console.error(\"THREE.Object3D.add: object can't be added as a child of itself.\",a),this;a&&a.isObject3D?(null!==a.parent&&a.parent.remove(a),a.parent=this,a.dispatchEvent({type:\"added\"}),this.children.push(a)):console.error(\"THREE.Object3D.add: object not an instance of THREE.Object3D.\",a);return this},remove:function(a){if(1<arguments.length){for(var b=0;b<arguments.length;b++)this.remove(arguments[b]);return this}b=this.children.indexOf(a);\n-1!==b&&(a.parent=null,a.dispatchEvent({type:\"removed\"}),this.children.splice(b,1));return this},getObjectById:function(a){return this.getObjectByProperty(\"id\",a)},getObjectByName:function(a){return this.getObjectByProperty(\"name\",a)},getObjectByProperty:function(a,b){if(this[a]===b)return this;for(var c=0,d=this.children.length;c<d;c++){var e=this.children[c].getObjectByProperty(a,b);if(void 0!==e)return e}},getWorldPosition:function(a){a=a||new n;this.updateMatrixWorld(!0);return a.setFromMatrixPosition(this.matrixWorld)},\ngetWorldQuaternion:function(){var a=new n,b=new n;return function(c){c=c||new oa;this.updateMatrixWorld(!0);this.matrixWorld.decompose(a,c,b);return c}}(),getWorldRotation:function(){var a=new oa;return function(b){b=b||new ab;this.getWorldQuaternion(a);return b.setFromQuaternion(a,this.rotation.order,!1)}}(),getWorldScale:function(){var a=new n,b=new oa;return function(c){c=c||new n;this.updateMatrixWorld(!0);this.matrixWorld.decompose(a,b,c);return c}}(),getWorldDirection:function(){var a=new oa;\nreturn function(b){b=b||new n;this.getWorldQuaternion(a);return b.set(0,0,1).applyQuaternion(a)}}(),raycast:function(){},traverse:function(a){a(this);for(var b=this.children,c=0,d=b.length;c<d;c++)b[c].traverse(a)},traverseVisible:function(a){if(!1!==this.visible){a(this);for(var b=this.children,c=0,d=b.length;c<d;c++)b[c].traverseVisible(a)}},traverseAncestors:function(a){var b=this.parent;null!==b&&(a(b),b.traverseAncestors(a))},updateMatrix:function(){this.matrix.compose(this.position,this.quaternion,\nthis.scale);this.matrixWorldNeedsUpdate=!0},updateMatrixWorld:function(a){this.matrixAutoUpdate&&this.updateMatrix();if(this.matrixWorldNeedsUpdate||a)null===this.parent?this.matrixWorld.copy(this.matrix):this.matrixWorld.multiplyMatrices(this.parent.matrixWorld,this.matrix),this.matrixWorldNeedsUpdate=!1,a=!0;for(var b=this.children,c=0,d=b.length;c<d;c++)b[c].updateMatrixWorld(a)},toJSON:function(a){function b(b,c){void 0===b[c.uuid]&&(b[c.uuid]=c.toJSON(a));return c.uuid}function c(a){var b=[],\nc;for(c in a){var d=a[c];delete d.metadata;b.push(d)}return b}var d=void 0===a||\"\"===a,e={};d&&(a={geometries:{},materials:{},textures:{},images:{}},e.metadata={version:4.5,type:\"Object\",generator:\"Object3D.toJSON\"});var f={};f.uuid=this.uuid;f.type=this.type;\"\"!==this.name&&(f.name=this.name);\"{}\"!==JSON.stringify(this.userData)&&(f.userData=this.userData);!0===this.castShadow&&(f.castShadow=!0);!0===this.receiveShadow&&(f.receiveShadow=!0);!1===this.visible&&(f.visible=!1);f.matrix=this.matrix.toArray();\nvoid 0!==this.geometry&&(f.geometry=b(a.geometries,this.geometry));if(void 0!==this.material)if(Array.isArray(this.material)){for(var g=[],h=0,k=this.material.length;h<k;h++)g.push(b(a.materials,this.material[h]));f.material=g}else f.material=b(a.materials,this.material);if(0<this.children.length)for(f.children=[],h=0;h<this.children.length;h++)f.children.push(this.children[h].toJSON(a).object);d&&(d=c(a.geometries),g=c(a.materials),h=c(a.textures),k=c(a.images),0<d.length&&(e.geometries=d),0<g.length&&\n(e.materials=g),0<h.length&&(e.textures=h),0<k.length&&(e.images=k));e.object=f;return e},clone:function(a){return(new this.constructor).copy(this,a)},copy:function(a,b){void 0===b&&(b=!0);this.name=a.name;this.up.copy(a.up);this.position.copy(a.position);this.quaternion.copy(a.quaternion);this.scale.copy(a.scale);this.matrix.copy(a.matrix);this.matrixWorld.copy(a.matrixWorld);this.matrixAutoUpdate=a.matrixAutoUpdate;this.matrixWorldNeedsUpdate=a.matrixWorldNeedsUpdate;this.layers.mask=a.layers.mask;\nthis.visible=a.visible;this.castShadow=a.castShadow;this.receiveShadow=a.receiveShadow;this.frustumCulled=a.frustumCulled;this.renderOrder=a.renderOrder;this.userData=JSON.parse(JSON.stringify(a.userData));if(!0===b)for(var c=0;c<a.children.length;c++)this.add(a.children[c].clone());return this}});Na.prototype=Object.assign(Object.create(z.prototype),{constructor:Na,isCamera:!0,copy:function(a,b){z.prototype.copy.call(this,a,b);this.matrixWorldInverse.copy(a.matrixWorldInverse);this.projectionMatrix.copy(a.projectionMatrix);\nreturn this},getWorldDirection:function(){var a=new oa;return function(b){b=b||new n;this.getWorldQuaternion(a);return b.set(0,0,-1).applyQuaternion(a)}}(),updateMatrixWorld:function(a){z.prototype.updateMatrixWorld.call(this,a);this.matrixWorldInverse.getInverse(this.matrixWorld)},clone:function(){return(new this.constructor).copy(this)}});Fb.prototype=Object.assign(Object.create(Na.prototype),{constructor:Fb,isOrthographicCamera:!0,copy:function(a,b){Na.prototype.copy.call(this,a,b);this.left=a.left;\nthis.right=a.right;this.top=a.top;this.bottom=a.bottom;this.near=a.near;this.far=a.far;this.zoom=a.zoom;this.view=null===a.view?null:Object.assign({},a.view);return this},setViewOffset:function(a,b,c,d,e,f){this.view={fullWidth:a,fullHeight:b,offsetX:c,offsetY:d,width:e,height:f};this.updateProjectionMatrix()},clearViewOffset:function(){this.view=null;this.updateProjectionMatrix()},updateProjectionMatrix:function(){var a=(this.right-this.left)/(2*this.zoom),b=(this.top-this.bottom)/(2*this.zoom),\nc=(this.right+this.left)/2,d=(this.top+this.bottom)/2,e=c-a,c=c+a,a=d+b,b=d-b;if(null!==this.view)var c=this.zoom/(this.view.width/this.view.fullWidth),b=this.zoom/(this.view.height/this.view.fullHeight),f=(this.right-this.left)/this.view.width,d=(this.top-this.bottom)/this.view.height,e=e+this.view.offsetX/c*f,c=e+this.view.width/c*f,a=a-this.view.offsetY/b*d,b=a-this.view.height/b*d;this.projectionMatrix.makeOrthographic(e,c,a,b,this.near,this.far)},toJSON:function(a){a=z.prototype.toJSON.call(this,\na);a.object.zoom=this.zoom;a.object.left=this.left;a.object.right=this.right;a.object.top=this.top;a.object.bottom=this.bottom;a.object.near=this.near;a.object.far=this.far;null!==this.view&&(a.object.view=Object.assign({},this.view));return a}});qa.prototype=Object.assign(Object.create(Na.prototype),{constructor:qa,isPerspectiveCamera:!0,copy:function(a,b){Na.prototype.copy.call(this,a,b);this.fov=a.fov;this.zoom=a.zoom;this.near=a.near;this.far=a.far;this.focus=a.focus;this.aspect=a.aspect;this.view=\nnull===a.view?null:Object.assign({},a.view);this.filmGauge=a.filmGauge;this.filmOffset=a.filmOffset;return this},setFocalLength:function(a){a=.5*this.getFilmHeight()/a;this.fov=2*Y.RAD2DEG*Math.atan(a);this.updateProjectionMatrix()},getFocalLength:function(){var a=Math.tan(.5*Y.DEG2RAD*this.fov);return.5*this.getFilmHeight()/a},getEffectiveFOV:function(){return 2*Y.RAD2DEG*Math.atan(Math.tan(.5*Y.DEG2RAD*this.fov)/this.zoom)},getFilmWidth:function(){return this.filmGauge*Math.min(this.aspect,1)},\ngetFilmHeight:function(){return this.filmGauge/Math.max(this.aspect,1)},setViewOffset:function(a,b,c,d,e,f){this.aspect=a/b;this.view={fullWidth:a,fullHeight:b,offsetX:c,offsetY:d,width:e,height:f};this.updateProjectionMatrix()},clearViewOffset:function(){this.view=null;this.updateProjectionMatrix()},updateProjectionMatrix:function(){var a=this.near,b=a*Math.tan(.5*Y.DEG2RAD*this.fov)/this.zoom,c=2*b,d=this.aspect*c,e=-.5*d,f=this.view;if(null!==f)var g=f.fullWidth,h=f.fullHeight,e=e+f.offsetX*d/\ng,b=b-f.offsetY*c/h,d=f.width/g*d,c=f.height/h*c;f=this.filmOffset;0!==f&&(e+=a*f/this.getFilmWidth());this.projectionMatrix.makePerspective(e,e+d,b,b-c,a,this.far)},toJSON:function(a){a=z.prototype.toJSON.call(this,a);a.object.fov=this.fov;a.object.zoom=this.zoom;a.object.near=this.near;a.object.far=this.far;a.object.focus=this.focus;a.object.aspect=this.aspect;null!==this.view&&(a.object.view=Object.assign({},this.view));a.object.filmGauge=this.filmGauge;a.object.filmOffset=this.filmOffset;return a}});\nObject.assign(Sa.prototype,{clone:function(){return(new this.constructor).copy(this)},copy:function(a){this.a=a.a;this.b=a.b;this.c=a.c;this.normal.copy(a.normal);this.color.copy(a.color);this.materialIndex=a.materialIndex;for(var b=0,c=a.vertexNormals.length;b<c;b++)this.vertexNormals[b]=a.vertexNormals[b].clone();b=0;for(c=a.vertexColors.length;b<c;b++)this.vertexColors[b]=a.vertexColors[b].clone();return this}});var Rd=0;Object.assign(J.prototype,xa.prototype,{isGeometry:!0,applyMatrix:function(a){for(var b=\n(new Ba).getNormalMatrix(a),c=0,d=this.vertices.length;c<d;c++)this.vertices[c].applyMatrix4(a);c=0;for(d=this.faces.length;c<d;c++){a=this.faces[c];a.normal.applyMatrix3(b).normalize();for(var e=0,f=a.vertexNormals.length;e<f;e++)a.vertexNormals[e].applyMatrix3(b).normalize()}null!==this.boundingBox&&this.computeBoundingBox();null!==this.boundingSphere&&this.computeBoundingSphere();this.normalsNeedUpdate=this.verticesNeedUpdate=!0;return this},rotateX:function(){var a=new K;return function(b){a.makeRotationX(b);\nthis.applyMatrix(a);return this}}(),rotateY:function(){var a=new K;return function(b){a.makeRotationY(b);this.applyMatrix(a);return this}}(),rotateZ:function(){var a=new K;return function(b){a.makeRotationZ(b);this.applyMatrix(a);return this}}(),translate:function(){var a=new K;return function(b,c,d){a.makeTranslation(b,c,d);this.applyMatrix(a);return this}}(),scale:function(){var a=new K;return function(b,c,d){a.makeScale(b,c,d);this.applyMatrix(a);return this}}(),lookAt:function(){var a=new z;return function(b){a.lookAt(b);\na.updateMatrix();this.applyMatrix(a.matrix)}}(),fromBufferGeometry:function(a){function b(a,b,d,e){var f=void 0!==g?[q[a].clone(),q[b].clone(),q[d].clone()]:[],r=void 0!==h?[c.colors[a].clone(),c.colors[b].clone(),c.colors[d].clone()]:[];e=new Sa(a,b,d,f,r,e);c.faces.push(e);void 0!==k&&c.faceVertexUvs[0].push([l[a].clone(),l[b].clone(),l[d].clone()]);void 0!==m&&c.faceVertexUvs[1].push([p[a].clone(),p[b].clone(),p[d].clone()])}var c=this,d=null!==a.index?a.index.array:void 0,e=a.attributes,f=e.position.array,\ng=void 0!==e.normal?e.normal.array:void 0,h=void 0!==e.color?e.color.array:void 0,k=void 0!==e.uv?e.uv.array:void 0,m=void 0!==e.uv2?e.uv2.array:void 0;void 0!==m&&(this.faceVertexUvs[1]=[]);for(var q=[],l=[],p=[],r=e=0;e<f.length;e+=3,r+=2)c.vertices.push(new n(f[e],f[e+1],f[e+2])),void 0!==g&&q.push(new n(g[e],g[e+1],g[e+2])),void 0!==h&&c.colors.push(new G(h[e],h[e+1],h[e+2])),void 0!==k&&l.push(new C(k[r],k[r+1])),void 0!==m&&p.push(new C(m[r],m[r+1]));var ca=a.groups;if(0<ca.length)for(e=0;e<\nca.length;e++)for(var f=ca[e],t=f.start,y=f.count,r=t,t=t+y;r<t;r+=3)void 0!==d?b(d[r],d[r+1],d[r+2],f.materialIndex):b(r,r+1,r+2,f.materialIndex);else if(void 0!==d)for(e=0;e<d.length;e+=3)b(d[e],d[e+1],d[e+2]);else for(e=0;e<f.length/3;e+=3)b(e,e+1,e+2);this.computeFaceNormals();null!==a.boundingBox&&(this.boundingBox=a.boundingBox.clone());null!==a.boundingSphere&&(this.boundingSphere=a.boundingSphere.clone());return this},center:function(){this.computeBoundingBox();var a=this.boundingBox.getCenter().negate();\nthis.translate(a.x,a.y,a.z);return a},normalize:function(){this.computeBoundingSphere();var a=this.boundingSphere.center,b=this.boundingSphere.radius,b=0===b?1:1/b,c=new K;c.set(b,0,0,-b*a.x,0,b,0,-b*a.y,0,0,b,-b*a.z,0,0,0,1);this.applyMatrix(c);return this},computeFaceNormals:function(){for(var a=new n,b=new n,c=0,d=this.faces.length;c<d;c++){var e=this.faces[c],f=this.vertices[e.a],g=this.vertices[e.b];a.subVectors(this.vertices[e.c],g);b.subVectors(f,g);a.cross(b);a.normalize();e.normal.copy(a)}},\ncomputeVertexNormals:function(a){void 0===a&&(a=!0);var b,c,d;d=Array(this.vertices.length);b=0;for(c=this.vertices.length;b<c;b++)d[b]=new n;if(a){var e,f,g,h=new n,k=new n;a=0;for(b=this.faces.length;a<b;a++)c=this.faces[a],e=this.vertices[c.a],f=this.vertices[c.b],g=this.vertices[c.c],h.subVectors(g,f),k.subVectors(e,f),h.cross(k),d[c.a].add(h),d[c.b].add(h),d[c.c].add(h)}else for(this.computeFaceNormals(),a=0,b=this.faces.length;a<b;a++)c=this.faces[a],d[c.a].add(c.normal),d[c.b].add(c.normal),\nd[c.c].add(c.normal);b=0;for(c=this.vertices.length;b<c;b++)d[b].normalize();a=0;for(b=this.faces.length;a<b;a++)c=this.faces[a],e=c.vertexNormals,3===e.length?(e[0].copy(d[c.a]),e[1].copy(d[c.b]),e[2].copy(d[c.c])):(e[0]=d[c.a].clone(),e[1]=d[c.b].clone(),e[2]=d[c.c].clone());0<this.faces.length&&(this.normalsNeedUpdate=!0)},computeFlatVertexNormals:function(){var a,b,c;this.computeFaceNormals();a=0;for(b=this.faces.length;a<b;a++){c=this.faces[a];var d=c.vertexNormals;3===d.length?(d[0].copy(c.normal),\nd[1].copy(c.normal),d[2].copy(c.normal)):(d[0]=c.normal.clone(),d[1]=c.normal.clone(),d[2]=c.normal.clone())}0<this.faces.length&&(this.normalsNeedUpdate=!0)},computeMorphNormals:function(){var a,b,c,d,e;c=0;for(d=this.faces.length;c<d;c++)for(e=this.faces[c],e.__originalFaceNormal?e.__originalFaceNormal.copy(e.normal):e.__originalFaceNormal=e.normal.clone(),e.__originalVertexNormals||(e.__originalVertexNormals=[]),a=0,b=e.vertexNormals.length;a<b;a++)e.__originalVertexNormals[a]?e.__originalVertexNormals[a].copy(e.vertexNormals[a]):\ne.__originalVertexNormals[a]=e.vertexNormals[a].clone();var f=new J;f.faces=this.faces;a=0;for(b=this.morphTargets.length;a<b;a++){if(!this.morphNormals[a]){this.morphNormals[a]={};this.morphNormals[a].faceNormals=[];this.morphNormals[a].vertexNormals=[];e=this.morphNormals[a].faceNormals;var g=this.morphNormals[a].vertexNormals,h,k;c=0;for(d=this.faces.length;c<d;c++)h=new n,k={a:new n,b:new n,c:new n},e.push(h),g.push(k)}g=this.morphNormals[a];f.vertices=this.morphTargets[a].vertices;f.computeFaceNormals();\nf.computeVertexNormals();c=0;for(d=this.faces.length;c<d;c++)e=this.faces[c],h=g.faceNormals[c],k=g.vertexNormals[c],h.copy(e.normal),k.a.copy(e.vertexNormals[0]),k.b.copy(e.vertexNormals[1]),k.c.copy(e.vertexNormals[2])}c=0;for(d=this.faces.length;c<d;c++)e=this.faces[c],e.normal=e.__originalFaceNormal,e.vertexNormals=e.__originalVertexNormals},computeLineDistances:function(){for(var a=0,b=this.vertices,c=0,d=b.length;c<d;c++)0<c&&(a+=b[c].distanceTo(b[c-1])),this.lineDistances[c]=a},computeBoundingBox:function(){null===\nthis.boundingBox&&(this.boundingBox=new Ra);this.boundingBox.setFromPoints(this.vertices)},computeBoundingSphere:function(){null===this.boundingSphere&&(this.boundingSphere=new Ea);this.boundingSphere.setFromPoints(this.vertices)},merge:function(a,b,c){if(a&&a.isGeometry){var d,e=this.vertices.length,f=this.vertices,g=a.vertices,h=this.faces,k=a.faces,m=this.faceVertexUvs[0],q=a.faceVertexUvs[0],l=this.colors,p=a.colors;void 0===c&&(c=0);void 0!==b&&(d=(new Ba).getNormalMatrix(b));a=0;for(var r=g.length;a<\nr;a++){var n=g[a].clone();void 0!==b&&n.applyMatrix4(b);f.push(n)}a=0;for(r=p.length;a<r;a++)l.push(p[a].clone());a=0;for(r=k.length;a<r;a++){var g=k[a],t=g.vertexNormals,p=g.vertexColors,l=new Sa(g.a+e,g.b+e,g.c+e);l.normal.copy(g.normal);void 0!==d&&l.normal.applyMatrix3(d).normalize();b=0;for(f=t.length;b<f;b++)n=t[b].clone(),void 0!==d&&n.applyMatrix3(d).normalize(),l.vertexNormals.push(n);l.color.copy(g.color);b=0;for(f=p.length;b<f;b++)n=p[b],l.vertexColors.push(n.clone());l.materialIndex=g.materialIndex+\nc;h.push(l)}a=0;for(r=q.length;a<r;a++)if(c=q[a],d=[],void 0!==c){b=0;for(f=c.length;b<f;b++)d.push(c[b].clone());m.push(d)}}else console.error(\"THREE.Geometry.merge(): geometry not an instance of THREE.Geometry.\",a)},mergeMesh:function(a){a&&a.isMesh?(a.matrixAutoUpdate&&a.updateMatrix(),this.merge(a.geometry,a.matrix)):console.error(\"THREE.Geometry.mergeMesh(): mesh not an instance of THREE.Mesh.\",a)},mergeVertices:function(){var a={},b=[],c=[],d,e=Math.pow(10,4),f,g;f=0;for(g=this.vertices.length;f<\ng;f++)d=this.vertices[f],d=Math.round(d.x*e)+\"_\"+Math.round(d.y*e)+\"_\"+Math.round(d.z*e),void 0===a[d]?(a[d]=f,b.push(this.vertices[f]),c[f]=b.length-1):c[f]=c[a[d]];a=[];f=0;for(g=this.faces.length;f<g;f++)for(e=this.faces[f],e.a=c[e.a],e.b=c[e.b],e.c=c[e.c],e=[e.a,e.b,e.c],d=0;3>d;d++)if(e[d]===e[(d+1)%3]){a.push(f);break}for(f=a.length-1;0<=f;f--)for(e=a[f],this.faces.splice(e,1),c=0,g=this.faceVertexUvs.length;c<g;c++)this.faceVertexUvs[c].splice(e,1);f=this.vertices.length-b.length;this.vertices=\nb;return f},sortFacesByMaterialIndex:function(){for(var a=this.faces,b=a.length,c=0;c<b;c++)a[c]._id=c;a.sort(function(a,b){return a.materialIndex-b.materialIndex});var d=this.faceVertexUvs[0],e=this.faceVertexUvs[1],f,g;d&&d.length===b&&(f=[]);e&&e.length===b&&(g=[]);for(c=0;c<b;c++){var h=a[c]._id;f&&f.push(d[h]);g&&g.push(e[h])}f&&(this.faceVertexUvs[0]=f);g&&(this.faceVertexUvs[1]=g)},toJSON:function(){function a(a,b,c){return c?a|1<<b:a&~(1<<b)}function b(a){var b=a.x.toString()+a.y.toString()+\na.z.toString();if(void 0!==m[b])return m[b];m[b]=k.length/3;k.push(a.x,a.y,a.z);return m[b]}function c(a){var b=a.r.toString()+a.g.toString()+a.b.toString();if(void 0!==l[b])return l[b];l[b]=q.length;q.push(a.getHex());return l[b]}function d(a){var b=a.x.toString()+a.y.toString();if(void 0!==r[b])return r[b];r[b]=p.length/2;p.push(a.x,a.y);return r[b]}var e={metadata:{version:4.5,type:\"Geometry\",generator:\"Geometry.toJSON\"}};e.uuid=this.uuid;e.type=this.type;\"\"!==this.name&&(e.name=this.name);if(void 0!==\nthis.parameters){var f=this.parameters,g;for(g in f)void 0!==f[g]&&(e[g]=f[g]);return e}f=[];for(g=0;g<this.vertices.length;g++){var h=this.vertices[g];f.push(h.x,h.y,h.z)}var h=[],k=[],m={},q=[],l={},p=[],r={};for(g=0;g<this.faces.length;g++){var n=this.faces[g],t=void 0!==this.faceVertexUvs[0][g],y=0<n.normal.length(),x=0<n.vertexNormals.length,u=1!==n.color.r||1!==n.color.g||1!==n.color.b,H=0<n.vertexColors.length,w=0,w=a(w,0,0),w=a(w,1,!0),w=a(w,2,!1),w=a(w,3,t),w=a(w,4,y),w=a(w,5,x),w=a(w,6,\nu),w=a(w,7,H);h.push(w);h.push(n.a,n.b,n.c);h.push(n.materialIndex);t&&(t=this.faceVertexUvs[0][g],h.push(d(t[0]),d(t[1]),d(t[2])));y&&h.push(b(n.normal));x&&(y=n.vertexNormals,h.push(b(y[0]),b(y[1]),b(y[2])));u&&h.push(c(n.color));H&&(n=n.vertexColors,h.push(c(n[0]),c(n[1]),c(n[2])))}e.data={};e.data.vertices=f;e.data.normals=k;0<q.length&&(e.data.colors=q);0<p.length&&(e.data.uvs=[p]);e.data.faces=h;return e},clone:function(){return(new J).copy(this)},copy:function(a){var b,c,d,e,f,g;this.vertices=\n[];this.colors=[];this.faces=[];this.faceVertexUvs=[[]];this.morphTargets=[];this.morphNormals=[];this.skinWeights=[];this.skinIndices=[];this.lineDistances=[];this.boundingSphere=this.boundingBox=null;this.name=a.name;d=a.vertices;b=0;for(c=d.length;b<c;b++)this.vertices.push(d[b].clone());d=a.colors;b=0;for(c=d.length;b<c;b++)this.colors.push(d[b].clone());d=a.faces;b=0;for(c=d.length;b<c;b++)this.faces.push(d[b].clone());b=0;for(c=a.faceVertexUvs.length;b<c;b++){var h=a.faceVertexUvs[b];void 0===\nthis.faceVertexUvs[b]&&(this.faceVertexUvs[b]=[]);d=0;for(e=h.length;d<e;d++){var k=h[d],m=[];f=0;for(g=k.length;f<g;f++)m.push(k[f].clone());this.faceVertexUvs[b].push(m)}}f=a.morphTargets;b=0;for(c=f.length;b<c;b++){g={};g.name=f[b].name;if(void 0!==f[b].vertices)for(g.vertices=[],d=0,e=f[b].vertices.length;d<e;d++)g.vertices.push(f[b].vertices[d].clone());if(void 0!==f[b].normals)for(g.normals=[],d=0,e=f[b].normals.length;d<e;d++)g.normals.push(f[b].normals[d].clone());this.morphTargets.push(g)}f=\na.morphNormals;b=0;for(c=f.length;b<c;b++){g={};if(void 0!==f[b].vertexNormals)for(g.vertexNormals=[],d=0,e=f[b].vertexNormals.length;d<e;d++)h=f[b].vertexNormals[d],k={},k.a=h.a.clone(),k.b=h.b.clone(),k.c=h.c.clone(),g.vertexNormals.push(k);if(void 0!==f[b].faceNormals)for(g.faceNormals=[],d=0,e=f[b].faceNormals.length;d<e;d++)g.faceNormals.push(f[b].faceNormals[d].clone());this.morphNormals.push(g)}d=a.skinWeights;b=0;for(c=d.length;b<c;b++)this.skinWeights.push(d[b].clone());d=a.skinIndices;b=\n0;for(c=d.length;b<c;b++)this.skinIndices.push(d[b].clone());d=a.lineDistances;b=0;for(c=d.length;b<c;b++)this.lineDistances.push(d[b]);b=a.boundingBox;null!==b&&(this.boundingBox=b.clone());b=a.boundingSphere;null!==b&&(this.boundingSphere=b.clone());this.elementsNeedUpdate=a.elementsNeedUpdate;this.verticesNeedUpdate=a.verticesNeedUpdate;this.uvsNeedUpdate=a.uvsNeedUpdate;this.normalsNeedUpdate=a.normalsNeedUpdate;this.colorsNeedUpdate=a.colorsNeedUpdate;this.lineDistancesNeedUpdate=a.lineDistancesNeedUpdate;\nthis.groupsNeedUpdate=a.groupsNeedUpdate;return this},dispose:function(){this.dispatchEvent({type:\"dispose\"})}});Object.defineProperty(Z.prototype,\"needsUpdate\",{set:function(a){!0===a&&this.version++}});Object.assign(Z.prototype,{isBufferAttribute:!0,setArray:function(a){if(Array.isArray(a))throw new TypeError(\"THREE.BufferAttribute: array should be a Typed Array.\");this.count=void 0!==a?a.length/this.itemSize:0;this.array=a},setDynamic:function(a){this.dynamic=a;return this},copy:function(a){this.array=\nnew a.array.constructor(a.array);this.itemSize=a.itemSize;this.count=a.count;this.normalized=a.normalized;this.dynamic=a.dynamic;return this},copyAt:function(a,b,c){a*=this.itemSize;c*=b.itemSize;for(var d=0,e=this.itemSize;d<e;d++)this.array[a+d]=b.array[c+d];return this},copyArray:function(a){this.array.set(a);return this},copyColorsArray:function(a){for(var b=this.array,c=0,d=0,e=a.length;d<e;d++){var f=a[d];void 0===f&&(console.warn(\"THREE.BufferAttribute.copyColorsArray(): color is undefined\",\nd),f=new G);b[c++]=f.r;b[c++]=f.g;b[c++]=f.b}return this},copyIndicesArray:function(a){for(var b=this.array,c=0,d=0,e=a.length;d<e;d++){var f=a[d];b[c++]=f.a;b[c++]=f.b;b[c++]=f.c}return this},copyVector2sArray:function(a){for(var b=this.array,c=0,d=0,e=a.length;d<e;d++){var f=a[d];void 0===f&&(console.warn(\"THREE.BufferAttribute.copyVector2sArray(): vector is undefined\",d),f=new C);b[c++]=f.x;b[c++]=f.y}return this},copyVector3sArray:function(a){for(var b=this.array,c=0,d=0,e=a.length;d<e;d++){var f=\na[d];void 0===f&&(console.warn(\"THREE.BufferAttribute.copyVector3sArray(): vector is undefined\",d),f=new n);b[c++]=f.x;b[c++]=f.y;b[c++]=f.z}return this},copyVector4sArray:function(a){for(var b=this.array,c=0,d=0,e=a.length;d<e;d++){var f=a[d];void 0===f&&(console.warn(\"THREE.BufferAttribute.copyVector4sArray(): vector is undefined\",d),f=new fa);b[c++]=f.x;b[c++]=f.y;b[c++]=f.z;b[c++]=f.w}return this},set:function(a,b){void 0===b&&(b=0);this.array.set(a,b);return this},getX:function(a){return this.array[a*\nthis.itemSize]},setX:function(a,b){this.array[a*this.itemSize]=b;return this},getY:function(a){return this.array[a*this.itemSize+1]},setY:function(a,b){this.array[a*this.itemSize+1]=b;return this},getZ:function(a){return this.array[a*this.itemSize+2]},setZ:function(a,b){this.array[a*this.itemSize+2]=b;return this},getW:function(a){return this.array[a*this.itemSize+3]},setW:function(a,b){this.array[a*this.itemSize+3]=b;return this},setXY:function(a,b,c){a*=this.itemSize;this.array[a+0]=b;this.array[a+\n1]=c;return this},setXYZ:function(a,b,c,d){a*=this.itemSize;this.array[a+0]=b;this.array[a+1]=c;this.array[a+2]=d;return this},setXYZW:function(a,b,c,d,e){a*=this.itemSize;this.array[a+0]=b;this.array[a+1]=c;this.array[a+2]=d;this.array[a+3]=e;return this},onUpload:function(a){this.onUploadCallback=a;return this},clone:function(){return(new this.constructor(this.array,this.itemSize)).copy(this)}});pc.prototype=Object.create(Z.prototype);pc.prototype.constructor=pc;qc.prototype=Object.create(Z.prototype);\nqc.prototype.constructor=qc;rc.prototype=Object.create(Z.prototype);rc.prototype.constructor=rc;sc.prototype=Object.create(Z.prototype);sc.prototype.constructor=sc;gb.prototype=Object.create(Z.prototype);gb.prototype.constructor=gb;tc.prototype=Object.create(Z.prototype);tc.prototype.constructor=tc;hb.prototype=Object.create(Z.prototype);hb.prototype.constructor=hb;B.prototype=Object.create(Z.prototype);B.prototype.constructor=B;uc.prototype=Object.create(Z.prototype);uc.prototype.constructor=uc;\nObject.assign(Je.prototype,{computeGroups:function(a){var b,c=[],d=void 0;a=a.faces;for(var e=0;e<a.length;e++){var f=a[e];f.materialIndex!==d&&(d=f.materialIndex,void 0!==b&&(b.count=3*e-b.start,c.push(b)),b={start:3*e,materialIndex:d})}void 0!==b&&(b.count=3*e-b.start,c.push(b));this.groups=c},fromGeometry:function(a){var b=a.faces,c=a.vertices,d=a.faceVertexUvs,e=d[0]&&0<d[0].length,f=d[1]&&0<d[1].length,g=a.morphTargets,h=g.length,k;if(0<h){k=[];for(var m=0;m<h;m++)k[m]=[];this.morphTargets.position=\nk}var q=a.morphNormals,l=q.length,p;if(0<l){p=[];for(m=0;m<l;m++)p[m]=[];this.morphTargets.normal=p}for(var r=a.skinIndices,n=a.skinWeights,t=r.length===c.length,y=n.length===c.length,m=0;m<b.length;m++){var x=b[m];this.vertices.push(c[x.a],c[x.b],c[x.c]);var u=x.vertexNormals;3===u.length?this.normals.push(u[0],u[1],u[2]):(u=x.normal,this.normals.push(u,u,u));u=x.vertexColors;3===u.length?this.colors.push(u[0],u[1],u[2]):(u=x.color,this.colors.push(u,u,u));!0===e&&(u=d[0][m],void 0!==u?this.uvs.push(u[0],\nu[1],u[2]):(console.warn(\"THREE.DirectGeometry.fromGeometry(): Undefined vertexUv \",m),this.uvs.push(new C,new C,new C)));!0===f&&(u=d[1][m],void 0!==u?this.uvs2.push(u[0],u[1],u[2]):(console.warn(\"THREE.DirectGeometry.fromGeometry(): Undefined vertexUv2 \",m),this.uvs2.push(new C,new C,new C)));for(u=0;u<h;u++){var H=g[u].vertices;k[u].push(H[x.a],H[x.b],H[x.c])}for(u=0;u<l;u++)H=q[u].vertexNormals[m],p[u].push(H.a,H.b,H.c);t&&this.skinIndices.push(r[x.a],r[x.b],r[x.c]);y&&this.skinWeights.push(n[x.a],\nn[x.b],n[x.c])}this.computeGroups(a);this.verticesNeedUpdate=a.verticesNeedUpdate;this.normalsNeedUpdate=a.normalsNeedUpdate;this.colorsNeedUpdate=a.colorsNeedUpdate;this.uvsNeedUpdate=a.uvsNeedUpdate;this.groupsNeedUpdate=a.groupsNeedUpdate;return this}});E.MaxIndex=65535;Object.assign(E.prototype,xa.prototype,{isBufferGeometry:!0,getIndex:function(){return this.index},setIndex:function(a){Array.isArray(a)?this.index=new (65535<Sd(a)?hb:gb)(a,1):this.index=a},addAttribute:function(a,b,c){if(b&&b.isBufferAttribute||\nb&&b.isInterleavedBufferAttribute)if(\"index\"===a)console.warn(\"THREE.BufferGeometry.addAttribute: Use .setIndex() for index attribute.\"),this.setIndex(b);else return this.attributes[a]=b,this;else console.warn(\"THREE.BufferGeometry: .addAttribute() now expects ( name, attribute ).\"),this.addAttribute(a,new Z(b,c))},getAttribute:function(a){return this.attributes[a]},removeAttribute:function(a){delete this.attributes[a];return this},addGroup:function(a,b,c){this.groups.push({start:a,count:b,materialIndex:void 0!==\nc?c:0})},clearGroups:function(){this.groups=[]},setDrawRange:function(a,b){this.drawRange.start=a;this.drawRange.count=b},applyMatrix:function(a){var b=this.attributes.position;void 0!==b&&(a.applyToBufferAttribute(b),b.needsUpdate=!0);b=this.attributes.normal;void 0!==b&&((new Ba).getNormalMatrix(a).applyToBufferAttribute(b),b.needsUpdate=!0);null!==this.boundingBox&&this.computeBoundingBox();null!==this.boundingSphere&&this.computeBoundingSphere();return this},rotateX:function(){var a=new K;return function(b){a.makeRotationX(b);\nthis.applyMatrix(a);return this}}(),rotateY:function(){var a=new K;return function(b){a.makeRotationY(b);this.applyMatrix(a);return this}}(),rotateZ:function(){var a=new K;return function(b){a.makeRotationZ(b);this.applyMatrix(a);return this}}(),translate:function(){var a=new K;return function(b,c,d){a.makeTranslation(b,c,d);this.applyMatrix(a);return this}}(),scale:function(){var a=new K;return function(b,c,d){a.makeScale(b,c,d);this.applyMatrix(a);return this}}(),lookAt:function(){var a=new z;return function(b){a.lookAt(b);\na.updateMatrix();this.applyMatrix(a.matrix)}}(),center:function(){this.computeBoundingBox();var a=this.boundingBox.getCenter().negate();this.translate(a.x,a.y,a.z);return a},setFromObject:function(a){var b=a.geometry;if(a.isPoints||a.isLine){a=new B(3*b.vertices.length,3);var c=new B(3*b.colors.length,3);this.addAttribute(\"position\",a.copyVector3sArray(b.vertices));this.addAttribute(\"color\",c.copyColorsArray(b.colors));b.lineDistances&&b.lineDistances.length===b.vertices.length&&(a=new B(b.lineDistances.length,\n1),this.addAttribute(\"lineDistance\",a.copyArray(b.lineDistances)));null!==b.boundingSphere&&(this.boundingSphere=b.boundingSphere.clone());null!==b.boundingBox&&(this.boundingBox=b.boundingBox.clone())}else a.isMesh&&b&&b.isGeometry&&this.fromGeometry(b);return this},updateFromObject:function(a){var b=a.geometry;if(a.isMesh){var c=b.__directGeometry;!0===b.elementsNeedUpdate&&(c=void 0,b.elementsNeedUpdate=!1);if(void 0===c)return this.fromGeometry(b);c.verticesNeedUpdate=b.verticesNeedUpdate;c.normalsNeedUpdate=\nb.normalsNeedUpdate;c.colorsNeedUpdate=b.colorsNeedUpdate;c.uvsNeedUpdate=b.uvsNeedUpdate;c.groupsNeedUpdate=b.groupsNeedUpdate;b.verticesNeedUpdate=!1;b.normalsNeedUpdate=!1;b.colorsNeedUpdate=!1;b.uvsNeedUpdate=!1;b.groupsNeedUpdate=!1;b=c}!0===b.verticesNeedUpdate&&(c=this.attributes.position,void 0!==c&&(c.copyVector3sArray(b.vertices),c.needsUpdate=!0),b.verticesNeedUpdate=!1);!0===b.normalsNeedUpdate&&(c=this.attributes.normal,void 0!==c&&(c.copyVector3sArray(b.normals),c.needsUpdate=!0),b.normalsNeedUpdate=\n!1);!0===b.colorsNeedUpdate&&(c=this.attributes.color,void 0!==c&&(c.copyColorsArray(b.colors),c.needsUpdate=!0),b.colorsNeedUpdate=!1);b.uvsNeedUpdate&&(c=this.attributes.uv,void 0!==c&&(c.copyVector2sArray(b.uvs),c.needsUpdate=!0),b.uvsNeedUpdate=!1);b.lineDistancesNeedUpdate&&(c=this.attributes.lineDistance,void 0!==c&&(c.copyArray(b.lineDistances),c.needsUpdate=!0),b.lineDistancesNeedUpdate=!1);b.groupsNeedUpdate&&(b.computeGroups(a.geometry),this.groups=b.groups,b.groupsNeedUpdate=!1);return this},\nfromGeometry:function(a){a.__directGeometry=(new Je).fromGeometry(a);return this.fromDirectGeometry(a.__directGeometry)},fromDirectGeometry:function(a){var b=new Float32Array(3*a.vertices.length);this.addAttribute(\"position\",(new Z(b,3)).copyVector3sArray(a.vertices));0<a.normals.length&&(b=new Float32Array(3*a.normals.length),this.addAttribute(\"normal\",(new Z(b,3)).copyVector3sArray(a.normals)));0<a.colors.length&&(b=new Float32Array(3*a.colors.length),this.addAttribute(\"color\",(new Z(b,3)).copyColorsArray(a.colors)));\n0<a.uvs.length&&(b=new Float32Array(2*a.uvs.length),this.addAttribute(\"uv\",(new Z(b,2)).copyVector2sArray(a.uvs)));0<a.uvs2.length&&(b=new Float32Array(2*a.uvs2.length),this.addAttribute(\"uv2\",(new Z(b,2)).copyVector2sArray(a.uvs2)));0<a.indices.length&&(b=new (65535<Sd(a.indices)?Uint32Array:Uint16Array)(3*a.indices.length),this.setIndex((new Z(b,1)).copyIndicesArray(a.indices)));this.groups=a.groups;for(var c in a.morphTargets){for(var b=[],d=a.morphTargets[c],e=0,f=d.length;e<f;e++){var g=d[e],\nh=new B(3*g.length,3);b.push(h.copyVector3sArray(g))}this.morphAttributes[c]=b}0<a.skinIndices.length&&(c=new B(4*a.skinIndices.length,4),this.addAttribute(\"skinIndex\",c.copyVector4sArray(a.skinIndices)));0<a.skinWeights.length&&(c=new B(4*a.skinWeights.length,4),this.addAttribute(\"skinWeight\",c.copyVector4sArray(a.skinWeights)));null!==a.boundingSphere&&(this.boundingSphere=a.boundingSphere.clone());null!==a.boundingBox&&(this.boundingBox=a.boundingBox.clone());return this},computeBoundingBox:function(){null===\nthis.boundingBox&&(this.boundingBox=new Ra);var a=this.attributes.position;void 0!==a?this.boundingBox.setFromBufferAttribute(a):this.boundingBox.makeEmpty();(isNaN(this.boundingBox.min.x)||isNaN(this.boundingBox.min.y)||isNaN(this.boundingBox.min.z))&&console.error('THREE.BufferGeometry.computeBoundingBox: Computed min/max have NaN values. The \"position\" attribute is likely to have NaN values.',this)},computeBoundingSphere:function(){var a=new Ra,b=new n;return function(){null===this.boundingSphere&&\n(this.boundingSphere=new Ea);var c=this.attributes.position;if(c){var d=this.boundingSphere.center;a.setFromBufferAttribute(c);a.getCenter(d);for(var e=0,f=0,g=c.count;f<g;f++)b.x=c.getX(f),b.y=c.getY(f),b.z=c.getZ(f),e=Math.max(e,d.distanceToSquared(b));this.boundingSphere.radius=Math.sqrt(e);isNaN(this.boundingSphere.radius)&&console.error('THREE.BufferGeometry.computeBoundingSphere(): Computed radius is NaN. The \"position\" attribute is likely to have NaN values.',this)}}}(),computeFaceNormals:function(){},\ncomputeVertexNormals:function(){var a=this.index,b=this.attributes,c=this.groups;if(b.position){var d=b.position.array;if(void 0===b.normal)this.addAttribute(\"normal\",new Z(new Float32Array(d.length),3));else for(var e=b.normal.array,f=0,g=e.length;f<g;f++)e[f]=0;var e=b.normal.array,h,k,m,q=new n,l=new n,p=new n,r=new n,ca=new n;if(a){a=a.array;0===c.length&&this.addGroup(0,a.length);for(var t=0,y=c.length;t<y;++t)for(f=c[t],g=f.start,h=f.count,f=g,g+=h;f<g;f+=3)h=3*a[f+0],k=3*a[f+1],m=3*a[f+2],\nq.fromArray(d,h),l.fromArray(d,k),p.fromArray(d,m),r.subVectors(p,l),ca.subVectors(q,l),r.cross(ca),e[h]+=r.x,e[h+1]+=r.y,e[h+2]+=r.z,e[k]+=r.x,e[k+1]+=r.y,e[k+2]+=r.z,e[m]+=r.x,e[m+1]+=r.y,e[m+2]+=r.z}else for(f=0,g=d.length;f<g;f+=9)q.fromArray(d,f),l.fromArray(d,f+3),p.fromArray(d,f+6),r.subVectors(p,l),ca.subVectors(q,l),r.cross(ca),e[f]=r.x,e[f+1]=r.y,e[f+2]=r.z,e[f+3]=r.x,e[f+4]=r.y,e[f+5]=r.z,e[f+6]=r.x,e[f+7]=r.y,e[f+8]=r.z;this.normalizeNormals();b.normal.needsUpdate=!0}},merge:function(a,\nb){if(a&&a.isBufferGeometry){void 0===b&&(b=0);var c=this.attributes,d;for(d in c)if(void 0!==a.attributes[d])for(var e=c[d].array,f=a.attributes[d],g=f.array,h=0,f=f.itemSize*b;h<g.length;h++,f++)e[f]=g[h];return this}console.error(\"THREE.BufferGeometry.merge(): geometry not an instance of THREE.BufferGeometry.\",a)},normalizeNormals:function(){for(var a=this.attributes.normal,b,c,d,e,f=0,g=a.count;f<g;f++)b=a.getX(f),c=a.getY(f),d=a.getZ(f),e=1/Math.sqrt(b*b+c*c+d*d),a.setXYZ(f,b*e,c*e,d*e)},toNonIndexed:function(){if(null===\nthis.index)return console.warn(\"THREE.BufferGeometry.toNonIndexed(): Geometry is already non-indexed.\"),this;var a=new E,b=this.index.array,c=this.attributes,d;for(d in c){for(var e=c[d],f=e.array,e=e.itemSize,g=new f.constructor(b.length*e),h,k=0,m=0,q=b.length;m<q;m++){h=b[m]*e;for(var l=0;l<e;l++)g[k++]=f[h++]}a.addAttribute(d,new Z(g,e))}return a},toJSON:function(){var a={metadata:{version:4.5,type:\"BufferGeometry\",generator:\"BufferGeometry.toJSON\"}};a.uuid=this.uuid;a.type=this.type;\"\"!==this.name&&\n(a.name=this.name);if(void 0!==this.parameters){var b=this.parameters,c;for(c in b)void 0!==b[c]&&(a[c]=b[c]);return a}a.data={attributes:{}};var d=this.index;null!==d&&(b=Array.prototype.slice.call(d.array),a.data.index={type:d.array.constructor.name,array:b});d=this.attributes;for(c in d){var e=d[c],b=Array.prototype.slice.call(e.array);a.data.attributes[c]={itemSize:e.itemSize,type:e.array.constructor.name,array:b,normalized:e.normalized}}c=this.groups;0<c.length&&(a.data.groups=JSON.parse(JSON.stringify(c)));\nc=this.boundingSphere;null!==c&&(a.data.boundingSphere={center:c.center.toArray(),radius:c.radius});return a},clone:function(){return(new E).copy(this)},copy:function(a){var b,c,d;this.index=null;this.attributes={};this.morphAttributes={};this.groups=[];this.boundingSphere=this.boundingBox=null;this.name=a.name;c=a.index;null!==c&&this.setIndex(c.clone());c=a.attributes;for(b in c)this.addAttribute(b,c[b].clone());var e=a.morphAttributes;for(b in e){var f=[],g=e[b];c=0;for(d=g.length;c<d;c++)f.push(g[c].clone());\nthis.morphAttributes[b]=f}b=a.groups;c=0;for(d=b.length;c<d;c++)e=b[c],this.addGroup(e.start,e.count,e.materialIndex);b=a.boundingBox;null!==b&&(this.boundingBox=b.clone());b=a.boundingSphere;null!==b&&(this.boundingSphere=b.clone());this.drawRange.start=a.drawRange.start;this.drawRange.count=a.drawRange.count;return this},dispose:function(){this.dispatchEvent({type:\"dispose\"})}});Gb.prototype=Object.create(J.prototype);Gb.prototype.constructor=Gb;ib.prototype=Object.create(E.prototype);ib.prototype.constructor=\nib;vc.prototype=Object.create(J.prototype);vc.prototype.constructor=vc;jb.prototype=Object.create(E.prototype);jb.prototype.constructor=jb;ya.prototype=Object.create(U.prototype);ya.prototype.constructor=ya;ya.prototype.isMeshBasicMaterial=!0;ya.prototype.copy=function(a){U.prototype.copy.call(this,a);this.color.copy(a.color);this.map=a.map;this.lightMap=a.lightMap;this.lightMapIntensity=a.lightMapIntensity;this.aoMap=a.aoMap;this.aoMapIntensity=a.aoMapIntensity;this.specularMap=a.specularMap;this.alphaMap=\na.alphaMap;this.envMap=a.envMap;this.combine=a.combine;this.reflectivity=a.reflectivity;this.refractionRatio=a.refractionRatio;this.wireframe=a.wireframe;this.wireframeLinewidth=a.wireframeLinewidth;this.wireframeLinecap=a.wireframeLinecap;this.wireframeLinejoin=a.wireframeLinejoin;this.skinning=a.skinning;this.morphTargets=a.morphTargets;return this};Object.assign(kb.prototype,{set:function(a,b){this.origin.copy(a);this.direction.copy(b);return this},clone:function(){return(new this.constructor).copy(this)},\ncopy:function(a){this.origin.copy(a.origin);this.direction.copy(a.direction);return this},at:function(a,b){return(b||new n).copy(this.direction).multiplyScalar(a).add(this.origin)},lookAt:function(a){this.direction.copy(a).sub(this.origin).normalize();return this},recast:function(){var a=new n;return function(b){this.origin.copy(this.at(b,a));return this}}(),closestPointToPoint:function(a,b){var c=b||new n;c.subVectors(a,this.origin);var d=c.dot(this.direction);return 0>d?c.copy(this.origin):c.copy(this.direction).multiplyScalar(d).add(this.origin)},\ndistanceToPoint:function(a){return Math.sqrt(this.distanceSqToPoint(a))},distanceSqToPoint:function(){var a=new n;return function(b){var c=a.subVectors(b,this.origin).dot(this.direction);if(0>c)return this.origin.distanceToSquared(b);a.copy(this.direction).multiplyScalar(c).add(this.origin);return a.distanceToSquared(b)}}(),distanceSqToSegment:function(){var a=new n,b=new n,c=new n;return function(d,e,f,g){a.copy(d).add(e).multiplyScalar(.5);b.copy(e).sub(d).normalize();c.copy(this.origin).sub(a);\nvar h=.5*d.distanceTo(e),k=-this.direction.dot(b),m=c.dot(this.direction),q=-c.dot(b),l=c.lengthSq(),p=Math.abs(1-k*k),r;0<p?(d=k*q-m,e=k*m-q,r=h*p,0<=d?e>=-r?e<=r?(h=1/p,d*=h,e*=h,k=d*(d+k*e+2*m)+e*(k*d+e+2*q)+l):(e=h,d=Math.max(0,-(k*e+m)),k=-d*d+e*(e+2*q)+l):(e=-h,d=Math.max(0,-(k*e+m)),k=-d*d+e*(e+2*q)+l):e<=-r?(d=Math.max(0,-(-k*h+m)),e=0<d?-h:Math.min(Math.max(-h,-q),h),k=-d*d+e*(e+2*q)+l):e<=r?(d=0,e=Math.min(Math.max(-h,-q),h),k=e*(e+2*q)+l):(d=Math.max(0,-(k*h+m)),e=0<d?h:Math.min(Math.max(-h,\n-q),h),k=-d*d+e*(e+2*q)+l)):(e=0<k?-h:h,d=Math.max(0,-(k*e+m)),k=-d*d+e*(e+2*q)+l);f&&f.copy(this.direction).multiplyScalar(d).add(this.origin);g&&g.copy(b).multiplyScalar(e).add(a);return k}}(),intersectSphere:function(){var a=new n;return function(b,c){a.subVectors(b.center,this.origin);var d=a.dot(this.direction),e=a.dot(a)-d*d,f=b.radius*b.radius;if(e>f)return null;f=Math.sqrt(f-e);e=d-f;d+=f;return 0>e&&0>d?null:0>e?this.at(d,c):this.at(e,c)}}(),intersectsSphere:function(a){return this.distanceToPoint(a.center)<=\na.radius},distanceToPlane:function(a){var b=a.normal.dot(this.direction);if(0===b)return 0===a.distanceToPoint(this.origin)?0:null;a=-(this.origin.dot(a.normal)+a.constant)/b;return 0<=a?a:null},intersectPlane:function(a,b){var c=this.distanceToPlane(a);return null===c?null:this.at(c,b)},intersectsPlane:function(a){var b=a.distanceToPoint(this.origin);return 0===b||0>a.normal.dot(this.direction)*b?!0:!1},intersectBox:function(a,b){var c,d,e,f,g;d=1/this.direction.x;f=1/this.direction.y;g=1/this.direction.z;\nvar h=this.origin;0<=d?(c=(a.min.x-h.x)*d,d*=a.max.x-h.x):(c=(a.max.x-h.x)*d,d*=a.min.x-h.x);0<=f?(e=(a.min.y-h.y)*f,f*=a.max.y-h.y):(e=(a.max.y-h.y)*f,f*=a.min.y-h.y);if(c>f||e>d)return null;if(e>c||c!==c)c=e;if(f<d||d!==d)d=f;0<=g?(e=(a.min.z-h.z)*g,g*=a.max.z-h.z):(e=(a.max.z-h.z)*g,g*=a.min.z-h.z);if(c>g||e>d)return null;if(e>c||c!==c)c=e;if(g<d||d!==d)d=g;return 0>d?null:this.at(0<=c?c:d,b)},intersectsBox:function(){var a=new n;return function(b){return null!==this.intersectBox(b,a)}}(),intersectTriangle:function(){var a=\nnew n,b=new n,c=new n,d=new n;return function(e,f,g,h,k){b.subVectors(f,e);c.subVectors(g,e);d.crossVectors(b,c);f=this.direction.dot(d);if(0<f){if(h)return null;h=1}else if(0>f)h=-1,f=-f;else return null;a.subVectors(this.origin,e);e=h*this.direction.dot(c.crossVectors(a,c));if(0>e)return null;g=h*this.direction.dot(b.cross(a));if(0>g||e+g>f)return null;e=-h*a.dot(d);return 0>e?null:this.at(e/f,k)}}(),applyMatrix4:function(a){this.origin.applyMatrix4(a);this.direction.transformDirection(a);return this},\nequals:function(a){return a.origin.equals(this.origin)&&a.direction.equals(this.direction)}});Object.assign(Hb.prototype,{set:function(a,b){this.start.copy(a);this.end.copy(b);return this},clone:function(){return(new this.constructor).copy(this)},copy:function(a){this.start.copy(a.start);this.end.copy(a.end);return this},getCenter:function(a){return(a||new n).addVectors(this.start,this.end).multiplyScalar(.5)},delta:function(a){return(a||new n).subVectors(this.end,this.start)},distanceSq:function(){return this.start.distanceToSquared(this.end)},\ndistance:function(){return this.start.distanceTo(this.end)},at:function(a,b){var c=b||new n;return this.delta(c).multiplyScalar(a).add(this.start)},closestPointToPointParameter:function(){var a=new n,b=new n;return function(c,d){a.subVectors(c,this.start);b.subVectors(this.end,this.start);var e=b.dot(b),e=b.dot(a)/e;d&&(e=Y.clamp(e,0,1));return e}}(),closestPointToPoint:function(a,b,c){a=this.closestPointToPointParameter(a,b);c=c||new n;return this.delta(c).multiplyScalar(a).add(this.start)},applyMatrix4:function(a){this.start.applyMatrix4(a);\nthis.end.applyMatrix4(a);return this},equals:function(a){return a.start.equals(this.start)&&a.end.equals(this.end)}});Object.assign(Ta,{normal:function(){var a=new n;return function(b,c,d,e){e=e||new n;e.subVectors(d,c);a.subVectors(b,c);e.cross(a);b=e.lengthSq();return 0<b?e.multiplyScalar(1/Math.sqrt(b)):e.set(0,0,0)}}(),barycoordFromPoint:function(){var a=new n,b=new n,c=new n;return function(d,e,f,g,h){a.subVectors(g,e);b.subVectors(f,e);c.subVectors(d,e);d=a.dot(a);e=a.dot(b);f=a.dot(c);var k=\nb.dot(b);g=b.dot(c);var m=d*k-e*e;h=h||new n;if(0===m)return h.set(-2,-1,-1);m=1/m;k=(k*f-e*g)*m;d=(d*g-e*f)*m;return h.set(1-k-d,d,k)}}(),containsPoint:function(){var a=new n;return function(b,c,d,e){b=Ta.barycoordFromPoint(b,c,d,e,a);return 0<=b.x&&0<=b.y&&1>=b.x+b.y}}()});Object.assign(Ta.prototype,{set:function(a,b,c){this.a.copy(a);this.b.copy(b);this.c.copy(c);return this},setFromPointsAndIndices:function(a,b,c,d){this.a.copy(a[b]);this.b.copy(a[c]);this.c.copy(a[d]);return this},clone:function(){return(new this.constructor).copy(this)},\ncopy:function(a){this.a.copy(a.a);this.b.copy(a.b);this.c.copy(a.c);return this},area:function(){var a=new n,b=new n;return function(){a.subVectors(this.c,this.b);b.subVectors(this.a,this.b);return.5*a.cross(b).length()}}(),midpoint:function(a){return(a||new n).addVectors(this.a,this.b).add(this.c).multiplyScalar(1/3)},normal:function(a){return Ta.normal(this.a,this.b,this.c,a)},plane:function(a){return(a||new Aa).setFromCoplanarPoints(this.a,this.b,this.c)},barycoordFromPoint:function(a,b){return Ta.barycoordFromPoint(a,\nthis.a,this.b,this.c,b)},containsPoint:function(a){return Ta.containsPoint(a,this.a,this.b,this.c)},closestPointToPoint:function(){var a=new Aa,b=[new Hb,new Hb,new Hb],c=new n,d=new n;return function(e,f){var g=f||new n,h=Infinity;a.setFromCoplanarPoints(this.a,this.b,this.c);a.projectPoint(e,c);if(!0===this.containsPoint(c))g.copy(c);else{b[0].set(this.a,this.b);b[1].set(this.b,this.c);b[2].set(this.c,this.a);for(var k=0;k<b.length;k++){b[k].closestPointToPoint(c,!0,d);var m=c.distanceToSquared(d);\nm<h&&(h=m,g.copy(d))}}return g}}(),equals:function(a){return a.a.equals(this.a)&&a.b.equals(this.b)&&a.c.equals(this.c)}});la.prototype=Object.assign(Object.create(z.prototype),{constructor:la,isMesh:!0,setDrawMode:function(a){this.drawMode=a},copy:function(a){z.prototype.copy.call(this,a);this.drawMode=a.drawMode;return this},updateMorphTargets:function(){var a=this.geometry,b,c;if(a.isBufferGeometry){if(a=a.morphAttributes,b=Object.keys(a),0<b.length){var d=a[b[0]];if(void 0!==d)for(this.morphTargetInfluences=\n[],this.morphTargetDictionary={},a=0,b=d.length;a<b;a++)c=d[a].name||String(a),this.morphTargetInfluences.push(0),this.morphTargetDictionary[c]=a}}else if(d=a.morphTargets,void 0!==d&&0<d.length)for(this.morphTargetInfluences=[],this.morphTargetDictionary={},a=0,b=d.length;a<b;a++)c=d[a].name||String(a),this.morphTargetInfluences.push(0),this.morphTargetDictionary[c]=a},raycast:function(){function a(a,b,c,d,e,f,g){Ta.barycoordFromPoint(a,b,c,d,t);e.multiplyScalar(t.x);f.multiplyScalar(t.y);g.multiplyScalar(t.z);\ne.add(f).add(g);return e.clone()}function b(a,b,c,d,e,f,g){var h=a.material;if(null===(1===h.side?c.intersectTriangle(f,e,d,!0,g):c.intersectTriangle(d,e,f,2!==h.side,g)))return null;x.copy(g);x.applyMatrix4(a.matrixWorld);c=b.ray.origin.distanceTo(x);return c<b.near||c>b.far?null:{distance:c,point:x.clone(),object:a}}function c(c,d,e,f,m,q,l,n){g.fromBufferAttribute(f,q);h.fromBufferAttribute(f,l);k.fromBufferAttribute(f,n);if(c=b(c,d,e,g,h,k,y))m&&(p.fromBufferAttribute(m,q),r.fromBufferAttribute(m,\nl),ca.fromBufferAttribute(m,n),c.uv=a(y,g,h,k,p,r,ca)),c.face=new Sa(q,l,n,Ta.normal(g,h,k)),c.faceIndex=q;return c}var d=new K,e=new kb,f=new Ea,g=new n,h=new n,k=new n,m=new n,q=new n,l=new n,p=new C,r=new C,ca=new C,t=new n,y=new n,x=new n;return function(n,t){var w=this.geometry,x=this.material,B=this.matrixWorld;if(void 0!==x&&(null===w.boundingSphere&&w.computeBoundingSphere(),f.copy(w.boundingSphere),f.applyMatrix4(B),!1!==n.ray.intersectsSphere(f)&&(d.getInverse(B),e.copy(n.ray).applyMatrix4(d),\nnull===w.boundingBox||!1!==e.intersectsBox(w.boundingBox)))){var D;if(w.isBufferGeometry){var O,C,x=w.index,F=w.attributes.position,B=w.attributes.uv,z,T;if(null!==x)for(z=0,T=x.count;z<T;z+=3){if(w=x.getX(z),O=x.getX(z+1),C=x.getX(z+2),D=c(this,n,e,F,B,w,O,C))D.faceIndex=Math.floor(z/3),t.push(D)}else for(z=0,T=F.count;z<T;z+=3)if(w=z,O=z+1,C=z+2,D=c(this,n,e,F,B,w,O,C))D.index=w,t.push(D)}else if(w.isGeometry){var E,B=Array.isArray(x);z=w.vertices;T=w.faces;O=w.faceVertexUvs[0];0<O.length&&(F=O);\nfor(var G=0,K=T.length;G<K;G++){var P=T[G];D=B?x[P.materialIndex]:x;if(void 0!==D){O=z[P.a];C=z[P.b];E=z[P.c];if(!0===D.morphTargets){D=w.morphTargets;var M=this.morphTargetInfluences;g.set(0,0,0);h.set(0,0,0);k.set(0,0,0);for(var V=0,pa=D.length;V<pa;V++){var S=M[V];if(0!==S){var N=D[V].vertices;g.addScaledVector(m.subVectors(N[P.a],O),S);h.addScaledVector(q.subVectors(N[P.b],C),S);k.addScaledVector(l.subVectors(N[P.c],E),S)}}g.add(O);h.add(C);k.add(E);O=g;C=h;E=k}if(D=b(this,n,e,O,C,E,y))F&&F[G]&&\n(M=F[G],p.copy(M[0]),r.copy(M[1]),ca.copy(M[2]),D.uv=a(y,O,C,E,p,r,ca)),D.face=P,D.faceIndex=G,t.push(D)}}}}}}(),clone:function(){return(new this.constructor(this.geometry,this.material)).copy(this)}});var bg=0;kd.prototype=Object.assign(Object.create(qa.prototype),{constructor:kd,isArrayCamera:!0});Ib.prototype.isFogExp2=!0;Ib.prototype.clone=function(){return new Ib(this.color.getHex(),this.density)};Ib.prototype.toJSON=function(a){return{type:\"FogExp2\",color:this.color.getHex(),density:this.density}};\nJb.prototype.isFog=!0;Jb.prototype.clone=function(){return new Jb(this.color.getHex(),this.near,this.far)};Jb.prototype.toJSON=function(a){return{type:\"Fog\",color:this.color.getHex(),near:this.near,far:this.far}};ld.prototype=Object.assign(Object.create(z.prototype),{constructor:ld,copy:function(a,b){z.prototype.copy.call(this,a,b);null!==a.background&&(this.background=a.background.clone());null!==a.fog&&(this.fog=a.fog.clone());null!==a.overrideMaterial&&(this.overrideMaterial=a.overrideMaterial.clone());\nthis.autoUpdate=a.autoUpdate;this.matrixAutoUpdate=a.matrixAutoUpdate;return this},toJSON:function(a){var b=z.prototype.toJSON.call(this,a);null!==this.background&&(b.object.background=this.background.toJSON(a));null!==this.fog&&(b.object.fog=this.fog.toJSON());return b}});Yd.prototype=Object.assign(Object.create(z.prototype),{constructor:Yd,isLensFlare:!0,copy:function(a){z.prototype.copy.call(this,a);this.positionScreen.copy(a.positionScreen);this.customUpdateCallback=a.customUpdateCallback;for(var b=\n0,c=a.lensFlares.length;b<c;b++)this.lensFlares.push(a.lensFlares[b]);return this},add:function(a,b,c,d,e,f){void 0===b&&(b=-1);void 0===c&&(c=0);void 0===f&&(f=1);void 0===e&&(e=new G(16777215));void 0===d&&(d=1);c=Math.min(c,Math.max(0,c));this.lensFlares.push({texture:a,size:b,distance:c,x:0,y:0,z:0,scale:1,rotation:0,opacity:f,color:e,blending:d})},updateLensFlares:function(){var a,b=this.lensFlares.length,c,d=2*-this.positionScreen.x,e=2*-this.positionScreen.y;for(a=0;a<b;a++)c=this.lensFlares[a],\nc.x=this.positionScreen.x+d*c.distance,c.y=this.positionScreen.y+e*c.distance,c.wantedRotation=c.x*Math.PI*.25,c.rotation+=.25*(c.wantedRotation-c.rotation)}});bb.prototype=Object.create(U.prototype);bb.prototype.constructor=bb;bb.prototype.isSpriteMaterial=!0;bb.prototype.copy=function(a){U.prototype.copy.call(this,a);this.color.copy(a.color);this.map=a.map;this.rotation=a.rotation;return this};xc.prototype=Object.assign(Object.create(z.prototype),{constructor:xc,isSprite:!0,raycast:function(){var a=\nnew n,b=new n,c=new n;return function(d,e){b.setFromMatrixPosition(this.matrixWorld);d.ray.closestPointToPoint(b,a);c.setFromMatrixScale(this.matrixWorld);var f=c.x*c.y/4;b.distanceToSquared(a)>f||(f=d.ray.origin.distanceTo(a),f<d.near||f>d.far||e.push({distance:f,point:a.clone(),face:null,object:this}))}}(),clone:function(){return(new this.constructor(this.material)).copy(this)}});yc.prototype=Object.assign(Object.create(z.prototype),{constructor:yc,copy:function(a){z.prototype.copy.call(this,a,\n!1);a=a.levels;for(var b=0,c=a.length;b<c;b++){var d=a[b];this.addLevel(d.object.clone(),d.distance)}return this},addLevel:function(a,b){void 0===b&&(b=0);b=Math.abs(b);for(var c=this.levels,d=0;d<c.length&&!(b<c[d].distance);d++);c.splice(d,0,{distance:b,object:a});this.add(a)},getObjectForDistance:function(a){for(var b=this.levels,c=1,d=b.length;c<d&&!(a<b[c].distance);c++);return b[c-1].object},raycast:function(){var a=new n;return function(b,c){a.setFromMatrixPosition(this.matrixWorld);var d=\nb.ray.origin.distanceTo(a);this.getObjectForDistance(d).raycast(b,c)}}(),update:function(){var a=new n,b=new n;return function(c){var d=this.levels;if(1<d.length){a.setFromMatrixPosition(c.matrixWorld);b.setFromMatrixPosition(this.matrixWorld);c=a.distanceTo(b);d[0].object.visible=!0;for(var e=1,f=d.length;e<f;e++)if(c>=d[e].distance)d[e-1].object.visible=!1,d[e].object.visible=!0;else break;for(;e<f;e++)d[e].object.visible=!1}}}(),toJSON:function(a){a=z.prototype.toJSON.call(this,a);a.object.levels=\n[];for(var b=this.levels,c=0,d=b.length;c<d;c++){var e=b[c];a.object.levels.push({object:e.object.uuid,distance:e.distance})}return a}});Object.assign(zc.prototype,{calculateInverses:function(){this.boneInverses=[];for(var a=0,b=this.bones.length;a<b;a++){var c=new K;this.bones[a]&&c.getInverse(this.bones[a].matrixWorld);this.boneInverses.push(c)}},pose:function(){var a,b,c;b=0;for(c=this.bones.length;b<c;b++)(a=this.bones[b])&&a.matrixWorld.getInverse(this.boneInverses[b]);b=0;for(c=this.bones.length;b<\nc;b++)if(a=this.bones[b])a.parent&&a.parent.isBone?(a.matrix.getInverse(a.parent.matrixWorld),a.matrix.multiply(a.matrixWorld)):a.matrix.copy(a.matrixWorld),a.matrix.decompose(a.position,a.quaternion,a.scale)},update:function(){var a=new K,b=new K;return function(){for(var c=this.bones,d=this.boneInverses,e=this.boneMatrices,f=this.boneTexture,g=0,h=c.length;g<h;g++)a.multiplyMatrices(c[g]?c[g].matrixWorld:b,d[g]),a.toArray(e,16*g);void 0!==f&&(f.needsUpdate=!0)}}(),clone:function(){return new zc(this.bones,\nthis.boneInverses)}});md.prototype=Object.assign(Object.create(z.prototype),{constructor:md,isBone:!0});nd.prototype=Object.assign(Object.create(la.prototype),{constructor:nd,isSkinnedMesh:!0,initBones:function(){var a=[],b,c,d,e;if(this.geometry&&void 0!==this.geometry.bones){d=0;for(e=this.geometry.bones.length;d<e;d++)c=this.geometry.bones[d],b=new md,a.push(b),b.name=c.name,b.position.fromArray(c.pos),b.quaternion.fromArray(c.rotq),void 0!==c.scl&&b.scale.fromArray(c.scl);d=0;for(e=this.geometry.bones.length;d<\ne;d++)c=this.geometry.bones[d],-1!==c.parent&&null!==c.parent&&void 0!==a[c.parent]?a[c.parent].add(a[d]):this.add(a[d])}this.updateMatrixWorld(!0);return a},bind:function(a,b){this.skeleton=a;void 0===b&&(this.updateMatrixWorld(!0),this.skeleton.calculateInverses(),b=this.matrixWorld);this.bindMatrix.copy(b);this.bindMatrixInverse.getInverse(b)},pose:function(){this.skeleton.pose()},normalizeSkinWeights:function(){var a,b;if(this.geometry&&this.geometry.isGeometry)for(b=0;b<this.geometry.skinWeights.length;b++){var c=\nthis.geometry.skinWeights[b];a=1/c.lengthManhattan();Infinity!==a?c.multiplyScalar(a):c.set(1,0,0,0)}else if(this.geometry&&this.geometry.isBufferGeometry){var c=new fa,d=this.geometry.attributes.skinWeight;for(b=0;b<d.count;b++)c.x=d.getX(b),c.y=d.getY(b),c.z=d.getZ(b),c.w=d.getW(b),a=1/c.lengthManhattan(),Infinity!==a?c.multiplyScalar(a):c.set(1,0,0,0),d.setXYZW(b,c.x,c.y,c.z,c.w)}},updateMatrixWorld:function(a){la.prototype.updateMatrixWorld.call(this,a);\"attached\"===this.bindMode?this.bindMatrixInverse.getInverse(this.matrixWorld):\n\"detached\"===this.bindMode?this.bindMatrixInverse.getInverse(this.bindMatrix):console.warn(\"THREE.SkinnedMesh: Unrecognized bindMode: \"+this.bindMode)},clone:function(){return(new this.constructor(this.geometry,this.material)).copy(this)}});ea.prototype=Object.create(U.prototype);ea.prototype.constructor=ea;ea.prototype.isLineBasicMaterial=!0;ea.prototype.copy=function(a){U.prototype.copy.call(this,a);this.color.copy(a.color);this.linewidth=a.linewidth;this.linecap=a.linecap;this.linejoin=a.linejoin;\nreturn this};sa.prototype=Object.assign(Object.create(z.prototype),{constructor:sa,isLine:!0,raycast:function(){var a=new K,b=new kb,c=new Ea;return function(d,e){var f=d.linePrecision,f=f*f,g=this.geometry,h=this.matrixWorld;null===g.boundingSphere&&g.computeBoundingSphere();c.copy(g.boundingSphere);c.applyMatrix4(h);if(!1!==d.ray.intersectsSphere(c)){a.getInverse(h);b.copy(d.ray).applyMatrix4(a);var k=new n,m=new n,h=new n,q=new n,l=this&&this.isLineSegments?2:1;if(g.isBufferGeometry){var p=g.index,\nr=g.attributes.position.array;if(null!==p)for(var p=p.array,g=0,ca=p.length-1;g<ca;g+=l){var t=p[g+1];k.fromArray(r,3*p[g]);m.fromArray(r,3*t);t=b.distanceSqToSegment(k,m,q,h);t>f||(q.applyMatrix4(this.matrixWorld),t=d.ray.origin.distanceTo(q),t<d.near||t>d.far||e.push({distance:t,point:h.clone().applyMatrix4(this.matrixWorld),index:g,face:null,faceIndex:null,object:this}))}else for(g=0,ca=r.length/3-1;g<ca;g+=l)k.fromArray(r,3*g),m.fromArray(r,3*g+3),t=b.distanceSqToSegment(k,m,q,h),t>f||(q.applyMatrix4(this.matrixWorld),\nt=d.ray.origin.distanceTo(q),t<d.near||t>d.far||e.push({distance:t,point:h.clone().applyMatrix4(this.matrixWorld),index:g,face:null,faceIndex:null,object:this}))}else if(g.isGeometry)for(k=g.vertices,m=k.length,g=0;g<m-1;g+=l)t=b.distanceSqToSegment(k[g],k[g+1],q,h),t>f||(q.applyMatrix4(this.matrixWorld),t=d.ray.origin.distanceTo(q),t<d.near||t>d.far||e.push({distance:t,point:h.clone().applyMatrix4(this.matrixWorld),index:g,face:null,faceIndex:null,object:this}))}}}(),clone:function(){return(new this.constructor(this.geometry,\nthis.material)).copy(this)}});Q.prototype=Object.assign(Object.create(sa.prototype),{constructor:Q,isLineSegments:!0});od.prototype=Object.assign(Object.create(sa.prototype),{constructor:od,isLineLoop:!0});Fa.prototype=Object.create(U.prototype);Fa.prototype.constructor=Fa;Fa.prototype.isPointsMaterial=!0;Fa.prototype.copy=function(a){U.prototype.copy.call(this,a);this.color.copy(a.color);this.map=a.map;this.size=a.size;this.sizeAttenuation=a.sizeAttenuation;return this};Kb.prototype=Object.assign(Object.create(z.prototype),\n{constructor:Kb,isPoints:!0,raycast:function(){var a=new K,b=new kb,c=new Ea;return function(d,e){function f(a,c){var f=b.distanceSqToPoint(a);if(f<q){var h=b.closestPointToPoint(a);h.applyMatrix4(k);var m=d.ray.origin.distanceTo(h);m<d.near||m>d.far||e.push({distance:m,distanceToRay:Math.sqrt(f),point:h.clone(),index:c,face:null,object:g})}}var g=this,h=this.geometry,k=this.matrixWorld,m=d.params.Points.threshold;null===h.boundingSphere&&h.computeBoundingSphere();c.copy(h.boundingSphere);c.applyMatrix4(k);\nc.radius+=m;if(!1!==d.ray.intersectsSphere(c)){a.getInverse(k);b.copy(d.ray).applyMatrix4(a);var m=m/((this.scale.x+this.scale.y+this.scale.z)/3),q=m*m,m=new n;if(h.isBufferGeometry){var l=h.index,h=h.attributes.position.array;if(null!==l)for(var p=l.array,l=0,r=p.length;l<r;l++){var ca=p[l];m.fromArray(h,3*ca);f(m,ca)}else for(l=0,p=h.length/3;l<p;l++)m.fromArray(h,3*l),f(m,l)}else for(m=h.vertices,l=0,p=m.length;l<p;l++)f(m[l],l)}}}(),clone:function(){return(new this.constructor(this.geometry,this.material)).copy(this)}});\nAc.prototype=Object.assign(Object.create(z.prototype),{constructor:Ac});pd.prototype=Object.create(ba.prototype);pd.prototype.constructor=pd;Lb.prototype=Object.create(ba.prototype);Lb.prototype.constructor=Lb;Lb.prototype.isCompressedTexture=!0;qd.prototype=Object.create(ba.prototype);qd.prototype.constructor=qd;Bc.prototype=Object.create(ba.prototype);Bc.prototype.constructor=Bc;Bc.prototype.isDepthTexture=!0;Mb.prototype=Object.create(E.prototype);Mb.prototype.constructor=Mb;Cc.prototype=Object.create(J.prototype);\nCc.prototype.constructor=Cc;Nb.prototype=Object.create(E.prototype);Nb.prototype.constructor=Nb;Dc.prototype=Object.create(J.prototype);Dc.prototype.constructor=Dc;za.prototype=Object.create(E.prototype);za.prototype.constructor=za;Ec.prototype=Object.create(J.prototype);Ec.prototype.constructor=Ec;Ob.prototype=Object.create(za.prototype);Ob.prototype.constructor=Ob;Fc.prototype=Object.create(J.prototype);Fc.prototype.constructor=Fc;lb.prototype=Object.create(za.prototype);lb.prototype.constructor=\nlb;Gc.prototype=Object.create(J.prototype);Gc.prototype.constructor=Gc;Pb.prototype=Object.create(za.prototype);Pb.prototype.constructor=Pb;Hc.prototype=Object.create(J.prototype);Hc.prototype.constructor=Hc;Qb.prototype=Object.create(za.prototype);Qb.prototype.constructor=Qb;Ic.prototype=Object.create(J.prototype);Ic.prototype.constructor=Ic;Rb.prototype=Object.create(E.prototype);Rb.prototype.constructor=Rb;Jc.prototype=Object.create(J.prototype);Jc.prototype.constructor=Jc;Sb.prototype=Object.create(E.prototype);\nSb.prototype.constructor=Sb;Kc.prototype=Object.create(J.prototype);Kc.prototype.constructor=Kc;Tb.prototype=Object.create(E.prototype);Tb.prototype.constructor=Tb;var Ia={area:function(a){for(var b=a.length,c=0,d=b-1,e=0;e<b;d=e++)c+=a[d].x*a[e].y-a[e].x*a[d].y;return.5*c},triangulate:function(){return function(a,b){var c=a.length;if(3>c)return null;var d=[],e=[],f=[],g,h,k;if(0<Ia.area(a))for(h=0;h<c;h++)e[h]=h;else for(h=0;h<c;h++)e[h]=c-1-h;var m=2*c;for(h=c-1;2<c;){if(0>=m--){console.warn(\"THREE.ShapeUtils: Unable to triangulate polygon! in triangulate()\");\nbreak}g=h;c<=g&&(g=0);h=g+1;c<=h&&(h=0);k=h+1;c<=k&&(k=0);var q;a:{var l,p,r,n,t,y,x,u;l=a[e[g]].x;p=a[e[g]].y;r=a[e[h]].x;n=a[e[h]].y;t=a[e[k]].x;y=a[e[k]].y;if(0>=(r-l)*(y-p)-(n-p)*(t-l))q=!1;else{var H,w,I,z,D,O,B,C,E,G;H=t-r;w=y-n;I=l-t;z=p-y;D=r-l;O=n-p;for(q=0;q<c;q++)if(x=a[e[q]].x,u=a[e[q]].y,!(x===l&&u===p||x===r&&u===n||x===t&&u===y)&&(B=x-l,C=u-p,E=x-r,G=u-n,x-=t,u-=y,E=H*G-w*E,B=D*C-O*B,C=I*u-z*x,E>=-Number.EPSILON&&C>=-Number.EPSILON&&B>=-Number.EPSILON)){q=!1;break a}q=!0}}if(q){d.push([a[e[g]],\na[e[h]],a[e[k]]]);f.push([e[g],e[h],e[k]]);g=h;for(k=h+1;k<c;g++,k++)e[g]=e[k];c--;m=2*c}}return b?f:d}}(),triangulateShape:function(a,b){function c(a){var b=a.length;2<b&&a[b-1].equals(a[0])&&a.pop()}function d(a,b,c){return a.x!==b.x?a.x<b.x?a.x<=c.x&&c.x<=b.x:b.x<=c.x&&c.x<=a.x:a.y<b.y?a.y<=c.y&&c.y<=b.y:b.y<=c.y&&c.y<=a.y}function e(a,b,c,e,f){var g=b.x-a.x,h=b.y-a.y,k=e.x-c.x,m=e.y-c.y,q=a.x-c.x,l=a.y-c.y,p=h*k-g*m,n=h*q-g*l;if(Math.abs(p)>Number.EPSILON){if(0<p){if(0>n||n>p)return[];k=m*q-k*\nl;if(0>k||k>p)return[]}else{if(0<n||n<p)return[];k=m*q-k*l;if(0<k||k<p)return[]}if(0===k)return!f||0!==n&&n!==p?[a]:[];if(k===p)return!f||0!==n&&n!==p?[b]:[];if(0===n)return[c];if(n===p)return[e];f=k/p;return[{x:a.x+f*g,y:a.y+f*h}]}if(0!==n||m*q!==k*l)return[];h=0===g&&0===h;k=0===k&&0===m;if(h&&k)return a.x!==c.x||a.y!==c.y?[]:[a];if(h)return d(c,e,a)?[a]:[];if(k)return d(a,b,c)?[c]:[];0!==g?(a.x<b.x?(g=a,k=a.x,h=b,a=b.x):(g=b,k=b.x,h=a,a=a.x),c.x<e.x?(b=c,p=c.x,m=e,c=e.x):(b=e,p=e.x,m=c,c=c.x)):\n(a.y<b.y?(g=a,k=a.y,h=b,a=b.y):(g=b,k=b.y,h=a,a=a.y),c.y<e.y?(b=c,p=c.y,m=e,c=e.y):(b=e,p=e.y,m=c,c=c.y));return k<=p?a<p?[]:a===p?f?[]:[b]:a<=c?[b,h]:[b,m]:k>c?[]:k===c?f?[]:[g]:a<=c?[g,h]:[g,m]}function f(a,b,c,d){var e=b.x-a.x,f=b.y-a.y;b=c.x-a.x;c=c.y-a.y;var g=d.x-a.x;d=d.y-a.y;a=e*c-f*b;e=e*d-f*g;return Math.abs(a)>Number.EPSILON?(b=g*c-d*b,0<a?0<=e&&0<=b:0<=e||0<=b):0<e}c(a);b.forEach(c);var g,h,k,m,q,l={};k=a.concat();g=0;for(h=b.length;g<h;g++)Array.prototype.push.apply(k,b[g]);g=0;for(h=\nk.length;g<h;g++)q=k[g].x+\":\"+k[g].y,void 0!==l[q]&&console.warn(\"THREE.ShapeUtils: Duplicate point\",q,g),l[q]=g;g=function(a,b){function c(a,b){var d=h.length-1,e=a-1;0>e&&(e=d);var g=a+1;g>d&&(g=0);d=f(h[a],h[e],h[g],k[b]);if(!d)return!1;d=k.length-1;e=b-1;0>e&&(e=d);g=b+1;g>d&&(g=0);return(d=f(k[b],k[e],k[g],h[a]))?!0:!1}function d(a,b){var c,f;for(c=0;c<h.length;c++)if(f=c+1,f%=h.length,f=e(a,b,h[c],h[f],!0),0<f.length)return!0;return!1}function g(a,c){var d,f,h,k;for(d=0;d<m.length;d++)for(f=\nb[m[d]],h=0;h<f.length;h++)if(k=h+1,k%=f.length,k=e(a,c,f[h],f[k],!0),0<k.length)return!0;return!1}var h=a.concat(),k,m=[],q,l,p,n,v,B=[],C,z,E,G=0;for(q=b.length;G<q;G++)m.push(G);C=0;for(var K=2*m.length;0<m.length;){K--;if(0>K){console.log(\"Infinite Loop! Holes left:\"+m.length+\", Probably Hole outside Shape!\");break}for(l=C;l<h.length;l++){p=h[l];q=-1;for(G=0;G<m.length;G++)if(n=m[G],v=p.x+\":\"+p.y+\":\"+n,void 0===B[v]){k=b[n];for(z=0;z<k.length;z++)if(n=k[z],c(l,z)&&!d(p,n)&&!g(p,n)){q=z;m.splice(G,\n1);C=h.slice(0,l+1);n=h.slice(l);z=k.slice(q);E=k.slice(0,q+1);h=C.concat(z).concat(E).concat(n);C=l;break}if(0<=q)break;B[v]=!0}if(0<=q)break}}return h}(a,b);var p=Ia.triangulate(g,!1);g=0;for(h=p.length;g<h;g++)for(m=p[g],k=0;3>k;k++)q=m[k].x+\":\"+m[k].y,q=l[q],void 0!==q&&(m[k]=q);return p.concat()},isClockWise:function(a){return 0>Ia.area(a)}};cb.prototype=Object.create(J.prototype);cb.prototype.constructor=cb;Ga.prototype=Object.create(E.prototype);Ga.prototype.constructor=Ga;Ga.prototype.getArrays=\nfunction(){var a=this.getAttribute(\"position\"),a=a?Array.prototype.slice.call(a.array):[],b=this.getAttribute(\"uv\"),b=b?Array.prototype.slice.call(b.array):[],c=this.index,c=c?Array.prototype.slice.call(c.array):[];return{position:a,uv:b,index:c}};Ga.prototype.addShapeList=function(a,b){var c=a.length;b.arrays=this.getArrays();for(var d=0;d<c;d++)this.addShape(a[d],b);this.setIndex(b.arrays.index);this.addAttribute(\"position\",new B(b.arrays.position,3));this.addAttribute(\"uv\",new B(b.arrays.uv,2))};\nGa.prototype.addShape=function(a,b){function c(a,b,c){b||console.error(\"THREE.ExtrudeGeometry: vec does not exist\");return b.clone().multiplyScalar(c).add(a)}function d(a,b,c){var d,e,f;e=a.x-b.x;f=a.y-b.y;d=c.x-a.x;var g=c.y-a.y,h=e*e+f*f;if(Math.abs(e*g-f*d)>Number.EPSILON){var k=Math.sqrt(h),m=Math.sqrt(d*d+g*g),h=b.x-f/k;b=b.y+e/k;g=((c.x-g/m-h)*g-(c.y+d/m-b)*d)/(e*g-f*d);d=h+e*g-a.x;e=b+f*g-a.y;f=d*d+e*e;if(2>=f)return new C(d,e);f=Math.sqrt(f/2)}else a=!1,e>Number.EPSILON?d>Number.EPSILON&&\n(a=!0):e<-Number.EPSILON?d<-Number.EPSILON&&(a=!0):Math.sign(f)===Math.sign(g)&&(a=!0),a?(d=-f,f=Math.sqrt(h)):(d=e,e=f,f=Math.sqrt(h/2));return new C(d/f,e/f)}function e(a,b){var c,d;for(L=a.length;0<=--L;){c=L;d=L-1;0>d&&(d=a.length-1);var e,f=H+2*y;for(e=0;e<f;e++){var g=ba*e,m=ba*(e+1),l=b+d+g,p=b+d+m,m=b+c+m;h(b+c+g);h(l);h(m);h(l);h(p);h(m);g=q.length/3;g=D.generateSideWallUV(Z,q,g-6,g-3,g-2,g-1);k(g[0]);k(g[1]);k(g[3]);k(g[1]);k(g[2]);k(g[3])}}}function f(a,b,c){r.push(a);r.push(b);r.push(c)}\nfunction g(a,b,c){h(a);h(b);h(c);a=q.length/3;a=D.generateTopUV(Z,q,a-3,a-2,a-1);k(a[0]);k(a[1]);k(a[2])}function h(a){l.push(q.length/3);q.push(r[3*a+0]);q.push(r[3*a+1]);q.push(r[3*a+2])}function k(a){p.push(a.x);p.push(a.y)}var m=b.arrays?b.arrays:this.getArrays(),q=m.position,l=m.index,p=m.uv,r=[],m=void 0!==b.amount?b.amount:100,z=void 0!==b.bevelThickness?b.bevelThickness:6,t=void 0!==b.bevelSize?b.bevelSize:z-2,y=void 0!==b.bevelSegments?b.bevelSegments:3,x=void 0!==b.bevelEnabled?b.bevelEnabled:\n!0,u=void 0!==b.curveSegments?b.curveSegments:12,H=void 0!==b.steps?b.steps:1,w=b.extrudePath,I,G=!1,D=void 0!==b.UVGenerator?b.UVGenerator:cb.WorldUVGenerator,O,E,F,K;w&&(I=w.getSpacedPoints(H),G=!0,x=!1,O=void 0!==b.frames?b.frames:w.computeFrenetFrames(H,!1),E=new n,F=new n,K=new n);x||(t=z=y=0);var T,J,U,Z=this,w=a.extractPoints(u),u=w.shape,P=w.holes;if(!Ia.isClockWise(u))for(u=u.reverse(),J=0,U=P.length;J<U;J++)T=P[J],Ia.isClockWise(T)&&(P[J]=T.reverse());var M=Ia.triangulateShape(u,P),V=u;\nJ=0;for(U=P.length;J<U;J++)T=P[J],u=u.concat(T);var R,S,N,Y,Q,ba=u.length,X,fa=M.length,w=[],L=0;N=V.length;R=N-1;for(S=L+1;L<N;L++,R++,S++)R===N&&(R=0),S===N&&(S=0),w[L]=d(V[L],V[R],V[S]);var ha=[],ea,ia=w.concat();J=0;for(U=P.length;J<U;J++){T=P[J];ea=[];L=0;N=T.length;R=N-1;for(S=L+1;L<N;L++,R++,S++)R===N&&(R=0),S===N&&(S=0),ea[L]=d(T[L],T[R],T[S]);ha.push(ea);ia=ia.concat(ea)}for(R=0;R<y;R++){N=R/y;Y=z*Math.cos(N*Math.PI/2);S=t*Math.sin(N*Math.PI/2);L=0;for(N=V.length;L<N;L++)Q=c(V[L],w[L],S),\nf(Q.x,Q.y,-Y);J=0;for(U=P.length;J<U;J++)for(T=P[J],ea=ha[J],L=0,N=T.length;L<N;L++)Q=c(T[L],ea[L],S),f(Q.x,Q.y,-Y)}S=t;for(L=0;L<ba;L++)Q=x?c(u[L],ia[L],S):u[L],G?(F.copy(O.normals[0]).multiplyScalar(Q.x),E.copy(O.binormals[0]).multiplyScalar(Q.y),K.copy(I[0]).add(F).add(E),f(K.x,K.y,K.z)):f(Q.x,Q.y,0);for(N=1;N<=H;N++)for(L=0;L<ba;L++)Q=x?c(u[L],ia[L],S):u[L],G?(F.copy(O.normals[N]).multiplyScalar(Q.x),E.copy(O.binormals[N]).multiplyScalar(Q.y),K.copy(I[N]).add(F).add(E),f(K.x,K.y,K.z)):f(Q.x,Q.y,\nm/H*N);for(R=y-1;0<=R;R--){N=R/y;Y=z*Math.cos(N*Math.PI/2);S=t*Math.sin(N*Math.PI/2);L=0;for(N=V.length;L<N;L++)Q=c(V[L],w[L],S),f(Q.x,Q.y,m+Y);J=0;for(U=P.length;J<U;J++)for(T=P[J],ea=ha[J],L=0,N=T.length;L<N;L++)Q=c(T[L],ea[L],S),G?f(Q.x,Q.y+I[H-1].y,I[H-1].x+Y):f(Q.x,Q.y,m+Y)}(function(){var a=q.length/3;if(x){var c=0*ba;for(L=0;L<fa;L++)X=M[L],g(X[2]+c,X[1]+c,X[0]+c);c=ba*(H+2*y);for(L=0;L<fa;L++)X=M[L],g(X[0]+c,X[1]+c,X[2]+c)}else{for(L=0;L<fa;L++)X=M[L],g(X[2],X[1],X[0]);for(L=0;L<fa;L++)X=\nM[L],g(X[0]+ba*H,X[1]+ba*H,X[2]+ba*H)}Z.addGroup(a,q.length/3-a,void 0!==b.material?b.material:0)})();(function(){var a=q.length/3,c=0;e(V,c);c+=V.length;J=0;for(U=P.length;J<U;J++)T=P[J],e(T,c),c+=T.length;Z.addGroup(a,q.length/3-a,void 0!==b.extrudeMaterial?b.extrudeMaterial:1)})();b.arrays||(this.setIndex(l),this.addAttribute(\"position\",new B(q,3)),this.addAttribute(\"uv\",new B(b.arrays.uv,2)))};cb.WorldUVGenerator={generateTopUV:function(a,b,c,d,e){a=b[3*d];d=b[3*d+1];var f=b[3*e];e=b[3*e+1];return[new C(b[3*\nc],b[3*c+1]),new C(a,d),new C(f,e)]},generateSideWallUV:function(a,b,c,d,e,f){a=b[3*c];var g=b[3*c+1];c=b[3*c+2];var h=b[3*d],k=b[3*d+1];d=b[3*d+2];var m=b[3*e],l=b[3*e+1];e=b[3*e+2];var n=b[3*f],p=b[3*f+1];b=b[3*f+2];return.01>Math.abs(g-k)?[new C(a,1-c),new C(h,1-d),new C(m,1-e),new C(n,1-b)]:[new C(g,1-c),new C(k,1-d),new C(l,1-e),new C(p,1-b)]}};Lc.prototype=Object.create(J.prototype);Lc.prototype.constructor=Lc;Ub.prototype=Object.create(Ga.prototype);Ub.prototype.constructor=Ub;Mc.prototype=\nObject.create(J.prototype);Mc.prototype.constructor=Mc;mb.prototype=Object.create(E.prototype);mb.prototype.constructor=mb;Nc.prototype=Object.create(J.prototype);Nc.prototype.constructor=Nc;Vb.prototype=Object.create(E.prototype);Vb.prototype.constructor=Vb;Oc.prototype=Object.create(J.prototype);Oc.prototype.constructor=Oc;Wb.prototype=Object.create(E.prototype);Wb.prototype.constructor=Wb;Xb.prototype=Object.create(J.prototype);Xb.prototype.constructor=Xb;Yb.prototype=Object.create(E.prototype);\nYb.prototype.constructor=Yb;Zb.prototype=Object.create(E.prototype);Zb.prototype.constructor=Zb;nb.prototype=Object.create(J.prototype);nb.prototype.constructor=nb;Ua.prototype=Object.create(E.prototype);Ua.prototype.constructor=Ua;Pc.prototype=Object.create(nb.prototype);Pc.prototype.constructor=Pc;Qc.prototype=Object.create(Ua.prototype);Qc.prototype.constructor=Qc;Rc.prototype=Object.create(J.prototype);Rc.prototype.constructor=Rc;$b.prototype=Object.create(E.prototype);$b.prototype.constructor=\n$b;var Ma=Object.freeze({WireframeGeometry:Mb,ParametricGeometry:Cc,ParametricBufferGeometry:Nb,TetrahedronGeometry:Ec,TetrahedronBufferGeometry:Ob,OctahedronGeometry:Fc,OctahedronBufferGeometry:lb,IcosahedronGeometry:Gc,IcosahedronBufferGeometry:Pb,DodecahedronGeometry:Hc,DodecahedronBufferGeometry:Qb,PolyhedronGeometry:Dc,PolyhedronBufferGeometry:za,TubeGeometry:Ic,TubeBufferGeometry:Rb,TorusKnotGeometry:Jc,TorusKnotBufferGeometry:Sb,TorusGeometry:Kc,TorusBufferGeometry:Tb,TextGeometry:Lc,TextBufferGeometry:Ub,\nSphereGeometry:Mc,SphereBufferGeometry:mb,RingGeometry:Nc,RingBufferGeometry:Vb,PlaneGeometry:vc,PlaneBufferGeometry:jb,LatheGeometry:Oc,LatheBufferGeometry:Wb,ShapeGeometry:Xb,ShapeBufferGeometry:Yb,ExtrudeGeometry:cb,ExtrudeBufferGeometry:Ga,EdgesGeometry:Zb,ConeGeometry:Pc,ConeBufferGeometry:Qc,CylinderGeometry:nb,CylinderBufferGeometry:Ua,CircleGeometry:Rc,CircleBufferGeometry:$b,BoxGeometry:Gb,BoxBufferGeometry:ib});ac.prototype=Object.create(ra.prototype);ac.prototype.constructor=ac;ac.prototype.isShadowMaterial=\n!0;bc.prototype=Object.create(ra.prototype);bc.prototype.constructor=bc;bc.prototype.isRawShaderMaterial=!0;Pa.prototype=Object.create(U.prototype);Pa.prototype.constructor=Pa;Pa.prototype.isMeshStandardMaterial=!0;Pa.prototype.copy=function(a){U.prototype.copy.call(this,a);this.defines={STANDARD:\"\"};this.color.copy(a.color);this.roughness=a.roughness;this.metalness=a.metalness;this.map=a.map;this.lightMap=a.lightMap;this.lightMapIntensity=a.lightMapIntensity;this.aoMap=a.aoMap;this.aoMapIntensity=\na.aoMapIntensity;this.emissive.copy(a.emissive);this.emissiveMap=a.emissiveMap;this.emissiveIntensity=a.emissiveIntensity;this.bumpMap=a.bumpMap;this.bumpScale=a.bumpScale;this.normalMap=a.normalMap;this.normalScale.copy(a.normalScale);this.displacementMap=a.displacementMap;this.displacementScale=a.displacementScale;this.displacementBias=a.displacementBias;this.roughnessMap=a.roughnessMap;this.metalnessMap=a.metalnessMap;this.alphaMap=a.alphaMap;this.envMap=a.envMap;this.envMapIntensity=a.envMapIntensity;\nthis.refractionRatio=a.refractionRatio;this.wireframe=a.wireframe;this.wireframeLinewidth=a.wireframeLinewidth;this.wireframeLinecap=a.wireframeLinecap;this.wireframeLinejoin=a.wireframeLinejoin;this.skinning=a.skinning;this.morphTargets=a.morphTargets;this.morphNormals=a.morphNormals;return this};ob.prototype=Object.create(Pa.prototype);ob.prototype.constructor=ob;ob.prototype.isMeshPhysicalMaterial=!0;ob.prototype.copy=function(a){Pa.prototype.copy.call(this,a);this.defines={PHYSICAL:\"\"};this.reflectivity=\na.reflectivity;this.clearCoat=a.clearCoat;this.clearCoatRoughness=a.clearCoatRoughness;return this};Ja.prototype=Object.create(U.prototype);Ja.prototype.constructor=Ja;Ja.prototype.isMeshPhongMaterial=!0;Ja.prototype.copy=function(a){U.prototype.copy.call(this,a);this.color.copy(a.color);this.specular.copy(a.specular);this.shininess=a.shininess;this.map=a.map;this.lightMap=a.lightMap;this.lightMapIntensity=a.lightMapIntensity;this.aoMap=a.aoMap;this.aoMapIntensity=a.aoMapIntensity;this.emissive.copy(a.emissive);\nthis.emissiveMap=a.emissiveMap;this.emissiveIntensity=a.emissiveIntensity;this.bumpMap=a.bumpMap;this.bumpScale=a.bumpScale;this.normalMap=a.normalMap;this.normalScale.copy(a.normalScale);this.displacementMap=a.displacementMap;this.displacementScale=a.displacementScale;this.displacementBias=a.displacementBias;this.specularMap=a.specularMap;this.alphaMap=a.alphaMap;this.envMap=a.envMap;this.combine=a.combine;this.reflectivity=a.reflectivity;this.refractionRatio=a.refractionRatio;this.wireframe=a.wireframe;\nthis.wireframeLinewidth=a.wireframeLinewidth;this.wireframeLinecap=a.wireframeLinecap;this.wireframeLinejoin=a.wireframeLinejoin;this.skinning=a.skinning;this.morphTargets=a.morphTargets;this.morphNormals=a.morphNormals;return this};pb.prototype=Object.create(Ja.prototype);pb.prototype.constructor=pb;pb.prototype.isMeshToonMaterial=!0;pb.prototype.copy=function(a){Ja.prototype.copy.call(this,a);this.gradientMap=a.gradientMap;return this};qb.prototype=Object.create(U.prototype);qb.prototype.constructor=\nqb;qb.prototype.isMeshNormalMaterial=!0;qb.prototype.copy=function(a){U.prototype.copy.call(this,a);this.bumpMap=a.bumpMap;this.bumpScale=a.bumpScale;this.normalMap=a.normalMap;this.normalScale.copy(a.normalScale);this.displacementMap=a.displacementMap;this.displacementScale=a.displacementScale;this.displacementBias=a.displacementBias;this.wireframe=a.wireframe;this.wireframeLinewidth=a.wireframeLinewidth;this.skinning=a.skinning;this.morphTargets=a.morphTargets;this.morphNormals=a.morphNormals;return this};\nrb.prototype=Object.create(U.prototype);rb.prototype.constructor=rb;rb.prototype.isMeshLambertMaterial=!0;rb.prototype.copy=function(a){U.prototype.copy.call(this,a);this.color.copy(a.color);this.map=a.map;this.lightMap=a.lightMap;this.lightMapIntensity=a.lightMapIntensity;this.aoMap=a.aoMap;this.aoMapIntensity=a.aoMapIntensity;this.emissive.copy(a.emissive);this.emissiveMap=a.emissiveMap;this.emissiveIntensity=a.emissiveIntensity;this.specularMap=a.specularMap;this.alphaMap=a.alphaMap;this.envMap=\na.envMap;this.combine=a.combine;this.reflectivity=a.reflectivity;this.refractionRatio=a.refractionRatio;this.wireframe=a.wireframe;this.wireframeLinewidth=a.wireframeLinewidth;this.wireframeLinecap=a.wireframeLinecap;this.wireframeLinejoin=a.wireframeLinejoin;this.skinning=a.skinning;this.morphTargets=a.morphTargets;this.morphNormals=a.morphNormals;return this};sb.prototype=Object.create(U.prototype);sb.prototype.constructor=sb;sb.prototype.isLineDashedMaterial=!0;sb.prototype.copy=function(a){U.prototype.copy.call(this,\na);this.color.copy(a.color);this.linewidth=a.linewidth;this.scale=a.scale;this.dashSize=a.dashSize;this.gapSize=a.gapSize;return this};var mg=Object.freeze({ShadowMaterial:ac,SpriteMaterial:bb,RawShaderMaterial:bc,ShaderMaterial:ra,PointsMaterial:Fa,MeshPhysicalMaterial:ob,MeshStandardMaterial:Pa,MeshPhongMaterial:Ja,MeshToonMaterial:pb,MeshNormalMaterial:qb,MeshLambertMaterial:rb,MeshDepthMaterial:Za,MeshBasicMaterial:ya,LineDashedMaterial:sb,LineBasicMaterial:ea,Material:U}),ed={enabled:!1,files:{},\nadd:function(a,b){!1!==this.enabled&&(this.files[a]=b)},get:function(a){if(!1!==this.enabled)return this.files[a]},remove:function(a){delete this.files[a]},clear:function(){this.files={}}},va=new Zd;Object.assign(Ka.prototype,{load:function(a,b,c,d){void 0===a&&(a=\"\");void 0!==this.path&&(a=this.path+a);var e=this,f=ed.get(a);if(void 0!==f)return e.manager.itemStart(a),setTimeout(function(){b&&b(f);e.manager.itemEnd(a)},0),f;var g=a.match(/^data:(.*?)(;base64)?,(.*)$/);if(g){var h=g[1],k=!!g[2],g=\ng[3],g=window.decodeURIComponent(g);k&&(g=window.atob(g));try{var m,l=(this.responseType||\"\").toLowerCase();switch(l){case \"arraybuffer\":case \"blob\":m=new ArrayBuffer(g.length);for(var n=new Uint8Array(m),k=0;k<g.length;k++)n[k]=g.charCodeAt(k);\"blob\"===l&&(m=new Blob([m],{type:h}));break;case \"document\":m=(new DOMParser).parseFromString(g,h);break;case \"json\":m=JSON.parse(g);break;default:m=g}window.setTimeout(function(){b&&b(m);e.manager.itemEnd(a)},0)}catch(r){window.setTimeout(function(){d&&d(r);\ne.manager.itemEnd(a);e.manager.itemError(a)},0)}}else{var p=new XMLHttpRequest;p.open(\"GET\",a,!0);p.addEventListener(\"load\",function(c){var f=c.target.response;ed.add(a,f);200===this.status?(b&&b(f),e.manager.itemEnd(a)):0===this.status?(console.warn(\"THREE.FileLoader: HTTP Status 0 received.\"),b&&b(f),e.manager.itemEnd(a)):(d&&d(c),e.manager.itemEnd(a),e.manager.itemError(a))},!1);void 0!==c&&p.addEventListener(\"progress\",function(a){c(a)},!1);p.addEventListener(\"error\",function(b){d&&d(b);e.manager.itemEnd(a);\ne.manager.itemError(a)},!1);void 0!==this.responseType&&(p.responseType=this.responseType);void 0!==this.withCredentials&&(p.withCredentials=this.withCredentials);p.overrideMimeType&&p.overrideMimeType(void 0!==this.mimeType?this.mimeType:\"text/plain\");for(h in this.requestHeader)p.setRequestHeader(h,this.requestHeader[h]);p.send(null)}e.manager.itemStart(a);return p},setPath:function(a){this.path=a;return this},setResponseType:function(a){this.responseType=a;return this},setWithCredentials:function(a){this.withCredentials=\na;return this},setMimeType:function(a){this.mimeType=a;return this},setRequestHeader:function(a){this.requestHeader=a;return this}});Object.assign(Oe.prototype,{load:function(a,b,c,d){function e(e){k.load(a[e],function(a){a=f._parser(a,!0);g[e]={width:a.width,height:a.height,format:a.format,mipmaps:a.mipmaps};m+=1;6===m&&(1===a.mipmapCount&&(h.minFilter=1006),h.format=a.format,h.needsUpdate=!0,b&&b(h))},c,d)}var f=this,g=[],h=new Lb;h.image=g;var k=new Ka(this.manager);k.setPath(this.path);k.setResponseType(\"arraybuffer\");\nif(Array.isArray(a))for(var m=0,l=0,n=a.length;l<n;++l)e(l);else k.load(a,function(a){a=f._parser(a,!0);if(a.isCubemap)for(var c=a.mipmaps.length/a.mipmapCount,d=0;d<c;d++){g[d]={mipmaps:[]};for(var e=0;e<a.mipmapCount;e++)g[d].mipmaps.push(a.mipmaps[d*a.mipmapCount+e]),g[d].format=a.format,g[d].width=a.width,g[d].height=a.height}else h.image.width=a.width,h.image.height=a.height,h.mipmaps=a.mipmaps;1===a.mipmapCount&&(h.minFilter=1006);h.format=a.format;h.needsUpdate=!0;b&&b(h)},c,d);return h},setPath:function(a){this.path=\na;return this}});Object.assign($d.prototype,{load:function(a,b,c,d){var e=this,f=new db,g=new Ka(this.manager);g.setResponseType(\"arraybuffer\");g.load(a,function(a){if(a=e._parser(a))void 0!==a.image?f.image=a.image:void 0!==a.data&&(f.image.width=a.width,f.image.height=a.height,f.image.data=a.data),f.wrapS=void 0!==a.wrapS?a.wrapS:1001,f.wrapT=void 0!==a.wrapT?a.wrapT:1001,f.magFilter=void 0!==a.magFilter?a.magFilter:1006,f.minFilter=void 0!==a.minFilter?a.minFilter:1008,f.anisotropy=void 0!==a.anisotropy?\na.anisotropy:1,void 0!==a.format&&(f.format=a.format),void 0!==a.type&&(f.type=a.type),void 0!==a.mipmaps&&(f.mipmaps=a.mipmaps),1===a.mipmapCount&&(f.minFilter=1006),f.needsUpdate=!0,b&&b(f,a)},c,d);return f}});Object.assign(Sc.prototype,{load:function(a,b,c,d){void 0===a&&(a=\"\");void 0!==this.path&&(a=this.path+a);var e=this,f=ed.get(a);if(void 0!==f)return e.manager.itemStart(a),setTimeout(function(){b&&b(f);e.manager.itemEnd(a)},0),f;c=document.createElementNS(\"http://www.w3.org/1999/xhtml\",\"img\");\nc.addEventListener(\"load\",function(){ed.add(a,this);b&&b(this);e.manager.itemEnd(a)},!1);c.addEventListener(\"error\",function(b){d&&d(b);e.manager.itemEnd(a);e.manager.itemError(a)},!1);\"data:\"!==a.substr(0,5)&&void 0!==this.crossOrigin&&(c.crossOrigin=this.crossOrigin);e.manager.itemStart(a);c.src=a;return c},setCrossOrigin:function(a){this.crossOrigin=a;return this},setPath:function(a){this.path=a;return this}});Object.assign(ae.prototype,{load:function(a,b,c,d){function e(c){g.load(a[c],function(a){f.images[c]=\na;h++;6===h&&(f.needsUpdate=!0,b&&b(f))},void 0,d)}var f=new Xa,g=new Sc(this.manager);g.setCrossOrigin(this.crossOrigin);g.setPath(this.path);var h=0;for(c=0;c<a.length;++c)e(c);return f},setCrossOrigin:function(a){this.crossOrigin=a;return this},setPath:function(a){this.path=a;return this}});Object.assign(rd.prototype,{load:function(a,b,c,d){var e=new Sc(this.manager);e.setCrossOrigin(this.crossOrigin);e.setPath(this.path);var f=new ba;f.image=e.load(a,function(){var c=0<a.search(/\\.(jpg|jpeg)$/)||\n0===a.search(/^data\\:image\\/jpeg/);f.format=c?1022:1023;f.needsUpdate=!0;void 0!==b&&b(f)},c,d);return f},setCrossOrigin:function(a){this.crossOrigin=a;return this},setPath:function(a){this.path=a;return this}});na.prototype=Object.assign(Object.create(z.prototype),{constructor:na,isLight:!0,copy:function(a){z.prototype.copy.call(this,a);this.color.copy(a.color);this.intensity=a.intensity;return this},toJSON:function(a){a=z.prototype.toJSON.call(this,a);a.object.color=this.color.getHex();a.object.intensity=\nthis.intensity;void 0!==this.groundColor&&(a.object.groundColor=this.groundColor.getHex());void 0!==this.distance&&(a.object.distance=this.distance);void 0!==this.angle&&(a.object.angle=this.angle);void 0!==this.decay&&(a.object.decay=this.decay);void 0!==this.penumbra&&(a.object.penumbra=this.penumbra);void 0!==this.shadow&&(a.object.shadow=this.shadow.toJSON());return a}});sd.prototype=Object.assign(Object.create(na.prototype),{constructor:sd,isHemisphereLight:!0,copy:function(a){na.prototype.copy.call(this,\na);this.groundColor.copy(a.groundColor);return this}});Object.assign(tb.prototype,{copy:function(a){this.camera=a.camera.clone();this.bias=a.bias;this.radius=a.radius;this.mapSize.copy(a.mapSize);return this},clone:function(){return(new this.constructor).copy(this)},toJSON:function(){var a={};0!==this.bias&&(a.bias=this.bias);1!==this.radius&&(a.radius=this.radius);if(512!==this.mapSize.x||512!==this.mapSize.y)a.mapSize=this.mapSize.toArray();a.camera=this.camera.toJSON(!1).object;delete a.camera.matrix;\nreturn a}});td.prototype=Object.assign(Object.create(tb.prototype),{constructor:td,isSpotLightShadow:!0,update:function(a){var b=this.camera,c=2*Y.RAD2DEG*a.angle,d=this.mapSize.width/this.mapSize.height;a=a.distance||b.far;if(c!==b.fov||d!==b.aspect||a!==b.far)b.fov=c,b.aspect=d,b.far=a,b.updateProjectionMatrix()}});ud.prototype=Object.assign(Object.create(na.prototype),{constructor:ud,isSpotLight:!0,copy:function(a){na.prototype.copy.call(this,a);this.distance=a.distance;this.angle=a.angle;this.penumbra=\na.penumbra;this.decay=a.decay;this.target=a.target.clone();this.shadow=a.shadow.clone();return this}});vd.prototype=Object.assign(Object.create(na.prototype),{constructor:vd,isPointLight:!0,copy:function(a){na.prototype.copy.call(this,a);this.distance=a.distance;this.decay=a.decay;this.shadow=a.shadow.clone();return this}});wd.prototype=Object.assign(Object.create(tb.prototype),{constructor:wd});xd.prototype=Object.assign(Object.create(na.prototype),{constructor:xd,isDirectionalLight:!0,copy:function(a){na.prototype.copy.call(this,\na);this.target=a.target.clone();this.shadow=a.shadow.clone();return this}});yd.prototype=Object.assign(Object.create(na.prototype),{constructor:yd,isAmbientLight:!0});zd.prototype=Object.assign(Object.create(na.prototype),{constructor:zd,isRectAreaLight:!0,copy:function(a){na.prototype.copy.call(this,a);this.width=a.width;this.height=a.height;return this},toJSON:function(a){a=na.prototype.toJSON.call(this,a);a.object.width=this.width;a.object.height=this.height;return a}});var ia={arraySlice:function(a,\nb,c){return ia.isTypedArray(a)?new a.constructor(a.subarray(b,void 0!==c?c:a.length)):a.slice(b,c)},convertArray:function(a,b,c){return!a||!c&&a.constructor===b?a:\"number\"===typeof b.BYTES_PER_ELEMENT?new b(a):Array.prototype.slice.call(a)},isTypedArray:function(a){return ArrayBuffer.isView(a)&&!(a instanceof DataView)},getKeyframeOrder:function(a){for(var b=a.length,c=Array(b),d=0;d!==b;++d)c[d]=d;c.sort(function(b,c){return a[b]-a[c]});return c},sortedArray:function(a,b,c){for(var d=a.length,e=\nnew a.constructor(d),f=0,g=0;g!==d;++f)for(var h=c[f]*b,k=0;k!==b;++k)e[g++]=a[h+k];return e},flattenJSON:function(a,b,c,d){for(var e=1,f=a[0];void 0!==f&&void 0===f[d];)f=a[e++];if(void 0!==f){var g=f[d];if(void 0!==g)if(Array.isArray(g)){do g=f[d],void 0!==g&&(b.push(f.time),c.push.apply(c,g)),f=a[e++];while(void 0!==f)}else if(void 0!==g.toArray){do g=f[d],void 0!==g&&(b.push(f.time),g.toArray(c,c.length)),f=a[e++];while(void 0!==f)}else{do g=f[d],void 0!==g&&(b.push(f.time),c.push(g)),f=a[e++];\nwhile(void 0!==f)}}}};Object.assign(wa.prototype,{evaluate:function(a){var b=this.parameterPositions,c=this._cachedIndex,d=b[c],e=b[c-1];a:{b:{c:{d:if(!(a<d)){for(var f=c+2;;){if(void 0===d){if(a<e)break d;this._cachedIndex=c=b.length;return this.afterEnd_(c-1,a,e)}if(c===f)break;e=d;d=b[++c];if(a<d)break b}d=b.length;break c}if(a>=e)break a;else{f=b[1];a<f&&(c=2,e=f);for(f=c-2;;){if(void 0===e)return this._cachedIndex=0,this.beforeStart_(0,a,d);if(c===f)break;d=e;e=b[--c-1];if(a>=e)break b}d=c;c=\n0}}for(;c<d;)e=c+d>>>1,a<b[e]?d=e:c=e+1;d=b[c];e=b[c-1];if(void 0===e)return this._cachedIndex=0,this.beforeStart_(0,a,d);if(void 0===d)return this._cachedIndex=c=b.length,this.afterEnd_(c-1,e,a)}this._cachedIndex=c;this.intervalChanged_(c,e,d)}return this.interpolate_(c,e,a,d)},settings:null,DefaultSettings_:{},getSettings_:function(){return this.settings||this.DefaultSettings_},copySampleValue_:function(a){var b=this.resultBuffer,c=this.sampleValues,d=this.valueSize;a*=d;for(var e=0;e!==d;++e)b[e]=\nc[a+e];return b},interpolate_:function(a,b,c,d){throw Error(\"call to abstract method\");},intervalChanged_:function(a,b,c){}});Object.assign(wa.prototype,{beforeStart_:wa.prototype.copySampleValue_,afterEnd_:wa.prototype.copySampleValue_});Ad.prototype=Object.assign(Object.create(wa.prototype),{constructor:Ad,DefaultSettings_:{endingStart:2400,endingEnd:2400},intervalChanged_:function(a,b,c){var d=this.parameterPositions,e=a-2,f=a+1,g=d[e],h=d[f];if(void 0===g)switch(this.getSettings_().endingStart){case 2401:e=\na;g=2*b-c;break;case 2402:e=d.length-2;g=b+d[e]-d[e+1];break;default:e=a,g=c}if(void 0===h)switch(this.getSettings_().endingEnd){case 2401:f=a;h=2*c-b;break;case 2402:f=1;h=c+d[1]-d[0];break;default:f=a-1,h=b}a=.5*(c-b);d=this.valueSize;this._weightPrev=a/(b-g);this._weightNext=a/(h-c);this._offsetPrev=e*d;this._offsetNext=f*d},interpolate_:function(a,b,c,d){var e=this.resultBuffer,f=this.sampleValues,g=this.valueSize;a*=g;var h=a-g,k=this._offsetPrev,m=this._offsetNext,l=this._weightPrev,n=this._weightNext,\np=(c-b)/(d-b);c=p*p;d=c*p;b=-l*d+2*l*c-l*p;l=(1+l)*d+(-1.5-2*l)*c+(-.5+l)*p+1;p=(-1-n)*d+(1.5+n)*c+.5*p;n=n*d-n*c;for(c=0;c!==g;++c)e[c]=b*f[k+c]+l*f[h+c]+p*f[a+c]+n*f[m+c];return e}});Tc.prototype=Object.assign(Object.create(wa.prototype),{constructor:Tc,interpolate_:function(a,b,c,d){var e=this.resultBuffer,f=this.sampleValues,g=this.valueSize;a*=g;var h=a-g;b=(c-b)/(d-b);c=1-b;for(d=0;d!==g;++d)e[d]=f[h+d]*c+f[a+d]*b;return e}});Bd.prototype=Object.assign(Object.create(wa.prototype),{constructor:Bd,\ninterpolate_:function(a,b,c,d){return this.copySampleValue_(a-1)}});var Wa;Wa={TimeBufferType:Float32Array,ValueBufferType:Float32Array,DefaultInterpolation:2301,InterpolantFactoryMethodDiscrete:function(a){return new Bd(this.times,this.values,this.getValueSize(),a)},InterpolantFactoryMethodLinear:function(a){return new Tc(this.times,this.values,this.getValueSize(),a)},InterpolantFactoryMethodSmooth:function(a){return new Ad(this.times,this.values,this.getValueSize(),a)},setInterpolation:function(a){var b;\nswitch(a){case 2300:b=this.InterpolantFactoryMethodDiscrete;break;case 2301:b=this.InterpolantFactoryMethodLinear;break;case 2302:b=this.InterpolantFactoryMethodSmooth}if(void 0===b){b=\"unsupported interpolation for \"+this.ValueTypeName+\" keyframe track named \"+this.name;if(void 0===this.createInterpolant)if(a!==this.DefaultInterpolation)this.setInterpolation(this.DefaultInterpolation);else throw Error(b);console.warn(\"THREE.KeyframeTrackPrototype:\",b)}else this.createInterpolant=b},getInterpolation:function(){switch(this.createInterpolant){case this.InterpolantFactoryMethodDiscrete:return 2300;\ncase this.InterpolantFactoryMethodLinear:return 2301;case this.InterpolantFactoryMethodSmooth:return 2302}},getValueSize:function(){return this.values.length/this.times.length},shift:function(a){if(0!==a)for(var b=this.times,c=0,d=b.length;c!==d;++c)b[c]+=a;return this},scale:function(a){if(1!==a)for(var b=this.times,c=0,d=b.length;c!==d;++c)b[c]*=a;return this},trim:function(a,b){for(var c=this.times,d=c.length,e=0,f=d-1;e!==d&&c[e]<a;)++e;for(;-1!==f&&c[f]>b;)--f;++f;if(0!==e||f!==d)e>=f&&(f=Math.max(f,\n1),e=f-1),d=this.getValueSize(),this.times=ia.arraySlice(c,e,f),this.values=ia.arraySlice(this.values,e*d,f*d);return this},validate:function(){var a=!0,b=this.getValueSize();0!==b-Math.floor(b)&&(console.error(\"THREE.KeyframeTrackPrototype: Invalid value size in track.\",this),a=!1);var c=this.times,b=this.values,d=c.length;0===d&&(console.error(\"THREE.KeyframeTrackPrototype: Track is empty.\",this),a=!1);for(var e=null,f=0;f!==d;f++){var g=c[f];if(\"number\"===typeof g&&isNaN(g)){console.error(\"THREE.KeyframeTrackPrototype: Time is not a valid number.\",\nthis,f,g);a=!1;break}if(null!==e&&e>g){console.error(\"THREE.KeyframeTrackPrototype: Out of order keys.\",this,f,g,e);a=!1;break}e=g}if(void 0!==b&&ia.isTypedArray(b))for(f=0,c=b.length;f!==c;++f)if(d=b[f],isNaN(d)){console.error(\"THREE.KeyframeTrackPrototype: Value is not a valid number.\",this,f,d);a=!1;break}return a},optimize:function(){for(var a=this.times,b=this.values,c=this.getValueSize(),d=2302===this.getInterpolation(),e=1,f=a.length-1,g=1;g<f;++g){var h=!1,k=a[g];if(k!==a[g+1]&&(1!==g||k!==\nk[0]))if(d)h=!0;else for(var m=g*c,l=m-c,n=m+c,k=0;k!==c;++k){var p=b[m+k];if(p!==b[l+k]||p!==b[n+k]){h=!0;break}}if(h){if(g!==e)for(a[e]=a[g],h=g*c,m=e*c,k=0;k!==c;++k)b[m+k]=b[h+k];++e}}if(0<f){a[e]=a[f];h=f*c;m=e*c;for(k=0;k!==c;++k)b[m+k]=b[h+k];++e}e!==a.length&&(this.times=ia.arraySlice(a,0,e),this.values=ia.arraySlice(b,0,e*c));return this}};cc.prototype=Object.assign(Object.create(Wa),{constructor:cc,ValueTypeName:\"vector\"});Cd.prototype=Object.assign(Object.create(wa.prototype),{constructor:Cd,\ninterpolate_:function(a,b,c,d){var e=this.resultBuffer,f=this.sampleValues,g=this.valueSize;a*=g;b=(c-b)/(d-b);for(c=a+g;a!==c;a+=4)oa.slerpFlat(e,0,f,a-g,f,a,b);return e}});Uc.prototype=Object.assign(Object.create(Wa),{constructor:Uc,ValueTypeName:\"quaternion\",DefaultInterpolation:2301,InterpolantFactoryMethodLinear:function(a){return new Cd(this.times,this.values,this.getValueSize(),a)},InterpolantFactoryMethodSmooth:void 0});dc.prototype=Object.assign(Object.create(Wa),{constructor:dc,ValueTypeName:\"number\"});\nDd.prototype=Object.assign(Object.create(Wa),{constructor:Dd,ValueTypeName:\"string\",ValueBufferType:Array,DefaultInterpolation:2300,InterpolantFactoryMethodLinear:void 0,InterpolantFactoryMethodSmooth:void 0});Ed.prototype=Object.assign(Object.create(Wa),{constructor:Ed,ValueTypeName:\"bool\",ValueBufferType:Array,DefaultInterpolation:2300,InterpolantFactoryMethodLinear:void 0,InterpolantFactoryMethodSmooth:void 0});Fd.prototype=Object.assign(Object.create(Wa),{constructor:Fd,ValueTypeName:\"color\"});\nvb.prototype=Wa;Wa.constructor=vb;Object.assign(vb,{parse:function(a){if(void 0===a.type)throw Error(\"track type undefined, can not parse\");var b=vb._getTrackTypeForValueTypeName(a.type);if(void 0===a.times){var c=[],d=[];ia.flattenJSON(a.keys,c,d,\"value\");a.times=c;a.values=d}return void 0!==b.parse?b.parse(a):new b(a.name,a.times,a.values,a.interpolation)},toJSON:function(a){var b=a.constructor;if(void 0!==b.toJSON)b=b.toJSON(a);else{var b={name:a.name,times:ia.convertArray(a.times,Array),values:ia.convertArray(a.values,\nArray)},c=a.getInterpolation();c!==a.DefaultInterpolation&&(b.interpolation=c)}b.type=a.ValueTypeName;return b},_getTrackTypeForValueTypeName:function(a){switch(a.toLowerCase()){case \"scalar\":case \"double\":case \"float\":case \"number\":case \"integer\":return dc;case \"vector\":case \"vector2\":case \"vector3\":case \"vector4\":return cc;case \"color\":return Fd;case \"quaternion\":return Uc;case \"bool\":case \"boolean\":return Ed;case \"string\":return Dd}throw Error(\"Unsupported typeName: \"+a);}});Object.assign(Da,{parse:function(a){for(var b=\n[],c=a.tracks,d=1/(a.fps||1),e=0,f=c.length;e!==f;++e)b.push(vb.parse(c[e]).scale(d));return new Da(a.name,a.duration,b)},toJSON:function(a){var b=[],c=a.tracks;a={name:a.name,duration:a.duration,tracks:b};for(var d=0,e=c.length;d!==e;++d)b.push(vb.toJSON(c[d]));return a},CreateFromMorphTargetSequence:function(a,b,c,d){for(var e=b.length,f=[],g=0;g<e;g++){var h=[],k=[];h.push((g+e-1)%e,g,(g+1)%e);k.push(0,1,0);var m=ia.getKeyframeOrder(h),h=ia.sortedArray(h,1,m),k=ia.sortedArray(k,1,m);d||0!==h[0]||\n(h.push(e),k.push(k[0]));f.push((new dc(\".morphTargetInfluences[\"+b[g].name+\"]\",h,k)).scale(1/c))}return new Da(a,-1,f)},findByName:function(a,b){var c=a;Array.isArray(a)||(c=a.geometry&&a.geometry.animations||a.animations);for(var d=0;d<c.length;d++)if(c[d].name===b)return c[d];return null},CreateClipsFromMorphTargetSequences:function(a,b,c){for(var d={},e=/^([\\w-]*?)([\\d]+)$/,f=0,g=a.length;f<g;f++){var h=a[f],k=h.name.match(e);if(k&&1<k.length){var m=k[1];(k=d[m])||(d[m]=k=[]);k.push(h)}}a=[];\nfor(m in d)a.push(Da.CreateFromMorphTargetSequence(m,d[m],b,c));return a},parseAnimation:function(a,b){if(!a)return console.error(\"THREE.AnimationClip: No animation in JSONLoader data.\"),null;for(var c=function(a,b,c,d,e){if(0!==c.length){var f=[],g=[];ia.flattenJSON(c,f,g,d);0!==f.length&&e.push(new a(b,f,g))}},d=[],e=a.name||\"default\",f=a.length||-1,g=a.fps||30,h=a.hierarchy||[],k=0;k<h.length;k++){var m=h[k].keys;if(m&&0!==m.length)if(m[0].morphTargets){for(var f={},l=0;l<m.length;l++)if(m[l].morphTargets)for(var n=\n0;n<m[l].morphTargets.length;n++)f[m[l].morphTargets[n]]=-1;for(var p in f){for(var r=[],z=[],n=0;n!==m[l].morphTargets.length;++n){var t=m[l];r.push(t.time);z.push(t.morphTarget===p?1:0)}d.push(new dc(\".morphTargetInfluence[\"+p+\"]\",r,z))}f=f.length*(g||1)}else l=\".bones[\"+b[k].name+\"]\",c(cc,l+\".position\",m,\"pos\",d),c(Uc,l+\".quaternion\",m,\"rot\",d),c(cc,l+\".scale\",m,\"scl\",d)}return 0===d.length?null:new Da(e,f,d)}});Object.assign(Da.prototype,{resetDuration:function(){for(var a=0,b=0,c=this.tracks.length;b!==\nc;++b)var d=this.tracks[b],a=Math.max(a,d.times[d.times.length-1]);this.duration=a},trim:function(){for(var a=0;a<this.tracks.length;a++)this.tracks[a].trim(0,this.duration);return this},optimize:function(){for(var a=0;a<this.tracks.length;a++)this.tracks[a].optimize();return this}});Object.assign(Gd.prototype,{load:function(a,b,c,d){var e=this;(new Ka(e.manager)).load(a,function(a){b(e.parse(JSON.parse(a)))},c,d)},setTextures:function(a){this.textures=a},parse:function(a){function b(a){void 0===\nc[a]&&console.warn(\"THREE.MaterialLoader: Undefined texture\",a);return c[a]}var c=this.textures,d=new mg[a.type];void 0!==a.uuid&&(d.uuid=a.uuid);void 0!==a.name&&(d.name=a.name);void 0!==a.color&&d.color.setHex(a.color);void 0!==a.roughness&&(d.roughness=a.roughness);void 0!==a.metalness&&(d.metalness=a.metalness);void 0!==a.emissive&&d.emissive.setHex(a.emissive);void 0!==a.specular&&d.specular.setHex(a.specular);void 0!==a.shininess&&(d.shininess=a.shininess);void 0!==a.clearCoat&&(d.clearCoat=\na.clearCoat);void 0!==a.clearCoatRoughness&&(d.clearCoatRoughness=a.clearCoatRoughness);void 0!==a.uniforms&&(d.uniforms=a.uniforms);void 0!==a.vertexShader&&(d.vertexShader=a.vertexShader);void 0!==a.fragmentShader&&(d.fragmentShader=a.fragmentShader);void 0!==a.vertexColors&&(d.vertexColors=a.vertexColors);void 0!==a.fog&&(d.fog=a.fog);void 0!==a.shading&&(d.shading=a.shading);void 0!==a.blending&&(d.blending=a.blending);void 0!==a.side&&(d.side=a.side);void 0!==a.opacity&&(d.opacity=a.opacity);\nvoid 0!==a.transparent&&(d.transparent=a.transparent);void 0!==a.alphaTest&&(d.alphaTest=a.alphaTest);void 0!==a.depthTest&&(d.depthTest=a.depthTest);void 0!==a.depthWrite&&(d.depthWrite=a.depthWrite);void 0!==a.colorWrite&&(d.colorWrite=a.colorWrite);void 0!==a.wireframe&&(d.wireframe=a.wireframe);void 0!==a.wireframeLinewidth&&(d.wireframeLinewidth=a.wireframeLinewidth);void 0!==a.wireframeLinecap&&(d.wireframeLinecap=a.wireframeLinecap);void 0!==a.wireframeLinejoin&&(d.wireframeLinejoin=a.wireframeLinejoin);\nvoid 0!==a.skinning&&(d.skinning=a.skinning);void 0!==a.morphTargets&&(d.morphTargets=a.morphTargets);void 0!==a.size&&(d.size=a.size);void 0!==a.sizeAttenuation&&(d.sizeAttenuation=a.sizeAttenuation);void 0!==a.map&&(d.map=b(a.map));void 0!==a.alphaMap&&(d.alphaMap=b(a.alphaMap),d.transparent=!0);void 0!==a.bumpMap&&(d.bumpMap=b(a.bumpMap));void 0!==a.bumpScale&&(d.bumpScale=a.bumpScale);void 0!==a.normalMap&&(d.normalMap=b(a.normalMap));if(void 0!==a.normalScale){var e=a.normalScale;!1===Array.isArray(e)&&\n(e=[e,e]);d.normalScale=(new C).fromArray(e)}void 0!==a.displacementMap&&(d.displacementMap=b(a.displacementMap));void 0!==a.displacementScale&&(d.displacementScale=a.displacementScale);void 0!==a.displacementBias&&(d.displacementBias=a.displacementBias);void 0!==a.roughnessMap&&(d.roughnessMap=b(a.roughnessMap));void 0!==a.metalnessMap&&(d.metalnessMap=b(a.metalnessMap));void 0!==a.emissiveMap&&(d.emissiveMap=b(a.emissiveMap));void 0!==a.emissiveIntensity&&(d.emissiveIntensity=a.emissiveIntensity);\nvoid 0!==a.specularMap&&(d.specularMap=b(a.specularMap));void 0!==a.envMap&&(d.envMap=b(a.envMap));void 0!==a.reflectivity&&(d.reflectivity=a.reflectivity);void 0!==a.lightMap&&(d.lightMap=b(a.lightMap));void 0!==a.lightMapIntensity&&(d.lightMapIntensity=a.lightMapIntensity);void 0!==a.aoMap&&(d.aoMap=b(a.aoMap));void 0!==a.aoMapIntensity&&(d.aoMapIntensity=a.aoMapIntensity);void 0!==a.gradientMap&&(d.gradientMap=b(a.gradientMap));return d}});Object.assign(be.prototype,{load:function(a,b,c,d){var e=\nthis;(new Ka(e.manager)).load(a,function(a){b(e.parse(JSON.parse(a)))},c,d)},parse:function(a){var b=new E,c=a.data.index;void 0!==c&&(c=new ef[c.type](c.array),b.setIndex(new Z(c,1)));var d=a.data.attributes,e;for(e in d){var f=d[e],c=new ef[f.type](f.array);b.addAttribute(e,new Z(c,f.itemSize,f.normalized))}e=a.data.groups||a.data.drawcalls||a.data.offsets;if(void 0!==e)for(c=0,d=e.length;c!==d;++c)f=e[c],b.addGroup(f.start,f.count,f.materialIndex);a=a.data.boundingSphere;void 0!==a&&(e=new n,void 0!==\na.center&&e.fromArray(a.center),b.boundingSphere=new Ea(e,a.radius));return b}});var ef={Int8Array:Int8Array,Uint8Array:Uint8Array,Uint8ClampedArray:\"undefined\"!==typeof Uint8ClampedArray?Uint8ClampedArray:Uint8Array,Int16Array:Int16Array,Uint16Array:Uint16Array,Int32Array:Int32Array,Uint32Array:Uint32Array,Float32Array:Float32Array,Float64Array:Float64Array};ec.Handlers={handlers:[],add:function(a,b){this.handlers.push(a,b)},get:function(a){for(var b=this.handlers,c=0,d=b.length;c<d;c+=2){var e=\nb[c+1];if(b[c].test(a))return e}return null}};Object.assign(ec.prototype,{crossOrigin:void 0,extractUrlBase:function(a){a=a.split(\"/\");if(1===a.length)return\"./\";a.pop();return a.join(\"/\")+\"/\"},initMaterials:function(a,b,c){for(var d=[],e=0;e<a.length;++e)d[e]=this.createMaterial(a[e],b,c);return d},createMaterial:function(){var a={NoBlending:0,NormalBlending:1,AdditiveBlending:2,SubtractiveBlending:3,MultiplyBlending:4,CustomBlending:5},b=new G,c=new rd,d=new Gd;return function(e,f,g){function h(a,\nb,d,e,h){a=f+a;var m=ec.Handlers.get(a);null!==m?a=m.load(a):(c.setCrossOrigin(g),a=c.load(a));void 0!==b&&(a.repeat.fromArray(b),1!==b[0]&&(a.wrapS=1E3),1!==b[1]&&(a.wrapT=1E3));void 0!==d&&a.offset.fromArray(d);void 0!==e&&(\"repeat\"===e[0]&&(a.wrapS=1E3),\"mirror\"===e[0]&&(a.wrapS=1002),\"repeat\"===e[1]&&(a.wrapT=1E3),\"mirror\"===e[1]&&(a.wrapT=1002));void 0!==h&&(a.anisotropy=h);b=Y.generateUUID();k[b]=a;return b}var k={},m={uuid:Y.generateUUID(),type:\"MeshLambertMaterial\"},l;for(l in e){var n=e[l];\nswitch(l){case \"DbgColor\":case \"DbgIndex\":case \"opticalDensity\":case \"illumination\":break;case \"DbgName\":m.name=n;break;case \"blending\":m.blending=a[n];break;case \"colorAmbient\":case \"mapAmbient\":console.warn(\"THREE.Loader.createMaterial:\",l,\"is no longer supported.\");break;case \"colorDiffuse\":m.color=b.fromArray(n).getHex();break;case \"colorSpecular\":m.specular=b.fromArray(n).getHex();break;case \"colorEmissive\":m.emissive=b.fromArray(n).getHex();break;case \"specularCoef\":m.shininess=n;break;case \"shading\":\"basic\"===\nn.toLowerCase()&&(m.type=\"MeshBasicMaterial\");\"phong\"===n.toLowerCase()&&(m.type=\"MeshPhongMaterial\");\"standard\"===n.toLowerCase()&&(m.type=\"MeshStandardMaterial\");break;case \"mapDiffuse\":m.map=h(n,e.mapDiffuseRepeat,e.mapDiffuseOffset,e.mapDiffuseWrap,e.mapDiffuseAnisotropy);break;case \"mapDiffuseRepeat\":case \"mapDiffuseOffset\":case \"mapDiffuseWrap\":case \"mapDiffuseAnisotropy\":break;case \"mapEmissive\":m.emissiveMap=h(n,e.mapEmissiveRepeat,e.mapEmissiveOffset,e.mapEmissiveWrap,e.mapEmissiveAnisotropy);\nbreak;case \"mapEmissiveRepeat\":case \"mapEmissiveOffset\":case \"mapEmissiveWrap\":case \"mapEmissiveAnisotropy\":break;case \"mapLight\":m.lightMap=h(n,e.mapLightRepeat,e.mapLightOffset,e.mapLightWrap,e.mapLightAnisotropy);break;case \"mapLightRepeat\":case \"mapLightOffset\":case \"mapLightWrap\":case \"mapLightAnisotropy\":break;case \"mapAO\":m.aoMap=h(n,e.mapAORepeat,e.mapAOOffset,e.mapAOWrap,e.mapAOAnisotropy);break;case \"mapAORepeat\":case \"mapAOOffset\":case \"mapAOWrap\":case \"mapAOAnisotropy\":break;case \"mapBump\":m.bumpMap=\nh(n,e.mapBumpRepeat,e.mapBumpOffset,e.mapBumpWrap,e.mapBumpAnisotropy);break;case \"mapBumpScale\":m.bumpScale=n;break;case \"mapBumpRepeat\":case \"mapBumpOffset\":case \"mapBumpWrap\":case \"mapBumpAnisotropy\":break;case \"mapNormal\":m.normalMap=h(n,e.mapNormalRepeat,e.mapNormalOffset,e.mapNormalWrap,e.mapNormalAnisotropy);break;case \"mapNormalFactor\":m.normalScale=[n,n];break;case \"mapNormalRepeat\":case \"mapNormalOffset\":case \"mapNormalWrap\":case \"mapNormalAnisotropy\":break;case \"mapSpecular\":m.specularMap=\nh(n,e.mapSpecularRepeat,e.mapSpecularOffset,e.mapSpecularWrap,e.mapSpecularAnisotropy);break;case \"mapSpecularRepeat\":case \"mapSpecularOffset\":case \"mapSpecularWrap\":case \"mapSpecularAnisotropy\":break;case \"mapMetalness\":m.metalnessMap=h(n,e.mapMetalnessRepeat,e.mapMetalnessOffset,e.mapMetalnessWrap,e.mapMetalnessAnisotropy);break;case \"mapMetalnessRepeat\":case \"mapMetalnessOffset\":case \"mapMetalnessWrap\":case \"mapMetalnessAnisotropy\":break;case \"mapRoughness\":m.roughnessMap=h(n,e.mapRoughnessRepeat,\ne.mapRoughnessOffset,e.mapRoughnessWrap,e.mapRoughnessAnisotropy);break;case \"mapRoughnessRepeat\":case \"mapRoughnessOffset\":case \"mapRoughnessWrap\":case \"mapRoughnessAnisotropy\":break;case \"mapAlpha\":m.alphaMap=h(n,e.mapAlphaRepeat,e.mapAlphaOffset,e.mapAlphaWrap,e.mapAlphaAnisotropy);break;case \"mapAlphaRepeat\":case \"mapAlphaOffset\":case \"mapAlphaWrap\":case \"mapAlphaAnisotropy\":break;case \"flipSided\":m.side=1;break;case \"doubleSided\":m.side=2;break;case \"transparency\":console.warn(\"THREE.Loader.createMaterial: transparency has been renamed to opacity\");\nm.opacity=n;break;case \"depthTest\":case \"depthWrite\":case \"colorWrite\":case \"opacity\":case \"reflectivity\":case \"transparent\":case \"visible\":case \"wireframe\":m[l]=n;break;case \"vertexColors\":!0===n&&(m.vertexColors=2);\"face\"===n&&(m.vertexColors=1);break;default:console.error(\"THREE.Loader.createMaterial: Unsupported\",l,n)}}\"MeshBasicMaterial\"===m.type&&delete m.emissive;\"MeshPhongMaterial\"!==m.type&&delete m.specular;1>m.opacity&&(m.transparent=!0);d.setTextures(k);return d.parse(m)}}()});Object.assign(ce.prototype,\n{load:function(a,b,c,d){var e=this,f=this.texturePath&&\"string\"===typeof this.texturePath?this.texturePath:ec.prototype.extractUrlBase(a),g=new Ka(this.manager);g.setWithCredentials(this.withCredentials);g.load(a,function(c){c=JSON.parse(c);var d=c.metadata;if(void 0!==d&&(d=d.type,void 0!==d)){if(\"object\"===d.toLowerCase()){console.error(\"THREE.JSONLoader: \"+a+\" should be loaded with THREE.ObjectLoader instead.\");return}if(\"scene\"===d.toLowerCase()){console.error(\"THREE.JSONLoader: \"+a+\" should be loaded with THREE.SceneLoader instead.\");\nreturn}}c=e.parse(c,f);b(c.geometry,c.materials)},c,d)},setTexturePath:function(a){this.texturePath=a},parse:function(){return function(a,b){void 0!==a.data&&(a=a.data);a.scale=void 0!==a.scale?1/a.scale:1;var c=new J,d=a,e,f,g,h,k,m,l,v,p,r,z,t,y,x,u=d.faces;p=d.vertices;var B=d.normals,w=d.colors;m=d.scale;var I=0;if(void 0!==d.uvs){for(e=0;e<d.uvs.length;e++)d.uvs[e].length&&I++;for(e=0;e<I;e++)c.faceVertexUvs[e]=[]}h=0;for(k=p.length;h<k;)e=new n,e.x=p[h++]*m,e.y=p[h++]*m,e.z=p[h++]*m,c.vertices.push(e);\nh=0;for(k=u.length;h<k;)if(p=u[h++],r=p&1,g=p&2,e=p&8,l=p&16,z=p&32,m=p&64,p&=128,r){r=new Sa;r.a=u[h];r.b=u[h+1];r.c=u[h+3];t=new Sa;t.a=u[h+1];t.b=u[h+2];t.c=u[h+3];h+=4;g&&(g=u[h++],r.materialIndex=g,t.materialIndex=g);g=c.faces.length;if(e)for(e=0;e<I;e++)for(y=d.uvs[e],c.faceVertexUvs[e][g]=[],c.faceVertexUvs[e][g+1]=[],f=0;4>f;f++)v=u[h++],x=y[2*v],v=y[2*v+1],x=new C(x,v),2!==f&&c.faceVertexUvs[e][g].push(x),0!==f&&c.faceVertexUvs[e][g+1].push(x);l&&(l=3*u[h++],r.normal.set(B[l++],B[l++],B[l]),\nt.normal.copy(r.normal));if(z)for(e=0;4>e;e++)l=3*u[h++],z=new n(B[l++],B[l++],B[l]),2!==e&&r.vertexNormals.push(z),0!==e&&t.vertexNormals.push(z);m&&(m=u[h++],m=w[m],r.color.setHex(m),t.color.setHex(m));if(p)for(e=0;4>e;e++)m=u[h++],m=w[m],2!==e&&r.vertexColors.push(new G(m)),0!==e&&t.vertexColors.push(new G(m));c.faces.push(r);c.faces.push(t)}else{r=new Sa;r.a=u[h++];r.b=u[h++];r.c=u[h++];g&&(g=u[h++],r.materialIndex=g);g=c.faces.length;if(e)for(e=0;e<I;e++)for(y=d.uvs[e],c.faceVertexUvs[e][g]=\n[],f=0;3>f;f++)v=u[h++],x=y[2*v],v=y[2*v+1],x=new C(x,v),c.faceVertexUvs[e][g].push(x);l&&(l=3*u[h++],r.normal.set(B[l++],B[l++],B[l]));if(z)for(e=0;3>e;e++)l=3*u[h++],z=new n(B[l++],B[l++],B[l]),r.vertexNormals.push(z);m&&(m=u[h++],r.color.setHex(w[m]));if(p)for(e=0;3>e;e++)m=u[h++],r.vertexColors.push(new G(w[m]));c.faces.push(r)}d=a;h=void 0!==d.influencesPerVertex?d.influencesPerVertex:2;if(d.skinWeights)for(k=0,u=d.skinWeights.length;k<u;k+=h)c.skinWeights.push(new fa(d.skinWeights[k],1<h?d.skinWeights[k+\n1]:0,2<h?d.skinWeights[k+2]:0,3<h?d.skinWeights[k+3]:0));if(d.skinIndices)for(k=0,u=d.skinIndices.length;k<u;k+=h)c.skinIndices.push(new fa(d.skinIndices[k],1<h?d.skinIndices[k+1]:0,2<h?d.skinIndices[k+2]:0,3<h?d.skinIndices[k+3]:0));c.bones=d.bones;c.bones&&0<c.bones.length&&(c.skinWeights.length!==c.skinIndices.length||c.skinIndices.length!==c.vertices.length)&&console.warn(\"When skinning, number of vertices (\"+c.vertices.length+\"), skinIndices (\"+c.skinIndices.length+\"), and skinWeights (\"+c.skinWeights.length+\n\") should match.\");k=a;u=k.scale;if(void 0!==k.morphTargets)for(d=0,h=k.morphTargets.length;d<h;d++)for(c.morphTargets[d]={},c.morphTargets[d].name=k.morphTargets[d].name,c.morphTargets[d].vertices=[],B=c.morphTargets[d].vertices,w=k.morphTargets[d].vertices,I=0,p=w.length;I<p;I+=3)m=new n,m.x=w[I]*u,m.y=w[I+1]*u,m.z=w[I+2]*u,B.push(m);if(void 0!==k.morphColors&&0<k.morphColors.length)for(console.warn('THREE.JSONLoader: \"morphColors\" no longer supported. Using them as face colors.'),u=c.faces,k=k.morphColors[0].colors,\nd=0,h=u.length;d<h;d++)u[d].color.fromArray(k,3*d);k=a;d=[];h=[];void 0!==k.animation&&h.push(k.animation);void 0!==k.animations&&(k.animations.length?h=h.concat(k.animations):h.push(k.animations));for(k=0;k<h.length;k++)(u=Da.parseAnimation(h[k],c.bones))&&d.push(u);c.morphTargets&&(h=Da.CreateClipsFromMorphTargetSequences(c.morphTargets,10),d=d.concat(h));0<d.length&&(c.animations=d);c.computeFaceNormals();c.computeBoundingSphere();if(void 0===a.materials||0===a.materials.length)return{geometry:c};\nd=ec.prototype.initMaterials(a.materials,b,this.crossOrigin);return{geometry:c,materials:d}}}()});Object.assign(Pe.prototype,{load:function(a,b,c,d){\"\"===this.texturePath&&(this.texturePath=a.substring(0,a.lastIndexOf(\"/\")+1));var e=this;(new Ka(e.manager)).load(a,function(c){var g=null;try{g=JSON.parse(c)}catch(h){void 0!==d&&d(h);console.error(\"THREE:ObjectLoader: Can't parse \"+a+\".\",h.message);return}c=g.metadata;void 0===c||void 0===c.type||\"geometry\"===c.type.toLowerCase()?console.error(\"THREE.ObjectLoader: Can't load \"+\na+\". Use THREE.JSONLoader instead.\"):e.parse(g,b)},c,d)},setTexturePath:function(a){this.texturePath=a},setCrossOrigin:function(a){this.crossOrigin=a},parse:function(a,b){var c=this.parseGeometries(a.geometries),d=this.parseImages(a.images,function(){void 0!==b&&b(e)}),d=this.parseTextures(a.textures,d),d=this.parseMaterials(a.materials,d),e=this.parseObject(a.object,c,d);a.animations&&(e.animations=this.parseAnimations(a.animations));void 0!==a.images&&0!==a.images.length||void 0===b||b(e);return e},\nparseGeometries:function(a){var b={};if(void 0!==a)for(var c=new ce,d=new be,e=0,f=a.length;e<f;e++){var g,h=a[e];switch(h.type){case \"PlaneGeometry\":case \"PlaneBufferGeometry\":g=new Ma[h.type](h.width,h.height,h.widthSegments,h.heightSegments);break;case \"BoxGeometry\":case \"BoxBufferGeometry\":case \"CubeGeometry\":g=new Ma[h.type](h.width,h.height,h.depth,h.widthSegments,h.heightSegments,h.depthSegments);break;case \"CircleGeometry\":case \"CircleBufferGeometry\":g=new Ma[h.type](h.radius,h.segments,h.thetaStart,\nh.thetaLength);break;case \"CylinderGeometry\":case \"CylinderBufferGeometry\":g=new Ma[h.type](h.radiusTop,h.radiusBottom,h.height,h.radialSegments,h.heightSegments,h.openEnded,h.thetaStart,h.thetaLength);break;case \"ConeGeometry\":case \"ConeBufferGeometry\":g=new Ma[h.type](h.radius,h.height,h.radialSegments,h.heightSegments,h.openEnded,h.thetaStart,h.thetaLength);break;case \"SphereGeometry\":case \"SphereBufferGeometry\":g=new Ma[h.type](h.radius,h.widthSegments,h.heightSegments,h.phiStart,h.phiLength,\nh.thetaStart,h.thetaLength);break;case \"DodecahedronGeometry\":case \"IcosahedronGeometry\":case \"OctahedronGeometry\":case \"TetrahedronGeometry\":g=new Ma[h.type](h.radius,h.detail);break;case \"RingGeometry\":case \"RingBufferGeometry\":g=new Ma[h.type](h.innerRadius,h.outerRadius,h.thetaSegments,h.phiSegments,h.thetaStart,h.thetaLength);break;case \"TorusGeometry\":case \"TorusBufferGeometry\":g=new Ma[h.type](h.radius,h.tube,h.radialSegments,h.tubularSegments,h.arc);break;case \"TorusKnotGeometry\":case \"TorusKnotBufferGeometry\":g=\nnew Ma[h.type](h.radius,h.tube,h.tubularSegments,h.radialSegments,h.p,h.q);break;case \"LatheGeometry\":case \"LatheBufferGeometry\":g=new Ma[h.type](h.points,h.segments,h.phiStart,h.phiLength);break;case \"BufferGeometry\":g=d.parse(h);break;case \"Geometry\":g=c.parse(h,this.texturePath).geometry;break;default:console.warn('THREE.ObjectLoader: Unsupported geometry type \"'+h.type+'\"');continue}g.uuid=h.uuid;void 0!==h.name&&(g.name=h.name);b[h.uuid]=g}return b},parseMaterials:function(a,b){var c={};if(void 0!==\na){var d=new Gd;d.setTextures(b);for(var e=0,f=a.length;e<f;e++){var g=a[e];if(\"MultiMaterial\"===g.type){for(var h=[],k=0;k<g.materials.length;k++)h.push(d.parse(g.materials[k]));c[g.uuid]=h}else c[g.uuid]=d.parse(g)}}return c},parseAnimations:function(a){for(var b=[],c=0;c<a.length;c++){var d=Da.parse(a[c]);b.push(d)}return b},parseImages:function(a,b){function c(a){d.manager.itemStart(a);return g.load(a,function(){d.manager.itemEnd(a)},void 0,function(){d.manager.itemEnd(a);d.manager.itemError(a)})}\nvar d=this,e={};if(void 0!==a&&0<a.length){var f=new Zd(b),g=new Sc(f);g.setCrossOrigin(this.crossOrigin);for(var f=0,h=a.length;f<h;f++){var k=a[f],m=/^(\\/\\/)|([a-z]+:(\\/\\/)?)/i.test(k.url)?k.url:d.texturePath+k.url;e[k.uuid]=c(m)}}return e},parseTextures:function(a,b){function c(a,b){if(\"number\"===typeof a)return a;console.warn(\"THREE.ObjectLoader.parseTexture: Constant should be in numeric form.\",a);return b[a]}var d={};if(void 0!==a)for(var e=0,f=a.length;e<f;e++){var g=a[e];void 0===g.image&&\nconsole.warn('THREE.ObjectLoader: No \"image\" specified for',g.uuid);void 0===b[g.image]&&console.warn(\"THREE.ObjectLoader: Undefined image\",g.image);var h=new ba(b[g.image]);h.needsUpdate=!0;h.uuid=g.uuid;void 0!==g.name&&(h.name=g.name);void 0!==g.mapping&&(h.mapping=c(g.mapping,ng));void 0!==g.offset&&h.offset.fromArray(g.offset);void 0!==g.repeat&&h.repeat.fromArray(g.repeat);void 0!==g.wrap&&(h.wrapS=c(g.wrap[0],ff),h.wrapT=c(g.wrap[1],ff));void 0!==g.minFilter&&(h.minFilter=c(g.minFilter,gf));\nvoid 0!==g.magFilter&&(h.magFilter=c(g.magFilter,gf));void 0!==g.anisotropy&&(h.anisotropy=g.anisotropy);void 0!==g.flipY&&(h.flipY=g.flipY);d[g.uuid]=h}return d},parseObject:function(){var a=new K;return function(b,c,d){function e(a){void 0===c[a]&&console.warn(\"THREE.ObjectLoader: Undefined geometry\",a);return c[a]}function f(a){if(void 0!==a){if(Array.isArray(a)){for(var b=[],c=0,e=a.length;c<e;c++){var f=a[c];void 0===d[f]&&console.warn(\"THREE.ObjectLoader: Undefined material\",f);b.push(d[f])}return b}void 0===\nd[a]&&console.warn(\"THREE.ObjectLoader: Undefined material\",a);return d[a]}}var g;switch(b.type){case \"Scene\":g=new ld;void 0!==b.background&&Number.isInteger(b.background)&&(g.background=new G(b.background));void 0!==b.fog&&(\"Fog\"===b.fog.type?g.fog=new Jb(b.fog.color,b.fog.near,b.fog.far):\"FogExp2\"===b.fog.type&&(g.fog=new Ib(b.fog.color,b.fog.density)));break;case \"PerspectiveCamera\":g=new qa(b.fov,b.aspect,b.near,b.far);void 0!==b.focus&&(g.focus=b.focus);void 0!==b.zoom&&(g.zoom=b.zoom);void 0!==\nb.filmGauge&&(g.filmGauge=b.filmGauge);void 0!==b.filmOffset&&(g.filmOffset=b.filmOffset);void 0!==b.view&&(g.view=Object.assign({},b.view));break;case \"OrthographicCamera\":g=new Fb(b.left,b.right,b.top,b.bottom,b.near,b.far);break;case \"AmbientLight\":g=new yd(b.color,b.intensity);break;case \"DirectionalLight\":g=new xd(b.color,b.intensity);break;case \"PointLight\":g=new vd(b.color,b.intensity,b.distance,b.decay);break;case \"RectAreaLight\":g=new zd(b.color,b.intensity,b.width,b.height);break;case \"SpotLight\":g=\nnew ud(b.color,b.intensity,b.distance,b.angle,b.penumbra,b.decay);break;case \"HemisphereLight\":g=new sd(b.color,b.groundColor,b.intensity);break;case \"SkinnedMesh\":console.warn(\"THREE.ObjectLoader.parseObject() does not support SkinnedMesh yet.\");case \"Mesh\":g=e(b.geometry);var h=f(b.material);g=g.bones&&0<g.bones.length?new nd(g,h):new la(g,h);break;case \"LOD\":g=new yc;break;case \"Line\":g=new sa(e(b.geometry),f(b.material),b.mode);break;case \"LineLoop\":g=new od(e(b.geometry),f(b.material));break;\ncase \"LineSegments\":g=new Q(e(b.geometry),f(b.material));break;case \"PointCloud\":case \"Points\":g=new Kb(e(b.geometry),f(b.material));break;case \"Sprite\":g=new xc(f(b.material));break;case \"Group\":g=new Ac;break;default:g=new z}g.uuid=b.uuid;void 0!==b.name&&(g.name=b.name);void 0!==b.matrix?(a.fromArray(b.matrix),a.decompose(g.position,g.quaternion,g.scale)):(void 0!==b.position&&g.position.fromArray(b.position),void 0!==b.rotation&&g.rotation.fromArray(b.rotation),void 0!==b.quaternion&&g.quaternion.fromArray(b.quaternion),\nvoid 0!==b.scale&&g.scale.fromArray(b.scale));void 0!==b.castShadow&&(g.castShadow=b.castShadow);void 0!==b.receiveShadow&&(g.receiveShadow=b.receiveShadow);b.shadow&&(void 0!==b.shadow.bias&&(g.shadow.bias=b.shadow.bias),void 0!==b.shadow.radius&&(g.shadow.radius=b.shadow.radius),void 0!==b.shadow.mapSize&&g.shadow.mapSize.fromArray(b.shadow.mapSize),void 0!==b.shadow.camera&&(g.shadow.camera=this.parseObject(b.shadow.camera)));void 0!==b.visible&&(g.visible=b.visible);void 0!==b.userData&&(g.userData=\nb.userData);if(void 0!==b.children)for(var k in b.children)g.add(this.parseObject(b.children[k],c,d));if(\"LOD\"===b.type)for(b=b.levels,h=0;h<b.length;h++){var m=b[h];k=g.getObjectByProperty(\"uuid\",m.object);void 0!==k&&g.addLevel(k,m.distance)}return g}}()});var ng={UVMapping:300,CubeReflectionMapping:301,CubeRefractionMapping:302,EquirectangularReflectionMapping:303,EquirectangularRefractionMapping:304,SphericalReflectionMapping:305,CubeUVReflectionMapping:306,CubeUVRefractionMapping:307},ff={RepeatWrapping:1E3,\nClampToEdgeWrapping:1001,MirroredRepeatWrapping:1002},gf={NearestFilter:1003,NearestMipMapNearestFilter:1004,NearestMipMapLinearFilter:1005,LinearFilter:1006,LinearMipMapNearestFilter:1007,LinearMipMapLinearFilter:1008};Object.assign(ua.prototype,{getPoint:function(){console.warn(\"THREE.Curve: .getPoint() not implemented.\");return null},getPointAt:function(a){a=this.getUtoTmapping(a);return this.getPoint(a)},getPoints:function(a){void 0===a&&(a=5);for(var b=[],c=0;c<=a;c++)b.push(this.getPoint(c/\na));return b},getSpacedPoints:function(a){void 0===a&&(a=5);for(var b=[],c=0;c<=a;c++)b.push(this.getPointAt(c/a));return b},getLength:function(){var a=this.getLengths();return a[a.length-1]},getLengths:function(a){void 0===a&&(a=this.arcLengthDivisions);if(this.cacheArcLengths&&this.cacheArcLengths.length===a+1&&!this.needsUpdate)return this.cacheArcLengths;this.needsUpdate=!1;var b=[],c,d=this.getPoint(0),e,f=0;b.push(0);for(e=1;e<=a;e++)c=this.getPoint(e/a),f+=c.distanceTo(d),b.push(f),d=c;return this.cacheArcLengths=\nb},updateArcLengths:function(){this.needsUpdate=!0;this.getLengths()},getUtoTmapping:function(a,b){var c=this.getLengths(),d,e=c.length,f;f=b?b:a*c[e-1];for(var g=0,h=e-1,k;g<=h;)if(d=Math.floor(g+(h-g)/2),k=c[d]-f,0>k)g=d+1;else if(0<k)h=d-1;else{h=d;break}d=h;if(c[d]===f)return d/(e-1);g=c[d];return(d+(f-g)/(c[d+1]-g))/(e-1)},getTangent:function(a){var b=a-1E-4;a+=1E-4;0>b&&(b=0);1<a&&(a=1);b=this.getPoint(b);return this.getPoint(a).clone().sub(b).normalize()},getTangentAt:function(a){a=this.getUtoTmapping(a);\nreturn this.getTangent(a)},computeFrenetFrames:function(a,b){var c=new n,d=[],e=[],f=[],g=new n,h=new K,k,m;for(k=0;k<=a;k++)m=k/a,d[k]=this.getTangentAt(m),d[k].normalize();e[0]=new n;f[0]=new n;k=Number.MAX_VALUE;m=Math.abs(d[0].x);var l=Math.abs(d[0].y),v=Math.abs(d[0].z);m<=k&&(k=m,c.set(1,0,0));l<=k&&(k=l,c.set(0,1,0));v<=k&&c.set(0,0,1);g.crossVectors(d[0],c).normalize();e[0].crossVectors(d[0],g);f[0].crossVectors(d[0],e[0]);for(k=1;k<=a;k++)e[k]=e[k-1].clone(),f[k]=f[k-1].clone(),g.crossVectors(d[k-\n1],d[k]),g.length()>Number.EPSILON&&(g.normalize(),c=Math.acos(Y.clamp(d[k-1].dot(d[k]),-1,1)),e[k].applyMatrix4(h.makeRotationAxis(g,c))),f[k].crossVectors(d[k],e[k]);if(!0===b)for(c=Math.acos(Y.clamp(e[0].dot(e[a]),-1,1)),c/=a,0<d[0].dot(g.crossVectors(e[0],e[a]))&&(c=-c),k=1;k<=a;k++)e[k].applyMatrix4(h.makeRotationAxis(d[k],c*k)),f[k].crossVectors(d[k],e[k]);return{tangents:d,normals:e,binormals:f}}});Qa.prototype=Object.create(ua.prototype);Qa.prototype.constructor=Qa;Qa.prototype.isLineCurve=\n!0;Qa.prototype.getPoint=function(a){if(1===a)return this.v2.clone();var b=this.v2.clone().sub(this.v1);b.multiplyScalar(a).add(this.v1);return b};Qa.prototype.getPointAt=function(a){return this.getPoint(a)};Qa.prototype.getTangent=function(a){return this.v2.clone().sub(this.v1).normalize()};Vc.prototype=Object.assign(Object.create(ua.prototype),{constructor:Vc,add:function(a){this.curves.push(a)},closePath:function(){var a=this.curves[0].getPoint(0),b=this.curves[this.curves.length-1].getPoint(1);\na.equals(b)||this.curves.push(new Qa(b,a))},getPoint:function(a){var b=a*this.getLength(),c=this.getCurveLengths();for(a=0;a<c.length;){if(c[a]>=b)return b=c[a]-b,a=this.curves[a],c=a.getLength(),a.getPointAt(0===c?0:1-b/c);a++}return null},getLength:function(){var a=this.getCurveLengths();return a[a.length-1]},updateArcLengths:function(){this.needsUpdate=!0;this.cacheLengths=null;this.getCurveLengths()},getCurveLengths:function(){if(this.cacheLengths&&this.cacheLengths.length===this.curves.length)return this.cacheLengths;\nfor(var a=[],b=0,c=0,d=this.curves.length;c<d;c++)b+=this.curves[c].getLength(),a.push(b);return this.cacheLengths=a},getSpacedPoints:function(a){void 0===a&&(a=40);for(var b=[],c=0;c<=a;c++)b.push(this.getPoint(c/a));this.autoClose&&b.push(b[0]);return b},getPoints:function(a){a=a||12;for(var b=[],c,d=0,e=this.curves;d<e.length;d++)for(var f=e[d],f=f.getPoints(f&&f.isEllipseCurve?2*a:f&&f.isLineCurve?1:f&&f.isSplineCurve?a*f.points.length:a),g=0;g<f.length;g++){var h=f[g];c&&c.equals(h)||(b.push(h),\nc=h)}this.autoClose&&1<b.length&&!b[b.length-1].equals(b[0])&&b.push(b[0]);return b},createPointsGeometry:function(a){a=this.getPoints(a);return this.createGeometry(a)},createSpacedPointsGeometry:function(a){a=this.getSpacedPoints(a);return this.createGeometry(a)},createGeometry:function(a){for(var b=new J,c=0,d=a.length;c<d;c++){var e=a[c];b.vertices.push(new n(e.x,e.y,e.z||0))}return b}});Va.prototype=Object.create(ua.prototype);Va.prototype.constructor=Va;Va.prototype.isEllipseCurve=!0;Va.prototype.getPoint=\nfunction(a){for(var b=2*Math.PI,c=this.aEndAngle-this.aStartAngle,d=Math.abs(c)<Number.EPSILON;0>c;)c+=b;for(;c>b;)c-=b;c<Number.EPSILON&&(c=d?0:b);!0!==this.aClockwise||d||(c=c===b?-b:c-b);b=this.aStartAngle+a*c;a=this.aX+this.xRadius*Math.cos(b);var e=this.aY+this.yRadius*Math.sin(b);0!==this.aRotation&&(b=Math.cos(this.aRotation),c=Math.sin(this.aRotation),d=a-this.aX,e-=this.aY,a=d*b-e*c+this.aX,e=d*c+e*b+this.aY);return new C(a,e)};yb.prototype=Object.create(ua.prototype);yb.prototype.constructor=\nyb;yb.prototype.isSplineCurve=!0;yb.prototype.getPoint=function(a){var b=this.points,c=(b.length-1)*a;a=Math.floor(c);var c=c-a,d=b[0===a?a:a-1],e=b[a],f=b[a>b.length-2?b.length-1:a+1],b=b[a>b.length-3?b.length-1:a+2];return new C(Qe(c,d.x,e.x,f.x,b.x),Qe(c,d.y,e.y,f.y,b.y))};fc.prototype=Object.create(ua.prototype);fc.prototype.constructor=fc;fc.prototype.getPoint=function(a){var b=this.v0,c=this.v1,d=this.v2,e=this.v3;return new C(xb(a,b.x,c.x,d.x,e.x),xb(a,b.y,c.y,d.y,e.y))};gc.prototype=Object.create(ua.prototype);\ngc.prototype.constructor=gc;gc.prototype.getPoint=function(a){var b=this.v0,c=this.v1,d=this.v2;return new C(wb(a,b.x,c.x,d.x),wb(a,b.y,c.y,d.y))};var te=Object.assign(Object.create(Vc.prototype),{fromPoints:function(a){this.moveTo(a[0].x,a[0].y);for(var b=1,c=a.length;b<c;b++)this.lineTo(a[b].x,a[b].y)},moveTo:function(a,b){this.currentPoint.set(a,b)},lineTo:function(a,b){var c=new Qa(this.currentPoint.clone(),new C(a,b));this.curves.push(c);this.currentPoint.set(a,b)},quadraticCurveTo:function(a,\nb,c,d){a=new gc(this.currentPoint.clone(),new C(a,b),new C(c,d));this.curves.push(a);this.currentPoint.set(c,d)},bezierCurveTo:function(a,b,c,d,e,f){a=new fc(this.currentPoint.clone(),new C(a,b),new C(c,d),new C(e,f));this.curves.push(a);this.currentPoint.set(e,f)},splineThru:function(a){var b=[this.currentPoint.clone()].concat(a),b=new yb(b);this.curves.push(b);this.currentPoint.copy(a[a.length-1])},arc:function(a,b,c,d,e,f){this.absarc(a+this.currentPoint.x,b+this.currentPoint.y,c,d,e,f)},absarc:function(a,\nb,c,d,e,f){this.absellipse(a,b,c,c,d,e,f)},ellipse:function(a,b,c,d,e,f,g,h){this.absellipse(a+this.currentPoint.x,b+this.currentPoint.y,c,d,e,f,g,h)},absellipse:function(a,b,c,d,e,f,g,h){a=new Va(a,b,c,d,e,f,g,h);0<this.curves.length&&(b=a.getPoint(0),b.equals(this.currentPoint)||this.lineTo(b.x,b.y));this.curves.push(a);a=a.getPoint(1);this.currentPoint.copy(a)}});Wc.prototype=te;te.constructor=Wc;zb.prototype=Object.assign(Object.create(te),{constructor:zb,getPointsHoles:function(a){for(var b=\n[],c=0,d=this.holes.length;c<d;c++)b[c]=this.holes[c].getPoints(a);return b},extractAllPoints:function(a){return{shape:this.getPoints(a),holes:this.getPointsHoles(a)}},extractPoints:function(a){return this.extractAllPoints(a)}});Object.assign(de.prototype,{moveTo:function(a,b){this.currentPath=new Wc;this.subPaths.push(this.currentPath);this.currentPath.moveTo(a,b)},lineTo:function(a,b){this.currentPath.lineTo(a,b)},quadraticCurveTo:function(a,b,c,d){this.currentPath.quadraticCurveTo(a,b,c,d)},bezierCurveTo:function(a,\nb,c,d,e,f){this.currentPath.bezierCurveTo(a,b,c,d,e,f)},splineThru:function(a){this.currentPath.splineThru(a)},toShapes:function(a,b){function c(a){for(var b=[],c=0,d=a.length;c<d;c++){var e=a[c],f=new zb;f.curves=e.curves;b.push(f)}return b}function d(a,b){for(var c=b.length,d=!1,e=c-1,f=0;f<c;e=f++){var g=b[e],h=b[f],k=h.x-g.x,m=h.y-g.y;if(Math.abs(m)>Number.EPSILON){if(0>m&&(g=b[f],k=-k,h=b[e],m=-m),!(a.y<g.y||a.y>h.y))if(a.y===g.y){if(a.x===g.x)return!0}else{e=m*(a.x-g.x)-k*(a.y-g.y);if(0===e)return!0;\n0>e||(d=!d)}}else if(a.y===g.y&&(h.x<=a.x&&a.x<=g.x||g.x<=a.x&&a.x<=h.x))return!0}return d}var e=Ia.isClockWise,f=this.subPaths;if(0===f.length)return[];if(!0===b)return c(f);var g,h,k,m=[];if(1===f.length)return h=f[0],k=new zb,k.curves=h.curves,m.push(k),m;var l=!e(f[0].getPoints()),l=a?!l:l;k=[];var n=[],p=[],r=0,z;n[r]=void 0;p[r]=[];for(var t=0,y=f.length;t<y;t++)h=f[t],z=h.getPoints(),g=e(z),(g=a?!g:g)?(!l&&n[r]&&r++,n[r]={s:new zb,p:z},n[r].s.curves=h.curves,l&&r++,p[r]=[]):p[r].push({h:h,\np:z[0]});if(!n[0])return c(f);if(1<n.length){t=!1;h=[];e=0;for(f=n.length;e<f;e++)k[e]=[];e=0;for(f=n.length;e<f;e++)for(g=p[e],l=0;l<g.length;l++){r=g[l];z=!0;for(y=0;y<n.length;y++)d(r.p,n[y].p)&&(e!==y&&h.push({froms:e,tos:y,hole:l}),z?(z=!1,k[y].push(r)):t=!0);z&&k[e].push(r)}0<h.length&&(t||(p=k))}t=0;for(e=n.length;t<e;t++)for(k=n[t].s,m.push(k),h=p[t],f=0,g=h.length;f<g;f++)k.holes.push(h[f].h);return m}});Object.assign(ee.prototype,{isFont:!0,generateShapes:function(a,b,c){void 0===b&&(b=\n100);void 0===c&&(c=4);var d=this.data;a=String(a).split(\"\");var e=b/d.resolution,f=(d.boundingBox.yMax-d.boundingBox.yMin+d.underlineThickness)*e,g=0,h=0;b=[];for(var k=0;k<a.length;k++){var m=a[k];if(\"\\n\"===m)g=0,h-=f;else{var l;l=e;var n=g,p=h;if(m=d.glyphs[m]||d.glyphs[\"?\"]){var r=new de,z=[],t,y,x,u,B,w,C,G;if(m.o)for(var D=m._cachedOutline||(m._cachedOutline=m.o.split(\" \")),E=0,J=D.length;E<J;)switch(D[E++]){case \"m\":t=D[E++]*l+n;y=D[E++]*l+p;r.moveTo(t,y);break;case \"l\":t=D[E++]*l+n;y=D[E++]*\nl+p;r.lineTo(t,y);break;case \"q\":t=D[E++]*l+n;y=D[E++]*l+p;B=D[E++]*l+n;w=D[E++]*l+p;r.quadraticCurveTo(B,w,t,y);if(u=z[z.length-1]){x=u.x;u=u.y;for(var F=1;F<=c;F++){var K=F/c;wb(K,x,B,t);wb(K,u,w,y)}}break;case \"b\":if(t=D[E++]*l+n,y=D[E++]*l+p,B=D[E++]*l+n,w=D[E++]*l+p,C=D[E++]*l+n,G=D[E++]*l+p,r.bezierCurveTo(B,w,C,G,t,y),u=z[z.length-1])for(x=u.x,u=u.y,F=1;F<=c;F++)K=F/c,xb(K,x,B,C,t),xb(K,u,w,G,y)}l={offsetX:m.ha*l,path:r}}else l=void 0;g+=l.offsetX;b.push(l.path)}}c=[];d=0;for(a=b.length;d<\na;d++)Array.prototype.push.apply(c,b[d].toShapes());return c}});Object.assign(Re.prototype,{load:function(a,b,c,d){var e=this;(new Ka(this.manager)).load(a,function(a){var c;try{c=JSON.parse(a)}catch(d){console.warn(\"THREE.FontLoader: typeface.js support is being deprecated. Use typeface.json instead.\"),c=JSON.parse(a.substring(65,a.length-2))}a=e.parse(c);b&&b(a)},c,d)},parse:function(a){return new ee(a)}});var Nd,he={getContext:function(){void 0===Nd&&(Nd=new (window.AudioContext||window.webkitAudioContext));\nreturn Nd},setContext:function(a){Nd=a}};Object.assign(fe.prototype,{load:function(a,b,c,d){var e=new Ka(this.manager);e.setResponseType(\"arraybuffer\");e.load(a,function(a){he.getContext().decodeAudioData(a,function(a){b(a)})},c,d)}});Object.assign(Se.prototype,{update:function(){var a,b,c,d,e,f,g,h,k=new K,m=new K;return function(l){if(a!==this||b!==l.focus||c!==l.fov||d!==l.aspect*this.aspect||e!==l.near||f!==l.far||g!==l.zoom||h!==this.eyeSep){a=this;b=l.focus;c=l.fov;d=l.aspect*this.aspect;e=\nl.near;f=l.far;g=l.zoom;var n=l.projectionMatrix.clone();h=this.eyeSep/2;var p=h*e/b,r=e*Math.tan(Y.DEG2RAD*c*.5)/g,z,t;m.elements[12]=-h;k.elements[12]=h;z=-r*d+p;t=r*d+p;n.elements[0]=2*e/(t-z);n.elements[8]=(t+z)/(t-z);this.cameraL.projectionMatrix.copy(n);z=-r*d-p;t=r*d-p;n.elements[0]=2*e/(t-z);n.elements[8]=(t+z)/(t-z);this.cameraR.projectionMatrix.copy(n)}this.cameraL.matrixWorld.copy(l.matrixWorld).multiply(m);this.cameraR.matrixWorld.copy(l.matrixWorld).multiply(k)}}()});Hd.prototype=Object.create(z.prototype);\nHd.prototype.constructor=Hd;ge.prototype=Object.assign(Object.create(z.prototype),{constructor:ge,getInput:function(){return this.gain},removeFilter:function(){null!==this.filter&&(this.gain.disconnect(this.filter),this.filter.disconnect(this.context.destination),this.gain.connect(this.context.destination),this.filter=null)},getFilter:function(){return this.filter},setFilter:function(a){null!==this.filter?(this.gain.disconnect(this.filter),this.filter.disconnect(this.context.destination)):this.gain.disconnect(this.context.destination);\nthis.filter=a;this.gain.connect(this.filter);this.filter.connect(this.context.destination)},getMasterVolume:function(){return this.gain.gain.value},setMasterVolume:function(a){this.gain.gain.value=a},updateMatrixWorld:function(){var a=new n,b=new oa,c=new n,d=new n;return function(e){z.prototype.updateMatrixWorld.call(this,e);e=this.context.listener;var f=this.up;this.matrixWorld.decompose(a,b,c);d.set(0,0,-1).applyQuaternion(b);e.positionX?(e.positionX.setValueAtTime(a.x,this.context.currentTime),\ne.positionY.setValueAtTime(a.y,this.context.currentTime),e.positionZ.setValueAtTime(a.z,this.context.currentTime),e.forwardX.setValueAtTime(d.x,this.context.currentTime),e.forwardY.setValueAtTime(d.y,this.context.currentTime),e.forwardZ.setValueAtTime(d.z,this.context.currentTime),e.upX.setValueAtTime(f.x,this.context.currentTime),e.upY.setValueAtTime(f.y,this.context.currentTime),e.upZ.setValueAtTime(f.z,this.context.currentTime)):(e.setPosition(a.x,a.y,a.z),e.setOrientation(d.x,d.y,d.z,f.x,f.y,\nf.z))}}()});hc.prototype=Object.assign(Object.create(z.prototype),{constructor:hc,getOutput:function(){return this.gain},setNodeSource:function(a){this.hasPlaybackControl=!1;this.sourceType=\"audioNode\";this.source=a;this.connect();return this},setBuffer:function(a){this.buffer=a;this.sourceType=\"buffer\";this.autoplay&&this.play();return this},play:function(){if(!0===this.isPlaying)console.warn(\"THREE.Audio: Audio is already playing.\");else if(!1===this.hasPlaybackControl)console.warn(\"THREE.Audio: this Audio has no playback control.\");\nelse{var a=this.context.createBufferSource();a.buffer=this.buffer;a.loop=this.loop;a.onended=this.onEnded.bind(this);a.playbackRate.setValueAtTime(this.playbackRate,this.startTime);a.start(0,this.startTime);this.isPlaying=!0;this.source=a;return this.connect()}},pause:function(){if(!1===this.hasPlaybackControl)console.warn(\"THREE.Audio: this Audio has no playback control.\");else return this.source.stop(),this.startTime=this.context.currentTime,this.isPlaying=!1,this},stop:function(){if(!1===this.hasPlaybackControl)console.warn(\"THREE.Audio: this Audio has no playback control.\");\nelse return this.source.stop(),this.startTime=0,this.isPlaying=!1,this},connect:function(){if(0<this.filters.length){this.source.connect(this.filters[0]);for(var a=1,b=this.filters.length;a<b;a++)this.filters[a-1].connect(this.filters[a]);this.filters[this.filters.length-1].connect(this.getOutput())}else this.source.connect(this.getOutput());return this},disconnect:function(){if(0<this.filters.length){this.source.disconnect(this.filters[0]);for(var a=1,b=this.filters.length;a<b;a++)this.filters[a-\n1].disconnect(this.filters[a]);this.filters[this.filters.length-1].disconnect(this.getOutput())}else this.source.disconnect(this.getOutput());return this},getFilters:function(){return this.filters},setFilters:function(a){a||(a=[]);!0===this.isPlaying?(this.disconnect(),this.filters=a,this.connect()):this.filters=a;return this},getFilter:function(){return this.getFilters()[0]},setFilter:function(a){return this.setFilters(a?[a]:[])},setPlaybackRate:function(a){if(!1===this.hasPlaybackControl)console.warn(\"THREE.Audio: this Audio has no playback control.\");\nelse return this.playbackRate=a,!0===this.isPlaying&&this.source.playbackRate.setValueAtTime(this.playbackRate,this.context.currentTime),this},getPlaybackRate:function(){return this.playbackRate},onEnded:function(){this.isPlaying=!1},getLoop:function(){return!1===this.hasPlaybackControl?(console.warn(\"THREE.Audio: this Audio has no playback control.\"),!1):this.loop},setLoop:function(a){if(!1===this.hasPlaybackControl)console.warn(\"THREE.Audio: this Audio has no playback control.\");else return this.loop=\na,!0===this.isPlaying&&(this.source.loop=this.loop),this},getVolume:function(){return this.gain.gain.value},setVolume:function(a){this.gain.gain.value=a;return this}});ie.prototype=Object.assign(Object.create(hc.prototype),{constructor:ie,getOutput:function(){return this.panner},getRefDistance:function(){return this.panner.refDistance},setRefDistance:function(a){this.panner.refDistance=a},getRolloffFactor:function(){return this.panner.rolloffFactor},setRolloffFactor:function(a){this.panner.rolloffFactor=\na},getDistanceModel:function(){return this.panner.distanceModel},setDistanceModel:function(a){this.panner.distanceModel=a},getMaxDistance:function(){return this.panner.maxDistance},setMaxDistance:function(a){this.panner.maxDistance=a},updateMatrixWorld:function(){var a=new n;return function(b){z.prototype.updateMatrixWorld.call(this,b);a.setFromMatrixPosition(this.matrixWorld);this.panner.setPosition(a.x,a.y,a.z)}}()});Object.assign(je.prototype,{getFrequencyData:function(){this.analyser.getByteFrequencyData(this.data);\nreturn this.data},getAverageFrequency:function(){for(var a=0,b=this.getFrequencyData(),c=0;c<b.length;c++)a+=b[c];return a/b.length}});Object.assign(ke.prototype,{accumulate:function(a,b){var c=this.buffer,d=this.valueSize,e=a*d+d,f=this.cumulativeWeight;if(0===f){for(f=0;f!==d;++f)c[e+f]=c[f];f=b}else f+=b,this._mixBufferRegion(c,e,0,b/f,d);this.cumulativeWeight=f},apply:function(a){var b=this.valueSize,c=this.buffer;a=a*b+b;var d=this.cumulativeWeight,e=this.binding;this.cumulativeWeight=0;1>d&&\nthis._mixBufferRegion(c,a,3*b,1-d,b);for(var d=b,f=b+b;d!==f;++d)if(c[d]!==c[d+b]){e.setValue(c,a);break}},saveOriginalState:function(){var a=this.buffer,b=this.valueSize,c=3*b;this.binding.getValue(a,c);for(var d=b;d!==c;++d)a[d]=a[c+d%b];this.cumulativeWeight=0},restoreOriginalState:function(){this.binding.setValue(this.buffer,3*this.valueSize)},_select:function(a,b,c,d,e){if(.5<=d)for(d=0;d!==e;++d)a[b+d]=a[c+d]},_slerp:function(a,b,c,d){oa.slerpFlat(a,b,a,b,a,c,d)},_lerp:function(a,b,c,d,e){for(var f=\n1-d,g=0;g!==e;++g){var h=b+g;a[h]=a[h]*f+a[c+g]*d}}});Object.assign(Te.prototype,{getValue:function(a,b){this.bind();var c=this._bindings[this._targetGroup.nCachedObjects_];void 0!==c&&c.getValue(a,b)},setValue:function(a,b){for(var c=this._bindings,d=this._targetGroup.nCachedObjects_,e=c.length;d!==e;++d)c[d].setValue(a,b)},bind:function(){for(var a=this._bindings,b=this._targetGroup.nCachedObjects_,c=a.length;b!==c;++b)a[b].bind()},unbind:function(){for(var a=this._bindings,b=this._targetGroup.nCachedObjects_,\nc=a.length;b!==c;++b)a[b].unbind()}});Object.assign(ha,{Composite:Te,create:function(a,b,c){return a&&a.isAnimationObjectGroup?new ha.Composite(a,b,c):new ha(a,b,c)},sanitizeNodeName:function(a){return a.replace(/\\s/g,\"_\").replace(/[^\\w-]/g,\"\")},parseTrackName:function(){var a=new RegExp(\"^\"+/((?:[\\w-]+[\\/:])*)/.source+/([\\w-\\.]+)?/.source+/(?:\\.([\\w-]+)(?:\\[(.+)\\])?)?/.source+/\\.([\\w-]+)(?:\\[(.+)\\])?/.source+\"$\"),b=[\"material\",\"materials\",\"bones\"];return function(c){var d=a.exec(c);if(!d)throw Error(\"PropertyBinding: Cannot parse trackName: \"+\nc);var d={nodeName:d[2],objectName:d[3],objectIndex:d[4],propertyName:d[5],propertyIndex:d[6]},e=d.nodeName&&d.nodeName.lastIndexOf(\".\");if(void 0!==e&&-1!==e){var f=d.nodeName.substring(e+1);-1!==b.indexOf(f)&&(d.nodeName=d.nodeName.substring(0,e),d.objectName=f)}if(null===d.propertyName||0===d.propertyName.length)throw Error(\"PropertyBinding: can not parse propertyName from trackName: \"+c);return d}}(),findNode:function(a,b){if(!b||\"\"===b||\"root\"===b||\".\"===b||-1===b||b===a.name||b===a.uuid)return a;\nif(a.skeleton){var c=function(a){for(var c=0;c<a.bones.length;c++){var d=a.bones[c];if(d.name===b)return d}return null}(a.skeleton);if(c)return c}if(a.children){var d=function(a){for(var c=0;c<a.length;c++){var g=a[c];if(g.name===b||g.uuid===b||(g=d(g.children)))return g}return null};if(c=d(a.children))return c}return null}});Object.assign(ha.prototype,{_getValue_unavailable:function(){},_setValue_unavailable:function(){},BindingType:{Direct:0,EntireArray:1,ArrayElement:2,HasFromToArray:3},Versioning:{None:0,\nNeedsUpdate:1,MatrixWorldNeedsUpdate:2},GetterByBindingType:[function(a,b){a[b]=this.node[this.propertyName]},function(a,b){for(var c=this.resolvedProperty,d=0,e=c.length;d!==e;++d)a[b++]=c[d]},function(a,b){a[b]=this.resolvedProperty[this.propertyIndex]},function(a,b){this.resolvedProperty.toArray(a,b)}],SetterByBindingTypeAndVersioning:[[function(a,b){this.node[this.propertyName]=a[b]},function(a,b){this.node[this.propertyName]=a[b];this.targetObject.needsUpdate=!0},function(a,b){this.node[this.propertyName]=\na[b];this.targetObject.matrixWorldNeedsUpdate=!0}],[function(a,b){for(var c=this.resolvedProperty,d=0,e=c.length;d!==e;++d)c[d]=a[b++]},function(a,b){for(var c=this.resolvedProperty,d=0,e=c.length;d!==e;++d)c[d]=a[b++];this.targetObject.needsUpdate=!0},function(a,b){for(var c=this.resolvedProperty,d=0,e=c.length;d!==e;++d)c[d]=a[b++];this.targetObject.matrixWorldNeedsUpdate=!0}],[function(a,b){this.resolvedProperty[this.propertyIndex]=a[b]},function(a,b){this.resolvedProperty[this.propertyIndex]=\na[b];this.targetObject.needsUpdate=!0},function(a,b){this.resolvedProperty[this.propertyIndex]=a[b];this.targetObject.matrixWorldNeedsUpdate=!0}],[function(a,b){this.resolvedProperty.fromArray(a,b)},function(a,b){this.resolvedProperty.fromArray(a,b);this.targetObject.needsUpdate=!0},function(a,b){this.resolvedProperty.fromArray(a,b);this.targetObject.matrixWorldNeedsUpdate=!0}]],getValue:function(a,b){this.bind();this.getValue(a,b)},setValue:function(a,b){this.bind();this.setValue(a,b)},bind:function(){var a=\nthis.node,b=this.parsedPath,c=b.objectName,d=b.propertyName,e=b.propertyIndex;a||(this.node=a=ha.findNode(this.rootNode,b.nodeName)||this.rootNode);this.getValue=this._getValue_unavailable;this.setValue=this._setValue_unavailable;if(a){if(c){var f=b.objectIndex;switch(c){case \"materials\":if(!a.material){console.error(\"THREE.PropertyBinding: Can not bind to material as node does not have a material.\",this);return}if(!a.material.materials){console.error(\"THREE.PropertyBinding: Can not bind to material.materials as node.material does not have a materials array.\",\nthis);return}a=a.material.materials;break;case \"bones\":if(!a.skeleton){console.error(\"THREE.PropertyBinding: Can not bind to bones as node does not have a skeleton.\",this);return}a=a.skeleton.bones;for(c=0;c<a.length;c++)if(a[c].name===f){f=c;break}break;default:if(void 0===a[c]){console.error(\"THREE.PropertyBinding: Can not bind to objectName of node undefined.\",this);return}a=a[c]}if(void 0!==f){if(void 0===a[f]){console.error(\"THREE.PropertyBinding: Trying to bind to objectIndex of objectName, but is undefined.\",\nthis,a);return}a=a[f]}}f=a[d];if(void 0===f)console.error(\"THREE.PropertyBinding: Trying to update property for track: \"+b.nodeName+\".\"+d+\" but it wasn't found.\",a);else{b=this.Versioning.None;void 0!==a.needsUpdate?(b=this.Versioning.NeedsUpdate,this.targetObject=a):void 0!==a.matrixWorldNeedsUpdate&&(b=this.Versioning.MatrixWorldNeedsUpdate,this.targetObject=a);c=this.BindingType.Direct;if(void 0!==e){if(\"morphTargetInfluences\"===d){if(!a.geometry){console.error(\"THREE.PropertyBinding: Can not bind to morphTargetInfluences because node does not have a geometry.\",\nthis);return}if(a.geometry.isBufferGeometry){if(!a.geometry.morphAttributes){console.error(\"THREE.PropertyBinding: Can not bind to morphTargetInfluences because node does not have a geometry.morphAttributes.\",this);return}for(c=0;c<this.node.geometry.morphAttributes.position.length;c++)if(a.geometry.morphAttributes.position[c].name===e){e=c;break}}else{if(!a.geometry.morphTargets){console.error(\"THREE.PropertyBinding: Can not bind to morphTargetInfluences because node does not have a geometry.morphTargets.\",\nthis);return}for(c=0;c<this.node.geometry.morphTargets.length;c++)if(a.geometry.morphTargets[c].name===e){e=c;break}}}c=this.BindingType.ArrayElement;this.resolvedProperty=f;this.propertyIndex=e}else void 0!==f.fromArray&&void 0!==f.toArray?(c=this.BindingType.HasFromToArray,this.resolvedProperty=f):Array.isArray(f)?(c=this.BindingType.EntireArray,this.resolvedProperty=f):this.propertyName=d;this.getValue=this.GetterByBindingType[c];this.setValue=this.SetterByBindingTypeAndVersioning[c][b]}}else console.error(\"THREE.PropertyBinding: Trying to update node for track: \"+\nthis.path+\" but it wasn't found.\")},unbind:function(){this.node=null;this.getValue=this._getValue_unbound;this.setValue=this._setValue_unbound}});Object.assign(ha.prototype,{_getValue_unbound:ha.prototype.getValue,_setValue_unbound:ha.prototype.setValue});Object.assign(Ue.prototype,{isAnimationObjectGroup:!0,add:function(a){for(var b=this._objects,c=b.length,d=this.nCachedObjects_,e=this._indicesByUUID,f=this._paths,g=this._parsedPaths,h=this._bindings,k=h.length,m=0,l=arguments.length;m!==l;++m){var n=\narguments[m],p=n.uuid,r=e[p];if(void 0===r){r=c++;e[p]=r;b.push(n);for(var p=0,z=k;p!==z;++p)h[p].push(new ha(n,f[p],g[p]))}else if(r<d){var t=--d,z=b[t];e[z.uuid]=r;b[r]=z;e[p]=t;b[t]=n;p=0;for(z=k;p!==z;++p){var y=h[p],x=y[r];y[r]=y[t];void 0===x&&(x=new ha(n,f[p],g[p]));y[t]=x}}else void 0!==b[r]&&console.error(\"THREE.AnimationObjectGroup: Different objects with the same UUID detected. Clean the caches or recreate your infrastructure when reloading scenes.\")}this.nCachedObjects_=d},remove:function(a){for(var b=\nthis._objects,c=this.nCachedObjects_,d=this._indicesByUUID,e=this._bindings,f=e.length,g=0,h=arguments.length;g!==h;++g){var k=arguments[g],m=k.uuid,l=d[m];if(void 0!==l&&l>=c){var n=c++,p=b[n];d[p.uuid]=l;b[l]=p;d[m]=n;b[n]=k;k=0;for(m=f;k!==m;++k){var p=e[k],r=p[l];p[l]=p[n];p[n]=r}}}this.nCachedObjects_=c},uncache:function(a){for(var b=this._objects,c=b.length,d=this.nCachedObjects_,e=this._indicesByUUID,f=this._bindings,g=f.length,h=0,k=arguments.length;h!==k;++h){var l=arguments[h].uuid,n=e[l];\nif(void 0!==n)if(delete e[l],n<d){var l=--d,v=b[l],p=--c,r=b[p];e[v.uuid]=n;b[n]=v;e[r.uuid]=l;b[l]=r;b.pop();v=0;for(r=g;v!==r;++v){var z=f[v],t=z[p];z[n]=z[l];z[l]=t;z.pop()}}else for(p=--c,r=b[p],e[r.uuid]=n,b[n]=r,b.pop(),v=0,r=g;v!==r;++v)z=f[v],z[n]=z[p],z.pop()}this.nCachedObjects_=d},subscribe_:function(a,b){var c=this._bindingsIndicesByPath,d=c[a],e=this._bindings;if(void 0!==d)return e[d];var f=this._paths,g=this._parsedPaths,h=this._objects,k=this.nCachedObjects_,l=Array(h.length),d=e.length;\nc[a]=d;f.push(a);g.push(b);e.push(l);c=k;for(d=h.length;c!==d;++c)l[c]=new ha(h[c],a,b);return l},unsubscribe_:function(a){var b=this._bindingsIndicesByPath,c=b[a];if(void 0!==c){var d=this._paths,e=this._parsedPaths,f=this._bindings,g=f.length-1,h=f[g];b[a[g]]=c;f[c]=h;f.pop();e[c]=e[g];e.pop();d[c]=d[g];d.pop()}}});Object.assign(Ve.prototype,{play:function(){this._mixer._activateAction(this);return this},stop:function(){this._mixer._deactivateAction(this);return this.reset()},reset:function(){this.paused=\n!1;this.enabled=!0;this.time=0;this._loopCount=-1;this._startTime=null;return this.stopFading().stopWarping()},isRunning:function(){return this.enabled&&!this.paused&&0!==this.timeScale&&null===this._startTime&&this._mixer._isActiveAction(this)},isScheduled:function(){return this._mixer._isActiveAction(this)},startAt:function(a){this._startTime=a;return this},setLoop:function(a,b){this.loop=a;this.repetitions=b;return this},setEffectiveWeight:function(a){this.weight=a;this._effectiveWeight=this.enabled?\na:0;return this.stopFading()},getEffectiveWeight:function(){return this._effectiveWeight},fadeIn:function(a){return this._scheduleFading(a,0,1)},fadeOut:function(a){return this._scheduleFading(a,1,0)},crossFadeFrom:function(a,b,c){a.fadeOut(b);this.fadeIn(b);if(c){c=this._clip.duration;var d=a._clip.duration,e=c/d;a.warp(1,d/c,b);this.warp(e,1,b)}return this},crossFadeTo:function(a,b,c){return a.crossFadeFrom(this,b,c)},stopFading:function(){var a=this._weightInterpolant;null!==a&&(this._weightInterpolant=\nnull,this._mixer._takeBackControlInterpolant(a));return this},setEffectiveTimeScale:function(a){this.timeScale=a;this._effectiveTimeScale=this.paused?0:a;return this.stopWarping()},getEffectiveTimeScale:function(){return this._effectiveTimeScale},setDuration:function(a){this.timeScale=this._clip.duration/a;return this.stopWarping()},syncWith:function(a){this.time=a.time;this.timeScale=a.timeScale;return this.stopWarping()},halt:function(a){return this.warp(this._effectiveTimeScale,0,a)},warp:function(a,\nb,c){var d=this._mixer,e=d.time,f=this._timeScaleInterpolant,g=this.timeScale;null===f&&(this._timeScaleInterpolant=f=d._lendControlInterpolant());d=f.parameterPositions;f=f.sampleValues;d[0]=e;d[1]=e+c;f[0]=a/g;f[1]=b/g;return this},stopWarping:function(){var a=this._timeScaleInterpolant;null!==a&&(this._timeScaleInterpolant=null,this._mixer._takeBackControlInterpolant(a));return this},getMixer:function(){return this._mixer},getClip:function(){return this._clip},getRoot:function(){return this._localRoot||\nthis._mixer._root},_update:function(a,b,c,d){if(this.enabled){var e=this._startTime;if(null!==e){b=(a-e)*c;if(0>b||0===c)return;this._startTime=null;b*=c}b*=this._updateTimeScale(a);c=this._updateTime(b);a=this._updateWeight(a);if(0<a){b=this._interpolants;for(var e=this._propertyBindings,f=0,g=b.length;f!==g;++f)b[f].evaluate(c),e[f].accumulate(d,a)}}else this._updateWeight(a)},_updateWeight:function(a){var b=0;if(this.enabled){var b=this.weight,c=this._weightInterpolant;if(null!==c){var d=c.evaluate(a)[0],\nb=b*d;a>c.parameterPositions[1]&&(this.stopFading(),0===d&&(this.enabled=!1))}}return this._effectiveWeight=b},_updateTimeScale:function(a){var b=0;if(!this.paused){var b=this.timeScale,c=this._timeScaleInterpolant;if(null!==c){var d=c.evaluate(a)[0],b=b*d;a>c.parameterPositions[1]&&(this.stopWarping(),0===b?this.paused=!0:this.timeScale=b)}}return this._effectiveTimeScale=b},_updateTime:function(a){var b=this.time+a;if(0===a)return b;var c=this._clip.duration,d=this.loop,e=this._loopCount;if(2200===\nd)a:{if(-1===e&&(this._loopCount=0,this._setEndings(!0,!0,!1)),b>=c)b=c;else if(0>b)b=0;else break a;this.clampWhenFinished?this.paused=!0:this.enabled=!1;this._mixer.dispatchEvent({type:\"finished\",action:this,direction:0>a?-1:1})}else{d=2202===d;-1===e&&(0<=a?(e=0,this._setEndings(!0,0===this.repetitions,d)):this._setEndings(0===this.repetitions,!0,d));if(b>=c||0>b){var f=Math.floor(b/c),b=b-c*f,e=e+Math.abs(f),g=this.repetitions-e;0>g?(this.clampWhenFinished?this.paused=!0:this.enabled=!1,b=0<a?\nc:0,this._mixer.dispatchEvent({type:\"finished\",action:this,direction:0<a?1:-1})):(0===g?(a=0>a,this._setEndings(a,!a,d)):this._setEndings(!1,!1,d),this._loopCount=e,this._mixer.dispatchEvent({type:\"loop\",action:this,loopDelta:f}))}if(d&&1===(e&1))return this.time=b,c-b}return this.time=b},_setEndings:function(a,b,c){var d=this._interpolantSettings;c?(d.endingStart=2401,d.endingEnd=2401):(d.endingStart=a?this.zeroSlopeAtStart?2401:2400:2402,d.endingEnd=b?this.zeroSlopeAtEnd?2401:2400:2402)},_scheduleFading:function(a,\nb,c){var d=this._mixer,e=d.time,f=this._weightInterpolant;null===f&&(this._weightInterpolant=f=d._lendControlInterpolant());d=f.parameterPositions;f=f.sampleValues;d[0]=e;f[0]=b;d[1]=e+a;f[1]=c;return this}});Object.assign(We.prototype,xa.prototype,{_bindAction:function(a,b){var c=a._localRoot||this._root,d=a._clip.tracks,e=d.length,f=a._propertyBindings,g=a._interpolants,h=c.uuid,k=this._bindingsByRootAndName,l=k[h];void 0===l&&(l={},k[h]=l);for(k=0;k!==e;++k){var n=d[k],v=n.name,p=l[v];if(void 0===\np){p=f[k];if(void 0!==p){null===p._cacheIndex&&(++p.referenceCount,this._addInactiveBinding(p,h,v));continue}p=new ke(ha.create(c,v,b&&b._propertyBindings[k].binding.parsedPath),n.ValueTypeName,n.getValueSize());++p.referenceCount;this._addInactiveBinding(p,h,v)}f[k]=p;g[k].resultBuffer=p.buffer}},_activateAction:function(a){if(!this._isActiveAction(a)){if(null===a._cacheIndex){var b=(a._localRoot||this._root).uuid,c=a._clip.uuid,d=this._actionsByClip[c];this._bindAction(a,d&&d.knownActions[0]);this._addInactiveAction(a,\nc,b)}b=a._propertyBindings;c=0;for(d=b.length;c!==d;++c){var e=b[c];0===e.useCount++&&(this._lendBinding(e),e.saveOriginalState())}this._lendAction(a)}},_deactivateAction:function(a){if(this._isActiveAction(a)){for(var b=a._propertyBindings,c=0,d=b.length;c!==d;++c){var e=b[c];0===--e.useCount&&(e.restoreOriginalState(),this._takeBackBinding(e))}this._takeBackAction(a)}},_initMemoryManager:function(){this._actions=[];this._nActiveActions=0;this._actionsByClip={};this._bindings=[];this._nActiveBindings=\n0;this._bindingsByRootAndName={};this._controlInterpolants=[];this._nActiveControlInterpolants=0;var a=this;this.stats={actions:{get total(){return a._actions.length},get inUse(){return a._nActiveActions}},bindings:{get total(){return a._bindings.length},get inUse(){return a._nActiveBindings}},controlInterpolants:{get total(){return a._controlInterpolants.length},get inUse(){return a._nActiveControlInterpolants}}}},_isActiveAction:function(a){a=a._cacheIndex;return null!==a&&a<this._nActiveActions},\n_addInactiveAction:function(a,b,c){var d=this._actions,e=this._actionsByClip,f=e[b];void 0===f?(f={knownActions:[a],actionByRoot:{}},a._byClipCacheIndex=0,e[b]=f):(b=f.knownActions,a._byClipCacheIndex=b.length,b.push(a));a._cacheIndex=d.length;d.push(a);f.actionByRoot[c]=a},_removeInactiveAction:function(a){var b=this._actions,c=b[b.length-1],d=a._cacheIndex;c._cacheIndex=d;b[d]=c;b.pop();a._cacheIndex=null;var b=a._clip.uuid,c=this._actionsByClip,d=c[b],e=d.knownActions,f=e[e.length-1],g=a._byClipCacheIndex;\nf._byClipCacheIndex=g;e[g]=f;e.pop();a._byClipCacheIndex=null;delete d.actionByRoot[(a._localRoot||this._root).uuid];0===e.length&&delete c[b];this._removeInactiveBindingsForAction(a)},_removeInactiveBindingsForAction:function(a){a=a._propertyBindings;for(var b=0,c=a.length;b!==c;++b){var d=a[b];0===--d.referenceCount&&this._removeInactiveBinding(d)}},_lendAction:function(a){var b=this._actions,c=a._cacheIndex,d=this._nActiveActions++,e=b[d];a._cacheIndex=d;b[d]=a;e._cacheIndex=c;b[c]=e},_takeBackAction:function(a){var b=\nthis._actions,c=a._cacheIndex,d=--this._nActiveActions,e=b[d];a._cacheIndex=d;b[d]=a;e._cacheIndex=c;b[c]=e},_addInactiveBinding:function(a,b,c){var d=this._bindingsByRootAndName,e=d[b],f=this._bindings;void 0===e&&(e={},d[b]=e);e[c]=a;a._cacheIndex=f.length;f.push(a)},_removeInactiveBinding:function(a){var b=this._bindings,c=a.binding,d=c.rootNode.uuid,c=c.path,e=this._bindingsByRootAndName,f=e[d],g=b[b.length-1];a=a._cacheIndex;g._cacheIndex=a;b[a]=g;b.pop();delete f[c];a:{for(var h in f)break a;\ndelete e[d]}},_lendBinding:function(a){var b=this._bindings,c=a._cacheIndex,d=this._nActiveBindings++,e=b[d];a._cacheIndex=d;b[d]=a;e._cacheIndex=c;b[c]=e},_takeBackBinding:function(a){var b=this._bindings,c=a._cacheIndex,d=--this._nActiveBindings,e=b[d];a._cacheIndex=d;b[d]=a;e._cacheIndex=c;b[c]=e},_lendControlInterpolant:function(){var a=this._controlInterpolants,b=this._nActiveControlInterpolants++,c=a[b];void 0===c&&(c=new Tc(new Float32Array(2),new Float32Array(2),1,this._controlInterpolantsResultBuffer),\nc.__cacheIndex=b,a[b]=c);return c},_takeBackControlInterpolant:function(a){var b=this._controlInterpolants,c=a.__cacheIndex,d=--this._nActiveControlInterpolants,e=b[d];a.__cacheIndex=d;b[d]=a;e.__cacheIndex=c;b[c]=e},_controlInterpolantsResultBuffer:new Float32Array(1),clipAction:function(a,b){var c=b||this._root,d=c.uuid,e=\"string\"===typeof a?Da.findByName(c,a):a,c=null!==e?e.uuid:a,f=this._actionsByClip[c],g=null;if(void 0!==f){g=f.actionByRoot[d];if(void 0!==g)return g;g=f.knownActions[0];null===\ne&&(e=g._clip)}if(null===e)return null;e=new Ve(this,e,b);this._bindAction(e,g);this._addInactiveAction(e,c,d);return e},existingAction:function(a,b){var c=b||this._root,d=c.uuid,c=\"string\"===typeof a?Da.findByName(c,a):a,c=this._actionsByClip[c?c.uuid:a];return void 0!==c?c.actionByRoot[d]||null:null},stopAllAction:function(){for(var a=this._actions,b=this._nActiveActions,c=this._bindings,d=this._nActiveBindings,e=this._nActiveBindings=this._nActiveActions=0;e!==b;++e)a[e].reset();for(e=0;e!==d;++e)c[e].useCount=\n0;return this},update:function(a){a*=this.timeScale;for(var b=this._actions,c=this._nActiveActions,d=this.time+=a,e=Math.sign(a),f=this._accuIndex^=1,g=0;g!==c;++g)b[g]._update(d,a,e,f);a=this._bindings;b=this._nActiveBindings;for(g=0;g!==b;++g)a[g].apply(f);return this},getRoot:function(){return this._root},uncacheClip:function(a){var b=this._actions;a=a.uuid;var c=this._actionsByClip,d=c[a];if(void 0!==d){for(var d=d.knownActions,e=0,f=d.length;e!==f;++e){var g=d[e];this._deactivateAction(g);var h=\ng._cacheIndex,k=b[b.length-1];g._cacheIndex=null;g._byClipCacheIndex=null;k._cacheIndex=h;b[h]=k;b.pop();this._removeInactiveBindingsForAction(g)}delete c[a]}},uncacheRoot:function(a){a=a.uuid;var b=this._actionsByClip,c;for(c in b){var d=b[c].actionByRoot[a];void 0!==d&&(this._deactivateAction(d),this._removeInactiveAction(d))}c=this._bindingsByRootAndName[a];if(void 0!==c)for(var e in c)a=c[e],a.restoreOriginalState(),this._removeInactiveBinding(a)},uncacheAction:function(a,b){var c=this.existingAction(a,\nb);null!==c&&(this._deactivateAction(c),this._removeInactiveAction(c))}});Id.prototype.clone=function(){return new Id(void 0===this.value.clone?this.value:this.value.clone())};le.prototype=Object.assign(Object.create(E.prototype),{constructor:le,isInstancedBufferGeometry:!0,addGroup:function(a,b,c){this.groups.push({start:a,count:b,materialIndex:c})},copy:function(a){var b=a.index;null!==b&&this.setIndex(b.clone());var b=a.attributes,c;for(c in b)this.addAttribute(c,b[c].clone());a=a.groups;c=0;for(b=\na.length;c<b;c++){var d=a[c];this.addGroup(d.start,d.count,d.materialIndex)}return this}});Object.defineProperties(me.prototype,{count:{get:function(){return this.data.count}},array:{get:function(){return this.data.array}}});Object.assign(me.prototype,{isInterleavedBufferAttribute:!0,setX:function(a,b){this.data.array[a*this.data.stride+this.offset]=b;return this},setY:function(a,b){this.data.array[a*this.data.stride+this.offset+1]=b;return this},setZ:function(a,b){this.data.array[a*this.data.stride+\nthis.offset+2]=b;return this},setW:function(a,b){this.data.array[a*this.data.stride+this.offset+3]=b;return this},getX:function(a){return this.data.array[a*this.data.stride+this.offset]},getY:function(a){return this.data.array[a*this.data.stride+this.offset+1]},getZ:function(a){return this.data.array[a*this.data.stride+this.offset+2]},getW:function(a){return this.data.array[a*this.data.stride+this.offset+3]},setXY:function(a,b,c){a=a*this.data.stride+this.offset;this.data.array[a+0]=b;this.data.array[a+\n1]=c;return this},setXYZ:function(a,b,c,d){a=a*this.data.stride+this.offset;this.data.array[a+0]=b;this.data.array[a+1]=c;this.data.array[a+2]=d;return this},setXYZW:function(a,b,c,d,e){a=a*this.data.stride+this.offset;this.data.array[a+0]=b;this.data.array[a+1]=c;this.data.array[a+2]=d;this.data.array[a+3]=e;return this}});Object.defineProperty(ic.prototype,\"needsUpdate\",{set:function(a){!0===a&&this.version++}});Object.assign(ic.prototype,{isInterleavedBuffer:!0,setArray:function(a){if(Array.isArray(a))throw new TypeError(\"THREE.BufferAttribute: array should be a Typed Array.\");\nthis.count=void 0!==a?a.length/this.stride:0;this.array=a},setDynamic:function(a){this.dynamic=a;return this},copy:function(a){this.array=new a.array.constructor(a.array);this.count=a.count;this.stride=a.stride;this.dynamic=a.dynamic;return this},copyAt:function(a,b,c){a*=this.stride;c*=b.stride;for(var d=0,e=this.stride;d<e;d++)this.array[a+d]=b.array[c+d];return this},set:function(a,b){void 0===b&&(b=0);this.array.set(a,b);return this},clone:function(){return(new this.constructor).copy(this)},onUpload:function(a){this.onUploadCallback=\na;return this}});ne.prototype=Object.assign(Object.create(ic.prototype),{constructor:ne,isInstancedInterleavedBuffer:!0,copy:function(a){ic.prototype.copy.call(this,a);this.meshPerAttribute=a.meshPerAttribute;return this}});oe.prototype=Object.assign(Object.create(Z.prototype),{constructor:oe,isInstancedBufferAttribute:!0,copy:function(a){Z.prototype.copy.call(this,a);this.meshPerAttribute=a.meshPerAttribute;return this}});Object.assign(Xe.prototype,{linePrecision:1,set:function(a,b){this.ray.set(a,\nb)},setFromCamera:function(a,b){b&&b.isPerspectiveCamera?(this.ray.origin.setFromMatrixPosition(b.matrixWorld),this.ray.direction.set(a.x,a.y,.5).unproject(b).sub(this.ray.origin).normalize()):b&&b.isOrthographicCamera?(this.ray.origin.set(a.x,a.y,(b.near+b.far)/(b.near-b.far)).unproject(b),this.ray.direction.set(0,0,-1).transformDirection(b.matrixWorld)):console.error(\"THREE.Raycaster: Unsupported camera type.\")},intersectObject:function(a,b){var c=[];pe(a,this,c,b);c.sort(Ye);return c},intersectObjects:function(a,\nb){var c=[];if(!1===Array.isArray(a))return console.warn(\"THREE.Raycaster.intersectObjects: objects is not an Array.\"),c;for(var d=0,e=a.length;d<e;d++)pe(a[d],this,c,b);c.sort(Ye);return c}});Object.assign(Ze.prototype,{start:function(){this.oldTime=this.startTime=(\"undefined\"===typeof performance?Date:performance).now();this.elapsedTime=0;this.running=!0},stop:function(){this.getElapsedTime();this.autoStart=this.running=!1},getElapsedTime:function(){this.getDelta();return this.elapsedTime},getDelta:function(){var a=\n0;if(this.autoStart&&!this.running)return this.start(),0;if(this.running){var b=(\"undefined\"===typeof performance?Date:performance).now(),a=(b-this.oldTime)/1E3;this.oldTime=b;this.elapsedTime+=a}return a}});Object.assign($e.prototype,{set:function(a,b,c){this.radius=a;this.phi=b;this.theta=c;return this},clone:function(){return(new this.constructor).copy(this)},copy:function(a){this.radius=a.radius;this.phi=a.phi;this.theta=a.theta;return this},makeSafe:function(){this.phi=Math.max(1E-6,Math.min(Math.PI-\n1E-6,this.phi));return this},setFromVector3:function(a){this.radius=a.length();0===this.radius?this.phi=this.theta=0:(this.theta=Math.atan2(a.x,a.z),this.phi=Math.acos(Y.clamp(a.y/this.radius,-1,1)));return this}});Object.assign(af.prototype,{set:function(a,b,c){this.radius=a;this.theta=b;this.y=c;return this},clone:function(){return(new this.constructor).copy(this)},copy:function(a){this.radius=a.radius;this.theta=a.theta;this.y=a.y;return this},setFromVector3:function(a){this.radius=Math.sqrt(a.x*\na.x+a.z*a.z);this.theta=Math.atan2(a.x,a.z);this.y=a.y;return this}});ta.prototype=Object.create(la.prototype);ta.prototype.constructor=ta;ta.prototype.createAnimation=function(a,b,c,d){b={start:b,end:c,length:c-b+1,fps:d,duration:(c-b)/d,lastFrame:0,currentFrame:0,active:!1,time:0,direction:1,weight:1,directionBackwards:!1,mirroredLoop:!1};this.animationsMap[a]=b;this.animationsList.push(b)};ta.prototype.autoCreateAnimations=function(a){for(var b=/([a-z]+)_?(\\d+)/i,c,d={},e=this.geometry,f=0,g=e.morphTargets.length;f<\ng;f++){var h=e.morphTargets[f].name.match(b);if(h&&1<h.length){var k=h[1];d[k]||(d[k]={start:Infinity,end:-Infinity});h=d[k];f<h.start&&(h.start=f);f>h.end&&(h.end=f);c||(c=k)}}for(k in d)h=d[k],this.createAnimation(k,h.start,h.end,a);this.firstAnimation=c};ta.prototype.setAnimationDirectionForward=function(a){if(a=this.animationsMap[a])a.direction=1,a.directionBackwards=!1};ta.prototype.setAnimationDirectionBackward=function(a){if(a=this.animationsMap[a])a.direction=-1,a.directionBackwards=!0};ta.prototype.setAnimationFPS=\nfunction(a,b){var c=this.animationsMap[a];c&&(c.fps=b,c.duration=(c.end-c.start)/c.fps)};ta.prototype.setAnimationDuration=function(a,b){var c=this.animationsMap[a];c&&(c.duration=b,c.fps=(c.end-c.start)/c.duration)};ta.prototype.setAnimationWeight=function(a,b){var c=this.animationsMap[a];c&&(c.weight=b)};ta.prototype.setAnimationTime=function(a,b){var c=this.animationsMap[a];c&&(c.time=b)};ta.prototype.getAnimationTime=function(a){var b=0;if(a=this.animationsMap[a])b=a.time;return b};ta.prototype.getAnimationDuration=\nfunction(a){var b=-1;if(a=this.animationsMap[a])b=a.duration;return b};ta.prototype.playAnimation=function(a){var b=this.animationsMap[a];b?(b.time=0,b.active=!0):console.warn(\"THREE.MorphBlendMesh: animation[\"+a+\"] undefined in .playAnimation()\")};ta.prototype.stopAnimation=function(a){if(a=this.animationsMap[a])a.active=!1};ta.prototype.update=function(a){for(var b=0,c=this.animationsList.length;b<c;b++){var d=this.animationsList[b];if(d.active){var e=d.duration/d.length;d.time+=d.direction*a;if(d.mirroredLoop){if(d.time>\nd.duration||0>d.time)d.direction*=-1,d.time>d.duration&&(d.time=d.duration,d.directionBackwards=!0),0>d.time&&(d.time=0,d.directionBackwards=!1)}else d.time%=d.duration,0>d.time&&(d.time+=d.duration);var f=d.start+Y.clamp(Math.floor(d.time/e),0,d.length-1),g=d.weight;f!==d.currentFrame&&(this.morphTargetInfluences[d.lastFrame]=0,this.morphTargetInfluences[d.currentFrame]=1*g,this.morphTargetInfluences[f]=0,d.lastFrame=d.currentFrame,d.currentFrame=f);e=d.time%e/e;d.directionBackwards&&(e=1-e);d.currentFrame!==\nd.lastFrame?(this.morphTargetInfluences[d.currentFrame]=e*g,this.morphTargetInfluences[d.lastFrame]=(1-e)*g):this.morphTargetInfluences[d.currentFrame]=g}}};Xc.prototype=Object.create(z.prototype);Xc.prototype.constructor=Xc;Xc.prototype.isImmediateRenderObject=!0;Yc.prototype=Object.create(Q.prototype);Yc.prototype.constructor=Yc;Yc.prototype.update=function(){var a=new n,b=new n,c=new Ba;return function(){var d=[\"a\",\"b\",\"c\"];this.object.updateMatrixWorld(!0);c.getNormalMatrix(this.object.matrixWorld);\nvar e=this.object.matrixWorld,f=this.geometry.attributes.position,g=this.object.geometry;if(g&&g.isGeometry)for(var h=g.vertices,k=g.faces,l=g=0,n=k.length;l<n;l++)for(var v=k[l],p=0,r=v.vertexNormals.length;p<r;p++){var z=v.vertexNormals[p];a.copy(h[v[d[p]]]).applyMatrix4(e);b.copy(z).applyMatrix3(c).normalize().multiplyScalar(this.size).add(a);f.setXYZ(g,a.x,a.y,a.z);g+=1;f.setXYZ(g,b.x,b.y,b.z);g+=1}else if(g&&g.isBufferGeometry)for(d=g.attributes.position,h=g.attributes.normal,p=g=0,r=d.count;p<\nr;p++)a.set(d.getX(p),d.getY(p),d.getZ(p)).applyMatrix4(e),b.set(h.getX(p),h.getY(p),h.getZ(p)),b.applyMatrix3(c).normalize().multiplyScalar(this.size).add(a),f.setXYZ(g,a.x,a.y,a.z),g+=1,f.setXYZ(g,b.x,b.y,b.z),g+=1;f.needsUpdate=!0}}();jc.prototype=Object.create(z.prototype);jc.prototype.constructor=jc;jc.prototype.dispose=function(){this.cone.geometry.dispose();this.cone.material.dispose()};jc.prototype.update=function(){var a=new n,b=new n;return function(){this.light.updateMatrixWorld();var c=\nthis.light.distance?this.light.distance:1E3,d=c*Math.tan(this.light.angle);this.cone.scale.set(d,d,c);a.setFromMatrixPosition(this.light.matrixWorld);b.setFromMatrixPosition(this.light.target.matrixWorld);this.cone.lookAt(b.sub(a));this.cone.material.color.copy(this.light.color)}}();kc.prototype=Object.create(Q.prototype);kc.prototype.constructor=kc;kc.prototype.onBeforeRender=function(){var a=new n,b=new K,c=new K;return function(){var d=this.bones,e=this.geometry,f=e.getAttribute(\"position\");c.getInverse(this.root.matrixWorld);\nfor(var g=0,h=0;g<d.length;g++){var k=d[g];k.parent&&k.parent.isBone&&(b.multiplyMatrices(c,k.matrixWorld),a.setFromMatrixPosition(b),f.setXYZ(h,a.x,a.y,a.z),b.multiplyMatrices(c,k.parent.matrixWorld),a.setFromMatrixPosition(b),f.setXYZ(h+1,a.x,a.y,a.z),h+=2)}e.getAttribute(\"position\").needsUpdate=!0}}();lc.prototype=Object.create(la.prototype);lc.prototype.constructor=lc;lc.prototype.dispose=function(){this.geometry.dispose();this.material.dispose()};lc.prototype.update=function(){this.material.color.copy(this.light.color)};\nmc.prototype=Object.create(z.prototype);mc.prototype.constructor=mc;mc.prototype.dispose=function(){this.children[0].geometry.dispose();this.children[0].material.dispose()};mc.prototype.update=function(){var a=this.children[0];a.material.color.copy(this.light.color);var b=.5*this.light.width,c=.5*this.light.height,a=a.geometry.attributes.position,d=a.array;d[0]=b;d[1]=-c;d[2]=0;d[3]=b;d[4]=c;d[5]=0;d[6]=-b;d[7]=c;d[8]=0;d[9]=-b;d[10]=-c;d[11]=0;d[12]=b;d[13]=-c;d[14]=0;a.needsUpdate=!0};nc.prototype=\nObject.create(z.prototype);nc.prototype.constructor=nc;nc.prototype.dispose=function(){this.children[0].geometry.dispose();this.children[0].material.dispose()};nc.prototype.update=function(){var a=new n,b=new G,c=new G;return function(){var d=this.children[0],e=d.geometry.getAttribute(\"color\");b.copy(this.light.color);c.copy(this.light.groundColor);for(var f=0,g=e.count;f<g;f++){var h=f<g/2?b:c;e.setXYZ(f,h.r,h.g,h.b)}d.lookAt(a.setFromMatrixPosition(this.light.matrixWorld).negate());e.needsUpdate=\n!0}}();Zc.prototype=Object.create(Q.prototype);Zc.prototype.constructor=Zc;Jd.prototype=Object.create(Q.prototype);Jd.prototype.constructor=Jd;$c.prototype=Object.create(Q.prototype);$c.prototype.constructor=$c;$c.prototype.update=function(){var a=new n,b=new n,c=new Ba;return function(){this.object.updateMatrixWorld(!0);c.getNormalMatrix(this.object.matrixWorld);for(var d=this.object.matrixWorld,e=this.geometry.attributes.position,f=this.object.geometry,g=f.vertices,f=f.faces,h=0,k=0,l=f.length;k<\nl;k++){var n=f[k],v=n.normal;a.copy(g[n.a]).add(g[n.b]).add(g[n.c]).divideScalar(3).applyMatrix4(d);b.copy(v).applyMatrix3(c).normalize().multiplyScalar(this.size).add(a);e.setXYZ(h,a.x,a.y,a.z);h+=1;e.setXYZ(h,b.x,b.y,b.z);h+=1}e.needsUpdate=!0}}();oc.prototype=Object.create(z.prototype);oc.prototype.constructor=oc;oc.prototype.dispose=function(){var a=this.children[0],b=this.children[1];a.geometry.dispose();a.material.dispose();b.geometry.dispose();b.material.dispose()};oc.prototype.update=function(){var a=\nnew n,b=new n,c=new n;return function(){a.setFromMatrixPosition(this.light.matrixWorld);b.setFromMatrixPosition(this.light.target.matrixWorld);c.subVectors(b,a);var d=this.children[0],e=this.children[1];d.lookAt(c);d.material.color.copy(this.light.color);e.lookAt(c);e.scale.z=c.length()}}();ad.prototype=Object.create(Q.prototype);ad.prototype.constructor=ad;ad.prototype.update=function(){function a(a,g,h,k){d.set(g,h,k).unproject(e);a=c[a];if(void 0!==a)for(g=b.getAttribute(\"position\"),h=0,k=a.length;h<\nk;h++)g.setXYZ(a[h],d.x,d.y,d.z)}var b,c,d=new n,e=new Na;return function(){b=this.geometry;c=this.pointMap;e.projectionMatrix.copy(this.camera.projectionMatrix);a(\"c\",0,0,-1);a(\"t\",0,0,1);a(\"n1\",-1,-1,-1);a(\"n2\",1,-1,-1);a(\"n3\",-1,1,-1);a(\"n4\",1,1,-1);a(\"f1\",-1,-1,1);a(\"f2\",1,-1,1);a(\"f3\",-1,1,1);a(\"f4\",1,1,1);a(\"u1\",.7,1.1,-1);a(\"u2\",-.7,1.1,-1);a(\"u3\",0,2,-1);a(\"cf1\",-1,0,1);a(\"cf2\",1,0,1);a(\"cf3\",0,-1,1);a(\"cf4\",0,1,1);a(\"cn1\",-1,0,-1);a(\"cn2\",1,0,-1);a(\"cn3\",0,-1,-1);a(\"cn4\",0,1,-1);b.getAttribute(\"position\").needsUpdate=\n!0}}();Ab.prototype=Object.create(Q.prototype);Ab.prototype.constructor=Ab;Ab.prototype.update=function(){var a=new Ra;return function(b){void 0!==b&&console.warn(\"THREE.BoxHelper: .update() has no longer arguments.\");void 0!==this.object&&a.setFromObject(this.object);if(!a.isEmpty()){b=a.min;var c=a.max,d=this.geometry.attributes.position,e=d.array;e[0]=c.x;e[1]=c.y;e[2]=c.z;e[3]=b.x;e[4]=c.y;e[5]=c.z;e[6]=b.x;e[7]=b.y;e[8]=c.z;e[9]=c.x;e[10]=b.y;e[11]=c.z;e[12]=c.x;e[13]=c.y;e[14]=b.z;e[15]=b.x;\ne[16]=c.y;e[17]=b.z;e[18]=b.x;e[19]=b.y;e[20]=b.z;e[21]=c.x;e[22]=b.y;e[23]=b.z;d.needsUpdate=!0;this.geometry.computeBoundingSphere()}}}();Ab.prototype.setFromObject=function(a){this.object=a;this.update();return this};var Kd,qe;Bb.prototype=Object.create(z.prototype);Bb.prototype.constructor=Bb;Bb.prototype.setDirection=function(){var a=new n,b;return function(c){.99999<c.y?this.quaternion.set(0,0,0,1):-.99999>c.y?this.quaternion.set(1,0,0,0):(a.set(c.z,0,-c.x).normalize(),b=Math.acos(c.y),this.quaternion.setFromAxisAngle(a,\nb))}}();Bb.prototype.setLength=function(a,b,c){void 0===b&&(b=.2*a);void 0===c&&(c=.2*b);this.line.scale.set(1,Math.max(0,a-b),1);this.line.updateMatrix();this.cone.scale.set(c,b,c);this.cone.position.y=a;this.cone.updateMatrix()};Bb.prototype.setColor=function(a){this.line.material.color.copy(a);this.cone.material.color.copy(a)};Ld.prototype=Object.create(Q.prototype);Ld.prototype.constructor=Ld;var Od=new n,ue=new re,ve=new re,we=new re;La.prototype=Object.create(ua.prototype);La.prototype.constructor=\nLa;La.prototype.getPoint=function(a){var b=this.points,c=b.length;a*=c-(this.closed?0:1);var d=Math.floor(a);a-=d;this.closed?d+=0<d?0:(Math.floor(Math.abs(d)/b.length)+1)*b.length:0===a&&d===c-1&&(d=c-2,a=1);var e,f,g;this.closed||0<d?e=b[(d-1)%c]:(Od.subVectors(b[0],b[1]).add(b[0]),e=Od);f=b[d%c];g=b[(d+1)%c];this.closed||d+2<c?b=b[(d+2)%c]:(Od.subVectors(b[c-1],b[c-2]).add(b[c-1]),b=Od);if(void 0===this.type||\"centripetal\"===this.type||\"chordal\"===this.type){var h=\"chordal\"===this.type?.5:.25,\nc=Math.pow(e.distanceToSquared(f),h),d=Math.pow(f.distanceToSquared(g),h),h=Math.pow(g.distanceToSquared(b),h);1E-4>d&&(d=1);1E-4>c&&(c=d);1E-4>h&&(h=d);ue.initNonuniformCatmullRom(e.x,f.x,g.x,b.x,c,d,h);ve.initNonuniformCatmullRom(e.y,f.y,g.y,b.y,c,d,h);we.initNonuniformCatmullRom(e.z,f.z,g.z,b.z,c,d,h)}else\"catmullrom\"===this.type&&(c=void 0!==this.tension?this.tension:.5,ue.initCatmullRom(e.x,f.x,g.x,b.x,c),ve.initCatmullRom(e.y,f.y,g.y,b.y,c),we.initCatmullRom(e.z,f.z,g.z,b.z,c));return new n(ue.calc(a),\nve.calc(a),we.calc(a))};bd.prototype=Object.create(ua.prototype);bd.prototype.constructor=bd;bd.prototype.getPoint=function(a){var b=this.v0,c=this.v1,d=this.v2,e=this.v3;return new n(xb(a,b.x,c.x,d.x,e.x),xb(a,b.y,c.y,d.y,e.y),xb(a,b.z,c.z,d.z,e.z))};cd.prototype=Object.create(ua.prototype);cd.prototype.constructor=cd;cd.prototype.getPoint=function(a){var b=this.v0,c=this.v1,d=this.v2;return new n(wb(a,b.x,c.x,d.x),wb(a,b.y,c.y,d.y),wb(a,b.z,c.z,d.z))};dd.prototype=Object.create(ua.prototype);dd.prototype.constructor=\ndd;dd.prototype.getPoint=function(a){if(1===a)return this.v2.clone();var b=new n;b.subVectors(this.v2,this.v1);b.multiplyScalar(a);b.add(this.v1);return b};Md.prototype=Object.create(Va.prototype);Md.prototype.constructor=Md;ua.create=function(a,b){console.log(\"THREE.Curve.create() has been deprecated\");a.prototype=Object.create(ua.prototype);a.prototype.constructor=a;a.prototype.getPoint=b;return a};cf.prototype=Object.create(La.prototype);df.prototype=Object.create(La.prototype);se.prototype=Object.create(La.prototype);\nObject.assign(se.prototype,{initFromArray:function(a){console.error(\"THREE.Spline: .initFromArray() has been removed.\")},getControlPointsArray:function(a){console.error(\"THREE.Spline: .getControlPointsArray() has been removed.\")},reparametrizeByArcLength:function(a){console.error(\"THREE.Spline: .reparametrizeByArcLength() has been removed.\")}});Zc.prototype.setColors=function(){console.error(\"THREE.GridHelper: setColors() has been deprecated, pass them in the constructor instead.\")};kc.prototype.update=\nfunction(){console.error(\"THREE.SkeletonHelper: update() no longer needs to be called.\")};Object.assign(fd.prototype,{center:function(a){console.warn(\"THREE.Box2: .center() has been renamed to .getCenter().\");return this.getCenter(a)},empty:function(){console.warn(\"THREE.Box2: .empty() has been renamed to .isEmpty().\");return this.isEmpty()},isIntersectionBox:function(a){console.warn(\"THREE.Box2: .isIntersectionBox() has been renamed to .intersectsBox().\");return this.intersectsBox(a)},size:function(a){console.warn(\"THREE.Box2: .size() has been renamed to .getSize().\");\nreturn this.getSize(a)}});Object.assign(Ra.prototype,{center:function(a){console.warn(\"THREE.Box3: .center() has been renamed to .getCenter().\");return this.getCenter(a)},empty:function(){console.warn(\"THREE.Box3: .empty() has been renamed to .isEmpty().\");return this.isEmpty()},isIntersectionBox:function(a){console.warn(\"THREE.Box3: .isIntersectionBox() has been renamed to .intersectsBox().\");return this.intersectsBox(a)},isIntersectionSphere:function(a){console.warn(\"THREE.Box3: .isIntersectionSphere() has been renamed to .intersectsSphere().\");\nreturn this.intersectsSphere(a)},size:function(a){console.warn(\"THREE.Box3: .size() has been renamed to .getSize().\");return this.getSize(a)}});Hb.prototype.center=function(a){console.warn(\"THREE.Line3: .center() has been renamed to .getCenter().\");return this.getCenter(a)};Y.random16=function(){console.warn(\"THREE.Math.random16() has been deprecated. Use Math.random() instead.\");return Math.random()};Object.assign(Ba.prototype,{flattenToArrayOffset:function(a,b){console.warn(\"THREE.Matrix3: .flattenToArrayOffset() has been deprecated. Use .toArray() instead.\");\nreturn this.toArray(a,b)},multiplyVector3:function(a){console.warn(\"THREE.Matrix3: .multiplyVector3() has been removed. Use vector.applyMatrix3( matrix ) instead.\");return a.applyMatrix3(this)},multiplyVector3Array:function(a){console.error(\"THREE.Matrix3: .multiplyVector3Array() has been removed.\")},applyToBuffer:function(a,b,c){console.warn(\"THREE.Matrix3: .applyToBuffer() has been removed. Use matrix.applyToBufferAttribute( attribute ) instead.\");return this.applyToBufferAttribute(a)},applyToVector3Array:function(a,\nb,c){console.error(\"THREE.Matrix3: .applyToVector3Array() has been removed.\")}});Object.assign(K.prototype,{extractPosition:function(a){console.warn(\"THREE.Matrix4: .extractPosition() has been renamed to .copyPosition().\");return this.copyPosition(a)},flattenToArrayOffset:function(a,b){console.warn(\"THREE.Matrix4: .flattenToArrayOffset() has been deprecated. Use .toArray() instead.\");return this.toArray(a,b)},getPosition:function(){var a;return function(){void 0===a&&(a=new n);console.warn(\"THREE.Matrix4: .getPosition() has been removed. Use Vector3.setFromMatrixPosition( matrix ) instead.\");\nreturn a.setFromMatrixColumn(this,3)}}(),setRotationFromQuaternion:function(a){console.warn(\"THREE.Matrix4: .setRotationFromQuaternion() has been renamed to .makeRotationFromQuaternion().\");return this.makeRotationFromQuaternion(a)},multiplyToArray:function(){console.warn(\"THREE.Matrix4: .multiplyToArray() has been removed.\")},multiplyVector3:function(a){console.warn(\"THREE.Matrix4: .multiplyVector3() has been removed. Use vector.applyMatrix4( matrix ) instead.\");return a.applyMatrix4(this)},multiplyVector4:function(a){console.warn(\"THREE.Matrix4: .multiplyVector4() has been removed. Use vector.applyMatrix4( matrix ) instead.\");\nreturn a.applyMatrix4(this)},multiplyVector3Array:function(a){console.error(\"THREE.Matrix4: .multiplyVector3Array() has been removed.\")},rotateAxis:function(a){console.warn(\"THREE.Matrix4: .rotateAxis() has been removed. Use Vector3.transformDirection( matrix ) instead.\");a.transformDirection(this)},crossVector:function(a){console.warn(\"THREE.Matrix4: .crossVector() has been removed. Use vector.applyMatrix4( matrix ) instead.\");return a.applyMatrix4(this)},translate:function(){console.error(\"THREE.Matrix4: .translate() has been removed.\")},\nrotateX:function(){console.error(\"THREE.Matrix4: .rotateX() has been removed.\")},rotateY:function(){console.error(\"THREE.Matrix4: .rotateY() has been removed.\")},rotateZ:function(){console.error(\"THREE.Matrix4: .rotateZ() has been removed.\")},rotateByAxis:function(){console.error(\"THREE.Matrix4: .rotateByAxis() has been removed.\")},applyToBuffer:function(a,b,c){console.warn(\"THREE.Matrix4: .applyToBuffer() has been removed. Use matrix.applyToBufferAttribute( attribute ) instead.\");return this.applyToBufferAttribute(a)},\napplyToVector3Array:function(a,b,c){console.error(\"THREE.Matrix4: .applyToVector3Array() has been removed.\")},makeFrustum:function(a,b,c,d,e,f){console.warn(\"THREE.Matrix4: .makeFrustum() has been removed. Use .makePerspective( left, right, top, bottom, near, far ) instead.\");return this.makePerspective(a,b,d,c,e,f)}});Aa.prototype.isIntersectionLine=function(a){console.warn(\"THREE.Plane: .isIntersectionLine() has been renamed to .intersectsLine().\");return this.intersectsLine(a)};oa.prototype.multiplyVector3=\nfunction(a){console.warn(\"THREE.Quaternion: .multiplyVector3() has been removed. Use is now vector.applyQuaternion( quaternion ) instead.\");return a.applyQuaternion(this)};Object.assign(kb.prototype,{isIntersectionBox:function(a){console.warn(\"THREE.Ray: .isIntersectionBox() has been renamed to .intersectsBox().\");return this.intersectsBox(a)},isIntersectionPlane:function(a){console.warn(\"THREE.Ray: .isIntersectionPlane() has been renamed to .intersectsPlane().\");return this.intersectsPlane(a)},isIntersectionSphere:function(a){console.warn(\"THREE.Ray: .isIntersectionSphere() has been renamed to .intersectsSphere().\");\nreturn this.intersectsSphere(a)}});Object.assign(zb.prototype,{extrude:function(a){console.warn(\"THREE.Shape: .extrude() has been removed. Use ExtrudeGeometry() instead.\");return new cb(this,a)},makeGeometry:function(a){console.warn(\"THREE.Shape: .makeGeometry() has been removed. Use ShapeGeometry() instead.\");return new Xb(this,a)}});Object.assign(C.prototype,{fromAttribute:function(a,b,c){console.error(\"THREE.Vector2: .fromAttribute() has been renamed to .fromBufferAttribute().\");return this.fromBufferAttribute(a,\nb,c)}});Object.assign(n.prototype,{setEulerFromRotationMatrix:function(){console.error(\"THREE.Vector3: .setEulerFromRotationMatrix() has been removed. Use Euler.setFromRotationMatrix() instead.\")},setEulerFromQuaternion:function(){console.error(\"THREE.Vector3: .setEulerFromQuaternion() has been removed. Use Euler.setFromQuaternion() instead.\")},getPositionFromMatrix:function(a){console.warn(\"THREE.Vector3: .getPositionFromMatrix() has been renamed to .setFromMatrixPosition().\");return this.setFromMatrixPosition(a)},\ngetScaleFromMatrix:function(a){console.warn(\"THREE.Vector3: .getScaleFromMatrix() has been renamed to .setFromMatrixScale().\");return this.setFromMatrixScale(a)},getColumnFromMatrix:function(a,b){console.warn(\"THREE.Vector3: .getColumnFromMatrix() has been renamed to .setFromMatrixColumn().\");return this.setFromMatrixColumn(b,a)},applyProjection:function(a){console.warn(\"THREE.Vector3: .applyProjection() has been removed. Use .applyMatrix4( m ) instead.\");return this.applyMatrix4(a)},fromAttribute:function(a,\nb,c){console.error(\"THREE.Vector3: .fromAttribute() has been renamed to .fromBufferAttribute().\");return this.fromBufferAttribute(a,b,c)}});Object.assign(fa.prototype,{fromAttribute:function(a,b,c){console.error(\"THREE.Vector4: .fromAttribute() has been renamed to .fromBufferAttribute().\");return this.fromBufferAttribute(a,b,c)}});J.prototype.computeTangents=function(){console.warn(\"THREE.Geometry: .computeTangents() has been removed.\")};Object.assign(z.prototype,{getChildByName:function(a){console.warn(\"THREE.Object3D: .getChildByName() has been renamed to .getObjectByName().\");\nreturn this.getObjectByName(a)},renderDepth:function(){console.warn(\"THREE.Object3D: .renderDepth has been removed. Use .renderOrder, instead.\")},translate:function(a,b){console.warn(\"THREE.Object3D: .translate() has been removed. Use .translateOnAxis( axis, distance ) instead.\");return this.translateOnAxis(b,a)}});Object.defineProperties(z.prototype,{eulerOrder:{get:function(){console.warn(\"THREE.Object3D: .eulerOrder is now .rotation.order.\");return this.rotation.order},set:function(a){console.warn(\"THREE.Object3D: .eulerOrder is now .rotation.order.\");\nthis.rotation.order=a}},useQuaternion:{get:function(){console.warn(\"THREE.Object3D: .useQuaternion has been removed. The library now uses quaternions by default.\")},set:function(){console.warn(\"THREE.Object3D: .useQuaternion has been removed. The library now uses quaternions by default.\")}}});Object.defineProperties(yc.prototype,{objects:{get:function(){console.warn(\"THREE.LOD: .objects has been renamed to .levels.\");return this.levels}}});Object.defineProperty(zc.prototype,\"useVertexTexture\",{get:function(){console.warn(\"THREE.Skeleton: useVertexTexture has been removed.\")},\nset:function(){console.warn(\"THREE.Skeleton: useVertexTexture has been removed.\")}});Object.defineProperty(ua.prototype,\"__arcLengthDivisions\",{get:function(){console.warn(\"THREE.Curve: .__arcLengthDivisions is now .arcLengthDivisions.\");return this.arcLengthDivisions},set:function(a){console.warn(\"THREE.Curve: .__arcLengthDivisions is now .arcLengthDivisions.\");this.arcLengthDivisions=a}});qa.prototype.setLens=function(a,b){console.warn(\"THREE.PerspectiveCamera.setLens is deprecated. Use .setFocalLength and .filmGauge for a photographic setup.\");\nvoid 0!==b&&(this.filmGauge=b);this.setFocalLength(a)};Object.defineProperties(na.prototype,{onlyShadow:{set:function(){console.warn(\"THREE.Light: .onlyShadow has been removed.\")}},shadowCameraFov:{set:function(a){console.warn(\"THREE.Light: .shadowCameraFov is now .shadow.camera.fov.\");this.shadow.camera.fov=a}},shadowCameraLeft:{set:function(a){console.warn(\"THREE.Light: .shadowCameraLeft is now .shadow.camera.left.\");this.shadow.camera.left=a}},shadowCameraRight:{set:function(a){console.warn(\"THREE.Light: .shadowCameraRight is now .shadow.camera.right.\");\nthis.shadow.camera.right=a}},shadowCameraTop:{set:function(a){console.warn(\"THREE.Light: .shadowCameraTop is now .shadow.camera.top.\");this.shadow.camera.top=a}},shadowCameraBottom:{set:function(a){console.warn(\"THREE.Light: .shadowCameraBottom is now .shadow.camera.bottom.\");this.shadow.camera.bottom=a}},shadowCameraNear:{set:function(a){console.warn(\"THREE.Light: .shadowCameraNear is now .shadow.camera.near.\");this.shadow.camera.near=a}},shadowCameraFar:{set:function(a){console.warn(\"THREE.Light: .shadowCameraFar is now .shadow.camera.far.\");\nthis.shadow.camera.far=a}},shadowCameraVisible:{set:function(){console.warn(\"THREE.Light: .shadowCameraVisible has been removed. Use new THREE.CameraHelper( light.shadow.camera ) instead.\")}},shadowBias:{set:function(a){console.warn(\"THREE.Light: .shadowBias is now .shadow.bias.\");this.shadow.bias=a}},shadowDarkness:{set:function(){console.warn(\"THREE.Light: .shadowDarkness has been removed.\")}},shadowMapWidth:{set:function(a){console.warn(\"THREE.Light: .shadowMapWidth is now .shadow.mapSize.width.\");\nthis.shadow.mapSize.width=a}},shadowMapHeight:{set:function(a){console.warn(\"THREE.Light: .shadowMapHeight is now .shadow.mapSize.height.\");this.shadow.mapSize.height=a}}});Object.defineProperties(Z.prototype,{length:{get:function(){console.warn(\"THREE.BufferAttribute: .length has been deprecated. Use .count instead.\");return this.array.length}}});Object.assign(E.prototype,{addIndex:function(a){console.warn(\"THREE.BufferGeometry: .addIndex() has been renamed to .setIndex().\");this.setIndex(a)},addDrawCall:function(a,\nb,c){void 0!==c&&console.warn(\"THREE.BufferGeometry: .addDrawCall() no longer supports indexOffset.\");console.warn(\"THREE.BufferGeometry: .addDrawCall() is now .addGroup().\");this.addGroup(a,b)},clearDrawCalls:function(){console.warn(\"THREE.BufferGeometry: .clearDrawCalls() is now .clearGroups().\");this.clearGroups()},computeTangents:function(){console.warn(\"THREE.BufferGeometry: .computeTangents() has been removed.\")},computeOffsets:function(){console.warn(\"THREE.BufferGeometry: .computeOffsets() has been removed.\")}});\nObject.defineProperties(E.prototype,{drawcalls:{get:function(){console.error(\"THREE.BufferGeometry: .drawcalls has been renamed to .groups.\");return this.groups}},offsets:{get:function(){console.warn(\"THREE.BufferGeometry: .offsets has been renamed to .groups.\");return this.groups}}});Object.defineProperties(Id.prototype,{dynamic:{set:function(){console.warn(\"THREE.Uniform: .dynamic has been removed. Use object.onBeforeRender() instead.\")}},onUpdate:{value:function(){console.warn(\"THREE.Uniform: .onUpdate() has been removed. Use object.onBeforeRender() instead.\");\nreturn this}}});Object.defineProperties(U.prototype,{wrapAround:{get:function(){console.warn(\"THREE.Material: .wrapAround has been removed.\")},set:function(){console.warn(\"THREE.Material: .wrapAround has been removed.\")}},wrapRGB:{get:function(){console.warn(\"THREE.Material: .wrapRGB has been removed.\");return new G}}});Object.defineProperties(Ja.prototype,{metal:{get:function(){console.warn(\"THREE.MeshPhongMaterial: .metal has been removed. Use THREE.MeshStandardMaterial instead.\");return!1},set:function(){console.warn(\"THREE.MeshPhongMaterial: .metal has been removed. Use THREE.MeshStandardMaterial instead\")}}});\nObject.defineProperties(ra.prototype,{derivatives:{get:function(){console.warn(\"THREE.ShaderMaterial: .derivatives has been moved to .extensions.derivatives.\");return this.extensions.derivatives},set:function(a){console.warn(\"THREE. ShaderMaterial: .derivatives has been moved to .extensions.derivatives.\");this.extensions.derivatives=a}}});Object.assign(Xd.prototype,{getCurrentRenderTarget:function(){console.warn(\"THREE.WebGLRenderer: .getCurrentRenderTarget() is now .getRenderTarget().\");return this.getRenderTarget()},\nsupportsFloatTextures:function(){console.warn(\"THREE.WebGLRenderer: .supportsFloatTextures() is now .extensions.get( 'OES_texture_float' ).\");return this.extensions.get(\"OES_texture_float\")},supportsHalfFloatTextures:function(){console.warn(\"THREE.WebGLRenderer: .supportsHalfFloatTextures() is now .extensions.get( 'OES_texture_half_float' ).\");return this.extensions.get(\"OES_texture_half_float\")},supportsStandardDerivatives:function(){console.warn(\"THREE.WebGLRenderer: .supportsStandardDerivatives() is now .extensions.get( 'OES_standard_derivatives' ).\");\nreturn this.extensions.get(\"OES_standard_derivatives\")},supportsCompressedTextureS3TC:function(){console.warn(\"THREE.WebGLRenderer: .supportsCompressedTextureS3TC() is now .extensions.get( 'WEBGL_compressed_texture_s3tc' ).\");return this.extensions.get(\"WEBGL_compressed_texture_s3tc\")},supportsCompressedTexturePVRTC:function(){console.warn(\"THREE.WebGLRenderer: .supportsCompressedTexturePVRTC() is now .extensions.get( 'WEBGL_compressed_texture_pvrtc' ).\");return this.extensions.get(\"WEBGL_compressed_texture_pvrtc\")},\nsupportsBlendMinMax:function(){console.warn(\"THREE.WebGLRenderer: .supportsBlendMinMax() is now .extensions.get( 'EXT_blend_minmax' ).\");return this.extensions.get(\"EXT_blend_minmax\")},supportsVertexTextures:function(){console.warn(\"THREE.WebGLRenderer: .supportsVertexTextures() is now .capabilities.vertexTextures.\");return this.capabilities.vertexTextures},supportsInstancedArrays:function(){console.warn(\"THREE.WebGLRenderer: .supportsInstancedArrays() is now .extensions.get( 'ANGLE_instanced_arrays' ).\");\nreturn this.extensions.get(\"ANGLE_instanced_arrays\")},enableScissorTest:function(a){console.warn(\"THREE.WebGLRenderer: .enableScissorTest() is now .setScissorTest().\");this.setScissorTest(a)},initMaterial:function(){console.warn(\"THREE.WebGLRenderer: .initMaterial() has been removed.\")},addPrePlugin:function(){console.warn(\"THREE.WebGLRenderer: .addPrePlugin() has been removed.\")},addPostPlugin:function(){console.warn(\"THREE.WebGLRenderer: .addPostPlugin() has been removed.\")},updateShadowMap:function(){console.warn(\"THREE.WebGLRenderer: .updateShadowMap() has been removed.\")}});\nObject.defineProperties(Xd.prototype,{shadowMapEnabled:{get:function(){return this.shadowMap.enabled},set:function(a){console.warn(\"THREE.WebGLRenderer: .shadowMapEnabled is now .shadowMap.enabled.\");this.shadowMap.enabled=a}},shadowMapType:{get:function(){return this.shadowMap.type},set:function(a){console.warn(\"THREE.WebGLRenderer: .shadowMapType is now .shadowMap.type.\");this.shadowMap.type=a}},shadowMapCullFace:{get:function(){return this.shadowMap.cullFace},set:function(a){console.warn(\"THREE.WebGLRenderer: .shadowMapCullFace is now .shadowMap.cullFace.\");\nthis.shadowMap.cullFace=a}}});Object.defineProperties(Ie.prototype,{cullFace:{get:function(){return this.renderReverseSided?2:1},set:function(a){a=1!==a;console.warn(\"WebGLRenderer: .shadowMap.cullFace is deprecated. Set .shadowMap.renderReverseSided to \"+a+\".\");this.renderReverseSided=a}}});Object.defineProperties(Cb.prototype,{wrapS:{get:function(){console.warn(\"THREE.WebGLRenderTarget: .wrapS is now .texture.wrapS.\");return this.texture.wrapS},set:function(a){console.warn(\"THREE.WebGLRenderTarget: .wrapS is now .texture.wrapS.\");\nthis.texture.wrapS=a}},wrapT:{get:function(){console.warn(\"THREE.WebGLRenderTarget: .wrapT is now .texture.wrapT.\");return this.texture.wrapT},set:function(a){console.warn(\"THREE.WebGLRenderTarget: .wrapT is now .texture.wrapT.\");this.texture.wrapT=a}},magFilter:{get:function(){console.warn(\"THREE.WebGLRenderTarget: .magFilter is now .texture.magFilter.\");return this.texture.magFilter},set:function(a){console.warn(\"THREE.WebGLRenderTarget: .magFilter is now .texture.magFilter.\");this.texture.magFilter=\na}},minFilter:{get:function(){console.warn(\"THREE.WebGLRenderTarget: .minFilter is now .texture.minFilter.\");return this.texture.minFilter},set:function(a){console.warn(\"THREE.WebGLRenderTarget: .minFilter is now .texture.minFilter.\");this.texture.minFilter=a}},anisotropy:{get:function(){console.warn(\"THREE.WebGLRenderTarget: .anisotropy is now .texture.anisotropy.\");return this.texture.anisotropy},set:function(a){console.warn(\"THREE.WebGLRenderTarget: .anisotropy is now .texture.anisotropy.\");this.texture.anisotropy=\na}},offset:{get:function(){console.warn(\"THREE.WebGLRenderTarget: .offset is now .texture.offset.\");return this.texture.offset},set:function(a){console.warn(\"THREE.WebGLRenderTarget: .offset is now .texture.offset.\");this.texture.offset=a}},repeat:{get:function(){console.warn(\"THREE.WebGLRenderTarget: .repeat is now .texture.repeat.\");return this.texture.repeat},set:function(a){console.warn(\"THREE.WebGLRenderTarget: .repeat is now .texture.repeat.\");this.texture.repeat=a}},format:{get:function(){console.warn(\"THREE.WebGLRenderTarget: .format is now .texture.format.\");\nreturn this.texture.format},set:function(a){console.warn(\"THREE.WebGLRenderTarget: .format is now .texture.format.\");this.texture.format=a}},type:{get:function(){console.warn(\"THREE.WebGLRenderTarget: .type is now .texture.type.\");return this.texture.type},set:function(a){console.warn(\"THREE.WebGLRenderTarget: .type is now .texture.type.\");this.texture.type=a}},generateMipmaps:{get:function(){console.warn(\"THREE.WebGLRenderTarget: .generateMipmaps is now .texture.generateMipmaps.\");return this.texture.generateMipmaps},\nset:function(a){console.warn(\"THREE.WebGLRenderTarget: .generateMipmaps is now .texture.generateMipmaps.\");this.texture.generateMipmaps=a}}});hc.prototype.load=function(a){console.warn(\"THREE.Audio: .load has been deprecated. Use THREE.AudioLoader instead.\");var b=this;(new fe).load(a,function(a){b.setBuffer(a)});return this};je.prototype.getData=function(){console.warn(\"THREE.AudioAnalyser: .getData() is now .getFrequencyData().\");return this.getFrequencyData()};l.WebGLRenderTargetCube=Db;l.WebGLRenderTarget=\nCb;l.WebGLRenderer=Xd;l.ShaderLib=$a;l.UniformsLib=R;l.UniformsUtils=Ca;l.ShaderChunk=X;l.FogExp2=Ib;l.Fog=Jb;l.Scene=ld;l.LensFlare=Yd;l.Sprite=xc;l.LOD=yc;l.SkinnedMesh=nd;l.Skeleton=zc;l.Bone=md;l.Mesh=la;l.LineSegments=Q;l.LineLoop=od;l.Line=sa;l.Points=Kb;l.Group=Ac;l.VideoTexture=pd;l.DataTexture=db;l.CompressedTexture=Lb;l.CubeTexture=Xa;l.CanvasTexture=qd;l.DepthTexture=Bc;l.Texture=ba;l.CompressedTextureLoader=Oe;l.DataTextureLoader=$d;l.CubeTextureLoader=ae;l.TextureLoader=rd;l.ObjectLoader=\nPe;l.MaterialLoader=Gd;l.BufferGeometryLoader=be;l.DefaultLoadingManager=va;l.LoadingManager=Zd;l.JSONLoader=ce;l.ImageLoader=Sc;l.FontLoader=Re;l.FileLoader=Ka;l.Loader=ec;l.Cache=ed;l.AudioLoader=fe;l.SpotLightShadow=td;l.SpotLight=ud;l.PointLight=vd;l.RectAreaLight=zd;l.HemisphereLight=sd;l.DirectionalLightShadow=wd;l.DirectionalLight=xd;l.AmbientLight=yd;l.LightShadow=tb;l.Light=na;l.StereoCamera=Se;l.PerspectiveCamera=qa;l.OrthographicCamera=Fb;l.CubeCamera=Hd;l.ArrayCamera=kd;l.Camera=Na;l.AudioListener=\nge;l.PositionalAudio=ie;l.AudioContext=he;l.AudioAnalyser=je;l.Audio=hc;l.VectorKeyframeTrack=cc;l.StringKeyframeTrack=Dd;l.QuaternionKeyframeTrack=Uc;l.NumberKeyframeTrack=dc;l.ColorKeyframeTrack=Fd;l.BooleanKeyframeTrack=Ed;l.PropertyMixer=ke;l.PropertyBinding=ha;l.KeyframeTrack=vb;l.AnimationUtils=ia;l.AnimationObjectGroup=Ue;l.AnimationMixer=We;l.AnimationClip=Da;l.Uniform=Id;l.InstancedBufferGeometry=le;l.BufferGeometry=E;l.GeometryIdCount=function(){return Rd++};l.Geometry=J;l.InterleavedBufferAttribute=\nme;l.InstancedInterleavedBuffer=ne;l.InterleavedBuffer=ic;l.InstancedBufferAttribute=oe;l.Face3=Sa;l.Object3D=z;l.Raycaster=Xe;l.Layers=Qd;l.EventDispatcher=xa;l.Clock=Ze;l.QuaternionLinearInterpolant=Cd;l.LinearInterpolant=Tc;l.DiscreteInterpolant=Bd;l.CubicInterpolant=Ad;l.Interpolant=wa;l.Triangle=Ta;l.Math=Y;l.Spherical=$e;l.Cylindrical=af;l.Plane=Aa;l.Frustum=gd;l.Sphere=Ea;l.Ray=kb;l.Matrix4=K;l.Matrix3=Ba;l.Box3=Ra;l.Box2=fd;l.Line3=Hb;l.Euler=ab;l.Vector4=fa;l.Vector3=n;l.Vector2=C;l.Quaternion=\noa;l.Color=G;l.MorphBlendMesh=ta;l.ImmediateRenderObject=Xc;l.VertexNormalsHelper=Yc;l.SpotLightHelper=jc;l.SkeletonHelper=kc;l.PointLightHelper=lc;l.RectAreaLightHelper=mc;l.HemisphereLightHelper=nc;l.GridHelper=Zc;l.PolarGridHelper=Jd;l.FaceNormalsHelper=$c;l.DirectionalLightHelper=oc;l.CameraHelper=ad;l.BoxHelper=Ab;l.ArrowHelper=Bb;l.AxisHelper=Ld;l.CatmullRomCurve3=La;l.CubicBezierCurve3=bd;l.QuadraticBezierCurve3=cd;l.LineCurve3=dd;l.ArcCurve=Md;l.EllipseCurve=Va;l.SplineCurve=yb;l.CubicBezierCurve=\nfc;l.QuadraticBezierCurve=gc;l.LineCurve=Qa;l.Shape=zb;l.Path=Wc;l.ShapePath=de;l.Font=ee;l.CurvePath=Vc;l.Curve=ua;l.ShapeUtils=Ia;l.SceneUtils={createMultiMaterialObject:function(a,b){for(var c=new Ac,d=0,e=b.length;d<e;d++)c.add(new la(a,b[d]));return c},detach:function(a,b,c){a.applyMatrix(b.matrixWorld);b.remove(a);c.add(a)},attach:function(a,b,c){a.applyMatrix((new K).getInverse(c.matrixWorld));b.remove(a);c.add(a)}};l.WireframeGeometry=Mb;l.ParametricGeometry=Cc;l.ParametricBufferGeometry=\nNb;l.TetrahedronGeometry=Ec;l.TetrahedronBufferGeometry=Ob;l.OctahedronGeometry=Fc;l.OctahedronBufferGeometry=lb;l.IcosahedronGeometry=Gc;l.IcosahedronBufferGeometry=Pb;l.DodecahedronGeometry=Hc;l.DodecahedronBufferGeometry=Qb;l.PolyhedronGeometry=Dc;l.PolyhedronBufferGeometry=za;l.TubeGeometry=Ic;l.TubeBufferGeometry=Rb;l.TorusKnotGeometry=Jc;l.TorusKnotBufferGeometry=Sb;l.TorusGeometry=Kc;l.TorusBufferGeometry=Tb;l.TextGeometry=Lc;l.TextBufferGeometry=Ub;l.SphereGeometry=Mc;l.SphereBufferGeometry=\nmb;l.RingGeometry=Nc;l.RingBufferGeometry=Vb;l.PlaneGeometry=vc;l.PlaneBufferGeometry=jb;l.LatheGeometry=Oc;l.LatheBufferGeometry=Wb;l.ShapeGeometry=Xb;l.ShapeBufferGeometry=Yb;l.ExtrudeGeometry=cb;l.ExtrudeBufferGeometry=Ga;l.EdgesGeometry=Zb;l.ConeGeometry=Pc;l.ConeBufferGeometry=Qc;l.CylinderGeometry=nb;l.CylinderBufferGeometry=Ua;l.CircleGeometry=Rc;l.CircleBufferGeometry=$b;l.BoxGeometry=Gb;l.BoxBufferGeometry=ib;l.ShadowMaterial=ac;l.SpriteMaterial=bb;l.RawShaderMaterial=bc;l.ShaderMaterial=\nra;l.PointsMaterial=Fa;l.MeshPhysicalMaterial=ob;l.MeshStandardMaterial=Pa;l.MeshPhongMaterial=Ja;l.MeshToonMaterial=pb;l.MeshNormalMaterial=qb;l.MeshLambertMaterial=rb;l.MeshDepthMaterial=Za;l.MeshBasicMaterial=ya;l.LineDashedMaterial=sb;l.LineBasicMaterial=ea;l.Material=U;l.Float64BufferAttribute=uc;l.Float32BufferAttribute=B;l.Uint32BufferAttribute=hb;l.Int32BufferAttribute=tc;l.Uint16BufferAttribute=gb;l.Int16BufferAttribute=sc;l.Uint8ClampedBufferAttribute=rc;l.Uint8BufferAttribute=qc;l.Int8BufferAttribute=\npc;l.BufferAttribute=Z;l.REVISION=\"86\";l.MOUSE={LEFT:0,MIDDLE:1,RIGHT:2};l.CullFaceNone=0;l.CullFaceBack=1;l.CullFaceFront=2;l.CullFaceFrontBack=3;l.FrontFaceDirectionCW=0;l.FrontFaceDirectionCCW=1;l.BasicShadowMap=0;l.PCFShadowMap=1;l.PCFSoftShadowMap=2;l.FrontSide=0;l.BackSide=1;l.DoubleSide=2;l.FlatShading=1;l.SmoothShading=2;l.NoColors=0;l.FaceColors=1;l.VertexColors=2;l.NoBlending=0;l.NormalBlending=1;l.AdditiveBlending=2;l.SubtractiveBlending=3;l.MultiplyBlending=4;l.CustomBlending=5;l.AddEquation=\n100;l.SubtractEquation=101;l.ReverseSubtractEquation=102;l.MinEquation=103;l.MaxEquation=104;l.ZeroFactor=200;l.OneFactor=201;l.SrcColorFactor=202;l.OneMinusSrcColorFactor=203;l.SrcAlphaFactor=204;l.OneMinusSrcAlphaFactor=205;l.DstAlphaFactor=206;l.OneMinusDstAlphaFactor=207;l.DstColorFactor=208;l.OneMinusDstColorFactor=209;l.SrcAlphaSaturateFactor=210;l.NeverDepth=0;l.AlwaysDepth=1;l.LessDepth=2;l.LessEqualDepth=3;l.EqualDepth=4;l.GreaterEqualDepth=5;l.GreaterDepth=6;l.NotEqualDepth=7;l.MultiplyOperation=\n0;l.MixOperation=1;l.AddOperation=2;l.NoToneMapping=0;l.LinearToneMapping=1;l.ReinhardToneMapping=2;l.Uncharted2ToneMapping=3;l.CineonToneMapping=4;l.UVMapping=300;l.CubeReflectionMapping=301;l.CubeRefractionMapping=302;l.EquirectangularReflectionMapping=303;l.EquirectangularRefractionMapping=304;l.SphericalReflectionMapping=305;l.CubeUVReflectionMapping=306;l.CubeUVRefractionMapping=307;l.RepeatWrapping=1E3;l.ClampToEdgeWrapping=1001;l.MirroredRepeatWrapping=1002;l.NearestFilter=1003;l.NearestMipMapNearestFilter=\n1004;l.NearestMipMapLinearFilter=1005;l.LinearFilter=1006;l.LinearMipMapNearestFilter=1007;l.LinearMipMapLinearFilter=1008;l.UnsignedByteType=1009;l.ByteType=1010;l.ShortType=1011;l.UnsignedShortType=1012;l.IntType=1013;l.UnsignedIntType=1014;l.FloatType=1015;l.HalfFloatType=1016;l.UnsignedShort4444Type=1017;l.UnsignedShort5551Type=1018;l.UnsignedShort565Type=1019;l.UnsignedInt248Type=1020;l.AlphaFormat=1021;l.RGBFormat=1022;l.RGBAFormat=1023;l.LuminanceFormat=1024;l.LuminanceAlphaFormat=1025;l.RGBEFormat=\n1023;l.DepthFormat=1026;l.DepthStencilFormat=1027;l.RGB_S3TC_DXT1_Format=2001;l.RGBA_S3TC_DXT1_Format=2002;l.RGBA_S3TC_DXT3_Format=2003;l.RGBA_S3TC_DXT5_Format=2004;l.RGB_PVRTC_4BPPV1_Format=2100;l.RGB_PVRTC_2BPPV1_Format=2101;l.RGBA_PVRTC_4BPPV1_Format=2102;l.RGBA_PVRTC_2BPPV1_Format=2103;l.RGB_ETC1_Format=2151;l.LoopOnce=2200;l.LoopRepeat=2201;l.LoopPingPong=2202;l.InterpolateDiscrete=2300;l.InterpolateLinear=2301;l.InterpolateSmooth=2302;l.ZeroCurvatureEnding=2400;l.ZeroSlopeEnding=2401;l.WrapAroundEnding=\n2402;l.TrianglesDrawMode=0;l.TriangleStripDrawMode=1;l.TriangleFanDrawMode=2;l.LinearEncoding=3E3;l.sRGBEncoding=3001;l.GammaEncoding=3007;l.RGBEEncoding=3002;l.LogLuvEncoding=3003;l.RGBM7Encoding=3004;l.RGBM16Encoding=3005;l.RGBDEncoding=3006;l.BasicDepthPacking=3200;l.RGBADepthPacking=3201;l.CubeGeometry=Gb;l.Face4=function(a,b,c,d,e,f,g){console.warn(\"THREE.Face4 has been removed. A THREE.Face3 will be created instead.\");return new Sa(a,b,c,e,f,g)};l.LineStrip=0;l.LinePieces=1;l.MeshFaceMaterial=\nfunction(a){console.warn(\"THREE.MeshFaceMaterial has been removed. Use an Array instead.\");return a};l.MultiMaterial=function(a){void 0===a&&(a=[]);console.warn(\"THREE.MultiMaterial has been removed. Use an Array instead.\");a.isMultiMaterial=!0;a.materials=a;a.clone=function(){return a.slice()};return a};l.PointCloud=function(a,b){console.warn(\"THREE.PointCloud has been renamed to THREE.Points.\");return new Kb(a,b)};l.Particle=function(a){console.warn(\"THREE.Particle has been renamed to THREE.Sprite.\");\nreturn new xc(a)};l.ParticleSystem=function(a,b){console.warn(\"THREE.ParticleSystem has been renamed to THREE.Points.\");return new Kb(a,b)};l.PointCloudMaterial=function(a){console.warn(\"THREE.PointCloudMaterial has been renamed to THREE.PointsMaterial.\");return new Fa(a)};l.ParticleBasicMaterial=function(a){console.warn(\"THREE.ParticleBasicMaterial has been renamed to THREE.PointsMaterial.\");return new Fa(a)};l.ParticleSystemMaterial=function(a){console.warn(\"THREE.ParticleSystemMaterial has been renamed to THREE.PointsMaterial.\");\nreturn new Fa(a)};l.Vertex=function(a,b,c){console.warn(\"THREE.Vertex has been removed. Use THREE.Vector3 instead.\");return new n(a,b,c)};l.DynamicBufferAttribute=function(a,b){console.warn(\"THREE.DynamicBufferAttribute has been removed. Use new THREE.BufferAttribute().setDynamic( true ) instead.\");return(new Z(a,b)).setDynamic(!0)};l.Int8Attribute=function(a,b){console.warn(\"THREE.Int8Attribute has been removed. Use new THREE.Int8BufferAttribute() instead.\");return new pc(a,b)};l.Uint8Attribute=\nfunction(a,b){console.warn(\"THREE.Uint8Attribute has been removed. Use new THREE.Uint8BufferAttribute() instead.\");return new qc(a,b)};l.Uint8ClampedAttribute=function(a,b){console.warn(\"THREE.Uint8ClampedAttribute has been removed. Use new THREE.Uint8ClampedBufferAttribute() instead.\");return new rc(a,b)};l.Int16Attribute=function(a,b){console.warn(\"THREE.Int16Attribute has been removed. Use new THREE.Int16BufferAttribute() instead.\");return new sc(a,b)};l.Uint16Attribute=function(a,b){console.warn(\"THREE.Uint16Attribute has been removed. Use new THREE.Uint16BufferAttribute() instead.\");\nreturn new gb(a,b)};l.Int32Attribute=function(a,b){console.warn(\"THREE.Int32Attribute has been removed. Use new THREE.Int32BufferAttribute() instead.\");return new tc(a,b)};l.Uint32Attribute=function(a,b){console.warn(\"THREE.Uint32Attribute has been removed. Use new THREE.Uint32BufferAttribute() instead.\");return new hb(a,b)};l.Float32Attribute=function(a,b){console.warn(\"THREE.Float32Attribute has been removed. Use new THREE.Float32BufferAttribute() instead.\");return new B(a,b)};l.Float64Attribute=\nfunction(a,b){console.warn(\"THREE.Float64Attribute has been removed. Use new THREE.Float64BufferAttribute() instead.\");return new uc(a,b)};l.ClosedSplineCurve3=cf;l.SplineCurve3=df;l.Spline=se;l.BoundingBoxHelper=function(a,b){console.warn(\"THREE.BoundingBoxHelper has been deprecated. Creating a THREE.BoxHelper instead.\");return new Ab(a,b)};l.EdgesHelper=function(a,b){console.warn(\"THREE.EdgesHelper has been removed. Use THREE.EdgesGeometry instead.\");return new Q(new Zb(a.geometry),new ea({color:void 0!==\nb?b:16777215}))};l.WireframeHelper=function(a,b){console.warn(\"THREE.WireframeHelper has been removed. Use THREE.WireframeGeometry instead.\");return new Q(new Mb(a.geometry),new ea({color:void 0!==b?b:16777215}))};l.XHRLoader=function(a){console.warn(\"THREE.XHRLoader has been renamed to THREE.FileLoader.\");return new Ka(a)};l.BinaryTextureLoader=function(a){console.warn(\"THREE.BinaryTextureLoader has been renamed to THREE.DataTextureLoader.\");return new $d(a)};l.GeometryUtils={merge:function(a,b,\nc){console.warn(\"THREE.GeometryUtils: .merge() has been moved to Geometry. Use geometry.merge( geometry2, matrix, materialIndexOffset ) instead.\");var d;b.isMesh&&(b.matrixAutoUpdate&&b.updateMatrix(),d=b.matrix,b=b.geometry);a.merge(b,d,c)},center:function(a){console.warn(\"THREE.GeometryUtils: .center() has been moved to Geometry. Use geometry.center() instead.\");return a.center()}};l.ImageUtils={crossOrigin:void 0,loadTexture:function(a,b,c,d){console.warn(\"THREE.ImageUtils.loadTexture has been deprecated. Use THREE.TextureLoader() instead.\");\nvar e=new rd;e.setCrossOrigin(this.crossOrigin);a=e.load(a,c,void 0,d);b&&(a.mapping=b);return a},loadTextureCube:function(a,b,c,d){console.warn(\"THREE.ImageUtils.loadTextureCube has been deprecated. Use THREE.CubeTextureLoader() instead.\");var e=new ae;e.setCrossOrigin(this.crossOrigin);a=e.load(a,c,void 0,d);b&&(a.mapping=b);return a},loadCompressedTexture:function(){console.error(\"THREE.ImageUtils.loadCompressedTexture has been removed. Use THREE.DDSLoader instead.\")},loadCompressedTextureCube:function(){console.error(\"THREE.ImageUtils.loadCompressedTextureCube has been removed. Use THREE.DDSLoader instead.\")}};\nl.Projector=function(){console.error(\"THREE.Projector has been moved to /examples/js/renderers/Projector.js.\");this.projectVector=function(a,b){console.warn(\"THREE.Projector: .projectVector() is now vector.project().\");a.project(b)};this.unprojectVector=function(a,b){console.warn(\"THREE.Projector: .unprojectVector() is now vector.unproject().\");a.unproject(b)};this.pickingRay=function(){console.error(\"THREE.Projector: .pickingRay() is now raycaster.setFromCamera().\")}};l.CanvasRenderer=function(){console.error(\"THREE.CanvasRenderer has been moved to /examples/js/renderers/CanvasRenderer.js\");\nthis.domElement=document.createElementNS(\"http://www.w3.org/1999/xhtml\",\"canvas\");this.clear=function(){};this.render=function(){};this.setClearColor=function(){};this.setSize=function(){}};Object.defineProperty(l,\"__esModule\",{value:!0})});\n",
+ "(function (global, factory) {\n\ttypeof exports === 'object' && typeof module !== 'undefined' ? module.exports = factory() :\n\ttypeof define === 'function' && define.amd ? define(factory) :\n\t(global.quickselect = factory());\n}(this, (function () { 'use strict';\n\nfunction quickselect(arr, k, left, right, compare) {\n quickselectStep(arr, k, left || 0, right || (arr.length - 1), compare || defaultCompare);\n}\n\nfunction quickselectStep(arr, k, left, right, compare) {\n\n while (right > left) {\n if (right - left > 600) {\n var n = right - left + 1;\n var m = k - left + 1;\n var z = Math.log(n);\n var s = 0.5 * Math.exp(2 * z / 3);\n var sd = 0.5 * Math.sqrt(z * s * (n - s) / n) * (m - n / 2 < 0 ? -1 : 1);\n var newLeft = Math.max(left, Math.floor(k - m * s / n + sd));\n var newRight = Math.min(right, Math.floor(k + (n - m) * s / n + sd));\n quickselectStep(arr, k, newLeft, newRight, compare);\n }\n\n var t = arr[k];\n var i = left;\n var j = right;\n\n swap(arr, left, k);\n if (compare(arr[right], t) > 0) swap(arr, left, right);\n\n while (i < j) {\n swap(arr, i, j);\n i++;\n j--;\n while (compare(arr[i], t) < 0) i++;\n while (compare(arr[j], t) > 0) j--;\n }\n\n if (compare(arr[left], t) === 0) swap(arr, left, j);\n else {\n j++;\n swap(arr, j, right);\n }\n\n if (j <= k) left = j + 1;\n if (k <= j) right = j - 1;\n }\n}\n\nfunction swap(arr, i, j) {\n var tmp = arr[i];\n arr[i] = arr[j];\n arr[j] = tmp;\n}\n\nfunction defaultCompare(a, b) {\n return a < b ? -1 : a > b ? 1 : 0;\n}\n\nreturn quickselect;\n\n})));\n",
+ "'use strict';\n\nmodule.exports = rbush;\nmodule.exports.default = rbush;\n\nvar quickselect = require('quickselect');\n\nfunction rbush(maxEntries, format) {\n if (!(this instanceof rbush)) return new rbush(maxEntries, format);\n\n // max entries in a node is 9 by default; min node fill is 40% for best performance\n this._maxEntries = Math.max(4, maxEntries || 9);\n this._minEntries = Math.max(2, Math.ceil(this._maxEntries * 0.4));\n\n if (format) {\n this._initFormat(format);\n }\n\n this.clear();\n}\n\nrbush.prototype = {\n\n all: function () {\n return this._all(this.data, []);\n },\n\n search: function (bbox) {\n\n var node = this.data,\n result = [],\n toBBox = this.toBBox;\n\n if (!intersects(bbox, node)) return result;\n\n var nodesToSearch = [],\n i, len, child, childBBox;\n\n while (node) {\n for (i = 0, len = node.children.length; i < len; i++) {\n\n child = node.children[i];\n childBBox = node.leaf ? toBBox(child) : child;\n\n if (intersects(bbox, childBBox)) {\n if (node.leaf) result.push(child);\n else if (contains(bbox, childBBox)) this._all(child, result);\n else nodesToSearch.push(child);\n }\n }\n node = nodesToSearch.pop();\n }\n\n return result;\n },\n\n collides: function (bbox) {\n\n var node = this.data,\n toBBox = this.toBBox;\n\n if (!intersects(bbox, node)) return false;\n\n var nodesToSearch = [],\n i, len, child, childBBox;\n\n while (node) {\n for (i = 0, len = node.children.length; i < len; i++) {\n\n child = node.children[i];\n childBBox = node.leaf ? toBBox(child) : child;\n\n if (intersects(bbox, childBBox)) {\n if (node.leaf || contains(bbox, childBBox)) return true;\n nodesToSearch.push(child);\n }\n }\n node = nodesToSearch.pop();\n }\n\n return false;\n },\n\n load: function (data) {\n if (!(data && data.length)) return this;\n\n if (data.length < this._minEntries) {\n for (var i = 0, len = data.length; i < len; i++) {\n this.insert(data[i]);\n }\n return this;\n }\n\n // recursively build the tree with the given data from scratch using OMT algorithm\n var node = this._build(data.slice(), 0, data.length - 1, 0);\n\n if (!this.data.children.length) {\n // save as is if tree is empty\n this.data = node;\n\n } else if (this.data.height === node.height) {\n // split root if trees have the same height\n this._splitRoot(this.data, node);\n\n } else {\n if (this.data.height < node.height) {\n // swap trees if inserted one is bigger\n var tmpNode = this.data;\n this.data = node;\n node = tmpNode;\n }\n\n // insert the small tree into the large tree at appropriate level\n this._insert(node, this.data.height - node.height - 1, true);\n }\n\n return this;\n },\n\n insert: function (item) {\n if (item) this._insert(item, this.data.height - 1);\n return this;\n },\n\n clear: function () {\n this.data = createNode([]);\n return this;\n },\n\n remove: function (item, equalsFn) {\n if (!item) return this;\n\n var node = this.data,\n bbox = this.toBBox(item),\n path = [],\n indexes = [],\n i, parent, index, goingUp;\n\n // depth-first iterative tree traversal\n while (node || path.length) {\n\n if (!node) { // go up\n node = path.pop();\n parent = path[path.length - 1];\n i = indexes.pop();\n goingUp = true;\n }\n\n if (node.leaf) { // check current node\n index = findItem(item, node.children, equalsFn);\n\n if (index !== -1) {\n // item found, remove the item and condense tree upwards\n node.children.splice(index, 1);\n path.push(node);\n this._condense(path);\n return this;\n }\n }\n\n if (!goingUp && !node.leaf && contains(node, bbox)) { // go down\n path.push(node);\n indexes.push(i);\n i = 0;\n parent = node;\n node = node.children[0];\n\n } else if (parent) { // go right\n i++;\n node = parent.children[i];\n goingUp = false;\n\n } else node = null; // nothing found\n }\n\n return this;\n },\n\n toBBox: function (item) { return item; },\n\n compareMinX: compareNodeMinX,\n compareMinY: compareNodeMinY,\n\n toJSON: function () { return this.data; },\n\n fromJSON: function (data) {\n this.data = data;\n return this;\n },\n\n _all: function (node, result) {\n var nodesToSearch = [];\n while (node) {\n if (node.leaf) result.push.apply(result, node.children);\n else nodesToSearch.push.apply(nodesToSearch, node.children);\n\n node = nodesToSearch.pop();\n }\n return result;\n },\n\n _build: function (items, left, right, height) {\n\n var N = right - left + 1,\n M = this._maxEntries,\n node;\n\n if (N <= M) {\n // reached leaf level; return leaf\n node = createNode(items.slice(left, right + 1));\n calcBBox(node, this.toBBox);\n return node;\n }\n\n if (!height) {\n // target height of the bulk-loaded tree\n height = Math.ceil(Math.log(N) / Math.log(M));\n\n // target number of root entries to maximize storage utilization\n M = Math.ceil(N / Math.pow(M, height - 1));\n }\n\n node = createNode([]);\n node.leaf = false;\n node.height = height;\n\n // split the items into M mostly square tiles\n\n var N2 = Math.ceil(N / M),\n N1 = N2 * Math.ceil(Math.sqrt(M)),\n i, j, right2, right3;\n\n multiSelect(items, left, right, N1, this.compareMinX);\n\n for (i = left; i <= right; i += N1) {\n\n right2 = Math.min(i + N1 - 1, right);\n\n multiSelect(items, i, right2, N2, this.compareMinY);\n\n for (j = i; j <= right2; j += N2) {\n\n right3 = Math.min(j + N2 - 1, right2);\n\n // pack each entry recursively\n node.children.push(this._build(items, j, right3, height - 1));\n }\n }\n\n calcBBox(node, this.toBBox);\n\n return node;\n },\n\n _chooseSubtree: function (bbox, node, level, path) {\n\n var i, len, child, targetNode, area, enlargement, minArea, minEnlargement;\n\n while (true) {\n path.push(node);\n\n if (node.leaf || path.length - 1 === level) break;\n\n minArea = minEnlargement = Infinity;\n\n for (i = 0, len = node.children.length; i < len; i++) {\n child = node.children[i];\n area = bboxArea(child);\n enlargement = enlargedArea(bbox, child) - area;\n\n // choose entry with the least area enlargement\n if (enlargement < minEnlargement) {\n minEnlargement = enlargement;\n minArea = area < minArea ? area : minArea;\n targetNode = child;\n\n } else if (enlargement === minEnlargement) {\n // otherwise choose one with the smallest area\n if (area < minArea) {\n minArea = area;\n targetNode = child;\n }\n }\n }\n\n node = targetNode || node.children[0];\n }\n\n return node;\n },\n\n _insert: function (item, level, isNode) {\n\n var toBBox = this.toBBox,\n bbox = isNode ? item : toBBox(item),\n insertPath = [];\n\n // find the best node for accommodating the item, saving all nodes along the path too\n var node = this._chooseSubtree(bbox, this.data, level, insertPath);\n\n // put the item into the node\n node.children.push(item);\n extend(node, bbox);\n\n // split on node overflow; propagate upwards if necessary\n while (level >= 0) {\n if (insertPath[level].children.length > this._maxEntries) {\n this._split(insertPath, level);\n level--;\n } else break;\n }\n\n // adjust bboxes along the insertion path\n this._adjustParentBBoxes(bbox, insertPath, level);\n },\n\n // split overflowed node into two\n _split: function (insertPath, level) {\n\n var node = insertPath[level],\n M = node.children.length,\n m = this._minEntries;\n\n this._chooseSplitAxis(node, m, M);\n\n var splitIndex = this._chooseSplitIndex(node, m, M);\n\n var newNode = createNode(node.children.splice(splitIndex, node.children.length - splitIndex));\n newNode.height = node.height;\n newNode.leaf = node.leaf;\n\n calcBBox(node, this.toBBox);\n calcBBox(newNode, this.toBBox);\n\n if (level) insertPath[level - 1].children.push(newNode);\n else this._splitRoot(node, newNode);\n },\n\n _splitRoot: function (node, newNode) {\n // split root node\n this.data = createNode([node, newNode]);\n this.data.height = node.height + 1;\n this.data.leaf = false;\n calcBBox(this.data, this.toBBox);\n },\n\n _chooseSplitIndex: function (node, m, M) {\n\n var i, bbox1, bbox2, overlap, area, minOverlap, minArea, index;\n\n minOverlap = minArea = Infinity;\n\n for (i = m; i <= M - m; i++) {\n bbox1 = distBBox(node, 0, i, this.toBBox);\n bbox2 = distBBox(node, i, M, this.toBBox);\n\n overlap = intersectionArea(bbox1, bbox2);\n area = bboxArea(bbox1) + bboxArea(bbox2);\n\n // choose distribution with minimum overlap\n if (overlap < minOverlap) {\n minOverlap = overlap;\n index = i;\n\n minArea = area < minArea ? area : minArea;\n\n } else if (overlap === minOverlap) {\n // otherwise choose distribution with minimum area\n if (area < minArea) {\n minArea = area;\n index = i;\n }\n }\n }\n\n return index;\n },\n\n // sorts node children by the best axis for split\n _chooseSplitAxis: function (node, m, M) {\n\n var compareMinX = node.leaf ? this.compareMinX : compareNodeMinX,\n compareMinY = node.leaf ? this.compareMinY : compareNodeMinY,\n xMargin = this._allDistMargin(node, m, M, compareMinX),\n yMargin = this._allDistMargin(node, m, M, compareMinY);\n\n // if total distributions margin value is minimal for x, sort by minX,\n // otherwise it's already sorted by minY\n if (xMargin < yMargin) node.children.sort(compareMinX);\n },\n\n // total margin of all possible split distributions where each node is at least m full\n _allDistMargin: function (node, m, M, compare) {\n\n node.children.sort(compare);\n\n var toBBox = this.toBBox,\n leftBBox = distBBox(node, 0, m, toBBox),\n rightBBox = distBBox(node, M - m, M, toBBox),\n margin = bboxMargin(leftBBox) + bboxMargin(rightBBox),\n i, child;\n\n for (i = m; i < M - m; i++) {\n child = node.children[i];\n extend(leftBBox, node.leaf ? toBBox(child) : child);\n margin += bboxMargin(leftBBox);\n }\n\n for (i = M - m - 1; i >= m; i--) {\n child = node.children[i];\n extend(rightBBox, node.leaf ? toBBox(child) : child);\n margin += bboxMargin(rightBBox);\n }\n\n return margin;\n },\n\n _adjustParentBBoxes: function (bbox, path, level) {\n // adjust bboxes along the given tree path\n for (var i = level; i >= 0; i--) {\n extend(path[i], bbox);\n }\n },\n\n _condense: function (path) {\n // go through the path, removing empty nodes and updating bboxes\n for (var i = path.length - 1, siblings; i >= 0; i--) {\n if (path[i].children.length === 0) {\n if (i > 0) {\n siblings = path[i - 1].children;\n siblings.splice(siblings.indexOf(path[i]), 1);\n\n } else this.clear();\n\n } else calcBBox(path[i], this.toBBox);\n }\n },\n\n _initFormat: function (format) {\n // data format (minX, minY, maxX, maxY accessors)\n\n // uses eval-type function compilation instead of just accepting a toBBox function\n // because the algorithms are very sensitive to sorting functions performance,\n // so they should be dead simple and without inner calls\n\n var compareArr = ['return a', ' - b', ';'];\n\n this.compareMinX = new Function('a', 'b', compareArr.join(format[0]));\n this.compareMinY = new Function('a', 'b', compareArr.join(format[1]));\n\n this.toBBox = new Function('a',\n 'return {minX: a' + format[0] +\n ', minY: a' + format[1] +\n ', maxX: a' + format[2] +\n ', maxY: a' + format[3] + '};');\n }\n};\n\nfunction findItem(item, items, equalsFn) {\n if (!equalsFn) return items.indexOf(item);\n\n for (var i = 0; i < items.length; i++) {\n if (equalsFn(item, items[i])) return i;\n }\n return -1;\n}\n\n// calculate node's bbox from bboxes of its children\nfunction calcBBox(node, toBBox) {\n distBBox(node, 0, node.children.length, toBBox, node);\n}\n\n// min bounding rectangle of node children from k to p-1\nfunction distBBox(node, k, p, toBBox, destNode) {\n if (!destNode) destNode = createNode(null);\n destNode.minX = Infinity;\n destNode.minY = Infinity;\n destNode.maxX = -Infinity;\n destNode.maxY = -Infinity;\n\n for (var i = k, child; i < p; i++) {\n child = node.children[i];\n extend(destNode, node.leaf ? toBBox(child) : child);\n }\n\n return destNode;\n}\n\nfunction extend(a, b) {\n a.minX = Math.min(a.minX, b.minX);\n a.minY = Math.min(a.minY, b.minY);\n a.maxX = Math.max(a.maxX, b.maxX);\n a.maxY = Math.max(a.maxY, b.maxY);\n return a;\n}\n\nfunction compareNodeMinX(a, b) { return a.minX - b.minX; }\nfunction compareNodeMinY(a, b) { return a.minY - b.minY; }\n\nfunction bboxArea(a) { return (a.maxX - a.minX) * (a.maxY - a.minY); }\nfunction bboxMargin(a) { return (a.maxX - a.minX) + (a.maxY - a.minY); }\n\nfunction enlargedArea(a, b) {\n return (Math.max(b.maxX, a.maxX) - Math.min(b.minX, a.minX)) *\n (Math.max(b.maxY, a.maxY) - Math.min(b.minY, a.minY));\n}\n\nfunction intersectionArea(a, b) {\n var minX = Math.max(a.minX, b.minX),\n minY = Math.max(a.minY, b.minY),\n maxX = Math.min(a.maxX, b.maxX),\n maxY = Math.min(a.maxY, b.maxY);\n\n return Math.max(0, maxX - minX) *\n Math.max(0, maxY - minY);\n}\n\nfunction contains(a, b) {\n return a.minX <= b.minX &&\n a.minY <= b.minY &&\n b.maxX <= a.maxX &&\n b.maxY <= a.maxY;\n}\n\nfunction intersects(a, b) {\n return b.minX <= a.maxX &&\n b.minY <= a.maxY &&\n b.maxX >= a.minX &&\n b.maxY >= a.minY;\n}\n\nfunction createNode(children) {\n return {\n children: children,\n height: 1,\n leaf: true,\n minX: Infinity,\n minY: Infinity,\n maxX: -Infinity,\n maxY: -Infinity\n };\n}\n\n// sort an array so that items come in groups of n unsorted items, with groups sorted between each other;\n// combines selection algorithm with binary divide & conquer approach\n\nfunction multiSelect(arr, left, right, n, compare) {\n var stack = [left, right],\n mid;\n\n while (stack.length) {\n right = stack.pop();\n left = stack.pop();\n\n if (right - left <= n) continue;\n\n mid = left + Math.ceil((right - left) / n / 2) * n;\n quickselect(arr, mid, left, right, compare);\n\n stack.push(left, mid, mid, right);\n }\n}\n",
+ "\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar Observable_1 = require(\"./internal/Observable\");\nexports.Observable = Observable_1.Observable;\nvar ConnectableObservable_1 = require(\"./internal/observable/ConnectableObservable\");\nexports.ConnectableObservable = ConnectableObservable_1.ConnectableObservable;\nvar groupBy_1 = require(\"./internal/operators/groupBy\");\nexports.GroupedObservable = groupBy_1.GroupedObservable;\nvar observable_1 = require(\"./internal/symbol/observable\");\nexports.observable = observable_1.observable;\nvar Subject_1 = require(\"./internal/Subject\");\nexports.Subject = Subject_1.Subject;\nvar BehaviorSubject_1 = require(\"./internal/BehaviorSubject\");\nexports.BehaviorSubject = BehaviorSubject_1.BehaviorSubject;\nvar ReplaySubject_1 = require(\"./internal/ReplaySubject\");\nexports.ReplaySubject = ReplaySubject_1.ReplaySubject;\nvar AsyncSubject_1 = require(\"./internal/AsyncSubject\");\nexports.AsyncSubject = AsyncSubject_1.AsyncSubject;\nvar asap_1 = require(\"./internal/scheduler/asap\");\nexports.asapScheduler = asap_1.asap;\nvar async_1 = require(\"./internal/scheduler/async\");\nexports.asyncScheduler = async_1.async;\nvar queue_1 = require(\"./internal/scheduler/queue\");\nexports.queueScheduler = queue_1.queue;\nvar animationFrame_1 = require(\"./internal/scheduler/animationFrame\");\nexports.animationFrameScheduler = animationFrame_1.animationFrame;\nvar VirtualTimeScheduler_1 = require(\"./internal/scheduler/VirtualTimeScheduler\");\nexports.VirtualTimeScheduler = VirtualTimeScheduler_1.VirtualTimeScheduler;\nexports.VirtualAction = VirtualTimeScheduler_1.VirtualAction;\nvar Scheduler_1 = require(\"./internal/Scheduler\");\nexports.Scheduler = Scheduler_1.Scheduler;\nvar Subscription_1 = require(\"./internal/Subscription\");\nexports.Subscription = Subscription_1.Subscription;\nvar Subscriber_1 = require(\"./internal/Subscriber\");\nexports.Subscriber = Subscriber_1.Subscriber;\nvar Notification_1 = require(\"./internal/Notification\");\nexports.Notification = Notification_1.Notification;\nvar pipe_1 = require(\"./internal/util/pipe\");\nexports.pipe = pipe_1.pipe;\nvar noop_1 = require(\"./internal/util/noop\");\nexports.noop = noop_1.noop;\nvar identity_1 = require(\"./internal/util/identity\");\nexports.identity = identity_1.identity;\nvar isObservable_1 = require(\"./internal/util/isObservable\");\nexports.isObservable = isObservable_1.isObservable;\nvar ArgumentOutOfRangeError_1 = require(\"./internal/util/ArgumentOutOfRangeError\");\nexports.ArgumentOutOfRangeError = ArgumentOutOfRangeError_1.ArgumentOutOfRangeError;\nvar EmptyError_1 = require(\"./internal/util/EmptyError\");\nexports.EmptyError = EmptyError_1.EmptyError;\nvar ObjectUnsubscribedError_1 = require(\"./internal/util/ObjectUnsubscribedError\");\nexports.ObjectUnsubscribedError = ObjectUnsubscribedError_1.ObjectUnsubscribedError;\nvar UnsubscriptionError_1 = require(\"./internal/util/UnsubscriptionError\");\nexports.UnsubscriptionError = UnsubscriptionError_1.UnsubscriptionError;\nvar TimeoutError_1 = require(\"./internal/util/TimeoutError\");\nexports.TimeoutError = TimeoutError_1.TimeoutError;\nvar bindCallback_1 = require(\"./internal/observable/bindCallback\");\nexports.bindCallback = bindCallback_1.bindCallback;\nvar bindNodeCallback_1 = require(\"./internal/observable/bindNodeCallback\");\nexports.bindNodeCallback = bindNodeCallback_1.bindNodeCallback;\nvar combineLatest_1 = require(\"./internal/observable/combineLatest\");\nexports.combineLatest = combineLatest_1.combineLatest;\nvar concat_1 = require(\"./internal/observable/concat\");\nexports.concat = concat_1.concat;\nvar defer_1 = require(\"./internal/observable/defer\");\nexports.defer = defer_1.defer;\nvar empty_1 = require(\"./internal/observable/empty\");\nexports.empty = empty_1.empty;\nvar forkJoin_1 = require(\"./internal/observable/forkJoin\");\nexports.forkJoin = forkJoin_1.forkJoin;\nvar from_1 = require(\"./internal/observable/from\");\nexports.from = from_1.from;\nvar fromEvent_1 = require(\"./internal/observable/fromEvent\");\nexports.fromEvent = fromEvent_1.fromEvent;\nvar fromEventPattern_1 = require(\"./internal/observable/fromEventPattern\");\nexports.fromEventPattern = fromEventPattern_1.fromEventPattern;\nvar generate_1 = require(\"./internal/observable/generate\");\nexports.generate = generate_1.generate;\nvar iif_1 = require(\"./internal/observable/iif\");\nexports.iif = iif_1.iif;\nvar interval_1 = require(\"./internal/observable/interval\");\nexports.interval = interval_1.interval;\nvar merge_1 = require(\"./internal/observable/merge\");\nexports.merge = merge_1.merge;\nvar never_1 = require(\"./internal/observable/never\");\nexports.never = never_1.never;\nvar of_1 = require(\"./internal/observable/of\");\nexports.of = of_1.of;\nvar onErrorResumeNext_1 = require(\"./internal/observable/onErrorResumeNext\");\nexports.onErrorResumeNext = onErrorResumeNext_1.onErrorResumeNext;\nvar pairs_1 = require(\"./internal/observable/pairs\");\nexports.pairs = pairs_1.pairs;\nvar race_1 = require(\"./internal/observable/race\");\nexports.race = race_1.race;\nvar range_1 = require(\"./internal/observable/range\");\nexports.range = range_1.range;\nvar throwError_1 = require(\"./internal/observable/throwError\");\nexports.throwError = throwError_1.throwError;\nvar timer_1 = require(\"./internal/observable/timer\");\nexports.timer = timer_1.timer;\nvar using_1 = require(\"./internal/observable/using\");\nexports.using = using_1.using;\nvar zip_1 = require(\"./internal/observable/zip\");\nexports.zip = zip_1.zip;\nvar empty_2 = require(\"./internal/observable/empty\");\nexports.EMPTY = empty_2.EMPTY;\nvar never_2 = require(\"./internal/observable/never\");\nexports.NEVER = never_2.NEVER;\nvar config_1 = require(\"./internal/config\");\nexports.config = config_1.config;\n//# sourceMappingURL=index.js.map",
+ "\"use strict\";\nvar __extends = (this && this.__extends) || (function () {\n var extendStatics = function (d, b) {\n extendStatics = Object.setPrototypeOf ||\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };\n return extendStatics(d, b);\n }\n return function (d, b) {\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n})();\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar Subject_1 = require(\"./Subject\");\nvar Subscription_1 = require(\"./Subscription\");\nvar AsyncSubject = (function (_super) {\n __extends(AsyncSubject, _super);\n function AsyncSubject() {\n var _this = _super !== null && _super.apply(this, arguments) || this;\n _this.value = null;\n _this.hasNext = false;\n _this.hasCompleted = false;\n return _this;\n }\n AsyncSubject.prototype._subscribe = function (subscriber) {\n if (this.hasError) {\n subscriber.error(this.thrownError);\n return Subscription_1.Subscription.EMPTY;\n }\n else if (this.hasCompleted && this.hasNext) {\n subscriber.next(this.value);\n subscriber.complete();\n return Subscription_1.Subscription.EMPTY;\n }\n return _super.prototype._subscribe.call(this, subscriber);\n };\n AsyncSubject.prototype.next = function (value) {\n if (!this.hasCompleted) {\n this.value = value;\n this.hasNext = true;\n }\n };\n AsyncSubject.prototype.error = function (error) {\n if (!this.hasCompleted) {\n _super.prototype.error.call(this, error);\n }\n };\n AsyncSubject.prototype.complete = function () {\n this.hasCompleted = true;\n if (this.hasNext) {\n _super.prototype.next.call(this, this.value);\n }\n _super.prototype.complete.call(this);\n };\n return AsyncSubject;\n}(Subject_1.Subject));\nexports.AsyncSubject = AsyncSubject;\n//# sourceMappingURL=AsyncSubject.js.map",
+ "\"use strict\";\nvar __extends = (this && this.__extends) || (function () {\n var extendStatics = function (d, b) {\n extendStatics = Object.setPrototypeOf ||\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };\n return extendStatics(d, b);\n }\n return function (d, b) {\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n})();\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar Subject_1 = require(\"./Subject\");\nvar ObjectUnsubscribedError_1 = require(\"./util/ObjectUnsubscribedError\");\nvar BehaviorSubject = (function (_super) {\n __extends(BehaviorSubject, _super);\n function BehaviorSubject(_value) {\n var _this = _super.call(this) || this;\n _this._value = _value;\n return _this;\n }\n Object.defineProperty(BehaviorSubject.prototype, \"value\", {\n get: function () {\n return this.getValue();\n },\n enumerable: true,\n configurable: true\n });\n BehaviorSubject.prototype._subscribe = function (subscriber) {\n var subscription = _super.prototype._subscribe.call(this, subscriber);\n if (subscription && !subscription.closed) {\n subscriber.next(this._value);\n }\n return subscription;\n };\n BehaviorSubject.prototype.getValue = function () {\n if (this.hasError) {\n throw this.thrownError;\n }\n else if (this.closed) {\n throw new ObjectUnsubscribedError_1.ObjectUnsubscribedError();\n }\n else {\n return this._value;\n }\n };\n BehaviorSubject.prototype.next = function (value) {\n _super.prototype.next.call(this, this._value = value);\n };\n return BehaviorSubject;\n}(Subject_1.Subject));\nexports.BehaviorSubject = BehaviorSubject;\n//# sourceMappingURL=BehaviorSubject.js.map",
+ "\"use strict\";\nvar __extends = (this && this.__extends) || (function () {\n var extendStatics = function (d, b) {\n extendStatics = Object.setPrototypeOf ||\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };\n return extendStatics(d, b);\n }\n return function (d, b) {\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n})();\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar Subscriber_1 = require(\"./Subscriber\");\nvar InnerSubscriber = (function (_super) {\n __extends(InnerSubscriber, _super);\n function InnerSubscriber(parent, outerValue, outerIndex) {\n var _this = _super.call(this) || this;\n _this.parent = parent;\n _this.outerValue = outerValue;\n _this.outerIndex = outerIndex;\n _this.index = 0;\n return _this;\n }\n InnerSubscriber.prototype._next = function (value) {\n this.parent.notifyNext(this.outerValue, value, this.outerIndex, this.index++, this);\n };\n InnerSubscriber.prototype._error = function (error) {\n this.parent.notifyError(error, this);\n this.unsubscribe();\n };\n InnerSubscriber.prototype._complete = function () {\n this.parent.notifyComplete(this);\n this.unsubscribe();\n };\n return InnerSubscriber;\n}(Subscriber_1.Subscriber));\nexports.InnerSubscriber = InnerSubscriber;\n//# sourceMappingURL=InnerSubscriber.js.map",
+ "\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar empty_1 = require(\"./observable/empty\");\nvar of_1 = require(\"./observable/of\");\nvar throwError_1 = require(\"./observable/throwError\");\nvar Notification = (function () {\n function Notification(kind, value, error) {\n this.kind = kind;\n this.value = value;\n this.error = error;\n this.hasValue = kind === 'N';\n }\n Notification.prototype.observe = function (observer) {\n switch (this.kind) {\n case 'N':\n return observer.next && observer.next(this.value);\n case 'E':\n return observer.error && observer.error(this.error);\n case 'C':\n return observer.complete && observer.complete();\n }\n };\n Notification.prototype.do = function (next, error, complete) {\n var kind = this.kind;\n switch (kind) {\n case 'N':\n return next && next(this.value);\n case 'E':\n return error && error(this.error);\n case 'C':\n return complete && complete();\n }\n };\n Notification.prototype.accept = function (nextOrObserver, error, complete) {\n if (nextOrObserver && typeof nextOrObserver.next === 'function') {\n return this.observe(nextOrObserver);\n }\n else {\n return this.do(nextOrObserver, error, complete);\n }\n };\n Notification.prototype.toObservable = function () {\n var kind = this.kind;\n switch (kind) {\n case 'N':\n return of_1.of(this.value);\n case 'E':\n return throwError_1.throwError(this.error);\n case 'C':\n return empty_1.empty();\n }\n throw new Error('unexpected notification kind value');\n };\n Notification.createNext = function (value) {\n if (typeof value !== 'undefined') {\n return new Notification('N', value);\n }\n return Notification.undefinedValueNotification;\n };\n Notification.createError = function (err) {\n return new Notification('E', undefined, err);\n };\n Notification.createComplete = function () {\n return Notification.completeNotification;\n };\n Notification.completeNotification = new Notification('C');\n Notification.undefinedValueNotification = new Notification('N', undefined);\n return Notification;\n}());\nexports.Notification = Notification;\n//# sourceMappingURL=Notification.js.map",
+ "\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar canReportError_1 = require(\"./util/canReportError\");\nvar toSubscriber_1 = require(\"./util/toSubscriber\");\nvar observable_1 = require(\"../internal/symbol/observable\");\nvar pipe_1 = require(\"./util/pipe\");\nvar config_1 = require(\"./config\");\nvar Observable = (function () {\n function Observable(subscribe) {\n this._isScalar = false;\n if (subscribe) {\n this._subscribe = subscribe;\n }\n }\n Observable.prototype.lift = function (operator) {\n var observable = new Observable();\n observable.source = this;\n observable.operator = operator;\n return observable;\n };\n Observable.prototype.subscribe = function (observerOrNext, error, complete) {\n var operator = this.operator;\n var sink = toSubscriber_1.toSubscriber(observerOrNext, error, complete);\n if (operator) {\n operator.call(sink, this.source);\n }\n else {\n sink.add(this.source || (config_1.config.useDeprecatedSynchronousErrorHandling && !sink.syncErrorThrowable) ?\n this._subscribe(sink) :\n this._trySubscribe(sink));\n }\n if (config_1.config.useDeprecatedSynchronousErrorHandling) {\n if (sink.syncErrorThrowable) {\n sink.syncErrorThrowable = false;\n if (sink.syncErrorThrown) {\n throw sink.syncErrorValue;\n }\n }\n }\n return sink;\n };\n Observable.prototype._trySubscribe = function (sink) {\n try {\n return this._subscribe(sink);\n }\n catch (err) {\n if (config_1.config.useDeprecatedSynchronousErrorHandling) {\n sink.syncErrorThrown = true;\n sink.syncErrorValue = err;\n }\n if (canReportError_1.canReportError(sink)) {\n sink.error(err);\n }\n else {\n console.warn(err);\n }\n }\n };\n Observable.prototype.forEach = function (next, promiseCtor) {\n var _this = this;\n promiseCtor = getPromiseCtor(promiseCtor);\n return new promiseCtor(function (resolve, reject) {\n var subscription;\n subscription = _this.subscribe(function (value) {\n try {\n next(value);\n }\n catch (err) {\n reject(err);\n if (subscription) {\n subscription.unsubscribe();\n }\n }\n }, reject, resolve);\n });\n };\n Observable.prototype._subscribe = function (subscriber) {\n var source = this.source;\n return source && source.subscribe(subscriber);\n };\n Observable.prototype[observable_1.observable] = function () {\n return this;\n };\n Observable.prototype.pipe = function () {\n var operations = [];\n for (var _i = 0; _i < arguments.length; _i++) {\n operations[_i] = arguments[_i];\n }\n if (operations.length === 0) {\n return this;\n }\n return pipe_1.pipeFromArray(operations)(this);\n };\n Observable.prototype.toPromise = function (promiseCtor) {\n var _this = this;\n promiseCtor = getPromiseCtor(promiseCtor);\n return new promiseCtor(function (resolve, reject) {\n var value;\n _this.subscribe(function (x) { return value = x; }, function (err) { return reject(err); }, function () { return resolve(value); });\n });\n };\n Observable.create = function (subscribe) {\n return new Observable(subscribe);\n };\n return Observable;\n}());\nexports.Observable = Observable;\nfunction getPromiseCtor(promiseCtor) {\n if (!promiseCtor) {\n promiseCtor = config_1.config.Promise || Promise;\n }\n if (!promiseCtor) {\n throw new Error('no Promise impl found');\n }\n return promiseCtor;\n}\n//# sourceMappingURL=Observable.js.map",
+ "\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar config_1 = require(\"./config\");\nvar hostReportError_1 = require(\"./util/hostReportError\");\nexports.empty = {\n closed: true,\n next: function (value) { },\n error: function (err) {\n if (config_1.config.useDeprecatedSynchronousErrorHandling) {\n throw err;\n }\n else {\n hostReportError_1.hostReportError(err);\n }\n },\n complete: function () { }\n};\n//# sourceMappingURL=Observer.js.map",
+ "\"use strict\";\nvar __extends = (this && this.__extends) || (function () {\n var extendStatics = function (d, b) {\n extendStatics = Object.setPrototypeOf ||\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };\n return extendStatics(d, b);\n }\n return function (d, b) {\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n})();\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar Subscriber_1 = require(\"./Subscriber\");\nvar OuterSubscriber = (function (_super) {\n __extends(OuterSubscriber, _super);\n function OuterSubscriber() {\n return _super !== null && _super.apply(this, arguments) || this;\n }\n OuterSubscriber.prototype.notifyNext = function (outerValue, innerValue, outerIndex, innerIndex, innerSub) {\n this.destination.next(innerValue);\n };\n OuterSubscriber.prototype.notifyError = function (error, innerSub) {\n this.destination.error(error);\n };\n OuterSubscriber.prototype.notifyComplete = function (innerSub) {\n this.destination.complete();\n };\n return OuterSubscriber;\n}(Subscriber_1.Subscriber));\nexports.OuterSubscriber = OuterSubscriber;\n//# sourceMappingURL=OuterSubscriber.js.map",
+ "\"use strict\";\nvar __extends = (this && this.__extends) || (function () {\n var extendStatics = function (d, b) {\n extendStatics = Object.setPrototypeOf ||\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };\n return extendStatics(d, b);\n }\n return function (d, b) {\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n})();\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar Subject_1 = require(\"./Subject\");\nvar queue_1 = require(\"./scheduler/queue\");\nvar Subscription_1 = require(\"./Subscription\");\nvar observeOn_1 = require(\"./operators/observeOn\");\nvar ObjectUnsubscribedError_1 = require(\"./util/ObjectUnsubscribedError\");\nvar SubjectSubscription_1 = require(\"./SubjectSubscription\");\nvar ReplaySubject = (function (_super) {\n __extends(ReplaySubject, _super);\n function ReplaySubject(bufferSize, windowTime, scheduler) {\n if (bufferSize === void 0) { bufferSize = Number.POSITIVE_INFINITY; }\n if (windowTime === void 0) { windowTime = Number.POSITIVE_INFINITY; }\n var _this = _super.call(this) || this;\n _this.scheduler = scheduler;\n _this._events = [];\n _this._infiniteTimeWindow = false;\n _this._bufferSize = bufferSize < 1 ? 1 : bufferSize;\n _this._windowTime = windowTime < 1 ? 1 : windowTime;\n if (windowTime === Number.POSITIVE_INFINITY) {\n _this._infiniteTimeWindow = true;\n _this.next = _this.nextInfiniteTimeWindow;\n }\n else {\n _this.next = _this.nextTimeWindow;\n }\n return _this;\n }\n ReplaySubject.prototype.nextInfiniteTimeWindow = function (value) {\n var _events = this._events;\n _events.push(value);\n if (_events.length > this._bufferSize) {\n _events.shift();\n }\n _super.prototype.next.call(this, value);\n };\n ReplaySubject.prototype.nextTimeWindow = function (value) {\n this._events.push(new ReplayEvent(this._getNow(), value));\n this._trimBufferThenGetEvents();\n _super.prototype.next.call(this, value);\n };\n ReplaySubject.prototype._subscribe = function (subscriber) {\n var _infiniteTimeWindow = this._infiniteTimeWindow;\n var _events = _infiniteTimeWindow ? this._events : this._trimBufferThenGetEvents();\n var scheduler = this.scheduler;\n var len = _events.length;\n var subscription;\n if (this.closed) {\n throw new ObjectUnsubscribedError_1.ObjectUnsubscribedError();\n }\n else if (this.isStopped || this.hasError) {\n subscription = Subscription_1.Subscription.EMPTY;\n }\n else {\n this.observers.push(subscriber);\n subscription = new SubjectSubscription_1.SubjectSubscription(this, subscriber);\n }\n if (scheduler) {\n subscriber.add(subscriber = new observeOn_1.ObserveOnSubscriber(subscriber, scheduler));\n }\n if (_infiniteTimeWindow) {\n for (var i = 0; i < len && !subscriber.closed; i++) {\n subscriber.next(_events[i]);\n }\n }\n else {\n for (var i = 0; i < len && !subscriber.closed; i++) {\n subscriber.next(_events[i].value);\n }\n }\n if (this.hasError) {\n subscriber.error(this.thrownError);\n }\n else if (this.isStopped) {\n subscriber.complete();\n }\n return subscription;\n };\n ReplaySubject.prototype._getNow = function () {\n return (this.scheduler || queue_1.queue).now();\n };\n ReplaySubject.prototype._trimBufferThenGetEvents = function () {\n var now = this._getNow();\n var _bufferSize = this._bufferSize;\n var _windowTime = this._windowTime;\n var _events = this._events;\n var eventsCount = _events.length;\n var spliceCount = 0;\n while (spliceCount < eventsCount) {\n if ((now - _events[spliceCount].time) < _windowTime) {\n break;\n }\n spliceCount++;\n }\n if (eventsCount > _bufferSize) {\n spliceCount = Math.max(spliceCount, eventsCount - _bufferSize);\n }\n if (spliceCount > 0) {\n _events.splice(0, spliceCount);\n }\n return _events;\n };\n return ReplaySubject;\n}(Subject_1.Subject));\nexports.ReplaySubject = ReplaySubject;\nvar ReplayEvent = (function () {\n function ReplayEvent(time, value) {\n this.time = time;\n this.value = value;\n }\n return ReplayEvent;\n}());\n//# sourceMappingURL=ReplaySubject.js.map",
+ "\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar Scheduler = (function () {\n function Scheduler(SchedulerAction, now) {\n if (now === void 0) { now = Scheduler.now; }\n this.SchedulerAction = SchedulerAction;\n this.now = now;\n }\n Scheduler.prototype.schedule = function (work, delay, state) {\n if (delay === void 0) { delay = 0; }\n return new this.SchedulerAction(this, work).schedule(state, delay);\n };\n Scheduler.now = function () { return Date.now(); };\n return Scheduler;\n}());\nexports.Scheduler = Scheduler;\n//# sourceMappingURL=Scheduler.js.map",
+ "\"use strict\";\nvar __extends = (this && this.__extends) || (function () {\n var extendStatics = function (d, b) {\n extendStatics = Object.setPrototypeOf ||\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };\n return extendStatics(d, b);\n }\n return function (d, b) {\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n})();\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar Observable_1 = require(\"./Observable\");\nvar Subscriber_1 = require(\"./Subscriber\");\nvar Subscription_1 = require(\"./Subscription\");\nvar ObjectUnsubscribedError_1 = require(\"./util/ObjectUnsubscribedError\");\nvar SubjectSubscription_1 = require(\"./SubjectSubscription\");\nvar rxSubscriber_1 = require(\"../internal/symbol/rxSubscriber\");\nvar SubjectSubscriber = (function (_super) {\n __extends(SubjectSubscriber, _super);\n function SubjectSubscriber(destination) {\n var _this = _super.call(this, destination) || this;\n _this.destination = destination;\n return _this;\n }\n return SubjectSubscriber;\n}(Subscriber_1.Subscriber));\nexports.SubjectSubscriber = SubjectSubscriber;\nvar Subject = (function (_super) {\n __extends(Subject, _super);\n function Subject() {\n var _this = _super.call(this) || this;\n _this.observers = [];\n _this.closed = false;\n _this.isStopped = false;\n _this.hasError = false;\n _this.thrownError = null;\n return _this;\n }\n Subject.prototype[rxSubscriber_1.rxSubscriber] = function () {\n return new SubjectSubscriber(this);\n };\n Subject.prototype.lift = function (operator) {\n var subject = new AnonymousSubject(this, this);\n subject.operator = operator;\n return subject;\n };\n Subject.prototype.next = function (value) {\n if (this.closed) {\n throw new ObjectUnsubscribedError_1.ObjectUnsubscribedError();\n }\n if (!this.isStopped) {\n var observers = this.observers;\n var len = observers.length;\n var copy = observers.slice();\n for (var i = 0; i < len; i++) {\n copy[i].next(value);\n }\n }\n };\n Subject.prototype.error = function (err) {\n if (this.closed) {\n throw new ObjectUnsubscribedError_1.ObjectUnsubscribedError();\n }\n this.hasError = true;\n this.thrownError = err;\n this.isStopped = true;\n var observers = this.observers;\n var len = observers.length;\n var copy = observers.slice();\n for (var i = 0; i < len; i++) {\n copy[i].error(err);\n }\n this.observers.length = 0;\n };\n Subject.prototype.complete = function () {\n if (this.closed) {\n throw new ObjectUnsubscribedError_1.ObjectUnsubscribedError();\n }\n this.isStopped = true;\n var observers = this.observers;\n var len = observers.length;\n var copy = observers.slice();\n for (var i = 0; i < len; i++) {\n copy[i].complete();\n }\n this.observers.length = 0;\n };\n Subject.prototype.unsubscribe = function () {\n this.isStopped = true;\n this.closed = true;\n this.observers = null;\n };\n Subject.prototype._trySubscribe = function (subscriber) {\n if (this.closed) {\n throw new ObjectUnsubscribedError_1.ObjectUnsubscribedError();\n }\n else {\n return _super.prototype._trySubscribe.call(this, subscriber);\n }\n };\n Subject.prototype._subscribe = function (subscriber) {\n if (this.closed) {\n throw new ObjectUnsubscribedError_1.ObjectUnsubscribedError();\n }\n else if (this.hasError) {\n subscriber.error(this.thrownError);\n return Subscription_1.Subscription.EMPTY;\n }\n else if (this.isStopped) {\n subscriber.complete();\n return Subscription_1.Subscription.EMPTY;\n }\n else {\n this.observers.push(subscriber);\n return new SubjectSubscription_1.SubjectSubscription(this, subscriber);\n }\n };\n Subject.prototype.asObservable = function () {\n var observable = new Observable_1.Observable();\n observable.source = this;\n return observable;\n };\n Subject.create = function (destination, source) {\n return new AnonymousSubject(destination, source);\n };\n return Subject;\n}(Observable_1.Observable));\nexports.Subject = Subject;\nvar AnonymousSubject = (function (_super) {\n __extends(AnonymousSubject, _super);\n function AnonymousSubject(destination, source) {\n var _this = _super.call(this) || this;\n _this.destination = destination;\n _this.source = source;\n return _this;\n }\n AnonymousSubject.prototype.next = function (value) {\n var destination = this.destination;\n if (destination && destination.next) {\n destination.next(value);\n }\n };\n AnonymousSubject.prototype.error = function (err) {\n var destination = this.destination;\n if (destination && destination.error) {\n this.destination.error(err);\n }\n };\n AnonymousSubject.prototype.complete = function () {\n var destination = this.destination;\n if (destination && destination.complete) {\n this.destination.complete();\n }\n };\n AnonymousSubject.prototype._subscribe = function (subscriber) {\n var source = this.source;\n if (source) {\n return this.source.subscribe(subscriber);\n }\n else {\n return Subscription_1.Subscription.EMPTY;\n }\n };\n return AnonymousSubject;\n}(Subject));\nexports.AnonymousSubject = AnonymousSubject;\n//# sourceMappingURL=Subject.js.map",
+ "\"use strict\";\nvar __extends = (this && this.__extends) || (function () {\n var extendStatics = function (d, b) {\n extendStatics = Object.setPrototypeOf ||\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };\n return extendStatics(d, b);\n }\n return function (d, b) {\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n})();\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar Subscription_1 = require(\"./Subscription\");\nvar SubjectSubscription = (function (_super) {\n __extends(SubjectSubscription, _super);\n function SubjectSubscription(subject, subscriber) {\n var _this = _super.call(this) || this;\n _this.subject = subject;\n _this.subscriber = subscriber;\n _this.closed = false;\n return _this;\n }\n SubjectSubscription.prototype.unsubscribe = function () {\n if (this.closed) {\n return;\n }\n this.closed = true;\n var subject = this.subject;\n var observers = subject.observers;\n this.subject = null;\n if (!observers || observers.length === 0 || subject.isStopped || subject.closed) {\n return;\n }\n var subscriberIndex = observers.indexOf(this.subscriber);\n if (subscriberIndex !== -1) {\n observers.splice(subscriberIndex, 1);\n }\n };\n return SubjectSubscription;\n}(Subscription_1.Subscription));\nexports.SubjectSubscription = SubjectSubscription;\n//# sourceMappingURL=SubjectSubscription.js.map",
+ "\"use strict\";\nvar __extends = (this && this.__extends) || (function () {\n var extendStatics = function (d, b) {\n extendStatics = Object.setPrototypeOf ||\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };\n return extendStatics(d, b);\n }\n return function (d, b) {\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n})();\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar isFunction_1 = require(\"./util/isFunction\");\nvar Observer_1 = require(\"./Observer\");\nvar Subscription_1 = require(\"./Subscription\");\nvar rxSubscriber_1 = require(\"../internal/symbol/rxSubscriber\");\nvar config_1 = require(\"./config\");\nvar hostReportError_1 = require(\"./util/hostReportError\");\nvar Subscriber = (function (_super) {\n __extends(Subscriber, _super);\n function Subscriber(destinationOrNext, error, complete) {\n var _this = _super.call(this) || this;\n _this.syncErrorValue = null;\n _this.syncErrorThrown = false;\n _this.syncErrorThrowable = false;\n _this.isStopped = false;\n _this._parentSubscription = null;\n switch (arguments.length) {\n case 0:\n _this.destination = Observer_1.empty;\n break;\n case 1:\n if (!destinationOrNext) {\n _this.destination = Observer_1.empty;\n break;\n }\n if (typeof destinationOrNext === 'object') {\n if (destinationOrNext instanceof Subscriber) {\n _this.syncErrorThrowable = destinationOrNext.syncErrorThrowable;\n _this.destination = destinationOrNext;\n destinationOrNext.add(_this);\n }\n else {\n _this.syncErrorThrowable = true;\n _this.destination = new SafeSubscriber(_this, destinationOrNext);\n }\n break;\n }\n default:\n _this.syncErrorThrowable = true;\n _this.destination = new SafeSubscriber(_this, destinationOrNext, error, complete);\n break;\n }\n return _this;\n }\n Subscriber.prototype[rxSubscriber_1.rxSubscriber] = function () { return this; };\n Subscriber.create = function (next, error, complete) {\n var subscriber = new Subscriber(next, error, complete);\n subscriber.syncErrorThrowable = false;\n return subscriber;\n };\n Subscriber.prototype.next = function (value) {\n if (!this.isStopped) {\n this._next(value);\n }\n };\n Subscriber.prototype.error = function (err) {\n if (!this.isStopped) {\n this.isStopped = true;\n this._error(err);\n }\n };\n Subscriber.prototype.complete = function () {\n if (!this.isStopped) {\n this.isStopped = true;\n this._complete();\n }\n };\n Subscriber.prototype.unsubscribe = function () {\n if (this.closed) {\n return;\n }\n this.isStopped = true;\n _super.prototype.unsubscribe.call(this);\n };\n Subscriber.prototype._next = function (value) {\n this.destination.next(value);\n };\n Subscriber.prototype._error = function (err) {\n this.destination.error(err);\n this.unsubscribe();\n };\n Subscriber.prototype._complete = function () {\n this.destination.complete();\n this.unsubscribe();\n };\n Subscriber.prototype._unsubscribeAndRecycle = function () {\n var _a = this, _parent = _a._parent, _parents = _a._parents;\n this._parent = null;\n this._parents = null;\n this.unsubscribe();\n this.closed = false;\n this.isStopped = false;\n this._parent = _parent;\n this._parents = _parents;\n this._parentSubscription = null;\n return this;\n };\n return Subscriber;\n}(Subscription_1.Subscription));\nexports.Subscriber = Subscriber;\nvar SafeSubscriber = (function (_super) {\n __extends(SafeSubscriber, _super);\n function SafeSubscriber(_parentSubscriber, observerOrNext, error, complete) {\n var _this = _super.call(this) || this;\n _this._parentSubscriber = _parentSubscriber;\n var next;\n var context = _this;\n if (isFunction_1.isFunction(observerOrNext)) {\n next = observerOrNext;\n }\n else if (observerOrNext) {\n next = observerOrNext.next;\n error = observerOrNext.error;\n complete = observerOrNext.complete;\n if (observerOrNext !== Observer_1.empty) {\n context = Object.create(observerOrNext);\n if (isFunction_1.isFunction(context.unsubscribe)) {\n _this.add(context.unsubscribe.bind(context));\n }\n context.unsubscribe = _this.unsubscribe.bind(_this);\n }\n }\n _this._context = context;\n _this._next = next;\n _this._error = error;\n _this._complete = complete;\n return _this;\n }\n SafeSubscriber.prototype.next = function (value) {\n if (!this.isStopped && this._next) {\n var _parentSubscriber = this._parentSubscriber;\n if (!config_1.config.useDeprecatedSynchronousErrorHandling || !_parentSubscriber.syncErrorThrowable) {\n this.__tryOrUnsub(this._next, value);\n }\n else if (this.__tryOrSetError(_parentSubscriber, this._next, value)) {\n this.unsubscribe();\n }\n }\n };\n SafeSubscriber.prototype.error = function (err) {\n if (!this.isStopped) {\n var _parentSubscriber = this._parentSubscriber;\n var useDeprecatedSynchronousErrorHandling = config_1.config.useDeprecatedSynchronousErrorHandling;\n if (this._error) {\n if (!useDeprecatedSynchronousErrorHandling || !_parentSubscriber.syncErrorThrowable) {\n this.__tryOrUnsub(this._error, err);\n this.unsubscribe();\n }\n else {\n this.__tryOrSetError(_parentSubscriber, this._error, err);\n this.unsubscribe();\n }\n }\n else if (!_parentSubscriber.syncErrorThrowable) {\n this.unsubscribe();\n if (useDeprecatedSynchronousErrorHandling) {\n throw err;\n }\n hostReportError_1.hostReportError(err);\n }\n else {\n if (useDeprecatedSynchronousErrorHandling) {\n _parentSubscriber.syncErrorValue = err;\n _parentSubscriber.syncErrorThrown = true;\n }\n else {\n hostReportError_1.hostReportError(err);\n }\n this.unsubscribe();\n }\n }\n };\n SafeSubscriber.prototype.complete = function () {\n var _this = this;\n if (!this.isStopped) {\n var _parentSubscriber = this._parentSubscriber;\n if (this._complete) {\n var wrappedComplete = function () { return _this._complete.call(_this._context); };\n if (!config_1.config.useDeprecatedSynchronousErrorHandling || !_parentSubscriber.syncErrorThrowable) {\n this.__tryOrUnsub(wrappedComplete);\n this.unsubscribe();\n }\n else {\n this.__tryOrSetError(_parentSubscriber, wrappedComplete);\n this.unsubscribe();\n }\n }\n else {\n this.unsubscribe();\n }\n }\n };\n SafeSubscriber.prototype.__tryOrUnsub = function (fn, value) {\n try {\n fn.call(this._context, value);\n }\n catch (err) {\n this.unsubscribe();\n if (config_1.config.useDeprecatedSynchronousErrorHandling) {\n throw err;\n }\n else {\n hostReportError_1.hostReportError(err);\n }\n }\n };\n SafeSubscriber.prototype.__tryOrSetError = function (parent, fn, value) {\n if (!config_1.config.useDeprecatedSynchronousErrorHandling) {\n throw new Error('bad call');\n }\n try {\n fn.call(this._context, value);\n }\n catch (err) {\n if (config_1.config.useDeprecatedSynchronousErrorHandling) {\n parent.syncErrorValue = err;\n parent.syncErrorThrown = true;\n return true;\n }\n else {\n hostReportError_1.hostReportError(err);\n return true;\n }\n }\n return false;\n };\n SafeSubscriber.prototype._unsubscribe = function () {\n var _parentSubscriber = this._parentSubscriber;\n this._context = null;\n this._parentSubscriber = null;\n _parentSubscriber.unsubscribe();\n };\n return SafeSubscriber;\n}(Subscriber));\nexports.SafeSubscriber = SafeSubscriber;\n//# sourceMappingURL=Subscriber.js.map",
+ "\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar isArray_1 = require(\"./util/isArray\");\nvar isObject_1 = require(\"./util/isObject\");\nvar isFunction_1 = require(\"./util/isFunction\");\nvar tryCatch_1 = require(\"./util/tryCatch\");\nvar errorObject_1 = require(\"./util/errorObject\");\nvar UnsubscriptionError_1 = require(\"./util/UnsubscriptionError\");\nvar Subscription = (function () {\n function Subscription(unsubscribe) {\n this.closed = false;\n this._parent = null;\n this._parents = null;\n this._subscriptions = null;\n if (unsubscribe) {\n this._unsubscribe = unsubscribe;\n }\n }\n Subscription.prototype.unsubscribe = function () {\n var hasErrors = false;\n var errors;\n if (this.closed) {\n return;\n }\n var _a = this, _parent = _a._parent, _parents = _a._parents, _unsubscribe = _a._unsubscribe, _subscriptions = _a._subscriptions;\n this.closed = true;\n this._parent = null;\n this._parents = null;\n this._subscriptions = null;\n var index = -1;\n var len = _parents ? _parents.length : 0;\n while (_parent) {\n _parent.remove(this);\n _parent = ++index < len && _parents[index] || null;\n }\n if (isFunction_1.isFunction(_unsubscribe)) {\n var trial = tryCatch_1.tryCatch(_unsubscribe).call(this);\n if (trial === errorObject_1.errorObject) {\n hasErrors = true;\n errors = errors || (errorObject_1.errorObject.e instanceof UnsubscriptionError_1.UnsubscriptionError ?\n flattenUnsubscriptionErrors(errorObject_1.errorObject.e.errors) : [errorObject_1.errorObject.e]);\n }\n }\n if (isArray_1.isArray(_subscriptions)) {\n index = -1;\n len = _subscriptions.length;\n while (++index < len) {\n var sub = _subscriptions[index];\n if (isObject_1.isObject(sub)) {\n var trial = tryCatch_1.tryCatch(sub.unsubscribe).call(sub);\n if (trial === errorObject_1.errorObject) {\n hasErrors = true;\n errors = errors || [];\n var err = errorObject_1.errorObject.e;\n if (err instanceof UnsubscriptionError_1.UnsubscriptionError) {\n errors = errors.concat(flattenUnsubscriptionErrors(err.errors));\n }\n else {\n errors.push(err);\n }\n }\n }\n }\n }\n if (hasErrors) {\n throw new UnsubscriptionError_1.UnsubscriptionError(errors);\n }\n };\n Subscription.prototype.add = function (teardown) {\n if (!teardown || (teardown === Subscription.EMPTY)) {\n return Subscription.EMPTY;\n }\n if (teardown === this) {\n return this;\n }\n var subscription = teardown;\n switch (typeof teardown) {\n case 'function':\n subscription = new Subscription(teardown);\n case 'object':\n if (subscription.closed || typeof subscription.unsubscribe !== 'function') {\n return subscription;\n }\n else if (this.closed) {\n subscription.unsubscribe();\n return subscription;\n }\n else if (typeof subscription._addParent !== 'function') {\n var tmp = subscription;\n subscription = new Subscription();\n subscription._subscriptions = [tmp];\n }\n break;\n default:\n throw new Error('unrecognized teardown ' + teardown + ' added to Subscription.');\n }\n var subscriptions = this._subscriptions || (this._subscriptions = []);\n subscriptions.push(subscription);\n subscription._addParent(this);\n return subscription;\n };\n Subscription.prototype.remove = function (subscription) {\n var subscriptions = this._subscriptions;\n if (subscriptions) {\n var subscriptionIndex = subscriptions.indexOf(subscription);\n if (subscriptionIndex !== -1) {\n subscriptions.splice(subscriptionIndex, 1);\n }\n }\n };\n Subscription.prototype._addParent = function (parent) {\n var _a = this, _parent = _a._parent, _parents = _a._parents;\n if (!_parent || _parent === parent) {\n this._parent = parent;\n }\n else if (!_parents) {\n this._parents = [parent];\n }\n else if (_parents.indexOf(parent) === -1) {\n _parents.push(parent);\n }\n };\n Subscription.EMPTY = (function (empty) {\n empty.closed = true;\n return empty;\n }(new Subscription()));\n return Subscription;\n}());\nexports.Subscription = Subscription;\nfunction flattenUnsubscriptionErrors(errors) {\n return errors.reduce(function (errs, err) { return errs.concat((err instanceof UnsubscriptionError_1.UnsubscriptionError) ? err.errors : err); }, []);\n}\n//# sourceMappingURL=Subscription.js.map",
+ "\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar _enable_super_gross_mode_that_will_cause_bad_things = false;\nexports.config = {\n Promise: undefined,\n set useDeprecatedSynchronousErrorHandling(value) {\n if (value) {\n var error = new Error();\n console.warn('DEPRECATED! RxJS was set to use deprecated synchronous error handling behavior by code at: \\n' + error.stack);\n }\n else if (_enable_super_gross_mode_that_will_cause_bad_things) {\n console.log('RxJS: Back to a better error behavior. Thank you. <3');\n }\n _enable_super_gross_mode_that_will_cause_bad_things = value;\n },\n get useDeprecatedSynchronousErrorHandling() {\n return _enable_super_gross_mode_that_will_cause_bad_things;\n },\n};\n//# sourceMappingURL=config.js.map",
+ "\"use strict\";\nvar __extends = (this && this.__extends) || (function () {\n var extendStatics = function (d, b) {\n extendStatics = Object.setPrototypeOf ||\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };\n return extendStatics(d, b);\n }\n return function (d, b) {\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n})();\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar Subject_1 = require(\"../Subject\");\nvar Observable_1 = require(\"../Observable\");\nvar Subscriber_1 = require(\"../Subscriber\");\nvar Subscription_1 = require(\"../Subscription\");\nvar refCount_1 = require(\"../operators/refCount\");\nvar ConnectableObservable = (function (_super) {\n __extends(ConnectableObservable, _super);\n function ConnectableObservable(source, subjectFactory) {\n var _this = _super.call(this) || this;\n _this.source = source;\n _this.subjectFactory = subjectFactory;\n _this._refCount = 0;\n _this._isComplete = false;\n return _this;\n }\n ConnectableObservable.prototype._subscribe = function (subscriber) {\n return this.getSubject().subscribe(subscriber);\n };\n ConnectableObservable.prototype.getSubject = function () {\n var subject = this._subject;\n if (!subject || subject.isStopped) {\n this._subject = this.subjectFactory();\n }\n return this._subject;\n };\n ConnectableObservable.prototype.connect = function () {\n var connection = this._connection;\n if (!connection) {\n this._isComplete = false;\n connection = this._connection = new Subscription_1.Subscription();\n connection.add(this.source\n .subscribe(new ConnectableSubscriber(this.getSubject(), this)));\n if (connection.closed) {\n this._connection = null;\n connection = Subscription_1.Subscription.EMPTY;\n }\n else {\n this._connection = connection;\n }\n }\n return connection;\n };\n ConnectableObservable.prototype.refCount = function () {\n return refCount_1.refCount()(this);\n };\n return ConnectableObservable;\n}(Observable_1.Observable));\nexports.ConnectableObservable = ConnectableObservable;\nvar connectableProto = ConnectableObservable.prototype;\nexports.connectableObservableDescriptor = {\n operator: { value: null },\n _refCount: { value: 0, writable: true },\n _subject: { value: null, writable: true },\n _connection: { value: null, writable: true },\n _subscribe: { value: connectableProto._subscribe },\n _isComplete: { value: connectableProto._isComplete, writable: true },\n getSubject: { value: connectableProto.getSubject },\n connect: { value: connectableProto.connect },\n refCount: { value: connectableProto.refCount }\n};\nvar ConnectableSubscriber = (function (_super) {\n __extends(ConnectableSubscriber, _super);\n function ConnectableSubscriber(destination, connectable) {\n var _this = _super.call(this, destination) || this;\n _this.connectable = connectable;\n return _this;\n }\n ConnectableSubscriber.prototype._error = function (err) {\n this._unsubscribe();\n _super.prototype._error.call(this, err);\n };\n ConnectableSubscriber.prototype._complete = function () {\n this.connectable._isComplete = true;\n this._unsubscribe();\n _super.prototype._complete.call(this);\n };\n ConnectableSubscriber.prototype._unsubscribe = function () {\n var connectable = this.connectable;\n if (connectable) {\n this.connectable = null;\n var connection = connectable._connection;\n connectable._refCount = 0;\n connectable._subject = null;\n connectable._connection = null;\n if (connection) {\n connection.unsubscribe();\n }\n }\n };\n return ConnectableSubscriber;\n}(Subject_1.SubjectSubscriber));\nvar RefCountOperator = (function () {\n function RefCountOperator(connectable) {\n this.connectable = connectable;\n }\n RefCountOperator.prototype.call = function (subscriber, source) {\n var connectable = this.connectable;\n connectable._refCount++;\n var refCounter = new RefCountSubscriber(subscriber, connectable);\n var subscription = source.subscribe(refCounter);\n if (!refCounter.closed) {\n refCounter.connection = connectable.connect();\n }\n return subscription;\n };\n return RefCountOperator;\n}());\nvar RefCountSubscriber = (function (_super) {\n __extends(RefCountSubscriber, _super);\n function RefCountSubscriber(destination, connectable) {\n var _this = _super.call(this, destination) || this;\n _this.connectable = connectable;\n return _this;\n }\n RefCountSubscriber.prototype._unsubscribe = function () {\n var connectable = this.connectable;\n if (!connectable) {\n this.connection = null;\n return;\n }\n this.connectable = null;\n var refCount = connectable._refCount;\n if (refCount <= 0) {\n this.connection = null;\n return;\n }\n connectable._refCount = refCount - 1;\n if (refCount > 1) {\n this.connection = null;\n return;\n }\n var connection = this.connection;\n var sharedConnection = connectable._connection;\n this.connection = null;\n if (sharedConnection && (!connection || sharedConnection === connection)) {\n sharedConnection.unsubscribe();\n }\n };\n return RefCountSubscriber;\n}(Subscriber_1.Subscriber));\n//# sourceMappingURL=ConnectableObservable.js.map",
+ "\"use strict\";\nvar __extends = (this && this.__extends) || (function () {\n var extendStatics = function (d, b) {\n extendStatics = Object.setPrototypeOf ||\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };\n return extendStatics(d, b);\n }\n return function (d, b) {\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n})();\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar Observable_1 = require(\"../Observable\");\nvar asap_1 = require(\"../scheduler/asap\");\nvar isNumeric_1 = require(\"../util/isNumeric\");\nvar SubscribeOnObservable = (function (_super) {\n __extends(SubscribeOnObservable, _super);\n function SubscribeOnObservable(source, delayTime, scheduler) {\n if (delayTime === void 0) { delayTime = 0; }\n if (scheduler === void 0) { scheduler = asap_1.asap; }\n var _this = _super.call(this) || this;\n _this.source = source;\n _this.delayTime = delayTime;\n _this.scheduler = scheduler;\n if (!isNumeric_1.isNumeric(delayTime) || delayTime < 0) {\n _this.delayTime = 0;\n }\n if (!scheduler || typeof scheduler.schedule !== 'function') {\n _this.scheduler = asap_1.asap;\n }\n return _this;\n }\n SubscribeOnObservable.create = function (source, delay, scheduler) {\n if (delay === void 0) { delay = 0; }\n if (scheduler === void 0) { scheduler = asap_1.asap; }\n return new SubscribeOnObservable(source, delay, scheduler);\n };\n SubscribeOnObservable.dispatch = function (arg) {\n var source = arg.source, subscriber = arg.subscriber;\n return this.add(source.subscribe(subscriber));\n };\n SubscribeOnObservable.prototype._subscribe = function (subscriber) {\n var delay = this.delayTime;\n var source = this.source;\n var scheduler = this.scheduler;\n return scheduler.schedule(SubscribeOnObservable.dispatch, delay, {\n source: source, subscriber: subscriber\n });\n };\n return SubscribeOnObservable;\n}(Observable_1.Observable));\nexports.SubscribeOnObservable = SubscribeOnObservable;\n//# sourceMappingURL=SubscribeOnObservable.js.map",
+ "\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar Observable_1 = require(\"../Observable\");\nvar AsyncSubject_1 = require(\"../AsyncSubject\");\nvar map_1 = require(\"../operators/map\");\nvar canReportError_1 = require(\"../util/canReportError\");\nvar isArray_1 = require(\"../util/isArray\");\nvar isScheduler_1 = require(\"../util/isScheduler\");\nfunction bindCallback(callbackFunc, resultSelector, scheduler) {\n if (resultSelector) {\n if (isScheduler_1.isScheduler(resultSelector)) {\n scheduler = resultSelector;\n }\n else {\n return function () {\n var args = [];\n for (var _i = 0; _i < arguments.length; _i++) {\n args[_i] = arguments[_i];\n }\n return bindCallback(callbackFunc, scheduler).apply(void 0, args).pipe(map_1.map(function (args) { return isArray_1.isArray(args) ? resultSelector.apply(void 0, args) : resultSelector(args); }));\n };\n }\n }\n return function () {\n var args = [];\n for (var _i = 0; _i < arguments.length; _i++) {\n args[_i] = arguments[_i];\n }\n var context = this;\n var subject;\n var params = {\n context: context,\n subject: subject,\n callbackFunc: callbackFunc,\n scheduler: scheduler,\n };\n return new Observable_1.Observable(function (subscriber) {\n if (!scheduler) {\n if (!subject) {\n subject = new AsyncSubject_1.AsyncSubject();\n var handler = function () {\n var innerArgs = [];\n for (var _i = 0; _i < arguments.length; _i++) {\n innerArgs[_i] = arguments[_i];\n }\n subject.next(innerArgs.length <= 1 ? innerArgs[0] : innerArgs);\n subject.complete();\n };\n try {\n callbackFunc.apply(context, args.concat([handler]));\n }\n catch (err) {\n if (canReportError_1.canReportError(subject)) {\n subject.error(err);\n }\n else {\n console.warn(err);\n }\n }\n }\n return subject.subscribe(subscriber);\n }\n else {\n var state = {\n args: args, subscriber: subscriber, params: params,\n };\n return scheduler.schedule(dispatch, 0, state);\n }\n });\n };\n}\nexports.bindCallback = bindCallback;\nfunction dispatch(state) {\n var _this = this;\n var self = this;\n var args = state.args, subscriber = state.subscriber, params = state.params;\n var callbackFunc = params.callbackFunc, context = params.context, scheduler = params.scheduler;\n var subject = params.subject;\n if (!subject) {\n subject = params.subject = new AsyncSubject_1.AsyncSubject();\n var handler = function () {\n var innerArgs = [];\n for (var _i = 0; _i < arguments.length; _i++) {\n innerArgs[_i] = arguments[_i];\n }\n var value = innerArgs.length <= 1 ? innerArgs[0] : innerArgs;\n _this.add(scheduler.schedule(dispatchNext, 0, { value: value, subject: subject }));\n };\n try {\n callbackFunc.apply(context, args.concat([handler]));\n }\n catch (err) {\n subject.error(err);\n }\n }\n this.add(subject.subscribe(subscriber));\n}\nfunction dispatchNext(state) {\n var value = state.value, subject = state.subject;\n subject.next(value);\n subject.complete();\n}\nfunction dispatchError(state) {\n var err = state.err, subject = state.subject;\n subject.error(err);\n}\n//# sourceMappingURL=bindCallback.js.map",
+ "\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar Observable_1 = require(\"../Observable\");\nvar AsyncSubject_1 = require(\"../AsyncSubject\");\nvar map_1 = require(\"../operators/map\");\nvar canReportError_1 = require(\"../util/canReportError\");\nvar isScheduler_1 = require(\"../util/isScheduler\");\nvar isArray_1 = require(\"../util/isArray\");\nfunction bindNodeCallback(callbackFunc, resultSelector, scheduler) {\n if (resultSelector) {\n if (isScheduler_1.isScheduler(resultSelector)) {\n scheduler = resultSelector;\n }\n else {\n return function () {\n var args = [];\n for (var _i = 0; _i < arguments.length; _i++) {\n args[_i] = arguments[_i];\n }\n return bindNodeCallback(callbackFunc, scheduler).apply(void 0, args).pipe(map_1.map(function (args) { return isArray_1.isArray(args) ? resultSelector.apply(void 0, args) : resultSelector(args); }));\n };\n }\n }\n return function () {\n var args = [];\n for (var _i = 0; _i < arguments.length; _i++) {\n args[_i] = arguments[_i];\n }\n var params = {\n subject: undefined,\n args: args,\n callbackFunc: callbackFunc,\n scheduler: scheduler,\n context: this,\n };\n return new Observable_1.Observable(function (subscriber) {\n var context = params.context;\n var subject = params.subject;\n if (!scheduler) {\n if (!subject) {\n subject = params.subject = new AsyncSubject_1.AsyncSubject();\n var handler = function () {\n var innerArgs = [];\n for (var _i = 0; _i < arguments.length; _i++) {\n innerArgs[_i] = arguments[_i];\n }\n var err = innerArgs.shift();\n if (err) {\n subject.error(err);\n return;\n }\n subject.next(innerArgs.length <= 1 ? innerArgs[0] : innerArgs);\n subject.complete();\n };\n try {\n callbackFunc.apply(context, args.concat([handler]));\n }\n catch (err) {\n if (canReportError_1.canReportError(subject)) {\n subject.error(err);\n }\n else {\n console.warn(err);\n }\n }\n }\n return subject.subscribe(subscriber);\n }\n else {\n return scheduler.schedule(dispatch, 0, { params: params, subscriber: subscriber, context: context });\n }\n });\n };\n}\nexports.bindNodeCallback = bindNodeCallback;\nfunction dispatch(state) {\n var _this = this;\n var params = state.params, subscriber = state.subscriber, context = state.context;\n var callbackFunc = params.callbackFunc, args = params.args, scheduler = params.scheduler;\n var subject = params.subject;\n if (!subject) {\n subject = params.subject = new AsyncSubject_1.AsyncSubject();\n var handler = function () {\n var innerArgs = [];\n for (var _i = 0; _i < arguments.length; _i++) {\n innerArgs[_i] = arguments[_i];\n }\n var err = innerArgs.shift();\n if (err) {\n _this.add(scheduler.schedule(dispatchError, 0, { err: err, subject: subject }));\n }\n else {\n var value = innerArgs.length <= 1 ? innerArgs[0] : innerArgs;\n _this.add(scheduler.schedule(dispatchNext, 0, { value: value, subject: subject }));\n }\n };\n try {\n callbackFunc.apply(context, args.concat([handler]));\n }\n catch (err) {\n this.add(scheduler.schedule(dispatchError, 0, { err: err, subject: subject }));\n }\n }\n this.add(subject.subscribe(subscriber));\n}\nfunction dispatchNext(arg) {\n var value = arg.value, subject = arg.subject;\n subject.next(value);\n subject.complete();\n}\nfunction dispatchError(arg) {\n var err = arg.err, subject = arg.subject;\n subject.error(err);\n}\n//# sourceMappingURL=bindNodeCallback.js.map",
+ "\"use strict\";\nvar __extends = (this && this.__extends) || (function () {\n var extendStatics = function (d, b) {\n extendStatics = Object.setPrototypeOf ||\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };\n return extendStatics(d, b);\n }\n return function (d, b) {\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n})();\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar isScheduler_1 = require(\"../util/isScheduler\");\nvar isArray_1 = require(\"../util/isArray\");\nvar OuterSubscriber_1 = require(\"../OuterSubscriber\");\nvar subscribeToResult_1 = require(\"../util/subscribeToResult\");\nvar fromArray_1 = require(\"./fromArray\");\nvar NONE = {};\nfunction combineLatest() {\n var observables = [];\n for (var _i = 0; _i < arguments.length; _i++) {\n observables[_i] = arguments[_i];\n }\n var resultSelector = null;\n var scheduler = null;\n if (isScheduler_1.isScheduler(observables[observables.length - 1])) {\n scheduler = observables.pop();\n }\n if (typeof observables[observables.length - 1] === 'function') {\n resultSelector = observables.pop();\n }\n if (observables.length === 1 && isArray_1.isArray(observables[0])) {\n observables = observables[0];\n }\n return fromArray_1.fromArray(observables, scheduler).lift(new CombineLatestOperator(resultSelector));\n}\nexports.combineLatest = combineLatest;\nvar CombineLatestOperator = (function () {\n function CombineLatestOperator(resultSelector) {\n this.resultSelector = resultSelector;\n }\n CombineLatestOperator.prototype.call = function (subscriber, source) {\n return source.subscribe(new CombineLatestSubscriber(subscriber, this.resultSelector));\n };\n return CombineLatestOperator;\n}());\nexports.CombineLatestOperator = CombineLatestOperator;\nvar CombineLatestSubscriber = (function (_super) {\n __extends(CombineLatestSubscriber, _super);\n function CombineLatestSubscriber(destination, resultSelector) {\n var _this = _super.call(this, destination) || this;\n _this.resultSelector = resultSelector;\n _this.active = 0;\n _this.values = [];\n _this.observables = [];\n return _this;\n }\n CombineLatestSubscriber.prototype._next = function (observable) {\n this.values.push(NONE);\n this.observables.push(observable);\n };\n CombineLatestSubscriber.prototype._complete = function () {\n var observables = this.observables;\n var len = observables.length;\n if (len === 0) {\n this.destination.complete();\n }\n else {\n this.active = len;\n this.toRespond = len;\n for (var i = 0; i < len; i++) {\n var observable = observables[i];\n this.add(subscribeToResult_1.subscribeToResult(this, observable, observable, i));\n }\n }\n };\n CombineLatestSubscriber.prototype.notifyComplete = function (unused) {\n if ((this.active -= 1) === 0) {\n this.destination.complete();\n }\n };\n CombineLatestSubscriber.prototype.notifyNext = function (outerValue, innerValue, outerIndex, innerIndex, innerSub) {\n var values = this.values;\n var oldVal = values[outerIndex];\n var toRespond = !this.toRespond\n ? 0\n : oldVal === NONE ? --this.toRespond : this.toRespond;\n values[outerIndex] = innerValue;\n if (toRespond === 0) {\n if (this.resultSelector) {\n this._tryResultSelector(values);\n }\n else {\n this.destination.next(values.slice());\n }\n }\n };\n CombineLatestSubscriber.prototype._tryResultSelector = function (values) {\n var result;\n try {\n result = this.resultSelector.apply(this, values);\n }\n catch (err) {\n this.destination.error(err);\n return;\n }\n this.destination.next(result);\n };\n return CombineLatestSubscriber;\n}(OuterSubscriber_1.OuterSubscriber));\nexports.CombineLatestSubscriber = CombineLatestSubscriber;\n//# sourceMappingURL=combineLatest.js.map",
+ "\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar isScheduler_1 = require(\"../util/isScheduler\");\nvar of_1 = require(\"./of\");\nvar from_1 = require(\"./from\");\nvar concatAll_1 = require(\"../operators/concatAll\");\nfunction concat() {\n var observables = [];\n for (var _i = 0; _i < arguments.length; _i++) {\n observables[_i] = arguments[_i];\n }\n if (observables.length === 1 || (observables.length === 2 && isScheduler_1.isScheduler(observables[1]))) {\n return from_1.from(observables[0]);\n }\n return concatAll_1.concatAll()(of_1.of.apply(void 0, observables));\n}\nexports.concat = concat;\n//# sourceMappingURL=concat.js.map",
+ "\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar Observable_1 = require(\"../Observable\");\nvar from_1 = require(\"./from\");\nvar empty_1 = require(\"./empty\");\nfunction defer(observableFactory) {\n return new Observable_1.Observable(function (subscriber) {\n var input;\n try {\n input = observableFactory();\n }\n catch (err) {\n subscriber.error(err);\n return undefined;\n }\n var source = input ? from_1.from(input) : empty_1.empty();\n return source.subscribe(subscriber);\n });\n}\nexports.defer = defer;\n//# sourceMappingURL=defer.js.map",
+ "\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar Observable_1 = require(\"../Observable\");\nexports.EMPTY = new Observable_1.Observable(function (subscriber) { return subscriber.complete(); });\nfunction empty(scheduler) {\n return scheduler ? emptyScheduled(scheduler) : exports.EMPTY;\n}\nexports.empty = empty;\nfunction emptyScheduled(scheduler) {\n return new Observable_1.Observable(function (subscriber) { return scheduler.schedule(function () { return subscriber.complete(); }); });\n}\nexports.emptyScheduled = emptyScheduled;\n//# sourceMappingURL=empty.js.map",
+ "\"use strict\";\nvar __extends = (this && this.__extends) || (function () {\n var extendStatics = function (d, b) {\n extendStatics = Object.setPrototypeOf ||\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };\n return extendStatics(d, b);\n }\n return function (d, b) {\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n})();\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar Observable_1 = require(\"../Observable\");\nvar isArray_1 = require(\"../util/isArray\");\nvar empty_1 = require(\"./empty\");\nvar subscribeToResult_1 = require(\"../util/subscribeToResult\");\nvar OuterSubscriber_1 = require(\"../OuterSubscriber\");\nvar map_1 = require(\"../operators/map\");\nfunction forkJoin() {\n var sources = [];\n for (var _i = 0; _i < arguments.length; _i++) {\n sources[_i] = arguments[_i];\n }\n var resultSelector;\n if (typeof sources[sources.length - 1] === 'function') {\n resultSelector = sources.pop();\n }\n if (sources.length === 1 && isArray_1.isArray(sources[0])) {\n sources = sources[0];\n }\n if (sources.length === 0) {\n return empty_1.EMPTY;\n }\n if (resultSelector) {\n return forkJoin(sources).pipe(map_1.map(function (args) { return resultSelector.apply(void 0, args); }));\n }\n return new Observable_1.Observable(function (subscriber) {\n return new ForkJoinSubscriber(subscriber, sources);\n });\n}\nexports.forkJoin = forkJoin;\nvar ForkJoinSubscriber = (function (_super) {\n __extends(ForkJoinSubscriber, _super);\n function ForkJoinSubscriber(destination, sources) {\n var _this = _super.call(this, destination) || this;\n _this.sources = sources;\n _this.completed = 0;\n _this.haveValues = 0;\n var len = sources.length;\n _this.values = new Array(len);\n for (var i = 0; i < len; i++) {\n var source = sources[i];\n var innerSubscription = subscribeToResult_1.subscribeToResult(_this, source, null, i);\n if (innerSubscription) {\n _this.add(innerSubscription);\n }\n }\n return _this;\n }\n ForkJoinSubscriber.prototype.notifyNext = function (outerValue, innerValue, outerIndex, innerIndex, innerSub) {\n this.values[outerIndex] = innerValue;\n if (!innerSub._hasValue) {\n innerSub._hasValue = true;\n this.haveValues++;\n }\n };\n ForkJoinSubscriber.prototype.notifyComplete = function (innerSub) {\n var _a = this, destination = _a.destination, haveValues = _a.haveValues, values = _a.values;\n var len = values.length;\n if (!innerSub._hasValue) {\n destination.complete();\n return;\n }\n this.completed++;\n if (this.completed !== len) {\n return;\n }\n if (haveValues === len) {\n destination.next(values);\n }\n destination.complete();\n };\n return ForkJoinSubscriber;\n}(OuterSubscriber_1.OuterSubscriber));\n//# sourceMappingURL=forkJoin.js.map",
+ "\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar Observable_1 = require(\"../Observable\");\nvar isPromise_1 = require(\"../util/isPromise\");\nvar isArrayLike_1 = require(\"../util/isArrayLike\");\nvar isInteropObservable_1 = require(\"../util/isInteropObservable\");\nvar isIterable_1 = require(\"../util/isIterable\");\nvar fromArray_1 = require(\"./fromArray\");\nvar fromPromise_1 = require(\"./fromPromise\");\nvar fromIterable_1 = require(\"./fromIterable\");\nvar fromObservable_1 = require(\"./fromObservable\");\nvar subscribeTo_1 = require(\"../util/subscribeTo\");\nfunction from(input, scheduler) {\n if (!scheduler) {\n if (input instanceof Observable_1.Observable) {\n return input;\n }\n return new Observable_1.Observable(subscribeTo_1.subscribeTo(input));\n }\n if (input != null) {\n if (isInteropObservable_1.isInteropObservable(input)) {\n return fromObservable_1.fromObservable(input, scheduler);\n }\n else if (isPromise_1.isPromise(input)) {\n return fromPromise_1.fromPromise(input, scheduler);\n }\n else if (isArrayLike_1.isArrayLike(input)) {\n return fromArray_1.fromArray(input, scheduler);\n }\n else if (isIterable_1.isIterable(input) || typeof input === 'string') {\n return fromIterable_1.fromIterable(input, scheduler);\n }\n }\n throw new TypeError((input !== null && typeof input || input) + ' is not observable');\n}\nexports.from = from;\n//# sourceMappingURL=from.js.map",
+ "\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar Observable_1 = require(\"../Observable\");\nvar Subscription_1 = require(\"../Subscription\");\nvar subscribeToArray_1 = require(\"../util/subscribeToArray\");\nfunction fromArray(input, scheduler) {\n if (!scheduler) {\n return new Observable_1.Observable(subscribeToArray_1.subscribeToArray(input));\n }\n else {\n return new Observable_1.Observable(function (subscriber) {\n var sub = new Subscription_1.Subscription();\n var i = 0;\n sub.add(scheduler.schedule(function () {\n if (i === input.length) {\n subscriber.complete();\n return;\n }\n subscriber.next(input[i++]);\n if (!subscriber.closed) {\n sub.add(this.schedule());\n }\n }));\n return sub;\n });\n }\n}\nexports.fromArray = fromArray;\n//# sourceMappingURL=fromArray.js.map",
+ "\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar Observable_1 = require(\"../Observable\");\nvar isArray_1 = require(\"../util/isArray\");\nvar isFunction_1 = require(\"../util/isFunction\");\nvar map_1 = require(\"../operators/map\");\nvar toString = Object.prototype.toString;\nfunction fromEvent(target, eventName, options, resultSelector) {\n if (isFunction_1.isFunction(options)) {\n resultSelector = options;\n options = undefined;\n }\n if (resultSelector) {\n return fromEvent(target, eventName, options).pipe(map_1.map(function (args) { return isArray_1.isArray(args) ? resultSelector.apply(void 0, args) : resultSelector(args); }));\n }\n return new Observable_1.Observable(function (subscriber) {\n function handler(e) {\n if (arguments.length > 1) {\n subscriber.next(Array.prototype.slice.call(arguments));\n }\n else {\n subscriber.next(e);\n }\n }\n setupSubscription(target, eventName, handler, subscriber, options);\n });\n}\nexports.fromEvent = fromEvent;\nfunction setupSubscription(sourceObj, eventName, handler, subscriber, options) {\n var unsubscribe;\n if (isEventTarget(sourceObj)) {\n var source_1 = sourceObj;\n sourceObj.addEventListener(eventName, handler, options);\n unsubscribe = function () { return source_1.removeEventListener(eventName, handler, options); };\n }\n else if (isJQueryStyleEventEmitter(sourceObj)) {\n var source_2 = sourceObj;\n sourceObj.on(eventName, handler);\n unsubscribe = function () { return source_2.off(eventName, handler); };\n }\n else if (isNodeStyleEventEmitter(sourceObj)) {\n var source_3 = sourceObj;\n sourceObj.addListener(eventName, handler);\n unsubscribe = function () { return source_3.removeListener(eventName, handler); };\n }\n else if (sourceObj && sourceObj.length) {\n for (var i = 0, len = sourceObj.length; i < len; i++) {\n setupSubscription(sourceObj[i], eventName, handler, subscriber, options);\n }\n }\n else {\n throw new TypeError('Invalid event target');\n }\n subscriber.add(unsubscribe);\n}\nfunction isNodeStyleEventEmitter(sourceObj) {\n return sourceObj && typeof sourceObj.addListener === 'function' && typeof sourceObj.removeListener === 'function';\n}\nfunction isJQueryStyleEventEmitter(sourceObj) {\n return sourceObj && typeof sourceObj.on === 'function' && typeof sourceObj.off === 'function';\n}\nfunction isEventTarget(sourceObj) {\n return sourceObj && typeof sourceObj.addEventListener === 'function' && typeof sourceObj.removeEventListener === 'function';\n}\n//# sourceMappingURL=fromEvent.js.map",
+ "\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar Observable_1 = require(\"../Observable\");\nvar isArray_1 = require(\"../util/isArray\");\nvar isFunction_1 = require(\"../util/isFunction\");\nvar map_1 = require(\"../operators/map\");\nfunction fromEventPattern(addHandler, removeHandler, resultSelector) {\n if (resultSelector) {\n return fromEventPattern(addHandler, removeHandler).pipe(map_1.map(function (args) { return isArray_1.isArray(args) ? resultSelector.apply(void 0, args) : resultSelector(args); }));\n }\n return new Observable_1.Observable(function (subscriber) {\n var handler = function () {\n var e = [];\n for (var _i = 0; _i < arguments.length; _i++) {\n e[_i] = arguments[_i];\n }\n return subscriber.next(e.length === 1 ? e[0] : e);\n };\n var retValue;\n try {\n retValue = addHandler(handler);\n }\n catch (err) {\n subscriber.error(err);\n return undefined;\n }\n if (!isFunction_1.isFunction(removeHandler)) {\n return undefined;\n }\n return function () { return removeHandler(handler, retValue); };\n });\n}\nexports.fromEventPattern = fromEventPattern;\n//# sourceMappingURL=fromEventPattern.js.map",
+ "\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar Observable_1 = require(\"../Observable\");\nvar Subscription_1 = require(\"../Subscription\");\nvar iterator_1 = require(\"../symbol/iterator\");\nvar subscribeToIterable_1 = require(\"../util/subscribeToIterable\");\nfunction fromIterable(input, scheduler) {\n if (!input) {\n throw new Error('Iterable cannot be null');\n }\n if (!scheduler) {\n return new Observable_1.Observable(subscribeToIterable_1.subscribeToIterable(input));\n }\n else {\n return new Observable_1.Observable(function (subscriber) {\n var sub = new Subscription_1.Subscription();\n var iterator;\n sub.add(function () {\n if (iterator && typeof iterator.return === 'function') {\n iterator.return();\n }\n });\n sub.add(scheduler.schedule(function () {\n iterator = input[iterator_1.iterator]();\n sub.add(scheduler.schedule(function () {\n if (subscriber.closed) {\n return;\n }\n var value;\n var done;\n try {\n var result = iterator.next();\n value = result.value;\n done = result.done;\n }\n catch (err) {\n subscriber.error(err);\n return;\n }\n if (done) {\n subscriber.complete();\n }\n else {\n subscriber.next(value);\n this.schedule();\n }\n }));\n }));\n return sub;\n });\n }\n}\nexports.fromIterable = fromIterable;\n//# sourceMappingURL=fromIterable.js.map",
+ "\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar Observable_1 = require(\"../Observable\");\nvar Subscription_1 = require(\"../Subscription\");\nvar observable_1 = require(\"../symbol/observable\");\nvar subscribeToObservable_1 = require(\"../util/subscribeToObservable\");\nfunction fromObservable(input, scheduler) {\n if (!scheduler) {\n return new Observable_1.Observable(subscribeToObservable_1.subscribeToObservable(input));\n }\n else {\n return new Observable_1.Observable(function (subscriber) {\n var sub = new Subscription_1.Subscription();\n sub.add(scheduler.schedule(function () {\n var observable = input[observable_1.observable]();\n sub.add(observable.subscribe({\n next: function (value) { sub.add(scheduler.schedule(function () { return subscriber.next(value); })); },\n error: function (err) { sub.add(scheduler.schedule(function () { return subscriber.error(err); })); },\n complete: function () { sub.add(scheduler.schedule(function () { return subscriber.complete(); })); },\n }));\n }));\n return sub;\n });\n }\n}\nexports.fromObservable = fromObservable;\n//# sourceMappingURL=fromObservable.js.map",
+ "\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar Observable_1 = require(\"../Observable\");\nvar Subscription_1 = require(\"../Subscription\");\nvar subscribeToPromise_1 = require(\"../util/subscribeToPromise\");\nfunction fromPromise(input, scheduler) {\n if (!scheduler) {\n return new Observable_1.Observable(subscribeToPromise_1.subscribeToPromise(input));\n }\n else {\n return new Observable_1.Observable(function (subscriber) {\n var sub = new Subscription_1.Subscription();\n sub.add(scheduler.schedule(function () { return input.then(function (value) {\n sub.add(scheduler.schedule(function () {\n subscriber.next(value);\n sub.add(scheduler.schedule(function () { return subscriber.complete(); }));\n }));\n }, function (err) {\n sub.add(scheduler.schedule(function () { return subscriber.error(err); }));\n }); }));\n return sub;\n });\n }\n}\nexports.fromPromise = fromPromise;\n//# sourceMappingURL=fromPromise.js.map",
+ "\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar Observable_1 = require(\"../Observable\");\nvar identity_1 = require(\"../util/identity\");\nvar isScheduler_1 = require(\"../util/isScheduler\");\nfunction generate(initialStateOrOptions, condition, iterate, resultSelectorOrObservable, scheduler) {\n var resultSelector;\n var initialState;\n if (arguments.length == 1) {\n var options = initialStateOrOptions;\n initialState = options.initialState;\n condition = options.condition;\n iterate = options.iterate;\n resultSelector = options.resultSelector || identity_1.identity;\n scheduler = options.scheduler;\n }\n else if (resultSelectorOrObservable === undefined || isScheduler_1.isScheduler(resultSelectorOrObservable)) {\n initialState = initialStateOrOptions;\n resultSelector = identity_1.identity;\n scheduler = resultSelectorOrObservable;\n }\n else {\n initialState = initialStateOrOptions;\n resultSelector = resultSelectorOrObservable;\n }\n return new Observable_1.Observable(function (subscriber) {\n var state = initialState;\n if (scheduler) {\n return scheduler.schedule(dispatch, 0, {\n subscriber: subscriber,\n iterate: iterate,\n condition: condition,\n resultSelector: resultSelector,\n state: state\n });\n }\n do {\n if (condition) {\n var conditionResult = void 0;\n try {\n conditionResult = condition(state);\n }\n catch (err) {\n subscriber.error(err);\n return undefined;\n }\n if (!conditionResult) {\n subscriber.complete();\n break;\n }\n }\n var value = void 0;\n try {\n value = resultSelector(state);\n }\n catch (err) {\n subscriber.error(err);\n return undefined;\n }\n subscriber.next(value);\n if (subscriber.closed) {\n break;\n }\n try {\n state = iterate(state);\n }\n catch (err) {\n subscriber.error(err);\n return undefined;\n }\n } while (true);\n return undefined;\n });\n}\nexports.generate = generate;\nfunction dispatch(state) {\n var subscriber = state.subscriber, condition = state.condition;\n if (subscriber.closed) {\n return undefined;\n }\n if (state.needIterate) {\n try {\n state.state = state.iterate(state.state);\n }\n catch (err) {\n subscriber.error(err);\n return undefined;\n }\n }\n else {\n state.needIterate = true;\n }\n if (condition) {\n var conditionResult = void 0;\n try {\n conditionResult = condition(state.state);\n }\n catch (err) {\n subscriber.error(err);\n return undefined;\n }\n if (!conditionResult) {\n subscriber.complete();\n return undefined;\n }\n if (subscriber.closed) {\n return undefined;\n }\n }\n var value;\n try {\n value = state.resultSelector(state.state);\n }\n catch (err) {\n subscriber.error(err);\n return undefined;\n }\n if (subscriber.closed) {\n return undefined;\n }\n subscriber.next(value);\n if (subscriber.closed) {\n return undefined;\n }\n return this.schedule(state);\n}\n//# sourceMappingURL=generate.js.map",
+ "\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar defer_1 = require(\"./defer\");\nvar empty_1 = require(\"./empty\");\nfunction iif(condition, trueResult, falseResult) {\n if (trueResult === void 0) { trueResult = empty_1.EMPTY; }\n if (falseResult === void 0) { falseResult = empty_1.EMPTY; }\n return defer_1.defer(function () { return condition() ? trueResult : falseResult; });\n}\nexports.iif = iif;\n//# sourceMappingURL=iif.js.map",
+ "\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar Observable_1 = require(\"../Observable\");\nvar async_1 = require(\"../scheduler/async\");\nvar isNumeric_1 = require(\"../util/isNumeric\");\nfunction interval(period, scheduler) {\n if (period === void 0) { period = 0; }\n if (scheduler === void 0) { scheduler = async_1.async; }\n if (!isNumeric_1.isNumeric(period) || period < 0) {\n period = 0;\n }\n if (!scheduler || typeof scheduler.schedule !== 'function') {\n scheduler = async_1.async;\n }\n return new Observable_1.Observable(function (subscriber) {\n subscriber.add(scheduler.schedule(dispatch, period, { subscriber: subscriber, counter: 0, period: period }));\n return subscriber;\n });\n}\nexports.interval = interval;\nfunction dispatch(state) {\n var subscriber = state.subscriber, counter = state.counter, period = state.period;\n subscriber.next(counter);\n this.schedule({ subscriber: subscriber, counter: counter + 1, period: period }, period);\n}\n//# sourceMappingURL=interval.js.map",
+ "\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar Observable_1 = require(\"../Observable\");\nvar isScheduler_1 = require(\"../util/isScheduler\");\nvar mergeAll_1 = require(\"../operators/mergeAll\");\nvar fromArray_1 = require(\"./fromArray\");\nfunction merge() {\n var observables = [];\n for (var _i = 0; _i < arguments.length; _i++) {\n observables[_i] = arguments[_i];\n }\n var concurrent = Number.POSITIVE_INFINITY;\n var scheduler = null;\n var last = observables[observables.length - 1];\n if (isScheduler_1.isScheduler(last)) {\n scheduler = observables.pop();\n if (observables.length > 1 && typeof observables[observables.length - 1] === 'number') {\n concurrent = observables.pop();\n }\n }\n else if (typeof last === 'number') {\n concurrent = observables.pop();\n }\n if (scheduler === null && observables.length === 1 && observables[0] instanceof Observable_1.Observable) {\n return observables[0];\n }\n return mergeAll_1.mergeAll(concurrent)(fromArray_1.fromArray(observables, scheduler));\n}\nexports.merge = merge;\n//# sourceMappingURL=merge.js.map",
+ "\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar Observable_1 = require(\"../Observable\");\nvar noop_1 = require(\"../util/noop\");\nexports.NEVER = new Observable_1.Observable(noop_1.noop);\nfunction never() {\n return exports.NEVER;\n}\nexports.never = never;\n//# sourceMappingURL=never.js.map",
+ "\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar isScheduler_1 = require(\"../util/isScheduler\");\nvar fromArray_1 = require(\"./fromArray\");\nvar empty_1 = require(\"./empty\");\nvar scalar_1 = require(\"./scalar\");\nfunction of() {\n var args = [];\n for (var _i = 0; _i < arguments.length; _i++) {\n args[_i] = arguments[_i];\n }\n var scheduler = args[args.length - 1];\n if (isScheduler_1.isScheduler(scheduler)) {\n args.pop();\n }\n else {\n scheduler = undefined;\n }\n switch (args.length) {\n case 0:\n return empty_1.empty(scheduler);\n case 1:\n return scheduler ? fromArray_1.fromArray(args, scheduler) : scalar_1.scalar(args[0]);\n default:\n return fromArray_1.fromArray(args, scheduler);\n }\n}\nexports.of = of;\n//# sourceMappingURL=of.js.map",
+ "\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar Observable_1 = require(\"../Observable\");\nvar from_1 = require(\"./from\");\nvar isArray_1 = require(\"../util/isArray\");\nvar empty_1 = require(\"./empty\");\nfunction onErrorResumeNext() {\n var sources = [];\n for (var _i = 0; _i < arguments.length; _i++) {\n sources[_i] = arguments[_i];\n }\n if (sources.length === 0) {\n return empty_1.EMPTY;\n }\n var first = sources[0], remainder = sources.slice(1);\n if (sources.length === 1 && isArray_1.isArray(first)) {\n return onErrorResumeNext.apply(void 0, first);\n }\n return new Observable_1.Observable(function (subscriber) {\n var subNext = function () { return subscriber.add(onErrorResumeNext.apply(void 0, remainder).subscribe(subscriber)); };\n return from_1.from(first).subscribe({\n next: function (value) { subscriber.next(value); },\n error: subNext,\n complete: subNext,\n });\n });\n}\nexports.onErrorResumeNext = onErrorResumeNext;\n//# sourceMappingURL=onErrorResumeNext.js.map",
+ "\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar Observable_1 = require(\"../Observable\");\nvar Subscription_1 = require(\"../Subscription\");\nfunction pairs(obj, scheduler) {\n if (!scheduler) {\n return new Observable_1.Observable(function (subscriber) {\n var keys = Object.keys(obj);\n for (var i = 0; i < keys.length && !subscriber.closed; i++) {\n var key = keys[i];\n if (obj.hasOwnProperty(key)) {\n subscriber.next([key, obj[key]]);\n }\n }\n subscriber.complete();\n });\n }\n else {\n return new Observable_1.Observable(function (subscriber) {\n var keys = Object.keys(obj);\n var subscription = new Subscription_1.Subscription();\n subscription.add(scheduler.schedule(dispatch, 0, { keys: keys, index: 0, subscriber: subscriber, subscription: subscription, obj: obj }));\n return subscription;\n });\n }\n}\nexports.pairs = pairs;\nfunction dispatch(state) {\n var keys = state.keys, index = state.index, subscriber = state.subscriber, subscription = state.subscription, obj = state.obj;\n if (!subscriber.closed) {\n if (index < keys.length) {\n var key = keys[index];\n subscriber.next([key, obj[key]]);\n subscription.add(this.schedule({ keys: keys, index: index + 1, subscriber: subscriber, subscription: subscription, obj: obj }));\n }\n else {\n subscriber.complete();\n }\n }\n}\nexports.dispatch = dispatch;\n//# sourceMappingURL=pairs.js.map",
+ "\"use strict\";\nvar __extends = (this && this.__extends) || (function () {\n var extendStatics = function (d, b) {\n extendStatics = Object.setPrototypeOf ||\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };\n return extendStatics(d, b);\n }\n return function (d, b) {\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n})();\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar isArray_1 = require(\"../util/isArray\");\nvar fromArray_1 = require(\"./fromArray\");\nvar OuterSubscriber_1 = require(\"../OuterSubscriber\");\nvar subscribeToResult_1 = require(\"../util/subscribeToResult\");\nfunction race() {\n var observables = [];\n for (var _i = 0; _i < arguments.length; _i++) {\n observables[_i] = arguments[_i];\n }\n if (observables.length === 1) {\n if (isArray_1.isArray(observables[0])) {\n observables = observables[0];\n }\n else {\n return observables[0];\n }\n }\n return fromArray_1.fromArray(observables, undefined).lift(new RaceOperator());\n}\nexports.race = race;\nvar RaceOperator = (function () {\n function RaceOperator() {\n }\n RaceOperator.prototype.call = function (subscriber, source) {\n return source.subscribe(new RaceSubscriber(subscriber));\n };\n return RaceOperator;\n}());\nexports.RaceOperator = RaceOperator;\nvar RaceSubscriber = (function (_super) {\n __extends(RaceSubscriber, _super);\n function RaceSubscriber(destination) {\n var _this = _super.call(this, destination) || this;\n _this.hasFirst = false;\n _this.observables = [];\n _this.subscriptions = [];\n return _this;\n }\n RaceSubscriber.prototype._next = function (observable) {\n this.observables.push(observable);\n };\n RaceSubscriber.prototype._complete = function () {\n var observables = this.observables;\n var len = observables.length;\n if (len === 0) {\n this.destination.complete();\n }\n else {\n for (var i = 0; i < len && !this.hasFirst; i++) {\n var observable = observables[i];\n var subscription = subscribeToResult_1.subscribeToResult(this, observable, observable, i);\n if (this.subscriptions) {\n this.subscriptions.push(subscription);\n }\n this.add(subscription);\n }\n this.observables = null;\n }\n };\n RaceSubscriber.prototype.notifyNext = function (outerValue, innerValue, outerIndex, innerIndex, innerSub) {\n if (!this.hasFirst) {\n this.hasFirst = true;\n for (var i = 0; i < this.subscriptions.length; i++) {\n if (i !== outerIndex) {\n var subscription = this.subscriptions[i];\n subscription.unsubscribe();\n this.remove(subscription);\n }\n }\n this.subscriptions = null;\n }\n this.destination.next(innerValue);\n };\n return RaceSubscriber;\n}(OuterSubscriber_1.OuterSubscriber));\nexports.RaceSubscriber = RaceSubscriber;\n//# sourceMappingURL=race.js.map",
+ "\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar Observable_1 = require(\"../Observable\");\nfunction range(start, count, scheduler) {\n if (start === void 0) { start = 0; }\n if (count === void 0) { count = 0; }\n return new Observable_1.Observable(function (subscriber) {\n var index = 0;\n var current = start;\n if (scheduler) {\n return scheduler.schedule(dispatch, 0, {\n index: index, count: count, start: start, subscriber: subscriber\n });\n }\n else {\n do {\n if (index++ >= count) {\n subscriber.complete();\n break;\n }\n subscriber.next(current++);\n if (subscriber.closed) {\n break;\n }\n } while (true);\n }\n return undefined;\n });\n}\nexports.range = range;\nfunction dispatch(state) {\n var start = state.start, index = state.index, count = state.count, subscriber = state.subscriber;\n if (index >= count) {\n subscriber.complete();\n return;\n }\n subscriber.next(start);\n if (subscriber.closed) {\n return;\n }\n state.index = index + 1;\n state.start = start + 1;\n this.schedule(state);\n}\nexports.dispatch = dispatch;\n//# sourceMappingURL=range.js.map",
+ "\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar Observable_1 = require(\"../Observable\");\nfunction scalar(value) {\n var result = new Observable_1.Observable(function (subscriber) {\n subscriber.next(value);\n subscriber.complete();\n });\n result._isScalar = true;\n result.value = value;\n return result;\n}\nexports.scalar = scalar;\n//# sourceMappingURL=scalar.js.map",
+ "\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar Observable_1 = require(\"../Observable\");\nfunction throwError(error, scheduler) {\n if (!scheduler) {\n return new Observable_1.Observable(function (subscriber) { return subscriber.error(error); });\n }\n else {\n return new Observable_1.Observable(function (subscriber) { return scheduler.schedule(dispatch, 0, { error: error, subscriber: subscriber }); });\n }\n}\nexports.throwError = throwError;\nfunction dispatch(_a) {\n var error = _a.error, subscriber = _a.subscriber;\n subscriber.error(error);\n}\n//# sourceMappingURL=throwError.js.map",
+ "\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar Observable_1 = require(\"../Observable\");\nvar async_1 = require(\"../scheduler/async\");\nvar isNumeric_1 = require(\"../util/isNumeric\");\nvar isScheduler_1 = require(\"../util/isScheduler\");\nfunction timer(dueTime, periodOrScheduler, scheduler) {\n if (dueTime === void 0) { dueTime = 0; }\n var period = -1;\n if (isNumeric_1.isNumeric(periodOrScheduler)) {\n period = Number(periodOrScheduler) < 1 && 1 || Number(periodOrScheduler);\n }\n else if (isScheduler_1.isScheduler(periodOrScheduler)) {\n scheduler = periodOrScheduler;\n }\n if (!isScheduler_1.isScheduler(scheduler)) {\n scheduler = async_1.async;\n }\n return new Observable_1.Observable(function (subscriber) {\n var due = isNumeric_1.isNumeric(dueTime)\n ? dueTime\n : (+dueTime - scheduler.now());\n return scheduler.schedule(dispatch, due, {\n index: 0, period: period, subscriber: subscriber\n });\n });\n}\nexports.timer = timer;\nfunction dispatch(state) {\n var index = state.index, period = state.period, subscriber = state.subscriber;\n subscriber.next(index);\n if (subscriber.closed) {\n return;\n }\n else if (period === -1) {\n return subscriber.complete();\n }\n state.index = index + 1;\n this.schedule(state, period);\n}\n//# sourceMappingURL=timer.js.map",
+ "\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar Observable_1 = require(\"../Observable\");\nvar from_1 = require(\"./from\");\nvar empty_1 = require(\"./empty\");\nfunction using(resourceFactory, observableFactory) {\n return new Observable_1.Observable(function (subscriber) {\n var resource;\n try {\n resource = resourceFactory();\n }\n catch (err) {\n subscriber.error(err);\n return undefined;\n }\n var result;\n try {\n result = observableFactory(resource);\n }\n catch (err) {\n subscriber.error(err);\n return undefined;\n }\n var source = result ? from_1.from(result) : empty_1.EMPTY;\n var subscription = source.subscribe(subscriber);\n return function () {\n subscription.unsubscribe();\n if (resource) {\n resource.unsubscribe();\n }\n };\n });\n}\nexports.using = using;\n//# sourceMappingURL=using.js.map",
+ "\"use strict\";\nvar __extends = (this && this.__extends) || (function () {\n var extendStatics = function (d, b) {\n extendStatics = Object.setPrototypeOf ||\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };\n return extendStatics(d, b);\n }\n return function (d, b) {\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n})();\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar fromArray_1 = require(\"./fromArray\");\nvar isArray_1 = require(\"../util/isArray\");\nvar Subscriber_1 = require(\"../Subscriber\");\nvar OuterSubscriber_1 = require(\"../OuterSubscriber\");\nvar subscribeToResult_1 = require(\"../util/subscribeToResult\");\nvar iterator_1 = require(\"../../internal/symbol/iterator\");\nfunction zip() {\n var observables = [];\n for (var _i = 0; _i < arguments.length; _i++) {\n observables[_i] = arguments[_i];\n }\n var resultSelector = observables[observables.length - 1];\n if (typeof resultSelector === 'function') {\n observables.pop();\n }\n return fromArray_1.fromArray(observables, undefined).lift(new ZipOperator(resultSelector));\n}\nexports.zip = zip;\nvar ZipOperator = (function () {\n function ZipOperator(resultSelector) {\n this.resultSelector = resultSelector;\n }\n ZipOperator.prototype.call = function (subscriber, source) {\n return source.subscribe(new ZipSubscriber(subscriber, this.resultSelector));\n };\n return ZipOperator;\n}());\nexports.ZipOperator = ZipOperator;\nvar ZipSubscriber = (function (_super) {\n __extends(ZipSubscriber, _super);\n function ZipSubscriber(destination, resultSelector, values) {\n if (values === void 0) { values = Object.create(null); }\n var _this = _super.call(this, destination) || this;\n _this.iterators = [];\n _this.active = 0;\n _this.resultSelector = (typeof resultSelector === 'function') ? resultSelector : null;\n _this.values = values;\n return _this;\n }\n ZipSubscriber.prototype._next = function (value) {\n var iterators = this.iterators;\n if (isArray_1.isArray(value)) {\n iterators.push(new StaticArrayIterator(value));\n }\n else if (typeof value[iterator_1.iterator] === 'function') {\n iterators.push(new StaticIterator(value[iterator_1.iterator]()));\n }\n else {\n iterators.push(new ZipBufferIterator(this.destination, this, value));\n }\n };\n ZipSubscriber.prototype._complete = function () {\n var iterators = this.iterators;\n var len = iterators.length;\n this.unsubscribe();\n if (len === 0) {\n this.destination.complete();\n return;\n }\n this.active = len;\n for (var i = 0; i < len; i++) {\n var iterator = iterators[i];\n if (iterator.stillUnsubscribed) {\n var destination = this.destination;\n destination.add(iterator.subscribe(iterator, i));\n }\n else {\n this.active--;\n }\n }\n };\n ZipSubscriber.prototype.notifyInactive = function () {\n this.active--;\n if (this.active === 0) {\n this.destination.complete();\n }\n };\n ZipSubscriber.prototype.checkIterators = function () {\n var iterators = this.iterators;\n var len = iterators.length;\n var destination = this.destination;\n for (var i = 0; i < len; i++) {\n var iterator = iterators[i];\n if (typeof iterator.hasValue === 'function' && !iterator.hasValue()) {\n return;\n }\n }\n var shouldComplete = false;\n var args = [];\n for (var i = 0; i < len; i++) {\n var iterator = iterators[i];\n var result = iterator.next();\n if (iterator.hasCompleted()) {\n shouldComplete = true;\n }\n if (result.done) {\n destination.complete();\n return;\n }\n args.push(result.value);\n }\n if (this.resultSelector) {\n this._tryresultSelector(args);\n }\n else {\n destination.next(args);\n }\n if (shouldComplete) {\n destination.complete();\n }\n };\n ZipSubscriber.prototype._tryresultSelector = function (args) {\n var result;\n try {\n result = this.resultSelector.apply(this, args);\n }\n catch (err) {\n this.destination.error(err);\n return;\n }\n this.destination.next(result);\n };\n return ZipSubscriber;\n}(Subscriber_1.Subscriber));\nexports.ZipSubscriber = ZipSubscriber;\nvar StaticIterator = (function () {\n function StaticIterator(iterator) {\n this.iterator = iterator;\n this.nextResult = iterator.next();\n }\n StaticIterator.prototype.hasValue = function () {\n return true;\n };\n StaticIterator.prototype.next = function () {\n var result = this.nextResult;\n this.nextResult = this.iterator.next();\n return result;\n };\n StaticIterator.prototype.hasCompleted = function () {\n var nextResult = this.nextResult;\n return nextResult && nextResult.done;\n };\n return StaticIterator;\n}());\nvar StaticArrayIterator = (function () {\n function StaticArrayIterator(array) {\n this.array = array;\n this.index = 0;\n this.length = 0;\n this.length = array.length;\n }\n StaticArrayIterator.prototype[iterator_1.iterator] = function () {\n return this;\n };\n StaticArrayIterator.prototype.next = function (value) {\n var i = this.index++;\n var array = this.array;\n return i < this.length ? { value: array[i], done: false } : { value: null, done: true };\n };\n StaticArrayIterator.prototype.hasValue = function () {\n return this.array.length > this.index;\n };\n StaticArrayIterator.prototype.hasCompleted = function () {\n return this.array.length === this.index;\n };\n return StaticArrayIterator;\n}());\nvar ZipBufferIterator = (function (_super) {\n __extends(ZipBufferIterator, _super);\n function ZipBufferIterator(destination, parent, observable) {\n var _this = _super.call(this, destination) || this;\n _this.parent = parent;\n _this.observable = observable;\n _this.stillUnsubscribed = true;\n _this.buffer = [];\n _this.isComplete = false;\n return _this;\n }\n ZipBufferIterator.prototype[iterator_1.iterator] = function () {\n return this;\n };\n ZipBufferIterator.prototype.next = function () {\n var buffer = this.buffer;\n if (buffer.length === 0 && this.isComplete) {\n return { value: null, done: true };\n }\n else {\n return { value: buffer.shift(), done: false };\n }\n };\n ZipBufferIterator.prototype.hasValue = function () {\n return this.buffer.length > 0;\n };\n ZipBufferIterator.prototype.hasCompleted = function () {\n return this.buffer.length === 0 && this.isComplete;\n };\n ZipBufferIterator.prototype.notifyComplete = function () {\n if (this.buffer.length > 0) {\n this.isComplete = true;\n this.parent.notifyInactive();\n }\n else {\n this.destination.complete();\n }\n };\n ZipBufferIterator.prototype.notifyNext = function (outerValue, innerValue, outerIndex, innerIndex, innerSub) {\n this.buffer.push(innerValue);\n this.parent.checkIterators();\n };\n ZipBufferIterator.prototype.subscribe = function (value, index) {\n return subscribeToResult_1.subscribeToResult(this, this.observable, this, index);\n };\n return ZipBufferIterator;\n}(OuterSubscriber_1.OuterSubscriber));\n//# sourceMappingURL=zip.js.map",
+ "\"use strict\";\nvar __extends = (this && this.__extends) || (function () {\n var extendStatics = function (d, b) {\n extendStatics = Object.setPrototypeOf ||\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };\n return extendStatics(d, b);\n }\n return function (d, b) {\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n})();\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar tryCatch_1 = require(\"../util/tryCatch\");\nvar errorObject_1 = require(\"../util/errorObject\");\nvar OuterSubscriber_1 = require(\"../OuterSubscriber\");\nvar subscribeToResult_1 = require(\"../util/subscribeToResult\");\nfunction audit(durationSelector) {\n return function auditOperatorFunction(source) {\n return source.lift(new AuditOperator(durationSelector));\n };\n}\nexports.audit = audit;\nvar AuditOperator = (function () {\n function AuditOperator(durationSelector) {\n this.durationSelector = durationSelector;\n }\n AuditOperator.prototype.call = function (subscriber, source) {\n return source.subscribe(new AuditSubscriber(subscriber, this.durationSelector));\n };\n return AuditOperator;\n}());\nvar AuditSubscriber = (function (_super) {\n __extends(AuditSubscriber, _super);\n function AuditSubscriber(destination, durationSelector) {\n var _this = _super.call(this, destination) || this;\n _this.durationSelector = durationSelector;\n _this.hasValue = false;\n return _this;\n }\n AuditSubscriber.prototype._next = function (value) {\n this.value = value;\n this.hasValue = true;\n if (!this.throttled) {\n var duration = tryCatch_1.tryCatch(this.durationSelector)(value);\n if (duration === errorObject_1.errorObject) {\n this.destination.error(errorObject_1.errorObject.e);\n }\n else {\n var innerSubscription = subscribeToResult_1.subscribeToResult(this, duration);\n if (!innerSubscription || innerSubscription.closed) {\n this.clearThrottle();\n }\n else {\n this.add(this.throttled = innerSubscription);\n }\n }\n }\n };\n AuditSubscriber.prototype.clearThrottle = function () {\n var _a = this, value = _a.value, hasValue = _a.hasValue, throttled = _a.throttled;\n if (throttled) {\n this.remove(throttled);\n this.throttled = null;\n throttled.unsubscribe();\n }\n if (hasValue) {\n this.value = null;\n this.hasValue = false;\n this.destination.next(value);\n }\n };\n AuditSubscriber.prototype.notifyNext = function (outerValue, innerValue, outerIndex, innerIndex) {\n this.clearThrottle();\n };\n AuditSubscriber.prototype.notifyComplete = function () {\n this.clearThrottle();\n };\n return AuditSubscriber;\n}(OuterSubscriber_1.OuterSubscriber));\n//# sourceMappingURL=audit.js.map",
+ "\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar async_1 = require(\"../scheduler/async\");\nvar audit_1 = require(\"./audit\");\nvar timer_1 = require(\"../observable/timer\");\nfunction auditTime(duration, scheduler) {\n if (scheduler === void 0) { scheduler = async_1.async; }\n return audit_1.audit(function () { return timer_1.timer(duration, scheduler); });\n}\nexports.auditTime = auditTime;\n//# sourceMappingURL=auditTime.js.map",
+ "\"use strict\";\nvar __extends = (this && this.__extends) || (function () {\n var extendStatics = function (d, b) {\n extendStatics = Object.setPrototypeOf ||\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };\n return extendStatics(d, b);\n }\n return function (d, b) {\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n})();\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar OuterSubscriber_1 = require(\"../OuterSubscriber\");\nvar subscribeToResult_1 = require(\"../util/subscribeToResult\");\nfunction buffer(closingNotifier) {\n return function bufferOperatorFunction(source) {\n return source.lift(new BufferOperator(closingNotifier));\n };\n}\nexports.buffer = buffer;\nvar BufferOperator = (function () {\n function BufferOperator(closingNotifier) {\n this.closingNotifier = closingNotifier;\n }\n BufferOperator.prototype.call = function (subscriber, source) {\n return source.subscribe(new BufferSubscriber(subscriber, this.closingNotifier));\n };\n return BufferOperator;\n}());\nvar BufferSubscriber = (function (_super) {\n __extends(BufferSubscriber, _super);\n function BufferSubscriber(destination, closingNotifier) {\n var _this = _super.call(this, destination) || this;\n _this.buffer = [];\n _this.add(subscribeToResult_1.subscribeToResult(_this, closingNotifier));\n return _this;\n }\n BufferSubscriber.prototype._next = function (value) {\n this.buffer.push(value);\n };\n BufferSubscriber.prototype.notifyNext = function (outerValue, innerValue, outerIndex, innerIndex, innerSub) {\n var buffer = this.buffer;\n this.buffer = [];\n this.destination.next(buffer);\n };\n return BufferSubscriber;\n}(OuterSubscriber_1.OuterSubscriber));\n//# sourceMappingURL=buffer.js.map",
+ "\"use strict\";\nvar __extends = (this && this.__extends) || (function () {\n var extendStatics = function (d, b) {\n extendStatics = Object.setPrototypeOf ||\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };\n return extendStatics(d, b);\n }\n return function (d, b) {\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n})();\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar Subscriber_1 = require(\"../Subscriber\");\nfunction bufferCount(bufferSize, startBufferEvery) {\n if (startBufferEvery === void 0) { startBufferEvery = null; }\n return function bufferCountOperatorFunction(source) {\n return source.lift(new BufferCountOperator(bufferSize, startBufferEvery));\n };\n}\nexports.bufferCount = bufferCount;\nvar BufferCountOperator = (function () {\n function BufferCountOperator(bufferSize, startBufferEvery) {\n this.bufferSize = bufferSize;\n this.startBufferEvery = startBufferEvery;\n if (!startBufferEvery || bufferSize === startBufferEvery) {\n this.subscriberClass = BufferCountSubscriber;\n }\n else {\n this.subscriberClass = BufferSkipCountSubscriber;\n }\n }\n BufferCountOperator.prototype.call = function (subscriber, source) {\n return source.subscribe(new this.subscriberClass(subscriber, this.bufferSize, this.startBufferEvery));\n };\n return BufferCountOperator;\n}());\nvar BufferCountSubscriber = (function (_super) {\n __extends(BufferCountSubscriber, _super);\n function BufferCountSubscriber(destination, bufferSize) {\n var _this = _super.call(this, destination) || this;\n _this.bufferSize = bufferSize;\n _this.buffer = [];\n return _this;\n }\n BufferCountSubscriber.prototype._next = function (value) {\n var buffer = this.buffer;\n buffer.push(value);\n if (buffer.length == this.bufferSize) {\n this.destination.next(buffer);\n this.buffer = [];\n }\n };\n BufferCountSubscriber.prototype._complete = function () {\n var buffer = this.buffer;\n if (buffer.length > 0) {\n this.destination.next(buffer);\n }\n _super.prototype._complete.call(this);\n };\n return BufferCountSubscriber;\n}(Subscriber_1.Subscriber));\nvar BufferSkipCountSubscriber = (function (_super) {\n __extends(BufferSkipCountSubscriber, _super);\n function BufferSkipCountSubscriber(destination, bufferSize, startBufferEvery) {\n var _this = _super.call(this, destination) || this;\n _this.bufferSize = bufferSize;\n _this.startBufferEvery = startBufferEvery;\n _this.buffers = [];\n _this.count = 0;\n return _this;\n }\n BufferSkipCountSubscriber.prototype._next = function (value) {\n var _a = this, bufferSize = _a.bufferSize, startBufferEvery = _a.startBufferEvery, buffers = _a.buffers, count = _a.count;\n this.count++;\n if (count % startBufferEvery === 0) {\n buffers.push([]);\n }\n for (var i = buffers.length; i--;) {\n var 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 BufferSkipCountSubscriber.prototype._complete = function () {\n var _a = this, buffers = _a.buffers, destination = _a.destination;\n while (buffers.length > 0) {\n var buffer = buffers.shift();\n if (buffer.length > 0) {\n destination.next(buffer);\n }\n }\n _super.prototype._complete.call(this);\n };\n return BufferSkipCountSubscriber;\n}(Subscriber_1.Subscriber));\n//# sourceMappingURL=bufferCount.js.map",
+ "\"use strict\";\nvar __extends = (this && this.__extends) || (function () {\n var extendStatics = function (d, b) {\n extendStatics = Object.setPrototypeOf ||\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };\n return extendStatics(d, b);\n }\n return function (d, b) {\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n})();\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar async_1 = require(\"../scheduler/async\");\nvar Subscriber_1 = require(\"../Subscriber\");\nvar isScheduler_1 = require(\"../util/isScheduler\");\nfunction bufferTime(bufferTimeSpan) {\n var length = arguments.length;\n var scheduler = async_1.async;\n if (isScheduler_1.isScheduler(arguments[arguments.length - 1])) {\n scheduler = arguments[arguments.length - 1];\n length--;\n }\n var bufferCreationInterval = null;\n if (length >= 2) {\n bufferCreationInterval = arguments[1];\n }\n var maxBufferSize = Number.POSITIVE_INFINITY;\n if (length >= 3) {\n maxBufferSize = arguments[2];\n }\n return function bufferTimeOperatorFunction(source) {\n return source.lift(new BufferTimeOperator(bufferTimeSpan, bufferCreationInterval, maxBufferSize, scheduler));\n };\n}\nexports.bufferTime = bufferTime;\nvar BufferTimeOperator = (function () {\n function BufferTimeOperator(bufferTimeSpan, bufferCreationInterval, maxBufferSize, scheduler) {\n this.bufferTimeSpan = bufferTimeSpan;\n this.bufferCreationInterval = bufferCreationInterval;\n this.maxBufferSize = maxBufferSize;\n this.scheduler = scheduler;\n }\n BufferTimeOperator.prototype.call = function (subscriber, source) {\n return source.subscribe(new BufferTimeSubscriber(subscriber, this.bufferTimeSpan, this.bufferCreationInterval, this.maxBufferSize, this.scheduler));\n };\n return BufferTimeOperator;\n}());\nvar Context = (function () {\n function Context() {\n this.buffer = [];\n }\n return Context;\n}());\nvar BufferTimeSubscriber = (function (_super) {\n __extends(BufferTimeSubscriber, _super);\n function BufferTimeSubscriber(destination, bufferTimeSpan, bufferCreationInterval, maxBufferSize, scheduler) {\n var _this = _super.call(this, destination) || this;\n _this.bufferTimeSpan = bufferTimeSpan;\n _this.bufferCreationInterval = bufferCreationInterval;\n _this.maxBufferSize = maxBufferSize;\n _this.scheduler = scheduler;\n _this.contexts = [];\n var context = _this.openContext();\n _this.timespanOnly = bufferCreationInterval == null || bufferCreationInterval < 0;\n if (_this.timespanOnly) {\n var timeSpanOnlyState = { subscriber: _this, context: context, bufferTimeSpan: bufferTimeSpan };\n _this.add(context.closeAction = scheduler.schedule(dispatchBufferTimeSpanOnly, bufferTimeSpan, timeSpanOnlyState));\n }\n else {\n var closeState = { subscriber: _this, context: context };\n var creationState = { bufferTimeSpan: bufferTimeSpan, bufferCreationInterval: bufferCreationInterval, subscriber: _this, scheduler: scheduler };\n _this.add(context.closeAction = scheduler.schedule(dispatchBufferClose, bufferTimeSpan, closeState));\n _this.add(scheduler.schedule(dispatchBufferCreation, bufferCreationInterval, creationState));\n }\n return _this;\n }\n BufferTimeSubscriber.prototype._next = function (value) {\n var contexts = this.contexts;\n var len = contexts.length;\n var filledBufferContext;\n for (var i = 0; i < len; i++) {\n var context_1 = contexts[i];\n var buffer = context_1.buffer;\n buffer.push(value);\n if (buffer.length == this.maxBufferSize) {\n filledBufferContext = context_1;\n }\n }\n if (filledBufferContext) {\n this.onBufferFull(filledBufferContext);\n }\n };\n BufferTimeSubscriber.prototype._error = function (err) {\n this.contexts.length = 0;\n _super.prototype._error.call(this, err);\n };\n BufferTimeSubscriber.prototype._complete = function () {\n var _a = this, contexts = _a.contexts, destination = _a.destination;\n while (contexts.length > 0) {\n var context_2 = contexts.shift();\n destination.next(context_2.buffer);\n }\n _super.prototype._complete.call(this);\n };\n BufferTimeSubscriber.prototype._unsubscribe = function () {\n this.contexts = null;\n };\n BufferTimeSubscriber.prototype.onBufferFull = function (context) {\n this.closeContext(context);\n var closeAction = context.closeAction;\n closeAction.unsubscribe();\n this.remove(closeAction);\n if (!this.closed && this.timespanOnly) {\n context = this.openContext();\n var bufferTimeSpan = this.bufferTimeSpan;\n var timeSpanOnlyState = { subscriber: this, context: context, bufferTimeSpan: bufferTimeSpan };\n this.add(context.closeAction = this.scheduler.schedule(dispatchBufferTimeSpanOnly, bufferTimeSpan, timeSpanOnlyState));\n }\n };\n BufferTimeSubscriber.prototype.openContext = function () {\n var context = new Context();\n this.contexts.push(context);\n return context;\n };\n BufferTimeSubscriber.prototype.closeContext = function (context) {\n this.destination.next(context.buffer);\n var contexts = this.contexts;\n var spliceIndex = contexts ? contexts.indexOf(context) : -1;\n if (spliceIndex >= 0) {\n contexts.splice(contexts.indexOf(context), 1);\n }\n };\n return BufferTimeSubscriber;\n}(Subscriber_1.Subscriber));\nfunction dispatchBufferTimeSpanOnly(state) {\n var subscriber = state.subscriber;\n var prevContext = state.context;\n if (prevContext) {\n subscriber.closeContext(prevContext);\n }\n if (!subscriber.closed) {\n state.context = subscriber.openContext();\n state.context.closeAction = this.schedule(state, state.bufferTimeSpan);\n }\n}\nfunction dispatchBufferCreation(state) {\n var bufferCreationInterval = state.bufferCreationInterval, bufferTimeSpan = state.bufferTimeSpan, subscriber = state.subscriber, scheduler = state.scheduler;\n var context = subscriber.openContext();\n var action = this;\n if (!subscriber.closed) {\n subscriber.add(context.closeAction = scheduler.schedule(dispatchBufferClose, bufferTimeSpan, { subscriber: subscriber, context: context }));\n action.schedule(state, bufferCreationInterval);\n }\n}\nfunction dispatchBufferClose(arg) {\n var subscriber = arg.subscriber, context = arg.context;\n subscriber.closeContext(context);\n}\n//# sourceMappingURL=bufferTime.js.map",
+ "\"use strict\";\nvar __extends = (this && this.__extends) || (function () {\n var extendStatics = function (d, b) {\n extendStatics = Object.setPrototypeOf ||\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };\n return extendStatics(d, b);\n }\n return function (d, b) {\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n})();\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar Subscription_1 = require(\"../Subscription\");\nvar subscribeToResult_1 = require(\"../util/subscribeToResult\");\nvar OuterSubscriber_1 = require(\"../OuterSubscriber\");\nfunction bufferToggle(openings, closingSelector) {\n return function bufferToggleOperatorFunction(source) {\n return source.lift(new BufferToggleOperator(openings, closingSelector));\n };\n}\nexports.bufferToggle = bufferToggle;\nvar BufferToggleOperator = (function () {\n function BufferToggleOperator(openings, closingSelector) {\n this.openings = openings;\n this.closingSelector = closingSelector;\n }\n BufferToggleOperator.prototype.call = function (subscriber, source) {\n return source.subscribe(new BufferToggleSubscriber(subscriber, this.openings, this.closingSelector));\n };\n return BufferToggleOperator;\n}());\nvar BufferToggleSubscriber = (function (_super) {\n __extends(BufferToggleSubscriber, _super);\n function BufferToggleSubscriber(destination, openings, closingSelector) {\n var _this = _super.call(this, destination) || this;\n _this.openings = openings;\n _this.closingSelector = closingSelector;\n _this.contexts = [];\n _this.add(subscribeToResult_1.subscribeToResult(_this, openings));\n return _this;\n }\n BufferToggleSubscriber.prototype._next = function (value) {\n var contexts = this.contexts;\n var len = contexts.length;\n for (var i = 0; i < len; i++) {\n contexts[i].buffer.push(value);\n }\n };\n BufferToggleSubscriber.prototype._error = function (err) {\n var contexts = this.contexts;\n while (contexts.length > 0) {\n var context_1 = contexts.shift();\n context_1.subscription.unsubscribe();\n context_1.buffer = null;\n context_1.subscription = null;\n }\n this.contexts = null;\n _super.prototype._error.call(this, err);\n };\n BufferToggleSubscriber.prototype._complete = function () {\n var contexts = this.contexts;\n while (contexts.length > 0) {\n var context_2 = contexts.shift();\n this.destination.next(context_2.buffer);\n context_2.subscription.unsubscribe();\n context_2.buffer = null;\n context_2.subscription = null;\n }\n this.contexts = null;\n _super.prototype._complete.call(this);\n };\n BufferToggleSubscriber.prototype.notifyNext = function (outerValue, innerValue, outerIndex, innerIndex, innerSub) {\n outerValue ? this.closeBuffer(outerValue) : this.openBuffer(innerValue);\n };\n BufferToggleSubscriber.prototype.notifyComplete = function (innerSub) {\n this.closeBuffer(innerSub.context);\n };\n BufferToggleSubscriber.prototype.openBuffer = function (value) {\n try {\n var closingSelector = this.closingSelector;\n var closingNotifier = closingSelector.call(this, value);\n if (closingNotifier) {\n this.trySubscribe(closingNotifier);\n }\n }\n catch (err) {\n this._error(err);\n }\n };\n BufferToggleSubscriber.prototype.closeBuffer = function (context) {\n var contexts = this.contexts;\n if (contexts && context) {\n var buffer = context.buffer, subscription = context.subscription;\n this.destination.next(buffer);\n contexts.splice(contexts.indexOf(context), 1);\n this.remove(subscription);\n subscription.unsubscribe();\n }\n };\n BufferToggleSubscriber.prototype.trySubscribe = function (closingNotifier) {\n var contexts = this.contexts;\n var buffer = [];\n var subscription = new Subscription_1.Subscription();\n var context = { buffer: buffer, subscription: subscription };\n contexts.push(context);\n var innerSubscription = subscribeToResult_1.subscribeToResult(this, closingNotifier, context);\n if (!innerSubscription || innerSubscription.closed) {\n this.closeBuffer(context);\n }\n else {\n innerSubscription.context = context;\n this.add(innerSubscription);\n subscription.add(innerSubscription);\n }\n };\n return BufferToggleSubscriber;\n}(OuterSubscriber_1.OuterSubscriber));\n//# sourceMappingURL=bufferToggle.js.map",
+ "\"use strict\";\nvar __extends = (this && this.__extends) || (function () {\n var extendStatics = function (d, b) {\n extendStatics = Object.setPrototypeOf ||\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };\n return extendStatics(d, b);\n }\n return function (d, b) {\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n})();\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar Subscription_1 = require(\"../Subscription\");\nvar tryCatch_1 = require(\"../util/tryCatch\");\nvar errorObject_1 = require(\"../util/errorObject\");\nvar OuterSubscriber_1 = require(\"../OuterSubscriber\");\nvar subscribeToResult_1 = require(\"../util/subscribeToResult\");\nfunction bufferWhen(closingSelector) {\n return function (source) {\n return source.lift(new BufferWhenOperator(closingSelector));\n };\n}\nexports.bufferWhen = bufferWhen;\nvar BufferWhenOperator = (function () {\n function BufferWhenOperator(closingSelector) {\n this.closingSelector = closingSelector;\n }\n BufferWhenOperator.prototype.call = function (subscriber, source) {\n return source.subscribe(new BufferWhenSubscriber(subscriber, this.closingSelector));\n };\n return BufferWhenOperator;\n}());\nvar BufferWhenSubscriber = (function (_super) {\n __extends(BufferWhenSubscriber, _super);\n function BufferWhenSubscriber(destination, closingSelector) {\n var _this = _super.call(this, destination) || this;\n _this.closingSelector = closingSelector;\n _this.subscribing = false;\n _this.openBuffer();\n return _this;\n }\n BufferWhenSubscriber.prototype._next = function (value) {\n this.buffer.push(value);\n };\n BufferWhenSubscriber.prototype._complete = function () {\n var buffer = this.buffer;\n if (buffer) {\n this.destination.next(buffer);\n }\n _super.prototype._complete.call(this);\n };\n BufferWhenSubscriber.prototype._unsubscribe = function () {\n this.buffer = null;\n this.subscribing = false;\n };\n BufferWhenSubscriber.prototype.notifyNext = function (outerValue, innerValue, outerIndex, innerIndex, innerSub) {\n this.openBuffer();\n };\n BufferWhenSubscriber.prototype.notifyComplete = function () {\n if (this.subscribing) {\n this.complete();\n }\n else {\n this.openBuffer();\n }\n };\n BufferWhenSubscriber.prototype.openBuffer = function () {\n var closingSubscription = this.closingSubscription;\n if (closingSubscription) {\n this.remove(closingSubscription);\n closingSubscription.unsubscribe();\n }\n var buffer = this.buffer;\n if (this.buffer) {\n this.destination.next(buffer);\n }\n this.buffer = [];\n var closingNotifier = tryCatch_1.tryCatch(this.closingSelector)();\n if (closingNotifier === errorObject_1.errorObject) {\n this.error(errorObject_1.errorObject.e);\n }\n else {\n closingSubscription = new Subscription_1.Subscription();\n this.closingSubscription = closingSubscription;\n this.add(closingSubscription);\n this.subscribing = true;\n closingSubscription.add(subscribeToResult_1.subscribeToResult(this, closingNotifier));\n this.subscribing = false;\n }\n };\n return BufferWhenSubscriber;\n}(OuterSubscriber_1.OuterSubscriber));\n//# sourceMappingURL=bufferWhen.js.map",
+ "\"use strict\";\nvar __extends = (this && this.__extends) || (function () {\n var extendStatics = function (d, b) {\n extendStatics = Object.setPrototypeOf ||\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };\n return extendStatics(d, b);\n }\n return function (d, b) {\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n})();\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar OuterSubscriber_1 = require(\"../OuterSubscriber\");\nvar InnerSubscriber_1 = require(\"../InnerSubscriber\");\nvar subscribeToResult_1 = require(\"../util/subscribeToResult\");\nfunction catchError(selector) {\n return function catchErrorOperatorFunction(source) {\n var operator = new CatchOperator(selector);\n var caught = source.lift(operator);\n return (operator.caught = caught);\n };\n}\nexports.catchError = catchError;\nvar CatchOperator = (function () {\n function CatchOperator(selector) {\n this.selector = selector;\n }\n CatchOperator.prototype.call = function (subscriber, source) {\n return source.subscribe(new CatchSubscriber(subscriber, this.selector, this.caught));\n };\n return CatchOperator;\n}());\nvar CatchSubscriber = (function (_super) {\n __extends(CatchSubscriber, _super);\n function CatchSubscriber(destination, selector, caught) {\n var _this = _super.call(this, destination) || this;\n _this.selector = selector;\n _this.caught = caught;\n return _this;\n }\n CatchSubscriber.prototype.error = function (err) {\n if (!this.isStopped) {\n var result = void 0;\n try {\n result = this.selector(err, this.caught);\n }\n catch (err2) {\n _super.prototype.error.call(this, err2);\n return;\n }\n this._unsubscribeAndRecycle();\n var innerSubscriber = new InnerSubscriber_1.InnerSubscriber(this, undefined, undefined);\n this.add(innerSubscriber);\n subscribeToResult_1.subscribeToResult(this, result, undefined, undefined, innerSubscriber);\n }\n };\n return CatchSubscriber;\n}(OuterSubscriber_1.OuterSubscriber));\n//# sourceMappingURL=catchError.js.map",
+ "\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar combineLatest_1 = require(\"../observable/combineLatest\");\nfunction combineAll(project) {\n return function (source) { return source.lift(new combineLatest_1.CombineLatestOperator(project)); };\n}\nexports.combineAll = combineAll;\n//# sourceMappingURL=combineAll.js.map",
+ "\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar isArray_1 = require(\"../util/isArray\");\nvar combineLatest_1 = require(\"../observable/combineLatest\");\nvar from_1 = require(\"../observable/from\");\nvar none = {};\nfunction combineLatest() {\n var observables = [];\n for (var _i = 0; _i < arguments.length; _i++) {\n observables[_i] = arguments[_i];\n }\n var project = null;\n if (typeof observables[observables.length - 1] === 'function') {\n project = observables.pop();\n }\n if (observables.length === 1 && isArray_1.isArray(observables[0])) {\n observables = observables[0].slice();\n }\n return function (source) { return source.lift.call(from_1.from([source].concat(observables)), new combineLatest_1.CombineLatestOperator(project)); };\n}\nexports.combineLatest = combineLatest;\n//# sourceMappingURL=combineLatest.js.map",
+ "\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar concat_1 = require(\"../observable/concat\");\nfunction concat() {\n var observables = [];\n for (var _i = 0; _i < arguments.length; _i++) {\n observables[_i] = arguments[_i];\n }\n return function (source) { return source.lift.call(concat_1.concat.apply(void 0, [source].concat(observables))); };\n}\nexports.concat = concat;\n//# sourceMappingURL=concat.js.map",
+ "\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar mergeAll_1 = require(\"./mergeAll\");\nfunction concatAll() {\n return mergeAll_1.mergeAll(1);\n}\nexports.concatAll = concatAll;\n//# sourceMappingURL=concatAll.js.map",
+ "\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar mergeMap_1 = require(\"./mergeMap\");\nfunction concatMap(project, resultSelector) {\n return mergeMap_1.mergeMap(project, resultSelector, 1);\n}\nexports.concatMap = concatMap;\n//# sourceMappingURL=concatMap.js.map",
+ "\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar concatMap_1 = require(\"./concatMap\");\nfunction concatMapTo(innerObservable, resultSelector) {\n return concatMap_1.concatMap(function () { return innerObservable; }, resultSelector);\n}\nexports.concatMapTo = concatMapTo;\n//# sourceMappingURL=concatMapTo.js.map",
+ "\"use strict\";\nvar __extends = (this && this.__extends) || (function () {\n var extendStatics = function (d, b) {\n extendStatics = Object.setPrototypeOf ||\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };\n return extendStatics(d, b);\n }\n return function (d, b) {\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n})();\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar Subscriber_1 = require(\"../Subscriber\");\nfunction count(predicate) {\n return function (source) { return source.lift(new CountOperator(predicate, source)); };\n}\nexports.count = count;\nvar CountOperator = (function () {\n function CountOperator(predicate, source) {\n this.predicate = predicate;\n this.source = source;\n }\n CountOperator.prototype.call = function (subscriber, source) {\n return source.subscribe(new CountSubscriber(subscriber, this.predicate, this.source));\n };\n return CountOperator;\n}());\nvar CountSubscriber = (function (_super) {\n __extends(CountSubscriber, _super);\n function CountSubscriber(destination, predicate, source) {\n var _this = _super.call(this, destination) || this;\n _this.predicate = predicate;\n _this.source = source;\n _this.count = 0;\n _this.index = 0;\n return _this;\n }\n CountSubscriber.prototype._next = function (value) {\n if (this.predicate) {\n this._tryPredicate(value);\n }\n else {\n this.count++;\n }\n };\n CountSubscriber.prototype._tryPredicate = function (value) {\n var result;\n try {\n result = this.predicate(value, this.index++, this.source);\n }\n catch (err) {\n this.destination.error(err);\n return;\n }\n if (result) {\n this.count++;\n }\n };\n CountSubscriber.prototype._complete = function () {\n this.destination.next(this.count);\n this.destination.complete();\n };\n return CountSubscriber;\n}(Subscriber_1.Subscriber));\n//# sourceMappingURL=count.js.map",
+ "\"use strict\";\nvar __extends = (this && this.__extends) || (function () {\n var extendStatics = function (d, b) {\n extendStatics = Object.setPrototypeOf ||\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };\n return extendStatics(d, b);\n }\n return function (d, b) {\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n})();\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar OuterSubscriber_1 = require(\"../OuterSubscriber\");\nvar subscribeToResult_1 = require(\"../util/subscribeToResult\");\nfunction debounce(durationSelector) {\n return function (source) { return source.lift(new DebounceOperator(durationSelector)); };\n}\nexports.debounce = debounce;\nvar DebounceOperator = (function () {\n function DebounceOperator(durationSelector) {\n this.durationSelector = durationSelector;\n }\n DebounceOperator.prototype.call = function (subscriber, source) {\n return source.subscribe(new DebounceSubscriber(subscriber, this.durationSelector));\n };\n return DebounceOperator;\n}());\nvar DebounceSubscriber = (function (_super) {\n __extends(DebounceSubscriber, _super);\n function DebounceSubscriber(destination, durationSelector) {\n var _this = _super.call(this, destination) || this;\n _this.durationSelector = durationSelector;\n _this.hasValue = false;\n _this.durationSubscription = null;\n return _this;\n }\n DebounceSubscriber.prototype._next = function (value) {\n try {\n var result = this.durationSelector.call(this, value);\n if (result) {\n this._tryNext(value, result);\n }\n }\n catch (err) {\n this.destination.error(err);\n }\n };\n DebounceSubscriber.prototype._complete = function () {\n this.emitValue();\n this.destination.complete();\n };\n DebounceSubscriber.prototype._tryNext = function (value, duration) {\n var subscription = this.durationSubscription;\n this.value = value;\n this.hasValue = true;\n if (subscription) {\n subscription.unsubscribe();\n this.remove(subscription);\n }\n subscription = subscribeToResult_1.subscribeToResult(this, duration);\n if (subscription && !subscription.closed) {\n this.add(this.durationSubscription = subscription);\n }\n };\n DebounceSubscriber.prototype.notifyNext = function (outerValue, innerValue, outerIndex, innerIndex, innerSub) {\n this.emitValue();\n };\n DebounceSubscriber.prototype.notifyComplete = function () {\n this.emitValue();\n };\n DebounceSubscriber.prototype.emitValue = function () {\n if (this.hasValue) {\n var value = this.value;\n var subscription = this.durationSubscription;\n if (subscription) {\n this.durationSubscription = null;\n subscription.unsubscribe();\n this.remove(subscription);\n }\n this.value = null;\n this.hasValue = false;\n _super.prototype._next.call(this, value);\n }\n };\n return DebounceSubscriber;\n}(OuterSubscriber_1.OuterSubscriber));\n//# sourceMappingURL=debounce.js.map",
+ "\"use strict\";\nvar __extends = (this && this.__extends) || (function () {\n var extendStatics = function (d, b) {\n extendStatics = Object.setPrototypeOf ||\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };\n return extendStatics(d, b);\n }\n return function (d, b) {\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n})();\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar Subscriber_1 = require(\"../Subscriber\");\nvar async_1 = require(\"../scheduler/async\");\nfunction debounceTime(dueTime, scheduler) {\n if (scheduler === void 0) { scheduler = async_1.async; }\n return function (source) { return source.lift(new DebounceTimeOperator(dueTime, scheduler)); };\n}\nexports.debounceTime = debounceTime;\nvar DebounceTimeOperator = (function () {\n function DebounceTimeOperator(dueTime, scheduler) {\n this.dueTime = dueTime;\n this.scheduler = scheduler;\n }\n DebounceTimeOperator.prototype.call = function (subscriber, source) {\n return source.subscribe(new DebounceTimeSubscriber(subscriber, this.dueTime, this.scheduler));\n };\n return DebounceTimeOperator;\n}());\nvar DebounceTimeSubscriber = (function (_super) {\n __extends(DebounceTimeSubscriber, _super);\n function DebounceTimeSubscriber(destination, dueTime, scheduler) {\n var _this = _super.call(this, destination) || this;\n _this.dueTime = dueTime;\n _this.scheduler = scheduler;\n _this.debouncedSubscription = null;\n _this.lastValue = null;\n _this.hasValue = false;\n return _this;\n }\n DebounceTimeSubscriber.prototype._next = function (value) {\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 DebounceTimeSubscriber.prototype._complete = function () {\n this.debouncedNext();\n this.destination.complete();\n };\n DebounceTimeSubscriber.prototype.debouncedNext = function () {\n this.clearDebounce();\n if (this.hasValue) {\n var lastValue = this.lastValue;\n this.lastValue = null;\n this.hasValue = false;\n this.destination.next(lastValue);\n }\n };\n DebounceTimeSubscriber.prototype.clearDebounce = function () {\n var debouncedSubscription = this.debouncedSubscription;\n if (debouncedSubscription !== null) {\n this.remove(debouncedSubscription);\n debouncedSubscription.unsubscribe();\n this.debouncedSubscription = null;\n }\n };\n return DebounceTimeSubscriber;\n}(Subscriber_1.Subscriber));\nfunction dispatchNext(subscriber) {\n subscriber.debouncedNext();\n}\n//# sourceMappingURL=debounceTime.js.map",
+ "\"use strict\";\nvar __extends = (this && this.__extends) || (function () {\n var extendStatics = function (d, b) {\n extendStatics = Object.setPrototypeOf ||\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };\n return extendStatics(d, b);\n }\n return function (d, b) {\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n})();\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar Subscriber_1 = require(\"../Subscriber\");\nfunction defaultIfEmpty(defaultValue) {\n if (defaultValue === void 0) { defaultValue = null; }\n return function (source) { return source.lift(new DefaultIfEmptyOperator(defaultValue)); };\n}\nexports.defaultIfEmpty = defaultIfEmpty;\nvar DefaultIfEmptyOperator = (function () {\n function DefaultIfEmptyOperator(defaultValue) {\n this.defaultValue = defaultValue;\n }\n DefaultIfEmptyOperator.prototype.call = function (subscriber, source) {\n return source.subscribe(new DefaultIfEmptySubscriber(subscriber, this.defaultValue));\n };\n return DefaultIfEmptyOperator;\n}());\nvar DefaultIfEmptySubscriber = (function (_super) {\n __extends(DefaultIfEmptySubscriber, _super);\n function DefaultIfEmptySubscriber(destination, defaultValue) {\n var _this = _super.call(this, destination) || this;\n _this.defaultValue = defaultValue;\n _this.isEmpty = true;\n return _this;\n }\n DefaultIfEmptySubscriber.prototype._next = function (value) {\n this.isEmpty = false;\n this.destination.next(value);\n };\n DefaultIfEmptySubscriber.prototype._complete = function () {\n if (this.isEmpty) {\n this.destination.next(this.defaultValue);\n }\n this.destination.complete();\n };\n return DefaultIfEmptySubscriber;\n}(Subscriber_1.Subscriber));\n//# sourceMappingURL=defaultIfEmpty.js.map",
+ "\"use strict\";\nvar __extends = (this && this.__extends) || (function () {\n var extendStatics = function (d, b) {\n extendStatics = Object.setPrototypeOf ||\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };\n return extendStatics(d, b);\n }\n return function (d, b) {\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n})();\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar async_1 = require(\"../scheduler/async\");\nvar isDate_1 = require(\"../util/isDate\");\nvar Subscriber_1 = require(\"../Subscriber\");\nvar Notification_1 = require(\"../Notification\");\nfunction delay(delay, scheduler) {\n if (scheduler === void 0) { scheduler = async_1.async; }\n var absoluteDelay = isDate_1.isDate(delay);\n var delayFor = absoluteDelay ? (+delay - scheduler.now()) : Math.abs(delay);\n return function (source) { return source.lift(new DelayOperator(delayFor, scheduler)); };\n}\nexports.delay = delay;\nvar DelayOperator = (function () {\n function DelayOperator(delay, scheduler) {\n this.delay = delay;\n this.scheduler = scheduler;\n }\n DelayOperator.prototype.call = function (subscriber, source) {\n return source.subscribe(new DelaySubscriber(subscriber, this.delay, this.scheduler));\n };\n return DelayOperator;\n}());\nvar DelaySubscriber = (function (_super) {\n __extends(DelaySubscriber, _super);\n function DelaySubscriber(destination, delay, scheduler) {\n var _this = _super.call(this, destination) || this;\n _this.delay = delay;\n _this.scheduler = scheduler;\n _this.queue = [];\n _this.active = false;\n _this.errored = false;\n return _this;\n }\n DelaySubscriber.dispatch = function (state) {\n var source = state.source;\n var queue = source.queue;\n var scheduler = state.scheduler;\n var destination = state.destination;\n while (queue.length > 0 && (queue[0].time - scheduler.now()) <= 0) {\n queue.shift().notification.observe(destination);\n }\n if (queue.length > 0) {\n var delay_1 = Math.max(0, queue[0].time - scheduler.now());\n this.schedule(state, delay_1);\n }\n else {\n this.unsubscribe();\n source.active = false;\n }\n };\n DelaySubscriber.prototype._schedule = function (scheduler) {\n this.active = true;\n var destination = this.destination;\n destination.add(scheduler.schedule(DelaySubscriber.dispatch, this.delay, {\n source: this, destination: this.destination, scheduler: scheduler\n }));\n };\n DelaySubscriber.prototype.scheduleNotification = function (notification) {\n if (this.errored === true) {\n return;\n }\n var scheduler = this.scheduler;\n var message = new DelayMessage(scheduler.now() + this.delay, notification);\n this.queue.push(message);\n if (this.active === false) {\n this._schedule(scheduler);\n }\n };\n DelaySubscriber.prototype._next = function (value) {\n this.scheduleNotification(Notification_1.Notification.createNext(value));\n };\n DelaySubscriber.prototype._error = function (err) {\n this.errored = true;\n this.queue = [];\n this.destination.error(err);\n this.unsubscribe();\n };\n DelaySubscriber.prototype._complete = function () {\n this.scheduleNotification(Notification_1.Notification.createComplete());\n this.unsubscribe();\n };\n return DelaySubscriber;\n}(Subscriber_1.Subscriber));\nvar DelayMessage = (function () {\n function DelayMessage(time, notification) {\n this.time = time;\n this.notification = notification;\n }\n return DelayMessage;\n}());\n//# sourceMappingURL=delay.js.map",
+ "\"use strict\";\nvar __extends = (this && this.__extends) || (function () {\n var extendStatics = function (d, b) {\n extendStatics = Object.setPrototypeOf ||\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };\n return extendStatics(d, b);\n }\n return function (d, b) {\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n})();\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar Subscriber_1 = require(\"../Subscriber\");\nvar Observable_1 = require(\"../Observable\");\nvar OuterSubscriber_1 = require(\"../OuterSubscriber\");\nvar subscribeToResult_1 = require(\"../util/subscribeToResult\");\nfunction delayWhen(delayDurationSelector, subscriptionDelay) {\n if (subscriptionDelay) {\n return function (source) {\n return new SubscriptionDelayObservable(source, subscriptionDelay)\n .lift(new DelayWhenOperator(delayDurationSelector));\n };\n }\n return function (source) { return source.lift(new DelayWhenOperator(delayDurationSelector)); };\n}\nexports.delayWhen = delayWhen;\nvar DelayWhenOperator = (function () {\n function DelayWhenOperator(delayDurationSelector) {\n this.delayDurationSelector = delayDurationSelector;\n }\n DelayWhenOperator.prototype.call = function (subscriber, source) {\n return source.subscribe(new DelayWhenSubscriber(subscriber, this.delayDurationSelector));\n };\n return DelayWhenOperator;\n}());\nvar DelayWhenSubscriber = (function (_super) {\n __extends(DelayWhenSubscriber, _super);\n function DelayWhenSubscriber(destination, delayDurationSelector) {\n var _this = _super.call(this, destination) || this;\n _this.delayDurationSelector = delayDurationSelector;\n _this.completed = false;\n _this.delayNotifierSubscriptions = [];\n _this.index = 0;\n return _this;\n }\n DelayWhenSubscriber.prototype.notifyNext = function (outerValue, innerValue, outerIndex, innerIndex, innerSub) {\n this.destination.next(outerValue);\n this.removeSubscription(innerSub);\n this.tryComplete();\n };\n DelayWhenSubscriber.prototype.notifyError = function (error, innerSub) {\n this._error(error);\n };\n DelayWhenSubscriber.prototype.notifyComplete = function (innerSub) {\n var value = this.removeSubscription(innerSub);\n if (value) {\n this.destination.next(value);\n }\n this.tryComplete();\n };\n DelayWhenSubscriber.prototype._next = function (value) {\n var index = this.index++;\n try {\n var delayNotifier = this.delayDurationSelector(value, index);\n if (delayNotifier) {\n this.tryDelay(delayNotifier, value);\n }\n }\n catch (err) {\n this.destination.error(err);\n }\n };\n DelayWhenSubscriber.prototype._complete = function () {\n this.completed = true;\n this.tryComplete();\n this.unsubscribe();\n };\n DelayWhenSubscriber.prototype.removeSubscription = function (subscription) {\n subscription.unsubscribe();\n var subscriptionIdx = this.delayNotifierSubscriptions.indexOf(subscription);\n if (subscriptionIdx !== -1) {\n this.delayNotifierSubscriptions.splice(subscriptionIdx, 1);\n }\n return subscription.outerValue;\n };\n DelayWhenSubscriber.prototype.tryDelay = function (delayNotifier, value) {\n var notifierSubscription = subscribeToResult_1.subscribeToResult(this, delayNotifier, value);\n if (notifierSubscription && !notifierSubscription.closed) {\n var destination = this.destination;\n destination.add(notifierSubscription);\n this.delayNotifierSubscriptions.push(notifierSubscription);\n }\n };\n DelayWhenSubscriber.prototype.tryComplete = function () {\n if (this.completed && this.delayNotifierSubscriptions.length === 0) {\n this.destination.complete();\n }\n };\n return DelayWhenSubscriber;\n}(OuterSubscriber_1.OuterSubscriber));\nvar SubscriptionDelayObservable = (function (_super) {\n __extends(SubscriptionDelayObservable, _super);\n function SubscriptionDelayObservable(source, subscriptionDelay) {\n var _this = _super.call(this) || this;\n _this.source = source;\n _this.subscriptionDelay = subscriptionDelay;\n return _this;\n }\n SubscriptionDelayObservable.prototype._subscribe = function (subscriber) {\n this.subscriptionDelay.subscribe(new SubscriptionDelaySubscriber(subscriber, this.source));\n };\n return SubscriptionDelayObservable;\n}(Observable_1.Observable));\nvar SubscriptionDelaySubscriber = (function (_super) {\n __extends(SubscriptionDelaySubscriber, _super);\n function SubscriptionDelaySubscriber(parent, source) {\n var _this = _super.call(this) || this;\n _this.parent = parent;\n _this.source = source;\n _this.sourceSubscribed = false;\n return _this;\n }\n SubscriptionDelaySubscriber.prototype._next = function (unused) {\n this.subscribeToSource();\n };\n SubscriptionDelaySubscriber.prototype._error = function (err) {\n this.unsubscribe();\n this.parent.error(err);\n };\n SubscriptionDelaySubscriber.prototype._complete = function () {\n this.unsubscribe();\n this.subscribeToSource();\n };\n SubscriptionDelaySubscriber.prototype.subscribeToSource = function () {\n if (!this.sourceSubscribed) {\n this.sourceSubscribed = true;\n this.unsubscribe();\n this.source.subscribe(this.parent);\n }\n };\n return SubscriptionDelaySubscriber;\n}(Subscriber_1.Subscriber));\n//# sourceMappingURL=delayWhen.js.map",
+ "\"use strict\";\nvar __extends = (this && this.__extends) || (function () {\n var extendStatics = function (d, b) {\n extendStatics = Object.setPrototypeOf ||\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };\n return extendStatics(d, b);\n }\n return function (d, b) {\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n})();\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar Subscriber_1 = require(\"../Subscriber\");\nfunction dematerialize() {\n return function dematerializeOperatorFunction(source) {\n return source.lift(new DeMaterializeOperator());\n };\n}\nexports.dematerialize = dematerialize;\nvar DeMaterializeOperator = (function () {\n function DeMaterializeOperator() {\n }\n DeMaterializeOperator.prototype.call = function (subscriber, source) {\n return source.subscribe(new DeMaterializeSubscriber(subscriber));\n };\n return DeMaterializeOperator;\n}());\nvar DeMaterializeSubscriber = (function (_super) {\n __extends(DeMaterializeSubscriber, _super);\n function DeMaterializeSubscriber(destination) {\n return _super.call(this, destination) || this;\n }\n DeMaterializeSubscriber.prototype._next = function (value) {\n value.observe(this.destination);\n };\n return DeMaterializeSubscriber;\n}(Subscriber_1.Subscriber));\n//# sourceMappingURL=dematerialize.js.map",
+ "\"use strict\";\nvar __extends = (this && this.__extends) || (function () {\n var extendStatics = function (d, b) {\n extendStatics = Object.setPrototypeOf ||\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };\n return extendStatics(d, b);\n }\n return function (d, b) {\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n})();\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar OuterSubscriber_1 = require(\"../OuterSubscriber\");\nvar subscribeToResult_1 = require(\"../util/subscribeToResult\");\nfunction distinct(keySelector, flushes) {\n return function (source) { return source.lift(new DistinctOperator(keySelector, flushes)); };\n}\nexports.distinct = distinct;\nvar DistinctOperator = (function () {\n function DistinctOperator(keySelector, flushes) {\n this.keySelector = keySelector;\n this.flushes = flushes;\n }\n DistinctOperator.prototype.call = function (subscriber, source) {\n return source.subscribe(new DistinctSubscriber(subscriber, this.keySelector, this.flushes));\n };\n return DistinctOperator;\n}());\nvar DistinctSubscriber = (function (_super) {\n __extends(DistinctSubscriber, _super);\n function DistinctSubscriber(destination, keySelector, flushes) {\n var _this = _super.call(this, destination) || this;\n _this.keySelector = keySelector;\n _this.values = new Set();\n if (flushes) {\n _this.add(subscribeToResult_1.subscribeToResult(_this, flushes));\n }\n return _this;\n }\n DistinctSubscriber.prototype.notifyNext = function (outerValue, innerValue, outerIndex, innerIndex, innerSub) {\n this.values.clear();\n };\n DistinctSubscriber.prototype.notifyError = function (error, innerSub) {\n this._error(error);\n };\n DistinctSubscriber.prototype._next = function (value) {\n if (this.keySelector) {\n this._useKeySelector(value);\n }\n else {\n this._finalizeNext(value, value);\n }\n };\n DistinctSubscriber.prototype._useKeySelector = function (value) {\n var key;\n var destination = this.destination;\n try {\n key = this.keySelector(value);\n }\n catch (err) {\n destination.error(err);\n return;\n }\n this._finalizeNext(key, value);\n };\n DistinctSubscriber.prototype._finalizeNext = function (key, value) {\n var values = this.values;\n if (!values.has(key)) {\n values.add(key);\n this.destination.next(value);\n }\n };\n return DistinctSubscriber;\n}(OuterSubscriber_1.OuterSubscriber));\nexports.DistinctSubscriber = DistinctSubscriber;\n//# sourceMappingURL=distinct.js.map",
+ "\"use strict\";\nvar __extends = (this && this.__extends) || (function () {\n var extendStatics = function (d, b) {\n extendStatics = Object.setPrototypeOf ||\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };\n return extendStatics(d, b);\n }\n return function (d, b) {\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n})();\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar Subscriber_1 = require(\"../Subscriber\");\nvar tryCatch_1 = require(\"../util/tryCatch\");\nvar errorObject_1 = require(\"../util/errorObject\");\nfunction distinctUntilChanged(compare, keySelector) {\n return function (source) { return source.lift(new DistinctUntilChangedOperator(compare, keySelector)); };\n}\nexports.distinctUntilChanged = distinctUntilChanged;\nvar DistinctUntilChangedOperator = (function () {\n function DistinctUntilChangedOperator(compare, keySelector) {\n this.compare = compare;\n this.keySelector = keySelector;\n }\n DistinctUntilChangedOperator.prototype.call = function (subscriber, source) {\n return source.subscribe(new DistinctUntilChangedSubscriber(subscriber, this.compare, this.keySelector));\n };\n return DistinctUntilChangedOperator;\n}());\nvar DistinctUntilChangedSubscriber = (function (_super) {\n __extends(DistinctUntilChangedSubscriber, _super);\n function DistinctUntilChangedSubscriber(destination, compare, keySelector) {\n var _this = _super.call(this, destination) || this;\n _this.keySelector = keySelector;\n _this.hasKey = false;\n if (typeof compare === 'function') {\n _this.compare = compare;\n }\n return _this;\n }\n DistinctUntilChangedSubscriber.prototype.compare = function (x, y) {\n return x === y;\n };\n DistinctUntilChangedSubscriber.prototype._next = function (value) {\n var keySelector = this.keySelector;\n var key = value;\n if (keySelector) {\n key = tryCatch_1.tryCatch(this.keySelector)(value);\n if (key === errorObject_1.errorObject) {\n return this.destination.error(errorObject_1.errorObject.e);\n }\n }\n var result = false;\n if (this.hasKey) {\n result = tryCatch_1.tryCatch(this.compare)(this.key, key);\n if (result === errorObject_1.errorObject) {\n return this.destination.error(errorObject_1.errorObject.e);\n }\n }\n else {\n this.hasKey = true;\n }\n if (Boolean(result) === false) {\n this.key = key;\n this.destination.next(value);\n }\n };\n return DistinctUntilChangedSubscriber;\n}(Subscriber_1.Subscriber));\n//# sourceMappingURL=distinctUntilChanged.js.map",
+ "\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar distinctUntilChanged_1 = require(\"./distinctUntilChanged\");\nfunction distinctUntilKeyChanged(key, compare) {\n return distinctUntilChanged_1.distinctUntilChanged(function (x, y) { return compare ? compare(x[key], y[key]) : x[key] === y[key]; });\n}\nexports.distinctUntilKeyChanged = distinctUntilKeyChanged;\n//# sourceMappingURL=distinctUntilKeyChanged.js.map",
+ "\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar ArgumentOutOfRangeError_1 = require(\"../util/ArgumentOutOfRangeError\");\nvar filter_1 = require(\"./filter\");\nvar throwIfEmpty_1 = require(\"./throwIfEmpty\");\nvar defaultIfEmpty_1 = require(\"./defaultIfEmpty\");\nvar take_1 = require(\"./take\");\nfunction elementAt(index, defaultValue) {\n if (index < 0) {\n throw new ArgumentOutOfRangeError_1.ArgumentOutOfRangeError();\n }\n var hasDefaultValue = arguments.length >= 2;\n return function (source) { return source.pipe(filter_1.filter(function (v, i) { return i === index; }), take_1.take(1), hasDefaultValue\n ? defaultIfEmpty_1.defaultIfEmpty(defaultValue)\n : throwIfEmpty_1.throwIfEmpty(function () { return new ArgumentOutOfRangeError_1.ArgumentOutOfRangeError(); })); };\n}\nexports.elementAt = elementAt;\n//# sourceMappingURL=elementAt.js.map",
+ "\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar fromArray_1 = require(\"../observable/fromArray\");\nvar scalar_1 = require(\"../observable/scalar\");\nvar empty_1 = require(\"../observable/empty\");\nvar concat_1 = require(\"../observable/concat\");\nvar isScheduler_1 = require(\"../util/isScheduler\");\nfunction endWith() {\n var array = [];\n for (var _i = 0; _i < arguments.length; _i++) {\n array[_i] = arguments[_i];\n }\n return function (source) {\n var scheduler = array[array.length - 1];\n if (isScheduler_1.isScheduler(scheduler)) {\n array.pop();\n }\n else {\n scheduler = null;\n }\n var len = array.length;\n if (len === 1 && !scheduler) {\n return concat_1.concat(source, scalar_1.scalar(array[0]));\n }\n else if (len > 0) {\n return concat_1.concat(source, fromArray_1.fromArray(array, scheduler));\n }\n else {\n return concat_1.concat(source, empty_1.empty(scheduler));\n }\n };\n}\nexports.endWith = endWith;\n//# sourceMappingURL=endWith.js.map",
+ "\"use strict\";\nvar __extends = (this && this.__extends) || (function () {\n var extendStatics = function (d, b) {\n extendStatics = Object.setPrototypeOf ||\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };\n return extendStatics(d, b);\n }\n return function (d, b) {\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n})();\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar Subscriber_1 = require(\"../Subscriber\");\nfunction every(predicate, thisArg) {\n return function (source) { return source.lift(new EveryOperator(predicate, thisArg, source)); };\n}\nexports.every = every;\nvar EveryOperator = (function () {\n function EveryOperator(predicate, thisArg, source) {\n this.predicate = predicate;\n this.thisArg = thisArg;\n this.source = source;\n }\n EveryOperator.prototype.call = function (observer, source) {\n return source.subscribe(new EverySubscriber(observer, this.predicate, this.thisArg, this.source));\n };\n return EveryOperator;\n}());\nvar EverySubscriber = (function (_super) {\n __extends(EverySubscriber, _super);\n function EverySubscriber(destination, predicate, thisArg, source) {\n var _this = _super.call(this, destination) || this;\n _this.predicate = predicate;\n _this.thisArg = thisArg;\n _this.source = source;\n _this.index = 0;\n _this.thisArg = thisArg || _this;\n return _this;\n }\n EverySubscriber.prototype.notifyComplete = function (everyValueMatch) {\n this.destination.next(everyValueMatch);\n this.destination.complete();\n };\n EverySubscriber.prototype._next = function (value) {\n var result = false;\n try {\n result = this.predicate.call(this.thisArg, value, this.index++, this.source);\n }\n catch (err) {\n this.destination.error(err);\n return;\n }\n if (!result) {\n this.notifyComplete(false);\n }\n };\n EverySubscriber.prototype._complete = function () {\n this.notifyComplete(true);\n };\n return EverySubscriber;\n}(Subscriber_1.Subscriber));\n//# sourceMappingURL=every.js.map",
+ "\"use strict\";\nvar __extends = (this && this.__extends) || (function () {\n var extendStatics = function (d, b) {\n extendStatics = Object.setPrototypeOf ||\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };\n return extendStatics(d, b);\n }\n return function (d, b) {\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n})();\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar OuterSubscriber_1 = require(\"../OuterSubscriber\");\nvar subscribeToResult_1 = require(\"../util/subscribeToResult\");\nfunction exhaust() {\n return function (source) { return source.lift(new SwitchFirstOperator()); };\n}\nexports.exhaust = exhaust;\nvar SwitchFirstOperator = (function () {\n function SwitchFirstOperator() {\n }\n SwitchFirstOperator.prototype.call = function (subscriber, source) {\n return source.subscribe(new SwitchFirstSubscriber(subscriber));\n };\n return SwitchFirstOperator;\n}());\nvar SwitchFirstSubscriber = (function (_super) {\n __extends(SwitchFirstSubscriber, _super);\n function SwitchFirstSubscriber(destination) {\n var _this = _super.call(this, destination) || this;\n _this.hasCompleted = false;\n _this.hasSubscription = false;\n return _this;\n }\n SwitchFirstSubscriber.prototype._next = function (value) {\n if (!this.hasSubscription) {\n this.hasSubscription = true;\n this.add(subscribeToResult_1.subscribeToResult(this, value));\n }\n };\n SwitchFirstSubscriber.prototype._complete = function () {\n this.hasCompleted = true;\n if (!this.hasSubscription) {\n this.destination.complete();\n }\n };\n SwitchFirstSubscriber.prototype.notifyComplete = function (innerSub) {\n this.remove(innerSub);\n this.hasSubscription = false;\n if (this.hasCompleted) {\n this.destination.complete();\n }\n };\n return SwitchFirstSubscriber;\n}(OuterSubscriber_1.OuterSubscriber));\n//# sourceMappingURL=exhaust.js.map",
+ "\"use strict\";\nvar __extends = (this && this.__extends) || (function () {\n var extendStatics = function (d, b) {\n extendStatics = Object.setPrototypeOf ||\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };\n return extendStatics(d, b);\n }\n return function (d, b) {\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n})();\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar OuterSubscriber_1 = require(\"../OuterSubscriber\");\nvar InnerSubscriber_1 = require(\"../InnerSubscriber\");\nvar subscribeToResult_1 = require(\"../util/subscribeToResult\");\nvar map_1 = require(\"./map\");\nvar from_1 = require(\"../observable/from\");\nfunction exhaustMap(project, resultSelector) {\n if (resultSelector) {\n return function (source) { return source.pipe(exhaustMap(function (a, i) { return from_1.from(project(a, i)).pipe(map_1.map(function (b, ii) { return resultSelector(a, b, i, ii); })); })); };\n }\n return function (source) {\n return source.lift(new ExhauseMapOperator(project));\n };\n}\nexports.exhaustMap = exhaustMap;\nvar ExhauseMapOperator = (function () {\n function ExhauseMapOperator(project) {\n this.project = project;\n }\n ExhauseMapOperator.prototype.call = function (subscriber, source) {\n return source.subscribe(new ExhaustMapSubscriber(subscriber, this.project));\n };\n return ExhauseMapOperator;\n}());\nvar ExhaustMapSubscriber = (function (_super) {\n __extends(ExhaustMapSubscriber, _super);\n function ExhaustMapSubscriber(destination, project) {\n var _this = _super.call(this, destination) || this;\n _this.project = project;\n _this.hasSubscription = false;\n _this.hasCompleted = false;\n _this.index = 0;\n return _this;\n }\n ExhaustMapSubscriber.prototype._next = function (value) {\n if (!this.hasSubscription) {\n this.tryNext(value);\n }\n };\n ExhaustMapSubscriber.prototype.tryNext = function (value) {\n var result;\n var index = this.index++;\n try {\n result = this.project(value, index);\n }\n catch (err) {\n this.destination.error(err);\n return;\n }\n this.hasSubscription = true;\n this._innerSub(result, value, index);\n };\n ExhaustMapSubscriber.prototype._innerSub = function (result, value, index) {\n var innerSubscriber = new InnerSubscriber_1.InnerSubscriber(this, undefined, undefined);\n var destination = this.destination;\n destination.add(innerSubscriber);\n subscribeToResult_1.subscribeToResult(this, result, value, index, innerSubscriber);\n };\n ExhaustMapSubscriber.prototype._complete = function () {\n this.hasCompleted = true;\n if (!this.hasSubscription) {\n this.destination.complete();\n }\n this.unsubscribe();\n };\n ExhaustMapSubscriber.prototype.notifyNext = function (outerValue, innerValue, outerIndex, innerIndex, innerSub) {\n this.destination.next(innerValue);\n };\n ExhaustMapSubscriber.prototype.notifyError = function (err) {\n this.destination.error(err);\n };\n ExhaustMapSubscriber.prototype.notifyComplete = function (innerSub) {\n var destination = this.destination;\n destination.remove(innerSub);\n this.hasSubscription = false;\n if (this.hasCompleted) {\n this.destination.complete();\n }\n };\n return ExhaustMapSubscriber;\n}(OuterSubscriber_1.OuterSubscriber));\n//# sourceMappingURL=exhaustMap.js.map",
+ "\"use strict\";\nvar __extends = (this && this.__extends) || (function () {\n var extendStatics = function (d, b) {\n extendStatics = Object.setPrototypeOf ||\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };\n return extendStatics(d, b);\n }\n return function (d, b) {\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n})();\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar tryCatch_1 = require(\"../util/tryCatch\");\nvar errorObject_1 = require(\"../util/errorObject\");\nvar OuterSubscriber_1 = require(\"../OuterSubscriber\");\nvar subscribeToResult_1 = require(\"../util/subscribeToResult\");\nfunction expand(project, concurrent, scheduler) {\n if (concurrent === void 0) { concurrent = Number.POSITIVE_INFINITY; }\n if (scheduler === void 0) { scheduler = undefined; }\n concurrent = (concurrent || 0) < 1 ? Number.POSITIVE_INFINITY : concurrent;\n return function (source) { return source.lift(new ExpandOperator(project, concurrent, scheduler)); };\n}\nexports.expand = expand;\nvar ExpandOperator = (function () {\n function ExpandOperator(project, concurrent, scheduler) {\n this.project = project;\n this.concurrent = concurrent;\n this.scheduler = scheduler;\n }\n ExpandOperator.prototype.call = function (subscriber, source) {\n return source.subscribe(new ExpandSubscriber(subscriber, this.project, this.concurrent, this.scheduler));\n };\n return ExpandOperator;\n}());\nexports.ExpandOperator = ExpandOperator;\nvar ExpandSubscriber = (function (_super) {\n __extends(ExpandSubscriber, _super);\n function ExpandSubscriber(destination, project, concurrent, scheduler) {\n var _this = _super.call(this, destination) || this;\n _this.project = project;\n _this.concurrent = concurrent;\n _this.scheduler = scheduler;\n _this.index = 0;\n _this.active = 0;\n _this.hasCompleted = false;\n if (concurrent < Number.POSITIVE_INFINITY) {\n _this.buffer = [];\n }\n return _this;\n }\n ExpandSubscriber.dispatch = function (arg) {\n var subscriber = arg.subscriber, result = arg.result, value = arg.value, index = arg.index;\n subscriber.subscribeToProjection(result, value, index);\n };\n ExpandSubscriber.prototype._next = function (value) {\n var destination = this.destination;\n if (destination.closed) {\n this._complete();\n return;\n }\n var index = this.index++;\n if (this.active < this.concurrent) {\n destination.next(value);\n var result = tryCatch_1.tryCatch(this.project)(value, index);\n if (result === errorObject_1.errorObject) {\n destination.error(errorObject_1.errorObject.e);\n }\n else if (!this.scheduler) {\n this.subscribeToProjection(result, value, index);\n }\n else {\n var state = { subscriber: this, result: result, value: value, index: index };\n var destination_1 = this.destination;\n destination_1.add(this.scheduler.schedule(ExpandSubscriber.dispatch, 0, state));\n }\n }\n else {\n this.buffer.push(value);\n }\n };\n ExpandSubscriber.prototype.subscribeToProjection = function (result, value, index) {\n this.active++;\n var destination = this.destination;\n destination.add(subscribeToResult_1.subscribeToResult(this, result, value, index));\n };\n ExpandSubscriber.prototype._complete = function () {\n this.hasCompleted = true;\n if (this.hasCompleted && this.active === 0) {\n this.destination.complete();\n }\n this.unsubscribe();\n };\n ExpandSubscriber.prototype.notifyNext = function (outerValue, innerValue, outerIndex, innerIndex, innerSub) {\n this._next(innerValue);\n };\n ExpandSubscriber.prototype.notifyComplete = function (innerSub) {\n var buffer = this.buffer;\n var destination = this.destination;\n destination.remove(innerSub);\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 return ExpandSubscriber;\n}(OuterSubscriber_1.OuterSubscriber));\nexports.ExpandSubscriber = ExpandSubscriber;\n//# sourceMappingURL=expand.js.map",
+ "\"use strict\";\nvar __extends = (this && this.__extends) || (function () {\n var extendStatics = function (d, b) {\n extendStatics = Object.setPrototypeOf ||\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };\n return extendStatics(d, b);\n }\n return function (d, b) {\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n})();\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar Subscriber_1 = require(\"../Subscriber\");\nfunction filter(predicate, thisArg) {\n return function filterOperatorFunction(source) {\n return source.lift(new FilterOperator(predicate, thisArg));\n };\n}\nexports.filter = filter;\nvar FilterOperator = (function () {\n function FilterOperator(predicate, thisArg) {\n this.predicate = predicate;\n this.thisArg = thisArg;\n }\n FilterOperator.prototype.call = function (subscriber, source) {\n return source.subscribe(new FilterSubscriber(subscriber, this.predicate, this.thisArg));\n };\n return FilterOperator;\n}());\nvar FilterSubscriber = (function (_super) {\n __extends(FilterSubscriber, _super);\n function FilterSubscriber(destination, predicate, thisArg) {\n var _this = _super.call(this, destination) || this;\n _this.predicate = predicate;\n _this.thisArg = thisArg;\n _this.count = 0;\n return _this;\n }\n FilterSubscriber.prototype._next = function (value) {\n var result;\n try {\n result = this.predicate.call(this.thisArg, value, this.count++);\n }\n catch (err) {\n this.destination.error(err);\n return;\n }\n if (result) {\n this.destination.next(value);\n }\n };\n return FilterSubscriber;\n}(Subscriber_1.Subscriber));\n//# sourceMappingURL=filter.js.map",
+ "\"use strict\";\nvar __extends = (this && this.__extends) || (function () {\n var extendStatics = function (d, b) {\n extendStatics = Object.setPrototypeOf ||\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };\n return extendStatics(d, b);\n }\n return function (d, b) {\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n})();\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar Subscriber_1 = require(\"../Subscriber\");\nvar Subscription_1 = require(\"../Subscription\");\nfunction finalize(callback) {\n return function (source) { return source.lift(new FinallyOperator(callback)); };\n}\nexports.finalize = finalize;\nvar FinallyOperator = (function () {\n function FinallyOperator(callback) {\n this.callback = callback;\n }\n FinallyOperator.prototype.call = function (subscriber, source) {\n return source.subscribe(new FinallySubscriber(subscriber, this.callback));\n };\n return FinallyOperator;\n}());\nvar FinallySubscriber = (function (_super) {\n __extends(FinallySubscriber, _super);\n function FinallySubscriber(destination, callback) {\n var _this = _super.call(this, destination) || this;\n _this.add(new Subscription_1.Subscription(callback));\n return _this;\n }\n return FinallySubscriber;\n}(Subscriber_1.Subscriber));\n//# sourceMappingURL=finalize.js.map",
+ "\"use strict\";\nvar __extends = (this && this.__extends) || (function () {\n var extendStatics = function (d, b) {\n extendStatics = Object.setPrototypeOf ||\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };\n return extendStatics(d, b);\n }\n return function (d, b) {\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n})();\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar Subscriber_1 = require(\"../Subscriber\");\nfunction find(predicate, thisArg) {\n if (typeof predicate !== 'function') {\n throw new TypeError('predicate is not a function');\n }\n return function (source) { return source.lift(new FindValueOperator(predicate, source, false, thisArg)); };\n}\nexports.find = find;\nvar FindValueOperator = (function () {\n function FindValueOperator(predicate, source, yieldIndex, thisArg) {\n this.predicate = predicate;\n this.source = source;\n this.yieldIndex = yieldIndex;\n this.thisArg = thisArg;\n }\n FindValueOperator.prototype.call = function (observer, source) {\n return source.subscribe(new FindValueSubscriber(observer, this.predicate, this.source, this.yieldIndex, this.thisArg));\n };\n return FindValueOperator;\n}());\nexports.FindValueOperator = FindValueOperator;\nvar FindValueSubscriber = (function (_super) {\n __extends(FindValueSubscriber, _super);\n function FindValueSubscriber(destination, predicate, source, yieldIndex, thisArg) {\n var _this = _super.call(this, destination) || this;\n _this.predicate = predicate;\n _this.source = source;\n _this.yieldIndex = yieldIndex;\n _this.thisArg = thisArg;\n _this.index = 0;\n return _this;\n }\n FindValueSubscriber.prototype.notifyComplete = function (value) {\n var destination = this.destination;\n destination.next(value);\n destination.complete();\n this.unsubscribe();\n };\n FindValueSubscriber.prototype._next = function (value) {\n var _a = this, predicate = _a.predicate, thisArg = _a.thisArg;\n var index = this.index++;\n try {\n var result = predicate.call(thisArg || this, value, index, this.source);\n if (result) {\n this.notifyComplete(this.yieldIndex ? index : value);\n }\n }\n catch (err) {\n this.destination.error(err);\n }\n };\n FindValueSubscriber.prototype._complete = function () {\n this.notifyComplete(this.yieldIndex ? -1 : undefined);\n };\n return FindValueSubscriber;\n}(Subscriber_1.Subscriber));\nexports.FindValueSubscriber = FindValueSubscriber;\n//# sourceMappingURL=find.js.map",
+ "\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar find_1 = require(\"../operators/find\");\nfunction findIndex(predicate, thisArg) {\n return function (source) { return source.lift(new find_1.FindValueOperator(predicate, source, true, thisArg)); };\n}\nexports.findIndex = findIndex;\n//# sourceMappingURL=findIndex.js.map",
+ "\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar EmptyError_1 = require(\"../util/EmptyError\");\nvar filter_1 = require(\"./filter\");\nvar take_1 = require(\"./take\");\nvar defaultIfEmpty_1 = require(\"./defaultIfEmpty\");\nvar throwIfEmpty_1 = require(\"./throwIfEmpty\");\nvar identity_1 = require(\"../util/identity\");\nfunction first(predicate, defaultValue) {\n var hasDefaultValue = arguments.length >= 2;\n return function (source) { return source.pipe(predicate ? filter_1.filter(function (v, i) { return predicate(v, i, source); }) : identity_1.identity, take_1.take(1), hasDefaultValue ? defaultIfEmpty_1.defaultIfEmpty(defaultValue) : throwIfEmpty_1.throwIfEmpty(function () { return new EmptyError_1.EmptyError(); })); };\n}\nexports.first = first;\n//# sourceMappingURL=first.js.map",
+ "\"use strict\";\nvar __extends = (this && this.__extends) || (function () {\n var extendStatics = function (d, b) {\n extendStatics = Object.setPrototypeOf ||\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };\n return extendStatics(d, b);\n }\n return function (d, b) {\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n})();\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar Subscriber_1 = require(\"../Subscriber\");\nvar Subscription_1 = require(\"../Subscription\");\nvar Observable_1 = require(\"../Observable\");\nvar Subject_1 = require(\"../Subject\");\nfunction groupBy(keySelector, elementSelector, durationSelector, subjectSelector) {\n return function (source) {\n return source.lift(new GroupByOperator(keySelector, elementSelector, durationSelector, subjectSelector));\n };\n}\nexports.groupBy = groupBy;\nvar GroupByOperator = (function () {\n function GroupByOperator(keySelector, elementSelector, durationSelector, subjectSelector) {\n this.keySelector = keySelector;\n this.elementSelector = elementSelector;\n this.durationSelector = durationSelector;\n this.subjectSelector = subjectSelector;\n }\n GroupByOperator.prototype.call = function (subscriber, source) {\n return source.subscribe(new GroupBySubscriber(subscriber, this.keySelector, this.elementSelector, this.durationSelector, this.subjectSelector));\n };\n return GroupByOperator;\n}());\nvar GroupBySubscriber = (function (_super) {\n __extends(GroupBySubscriber, _super);\n function GroupBySubscriber(destination, keySelector, elementSelector, durationSelector, subjectSelector) {\n var _this = _super.call(this, destination) || this;\n _this.keySelector = keySelector;\n _this.elementSelector = elementSelector;\n _this.durationSelector = durationSelector;\n _this.subjectSelector = subjectSelector;\n _this.groups = null;\n _this.attemptedToUnsubscribe = false;\n _this.count = 0;\n return _this;\n }\n GroupBySubscriber.prototype._next = function (value) {\n var key;\n try {\n key = this.keySelector(value);\n }\n catch (err) {\n this.error(err);\n return;\n }\n this._group(value, key);\n };\n GroupBySubscriber.prototype._group = function (value, key) {\n var groups = this.groups;\n if (!groups) {\n groups = this.groups = new Map();\n }\n var group = groups.get(key);\n var element;\n if (this.elementSelector) {\n try {\n element = this.elementSelector(value);\n }\n catch (err) {\n this.error(err);\n }\n }\n else {\n element = value;\n }\n if (!group) {\n group = (this.subjectSelector ? this.subjectSelector() : new Subject_1.Subject());\n groups.set(key, group);\n var groupedObservable = new GroupedObservable(key, group, this);\n this.destination.next(groupedObservable);\n if (this.durationSelector) {\n var duration = void 0;\n try {\n duration = this.durationSelector(new GroupedObservable(key, group));\n }\n catch (err) {\n this.error(err);\n return;\n }\n this.add(duration.subscribe(new GroupDurationSubscriber(key, group, this)));\n }\n }\n if (!group.closed) {\n group.next(element);\n }\n };\n GroupBySubscriber.prototype._error = function (err) {\n var groups = this.groups;\n if (groups) {\n groups.forEach(function (group, key) {\n group.error(err);\n });\n groups.clear();\n }\n this.destination.error(err);\n };\n GroupBySubscriber.prototype._complete = function () {\n var groups = this.groups;\n if (groups) {\n groups.forEach(function (group, key) {\n group.complete();\n });\n groups.clear();\n }\n this.destination.complete();\n };\n GroupBySubscriber.prototype.removeGroup = function (key) {\n this.groups.delete(key);\n };\n GroupBySubscriber.prototype.unsubscribe = function () {\n if (!this.closed) {\n this.attemptedToUnsubscribe = true;\n if (this.count === 0) {\n _super.prototype.unsubscribe.call(this);\n }\n }\n };\n return GroupBySubscriber;\n}(Subscriber_1.Subscriber));\nvar GroupDurationSubscriber = (function (_super) {\n __extends(GroupDurationSubscriber, _super);\n function GroupDurationSubscriber(key, group, parent) {\n var _this = _super.call(this, group) || this;\n _this.key = key;\n _this.group = group;\n _this.parent = parent;\n return _this;\n }\n GroupDurationSubscriber.prototype._next = function (value) {\n this.complete();\n };\n GroupDurationSubscriber.prototype._unsubscribe = function () {\n var _a = this, parent = _a.parent, key = _a.key;\n this.key = this.parent = null;\n if (parent) {\n parent.removeGroup(key);\n }\n };\n return GroupDurationSubscriber;\n}(Subscriber_1.Subscriber));\nvar GroupedObservable = (function (_super) {\n __extends(GroupedObservable, _super);\n function GroupedObservable(key, groupSubject, refCountSubscription) {\n var _this = _super.call(this) || this;\n _this.key = key;\n _this.groupSubject = groupSubject;\n _this.refCountSubscription = refCountSubscription;\n return _this;\n }\n GroupedObservable.prototype._subscribe = function (subscriber) {\n var subscription = new Subscription_1.Subscription();\n var _a = this, refCountSubscription = _a.refCountSubscription, groupSubject = _a.groupSubject;\n if (refCountSubscription && !refCountSubscription.closed) {\n subscription.add(new InnerRefCountSubscription(refCountSubscription));\n }\n subscription.add(groupSubject.subscribe(subscriber));\n return subscription;\n };\n return GroupedObservable;\n}(Observable_1.Observable));\nexports.GroupedObservable = GroupedObservable;\nvar InnerRefCountSubscription = (function (_super) {\n __extends(InnerRefCountSubscription, _super);\n function InnerRefCountSubscription(parent) {\n var _this = _super.call(this) || this;\n _this.parent = parent;\n parent.count++;\n return _this;\n }\n InnerRefCountSubscription.prototype.unsubscribe = function () {\n var parent = this.parent;\n if (!parent.closed && !this.closed) {\n _super.prototype.unsubscribe.call(this);\n parent.count -= 1;\n if (parent.count === 0 && parent.attemptedToUnsubscribe) {\n parent.unsubscribe();\n }\n }\n };\n return InnerRefCountSubscription;\n}(Subscription_1.Subscription));\n//# sourceMappingURL=groupBy.js.map",
+ "\"use strict\";\nvar __extends = (this && this.__extends) || (function () {\n var extendStatics = function (d, b) {\n extendStatics = Object.setPrototypeOf ||\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };\n return extendStatics(d, b);\n }\n return function (d, b) {\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n})();\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar Subscriber_1 = require(\"../Subscriber\");\nfunction ignoreElements() {\n return function ignoreElementsOperatorFunction(source) {\n return source.lift(new IgnoreElementsOperator());\n };\n}\nexports.ignoreElements = ignoreElements;\nvar IgnoreElementsOperator = (function () {\n function IgnoreElementsOperator() {\n }\n IgnoreElementsOperator.prototype.call = function (subscriber, source) {\n return source.subscribe(new IgnoreElementsSubscriber(subscriber));\n };\n return IgnoreElementsOperator;\n}());\nvar IgnoreElementsSubscriber = (function (_super) {\n __extends(IgnoreElementsSubscriber, _super);\n function IgnoreElementsSubscriber() {\n return _super !== null && _super.apply(this, arguments) || this;\n }\n IgnoreElementsSubscriber.prototype._next = function (unused) {\n };\n return IgnoreElementsSubscriber;\n}(Subscriber_1.Subscriber));\n//# sourceMappingURL=ignoreElements.js.map",
+ "\"use strict\";\nvar __extends = (this && this.__extends) || (function () {\n var extendStatics = function (d, b) {\n extendStatics = Object.setPrototypeOf ||\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };\n return extendStatics(d, b);\n }\n return function (d, b) {\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n})();\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar Subscriber_1 = require(\"../Subscriber\");\nfunction isEmpty() {\n return function (source) { return source.lift(new IsEmptyOperator()); };\n}\nexports.isEmpty = isEmpty;\nvar IsEmptyOperator = (function () {\n function IsEmptyOperator() {\n }\n IsEmptyOperator.prototype.call = function (observer, source) {\n return source.subscribe(new IsEmptySubscriber(observer));\n };\n return IsEmptyOperator;\n}());\nvar IsEmptySubscriber = (function (_super) {\n __extends(IsEmptySubscriber, _super);\n function IsEmptySubscriber(destination) {\n return _super.call(this, destination) || this;\n }\n IsEmptySubscriber.prototype.notifyComplete = function (isEmpty) {\n var destination = this.destination;\n destination.next(isEmpty);\n destination.complete();\n };\n IsEmptySubscriber.prototype._next = function (value) {\n this.notifyComplete(false);\n };\n IsEmptySubscriber.prototype._complete = function () {\n this.notifyComplete(true);\n };\n return IsEmptySubscriber;\n}(Subscriber_1.Subscriber));\n//# sourceMappingURL=isEmpty.js.map",
+ "\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar EmptyError_1 = require(\"../util/EmptyError\");\nvar filter_1 = require(\"./filter\");\nvar takeLast_1 = require(\"./takeLast\");\nvar throwIfEmpty_1 = require(\"./throwIfEmpty\");\nvar defaultIfEmpty_1 = require(\"./defaultIfEmpty\");\nvar identity_1 = require(\"../util/identity\");\nfunction last(predicate, defaultValue) {\n var hasDefaultValue = arguments.length >= 2;\n return function (source) { return source.pipe(predicate ? filter_1.filter(function (v, i) { return predicate(v, i, source); }) : identity_1.identity, takeLast_1.takeLast(1), hasDefaultValue ? defaultIfEmpty_1.defaultIfEmpty(defaultValue) : throwIfEmpty_1.throwIfEmpty(function () { return new EmptyError_1.EmptyError(); })); };\n}\nexports.last = last;\n//# sourceMappingURL=last.js.map",
+ "\"use strict\";\nvar __extends = (this && this.__extends) || (function () {\n var extendStatics = function (d, b) {\n extendStatics = Object.setPrototypeOf ||\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };\n return extendStatics(d, b);\n }\n return function (d, b) {\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n})();\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar Subscriber_1 = require(\"../Subscriber\");\nfunction map(project, thisArg) {\n return function mapOperation(source) {\n if (typeof project !== 'function') {\n throw new TypeError('argument is not a function. Are you looking for `mapTo()`?');\n }\n return source.lift(new MapOperator(project, thisArg));\n };\n}\nexports.map = map;\nvar MapOperator = (function () {\n function MapOperator(project, thisArg) {\n this.project = project;\n this.thisArg = thisArg;\n }\n MapOperator.prototype.call = function (subscriber, source) {\n return source.subscribe(new MapSubscriber(subscriber, this.project, this.thisArg));\n };\n return MapOperator;\n}());\nexports.MapOperator = MapOperator;\nvar MapSubscriber = (function (_super) {\n __extends(MapSubscriber, _super);\n function MapSubscriber(destination, project, thisArg) {\n var _this = _super.call(this, destination) || this;\n _this.project = project;\n _this.count = 0;\n _this.thisArg = thisArg || _this;\n return _this;\n }\n MapSubscriber.prototype._next = function (value) {\n var result;\n try {\n result = this.project.call(this.thisArg, value, this.count++);\n }\n catch (err) {\n this.destination.error(err);\n return;\n }\n this.destination.next(result);\n };\n return MapSubscriber;\n}(Subscriber_1.Subscriber));\n//# sourceMappingURL=map.js.map",
+ "\"use strict\";\nvar __extends = (this && this.__extends) || (function () {\n var extendStatics = function (d, b) {\n extendStatics = Object.setPrototypeOf ||\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };\n return extendStatics(d, b);\n }\n return function (d, b) {\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n})();\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar Subscriber_1 = require(\"../Subscriber\");\nfunction mapTo(value) {\n return function (source) { return source.lift(new MapToOperator(value)); };\n}\nexports.mapTo = mapTo;\nvar MapToOperator = (function () {\n function MapToOperator(value) {\n this.value = value;\n }\n MapToOperator.prototype.call = function (subscriber, source) {\n return source.subscribe(new MapToSubscriber(subscriber, this.value));\n };\n return MapToOperator;\n}());\nvar MapToSubscriber = (function (_super) {\n __extends(MapToSubscriber, _super);\n function MapToSubscriber(destination, value) {\n var _this = _super.call(this, destination) || this;\n _this.value = value;\n return _this;\n }\n MapToSubscriber.prototype._next = function (x) {\n this.destination.next(this.value);\n };\n return MapToSubscriber;\n}(Subscriber_1.Subscriber));\n//# sourceMappingURL=mapTo.js.map",
+ "\"use strict\";\nvar __extends = (this && this.__extends) || (function () {\n var extendStatics = function (d, b) {\n extendStatics = Object.setPrototypeOf ||\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };\n return extendStatics(d, b);\n }\n return function (d, b) {\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n})();\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar Subscriber_1 = require(\"../Subscriber\");\nvar Notification_1 = require(\"../Notification\");\nfunction materialize() {\n return function materializeOperatorFunction(source) {\n return source.lift(new MaterializeOperator());\n };\n}\nexports.materialize = materialize;\nvar MaterializeOperator = (function () {\n function MaterializeOperator() {\n }\n MaterializeOperator.prototype.call = function (subscriber, source) {\n return source.subscribe(new MaterializeSubscriber(subscriber));\n };\n return MaterializeOperator;\n}());\nvar MaterializeSubscriber = (function (_super) {\n __extends(MaterializeSubscriber, _super);\n function MaterializeSubscriber(destination) {\n return _super.call(this, destination) || this;\n }\n MaterializeSubscriber.prototype._next = function (value) {\n this.destination.next(Notification_1.Notification.createNext(value));\n };\n MaterializeSubscriber.prototype._error = function (err) {\n var destination = this.destination;\n destination.next(Notification_1.Notification.createError(err));\n destination.complete();\n };\n MaterializeSubscriber.prototype._complete = function () {\n var destination = this.destination;\n destination.next(Notification_1.Notification.createComplete());\n destination.complete();\n };\n return MaterializeSubscriber;\n}(Subscriber_1.Subscriber));\n//# sourceMappingURL=materialize.js.map",
+ "\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar reduce_1 = require(\"./reduce\");\nfunction max(comparer) {\n var max = (typeof comparer === 'function')\n ? function (x, y) { return comparer(x, y) > 0 ? x : y; }\n : function (x, y) { return x > y ? x : y; };\n return reduce_1.reduce(max);\n}\nexports.max = max;\n//# sourceMappingURL=max.js.map",
+ "\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar merge_1 = require(\"../observable/merge\");\nfunction merge() {\n var observables = [];\n for (var _i = 0; _i < arguments.length; _i++) {\n observables[_i] = arguments[_i];\n }\n return function (source) { return source.lift.call(merge_1.merge.apply(void 0, [source].concat(observables))); };\n}\nexports.merge = merge;\n//# sourceMappingURL=merge.js.map",
+ "\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar mergeMap_1 = require(\"./mergeMap\");\nvar identity_1 = require(\"../util/identity\");\nfunction mergeAll(concurrent) {\n if (concurrent === void 0) { concurrent = Number.POSITIVE_INFINITY; }\n return mergeMap_1.mergeMap(identity_1.identity, concurrent);\n}\nexports.mergeAll = mergeAll;\n//# sourceMappingURL=mergeAll.js.map",
+ "\"use strict\";\nvar __extends = (this && this.__extends) || (function () {\n var extendStatics = function (d, b) {\n extendStatics = Object.setPrototypeOf ||\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };\n return extendStatics(d, b);\n }\n return function (d, b) {\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n})();\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar subscribeToResult_1 = require(\"../util/subscribeToResult\");\nvar OuterSubscriber_1 = require(\"../OuterSubscriber\");\nvar InnerSubscriber_1 = require(\"../InnerSubscriber\");\nvar map_1 = require(\"./map\");\nvar from_1 = require(\"../observable/from\");\nfunction mergeMap(project, resultSelector, concurrent) {\n if (concurrent === void 0) { concurrent = Number.POSITIVE_INFINITY; }\n if (typeof resultSelector === 'function') {\n return function (source) { return source.pipe(mergeMap(function (a, i) { return from_1.from(project(a, i)).pipe(map_1.map(function (b, ii) { return resultSelector(a, b, i, ii); })); }, concurrent)); };\n }\n else if (typeof resultSelector === 'number') {\n concurrent = resultSelector;\n }\n return function (source) { return source.lift(new MergeMapOperator(project, concurrent)); };\n}\nexports.mergeMap = mergeMap;\nvar MergeMapOperator = (function () {\n function MergeMapOperator(project, concurrent) {\n if (concurrent === void 0) { concurrent = Number.POSITIVE_INFINITY; }\n this.project = project;\n this.concurrent = concurrent;\n }\n MergeMapOperator.prototype.call = function (observer, source) {\n return source.subscribe(new MergeMapSubscriber(observer, this.project, this.concurrent));\n };\n return MergeMapOperator;\n}());\nexports.MergeMapOperator = MergeMapOperator;\nvar MergeMapSubscriber = (function (_super) {\n __extends(MergeMapSubscriber, _super);\n function MergeMapSubscriber(destination, project, concurrent) {\n if (concurrent === void 0) { concurrent = Number.POSITIVE_INFINITY; }\n var _this = _super.call(this, destination) || this;\n _this.project = project;\n _this.concurrent = concurrent;\n _this.hasCompleted = false;\n _this.buffer = [];\n _this.active = 0;\n _this.index = 0;\n return _this;\n }\n MergeMapSubscriber.prototype._next = function (value) {\n if (this.active < this.concurrent) {\n this._tryNext(value);\n }\n else {\n this.buffer.push(value);\n }\n };\n MergeMapSubscriber.prototype._tryNext = function (value) {\n var result;\n var index = this.index++;\n try {\n result = this.project(value, index);\n }\n catch (err) {\n this.destination.error(err);\n return;\n }\n this.active++;\n this._innerSub(result, value, index);\n };\n MergeMapSubscriber.prototype._innerSub = function (ish, value, index) {\n var innerSubscriber = new InnerSubscriber_1.InnerSubscriber(this, undefined, undefined);\n var destination = this.destination;\n destination.add(innerSubscriber);\n subscribeToResult_1.subscribeToResult(this, ish, value, index, innerSubscriber);\n };\n MergeMapSubscriber.prototype._complete = function () {\n this.hasCompleted = true;\n if (this.active === 0 && this.buffer.length === 0) {\n this.destination.complete();\n }\n this.unsubscribe();\n };\n MergeMapSubscriber.prototype.notifyNext = function (outerValue, innerValue, outerIndex, innerIndex, innerSub) {\n this.destination.next(innerValue);\n };\n MergeMapSubscriber.prototype.notifyComplete = function (innerSub) {\n var buffer = this.buffer;\n this.remove(innerSub);\n this.active--;\n if (buffer.length > 0) {\n this._next(buffer.shift());\n }\n else if (this.active === 0 && this.hasCompleted) {\n this.destination.complete();\n }\n };\n return MergeMapSubscriber;\n}(OuterSubscriber_1.OuterSubscriber));\nexports.MergeMapSubscriber = MergeMapSubscriber;\n//# sourceMappingURL=mergeMap.js.map",
+ "\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar mergeMap_1 = require(\"./mergeMap\");\nfunction mergeMapTo(innerObservable, resultSelector, concurrent) {\n if (concurrent === void 0) { concurrent = Number.POSITIVE_INFINITY; }\n if (typeof resultSelector === 'function') {\n return mergeMap_1.mergeMap(function () { return innerObservable; }, resultSelector, concurrent);\n }\n if (typeof resultSelector === 'number') {\n concurrent = resultSelector;\n }\n return mergeMap_1.mergeMap(function () { return innerObservable; }, concurrent);\n}\nexports.mergeMapTo = mergeMapTo;\n//# sourceMappingURL=mergeMapTo.js.map",
+ "\"use strict\";\nvar __extends = (this && this.__extends) || (function () {\n var extendStatics = function (d, b) {\n extendStatics = Object.setPrototypeOf ||\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };\n return extendStatics(d, b);\n }\n return function (d, b) {\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n})();\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar tryCatch_1 = require(\"../util/tryCatch\");\nvar errorObject_1 = require(\"../util/errorObject\");\nvar subscribeToResult_1 = require(\"../util/subscribeToResult\");\nvar OuterSubscriber_1 = require(\"../OuterSubscriber\");\nvar InnerSubscriber_1 = require(\"../InnerSubscriber\");\nfunction mergeScan(accumulator, seed, concurrent) {\n if (concurrent === void 0) { concurrent = Number.POSITIVE_INFINITY; }\n return function (source) { return source.lift(new MergeScanOperator(accumulator, seed, concurrent)); };\n}\nexports.mergeScan = mergeScan;\nvar MergeScanOperator = (function () {\n function MergeScanOperator(accumulator, seed, concurrent) {\n this.accumulator = accumulator;\n this.seed = seed;\n this.concurrent = concurrent;\n }\n MergeScanOperator.prototype.call = function (subscriber, source) {\n return source.subscribe(new MergeScanSubscriber(subscriber, this.accumulator, this.seed, this.concurrent));\n };\n return MergeScanOperator;\n}());\nexports.MergeScanOperator = MergeScanOperator;\nvar MergeScanSubscriber = (function (_super) {\n __extends(MergeScanSubscriber, _super);\n function MergeScanSubscriber(destination, accumulator, acc, concurrent) {\n var _this = _super.call(this, destination) || this;\n _this.accumulator = accumulator;\n _this.acc = acc;\n _this.concurrent = concurrent;\n _this.hasValue = false;\n _this.hasCompleted = false;\n _this.buffer = [];\n _this.active = 0;\n _this.index = 0;\n return _this;\n }\n MergeScanSubscriber.prototype._next = function (value) {\n if (this.active < this.concurrent) {\n var index = this.index++;\n var ish = tryCatch_1.tryCatch(this.accumulator)(this.acc, value);\n var destination = this.destination;\n if (ish === errorObject_1.errorObject) {\n destination.error(errorObject_1.errorObject.e);\n }\n else {\n this.active++;\n this._innerSub(ish, value, index);\n }\n }\n else {\n this.buffer.push(value);\n }\n };\n MergeScanSubscriber.prototype._innerSub = function (ish, value, index) {\n var innerSubscriber = new InnerSubscriber_1.InnerSubscriber(this, undefined, undefined);\n var destination = this.destination;\n destination.add(innerSubscriber);\n subscribeToResult_1.subscribeToResult(this, ish, value, index, innerSubscriber);\n };\n MergeScanSubscriber.prototype._complete = function () {\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 MergeScanSubscriber.prototype.notifyNext = function (outerValue, innerValue, outerIndex, innerIndex, innerSub) {\n var destination = this.destination;\n this.acc = innerValue;\n this.hasValue = true;\n destination.next(innerValue);\n };\n MergeScanSubscriber.prototype.notifyComplete = function (innerSub) {\n var buffer = this.buffer;\n var destination = this.destination;\n destination.remove(innerSub);\n this.active--;\n if (buffer.length > 0) {\n this._next(buffer.shift());\n }\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 return MergeScanSubscriber;\n}(OuterSubscriber_1.OuterSubscriber));\nexports.MergeScanSubscriber = MergeScanSubscriber;\n//# sourceMappingURL=mergeScan.js.map",
+ "\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar reduce_1 = require(\"./reduce\");\nfunction min(comparer) {\n var min = (typeof comparer === 'function')\n ? function (x, y) { return comparer(x, y) < 0 ? x : y; }\n : function (x, y) { return x < y ? x : y; };\n return reduce_1.reduce(min);\n}\nexports.min = min;\n//# sourceMappingURL=min.js.map",
+ "\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar ConnectableObservable_1 = require(\"../observable/ConnectableObservable\");\nfunction multicast(subjectOrSubjectFactory, selector) {\n return function multicastOperatorFunction(source) {\n var subjectFactory;\n if (typeof subjectOrSubjectFactory === 'function') {\n subjectFactory = subjectOrSubjectFactory;\n }\n else {\n subjectFactory = function subjectFactory() {\n return subjectOrSubjectFactory;\n };\n }\n if (typeof selector === 'function') {\n return source.lift(new MulticastOperator(subjectFactory, selector));\n }\n var connectable = Object.create(source, ConnectableObservable_1.connectableObservableDescriptor);\n connectable.source = source;\n connectable.subjectFactory = subjectFactory;\n return connectable;\n };\n}\nexports.multicast = multicast;\nvar MulticastOperator = (function () {\n function MulticastOperator(subjectFactory, selector) {\n this.subjectFactory = subjectFactory;\n this.selector = selector;\n }\n MulticastOperator.prototype.call = function (subscriber, source) {\n var selector = this.selector;\n var subject = this.subjectFactory();\n var subscription = selector(subject).subscribe(subscriber);\n subscription.add(source.subscribe(subject));\n return subscription;\n };\n return MulticastOperator;\n}());\nexports.MulticastOperator = MulticastOperator;\n//# sourceMappingURL=multicast.js.map",
+ "\"use strict\";\nvar __extends = (this && this.__extends) || (function () {\n var extendStatics = function (d, b) {\n extendStatics = Object.setPrototypeOf ||\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };\n return extendStatics(d, b);\n }\n return function (d, b) {\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n})();\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar Subscriber_1 = require(\"../Subscriber\");\nvar Notification_1 = require(\"../Notification\");\nfunction observeOn(scheduler, delay) {\n if (delay === void 0) { delay = 0; }\n return function observeOnOperatorFunction(source) {\n return source.lift(new ObserveOnOperator(scheduler, delay));\n };\n}\nexports.observeOn = observeOn;\nvar ObserveOnOperator = (function () {\n function ObserveOnOperator(scheduler, delay) {\n if (delay === void 0) { delay = 0; }\n this.scheduler = scheduler;\n this.delay = delay;\n }\n ObserveOnOperator.prototype.call = function (subscriber, source) {\n return source.subscribe(new ObserveOnSubscriber(subscriber, this.scheduler, this.delay));\n };\n return ObserveOnOperator;\n}());\nexports.ObserveOnOperator = ObserveOnOperator;\nvar ObserveOnSubscriber = (function (_super) {\n __extends(ObserveOnSubscriber, _super);\n function ObserveOnSubscriber(destination, scheduler, delay) {\n if (delay === void 0) { delay = 0; }\n var _this = _super.call(this, destination) || this;\n _this.scheduler = scheduler;\n _this.delay = delay;\n return _this;\n }\n ObserveOnSubscriber.dispatch = function (arg) {\n var notification = arg.notification, destination = arg.destination;\n notification.observe(destination);\n this.unsubscribe();\n };\n ObserveOnSubscriber.prototype.scheduleMessage = function (notification) {\n var destination = this.destination;\n destination.add(this.scheduler.schedule(ObserveOnSubscriber.dispatch, this.delay, new ObserveOnMessage(notification, this.destination)));\n };\n ObserveOnSubscriber.prototype._next = function (value) {\n this.scheduleMessage(Notification_1.Notification.createNext(value));\n };\n ObserveOnSubscriber.prototype._error = function (err) {\n this.scheduleMessage(Notification_1.Notification.createError(err));\n this.unsubscribe();\n };\n ObserveOnSubscriber.prototype._complete = function () {\n this.scheduleMessage(Notification_1.Notification.createComplete());\n this.unsubscribe();\n };\n return ObserveOnSubscriber;\n}(Subscriber_1.Subscriber));\nexports.ObserveOnSubscriber = ObserveOnSubscriber;\nvar ObserveOnMessage = (function () {\n function ObserveOnMessage(notification, destination) {\n this.notification = notification;\n this.destination = destination;\n }\n return ObserveOnMessage;\n}());\nexports.ObserveOnMessage = ObserveOnMessage;\n//# sourceMappingURL=observeOn.js.map",
+ "\"use strict\";\nvar __extends = (this && this.__extends) || (function () {\n var extendStatics = function (d, b) {\n extendStatics = Object.setPrototypeOf ||\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };\n return extendStatics(d, b);\n }\n return function (d, b) {\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n})();\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar from_1 = require(\"../observable/from\");\nvar isArray_1 = require(\"../util/isArray\");\nvar OuterSubscriber_1 = require(\"../OuterSubscriber\");\nvar InnerSubscriber_1 = require(\"../InnerSubscriber\");\nvar subscribeToResult_1 = require(\"../util/subscribeToResult\");\nfunction onErrorResumeNext() {\n var nextSources = [];\n for (var _i = 0; _i < arguments.length; _i++) {\n nextSources[_i] = arguments[_i];\n }\n if (nextSources.length === 1 && isArray_1.isArray(nextSources[0])) {\n nextSources = nextSources[0];\n }\n return function (source) { return source.lift(new OnErrorResumeNextOperator(nextSources)); };\n}\nexports.onErrorResumeNext = onErrorResumeNext;\nfunction onErrorResumeNextStatic() {\n var nextSources = [];\n for (var _i = 0; _i < arguments.length; _i++) {\n nextSources[_i] = arguments[_i];\n }\n var source = null;\n if (nextSources.length === 1 && isArray_1.isArray(nextSources[0])) {\n nextSources = nextSources[0];\n }\n source = nextSources.shift();\n return from_1.from(source, null).lift(new OnErrorResumeNextOperator(nextSources));\n}\nexports.onErrorResumeNextStatic = onErrorResumeNextStatic;\nvar OnErrorResumeNextOperator = (function () {\n function OnErrorResumeNextOperator(nextSources) {\n this.nextSources = nextSources;\n }\n OnErrorResumeNextOperator.prototype.call = function (subscriber, source) {\n return source.subscribe(new OnErrorResumeNextSubscriber(subscriber, this.nextSources));\n };\n return OnErrorResumeNextOperator;\n}());\nvar OnErrorResumeNextSubscriber = (function (_super) {\n __extends(OnErrorResumeNextSubscriber, _super);\n function OnErrorResumeNextSubscriber(destination, nextSources) {\n var _this = _super.call(this, destination) || this;\n _this.destination = destination;\n _this.nextSources = nextSources;\n return _this;\n }\n OnErrorResumeNextSubscriber.prototype.notifyError = function (error, innerSub) {\n this.subscribeToNextSource();\n };\n OnErrorResumeNextSubscriber.prototype.notifyComplete = function (innerSub) {\n this.subscribeToNextSource();\n };\n OnErrorResumeNextSubscriber.prototype._error = function (err) {\n this.subscribeToNextSource();\n this.unsubscribe();\n };\n OnErrorResumeNextSubscriber.prototype._complete = function () {\n this.subscribeToNextSource();\n this.unsubscribe();\n };\n OnErrorResumeNextSubscriber.prototype.subscribeToNextSource = function () {\n var next = this.nextSources.shift();\n if (next) {\n var innerSubscriber = new InnerSubscriber_1.InnerSubscriber(this, undefined, undefined);\n var destination = this.destination;\n destination.add(innerSubscriber);\n subscribeToResult_1.subscribeToResult(this, next, undefined, undefined, innerSubscriber);\n }\n else {\n this.destination.complete();\n }\n };\n return OnErrorResumeNextSubscriber;\n}(OuterSubscriber_1.OuterSubscriber));\n//# sourceMappingURL=onErrorResumeNext.js.map",
+ "\"use strict\";\nvar __extends = (this && this.__extends) || (function () {\n var extendStatics = function (d, b) {\n extendStatics = Object.setPrototypeOf ||\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };\n return extendStatics(d, b);\n }\n return function (d, b) {\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n})();\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar Subscriber_1 = require(\"../Subscriber\");\nfunction pairwise() {\n return function (source) { return source.lift(new PairwiseOperator()); };\n}\nexports.pairwise = pairwise;\nvar PairwiseOperator = (function () {\n function PairwiseOperator() {\n }\n PairwiseOperator.prototype.call = function (subscriber, source) {\n return source.subscribe(new PairwiseSubscriber(subscriber));\n };\n return PairwiseOperator;\n}());\nvar PairwiseSubscriber = (function (_super) {\n __extends(PairwiseSubscriber, _super);\n function PairwiseSubscriber(destination) {\n var _this = _super.call(this, destination) || this;\n _this.hasPrev = false;\n return _this;\n }\n PairwiseSubscriber.prototype._next = function (value) {\n if (this.hasPrev) {\n this.destination.next([this.prev, value]);\n }\n else {\n this.hasPrev = true;\n }\n this.prev = value;\n };\n return PairwiseSubscriber;\n}(Subscriber_1.Subscriber));\n//# sourceMappingURL=pairwise.js.map",
+ "\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar not_1 = require(\"../util/not\");\nvar filter_1 = require(\"./filter\");\nfunction partition(predicate, thisArg) {\n return function (source) { return [\n filter_1.filter(predicate, thisArg)(source),\n filter_1.filter(not_1.not(predicate, thisArg))(source)\n ]; };\n}\nexports.partition = partition;\n//# sourceMappingURL=partition.js.map",
+ "\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar map_1 = require(\"./map\");\nfunction pluck() {\n var properties = [];\n for (var _i = 0; _i < arguments.length; _i++) {\n properties[_i] = arguments[_i];\n }\n var length = properties.length;\n if (length === 0) {\n throw new Error('list of properties cannot be empty.');\n }\n return function (source) { return map_1.map(plucker(properties, length))(source); };\n}\nexports.pluck = pluck;\nfunction plucker(props, length) {\n var mapper = function (x) {\n var currentProp = x;\n for (var i = 0; i < length; i++) {\n var p = currentProp[props[i]];\n if (typeof p !== 'undefined') {\n currentProp = p;\n }\n else {\n return undefined;\n }\n }\n return currentProp;\n };\n return mapper;\n}\n//# sourceMappingURL=pluck.js.map",
+ "\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar Subject_1 = require(\"../Subject\");\nvar multicast_1 = require(\"./multicast\");\nfunction publish(selector) {\n return selector ?\n multicast_1.multicast(function () { return new Subject_1.Subject(); }, selector) :\n multicast_1.multicast(new Subject_1.Subject());\n}\nexports.publish = publish;\n//# sourceMappingURL=publish.js.map",
+ "\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar BehaviorSubject_1 = require(\"../BehaviorSubject\");\nvar multicast_1 = require(\"./multicast\");\nfunction publishBehavior(value) {\n return function (source) { return multicast_1.multicast(new BehaviorSubject_1.BehaviorSubject(value))(source); };\n}\nexports.publishBehavior = publishBehavior;\n//# sourceMappingURL=publishBehavior.js.map",
+ "\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar AsyncSubject_1 = require(\"../AsyncSubject\");\nvar multicast_1 = require(\"./multicast\");\nfunction publishLast() {\n return function (source) { return multicast_1.multicast(new AsyncSubject_1.AsyncSubject())(source); };\n}\nexports.publishLast = publishLast;\n//# sourceMappingURL=publishLast.js.map",
+ "\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar ReplaySubject_1 = require(\"../ReplaySubject\");\nvar multicast_1 = require(\"./multicast\");\nfunction publishReplay(bufferSize, windowTime, selectorOrScheduler, scheduler) {\n if (selectorOrScheduler && typeof selectorOrScheduler !== 'function') {\n scheduler = selectorOrScheduler;\n }\n var selector = typeof selectorOrScheduler === 'function' ? selectorOrScheduler : undefined;\n var subject = new ReplaySubject_1.ReplaySubject(bufferSize, windowTime, scheduler);\n return function (source) { return multicast_1.multicast(function () { return subject; }, selector)(source); };\n}\nexports.publishReplay = publishReplay;\n//# sourceMappingURL=publishReplay.js.map",
+ "\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar isArray_1 = require(\"../util/isArray\");\nvar race_1 = require(\"../observable/race\");\nfunction race() {\n var observables = [];\n for (var _i = 0; _i < arguments.length; _i++) {\n observables[_i] = arguments[_i];\n }\n return function raceOperatorFunction(source) {\n if (observables.length === 1 && isArray_1.isArray(observables[0])) {\n observables = observables[0];\n }\n return source.lift.call(race_1.race.apply(void 0, [source].concat(observables)));\n };\n}\nexports.race = race;\n//# sourceMappingURL=race.js.map",
+ "\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar scan_1 = require(\"./scan\");\nvar takeLast_1 = require(\"./takeLast\");\nvar defaultIfEmpty_1 = require(\"./defaultIfEmpty\");\nvar pipe_1 = require(\"../util/pipe\");\nfunction reduce(accumulator, seed) {\n if (arguments.length >= 2) {\n return function reduceOperatorFunctionWithSeed(source) {\n return pipe_1.pipe(scan_1.scan(accumulator, seed), takeLast_1.takeLast(1), defaultIfEmpty_1.defaultIfEmpty(seed))(source);\n };\n }\n return function reduceOperatorFunction(source) {\n return pipe_1.pipe(scan_1.scan(function (acc, value, index) { return accumulator(acc, value, index + 1); }), takeLast_1.takeLast(1))(source);\n };\n}\nexports.reduce = reduce;\n//# sourceMappingURL=reduce.js.map",
+ "\"use strict\";\nvar __extends = (this && this.__extends) || (function () {\n var extendStatics = function (d, b) {\n extendStatics = Object.setPrototypeOf ||\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };\n return extendStatics(d, b);\n }\n return function (d, b) {\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n})();\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar Subscriber_1 = require(\"../Subscriber\");\nfunction refCount() {\n return function refCountOperatorFunction(source) {\n return source.lift(new RefCountOperator(source));\n };\n}\nexports.refCount = refCount;\nvar RefCountOperator = (function () {\n function RefCountOperator(connectable) {\n this.connectable = connectable;\n }\n RefCountOperator.prototype.call = function (subscriber, source) {\n var connectable = this.connectable;\n connectable._refCount++;\n var refCounter = new RefCountSubscriber(subscriber, connectable);\n var subscription = source.subscribe(refCounter);\n if (!refCounter.closed) {\n refCounter.connection = connectable.connect();\n }\n return subscription;\n };\n return RefCountOperator;\n}());\nvar RefCountSubscriber = (function (_super) {\n __extends(RefCountSubscriber, _super);\n function RefCountSubscriber(destination, connectable) {\n var _this = _super.call(this, destination) || this;\n _this.connectable = connectable;\n return _this;\n }\n RefCountSubscriber.prototype._unsubscribe = function () {\n var connectable = this.connectable;\n if (!connectable) {\n this.connection = null;\n return;\n }\n this.connectable = null;\n var refCount = connectable._refCount;\n if (refCount <= 0) {\n this.connection = null;\n return;\n }\n connectable._refCount = refCount - 1;\n if (refCount > 1) {\n this.connection = null;\n return;\n }\n var connection = this.connection;\n var sharedConnection = connectable._connection;\n this.connection = null;\n if (sharedConnection && (!connection || sharedConnection === connection)) {\n sharedConnection.unsubscribe();\n }\n };\n return RefCountSubscriber;\n}(Subscriber_1.Subscriber));\n//# sourceMappingURL=refCount.js.map",
+ "\"use strict\";\nvar __extends = (this && this.__extends) || (function () {\n var extendStatics = function (d, b) {\n extendStatics = Object.setPrototypeOf ||\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };\n return extendStatics(d, b);\n }\n return function (d, b) {\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n})();\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar Subscriber_1 = require(\"../Subscriber\");\nvar empty_1 = require(\"../observable/empty\");\nfunction repeat(count) {\n if (count === void 0) { count = -1; }\n return function (source) {\n if (count === 0) {\n return empty_1.empty();\n }\n else if (count < 0) {\n return source.lift(new RepeatOperator(-1, source));\n }\n else {\n return source.lift(new RepeatOperator(count - 1, source));\n }\n };\n}\nexports.repeat = repeat;\nvar RepeatOperator = (function () {\n function RepeatOperator(count, source) {\n this.count = count;\n this.source = source;\n }\n RepeatOperator.prototype.call = function (subscriber, source) {\n return source.subscribe(new RepeatSubscriber(subscriber, this.count, this.source));\n };\n return RepeatOperator;\n}());\nvar RepeatSubscriber = (function (_super) {\n __extends(RepeatSubscriber, _super);\n function RepeatSubscriber(destination, count, source) {\n var _this = _super.call(this, destination) || this;\n _this.count = count;\n _this.source = source;\n return _this;\n }\n RepeatSubscriber.prototype.complete = function () {\n if (!this.isStopped) {\n var _a = this, source = _a.source, count = _a.count;\n if (count === 0) {\n return _super.prototype.complete.call(this);\n }\n else if (count > -1) {\n this.count = count - 1;\n }\n source.subscribe(this._unsubscribeAndRecycle());\n }\n };\n return RepeatSubscriber;\n}(Subscriber_1.Subscriber));\n//# sourceMappingURL=repeat.js.map",
+ "\"use strict\";\nvar __extends = (this && this.__extends) || (function () {\n var extendStatics = function (d, b) {\n extendStatics = Object.setPrototypeOf ||\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };\n return extendStatics(d, b);\n }\n return function (d, b) {\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n})();\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar Subject_1 = require(\"../Subject\");\nvar tryCatch_1 = require(\"../util/tryCatch\");\nvar errorObject_1 = require(\"../util/errorObject\");\nvar OuterSubscriber_1 = require(\"../OuterSubscriber\");\nvar subscribeToResult_1 = require(\"../util/subscribeToResult\");\nfunction repeatWhen(notifier) {\n return function (source) { return source.lift(new RepeatWhenOperator(notifier)); };\n}\nexports.repeatWhen = repeatWhen;\nvar RepeatWhenOperator = (function () {\n function RepeatWhenOperator(notifier) {\n this.notifier = notifier;\n }\n RepeatWhenOperator.prototype.call = function (subscriber, source) {\n return source.subscribe(new RepeatWhenSubscriber(subscriber, this.notifier, source));\n };\n return RepeatWhenOperator;\n}());\nvar RepeatWhenSubscriber = (function (_super) {\n __extends(RepeatWhenSubscriber, _super);\n function RepeatWhenSubscriber(destination, notifier, source) {\n var _this = _super.call(this, destination) || this;\n _this.notifier = notifier;\n _this.source = source;\n _this.sourceIsBeingSubscribedTo = true;\n return _this;\n }\n RepeatWhenSubscriber.prototype.notifyNext = function (outerValue, innerValue, outerIndex, innerIndex, innerSub) {\n this.sourceIsBeingSubscribedTo = true;\n this.source.subscribe(this);\n };\n RepeatWhenSubscriber.prototype.notifyComplete = function (innerSub) {\n if (this.sourceIsBeingSubscribedTo === false) {\n return _super.prototype.complete.call(this);\n }\n };\n RepeatWhenSubscriber.prototype.complete = function () {\n this.sourceIsBeingSubscribedTo = false;\n if (!this.isStopped) {\n if (!this.retries) {\n this.subscribeToRetries();\n }\n if (!this.retriesSubscription || this.retriesSubscription.closed) {\n return _super.prototype.complete.call(this);\n }\n this._unsubscribeAndRecycle();\n this.notifications.next();\n }\n };\n RepeatWhenSubscriber.prototype._unsubscribe = function () {\n var _a = this, notifications = _a.notifications, retriesSubscription = _a.retriesSubscription;\n if (notifications) {\n notifications.unsubscribe();\n this.notifications = null;\n }\n if (retriesSubscription) {\n retriesSubscription.unsubscribe();\n this.retriesSubscription = null;\n }\n this.retries = null;\n };\n RepeatWhenSubscriber.prototype._unsubscribeAndRecycle = function () {\n var _unsubscribe = this._unsubscribe;\n this._unsubscribe = null;\n _super.prototype._unsubscribeAndRecycle.call(this);\n this._unsubscribe = _unsubscribe;\n return this;\n };\n RepeatWhenSubscriber.prototype.subscribeToRetries = function () {\n this.notifications = new Subject_1.Subject();\n var retries = tryCatch_1.tryCatch(this.notifier)(this.notifications);\n if (retries === errorObject_1.errorObject) {\n return _super.prototype.complete.call(this);\n }\n this.retries = retries;\n this.retriesSubscription = subscribeToResult_1.subscribeToResult(this, retries);\n };\n return RepeatWhenSubscriber;\n}(OuterSubscriber_1.OuterSubscriber));\n//# sourceMappingURL=repeatWhen.js.map",
+ "\"use strict\";\nvar __extends = (this && this.__extends) || (function () {\n var extendStatics = function (d, b) {\n extendStatics = Object.setPrototypeOf ||\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };\n return extendStatics(d, b);\n }\n return function (d, b) {\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n})();\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar Subscriber_1 = require(\"../Subscriber\");\nfunction retry(count) {\n if (count === void 0) { count = -1; }\n return function (source) { return source.lift(new RetryOperator(count, source)); };\n}\nexports.retry = retry;\nvar RetryOperator = (function () {\n function RetryOperator(count, source) {\n this.count = count;\n this.source = source;\n }\n RetryOperator.prototype.call = function (subscriber, source) {\n return source.subscribe(new RetrySubscriber(subscriber, this.count, this.source));\n };\n return RetryOperator;\n}());\nvar RetrySubscriber = (function (_super) {\n __extends(RetrySubscriber, _super);\n function RetrySubscriber(destination, count, source) {\n var _this = _super.call(this, destination) || this;\n _this.count = count;\n _this.source = source;\n return _this;\n }\n RetrySubscriber.prototype.error = function (err) {\n if (!this.isStopped) {\n var _a = this, source = _a.source, count = _a.count;\n if (count === 0) {\n return _super.prototype.error.call(this, err);\n }\n else if (count > -1) {\n this.count = count - 1;\n }\n source.subscribe(this._unsubscribeAndRecycle());\n }\n };\n return RetrySubscriber;\n}(Subscriber_1.Subscriber));\n//# sourceMappingURL=retry.js.map",
+ "\"use strict\";\nvar __extends = (this && this.__extends) || (function () {\n var extendStatics = function (d, b) {\n extendStatics = Object.setPrototypeOf ||\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };\n return extendStatics(d, b);\n }\n return function (d, b) {\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n})();\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar Subject_1 = require(\"../Subject\");\nvar tryCatch_1 = require(\"../util/tryCatch\");\nvar errorObject_1 = require(\"../util/errorObject\");\nvar OuterSubscriber_1 = require(\"../OuterSubscriber\");\nvar subscribeToResult_1 = require(\"../util/subscribeToResult\");\nfunction retryWhen(notifier) {\n return function (source) { return source.lift(new RetryWhenOperator(notifier, source)); };\n}\nexports.retryWhen = retryWhen;\nvar RetryWhenOperator = (function () {\n function RetryWhenOperator(notifier, source) {\n this.notifier = notifier;\n this.source = source;\n }\n RetryWhenOperator.prototype.call = function (subscriber, source) {\n return source.subscribe(new RetryWhenSubscriber(subscriber, this.notifier, this.source));\n };\n return RetryWhenOperator;\n}());\nvar RetryWhenSubscriber = (function (_super) {\n __extends(RetryWhenSubscriber, _super);\n function RetryWhenSubscriber(destination, notifier, source) {\n var _this = _super.call(this, destination) || this;\n _this.notifier = notifier;\n _this.source = source;\n return _this;\n }\n RetryWhenSubscriber.prototype.error = function (err) {\n if (!this.isStopped) {\n var errors = this.errors;\n var retries = this.retries;\n var retriesSubscription = this.retriesSubscription;\n if (!retries) {\n errors = new Subject_1.Subject();\n retries = tryCatch_1.tryCatch(this.notifier)(errors);\n if (retries === errorObject_1.errorObject) {\n return _super.prototype.error.call(this, errorObject_1.errorObject.e);\n }\n retriesSubscription = subscribeToResult_1.subscribeToResult(this, retries);\n }\n else {\n this.errors = null;\n this.retriesSubscription = null;\n }\n this._unsubscribeAndRecycle();\n this.errors = errors;\n this.retries = retries;\n this.retriesSubscription = retriesSubscription;\n errors.next(err);\n }\n };\n RetryWhenSubscriber.prototype._unsubscribe = function () {\n var _a = this, errors = _a.errors, retriesSubscription = _a.retriesSubscription;\n if (errors) {\n errors.unsubscribe();\n this.errors = null;\n }\n if (retriesSubscription) {\n retriesSubscription.unsubscribe();\n this.retriesSubscription = null;\n }\n this.retries = null;\n };\n RetryWhenSubscriber.prototype.notifyNext = function (outerValue, innerValue, outerIndex, innerIndex, innerSub) {\n var _unsubscribe = this._unsubscribe;\n this._unsubscribe = null;\n this._unsubscribeAndRecycle();\n this._unsubscribe = _unsubscribe;\n this.source.subscribe(this);\n };\n return RetryWhenSubscriber;\n}(OuterSubscriber_1.OuterSubscriber));\n//# sourceMappingURL=retryWhen.js.map",
+ "\"use strict\";\nvar __extends = (this && this.__extends) || (function () {\n var extendStatics = function (d, b) {\n extendStatics = Object.setPrototypeOf ||\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };\n return extendStatics(d, b);\n }\n return function (d, b) {\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n})();\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar OuterSubscriber_1 = require(\"../OuterSubscriber\");\nvar subscribeToResult_1 = require(\"../util/subscribeToResult\");\nfunction sample(notifier) {\n return function (source) { return source.lift(new SampleOperator(notifier)); };\n}\nexports.sample = sample;\nvar SampleOperator = (function () {\n function SampleOperator(notifier) {\n this.notifier = notifier;\n }\n SampleOperator.prototype.call = function (subscriber, source) {\n var sampleSubscriber = new SampleSubscriber(subscriber);\n var subscription = source.subscribe(sampleSubscriber);\n subscription.add(subscribeToResult_1.subscribeToResult(sampleSubscriber, this.notifier));\n return subscription;\n };\n return SampleOperator;\n}());\nvar SampleSubscriber = (function (_super) {\n __extends(SampleSubscriber, _super);\n function SampleSubscriber() {\n var _this = _super !== null && _super.apply(this, arguments) || this;\n _this.hasValue = false;\n return _this;\n }\n SampleSubscriber.prototype._next = function (value) {\n this.value = value;\n this.hasValue = true;\n };\n SampleSubscriber.prototype.notifyNext = function (outerValue, innerValue, outerIndex, innerIndex, innerSub) {\n this.emitValue();\n };\n SampleSubscriber.prototype.notifyComplete = function () {\n this.emitValue();\n };\n SampleSubscriber.prototype.emitValue = function () {\n if (this.hasValue) {\n this.hasValue = false;\n this.destination.next(this.value);\n }\n };\n return SampleSubscriber;\n}(OuterSubscriber_1.OuterSubscriber));\n//# sourceMappingURL=sample.js.map",
+ "\"use strict\";\nvar __extends = (this && this.__extends) || (function () {\n var extendStatics = function (d, b) {\n extendStatics = Object.setPrototypeOf ||\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };\n return extendStatics(d, b);\n }\n return function (d, b) {\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n})();\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar Subscriber_1 = require(\"../Subscriber\");\nvar async_1 = require(\"../scheduler/async\");\nfunction sampleTime(period, scheduler) {\n if (scheduler === void 0) { scheduler = async_1.async; }\n return function (source) { return source.lift(new SampleTimeOperator(period, scheduler)); };\n}\nexports.sampleTime = sampleTime;\nvar SampleTimeOperator = (function () {\n function SampleTimeOperator(period, scheduler) {\n this.period = period;\n this.scheduler = scheduler;\n }\n SampleTimeOperator.prototype.call = function (subscriber, source) {\n return source.subscribe(new SampleTimeSubscriber(subscriber, this.period, this.scheduler));\n };\n return SampleTimeOperator;\n}());\nvar SampleTimeSubscriber = (function (_super) {\n __extends(SampleTimeSubscriber, _super);\n function SampleTimeSubscriber(destination, period, scheduler) {\n var _this = _super.call(this, destination) || this;\n _this.period = period;\n _this.scheduler = scheduler;\n _this.hasValue = false;\n _this.add(scheduler.schedule(dispatchNotification, period, { subscriber: _this, period: period }));\n return _this;\n }\n SampleTimeSubscriber.prototype._next = function (value) {\n this.lastValue = value;\n this.hasValue = true;\n };\n SampleTimeSubscriber.prototype.notifyNext = function () {\n if (this.hasValue) {\n this.hasValue = false;\n this.destination.next(this.lastValue);\n }\n };\n return SampleTimeSubscriber;\n}(Subscriber_1.Subscriber));\nfunction dispatchNotification(state) {\n var subscriber = state.subscriber, period = state.period;\n subscriber.notifyNext();\n this.schedule(state, period);\n}\n//# sourceMappingURL=sampleTime.js.map",
+ "\"use strict\";\nvar __extends = (this && this.__extends) || (function () {\n var extendStatics = function (d, b) {\n extendStatics = Object.setPrototypeOf ||\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };\n return extendStatics(d, b);\n }\n return function (d, b) {\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n})();\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar Subscriber_1 = require(\"../Subscriber\");\nfunction scan(accumulator, seed) {\n var hasSeed = false;\n if (arguments.length >= 2) {\n hasSeed = true;\n }\n return function scanOperatorFunction(source) {\n return source.lift(new ScanOperator(accumulator, seed, hasSeed));\n };\n}\nexports.scan = scan;\nvar ScanOperator = (function () {\n function ScanOperator(accumulator, seed, hasSeed) {\n if (hasSeed === void 0) { hasSeed = false; }\n this.accumulator = accumulator;\n this.seed = seed;\n this.hasSeed = hasSeed;\n }\n ScanOperator.prototype.call = function (subscriber, source) {\n return source.subscribe(new ScanSubscriber(subscriber, this.accumulator, this.seed, this.hasSeed));\n };\n return ScanOperator;\n}());\nvar ScanSubscriber = (function (_super) {\n __extends(ScanSubscriber, _super);\n function ScanSubscriber(destination, accumulator, _seed, hasSeed) {\n var _this = _super.call(this, destination) || this;\n _this.accumulator = accumulator;\n _this._seed = _seed;\n _this.hasSeed = hasSeed;\n _this.index = 0;\n return _this;\n }\n Object.defineProperty(ScanSubscriber.prototype, \"seed\", {\n get: function () {\n return this._seed;\n },\n set: function (value) {\n this.hasSeed = true;\n this._seed = value;\n },\n enumerable: true,\n configurable: true\n });\n ScanSubscriber.prototype._next = function (value) {\n if (!this.hasSeed) {\n this.seed = value;\n this.destination.next(value);\n }\n else {\n return this._tryNext(value);\n }\n };\n ScanSubscriber.prototype._tryNext = function (value) {\n var index = this.index++;\n var result;\n try {\n result = this.accumulator(this.seed, value, index);\n }\n catch (err) {\n this.destination.error(err);\n }\n this.seed = result;\n this.destination.next(result);\n };\n return ScanSubscriber;\n}(Subscriber_1.Subscriber));\n//# sourceMappingURL=scan.js.map",
+ "\"use strict\";\nvar __extends = (this && this.__extends) || (function () {\n var extendStatics = function (d, b) {\n extendStatics = Object.setPrototypeOf ||\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };\n return extendStatics(d, b);\n }\n return function (d, b) {\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n})();\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar Subscriber_1 = require(\"../Subscriber\");\nvar tryCatch_1 = require(\"../util/tryCatch\");\nvar errorObject_1 = require(\"../util/errorObject\");\nfunction sequenceEqual(compareTo, comparor) {\n return function (source) { return source.lift(new SequenceEqualOperator(compareTo, comparor)); };\n}\nexports.sequenceEqual = sequenceEqual;\nvar SequenceEqualOperator = (function () {\n function SequenceEqualOperator(compareTo, comparor) {\n this.compareTo = compareTo;\n this.comparor = comparor;\n }\n SequenceEqualOperator.prototype.call = function (subscriber, source) {\n return source.subscribe(new SequenceEqualSubscriber(subscriber, this.compareTo, this.comparor));\n };\n return SequenceEqualOperator;\n}());\nexports.SequenceEqualOperator = SequenceEqualOperator;\nvar SequenceEqualSubscriber = (function (_super) {\n __extends(SequenceEqualSubscriber, _super);\n function SequenceEqualSubscriber(destination, compareTo, comparor) {\n var _this = _super.call(this, destination) || this;\n _this.compareTo = compareTo;\n _this.comparor = comparor;\n _this._a = [];\n _this._b = [];\n _this._oneComplete = false;\n _this.destination.add(compareTo.subscribe(new SequenceEqualCompareToSubscriber(destination, _this)));\n return _this;\n }\n SequenceEqualSubscriber.prototype._next = function (value) {\n if (this._oneComplete && this._b.length === 0) {\n this.emit(false);\n }\n else {\n this._a.push(value);\n this.checkValues();\n }\n };\n SequenceEqualSubscriber.prototype._complete = function () {\n if (this._oneComplete) {\n this.emit(this._a.length === 0 && this._b.length === 0);\n }\n else {\n this._oneComplete = true;\n }\n this.unsubscribe();\n };\n SequenceEqualSubscriber.prototype.checkValues = function () {\n var _c = this, _a = _c._a, _b = _c._b, comparor = _c.comparor;\n while (_a.length > 0 && _b.length > 0) {\n var a = _a.shift();\n var b = _b.shift();\n var areEqual = false;\n if (comparor) {\n areEqual = tryCatch_1.tryCatch(comparor)(a, b);\n if (areEqual === errorObject_1.errorObject) {\n this.destination.error(errorObject_1.errorObject.e);\n }\n }\n else {\n areEqual = a === b;\n }\n if (!areEqual) {\n this.emit(false);\n }\n }\n };\n SequenceEqualSubscriber.prototype.emit = function (value) {\n var destination = this.destination;\n destination.next(value);\n destination.complete();\n };\n SequenceEqualSubscriber.prototype.nextB = function (value) {\n if (this._oneComplete && this._a.length === 0) {\n this.emit(false);\n }\n else {\n this._b.push(value);\n this.checkValues();\n }\n };\n SequenceEqualSubscriber.prototype.completeB = function () {\n if (this._oneComplete) {\n this.emit(this._a.length === 0 && this._b.length === 0);\n }\n else {\n this._oneComplete = true;\n }\n };\n return SequenceEqualSubscriber;\n}(Subscriber_1.Subscriber));\nexports.SequenceEqualSubscriber = SequenceEqualSubscriber;\nvar SequenceEqualCompareToSubscriber = (function (_super) {\n __extends(SequenceEqualCompareToSubscriber, _super);\n function SequenceEqualCompareToSubscriber(destination, parent) {\n var _this = _super.call(this, destination) || this;\n _this.parent = parent;\n return _this;\n }\n SequenceEqualCompareToSubscriber.prototype._next = function (value) {\n this.parent.nextB(value);\n };\n SequenceEqualCompareToSubscriber.prototype._error = function (err) {\n this.parent.error(err);\n this.unsubscribe();\n };\n SequenceEqualCompareToSubscriber.prototype._complete = function () {\n this.parent.completeB();\n this.unsubscribe();\n };\n return SequenceEqualCompareToSubscriber;\n}(Subscriber_1.Subscriber));\n//# sourceMappingURL=sequenceEqual.js.map",
+ "\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar multicast_1 = require(\"./multicast\");\nvar refCount_1 = require(\"./refCount\");\nvar Subject_1 = require(\"../Subject\");\nfunction shareSubjectFactory() {\n return new Subject_1.Subject();\n}\nfunction share() {\n return function (source) { return refCount_1.refCount()(multicast_1.multicast(shareSubjectFactory)(source)); };\n}\nexports.share = share;\n//# sourceMappingURL=share.js.map",
+ "\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar ReplaySubject_1 = require(\"../ReplaySubject\");\nfunction shareReplay(bufferSize, windowTime, scheduler) {\n if (bufferSize === void 0) { bufferSize = Number.POSITIVE_INFINITY; }\n if (windowTime === void 0) { windowTime = Number.POSITIVE_INFINITY; }\n return function (source) { return source.lift(shareReplayOperator(bufferSize, windowTime, scheduler)); };\n}\nexports.shareReplay = shareReplay;\nfunction shareReplayOperator(bufferSize, windowTime, scheduler) {\n var subject;\n var refCount = 0;\n var subscription;\n var hasError = false;\n var isComplete = false;\n return function shareReplayOperation(source) {\n refCount++;\n if (!subject || hasError) {\n hasError = false;\n subject = new ReplaySubject_1.ReplaySubject(bufferSize, windowTime, scheduler);\n subscription = source.subscribe({\n next: function (value) { subject.next(value); },\n error: function (err) {\n hasError = true;\n subject.error(err);\n },\n complete: function () {\n isComplete = true;\n subject.complete();\n },\n });\n }\n var innerSub = subject.subscribe(this);\n return function () {\n refCount--;\n innerSub.unsubscribe();\n if (subscription && refCount === 0 && isComplete) {\n subscription.unsubscribe();\n }\n };\n };\n}\n//# sourceMappingURL=shareReplay.js.map",
+ "\"use strict\";\nvar __extends = (this && this.__extends) || (function () {\n var extendStatics = function (d, b) {\n extendStatics = Object.setPrototypeOf ||\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };\n return extendStatics(d, b);\n }\n return function (d, b) {\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n})();\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar Subscriber_1 = require(\"../Subscriber\");\nvar EmptyError_1 = require(\"../util/EmptyError\");\nfunction single(predicate) {\n return function (source) { return source.lift(new SingleOperator(predicate, source)); };\n}\nexports.single = single;\nvar SingleOperator = (function () {\n function SingleOperator(predicate, source) {\n this.predicate = predicate;\n this.source = source;\n }\n SingleOperator.prototype.call = function (subscriber, source) {\n return source.subscribe(new SingleSubscriber(subscriber, this.predicate, this.source));\n };\n return SingleOperator;\n}());\nvar SingleSubscriber = (function (_super) {\n __extends(SingleSubscriber, _super);\n function SingleSubscriber(destination, predicate, source) {\n var _this = _super.call(this, destination) || this;\n _this.predicate = predicate;\n _this.source = source;\n _this.seenValue = false;\n _this.index = 0;\n return _this;\n }\n SingleSubscriber.prototype.applySingleValue = function (value) {\n if (this.seenValue) {\n this.destination.error('Sequence contains more than one element');\n }\n else {\n this.seenValue = true;\n this.singleValue = value;\n }\n };\n SingleSubscriber.prototype._next = function (value) {\n var index = this.index++;\n if (this.predicate) {\n this.tryNext(value, index);\n }\n else {\n this.applySingleValue(value);\n }\n };\n SingleSubscriber.prototype.tryNext = function (value, index) {\n try {\n if (this.predicate(value, index, this.source)) {\n this.applySingleValue(value);\n }\n }\n catch (err) {\n this.destination.error(err);\n }\n };\n SingleSubscriber.prototype._complete = function () {\n var destination = this.destination;\n if (this.index > 0) {\n destination.next(this.seenValue ? this.singleValue : undefined);\n destination.complete();\n }\n else {\n destination.error(new EmptyError_1.EmptyError);\n }\n };\n return SingleSubscriber;\n}(Subscriber_1.Subscriber));\n//# sourceMappingURL=single.js.map",
+ "\"use strict\";\nvar __extends = (this && this.__extends) || (function () {\n var extendStatics = function (d, b) {\n extendStatics = Object.setPrototypeOf ||\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };\n return extendStatics(d, b);\n }\n return function (d, b) {\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n})();\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar Subscriber_1 = require(\"../Subscriber\");\nfunction skip(count) {\n return function (source) { return source.lift(new SkipOperator(count)); };\n}\nexports.skip = skip;\nvar SkipOperator = (function () {\n function SkipOperator(total) {\n this.total = total;\n }\n SkipOperator.prototype.call = function (subscriber, source) {\n return source.subscribe(new SkipSubscriber(subscriber, this.total));\n };\n return SkipOperator;\n}());\nvar SkipSubscriber = (function (_super) {\n __extends(SkipSubscriber, _super);\n function SkipSubscriber(destination, total) {\n var _this = _super.call(this, destination) || this;\n _this.total = total;\n _this.count = 0;\n return _this;\n }\n SkipSubscriber.prototype._next = function (x) {\n if (++this.count > this.total) {\n this.destination.next(x);\n }\n };\n return SkipSubscriber;\n}(Subscriber_1.Subscriber));\n//# sourceMappingURL=skip.js.map",
+ "\"use strict\";\nvar __extends = (this && this.__extends) || (function () {\n var extendStatics = function (d, b) {\n extendStatics = Object.setPrototypeOf ||\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };\n return extendStatics(d, b);\n }\n return function (d, b) {\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n})();\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar Subscriber_1 = require(\"../Subscriber\");\nvar ArgumentOutOfRangeError_1 = require(\"../util/ArgumentOutOfRangeError\");\nfunction skipLast(count) {\n return function (source) { return source.lift(new SkipLastOperator(count)); };\n}\nexports.skipLast = skipLast;\nvar SkipLastOperator = (function () {\n function SkipLastOperator(_skipCount) {\n this._skipCount = _skipCount;\n if (this._skipCount < 0) {\n throw new ArgumentOutOfRangeError_1.ArgumentOutOfRangeError;\n }\n }\n SkipLastOperator.prototype.call = function (subscriber, source) {\n if (this._skipCount === 0) {\n return source.subscribe(new Subscriber_1.Subscriber(subscriber));\n }\n else {\n return source.subscribe(new SkipLastSubscriber(subscriber, this._skipCount));\n }\n };\n return SkipLastOperator;\n}());\nvar SkipLastSubscriber = (function (_super) {\n __extends(SkipLastSubscriber, _super);\n function SkipLastSubscriber(destination, _skipCount) {\n var _this = _super.call(this, destination) || this;\n _this._skipCount = _skipCount;\n _this._count = 0;\n _this._ring = new Array(_skipCount);\n return _this;\n }\n SkipLastSubscriber.prototype._next = function (value) {\n var skipCount = this._skipCount;\n var count = this._count++;\n if (count < skipCount) {\n this._ring[count] = value;\n }\n else {\n var currentIndex = count % skipCount;\n var ring = this._ring;\n var oldValue = ring[currentIndex];\n ring[currentIndex] = value;\n this.destination.next(oldValue);\n }\n };\n return SkipLastSubscriber;\n}(Subscriber_1.Subscriber));\n//# sourceMappingURL=skipLast.js.map",
+ "\"use strict\";\nvar __extends = (this && this.__extends) || (function () {\n var extendStatics = function (d, b) {\n extendStatics = Object.setPrototypeOf ||\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };\n return extendStatics(d, b);\n }\n return function (d, b) {\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n})();\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar OuterSubscriber_1 = require(\"../OuterSubscriber\");\nvar InnerSubscriber_1 = require(\"../InnerSubscriber\");\nvar subscribeToResult_1 = require(\"../util/subscribeToResult\");\nfunction skipUntil(notifier) {\n return function (source) { return source.lift(new SkipUntilOperator(notifier)); };\n}\nexports.skipUntil = skipUntil;\nvar SkipUntilOperator = (function () {\n function SkipUntilOperator(notifier) {\n this.notifier = notifier;\n }\n SkipUntilOperator.prototype.call = function (destination, source) {\n return source.subscribe(new SkipUntilSubscriber(destination, this.notifier));\n };\n return SkipUntilOperator;\n}());\nvar SkipUntilSubscriber = (function (_super) {\n __extends(SkipUntilSubscriber, _super);\n function SkipUntilSubscriber(destination, notifier) {\n var _this = _super.call(this, destination) || this;\n _this.hasValue = false;\n var innerSubscriber = new InnerSubscriber_1.InnerSubscriber(_this, undefined, undefined);\n _this.add(innerSubscriber);\n _this.innerSubscription = innerSubscriber;\n subscribeToResult_1.subscribeToResult(_this, notifier, undefined, undefined, innerSubscriber);\n return _this;\n }\n SkipUntilSubscriber.prototype._next = function (value) {\n if (this.hasValue) {\n _super.prototype._next.call(this, value);\n }\n };\n SkipUntilSubscriber.prototype.notifyNext = function (outerValue, innerValue, outerIndex, innerIndex, innerSub) {\n this.hasValue = true;\n if (this.innerSubscription) {\n this.innerSubscription.unsubscribe();\n }\n };\n SkipUntilSubscriber.prototype.notifyComplete = function () {\n };\n return SkipUntilSubscriber;\n}(OuterSubscriber_1.OuterSubscriber));\n//# sourceMappingURL=skipUntil.js.map",
+ "\"use strict\";\nvar __extends = (this && this.__extends) || (function () {\n var extendStatics = function (d, b) {\n extendStatics = Object.setPrototypeOf ||\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };\n return extendStatics(d, b);\n }\n return function (d, b) {\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n})();\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar Subscriber_1 = require(\"../Subscriber\");\nfunction skipWhile(predicate) {\n return function (source) { return source.lift(new SkipWhileOperator(predicate)); };\n}\nexports.skipWhile = skipWhile;\nvar SkipWhileOperator = (function () {\n function SkipWhileOperator(predicate) {\n this.predicate = predicate;\n }\n SkipWhileOperator.prototype.call = function (subscriber, source) {\n return source.subscribe(new SkipWhileSubscriber(subscriber, this.predicate));\n };\n return SkipWhileOperator;\n}());\nvar SkipWhileSubscriber = (function (_super) {\n __extends(SkipWhileSubscriber, _super);\n function SkipWhileSubscriber(destination, predicate) {\n var _this = _super.call(this, destination) || this;\n _this.predicate = predicate;\n _this.skipping = true;\n _this.index = 0;\n return _this;\n }\n SkipWhileSubscriber.prototype._next = function (value) {\n var destination = this.destination;\n if (this.skipping) {\n this.tryCallPredicate(value);\n }\n if (!this.skipping) {\n destination.next(value);\n }\n };\n SkipWhileSubscriber.prototype.tryCallPredicate = function (value) {\n try {\n var result = this.predicate(value, this.index++);\n this.skipping = Boolean(result);\n }\n catch (err) {\n this.destination.error(err);\n }\n };\n return SkipWhileSubscriber;\n}(Subscriber_1.Subscriber));\n//# sourceMappingURL=skipWhile.js.map",
+ "\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar fromArray_1 = require(\"../observable/fromArray\");\nvar scalar_1 = require(\"../observable/scalar\");\nvar empty_1 = require(\"../observable/empty\");\nvar concat_1 = require(\"../observable/concat\");\nvar isScheduler_1 = require(\"../util/isScheduler\");\nfunction startWith() {\n var array = [];\n for (var _i = 0; _i < arguments.length; _i++) {\n array[_i] = arguments[_i];\n }\n return function (source) {\n var scheduler = array[array.length - 1];\n if (isScheduler_1.isScheduler(scheduler)) {\n array.pop();\n }\n else {\n scheduler = null;\n }\n var len = array.length;\n if (len === 1 && !scheduler) {\n return concat_1.concat(scalar_1.scalar(array[0]), source);\n }\n else if (len > 0) {\n return concat_1.concat(fromArray_1.fromArray(array, scheduler), source);\n }\n else {\n return concat_1.concat(empty_1.empty(scheduler), source);\n }\n };\n}\nexports.startWith = startWith;\n//# sourceMappingURL=startWith.js.map",
+ "\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar SubscribeOnObservable_1 = require(\"../observable/SubscribeOnObservable\");\nfunction subscribeOn(scheduler, delay) {\n if (delay === void 0) { delay = 0; }\n return function subscribeOnOperatorFunction(source) {\n return source.lift(new SubscribeOnOperator(scheduler, delay));\n };\n}\nexports.subscribeOn = subscribeOn;\nvar SubscribeOnOperator = (function () {\n function SubscribeOnOperator(scheduler, delay) {\n this.scheduler = scheduler;\n this.delay = delay;\n }\n SubscribeOnOperator.prototype.call = function (subscriber, source) {\n return new SubscribeOnObservable_1.SubscribeOnObservable(source, this.delay, this.scheduler).subscribe(subscriber);\n };\n return SubscribeOnOperator;\n}());\n//# sourceMappingURL=subscribeOn.js.map",
+ "\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar switchMap_1 = require(\"./switchMap\");\nvar identity_1 = require(\"../util/identity\");\nfunction switchAll() {\n return switchMap_1.switchMap(identity_1.identity);\n}\nexports.switchAll = switchAll;\n//# sourceMappingURL=switchAll.js.map",
+ "\"use strict\";\nvar __extends = (this && this.__extends) || (function () {\n var extendStatics = function (d, b) {\n extendStatics = Object.setPrototypeOf ||\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };\n return extendStatics(d, b);\n }\n return function (d, b) {\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n})();\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar OuterSubscriber_1 = require(\"../OuterSubscriber\");\nvar InnerSubscriber_1 = require(\"../InnerSubscriber\");\nvar subscribeToResult_1 = require(\"../util/subscribeToResult\");\nvar map_1 = require(\"./map\");\nvar from_1 = require(\"../observable/from\");\nfunction switchMap(project, resultSelector) {\n if (typeof resultSelector === 'function') {\n return function (source) { return source.pipe(switchMap(function (a, i) { return from_1.from(project(a, i)).pipe(map_1.map(function (b, ii) { return resultSelector(a, b, i, ii); })); })); };\n }\n return function (source) { return source.lift(new SwitchMapOperator(project)); };\n}\nexports.switchMap = switchMap;\nvar SwitchMapOperator = (function () {\n function SwitchMapOperator(project) {\n this.project = project;\n }\n SwitchMapOperator.prototype.call = function (subscriber, source) {\n return source.subscribe(new SwitchMapSubscriber(subscriber, this.project));\n };\n return SwitchMapOperator;\n}());\nvar SwitchMapSubscriber = (function (_super) {\n __extends(SwitchMapSubscriber, _super);\n function SwitchMapSubscriber(destination, project) {\n var _this = _super.call(this, destination) || this;\n _this.project = project;\n _this.index = 0;\n return _this;\n }\n SwitchMapSubscriber.prototype._next = function (value) {\n var result;\n var index = this.index++;\n try {\n result = this.project(value, index);\n }\n catch (error) {\n this.destination.error(error);\n return;\n }\n this._innerSub(result, value, index);\n };\n SwitchMapSubscriber.prototype._innerSub = function (result, value, index) {\n var innerSubscription = this.innerSubscription;\n if (innerSubscription) {\n innerSubscription.unsubscribe();\n }\n var innerSubscriber = new InnerSubscriber_1.InnerSubscriber(this, undefined, undefined);\n var destination = this.destination;\n destination.add(innerSubscriber);\n this.innerSubscription = subscribeToResult_1.subscribeToResult(this, result, value, index, innerSubscriber);\n };\n SwitchMapSubscriber.prototype._complete = function () {\n var innerSubscription = this.innerSubscription;\n if (!innerSubscription || innerSubscription.closed) {\n _super.prototype._complete.call(this);\n }\n this.unsubscribe();\n };\n SwitchMapSubscriber.prototype._unsubscribe = function () {\n this.innerSubscription = null;\n };\n SwitchMapSubscriber.prototype.notifyComplete = function (innerSub) {\n var destination = this.destination;\n destination.remove(innerSub);\n this.innerSubscription = null;\n if (this.isStopped) {\n _super.prototype._complete.call(this);\n }\n };\n SwitchMapSubscriber.prototype.notifyNext = function (outerValue, innerValue, outerIndex, innerIndex, innerSub) {\n this.destination.next(innerValue);\n };\n return SwitchMapSubscriber;\n}(OuterSubscriber_1.OuterSubscriber));\n//# sourceMappingURL=switchMap.js.map",
+ "\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar switchMap_1 = require(\"./switchMap\");\nfunction switchMapTo(innerObservable, resultSelector) {\n return resultSelector ? switchMap_1.switchMap(function () { return innerObservable; }, resultSelector) : switchMap_1.switchMap(function () { return innerObservable; });\n}\nexports.switchMapTo = switchMapTo;\n//# sourceMappingURL=switchMapTo.js.map",
+ "\"use strict\";\nvar __extends = (this && this.__extends) || (function () {\n var extendStatics = function (d, b) {\n extendStatics = Object.setPrototypeOf ||\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };\n return extendStatics(d, b);\n }\n return function (d, b) {\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n})();\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar Subscriber_1 = require(\"../Subscriber\");\nvar ArgumentOutOfRangeError_1 = require(\"../util/ArgumentOutOfRangeError\");\nvar empty_1 = require(\"../observable/empty\");\nfunction take(count) {\n return function (source) {\n if (count === 0) {\n return empty_1.empty();\n }\n else {\n return source.lift(new TakeOperator(count));\n }\n };\n}\nexports.take = take;\nvar TakeOperator = (function () {\n function TakeOperator(total) {\n this.total = total;\n if (this.total < 0) {\n throw new ArgumentOutOfRangeError_1.ArgumentOutOfRangeError;\n }\n }\n TakeOperator.prototype.call = function (subscriber, source) {\n return source.subscribe(new TakeSubscriber(subscriber, this.total));\n };\n return TakeOperator;\n}());\nvar TakeSubscriber = (function (_super) {\n __extends(TakeSubscriber, _super);\n function TakeSubscriber(destination, total) {\n var _this = _super.call(this, destination) || this;\n _this.total = total;\n _this.count = 0;\n return _this;\n }\n TakeSubscriber.prototype._next = function (value) {\n var total = this.total;\n var 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 return TakeSubscriber;\n}(Subscriber_1.Subscriber));\n//# sourceMappingURL=take.js.map",
+ "\"use strict\";\nvar __extends = (this && this.__extends) || (function () {\n var extendStatics = function (d, b) {\n extendStatics = Object.setPrototypeOf ||\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };\n return extendStatics(d, b);\n }\n return function (d, b) {\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n})();\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar Subscriber_1 = require(\"../Subscriber\");\nvar ArgumentOutOfRangeError_1 = require(\"../util/ArgumentOutOfRangeError\");\nvar empty_1 = require(\"../observable/empty\");\nfunction takeLast(count) {\n return function takeLastOperatorFunction(source) {\n if (count === 0) {\n return empty_1.empty();\n }\n else {\n return source.lift(new TakeLastOperator(count));\n }\n };\n}\nexports.takeLast = takeLast;\nvar TakeLastOperator = (function () {\n function TakeLastOperator(total) {\n this.total = total;\n if (this.total < 0) {\n throw new ArgumentOutOfRangeError_1.ArgumentOutOfRangeError;\n }\n }\n TakeLastOperator.prototype.call = function (subscriber, source) {\n return source.subscribe(new TakeLastSubscriber(subscriber, this.total));\n };\n return TakeLastOperator;\n}());\nvar TakeLastSubscriber = (function (_super) {\n __extends(TakeLastSubscriber, _super);\n function TakeLastSubscriber(destination, total) {\n var _this = _super.call(this, destination) || this;\n _this.total = total;\n _this.ring = new Array();\n _this.count = 0;\n return _this;\n }\n TakeLastSubscriber.prototype._next = function (value) {\n var ring = this.ring;\n var total = this.total;\n var count = this.count++;\n if (ring.length < total) {\n ring.push(value);\n }\n else {\n var index = count % total;\n ring[index] = value;\n }\n };\n TakeLastSubscriber.prototype._complete = function () {\n var destination = this.destination;\n var count = this.count;\n if (count > 0) {\n var total = this.count >= this.total ? this.total : this.count;\n var ring = this.ring;\n for (var i = 0; i < total; i++) {\n var idx = (count++) % total;\n destination.next(ring[idx]);\n }\n }\n destination.complete();\n };\n return TakeLastSubscriber;\n}(Subscriber_1.Subscriber));\n//# sourceMappingURL=takeLast.js.map",
+ "\"use strict\";\nvar __extends = (this && this.__extends) || (function () {\n var extendStatics = function (d, b) {\n extendStatics = Object.setPrototypeOf ||\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };\n return extendStatics(d, b);\n }\n return function (d, b) {\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n})();\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar OuterSubscriber_1 = require(\"../OuterSubscriber\");\nvar subscribeToResult_1 = require(\"../util/subscribeToResult\");\nfunction takeUntil(notifier) {\n return function (source) { return source.lift(new TakeUntilOperator(notifier)); };\n}\nexports.takeUntil = takeUntil;\nvar TakeUntilOperator = (function () {\n function TakeUntilOperator(notifier) {\n this.notifier = notifier;\n }\n TakeUntilOperator.prototype.call = function (subscriber, source) {\n var takeUntilSubscriber = new TakeUntilSubscriber(subscriber);\n var notifierSubscription = subscribeToResult_1.subscribeToResult(takeUntilSubscriber, this.notifier);\n if (notifierSubscription && !takeUntilSubscriber.seenValue) {\n takeUntilSubscriber.add(notifierSubscription);\n return source.subscribe(takeUntilSubscriber);\n }\n return takeUntilSubscriber;\n };\n return TakeUntilOperator;\n}());\nvar TakeUntilSubscriber = (function (_super) {\n __extends(TakeUntilSubscriber, _super);\n function TakeUntilSubscriber(destination) {\n var _this = _super.call(this, destination) || this;\n _this.seenValue = false;\n return _this;\n }\n TakeUntilSubscriber.prototype.notifyNext = function (outerValue, innerValue, outerIndex, innerIndex, innerSub) {\n this.seenValue = true;\n this.complete();\n };\n TakeUntilSubscriber.prototype.notifyComplete = function () {\n };\n return TakeUntilSubscriber;\n}(OuterSubscriber_1.OuterSubscriber));\n//# sourceMappingURL=takeUntil.js.map",
+ "\"use strict\";\nvar __extends = (this && this.__extends) || (function () {\n var extendStatics = function (d, b) {\n extendStatics = Object.setPrototypeOf ||\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };\n return extendStatics(d, b);\n }\n return function (d, b) {\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n})();\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar Subscriber_1 = require(\"../Subscriber\");\nfunction takeWhile(predicate) {\n return function (source) { return source.lift(new TakeWhileOperator(predicate)); };\n}\nexports.takeWhile = takeWhile;\nvar TakeWhileOperator = (function () {\n function TakeWhileOperator(predicate) {\n this.predicate = predicate;\n }\n TakeWhileOperator.prototype.call = function (subscriber, source) {\n return source.subscribe(new TakeWhileSubscriber(subscriber, this.predicate));\n };\n return TakeWhileOperator;\n}());\nvar TakeWhileSubscriber = (function (_super) {\n __extends(TakeWhileSubscriber, _super);\n function TakeWhileSubscriber(destination, predicate) {\n var _this = _super.call(this, destination) || this;\n _this.predicate = predicate;\n _this.index = 0;\n return _this;\n }\n TakeWhileSubscriber.prototype._next = function (value) {\n var destination = this.destination;\n var result;\n try {\n result = this.predicate(value, this.index++);\n }\n catch (err) {\n destination.error(err);\n return;\n }\n this.nextOrComplete(value, result);\n };\n TakeWhileSubscriber.prototype.nextOrComplete = function (value, predicateResult) {\n var destination = this.destination;\n if (Boolean(predicateResult)) {\n destination.next(value);\n }\n else {\n destination.complete();\n }\n };\n return TakeWhileSubscriber;\n}(Subscriber_1.Subscriber));\n//# sourceMappingURL=takeWhile.js.map",
+ "\"use strict\";\nvar __extends = (this && this.__extends) || (function () {\n var extendStatics = function (d, b) {\n extendStatics = Object.setPrototypeOf ||\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };\n return extendStatics(d, b);\n }\n return function (d, b) {\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n})();\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar Subscriber_1 = require(\"../Subscriber\");\nvar noop_1 = require(\"../util/noop\");\nvar isFunction_1 = require(\"../util/isFunction\");\nfunction tap(nextOrObserver, error, complete) {\n return function tapOperatorFunction(source) {\n return source.lift(new DoOperator(nextOrObserver, error, complete));\n };\n}\nexports.tap = tap;\nvar DoOperator = (function () {\n function DoOperator(nextOrObserver, error, complete) {\n this.nextOrObserver = nextOrObserver;\n this.error = error;\n this.complete = complete;\n }\n DoOperator.prototype.call = function (subscriber, source) {\n return source.subscribe(new TapSubscriber(subscriber, this.nextOrObserver, this.error, this.complete));\n };\n return DoOperator;\n}());\nvar TapSubscriber = (function (_super) {\n __extends(TapSubscriber, _super);\n function TapSubscriber(destination, observerOrNext, error, complete) {\n var _this = _super.call(this, destination) || this;\n _this._tapNext = noop_1.noop;\n _this._tapError = noop_1.noop;\n _this._tapComplete = noop_1.noop;\n _this._tapError = error || noop_1.noop;\n _this._tapComplete = complete || noop_1.noop;\n if (isFunction_1.isFunction(observerOrNext)) {\n _this._context = _this;\n _this._tapNext = observerOrNext;\n }\n else if (observerOrNext) {\n _this._context = observerOrNext;\n _this._tapNext = observerOrNext.next || noop_1.noop;\n _this._tapError = observerOrNext.error || noop_1.noop;\n _this._tapComplete = observerOrNext.complete || noop_1.noop;\n }\n return _this;\n }\n TapSubscriber.prototype._next = function (value) {\n try {\n this._tapNext.call(this._context, value);\n }\n catch (err) {\n this.destination.error(err);\n return;\n }\n this.destination.next(value);\n };\n TapSubscriber.prototype._error = function (err) {\n try {\n this._tapError.call(this._context, err);\n }\n catch (err) {\n this.destination.error(err);\n return;\n }\n this.destination.error(err);\n };\n TapSubscriber.prototype._complete = function () {\n try {\n this._tapComplete.call(this._context);\n }\n catch (err) {\n this.destination.error(err);\n return;\n }\n return this.destination.complete();\n };\n return TapSubscriber;\n}(Subscriber_1.Subscriber));\n//# sourceMappingURL=tap.js.map",
+ "\"use strict\";\nvar __extends = (this && this.__extends) || (function () {\n var extendStatics = function (d, b) {\n extendStatics = Object.setPrototypeOf ||\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };\n return extendStatics(d, b);\n }\n return function (d, b) {\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n})();\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar OuterSubscriber_1 = require(\"../OuterSubscriber\");\nvar subscribeToResult_1 = require(\"../util/subscribeToResult\");\nexports.defaultThrottleConfig = {\n leading: true,\n trailing: false\n};\nfunction throttle(durationSelector, config) {\n if (config === void 0) { config = exports.defaultThrottleConfig; }\n return function (source) { return source.lift(new ThrottleOperator(durationSelector, config.leading, config.trailing)); };\n}\nexports.throttle = throttle;\nvar ThrottleOperator = (function () {\n function ThrottleOperator(durationSelector, leading, trailing) {\n this.durationSelector = durationSelector;\n this.leading = leading;\n this.trailing = trailing;\n }\n ThrottleOperator.prototype.call = function (subscriber, source) {\n return source.subscribe(new ThrottleSubscriber(subscriber, this.durationSelector, this.leading, this.trailing));\n };\n return ThrottleOperator;\n}());\nvar ThrottleSubscriber = (function (_super) {\n __extends(ThrottleSubscriber, _super);\n function ThrottleSubscriber(destination, durationSelector, _leading, _trailing) {\n var _this = _super.call(this, destination) || this;\n _this.destination = destination;\n _this.durationSelector = durationSelector;\n _this._leading = _leading;\n _this._trailing = _trailing;\n _this._hasValue = false;\n return _this;\n }\n ThrottleSubscriber.prototype._next = function (value) {\n this._hasValue = true;\n this._sendValue = value;\n if (!this._throttled) {\n if (this._leading) {\n this.send();\n }\n else {\n this.throttle(value);\n }\n }\n };\n ThrottleSubscriber.prototype.send = function () {\n var _a = this, _hasValue = _a._hasValue, _sendValue = _a._sendValue;\n if (_hasValue) {\n this.destination.next(_sendValue);\n this.throttle(_sendValue);\n }\n this._hasValue = false;\n this._sendValue = null;\n };\n ThrottleSubscriber.prototype.throttle = function (value) {\n var duration = this.tryDurationSelector(value);\n if (duration) {\n this.add(this._throttled = subscribeToResult_1.subscribeToResult(this, duration));\n }\n };\n ThrottleSubscriber.prototype.tryDurationSelector = function (value) {\n try {\n return this.durationSelector(value);\n }\n catch (err) {\n this.destination.error(err);\n return null;\n }\n };\n ThrottleSubscriber.prototype.throttlingDone = function () {\n var _a = this, _throttled = _a._throttled, _trailing = _a._trailing;\n if (_throttled) {\n _throttled.unsubscribe();\n }\n this._throttled = null;\n if (_trailing) {\n this.send();\n }\n };\n ThrottleSubscriber.prototype.notifyNext = function (outerValue, innerValue, outerIndex, innerIndex, innerSub) {\n this.throttlingDone();\n };\n ThrottleSubscriber.prototype.notifyComplete = function () {\n this.throttlingDone();\n };\n return ThrottleSubscriber;\n}(OuterSubscriber_1.OuterSubscriber));\n//# sourceMappingURL=throttle.js.map",
+ "\"use strict\";\nvar __extends = (this && this.__extends) || (function () {\n var extendStatics = function (d, b) {\n extendStatics = Object.setPrototypeOf ||\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };\n return extendStatics(d, b);\n }\n return function (d, b) {\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n})();\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar Subscriber_1 = require(\"../Subscriber\");\nvar async_1 = require(\"../scheduler/async\");\nvar throttle_1 = require(\"./throttle\");\nfunction throttleTime(duration, scheduler, config) {\n if (scheduler === void 0) { scheduler = async_1.async; }\n if (config === void 0) { config = throttle_1.defaultThrottleConfig; }\n return function (source) { return source.lift(new ThrottleTimeOperator(duration, scheduler, config.leading, config.trailing)); };\n}\nexports.throttleTime = throttleTime;\nvar ThrottleTimeOperator = (function () {\n function ThrottleTimeOperator(duration, scheduler, leading, trailing) {\n this.duration = duration;\n this.scheduler = scheduler;\n this.leading = leading;\n this.trailing = trailing;\n }\n ThrottleTimeOperator.prototype.call = function (subscriber, source) {\n return source.subscribe(new ThrottleTimeSubscriber(subscriber, this.duration, this.scheduler, this.leading, this.trailing));\n };\n return ThrottleTimeOperator;\n}());\nvar ThrottleTimeSubscriber = (function (_super) {\n __extends(ThrottleTimeSubscriber, _super);\n function ThrottleTimeSubscriber(destination, duration, scheduler, leading, trailing) {\n var _this = _super.call(this, destination) || this;\n _this.duration = duration;\n _this.scheduler = scheduler;\n _this.leading = leading;\n _this.trailing = trailing;\n _this._hasTrailingValue = false;\n _this._trailingValue = null;\n return _this;\n }\n ThrottleTimeSubscriber.prototype._next = function (value) {\n if (this.throttled) {\n if (this.trailing) {\n this._trailingValue = value;\n this._hasTrailingValue = true;\n }\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 }\n }\n };\n ThrottleTimeSubscriber.prototype._complete = function () {\n if (this._hasTrailingValue) {\n this.destination.next(this._trailingValue);\n this.destination.complete();\n }\n else {\n this.destination.complete();\n }\n };\n ThrottleTimeSubscriber.prototype.clearThrottle = function () {\n var 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 return ThrottleTimeSubscriber;\n}(Subscriber_1.Subscriber));\nfunction dispatchNext(arg) {\n var subscriber = arg.subscriber;\n subscriber.clearThrottle();\n}\n//# sourceMappingURL=throttleTime.js.map",
+ "\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar tap_1 = require(\"./tap\");\nvar EmptyError_1 = require(\"../util/EmptyError\");\nexports.throwIfEmpty = function (errorFactory) {\n if (errorFactory === void 0) { errorFactory = defaultErrorFactory; }\n return tap_1.tap({\n hasValue: false,\n next: function () { this.hasValue = true; },\n complete: function () {\n if (!this.hasValue) {\n throw errorFactory();\n }\n }\n });\n};\nfunction defaultErrorFactory() {\n return new EmptyError_1.EmptyError();\n}\n//# sourceMappingURL=throwIfEmpty.js.map",
+ "\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar async_1 = require(\"../scheduler/async\");\nvar scan_1 = require(\"./scan\");\nvar defer_1 = require(\"../observable/defer\");\nvar map_1 = require(\"./map\");\nfunction timeInterval(scheduler) {\n if (scheduler === void 0) { scheduler = async_1.async; }\n return function (source) { return defer_1.defer(function () {\n return source.pipe(scan_1.scan(function (_a, value) {\n var current = _a.current;\n return ({ value: value, current: scheduler.now(), last: current });\n }, { current: scheduler.now(), value: undefined, last: undefined }), map_1.map(function (_a) {\n var current = _a.current, last = _a.last, value = _a.value;\n return new TimeInterval(value, current - last);\n }));\n }); };\n}\nexports.timeInterval = timeInterval;\nvar TimeInterval = (function () {\n function TimeInterval(value, interval) {\n this.value = value;\n this.interval = interval;\n }\n return TimeInterval;\n}());\nexports.TimeInterval = TimeInterval;\n//# sourceMappingURL=timeInterval.js.map",
+ "\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar async_1 = require(\"../scheduler/async\");\nvar TimeoutError_1 = require(\"../util/TimeoutError\");\nvar timeoutWith_1 = require(\"./timeoutWith\");\nvar throwError_1 = require(\"../observable/throwError\");\nfunction timeout(due, scheduler) {\n if (scheduler === void 0) { scheduler = async_1.async; }\n return timeoutWith_1.timeoutWith(due, throwError_1.throwError(new TimeoutError_1.TimeoutError()), scheduler);\n}\nexports.timeout = timeout;\n//# sourceMappingURL=timeout.js.map",
+ "\"use strict\";\nvar __extends = (this && this.__extends) || (function () {\n var extendStatics = function (d, b) {\n extendStatics = Object.setPrototypeOf ||\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };\n return extendStatics(d, b);\n }\n return function (d, b) {\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n})();\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar async_1 = require(\"../scheduler/async\");\nvar isDate_1 = require(\"../util/isDate\");\nvar OuterSubscriber_1 = require(\"../OuterSubscriber\");\nvar subscribeToResult_1 = require(\"../util/subscribeToResult\");\nfunction timeoutWith(due, withObservable, scheduler) {\n if (scheduler === void 0) { scheduler = async_1.async; }\n return function (source) {\n var absoluteTimeout = isDate_1.isDate(due);\n var waitFor = absoluteTimeout ? (+due - scheduler.now()) : Math.abs(due);\n return source.lift(new TimeoutWithOperator(waitFor, absoluteTimeout, withObservable, scheduler));\n };\n}\nexports.timeoutWith = timeoutWith;\nvar TimeoutWithOperator = (function () {\n function TimeoutWithOperator(waitFor, absoluteTimeout, withObservable, scheduler) {\n this.waitFor = waitFor;\n this.absoluteTimeout = absoluteTimeout;\n this.withObservable = withObservable;\n this.scheduler = scheduler;\n }\n TimeoutWithOperator.prototype.call = function (subscriber, source) {\n return source.subscribe(new TimeoutWithSubscriber(subscriber, this.absoluteTimeout, this.waitFor, this.withObservable, this.scheduler));\n };\n return TimeoutWithOperator;\n}());\nvar TimeoutWithSubscriber = (function (_super) {\n __extends(TimeoutWithSubscriber, _super);\n function TimeoutWithSubscriber(destination, absoluteTimeout, waitFor, withObservable, scheduler) {\n var _this = _super.call(this, destination) || this;\n _this.absoluteTimeout = absoluteTimeout;\n _this.waitFor = waitFor;\n _this.withObservable = withObservable;\n _this.scheduler = scheduler;\n _this.action = null;\n _this.scheduleTimeout();\n return _this;\n }\n TimeoutWithSubscriber.dispatchTimeout = function (subscriber) {\n var withObservable = subscriber.withObservable;\n subscriber._unsubscribeAndRecycle();\n subscriber.add(subscribeToResult_1.subscribeToResult(subscriber, withObservable));\n };\n TimeoutWithSubscriber.prototype.scheduleTimeout = function () {\n var action = this.action;\n if (action) {\n this.action = action.schedule(this, this.waitFor);\n }\n else {\n this.add(this.action = this.scheduler.schedule(TimeoutWithSubscriber.dispatchTimeout, this.waitFor, this));\n }\n };\n TimeoutWithSubscriber.prototype._next = function (value) {\n if (!this.absoluteTimeout) {\n this.scheduleTimeout();\n }\n _super.prototype._next.call(this, value);\n };\n TimeoutWithSubscriber.prototype._unsubscribe = function () {\n this.action = null;\n this.scheduler = null;\n this.withObservable = null;\n };\n return TimeoutWithSubscriber;\n}(OuterSubscriber_1.OuterSubscriber));\n//# sourceMappingURL=timeoutWith.js.map",
+ "\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar async_1 = require(\"../scheduler/async\");\nvar map_1 = require(\"./map\");\nfunction timestamp(scheduler) {\n if (scheduler === void 0) { scheduler = async_1.async; }\n return map_1.map(function (value) { return new Timestamp(value, scheduler.now()); });\n}\nexports.timestamp = timestamp;\nvar Timestamp = (function () {\n function Timestamp(value, timestamp) {\n this.value = value;\n this.timestamp = timestamp;\n }\n return Timestamp;\n}());\nexports.Timestamp = Timestamp;\n//# sourceMappingURL=timestamp.js.map",
+ "\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar reduce_1 = require(\"./reduce\");\nfunction toArrayReducer(arr, item, index) {\n if (index === 0) {\n return [item];\n }\n arr.push(item);\n return arr;\n}\nfunction toArray() {\n return reduce_1.reduce(toArrayReducer, []);\n}\nexports.toArray = toArray;\n//# sourceMappingURL=toArray.js.map",
+ "\"use strict\";\nvar __extends = (this && this.__extends) || (function () {\n var extendStatics = function (d, b) {\n extendStatics = Object.setPrototypeOf ||\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };\n return extendStatics(d, b);\n }\n return function (d, b) {\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n})();\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar Subject_1 = require(\"../Subject\");\nvar OuterSubscriber_1 = require(\"../OuterSubscriber\");\nvar subscribeToResult_1 = require(\"../util/subscribeToResult\");\nfunction window(windowBoundaries) {\n return function windowOperatorFunction(source) {\n return source.lift(new WindowOperator(windowBoundaries));\n };\n}\nexports.window = window;\nvar WindowOperator = (function () {\n function WindowOperator(windowBoundaries) {\n this.windowBoundaries = windowBoundaries;\n }\n WindowOperator.prototype.call = function (subscriber, source) {\n var windowSubscriber = new WindowSubscriber(subscriber);\n var sourceSubscription = source.subscribe(windowSubscriber);\n if (!sourceSubscription.closed) {\n windowSubscriber.add(subscribeToResult_1.subscribeToResult(windowSubscriber, this.windowBoundaries));\n }\n return sourceSubscription;\n };\n return WindowOperator;\n}());\nvar WindowSubscriber = (function (_super) {\n __extends(WindowSubscriber, _super);\n function WindowSubscriber(destination) {\n var _this = _super.call(this, destination) || this;\n _this.window = new Subject_1.Subject();\n destination.next(_this.window);\n return _this;\n }\n WindowSubscriber.prototype.notifyNext = function (outerValue, innerValue, outerIndex, innerIndex, innerSub) {\n this.openWindow();\n };\n WindowSubscriber.prototype.notifyError = function (error, innerSub) {\n this._error(error);\n };\n WindowSubscriber.prototype.notifyComplete = function (innerSub) {\n this._complete();\n };\n WindowSubscriber.prototype._next = function (value) {\n this.window.next(value);\n };\n WindowSubscriber.prototype._error = function (err) {\n this.window.error(err);\n this.destination.error(err);\n };\n WindowSubscriber.prototype._complete = function () {\n this.window.complete();\n this.destination.complete();\n };\n WindowSubscriber.prototype._unsubscribe = function () {\n this.window = null;\n };\n WindowSubscriber.prototype.openWindow = function () {\n var prevWindow = this.window;\n if (prevWindow) {\n prevWindow.complete();\n }\n var destination = this.destination;\n var newWindow = this.window = new Subject_1.Subject();\n destination.next(newWindow);\n };\n return WindowSubscriber;\n}(OuterSubscriber_1.OuterSubscriber));\n//# sourceMappingURL=window.js.map",
+ "\"use strict\";\nvar __extends = (this && this.__extends) || (function () {\n var extendStatics = function (d, b) {\n extendStatics = Object.setPrototypeOf ||\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };\n return extendStatics(d, b);\n }\n return function (d, b) {\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n})();\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar Subscriber_1 = require(\"../Subscriber\");\nvar Subject_1 = require(\"../Subject\");\nfunction windowCount(windowSize, startWindowEvery) {\n if (startWindowEvery === void 0) { startWindowEvery = 0; }\n return function windowCountOperatorFunction(source) {\n return source.lift(new WindowCountOperator(windowSize, startWindowEvery));\n };\n}\nexports.windowCount = windowCount;\nvar WindowCountOperator = (function () {\n function WindowCountOperator(windowSize, startWindowEvery) {\n this.windowSize = windowSize;\n this.startWindowEvery = startWindowEvery;\n }\n WindowCountOperator.prototype.call = function (subscriber, source) {\n return source.subscribe(new WindowCountSubscriber(subscriber, this.windowSize, this.startWindowEvery));\n };\n return WindowCountOperator;\n}());\nvar WindowCountSubscriber = (function (_super) {\n __extends(WindowCountSubscriber, _super);\n function WindowCountSubscriber(destination, windowSize, startWindowEvery) {\n var _this = _super.call(this, destination) || this;\n _this.destination = destination;\n _this.windowSize = windowSize;\n _this.startWindowEvery = startWindowEvery;\n _this.windows = [new Subject_1.Subject()];\n _this.count = 0;\n destination.next(_this.windows[0]);\n return _this;\n }\n WindowCountSubscriber.prototype._next = function (value) {\n var startWindowEvery = (this.startWindowEvery > 0) ? this.startWindowEvery : this.windowSize;\n var destination = this.destination;\n var windowSize = this.windowSize;\n var windows = this.windows;\n var len = windows.length;\n for (var i = 0; i < len && !this.closed; i++) {\n windows[i].next(value);\n }\n var 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 var window_1 = new Subject_1.Subject();\n windows.push(window_1);\n destination.next(window_1);\n }\n };\n WindowCountSubscriber.prototype._error = function (err) {\n var 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 WindowCountSubscriber.prototype._complete = function () {\n var 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 WindowCountSubscriber.prototype._unsubscribe = function () {\n this.count = 0;\n this.windows = null;\n };\n return WindowCountSubscriber;\n}(Subscriber_1.Subscriber));\n//# sourceMappingURL=windowCount.js.map",
+ "\"use strict\";\nvar __extends = (this && this.__extends) || (function () {\n var extendStatics = function (d, b) {\n extendStatics = Object.setPrototypeOf ||\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };\n return extendStatics(d, b);\n }\n return function (d, b) {\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n})();\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar Subject_1 = require(\"../Subject\");\nvar async_1 = require(\"../scheduler/async\");\nvar Subscriber_1 = require(\"../Subscriber\");\nvar isNumeric_1 = require(\"../util/isNumeric\");\nvar isScheduler_1 = require(\"../util/isScheduler\");\nfunction windowTime(windowTimeSpan) {\n var scheduler = async_1.async;\n var windowCreationInterval = null;\n var maxWindowSize = Number.POSITIVE_INFINITY;\n if (isScheduler_1.isScheduler(arguments[3])) {\n scheduler = arguments[3];\n }\n if (isScheduler_1.isScheduler(arguments[2])) {\n scheduler = arguments[2];\n }\n else if (isNumeric_1.isNumeric(arguments[2])) {\n maxWindowSize = arguments[2];\n }\n if (isScheduler_1.isScheduler(arguments[1])) {\n scheduler = arguments[1];\n }\n else if (isNumeric_1.isNumeric(arguments[1])) {\n windowCreationInterval = arguments[1];\n }\n return function windowTimeOperatorFunction(source) {\n return source.lift(new WindowTimeOperator(windowTimeSpan, windowCreationInterval, maxWindowSize, scheduler));\n };\n}\nexports.windowTime = windowTime;\nvar WindowTimeOperator = (function () {\n function WindowTimeOperator(windowTimeSpan, windowCreationInterval, maxWindowSize, scheduler) {\n this.windowTimeSpan = windowTimeSpan;\n this.windowCreationInterval = windowCreationInterval;\n this.maxWindowSize = maxWindowSize;\n this.scheduler = scheduler;\n }\n WindowTimeOperator.prototype.call = function (subscriber, source) {\n return source.subscribe(new WindowTimeSubscriber(subscriber, this.windowTimeSpan, this.windowCreationInterval, this.maxWindowSize, this.scheduler));\n };\n return WindowTimeOperator;\n}());\nvar CountedSubject = (function (_super) {\n __extends(CountedSubject, _super);\n function CountedSubject() {\n var _this = _super !== null && _super.apply(this, arguments) || this;\n _this._numberOfNextedValues = 0;\n return _this;\n }\n CountedSubject.prototype.next = function (value) {\n this._numberOfNextedValues++;\n _super.prototype.next.call(this, value);\n };\n Object.defineProperty(CountedSubject.prototype, \"numberOfNextedValues\", {\n get: function () {\n return this._numberOfNextedValues;\n },\n enumerable: true,\n configurable: true\n });\n return CountedSubject;\n}(Subject_1.Subject));\nvar WindowTimeSubscriber = (function (_super) {\n __extends(WindowTimeSubscriber, _super);\n function WindowTimeSubscriber(destination, windowTimeSpan, windowCreationInterval, maxWindowSize, scheduler) {\n var _this = _super.call(this, destination) || this;\n _this.destination = destination;\n _this.windowTimeSpan = windowTimeSpan;\n _this.windowCreationInterval = windowCreationInterval;\n _this.maxWindowSize = maxWindowSize;\n _this.scheduler = scheduler;\n _this.windows = [];\n var window = _this.openWindow();\n if (windowCreationInterval !== null && windowCreationInterval >= 0) {\n var closeState = { subscriber: _this, window: window, context: null };\n var creationState = { windowTimeSpan: windowTimeSpan, windowCreationInterval: windowCreationInterval, subscriber: _this, scheduler: scheduler };\n _this.add(scheduler.schedule(dispatchWindowClose, windowTimeSpan, closeState));\n _this.add(scheduler.schedule(dispatchWindowCreation, windowCreationInterval, creationState));\n }\n else {\n var timeSpanOnlyState = { subscriber: _this, window: window, windowTimeSpan: windowTimeSpan };\n _this.add(scheduler.schedule(dispatchWindowTimeSpanOnly, windowTimeSpan, timeSpanOnlyState));\n }\n return _this;\n }\n WindowTimeSubscriber.prototype._next = function (value) {\n var windows = this.windows;\n var len = windows.length;\n for (var i = 0; i < len; i++) {\n var window_1 = windows[i];\n if (!window_1.closed) {\n window_1.next(value);\n if (window_1.numberOfNextedValues >= this.maxWindowSize) {\n this.closeWindow(window_1);\n }\n }\n }\n };\n WindowTimeSubscriber.prototype._error = function (err) {\n var windows = this.windows;\n while (windows.length > 0) {\n windows.shift().error(err);\n }\n this.destination.error(err);\n };\n WindowTimeSubscriber.prototype._complete = function () {\n var windows = this.windows;\n while (windows.length > 0) {\n var window_2 = windows.shift();\n if (!window_2.closed) {\n window_2.complete();\n }\n }\n this.destination.complete();\n };\n WindowTimeSubscriber.prototype.openWindow = function () {\n var window = new CountedSubject();\n this.windows.push(window);\n var destination = this.destination;\n destination.next(window);\n return window;\n };\n WindowTimeSubscriber.prototype.closeWindow = function (window) {\n window.complete();\n var windows = this.windows;\n windows.splice(windows.indexOf(window), 1);\n };\n return WindowTimeSubscriber;\n}(Subscriber_1.Subscriber));\nfunction dispatchWindowTimeSpanOnly(state) {\n var subscriber = state.subscriber, windowTimeSpan = state.windowTimeSpan, window = state.window;\n if (window) {\n subscriber.closeWindow(window);\n }\n state.window = subscriber.openWindow();\n this.schedule(state, windowTimeSpan);\n}\nfunction dispatchWindowCreation(state) {\n var windowTimeSpan = state.windowTimeSpan, subscriber = state.subscriber, scheduler = state.scheduler, windowCreationInterval = state.windowCreationInterval;\n var window = subscriber.openWindow();\n var action = this;\n var context = { action: action, subscription: null };\n var timeSpanState = { subscriber: subscriber, window: window, context: context };\n context.subscription = scheduler.schedule(dispatchWindowClose, windowTimeSpan, timeSpanState);\n action.add(context.subscription);\n action.schedule(state, windowCreationInterval);\n}\nfunction dispatchWindowClose(state) {\n var subscriber = state.subscriber, window = state.window, context = state.context;\n if (context && context.action && context.subscription) {\n context.action.remove(context.subscription);\n }\n subscriber.closeWindow(window);\n}\n//# sourceMappingURL=windowTime.js.map",
+ "\"use strict\";\nvar __extends = (this && this.__extends) || (function () {\n var extendStatics = function (d, b) {\n extendStatics = Object.setPrototypeOf ||\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };\n return extendStatics(d, b);\n }\n return function (d, b) {\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n})();\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar Subject_1 = require(\"../Subject\");\nvar Subscription_1 = require(\"../Subscription\");\nvar tryCatch_1 = require(\"../util/tryCatch\");\nvar errorObject_1 = require(\"../util/errorObject\");\nvar OuterSubscriber_1 = require(\"../OuterSubscriber\");\nvar subscribeToResult_1 = require(\"../util/subscribeToResult\");\nfunction windowToggle(openings, closingSelector) {\n return function (source) { return source.lift(new WindowToggleOperator(openings, closingSelector)); };\n}\nexports.windowToggle = windowToggle;\nvar WindowToggleOperator = (function () {\n function WindowToggleOperator(openings, closingSelector) {\n this.openings = openings;\n this.closingSelector = closingSelector;\n }\n WindowToggleOperator.prototype.call = function (subscriber, source) {\n return source.subscribe(new WindowToggleSubscriber(subscriber, this.openings, this.closingSelector));\n };\n return WindowToggleOperator;\n}());\nvar WindowToggleSubscriber = (function (_super) {\n __extends(WindowToggleSubscriber, _super);\n function WindowToggleSubscriber(destination, openings, closingSelector) {\n var _this = _super.call(this, destination) || this;\n _this.openings = openings;\n _this.closingSelector = closingSelector;\n _this.contexts = [];\n _this.add(_this.openSubscription = subscribeToResult_1.subscribeToResult(_this, openings, openings));\n return _this;\n }\n WindowToggleSubscriber.prototype._next = function (value) {\n var contexts = this.contexts;\n if (contexts) {\n var len = contexts.length;\n for (var i = 0; i < len; i++) {\n contexts[i].window.next(value);\n }\n }\n };\n WindowToggleSubscriber.prototype._error = function (err) {\n var contexts = this.contexts;\n this.contexts = null;\n if (contexts) {\n var len = contexts.length;\n var index = -1;\n while (++index < len) {\n var context_1 = contexts[index];\n context_1.window.error(err);\n context_1.subscription.unsubscribe();\n }\n }\n _super.prototype._error.call(this, err);\n };\n WindowToggleSubscriber.prototype._complete = function () {\n var contexts = this.contexts;\n this.contexts = null;\n if (contexts) {\n var len = contexts.length;\n var index = -1;\n while (++index < len) {\n var context_2 = contexts[index];\n context_2.window.complete();\n context_2.subscription.unsubscribe();\n }\n }\n _super.prototype._complete.call(this);\n };\n WindowToggleSubscriber.prototype._unsubscribe = function () {\n var contexts = this.contexts;\n this.contexts = null;\n if (contexts) {\n var len = contexts.length;\n var index = -1;\n while (++index < len) {\n var context_3 = contexts[index];\n context_3.window.unsubscribe();\n context_3.subscription.unsubscribe();\n }\n }\n };\n WindowToggleSubscriber.prototype.notifyNext = function (outerValue, innerValue, outerIndex, innerIndex, innerSub) {\n if (outerValue === this.openings) {\n var closingSelector = this.closingSelector;\n var closingNotifier = tryCatch_1.tryCatch(closingSelector)(innerValue);\n if (closingNotifier === errorObject_1.errorObject) {\n return this.error(errorObject_1.errorObject.e);\n }\n else {\n var window_1 = new Subject_1.Subject();\n var subscription = new Subscription_1.Subscription();\n var context_4 = { window: window_1, subscription: subscription };\n this.contexts.push(context_4);\n var innerSubscription = subscribeToResult_1.subscribeToResult(this, closingNotifier, context_4);\n if (innerSubscription.closed) {\n this.closeWindow(this.contexts.length - 1);\n }\n else {\n innerSubscription.context = context_4;\n subscription.add(innerSubscription);\n }\n this.destination.next(window_1);\n }\n }\n else {\n this.closeWindow(this.contexts.indexOf(outerValue));\n }\n };\n WindowToggleSubscriber.prototype.notifyError = function (err) {\n this.error(err);\n };\n WindowToggleSubscriber.prototype.notifyComplete = function (inner) {\n if (inner !== this.openSubscription) {\n this.closeWindow(this.contexts.indexOf(inner.context));\n }\n };\n WindowToggleSubscriber.prototype.closeWindow = function (index) {\n if (index === -1) {\n return;\n }\n var contexts = this.contexts;\n var context = contexts[index];\n var window = context.window, subscription = context.subscription;\n contexts.splice(index, 1);\n window.complete();\n subscription.unsubscribe();\n };\n return WindowToggleSubscriber;\n}(OuterSubscriber_1.OuterSubscriber));\n//# sourceMappingURL=windowToggle.js.map",
+ "\"use strict\";\nvar __extends = (this && this.__extends) || (function () {\n var extendStatics = function (d, b) {\n extendStatics = Object.setPrototypeOf ||\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };\n return extendStatics(d, b);\n }\n return function (d, b) {\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n})();\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar Subject_1 = require(\"../Subject\");\nvar tryCatch_1 = require(\"../util/tryCatch\");\nvar errorObject_1 = require(\"../util/errorObject\");\nvar OuterSubscriber_1 = require(\"../OuterSubscriber\");\nvar subscribeToResult_1 = require(\"../util/subscribeToResult\");\nfunction windowWhen(closingSelector) {\n return function windowWhenOperatorFunction(source) {\n return source.lift(new WindowOperator(closingSelector));\n };\n}\nexports.windowWhen = windowWhen;\nvar WindowOperator = (function () {\n function WindowOperator(closingSelector) {\n this.closingSelector = closingSelector;\n }\n WindowOperator.prototype.call = function (subscriber, source) {\n return source.subscribe(new WindowSubscriber(subscriber, this.closingSelector));\n };\n return WindowOperator;\n}());\nvar WindowSubscriber = (function (_super) {\n __extends(WindowSubscriber, _super);\n function WindowSubscriber(destination, closingSelector) {\n var _this = _super.call(this, destination) || this;\n _this.destination = destination;\n _this.closingSelector = closingSelector;\n _this.openWindow();\n return _this;\n }\n WindowSubscriber.prototype.notifyNext = function (outerValue, innerValue, outerIndex, innerIndex, innerSub) {\n this.openWindow(innerSub);\n };\n WindowSubscriber.prototype.notifyError = function (error, innerSub) {\n this._error(error);\n };\n WindowSubscriber.prototype.notifyComplete = function (innerSub) {\n this.openWindow(innerSub);\n };\n WindowSubscriber.prototype._next = function (value) {\n this.window.next(value);\n };\n WindowSubscriber.prototype._error = function (err) {\n this.window.error(err);\n this.destination.error(err);\n this.unsubscribeClosingNotification();\n };\n WindowSubscriber.prototype._complete = function () {\n this.window.complete();\n this.destination.complete();\n this.unsubscribeClosingNotification();\n };\n WindowSubscriber.prototype.unsubscribeClosingNotification = function () {\n if (this.closingNotification) {\n this.closingNotification.unsubscribe();\n }\n };\n WindowSubscriber.prototype.openWindow = function (innerSub) {\n if (innerSub === void 0) { innerSub = null; }\n if (innerSub) {\n this.remove(innerSub);\n innerSub.unsubscribe();\n }\n var prevWindow = this.window;\n if (prevWindow) {\n prevWindow.complete();\n }\n var window = this.window = new Subject_1.Subject();\n this.destination.next(window);\n var closingNotifier = tryCatch_1.tryCatch(this.closingSelector)();\n if (closingNotifier === errorObject_1.errorObject) {\n var err = errorObject_1.errorObject.e;\n this.destination.error(err);\n this.window.error(err);\n }\n else {\n this.add(this.closingNotification = subscribeToResult_1.subscribeToResult(this, closingNotifier));\n }\n };\n return WindowSubscriber;\n}(OuterSubscriber_1.OuterSubscriber));\n//# sourceMappingURL=windowWhen.js.map",
+ "\"use strict\";\nvar __extends = (this && this.__extends) || (function () {\n var extendStatics = function (d, b) {\n extendStatics = Object.setPrototypeOf ||\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };\n return extendStatics(d, b);\n }\n return function (d, b) {\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n})();\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar OuterSubscriber_1 = require(\"../OuterSubscriber\");\nvar subscribeToResult_1 = require(\"../util/subscribeToResult\");\nfunction withLatestFrom() {\n var args = [];\n for (var _i = 0; _i < arguments.length; _i++) {\n args[_i] = arguments[_i];\n }\n return function (source) {\n var project;\n if (typeof args[args.length - 1] === 'function') {\n project = args.pop();\n }\n var observables = args;\n return source.lift(new WithLatestFromOperator(observables, project));\n };\n}\nexports.withLatestFrom = withLatestFrom;\nvar WithLatestFromOperator = (function () {\n function WithLatestFromOperator(observables, project) {\n this.observables = observables;\n this.project = project;\n }\n WithLatestFromOperator.prototype.call = function (subscriber, source) {\n return source.subscribe(new WithLatestFromSubscriber(subscriber, this.observables, this.project));\n };\n return WithLatestFromOperator;\n}());\nvar WithLatestFromSubscriber = (function (_super) {\n __extends(WithLatestFromSubscriber, _super);\n function WithLatestFromSubscriber(destination, observables, project) {\n var _this = _super.call(this, destination) || this;\n _this.observables = observables;\n _this.project = project;\n _this.toRespond = [];\n var len = observables.length;\n _this.values = new Array(len);\n for (var i = 0; i < len; i++) {\n _this.toRespond.push(i);\n }\n for (var i = 0; i < len; i++) {\n var observable = observables[i];\n _this.add(subscribeToResult_1.subscribeToResult(_this, observable, observable, i));\n }\n return _this;\n }\n WithLatestFromSubscriber.prototype.notifyNext = function (outerValue, innerValue, outerIndex, innerIndex, innerSub) {\n this.values[outerIndex] = innerValue;\n var toRespond = this.toRespond;\n if (toRespond.length > 0) {\n var found = toRespond.indexOf(outerIndex);\n if (found !== -1) {\n toRespond.splice(found, 1);\n }\n }\n };\n WithLatestFromSubscriber.prototype.notifyComplete = function () {\n };\n WithLatestFromSubscriber.prototype._next = function (value) {\n if (this.toRespond.length === 0) {\n var args = [value].concat(this.values);\n if (this.project) {\n this._tryProject(args);\n }\n else {\n this.destination.next(args);\n }\n }\n };\n WithLatestFromSubscriber.prototype._tryProject = function (args) {\n var result;\n try {\n result = this.project.apply(this, args);\n }\n catch (err) {\n this.destination.error(err);\n return;\n }\n this.destination.next(result);\n };\n return WithLatestFromSubscriber;\n}(OuterSubscriber_1.OuterSubscriber));\n//# sourceMappingURL=withLatestFrom.js.map",
+ "\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar zip_1 = require(\"../observable/zip\");\nfunction zip() {\n var observables = [];\n for (var _i = 0; _i < arguments.length; _i++) {\n observables[_i] = arguments[_i];\n }\n return function zipOperatorFunction(source) {\n return source.lift.call(zip_1.zip.apply(void 0, [source].concat(observables)));\n };\n}\nexports.zip = zip;\n//# sourceMappingURL=zip.js.map",
+ "\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar zip_1 = require(\"../observable/zip\");\nfunction zipAll(project) {\n return function (source) { return source.lift(new zip_1.ZipOperator(project)); };\n}\nexports.zipAll = zipAll;\n//# sourceMappingURL=zipAll.js.map",
+ "\"use strict\";\nvar __extends = (this && this.__extends) || (function () {\n var extendStatics = function (d, b) {\n extendStatics = Object.setPrototypeOf ||\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };\n return extendStatics(d, b);\n }\n return function (d, b) {\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n})();\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar Subscription_1 = require(\"../Subscription\");\nvar Action = (function (_super) {\n __extends(Action, _super);\n function Action(scheduler, work) {\n return _super.call(this) || this;\n }\n Action.prototype.schedule = function (state, delay) {\n if (delay === void 0) { delay = 0; }\n return this;\n };\n return Action;\n}(Subscription_1.Subscription));\nexports.Action = Action;\n//# sourceMappingURL=Action.js.map",
+ "\"use strict\";\nvar __extends = (this && this.__extends) || (function () {\n var extendStatics = function (d, b) {\n extendStatics = Object.setPrototypeOf ||\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };\n return extendStatics(d, b);\n }\n return function (d, b) {\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n})();\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar AsyncAction_1 = require(\"./AsyncAction\");\nvar AnimationFrameAction = (function (_super) {\n __extends(AnimationFrameAction, _super);\n function AnimationFrameAction(scheduler, work) {\n var _this = _super.call(this, scheduler, work) || this;\n _this.scheduler = scheduler;\n _this.work = work;\n return _this;\n }\n AnimationFrameAction.prototype.requestAsyncId = function (scheduler, id, delay) {\n if (delay === void 0) { delay = 0; }\n if (delay !== null && delay > 0) {\n return _super.prototype.requestAsyncId.call(this, scheduler, id, delay);\n }\n scheduler.actions.push(this);\n return scheduler.scheduled || (scheduler.scheduled = requestAnimationFrame(function () { return scheduler.flush(null); }));\n };\n AnimationFrameAction.prototype.recycleAsyncId = function (scheduler, id, delay) {\n if (delay === void 0) { delay = 0; }\n if ((delay !== null && delay > 0) || (delay === null && this.delay > 0)) {\n return _super.prototype.recycleAsyncId.call(this, scheduler, id, delay);\n }\n if (scheduler.actions.length === 0) {\n cancelAnimationFrame(id);\n scheduler.scheduled = undefined;\n }\n return undefined;\n };\n return AnimationFrameAction;\n}(AsyncAction_1.AsyncAction));\nexports.AnimationFrameAction = AnimationFrameAction;\n//# sourceMappingURL=AnimationFrameAction.js.map",
+ "\"use strict\";\nvar __extends = (this && this.__extends) || (function () {\n var extendStatics = function (d, b) {\n extendStatics = Object.setPrototypeOf ||\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };\n return extendStatics(d, b);\n }\n return function (d, b) {\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n})();\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar AsyncScheduler_1 = require(\"./AsyncScheduler\");\nvar AnimationFrameScheduler = (function (_super) {\n __extends(AnimationFrameScheduler, _super);\n function AnimationFrameScheduler() {\n return _super !== null && _super.apply(this, arguments) || this;\n }\n AnimationFrameScheduler.prototype.flush = function (action) {\n this.active = true;\n this.scheduled = undefined;\n var actions = this.actions;\n var error;\n var index = -1;\n var count = actions.length;\n action = action || actions.shift();\n do {\n if (error = action.execute(action.state, action.delay)) {\n break;\n }\n } while (++index < count && (action = actions.shift()));\n this.active = false;\n if (error) {\n while (++index < count && (action = actions.shift())) {\n action.unsubscribe();\n }\n throw error;\n }\n };\n return AnimationFrameScheduler;\n}(AsyncScheduler_1.AsyncScheduler));\nexports.AnimationFrameScheduler = AnimationFrameScheduler;\n//# sourceMappingURL=AnimationFrameScheduler.js.map",
+ "\"use strict\";\nvar __extends = (this && this.__extends) || (function () {\n var extendStatics = function (d, b) {\n extendStatics = Object.setPrototypeOf ||\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };\n return extendStatics(d, b);\n }\n return function (d, b) {\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n})();\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar Immediate_1 = require(\"../util/Immediate\");\nvar AsyncAction_1 = require(\"./AsyncAction\");\nvar AsapAction = (function (_super) {\n __extends(AsapAction, _super);\n function AsapAction(scheduler, work) {\n var _this = _super.call(this, scheduler, work) || this;\n _this.scheduler = scheduler;\n _this.work = work;\n return _this;\n }\n AsapAction.prototype.requestAsyncId = function (scheduler, id, delay) {\n if (delay === void 0) { delay = 0; }\n if (delay !== null && delay > 0) {\n return _super.prototype.requestAsyncId.call(this, scheduler, id, delay);\n }\n scheduler.actions.push(this);\n return scheduler.scheduled || (scheduler.scheduled = Immediate_1.Immediate.setImmediate(scheduler.flush.bind(scheduler, null)));\n };\n AsapAction.prototype.recycleAsyncId = function (scheduler, id, delay) {\n if (delay === void 0) { delay = 0; }\n if ((delay !== null && delay > 0) || (delay === null && this.delay > 0)) {\n return _super.prototype.recycleAsyncId.call(this, scheduler, id, delay);\n }\n if (scheduler.actions.length === 0) {\n Immediate_1.Immediate.clearImmediate(id);\n scheduler.scheduled = undefined;\n }\n return undefined;\n };\n return AsapAction;\n}(AsyncAction_1.AsyncAction));\nexports.AsapAction = AsapAction;\n//# sourceMappingURL=AsapAction.js.map",
+ "\"use strict\";\nvar __extends = (this && this.__extends) || (function () {\n var extendStatics = function (d, b) {\n extendStatics = Object.setPrototypeOf ||\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };\n return extendStatics(d, b);\n }\n return function (d, b) {\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n})();\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar AsyncScheduler_1 = require(\"./AsyncScheduler\");\nvar AsapScheduler = (function (_super) {\n __extends(AsapScheduler, _super);\n function AsapScheduler() {\n return _super !== null && _super.apply(this, arguments) || this;\n }\n AsapScheduler.prototype.flush = function (action) {\n this.active = true;\n this.scheduled = undefined;\n var actions = this.actions;\n var error;\n var index = -1;\n var count = actions.length;\n action = action || actions.shift();\n do {\n if (error = action.execute(action.state, action.delay)) {\n break;\n }\n } while (++index < count && (action = actions.shift()));\n this.active = false;\n if (error) {\n while (++index < count && (action = actions.shift())) {\n action.unsubscribe();\n }\n throw error;\n }\n };\n return AsapScheduler;\n}(AsyncScheduler_1.AsyncScheduler));\nexports.AsapScheduler = AsapScheduler;\n//# sourceMappingURL=AsapScheduler.js.map",
+ "\"use strict\";\nvar __extends = (this && this.__extends) || (function () {\n var extendStatics = function (d, b) {\n extendStatics = Object.setPrototypeOf ||\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };\n return extendStatics(d, b);\n }\n return function (d, b) {\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n})();\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar Action_1 = require(\"./Action\");\nvar AsyncAction = (function (_super) {\n __extends(AsyncAction, _super);\n function AsyncAction(scheduler, work) {\n var _this = _super.call(this, scheduler, work) || this;\n _this.scheduler = scheduler;\n _this.work = work;\n _this.pending = false;\n return _this;\n }\n AsyncAction.prototype.schedule = function (state, delay) {\n if (delay === void 0) { delay = 0; }\n if (this.closed) {\n return this;\n }\n this.state = state;\n var id = this.id;\n var scheduler = this.scheduler;\n if (id != null) {\n this.id = this.recycleAsyncId(scheduler, id, delay);\n }\n this.pending = true;\n this.delay = delay;\n this.id = this.id || this.requestAsyncId(scheduler, this.id, delay);\n return this;\n };\n AsyncAction.prototype.requestAsyncId = function (scheduler, id, delay) {\n if (delay === void 0) { delay = 0; }\n return setInterval(scheduler.flush.bind(scheduler, this), delay);\n };\n AsyncAction.prototype.recycleAsyncId = function (scheduler, id, delay) {\n if (delay === void 0) { delay = 0; }\n if (delay !== null && this.delay === delay && this.pending === false) {\n return id;\n }\n clearInterval(id);\n };\n AsyncAction.prototype.execute = function (state, delay) {\n if (this.closed) {\n return new Error('executing a cancelled action');\n }\n this.pending = false;\n var error = this._execute(state, delay);\n if (error) {\n return error;\n }\n else if (this.pending === false && this.id != null) {\n this.id = this.recycleAsyncId(this.scheduler, this.id, null);\n }\n };\n AsyncAction.prototype._execute = function (state, delay) {\n var errored = false;\n var errorValue = undefined;\n try {\n this.work(state);\n }\n catch (e) {\n errored = true;\n errorValue = !!e && e || new Error(e);\n }\n if (errored) {\n this.unsubscribe();\n return errorValue;\n }\n };\n AsyncAction.prototype._unsubscribe = function () {\n var id = this.id;\n var scheduler = this.scheduler;\n var actions = scheduler.actions;\n var index = actions.indexOf(this);\n this.work = null;\n this.state = null;\n this.pending = false;\n this.scheduler = null;\n if (index !== -1) {\n actions.splice(index, 1);\n }\n if (id != null) {\n this.id = this.recycleAsyncId(scheduler, id, null);\n }\n this.delay = null;\n };\n return AsyncAction;\n}(Action_1.Action));\nexports.AsyncAction = AsyncAction;\n//# sourceMappingURL=AsyncAction.js.map",
+ "\"use strict\";\nvar __extends = (this && this.__extends) || (function () {\n var extendStatics = function (d, b) {\n extendStatics = Object.setPrototypeOf ||\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };\n return extendStatics(d, b);\n }\n return function (d, b) {\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n})();\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar Scheduler_1 = require(\"../Scheduler\");\nvar AsyncScheduler = (function (_super) {\n __extends(AsyncScheduler, _super);\n function AsyncScheduler(SchedulerAction, now) {\n if (now === void 0) { now = Scheduler_1.Scheduler.now; }\n var _this = _super.call(this, SchedulerAction, function () {\n if (AsyncScheduler.delegate && AsyncScheduler.delegate !== _this) {\n return AsyncScheduler.delegate.now();\n }\n else {\n return now();\n }\n }) || this;\n _this.actions = [];\n _this.active = false;\n _this.scheduled = undefined;\n return _this;\n }\n AsyncScheduler.prototype.schedule = function (work, delay, state) {\n if (delay === void 0) { delay = 0; }\n if (AsyncScheduler.delegate && AsyncScheduler.delegate !== this) {\n return AsyncScheduler.delegate.schedule(work, delay, state);\n }\n else {\n return _super.prototype.schedule.call(this, work, delay, state);\n }\n };\n AsyncScheduler.prototype.flush = function (action) {\n var actions = this.actions;\n if (this.active) {\n actions.push(action);\n return;\n }\n var error;\n this.active = true;\n do {\n if (error = action.execute(action.state, action.delay)) {\n break;\n }\n } while (action = actions.shift());\n this.active = false;\n if (error) {\n while (action = actions.shift()) {\n action.unsubscribe();\n }\n throw error;\n }\n };\n return AsyncScheduler;\n}(Scheduler_1.Scheduler));\nexports.AsyncScheduler = AsyncScheduler;\n//# sourceMappingURL=AsyncScheduler.js.map",
+ "\"use strict\";\nvar __extends = (this && this.__extends) || (function () {\n var extendStatics = function (d, b) {\n extendStatics = Object.setPrototypeOf ||\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };\n return extendStatics(d, b);\n }\n return function (d, b) {\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n})();\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar AsyncAction_1 = require(\"./AsyncAction\");\nvar QueueAction = (function (_super) {\n __extends(QueueAction, _super);\n function QueueAction(scheduler, work) {\n var _this = _super.call(this, scheduler, work) || this;\n _this.scheduler = scheduler;\n _this.work = work;\n return _this;\n }\n QueueAction.prototype.schedule = function (state, delay) {\n if (delay === void 0) { delay = 0; }\n if (delay > 0) {\n return _super.prototype.schedule.call(this, state, delay);\n }\n this.delay = delay;\n this.state = state;\n this.scheduler.flush(this);\n return this;\n };\n QueueAction.prototype.execute = function (state, delay) {\n return (delay > 0 || this.closed) ?\n _super.prototype.execute.call(this, state, delay) :\n this._execute(state, delay);\n };\n QueueAction.prototype.requestAsyncId = function (scheduler, id, delay) {\n if (delay === void 0) { delay = 0; }\n if ((delay !== null && delay > 0) || (delay === null && this.delay > 0)) {\n return _super.prototype.requestAsyncId.call(this, scheduler, id, delay);\n }\n return scheduler.flush(this);\n };\n return QueueAction;\n}(AsyncAction_1.AsyncAction));\nexports.QueueAction = QueueAction;\n//# sourceMappingURL=QueueAction.js.map",
+ "\"use strict\";\nvar __extends = (this && this.__extends) || (function () {\n var extendStatics = function (d, b) {\n extendStatics = Object.setPrototypeOf ||\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };\n return extendStatics(d, b);\n }\n return function (d, b) {\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n})();\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar AsyncScheduler_1 = require(\"./AsyncScheduler\");\nvar QueueScheduler = (function (_super) {\n __extends(QueueScheduler, _super);\n function QueueScheduler() {\n return _super !== null && _super.apply(this, arguments) || this;\n }\n return QueueScheduler;\n}(AsyncScheduler_1.AsyncScheduler));\nexports.QueueScheduler = QueueScheduler;\n//# sourceMappingURL=QueueScheduler.js.map",
+ "\"use strict\";\nvar __extends = (this && this.__extends) || (function () {\n var extendStatics = function (d, b) {\n extendStatics = Object.setPrototypeOf ||\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };\n return extendStatics(d, b);\n }\n return function (d, b) {\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n})();\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar AsyncAction_1 = require(\"./AsyncAction\");\nvar AsyncScheduler_1 = require(\"./AsyncScheduler\");\nvar VirtualTimeScheduler = (function (_super) {\n __extends(VirtualTimeScheduler, _super);\n function VirtualTimeScheduler(SchedulerAction, maxFrames) {\n if (SchedulerAction === void 0) { SchedulerAction = VirtualAction; }\n if (maxFrames === void 0) { maxFrames = Number.POSITIVE_INFINITY; }\n var _this = _super.call(this, SchedulerAction, function () { return _this.frame; }) || this;\n _this.maxFrames = maxFrames;\n _this.frame = 0;\n _this.index = -1;\n return _this;\n }\n VirtualTimeScheduler.prototype.flush = function () {\n var _a = this, actions = _a.actions, maxFrames = _a.maxFrames;\n var error, action;\n while ((action = actions.shift()) && (this.frame = action.delay) <= maxFrames) {\n if (error = action.execute(action.state, action.delay)) {\n break;\n }\n }\n if (error) {\n while (action = actions.shift()) {\n action.unsubscribe();\n }\n throw error;\n }\n };\n VirtualTimeScheduler.frameTimeFactor = 10;\n return VirtualTimeScheduler;\n}(AsyncScheduler_1.AsyncScheduler));\nexports.VirtualTimeScheduler = VirtualTimeScheduler;\nvar VirtualAction = (function (_super) {\n __extends(VirtualAction, _super);\n function VirtualAction(scheduler, work, index) {\n if (index === void 0) { index = scheduler.index += 1; }\n var _this = _super.call(this, scheduler, work) || this;\n _this.scheduler = scheduler;\n _this.work = work;\n _this.index = index;\n _this.active = true;\n _this.index = scheduler.index = index;\n return _this;\n }\n VirtualAction.prototype.schedule = function (state, delay) {\n if (delay === void 0) { delay = 0; }\n if (!this.id) {\n return _super.prototype.schedule.call(this, state, delay);\n }\n this.active = false;\n var action = new VirtualAction(this.scheduler, this.work);\n this.add(action);\n return action.schedule(state, delay);\n };\n VirtualAction.prototype.requestAsyncId = function (scheduler, id, delay) {\n if (delay === void 0) { delay = 0; }\n this.delay = scheduler.frame + delay;\n var actions = scheduler.actions;\n actions.push(this);\n actions.sort(VirtualAction.sortActions);\n return true;\n };\n VirtualAction.prototype.recycleAsyncId = function (scheduler, id, delay) {\n if (delay === void 0) { delay = 0; }\n return undefined;\n };\n VirtualAction.prototype._execute = function (state, delay) {\n if (this.active === true) {\n return _super.prototype._execute.call(this, state, delay);\n }\n };\n VirtualAction.sortActions = function (a, b) {\n if (a.delay === b.delay) {\n if (a.index === b.index) {\n return 0;\n }\n else if (a.index > b.index) {\n return 1;\n }\n else {\n return -1;\n }\n }\n else if (a.delay > b.delay) {\n return 1;\n }\n else {\n return -1;\n }\n };\n return VirtualAction;\n}(AsyncAction_1.AsyncAction));\nexports.VirtualAction = VirtualAction;\n//# sourceMappingURL=VirtualTimeScheduler.js.map",
+ "\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar AnimationFrameAction_1 = require(\"./AnimationFrameAction\");\nvar AnimationFrameScheduler_1 = require(\"./AnimationFrameScheduler\");\nexports.animationFrame = new AnimationFrameScheduler_1.AnimationFrameScheduler(AnimationFrameAction_1.AnimationFrameAction);\n//# sourceMappingURL=animationFrame.js.map",
+ "\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar AsapAction_1 = require(\"./AsapAction\");\nvar AsapScheduler_1 = require(\"./AsapScheduler\");\nexports.asap = new AsapScheduler_1.AsapScheduler(AsapAction_1.AsapAction);\n//# sourceMappingURL=asap.js.map",
+ "\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar AsyncAction_1 = require(\"./AsyncAction\");\nvar AsyncScheduler_1 = require(\"./AsyncScheduler\");\nexports.async = new AsyncScheduler_1.AsyncScheduler(AsyncAction_1.AsyncAction);\n//# sourceMappingURL=async.js.map",
+ "\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar QueueAction_1 = require(\"./QueueAction\");\nvar QueueScheduler_1 = require(\"./QueueScheduler\");\nexports.queue = new QueueScheduler_1.QueueScheduler(QueueAction_1.QueueAction);\n//# sourceMappingURL=queue.js.map",
+ "\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nfunction getSymbolIterator() {\n if (typeof Symbol !== 'function' || !Symbol.iterator) {\n return '@@iterator';\n }\n return Symbol.iterator;\n}\nexports.getSymbolIterator = getSymbolIterator;\nexports.iterator = getSymbolIterator();\nexports.$$iterator = exports.iterator;\n//# sourceMappingURL=iterator.js.map",
+ "\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.observable = typeof Symbol === 'function' && Symbol.observable || '@@observable';\n//# sourceMappingURL=observable.js.map",
+ "\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.rxSubscriber = typeof Symbol === 'function'\n ? Symbol('rxSubscriber')\n : '@@rxSubscriber_' + Math.random();\nexports.$$rxSubscriber = exports.rxSubscriber;\n//# sourceMappingURL=rxSubscriber.js.map",
+ "\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nfunction ArgumentOutOfRangeErrorImpl() {\n Error.call(this);\n this.message = 'argument out of range';\n this.name = 'ArgumentOutOfRangeError';\n return this;\n}\nArgumentOutOfRangeErrorImpl.prototype = Object.create(Error.prototype);\nexports.ArgumentOutOfRangeError = ArgumentOutOfRangeErrorImpl;\n//# sourceMappingURL=ArgumentOutOfRangeError.js.map",
+ "\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nfunction EmptyErrorImpl() {\n Error.call(this);\n this.message = 'no elements in sequence';\n this.name = 'EmptyError';\n return this;\n}\nEmptyErrorImpl.prototype = Object.create(Error.prototype);\nexports.EmptyError = EmptyErrorImpl;\n//# sourceMappingURL=EmptyError.js.map",
+ "\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar nextHandle = 1;\nvar tasksByHandle = {};\nfunction runIfPresent(handle) {\n var cb = tasksByHandle[handle];\n if (cb) {\n cb();\n }\n}\nexports.Immediate = {\n setImmediate: function (cb) {\n var handle = nextHandle++;\n tasksByHandle[handle] = cb;\n Promise.resolve().then(function () { return runIfPresent(handle); });\n return handle;\n },\n clearImmediate: function (handle) {\n delete tasksByHandle[handle];\n },\n};\n//# sourceMappingURL=Immediate.js.map",
+ "\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nfunction ObjectUnsubscribedErrorImpl() {\n Error.call(this);\n this.message = 'object unsubscribed';\n this.name = 'ObjectUnsubscribedError';\n return this;\n}\nObjectUnsubscribedErrorImpl.prototype = Object.create(Error.prototype);\nexports.ObjectUnsubscribedError = ObjectUnsubscribedErrorImpl;\n//# sourceMappingURL=ObjectUnsubscribedError.js.map",
+ "\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nfunction TimeoutErrorImpl() {\n Error.call(this);\n this.message = 'Timeout has occurred';\n this.name = 'TimeoutError';\n return this;\n}\nTimeoutErrorImpl.prototype = Object.create(Error.prototype);\nexports.TimeoutError = TimeoutErrorImpl;\n//# sourceMappingURL=TimeoutError.js.map",
+ "\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nfunction UnsubscriptionErrorImpl(errors) {\n Error.call(this);\n this.message = errors ?\n errors.length + \" errors occurred during unsubscription:\\n\" + errors.map(function (err, i) { return i + 1 + \") \" + err.toString(); }).join('\\n ') : '';\n this.name = 'UnsubscriptionError';\n this.errors = errors;\n return this;\n}\nUnsubscriptionErrorImpl.prototype = Object.create(Error.prototype);\nexports.UnsubscriptionError = UnsubscriptionErrorImpl;\n//# sourceMappingURL=UnsubscriptionError.js.map",
+ "\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar Subscriber_1 = require(\"../Subscriber\");\nfunction canReportError(observer) {\n while (observer) {\n var _a = observer, closed_1 = _a.closed, destination = _a.destination, isStopped = _a.isStopped;\n if (closed_1 || isStopped) {\n return false;\n }\n else if (destination && destination instanceof Subscriber_1.Subscriber) {\n observer = destination;\n }\n else {\n observer = null;\n }\n }\n return true;\n}\nexports.canReportError = canReportError;\n//# sourceMappingURL=canReportError.js.map",
+ "\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.errorObject = { e: {} };\n//# sourceMappingURL=errorObject.js.map",
+ "\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nfunction hostReportError(err) {\n setTimeout(function () { throw err; });\n}\nexports.hostReportError = hostReportError;\n//# sourceMappingURL=hostReportError.js.map",
+ "\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nfunction identity(x) {\n return x;\n}\nexports.identity = identity;\n//# sourceMappingURL=identity.js.map",
+ "\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.isArray = Array.isArray || (function (x) { return x && typeof x.length === 'number'; });\n//# sourceMappingURL=isArray.js.map",
+ "\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.isArrayLike = (function (x) { return x && typeof x.length === 'number' && typeof x !== 'function'; });\n//# sourceMappingURL=isArrayLike.js.map",
+ "\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nfunction isDate(value) {\n return value instanceof Date && !isNaN(+value);\n}\nexports.isDate = isDate;\n//# sourceMappingURL=isDate.js.map",
+ "\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nfunction isFunction(x) {\n return typeof x === 'function';\n}\nexports.isFunction = isFunction;\n//# sourceMappingURL=isFunction.js.map",
+ "\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar observable_1 = require(\"../symbol/observable\");\nfunction isInteropObservable(input) {\n return input && typeof input[observable_1.observable] === 'function';\n}\nexports.isInteropObservable = isInteropObservable;\n//# sourceMappingURL=isInteropObservable.js.map",
+ "\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar iterator_1 = require(\"../symbol/iterator\");\nfunction isIterable(input) {\n return input && typeof input[iterator_1.iterator] === 'function';\n}\nexports.isIterable = isIterable;\n//# sourceMappingURL=isIterable.js.map",
+ "\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar isArray_1 = require(\"./isArray\");\nfunction isNumeric(val) {\n return !isArray_1.isArray(val) && (val - parseFloat(val) + 1) >= 0;\n}\nexports.isNumeric = isNumeric;\n//# sourceMappingURL=isNumeric.js.map",
+ "\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nfunction isObject(x) {\n return x != null && typeof x === 'object';\n}\nexports.isObject = isObject;\n//# sourceMappingURL=isObject.js.map",
+ "\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar Observable_1 = require(\"../Observable\");\nfunction isObservable(obj) {\n return !!obj && (obj instanceof Observable_1.Observable || (typeof obj.lift === 'function' && typeof obj.subscribe === 'function'));\n}\nexports.isObservable = isObservable;\n//# sourceMappingURL=isObservable.js.map",
+ "\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nfunction isPromise(value) {\n return value && typeof value.subscribe !== 'function' && typeof value.then === 'function';\n}\nexports.isPromise = isPromise;\n//# sourceMappingURL=isPromise.js.map",
+ "\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nfunction isScheduler(value) {\n return value && typeof value.schedule === 'function';\n}\nexports.isScheduler = isScheduler;\n//# sourceMappingURL=isScheduler.js.map",
+ "\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nfunction noop() { }\nexports.noop = noop;\n//# sourceMappingURL=noop.js.map",
+ "\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nfunction not(pred, thisArg) {\n function notPred() {\n return !(notPred.pred.apply(notPred.thisArg, arguments));\n }\n notPred.pred = pred;\n notPred.thisArg = thisArg;\n return notPred;\n}\nexports.not = not;\n//# sourceMappingURL=not.js.map",
+ "\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar noop_1 = require(\"./noop\");\nfunction pipe() {\n var fns = [];\n for (var _i = 0; _i < arguments.length; _i++) {\n fns[_i] = arguments[_i];\n }\n return pipeFromArray(fns);\n}\nexports.pipe = pipe;\nfunction pipeFromArray(fns) {\n if (!fns) {\n return noop_1.noop;\n }\n if (fns.length === 1) {\n return fns[0];\n }\n return function piped(input) {\n return fns.reduce(function (prev, fn) { return fn(prev); }, input);\n };\n}\nexports.pipeFromArray = pipeFromArray;\n//# sourceMappingURL=pipe.js.map",
+ "\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar Observable_1 = require(\"../Observable\");\nvar subscribeToArray_1 = require(\"./subscribeToArray\");\nvar subscribeToPromise_1 = require(\"./subscribeToPromise\");\nvar subscribeToIterable_1 = require(\"./subscribeToIterable\");\nvar subscribeToObservable_1 = require(\"./subscribeToObservable\");\nvar isArrayLike_1 = require(\"./isArrayLike\");\nvar isPromise_1 = require(\"./isPromise\");\nvar isObject_1 = require(\"./isObject\");\nvar iterator_1 = require(\"../symbol/iterator\");\nvar observable_1 = require(\"../symbol/observable\");\nexports.subscribeTo = function (result) {\n if (result instanceof Observable_1.Observable) {\n return function (subscriber) {\n if (result._isScalar) {\n subscriber.next(result.value);\n subscriber.complete();\n return undefined;\n }\n else {\n return result.subscribe(subscriber);\n }\n };\n }\n else if (result && typeof result[observable_1.observable] === 'function') {\n return subscribeToObservable_1.subscribeToObservable(result);\n }\n else if (isArrayLike_1.isArrayLike(result)) {\n return subscribeToArray_1.subscribeToArray(result);\n }\n else if (isPromise_1.isPromise(result)) {\n return subscribeToPromise_1.subscribeToPromise(result);\n }\n else if (result && typeof result[iterator_1.iterator] === 'function') {\n return subscribeToIterable_1.subscribeToIterable(result);\n }\n else {\n var value = isObject_1.isObject(result) ? 'an invalid object' : \"'\" + result + \"'\";\n var msg = \"You provided \" + value + \" where a stream was expected.\"\n + ' You can provide an Observable, Promise, Array, or Iterable.';\n throw new TypeError(msg);\n }\n};\n//# sourceMappingURL=subscribeTo.js.map",
+ "\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.subscribeToArray = function (array) { return function (subscriber) {\n for (var i = 0, len = array.length; i < len && !subscriber.closed; i++) {\n subscriber.next(array[i]);\n }\n if (!subscriber.closed) {\n subscriber.complete();\n }\n}; };\n//# sourceMappingURL=subscribeToArray.js.map",
+ "\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar iterator_1 = require(\"../symbol/iterator\");\nexports.subscribeToIterable = function (iterable) { return function (subscriber) {\n var iterator = iterable[iterator_1.iterator]();\n do {\n var item = iterator.next();\n if (item.done) {\n subscriber.complete();\n break;\n }\n subscriber.next(item.value);\n if (subscriber.closed) {\n break;\n }\n } while (true);\n if (typeof iterator.return === 'function') {\n subscriber.add(function () {\n if (iterator.return) {\n iterator.return();\n }\n });\n }\n return subscriber;\n}; };\n//# sourceMappingURL=subscribeToIterable.js.map",
+ "\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar observable_1 = require(\"../symbol/observable\");\nexports.subscribeToObservable = function (obj) { return function (subscriber) {\n var obs = obj[observable_1.observable]();\n if (typeof obs.subscribe !== 'function') {\n throw new TypeError('Provided object does not correctly implement Symbol.observable');\n }\n else {\n return obs.subscribe(subscriber);\n }\n}; };\n//# sourceMappingURL=subscribeToObservable.js.map",
+ "\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar hostReportError_1 = require(\"./hostReportError\");\nexports.subscribeToPromise = function (promise) { return function (subscriber) {\n promise.then(function (value) {\n if (!subscriber.closed) {\n subscriber.next(value);\n subscriber.complete();\n }\n }, function (err) { return subscriber.error(err); })\n .then(null, hostReportError_1.hostReportError);\n return subscriber;\n}; };\n//# sourceMappingURL=subscribeToPromise.js.map",
+ "\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar InnerSubscriber_1 = require(\"../InnerSubscriber\");\nvar subscribeTo_1 = require(\"./subscribeTo\");\nfunction subscribeToResult(outerSubscriber, result, outerValue, outerIndex, destination) {\n if (destination === void 0) { destination = new InnerSubscriber_1.InnerSubscriber(outerSubscriber, outerValue, outerIndex); }\n if (destination.closed) {\n return;\n }\n return subscribeTo_1.subscribeTo(result)(destination);\n}\nexports.subscribeToResult = subscribeToResult;\n//# sourceMappingURL=subscribeToResult.js.map",
+ "\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar Subscriber_1 = require(\"../Subscriber\");\nvar rxSubscriber_1 = require(\"../symbol/rxSubscriber\");\nvar Observer_1 = require(\"../Observer\");\nfunction toSubscriber(nextOrObserver, error, complete) {\n if (nextOrObserver) {\n if (nextOrObserver instanceof Subscriber_1.Subscriber) {\n return nextOrObserver;\n }\n if (nextOrObserver[rxSubscriber_1.rxSubscriber]) {\n return nextOrObserver[rxSubscriber_1.rxSubscriber]();\n }\n }\n if (!nextOrObserver && !error && !complete) {\n return new Subscriber_1.Subscriber(Observer_1.empty);\n }\n return new Subscriber_1.Subscriber(nextOrObserver, error, complete);\n}\nexports.toSubscriber = toSubscriber;\n//# sourceMappingURL=toSubscriber.js.map",
+ "\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar errorObject_1 = require(\"./errorObject\");\nvar tryCatchTarget;\nfunction tryCatcher() {\n try {\n return tryCatchTarget.apply(this, arguments);\n }\n catch (e) {\n errorObject_1.errorObject.e = e;\n return errorObject_1.errorObject;\n }\n}\nfunction tryCatch(fn) {\n tryCatchTarget = fn;\n return tryCatcher;\n}\nexports.tryCatch = tryCatch;\n//# sourceMappingURL=tryCatch.js.map",
+ "\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar audit_1 = require(\"../internal/operators/audit\");\nexports.audit = audit_1.audit;\nvar auditTime_1 = require(\"../internal/operators/auditTime\");\nexports.auditTime = auditTime_1.auditTime;\nvar buffer_1 = require(\"../internal/operators/buffer\");\nexports.buffer = buffer_1.buffer;\nvar bufferCount_1 = require(\"../internal/operators/bufferCount\");\nexports.bufferCount = bufferCount_1.bufferCount;\nvar bufferTime_1 = require(\"../internal/operators/bufferTime\");\nexports.bufferTime = bufferTime_1.bufferTime;\nvar bufferToggle_1 = require(\"../internal/operators/bufferToggle\");\nexports.bufferToggle = bufferToggle_1.bufferToggle;\nvar bufferWhen_1 = require(\"../internal/operators/bufferWhen\");\nexports.bufferWhen = bufferWhen_1.bufferWhen;\nvar catchError_1 = require(\"../internal/operators/catchError\");\nexports.catchError = catchError_1.catchError;\nvar combineAll_1 = require(\"../internal/operators/combineAll\");\nexports.combineAll = combineAll_1.combineAll;\nvar combineLatest_1 = require(\"../internal/operators/combineLatest\");\nexports.combineLatest = combineLatest_1.combineLatest;\nvar concat_1 = require(\"../internal/operators/concat\");\nexports.concat = concat_1.concat;\nvar concatAll_1 = require(\"../internal/operators/concatAll\");\nexports.concatAll = concatAll_1.concatAll;\nvar concatMap_1 = require(\"../internal/operators/concatMap\");\nexports.concatMap = concatMap_1.concatMap;\nvar concatMapTo_1 = require(\"../internal/operators/concatMapTo\");\nexports.concatMapTo = concatMapTo_1.concatMapTo;\nvar count_1 = require(\"../internal/operators/count\");\nexports.count = count_1.count;\nvar debounce_1 = require(\"../internal/operators/debounce\");\nexports.debounce = debounce_1.debounce;\nvar debounceTime_1 = require(\"../internal/operators/debounceTime\");\nexports.debounceTime = debounceTime_1.debounceTime;\nvar defaultIfEmpty_1 = require(\"../internal/operators/defaultIfEmpty\");\nexports.defaultIfEmpty = defaultIfEmpty_1.defaultIfEmpty;\nvar delay_1 = require(\"../internal/operators/delay\");\nexports.delay = delay_1.delay;\nvar delayWhen_1 = require(\"../internal/operators/delayWhen\");\nexports.delayWhen = delayWhen_1.delayWhen;\nvar dematerialize_1 = require(\"../internal/operators/dematerialize\");\nexports.dematerialize = dematerialize_1.dematerialize;\nvar distinct_1 = require(\"../internal/operators/distinct\");\nexports.distinct = distinct_1.distinct;\nvar distinctUntilChanged_1 = require(\"../internal/operators/distinctUntilChanged\");\nexports.distinctUntilChanged = distinctUntilChanged_1.distinctUntilChanged;\nvar distinctUntilKeyChanged_1 = require(\"../internal/operators/distinctUntilKeyChanged\");\nexports.distinctUntilKeyChanged = distinctUntilKeyChanged_1.distinctUntilKeyChanged;\nvar elementAt_1 = require(\"../internal/operators/elementAt\");\nexports.elementAt = elementAt_1.elementAt;\nvar endWith_1 = require(\"../internal/operators/endWith\");\nexports.endWith = endWith_1.endWith;\nvar every_1 = require(\"../internal/operators/every\");\nexports.every = every_1.every;\nvar exhaust_1 = require(\"../internal/operators/exhaust\");\nexports.exhaust = exhaust_1.exhaust;\nvar exhaustMap_1 = require(\"../internal/operators/exhaustMap\");\nexports.exhaustMap = exhaustMap_1.exhaustMap;\nvar expand_1 = require(\"../internal/operators/expand\");\nexports.expand = expand_1.expand;\nvar filter_1 = require(\"../internal/operators/filter\");\nexports.filter = filter_1.filter;\nvar finalize_1 = require(\"../internal/operators/finalize\");\nexports.finalize = finalize_1.finalize;\nvar find_1 = require(\"../internal/operators/find\");\nexports.find = find_1.find;\nvar findIndex_1 = require(\"../internal/operators/findIndex\");\nexports.findIndex = findIndex_1.findIndex;\nvar first_1 = require(\"../internal/operators/first\");\nexports.first = first_1.first;\nvar groupBy_1 = require(\"../internal/operators/groupBy\");\nexports.groupBy = groupBy_1.groupBy;\nvar ignoreElements_1 = require(\"../internal/operators/ignoreElements\");\nexports.ignoreElements = ignoreElements_1.ignoreElements;\nvar isEmpty_1 = require(\"../internal/operators/isEmpty\");\nexports.isEmpty = isEmpty_1.isEmpty;\nvar last_1 = require(\"../internal/operators/last\");\nexports.last = last_1.last;\nvar map_1 = require(\"../internal/operators/map\");\nexports.map = map_1.map;\nvar mapTo_1 = require(\"../internal/operators/mapTo\");\nexports.mapTo = mapTo_1.mapTo;\nvar materialize_1 = require(\"../internal/operators/materialize\");\nexports.materialize = materialize_1.materialize;\nvar max_1 = require(\"../internal/operators/max\");\nexports.max = max_1.max;\nvar merge_1 = require(\"../internal/operators/merge\");\nexports.merge = merge_1.merge;\nvar mergeAll_1 = require(\"../internal/operators/mergeAll\");\nexports.mergeAll = mergeAll_1.mergeAll;\nvar mergeMap_1 = require(\"../internal/operators/mergeMap\");\nexports.mergeMap = mergeMap_1.mergeMap;\nvar mergeMap_2 = require(\"../internal/operators/mergeMap\");\nexports.flatMap = mergeMap_2.mergeMap;\nvar mergeMapTo_1 = require(\"../internal/operators/mergeMapTo\");\nexports.mergeMapTo = mergeMapTo_1.mergeMapTo;\nvar mergeScan_1 = require(\"../internal/operators/mergeScan\");\nexports.mergeScan = mergeScan_1.mergeScan;\nvar min_1 = require(\"../internal/operators/min\");\nexports.min = min_1.min;\nvar multicast_1 = require(\"../internal/operators/multicast\");\nexports.multicast = multicast_1.multicast;\nvar observeOn_1 = require(\"../internal/operators/observeOn\");\nexports.observeOn = observeOn_1.observeOn;\nvar onErrorResumeNext_1 = require(\"../internal/operators/onErrorResumeNext\");\nexports.onErrorResumeNext = onErrorResumeNext_1.onErrorResumeNext;\nvar pairwise_1 = require(\"../internal/operators/pairwise\");\nexports.pairwise = pairwise_1.pairwise;\nvar partition_1 = require(\"../internal/operators/partition\");\nexports.partition = partition_1.partition;\nvar pluck_1 = require(\"../internal/operators/pluck\");\nexports.pluck = pluck_1.pluck;\nvar publish_1 = require(\"../internal/operators/publish\");\nexports.publish = publish_1.publish;\nvar publishBehavior_1 = require(\"../internal/operators/publishBehavior\");\nexports.publishBehavior = publishBehavior_1.publishBehavior;\nvar publishLast_1 = require(\"../internal/operators/publishLast\");\nexports.publishLast = publishLast_1.publishLast;\nvar publishReplay_1 = require(\"../internal/operators/publishReplay\");\nexports.publishReplay = publishReplay_1.publishReplay;\nvar race_1 = require(\"../internal/operators/race\");\nexports.race = race_1.race;\nvar reduce_1 = require(\"../internal/operators/reduce\");\nexports.reduce = reduce_1.reduce;\nvar repeat_1 = require(\"../internal/operators/repeat\");\nexports.repeat = repeat_1.repeat;\nvar repeatWhen_1 = require(\"../internal/operators/repeatWhen\");\nexports.repeatWhen = repeatWhen_1.repeatWhen;\nvar retry_1 = require(\"../internal/operators/retry\");\nexports.retry = retry_1.retry;\nvar retryWhen_1 = require(\"../internal/operators/retryWhen\");\nexports.retryWhen = retryWhen_1.retryWhen;\nvar refCount_1 = require(\"../internal/operators/refCount\");\nexports.refCount = refCount_1.refCount;\nvar sample_1 = require(\"../internal/operators/sample\");\nexports.sample = sample_1.sample;\nvar sampleTime_1 = require(\"../internal/operators/sampleTime\");\nexports.sampleTime = sampleTime_1.sampleTime;\nvar scan_1 = require(\"../internal/operators/scan\");\nexports.scan = scan_1.scan;\nvar sequenceEqual_1 = require(\"../internal/operators/sequenceEqual\");\nexports.sequenceEqual = sequenceEqual_1.sequenceEqual;\nvar share_1 = require(\"../internal/operators/share\");\nexports.share = share_1.share;\nvar shareReplay_1 = require(\"../internal/operators/shareReplay\");\nexports.shareReplay = shareReplay_1.shareReplay;\nvar single_1 = require(\"../internal/operators/single\");\nexports.single = single_1.single;\nvar skip_1 = require(\"../internal/operators/skip\");\nexports.skip = skip_1.skip;\nvar skipLast_1 = require(\"../internal/operators/skipLast\");\nexports.skipLast = skipLast_1.skipLast;\nvar skipUntil_1 = require(\"../internal/operators/skipUntil\");\nexports.skipUntil = skipUntil_1.skipUntil;\nvar skipWhile_1 = require(\"../internal/operators/skipWhile\");\nexports.skipWhile = skipWhile_1.skipWhile;\nvar startWith_1 = require(\"../internal/operators/startWith\");\nexports.startWith = startWith_1.startWith;\nvar subscribeOn_1 = require(\"../internal/operators/subscribeOn\");\nexports.subscribeOn = subscribeOn_1.subscribeOn;\nvar switchAll_1 = require(\"../internal/operators/switchAll\");\nexports.switchAll = switchAll_1.switchAll;\nvar switchMap_1 = require(\"../internal/operators/switchMap\");\nexports.switchMap = switchMap_1.switchMap;\nvar switchMapTo_1 = require(\"../internal/operators/switchMapTo\");\nexports.switchMapTo = switchMapTo_1.switchMapTo;\nvar take_1 = require(\"../internal/operators/take\");\nexports.take = take_1.take;\nvar takeLast_1 = require(\"../internal/operators/takeLast\");\nexports.takeLast = takeLast_1.takeLast;\nvar takeUntil_1 = require(\"../internal/operators/takeUntil\");\nexports.takeUntil = takeUntil_1.takeUntil;\nvar takeWhile_1 = require(\"../internal/operators/takeWhile\");\nexports.takeWhile = takeWhile_1.takeWhile;\nvar tap_1 = require(\"../internal/operators/tap\");\nexports.tap = tap_1.tap;\nvar throttle_1 = require(\"../internal/operators/throttle\");\nexports.throttle = throttle_1.throttle;\nvar throttleTime_1 = require(\"../internal/operators/throttleTime\");\nexports.throttleTime = throttleTime_1.throttleTime;\nvar throwIfEmpty_1 = require(\"../internal/operators/throwIfEmpty\");\nexports.throwIfEmpty = throwIfEmpty_1.throwIfEmpty;\nvar timeInterval_1 = require(\"../internal/operators/timeInterval\");\nexports.timeInterval = timeInterval_1.timeInterval;\nvar timeout_1 = require(\"../internal/operators/timeout\");\nexports.timeout = timeout_1.timeout;\nvar timeoutWith_1 = require(\"../internal/operators/timeoutWith\");\nexports.timeoutWith = timeoutWith_1.timeoutWith;\nvar timestamp_1 = require(\"../internal/operators/timestamp\");\nexports.timestamp = timestamp_1.timestamp;\nvar toArray_1 = require(\"../internal/operators/toArray\");\nexports.toArray = toArray_1.toArray;\nvar window_1 = require(\"../internal/operators/window\");\nexports.window = window_1.window;\nvar windowCount_1 = require(\"../internal/operators/windowCount\");\nexports.windowCount = windowCount_1.windowCount;\nvar windowTime_1 = require(\"../internal/operators/windowTime\");\nexports.windowTime = windowTime_1.windowTime;\nvar windowToggle_1 = require(\"../internal/operators/windowToggle\");\nexports.windowToggle = windowToggle_1.windowToggle;\nvar windowWhen_1 = require(\"../internal/operators/windowWhen\");\nexports.windowWhen = windowWhen_1.windowWhen;\nvar withLatestFrom_1 = require(\"../internal/operators/withLatestFrom\");\nexports.withLatestFrom = withLatestFrom_1.withLatestFrom;\nvar zip_1 = require(\"../internal/operators/zip\");\nexports.zip = zip_1.zip;\nvar zipAll_1 = require(\"../internal/operators/zipAll\");\nexports.zipAll = zipAll_1.zipAll;\n//# sourceMappingURL=index.js.map",
+ "// threejs.org/license\n(function(l,ya){\"object\"===typeof exports&&\"undefined\"!==typeof module?ya(exports):\"function\"===typeof define&&define.amd?define([\"exports\"],ya):ya(l.THREE={})})(this,function(l){function ya(){}function z(a,b){this.x=a||0;this.y=b||0}function I(){this.elements=[1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1];0<arguments.length&&console.error(\"THREE.Matrix4: the constructor no longer reads arguments. use .set() instead.\")}function fa(a,b,c,d){this._x=a||0;this._y=b||0;this._z=c||0;this._w=void 0!==d?d:1}function p(a,\nb,c){this.x=a||0;this.y=b||0;this.z=c||0}function ra(){this.elements=[1,0,0,0,1,0,0,0,1];0<arguments.length&&console.error(\"THREE.Matrix3: the constructor no longer reads arguments. use .set() instead.\")}function T(a,b,c,d,e,f,g,h,k,m){Object.defineProperty(this,\"id\",{value:Ef++});this.uuid=H.generateUUID();this.name=\"\";this.image=void 0!==a?a:T.DEFAULT_IMAGE;this.mipmaps=[];this.mapping=void 0!==b?b:T.DEFAULT_MAPPING;this.wrapS=void 0!==c?c:1001;this.wrapT=void 0!==d?d:1001;this.magFilter=void 0!==\ne?e:1006;this.minFilter=void 0!==f?f:1008;this.anisotropy=void 0!==k?k:1;this.format=void 0!==g?g:1023;this.type=void 0!==h?h:1009;this.offset=new z(0,0);this.repeat=new z(1,1);this.center=new z(0,0);this.rotation=0;this.matrixAutoUpdate=!0;this.matrix=new ra;this.generateMipmaps=!0;this.premultiplyAlpha=!1;this.flipY=!0;this.unpackAlignment=4;this.encoding=void 0!==m?m:3E3;this.version=0;this.onUpdate=null}function V(a,b,c,d){this.x=a||0;this.y=b||0;this.z=c||0;this.w=void 0!==d?d:1}function fb(a,\nb,c){this.width=a;this.height=b;this.scissor=new V(0,0,a,b);this.scissorTest=!1;this.viewport=new V(0,0,a,b);c=c||{};void 0===c.minFilter&&(c.minFilter=1006);this.texture=new T(void 0,void 0,c.wrapS,c.wrapT,c.magFilter,c.minFilter,c.format,c.type,c.anisotropy,c.encoding);this.texture.generateMipmaps=void 0!==c.generateMipmaps?c.generateMipmaps:!0;this.depthBuffer=void 0!==c.depthBuffer?c.depthBuffer:!0;this.stencilBuffer=void 0!==c.stencilBuffer?c.stencilBuffer:!0;this.depthTexture=void 0!==c.depthTexture?\nc.depthTexture:null}function Gb(a,b,c){fb.call(this,a,b,c);this.activeMipMapLevel=this.activeCubeFace=0}function gb(a,b,c,d,e,f,g,h,k,m,q,n){T.call(this,null,f,g,h,k,m,d,e,q,n);this.image={data:a,width:b,height:c};this.magFilter=void 0!==k?k:1003;this.minFilter=void 0!==m?m:1003;this.flipY=this.generateMipmaps=!1;this.unpackAlignment=1}function Sa(a,b){this.min=void 0!==a?a:new p(Infinity,Infinity,Infinity);this.max=void 0!==b?b:new p(-Infinity,-Infinity,-Infinity)}function Da(a,b){this.center=void 0!==\na?a:new p;this.radius=void 0!==b?b:0}function Ma(a,b){this.normal=void 0!==a?a:new p(1,0,0);this.constant=void 0!==b?b:0}function md(a,b,c,d,e,f){this.planes=[void 0!==a?a:new Ma,void 0!==b?b:new Ma,void 0!==c?c:new Ma,void 0!==d?d:new Ma,void 0!==e?e:new Ma,void 0!==f?f:new Ma]}function G(a,b,c){return void 0===b&&void 0===c?this.set(a):this.setRGB(a,b,c)}function Qd(){function a(e,f){!1!==c&&(d(e,f),b.requestAnimationFrame(a))}var b=null,c=!1,d=null;return{start:function(){!0!==c&&null!==d&&(b.requestAnimationFrame(a),\nc=!0)},stop:function(){c=!1},setAnimationLoop:function(a){d=a},setContext:function(a){b=a}}}function Ff(a){function b(b,c){var d=b.array,e=b.dynamic?a.DYNAMIC_DRAW:a.STATIC_DRAW,h=a.createBuffer();a.bindBuffer(c,h);a.bufferData(c,d,e);b.onUploadCallback();c=a.FLOAT;d instanceof Float32Array?c=a.FLOAT:d instanceof Float64Array?console.warn(\"THREE.WebGLAttributes: Unsupported data buffer format: Float64Array.\"):d instanceof Uint16Array?c=a.UNSIGNED_SHORT:d instanceof Int16Array?c=a.SHORT:d instanceof\nUint32Array?c=a.UNSIGNED_INT:d instanceof Int32Array?c=a.INT:d instanceof Int8Array?c=a.BYTE:d instanceof Uint8Array&&(c=a.UNSIGNED_BYTE);return{buffer:h,type:c,bytesPerElement:d.BYTES_PER_ELEMENT,version:b.version}}var c=new WeakMap;return{get:function(a){a.isInterleavedBufferAttribute&&(a=a.data);return c.get(a)},remove:function(b){b.isInterleavedBufferAttribute&&(b=b.data);var d=c.get(b);d&&(a.deleteBuffer(d.buffer),c.delete(b))},update:function(d,e){d.isInterleavedBufferAttribute&&(d=d.data);\nvar f=c.get(d);if(void 0===f)c.set(d,b(d,e));else if(f.version<d.version){var g=d,h=g.array,k=g.updateRange;a.bindBuffer(e,f.buffer);!1===g.dynamic?a.bufferData(e,h,a.STATIC_DRAW):-1===k.count?a.bufferSubData(e,0,h):0===k.count?console.error(\"THREE.WebGLObjects.updateBuffer: dynamic THREE.BufferAttribute marked as needsUpdate but updateRange.count is 0, ensure you are using set methods or updating manually.\"):(a.bufferSubData(e,k.offset*h.BYTES_PER_ELEMENT,h.subarray(k.offset,k.offset+k.count)),k.count=\n-1);f.version=d.version}}}}function hb(a,b,c,d){this._x=a||0;this._y=b||0;this._z=c||0;this._order=d||hb.DefaultOrder}function Rd(){this.mask=1}function D(){Object.defineProperty(this,\"id\",{value:Gf++});this.uuid=H.generateUUID();this.name=\"\";this.type=\"Object3D\";this.parent=null;this.children=[];this.up=D.DefaultUp.clone();var a=new p,b=new hb,c=new fa,d=new p(1,1,1);b.onChange(function(){c.setFromEuler(b,!1)});c.onChange(function(){b.setFromQuaternion(c,void 0,!1)});Object.defineProperties(this,\n{position:{enumerable:!0,value:a},rotation:{enumerable:!0,value:b},quaternion:{enumerable:!0,value:c},scale:{enumerable:!0,value:d},modelViewMatrix:{value:new I},normalMatrix:{value:new ra}});this.matrix=new I;this.matrixWorld=new I;this.matrixAutoUpdate=D.DefaultMatrixAutoUpdate;this.matrixWorldNeedsUpdate=!1;this.layers=new Rd;this.visible=!0;this.receiveShadow=this.castShadow=!1;this.frustumCulled=!0;this.renderOrder=0;this.userData={}}function Na(){D.call(this);this.type=\"Camera\";this.matrixWorldInverse=\nnew I;this.projectionMatrix=new I}function Hb(a,b,c,d,e,f){Na.call(this);this.type=\"OrthographicCamera\";this.zoom=1;this.view=null;this.left=a;this.right=b;this.top=c;this.bottom=d;this.near=void 0!==e?e:.1;this.far=void 0!==f?f:2E3;this.updateProjectionMatrix()}function Ta(a,b,c,d,e,f){this.a=a;this.b=b;this.c=c;this.normal=d&&d.isVector3?d:new p;this.vertexNormals=Array.isArray(d)?d:[];this.color=e&&e.isColor?e:new G;this.vertexColors=Array.isArray(e)?e:[];this.materialIndex=void 0!==f?f:0}function R(){Object.defineProperty(this,\n\"id\",{value:Hf+=2});this.uuid=H.generateUUID();this.name=\"\";this.type=\"Geometry\";this.vertices=[];this.colors=[];this.faces=[];this.faceVertexUvs=[[]];this.morphTargets=[];this.morphNormals=[];this.skinWeights=[];this.skinIndices=[];this.lineDistances=[];this.boundingSphere=this.boundingBox=null;this.groupsNeedUpdate=this.lineDistancesNeedUpdate=this.colorsNeedUpdate=this.normalsNeedUpdate=this.uvsNeedUpdate=this.verticesNeedUpdate=this.elementsNeedUpdate=!1}function Q(a,b,c){if(Array.isArray(a))throw new TypeError(\"THREE.BufferAttribute: array should be a Typed Array.\");\nthis.name=\"\";this.array=a;this.itemSize=b;this.count=void 0!==a?a.length/b:0;this.normalized=!0===c;this.dynamic=!1;this.updateRange={offset:0,count:-1};this.version=0}function oc(a,b,c){Q.call(this,new Int8Array(a),b,c)}function pc(a,b,c){Q.call(this,new Uint8Array(a),b,c)}function qc(a,b,c){Q.call(this,new Uint8ClampedArray(a),b,c)}function rc(a,b,c){Q.call(this,new Int16Array(a),b,c)}function ib(a,b,c){Q.call(this,new Uint16Array(a),b,c)}function sc(a,b,c){Q.call(this,new Int32Array(a),b,c)}function jb(a,\nb,c){Q.call(this,new Uint32Array(a),b,c)}function A(a,b,c){Q.call(this,new Float32Array(a),b,c)}function tc(a,b,c){Q.call(this,new Float64Array(a),b,c)}function Ee(){this.vertices=[];this.normals=[];this.colors=[];this.uvs=[];this.uvs2=[];this.groups=[];this.morphTargets={};this.skinWeights=[];this.skinIndices=[];this.boundingSphere=this.boundingBox=null;this.groupsNeedUpdate=this.uvsNeedUpdate=this.colorsNeedUpdate=this.normalsNeedUpdate=this.verticesNeedUpdate=!1}function Fe(a){if(0===a.length)return-Infinity;\nfor(var b=a[0],c=1,d=a.length;c<d;++c)a[c]>b&&(b=a[c]);return b}function C(){Object.defineProperty(this,\"id\",{value:If+=2});this.uuid=H.generateUUID();this.name=\"\";this.type=\"BufferGeometry\";this.index=null;this.attributes={};this.morphAttributes={};this.groups=[];this.boundingSphere=this.boundingBox=null;this.drawRange={start:0,count:Infinity};this.userData={}}function Ib(a,b,c,d,e,f){R.call(this);this.type=\"BoxGeometry\";this.parameters={width:a,height:b,depth:c,widthSegments:d,heightSegments:e,\ndepthSegments:f};this.fromBufferGeometry(new kb(a,b,c,d,e,f));this.mergeVertices()}function kb(a,b,c,d,e,f){function g(a,b,c,d,e,f,g,l,N,O,Jf){var r=f/N,v=g/O,P=f/2,y=g/2,w=l/2;g=N+1;var E=O+1,x=f=0,B,z,A=new p;for(z=0;z<E;z++){var D=z*v-y;for(B=0;B<g;B++)A[a]=(B*r-P)*d,A[b]=D*e,A[c]=w,m.push(A.x,A.y,A.z),A[a]=0,A[b]=0,A[c]=0<l?1:-1,q.push(A.x,A.y,A.z),n.push(B/N),n.push(1-z/O),f+=1}for(z=0;z<O;z++)for(B=0;B<N;B++)a=t+B+g*(z+1),b=t+(B+1)+g*(z+1),c=t+(B+1)+g*z,k.push(t+B+g*z,a,c),k.push(a,b,c),x+=\n6;h.addGroup(u,x,Jf);u+=x;t+=f}C.call(this);this.type=\"BoxBufferGeometry\";this.parameters={width:a,height:b,depth:c,widthSegments:d,heightSegments:e,depthSegments:f};var h=this;a=a||1;b=b||1;c=c||1;d=Math.floor(d)||1;e=Math.floor(e)||1;f=Math.floor(f)||1;var k=[],m=[],q=[],n=[],t=0,u=0;g(\"z\",\"y\",\"x\",-1,-1,c,b,a,f,e,0);g(\"z\",\"y\",\"x\",1,-1,c,b,-a,f,e,1);g(\"x\",\"z\",\"y\",1,1,a,c,b,d,f,2);g(\"x\",\"z\",\"y\",1,-1,a,c,-b,d,f,3);g(\"x\",\"y\",\"z\",1,-1,a,b,c,d,e,4);g(\"x\",\"y\",\"z\",-1,-1,a,b,-c,d,e,5);this.setIndex(k);this.addAttribute(\"position\",\nnew A(m,3));this.addAttribute(\"normal\",new A(q,3));this.addAttribute(\"uv\",new A(n,2))}function uc(a,b,c,d){R.call(this);this.type=\"PlaneGeometry\";this.parameters={width:a,height:b,widthSegments:c,heightSegments:d};this.fromBufferGeometry(new lb(a,b,c,d));this.mergeVertices()}function lb(a,b,c,d){C.call(this);this.type=\"PlaneBufferGeometry\";this.parameters={width:a,height:b,widthSegments:c,heightSegments:d};a=a||1;b=b||1;var e=a/2,f=b/2;c=Math.floor(c)||1;d=Math.floor(d)||1;var g=c+1,h=d+1,k=a/c,m=\nb/d,q=[],n=[],t=[],u=[];for(a=0;a<h;a++){var r=a*m-f;for(b=0;b<g;b++)n.push(b*k-e,-r,0),t.push(0,0,1),u.push(b/c),u.push(1-a/d)}for(a=0;a<d;a++)for(b=0;b<c;b++)e=b+g*(a+1),f=b+1+g*(a+1),h=b+1+g*a,q.push(b+g*a,e,h),q.push(e,f,h);this.setIndex(q);this.addAttribute(\"position\",new A(n,3));this.addAttribute(\"normal\",new A(t,3));this.addAttribute(\"uv\",new A(u,2))}function J(){Object.defineProperty(this,\"id\",{value:Kf++});this.uuid=H.generateUUID();this.name=\"\";this.type=\"Material\";this.lights=this.fog=\n!0;this.blending=1;this.side=0;this.flatShading=!1;this.vertexColors=0;this.opacity=1;this.transparent=!1;this.blendSrc=204;this.blendDst=205;this.blendEquation=100;this.blendEquationAlpha=this.blendDstAlpha=this.blendSrcAlpha=null;this.depthFunc=3;this.depthWrite=this.depthTest=!0;this.clippingPlanes=null;this.clipShadows=this.clipIntersection=!1;this.shadowSide=null;this.colorWrite=!0;this.precision=null;this.polygonOffset=!1;this.polygonOffsetUnits=this.polygonOffsetFactor=0;this.dithering=!1;\nthis.alphaTest=0;this.premultipliedAlpha=!1;this.overdraw=0;this.visible=!0;this.userData={};this.needsUpdate=!0}function da(a){J.call(this);this.type=\"MeshBasicMaterial\";this.color=new G(16777215);this.lightMap=this.map=null;this.lightMapIntensity=1;this.aoMap=null;this.aoMapIntensity=1;this.envMap=this.alphaMap=this.specularMap=null;this.combine=0;this.reflectivity=1;this.refractionRatio=.98;this.wireframe=!1;this.wireframeLinewidth=1;this.wireframeLinejoin=this.wireframeLinecap=\"round\";this.lights=\nthis.morphTargets=this.skinning=!1;this.setValues(a)}function ta(a){J.call(this);this.type=\"ShaderMaterial\";this.defines={};this.uniforms={};this.vertexShader=\"void main() {\\n\\tgl_Position = projectionMatrix * modelViewMatrix * vec4( position, 1.0 );\\n}\";this.fragmentShader=\"void main() {\\n\\tgl_FragColor = vec4( 1.0, 0.0, 0.0, 1.0 );\\n}\";this.linewidth=1;this.wireframe=!1;this.wireframeLinewidth=1;this.morphNormals=this.morphTargets=this.skinning=this.clipping=this.lights=this.fog=!1;this.extensions=\n{derivatives:!1,fragDepth:!1,drawBuffers:!1,shaderTextureLOD:!1};this.defaultAttributeValues={color:[1,1,1],uv:[0,0],uv2:[0,0]};this.index0AttributeName=void 0;this.uniformsNeedUpdate=!1;void 0!==a&&(void 0!==a.attributes&&console.error(\"THREE.ShaderMaterial: attributes should now be defined in THREE.BufferGeometry instead.\"),this.setValues(a))}function mb(a,b){this.origin=void 0!==a?a:new p;this.direction=void 0!==b?b:new p}function ja(a,b,c){this.a=void 0!==a?a:new p;this.b=void 0!==b?b:new p;this.c=\nvoid 0!==c?c:new p}function la(a,b){D.call(this);this.type=\"Mesh\";this.geometry=void 0!==a?a:new C;this.material=void 0!==b?b:new da({color:16777215*Math.random()});this.drawMode=0;this.updateMorphTargets()}function Lf(a,b,c,d){function e(a,c){b.buffers.color.setClear(a.r,a.g,a.b,c,d)}var f=new G(0),g=0,h,k,m;return{getClearColor:function(){return f},setClearColor:function(a,b){f.set(a);g=void 0!==b?b:1;e(f,g)},getClearAlpha:function(){return g},setClearAlpha:function(a){g=a;e(f,g)},render:function(b,\nd,t,u){d=d.background;null===d?e(f,g):d&&d.isColor&&(e(d,1),u=!0);(a.autoClear||u)&&a.clear(a.autoClearColor,a.autoClearDepth,a.autoClearStencil);d&&d.isCubeTexture?(void 0===m&&(m=new la(new kb(1,1,1),new ta({uniforms:nb.cube.uniforms,vertexShader:nb.cube.vertexShader,fragmentShader:nb.cube.fragmentShader,side:1,depthTest:!0,depthWrite:!1,fog:!1})),m.geometry.removeAttribute(\"normal\"),m.geometry.removeAttribute(\"uv\"),m.onBeforeRender=function(a,b,c){this.matrixWorld.copyPosition(c.matrixWorld)},\nc.update(m)),m.material.uniforms.tCube.value=d,b.push(m,m.geometry,m.material,0,null)):d&&d.isTexture&&(void 0===h&&(h=new Hb(-1,1,1,-1,0,1),k=new la(new lb(2,2),new da({depthTest:!1,depthWrite:!1,fog:!1})),c.update(k)),k.material.map=d,a.renderBufferDirect(h,null,k.geometry,k.material,k,null))}}}function Mf(a,b,c,d){var e;this.setMode=function(a){e=a};this.render=function(b,d){a.drawArrays(e,b,d);c.update(d,e)};this.renderInstances=function(f,g,h){if(d.isWebGL2)var k=a;else if(k=b.get(\"ANGLE_instanced_arrays\"),\nnull===k){console.error(\"THREE.WebGLBufferRenderer: using THREE.InstancedBufferGeometry but hardware does not support extension ANGLE_instanced_arrays.\");return}k[d.isWebGL2?\"drawArraysInstanced\":\"drawArraysInstancedANGLE\"](e,g,h,f.maxInstancedCount);c.update(h,e,f.maxInstancedCount)}}function Nf(a,b,c){function d(b){if(\"highp\"===b){if(0<a.getShaderPrecisionFormat(a.VERTEX_SHADER,a.HIGH_FLOAT).precision&&0<a.getShaderPrecisionFormat(a.FRAGMENT_SHADER,a.HIGH_FLOAT).precision)return\"highp\";b=\"mediump\"}return\"mediump\"===\nb&&0<a.getShaderPrecisionFormat(a.VERTEX_SHADER,a.MEDIUM_FLOAT).precision&&0<a.getShaderPrecisionFormat(a.FRAGMENT_SHADER,a.MEDIUM_FLOAT).precision?\"mediump\":\"lowp\"}var e,f=\"undefined\"!==typeof WebGL2RenderingContext&&a instanceof WebGL2RenderingContext,g=void 0!==c.precision?c.precision:\"highp\",h=d(g);h!==g&&(console.warn(\"THREE.WebGLRenderer:\",g,\"not supported, using\",h,\"instead.\"),g=h);c=!0===c.logarithmicDepthBuffer;h=a.getParameter(a.MAX_TEXTURE_IMAGE_UNITS);var k=a.getParameter(a.MAX_VERTEX_TEXTURE_IMAGE_UNITS),\nm=a.getParameter(a.MAX_TEXTURE_SIZE),q=a.getParameter(a.MAX_CUBE_MAP_TEXTURE_SIZE),n=a.getParameter(a.MAX_VERTEX_ATTRIBS),t=a.getParameter(a.MAX_VERTEX_UNIFORM_VECTORS),u=a.getParameter(a.MAX_VARYING_VECTORS),r=a.getParameter(a.MAX_FRAGMENT_UNIFORM_VECTORS),l=0<k,y=f||!!b.get(\"OES_texture_float\");return{isWebGL2:f,getMaxAnisotropy:function(){if(void 0!==e)return e;var c=b.get(\"EXT_texture_filter_anisotropic\");return e=null!==c?a.getParameter(c.MAX_TEXTURE_MAX_ANISOTROPY_EXT):0},getMaxPrecision:d,\nprecision:g,logarithmicDepthBuffer:c,maxTextures:h,maxVertexTextures:k,maxTextureSize:m,maxCubemapSize:q,maxAttributes:n,maxVertexUniforms:t,maxVaryings:u,maxFragmentUniforms:r,vertexTextures:l,floatFragmentTextures:y,floatVertexTextures:l&&y}}function Of(){function a(){m.value!==d&&(m.value=d,m.needsUpdate=0<e);c.numPlanes=e;c.numIntersection=0}function b(a,b,d,e){var f=null!==a?a.length:0,g=null;if(0!==f){g=m.value;if(!0!==e||null===g){e=d+4*f;b=b.matrixWorldInverse;k.getNormalMatrix(b);if(null===\ng||g.length<e)g=new Float32Array(e);for(e=0;e!==f;++e,d+=4)h.copy(a[e]).applyMatrix4(b,k),h.normal.toArray(g,d),g[d+3]=h.constant}m.value=g;m.needsUpdate=!0}c.numPlanes=f;return g}var c=this,d=null,e=0,f=!1,g=!1,h=new Ma,k=new ra,m={value:null,needsUpdate:!1};this.uniform=m;this.numIntersection=this.numPlanes=0;this.init=function(a,c,g){var h=0!==a.length||c||0!==e||f;f=c;d=b(a,g,0);e=a.length;return h};this.beginShadows=function(){g=!0;b(null)};this.endShadows=function(){g=!1;a()};this.setState=\nfunction(c,h,k,u,r,l){if(!f||null===c||0===c.length||g&&!k)g?b(null):a();else{k=g?0:e;var n=4*k,q=r.clippingState||null;m.value=q;q=b(c,u,n,l);for(c=0;c!==n;++c)q[c]=d[c];r.clippingState=q;this.numIntersection=h?this.numPlanes:0;this.numPlanes+=k}}}function Pf(a){var b={};return{get:function(c){if(void 0!==b[c])return b[c];switch(c){case \"WEBGL_depth_texture\":var d=a.getExtension(\"WEBGL_depth_texture\")||a.getExtension(\"MOZ_WEBGL_depth_texture\")||a.getExtension(\"WEBKIT_WEBGL_depth_texture\");break;\ncase \"EXT_texture_filter_anisotropic\":d=a.getExtension(\"EXT_texture_filter_anisotropic\")||a.getExtension(\"MOZ_EXT_texture_filter_anisotropic\")||a.getExtension(\"WEBKIT_EXT_texture_filter_anisotropic\");break;case \"WEBGL_compressed_texture_s3tc\":d=a.getExtension(\"WEBGL_compressed_texture_s3tc\")||a.getExtension(\"MOZ_WEBGL_compressed_texture_s3tc\")||a.getExtension(\"WEBKIT_WEBGL_compressed_texture_s3tc\");break;case \"WEBGL_compressed_texture_pvrtc\":d=a.getExtension(\"WEBGL_compressed_texture_pvrtc\")||a.getExtension(\"WEBKIT_WEBGL_compressed_texture_pvrtc\");\nbreak;default:d=a.getExtension(c)}null===d&&console.warn(\"THREE.WebGLRenderer: \"+c+\" extension not supported.\");return b[c]=d}}}function Qf(a,b,c){function d(a){var h=a.target;a=e[h.id];null!==a.index&&b.remove(a.index);for(var g in a.attributes)b.remove(a.attributes[g]);h.removeEventListener(\"dispose\",d);delete e[h.id];if(g=f[a.id])b.remove(g),delete f[a.id];c.memory.geometries--}var e={},f={};return{get:function(a,b){var f=e[b.id];if(f)return f;b.addEventListener(\"dispose\",d);b.isBufferGeometry?\nf=b:b.isGeometry&&(void 0===b._bufferGeometry&&(b._bufferGeometry=(new C).setFromObject(a)),f=b._bufferGeometry);e[b.id]=f;c.memory.geometries++;return f},update:function(c){var d=c.index,e=c.attributes;null!==d&&b.update(d,a.ELEMENT_ARRAY_BUFFER);for(var f in e)b.update(e[f],a.ARRAY_BUFFER);c=c.morphAttributes;for(f in c){d=c[f];e=0;for(var g=d.length;e<g;e++)b.update(d[e],a.ARRAY_BUFFER)}},getWireframeAttribute:function(c){var d=f[c.id];if(d)return d;d=[];var e=c.index,g=c.attributes;if(null!==\ne){e=e.array;g=0;for(var q=e.length;g<q;g+=3){var n=e[g+0],t=e[g+1],u=e[g+2];d.push(n,t,t,u,u,n)}}else for(e=g.position.array,g=0,q=e.length/3-1;g<q;g+=3)n=g+0,t=g+1,u=g+2,d.push(n,t,t,u,u,n);d=new (65535<Fe(d)?jb:ib)(d,1);b.update(d,a.ELEMENT_ARRAY_BUFFER);return f[c.id]=d}}}function Rf(a,b,c,d){var e,f,g;this.setMode=function(a){e=a};this.setIndex=function(a){f=a.type;g=a.bytesPerElement};this.render=function(b,d){a.drawElements(e,d,f,b*g);c.update(d,e)};this.renderInstances=function(h,k,m){if(d.isWebGL2)var q=\na;else if(q=b.get(\"ANGLE_instanced_arrays\"),null===q){console.error(\"THREE.WebGLIndexedBufferRenderer: using THREE.InstancedBufferGeometry but hardware does not support extension ANGLE_instanced_arrays.\");return}q[d.isWebGL2?\"drawElementsInstanced\":\"drawElementsInstancedANGLE\"](e,m,f,k*g,h.maxInstancedCount);c.update(m,e,h.maxInstancedCount)}}function Sf(a){var b={frame:0,calls:0,triangles:0,points:0,lines:0};return{memory:{geometries:0,textures:0},render:b,programs:null,autoReset:!0,reset:function(){b.frame++;\nb.calls=0;b.triangles=0;b.points=0;b.lines=0},update:function(c,d,e){e=e||1;b.calls++;switch(d){case a.TRIANGLES:b.triangles+=c/3*e;break;case a.TRIANGLE_STRIP:case a.TRIANGLE_FAN:b.triangles+=e*(c-2);break;case a.LINES:b.lines+=c/2*e;break;case a.LINE_STRIP:b.lines+=e*(c-1);break;case a.LINE_LOOP:b.lines+=e*c;break;case a.POINTS:b.points+=e*c;break;default:console.error(\"THREE.WebGLInfo: Unknown draw mode:\",d)}}}}function Tf(a,b){return Math.abs(b[1])-Math.abs(a[1])}function Uf(a){var b={},c=new Float32Array(8);\nreturn{update:function(d,e,f,g){var h=d.morphTargetInfluences,k=h.length;d=b[e.id];if(void 0===d){d=[];for(var m=0;m<k;m++)d[m]=[m,0];b[e.id]=d}var q=f.morphTargets&&e.morphAttributes.position;f=f.morphNormals&&e.morphAttributes.normal;for(m=0;m<k;m++){var n=d[m];0!==n[1]&&(q&&e.removeAttribute(\"morphTarget\"+m),f&&e.removeAttribute(\"morphNormal\"+m))}for(m=0;m<k;m++)n=d[m],n[0]=m,n[1]=h[m];d.sort(Tf);for(m=0;8>m;m++){if(n=d[m])if(h=n[0],k=n[1]){q&&e.addAttribute(\"morphTarget\"+m,q[h]);f&&e.addAttribute(\"morphNormal\"+\nm,f[h]);c[m]=k;continue}c[m]=0}g.getUniforms().setValue(a,\"morphTargetInfluences\",c)}}}function Vf(a,b){var c={};return{update:function(d){var e=b.render.frame,f=d.geometry,g=a.get(d,f);c[g.id]!==e&&(f.isGeometry&&g.updateFromObject(d),a.update(g),c[g.id]=e);return g},dispose:function(){c={}}}}function Ua(a,b,c,d,e,f,g,h,k,m){a=void 0!==a?a:[];T.call(this,a,void 0!==b?b:301,c,d,e,f,g,h,k,m);this.flipY=!1}function Jb(a,b,c){var d=a[0];if(0>=d||0<d)return a;var e=b*c,f=Ge[e];void 0===f&&(f=new Float32Array(e),\nGe[e]=f);if(0!==b)for(d.toArray(f,0),d=1,e=0;d!==b;++d)e+=c,a[d].toArray(f,e);return f}function ea(a,b){if(a.length!==b.length)return!1;for(var c=0,d=a.length;c<d;c++)if(a[c]!==b[c])return!1;return!0}function qa(a,b){for(var c=0,d=b.length;c<d;c++)a[c]=b[c]}function He(a,b){var c=Ie[b];void 0===c&&(c=new Int32Array(b),Ie[b]=c);for(var d=0;d!==b;++d)c[d]=a.allocTextureUnit();return c}function Wf(a,b){var c=this.cache;c[0]!==b&&(a.uniform1f(this.addr,b),c[0]=b)}function Xf(a,b){var c=this.cache;c[0]!==\nb&&(a.uniform1i(this.addr,b),c[0]=b)}function Yf(a,b){var c=this.cache;if(void 0!==b.x){if(c[0]!==b.x||c[1]!==b.y)a.uniform2f(this.addr,b.x,b.y),c[0]=b.x,c[1]=b.y}else ea(c,b)||(a.uniform2fv(this.addr,b),qa(c,b))}function Zf(a,b){var c=this.cache;if(void 0!==b.x){if(c[0]!==b.x||c[1]!==b.y||c[2]!==b.z)a.uniform3f(this.addr,b.x,b.y,b.z),c[0]=b.x,c[1]=b.y,c[2]=b.z}else if(void 0!==b.r){if(c[0]!==b.r||c[1]!==b.g||c[2]!==b.b)a.uniform3f(this.addr,b.r,b.g,b.b),c[0]=b.r,c[1]=b.g,c[2]=b.b}else ea(c,b)||(a.uniform3fv(this.addr,\nb),qa(c,b))}function $f(a,b){var c=this.cache;if(void 0!==b.x){if(c[0]!==b.x||c[1]!==b.y||c[2]!==b.z||c[3]!==b.w)a.uniform4f(this.addr,b.x,b.y,b.z,b.w),c[0]=b.x,c[1]=b.y,c[2]=b.z,c[3]=b.w}else ea(c,b)||(a.uniform4fv(this.addr,b),qa(c,b))}function ag(a,b){var c=this.cache,d=b.elements;void 0===d?ea(c,b)||(a.uniformMatrix2fv(this.addr,!1,b),qa(c,b)):ea(c,d)||(Je.set(d),a.uniformMatrix2fv(this.addr,!1,Je),qa(c,d))}function bg(a,b){var c=this.cache,d=b.elements;void 0===d?ea(c,b)||(a.uniformMatrix3fv(this.addr,\n!1,b),qa(c,b)):ea(c,d)||(Ke.set(d),a.uniformMatrix3fv(this.addr,!1,Ke),qa(c,d))}function cg(a,b){var c=this.cache,d=b.elements;void 0===d?ea(c,b)||(a.uniformMatrix4fv(this.addr,!1,b),qa(c,b)):ea(c,d)||(Le.set(d),a.uniformMatrix4fv(this.addr,!1,Le),qa(c,d))}function dg(a,b,c){var d=this.cache,e=c.allocTextureUnit();d[0]!==e&&(a.uniform1i(this.addr,e),d[0]=e);c.setTexture2D(b||Me,e)}function eg(a,b,c){var d=this.cache,e=c.allocTextureUnit();d[0]!==e&&(a.uniform1i(this.addr,e),d[0]=e);c.setTextureCube(b||\nNe,e)}function Oe(a,b){var c=this.cache;ea(c,b)||(a.uniform2iv(this.addr,b),qa(c,b))}function Pe(a,b){var c=this.cache;ea(c,b)||(a.uniform3iv(this.addr,b),qa(c,b))}function Qe(a,b){var c=this.cache;ea(c,b)||(a.uniform4iv(this.addr,b),qa(c,b))}function fg(a){switch(a){case 5126:return Wf;case 35664:return Yf;case 35665:return Zf;case 35666:return $f;case 35674:return ag;case 35675:return bg;case 35676:return cg;case 35678:case 36198:return dg;case 35680:return eg;case 5124:case 35670:return Xf;case 35667:case 35671:return Oe;\ncase 35668:case 35672:return Pe;case 35669:case 35673:return Qe}}function gg(a,b){var c=this.cache;ea(c,b)||(a.uniform1fv(this.addr,b),qa(c,b))}function hg(a,b){var c=this.cache;ea(c,b)||(a.uniform1iv(this.addr,b),qa(c,b))}function ig(a,b){var c=this.cache;b=Jb(b,this.size,2);ea(c,b)||(a.uniform2fv(this.addr,b),this.updateCache(b))}function jg(a,b){var c=this.cache;b=Jb(b,this.size,3);ea(c,b)||(a.uniform3fv(this.addr,b),this.updateCache(b))}function kg(a,b){var c=this.cache;b=Jb(b,this.size,4);ea(c,\nb)||(a.uniform4fv(this.addr,b),this.updateCache(b))}function lg(a,b){var c=this.cache;b=Jb(b,this.size,4);ea(c,b)||(a.uniformMatrix2fv(this.addr,!1,b),this.updateCache(b))}function mg(a,b){var c=this.cache;b=Jb(b,this.size,9);ea(c,b)||(a.uniformMatrix3fv(this.addr,!1,b),this.updateCache(b))}function ng(a,b){var c=this.cache;b=Jb(b,this.size,16);ea(c,b)||(a.uniformMatrix4fv(this.addr,!1,b),this.updateCache(b))}function og(a,b,c){var d=this.cache,e=b.length,f=He(c,e);!1===ea(d,f)&&(a.uniform1iv(this.addr,\nf),qa(d,f));for(a=0;a!==e;++a)c.setTexture2D(b[a]||Me,f[a])}function pg(a,b,c){var d=this.cache,e=b.length,f=He(c,e);!1===ea(d,f)&&(a.uniform1iv(this.addr,f),qa(d,f));for(a=0;a!==e;++a)c.setTextureCube(b[a]||Ne,f[a])}function qg(a){switch(a){case 5126:return gg;case 35664:return ig;case 35665:return jg;case 35666:return kg;case 35674:return lg;case 35675:return mg;case 35676:return ng;case 35678:return og;case 35680:return pg;case 5124:case 35670:return hg;case 35667:case 35671:return Oe;case 35668:case 35672:return Pe;\ncase 35669:case 35673:return Qe}}function rg(a,b,c){this.id=a;this.addr=c;this.cache=[];this.setValue=fg(b.type)}function Re(a,b,c){this.id=a;this.addr=c;this.cache=[];this.size=b.size;this.setValue=qg(b.type)}function Se(a){this.id=a;this.seq=[];this.map={}}function Za(a,b,c){this.seq=[];this.map={};this.renderer=c;c=a.getProgramParameter(b,a.ACTIVE_UNIFORMS);for(var d=0;d<c;++d){var e=a.getActiveUniform(b,d),f=a.getUniformLocation(b,e.name),g=this,h=e.name,k=h.length;for(Vd.lastIndex=0;;){var m=\nVd.exec(h),q=Vd.lastIndex,n=m[1],t=m[3];\"]\"===m[2]&&(n|=0);if(void 0===t||\"[\"===t&&q+2===k){h=g;e=void 0===t?new rg(n,e,f):new Re(n,e,f);h.seq.push(e);h.map[e.id]=e;break}else t=g.map[n],void 0===t&&(t=new Se(n),n=g,g=t,n.seq.push(g),n.map[g.id]=g),g=t}}}function sg(a){a=a.split(\"\\n\");for(var b=0;b<a.length;b++)a[b]=b+1+\": \"+a[b];return a.join(\"\\n\")}function Te(a,b,c){var d=a.createShader(b);a.shaderSource(d,c);a.compileShader(d);!1===a.getShaderParameter(d,a.COMPILE_STATUS)&&console.error(\"THREE.WebGLShader: Shader couldn't compile.\");\n\"\"!==a.getShaderInfoLog(d)&&console.warn(\"THREE.WebGLShader: gl.getShaderInfoLog()\",b===a.VERTEX_SHADER?\"vertex\":\"fragment\",a.getShaderInfoLog(d),sg(c));return d}function Ue(a){switch(a){case 3E3:return[\"Linear\",\"( value )\"];case 3001:return[\"sRGB\",\"( value )\"];case 3002:return[\"RGBE\",\"( value )\"];case 3004:return[\"RGBM\",\"( value, 7.0 )\"];case 3005:return[\"RGBM\",\"( value, 16.0 )\"];case 3006:return[\"RGBD\",\"( value, 256.0 )\"];case 3007:return[\"Gamma\",\"( value, float( GAMMA_FACTOR ) )\"];default:throw Error(\"unsupported encoding: \"+\na);}}function Wd(a,b){b=Ue(b);return\"vec4 \"+a+\"( vec4 value ) { return \"+b[0]+\"ToLinear\"+b[1]+\"; }\"}function tg(a,b){b=Ue(b);return\"vec4 \"+a+\"( vec4 value ) { return LinearTo\"+b[0]+b[1]+\"; }\"}function ug(a,b){switch(b){case 1:b=\"Linear\";break;case 2:b=\"Reinhard\";break;case 3:b=\"Uncharted2\";break;case 4:b=\"OptimizedCineon\";break;default:throw Error(\"unsupported toneMapping: \"+b);}return\"vec3 \"+a+\"( vec3 color ) { return \"+b+\"ToneMapping( color ); }\"}function vg(a,b,c){a=a||{};return[a.derivatives||\nb.envMapCubeUV||b.bumpMap||b.normalMap&&!b.objectSpaceNormalMap||b.flatShading?\"#extension GL_OES_standard_derivatives : enable\":\"\",(a.fragDepth||b.logarithmicDepthBuffer)&&c.get(\"EXT_frag_depth\")?\"#extension GL_EXT_frag_depth : enable\":\"\",a.drawBuffers&&c.get(\"WEBGL_draw_buffers\")?\"#extension GL_EXT_draw_buffers : require\":\"\",(a.shaderTextureLOD||b.envMap)&&c.get(\"EXT_shader_texture_lod\")?\"#extension GL_EXT_shader_texture_lod : enable\":\"\"].filter(vc).join(\"\\n\")}function wg(a){var b=[],c;for(c in a){var d=\na[c];!1!==d&&b.push(\"#define \"+c+\" \"+d)}return b.join(\"\\n\")}function vc(a){return\"\"!==a}function Ve(a,b){return a.replace(/NUM_DIR_LIGHTS/g,b.numDirLights).replace(/NUM_SPOT_LIGHTS/g,b.numSpotLights).replace(/NUM_RECT_AREA_LIGHTS/g,b.numRectAreaLights).replace(/NUM_POINT_LIGHTS/g,b.numPointLights).replace(/NUM_HEMI_LIGHTS/g,b.numHemiLights)}function We(a,b){return a.replace(/NUM_CLIPPING_PLANES/g,b.numClippingPlanes).replace(/UNION_CLIPPING_PLANES/g,b.numClippingPlanes-b.numClipIntersection)}function Xd(a){return a.replace(/^[ \\t]*#include +<([\\w\\d./]+)>/gm,\nfunction(a,c){a=S[c];if(void 0===a)throw Error(\"Can not resolve #include <\"+c+\">\");return Xd(a)})}function Xe(a){return a.replace(/#pragma unroll_loop[\\s]+?for \\( int i = (\\d+); i < (\\d+); i \\+\\+ \\) \\{([\\s\\S]+?)(?=\\})\\}/g,function(a,c,d,e){a=\"\";for(c=parseInt(c);c<parseInt(d);c++)a+=e.replace(/\\[ i \\]/g,\"[ \"+c+\" ]\");return a})}function xg(a,b,c,d,e,f,g){var h=a.context,k=d.defines,m=e.vertexShader,q=e.fragmentShader,n=\"SHADOWMAP_TYPE_BASIC\";1===f.shadowMapType?n=\"SHADOWMAP_TYPE_PCF\":2===f.shadowMapType&&\n(n=\"SHADOWMAP_TYPE_PCF_SOFT\");var t=\"ENVMAP_TYPE_CUBE\",u=\"ENVMAP_MODE_REFLECTION\",r=\"ENVMAP_BLENDING_MULTIPLY\";if(f.envMap){switch(d.envMap.mapping){case 301:case 302:t=\"ENVMAP_TYPE_CUBE\";break;case 306:case 307:t=\"ENVMAP_TYPE_CUBE_UV\";break;case 303:case 304:t=\"ENVMAP_TYPE_EQUIREC\";break;case 305:t=\"ENVMAP_TYPE_SPHERE\"}switch(d.envMap.mapping){case 302:case 304:u=\"ENVMAP_MODE_REFRACTION\"}switch(d.combine){case 0:r=\"ENVMAP_BLENDING_MULTIPLY\";break;case 1:r=\"ENVMAP_BLENDING_MIX\";break;case 2:r=\"ENVMAP_BLENDING_ADD\"}}var l=\n0<a.gammaFactor?a.gammaFactor:1,y=g.isWebGL2?\"\":vg(d.extensions,f,b),p=wg(k),w=h.createProgram();d.isRawShaderMaterial?(k=[p].filter(vc).join(\"\\n\"),0<k.length&&(k+=\"\\n\"),b=[y,p].filter(vc).join(\"\\n\"),0<b.length&&(b+=\"\\n\")):(k=[\"precision \"+f.precision+\" float;\",\"precision \"+f.precision+\" int;\",\"#define SHADER_NAME \"+e.name,p,f.supportsVertexTextures?\"#define VERTEX_TEXTURES\":\"\",\"#define GAMMA_FACTOR \"+l,\"#define MAX_BONES \"+f.maxBones,f.useFog&&f.fog?\"#define USE_FOG\":\"\",f.useFog&&f.fogExp?\"#define FOG_EXP2\":\n\"\",f.map?\"#define USE_MAP\":\"\",f.envMap?\"#define USE_ENVMAP\":\"\",f.envMap?\"#define \"+u:\"\",f.lightMap?\"#define USE_LIGHTMAP\":\"\",f.aoMap?\"#define USE_AOMAP\":\"\",f.emissiveMap?\"#define USE_EMISSIVEMAP\":\"\",f.bumpMap?\"#define USE_BUMPMAP\":\"\",f.normalMap?\"#define USE_NORMALMAP\":\"\",f.normalMap&&f.objectSpaceNormalMap?\"#define OBJECTSPACE_NORMALMAP\":\"\",f.displacementMap&&f.supportsVertexTextures?\"#define USE_DISPLACEMENTMAP\":\"\",f.specularMap?\"#define USE_SPECULARMAP\":\"\",f.roughnessMap?\"#define USE_ROUGHNESSMAP\":\n\"\",f.metalnessMap?\"#define USE_METALNESSMAP\":\"\",f.alphaMap?\"#define USE_ALPHAMAP\":\"\",f.vertexColors?\"#define USE_COLOR\":\"\",f.flatShading?\"#define FLAT_SHADED\":\"\",f.skinning?\"#define USE_SKINNING\":\"\",f.useVertexTexture?\"#define BONE_TEXTURE\":\"\",f.morphTargets?\"#define USE_MORPHTARGETS\":\"\",f.morphNormals&&!1===f.flatShading?\"#define USE_MORPHNORMALS\":\"\",f.doubleSided?\"#define DOUBLE_SIDED\":\"\",f.flipSided?\"#define FLIP_SIDED\":\"\",f.shadowMapEnabled?\"#define USE_SHADOWMAP\":\"\",f.shadowMapEnabled?\"#define \"+\nn:\"\",f.sizeAttenuation?\"#define USE_SIZEATTENUATION\":\"\",f.logarithmicDepthBuffer?\"#define USE_LOGDEPTHBUF\":\"\",f.logarithmicDepthBuffer&&(g.isWebGL2||b.get(\"EXT_frag_depth\"))?\"#define USE_LOGDEPTHBUF_EXT\":\"\",\"uniform mat4 modelMatrix;\",\"uniform mat4 modelViewMatrix;\",\"uniform mat4 projectionMatrix;\",\"uniform mat4 viewMatrix;\",\"uniform mat3 normalMatrix;\",\"uniform vec3 cameraPosition;\",\"attribute vec3 position;\",\"attribute vec3 normal;\",\"attribute vec2 uv;\",\"#ifdef USE_COLOR\",\"\\tattribute vec3 color;\",\n\"#endif\",\"#ifdef USE_MORPHTARGETS\",\"\\tattribute vec3 morphTarget0;\",\"\\tattribute vec3 morphTarget1;\",\"\\tattribute vec3 morphTarget2;\",\"\\tattribute vec3 morphTarget3;\",\"\\t#ifdef USE_MORPHNORMALS\",\"\\t\\tattribute vec3 morphNormal0;\",\"\\t\\tattribute vec3 morphNormal1;\",\"\\t\\tattribute vec3 morphNormal2;\",\"\\t\\tattribute vec3 morphNormal3;\",\"\\t#else\",\"\\t\\tattribute vec3 morphTarget4;\",\"\\t\\tattribute vec3 morphTarget5;\",\"\\t\\tattribute vec3 morphTarget6;\",\"\\t\\tattribute vec3 morphTarget7;\",\"\\t#endif\",\"#endif\",\n\"#ifdef USE_SKINNING\",\"\\tattribute vec4 skinIndex;\",\"\\tattribute vec4 skinWeight;\",\"#endif\",\"\\n\"].filter(vc).join(\"\\n\"),b=[y,\"precision \"+f.precision+\" float;\",\"precision \"+f.precision+\" int;\",\"#define SHADER_NAME \"+e.name,p,f.alphaTest?\"#define ALPHATEST \"+f.alphaTest+(f.alphaTest%1?\"\":\".0\"):\"\",\"#define GAMMA_FACTOR \"+l,f.useFog&&f.fog?\"#define USE_FOG\":\"\",f.useFog&&f.fogExp?\"#define FOG_EXP2\":\"\",f.map?\"#define USE_MAP\":\"\",f.envMap?\"#define USE_ENVMAP\":\"\",f.envMap?\"#define \"+t:\"\",f.envMap?\"#define \"+\nu:\"\",f.envMap?\"#define \"+r:\"\",f.lightMap?\"#define USE_LIGHTMAP\":\"\",f.aoMap?\"#define USE_AOMAP\":\"\",f.emissiveMap?\"#define USE_EMISSIVEMAP\":\"\",f.bumpMap?\"#define USE_BUMPMAP\":\"\",f.normalMap?\"#define USE_NORMALMAP\":\"\",f.normalMap&&f.objectSpaceNormalMap?\"#define OBJECTSPACE_NORMALMAP\":\"\",f.specularMap?\"#define USE_SPECULARMAP\":\"\",f.roughnessMap?\"#define USE_ROUGHNESSMAP\":\"\",f.metalnessMap?\"#define USE_METALNESSMAP\":\"\",f.alphaMap?\"#define USE_ALPHAMAP\":\"\",f.vertexColors?\"#define USE_COLOR\":\"\",f.gradientMap?\n\"#define USE_GRADIENTMAP\":\"\",f.flatShading?\"#define FLAT_SHADED\":\"\",f.doubleSided?\"#define DOUBLE_SIDED\":\"\",f.flipSided?\"#define FLIP_SIDED\":\"\",f.shadowMapEnabled?\"#define USE_SHADOWMAP\":\"\",f.shadowMapEnabled?\"#define \"+n:\"\",f.premultipliedAlpha?\"#define PREMULTIPLIED_ALPHA\":\"\",f.physicallyCorrectLights?\"#define PHYSICALLY_CORRECT_LIGHTS\":\"\",f.logarithmicDepthBuffer?\"#define USE_LOGDEPTHBUF\":\"\",f.logarithmicDepthBuffer&&(g.isWebGL2||b.get(\"EXT_frag_depth\"))?\"#define USE_LOGDEPTHBUF_EXT\":\"\",f.envMap&&\n(g.isWebGL2||b.get(\"EXT_shader_texture_lod\"))?\"#define TEXTURE_LOD_EXT\":\"\",\"uniform mat4 viewMatrix;\",\"uniform vec3 cameraPosition;\",0!==f.toneMapping?\"#define TONE_MAPPING\":\"\",0!==f.toneMapping?S.tonemapping_pars_fragment:\"\",0!==f.toneMapping?ug(\"toneMapping\",f.toneMapping):\"\",f.dithering?\"#define DITHERING\":\"\",f.outputEncoding||f.mapEncoding||f.envMapEncoding||f.emissiveMapEncoding?S.encodings_pars_fragment:\"\",f.mapEncoding?Wd(\"mapTexelToLinear\",f.mapEncoding):\"\",f.envMapEncoding?Wd(\"envMapTexelToLinear\",\nf.envMapEncoding):\"\",f.emissiveMapEncoding?Wd(\"emissiveMapTexelToLinear\",f.emissiveMapEncoding):\"\",f.outputEncoding?tg(\"linearToOutputTexel\",f.outputEncoding):\"\",f.depthPacking?\"#define DEPTH_PACKING \"+d.depthPacking:\"\",\"\\n\"].filter(vc).join(\"\\n\"));m=Xd(m);m=Ve(m,f);m=We(m,f);q=Xd(q);q=Ve(q,f);q=We(q,f);m=Xe(m);q=Xe(q);g.isWebGL2&&!d.isRawShaderMaterial&&(g=!1,n=/^\\s*#version\\s+300\\s+es\\s*\\n/,d.isShaderMaterial&&null!==m.match(n)&&null!==q.match(n)&&(g=!0,m=m.replace(n,\"\"),q=q.replace(n,\"\")),k=\"#version 300 es\\n\\n#define attribute in\\n#define varying out\\n#define texture2D texture\\n\"+\nk,b=[\"#version 300 es\\n\\n#define varying in\",g?\"\":\"out highp vec4 pc_fragColor;\",g?\"\":\"#define gl_FragColor pc_fragColor\",\"#define gl_FragDepthEXT gl_FragDepth\\n#define texture2D texture\\n#define textureCube texture\\n#define texture2DProj textureProj\\n#define texture2DLodEXT textureLod\\n#define texture2DProjLodEXT textureProjLod\\n#define textureCubeLodEXT textureLod\\n#define texture2DGradEXT textureGrad\\n#define texture2DProjGradEXT textureProjGrad\\n#define textureCubeGradEXT textureGrad\"].join(\"\\n\")+\n\"\\n\"+b);q=b+q;m=Te(h,h.VERTEX_SHADER,k+m);q=Te(h,h.FRAGMENT_SHADER,q);h.attachShader(w,m);h.attachShader(w,q);void 0!==d.index0AttributeName?h.bindAttribLocation(w,0,d.index0AttributeName):!0===f.morphTargets&&h.bindAttribLocation(w,0,\"position\");h.linkProgram(w);f=h.getProgramInfoLog(w).trim();g=h.getShaderInfoLog(m).trim();n=h.getShaderInfoLog(q).trim();u=t=!0;if(!1===h.getProgramParameter(w,h.LINK_STATUS))t=!1,console.error(\"THREE.WebGLProgram: shader error: \",h.getError(),\"gl.VALIDATE_STATUS\",\nh.getProgramParameter(w,h.VALIDATE_STATUS),\"gl.getProgramInfoLog\",f,g,n);else if(\"\"!==f)console.warn(\"THREE.WebGLProgram: gl.getProgramInfoLog()\",f);else if(\"\"===g||\"\"===n)u=!1;u&&(this.diagnostics={runnable:t,material:d,programLog:f,vertexShader:{log:g,prefix:k},fragmentShader:{log:n,prefix:b}});h.deleteShader(m);h.deleteShader(q);var B;this.getUniforms=function(){void 0===B&&(B=new Za(h,w,a));return B};var E;this.getAttributes=function(){if(void 0===E){for(var a={},b=h.getProgramParameter(w,h.ACTIVE_ATTRIBUTES),\nc=0;c<b;c++){var d=h.getActiveAttrib(w,c).name;a[d]=h.getAttribLocation(w,d)}E=a}return E};this.destroy=function(){h.deleteProgram(w);this.program=void 0};Object.defineProperties(this,{uniforms:{get:function(){console.warn(\"THREE.WebGLProgram: .uniforms is now .getUniforms().\");return this.getUniforms()}},attributes:{get:function(){console.warn(\"THREE.WebGLProgram: .attributes is now .getAttributes().\");return this.getAttributes()}}});this.name=e.name;this.id=yg++;this.code=c;this.usedTimes=1;this.program=\nw;this.vertexShader=m;this.fragmentShader=q;return this}function zg(a,b,c){function d(a,b){if(a)a.isTexture?c=a.encoding:a.isWebGLRenderTarget&&(console.warn(\"THREE.WebGLPrograms.getTextureEncodingFromMap: don't use render targets as textures. Use their .texture property instead.\"),c=a.texture.encoding);else var c=3E3;3E3===c&&b&&(c=3007);return c}var e=[],f={MeshDepthMaterial:\"depth\",MeshDistanceMaterial:\"distanceRGBA\",MeshNormalMaterial:\"normal\",MeshBasicMaterial:\"basic\",MeshLambertMaterial:\"lambert\",\nMeshPhongMaterial:\"phong\",MeshToonMaterial:\"phong\",MeshStandardMaterial:\"physical\",MeshPhysicalMaterial:\"physical\",LineBasicMaterial:\"basic\",LineDashedMaterial:\"dashed\",PointsMaterial:\"points\",ShadowMaterial:\"shadow\",SpriteMaterial:\"sprite\"},g=\"precision supportsVertexTextures map mapEncoding envMap envMapMode envMapEncoding lightMap aoMap emissiveMap emissiveMapEncoding bumpMap normalMap objectSpaceNormalMap displacementMap specularMap roughnessMap metalnessMap gradientMap alphaMap combine vertexColors fog useFog fogExp flatShading sizeAttenuation logarithmicDepthBuffer skinning maxBones useVertexTexture morphTargets morphNormals maxMorphTargets maxMorphNormals premultipliedAlpha numDirLights numPointLights numSpotLights numHemiLights numRectAreaLights shadowMapEnabled shadowMapType toneMapping physicallyCorrectLights alphaTest doubleSided flipSided numClippingPlanes numClipIntersection depthPacking dithering\".split(\" \");\nthis.getParameters=function(b,e,g,q,n,t,u){var h=f[b.type];if(u.isSkinnedMesh){var k=u.skeleton.bones;if(c.floatVertexTextures)k=1024;else{var m=Math.min(Math.floor((c.maxVertexUniforms-20)/4),k.length);m<k.length?(console.warn(\"THREE.WebGLRenderer: Skeleton has \"+k.length+\" bones. This GPU supports \"+m+\".\"),k=0):k=m}}else k=0;m=c.precision;null!==b.precision&&(m=c.getMaxPrecision(b.precision),m!==b.precision&&console.warn(\"THREE.WebGLProgram.getParameters:\",b.precision,\"not supported, using\",m,\"instead.\"));\nvar l=a.getRenderTarget();return{shaderID:h,precision:m,supportsVertexTextures:c.vertexTextures,outputEncoding:d(l?l.texture:null,a.gammaOutput),map:!!b.map,mapEncoding:d(b.map,a.gammaInput),envMap:!!b.envMap,envMapMode:b.envMap&&b.envMap.mapping,envMapEncoding:d(b.envMap,a.gammaInput),envMapCubeUV:!!b.envMap&&(306===b.envMap.mapping||307===b.envMap.mapping),lightMap:!!b.lightMap,aoMap:!!b.aoMap,emissiveMap:!!b.emissiveMap,emissiveMapEncoding:d(b.emissiveMap,a.gammaInput),bumpMap:!!b.bumpMap,normalMap:!!b.normalMap,\nobjectSpaceNormalMap:1===b.normalMapType,displacementMap:!!b.displacementMap,roughnessMap:!!b.roughnessMap,metalnessMap:!!b.metalnessMap,specularMap:!!b.specularMap,alphaMap:!!b.alphaMap,gradientMap:!!b.gradientMap,combine:b.combine,vertexColors:b.vertexColors,fog:!!q,useFog:b.fog,fogExp:q&&q.isFogExp2,flatShading:b.flatShading,sizeAttenuation:b.sizeAttenuation,logarithmicDepthBuffer:c.logarithmicDepthBuffer,skinning:b.skinning&&0<k,maxBones:k,useVertexTexture:c.floatVertexTextures,morphTargets:b.morphTargets,\nmorphNormals:b.morphNormals,maxMorphTargets:a.maxMorphTargets,maxMorphNormals:a.maxMorphNormals,numDirLights:e.directional.length,numPointLights:e.point.length,numSpotLights:e.spot.length,numRectAreaLights:e.rectArea.length,numHemiLights:e.hemi.length,numClippingPlanes:n,numClipIntersection:t,dithering:b.dithering,shadowMapEnabled:a.shadowMap.enabled&&u.receiveShadow&&0<g.length,shadowMapType:a.shadowMap.type,toneMapping:a.toneMapping,physicallyCorrectLights:a.physicallyCorrectLights,premultipliedAlpha:b.premultipliedAlpha,\nalphaTest:b.alphaTest,doubleSided:2===b.side,flipSided:1===b.side,depthPacking:void 0!==b.depthPacking?b.depthPacking:!1}};this.getProgramCode=function(b,c){var d=[];c.shaderID?d.push(c.shaderID):(d.push(b.fragmentShader),d.push(b.vertexShader));if(void 0!==b.defines)for(var e in b.defines)d.push(e),d.push(b.defines[e]);for(e=0;e<g.length;e++)d.push(c[g[e]]);d.push(b.onBeforeCompile.toString());d.push(a.gammaOutput);return d.join()};this.acquireProgram=function(d,f,g,q){for(var h,k=0,m=e.length;k<\nm;k++){var r=e[k];if(r.code===q){h=r;++h.usedTimes;break}}void 0===h&&(h=new xg(a,b,q,d,f,g,c),e.push(h));return h};this.releaseProgram=function(a){if(0===--a.usedTimes){var b=e.indexOf(a);e[b]=e[e.length-1];e.pop();a.destroy()}};this.programs=e}function Ag(){var a=new WeakMap;return{get:function(b){var c=a.get(b);void 0===c&&(c={},a.set(b,c));return c},remove:function(b){a.delete(b)},update:function(b,c,d){a.get(b)[c]=d},dispose:function(){a=new WeakMap}}}function Bg(a,b){return a.renderOrder!==\nb.renderOrder?a.renderOrder-b.renderOrder:a.program&&b.program&&a.program!==b.program?a.program.id-b.program.id:a.material.id!==b.material.id?a.material.id-b.material.id:a.z!==b.z?a.z-b.z:a.id-b.id}function Cg(a,b){return a.renderOrder!==b.renderOrder?a.renderOrder-b.renderOrder:a.z!==b.z?b.z-a.z:a.id-b.id}function Dg(){var a=[],b=0,c=[],d=[];return{opaque:c,transparent:d,init:function(){b=0;c.length=0;d.length=0},push:function(e,f,g,h,k){var m=a[b];void 0===m?(m={id:e.id,object:e,geometry:f,material:g,\nprogram:g.program,renderOrder:e.renderOrder,z:h,group:k},a[b]=m):(m.id=e.id,m.object=e,m.geometry=f,m.material=g,m.program=g.program,m.renderOrder=e.renderOrder,m.z=h,m.group=k);(!0===g.transparent?d:c).push(m);b++},sort:function(){1<c.length&&c.sort(Bg);1<d.length&&d.sort(Cg)}}}function Eg(){var a={};return{get:function(b,c){b=b.id+\",\"+c.id;c=a[b];void 0===c&&(c=new Dg,a[b]=c);return c},dispose:function(){a={}}}}function Fg(){var a={};return{get:function(b){if(void 0!==a[b.id])return a[b.id];switch(b.type){case \"DirectionalLight\":var c=\n{direction:new p,color:new G,shadow:!1,shadowBias:0,shadowRadius:1,shadowMapSize:new z};break;case \"SpotLight\":c={position:new p,direction:new p,color:new G,distance:0,coneCos:0,penumbraCos:0,decay:0,shadow:!1,shadowBias:0,shadowRadius:1,shadowMapSize:new z};break;case \"PointLight\":c={position:new p,color:new G,distance:0,decay:0,shadow:!1,shadowBias:0,shadowRadius:1,shadowMapSize:new z,shadowCameraNear:1,shadowCameraFar:1E3};break;case \"HemisphereLight\":c={direction:new p,skyColor:new G,groundColor:new G};\nbreak;case \"RectAreaLight\":c={color:new G,position:new p,halfWidth:new p,halfHeight:new p}}return a[b.id]=c}}}function Gg(){var a=new Fg,b={id:Hg++,hash:{stateID:-1,directionalLength:-1,pointLength:-1,spotLength:-1,rectAreaLength:-1,hemiLength:-1,shadowsLength:-1},ambient:[0,0,0],directional:[],directionalShadowMap:[],directionalShadowMatrix:[],spot:[],spotShadowMap:[],spotShadowMatrix:[],rectArea:[],point:[],pointShadowMap:[],pointShadowMatrix:[],hemi:[]},c=new p,d=new I,e=new I;return{setup:function(f,\ng,h){var k=0,m=0,q=0,n=0,t=0,u=0,r=0,l=0;h=h.matrixWorldInverse;for(var y=0,p=f.length;y<p;y++){var w=f[y],B=w.color,E=w.intensity,P=w.distance,N=w.shadow&&w.shadow.map?w.shadow.map.texture:null;if(w.isAmbientLight)k+=B.r*E,m+=B.g*E,q+=B.b*E;else if(w.isDirectionalLight){var O=a.get(w);O.color.copy(w.color).multiplyScalar(w.intensity);O.direction.setFromMatrixPosition(w.matrixWorld);c.setFromMatrixPosition(w.target.matrixWorld);O.direction.sub(c);O.direction.transformDirection(h);if(O.shadow=w.castShadow)B=\nw.shadow,O.shadowBias=B.bias,O.shadowRadius=B.radius,O.shadowMapSize=B.mapSize;b.directionalShadowMap[n]=N;b.directionalShadowMatrix[n]=w.shadow.matrix;b.directional[n]=O;n++}else if(w.isSpotLight){O=a.get(w);O.position.setFromMatrixPosition(w.matrixWorld);O.position.applyMatrix4(h);O.color.copy(B).multiplyScalar(E);O.distance=P;O.direction.setFromMatrixPosition(w.matrixWorld);c.setFromMatrixPosition(w.target.matrixWorld);O.direction.sub(c);O.direction.transformDirection(h);O.coneCos=Math.cos(w.angle);\nO.penumbraCos=Math.cos(w.angle*(1-w.penumbra));O.decay=0===w.distance?0:w.decay;if(O.shadow=w.castShadow)B=w.shadow,O.shadowBias=B.bias,O.shadowRadius=B.radius,O.shadowMapSize=B.mapSize;b.spotShadowMap[u]=N;b.spotShadowMatrix[u]=w.shadow.matrix;b.spot[u]=O;u++}else if(w.isRectAreaLight)O=a.get(w),O.color.copy(B).multiplyScalar(E),O.position.setFromMatrixPosition(w.matrixWorld),O.position.applyMatrix4(h),e.identity(),d.copy(w.matrixWorld),d.premultiply(h),e.extractRotation(d),O.halfWidth.set(.5*w.width,\n0,0),O.halfHeight.set(0,.5*w.height,0),O.halfWidth.applyMatrix4(e),O.halfHeight.applyMatrix4(e),b.rectArea[r]=O,r++;else if(w.isPointLight){O=a.get(w);O.position.setFromMatrixPosition(w.matrixWorld);O.position.applyMatrix4(h);O.color.copy(w.color).multiplyScalar(w.intensity);O.distance=w.distance;O.decay=0===w.distance?0:w.decay;if(O.shadow=w.castShadow)B=w.shadow,O.shadowBias=B.bias,O.shadowRadius=B.radius,O.shadowMapSize=B.mapSize,O.shadowCameraNear=B.camera.near,O.shadowCameraFar=B.camera.far;\nb.pointShadowMap[t]=N;b.pointShadowMatrix[t]=w.shadow.matrix;b.point[t]=O;t++}else w.isHemisphereLight&&(O=a.get(w),O.direction.setFromMatrixPosition(w.matrixWorld),O.direction.transformDirection(h),O.direction.normalize(),O.skyColor.copy(w.color).multiplyScalar(E),O.groundColor.copy(w.groundColor).multiplyScalar(E),b.hemi[l]=O,l++)}b.ambient[0]=k;b.ambient[1]=m;b.ambient[2]=q;b.directional.length=n;b.spot.length=u;b.rectArea.length=r;b.point.length=t;b.hemi.length=l;b.hash.stateID=b.id;b.hash.directionalLength=\nn;b.hash.pointLength=t;b.hash.spotLength=u;b.hash.rectAreaLength=r;b.hash.hemiLength=l;b.hash.shadowsLength=g.length},state:b}}function Ye(){var a=new Gg,b=[],c=[];return{init:function(){b.length=0;c.length=0},state:{lightsArray:b,shadowsArray:c,lights:a},setupLights:function(d){a.setup(b,c,d)},pushLight:function(a){b.push(a)},pushShadow:function(a){c.push(a)}}}function Ig(){var a={};return{get:function(b,c){if(void 0===a[b.id]){var d=new Ye;a[b.id]={};a[b.id][c.id]=d}else void 0===a[b.id][c.id]?\n(d=new Ye,a[b.id][c.id]=d):d=a[b.id][c.id];return d},dispose:function(){a={}}}}function $a(a){J.call(this);this.type=\"MeshDepthMaterial\";this.depthPacking=3200;this.morphTargets=this.skinning=!1;this.displacementMap=this.alphaMap=this.map=null;this.displacementScale=1;this.displacementBias=0;this.wireframe=!1;this.wireframeLinewidth=1;this.lights=this.fog=!1;this.setValues(a)}function ab(a){J.call(this);this.type=\"MeshDistanceMaterial\";this.referencePosition=new p;this.nearDistance=1;this.farDistance=\n1E3;this.morphTargets=this.skinning=!1;this.displacementMap=this.alphaMap=this.map=null;this.displacementScale=1;this.displacementBias=0;this.lights=this.fog=!1;this.setValues(a)}function Ze(a,b,c){function d(b,c,d,e,f,g){var h=b.geometry;var k=n;var m=b.customDepthMaterial;d&&(k=t,m=b.customDistanceMaterial);m?k=m:(m=!1,c.morphTargets&&(h&&h.isBufferGeometry?m=h.morphAttributes&&h.morphAttributes.position&&0<h.morphAttributes.position.length:h&&h.isGeometry&&(m=h.morphTargets&&0<h.morphTargets.length)),\nb.isSkinnedMesh&&!1===c.skinning&&console.warn(\"THREE.WebGLShadowMap: THREE.SkinnedMesh with material.skinning set to false:\",b),b=b.isSkinnedMesh&&c.skinning,h=0,m&&(h|=1),b&&(h|=2),k=k[h]);a.localClippingEnabled&&!0===c.clipShadows&&0!==c.clippingPlanes.length&&(h=k.uuid,m=c.uuid,b=u[h],void 0===b&&(b={},u[h]=b),h=b[m],void 0===h&&(h=k.clone(),b[m]=h),k=h);k.visible=c.visible;k.wireframe=c.wireframe;k.side=null!=c.shadowSide?c.shadowSide:r[c.side];k.clipShadows=c.clipShadows;k.clippingPlanes=c.clippingPlanes;\nk.clipIntersection=c.clipIntersection;k.wireframeLinewidth=c.wireframeLinewidth;k.linewidth=c.linewidth;d&&k.isMeshDistanceMaterial&&(k.referencePosition.copy(e),k.nearDistance=f,k.farDistance=g);return k}function e(c,g,h,k){if(!1!==c.visible){if(c.layers.test(g.layers)&&(c.isMesh||c.isLine||c.isPoints)&&c.castShadow&&(!c.frustumCulled||f.intersectsObject(c))){c.modelViewMatrix.multiplyMatrices(h.matrixWorldInverse,c.matrixWorld);var m=b.update(c),n=c.material;if(Array.isArray(n))for(var t=m.groups,\nu=0,r=t.length;u<r;u++){var l=t[u],P=n[l.materialIndex];P&&P.visible&&(P=d(c,P,k,q,h.near,h.far),a.renderBufferDirect(h,null,m,P,c,l))}else n.visible&&(P=d(c,n,k,q,h.near,h.far),a.renderBufferDirect(h,null,m,P,c,null))}c=c.children;m=0;for(n=c.length;m<n;m++)e(c[m],g,h,k)}}var f=new md,g=new I,h=new z,k=new z(c,c),m=new p,q=new p,n=Array(4),t=Array(4),u={},r={0:1,1:0,2:2},l=[new p(1,0,0),new p(-1,0,0),new p(0,0,1),new p(0,0,-1),new p(0,1,0),new p(0,-1,0)],y=[new p(0,1,0),new p(0,1,0),new p(0,1,0),\nnew p(0,1,0),new p(0,0,1),new p(0,0,-1)],x=[new V,new V,new V,new V,new V,new V];for(c=0;4!==c;++c){var w=0!==(c&1),B=0!==(c&2),E=new $a({depthPacking:3201,morphTargets:w,skinning:B});n[c]=E;w=new ab({morphTargets:w,skinning:B});t[c]=w}var P=this;this.enabled=!1;this.autoUpdate=!0;this.needsUpdate=!1;this.type=1;this.render=function(b,c,d){if(!1!==P.enabled&&(!1!==P.autoUpdate||!1!==P.needsUpdate)&&0!==b.length){var n=a.state;n.disable(a.context.BLEND);n.buffers.color.setClear(1,1,1,1);n.buffers.depth.setTest(!0);\nn.setScissorTest(!1);for(var t,u=0,r=b.length;u<r;u++){var v=b[u];t=v.shadow;var p=v&&v.isPointLight;if(void 0===t)console.warn(\"THREE.WebGLShadowMap:\",v,\"has no shadow.\");else{var w=t.camera;h.copy(t.mapSize);h.min(k);if(p){var N=h.x,E=h.y;x[0].set(2*N,E,N,E);x[1].set(0,E,N,E);x[2].set(3*N,E,N,E);x[3].set(N,E,N,E);x[4].set(3*N,0,N,E);x[5].set(N,0,N,E);h.x*=4;h.y*=2}null===t.map&&(t.map=new fb(h.x,h.y,{minFilter:1003,magFilter:1003,format:1023}),t.map.texture.name=v.name+\".shadowMap\",w.updateProjectionMatrix());\nt.isSpotLightShadow&&t.update(v);N=t.map;E=t.matrix;q.setFromMatrixPosition(v.matrixWorld);w.position.copy(q);p?(t=6,E.makeTranslation(-q.x,-q.y,-q.z)):(t=1,m.setFromMatrixPosition(v.target.matrixWorld),w.lookAt(m),w.updateMatrixWorld(),E.set(.5,0,0,.5,0,.5,0,.5,0,0,.5,.5,0,0,0,1),E.multiply(w.projectionMatrix),E.multiply(w.matrixWorldInverse));a.setRenderTarget(N);a.clear();for(v=0;v<t;v++)p&&(m.copy(w.position),m.add(l[v]),w.up.copy(y[v]),w.lookAt(m),w.updateMatrixWorld(),n.viewport(x[v])),g.multiplyMatrices(w.projectionMatrix,\nw.matrixWorldInverse),f.setFromMatrix(g),e(c,d,w,p)}}P.needsUpdate=!1}}}function Jg(a,b,c,d){function e(b,c,d){var e=new Uint8Array(4),f=a.createTexture();a.bindTexture(b,f);a.texParameteri(b,a.TEXTURE_MIN_FILTER,a.NEAREST);a.texParameteri(b,a.TEXTURE_MAG_FILTER,a.NEAREST);for(b=0;b<d;b++)a.texImage2D(c+b,0,a.RGBA,1,1,0,a.RGBA,a.UNSIGNED_BYTE,e);return f}function f(c,e){x[c]=1;0===w[c]&&(a.enableVertexAttribArray(c),w[c]=1);B[c]!==e&&((d.isWebGL2?a:b.get(\"ANGLE_instanced_arrays\"))[d.isWebGL2?\"vertexAttribDivisor\":\n\"vertexAttribDivisorANGLE\"](c,e),B[c]=e)}function g(b){!0!==E[b]&&(a.enable(b),E[b]=!0)}function h(b){!1!==E[b]&&(a.disable(b),E[b]=!1)}function k(b,d,e,f,k,m,n,q){0!==b?g(a.BLEND):h(a.BLEND);if(5!==b){if(b!==O||q!==C)switch(b){case 2:q?(a.blendEquationSeparate(a.FUNC_ADD,a.FUNC_ADD),a.blendFuncSeparate(a.ONE,a.ONE,a.ONE,a.ONE)):(a.blendEquation(a.FUNC_ADD),a.blendFunc(a.SRC_ALPHA,a.ONE));break;case 3:q?(a.blendEquationSeparate(a.FUNC_ADD,a.FUNC_ADD),a.blendFuncSeparate(a.ZERO,a.ZERO,a.ONE_MINUS_SRC_COLOR,\na.ONE_MINUS_SRC_ALPHA)):(a.blendEquation(a.FUNC_ADD),a.blendFunc(a.ZERO,a.ONE_MINUS_SRC_COLOR));break;case 4:q?(a.blendEquationSeparate(a.FUNC_ADD,a.FUNC_ADD),a.blendFuncSeparate(a.ZERO,a.SRC_COLOR,a.ZERO,a.SRC_ALPHA)):(a.blendEquation(a.FUNC_ADD),a.blendFunc(a.ZERO,a.SRC_COLOR));break;default:q?(a.blendEquationSeparate(a.FUNC_ADD,a.FUNC_ADD),a.blendFuncSeparate(a.ONE,a.ONE_MINUS_SRC_ALPHA,a.ONE,a.ONE_MINUS_SRC_ALPHA)):(a.blendEquationSeparate(a.FUNC_ADD,a.FUNC_ADD),a.blendFuncSeparate(a.SRC_ALPHA,\na.ONE_MINUS_SRC_ALPHA,a.ONE,a.ONE_MINUS_SRC_ALPHA))}D=A=Ud=Td=Sd=z=null}else{k=k||d;m=m||e;n=n||f;if(d!==z||k!==Ud)a.blendEquationSeparate(c.convert(d),c.convert(k)),z=d,Ud=k;if(e!==Sd||f!==Td||m!==A||n!==D)a.blendFuncSeparate(c.convert(e),c.convert(f),c.convert(m),c.convert(n)),Sd=e,Td=f,A=m,D=n}O=b;C=q}function m(b){G!==b&&(b?a.frontFace(a.CW):a.frontFace(a.CCW),G=b)}function q(b){0!==b?(g(a.CULL_FACE),b!==K&&(1===b?a.cullFace(a.BACK):2===b?a.cullFace(a.FRONT):a.cullFace(a.FRONT_AND_BACK))):h(a.CULL_FACE);\nK=b}function n(b,c,d){if(b){if(g(a.POLYGON_OFFSET_FILL),R!==c||I!==d)a.polygonOffset(c,d),R=c,I=d}else h(a.POLYGON_OFFSET_FILL)}function t(b){void 0===b&&(b=a.TEXTURE0+J-1);Q!==b&&(a.activeTexture(b),Q=b)}var u=new function(){var b=!1,c=new V,d=null,e=new V(0,0,0,0);return{setMask:function(c){d===c||b||(a.colorMask(c,c,c,c),d=c)},setLocked:function(a){b=a},setClear:function(b,d,f,g,h){!0===h&&(b*=g,d*=g,f*=g);c.set(b,d,f,g);!1===e.equals(c)&&(a.clearColor(b,d,f,g),e.copy(c))},reset:function(){b=!1;\nd=null;e.set(-1,0,0,0)}}},r=new function(){var b=!1,c=null,d=null,e=null;return{setTest:function(b){b?g(a.DEPTH_TEST):h(a.DEPTH_TEST)},setMask:function(d){c===d||b||(a.depthMask(d),c=d)},setFunc:function(b){if(d!==b){if(b)switch(b){case 0:a.depthFunc(a.NEVER);break;case 1:a.depthFunc(a.ALWAYS);break;case 2:a.depthFunc(a.LESS);break;case 3:a.depthFunc(a.LEQUAL);break;case 4:a.depthFunc(a.EQUAL);break;case 5:a.depthFunc(a.GEQUAL);break;case 6:a.depthFunc(a.GREATER);break;case 7:a.depthFunc(a.NOTEQUAL);\nbreak;default:a.depthFunc(a.LEQUAL)}else a.depthFunc(a.LEQUAL);d=b}},setLocked:function(a){b=a},setClear:function(b){e!==b&&(a.clearDepth(b),e=b)},reset:function(){b=!1;e=d=c=null}}},l=new function(){var b=!1,c=null,d=null,e=null,f=null,k=null,m=null,n=null,q=null;return{setTest:function(b){b?g(a.STENCIL_TEST):h(a.STENCIL_TEST)},setMask:function(d){c===d||b||(a.stencilMask(d),c=d)},setFunc:function(b,c,g){if(d!==b||e!==c||f!==g)a.stencilFunc(b,c,g),d=b,e=c,f=g},setOp:function(b,c,d){if(k!==b||m!==\nc||n!==d)a.stencilOp(b,c,d),k=b,m=c,n=d},setLocked:function(a){b=a},setClear:function(b){q!==b&&(a.clearStencil(b),q=b)},reset:function(){b=!1;q=n=m=k=f=e=d=c=null}}},p=a.getParameter(a.MAX_VERTEX_ATTRIBS),x=new Uint8Array(p),w=new Uint8Array(p),B=new Uint8Array(p),E={},P=null,N=null,O=null,z=null,Sd=null,Td=null,Ud=null,A=null,D=null,C=!1,G=null,K=null,L=null,R=null,I=null,J=a.getParameter(a.MAX_COMBINED_TEXTURE_IMAGE_UNITS),H=!1;p=0;p=a.getParameter(a.VERSION);-1!==p.indexOf(\"WebGL\")?(p=parseFloat(/^WebGL ([0-9])/.exec(p)[1]),\nH=1<=p):-1!==p.indexOf(\"OpenGL ES\")&&(p=parseFloat(/^OpenGL ES ([0-9])/.exec(p)[1]),H=2<=p);var Q=null,S={},Y=new V,W=new V,M={};M[a.TEXTURE_2D]=e(a.TEXTURE_2D,a.TEXTURE_2D,1);M[a.TEXTURE_CUBE_MAP]=e(a.TEXTURE_CUBE_MAP,a.TEXTURE_CUBE_MAP_POSITIVE_X,6);u.setClear(0,0,0,1);r.setClear(1);l.setClear(0);g(a.DEPTH_TEST);r.setFunc(3);m(!1);q(1);g(a.CULL_FACE);g(a.BLEND);k(1);return{buffers:{color:u,depth:r,stencil:l},initAttributes:function(){for(var a=0,b=x.length;a<b;a++)x[a]=0},enableAttribute:function(a){f(a,\n0)},enableAttributeAndDivisor:f,disableUnusedAttributes:function(){for(var b=0,c=w.length;b!==c;++b)w[b]!==x[b]&&(a.disableVertexAttribArray(b),w[b]=0)},enable:g,disable:h,getCompressedTextureFormats:function(){if(null===P&&(P=[],b.get(\"WEBGL_compressed_texture_pvrtc\")||b.get(\"WEBGL_compressed_texture_s3tc\")||b.get(\"WEBGL_compressed_texture_etc1\")||b.get(\"WEBGL_compressed_texture_astc\")))for(var c=a.getParameter(a.COMPRESSED_TEXTURE_FORMATS),d=0;d<c.length;d++)P.push(c[d]);return P},useProgram:function(b){return N!==\nb?(a.useProgram(b),N=b,!0):!1},setBlending:k,setMaterial:function(b,c){2===b.side?h(a.CULL_FACE):g(a.CULL_FACE);var d=1===b.side;c&&(d=!d);m(d);1===b.blending&&!1===b.transparent?k(0):k(b.blending,b.blendEquation,b.blendSrc,b.blendDst,b.blendEquationAlpha,b.blendSrcAlpha,b.blendDstAlpha,b.premultipliedAlpha);r.setFunc(b.depthFunc);r.setTest(b.depthTest);r.setMask(b.depthWrite);u.setMask(b.colorWrite);n(b.polygonOffset,b.polygonOffsetFactor,b.polygonOffsetUnits)},setFlipSided:m,setCullFace:q,setLineWidth:function(b){b!==\nL&&(H&&a.lineWidth(b),L=b)},setPolygonOffset:n,setScissorTest:function(b){b?g(a.SCISSOR_TEST):h(a.SCISSOR_TEST)},activeTexture:t,bindTexture:function(b,c){null===Q&&t();var d=S[Q];void 0===d&&(d={type:void 0,texture:void 0},S[Q]=d);if(d.type!==b||d.texture!==c)a.bindTexture(b,c||M[b]),d.type=b,d.texture=c},compressedTexImage2D:function(){try{a.compressedTexImage2D.apply(a,arguments)}catch(U){console.error(\"THREE.WebGLState:\",U)}},texImage2D:function(){try{a.texImage2D.apply(a,arguments)}catch(U){console.error(\"THREE.WebGLState:\",\nU)}},scissor:function(b){!1===Y.equals(b)&&(a.scissor(b.x,b.y,b.z,b.w),Y.copy(b))},viewport:function(b){!1===W.equals(b)&&(a.viewport(b.x,b.y,b.z,b.w),W.copy(b))},reset:function(){for(var b=0;b<w.length;b++)1===w[b]&&(a.disableVertexAttribArray(b),w[b]=0);E={};Q=P=null;S={};K=G=O=N=null;u.reset();r.reset();l.reset()}}}function Kg(a,b,c,d,e,f,g){function h(a,b){if(a.width>b||a.height>b){if(\"data\"in a){console.warn(\"THREE.WebGLRenderer: image in DataTexture is too big (\"+a.width+\"x\"+a.height+\").\");\nreturn}b/=Math.max(a.width,a.height);var c=document.createElementNS(\"http://www.w3.org/1999/xhtml\",\"canvas\");c.width=Math.floor(a.width*b);c.height=Math.floor(a.height*b);c.getContext(\"2d\").drawImage(a,0,0,a.width,a.height,0,0,c.width,c.height);console.warn(\"THREE.WebGLRenderer: image is too big (\"+a.width+\"x\"+a.height+\"). Resized to \"+c.width+\"x\"+c.height);return c}return a}function k(a){return H.isPowerOfTwo(a.width)&&H.isPowerOfTwo(a.height)}function m(a,b){return a.generateMipmaps&&b&&1003!==\na.minFilter&&1006!==a.minFilter}function q(b,c,e,f){a.generateMipmap(b);d.get(c).__maxMipLevel=Math.log(Math.max(e,f))*Math.LOG2E}function n(b,c){if(!e.isWebGL2)return b;if(b===a.RGB){if(c===a.FLOAT)return a.RGB32F;if(c===a.HALF_FLOAT)return a.RGB16F;if(c===a.UNSIGNED_BYTE)return a.RGB8}if(b===a.RGBA){if(c===a.FLOAT)return a.RGBA32F;if(c===a.HALF_FLOAT)return a.RGBA16F;if(c===a.UNSIGNED_BYTE)return a.RGBA8}return b}function t(b){return 1003===b||1004===b||1005===b?a.NEAREST:a.LINEAR}function u(b){b=\nb.target;b.removeEventListener(\"dispose\",u);a:{var c=d.get(b);if(b.image&&c.__image__webglTextureCube)a.deleteTexture(c.__image__webglTextureCube);else{if(void 0===c.__webglInit)break a;a.deleteTexture(c.__webglTexture)}d.remove(b)}b.isVideoTexture&&delete B[b.id];g.memory.textures--}function r(b){b=b.target;b.removeEventListener(\"dispose\",r);var c=d.get(b),e=d.get(b.texture);if(b){void 0!==e.__webglTexture&&a.deleteTexture(e.__webglTexture);b.depthTexture&&b.depthTexture.dispose();if(b.isWebGLRenderTargetCube)for(e=\n0;6>e;e++)a.deleteFramebuffer(c.__webglFramebuffer[e]),c.__webglDepthbuffer&&a.deleteRenderbuffer(c.__webglDepthbuffer[e]);else a.deleteFramebuffer(c.__webglFramebuffer),c.__webglDepthbuffer&&a.deleteRenderbuffer(c.__webglDepthbuffer);d.remove(b.texture);d.remove(b)}g.memory.textures--}function l(b,t){var r=d.get(b);if(b.isVideoTexture){var l=b.id,v=g.render.frame;B[l]!==v&&(B[l]=v,b.update())}if(0<b.version&&r.__version!==b.version)if(l=b.image,void 0===l)console.warn(\"THREE.WebGLRenderer: Texture marked for update but image is undefined\");\nelse if(!1===l.complete)console.warn(\"THREE.WebGLRenderer: Texture marked for update but image is incomplete\");else{void 0===r.__webglInit&&(r.__webglInit=!0,b.addEventListener(\"dispose\",u),r.__webglTexture=a.createTexture(),g.memory.textures++);c.activeTexture(a.TEXTURE0+t);c.bindTexture(a.TEXTURE_2D,r.__webglTexture);a.pixelStorei(a.UNPACK_FLIP_Y_WEBGL,b.flipY);a.pixelStorei(a.UNPACK_PREMULTIPLY_ALPHA_WEBGL,b.premultiplyAlpha);a.pixelStorei(a.UNPACK_ALIGNMENT,b.unpackAlignment);t=h(b.image,e.maxTextureSize);\n(e.isWebGL2?0:1001!==b.wrapS||1001!==b.wrapT||1003!==b.minFilter&&1006!==b.minFilter)&&!1===k(t)&&(t instanceof HTMLImageElement||t instanceof HTMLCanvasElement||t instanceof ImageBitmap)&&(void 0===E&&(E=document.createElementNS(\"http://www.w3.org/1999/xhtml\",\"canvas\")),E.width=H.floorPowerOfTwo(t.width),E.height=H.floorPowerOfTwo(t.height),E.getContext(\"2d\").drawImage(t,0,0,E.width,E.height),console.warn(\"THREE.WebGLRenderer: image is not power of two (\"+t.width+\"x\"+t.height+\"). Resized to \"+E.width+\n\"x\"+E.height),t=E);l=k(t);v=f.convert(b.format);var w=f.convert(b.type),y=n(v,w);p(a.TEXTURE_2D,b,l);var P=b.mipmaps;if(b.isDepthTexture){y=a.DEPTH_COMPONENT;if(1015===b.type){if(!e.isWebGL2)throw Error(\"Float Depth Texture only supported in WebGL2.0\");y=a.DEPTH_COMPONENT32F}else e.isWebGL2&&(y=a.DEPTH_COMPONENT16);1026===b.format&&y===a.DEPTH_COMPONENT&&1012!==b.type&&1014!==b.type&&(console.warn(\"THREE.WebGLRenderer: Use UnsignedShortType or UnsignedIntType for DepthFormat DepthTexture.\"),b.type=\n1012,w=f.convert(b.type));1027===b.format&&(y=a.DEPTH_STENCIL,1020!==b.type&&(console.warn(\"THREE.WebGLRenderer: Use UnsignedInt248Type for DepthStencilFormat DepthTexture.\"),b.type=1020,w=f.convert(b.type)));c.texImage2D(a.TEXTURE_2D,0,y,t.width,t.height,0,v,w,null)}else if(b.isDataTexture)if(0<P.length&&l){for(var N=0,x=P.length;N<x;N++){var z=P[N];c.texImage2D(a.TEXTURE_2D,N,y,z.width,z.height,0,v,w,z.data)}b.generateMipmaps=!1;r.__maxMipLevel=P.length-1}else c.texImage2D(a.TEXTURE_2D,0,y,t.width,\nt.height,0,v,w,t.data),r.__maxMipLevel=0;else if(b.isCompressedTexture){N=0;for(x=P.length;N<x;N++)z=P[N],1023!==b.format&&1022!==b.format?-1<c.getCompressedTextureFormats().indexOf(v)?c.compressedTexImage2D(a.TEXTURE_2D,N,y,z.width,z.height,0,z.data):console.warn(\"THREE.WebGLRenderer: Attempt to load unsupported compressed texture format in .uploadTexture()\"):c.texImage2D(a.TEXTURE_2D,N,y,z.width,z.height,0,v,w,z.data);r.__maxMipLevel=P.length-1}else if(0<P.length&&l){N=0;for(x=P.length;N<x;N++)z=\nP[N],c.texImage2D(a.TEXTURE_2D,N,y,v,w,z);b.generateMipmaps=!1;r.__maxMipLevel=P.length-1}else c.texImage2D(a.TEXTURE_2D,0,y,v,w,t),r.__maxMipLevel=0;m(b,l)&&q(a.TEXTURE_2D,b,t.width,t.height);r.__version=b.version;if(b.onUpdate)b.onUpdate(b);return}c.activeTexture(a.TEXTURE0+t);c.bindTexture(a.TEXTURE_2D,r.__webglTexture)}function p(c,g,h){h?(a.texParameteri(c,a.TEXTURE_WRAP_S,f.convert(g.wrapS)),a.texParameteri(c,a.TEXTURE_WRAP_T,f.convert(g.wrapT)),a.texParameteri(c,a.TEXTURE_MAG_FILTER,f.convert(g.magFilter)),\na.texParameteri(c,a.TEXTURE_MIN_FILTER,f.convert(g.minFilter))):(a.texParameteri(c,a.TEXTURE_WRAP_S,a.CLAMP_TO_EDGE),a.texParameteri(c,a.TEXTURE_WRAP_T,a.CLAMP_TO_EDGE),1001===g.wrapS&&1001===g.wrapT||console.warn(\"THREE.WebGLRenderer: Texture is not power of two. Texture.wrapS and Texture.wrapT should be set to THREE.ClampToEdgeWrapping.\"),a.texParameteri(c,a.TEXTURE_MAG_FILTER,t(g.magFilter)),a.texParameteri(c,a.TEXTURE_MIN_FILTER,t(g.minFilter)),1003!==g.minFilter&&1006!==g.minFilter&&console.warn(\"THREE.WebGLRenderer: Texture is not power of two. Texture.minFilter should be set to THREE.NearestFilter or THREE.LinearFilter.\"));\n!(h=b.get(\"EXT_texture_filter_anisotropic\"))||1015===g.type&&null===b.get(\"OES_texture_float_linear\")||1016===g.type&&null===(e.isWebGL2||b.get(\"OES_texture_half_float_linear\"))||!(1<g.anisotropy||d.get(g).__currentAnisotropy)||(a.texParameterf(c,h.TEXTURE_MAX_ANISOTROPY_EXT,Math.min(g.anisotropy,e.getMaxAnisotropy())),d.get(g).__currentAnisotropy=g.anisotropy)}function x(b,e,g,h){var k=f.convert(e.texture.format),m=f.convert(e.texture.type),q=n(k,m);c.texImage2D(h,0,q,e.width,e.height,0,k,m,null);\na.bindFramebuffer(a.FRAMEBUFFER,b);a.framebufferTexture2D(a.FRAMEBUFFER,g,h,d.get(e.texture).__webglTexture,0);a.bindFramebuffer(a.FRAMEBUFFER,null)}function w(b,c){a.bindRenderbuffer(a.RENDERBUFFER,b);c.depthBuffer&&!c.stencilBuffer?(a.renderbufferStorage(a.RENDERBUFFER,a.DEPTH_COMPONENT16,c.width,c.height),a.framebufferRenderbuffer(a.FRAMEBUFFER,a.DEPTH_ATTACHMENT,a.RENDERBUFFER,b)):c.depthBuffer&&c.stencilBuffer?(a.renderbufferStorage(a.RENDERBUFFER,a.DEPTH_STENCIL,c.width,c.height),a.framebufferRenderbuffer(a.FRAMEBUFFER,\na.DEPTH_STENCIL_ATTACHMENT,a.RENDERBUFFER,b)):a.renderbufferStorage(a.RENDERBUFFER,a.RGBA4,c.width,c.height);a.bindRenderbuffer(a.RENDERBUFFER,null)}var B={},E;this.setTexture2D=l;this.setTextureCube=function(b,t){var r=d.get(b);if(6===b.image.length)if(0<b.version&&r.__version!==b.version){r.__image__webglTextureCube||(b.addEventListener(\"dispose\",u),r.__image__webglTextureCube=a.createTexture(),g.memory.textures++);c.activeTexture(a.TEXTURE0+t);c.bindTexture(a.TEXTURE_CUBE_MAP,r.__image__webglTextureCube);\na.pixelStorei(a.UNPACK_FLIP_Y_WEBGL,b.flipY);t=b&&b.isCompressedTexture;for(var l=b.image[0]&&b.image[0].isDataTexture,v=[],w=0;6>w;w++)v[w]=t||l?l?b.image[w].image:b.image[w]:h(b.image[w],e.maxCubemapSize);var y=v[0],E=k(y),P=f.convert(b.format),x=f.convert(b.type),N=n(P,x);p(a.TEXTURE_CUBE_MAP,b,E);for(w=0;6>w;w++)if(t)for(var B,z=v[w].mipmaps,A=0,D=z.length;A<D;A++)B=z[A],1023!==b.format&&1022!==b.format?-1<c.getCompressedTextureFormats().indexOf(P)?c.compressedTexImage2D(a.TEXTURE_CUBE_MAP_POSITIVE_X+\nw,A,N,B.width,B.height,0,B.data):console.warn(\"THREE.WebGLRenderer: Attempt to load unsupported compressed texture format in .setTextureCube()\"):c.texImage2D(a.TEXTURE_CUBE_MAP_POSITIVE_X+w,A,N,B.width,B.height,0,P,x,B.data);else l?c.texImage2D(a.TEXTURE_CUBE_MAP_POSITIVE_X+w,0,N,v[w].width,v[w].height,0,P,x,v[w].data):c.texImage2D(a.TEXTURE_CUBE_MAP_POSITIVE_X+w,0,N,P,x,v[w]);r.__maxMipLevel=t?z.length-1:0;m(b,E)&&q(a.TEXTURE_CUBE_MAP,b,y.width,y.height);r.__version=b.version;if(b.onUpdate)b.onUpdate(b)}else c.activeTexture(a.TEXTURE0+\nt),c.bindTexture(a.TEXTURE_CUBE_MAP,r.__image__webglTextureCube)};this.setTextureCubeDynamic=function(b,e){c.activeTexture(a.TEXTURE0+e);c.bindTexture(a.TEXTURE_CUBE_MAP,d.get(b).__webglTexture)};this.setupRenderTarget=function(b){var e=d.get(b),f=d.get(b.texture);b.addEventListener(\"dispose\",r);f.__webglTexture=a.createTexture();g.memory.textures++;var h=!0===b.isWebGLRenderTargetCube,n=k(b);if(h){e.__webglFramebuffer=[];for(var t=0;6>t;t++)e.__webglFramebuffer[t]=a.createFramebuffer()}else e.__webglFramebuffer=\na.createFramebuffer();if(h){c.bindTexture(a.TEXTURE_CUBE_MAP,f.__webglTexture);p(a.TEXTURE_CUBE_MAP,b.texture,n);for(t=0;6>t;t++)x(e.__webglFramebuffer[t],b,a.COLOR_ATTACHMENT0,a.TEXTURE_CUBE_MAP_POSITIVE_X+t);m(b.texture,n)&&q(a.TEXTURE_CUBE_MAP,b.texture,b.width,b.height);c.bindTexture(a.TEXTURE_CUBE_MAP,null)}else c.bindTexture(a.TEXTURE_2D,f.__webglTexture),p(a.TEXTURE_2D,b.texture,n),x(e.__webglFramebuffer,b,a.COLOR_ATTACHMENT0,a.TEXTURE_2D),m(b.texture,n)&&q(a.TEXTURE_2D,b.texture,b.width,b.height),\nc.bindTexture(a.TEXTURE_2D,null);if(b.depthBuffer){e=d.get(b);f=!0===b.isWebGLRenderTargetCube;if(b.depthTexture){if(f)throw Error(\"target.depthTexture not supported in Cube render targets\");if(b&&b.isWebGLRenderTargetCube)throw Error(\"Depth Texture with cube render targets is not supported\");a.bindFramebuffer(a.FRAMEBUFFER,e.__webglFramebuffer);if(!b.depthTexture||!b.depthTexture.isDepthTexture)throw Error(\"renderTarget.depthTexture must be an instance of THREE.DepthTexture\");d.get(b.depthTexture).__webglTexture&&\nb.depthTexture.image.width===b.width&&b.depthTexture.image.height===b.height||(b.depthTexture.image.width=b.width,b.depthTexture.image.height=b.height,b.depthTexture.needsUpdate=!0);l(b.depthTexture,0);e=d.get(b.depthTexture).__webglTexture;if(1026===b.depthTexture.format)a.framebufferTexture2D(a.FRAMEBUFFER,a.DEPTH_ATTACHMENT,a.TEXTURE_2D,e,0);else if(1027===b.depthTexture.format)a.framebufferTexture2D(a.FRAMEBUFFER,a.DEPTH_STENCIL_ATTACHMENT,a.TEXTURE_2D,e,0);else throw Error(\"Unknown depthTexture format\");\n}else if(f)for(e.__webglDepthbuffer=[],f=0;6>f;f++)a.bindFramebuffer(a.FRAMEBUFFER,e.__webglFramebuffer[f]),e.__webglDepthbuffer[f]=a.createRenderbuffer(),w(e.__webglDepthbuffer[f],b);else a.bindFramebuffer(a.FRAMEBUFFER,e.__webglFramebuffer),e.__webglDepthbuffer=a.createRenderbuffer(),w(e.__webglDepthbuffer,b);a.bindFramebuffer(a.FRAMEBUFFER,null)}};this.updateRenderTargetMipmap=function(b){var e=b.texture,f=k(b);if(m(e,f)){f=b.isWebGLRenderTargetCube?a.TEXTURE_CUBE_MAP:a.TEXTURE_2D;var g=d.get(e).__webglTexture;\nc.bindTexture(f,g);q(f,e,b.width,b.height);c.bindTexture(f,null)}}}function $e(a,b,c){return{convert:function(d){if(1E3===d)return a.REPEAT;if(1001===d)return a.CLAMP_TO_EDGE;if(1002===d)return a.MIRRORED_REPEAT;if(1003===d)return a.NEAREST;if(1004===d)return a.NEAREST_MIPMAP_NEAREST;if(1005===d)return a.NEAREST_MIPMAP_LINEAR;if(1006===d)return a.LINEAR;if(1007===d)return a.LINEAR_MIPMAP_NEAREST;if(1008===d)return a.LINEAR_MIPMAP_LINEAR;if(1009===d)return a.UNSIGNED_BYTE;if(1017===d)return a.UNSIGNED_SHORT_4_4_4_4;\nif(1018===d)return a.UNSIGNED_SHORT_5_5_5_1;if(1019===d)return a.UNSIGNED_SHORT_5_6_5;if(1010===d)return a.BYTE;if(1011===d)return a.SHORT;if(1012===d)return a.UNSIGNED_SHORT;if(1013===d)return a.INT;if(1014===d)return a.UNSIGNED_INT;if(1015===d)return a.FLOAT;if(1016===d){if(c.isWebGL2)return a.HALF_FLOAT;var e=b.get(\"OES_texture_half_float\");if(null!==e)return e.HALF_FLOAT_OES}if(1021===d)return a.ALPHA;if(1022===d)return a.RGB;if(1023===d)return a.RGBA;if(1024===d)return a.LUMINANCE;if(1025===\nd)return a.LUMINANCE_ALPHA;if(1026===d)return a.DEPTH_COMPONENT;if(1027===d)return a.DEPTH_STENCIL;if(100===d)return a.FUNC_ADD;if(101===d)return a.FUNC_SUBTRACT;if(102===d)return a.FUNC_REVERSE_SUBTRACT;if(200===d)return a.ZERO;if(201===d)return a.ONE;if(202===d)return a.SRC_COLOR;if(203===d)return a.ONE_MINUS_SRC_COLOR;if(204===d)return a.SRC_ALPHA;if(205===d)return a.ONE_MINUS_SRC_ALPHA;if(206===d)return a.DST_ALPHA;if(207===d)return a.ONE_MINUS_DST_ALPHA;if(208===d)return a.DST_COLOR;if(209===\nd)return a.ONE_MINUS_DST_COLOR;if(210===d)return a.SRC_ALPHA_SATURATE;if(33776===d||33777===d||33778===d||33779===d)if(e=b.get(\"WEBGL_compressed_texture_s3tc\"),null!==e){if(33776===d)return e.COMPRESSED_RGB_S3TC_DXT1_EXT;if(33777===d)return e.COMPRESSED_RGBA_S3TC_DXT1_EXT;if(33778===d)return e.COMPRESSED_RGBA_S3TC_DXT3_EXT;if(33779===d)return e.COMPRESSED_RGBA_S3TC_DXT5_EXT}if(35840===d||35841===d||35842===d||35843===d)if(e=b.get(\"WEBGL_compressed_texture_pvrtc\"),null!==e){if(35840===d)return e.COMPRESSED_RGB_PVRTC_4BPPV1_IMG;\nif(35841===d)return e.COMPRESSED_RGB_PVRTC_2BPPV1_IMG;if(35842===d)return e.COMPRESSED_RGBA_PVRTC_4BPPV1_IMG;if(35843===d)return e.COMPRESSED_RGBA_PVRTC_2BPPV1_IMG}if(36196===d&&(e=b.get(\"WEBGL_compressed_texture_etc1\"),null!==e))return e.COMPRESSED_RGB_ETC1_WEBGL;if(37808===d||37809===d||37810===d||37811===d||37812===d||37813===d||37814===d||37815===d||37816===d||37817===d||37818===d||37819===d||37820===d||37821===d)if(e=b.get(\"WEBGL_compressed_texture_astc\"),null!==e)return d;if(103===d||104===\nd){if(c.isWebGL2){if(103===d)return a.MIN;if(104===d)return a.MAX}e=b.get(\"EXT_blend_minmax\");if(null!==e){if(103===d)return e.MIN_EXT;if(104===d)return e.MAX_EXT}}if(1020===d){if(c.isWebGL2)return a.UNSIGNED_INT_24_8;e=b.get(\"WEBGL_depth_texture\");if(null!==e)return e.UNSIGNED_INT_24_8_WEBGL}return 0}}}function Kb(){D.call(this);this.type=\"Group\"}function Z(a,b,c,d){Na.call(this);this.type=\"PerspectiveCamera\";this.fov=void 0!==a?a:50;this.zoom=1;this.near=void 0!==c?c:.1;this.far=void 0!==d?d:2E3;\nthis.focus=10;this.aspect=void 0!==b?b:1;this.view=null;this.filmGauge=35;this.filmOffset=0;this.updateProjectionMatrix()}function yc(a){Z.call(this);this.cameras=a||[]}function af(a){function b(){return null!==e&&!0===e.isPresenting}function c(){if(b()){var c=e.getEyeParameters(\"left\"),f=c.renderWidth;c=c.renderHeight;x=a.getPixelRatio();y=a.getSize();a.setDrawingBufferSize(2*f,c,1);B.start()}else d.enabled&&(a.setDrawingBufferSize(y.width,y.height,x),B.stop())}var d=this,e=null,f=null,g=null,h=\n[],k=new I,m=new I;\"undefined\"!==typeof window&&\"VRFrameData\"in window&&(f=new window.VRFrameData,window.addEventListener(\"vrdisplaypresentchange\",c,!1));var q=new I,n=new fa,t=new p,u=new Z;u.bounds=new V(0,0,.5,1);u.layers.enable(1);var r=new Z;r.bounds=new V(.5,0,.5,1);r.layers.enable(2);var l=new yc([u,r]);l.layers.enable(1);l.layers.enable(2);var y,x,w=[];this.enabled=!1;this.userHeight=1.6;this.getController=function(a){var b=h[a];void 0===b&&(b=new Kb,b.matrixAutoUpdate=!1,b.visible=!1,h[a]=\nb);return b};this.getDevice=function(){return e};this.setDevice=function(a){void 0!==a&&(e=a);B.setContext(a)};this.setPoseTarget=function(a){void 0!==a&&(g=a)};this.getCamera=function(a){if(null===e)return a.position.set(0,d.userHeight,0),a;e.depthNear=a.near;e.depthFar=a.far;e.getFrameData(f);var b=e.stageParameters;b?k.fromArray(b.sittingToStandingTransform):k.makeTranslation(0,d.userHeight,0);b=f.pose;var c=null!==g?g:a;c.matrix.copy(k);c.matrix.decompose(c.position,c.quaternion,c.scale);null!==\nb.orientation&&(n.fromArray(b.orientation),c.quaternion.multiply(n));null!==b.position&&(n.setFromRotationMatrix(k),t.fromArray(b.position),t.applyQuaternion(n),c.position.add(t));c.updateMatrixWorld();if(!1===e.isPresenting)return a;u.near=a.near;r.near=a.near;u.far=a.far;r.far=a.far;l.matrixWorld.copy(a.matrixWorld);l.matrixWorldInverse.copy(a.matrixWorldInverse);u.matrixWorldInverse.fromArray(f.leftViewMatrix);r.matrixWorldInverse.fromArray(f.rightViewMatrix);m.getInverse(k);u.matrixWorldInverse.multiply(m);\nr.matrixWorldInverse.multiply(m);a=c.parent;null!==a&&(q.getInverse(a.matrixWorld),u.matrixWorldInverse.multiply(q),r.matrixWorldInverse.multiply(q));u.matrixWorld.getInverse(u.matrixWorldInverse);r.matrixWorld.getInverse(r.matrixWorldInverse);u.projectionMatrix.fromArray(f.leftProjectionMatrix);r.projectionMatrix.fromArray(f.rightProjectionMatrix);l.projectionMatrix.copy(u.projectionMatrix);a=e.getLayers();a.length&&(a=a[0],null!==a.leftBounds&&4===a.leftBounds.length&&u.bounds.fromArray(a.leftBounds),\nnull!==a.rightBounds&&4===a.rightBounds.length&&r.bounds.fromArray(a.rightBounds));a:for(a=0;a<h.length;a++){b=h[a];b:{c=a;for(var v=navigator.getGamepads&&navigator.getGamepads(),p=0,y=0,x=v.length;p<x;p++){var E=v[p];if(E&&(\"Daydream Controller\"===E.id||\"Gear VR Controller\"===E.id||\"Oculus Go Controller\"===E.id||\"OpenVR Gamepad\"===E.id||E.id.startsWith(\"Oculus Touch\")||E.id.startsWith(\"Spatial Controller\"))){if(y===c){c=E;break b}y++}}c=void 0}if(void 0!==c&&void 0!==c.pose){if(null===c.pose)break a;\nv=c.pose;!1===v.hasPosition&&b.position.set(.2,-.6,-.05);null!==v.position&&b.position.fromArray(v.position);null!==v.orientation&&b.quaternion.fromArray(v.orientation);b.matrix.compose(b.position,b.quaternion,b.scale);b.matrix.premultiply(k);b.matrix.decompose(b.position,b.quaternion,b.scale);b.matrixWorldNeedsUpdate=!0;b.visible=!0;v=\"Daydream Controller\"===c.id?0:1;w[a]!==c.buttons[v].pressed&&(w[a]=c.buttons[v].pressed,!0===w[a]?b.dispatchEvent({type:\"selectstart\"}):(b.dispatchEvent({type:\"selectend\"}),\nb.dispatchEvent({type:\"select\"})))}else b.visible=!1}return l};this.getStandingMatrix=function(){return k};this.isPresenting=b;var B=new Qd;this.setAnimationLoop=function(a){B.setAnimationLoop(a)};this.submitFrame=function(){b()&&e.submitFrame()};this.dispose=function(){\"undefined\"!==typeof window&&window.removeEventListener(\"vrdisplaypresentchange\",c)}}function Lg(a){function b(){return null!==h&&null!==k}function c(a){var b=q[n.indexOf(a.inputSource)];b&&b.dispatchEvent({type:a.type})}function d(){a.setFramebuffer(null);\np.stop()}function e(a,b){null===b?a.matrixWorld.copy(a.matrix):a.matrixWorld.multiplyMatrices(b.matrixWorld,a.matrix);a.matrixWorldInverse.getInverse(a.matrixWorld)}var f=a.context,g=null,h=null,k=null,m=null,q=[],n=[],t=new Z;t.layers.enable(1);t.viewport=new V;var u=new Z;u.layers.enable(2);u.viewport=new V;var r=new yc([t,u]);r.layers.enable(1);r.layers.enable(2);this.enabled=!1;this.getController=function(a){var b=q[a];void 0===b&&(b=new Kb,b.matrixAutoUpdate=!1,b.visible=!1,q[a]=b);return b};\nthis.getDevice=function(){return g};this.setDevice=function(a){void 0!==a&&(g=a);a instanceof XRDevice&&f.setCompatibleXRDevice(a)};this.setSession=function(b,e){h=b;null!==h&&(h.addEventListener(\"select\",c),h.addEventListener(\"selectstart\",c),h.addEventListener(\"selectend\",c),h.addEventListener(\"end\",d),h.baseLayer=new XRWebGLLayer(h,f),h.requestFrameOfReference(e.frameOfReferenceType).then(function(b){k=b;a.setFramebuffer(h.baseLayer.framebuffer);p.setContext(h);p.start()}),n=h.getInputSources(),\nh.addEventListener(\"inputsourceschange\",function(){n=h.getInputSources();console.log(n)}))};this.getCamera=function(a){if(b()){var c=a.parent,d=r.cameras;e(r,c);for(var f=0;f<d.length;f++)e(d[f],c);a.matrixWorld.copy(r.matrixWorld);a=a.children;f=0;for(c=a.length;f<c;f++)a[f].updateMatrixWorld(!0);return r}return a};this.isPresenting=b;var l=null,p=new Qd;p.setAnimationLoop(function(a,b){m=b.getDevicePose(k);if(null!==m)for(var c=h.baseLayer,d=b.views,e=0;e<d.length;e++){var f=d[e],g=c.getViewport(f),\nt=m.getViewMatrix(f),u=r.cameras[e];u.matrix.fromArray(t).getInverse(u.matrix);u.projectionMatrix.fromArray(f.projectionMatrix);u.viewport.set(g.x,g.y,g.width,g.height);0===e&&(r.matrix.copy(u.matrix),r.projectionMatrix.copy(u.projectionMatrix))}for(e=0;e<q.length;e++){c=q[e];if(d=n[e])if(d=b.getInputPose(d,k),null!==d){c.matrix.elements=d.pointerMatrix;c.matrix.decompose(c.position,c.rotation,c.scale);c.visible=!0;continue}c.visible=!1}l&&l(a)});this.setAnimationLoop=function(a){l=a};this.dispose=\nfunction(){};this.getStandingMatrix=function(){console.warn(\"THREE.WebXRManager: getStandingMatrix() is no longer needed.\");return new THREE.Matrix4};this.submitFrame=function(){}}function Zd(a){var b;function c(){ha=new Pf(F);ua=new Nf(F,ha,a);ua.isWebGL2||(ha.get(\"WEBGL_depth_texture\"),ha.get(\"OES_texture_float\"),ha.get(\"OES_texture_half_float\"),ha.get(\"OES_texture_half_float_linear\"),ha.get(\"OES_standard_derivatives\"),ha.get(\"OES_element_index_uint\"),ha.get(\"ANGLE_instanced_arrays\"));ha.get(\"OES_texture_float_linear\");\nda=new $e(F,ha,ua);ba=new Jg(F,ha,da,ua);ba.scissor(wc.copy(fa).multiplyScalar(U));ba.viewport(T.copy(od).multiplyScalar(U));ca=new Sf(F);Ba=new Ag;ia=new Kg(F,ha,ba,Ba,ua,da,ca);pa=new Ff(F);ra=new Qf(F,pa,ca);ma=new Vf(ra,ca);va=new Uf(F);la=new zg(C,ha,ua);sa=new Eg;na=new Ig;ka=new Lf(C,ba,ma,N);xa=new Mf(F,ha,ca,ua);ya=new Rf(F,ha,ca,ua);ca.programs=la.programs;C.context=F;C.capabilities=ua;C.extensions=ha;C.properties=Ba;C.renderLists=sa;C.state=ba;C.info=ca}function d(a){a.preventDefault();\nconsole.log(\"THREE.WebGLRenderer: Context Lost.\");G=!0}function e(){console.log(\"THREE.WebGLRenderer: Context Restored.\");G=!1;c()}function f(a){a=a.target;a.removeEventListener(\"dispose\",f);g(a);Ba.remove(a)}function g(a){var b=Ba.get(a).program;a.program=void 0;void 0!==b&&la.releaseProgram(b)}function h(a,b){a.render(function(a){C.renderBufferImmediate(a,b)})}function k(a,b,c){if(!1!==a.visible){if(a.layers.test(b.layers))if(a.isLight)D.pushLight(a),a.castShadow&&D.pushShadow(a);else if(a.isSprite){if(!a.frustumCulled||\noa.intersectsSprite(a)){c&&bb.setFromMatrixPosition(a.matrixWorld).applyMatrix4(xc);var d=ma.update(a),e=a.material;A.push(a,d,e,bb.z,null)}}else if(a.isImmediateRenderObject)c&&bb.setFromMatrixPosition(a.matrixWorld).applyMatrix4(xc),A.push(a,null,a.material,bb.z,null);else if(a.isMesh||a.isLine||a.isPoints)if(a.isSkinnedMesh&&a.skeleton.update(),!a.frustumCulled||oa.intersectsObject(a))if(c&&bb.setFromMatrixPosition(a.matrixWorld).applyMatrix4(xc),d=ma.update(a),e=a.material,Array.isArray(e))for(var f=\nd.groups,g=0,h=f.length;g<h;g++){var m=f[g],n=e[m.materialIndex];n&&n.visible&&A.push(a,d,n,bb.z,m)}else e.visible&&A.push(a,d,e,bb.z,null);a=a.children;g=0;for(h=a.length;g<h;g++)k(a[g],b,c)}}function m(a,b,c,d){for(var e=0,f=a.length;e<f;e++){var g=a[e],h=g.object,k=g.geometry,m=void 0===d?g.material:d;g=g.group;if(c.isArrayCamera){W=c;for(var n=c.cameras,t=0,u=n.length;t<u;t++){var l=n[t];if(h.layers.test(l.layers)){if(\"viewport\"in l)ba.viewport(T.copy(l.viewport));else{var r=l.bounds;ba.viewport(T.set(r.x*\nZ,r.y*M,r.z*Z,r.w*M).multiplyScalar(U))}q(h,b,l,k,m,g)}}}else W=null,q(h,b,c,k,m,g)}}function q(a,c,d,e,f,g){a.onBeforeRender(C,c,d,e,f,g);D=na.get(c,W||d);a.modelViewMatrix.multiplyMatrices(d.matrixWorldInverse,a.matrixWorld);a.normalMatrix.getNormalMatrix(a.modelViewMatrix);if(a.isImmediateRenderObject){ba.setMaterial(f);var k=t(d,c.fog,f,a);S=b=null;nd=!1;h(a,k)}else C.renderBufferDirect(d,c.fog,e,f,a,g);a.onAfterRender(C,c,d,e,f,g);D=na.get(c,W||d)}function n(a,b,c){var d=Ba.get(a),e=D.state.lights,\nh=d.lightsHash,k=e.state.hash;c=la.getParameters(a,e.state,D.state.shadowsArray,b,aa.numPlanes,aa.numIntersection,c);var m=la.getProgramCode(a,c),n=d.program,q=!0;if(void 0===n)a.addEventListener(\"dispose\",f);else if(n.code!==m)g(a);else{if(h.stateID!==k.stateID||h.directionalLength!==k.directionalLength||h.pointLength!==k.pointLength||h.spotLength!==k.spotLength||h.rectAreaLength!==k.rectAreaLength||h.hemiLength!==k.hemiLength||h.shadowsLength!==k.shadowsLength)h.stateID=k.stateID,h.directionalLength=\nk.directionalLength,h.pointLength=k.pointLength,h.spotLength=k.spotLength,h.rectAreaLength=k.rectAreaLength,h.hemiLength=k.hemiLength,h.shadowsLength=k.shadowsLength;else if(void 0!==c.shaderID)return;q=!1}q&&(c.shaderID?(m=nb[c.shaderID],d.shader={name:a.type,uniforms:Aa.clone(m.uniforms),vertexShader:m.vertexShader,fragmentShader:m.fragmentShader}):d.shader={name:a.type,uniforms:a.uniforms,vertexShader:a.vertexShader,fragmentShader:a.fragmentShader},a.onBeforeCompile(d.shader,C),m=la.getProgramCode(a,\nc),n=la.acquireProgram(a,d.shader,c,m),d.program=n,a.program=n);c=n.getAttributes();if(a.morphTargets)for(m=a.numSupportedMorphTargets=0;m<C.maxMorphTargets;m++)0<=c[\"morphTarget\"+m]&&a.numSupportedMorphTargets++;if(a.morphNormals)for(m=a.numSupportedMorphNormals=0;m<C.maxMorphNormals;m++)0<=c[\"morphNormal\"+m]&&a.numSupportedMorphNormals++;c=d.shader.uniforms;if(!a.isShaderMaterial&&!a.isRawShaderMaterial||!0===a.clipping)d.numClippingPlanes=aa.numPlanes,d.numIntersection=aa.numIntersection,c.clippingPlanes=\naa.uniform;d.fog=b;void 0===h&&(d.lightsHash=h={});h.stateID=k.stateID;h.directionalLength=k.directionalLength;h.pointLength=k.pointLength;h.spotLength=k.spotLength;h.rectAreaLength=k.rectAreaLength;h.hemiLength=k.hemiLength;h.shadowsLength=k.shadowsLength;a.lights&&(c.ambientLightColor.value=e.state.ambient,c.directionalLights.value=e.state.directional,c.spotLights.value=e.state.spot,c.rectAreaLights.value=e.state.rectArea,c.pointLights.value=e.state.point,c.hemisphereLights.value=e.state.hemi,c.directionalShadowMap.value=\ne.state.directionalShadowMap,c.directionalShadowMatrix.value=e.state.directionalShadowMatrix,c.spotShadowMap.value=e.state.spotShadowMap,c.spotShadowMatrix.value=e.state.spotShadowMatrix,c.pointShadowMap.value=e.state.pointShadowMap,c.pointShadowMatrix.value=e.state.pointShadowMatrix);a=d.program.getUniforms();a=Za.seqWithValue(a.seq,c);d.uniformsList=a}function t(a,b,c,d){X=0;var e=Ba.get(c),f=e.lightsHash,g=D.state.lights.state.hash;pd&&(Yd||a!==Y)&&aa.setState(c.clippingPlanes,c.clipIntersection,\nc.clipShadows,a,e,a===Y&&c.id===J);!1===c.needsUpdate&&(void 0===e.program?c.needsUpdate=!0:c.fog&&e.fog!==b?c.needsUpdate=!0:!c.lights||f.stateID===g.stateID&&f.directionalLength===g.directionalLength&&f.pointLength===g.pointLength&&f.spotLength===g.spotLength&&f.rectAreaLength===g.rectAreaLength&&f.hemiLength===g.hemiLength&&f.shadowsLength===g.shadowsLength?void 0===e.numClippingPlanes||e.numClippingPlanes===aa.numPlanes&&e.numIntersection===aa.numIntersection||(c.needsUpdate=!0):c.needsUpdate=\n!0);c.needsUpdate&&(n(c,b,d),c.needsUpdate=!1);var h=!1,k=!1,m=!1;f=e.program;g=f.getUniforms();var q=e.shader.uniforms;ba.useProgram(f.program)&&(m=k=h=!0);c.id!==J&&(J=c.id,k=!0);if(h||a!==Y){g.setValue(F,\"projectionMatrix\",a.projectionMatrix);ua.logarithmicDepthBuffer&&g.setValue(F,\"logDepthBufFC\",2/(Math.log(a.far+1)/Math.LN2));Y!==(W||a)&&(Y=W||a,m=k=!0);if(c.isShaderMaterial||c.isMeshPhongMaterial||c.isMeshStandardMaterial||c.envMap)h=g.map.cameraPosition,void 0!==h&&h.setValue(F,bb.setFromMatrixPosition(a.matrixWorld));\n(c.isMeshPhongMaterial||c.isMeshLambertMaterial||c.isMeshBasicMaterial||c.isMeshStandardMaterial||c.isShaderMaterial||c.skinning)&&g.setValue(F,\"viewMatrix\",a.matrixWorldInverse)}if(c.skinning&&(g.setOptional(F,d,\"bindMatrix\"),g.setOptional(F,d,\"bindMatrixInverse\"),a=d.skeleton))if(h=a.bones,ua.floatVertexTextures){if(void 0===a.boneTexture){h=Math.sqrt(4*h.length);h=H.ceilPowerOfTwo(h);h=Math.max(h,4);var t=new Float32Array(h*h*4);t.set(a.boneMatrices);var v=new gb(t,h,h,1023,1015);v.needsUpdate=\n!0;a.boneMatrices=t;a.boneTexture=v;a.boneTextureSize=h}g.setValue(F,\"boneTexture\",a.boneTexture);g.setValue(F,\"boneTextureSize\",a.boneTextureSize)}else g.setOptional(F,a,\"boneMatrices\");k&&(g.setValue(F,\"toneMappingExposure\",C.toneMappingExposure),g.setValue(F,\"toneMappingWhitePoint\",C.toneMappingWhitePoint),c.lights&&(k=m,q.ambientLightColor.needsUpdate=k,q.directionalLights.needsUpdate=k,q.pointLights.needsUpdate=k,q.spotLights.needsUpdate=k,q.rectAreaLights.needsUpdate=k,q.hemisphereLights.needsUpdate=\nk),b&&c.fog&&(q.fogColor.value=b.color,b.isFog?(q.fogNear.value=b.near,q.fogFar.value=b.far):b.isFogExp2&&(q.fogDensity.value=b.density)),c.isMeshBasicMaterial?u(q,c):c.isMeshLambertMaterial?(u(q,c),c.emissiveMap&&(q.emissiveMap.value=c.emissiveMap)):c.isMeshPhongMaterial?(u(q,c),c.isMeshToonMaterial?(r(q,c),c.gradientMap&&(q.gradientMap.value=c.gradientMap)):r(q,c)):c.isMeshStandardMaterial?(u(q,c),c.isMeshPhysicalMaterial?(l(q,c),q.reflectivity.value=c.reflectivity,q.clearCoat.value=c.clearCoat,\nq.clearCoatRoughness.value=c.clearCoatRoughness):l(q,c)):c.isMeshDepthMaterial?(u(q,c),c.displacementMap&&(q.displacementMap.value=c.displacementMap,q.displacementScale.value=c.displacementScale,q.displacementBias.value=c.displacementBias)):c.isMeshDistanceMaterial?(u(q,c),c.displacementMap&&(q.displacementMap.value=c.displacementMap,q.displacementScale.value=c.displacementScale,q.displacementBias.value=c.displacementBias),q.referencePosition.value.copy(c.referencePosition),q.nearDistance.value=c.nearDistance,\nq.farDistance.value=c.farDistance):c.isMeshNormalMaterial?(u(q,c),c.bumpMap&&(q.bumpMap.value=c.bumpMap,q.bumpScale.value=c.bumpScale,1===c.side&&(q.bumpScale.value*=-1)),c.normalMap&&(q.normalMap.value=c.normalMap,q.normalScale.value.copy(c.normalScale),1===c.side&&q.normalScale.value.negate()),c.displacementMap&&(q.displacementMap.value=c.displacementMap,q.displacementScale.value=c.displacementScale,q.displacementBias.value=c.displacementBias)):c.isLineBasicMaterial?(q.diffuse.value=c.color,q.opacity.value=\nc.opacity,c.isLineDashedMaterial&&(q.dashSize.value=c.dashSize,q.totalSize.value=c.dashSize+c.gapSize,q.scale.value=c.scale)):c.isPointsMaterial?(q.diffuse.value=c.color,q.opacity.value=c.opacity,q.size.value=c.size*U,q.scale.value=.5*M,q.map.value=c.map,null!==c.map&&(!0===c.map.matrixAutoUpdate&&c.map.updateMatrix(),q.uvTransform.value.copy(c.map.matrix))):c.isSpriteMaterial?(q.diffuse.value=c.color,q.opacity.value=c.opacity,q.rotation.value=c.rotation,q.map.value=c.map,null!==c.map&&(!0===c.map.matrixAutoUpdate&&\nc.map.updateMatrix(),q.uvTransform.value.copy(c.map.matrix))):c.isShadowMaterial&&(q.color.value=c.color,q.opacity.value=c.opacity),void 0!==q.ltc_1&&(q.ltc_1.value=K.LTC_1),void 0!==q.ltc_2&&(q.ltc_2.value=K.LTC_2),Za.upload(F,e.uniformsList,q,C));c.isShaderMaterial&&!0===c.uniformsNeedUpdate&&(Za.upload(F,e.uniformsList,q,C),c.uniformsNeedUpdate=!1);c.isSpriteMaterial&&g.setValue(F,\"center\",d.center);g.setValue(F,\"modelViewMatrix\",d.modelViewMatrix);g.setValue(F,\"normalMatrix\",d.normalMatrix);g.setValue(F,\n\"modelMatrix\",d.matrixWorld);return f}function u(a,b){a.opacity.value=b.opacity;b.color&&(a.diffuse.value=b.color);b.emissive&&a.emissive.value.copy(b.emissive).multiplyScalar(b.emissiveIntensity);b.map&&(a.map.value=b.map);b.alphaMap&&(a.alphaMap.value=b.alphaMap);b.specularMap&&(a.specularMap.value=b.specularMap);b.envMap&&(a.envMap.value=b.envMap,a.flipEnvMap.value=b.envMap&&b.envMap.isCubeTexture?-1:1,a.reflectivity.value=b.reflectivity,a.refractionRatio.value=b.refractionRatio,a.maxMipLevel.value=\nBa.get(b.envMap).__maxMipLevel);b.lightMap&&(a.lightMap.value=b.lightMap,a.lightMapIntensity.value=b.lightMapIntensity);b.aoMap&&(a.aoMap.value=b.aoMap,a.aoMapIntensity.value=b.aoMapIntensity);if(b.map)var c=b.map;else b.specularMap?c=b.specularMap:b.displacementMap?c=b.displacementMap:b.normalMap?c=b.normalMap:b.bumpMap?c=b.bumpMap:b.roughnessMap?c=b.roughnessMap:b.metalnessMap?c=b.metalnessMap:b.alphaMap?c=b.alphaMap:b.emissiveMap&&(c=b.emissiveMap);void 0!==c&&(c.isWebGLRenderTarget&&(c=c.texture),\n!0===c.matrixAutoUpdate&&c.updateMatrix(),a.uvTransform.value.copy(c.matrix))}function r(a,b){a.specular.value=b.specular;a.shininess.value=Math.max(b.shininess,1E-4);b.emissiveMap&&(a.emissiveMap.value=b.emissiveMap);b.bumpMap&&(a.bumpMap.value=b.bumpMap,a.bumpScale.value=b.bumpScale,1===b.side&&(a.bumpScale.value*=-1));b.normalMap&&(a.normalMap.value=b.normalMap,a.normalScale.value.copy(b.normalScale),1===b.side&&a.normalScale.value.negate());b.displacementMap&&(a.displacementMap.value=b.displacementMap,\na.displacementScale.value=b.displacementScale,a.displacementBias.value=b.displacementBias)}function l(a,b){a.roughness.value=b.roughness;a.metalness.value=b.metalness;b.roughnessMap&&(a.roughnessMap.value=b.roughnessMap);b.metalnessMap&&(a.metalnessMap.value=b.metalnessMap);b.emissiveMap&&(a.emissiveMap.value=b.emissiveMap);b.bumpMap&&(a.bumpMap.value=b.bumpMap,a.bumpScale.value=b.bumpScale,1===b.side&&(a.bumpScale.value*=-1));b.normalMap&&(a.normalMap.value=b.normalMap,a.normalScale.value.copy(b.normalScale),\n1===b.side&&a.normalScale.value.negate());b.displacementMap&&(a.displacementMap.value=b.displacementMap,a.displacementScale.value=b.displacementScale,a.displacementBias.value=b.displacementBias);b.envMap&&(a.envMapIntensity.value=b.envMapIntensity)}console.log(\"THREE.WebGLRenderer\",\"95\");a=a||{};var y=void 0!==a.canvas?a.canvas:document.createElementNS(\"http://www.w3.org/1999/xhtml\",\"canvas\"),x=void 0!==a.context?a.context:null,w=void 0!==a.alpha?a.alpha:!1,B=void 0!==a.depth?a.depth:!0,E=void 0!==\na.stencil?a.stencil:!0,P=void 0!==a.antialias?a.antialias:!1,N=void 0!==a.premultipliedAlpha?a.premultipliedAlpha:!0,O=void 0!==a.preserveDrawingBuffer?a.preserveDrawingBuffer:!1,z=void 0!==a.powerPreference?a.powerPreference:\"default\",A=null,D=null;this.domElement=y;this.context=null;this.sortObjects=this.autoClearStencil=this.autoClearDepth=this.autoClearColor=this.autoClear=!0;this.clippingPlanes=[];this.localClippingEnabled=!1;this.gammaFactor=2;this.physicallyCorrectLights=this.gammaOutput=this.gammaInput=\n!1;this.toneMappingWhitePoint=this.toneMappingExposure=this.toneMapping=1;this.maxMorphTargets=8;this.maxMorphNormals=4;var C=this,G=!1,L=null,R=null,Q=null,J=-1;var S=b=null;var nd=!1;var Y=null,W=null,T=new V,wc=new V,ea=null,X=0,Z=y.width,M=y.height,U=1,od=new V(0,0,Z,M),fa=new V(0,0,Z,M),qa=!1,oa=new md,aa=new Of,pd=!1,Yd=!1,xc=new I,bb=new p;try{w={alpha:w,depth:B,stencil:E,antialias:P,premultipliedAlpha:N,preserveDrawingBuffer:O,powerPreference:z};y.addEventListener(\"webglcontextlost\",d,!1);\ny.addEventListener(\"webglcontextrestored\",e,!1);var F=x||y.getContext(\"webgl\",w)||y.getContext(\"experimental-webgl\",w);if(null===F){if(null!==y.getContext(\"webgl\"))throw Error(\"Error creating WebGL context with your selected attributes.\");throw Error(\"Error creating WebGL context.\");}void 0===F.getShaderPrecisionFormat&&(F.getShaderPrecisionFormat=function(){return{rangeMin:1,rangeMax:1,precision:1}})}catch(Mg){console.error(\"THREE.WebGLRenderer: \"+Mg.message)}var ha,ua,ba,ca,Ba,ia,pa,ra,ma,la,sa,\nna,ka,va,xa,ya,da;c();var ja=\"xr\"in navigator?new Lg(C):new af(C);this.vr=ja;var za=new Ze(C,ma,ua.maxTextureSize);this.shadowMap=za;this.getContext=function(){return F};this.getContextAttributes=function(){return F.getContextAttributes()};this.forceContextLoss=function(){var a=ha.get(\"WEBGL_lose_context\");a&&a.loseContext()};this.forceContextRestore=function(){var a=ha.get(\"WEBGL_lose_context\");a&&a.restoreContext()};this.getPixelRatio=function(){return U};this.setPixelRatio=function(a){void 0!==\na&&(U=a,this.setSize(Z,M,!1))};this.getSize=function(){return{width:Z,height:M}};this.setSize=function(a,b,c){ja.isPresenting()?console.warn(\"THREE.WebGLRenderer: Can't change size while VR device is presenting.\"):(Z=a,M=b,y.width=a*U,y.height=b*U,!1!==c&&(y.style.width=a+\"px\",y.style.height=b+\"px\"),this.setViewport(0,0,a,b))};this.getDrawingBufferSize=function(){return{width:Z*U,height:M*U}};this.setDrawingBufferSize=function(a,b,c){Z=a;M=b;U=c;y.width=a*c;y.height=b*c;this.setViewport(0,0,a,b)};\nthis.getCurrentViewport=function(){return T};this.setViewport=function(a,b,c,d){od.set(a,M-b-d,c,d);ba.viewport(T.copy(od).multiplyScalar(U))};this.setScissor=function(a,b,c,d){fa.set(a,M-b-d,c,d);ba.scissor(wc.copy(fa).multiplyScalar(U))};this.setScissorTest=function(a){ba.setScissorTest(qa=a)};this.getClearColor=function(){return ka.getClearColor()};this.setClearColor=function(){ka.setClearColor.apply(ka,arguments)};this.getClearAlpha=function(){return ka.getClearAlpha()};this.setClearAlpha=function(){ka.setClearAlpha.apply(ka,\narguments)};this.clear=function(a,b,c){var d=0;if(void 0===a||a)d|=F.COLOR_BUFFER_BIT;if(void 0===b||b)d|=F.DEPTH_BUFFER_BIT;if(void 0===c||c)d|=F.STENCIL_BUFFER_BIT;F.clear(d)};this.clearColor=function(){this.clear(!0,!1,!1)};this.clearDepth=function(){this.clear(!1,!0,!1)};this.clearStencil=function(){this.clear(!1,!1,!0)};this.clearTarget=function(a,b,c,d){this.setRenderTarget(a);this.clear(b,c,d)};this.dispose=function(){y.removeEventListener(\"webglcontextlost\",d,!1);y.removeEventListener(\"webglcontextrestored\",\ne,!1);sa.dispose();na.dispose();Ba.dispose();ma.dispose();ja.dispose();ta.stop()};this.renderBufferImmediate=function(a,b){ba.initAttributes();var c=Ba.get(a);a.hasPositions&&!c.position&&(c.position=F.createBuffer());a.hasNormals&&!c.normal&&(c.normal=F.createBuffer());a.hasUvs&&!c.uv&&(c.uv=F.createBuffer());a.hasColors&&!c.color&&(c.color=F.createBuffer());b=b.getAttributes();a.hasPositions&&(F.bindBuffer(F.ARRAY_BUFFER,c.position),F.bufferData(F.ARRAY_BUFFER,a.positionArray,F.DYNAMIC_DRAW),ba.enableAttribute(b.position),\nF.vertexAttribPointer(b.position,3,F.FLOAT,!1,0,0));a.hasNormals&&(F.bindBuffer(F.ARRAY_BUFFER,c.normal),F.bufferData(F.ARRAY_BUFFER,a.normalArray,F.DYNAMIC_DRAW),ba.enableAttribute(b.normal),F.vertexAttribPointer(b.normal,3,F.FLOAT,!1,0,0));a.hasUvs&&(F.bindBuffer(F.ARRAY_BUFFER,c.uv),F.bufferData(F.ARRAY_BUFFER,a.uvArray,F.DYNAMIC_DRAW),ba.enableAttribute(b.uv),F.vertexAttribPointer(b.uv,2,F.FLOAT,!1,0,0));a.hasColors&&(F.bindBuffer(F.ARRAY_BUFFER,c.color),F.bufferData(F.ARRAY_BUFFER,a.colorArray,\nF.DYNAMIC_DRAW),ba.enableAttribute(b.color),F.vertexAttribPointer(b.color,3,F.FLOAT,!1,0,0));ba.disableUnusedAttributes();F.drawArrays(F.TRIANGLES,0,a.count);a.count=0};this.renderBufferDirect=function(a,c,d,e,f,g){var h=f.isMesh&&0>f.normalMatrix.determinant();ba.setMaterial(e,h);var k=t(a,c,e,f),m=!1;if(b!==d.id||S!==k.id||nd!==(!0===e.wireframe))b=d.id,S=k.id,nd=!0===e.wireframe,m=!0;f.morphTargetInfluences&&(va.update(f,d,e,k),m=!0);h=d.index;var q=d.attributes.position;c=1;!0===e.wireframe&&\n(h=ra.getWireframeAttribute(d),c=2);a=xa;if(null!==h){var n=pa.get(h);a=ya;a.setIndex(n)}if(m){if(d&&d.isInstancedBufferGeometry&!ua.isWebGL2&&null===ha.get(\"ANGLE_instanced_arrays\"))console.error(\"THREE.WebGLRenderer.setupVertexAttributes: using THREE.InstancedBufferGeometry but hardware does not support extension ANGLE_instanced_arrays.\");else{ba.initAttributes();m=d.attributes;k=k.getAttributes();var u=e.defaultAttributeValues;for(N in k){var l=k[N];if(0<=l){var r=m[N];if(void 0!==r){var v=r.normalized,\np=r.itemSize,w=pa.get(r);if(void 0!==w){var y=w.buffer,E=w.type;w=w.bytesPerElement;if(r.isInterleavedBufferAttribute){var x=r.data,B=x.stride;r=r.offset;x&&x.isInstancedInterleavedBuffer?(ba.enableAttributeAndDivisor(l,x.meshPerAttribute),void 0===d.maxInstancedCount&&(d.maxInstancedCount=x.meshPerAttribute*x.count)):ba.enableAttribute(l);F.bindBuffer(F.ARRAY_BUFFER,y);F.vertexAttribPointer(l,p,E,v,B*w,r*w)}else r.isInstancedBufferAttribute?(ba.enableAttributeAndDivisor(l,r.meshPerAttribute),void 0===\nd.maxInstancedCount&&(d.maxInstancedCount=r.meshPerAttribute*r.count)):ba.enableAttribute(l),F.bindBuffer(F.ARRAY_BUFFER,y),F.vertexAttribPointer(l,p,E,v,0,0)}}else if(void 0!==u&&(v=u[N],void 0!==v))switch(v.length){case 2:F.vertexAttrib2fv(l,v);break;case 3:F.vertexAttrib3fv(l,v);break;case 4:F.vertexAttrib4fv(l,v);break;default:F.vertexAttrib1fv(l,v)}}}ba.disableUnusedAttributes()}null!==h&&F.bindBuffer(F.ELEMENT_ARRAY_BUFFER,n.buffer)}n=Infinity;null!==h?n=h.count:void 0!==q&&(n=q.count);h=d.drawRange.start*\nc;q=null!==g?g.start*c:0;var N=Math.max(h,q);g=Math.max(0,Math.min(n,h+d.drawRange.count*c,q+(null!==g?g.count*c:Infinity))-1-N+1);if(0!==g){if(f.isMesh)if(!0===e.wireframe)ba.setLineWidth(e.wireframeLinewidth*(null===R?U:1)),a.setMode(F.LINES);else switch(f.drawMode){case 0:a.setMode(F.TRIANGLES);break;case 1:a.setMode(F.TRIANGLE_STRIP);break;case 2:a.setMode(F.TRIANGLE_FAN)}else f.isLine?(e=e.linewidth,void 0===e&&(e=1),ba.setLineWidth(e*(null===R?U:1)),f.isLineSegments?a.setMode(F.LINES):f.isLineLoop?\na.setMode(F.LINE_LOOP):a.setMode(F.LINE_STRIP)):f.isPoints?a.setMode(F.POINTS):f.isSprite&&a.setMode(F.TRIANGLES);d&&d.isInstancedBufferGeometry?0<d.maxInstancedCount&&a.renderInstances(d,N,g):a.render(N,g)}};this.compile=function(a,b){D=na.get(a,b);D.init();a.traverse(function(a){a.isLight&&(D.pushLight(a),a.castShadow&&D.pushShadow(a))});D.setupLights(b);a.traverse(function(b){if(b.material)if(Array.isArray(b.material))for(var c=0;c<b.material.length;c++)n(b.material[c],a.fog,b);else n(b.material,\na.fog,b)})};var wa=null,ta=new Qd;ta.setAnimationLoop(function(a){ja.isPresenting()||wa&&wa(a)});\"undefined\"!==typeof window&&ta.setContext(window);this.setAnimationLoop=function(a){wa=a;ja.setAnimationLoop(a);ta.start()};this.render=function(a,c,d,e){if(!c||!c.isCamera)console.error(\"THREE.WebGLRenderer.render: camera is not an instance of THREE.Camera.\");else if(!G){S=b=null;nd=!1;J=-1;Y=null;!0===a.autoUpdate&&a.updateMatrixWorld();null===c.parent&&c.updateMatrixWorld();ja.enabled&&(c=ja.getCamera(c));\nD=na.get(a,c);D.init();a.onBeforeRender(C,a,c,d);xc.multiplyMatrices(c.projectionMatrix,c.matrixWorldInverse);oa.setFromMatrix(xc);Yd=this.localClippingEnabled;pd=aa.init(this.clippingPlanes,Yd,c);A=sa.get(a,c);A.init();k(a,c,C.sortObjects);!0===C.sortObjects&&A.sort();pd&&aa.beginShadows();za.render(D.state.shadowsArray,a,c);D.setupLights(c);pd&&aa.endShadows();this.info.autoReset&&this.info.reset();void 0===d&&(d=null);this.setRenderTarget(d);ka.render(A,a,c,e);e=A.opaque;var f=A.transparent;if(a.overrideMaterial){var g=\na.overrideMaterial;e.length&&m(e,a,c,g);f.length&&m(f,a,c,g)}else e.length&&m(e,a,c),f.length&&m(f,a,c);d&&ia.updateRenderTargetMipmap(d);ba.buffers.depth.setTest(!0);ba.buffers.depth.setMask(!0);ba.buffers.color.setMask(!0);ba.setPolygonOffset(!1);a.onAfterRender(C,a,c);ja.enabled&&ja.submitFrame();D=A=null}};this.allocTextureUnit=function(){var a=X;a>=ua.maxTextures&&console.warn(\"THREE.WebGLRenderer: Trying to use \"+a+\" texture units while this GPU supports only \"+ua.maxTextures);X+=1;return a};\nthis.setTexture2D=function(){var a=!1;return function(b,c){b&&b.isWebGLRenderTarget&&(a||(console.warn(\"THREE.WebGLRenderer.setTexture2D: don't use render targets as textures. Use their .texture property instead.\"),a=!0),b=b.texture);ia.setTexture2D(b,c)}}();this.setTexture=function(){var a=!1;return function(b,c){a||(console.warn(\"THREE.WebGLRenderer: .setTexture is deprecated, use setTexture2D instead.\"),a=!0);ia.setTexture2D(b,c)}}();this.setTextureCube=function(){var a=!1;return function(b,c){b&&\nb.isWebGLRenderTargetCube&&(a||(console.warn(\"THREE.WebGLRenderer.setTextureCube: don't use cube render targets as textures. Use their .texture property instead.\"),a=!0),b=b.texture);b&&b.isCubeTexture||Array.isArray(b.image)&&6===b.image.length?ia.setTextureCube(b,c):ia.setTextureCubeDynamic(b,c)}}();this.setFramebuffer=function(a){L=a};this.getRenderTarget=function(){return R};this.setRenderTarget=function(a){(R=a)&&void 0===Ba.get(a).__webglFramebuffer&&ia.setupRenderTarget(a);var b=L,c=!1;a?(b=\nBa.get(a).__webglFramebuffer,a.isWebGLRenderTargetCube&&(b=b[a.activeCubeFace],c=!0),T.copy(a.viewport),wc.copy(a.scissor),ea=a.scissorTest):(T.copy(od).multiplyScalar(U),wc.copy(fa).multiplyScalar(U),ea=qa);Q!==b&&(F.bindFramebuffer(F.FRAMEBUFFER,b),Q=b);ba.viewport(T);ba.scissor(wc);ba.setScissorTest(ea);c&&(c=Ba.get(a.texture),F.framebufferTexture2D(F.FRAMEBUFFER,F.COLOR_ATTACHMENT0,F.TEXTURE_CUBE_MAP_POSITIVE_X+a.activeCubeFace,c.__webglTexture,a.activeMipMapLevel))};this.readRenderTargetPixels=\nfunction(a,b,c,d,e,f){if(a&&a.isWebGLRenderTarget){var g=Ba.get(a).__webglFramebuffer;if(g){var h=!1;g!==Q&&(F.bindFramebuffer(F.FRAMEBUFFER,g),h=!0);try{var k=a.texture,m=k.format,q=k.type;1023!==m&&da.convert(m)!==F.getParameter(F.IMPLEMENTATION_COLOR_READ_FORMAT)?console.error(\"THREE.WebGLRenderer.readRenderTargetPixels: renderTarget is not in RGBA or implementation defined format.\"):1009===q||da.convert(q)===F.getParameter(F.IMPLEMENTATION_COLOR_READ_TYPE)||1015===q&&(ua.isWebGL2||ha.get(\"OES_texture_float\")||\nha.get(\"WEBGL_color_buffer_float\"))||1016===q&&(ua.isWebGL2?ha.get(\"EXT_color_buffer_float\"):ha.get(\"EXT_color_buffer_half_float\"))?F.checkFramebufferStatus(F.FRAMEBUFFER)===F.FRAMEBUFFER_COMPLETE?0<=b&&b<=a.width-d&&0<=c&&c<=a.height-e&&F.readPixels(b,c,d,e,da.convert(m),da.convert(q),f):console.error(\"THREE.WebGLRenderer.readRenderTargetPixels: readPixels from renderTarget failed. Framebuffer not complete.\"):console.error(\"THREE.WebGLRenderer.readRenderTargetPixels: renderTarget is not in UnsignedByteType or implementation defined type.\")}finally{h&&\nF.bindFramebuffer(F.FRAMEBUFFER,Q)}}}else console.error(\"THREE.WebGLRenderer.readRenderTargetPixels: renderTarget is not THREE.WebGLRenderTarget.\")};this.copyFramebufferToTexture=function(a,b,c){var d=b.image.width,e=b.image.height,f=da.convert(b.format);this.setTexture2D(b,0);F.copyTexImage2D(F.TEXTURE_2D,c||0,f,a.x,a.y,d,e,0)};this.copyTextureToTexture=function(a,b,c,d){var e=b.image.width,f=b.image.height,g=da.convert(c.format),h=da.convert(c.type);this.setTexture2D(c,0);b.isDataTexture?F.texSubImage2D(F.TEXTURE_2D,\nd||0,a.x,a.y,e,f,g,h,b.image.data):F.texSubImage2D(F.TEXTURE_2D,d||0,a.x,a.y,g,h,b.image)}}function Lb(a,b){this.name=\"\";this.color=new G(a);this.density=void 0!==b?b:2.5E-4}function Mb(a,b,c){this.name=\"\";this.color=new G(a);this.near=void 0!==b?b:1;this.far=void 0!==c?c:1E3}function qd(){D.call(this);this.type=\"Scene\";this.overrideMaterial=this.fog=this.background=null;this.autoUpdate=!0}function ob(a,b){this.array=a;this.stride=b;this.count=void 0!==a?a.length/b:0;this.dynamic=!1;this.updateRange=\n{offset:0,count:-1};this.version=0}function zc(a,b,c,d){this.data=a;this.itemSize=b;this.offset=c;this.normalized=!0===d}function cb(a){J.call(this);this.type=\"SpriteMaterial\";this.color=new G(16777215);this.map=null;this.rotation=0;this.lights=!1;this.transparent=!0;this.setValues(a)}function Ac(a){D.call(this);this.type=\"Sprite\";if(void 0===Nb){Nb=new C;var b=new Float32Array([-.5,-.5,0,0,0,.5,-.5,0,1,0,.5,.5,0,1,1,-.5,.5,0,0,1]);b=new ob(b,5);Nb.setIndex([0,1,2,0,2,3]);Nb.addAttribute(\"position\",\nnew zc(b,3,0,!1));Nb.addAttribute(\"uv\",new zc(b,2,3,!1))}this.geometry=Nb;this.material=void 0!==a?a:new cb;this.center=new z(.5,.5)}function Bc(){D.call(this);this.type=\"LOD\";Object.defineProperties(this,{levels:{enumerable:!0,value:[]}})}function Cc(a,b){a=a||[];this.bones=a.slice(0);this.boneMatrices=new Float32Array(16*this.bones.length);if(void 0===b)this.calculateInverses();else if(this.bones.length===b.length)this.boneInverses=b.slice(0);else for(console.warn(\"THREE.Skeleton boneInverses is the wrong length.\"),\nthis.boneInverses=[],a=0,b=this.bones.length;a<b;a++)this.boneInverses.push(new I)}function rd(){D.call(this);this.type=\"Bone\"}function sd(a,b){la.call(this,a,b);this.type=\"SkinnedMesh\";this.bindMode=\"attached\";this.bindMatrix=new I;this.bindMatrixInverse=new I;a=this.initBones();a=new Cc(a);this.bind(a,this.matrixWorld);this.normalizeSkinWeights()}function Y(a){J.call(this);this.type=\"LineBasicMaterial\";this.color=new G(16777215);this.linewidth=1;this.linejoin=this.linecap=\"round\";this.lights=!1;\nthis.setValues(a)}function sa(a,b,c){1===c&&console.error(\"THREE.Line: parameter THREE.LinePieces no longer supported. Use THREE.LineSegments instead.\");D.call(this);this.type=\"Line\";this.geometry=void 0!==a?a:new C;this.material=void 0!==b?b:new Y({color:16777215*Math.random()})}function W(a,b){sa.call(this,a,b);this.type=\"LineSegments\"}function td(a,b){sa.call(this,a,b);this.type=\"LineLoop\"}function Ea(a){J.call(this);this.type=\"PointsMaterial\";this.color=new G(16777215);this.map=null;this.size=\n1;this.sizeAttenuation=!0;this.lights=this.morphTargets=!1;this.setValues(a)}function Ob(a,b){D.call(this);this.type=\"Points\";this.geometry=void 0!==a?a:new C;this.material=void 0!==b?b:new Ea({color:16777215*Math.random()})}function $d(a,b,c,d,e,f,g,h,k){T.call(this,a,b,c,d,e,f,g,h,k);this.generateMipmaps=!1}function Pb(a,b,c,d,e,f,g,h,k,m,q,n){T.call(this,null,f,g,h,k,m,d,e,q,n);this.image={width:b,height:c};this.mipmaps=a;this.generateMipmaps=this.flipY=!1}function Dc(a,b,c,d,e,f,g,h,k){T.call(this,\na,b,c,d,e,f,g,h,k);this.needsUpdate=!0}function Ec(a,b,c,d,e,f,g,h,k,m){m=void 0!==m?m:1026;if(1026!==m&&1027!==m)throw Error(\"DepthTexture format must be either THREE.DepthFormat or THREE.DepthStencilFormat\");void 0===c&&1026===m&&(c=1012);void 0===c&&1027===m&&(c=1020);T.call(this,null,d,e,f,g,h,m,c,k);this.image={width:a,height:b};this.magFilter=void 0!==g?g:1003;this.minFilter=void 0!==h?h:1003;this.generateMipmaps=this.flipY=!1}function Qb(a){C.call(this);this.type=\"WireframeGeometry\";var b=\n[],c,d,e,f=[0,0],g={},h=[\"a\",\"b\",\"c\"];if(a&&a.isGeometry){var k=a.faces;var m=0;for(d=k.length;m<d;m++){var q=k[m];for(c=0;3>c;c++){var n=q[h[c]];var t=q[h[(c+1)%3]];f[0]=Math.min(n,t);f[1]=Math.max(n,t);n=f[0]+\",\"+f[1];void 0===g[n]&&(g[n]={index1:f[0],index2:f[1]})}}for(n in g)m=g[n],h=a.vertices[m.index1],b.push(h.x,h.y,h.z),h=a.vertices[m.index2],b.push(h.x,h.y,h.z)}else if(a&&a.isBufferGeometry)if(h=new p,null!==a.index){k=a.attributes.position;q=a.index;var u=a.groups;0===u.length&&(u=[{start:0,\ncount:q.count,materialIndex:0}]);a=0;for(e=u.length;a<e;++a)for(m=u[a],c=m.start,d=m.count,m=c,d=c+d;m<d;m+=3)for(c=0;3>c;c++)n=q.getX(m+c),t=q.getX(m+(c+1)%3),f[0]=Math.min(n,t),f[1]=Math.max(n,t),n=f[0]+\",\"+f[1],void 0===g[n]&&(g[n]={index1:f[0],index2:f[1]});for(n in g)m=g[n],h.fromBufferAttribute(k,m.index1),b.push(h.x,h.y,h.z),h.fromBufferAttribute(k,m.index2),b.push(h.x,h.y,h.z)}else for(k=a.attributes.position,m=0,d=k.count/3;m<d;m++)for(c=0;3>c;c++)g=3*m+c,h.fromBufferAttribute(k,g),b.push(h.x,\nh.y,h.z),g=3*m+(c+1)%3,h.fromBufferAttribute(k,g),b.push(h.x,h.y,h.z);this.addAttribute(\"position\",new A(b,3))}function Fc(a,b,c){R.call(this);this.type=\"ParametricGeometry\";this.parameters={func:a,slices:b,stacks:c};this.fromBufferGeometry(new Rb(a,b,c));this.mergeVertices()}function Rb(a,b,c){C.call(this);this.type=\"ParametricBufferGeometry\";this.parameters={func:a,slices:b,stacks:c};var d=[],e=[],f=[],g=[],h=new p,k=new p,m=new p,q=new p,n=new p,t,u;3>a.length&&console.error(\"THREE.ParametricGeometry: Function must now modify a Vector3 as third parameter.\");\nvar r=b+1;for(t=0;t<=c;t++){var l=t/c;for(u=0;u<=b;u++){var y=u/b;a(y,l,k);e.push(k.x,k.y,k.z);0<=y-1E-5?(a(y-1E-5,l,m),q.subVectors(k,m)):(a(y+1E-5,l,m),q.subVectors(m,k));0<=l-1E-5?(a(y,l-1E-5,m),n.subVectors(k,m)):(a(y,l+1E-5,m),n.subVectors(m,k));h.crossVectors(q,n).normalize();f.push(h.x,h.y,h.z);g.push(y,l)}}for(t=0;t<c;t++)for(u=0;u<b;u++)a=t*r+u+1,h=(t+1)*r+u+1,k=(t+1)*r+u,d.push(t*r+u,a,k),d.push(a,h,k);this.setIndex(d);this.addAttribute(\"position\",new A(e,3));this.addAttribute(\"normal\",\nnew A(f,3));this.addAttribute(\"uv\",new A(g,2))}function Gc(a,b,c,d){R.call(this);this.type=\"PolyhedronGeometry\";this.parameters={vertices:a,indices:b,radius:c,detail:d};this.fromBufferGeometry(new na(a,b,c,d));this.mergeVertices()}function na(a,b,c,d){function e(a){h.push(a.x,a.y,a.z)}function f(b,c){b*=3;c.x=a[b+0];c.y=a[b+1];c.z=a[b+2]}function g(a,b,c,d){0>d&&1===a.x&&(k[b]=a.x-1);0===c.x&&0===c.z&&(k[b]=d/2/Math.PI+.5)}C.call(this);this.type=\"PolyhedronBufferGeometry\";this.parameters={vertices:a,\nindices:b,radius:c,detail:d};c=c||1;d=d||0;var h=[],k=[];(function(a){for(var c=new p,d=new p,g=new p,h=0;h<b.length;h+=3){f(b[h+0],c);f(b[h+1],d);f(b[h+2],g);var k,m,l=c,x=d,w=g,B=Math.pow(2,a),E=[];for(m=0;m<=B;m++){E[m]=[];var P=l.clone().lerp(w,m/B),N=x.clone().lerp(w,m/B),O=B-m;for(k=0;k<=O;k++)E[m][k]=0===k&&m===B?P:P.clone().lerp(N,k/O)}for(m=0;m<B;m++)for(k=0;k<2*(B-m)-1;k++)l=Math.floor(k/2),0===k%2?(e(E[m][l+1]),e(E[m+1][l]),e(E[m][l])):(e(E[m][l+1]),e(E[m+1][l+1]),e(E[m+1][l]))}})(d);(function(a){for(var b=\nnew p,c=0;c<h.length;c+=3)b.x=h[c+0],b.y=h[c+1],b.z=h[c+2],b.normalize().multiplyScalar(a),h[c+0]=b.x,h[c+1]=b.y,h[c+2]=b.z})(c);(function(){for(var a=new p,b=0;b<h.length;b+=3)a.x=h[b+0],a.y=h[b+1],a.z=h[b+2],k.push(Math.atan2(a.z,-a.x)/2/Math.PI+.5,1-(Math.atan2(-a.y,Math.sqrt(a.x*a.x+a.z*a.z))/Math.PI+.5));a=new p;b=new p;for(var c=new p,d=new p,e=new z,f=new z,l=new z,y=0,x=0;y<h.length;y+=9,x+=6){a.set(h[y+0],h[y+1],h[y+2]);b.set(h[y+3],h[y+4],h[y+5]);c.set(h[y+6],h[y+7],h[y+8]);e.set(k[x+0],\nk[x+1]);f.set(k[x+2],k[x+3]);l.set(k[x+4],k[x+5]);d.copy(a).add(b).add(c).divideScalar(3);var w=Math.atan2(d.z,-d.x);g(e,x+0,a,w);g(f,x+2,b,w);g(l,x+4,c,w)}for(a=0;a<k.length;a+=6)b=k[a+0],c=k[a+2],d=k[a+4],e=Math.min(b,c,d),.9<Math.max(b,c,d)&&.1>e&&(.2>b&&(k[a+0]+=1),.2>c&&(k[a+2]+=1),.2>d&&(k[a+4]+=1))})();this.addAttribute(\"position\",new A(h,3));this.addAttribute(\"normal\",new A(h.slice(),3));this.addAttribute(\"uv\",new A(k,2));0===d?this.computeVertexNormals():this.normalizeNormals()}function Hc(a,\nb){R.call(this);this.type=\"TetrahedronGeometry\";this.parameters={radius:a,detail:b};this.fromBufferGeometry(new Sb(a,b));this.mergeVertices()}function Sb(a,b){na.call(this,[1,1,1,-1,-1,1,-1,1,-1,1,-1,-1],[2,1,0,0,3,2,1,3,0,2,3,1],a,b);this.type=\"TetrahedronBufferGeometry\";this.parameters={radius:a,detail:b}}function Ic(a,b){R.call(this);this.type=\"OctahedronGeometry\";this.parameters={radius:a,detail:b};this.fromBufferGeometry(new pb(a,b));this.mergeVertices()}function pb(a,b){na.call(this,[1,0,0,\n-1,0,0,0,1,0,0,-1,0,0,0,1,0,0,-1],[0,2,4,0,4,3,0,3,5,0,5,2,1,2,5,1,5,3,1,3,4,1,4,2],a,b);this.type=\"OctahedronBufferGeometry\";this.parameters={radius:a,detail:b}}function Jc(a,b){R.call(this);this.type=\"IcosahedronGeometry\";this.parameters={radius:a,detail:b};this.fromBufferGeometry(new Tb(a,b));this.mergeVertices()}function Tb(a,b){var c=(1+Math.sqrt(5))/2;na.call(this,[-1,c,0,1,c,0,-1,-c,0,1,-c,0,0,-1,c,0,1,c,0,-1,-c,0,1,-c,c,0,-1,c,0,1,-c,0,-1,-c,0,1],[0,11,5,0,5,1,0,1,7,0,7,10,0,10,11,1,5,9,5,\n11,4,11,10,2,10,7,6,7,1,8,3,9,4,3,4,2,3,2,6,3,6,8,3,8,9,4,9,5,2,4,11,6,2,10,8,6,7,9,8,1],a,b);this.type=\"IcosahedronBufferGeometry\";this.parameters={radius:a,detail:b}}function Kc(a,b){R.call(this);this.type=\"DodecahedronGeometry\";this.parameters={radius:a,detail:b};this.fromBufferGeometry(new Ub(a,b));this.mergeVertices()}function Ub(a,b){var c=(1+Math.sqrt(5))/2,d=1/c;na.call(this,[-1,-1,-1,-1,-1,1,-1,1,-1,-1,1,1,1,-1,-1,1,-1,1,1,1,-1,1,1,1,0,-d,-c,0,-d,c,0,d,-c,0,d,c,-d,-c,0,-d,c,0,d,-c,0,d,c,\n0,-c,0,-d,c,0,-d,-c,0,d,c,0,d],[3,11,7,3,7,15,3,15,13,7,19,17,7,17,6,7,6,15,17,4,8,17,8,10,17,10,6,8,0,16,8,16,2,8,2,10,0,12,1,0,1,18,0,18,16,6,10,2,6,2,13,6,13,15,2,16,18,2,18,3,2,3,13,18,1,9,18,9,11,18,11,3,4,14,12,4,12,0,4,0,8,11,9,5,11,5,19,11,19,7,19,5,14,19,14,4,19,4,17,1,12,14,1,14,5,1,5,9],a,b);this.type=\"DodecahedronBufferGeometry\";this.parameters={radius:a,detail:b}}function Lc(a,b,c,d,e,f){R.call(this);this.type=\"TubeGeometry\";this.parameters={path:a,tubularSegments:b,radius:c,radialSegments:d,\nclosed:e};void 0!==f&&console.warn(\"THREE.TubeGeometry: taper has been removed.\");a=new Vb(a,b,c,d,e);this.tangents=a.tangents;this.normals=a.normals;this.binormals=a.binormals;this.fromBufferGeometry(a);this.mergeVertices()}function Vb(a,b,c,d,e){function f(e){q=a.getPointAt(e/b,q);var f=g.normals[e];e=g.binormals[e];for(t=0;t<=d;t++){var m=t/d*Math.PI*2,n=Math.sin(m);m=-Math.cos(m);k.x=m*f.x+n*e.x;k.y=m*f.y+n*e.y;k.z=m*f.z+n*e.z;k.normalize();r.push(k.x,k.y,k.z);h.x=q.x+c*k.x;h.y=q.y+c*k.y;h.z=\nq.z+c*k.z;l.push(h.x,h.y,h.z)}}C.call(this);this.type=\"TubeBufferGeometry\";this.parameters={path:a,tubularSegments:b,radius:c,radialSegments:d,closed:e};b=b||64;c=c||1;d=d||8;e=e||!1;var g=a.computeFrenetFrames(b,e);this.tangents=g.tangents;this.normals=g.normals;this.binormals=g.binormals;var h=new p,k=new p,m=new z,q=new p,n,t,l=[],r=[],v=[],y=[];for(n=0;n<b;n++)f(n);f(!1===e?b:0);for(n=0;n<=b;n++)for(t=0;t<=d;t++)m.x=n/b,m.y=t/d,v.push(m.x,m.y);(function(){for(t=1;t<=b;t++)for(n=1;n<=d;n++){var a=\n(d+1)*t+(n-1),c=(d+1)*t+n,e=(d+1)*(t-1)+n;y.push((d+1)*(t-1)+(n-1),a,e);y.push(a,c,e)}})();this.setIndex(y);this.addAttribute(\"position\",new A(l,3));this.addAttribute(\"normal\",new A(r,3));this.addAttribute(\"uv\",new A(v,2))}function Mc(a,b,c,d,e,f,g){R.call(this);this.type=\"TorusKnotGeometry\";this.parameters={radius:a,tube:b,tubularSegments:c,radialSegments:d,p:e,q:f};void 0!==g&&console.warn(\"THREE.TorusKnotGeometry: heightScale has been deprecated. Use .scale( x, y, z ) instead.\");this.fromBufferGeometry(new Wb(a,\nb,c,d,e,f));this.mergeVertices()}function Wb(a,b,c,d,e,f){function g(a,b,c,d,e){var f=Math.sin(a);b=c/b*a;c=Math.cos(b);e.x=d*(2+c)*.5*Math.cos(a);e.y=d*(2+c)*f*.5;e.z=d*Math.sin(b)*.5}C.call(this);this.type=\"TorusKnotBufferGeometry\";this.parameters={radius:a,tube:b,tubularSegments:c,radialSegments:d,p:e,q:f};a=a||1;b=b||.4;c=Math.floor(c)||64;d=Math.floor(d)||8;e=e||2;f=f||3;var h=[],k=[],m=[],q=[],n,t=new p,l=new p,r=new p,v=new p,y=new p,x=new p,w=new p;for(n=0;n<=c;++n){var B=n/c*e*Math.PI*2;\ng(B,e,f,a,r);g(B+.01,e,f,a,v);x.subVectors(v,r);w.addVectors(v,r);y.crossVectors(x,w);w.crossVectors(y,x);y.normalize();w.normalize();for(B=0;B<=d;++B){var E=B/d*Math.PI*2,P=-b*Math.cos(E);E=b*Math.sin(E);t.x=r.x+(P*w.x+E*y.x);t.y=r.y+(P*w.y+E*y.y);t.z=r.z+(P*w.z+E*y.z);k.push(t.x,t.y,t.z);l.subVectors(t,r).normalize();m.push(l.x,l.y,l.z);q.push(n/c);q.push(B/d)}}for(B=1;B<=c;B++)for(n=1;n<=d;n++)a=(d+1)*B+(n-1),b=(d+1)*B+n,e=(d+1)*(B-1)+n,h.push((d+1)*(B-1)+(n-1),a,e),h.push(a,b,e);this.setIndex(h);\nthis.addAttribute(\"position\",new A(k,3));this.addAttribute(\"normal\",new A(m,3));this.addAttribute(\"uv\",new A(q,2))}function Nc(a,b,c,d,e){R.call(this);this.type=\"TorusGeometry\";this.parameters={radius:a,tube:b,radialSegments:c,tubularSegments:d,arc:e};this.fromBufferGeometry(new Xb(a,b,c,d,e));this.mergeVertices()}function Xb(a,b,c,d,e){C.call(this);this.type=\"TorusBufferGeometry\";this.parameters={radius:a,tube:b,radialSegments:c,tubularSegments:d,arc:e};a=a||1;b=b||.4;c=Math.floor(c)||8;d=Math.floor(d)||\n6;e=e||2*Math.PI;var f=[],g=[],h=[],k=[],m=new p,q=new p,n=new p,t,l;for(t=0;t<=c;t++)for(l=0;l<=d;l++){var r=l/d*e,v=t/c*Math.PI*2;q.x=(a+b*Math.cos(v))*Math.cos(r);q.y=(a+b*Math.cos(v))*Math.sin(r);q.z=b*Math.sin(v);g.push(q.x,q.y,q.z);m.x=a*Math.cos(r);m.y=a*Math.sin(r);n.subVectors(q,m).normalize();h.push(n.x,n.y,n.z);k.push(l/d);k.push(t/c)}for(t=1;t<=c;t++)for(l=1;l<=d;l++)a=(d+1)*(t-1)+l-1,b=(d+1)*(t-1)+l,e=(d+1)*t+l,f.push((d+1)*t+l-1,a,e),f.push(a,b,e);this.setIndex(f);this.addAttribute(\"position\",\nnew A(g,3));this.addAttribute(\"normal\",new A(h,3));this.addAttribute(\"uv\",new A(k,2))}function bf(a,b,c,d,e){for(var f,g=0,h=b,k=c-d;h<c;h+=d)g+=(a[k]-a[h])*(a[h+1]+a[k+1]),k=h;if(e===0<g)for(e=b;e<c;e+=d)f=cf(e,a[e],a[e+1],f);else for(e=c-d;e>=b;e-=d)f=cf(e,a[e],a[e+1],f);f&&qb(f,f.next)&&(Oc(f),f=f.next);return f}function Pc(a,b){if(!a)return a;b||(b=a);do{var c=!1;if(a.steiner||!qb(a,a.next)&&0!==ma(a.prev,a,a.next))a=a.next;else{Oc(a);a=b=a.prev;if(a===a.next)break;c=!0}}while(c||a!==b);return b}\nfunction Qc(a,b,c,d,e,f,g){if(a){if(!g&&f){var h=a,k=h;do null===k.z&&(k.z=ae(k.x,k.y,d,e,f)),k.prevZ=k.prev,k=k.nextZ=k.next;while(k!==h);k.prevZ.nextZ=null;k.prevZ=null;h=k;var m,q,n,t,l=1;do{k=h;var r=h=null;for(q=0;k;){q++;var v=k;for(m=n=0;m<l&&(n++,v=v.nextZ,v);m++);for(t=l;0<n||0<t&&v;)0!==n&&(0===t||!v||k.z<=v.z)?(m=k,k=k.nextZ,n--):(m=v,v=v.nextZ,t--),r?r.nextZ=m:h=m,m.prevZ=r,r=m;k=v}r.nextZ=null;l*=2}while(1<q)}for(h=a;a.prev!==a.next;){k=a.prev;v=a.next;if(f)a:{r=a;t=d;var p=e,x=f;q=r.prev;\nn=r;l=r.next;if(0<=ma(q,n,l))r=!1;else{var w=q.x>n.x?q.x>l.x?q.x:l.x:n.x>l.x?n.x:l.x,B=q.y>n.y?q.y>l.y?q.y:l.y:n.y>l.y?n.y:l.y;m=ae(q.x<n.x?q.x<l.x?q.x:l.x:n.x<l.x?n.x:l.x,q.y<n.y?q.y<l.y?q.y:l.y:n.y<l.y?n.y:l.y,t,p,x);t=ae(w,B,t,p,x);for(p=r.nextZ;p&&p.z<=t;){if(p!==r.prev&&p!==r.next&&ud(q.x,q.y,n.x,n.y,l.x,l.y,p.x,p.y)&&0<=ma(p.prev,p,p.next)){r=!1;break a}p=p.nextZ}for(p=r.prevZ;p&&p.z>=m;){if(p!==r.prev&&p!==r.next&&ud(q.x,q.y,n.x,n.y,l.x,l.y,p.x,p.y)&&0<=ma(p.prev,p,p.next)){r=!1;break a}p=\np.prevZ}r=!0}}else a:if(r=a,q=r.prev,n=r,l=r.next,0<=ma(q,n,l))r=!1;else{for(m=r.next.next;m!==r.prev;){if(ud(q.x,q.y,n.x,n.y,l.x,l.y,m.x,m.y)&&0<=ma(m.prev,m,m.next)){r=!1;break a}m=m.next}r=!0}if(r)b.push(k.i/c),b.push(a.i/c),b.push(v.i/c),Oc(a),h=a=v.next;else if(a=v,a===h){if(!g)Qc(Pc(a),b,c,d,e,f,1);else if(1===g){g=b;h=c;k=a;do v=k.prev,r=k.next.next,!qb(v,r)&&df(v,k,k.next,r)&&Rc(v,r)&&Rc(r,v)&&(g.push(v.i/h),g.push(k.i/h),g.push(r.i/h),Oc(k),Oc(k.next),k=a=r),k=k.next;while(k!==a);a=k;Qc(a,\nb,c,d,e,f,2)}else if(2===g)a:{g=a;do{for(h=g.next.next;h!==g.prev;){if(k=g.i!==h.i){k=g;v=h;if(r=k.next.i!==v.i&&k.prev.i!==v.i){b:{r=k;do{if(r.i!==k.i&&r.next.i!==k.i&&r.i!==v.i&&r.next.i!==v.i&&df(r,r.next,k,v)){r=!0;break b}r=r.next}while(r!==k);r=!1}r=!r}if(r=r&&Rc(k,v)&&Rc(v,k)){r=k;q=!1;n=(k.x+v.x)/2;v=(k.y+v.y)/2;do r.y>v!==r.next.y>v&&r.next.y!==r.y&&n<(r.next.x-r.x)*(v-r.y)/(r.next.y-r.y)+r.x&&(q=!q),r=r.next;while(r!==k);r=q}k=r}if(k){a=ef(g,h);g=Pc(g,g.next);a=Pc(a,a.next);Qc(g,b,c,d,e,\nf);Qc(a,b,c,d,e,f);break a}h=h.next}g=g.next}while(g!==a)}break}}}}function Ng(a,b){return a.x-b.x}function Og(a,b){var c=b,d=a.x,e=a.y,f=-Infinity;do{if(e<=c.y&&e>=c.next.y&&c.next.y!==c.y){var g=c.x+(e-c.y)*(c.next.x-c.x)/(c.next.y-c.y);if(g<=d&&g>f){f=g;if(g===d){if(e===c.y)return c;if(e===c.next.y)return c.next}var h=c.x<c.next.x?c:c.next}}c=c.next}while(c!==b);if(!h)return null;if(d===f)return h.prev;b=h;g=h.x;var k=h.y,m=Infinity;for(c=h.next;c!==b;){if(d>=c.x&&c.x>=g&&d!==c.x&&ud(e<k?d:f,e,\ng,k,e<k?f:d,e,c.x,c.y)){var q=Math.abs(e-c.y)/(d-c.x);(q<m||q===m&&c.x>h.x)&&Rc(c,a)&&(h=c,m=q)}c=c.next}return h}function ae(a,b,c,d,e){a=32767*(a-c)*e;b=32767*(b-d)*e;a=(a|a<<8)&16711935;a=(a|a<<4)&252645135;a=(a|a<<2)&858993459;b=(b|b<<8)&16711935;b=(b|b<<4)&252645135;b=(b|b<<2)&858993459;return(a|a<<1)&1431655765|((b|b<<1)&1431655765)<<1}function Pg(a){var b=a,c=a;do b.x<c.x&&(c=b),b=b.next;while(b!==a);return c}function ud(a,b,c,d,e,f,g,h){return 0<=(e-g)*(b-h)-(a-g)*(f-h)&&0<=(a-g)*(d-h)-(c-\ng)*(b-h)&&0<=(c-g)*(f-h)-(e-g)*(d-h)}function ma(a,b,c){return(b.y-a.y)*(c.x-b.x)-(b.x-a.x)*(c.y-b.y)}function qb(a,b){return a.x===b.x&&a.y===b.y}function df(a,b,c,d){return qb(a,b)&&qb(c,d)||qb(a,d)&&qb(c,b)?!0:0<ma(a,b,c)!==0<ma(a,b,d)&&0<ma(c,d,a)!==0<ma(c,d,b)}function Rc(a,b){return 0>ma(a.prev,a,a.next)?0<=ma(a,b,a.next)&&0<=ma(a,a.prev,b):0>ma(a,b,a.prev)||0>ma(a,a.next,b)}function ef(a,b){var c=new be(a.i,a.x,a.y),d=new be(b.i,b.x,b.y),e=a.next,f=b.prev;a.next=b;b.prev=a;c.next=e;e.prev=\nc;d.next=c;c.prev=d;f.next=d;d.prev=f;return d}function cf(a,b,c,d){a=new be(a,b,c);d?(a.next=d.next,a.prev=d,d.next.prev=a,d.next=a):(a.prev=a,a.next=a);return a}function Oc(a){a.next.prev=a.prev;a.prev.next=a.next;a.prevZ&&(a.prevZ.nextZ=a.nextZ);a.nextZ&&(a.nextZ.prevZ=a.prevZ)}function be(a,b,c){this.i=a;this.x=b;this.y=c;this.nextZ=this.prevZ=this.z=this.next=this.prev=null;this.steiner=!1}function ff(a){var b=a.length;2<b&&a[b-1].equals(a[0])&&a.pop()}function gf(a,b){for(var c=0;c<b.length;c++)a.push(b[c].x),\na.push(b[c].y)}function rb(a,b){R.call(this);this.type=\"ExtrudeGeometry\";this.parameters={shapes:a,options:b};this.fromBufferGeometry(new Oa(a,b));this.mergeVertices()}function Oa(a,b){function c(a){function c(a,b,c){b||console.error(\"THREE.ExtrudeGeometry: vec does not exist\");return b.clone().multiplyScalar(c).add(a)}function g(a,b,c){var d=a.x-b.x;var e=a.y-b.y;var f=c.x-a.x;var g=c.y-a.y,h=d*d+e*e;if(Math.abs(d*g-e*f)>Number.EPSILON){var k=Math.sqrt(h),m=Math.sqrt(f*f+g*g);h=b.x-e/k;b=b.y+d/k;\ng=((c.x-g/m-h)*g-(c.y+f/m-b)*f)/(d*g-e*f);f=h+d*g-a.x;d=b+e*g-a.y;e=f*f+d*d;if(2>=e)return new z(f,d);e=Math.sqrt(e/2)}else a=!1,d>Number.EPSILON?f>Number.EPSILON&&(a=!0):d<-Number.EPSILON?f<-Number.EPSILON&&(a=!0):Math.sign(e)===Math.sign(g)&&(a=!0),a?(f=-e,e=Math.sqrt(h)):(f=d,d=e,e=Math.sqrt(h/2));return new z(f/e,d/e)}function h(a,b){for(M=a.length;0<=--M;){var c=M;var f=M-1;0>f&&(f=a.length-1);var g,h=w+2*O;for(g=0;g<h;g++){var k=Z*g,m=Z*(g+1),q=b+f+k,n=b+f+m;m=b+c+m;r(b+c+k);r(q);r(m);r(q);\nr(n);r(m);k=e.length/3;k=D.generateSideWallUV(d,e,k-6,k-3,k-2,k-1);v(k[0]);v(k[1]);v(k[3]);v(k[1]);v(k[2]);v(k[3])}}}function k(a,b,c){y.push(a);y.push(b);y.push(c)}function l(a,b,c){r(a);r(b);r(c);a=e.length/3;a=D.generateTopUV(d,e,a-3,a-2,a-1);v(a[0]);v(a[1]);v(a[2])}function r(a){e.push(y[3*a]);e.push(y[3*a+1]);e.push(y[3*a+2])}function v(a){f.push(a.x);f.push(a.y)}var y=[],x=void 0!==b.curveSegments?b.curveSegments:12,w=void 0!==b.steps?b.steps:1,B=void 0!==b.depth?b.depth:100,E=void 0!==b.bevelEnabled?\nb.bevelEnabled:!0,P=void 0!==b.bevelThickness?b.bevelThickness:6,N=void 0!==b.bevelSize?b.bevelSize:P-2,O=void 0!==b.bevelSegments?b.bevelSegments:3,A=b.extrudePath,D=void 0!==b.UVGenerator?b.UVGenerator:Qg;void 0!==b.amount&&(console.warn(\"THREE.ExtrudeBufferGeometry: amount has been renamed to depth.\"),B=b.amount);var C=!1;if(A){var G=A.getSpacedPoints(w);C=!0;E=!1;var K=A.computeFrenetFrames(w,!1);var L=new p;var R=new p;var Q=new p}E||(N=P=O=0);var I;x=a.extractPoints(x);a=x.shape;var J=x.holes;\nif(!Va.isClockWise(a)){a=a.reverse();var H=0;for(I=J.length;H<I;H++){var S=J[H];Va.isClockWise(S)&&(J[H]=S.reverse())}}var Y=Va.triangulateShape(a,J),W=a;H=0;for(I=J.length;H<I;H++)S=J[H],a=a.concat(S);var T,Z=a.length,V,ea=Y.length;x=[];var M=0;var U=W.length;var X=U-1;for(T=M+1;M<U;M++,X++,T++)X===U&&(X=0),T===U&&(T=0),x[M]=g(W[M],W[X],W[T]);A=[];var fa=x.concat();H=0;for(I=J.length;H<I;H++){S=J[H];var ca=[];M=0;U=S.length;X=U-1;for(T=M+1;M<U;M++,X++,T++)X===U&&(X=0),T===U&&(T=0),ca[M]=g(S[M],S[X],\nS[T]);A.push(ca);fa=fa.concat(ca)}for(X=0;X<O;X++){U=X/O;var da=P*Math.cos(U*Math.PI/2);T=N*Math.sin(U*Math.PI/2);M=0;for(U=W.length;M<U;M++){var aa=c(W[M],x[M],T);k(aa.x,aa.y,-da)}H=0;for(I=J.length;H<I;H++)for(S=J[H],ca=A[H],M=0,U=S.length;M<U;M++)aa=c(S[M],ca[M],T),k(aa.x,aa.y,-da)}T=N;for(M=0;M<Z;M++)aa=E?c(a[M],fa[M],T):a[M],C?(R.copy(K.normals[0]).multiplyScalar(aa.x),L.copy(K.binormals[0]).multiplyScalar(aa.y),Q.copy(G[0]).add(R).add(L),k(Q.x,Q.y,Q.z)):k(aa.x,aa.y,0);for(U=1;U<=w;U++)for(M=\n0;M<Z;M++)aa=E?c(a[M],fa[M],T):a[M],C?(R.copy(K.normals[U]).multiplyScalar(aa.x),L.copy(K.binormals[U]).multiplyScalar(aa.y),Q.copy(G[U]).add(R).add(L),k(Q.x,Q.y,Q.z)):k(aa.x,aa.y,B/w*U);for(X=O-1;0<=X;X--){U=X/O;da=P*Math.cos(U*Math.PI/2);T=N*Math.sin(U*Math.PI/2);M=0;for(U=W.length;M<U;M++)aa=c(W[M],x[M],T),k(aa.x,aa.y,B+da);H=0;for(I=J.length;H<I;H++)for(S=J[H],ca=A[H],M=0,U=S.length;M<U;M++)aa=c(S[M],ca[M],T),C?k(aa.x,aa.y+G[w-1].y,G[w-1].x+da):k(aa.x,aa.y,B+da)}(function(){var a=e.length/3;if(E){var b=\n0*Z;for(M=0;M<ea;M++)V=Y[M],l(V[2]+b,V[1]+b,V[0]+b);b=Z*(w+2*O);for(M=0;M<ea;M++)V=Y[M],l(V[0]+b,V[1]+b,V[2]+b)}else{for(M=0;M<ea;M++)V=Y[M],l(V[2],V[1],V[0]);for(M=0;M<ea;M++)V=Y[M],l(V[0]+Z*w,V[1]+Z*w,V[2]+Z*w)}d.addGroup(a,e.length/3-a,0)})();(function(){var a=e.length/3,b=0;h(W,b);b+=W.length;H=0;for(I=J.length;H<I;H++)S=J[H],h(S,b),b+=S.length;d.addGroup(a,e.length/3-a,1)})()}C.call(this);this.type=\"ExtrudeBufferGeometry\";this.parameters={shapes:a,options:b};a=Array.isArray(a)?a:[a];for(var d=\nthis,e=[],f=[],g=0,h=a.length;g<h;g++)c(a[g]);this.addAttribute(\"position\",new A(e,3));this.addAttribute(\"uv\",new A(f,2));this.computeVertexNormals()}function hf(a,b,c){c.shapes=[];if(Array.isArray(a))for(var d=0,e=a.length;d<e;d++)c.shapes.push(a[d].uuid);else c.shapes.push(a.uuid);void 0!==b.extrudePath&&(c.options.extrudePath=b.extrudePath.toJSON());return c}function Sc(a,b){R.call(this);this.type=\"TextGeometry\";this.parameters={text:a,parameters:b};this.fromBufferGeometry(new Yb(a,b));this.mergeVertices()}\nfunction Yb(a,b){b=b||{};var c=b.font;if(!c||!c.isFont)return console.error(\"THREE.TextGeometry: font parameter is not an instance of THREE.Font.\"),new R;a=c.generateShapes(a,b.size);b.depth=void 0!==b.height?b.height:50;void 0===b.bevelThickness&&(b.bevelThickness=10);void 0===b.bevelSize&&(b.bevelSize=8);void 0===b.bevelEnabled&&(b.bevelEnabled=!1);Oa.call(this,a,b);this.type=\"TextBufferGeometry\"}function Tc(a,b,c,d,e,f,g){R.call(this);this.type=\"SphereGeometry\";this.parameters={radius:a,widthSegments:b,\nheightSegments:c,phiStart:d,phiLength:e,thetaStart:f,thetaLength:g};this.fromBufferGeometry(new sb(a,b,c,d,e,f,g));this.mergeVertices()}function sb(a,b,c,d,e,f,g){C.call(this);this.type=\"SphereBufferGeometry\";this.parameters={radius:a,widthSegments:b,heightSegments:c,phiStart:d,phiLength:e,thetaStart:f,thetaLength:g};a=a||1;b=Math.max(3,Math.floor(b)||8);c=Math.max(2,Math.floor(c)||6);d=void 0!==d?d:0;e=void 0!==e?e:2*Math.PI;f=void 0!==f?f:0;g=void 0!==g?g:Math.PI;var h=f+g,k,m,q=0,n=[],l=new p,\nu=new p,r=[],v=[],y=[],x=[];for(m=0;m<=c;m++){var w=[],B=m/c;for(k=0;k<=b;k++){var E=k/b;l.x=-a*Math.cos(d+E*e)*Math.sin(f+B*g);l.y=a*Math.cos(f+B*g);l.z=a*Math.sin(d+E*e)*Math.sin(f+B*g);v.push(l.x,l.y,l.z);u.set(l.x,l.y,l.z).normalize();y.push(u.x,u.y,u.z);x.push(E,1-B);w.push(q++)}n.push(w)}for(m=0;m<c;m++)for(k=0;k<b;k++)a=n[m][k+1],d=n[m][k],e=n[m+1][k],g=n[m+1][k+1],(0!==m||0<f)&&r.push(a,d,g),(m!==c-1||h<Math.PI)&&r.push(d,e,g);this.setIndex(r);this.addAttribute(\"position\",new A(v,3));this.addAttribute(\"normal\",\nnew A(y,3));this.addAttribute(\"uv\",new A(x,2))}function Uc(a,b,c,d,e,f){R.call(this);this.type=\"RingGeometry\";this.parameters={innerRadius:a,outerRadius:b,thetaSegments:c,phiSegments:d,thetaStart:e,thetaLength:f};this.fromBufferGeometry(new Zb(a,b,c,d,e,f));this.mergeVertices()}function Zb(a,b,c,d,e,f){C.call(this);this.type=\"RingBufferGeometry\";this.parameters={innerRadius:a,outerRadius:b,thetaSegments:c,phiSegments:d,thetaStart:e,thetaLength:f};a=a||.5;b=b||1;e=void 0!==e?e:0;f=void 0!==f?f:2*Math.PI;\nc=void 0!==c?Math.max(3,c):8;d=void 0!==d?Math.max(1,d):1;var g=[],h=[],k=[],m=[],q=a,n=(b-a)/d,l=new p,u=new z,r,v;for(r=0;r<=d;r++){for(v=0;v<=c;v++)a=e+v/c*f,l.x=q*Math.cos(a),l.y=q*Math.sin(a),h.push(l.x,l.y,l.z),k.push(0,0,1),u.x=(l.x/b+1)/2,u.y=(l.y/b+1)/2,m.push(u.x,u.y);q+=n}for(r=0;r<d;r++)for(b=r*(c+1),v=0;v<c;v++)a=v+b,e=a+c+1,f=a+c+2,q=a+1,g.push(a,e,q),g.push(e,f,q);this.setIndex(g);this.addAttribute(\"position\",new A(h,3));this.addAttribute(\"normal\",new A(k,3));this.addAttribute(\"uv\",\nnew A(m,2))}function Vc(a,b,c,d){R.call(this);this.type=\"LatheGeometry\";this.parameters={points:a,segments:b,phiStart:c,phiLength:d};this.fromBufferGeometry(new $b(a,b,c,d));this.mergeVertices()}function $b(a,b,c,d){C.call(this);this.type=\"LatheBufferGeometry\";this.parameters={points:a,segments:b,phiStart:c,phiLength:d};b=Math.floor(b)||12;c=c||0;d=d||2*Math.PI;d=H.clamp(d,0,2*Math.PI);var e=[],f=[],g=[],h=1/b,k=new p,m=new z,q;for(q=0;q<=b;q++){var n=c+q*h*d;var l=Math.sin(n),u=Math.cos(n);for(n=\n0;n<=a.length-1;n++)k.x=a[n].x*l,k.y=a[n].y,k.z=a[n].x*u,f.push(k.x,k.y,k.z),m.x=q/b,m.y=n/(a.length-1),g.push(m.x,m.y)}for(q=0;q<b;q++)for(n=0;n<a.length-1;n++)c=n+q*a.length,h=c+a.length,k=c+a.length+1,m=c+1,e.push(c,h,m),e.push(h,k,m);this.setIndex(e);this.addAttribute(\"position\",new A(f,3));this.addAttribute(\"uv\",new A(g,2));this.computeVertexNormals();if(d===2*Math.PI)for(d=this.attributes.normal.array,e=new p,f=new p,g=new p,c=b*a.length*3,n=q=0;q<a.length;q++,n+=3)e.x=d[n+0],e.y=d[n+1],e.z=\nd[n+2],f.x=d[c+n+0],f.y=d[c+n+1],f.z=d[c+n+2],g.addVectors(e,f).normalize(),d[n+0]=d[c+n+0]=g.x,d[n+1]=d[c+n+1]=g.y,d[n+2]=d[c+n+2]=g.z}function tb(a,b){R.call(this);this.type=\"ShapeGeometry\";\"object\"===typeof b&&(console.warn(\"THREE.ShapeGeometry: Options parameter has been removed.\"),b=b.curveSegments);this.parameters={shapes:a,curveSegments:b};this.fromBufferGeometry(new ub(a,b));this.mergeVertices()}function ub(a,b){function c(a){var c,h=e.length/3;a=a.extractPoints(b);var m=a.shape,q=a.holes;\nif(!1===Va.isClockWise(m))for(m=m.reverse(),a=0,c=q.length;a<c;a++){var l=q[a];!0===Va.isClockWise(l)&&(q[a]=l.reverse())}var p=Va.triangulateShape(m,q);a=0;for(c=q.length;a<c;a++)l=q[a],m=m.concat(l);a=0;for(c=m.length;a<c;a++)l=m[a],e.push(l.x,l.y,0),f.push(0,0,1),g.push(l.x,l.y);a=0;for(c=p.length;a<c;a++)m=p[a],d.push(m[0]+h,m[1]+h,m[2]+h),k+=3}C.call(this);this.type=\"ShapeBufferGeometry\";this.parameters={shapes:a,curveSegments:b};b=b||12;var d=[],e=[],f=[],g=[],h=0,k=0;if(!1===Array.isArray(a))c(a);\nelse for(var m=0;m<a.length;m++)c(a[m]),this.addGroup(h,k,m),h+=k,k=0;this.setIndex(d);this.addAttribute(\"position\",new A(e,3));this.addAttribute(\"normal\",new A(f,3));this.addAttribute(\"uv\",new A(g,2))}function jf(a,b){b.shapes=[];if(Array.isArray(a))for(var c=0,d=a.length;c<d;c++)b.shapes.push(a[c].uuid);else b.shapes.push(a.uuid);return b}function ac(a,b){C.call(this);this.type=\"EdgesGeometry\";this.parameters={thresholdAngle:b};var c=[];b=Math.cos(H.DEG2RAD*(void 0!==b?b:1));var d=[0,0],e={},f=\n[\"a\",\"b\",\"c\"];if(a.isBufferGeometry){var g=new R;g.fromBufferGeometry(a)}else g=a.clone();g.mergeVertices();g.computeFaceNormals();a=g.vertices;g=g.faces;for(var h=0,k=g.length;h<k;h++)for(var m=g[h],q=0;3>q;q++){var n=m[f[q]];var l=m[f[(q+1)%3]];d[0]=Math.min(n,l);d[1]=Math.max(n,l);n=d[0]+\",\"+d[1];void 0===e[n]?e[n]={index1:d[0],index2:d[1],face1:h,face2:void 0}:e[n].face2=h}for(n in e)if(d=e[n],void 0===d.face2||g[d.face1].normal.dot(g[d.face2].normal)<=b)f=a[d.index1],c.push(f.x,f.y,f.z),f=a[d.index2],\nc.push(f.x,f.y,f.z);this.addAttribute(\"position\",new A(c,3))}function vb(a,b,c,d,e,f,g,h){R.call(this);this.type=\"CylinderGeometry\";this.parameters={radiusTop:a,radiusBottom:b,height:c,radialSegments:d,heightSegments:e,openEnded:f,thetaStart:g,thetaLength:h};this.fromBufferGeometry(new Wa(a,b,c,d,e,f,g,h));this.mergeVertices()}function Wa(a,b,c,d,e,f,g,h){function k(c){var e,f=new z,k=new p,t=0,v=!0===c?a:b,w=!0===c?1:-1;var A=r;for(e=1;e<=d;e++)n.push(0,y*w,0),l.push(0,w,0),u.push(.5,.5),r++;var C=\nr;for(e=0;e<=d;e++){var D=e/d*h+g,H=Math.cos(D);D=Math.sin(D);k.x=v*D;k.y=y*w;k.z=v*H;n.push(k.x,k.y,k.z);l.push(0,w,0);f.x=.5*H+.5;f.y=.5*D*w+.5;u.push(f.x,f.y);r++}for(e=0;e<d;e++)f=A+e,k=C+e,!0===c?q.push(k,k+1,f):q.push(k+1,k,f),t+=3;m.addGroup(x,t,!0===c?1:2);x+=t}C.call(this);this.type=\"CylinderBufferGeometry\";this.parameters={radiusTop:a,radiusBottom:b,height:c,radialSegments:d,heightSegments:e,openEnded:f,thetaStart:g,thetaLength:h};var m=this;a=void 0!==a?a:1;b=void 0!==b?b:1;c=c||1;d=Math.floor(d)||\n8;e=Math.floor(e)||1;f=void 0!==f?f:!1;g=void 0!==g?g:0;h=void 0!==h?h:2*Math.PI;var q=[],n=[],l=[],u=[],r=0,v=[],y=c/2,x=0;(function(){var f,k,t=new p,P=new p,N=0,z=(b-a)/c;for(k=0;k<=e;k++){var A=[],D=k/e,C=D*(b-a)+a;for(f=0;f<=d;f++){var H=f/d,G=H*h+g,K=Math.sin(G);G=Math.cos(G);P.x=C*K;P.y=-D*c+y;P.z=C*G;n.push(P.x,P.y,P.z);t.set(K,z,G).normalize();l.push(t.x,t.y,t.z);u.push(H,1-D);A.push(r++)}v.push(A)}for(f=0;f<d;f++)for(k=0;k<e;k++)t=v[k+1][f],P=v[k+1][f+1],z=v[k][f+1],q.push(v[k][f],t,z),\nq.push(t,P,z),N+=6;m.addGroup(x,N,0);x+=N})();!1===f&&(0<a&&k(!0),0<b&&k(!1));this.setIndex(q);this.addAttribute(\"position\",new A(n,3));this.addAttribute(\"normal\",new A(l,3));this.addAttribute(\"uv\",new A(u,2))}function Wc(a,b,c,d,e,f,g){vb.call(this,0,a,b,c,d,e,f,g);this.type=\"ConeGeometry\";this.parameters={radius:a,height:b,radialSegments:c,heightSegments:d,openEnded:e,thetaStart:f,thetaLength:g}}function Xc(a,b,c,d,e,f,g){Wa.call(this,0,a,b,c,d,e,f,g);this.type=\"ConeBufferGeometry\";this.parameters=\n{radius:a,height:b,radialSegments:c,heightSegments:d,openEnded:e,thetaStart:f,thetaLength:g}}function Yc(a,b,c,d){R.call(this);this.type=\"CircleGeometry\";this.parameters={radius:a,segments:b,thetaStart:c,thetaLength:d};this.fromBufferGeometry(new bc(a,b,c,d));this.mergeVertices()}function bc(a,b,c,d){C.call(this);this.type=\"CircleBufferGeometry\";this.parameters={radius:a,segments:b,thetaStart:c,thetaLength:d};a=a||1;b=void 0!==b?Math.max(3,b):8;c=void 0!==c?c:0;d=void 0!==d?d:2*Math.PI;var e=[],f=\n[],g=[],h=[],k,m=new p,q=new z;f.push(0,0,0);g.push(0,0,1);h.push(.5,.5);var n=0;for(k=3;n<=b;n++,k+=3){var l=c+n/b*d;m.x=a*Math.cos(l);m.y=a*Math.sin(l);f.push(m.x,m.y,m.z);g.push(0,0,1);q.x=(f[k]/a+1)/2;q.y=(f[k+1]/a+1)/2;h.push(q.x,q.y)}for(k=1;k<=b;k++)e.push(k,k+1,0);this.setIndex(e);this.addAttribute(\"position\",new A(f,3));this.addAttribute(\"normal\",new A(g,3));this.addAttribute(\"uv\",new A(h,2))}function wb(a){J.call(this);this.type=\"ShadowMaterial\";this.color=new G(0);this.transparent=!0;this.setValues(a)}\nfunction cc(a){ta.call(this,a);this.type=\"RawShaderMaterial\"}function Pa(a){J.call(this);this.defines={STANDARD:\"\"};this.type=\"MeshStandardMaterial\";this.color=new G(16777215);this.metalness=this.roughness=.5;this.lightMap=this.map=null;this.lightMapIntensity=1;this.aoMap=null;this.aoMapIntensity=1;this.emissive=new G(0);this.emissiveIntensity=1;this.bumpMap=this.emissiveMap=null;this.bumpScale=1;this.normalMap=null;this.normalMapType=0;this.normalScale=new z(1,1);this.displacementMap=null;this.displacementScale=\n1;this.displacementBias=0;this.envMap=this.alphaMap=this.metalnessMap=this.roughnessMap=null;this.envMapIntensity=1;this.refractionRatio=.98;this.wireframe=!1;this.wireframeLinewidth=1;this.wireframeLinejoin=this.wireframeLinecap=\"round\";this.morphNormals=this.morphTargets=this.skinning=!1;this.setValues(a)}function xb(a){Pa.call(this);this.defines={PHYSICAL:\"\"};this.type=\"MeshPhysicalMaterial\";this.reflectivity=.5;this.clearCoatRoughness=this.clearCoat=0;this.setValues(a)}function Fa(a){J.call(this);\nthis.type=\"MeshPhongMaterial\";this.color=new G(16777215);this.specular=new G(1118481);this.shininess=30;this.lightMap=this.map=null;this.lightMapIntensity=1;this.aoMap=null;this.aoMapIntensity=1;this.emissive=new G(0);this.emissiveIntensity=1;this.bumpMap=this.emissiveMap=null;this.bumpScale=1;this.normalMap=null;this.normalMapType=0;this.normalScale=new z(1,1);this.displacementMap=null;this.displacementScale=1;this.displacementBias=0;this.envMap=this.alphaMap=this.specularMap=null;this.combine=0;\nthis.reflectivity=1;this.refractionRatio=.98;this.wireframe=!1;this.wireframeLinewidth=1;this.wireframeLinejoin=this.wireframeLinecap=\"round\";this.morphNormals=this.morphTargets=this.skinning=!1;this.setValues(a)}function yb(a){Fa.call(this);this.defines={TOON:\"\"};this.type=\"MeshToonMaterial\";this.gradientMap=null;this.setValues(a)}function zb(a){J.call(this);this.type=\"MeshNormalMaterial\";this.bumpMap=null;this.bumpScale=1;this.normalMap=null;this.normalMapType=0;this.normalScale=new z(1,1);this.displacementMap=\nnull;this.displacementScale=1;this.displacementBias=0;this.wireframe=!1;this.wireframeLinewidth=1;this.morphNormals=this.morphTargets=this.skinning=this.lights=this.fog=!1;this.setValues(a)}function Ab(a){J.call(this);this.type=\"MeshLambertMaterial\";this.color=new G(16777215);this.lightMap=this.map=null;this.lightMapIntensity=1;this.aoMap=null;this.aoMapIntensity=1;this.emissive=new G(0);this.emissiveIntensity=1;this.envMap=this.alphaMap=this.specularMap=this.emissiveMap=null;this.combine=0;this.reflectivity=\n1;this.refractionRatio=.98;this.wireframe=!1;this.wireframeLinewidth=1;this.wireframeLinejoin=this.wireframeLinecap=\"round\";this.morphNormals=this.morphTargets=this.skinning=!1;this.setValues(a)}function Bb(a){Y.call(this);this.type=\"LineDashedMaterial\";this.scale=1;this.dashSize=3;this.gapSize=1;this.setValues(a)}function ce(a,b,c){var d=this,e=!1,f=0,g=0,h=void 0;this.onStart=void 0;this.onLoad=a;this.onProgress=b;this.onError=c;this.itemStart=function(a){g++;if(!1===e&&void 0!==d.onStart)d.onStart(a,\nf,g);e=!0};this.itemEnd=function(a){f++;if(void 0!==d.onProgress)d.onProgress(a,f,g);if(f===g&&(e=!1,void 0!==d.onLoad))d.onLoad()};this.itemError=function(a){if(void 0!==d.onError)d.onError(a)};this.resolveURL=function(a){return h?h(a):a};this.setURLModifier=function(a){h=a;return this}}function Ga(a){this.manager=void 0!==a?a:ka}function kf(a){this.manager=void 0!==a?a:ka;this._parser=null}function de(a){this.manager=void 0!==a?a:ka;this._parser=null}function Zc(a){this.manager=void 0!==a?a:ka}\nfunction ee(a){this.manager=void 0!==a?a:ka}function vd(a){this.manager=void 0!==a?a:ka}function L(){this.type=\"Curve\";this.arcLengthDivisions=200}function za(a,b,c,d,e,f,g,h){L.call(this);this.type=\"EllipseCurve\";this.aX=a||0;this.aY=b||0;this.xRadius=c||1;this.yRadius=d||1;this.aStartAngle=e||0;this.aEndAngle=f||2*Math.PI;this.aClockwise=g||!1;this.aRotation=h||0}function dc(a,b,c,d,e,f){za.call(this,a,b,c,c,d,e,f);this.type=\"ArcCurve\"}function fe(){var a=0,b=0,c=0,d=0;return{initCatmullRom:function(e,\nf,g,h,k){e=k*(g-e);h=k*(h-f);a=f;b=e;c=-3*f+3*g-2*e-h;d=2*f-2*g+e+h},initNonuniformCatmullRom:function(e,f,g,h,k,m,q){e=((f-e)/k-(g-e)/(k+m)+(g-f)/m)*m;h=((g-f)/m-(h-f)/(m+q)+(h-g)/q)*m;a=f;b=e;c=-3*f+3*g-2*e-h;d=2*f-2*g+e+h},calc:function(e){var f=e*e;return a+b*e+c*f+d*f*e}}}function ca(a,b,c,d){L.call(this);this.type=\"CatmullRomCurve3\";this.points=a||[];this.closed=b||!1;this.curveType=c||\"centripetal\";this.tension=d||.5}function lf(a,b,c,d,e){b=.5*(d-b);e=.5*(e-c);var f=a*a;return(2*c-2*d+b+e)*\na*f+(-3*c+3*d-2*b-e)*f+b*a+c}function $c(a,b,c,d){var e=1-a;return e*e*b+2*(1-a)*a*c+a*a*d}function ad(a,b,c,d,e){var f=1-a,g=1-a;return f*f*f*b+3*g*g*a*c+3*(1-a)*a*a*d+a*a*a*e}function Ha(a,b,c,d){L.call(this);this.type=\"CubicBezierCurve\";this.v0=a||new z;this.v1=b||new z;this.v2=c||new z;this.v3=d||new z}function Qa(a,b,c,d){L.call(this);this.type=\"CubicBezierCurve3\";this.v0=a||new p;this.v1=b||new p;this.v2=c||new p;this.v3=d||new p}function va(a,b){L.call(this);this.type=\"LineCurve\";this.v1=a||\nnew z;this.v2=b||new z}function Ia(a,b){L.call(this);this.type=\"LineCurve3\";this.v1=a||new p;this.v2=b||new p}function Ja(a,b,c){L.call(this);this.type=\"QuadraticBezierCurve\";this.v0=a||new z;this.v1=b||new z;this.v2=c||new z}function Ra(a,b,c){L.call(this);this.type=\"QuadraticBezierCurve3\";this.v0=a||new p;this.v1=b||new p;this.v2=c||new p}function Ka(a){L.call(this);this.type=\"SplineCurve\";this.points=a||[]}function Xa(){L.call(this);this.type=\"CurvePath\";this.curves=[];this.autoClose=!1}function La(a){Xa.call(this);\nthis.type=\"Path\";this.currentPoint=new z;a&&this.setFromPoints(a)}function db(a){La.call(this,a);this.uuid=H.generateUUID();this.type=\"Shape\";this.holes=[]}function X(a,b){D.call(this);this.type=\"Light\";this.color=new G(a);this.intensity=void 0!==b?b:1;this.receiveShadow=void 0}function wd(a,b,c){X.call(this,a,c);this.type=\"HemisphereLight\";this.castShadow=void 0;this.position.copy(D.DefaultUp);this.updateMatrix();this.groundColor=new G(b)}function Cb(a){this.camera=a;this.bias=0;this.radius=1;this.mapSize=\nnew z(512,512);this.map=null;this.matrix=new I}function xd(){Cb.call(this,new Z(50,1,.5,500))}function yd(a,b,c,d,e,f){X.call(this,a,b);this.type=\"SpotLight\";this.position.copy(D.DefaultUp);this.updateMatrix();this.target=new D;Object.defineProperty(this,\"power\",{get:function(){return this.intensity*Math.PI},set:function(a){this.intensity=a/Math.PI}});this.distance=void 0!==c?c:0;this.angle=void 0!==d?d:Math.PI/3;this.penumbra=void 0!==e?e:0;this.decay=void 0!==f?f:1;this.shadow=new xd}function zd(a,\nb,c,d){X.call(this,a,b);this.type=\"PointLight\";Object.defineProperty(this,\"power\",{get:function(){return 4*this.intensity*Math.PI},set:function(a){this.intensity=a/(4*Math.PI)}});this.distance=void 0!==c?c:0;this.decay=void 0!==d?d:1;this.shadow=new Cb(new Z(90,1,.5,500))}function Ad(){Cb.call(this,new Hb(-5,5,5,-5,.5,500))}function Bd(a,b){X.call(this,a,b);this.type=\"DirectionalLight\";this.position.copy(D.DefaultUp);this.updateMatrix();this.target=new D;this.shadow=new Ad}function Cd(a,b){X.call(this,\na,b);this.type=\"AmbientLight\";this.castShadow=void 0}function Dd(a,b,c,d){X.call(this,a,b);this.type=\"RectAreaLight\";this.width=void 0!==c?c:10;this.height=void 0!==d?d:10}function wa(a,b,c,d){this.parameterPositions=a;this._cachedIndex=0;this.resultBuffer=void 0!==d?d:new b.constructor(c);this.sampleValues=b;this.valueSize=c}function Ed(a,b,c,d){wa.call(this,a,b,c,d);this._offsetNext=this._weightNext=this._offsetPrev=this._weightPrev=-0}function bd(a,b,c,d){wa.call(this,a,b,c,d)}function Fd(a,b,\nc,d){wa.call(this,a,b,c,d)}function oa(a,b,c,d){if(void 0===a)throw Error(\"THREE.KeyframeTrack: track name is undefined\");if(void 0===b||0===b.length)throw Error(\"THREE.KeyframeTrack: no keyframes in track named \"+a);this.name=a;this.times=ia.convertArray(b,this.TimeBufferType);this.values=ia.convertArray(c,this.ValueBufferType);this.setInterpolation(d||this.DefaultInterpolation)}function Gd(a,b,c){oa.call(this,a,b,c)}function Hd(a,b,c,d){oa.call(this,a,b,c,d)}function ec(a,b,c,d){oa.call(this,a,\nb,c,d)}function Id(a,b,c,d){wa.call(this,a,b,c,d)}function cd(a,b,c,d){oa.call(this,a,b,c,d)}function Jd(a,b,c,d){oa.call(this,a,b,c,d)}function fc(a,b,c,d){oa.call(this,a,b,c,d)}function Ca(a,b,c){this.name=a;this.tracks=c;this.duration=void 0!==b?b:-1;this.uuid=H.generateUUID();0>this.duration&&this.resetDuration()}function Rg(a){switch(a.toLowerCase()){case \"scalar\":case \"double\":case \"float\":case \"number\":case \"integer\":return ec;case \"vector\":case \"vector2\":case \"vector3\":case \"vector4\":return fc;\ncase \"color\":return Hd;case \"quaternion\":return cd;case \"bool\":case \"boolean\":return Gd;case \"string\":return Jd}throw Error(\"THREE.KeyframeTrack: Unsupported typeName: \"+a);}function Sg(a){if(void 0===a.type)throw Error(\"THREE.KeyframeTrack: track type undefined, can not parse\");var b=Rg(a.type);if(void 0===a.times){var c=[],d=[];ia.flattenJSON(a.keys,c,d,\"value\");a.times=c;a.values=d}return void 0!==b.parse?b.parse(a):new b(a.name,a.times,a.values,a.interpolation)}function Kd(a){this.manager=void 0!==\na?a:ka;this.textures={}}function ge(a){this.manager=void 0!==a?a:ka}function gc(){}function he(a){\"boolean\"===typeof a&&(console.warn(\"THREE.JSONLoader: showStatus parameter has been removed from constructor.\"),a=void 0);this.manager=void 0!==a?a:ka;this.withCredentials=!1}function mf(a){this.manager=void 0!==a?a:ka;this.texturePath=\"\"}function ie(a){\"undefined\"===typeof createImageBitmap&&console.warn(\"THREE.ImageBitmapLoader: createImageBitmap() not supported.\");\"undefined\"===typeof fetch&&console.warn(\"THREE.ImageBitmapLoader: fetch() not supported.\");\nthis.manager=void 0!==a?a:ka;this.options=void 0}function je(){this.type=\"ShapePath\";this.color=new G;this.subPaths=[];this.currentPath=null}function ke(a){this.type=\"Font\";this.data=a}function nf(a){this.manager=void 0!==a?a:ka}function le(a){this.manager=void 0!==a?a:ka}function of(){this.type=\"StereoCamera\";this.aspect=1;this.eyeSep=.064;this.cameraL=new Z;this.cameraL.layers.enable(1);this.cameraL.matrixAutoUpdate=!1;this.cameraR=new Z;this.cameraR.layers.enable(2);this.cameraR.matrixAutoUpdate=\n!1}function dd(a,b,c){D.call(this);this.type=\"CubeCamera\";var d=new Z(90,1,a,b);d.up.set(0,-1,0);d.lookAt(new p(1,0,0));this.add(d);var e=new Z(90,1,a,b);e.up.set(0,-1,0);e.lookAt(new p(-1,0,0));this.add(e);var f=new Z(90,1,a,b);f.up.set(0,0,1);f.lookAt(new p(0,1,0));this.add(f);var g=new Z(90,1,a,b);g.up.set(0,0,-1);g.lookAt(new p(0,-1,0));this.add(g);var h=new Z(90,1,a,b);h.up.set(0,-1,0);h.lookAt(new p(0,0,1));this.add(h);var k=new Z(90,1,a,b);k.up.set(0,-1,0);k.lookAt(new p(0,0,-1));this.add(k);\nthis.renderTarget=new Gb(c,c,{format:1022,magFilter:1006,minFilter:1006});this.renderTarget.texture.name=\"CubeCamera\";this.update=function(a,b){null===this.parent&&this.updateMatrixWorld();var c=this.renderTarget,m=c.texture.generateMipmaps;c.texture.generateMipmaps=!1;c.activeCubeFace=0;a.render(b,d,c);c.activeCubeFace=1;a.render(b,e,c);c.activeCubeFace=2;a.render(b,f,c);c.activeCubeFace=3;a.render(b,g,c);c.activeCubeFace=4;a.render(b,h,c);c.texture.generateMipmaps=m;c.activeCubeFace=5;a.render(b,\nk,c);a.setRenderTarget(null)};this.clear=function(a,b,c,d){for(var e=this.renderTarget,f=0;6>f;f++)e.activeCubeFace=f,a.setRenderTarget(e),a.clear(b,c,d);a.setRenderTarget(null)}}function me(){D.call(this);this.type=\"AudioListener\";this.context=ne.getContext();this.gain=this.context.createGain();this.gain.connect(this.context.destination);this.filter=null}function hc(a){D.call(this);this.type=\"Audio\";this.context=a.context;this.gain=this.context.createGain();this.gain.connect(a.getInput());this.autoplay=\n!1;this.buffer=null;this.loop=!1;this.offset=this.startTime=0;this.playbackRate=1;this.isPlaying=!1;this.hasPlaybackControl=!0;this.sourceType=\"empty\";this.filters=[]}function oe(a){hc.call(this,a);this.panner=this.context.createPanner();this.panner.connect(this.gain)}function pe(a,b){this.analyser=a.context.createAnalyser();this.analyser.fftSize=void 0!==b?b:2048;this.data=new Uint8Array(this.analyser.frequencyBinCount);a.getOutput().connect(this.analyser)}function qe(a,b,c){this.binding=a;this.valueSize=\nc;a=Float64Array;switch(b){case \"quaternion\":b=this._slerp;break;case \"string\":case \"bool\":a=Array;b=this._select;break;default:b=this._lerp}this.buffer=new a(4*c);this._mixBufferRegion=b;this.referenceCount=this.useCount=this.cumulativeWeight=0}function pf(a,b,c){c=c||pa.parseTrackName(b);this._targetGroup=a;this._bindings=a.subscribe_(b,c)}function pa(a,b,c){this.path=b;this.parsedPath=c||pa.parseTrackName(b);this.node=pa.findNode(a,this.parsedPath.nodeName)||a;this.rootNode=a}function qf(){this.uuid=\nH.generateUUID();this._objects=Array.prototype.slice.call(arguments);this.nCachedObjects_=0;var a={};this._indicesByUUID=a;for(var b=0,c=arguments.length;b!==c;++b)a[arguments[b].uuid]=b;this._paths=[];this._parsedPaths=[];this._bindings=[];this._bindingsIndicesByPath={};var d=this;this.stats={objects:{get total(){return d._objects.length},get inUse(){return this.total-d.nCachedObjects_}},get bindingsPerObject(){return d._bindings.length}}}function rf(a,b,c){this._mixer=a;this._clip=b;this._localRoot=\nc||null;a=b.tracks;b=a.length;c=Array(b);for(var d={endingStart:2400,endingEnd:2400},e=0;e!==b;++e){var f=a[e].createInterpolant(null);c[e]=f;f.settings=d}this._interpolantSettings=d;this._interpolants=c;this._propertyBindings=Array(b);this._weightInterpolant=this._timeScaleInterpolant=this._byClipCacheIndex=this._cacheIndex=null;this.loop=2201;this._loopCount=-1;this._startTime=null;this.time=0;this._effectiveWeight=this.weight=this._effectiveTimeScale=this.timeScale=1;this.repetitions=Infinity;\nthis.paused=!1;this.enabled=!0;this.clampWhenFinished=!1;this.zeroSlopeAtEnd=this.zeroSlopeAtStart=!0}function re(a){this._root=a;this._initMemoryManager();this.time=this._accuIndex=0;this.timeScale=1}function Ld(a,b){\"string\"===typeof a&&(console.warn(\"THREE.Uniform: Type parameter is no longer needed.\"),a=b);this.value=a}function se(){C.call(this);this.type=\"InstancedBufferGeometry\";this.maxInstancedCount=void 0}function te(a,b,c){ob.call(this,a,b);this.meshPerAttribute=c||1}function ue(a,b,c){Q.call(this,\na,b);this.meshPerAttribute=c||1}function sf(a,b,c,d){this.ray=new mb(a,b);this.near=c||0;this.far=d||Infinity;this.params={Mesh:{},Line:{},LOD:{},Points:{threshold:1},Sprite:{}};Object.defineProperties(this.params,{PointCloud:{get:function(){console.warn(\"THREE.Raycaster: params.PointCloud has been renamed to params.Points.\");return this.Points}}})}function tf(a,b){return a.distance-b.distance}function ve(a,b,c,d){if(!1!==a.visible&&(a.raycast(b,c),!0===d)){a=a.children;d=0;for(var e=a.length;d<e;d++)ve(a[d],\nb,c,!0)}}function uf(a){this.autoStart=void 0!==a?a:!0;this.elapsedTime=this.oldTime=this.startTime=0;this.running=!1}function vf(a,b,c){this.radius=void 0!==a?a:1;this.phi=void 0!==b?b:0;this.theta=void 0!==c?c:0;return this}function wf(a,b,c){this.radius=void 0!==a?a:1;this.theta=void 0!==b?b:0;this.y=void 0!==c?c:0;return this}function we(a,b){this.min=void 0!==a?a:new z(Infinity,Infinity);this.max=void 0!==b?b:new z(-Infinity,-Infinity)}function xe(a,b){this.start=void 0!==a?a:new p;this.end=\nvoid 0!==b?b:new p}function ed(a){D.call(this);this.material=a;this.render=function(){}}function fd(a,b,c,d){this.object=a;this.size=void 0!==b?b:1;a=void 0!==c?c:16711680;d=void 0!==d?d:1;b=0;(c=this.object.geometry)&&c.isGeometry?b=3*c.faces.length:c&&c.isBufferGeometry&&(b=c.attributes.normal.count);c=new C;b=new A(6*b,3);c.addAttribute(\"position\",b);W.call(this,c,new Y({color:a,linewidth:d}));this.matrixAutoUpdate=!1;this.update()}function ic(a,b){D.call(this);this.light=a;this.light.updateMatrixWorld();\nthis.matrix=a.matrixWorld;this.matrixAutoUpdate=!1;this.color=b;a=new C;b=[0,0,0,0,0,1,0,0,0,1,0,1,0,0,0,-1,0,1,0,0,0,0,1,1,0,0,0,0,-1,1];for(var c=0,d=1;32>c;c++,d++){var e=c/32*Math.PI*2,f=d/32*Math.PI*2;b.push(Math.cos(e),Math.sin(e),1,Math.cos(f),Math.sin(f),1)}a.addAttribute(\"position\",new A(b,3));b=new Y({fog:!1});this.cone=new W(a,b);this.add(this.cone);this.update()}function xf(a){var b=[];a&&a.isBone&&b.push(a);for(var c=0;c<a.children.length;c++)b.push.apply(b,xf(a.children[c]));return b}\nfunction jc(a){for(var b=xf(a),c=new C,d=[],e=[],f=new G(0,0,1),g=new G(0,1,0),h=0;h<b.length;h++){var k=b[h];k.parent&&k.parent.isBone&&(d.push(0,0,0),d.push(0,0,0),e.push(f.r,f.g,f.b),e.push(g.r,g.g,g.b))}c.addAttribute(\"position\",new A(d,3));c.addAttribute(\"color\",new A(e,3));d=new Y({vertexColors:2,depthTest:!1,depthWrite:!1,transparent:!0});W.call(this,c,d);this.root=a;this.bones=b;this.matrix=a.matrixWorld;this.matrixAutoUpdate=!1}function kc(a,b,c){this.light=a;this.light.updateMatrixWorld();\nthis.color=c;a=new sb(b,4,2);b=new da({wireframe:!0,fog:!1});la.call(this,a,b);this.matrix=this.light.matrixWorld;this.matrixAutoUpdate=!1;this.update()}function lc(a,b){D.call(this);this.light=a;this.light.updateMatrixWorld();this.matrix=a.matrixWorld;this.matrixAutoUpdate=!1;this.color=b;a=new Y({fog:!1});b=new C;b.addAttribute(\"position\",new Q(new Float32Array(15),3));this.line=new sa(b,a);this.add(this.line);this.update()}function mc(a,b,c){D.call(this);this.light=a;this.light.updateMatrixWorld();\nthis.matrix=a.matrixWorld;this.matrixAutoUpdate=!1;this.color=c;a=new pb(b);a.rotateY(.5*Math.PI);this.material=new da({wireframe:!0,fog:!1});void 0===this.color&&(this.material.vertexColors=2);b=a.getAttribute(\"position\");b=new Float32Array(3*b.count);a.addAttribute(\"color\",new Q(b,3));this.add(new la(a,this.material));this.update()}function gd(a,b,c,d){a=a||10;b=b||10;c=new G(void 0!==c?c:4473924);d=new G(void 0!==d?d:8947848);var e=b/2,f=a/b,g=a/2;a=[];for(var h=[],k=0,m=0,q=-g;k<=b;k++,q+=f){a.push(-g,\n0,q,g,0,q);a.push(q,0,-g,q,0,g);var n=k===e?c:d;n.toArray(h,m);m+=3;n.toArray(h,m);m+=3;n.toArray(h,m);m+=3;n.toArray(h,m);m+=3}b=new C;b.addAttribute(\"position\",new A(a,3));b.addAttribute(\"color\",new A(h,3));c=new Y({vertexColors:2});W.call(this,b,c)}function Md(a,b,c,d,e,f){a=a||10;b=b||16;c=c||8;d=d||64;e=new G(void 0!==e?e:4473924);f=new G(void 0!==f?f:8947848);var g=[],h=[],k;for(k=0;k<=b;k++){var m=k/b*2*Math.PI;var q=Math.sin(m)*a;m=Math.cos(m)*a;g.push(0,0,0);g.push(q,0,m);var n=k&1?e:f;h.push(n.r,\nn.g,n.b);h.push(n.r,n.g,n.b)}for(k=0;k<=c;k++){n=k&1?e:f;var l=a-a/c*k;for(b=0;b<d;b++)m=b/d*2*Math.PI,q=Math.sin(m)*l,m=Math.cos(m)*l,g.push(q,0,m),h.push(n.r,n.g,n.b),m=(b+1)/d*2*Math.PI,q=Math.sin(m)*l,m=Math.cos(m)*l,g.push(q,0,m),h.push(n.r,n.g,n.b)}a=new C;a.addAttribute(\"position\",new A(g,3));a.addAttribute(\"color\",new A(h,3));g=new Y({vertexColors:2});W.call(this,a,g)}function hd(a,b,c,d){this.object=a;this.size=void 0!==b?b:1;a=void 0!==c?c:16776960;d=void 0!==d?d:1;b=0;(c=this.object.geometry)&&\nc.isGeometry?b=c.faces.length:console.warn(\"THREE.FaceNormalsHelper: only THREE.Geometry is supported. Use THREE.VertexNormalsHelper, instead.\");c=new C;b=new A(6*b,3);c.addAttribute(\"position\",b);W.call(this,c,new Y({color:a,linewidth:d}));this.matrixAutoUpdate=!1;this.update()}function nc(a,b,c){D.call(this);this.light=a;this.light.updateMatrixWorld();this.matrix=a.matrixWorld;this.matrixAutoUpdate=!1;this.color=c;void 0===b&&(b=1);a=new C;a.addAttribute(\"position\",new A([-b,b,0,b,b,0,b,-b,0,-b,\n-b,0,-b,b,0],3));b=new Y({fog:!1});this.lightPlane=new sa(a,b);this.add(this.lightPlane);a=new C;a.addAttribute(\"position\",new A([0,0,0,0,0,1],3));this.targetLine=new sa(a,b);this.add(this.targetLine);this.update()}function id(a){function b(a,b,d){c(a,d);c(b,d)}function c(a,b){f.push(0,0,0);g.push(b.r,b.g,b.b);void 0===h[a]&&(h[a]=[]);h[a].push(f.length/3-1)}var d=new C,e=new Y({color:16777215,vertexColors:1}),f=[],g=[],h={},k=new G(16755200),m=new G(16711680),q=new G(43775),n=new G(16777215),l=new G(3355443);\nb(\"n1\",\"n2\",k);b(\"n2\",\"n4\",k);b(\"n4\",\"n3\",k);b(\"n3\",\"n1\",k);b(\"f1\",\"f2\",k);b(\"f2\",\"f4\",k);b(\"f4\",\"f3\",k);b(\"f3\",\"f1\",k);b(\"n1\",\"f1\",k);b(\"n2\",\"f2\",k);b(\"n3\",\"f3\",k);b(\"n4\",\"f4\",k);b(\"p\",\"n1\",m);b(\"p\",\"n2\",m);b(\"p\",\"n3\",m);b(\"p\",\"n4\",m);b(\"u1\",\"u2\",q);b(\"u2\",\"u3\",q);b(\"u3\",\"u1\",q);b(\"c\",\"t\",n);b(\"p\",\"c\",l);b(\"cn1\",\"cn2\",l);b(\"cn3\",\"cn4\",l);b(\"cf1\",\"cf2\",l);b(\"cf3\",\"cf4\",l);d.addAttribute(\"position\",new A(f,3));d.addAttribute(\"color\",new A(g,3));W.call(this,d,e);this.camera=a;this.camera.updateProjectionMatrix&&\nthis.camera.updateProjectionMatrix();this.matrix=a.matrixWorld;this.matrixAutoUpdate=!1;this.pointMap=h;this.update()}function Db(a,b){this.object=a;void 0===b&&(b=16776960);a=new Uint16Array([0,1,1,2,2,3,3,0,4,5,5,6,6,7,7,4,0,4,1,5,2,6,3,7]);var c=new Float32Array(24),d=new C;d.setIndex(new Q(a,1));d.addAttribute(\"position\",new Q(c,3));W.call(this,d,new Y({color:b}));this.matrixAutoUpdate=!1;this.update()}function jd(a,b){this.type=\"Box3Helper\";this.box=a;a=void 0!==b?b:16776960;b=new Uint16Array([0,\n1,1,2,2,3,3,0,4,5,5,6,6,7,7,4,0,4,1,5,2,6,3,7]);var c=new C;c.setIndex(new Q(b,1));c.addAttribute(\"position\",new A([1,1,1,-1,1,1,-1,-1,1,1,-1,1,1,1,-1,-1,1,-1,-1,-1,-1,1,-1,-1],3));W.call(this,c,new Y({color:a}));this.geometry.computeBoundingSphere()}function kd(a,b,c){this.type=\"PlaneHelper\";this.plane=a;this.size=void 0===b?1:b;a=void 0!==c?c:16776960;b=new C;b.addAttribute(\"position\",new A([1,-1,1,-1,1,1,-1,-1,1,1,1,1,-1,1,1,-1,-1,1,1,-1,1,1,1,1,0,0,1,0,0,0],3));b.computeBoundingSphere();sa.call(this,\nb,new Y({color:a}));b=new C;b.addAttribute(\"position\",new A([1,1,1,-1,1,1,-1,-1,1,1,1,1,-1,-1,1,1,-1,1],3));b.computeBoundingSphere();this.add(new la(b,new da({color:a,opacity:.2,transparent:!0,depthWrite:!1})))}function Eb(a,b,c,d,e,f){D.call(this);void 0===d&&(d=16776960);void 0===c&&(c=1);void 0===e&&(e=.2*c);void 0===f&&(f=.2*e);void 0===Nd&&(Nd=new C,Nd.addAttribute(\"position\",new A([0,0,0,0,1,0],3)),ye=new Wa(0,.5,1,5,1),ye.translate(0,-.5,0));this.position.copy(b);this.line=new sa(Nd,new Y({color:d}));\nthis.line.matrixAutoUpdate=!1;this.add(this.line);this.cone=new la(ye,new da({color:d}));this.cone.matrixAutoUpdate=!1;this.add(this.cone);this.setDirection(a);this.setLength(c,e,f)}function ld(a){a=a||1;var b=[0,0,0,a,0,0,0,0,0,0,a,0,0,0,0,0,0,a];a=new C;a.addAttribute(\"position\",new A(b,3));a.addAttribute(\"color\",new A([1,0,0,1,.6,0,0,1,0,.6,1,0,0,0,1,0,.6,1],3));b=new Y({vertexColors:2});W.call(this,a,b)}function yf(a){console.warn(\"THREE.ClosedSplineCurve3 has been deprecated. Use THREE.CatmullRomCurve3 instead.\");\nca.call(this,a);this.type=\"catmullrom\";this.closed=!0}function zf(a){console.warn(\"THREE.SplineCurve3 has been deprecated. Use THREE.CatmullRomCurve3 instead.\");ca.call(this,a);this.type=\"catmullrom\"}function ze(a){console.warn(\"THREE.Spline has been removed. Use THREE.CatmullRomCurve3 instead.\");ca.call(this,a);this.type=\"catmullrom\"}void 0===Number.EPSILON&&(Number.EPSILON=Math.pow(2,-52));void 0===Number.isInteger&&(Number.isInteger=function(a){return\"number\"===typeof a&&isFinite(a)&&Math.floor(a)===\na});void 0===Math.sign&&(Math.sign=function(a){return 0>a?-1:0<a?1:+a});!1===\"name\"in Function.prototype&&Object.defineProperty(Function.prototype,\"name\",{get:function(){return this.toString().match(/^\\s*function\\s*([^\\(\\s]*)/)[1]}});void 0===Object.assign&&function(){Object.assign=function(a){if(void 0===a||null===a)throw new TypeError(\"Cannot convert undefined or null to object\");for(var b=Object(a),c=1;c<arguments.length;c++){var d=arguments[c];if(void 0!==d&&null!==d)for(var e in d)Object.prototype.hasOwnProperty.call(d,\ne)&&(b[e]=d[e])}return b}}();Object.assign(ya.prototype,{addEventListener:function(a,b){void 0===this._listeners&&(this._listeners={});var c=this._listeners;void 0===c[a]&&(c[a]=[]);-1===c[a].indexOf(b)&&c[a].push(b)},hasEventListener:function(a,b){if(void 0===this._listeners)return!1;var c=this._listeners;return void 0!==c[a]&&-1!==c[a].indexOf(b)},removeEventListener:function(a,b){void 0!==this._listeners&&(a=this._listeners[a],void 0!==a&&(b=a.indexOf(b),-1!==b&&a.splice(b,1)))},dispatchEvent:function(a){if(void 0!==\nthis._listeners){var b=this._listeners[a.type];if(void 0!==b){a.target=this;b=b.slice(0);for(var c=0,d=b.length;c<d;c++)b[c].call(this,a)}}}});var H={DEG2RAD:Math.PI/180,RAD2DEG:180/Math.PI,generateUUID:function(){for(var a=[],b=0;256>b;b++)a[b]=(16>b?\"0\":\"\")+b.toString(16);return function(){var b=4294967295*Math.random()|0,d=4294967295*Math.random()|0,e=4294967295*Math.random()|0,f=4294967295*Math.random()|0;return(a[b&255]+a[b>>8&255]+a[b>>16&255]+a[b>>24&255]+\"-\"+a[d&255]+a[d>>8&255]+\"-\"+a[d>>\n16&15|64]+a[d>>24&255]+\"-\"+a[e&63|128]+a[e>>8&255]+\"-\"+a[e>>16&255]+a[e>>24&255]+a[f&255]+a[f>>8&255]+a[f>>16&255]+a[f>>24&255]).toUpperCase()}}(),clamp:function(a,b,c){return Math.max(b,Math.min(c,a))},euclideanModulo:function(a,b){return(a%b+b)%b},mapLinear:function(a,b,c,d,e){return d+(a-b)*(e-d)/(c-b)},lerp:function(a,b,c){return(1-c)*a+c*b},smoothstep:function(a,b,c){if(a<=b)return 0;if(a>=c)return 1;a=(a-b)/(c-b);return a*a*(3-2*a)},smootherstep:function(a,b,c){if(a<=b)return 0;if(a>=c)return 1;\na=(a-b)/(c-b);return a*a*a*(a*(6*a-15)+10)},randInt:function(a,b){return a+Math.floor(Math.random()*(b-a+1))},randFloat:function(a,b){return a+Math.random()*(b-a)},randFloatSpread:function(a){return a*(.5-Math.random())},degToRad:function(a){return a*H.DEG2RAD},radToDeg:function(a){return a*H.RAD2DEG},isPowerOfTwo:function(a){return 0===(a&a-1)&&0!==a},ceilPowerOfTwo:function(a){return Math.pow(2,Math.ceil(Math.log(a)/Math.LN2))},floorPowerOfTwo:function(a){return Math.pow(2,Math.floor(Math.log(a)/\nMath.LN2))}};Object.defineProperties(z.prototype,{width:{get:function(){return this.x},set:function(a){this.x=a}},height:{get:function(){return this.y},set:function(a){this.y=a}}});Object.assign(z.prototype,{isVector2:!0,set:function(a,b){this.x=a;this.y=b;return this},setScalar:function(a){this.y=this.x=a;return this},setX:function(a){this.x=a;return this},setY:function(a){this.y=a;return this},setComponent:function(a,b){switch(a){case 0:this.x=b;break;case 1:this.y=b;break;default:throw Error(\"index is out of range: \"+\na);}return this},getComponent:function(a){switch(a){case 0:return this.x;case 1:return this.y;default:throw Error(\"index is out of range: \"+a);}},clone:function(){return new this.constructor(this.x,this.y)},copy:function(a){this.x=a.x;this.y=a.y;return this},add:function(a,b){if(void 0!==b)return console.warn(\"THREE.Vector2: .add() now only accepts one argument. Use .addVectors( a, b ) instead.\"),this.addVectors(a,b);this.x+=a.x;this.y+=a.y;return this},addScalar:function(a){this.x+=a;this.y+=a;return this},\naddVectors:function(a,b){this.x=a.x+b.x;this.y=a.y+b.y;return this},addScaledVector:function(a,b){this.x+=a.x*b;this.y+=a.y*b;return this},sub:function(a,b){if(void 0!==b)return console.warn(\"THREE.Vector2: .sub() now only accepts one argument. Use .subVectors( a, b ) instead.\"),this.subVectors(a,b);this.x-=a.x;this.y-=a.y;return this},subScalar:function(a){this.x-=a;this.y-=a;return this},subVectors:function(a,b){this.x=a.x-b.x;this.y=a.y-b.y;return this},multiply:function(a){this.x*=a.x;this.y*=\na.y;return this},multiplyScalar:function(a){this.x*=a;this.y*=a;return this},divide:function(a){this.x/=a.x;this.y/=a.y;return this},divideScalar:function(a){return this.multiplyScalar(1/a)},applyMatrix3:function(a){var b=this.x,c=this.y;a=a.elements;this.x=a[0]*b+a[3]*c+a[6];this.y=a[1]*b+a[4]*c+a[7];return this},min:function(a){this.x=Math.min(this.x,a.x);this.y=Math.min(this.y,a.y);return this},max:function(a){this.x=Math.max(this.x,a.x);this.y=Math.max(this.y,a.y);return this},clamp:function(a,\nb){this.x=Math.max(a.x,Math.min(b.x,this.x));this.y=Math.max(a.y,Math.min(b.y,this.y));return this},clampScalar:function(){var a=new z,b=new z;return function(c,d){a.set(c,c);b.set(d,d);return this.clamp(a,b)}}(),clampLength:function(a,b){var c=this.length();return this.divideScalar(c||1).multiplyScalar(Math.max(a,Math.min(b,c)))},floor:function(){this.x=Math.floor(this.x);this.y=Math.floor(this.y);return this},ceil:function(){this.x=Math.ceil(this.x);this.y=Math.ceil(this.y);return this},round:function(){this.x=\nMath.round(this.x);this.y=Math.round(this.y);return this},roundToZero:function(){this.x=0>this.x?Math.ceil(this.x):Math.floor(this.x);this.y=0>this.y?Math.ceil(this.y):Math.floor(this.y);return this},negate:function(){this.x=-this.x;this.y=-this.y;return this},dot:function(a){return this.x*a.x+this.y*a.y},cross:function(a){return this.x*a.y-this.y*a.x},lengthSq:function(){return this.x*this.x+this.y*this.y},length:function(){return Math.sqrt(this.x*this.x+this.y*this.y)},manhattanLength:function(){return Math.abs(this.x)+\nMath.abs(this.y)},normalize:function(){return this.divideScalar(this.length()||1)},angle:function(){var a=Math.atan2(this.y,this.x);0>a&&(a+=2*Math.PI);return a},distanceTo:function(a){return Math.sqrt(this.distanceToSquared(a))},distanceToSquared:function(a){var b=this.x-a.x;a=this.y-a.y;return b*b+a*a},manhattanDistanceTo:function(a){return Math.abs(this.x-a.x)+Math.abs(this.y-a.y)},setLength:function(a){return this.normalize().multiplyScalar(a)},lerp:function(a,b){this.x+=(a.x-this.x)*b;this.y+=\n(a.y-this.y)*b;return this},lerpVectors:function(a,b,c){return this.subVectors(b,a).multiplyScalar(c).add(a)},equals:function(a){return a.x===this.x&&a.y===this.y},fromArray:function(a,b){void 0===b&&(b=0);this.x=a[b];this.y=a[b+1];return this},toArray:function(a,b){void 0===a&&(a=[]);void 0===b&&(b=0);a[b]=this.x;a[b+1]=this.y;return a},fromBufferAttribute:function(a,b,c){void 0!==c&&console.warn(\"THREE.Vector2: offset has been removed from .fromBufferAttribute().\");this.x=a.getX(b);this.y=a.getY(b);\nreturn this},rotateAround:function(a,b){var c=Math.cos(b);b=Math.sin(b);var d=this.x-a.x,e=this.y-a.y;this.x=d*c-e*b+a.x;this.y=d*b+e*c+a.y;return this}});Object.assign(I.prototype,{isMatrix4:!0,set:function(a,b,c,d,e,f,g,h,k,m,q,n,l,u,r,p){var t=this.elements;t[0]=a;t[4]=b;t[8]=c;t[12]=d;t[1]=e;t[5]=f;t[9]=g;t[13]=h;t[2]=k;t[6]=m;t[10]=q;t[14]=n;t[3]=l;t[7]=u;t[11]=r;t[15]=p;return this},identity:function(){this.set(1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1);return this},clone:function(){return(new I).fromArray(this.elements)},\ncopy:function(a){var b=this.elements;a=a.elements;b[0]=a[0];b[1]=a[1];b[2]=a[2];b[3]=a[3];b[4]=a[4];b[5]=a[5];b[6]=a[6];b[7]=a[7];b[8]=a[8];b[9]=a[9];b[10]=a[10];b[11]=a[11];b[12]=a[12];b[13]=a[13];b[14]=a[14];b[15]=a[15];return this},copyPosition:function(a){var b=this.elements;a=a.elements;b[12]=a[12];b[13]=a[13];b[14]=a[14];return this},extractBasis:function(a,b,c){a.setFromMatrixColumn(this,0);b.setFromMatrixColumn(this,1);c.setFromMatrixColumn(this,2);return this},makeBasis:function(a,b,c){this.set(a.x,\nb.x,c.x,0,a.y,b.y,c.y,0,a.z,b.z,c.z,0,0,0,0,1);return this},extractRotation:function(){var a=new p;return function(b){var c=this.elements,d=b.elements,e=1/a.setFromMatrixColumn(b,0).length(),f=1/a.setFromMatrixColumn(b,1).length();b=1/a.setFromMatrixColumn(b,2).length();c[0]=d[0]*e;c[1]=d[1]*e;c[2]=d[2]*e;c[3]=0;c[4]=d[4]*f;c[5]=d[5]*f;c[6]=d[6]*f;c[7]=0;c[8]=d[8]*b;c[9]=d[9]*b;c[10]=d[10]*b;c[11]=0;c[12]=0;c[13]=0;c[14]=0;c[15]=1;return this}}(),makeRotationFromEuler:function(a){a&&a.isEuler||console.error(\"THREE.Matrix4: .makeRotationFromEuler() now expects a Euler rotation rather than a Vector3 and order.\");\nvar b=this.elements,c=a.x,d=a.y,e=a.z,f=Math.cos(c);c=Math.sin(c);var g=Math.cos(d);d=Math.sin(d);var h=Math.cos(e);e=Math.sin(e);if(\"XYZ\"===a.order){a=f*h;var k=f*e,m=c*h,q=c*e;b[0]=g*h;b[4]=-g*e;b[8]=d;b[1]=k+m*d;b[5]=a-q*d;b[9]=-c*g;b[2]=q-a*d;b[6]=m+k*d;b[10]=f*g}else\"YXZ\"===a.order?(a=g*h,k=g*e,m=d*h,q=d*e,b[0]=a+q*c,b[4]=m*c-k,b[8]=f*d,b[1]=f*e,b[5]=f*h,b[9]=-c,b[2]=k*c-m,b[6]=q+a*c,b[10]=f*g):\"ZXY\"===a.order?(a=g*h,k=g*e,m=d*h,q=d*e,b[0]=a-q*c,b[4]=-f*e,b[8]=m+k*c,b[1]=k+m*c,b[5]=f*h,b[9]=\nq-a*c,b[2]=-f*d,b[6]=c,b[10]=f*g):\"ZYX\"===a.order?(a=f*h,k=f*e,m=c*h,q=c*e,b[0]=g*h,b[4]=m*d-k,b[8]=a*d+q,b[1]=g*e,b[5]=q*d+a,b[9]=k*d-m,b[2]=-d,b[6]=c*g,b[10]=f*g):\"YZX\"===a.order?(a=f*g,k=f*d,m=c*g,q=c*d,b[0]=g*h,b[4]=q-a*e,b[8]=m*e+k,b[1]=e,b[5]=f*h,b[9]=-c*h,b[2]=-d*h,b[6]=k*e+m,b[10]=a-q*e):\"XZY\"===a.order&&(a=f*g,k=f*d,m=c*g,q=c*d,b[0]=g*h,b[4]=-e,b[8]=d*h,b[1]=a*e+q,b[5]=f*h,b[9]=k*e-m,b[2]=m*e-k,b[6]=c*h,b[10]=q*e+a);b[3]=0;b[7]=0;b[11]=0;b[12]=0;b[13]=0;b[14]=0;b[15]=1;return this},makeRotationFromQuaternion:function(){var a=\nnew p(0,0,0),b=new p(1,1,1);return function(c){return this.compose(a,c,b)}}(),lookAt:function(){var a=new p,b=new p,c=new p;return function(d,e,f){var g=this.elements;c.subVectors(d,e);0===c.lengthSq()&&(c.z=1);c.normalize();a.crossVectors(f,c);0===a.lengthSq()&&(1===Math.abs(f.z)?c.x+=1E-4:c.z+=1E-4,c.normalize(),a.crossVectors(f,c));a.normalize();b.crossVectors(c,a);g[0]=a.x;g[4]=b.x;g[8]=c.x;g[1]=a.y;g[5]=b.y;g[9]=c.y;g[2]=a.z;g[6]=b.z;g[10]=c.z;return this}}(),multiply:function(a,b){return void 0!==\nb?(console.warn(\"THREE.Matrix4: .multiply() now only accepts one argument. Use .multiplyMatrices( a, b ) instead.\"),this.multiplyMatrices(a,b)):this.multiplyMatrices(this,a)},premultiply:function(a){return this.multiplyMatrices(a,this)},multiplyMatrices:function(a,b){var c=a.elements,d=b.elements;b=this.elements;a=c[0];var e=c[4],f=c[8],g=c[12],h=c[1],k=c[5],m=c[9],q=c[13],n=c[2],l=c[6],u=c[10],r=c[14],p=c[3],y=c[7],x=c[11];c=c[15];var w=d[0],B=d[4],E=d[8],P=d[12],N=d[1],z=d[5],A=d[9],D=d[13],C=d[2],\nH=d[6],G=d[10],K=d[14],L=d[3],I=d[7],J=d[11];d=d[15];b[0]=a*w+e*N+f*C+g*L;b[4]=a*B+e*z+f*H+g*I;b[8]=a*E+e*A+f*G+g*J;b[12]=a*P+e*D+f*K+g*d;b[1]=h*w+k*N+m*C+q*L;b[5]=h*B+k*z+m*H+q*I;b[9]=h*E+k*A+m*G+q*J;b[13]=h*P+k*D+m*K+q*d;b[2]=n*w+l*N+u*C+r*L;b[6]=n*B+l*z+u*H+r*I;b[10]=n*E+l*A+u*G+r*J;b[14]=n*P+l*D+u*K+r*d;b[3]=p*w+y*N+x*C+c*L;b[7]=p*B+y*z+x*H+c*I;b[11]=p*E+y*A+x*G+c*J;b[15]=p*P+y*D+x*K+c*d;return this},multiplyScalar:function(a){var b=this.elements;b[0]*=a;b[4]*=a;b[8]*=a;b[12]*=a;b[1]*=a;b[5]*=\na;b[9]*=a;b[13]*=a;b[2]*=a;b[6]*=a;b[10]*=a;b[14]*=a;b[3]*=a;b[7]*=a;b[11]*=a;b[15]*=a;return this},applyToBufferAttribute:function(){var a=new p;return function(b){for(var c=0,d=b.count;c<d;c++)a.x=b.getX(c),a.y=b.getY(c),a.z=b.getZ(c),a.applyMatrix4(this),b.setXYZ(c,a.x,a.y,a.z);return b}}(),determinant:function(){var a=this.elements,b=a[0],c=a[4],d=a[8],e=a[12],f=a[1],g=a[5],h=a[9],k=a[13],m=a[2],q=a[6],n=a[10],l=a[14];return a[3]*(+e*h*q-d*k*q-e*g*n+c*k*n+d*g*l-c*h*l)+a[7]*(+b*h*l-b*k*n+e*f*n-\nd*f*l+d*k*m-e*h*m)+a[11]*(+b*k*q-b*g*l-e*f*q+c*f*l+e*g*m-c*k*m)+a[15]*(-d*g*m-b*h*q+b*g*n+d*f*q-c*f*n+c*h*m)},transpose:function(){var a=this.elements;var b=a[1];a[1]=a[4];a[4]=b;b=a[2];a[2]=a[8];a[8]=b;b=a[6];a[6]=a[9];a[9]=b;b=a[3];a[3]=a[12];a[12]=b;b=a[7];a[7]=a[13];a[13]=b;b=a[11];a[11]=a[14];a[14]=b;return this},setPosition:function(a){var b=this.elements;b[12]=a.x;b[13]=a.y;b[14]=a.z;return this},getInverse:function(a,b){var c=this.elements,d=a.elements;a=d[0];var e=d[1],f=d[2],g=d[3],h=d[4],\nk=d[5],m=d[6],q=d[7],n=d[8],l=d[9],u=d[10],r=d[11],p=d[12],y=d[13],x=d[14];d=d[15];var w=l*x*q-y*u*q+y*m*r-k*x*r-l*m*d+k*u*d,B=p*u*q-n*x*q-p*m*r+h*x*r+n*m*d-h*u*d,E=n*y*q-p*l*q+p*k*r-h*y*r-n*k*d+h*l*d,z=p*l*m-n*y*m-p*k*u+h*y*u+n*k*x-h*l*x,N=a*w+e*B+f*E+g*z;if(0===N){if(!0===b)throw Error(\"THREE.Matrix4: .getInverse() can't invert matrix, determinant is 0\");console.warn(\"THREE.Matrix4: .getInverse() can't invert matrix, determinant is 0\");return this.identity()}b=1/N;c[0]=w*b;c[1]=(y*u*g-l*x*g-y*f*\nr+e*x*r+l*f*d-e*u*d)*b;c[2]=(k*x*g-y*m*g+y*f*q-e*x*q-k*f*d+e*m*d)*b;c[3]=(l*m*g-k*u*g-l*f*q+e*u*q+k*f*r-e*m*r)*b;c[4]=B*b;c[5]=(n*x*g-p*u*g+p*f*r-a*x*r-n*f*d+a*u*d)*b;c[6]=(p*m*g-h*x*g-p*f*q+a*x*q+h*f*d-a*m*d)*b;c[7]=(h*u*g-n*m*g+n*f*q-a*u*q-h*f*r+a*m*r)*b;c[8]=E*b;c[9]=(p*l*g-n*y*g-p*e*r+a*y*r+n*e*d-a*l*d)*b;c[10]=(h*y*g-p*k*g+p*e*q-a*y*q-h*e*d+a*k*d)*b;c[11]=(n*k*g-h*l*g-n*e*q+a*l*q+h*e*r-a*k*r)*b;c[12]=z*b;c[13]=(n*y*f-p*l*f+p*e*u-a*y*u-n*e*x+a*l*x)*b;c[14]=(p*k*f-h*y*f-p*e*m+a*y*m+h*e*x-a*k*x)*\nb;c[15]=(h*l*f-n*k*f+n*e*m-a*l*m-h*e*u+a*k*u)*b;return this},scale:function(a){var b=this.elements,c=a.x,d=a.y;a=a.z;b[0]*=c;b[4]*=d;b[8]*=a;b[1]*=c;b[5]*=d;b[9]*=a;b[2]*=c;b[6]*=d;b[10]*=a;b[3]*=c;b[7]*=d;b[11]*=a;return this},getMaxScaleOnAxis:function(){var a=this.elements;return Math.sqrt(Math.max(a[0]*a[0]+a[1]*a[1]+a[2]*a[2],a[4]*a[4]+a[5]*a[5]+a[6]*a[6],a[8]*a[8]+a[9]*a[9]+a[10]*a[10]))},makeTranslation:function(a,b,c){this.set(1,0,0,a,0,1,0,b,0,0,1,c,0,0,0,1);return this},makeRotationX:function(a){var b=\nMath.cos(a);a=Math.sin(a);this.set(1,0,0,0,0,b,-a,0,0,a,b,0,0,0,0,1);return this},makeRotationY:function(a){var b=Math.cos(a);a=Math.sin(a);this.set(b,0,a,0,0,1,0,0,-a,0,b,0,0,0,0,1);return this},makeRotationZ:function(a){var b=Math.cos(a);a=Math.sin(a);this.set(b,-a,0,0,a,b,0,0,0,0,1,0,0,0,0,1);return this},makeRotationAxis:function(a,b){var c=Math.cos(b);b=Math.sin(b);var d=1-c,e=a.x,f=a.y;a=a.z;var g=d*e,h=d*f;this.set(g*e+c,g*f-b*a,g*a+b*f,0,g*f+b*a,h*f+c,h*a-b*e,0,g*a-b*f,h*a+b*e,d*a*a+c,0,0,\n0,0,1);return this},makeScale:function(a,b,c){this.set(a,0,0,0,0,b,0,0,0,0,c,0,0,0,0,1);return this},makeShear:function(a,b,c){this.set(1,b,c,0,a,1,c,0,a,b,1,0,0,0,0,1);return this},compose:function(a,b,c){var d=this.elements,e=b._x,f=b._y,g=b._z,h=b._w,k=e+e,m=f+f,q=g+g;b=e*k;var l=e*m;e*=q;var t=f*m;f*=q;g*=q;k*=h;m*=h;h*=q;q=c.x;var u=c.y;c=c.z;d[0]=(1-(t+g))*q;d[1]=(l+h)*q;d[2]=(e-m)*q;d[3]=0;d[4]=(l-h)*u;d[5]=(1-(b+g))*u;d[6]=(f+k)*u;d[7]=0;d[8]=(e+m)*c;d[9]=(f-k)*c;d[10]=(1-(b+t))*c;d[11]=0;\nd[12]=a.x;d[13]=a.y;d[14]=a.z;d[15]=1;return this},decompose:function(){var a=new p,b=new I;return function(c,d,e){var f=this.elements,g=a.set(f[0],f[1],f[2]).length(),h=a.set(f[4],f[5],f[6]).length(),k=a.set(f[8],f[9],f[10]).length();0>this.determinant()&&(g=-g);c.x=f[12];c.y=f[13];c.z=f[14];b.copy(this);c=1/g;f=1/h;var m=1/k;b.elements[0]*=c;b.elements[1]*=c;b.elements[2]*=c;b.elements[4]*=f;b.elements[5]*=f;b.elements[6]*=f;b.elements[8]*=m;b.elements[9]*=m;b.elements[10]*=m;d.setFromRotationMatrix(b);\ne.x=g;e.y=h;e.z=k;return this}}(),makePerspective:function(a,b,c,d,e,f){void 0===f&&console.warn(\"THREE.Matrix4: .makePerspective() has been redefined and has a new signature. Please check the docs.\");var g=this.elements;g[0]=2*e/(b-a);g[4]=0;g[8]=(b+a)/(b-a);g[12]=0;g[1]=0;g[5]=2*e/(c-d);g[9]=(c+d)/(c-d);g[13]=0;g[2]=0;g[6]=0;g[10]=-(f+e)/(f-e);g[14]=-2*f*e/(f-e);g[3]=0;g[7]=0;g[11]=-1;g[15]=0;return this},makeOrthographic:function(a,b,c,d,e,f){var g=this.elements,h=1/(b-a),k=1/(c-d),m=1/(f-e);g[0]=\n2*h;g[4]=0;g[8]=0;g[12]=-((b+a)*h);g[1]=0;g[5]=2*k;g[9]=0;g[13]=-((c+d)*k);g[2]=0;g[6]=0;g[10]=-2*m;g[14]=-((f+e)*m);g[3]=0;g[7]=0;g[11]=0;g[15]=1;return this},equals:function(a){var b=this.elements;a=a.elements;for(var c=0;16>c;c++)if(b[c]!==a[c])return!1;return!0},fromArray:function(a,b){void 0===b&&(b=0);for(var c=0;16>c;c++)this.elements[c]=a[c+b];return this},toArray:function(a,b){void 0===a&&(a=[]);void 0===b&&(b=0);var c=this.elements;a[b]=c[0];a[b+1]=c[1];a[b+2]=c[2];a[b+3]=c[3];a[b+4]=c[4];\na[b+5]=c[5];a[b+6]=c[6];a[b+7]=c[7];a[b+8]=c[8];a[b+9]=c[9];a[b+10]=c[10];a[b+11]=c[11];a[b+12]=c[12];a[b+13]=c[13];a[b+14]=c[14];a[b+15]=c[15];return a}});Object.assign(fa,{slerp:function(a,b,c,d){return c.copy(a).slerp(b,d)},slerpFlat:function(a,b,c,d,e,f,g){var h=c[d+0],k=c[d+1],m=c[d+2];c=c[d+3];d=e[f+0];var q=e[f+1],l=e[f+2];e=e[f+3];if(c!==e||h!==d||k!==q||m!==l){f=1-g;var t=h*d+k*q+m*l+c*e,u=0<=t?1:-1,r=1-t*t;r>Number.EPSILON&&(r=Math.sqrt(r),t=Math.atan2(r,t*u),f=Math.sin(f*t)/r,g=Math.sin(g*\nt)/r);u*=g;h=h*f+d*u;k=k*f+q*u;m=m*f+l*u;c=c*f+e*u;f===1-g&&(g=1/Math.sqrt(h*h+k*k+m*m+c*c),h*=g,k*=g,m*=g,c*=g)}a[b]=h;a[b+1]=k;a[b+2]=m;a[b+3]=c}});Object.defineProperties(fa.prototype,{x:{get:function(){return this._x},set:function(a){this._x=a;this.onChangeCallback()}},y:{get:function(){return this._y},set:function(a){this._y=a;this.onChangeCallback()}},z:{get:function(){return this._z},set:function(a){this._z=a;this.onChangeCallback()}},w:{get:function(){return this._w},set:function(a){this._w=\na;this.onChangeCallback()}}});Object.assign(fa.prototype,{set:function(a,b,c,d){this._x=a;this._y=b;this._z=c;this._w=d;this.onChangeCallback();return this},clone:function(){return new this.constructor(this._x,this._y,this._z,this._w)},copy:function(a){this._x=a.x;this._y=a.y;this._z=a.z;this._w=a.w;this.onChangeCallback();return this},setFromEuler:function(a,b){if(!a||!a.isEuler)throw Error(\"THREE.Quaternion: .setFromEuler() now expects an Euler rotation rather than a Vector3 and order.\");var c=\na._x,d=a._y,e=a._z;a=a.order;var f=Math.cos,g=Math.sin,h=f(c/2),k=f(d/2);f=f(e/2);c=g(c/2);d=g(d/2);e=g(e/2);\"XYZ\"===a?(this._x=c*k*f+h*d*e,this._y=h*d*f-c*k*e,this._z=h*k*e+c*d*f,this._w=h*k*f-c*d*e):\"YXZ\"===a?(this._x=c*k*f+h*d*e,this._y=h*d*f-c*k*e,this._z=h*k*e-c*d*f,this._w=h*k*f+c*d*e):\"ZXY\"===a?(this._x=c*k*f-h*d*e,this._y=h*d*f+c*k*e,this._z=h*k*e+c*d*f,this._w=h*k*f-c*d*e):\"ZYX\"===a?(this._x=c*k*f-h*d*e,this._y=h*d*f+c*k*e,this._z=h*k*e-c*d*f,this._w=h*k*f+c*d*e):\"YZX\"===a?(this._x=c*k*f+\nh*d*e,this._y=h*d*f+c*k*e,this._z=h*k*e-c*d*f,this._w=h*k*f-c*d*e):\"XZY\"===a&&(this._x=c*k*f-h*d*e,this._y=h*d*f-c*k*e,this._z=h*k*e+c*d*f,this._w=h*k*f+c*d*e);if(!1!==b)this.onChangeCallback();return this},setFromAxisAngle:function(a,b){b/=2;var c=Math.sin(b);this._x=a.x*c;this._y=a.y*c;this._z=a.z*c;this._w=Math.cos(b);this.onChangeCallback();return this},setFromRotationMatrix:function(a){var b=a.elements,c=b[0];a=b[4];var d=b[8],e=b[1],f=b[5],g=b[9],h=b[2],k=b[6];b=b[10];var m=c+f+b;0<m?(c=.5/\nMath.sqrt(m+1),this._w=.25/c,this._x=(k-g)*c,this._y=(d-h)*c,this._z=(e-a)*c):c>f&&c>b?(c=2*Math.sqrt(1+c-f-b),this._w=(k-g)/c,this._x=.25*c,this._y=(a+e)/c,this._z=(d+h)/c):f>b?(c=2*Math.sqrt(1+f-c-b),this._w=(d-h)/c,this._x=(a+e)/c,this._y=.25*c,this._z=(g+k)/c):(c=2*Math.sqrt(1+b-c-f),this._w=(e-a)/c,this._x=(d+h)/c,this._y=(g+k)/c,this._z=.25*c);this.onChangeCallback();return this},setFromUnitVectors:function(){var a=new p,b;return function(c,d){void 0===a&&(a=new p);b=c.dot(d)+1;1E-6>b?(b=0,\nMath.abs(c.x)>Math.abs(c.z)?a.set(-c.y,c.x,0):a.set(0,-c.z,c.y)):a.crossVectors(c,d);this._x=a.x;this._y=a.y;this._z=a.z;this._w=b;return this.normalize()}}(),angleTo:function(a){return 2*Math.acos(Math.abs(H.clamp(this.dot(a),-1,1)))},rotateTowards:function(a,b){var c=this.angleTo(a);if(0===c)return this;this.slerp(a,Math.min(1,b/c));return this},inverse:function(){return this.conjugate()},conjugate:function(){this._x*=-1;this._y*=-1;this._z*=-1;this.onChangeCallback();return this},dot:function(a){return this._x*\na._x+this._y*a._y+this._z*a._z+this._w*a._w},lengthSq:function(){return this._x*this._x+this._y*this._y+this._z*this._z+this._w*this._w},length:function(){return Math.sqrt(this._x*this._x+this._y*this._y+this._z*this._z+this._w*this._w)},normalize:function(){var a=this.length();0===a?(this._z=this._y=this._x=0,this._w=1):(a=1/a,this._x*=a,this._y*=a,this._z*=a,this._w*=a);this.onChangeCallback();return this},multiply:function(a,b){return void 0!==b?(console.warn(\"THREE.Quaternion: .multiply() now only accepts one argument. Use .multiplyQuaternions( a, b ) instead.\"),\nthis.multiplyQuaternions(a,b)):this.multiplyQuaternions(this,a)},premultiply:function(a){return this.multiplyQuaternions(a,this)},multiplyQuaternions:function(a,b){var c=a._x,d=a._y,e=a._z;a=a._w;var f=b._x,g=b._y,h=b._z;b=b._w;this._x=c*b+a*f+d*h-e*g;this._y=d*b+a*g+e*f-c*h;this._z=e*b+a*h+c*g-d*f;this._w=a*b-c*f-d*g-e*h;this.onChangeCallback();return this},slerp:function(a,b){if(0===b)return this;if(1===b)return this.copy(a);var c=this._x,d=this._y,e=this._z,f=this._w,g=f*a._w+c*a._x+d*a._y+e*a._z;\n0>g?(this._w=-a._w,this._x=-a._x,this._y=-a._y,this._z=-a._z,g=-g):this.copy(a);if(1<=g)return this._w=f,this._x=c,this._y=d,this._z=e,this;a=1-g*g;if(a<=Number.EPSILON)return g=1-b,this._w=g*f+b*this._w,this._x=g*c+b*this._x,this._y=g*d+b*this._y,this._z=g*e+b*this._z,this.normalize();a=Math.sqrt(a);var h=Math.atan2(a,g);g=Math.sin((1-b)*h)/a;b=Math.sin(b*h)/a;this._w=f*g+this._w*b;this._x=c*g+this._x*b;this._y=d*g+this._y*b;this._z=e*g+this._z*b;this.onChangeCallback();return this},equals:function(a){return a._x===\nthis._x&&a._y===this._y&&a._z===this._z&&a._w===this._w},fromArray:function(a,b){void 0===b&&(b=0);this._x=a[b];this._y=a[b+1];this._z=a[b+2];this._w=a[b+3];this.onChangeCallback();return this},toArray:function(a,b){void 0===a&&(a=[]);void 0===b&&(b=0);a[b]=this._x;a[b+1]=this._y;a[b+2]=this._z;a[b+3]=this._w;return a},onChange:function(a){this.onChangeCallback=a;return this},onChangeCallback:function(){}});Object.assign(p.prototype,{isVector3:!0,set:function(a,b,c){this.x=a;this.y=b;this.z=c;return this},\nsetScalar:function(a){this.z=this.y=this.x=a;return this},setX:function(a){this.x=a;return this},setY:function(a){this.y=a;return this},setZ:function(a){this.z=a;return this},setComponent:function(a,b){switch(a){case 0:this.x=b;break;case 1:this.y=b;break;case 2:this.z=b;break;default:throw Error(\"index is out of range: \"+a);}return this},getComponent:function(a){switch(a){case 0:return this.x;case 1:return this.y;case 2:return this.z;default:throw Error(\"index is out of range: \"+a);}},clone:function(){return new this.constructor(this.x,\nthis.y,this.z)},copy:function(a){this.x=a.x;this.y=a.y;this.z=a.z;return this},add:function(a,b){if(void 0!==b)return console.warn(\"THREE.Vector3: .add() now only accepts one argument. Use .addVectors( a, b ) instead.\"),this.addVectors(a,b);this.x+=a.x;this.y+=a.y;this.z+=a.z;return this},addScalar:function(a){this.x+=a;this.y+=a;this.z+=a;return this},addVectors:function(a,b){this.x=a.x+b.x;this.y=a.y+b.y;this.z=a.z+b.z;return this},addScaledVector:function(a,b){this.x+=a.x*b;this.y+=a.y*b;this.z+=\na.z*b;return this},sub:function(a,b){if(void 0!==b)return console.warn(\"THREE.Vector3: .sub() now only accepts one argument. Use .subVectors( a, b ) instead.\"),this.subVectors(a,b);this.x-=a.x;this.y-=a.y;this.z-=a.z;return this},subScalar:function(a){this.x-=a;this.y-=a;this.z-=a;return this},subVectors:function(a,b){this.x=a.x-b.x;this.y=a.y-b.y;this.z=a.z-b.z;return this},multiply:function(a,b){if(void 0!==b)return console.warn(\"THREE.Vector3: .multiply() now only accepts one argument. Use .multiplyVectors( a, b ) instead.\"),\nthis.multiplyVectors(a,b);this.x*=a.x;this.y*=a.y;this.z*=a.z;return this},multiplyScalar:function(a){this.x*=a;this.y*=a;this.z*=a;return this},multiplyVectors:function(a,b){this.x=a.x*b.x;this.y=a.y*b.y;this.z=a.z*b.z;return this},applyEuler:function(){var a=new fa;return function(b){b&&b.isEuler||console.error(\"THREE.Vector3: .applyEuler() now expects an Euler rotation rather than a Vector3 and order.\");return this.applyQuaternion(a.setFromEuler(b))}}(),applyAxisAngle:function(){var a=new fa;return function(b,\nc){return this.applyQuaternion(a.setFromAxisAngle(b,c))}}(),applyMatrix3:function(a){var b=this.x,c=this.y,d=this.z;a=a.elements;this.x=a[0]*b+a[3]*c+a[6]*d;this.y=a[1]*b+a[4]*c+a[7]*d;this.z=a[2]*b+a[5]*c+a[8]*d;return this},applyMatrix4:function(a){var b=this.x,c=this.y,d=this.z;a=a.elements;var e=1/(a[3]*b+a[7]*c+a[11]*d+a[15]);this.x=(a[0]*b+a[4]*c+a[8]*d+a[12])*e;this.y=(a[1]*b+a[5]*c+a[9]*d+a[13])*e;this.z=(a[2]*b+a[6]*c+a[10]*d+a[14])*e;return this},applyQuaternion:function(a){var b=this.x,\nc=this.y,d=this.z,e=a.x,f=a.y,g=a.z;a=a.w;var h=a*b+f*d-g*c,k=a*c+g*b-e*d,m=a*d+e*c-f*b;b=-e*b-f*c-g*d;this.x=h*a+b*-e+k*-g-m*-f;this.y=k*a+b*-f+m*-e-h*-g;this.z=m*a+b*-g+h*-f-k*-e;return this},project:function(){var a=new I;return function(b){a.multiplyMatrices(b.projectionMatrix,a.getInverse(b.matrixWorld));return this.applyMatrix4(a)}}(),unproject:function(){var a=new I;return function(b){a.multiplyMatrices(b.matrixWorld,a.getInverse(b.projectionMatrix));return this.applyMatrix4(a)}}(),transformDirection:function(a){var b=\nthis.x,c=this.y,d=this.z;a=a.elements;this.x=a[0]*b+a[4]*c+a[8]*d;this.y=a[1]*b+a[5]*c+a[9]*d;this.z=a[2]*b+a[6]*c+a[10]*d;return this.normalize()},divide:function(a){this.x/=a.x;this.y/=a.y;this.z/=a.z;return this},divideScalar:function(a){return this.multiplyScalar(1/a)},min:function(a){this.x=Math.min(this.x,a.x);this.y=Math.min(this.y,a.y);this.z=Math.min(this.z,a.z);return this},max:function(a){this.x=Math.max(this.x,a.x);this.y=Math.max(this.y,a.y);this.z=Math.max(this.z,a.z);return this},clamp:function(a,\nb){this.x=Math.max(a.x,Math.min(b.x,this.x));this.y=Math.max(a.y,Math.min(b.y,this.y));this.z=Math.max(a.z,Math.min(b.z,this.z));return this},clampScalar:function(){var a=new p,b=new p;return function(c,d){a.set(c,c,c);b.set(d,d,d);return this.clamp(a,b)}}(),clampLength:function(a,b){var c=this.length();return this.divideScalar(c||1).multiplyScalar(Math.max(a,Math.min(b,c)))},floor:function(){this.x=Math.floor(this.x);this.y=Math.floor(this.y);this.z=Math.floor(this.z);return this},ceil:function(){this.x=\nMath.ceil(this.x);this.y=Math.ceil(this.y);this.z=Math.ceil(this.z);return this},round:function(){this.x=Math.round(this.x);this.y=Math.round(this.y);this.z=Math.round(this.z);return this},roundToZero:function(){this.x=0>this.x?Math.ceil(this.x):Math.floor(this.x);this.y=0>this.y?Math.ceil(this.y):Math.floor(this.y);this.z=0>this.z?Math.ceil(this.z):Math.floor(this.z);return this},negate:function(){this.x=-this.x;this.y=-this.y;this.z=-this.z;return this},dot:function(a){return this.x*a.x+this.y*\na.y+this.z*a.z},lengthSq:function(){return this.x*this.x+this.y*this.y+this.z*this.z},length:function(){return Math.sqrt(this.x*this.x+this.y*this.y+this.z*this.z)},manhattanLength:function(){return Math.abs(this.x)+Math.abs(this.y)+Math.abs(this.z)},normalize:function(){return this.divideScalar(this.length()||1)},setLength:function(a){return this.normalize().multiplyScalar(a)},lerp:function(a,b){this.x+=(a.x-this.x)*b;this.y+=(a.y-this.y)*b;this.z+=(a.z-this.z)*b;return this},lerpVectors:function(a,\nb,c){return this.subVectors(b,a).multiplyScalar(c).add(a)},cross:function(a,b){return void 0!==b?(console.warn(\"THREE.Vector3: .cross() now only accepts one argument. Use .crossVectors( a, b ) instead.\"),this.crossVectors(a,b)):this.crossVectors(this,a)},crossVectors:function(a,b){var c=a.x,d=a.y;a=a.z;var e=b.x,f=b.y;b=b.z;this.x=d*b-a*f;this.y=a*e-c*b;this.z=c*f-d*e;return this},projectOnVector:function(a){var b=a.dot(this)/a.lengthSq();return this.copy(a).multiplyScalar(b)},projectOnPlane:function(){var a=\nnew p;return function(b){a.copy(this).projectOnVector(b);return this.sub(a)}}(),reflect:function(){var a=new p;return function(b){return this.sub(a.copy(b).multiplyScalar(2*this.dot(b)))}}(),angleTo:function(a){a=this.dot(a)/Math.sqrt(this.lengthSq()*a.lengthSq());return Math.acos(H.clamp(a,-1,1))},distanceTo:function(a){return Math.sqrt(this.distanceToSquared(a))},distanceToSquared:function(a){var b=this.x-a.x,c=this.y-a.y;a=this.z-a.z;return b*b+c*c+a*a},manhattanDistanceTo:function(a){return Math.abs(this.x-\na.x)+Math.abs(this.y-a.y)+Math.abs(this.z-a.z)},setFromSpherical:function(a){var b=Math.sin(a.phi)*a.radius;this.x=b*Math.sin(a.theta);this.y=Math.cos(a.phi)*a.radius;this.z=b*Math.cos(a.theta);return this},setFromCylindrical:function(a){this.x=a.radius*Math.sin(a.theta);this.y=a.y;this.z=a.radius*Math.cos(a.theta);return this},setFromMatrixPosition:function(a){a=a.elements;this.x=a[12];this.y=a[13];this.z=a[14];return this},setFromMatrixScale:function(a){var b=this.setFromMatrixColumn(a,0).length(),\nc=this.setFromMatrixColumn(a,1).length();a=this.setFromMatrixColumn(a,2).length();this.x=b;this.y=c;this.z=a;return this},setFromMatrixColumn:function(a,b){return this.fromArray(a.elements,4*b)},equals:function(a){return a.x===this.x&&a.y===this.y&&a.z===this.z},fromArray:function(a,b){void 0===b&&(b=0);this.x=a[b];this.y=a[b+1];this.z=a[b+2];return this},toArray:function(a,b){void 0===a&&(a=[]);void 0===b&&(b=0);a[b]=this.x;a[b+1]=this.y;a[b+2]=this.z;return a},fromBufferAttribute:function(a,b,c){void 0!==\nc&&console.warn(\"THREE.Vector3: offset has been removed from .fromBufferAttribute().\");this.x=a.getX(b);this.y=a.getY(b);this.z=a.getZ(b);return this}});Object.assign(ra.prototype,{isMatrix3:!0,set:function(a,b,c,d,e,f,g,h,k){var m=this.elements;m[0]=a;m[1]=d;m[2]=g;m[3]=b;m[4]=e;m[5]=h;m[6]=c;m[7]=f;m[8]=k;return this},identity:function(){this.set(1,0,0,0,1,0,0,0,1);return this},clone:function(){return(new this.constructor).fromArray(this.elements)},copy:function(a){var b=this.elements;a=a.elements;\nb[0]=a[0];b[1]=a[1];b[2]=a[2];b[3]=a[3];b[4]=a[4];b[5]=a[5];b[6]=a[6];b[7]=a[7];b[8]=a[8];return this},setFromMatrix4:function(a){a=a.elements;this.set(a[0],a[4],a[8],a[1],a[5],a[9],a[2],a[6],a[10]);return this},applyToBufferAttribute:function(){var a=new p;return function(b){for(var c=0,d=b.count;c<d;c++)a.x=b.getX(c),a.y=b.getY(c),a.z=b.getZ(c),a.applyMatrix3(this),b.setXYZ(c,a.x,a.y,a.z);return b}}(),multiply:function(a){return this.multiplyMatrices(this,a)},premultiply:function(a){return this.multiplyMatrices(a,\nthis)},multiplyMatrices:function(a,b){var c=a.elements,d=b.elements;b=this.elements;a=c[0];var e=c[3],f=c[6],g=c[1],h=c[4],k=c[7],m=c[2],q=c[5];c=c[8];var l=d[0],t=d[3],u=d[6],r=d[1],p=d[4],y=d[7],x=d[2],w=d[5];d=d[8];b[0]=a*l+e*r+f*x;b[3]=a*t+e*p+f*w;b[6]=a*u+e*y+f*d;b[1]=g*l+h*r+k*x;b[4]=g*t+h*p+k*w;b[7]=g*u+h*y+k*d;b[2]=m*l+q*r+c*x;b[5]=m*t+q*p+c*w;b[8]=m*u+q*y+c*d;return this},multiplyScalar:function(a){var b=this.elements;b[0]*=a;b[3]*=a;b[6]*=a;b[1]*=a;b[4]*=a;b[7]*=a;b[2]*=a;b[5]*=a;b[8]*=\na;return this},determinant:function(){var a=this.elements,b=a[0],c=a[1],d=a[2],e=a[3],f=a[4],g=a[5],h=a[6],k=a[7];a=a[8];return b*f*a-b*g*k-c*e*a+c*g*h+d*e*k-d*f*h},getInverse:function(a,b){a&&a.isMatrix4&&console.error(\"THREE.Matrix3: .getInverse() no longer takes a Matrix4 argument.\");var c=a.elements;a=this.elements;var d=c[0],e=c[1],f=c[2],g=c[3],h=c[4],k=c[5],m=c[6],q=c[7];c=c[8];var l=c*h-k*q,t=k*m-c*g,u=q*g-h*m,r=d*l+e*t+f*u;if(0===r){if(!0===b)throw Error(\"THREE.Matrix3: .getInverse() can't invert matrix, determinant is 0\");\nconsole.warn(\"THREE.Matrix3: .getInverse() can't invert matrix, determinant is 0\");return this.identity()}b=1/r;a[0]=l*b;a[1]=(f*q-c*e)*b;a[2]=(k*e-f*h)*b;a[3]=t*b;a[4]=(c*d-f*m)*b;a[5]=(f*g-k*d)*b;a[6]=u*b;a[7]=(e*m-q*d)*b;a[8]=(h*d-e*g)*b;return this},transpose:function(){var a=this.elements;var b=a[1];a[1]=a[3];a[3]=b;b=a[2];a[2]=a[6];a[6]=b;b=a[5];a[5]=a[7];a[7]=b;return this},getNormalMatrix:function(a){return this.setFromMatrix4(a).getInverse(this).transpose()},transposeIntoArray:function(a){var b=\nthis.elements;a[0]=b[0];a[1]=b[3];a[2]=b[6];a[3]=b[1];a[4]=b[4];a[5]=b[7];a[6]=b[2];a[7]=b[5];a[8]=b[8];return this},setUvTransform:function(a,b,c,d,e,f,g){var h=Math.cos(e);e=Math.sin(e);this.set(c*h,c*e,-c*(h*f+e*g)+f+a,-d*e,d*h,-d*(-e*f+h*g)+g+b,0,0,1)},scale:function(a,b){var c=this.elements;c[0]*=a;c[3]*=a;c[6]*=a;c[1]*=b;c[4]*=b;c[7]*=b;return this},rotate:function(a){var b=Math.cos(a);a=Math.sin(a);var c=this.elements,d=c[0],e=c[3],f=c[6],g=c[1],h=c[4],k=c[7];c[0]=b*d+a*g;c[3]=b*e+a*h;c[6]=\nb*f+a*k;c[1]=-a*d+b*g;c[4]=-a*e+b*h;c[7]=-a*f+b*k;return this},translate:function(a,b){var c=this.elements;c[0]+=a*c[2];c[3]+=a*c[5];c[6]+=a*c[8];c[1]+=b*c[2];c[4]+=b*c[5];c[7]+=b*c[8];return this},equals:function(a){var b=this.elements;a=a.elements;for(var c=0;9>c;c++)if(b[c]!==a[c])return!1;return!0},fromArray:function(a,b){void 0===b&&(b=0);for(var c=0;9>c;c++)this.elements[c]=a[c+b];return this},toArray:function(a,b){void 0===a&&(a=[]);void 0===b&&(b=0);var c=this.elements;a[b]=c[0];a[b+1]=c[1];\na[b+2]=c[2];a[b+3]=c[3];a[b+4]=c[4];a[b+5]=c[5];a[b+6]=c[6];a[b+7]=c[7];a[b+8]=c[8];return a}});var eb={getDataURL:function(a){if(a instanceof HTMLCanvasElement)var b=a;else{\"undefined\"!==typeof OffscreenCanvas?b=new OffscreenCanvas(a.width,a.height):(b=document.createElementNS(\"http://www.w3.org/1999/xhtml\",\"canvas\"),b.width=a.width,b.height=a.height);var c=b.getContext(\"2d\");a instanceof ImageData?c.putImageData(a,0,0):c.drawImage(a,0,0,a.width,a.height)}return 2048<b.width||2048<b.height?b.toDataURL(\"image/jpeg\",\n.6):b.toDataURL(\"image/png\")}},Ef=0;T.DEFAULT_IMAGE=void 0;T.DEFAULT_MAPPING=300;T.prototype=Object.assign(Object.create(ya.prototype),{constructor:T,isTexture:!0,updateMatrix:function(){this.matrix.setUvTransform(this.offset.x,this.offset.y,this.repeat.x,this.repeat.y,this.rotation,this.center.x,this.center.y)},clone:function(){return(new this.constructor).copy(this)},copy:function(a){this.name=a.name;this.image=a.image;this.mipmaps=a.mipmaps.slice(0);this.mapping=a.mapping;this.wrapS=a.wrapS;this.wrapT=\na.wrapT;this.magFilter=a.magFilter;this.minFilter=a.minFilter;this.anisotropy=a.anisotropy;this.format=a.format;this.type=a.type;this.offset.copy(a.offset);this.repeat.copy(a.repeat);this.center.copy(a.center);this.rotation=a.rotation;this.matrixAutoUpdate=a.matrixAutoUpdate;this.matrix.copy(a.matrix);this.generateMipmaps=a.generateMipmaps;this.premultiplyAlpha=a.premultiplyAlpha;this.flipY=a.flipY;this.unpackAlignment=a.unpackAlignment;this.encoding=a.encoding;return this},toJSON:function(a){var b=\nvoid 0===a||\"string\"===typeof a;if(!b&&void 0!==a.textures[this.uuid])return a.textures[this.uuid];var c={metadata:{version:4.5,type:\"Texture\",generator:\"Texture.toJSON\"},uuid:this.uuid,name:this.name,mapping:this.mapping,repeat:[this.repeat.x,this.repeat.y],offset:[this.offset.x,this.offset.y],center:[this.center.x,this.center.y],rotation:this.rotation,wrap:[this.wrapS,this.wrapT],format:this.format,minFilter:this.minFilter,magFilter:this.magFilter,anisotropy:this.anisotropy,flipY:this.flipY};if(void 0!==\nthis.image){var d=this.image;void 0===d.uuid&&(d.uuid=H.generateUUID());if(!b&&void 0===a.images[d.uuid]){if(Array.isArray(d)){var e=[];for(var f=0,g=d.length;f<g;f++)e.push(eb.getDataURL(d[f]))}else e=eb.getDataURL(d);a.images[d.uuid]={uuid:d.uuid,url:e}}c.image=d.uuid}b||(a.textures[this.uuid]=c);return c},dispose:function(){this.dispatchEvent({type:\"dispose\"})},transformUv:function(a){if(300===this.mapping){a.applyMatrix3(this.matrix);if(0>a.x||1<a.x)switch(this.wrapS){case 1E3:a.x-=Math.floor(a.x);\nbreak;case 1001:a.x=0>a.x?0:1;break;case 1002:a.x=1===Math.abs(Math.floor(a.x)%2)?Math.ceil(a.x)-a.x:a.x-Math.floor(a.x)}if(0>a.y||1<a.y)switch(this.wrapT){case 1E3:a.y-=Math.floor(a.y);break;case 1001:a.y=0>a.y?0:1;break;case 1002:a.y=1===Math.abs(Math.floor(a.y)%2)?Math.ceil(a.y)-a.y:a.y-Math.floor(a.y)}this.flipY&&(a.y=1-a.y)}}});Object.defineProperty(T.prototype,\"needsUpdate\",{set:function(a){!0===a&&this.version++}});Object.assign(V.prototype,{isVector4:!0,set:function(a,b,c,d){this.x=a;this.y=\nb;this.z=c;this.w=d;return this},setScalar:function(a){this.w=this.z=this.y=this.x=a;return this},setX:function(a){this.x=a;return this},setY:function(a){this.y=a;return this},setZ:function(a){this.z=a;return this},setW:function(a){this.w=a;return this},setComponent:function(a,b){switch(a){case 0:this.x=b;break;case 1:this.y=b;break;case 2:this.z=b;break;case 3:this.w=b;break;default:throw Error(\"index is out of range: \"+a);}return this},getComponent:function(a){switch(a){case 0:return this.x;case 1:return this.y;\ncase 2:return this.z;case 3:return this.w;default:throw Error(\"index is out of range: \"+a);}},clone:function(){return new this.constructor(this.x,this.y,this.z,this.w)},copy:function(a){this.x=a.x;this.y=a.y;this.z=a.z;this.w=void 0!==a.w?a.w:1;return this},add:function(a,b){if(void 0!==b)return console.warn(\"THREE.Vector4: .add() now only accepts one argument. Use .addVectors( a, b ) instead.\"),this.addVectors(a,b);this.x+=a.x;this.y+=a.y;this.z+=a.z;this.w+=a.w;return this},addScalar:function(a){this.x+=\na;this.y+=a;this.z+=a;this.w+=a;return this},addVectors:function(a,b){this.x=a.x+b.x;this.y=a.y+b.y;this.z=a.z+b.z;this.w=a.w+b.w;return this},addScaledVector:function(a,b){this.x+=a.x*b;this.y+=a.y*b;this.z+=a.z*b;this.w+=a.w*b;return this},sub:function(a,b){if(void 0!==b)return console.warn(\"THREE.Vector4: .sub() now only accepts one argument. Use .subVectors( a, b ) instead.\"),this.subVectors(a,b);this.x-=a.x;this.y-=a.y;this.z-=a.z;this.w-=a.w;return this},subScalar:function(a){this.x-=a;this.y-=\na;this.z-=a;this.w-=a;return this},subVectors:function(a,b){this.x=a.x-b.x;this.y=a.y-b.y;this.z=a.z-b.z;this.w=a.w-b.w;return this},multiplyScalar:function(a){this.x*=a;this.y*=a;this.z*=a;this.w*=a;return this},applyMatrix4:function(a){var b=this.x,c=this.y,d=this.z,e=this.w;a=a.elements;this.x=a[0]*b+a[4]*c+a[8]*d+a[12]*e;this.y=a[1]*b+a[5]*c+a[9]*d+a[13]*e;this.z=a[2]*b+a[6]*c+a[10]*d+a[14]*e;this.w=a[3]*b+a[7]*c+a[11]*d+a[15]*e;return this},divideScalar:function(a){return this.multiplyScalar(1/\na)},setAxisAngleFromQuaternion:function(a){this.w=2*Math.acos(a.w);var b=Math.sqrt(1-a.w*a.w);1E-4>b?(this.x=1,this.z=this.y=0):(this.x=a.x/b,this.y=a.y/b,this.z=a.z/b);return this},setAxisAngleFromRotationMatrix:function(a){a=a.elements;var b=a[0];var c=a[4];var d=a[8],e=a[1],f=a[5],g=a[9];var h=a[2];var k=a[6];var m=a[10];if(.01>Math.abs(c-e)&&.01>Math.abs(d-h)&&.01>Math.abs(g-k)){if(.1>Math.abs(c+e)&&.1>Math.abs(d+h)&&.1>Math.abs(g+k)&&.1>Math.abs(b+f+m-3))return this.set(1,0,0,0),this;a=Math.PI;\nb=(b+1)/2;f=(f+1)/2;m=(m+1)/2;c=(c+e)/4;d=(d+h)/4;g=(g+k)/4;b>f&&b>m?.01>b?(k=0,c=h=.707106781):(k=Math.sqrt(b),h=c/k,c=d/k):f>m?.01>f?(k=.707106781,h=0,c=.707106781):(h=Math.sqrt(f),k=c/h,c=g/h):.01>m?(h=k=.707106781,c=0):(c=Math.sqrt(m),k=d/c,h=g/c);this.set(k,h,c,a);return this}a=Math.sqrt((k-g)*(k-g)+(d-h)*(d-h)+(e-c)*(e-c));.001>Math.abs(a)&&(a=1);this.x=(k-g)/a;this.y=(d-h)/a;this.z=(e-c)/a;this.w=Math.acos((b+f+m-1)/2);return this},min:function(a){this.x=Math.min(this.x,a.x);this.y=Math.min(this.y,\na.y);this.z=Math.min(this.z,a.z);this.w=Math.min(this.w,a.w);return this},max:function(a){this.x=Math.max(this.x,a.x);this.y=Math.max(this.y,a.y);this.z=Math.max(this.z,a.z);this.w=Math.max(this.w,a.w);return this},clamp:function(a,b){this.x=Math.max(a.x,Math.min(b.x,this.x));this.y=Math.max(a.y,Math.min(b.y,this.y));this.z=Math.max(a.z,Math.min(b.z,this.z));this.w=Math.max(a.w,Math.min(b.w,this.w));return this},clampScalar:function(){var a,b;return function(c,d){void 0===a&&(a=new V,b=new V);a.set(c,\nc,c,c);b.set(d,d,d,d);return this.clamp(a,b)}}(),clampLength:function(a,b){var c=this.length();return this.divideScalar(c||1).multiplyScalar(Math.max(a,Math.min(b,c)))},floor:function(){this.x=Math.floor(this.x);this.y=Math.floor(this.y);this.z=Math.floor(this.z);this.w=Math.floor(this.w);return this},ceil:function(){this.x=Math.ceil(this.x);this.y=Math.ceil(this.y);this.z=Math.ceil(this.z);this.w=Math.ceil(this.w);return this},round:function(){this.x=Math.round(this.x);this.y=Math.round(this.y);\nthis.z=Math.round(this.z);this.w=Math.round(this.w);return this},roundToZero:function(){this.x=0>this.x?Math.ceil(this.x):Math.floor(this.x);this.y=0>this.y?Math.ceil(this.y):Math.floor(this.y);this.z=0>this.z?Math.ceil(this.z):Math.floor(this.z);this.w=0>this.w?Math.ceil(this.w):Math.floor(this.w);return this},negate:function(){this.x=-this.x;this.y=-this.y;this.z=-this.z;this.w=-this.w;return this},dot:function(a){return this.x*a.x+this.y*a.y+this.z*a.z+this.w*a.w},lengthSq:function(){return this.x*\nthis.x+this.y*this.y+this.z*this.z+this.w*this.w},length:function(){return Math.sqrt(this.x*this.x+this.y*this.y+this.z*this.z+this.w*this.w)},manhattanLength:function(){return Math.abs(this.x)+Math.abs(this.y)+Math.abs(this.z)+Math.abs(this.w)},normalize:function(){return this.divideScalar(this.length()||1)},setLength:function(a){return this.normalize().multiplyScalar(a)},lerp:function(a,b){this.x+=(a.x-this.x)*b;this.y+=(a.y-this.y)*b;this.z+=(a.z-this.z)*b;this.w+=(a.w-this.w)*b;return this},lerpVectors:function(a,\nb,c){return this.subVectors(b,a).multiplyScalar(c).add(a)},equals:function(a){return a.x===this.x&&a.y===this.y&&a.z===this.z&&a.w===this.w},fromArray:function(a,b){void 0===b&&(b=0);this.x=a[b];this.y=a[b+1];this.z=a[b+2];this.w=a[b+3];return this},toArray:function(a,b){void 0===a&&(a=[]);void 0===b&&(b=0);a[b]=this.x;a[b+1]=this.y;a[b+2]=this.z;a[b+3]=this.w;return a},fromBufferAttribute:function(a,b,c){void 0!==c&&console.warn(\"THREE.Vector4: offset has been removed from .fromBufferAttribute().\");\nthis.x=a.getX(b);this.y=a.getY(b);this.z=a.getZ(b);this.w=a.getW(b);return this}});fb.prototype=Object.assign(Object.create(ya.prototype),{constructor:fb,isWebGLRenderTarget:!0,setSize:function(a,b){if(this.width!==a||this.height!==b)this.width=a,this.height=b,this.dispose();this.viewport.set(0,0,a,b);this.scissor.set(0,0,a,b)},clone:function(){return(new this.constructor).copy(this)},copy:function(a){this.width=a.width;this.height=a.height;this.viewport.copy(a.viewport);this.texture=a.texture.clone();\nthis.depthBuffer=a.depthBuffer;this.stencilBuffer=a.stencilBuffer;this.depthTexture=a.depthTexture;return this},dispose:function(){this.dispatchEvent({type:\"dispose\"})}});Gb.prototype=Object.create(fb.prototype);Gb.prototype.constructor=Gb;Gb.prototype.isWebGLRenderTargetCube=!0;gb.prototype=Object.create(T.prototype);gb.prototype.constructor=gb;gb.prototype.isDataTexture=!0;Object.assign(Sa.prototype,{isBox3:!0,set:function(a,b){this.min.copy(a);this.max.copy(b);return this},setFromArray:function(a){for(var b=\nInfinity,c=Infinity,d=Infinity,e=-Infinity,f=-Infinity,g=-Infinity,h=0,k=a.length;h<k;h+=3){var m=a[h],q=a[h+1],l=a[h+2];m<b&&(b=m);q<c&&(c=q);l<d&&(d=l);m>e&&(e=m);q>f&&(f=q);l>g&&(g=l)}this.min.set(b,c,d);this.max.set(e,f,g);return this},setFromBufferAttribute:function(a){for(var b=Infinity,c=Infinity,d=Infinity,e=-Infinity,f=-Infinity,g=-Infinity,h=0,k=a.count;h<k;h++){var m=a.getX(h),l=a.getY(h),n=a.getZ(h);m<b&&(b=m);l<c&&(c=l);n<d&&(d=n);m>e&&(e=m);l>f&&(f=l);n>g&&(g=n)}this.min.set(b,c,d);\nthis.max.set(e,f,g);return this},setFromPoints:function(a){this.makeEmpty();for(var b=0,c=a.length;b<c;b++)this.expandByPoint(a[b]);return this},setFromCenterAndSize:function(){var a=new p;return function(b,c){c=a.copy(c).multiplyScalar(.5);this.min.copy(b).sub(c);this.max.copy(b).add(c);return this}}(),setFromObject:function(a){this.makeEmpty();return this.expandByObject(a)},clone:function(){return(new this.constructor).copy(this)},copy:function(a){this.min.copy(a.min);this.max.copy(a.max);return this},\nmakeEmpty:function(){this.min.x=this.min.y=this.min.z=Infinity;this.max.x=this.max.y=this.max.z=-Infinity;return this},isEmpty:function(){return this.max.x<this.min.x||this.max.y<this.min.y||this.max.z<this.min.z},getCenter:function(a){void 0===a&&(console.warn(\"THREE.Box3: .getCenter() target is now required\"),a=new p);return this.isEmpty()?a.set(0,0,0):a.addVectors(this.min,this.max).multiplyScalar(.5)},getSize:function(a){void 0===a&&(console.warn(\"THREE.Box3: .getSize() target is now required\"),\na=new p);return this.isEmpty()?a.set(0,0,0):a.subVectors(this.max,this.min)},expandByPoint:function(a){this.min.min(a);this.max.max(a);return this},expandByVector:function(a){this.min.sub(a);this.max.add(a);return this},expandByScalar:function(a){this.min.addScalar(-a);this.max.addScalar(a);return this},expandByObject:function(){function a(a){var f=a.geometry;if(void 0!==f)if(f.isGeometry)for(f=f.vertices,c=0,d=f.length;c<d;c++)e.copy(f[c]),e.applyMatrix4(a.matrixWorld),b.expandByPoint(e);else if(f.isBufferGeometry&&\n(f=f.attributes.position,void 0!==f))for(c=0,d=f.count;c<d;c++)e.fromBufferAttribute(f,c).applyMatrix4(a.matrixWorld),b.expandByPoint(e)}var b,c,d,e=new p;return function(c){b=this;c.updateMatrixWorld(!0);c.traverse(a);return this}}(),containsPoint:function(a){return a.x<this.min.x||a.x>this.max.x||a.y<this.min.y||a.y>this.max.y||a.z<this.min.z||a.z>this.max.z?!1:!0},containsBox:function(a){return this.min.x<=a.min.x&&a.max.x<=this.max.x&&this.min.y<=a.min.y&&a.max.y<=this.max.y&&this.min.z<=a.min.z&&\na.max.z<=this.max.z},getParameter:function(a,b){void 0===b&&(console.warn(\"THREE.Box3: .getParameter() target is now required\"),b=new p);return b.set((a.x-this.min.x)/(this.max.x-this.min.x),(a.y-this.min.y)/(this.max.y-this.min.y),(a.z-this.min.z)/(this.max.z-this.min.z))},intersectsBox:function(a){return a.max.x<this.min.x||a.min.x>this.max.x||a.max.y<this.min.y||a.min.y>this.max.y||a.max.z<this.min.z||a.min.z>this.max.z?!1:!0},intersectsSphere:function(){var a=new p;return function(b){this.clampPoint(b.center,\na);return a.distanceToSquared(b.center)<=b.radius*b.radius}}(),intersectsPlane:function(a){if(0<a.normal.x){var b=a.normal.x*this.min.x;var c=a.normal.x*this.max.x}else b=a.normal.x*this.max.x,c=a.normal.x*this.min.x;0<a.normal.y?(b+=a.normal.y*this.min.y,c+=a.normal.y*this.max.y):(b+=a.normal.y*this.max.y,c+=a.normal.y*this.min.y);0<a.normal.z?(b+=a.normal.z*this.min.z,c+=a.normal.z*this.max.z):(b+=a.normal.z*this.max.z,c+=a.normal.z*this.min.z);return b<=a.constant&&c>=a.constant},intersectsTriangle:function(){function a(a){var e;\nvar f=0;for(e=a.length-3;f<=e;f+=3){h.fromArray(a,f);var g=m.x*Math.abs(h.x)+m.y*Math.abs(h.y)+m.z*Math.abs(h.z),k=b.dot(h),l=c.dot(h),q=d.dot(h);if(Math.max(-Math.max(k,l,q),Math.min(k,l,q))>g)return!1}return!0}var b=new p,c=new p,d=new p,e=new p,f=new p,g=new p,h=new p,k=new p,m=new p,l=new p;return function(h){if(this.isEmpty())return!1;this.getCenter(k);m.subVectors(this.max,k);b.subVectors(h.a,k);c.subVectors(h.b,k);d.subVectors(h.c,k);e.subVectors(c,b);f.subVectors(d,c);g.subVectors(b,d);h=\n[0,-e.z,e.y,0,-f.z,f.y,0,-g.z,g.y,e.z,0,-e.x,f.z,0,-f.x,g.z,0,-g.x,-e.y,e.x,0,-f.y,f.x,0,-g.y,g.x,0];if(!a(h))return!1;h=[1,0,0,0,1,0,0,0,1];if(!a(h))return!1;l.crossVectors(e,f);h=[l.x,l.y,l.z];return a(h)}}(),clampPoint:function(a,b){void 0===b&&(console.warn(\"THREE.Box3: .clampPoint() target is now required\"),b=new p);return b.copy(a).clamp(this.min,this.max)},distanceToPoint:function(){var a=new p;return function(b){return a.copy(b).clamp(this.min,this.max).sub(b).length()}}(),getBoundingSphere:function(){var a=\nnew p;return function(b){void 0===b&&(console.warn(\"THREE.Box3: .getBoundingSphere() target is now required\"),b=new Da);this.getCenter(b.center);b.radius=.5*this.getSize(a).length();return b}}(),intersect:function(a){this.min.max(a.min);this.max.min(a.max);this.isEmpty()&&this.makeEmpty();return this},union:function(a){this.min.min(a.min);this.max.max(a.max);return this},applyMatrix4:function(a){if(this.isEmpty())return this;a=a.elements;var b=a[0]*this.min.x,c=a[1]*this.min.x,d=a[2]*this.min.x,e=\na[0]*this.max.x,f=a[1]*this.max.x,g=a[2]*this.max.x,h=a[4]*this.min.y,k=a[5]*this.min.y,m=a[6]*this.min.y,l=a[4]*this.max.y,n=a[5]*this.max.y,t=a[6]*this.max.y,u=a[8]*this.min.z,r=a[9]*this.min.z,p=a[10]*this.min.z,y=a[8]*this.max.z,x=a[9]*this.max.z,w=a[10]*this.max.z;this.min.x=Math.min(b,e)+Math.min(h,l)+Math.min(u,y)+a[12];this.min.y=Math.min(c,f)+Math.min(k,n)+Math.min(r,x)+a[13];this.min.z=Math.min(d,g)+Math.min(m,t)+Math.min(p,w)+a[14];this.max.x=Math.max(b,e)+Math.max(h,l)+Math.max(u,y)+a[12];\nthis.max.y=Math.max(c,f)+Math.max(k,n)+Math.max(r,x)+a[13];this.max.z=Math.max(d,g)+Math.max(m,t)+Math.max(p,w)+a[14];return this},translate:function(a){this.min.add(a);this.max.add(a);return this},equals:function(a){return a.min.equals(this.min)&&a.max.equals(this.max)}});Object.assign(Da.prototype,{set:function(a,b){this.center.copy(a);this.radius=b;return this},setFromPoints:function(){var a=new Sa;return function(b,c){var d=this.center;void 0!==c?d.copy(c):a.setFromPoints(b).getCenter(d);for(var e=\nc=0,f=b.length;e<f;e++)c=Math.max(c,d.distanceToSquared(b[e]));this.radius=Math.sqrt(c);return this}}(),clone:function(){return(new this.constructor).copy(this)},copy:function(a){this.center.copy(a.center);this.radius=a.radius;return this},empty:function(){return 0>=this.radius},containsPoint:function(a){return a.distanceToSquared(this.center)<=this.radius*this.radius},distanceToPoint:function(a){return a.distanceTo(this.center)-this.radius},intersectsSphere:function(a){var b=this.radius+a.radius;\nreturn a.center.distanceToSquared(this.center)<=b*b},intersectsBox:function(a){return a.intersectsSphere(this)},intersectsPlane:function(a){return Math.abs(a.distanceToPoint(this.center))<=this.radius},clampPoint:function(a,b){var c=this.center.distanceToSquared(a);void 0===b&&(console.warn(\"THREE.Sphere: .clampPoint() target is now required\"),b=new p);b.copy(a);c>this.radius*this.radius&&(b.sub(this.center).normalize(),b.multiplyScalar(this.radius).add(this.center));return b},getBoundingBox:function(a){void 0===\na&&(console.warn(\"THREE.Sphere: .getBoundingBox() target is now required\"),a=new Sa);a.set(this.center,this.center);a.expandByScalar(this.radius);return a},applyMatrix4:function(a){this.center.applyMatrix4(a);this.radius*=a.getMaxScaleOnAxis();return this},translate:function(a){this.center.add(a);return this},equals:function(a){return a.center.equals(this.center)&&a.radius===this.radius}});Object.assign(Ma.prototype,{set:function(a,b){this.normal.copy(a);this.constant=b;return this},setComponents:function(a,\nb,c,d){this.normal.set(a,b,c);this.constant=d;return this},setFromNormalAndCoplanarPoint:function(a,b){this.normal.copy(a);this.constant=-b.dot(this.normal);return this},setFromCoplanarPoints:function(){var a=new p,b=new p;return function(c,d,e){d=a.subVectors(e,d).cross(b.subVectors(c,d)).normalize();this.setFromNormalAndCoplanarPoint(d,c);return this}}(),clone:function(){return(new this.constructor).copy(this)},copy:function(a){this.normal.copy(a.normal);this.constant=a.constant;return this},normalize:function(){var a=\n1/this.normal.length();this.normal.multiplyScalar(a);this.constant*=a;return this},negate:function(){this.constant*=-1;this.normal.negate();return this},distanceToPoint:function(a){return this.normal.dot(a)+this.constant},distanceToSphere:function(a){return this.distanceToPoint(a.center)-a.radius},projectPoint:function(a,b){void 0===b&&(console.warn(\"THREE.Plane: .projectPoint() target is now required\"),b=new p);return b.copy(this.normal).multiplyScalar(-this.distanceToPoint(a)).add(a)},intersectLine:function(){var a=\nnew p;return function(b,c){void 0===c&&(console.warn(\"THREE.Plane: .intersectLine() target is now required\"),c=new p);var d=b.delta(a),e=this.normal.dot(d);if(0===e){if(0===this.distanceToPoint(b.start))return c.copy(b.start)}else if(e=-(b.start.dot(this.normal)+this.constant)/e,!(0>e||1<e))return c.copy(d).multiplyScalar(e).add(b.start)}}(),intersectsLine:function(a){var b=this.distanceToPoint(a.start);a=this.distanceToPoint(a.end);return 0>b&&0<a||0>a&&0<b},intersectsBox:function(a){return a.intersectsPlane(this)},\nintersectsSphere:function(a){return a.intersectsPlane(this)},coplanarPoint:function(a){void 0===a&&(console.warn(\"THREE.Plane: .coplanarPoint() target is now required\"),a=new p);return a.copy(this.normal).multiplyScalar(-this.constant)},applyMatrix4:function(){var a=new p,b=new ra;return function(c,d){d=d||b.getNormalMatrix(c);c=this.coplanarPoint(a).applyMatrix4(c);d=this.normal.applyMatrix3(d).normalize();this.constant=-c.dot(d);return this}}(),translate:function(a){this.constant-=a.dot(this.normal);\nreturn this},equals:function(a){return a.normal.equals(this.normal)&&a.constant===this.constant}});Object.assign(md.prototype,{set:function(a,b,c,d,e,f){var g=this.planes;g[0].copy(a);g[1].copy(b);g[2].copy(c);g[3].copy(d);g[4].copy(e);g[5].copy(f);return this},clone:function(){return(new this.constructor).copy(this)},copy:function(a){for(var b=this.planes,c=0;6>c;c++)b[c].copy(a.planes[c]);return this},setFromMatrix:function(a){var b=this.planes,c=a.elements;a=c[0];var d=c[1],e=c[2],f=c[3],g=c[4],\nh=c[5],k=c[6],m=c[7],l=c[8],n=c[9],t=c[10],p=c[11],r=c[12],v=c[13],y=c[14];c=c[15];b[0].setComponents(f-a,m-g,p-l,c-r).normalize();b[1].setComponents(f+a,m+g,p+l,c+r).normalize();b[2].setComponents(f+d,m+h,p+n,c+v).normalize();b[3].setComponents(f-d,m-h,p-n,c-v).normalize();b[4].setComponents(f-e,m-k,p-t,c-y).normalize();b[5].setComponents(f+e,m+k,p+t,c+y).normalize();return this},intersectsObject:function(){var a=new Da;return function(b){var c=b.geometry;null===c.boundingSphere&&c.computeBoundingSphere();\na.copy(c.boundingSphere).applyMatrix4(b.matrixWorld);return this.intersectsSphere(a)}}(),intersectsSprite:function(){var a=new Da;return function(b){a.center.set(0,0,0);a.radius=.7071067811865476;a.applyMatrix4(b.matrixWorld);return this.intersectsSphere(a)}}(),intersectsSphere:function(a){var b=this.planes,c=a.center;a=-a.radius;for(var d=0;6>d;d++)if(b[d].distanceToPoint(c)<a)return!1;return!0},intersectsBox:function(){var a=new p;return function(b){for(var c=this.planes,d=0;6>d;d++){var e=c[d];\na.x=0<e.normal.x?b.max.x:b.min.x;a.y=0<e.normal.y?b.max.y:b.min.y;a.z=0<e.normal.z?b.max.z:b.min.z;if(0>e.distanceToPoint(a))return!1}return!0}}(),containsPoint:function(a){for(var b=this.planes,c=0;6>c;c++)if(0>b[c].distanceToPoint(a))return!1;return!0}});var S={alphamap_fragment:\"#ifdef USE_ALPHAMAP\\n\\tdiffuseColor.a *= texture2D( alphaMap, vUv ).g;\\n#endif\\n\",alphamap_pars_fragment:\"#ifdef USE_ALPHAMAP\\n\\tuniform sampler2D alphaMap;\\n#endif\\n\",alphatest_fragment:\"#ifdef ALPHATEST\\n\\tif ( diffuseColor.a < ALPHATEST ) discard;\\n#endif\\n\",\naomap_fragment:\"#ifdef USE_AOMAP\\n\\tfloat ambientOcclusion = ( texture2D( aoMap, vUv2 ).r - 1.0 ) * aoMapIntensity + 1.0;\\n\\treflectedLight.indirectDiffuse *= ambientOcclusion;\\n\\t#if defined( USE_ENVMAP ) && defined( PHYSICAL )\\n\\t\\tfloat dotNV = saturate( dot( geometry.normal, geometry.viewDir ) );\\n\\t\\treflectedLight.indirectSpecular *= computeSpecularOcclusion( dotNV, ambientOcclusion, material.specularRoughness );\\n\\t#endif\\n#endif\\n\",aomap_pars_fragment:\"#ifdef USE_AOMAP\\n\\tuniform sampler2D aoMap;\\n\\tuniform float aoMapIntensity;\\n#endif\",\nbegin_vertex:\"\\nvec3 transformed = vec3( position );\\n\",beginnormal_vertex:\"\\nvec3 objectNormal = vec3( normal );\\n\",bsdfs:\"float punctualLightIntensityToIrradianceFactor( const in float lightDistance, const in float cutoffDistance, const in float decayExponent ) {\\n\\tif( decayExponent > 0.0 ) {\\n#if defined ( PHYSICALLY_CORRECT_LIGHTS )\\n\\t\\tfloat distanceFalloff = 1.0 / max( pow( lightDistance, decayExponent ), 0.01 );\\n\\t\\tfloat maxDistanceCutoffFactor = pow2( saturate( 1.0 - pow4( lightDistance / cutoffDistance ) ) );\\n\\t\\treturn distanceFalloff * maxDistanceCutoffFactor;\\n#else\\n\\t\\treturn pow( saturate( -lightDistance / cutoffDistance + 1.0 ), decayExponent );\\n#endif\\n\\t}\\n\\treturn 1.0;\\n}\\nvec3 BRDF_Diffuse_Lambert( const in vec3 diffuseColor ) {\\n\\treturn RECIPROCAL_PI * diffuseColor;\\n}\\nvec3 F_Schlick( const in vec3 specularColor, const in float dotLH ) {\\n\\tfloat fresnel = exp2( ( -5.55473 * dotLH - 6.98316 ) * dotLH );\\n\\treturn ( 1.0 - specularColor ) * fresnel + specularColor;\\n}\\nfloat G_GGX_Smith( const in float alpha, const in float dotNL, const in float dotNV ) {\\n\\tfloat a2 = pow2( alpha );\\n\\tfloat gl = dotNL + sqrt( a2 + ( 1.0 - a2 ) * pow2( dotNL ) );\\n\\tfloat gv = dotNV + sqrt( a2 + ( 1.0 - a2 ) * pow2( dotNV ) );\\n\\treturn 1.0 / ( gl * gv );\\n}\\nfloat G_GGX_SmithCorrelated( const in float alpha, const in float dotNL, const in float dotNV ) {\\n\\tfloat a2 = pow2( alpha );\\n\\tfloat gv = dotNL * sqrt( a2 + ( 1.0 - a2 ) * pow2( dotNV ) );\\n\\tfloat gl = dotNV * sqrt( a2 + ( 1.0 - a2 ) * pow2( dotNL ) );\\n\\treturn 0.5 / max( gv + gl, EPSILON );\\n}\\nfloat D_GGX( const in float alpha, const in float dotNH ) {\\n\\tfloat a2 = pow2( alpha );\\n\\tfloat denom = pow2( dotNH ) * ( a2 - 1.0 ) + 1.0;\\n\\treturn RECIPROCAL_PI * a2 / pow2( denom );\\n}\\nvec3 BRDF_Specular_GGX( const in IncidentLight incidentLight, const in GeometricContext geometry, const in vec3 specularColor, const in float roughness ) {\\n\\tfloat alpha = pow2( roughness );\\n\\tvec3 halfDir = normalize( incidentLight.direction + geometry.viewDir );\\n\\tfloat dotNL = saturate( dot( geometry.normal, incidentLight.direction ) );\\n\\tfloat dotNV = saturate( dot( geometry.normal, geometry.viewDir ) );\\n\\tfloat dotNH = saturate( dot( geometry.normal, halfDir ) );\\n\\tfloat dotLH = saturate( dot( incidentLight.direction, halfDir ) );\\n\\tvec3 F = F_Schlick( specularColor, dotLH );\\n\\tfloat G = G_GGX_SmithCorrelated( alpha, dotNL, dotNV );\\n\\tfloat D = D_GGX( alpha, dotNH );\\n\\treturn F * ( G * D );\\n}\\nvec2 LTC_Uv( const in vec3 N, const in vec3 V, const in float roughness ) {\\n\\tconst float LUT_SIZE = 64.0;\\n\\tconst float LUT_SCALE = ( LUT_SIZE - 1.0 ) / LUT_SIZE;\\n\\tconst float LUT_BIAS = 0.5 / LUT_SIZE;\\n\\tfloat dotNV = saturate( dot( N, V ) );\\n\\tvec2 uv = vec2( roughness, sqrt( 1.0 - dotNV ) );\\n\\tuv = uv * LUT_SCALE + LUT_BIAS;\\n\\treturn uv;\\n}\\nfloat LTC_ClippedSphereFormFactor( const in vec3 f ) {\\n\\tfloat l = length( f );\\n\\treturn max( ( l * l + f.z ) / ( l + 1.0 ), 0.0 );\\n}\\nvec3 LTC_EdgeVectorFormFactor( const in vec3 v1, const in vec3 v2 ) {\\n\\tfloat x = dot( v1, v2 );\\n\\tfloat y = abs( x );\\n\\tfloat a = 0.8543985 + ( 0.4965155 + 0.0145206 * y ) * y;\\n\\tfloat b = 3.4175940 + ( 4.1616724 + y ) * y;\\n\\tfloat v = a / b;\\n\\tfloat theta_sintheta = ( x > 0.0 ) ? v : 0.5 * inversesqrt( max( 1.0 - x * x, 1e-7 ) ) - v;\\n\\treturn cross( v1, v2 ) * theta_sintheta;\\n}\\nvec3 LTC_Evaluate( const in vec3 N, const in vec3 V, const in vec3 P, const in mat3 mInv, const in vec3 rectCoords[ 4 ] ) {\\n\\tvec3 v1 = rectCoords[ 1 ] - rectCoords[ 0 ];\\n\\tvec3 v2 = rectCoords[ 3 ] - rectCoords[ 0 ];\\n\\tvec3 lightNormal = cross( v1, v2 );\\n\\tif( dot( lightNormal, P - rectCoords[ 0 ] ) < 0.0 ) return vec3( 0.0 );\\n\\tvec3 T1, T2;\\n\\tT1 = normalize( V - N * dot( V, N ) );\\n\\tT2 = - cross( N, T1 );\\n\\tmat3 mat = mInv * transposeMat3( mat3( T1, T2, N ) );\\n\\tvec3 coords[ 4 ];\\n\\tcoords[ 0 ] = mat * ( rectCoords[ 0 ] - P );\\n\\tcoords[ 1 ] = mat * ( rectCoords[ 1 ] - P );\\n\\tcoords[ 2 ] = mat * ( rectCoords[ 2 ] - P );\\n\\tcoords[ 3 ] = mat * ( rectCoords[ 3 ] - P );\\n\\tcoords[ 0 ] = normalize( coords[ 0 ] );\\n\\tcoords[ 1 ] = normalize( coords[ 1 ] );\\n\\tcoords[ 2 ] = normalize( coords[ 2 ] );\\n\\tcoords[ 3 ] = normalize( coords[ 3 ] );\\n\\tvec3 vectorFormFactor = vec3( 0.0 );\\n\\tvectorFormFactor += LTC_EdgeVectorFormFactor( coords[ 0 ], coords[ 1 ] );\\n\\tvectorFormFactor += LTC_EdgeVectorFormFactor( coords[ 1 ], coords[ 2 ] );\\n\\tvectorFormFactor += LTC_EdgeVectorFormFactor( coords[ 2 ], coords[ 3 ] );\\n\\tvectorFormFactor += LTC_EdgeVectorFormFactor( coords[ 3 ], coords[ 0 ] );\\n\\tfloat result = LTC_ClippedSphereFormFactor( vectorFormFactor );\\n\\treturn vec3( result );\\n}\\nvec3 BRDF_Specular_GGX_Environment( const in GeometricContext geometry, const in vec3 specularColor, const in float roughness ) {\\n\\tfloat dotNV = saturate( dot( geometry.normal, geometry.viewDir ) );\\n\\tconst vec4 c0 = vec4( - 1, - 0.0275, - 0.572, 0.022 );\\n\\tconst vec4 c1 = vec4( 1, 0.0425, 1.04, - 0.04 );\\n\\tvec4 r = roughness * c0 + c1;\\n\\tfloat a004 = min( r.x * r.x, exp2( - 9.28 * dotNV ) ) * r.x + r.y;\\n\\tvec2 AB = vec2( -1.04, 1.04 ) * a004 + r.zw;\\n\\treturn specularColor * AB.x + AB.y;\\n}\\nfloat G_BlinnPhong_Implicit( ) {\\n\\treturn 0.25;\\n}\\nfloat D_BlinnPhong( const in float shininess, const in float dotNH ) {\\n\\treturn RECIPROCAL_PI * ( shininess * 0.5 + 1.0 ) * pow( dotNH, shininess );\\n}\\nvec3 BRDF_Specular_BlinnPhong( const in IncidentLight incidentLight, const in GeometricContext geometry, const in vec3 specularColor, const in float shininess ) {\\n\\tvec3 halfDir = normalize( incidentLight.direction + geometry.viewDir );\\n\\tfloat dotNH = saturate( dot( geometry.normal, halfDir ) );\\n\\tfloat dotLH = saturate( dot( incidentLight.direction, halfDir ) );\\n\\tvec3 F = F_Schlick( specularColor, dotLH );\\n\\tfloat G = G_BlinnPhong_Implicit( );\\n\\tfloat D = D_BlinnPhong( shininess, dotNH );\\n\\treturn F * ( G * D );\\n}\\nfloat GGXRoughnessToBlinnExponent( const in float ggxRoughness ) {\\n\\treturn ( 2.0 / pow2( ggxRoughness + 0.0001 ) - 2.0 );\\n}\\nfloat BlinnExponentToGGXRoughness( const in float blinnExponent ) {\\n\\treturn sqrt( 2.0 / ( blinnExponent + 2.0 ) );\\n}\\n\",\nbumpmap_pars_fragment:\"#ifdef USE_BUMPMAP\\n\\tuniform sampler2D bumpMap;\\n\\tuniform float bumpScale;\\n\\tvec2 dHdxy_fwd() {\\n\\t\\tvec2 dSTdx = dFdx( vUv );\\n\\t\\tvec2 dSTdy = dFdy( vUv );\\n\\t\\tfloat Hll = bumpScale * texture2D( bumpMap, vUv ).x;\\n\\t\\tfloat dBx = bumpScale * texture2D( bumpMap, vUv + dSTdx ).x - Hll;\\n\\t\\tfloat dBy = bumpScale * texture2D( bumpMap, vUv + dSTdy ).x - Hll;\\n\\t\\treturn vec2( dBx, dBy );\\n\\t}\\n\\tvec3 perturbNormalArb( vec3 surf_pos, vec3 surf_norm, vec2 dHdxy ) {\\n\\t\\tvec3 vSigmaX = vec3( dFdx( surf_pos.x ), dFdx( surf_pos.y ), dFdx( surf_pos.z ) );\\n\\t\\tvec3 vSigmaY = vec3( dFdy( surf_pos.x ), dFdy( surf_pos.y ), dFdy( surf_pos.z ) );\\n\\t\\tvec3 vN = surf_norm;\\n\\t\\tvec3 R1 = cross( vSigmaY, vN );\\n\\t\\tvec3 R2 = cross( vN, vSigmaX );\\n\\t\\tfloat fDet = dot( vSigmaX, R1 );\\n\\t\\tfDet *= ( float( gl_FrontFacing ) * 2.0 - 1.0 );\\n\\t\\tvec3 vGrad = sign( fDet ) * ( dHdxy.x * R1 + dHdxy.y * R2 );\\n\\t\\treturn normalize( abs( fDet ) * surf_norm - vGrad );\\n\\t}\\n#endif\\n\",\nclipping_planes_fragment:\"#if NUM_CLIPPING_PLANES > 0\\n\\tvec4 plane;\\n\\t#pragma unroll_loop\\n\\tfor ( int i = 0; i < UNION_CLIPPING_PLANES; i ++ ) {\\n\\t\\tplane = clippingPlanes[ i ];\\n\\t\\tif ( dot( vViewPosition, plane.xyz ) > plane.w ) discard;\\n\\t}\\n\\t#if UNION_CLIPPING_PLANES < NUM_CLIPPING_PLANES\\n\\t\\tbool clipped = true;\\n\\t\\t#pragma unroll_loop\\n\\t\\tfor ( int i = UNION_CLIPPING_PLANES; i < NUM_CLIPPING_PLANES; i ++ ) {\\n\\t\\t\\tplane = clippingPlanes[ i ];\\n\\t\\t\\tclipped = ( dot( vViewPosition, plane.xyz ) > plane.w ) && clipped;\\n\\t\\t}\\n\\t\\tif ( clipped ) discard;\\n\\t#endif\\n#endif\\n\",\nclipping_planes_pars_fragment:\"#if NUM_CLIPPING_PLANES > 0\\n\\t#if ! defined( PHYSICAL ) && ! defined( PHONG )\\n\\t\\tvarying vec3 vViewPosition;\\n\\t#endif\\n\\tuniform vec4 clippingPlanes[ NUM_CLIPPING_PLANES ];\\n#endif\\n\",clipping_planes_pars_vertex:\"#if NUM_CLIPPING_PLANES > 0 && ! defined( PHYSICAL ) && ! defined( PHONG )\\n\\tvarying vec3 vViewPosition;\\n#endif\\n\",clipping_planes_vertex:\"#if NUM_CLIPPING_PLANES > 0 && ! defined( PHYSICAL ) && ! defined( PHONG )\\n\\tvViewPosition = - mvPosition.xyz;\\n#endif\\n\",\ncolor_fragment:\"#ifdef USE_COLOR\\n\\tdiffuseColor.rgb *= vColor;\\n#endif\",color_pars_fragment:\"#ifdef USE_COLOR\\n\\tvarying vec3 vColor;\\n#endif\\n\",color_pars_vertex:\"#ifdef USE_COLOR\\n\\tvarying vec3 vColor;\\n#endif\",color_vertex:\"#ifdef USE_COLOR\\n\\tvColor.xyz = color.xyz;\\n#endif\",common:\"#define PI 3.14159265359\\n#define PI2 6.28318530718\\n#define PI_HALF 1.5707963267949\\n#define RECIPROCAL_PI 0.31830988618\\n#define RECIPROCAL_PI2 0.15915494\\n#define LOG2 1.442695\\n#define EPSILON 1e-6\\n#define saturate(a) clamp( a, 0.0, 1.0 )\\n#define whiteCompliment(a) ( 1.0 - saturate( a ) )\\nfloat pow2( const in float x ) { return x*x; }\\nfloat pow3( const in float x ) { return x*x*x; }\\nfloat pow4( const in float x ) { float x2 = x*x; return x2*x2; }\\nfloat average( const in vec3 color ) { return dot( color, vec3( 0.3333 ) ); }\\nhighp float rand( const in vec2 uv ) {\\n\\tconst highp float a = 12.9898, b = 78.233, c = 43758.5453;\\n\\thighp float dt = dot( uv.xy, vec2( a,b ) ), sn = mod( dt, PI );\\n\\treturn fract(sin(sn) * c);\\n}\\nstruct IncidentLight {\\n\\tvec3 color;\\n\\tvec3 direction;\\n\\tbool visible;\\n};\\nstruct ReflectedLight {\\n\\tvec3 directDiffuse;\\n\\tvec3 directSpecular;\\n\\tvec3 indirectDiffuse;\\n\\tvec3 indirectSpecular;\\n};\\nstruct GeometricContext {\\n\\tvec3 position;\\n\\tvec3 normal;\\n\\tvec3 viewDir;\\n};\\nvec3 transformDirection( in vec3 dir, in mat4 matrix ) {\\n\\treturn normalize( ( matrix * vec4( dir, 0.0 ) ).xyz );\\n}\\nvec3 inverseTransformDirection( in vec3 dir, in mat4 matrix ) {\\n\\treturn normalize( ( vec4( dir, 0.0 ) * matrix ).xyz );\\n}\\nvec3 projectOnPlane(in vec3 point, in vec3 pointOnPlane, in vec3 planeNormal ) {\\n\\tfloat distance = dot( planeNormal, point - pointOnPlane );\\n\\treturn - distance * planeNormal + point;\\n}\\nfloat sideOfPlane( in vec3 point, in vec3 pointOnPlane, in vec3 planeNormal ) {\\n\\treturn sign( dot( point - pointOnPlane, planeNormal ) );\\n}\\nvec3 linePlaneIntersect( in vec3 pointOnLine, in vec3 lineDirection, in vec3 pointOnPlane, in vec3 planeNormal ) {\\n\\treturn lineDirection * ( dot( planeNormal, pointOnPlane - pointOnLine ) / dot( planeNormal, lineDirection ) ) + pointOnLine;\\n}\\nmat3 transposeMat3( const in mat3 m ) {\\n\\tmat3 tmp;\\n\\ttmp[ 0 ] = vec3( m[ 0 ].x, m[ 1 ].x, m[ 2 ].x );\\n\\ttmp[ 1 ] = vec3( m[ 0 ].y, m[ 1 ].y, m[ 2 ].y );\\n\\ttmp[ 2 ] = vec3( m[ 0 ].z, m[ 1 ].z, m[ 2 ].z );\\n\\treturn tmp;\\n}\\nfloat linearToRelativeLuminance( const in vec3 color ) {\\n\\tvec3 weights = vec3( 0.2126, 0.7152, 0.0722 );\\n\\treturn dot( weights, color.rgb );\\n}\\n\",\ncube_uv_reflection_fragment:\"#ifdef ENVMAP_TYPE_CUBE_UV\\n#define cubeUV_textureSize (1024.0)\\nint getFaceFromDirection(vec3 direction) {\\n\\tvec3 absDirection = abs(direction);\\n\\tint face = -1;\\n\\tif( absDirection.x > absDirection.z ) {\\n\\t\\tif(absDirection.x > absDirection.y )\\n\\t\\t\\tface = direction.x > 0.0 ? 0 : 3;\\n\\t\\telse\\n\\t\\t\\tface = direction.y > 0.0 ? 1 : 4;\\n\\t}\\n\\telse {\\n\\t\\tif(absDirection.z > absDirection.y )\\n\\t\\t\\tface = direction.z > 0.0 ? 2 : 5;\\n\\t\\telse\\n\\t\\t\\tface = direction.y > 0.0 ? 1 : 4;\\n\\t}\\n\\treturn face;\\n}\\n#define cubeUV_maxLods1 (log2(cubeUV_textureSize*0.25) - 1.0)\\n#define cubeUV_rangeClamp (exp2((6.0 - 1.0) * 2.0))\\nvec2 MipLevelInfo( vec3 vec, float roughnessLevel, float roughness ) {\\n\\tfloat scale = exp2(cubeUV_maxLods1 - roughnessLevel);\\n\\tfloat dxRoughness = dFdx(roughness);\\n\\tfloat dyRoughness = dFdy(roughness);\\n\\tvec3 dx = dFdx( vec * scale * dxRoughness );\\n\\tvec3 dy = dFdy( vec * scale * dyRoughness );\\n\\tfloat d = max( dot( dx, dx ), dot( dy, dy ) );\\n\\td = clamp(d, 1.0, cubeUV_rangeClamp);\\n\\tfloat mipLevel = 0.5 * log2(d);\\n\\treturn vec2(floor(mipLevel), fract(mipLevel));\\n}\\n#define cubeUV_maxLods2 (log2(cubeUV_textureSize*0.25) - 2.0)\\n#define cubeUV_rcpTextureSize (1.0 / cubeUV_textureSize)\\nvec2 getCubeUV(vec3 direction, float roughnessLevel, float mipLevel) {\\n\\tmipLevel = roughnessLevel > cubeUV_maxLods2 - 3.0 ? 0.0 : mipLevel;\\n\\tfloat a = 16.0 * cubeUV_rcpTextureSize;\\n\\tvec2 exp2_packed = exp2( vec2( roughnessLevel, mipLevel ) );\\n\\tvec2 rcp_exp2_packed = vec2( 1.0 ) / exp2_packed;\\n\\tfloat powScale = exp2_packed.x * exp2_packed.y;\\n\\tfloat scale = rcp_exp2_packed.x * rcp_exp2_packed.y * 0.25;\\n\\tfloat mipOffset = 0.75*(1.0 - rcp_exp2_packed.y) * rcp_exp2_packed.x;\\n\\tbool bRes = mipLevel == 0.0;\\n\\tscale = bRes && (scale < a) ? a : scale;\\n\\tvec3 r;\\n\\tvec2 offset;\\n\\tint face = getFaceFromDirection(direction);\\n\\tfloat rcpPowScale = 1.0 / powScale;\\n\\tif( face == 0) {\\n\\t\\tr = vec3(direction.x, -direction.z, direction.y);\\n\\t\\toffset = vec2(0.0+mipOffset,0.75 * rcpPowScale);\\n\\t\\toffset.y = bRes && (offset.y < 2.0*a) ? a : offset.y;\\n\\t}\\n\\telse if( face == 1) {\\n\\t\\tr = vec3(direction.y, direction.x, direction.z);\\n\\t\\toffset = vec2(scale+mipOffset, 0.75 * rcpPowScale);\\n\\t\\toffset.y = bRes && (offset.y < 2.0*a) ? a : offset.y;\\n\\t}\\n\\telse if( face == 2) {\\n\\t\\tr = vec3(direction.z, direction.x, direction.y);\\n\\t\\toffset = vec2(2.0*scale+mipOffset, 0.75 * rcpPowScale);\\n\\t\\toffset.y = bRes && (offset.y < 2.0*a) ? a : offset.y;\\n\\t}\\n\\telse if( face == 3) {\\n\\t\\tr = vec3(direction.x, direction.z, direction.y);\\n\\t\\toffset = vec2(0.0+mipOffset,0.5 * rcpPowScale);\\n\\t\\toffset.y = bRes && (offset.y < 2.0*a) ? 0.0 : offset.y;\\n\\t}\\n\\telse if( face == 4) {\\n\\t\\tr = vec3(direction.y, direction.x, -direction.z);\\n\\t\\toffset = vec2(scale+mipOffset, 0.5 * rcpPowScale);\\n\\t\\toffset.y = bRes && (offset.y < 2.0*a) ? 0.0 : offset.y;\\n\\t}\\n\\telse {\\n\\t\\tr = vec3(direction.z, -direction.x, direction.y);\\n\\t\\toffset = vec2(2.0*scale+mipOffset, 0.5 * rcpPowScale);\\n\\t\\toffset.y = bRes && (offset.y < 2.0*a) ? 0.0 : offset.y;\\n\\t}\\n\\tr = normalize(r);\\n\\tfloat texelOffset = 0.5 * cubeUV_rcpTextureSize;\\n\\tvec2 s = ( r.yz / abs( r.x ) + vec2( 1.0 ) ) * 0.5;\\n\\tvec2 base = offset + vec2( texelOffset );\\n\\treturn base + s * ( scale - 2.0 * texelOffset );\\n}\\n#define cubeUV_maxLods3 (log2(cubeUV_textureSize*0.25) - 3.0)\\nvec4 textureCubeUV( sampler2D envMap, vec3 reflectedDirection, float roughness ) {\\n\\tfloat roughnessVal = roughness* cubeUV_maxLods3;\\n\\tfloat r1 = floor(roughnessVal);\\n\\tfloat r2 = r1 + 1.0;\\n\\tfloat t = fract(roughnessVal);\\n\\tvec2 mipInfo = MipLevelInfo(reflectedDirection, r1, roughness);\\n\\tfloat s = mipInfo.y;\\n\\tfloat level0 = mipInfo.x;\\n\\tfloat level1 = level0 + 1.0;\\n\\tlevel1 = level1 > 5.0 ? 5.0 : level1;\\n\\tlevel0 += min( floor( s + 0.5 ), 5.0 );\\n\\tvec2 uv_10 = getCubeUV(reflectedDirection, r1, level0);\\n\\tvec4 color10 = envMapTexelToLinear(texture2D(envMap, uv_10));\\n\\tvec2 uv_20 = getCubeUV(reflectedDirection, r2, level0);\\n\\tvec4 color20 = envMapTexelToLinear(texture2D(envMap, uv_20));\\n\\tvec4 result = mix(color10, color20, t);\\n\\treturn vec4(result.rgb, 1.0);\\n}\\n#endif\\n\",\ndefaultnormal_vertex:\"vec3 transformedNormal = normalMatrix * objectNormal;\\n#ifdef FLIP_SIDED\\n\\ttransformedNormal = - transformedNormal;\\n#endif\\n\",displacementmap_pars_vertex:\"#ifdef USE_DISPLACEMENTMAP\\n\\tuniform sampler2D displacementMap;\\n\\tuniform float displacementScale;\\n\\tuniform float displacementBias;\\n#endif\\n\",displacementmap_vertex:\"#ifdef USE_DISPLACEMENTMAP\\n\\ttransformed += normalize( objectNormal ) * ( texture2D( displacementMap, uv ).x * displacementScale + displacementBias );\\n#endif\\n\",\nemissivemap_fragment:\"#ifdef USE_EMISSIVEMAP\\n\\tvec4 emissiveColor = texture2D( emissiveMap, vUv );\\n\\temissiveColor.rgb = emissiveMapTexelToLinear( emissiveColor ).rgb;\\n\\ttotalEmissiveRadiance *= emissiveColor.rgb;\\n#endif\\n\",emissivemap_pars_fragment:\"#ifdef USE_EMISSIVEMAP\\n\\tuniform sampler2D emissiveMap;\\n#endif\\n\",encodings_fragment:\" gl_FragColor = linearToOutputTexel( gl_FragColor );\\n\",encodings_pars_fragment:\"\\nvec4 LinearToLinear( in vec4 value ) {\\n\\treturn value;\\n}\\nvec4 GammaToLinear( in vec4 value, in float gammaFactor ) {\\n\\treturn vec4( pow( value.xyz, vec3( gammaFactor ) ), value.w );\\n}\\nvec4 LinearToGamma( in vec4 value, in float gammaFactor ) {\\n\\treturn vec4( pow( value.xyz, vec3( 1.0 / gammaFactor ) ), value.w );\\n}\\nvec4 sRGBToLinear( in vec4 value ) {\\n\\treturn vec4( mix( pow( value.rgb * 0.9478672986 + vec3( 0.0521327014 ), vec3( 2.4 ) ), value.rgb * 0.0773993808, vec3( lessThanEqual( value.rgb, vec3( 0.04045 ) ) ) ), value.w );\\n}\\nvec4 LinearTosRGB( in vec4 value ) {\\n\\treturn vec4( mix( pow( value.rgb, vec3( 0.41666 ) ) * 1.055 - vec3( 0.055 ), value.rgb * 12.92, vec3( lessThanEqual( value.rgb, vec3( 0.0031308 ) ) ) ), value.w );\\n}\\nvec4 RGBEToLinear( in vec4 value ) {\\n\\treturn vec4( value.rgb * exp2( value.a * 255.0 - 128.0 ), 1.0 );\\n}\\nvec4 LinearToRGBE( in vec4 value ) {\\n\\tfloat maxComponent = max( max( value.r, value.g ), value.b );\\n\\tfloat fExp = clamp( ceil( log2( maxComponent ) ), -128.0, 127.0 );\\n\\treturn vec4( value.rgb / exp2( fExp ), ( fExp + 128.0 ) / 255.0 );\\n}\\nvec4 RGBMToLinear( in vec4 value, in float maxRange ) {\\n\\treturn vec4( value.xyz * value.w * maxRange, 1.0 );\\n}\\nvec4 LinearToRGBM( in vec4 value, in float maxRange ) {\\n\\tfloat maxRGB = max( value.x, max( value.g, value.b ) );\\n\\tfloat M = clamp( maxRGB / maxRange, 0.0, 1.0 );\\n\\tM = ceil( M * 255.0 ) / 255.0;\\n\\treturn vec4( value.rgb / ( M * maxRange ), M );\\n}\\nvec4 RGBDToLinear( in vec4 value, in float maxRange ) {\\n\\treturn vec4( value.rgb * ( ( maxRange / 255.0 ) / value.a ), 1.0 );\\n}\\nvec4 LinearToRGBD( in vec4 value, in float maxRange ) {\\n\\tfloat maxRGB = max( value.x, max( value.g, value.b ) );\\n\\tfloat D = max( maxRange / maxRGB, 1.0 );\\n\\tD = min( floor( D ) / 255.0, 1.0 );\\n\\treturn vec4( value.rgb * ( D * ( 255.0 / maxRange ) ), D );\\n}\\nconst mat3 cLogLuvM = mat3( 0.2209, 0.3390, 0.4184, 0.1138, 0.6780, 0.7319, 0.0102, 0.1130, 0.2969 );\\nvec4 LinearToLogLuv( in vec4 value ) {\\n\\tvec3 Xp_Y_XYZp = value.rgb * cLogLuvM;\\n\\tXp_Y_XYZp = max(Xp_Y_XYZp, vec3(1e-6, 1e-6, 1e-6));\\n\\tvec4 vResult;\\n\\tvResult.xy = Xp_Y_XYZp.xy / Xp_Y_XYZp.z;\\n\\tfloat Le = 2.0 * log2(Xp_Y_XYZp.y) + 127.0;\\n\\tvResult.w = fract(Le);\\n\\tvResult.z = (Le - (floor(vResult.w*255.0))/255.0)/255.0;\\n\\treturn vResult;\\n}\\nconst mat3 cLogLuvInverseM = mat3( 6.0014, -2.7008, -1.7996, -1.3320, 3.1029, -5.7721, 0.3008, -1.0882, 5.6268 );\\nvec4 LogLuvToLinear( in vec4 value ) {\\n\\tfloat Le = value.z * 255.0 + value.w;\\n\\tvec3 Xp_Y_XYZp;\\n\\tXp_Y_XYZp.y = exp2((Le - 127.0) / 2.0);\\n\\tXp_Y_XYZp.z = Xp_Y_XYZp.y / value.y;\\n\\tXp_Y_XYZp.x = value.x * Xp_Y_XYZp.z;\\n\\tvec3 vRGB = Xp_Y_XYZp.rgb * cLogLuvInverseM;\\n\\treturn vec4( max(vRGB, 0.0), 1.0 );\\n}\\n\",\nenvmap_fragment:\"#ifdef USE_ENVMAP\\n\\t#if defined( USE_BUMPMAP ) || defined( USE_NORMALMAP ) || defined( PHONG )\\n\\t\\tvec3 cameraToVertex = normalize( vWorldPosition - cameraPosition );\\n\\t\\tvec3 worldNormal = inverseTransformDirection( normal, viewMatrix );\\n\\t\\t#ifdef ENVMAP_MODE_REFLECTION\\n\\t\\t\\tvec3 reflectVec = reflect( cameraToVertex, worldNormal );\\n\\t\\t#else\\n\\t\\t\\tvec3 reflectVec = refract( cameraToVertex, worldNormal, refractionRatio );\\n\\t\\t#endif\\n\\t#else\\n\\t\\tvec3 reflectVec = vReflect;\\n\\t#endif\\n\\t#ifdef ENVMAP_TYPE_CUBE\\n\\t\\tvec4 envColor = textureCube( envMap, vec3( flipEnvMap * reflectVec.x, reflectVec.yz ) );\\n\\t#elif defined( ENVMAP_TYPE_EQUIREC )\\n\\t\\tvec2 sampleUV;\\n\\t\\treflectVec = normalize( reflectVec );\\n\\t\\tsampleUV.y = asin( clamp( reflectVec.y, - 1.0, 1.0 ) ) * RECIPROCAL_PI + 0.5;\\n\\t\\tsampleUV.x = atan( reflectVec.z, reflectVec.x ) * RECIPROCAL_PI2 + 0.5;\\n\\t\\tvec4 envColor = texture2D( envMap, sampleUV );\\n\\t#elif defined( ENVMAP_TYPE_SPHERE )\\n\\t\\treflectVec = normalize( reflectVec );\\n\\t\\tvec3 reflectView = normalize( ( viewMatrix * vec4( reflectVec, 0.0 ) ).xyz + vec3( 0.0, 0.0, 1.0 ) );\\n\\t\\tvec4 envColor = texture2D( envMap, reflectView.xy * 0.5 + 0.5 );\\n\\t#else\\n\\t\\tvec4 envColor = vec4( 0.0 );\\n\\t#endif\\n\\tenvColor = envMapTexelToLinear( envColor );\\n\\t#ifdef ENVMAP_BLENDING_MULTIPLY\\n\\t\\toutgoingLight = mix( outgoingLight, outgoingLight * envColor.xyz, specularStrength * reflectivity );\\n\\t#elif defined( ENVMAP_BLENDING_MIX )\\n\\t\\toutgoingLight = mix( outgoingLight, envColor.xyz, specularStrength * reflectivity );\\n\\t#elif defined( ENVMAP_BLENDING_ADD )\\n\\t\\toutgoingLight += envColor.xyz * specularStrength * reflectivity;\\n\\t#endif\\n#endif\\n\",\nenvmap_pars_fragment:\"#if defined( USE_ENVMAP ) || defined( PHYSICAL )\\n\\tuniform float reflectivity;\\n\\tuniform float envMapIntensity;\\n#endif\\n#ifdef USE_ENVMAP\\n\\t#if ! defined( PHYSICAL ) && ( defined( USE_BUMPMAP ) || defined( USE_NORMALMAP ) || defined( PHONG ) )\\n\\t\\tvarying vec3 vWorldPosition;\\n\\t#endif\\n\\t#ifdef ENVMAP_TYPE_CUBE\\n\\t\\tuniform samplerCube envMap;\\n\\t#else\\n\\t\\tuniform sampler2D envMap;\\n\\t#endif\\n\\tuniform float flipEnvMap;\\n\\tuniform int maxMipLevel;\\n\\t#if defined( USE_BUMPMAP ) || defined( USE_NORMALMAP ) || defined( PHONG ) || defined( PHYSICAL )\\n\\t\\tuniform float refractionRatio;\\n\\t#else\\n\\t\\tvarying vec3 vReflect;\\n\\t#endif\\n#endif\\n\",\nenvmap_pars_vertex:\"#ifdef USE_ENVMAP\\n\\t#if defined( USE_BUMPMAP ) || defined( USE_NORMALMAP ) || defined( PHONG )\\n\\t\\tvarying vec3 vWorldPosition;\\n\\t#else\\n\\t\\tvarying vec3 vReflect;\\n\\t\\tuniform float refractionRatio;\\n\\t#endif\\n#endif\\n\",envmap_physical_pars_fragment:\"#if defined( USE_ENVMAP ) && defined( PHYSICAL )\\n\\tvec3 getLightProbeIndirectIrradiance( const in GeometricContext geometry, const in int maxMIPLevel ) {\\n\\t\\tvec3 worldNormal = inverseTransformDirection( geometry.normal, viewMatrix );\\n\\t\\t#ifdef ENVMAP_TYPE_CUBE\\n\\t\\t\\tvec3 queryVec = vec3( flipEnvMap * worldNormal.x, worldNormal.yz );\\n\\t\\t\\t#ifdef TEXTURE_LOD_EXT\\n\\t\\t\\t\\tvec4 envMapColor = textureCubeLodEXT( envMap, queryVec, float( maxMIPLevel ) );\\n\\t\\t\\t#else\\n\\t\\t\\t\\tvec4 envMapColor = textureCube( envMap, queryVec, float( maxMIPLevel ) );\\n\\t\\t\\t#endif\\n\\t\\t\\tenvMapColor.rgb = envMapTexelToLinear( envMapColor ).rgb;\\n\\t\\t#elif defined( ENVMAP_TYPE_CUBE_UV )\\n\\t\\t\\tvec3 queryVec = vec3( flipEnvMap * worldNormal.x, worldNormal.yz );\\n\\t\\t\\tvec4 envMapColor = textureCubeUV( envMap, queryVec, 1.0 );\\n\\t\\t#else\\n\\t\\t\\tvec4 envMapColor = vec4( 0.0 );\\n\\t\\t#endif\\n\\t\\treturn PI * envMapColor.rgb * envMapIntensity;\\n\\t}\\n\\tfloat getSpecularMIPLevel( const in float blinnShininessExponent, const in int maxMIPLevel ) {\\n\\t\\tfloat maxMIPLevelScalar = float( maxMIPLevel );\\n\\t\\tfloat desiredMIPLevel = maxMIPLevelScalar + 0.79248 - 0.5 * log2( pow2( blinnShininessExponent ) + 1.0 );\\n\\t\\treturn clamp( desiredMIPLevel, 0.0, maxMIPLevelScalar );\\n\\t}\\n\\tvec3 getLightProbeIndirectRadiance( const in GeometricContext geometry, const in float blinnShininessExponent, const in int maxMIPLevel ) {\\n\\t\\t#ifdef ENVMAP_MODE_REFLECTION\\n\\t\\t\\tvec3 reflectVec = reflect( -geometry.viewDir, geometry.normal );\\n\\t\\t#else\\n\\t\\t\\tvec3 reflectVec = refract( -geometry.viewDir, geometry.normal, refractionRatio );\\n\\t\\t#endif\\n\\t\\treflectVec = inverseTransformDirection( reflectVec, viewMatrix );\\n\\t\\tfloat specularMIPLevel = getSpecularMIPLevel( blinnShininessExponent, maxMIPLevel );\\n\\t\\t#ifdef ENVMAP_TYPE_CUBE\\n\\t\\t\\tvec3 queryReflectVec = vec3( flipEnvMap * reflectVec.x, reflectVec.yz );\\n\\t\\t\\t#ifdef TEXTURE_LOD_EXT\\n\\t\\t\\t\\tvec4 envMapColor = textureCubeLodEXT( envMap, queryReflectVec, specularMIPLevel );\\n\\t\\t\\t#else\\n\\t\\t\\t\\tvec4 envMapColor = textureCube( envMap, queryReflectVec, specularMIPLevel );\\n\\t\\t\\t#endif\\n\\t\\t\\tenvMapColor.rgb = envMapTexelToLinear( envMapColor ).rgb;\\n\\t\\t#elif defined( ENVMAP_TYPE_CUBE_UV )\\n\\t\\t\\tvec3 queryReflectVec = vec3( flipEnvMap * reflectVec.x, reflectVec.yz );\\n\\t\\t\\tvec4 envMapColor = textureCubeUV( envMap, queryReflectVec, BlinnExponentToGGXRoughness(blinnShininessExponent ));\\n\\t\\t#elif defined( ENVMAP_TYPE_EQUIREC )\\n\\t\\t\\tvec2 sampleUV;\\n\\t\\t\\tsampleUV.y = asin( clamp( reflectVec.y, - 1.0, 1.0 ) ) * RECIPROCAL_PI + 0.5;\\n\\t\\t\\tsampleUV.x = atan( reflectVec.z, reflectVec.x ) * RECIPROCAL_PI2 + 0.5;\\n\\t\\t\\t#ifdef TEXTURE_LOD_EXT\\n\\t\\t\\t\\tvec4 envMapColor = texture2DLodEXT( envMap, sampleUV, specularMIPLevel );\\n\\t\\t\\t#else\\n\\t\\t\\t\\tvec4 envMapColor = texture2D( envMap, sampleUV, specularMIPLevel );\\n\\t\\t\\t#endif\\n\\t\\t\\tenvMapColor.rgb = envMapTexelToLinear( envMapColor ).rgb;\\n\\t\\t#elif defined( ENVMAP_TYPE_SPHERE )\\n\\t\\t\\tvec3 reflectView = normalize( ( viewMatrix * vec4( reflectVec, 0.0 ) ).xyz + vec3( 0.0,0.0,1.0 ) );\\n\\t\\t\\t#ifdef TEXTURE_LOD_EXT\\n\\t\\t\\t\\tvec4 envMapColor = texture2DLodEXT( envMap, reflectView.xy * 0.5 + 0.5, specularMIPLevel );\\n\\t\\t\\t#else\\n\\t\\t\\t\\tvec4 envMapColor = texture2D( envMap, reflectView.xy * 0.5 + 0.5, specularMIPLevel );\\n\\t\\t\\t#endif\\n\\t\\t\\tenvMapColor.rgb = envMapTexelToLinear( envMapColor ).rgb;\\n\\t\\t#endif\\n\\t\\treturn envMapColor.rgb * envMapIntensity;\\n\\t}\\n#endif\\n\",\nenvmap_vertex:\"#ifdef USE_ENVMAP\\n\\t#if defined( USE_BUMPMAP ) || defined( USE_NORMALMAP ) || defined( PHONG )\\n\\t\\tvWorldPosition = worldPosition.xyz;\\n\\t#else\\n\\t\\tvec3 cameraToVertex = normalize( worldPosition.xyz - cameraPosition );\\n\\t\\tvec3 worldNormal = inverseTransformDirection( transformedNormal, viewMatrix );\\n\\t\\t#ifdef ENVMAP_MODE_REFLECTION\\n\\t\\t\\tvReflect = reflect( cameraToVertex, worldNormal );\\n\\t\\t#else\\n\\t\\t\\tvReflect = refract( cameraToVertex, worldNormal, refractionRatio );\\n\\t\\t#endif\\n\\t#endif\\n#endif\\n\",\nfog_vertex:\"\\n#ifdef USE_FOG\\nfogDepth = -mvPosition.z;\\n#endif\",fog_pars_vertex:\"#ifdef USE_FOG\\n varying float fogDepth;\\n#endif\\n\",fog_fragment:\"#ifdef USE_FOG\\n\\t#ifdef FOG_EXP2\\n\\t\\tfloat fogFactor = whiteCompliment( exp2( - fogDensity * fogDensity * fogDepth * fogDepth * LOG2 ) );\\n\\t#else\\n\\t\\tfloat fogFactor = smoothstep( fogNear, fogFar, fogDepth );\\n\\t#endif\\n\\tgl_FragColor.rgb = mix( gl_FragColor.rgb, fogColor, fogFactor );\\n#endif\\n\",fog_pars_fragment:\"#ifdef USE_FOG\\n\\tuniform vec3 fogColor;\\n\\tvarying float fogDepth;\\n\\t#ifdef FOG_EXP2\\n\\t\\tuniform float fogDensity;\\n\\t#else\\n\\t\\tuniform float fogNear;\\n\\t\\tuniform float fogFar;\\n\\t#endif\\n#endif\\n\",\ngradientmap_pars_fragment:\"#ifdef TOON\\n\\tuniform sampler2D gradientMap;\\n\\tvec3 getGradientIrradiance( vec3 normal, vec3 lightDirection ) {\\n\\t\\tfloat dotNL = dot( normal, lightDirection );\\n\\t\\tvec2 coord = vec2( dotNL * 0.5 + 0.5, 0.0 );\\n\\t\\t#ifdef USE_GRADIENTMAP\\n\\t\\t\\treturn texture2D( gradientMap, coord ).rgb;\\n\\t\\t#else\\n\\t\\t\\treturn ( coord.x < 0.7 ) ? vec3( 0.7 ) : vec3( 1.0 );\\n\\t\\t#endif\\n\\t}\\n#endif\\n\",lightmap_fragment:\"#ifdef USE_LIGHTMAP\\n\\treflectedLight.indirectDiffuse += PI * texture2D( lightMap, vUv2 ).xyz * lightMapIntensity;\\n#endif\\n\",\nlightmap_pars_fragment:\"#ifdef USE_LIGHTMAP\\n\\tuniform sampler2D lightMap;\\n\\tuniform float lightMapIntensity;\\n#endif\",lights_lambert_vertex:\"vec3 diffuse = vec3( 1.0 );\\nGeometricContext geometry;\\ngeometry.position = mvPosition.xyz;\\ngeometry.normal = normalize( transformedNormal );\\ngeometry.viewDir = normalize( -mvPosition.xyz );\\nGeometricContext backGeometry;\\nbackGeometry.position = geometry.position;\\nbackGeometry.normal = -geometry.normal;\\nbackGeometry.viewDir = geometry.viewDir;\\nvLightFront = vec3( 0.0 );\\n#ifdef DOUBLE_SIDED\\n\\tvLightBack = vec3( 0.0 );\\n#endif\\nIncidentLight directLight;\\nfloat dotNL;\\nvec3 directLightColor_Diffuse;\\n#if NUM_POINT_LIGHTS > 0\\n\\t#pragma unroll_loop\\n\\tfor ( int i = 0; i < NUM_POINT_LIGHTS; i ++ ) {\\n\\t\\tgetPointDirectLightIrradiance( pointLights[ i ], geometry, directLight );\\n\\t\\tdotNL = dot( geometry.normal, directLight.direction );\\n\\t\\tdirectLightColor_Diffuse = PI * directLight.color;\\n\\t\\tvLightFront += saturate( dotNL ) * directLightColor_Diffuse;\\n\\t\\t#ifdef DOUBLE_SIDED\\n\\t\\t\\tvLightBack += saturate( -dotNL ) * directLightColor_Diffuse;\\n\\t\\t#endif\\n\\t}\\n#endif\\n#if NUM_SPOT_LIGHTS > 0\\n\\t#pragma unroll_loop\\n\\tfor ( int i = 0; i < NUM_SPOT_LIGHTS; i ++ ) {\\n\\t\\tgetSpotDirectLightIrradiance( spotLights[ i ], geometry, directLight );\\n\\t\\tdotNL = dot( geometry.normal, directLight.direction );\\n\\t\\tdirectLightColor_Diffuse = PI * directLight.color;\\n\\t\\tvLightFront += saturate( dotNL ) * directLightColor_Diffuse;\\n\\t\\t#ifdef DOUBLE_SIDED\\n\\t\\t\\tvLightBack += saturate( -dotNL ) * directLightColor_Diffuse;\\n\\t\\t#endif\\n\\t}\\n#endif\\n#if NUM_DIR_LIGHTS > 0\\n\\t#pragma unroll_loop\\n\\tfor ( int i = 0; i < NUM_DIR_LIGHTS; i ++ ) {\\n\\t\\tgetDirectionalDirectLightIrradiance( directionalLights[ i ], geometry, directLight );\\n\\t\\tdotNL = dot( geometry.normal, directLight.direction );\\n\\t\\tdirectLightColor_Diffuse = PI * directLight.color;\\n\\t\\tvLightFront += saturate( dotNL ) * directLightColor_Diffuse;\\n\\t\\t#ifdef DOUBLE_SIDED\\n\\t\\t\\tvLightBack += saturate( -dotNL ) * directLightColor_Diffuse;\\n\\t\\t#endif\\n\\t}\\n#endif\\n#if NUM_HEMI_LIGHTS > 0\\n\\t#pragma unroll_loop\\n\\tfor ( int i = 0; i < NUM_HEMI_LIGHTS; i ++ ) {\\n\\t\\tvLightFront += getHemisphereLightIrradiance( hemisphereLights[ i ], geometry );\\n\\t\\t#ifdef DOUBLE_SIDED\\n\\t\\t\\tvLightBack += getHemisphereLightIrradiance( hemisphereLights[ i ], backGeometry );\\n\\t\\t#endif\\n\\t}\\n#endif\\n\",\nlights_pars_begin:\"uniform vec3 ambientLightColor;\\nvec3 getAmbientLightIrradiance( const in vec3 ambientLightColor ) {\\n\\tvec3 irradiance = ambientLightColor;\\n\\t#ifndef PHYSICALLY_CORRECT_LIGHTS\\n\\t\\tirradiance *= PI;\\n\\t#endif\\n\\treturn irradiance;\\n}\\n#if NUM_DIR_LIGHTS > 0\\n\\tstruct DirectionalLight {\\n\\t\\tvec3 direction;\\n\\t\\tvec3 color;\\n\\t\\tint shadow;\\n\\t\\tfloat shadowBias;\\n\\t\\tfloat shadowRadius;\\n\\t\\tvec2 shadowMapSize;\\n\\t};\\n\\tuniform DirectionalLight directionalLights[ NUM_DIR_LIGHTS ];\\n\\tvoid getDirectionalDirectLightIrradiance( const in DirectionalLight directionalLight, const in GeometricContext geometry, out IncidentLight directLight ) {\\n\\t\\tdirectLight.color = directionalLight.color;\\n\\t\\tdirectLight.direction = directionalLight.direction;\\n\\t\\tdirectLight.visible = true;\\n\\t}\\n#endif\\n#if NUM_POINT_LIGHTS > 0\\n\\tstruct PointLight {\\n\\t\\tvec3 position;\\n\\t\\tvec3 color;\\n\\t\\tfloat distance;\\n\\t\\tfloat decay;\\n\\t\\tint shadow;\\n\\t\\tfloat shadowBias;\\n\\t\\tfloat shadowRadius;\\n\\t\\tvec2 shadowMapSize;\\n\\t\\tfloat shadowCameraNear;\\n\\t\\tfloat shadowCameraFar;\\n\\t};\\n\\tuniform PointLight pointLights[ NUM_POINT_LIGHTS ];\\n\\tvoid getPointDirectLightIrradiance( const in PointLight pointLight, const in GeometricContext geometry, out IncidentLight directLight ) {\\n\\t\\tvec3 lVector = pointLight.position - geometry.position;\\n\\t\\tdirectLight.direction = normalize( lVector );\\n\\t\\tfloat lightDistance = length( lVector );\\n\\t\\tdirectLight.color = pointLight.color;\\n\\t\\tdirectLight.color *= punctualLightIntensityToIrradianceFactor( lightDistance, pointLight.distance, pointLight.decay );\\n\\t\\tdirectLight.visible = ( directLight.color != vec3( 0.0 ) );\\n\\t}\\n#endif\\n#if NUM_SPOT_LIGHTS > 0\\n\\tstruct SpotLight {\\n\\t\\tvec3 position;\\n\\t\\tvec3 direction;\\n\\t\\tvec3 color;\\n\\t\\tfloat distance;\\n\\t\\tfloat decay;\\n\\t\\tfloat coneCos;\\n\\t\\tfloat penumbraCos;\\n\\t\\tint shadow;\\n\\t\\tfloat shadowBias;\\n\\t\\tfloat shadowRadius;\\n\\t\\tvec2 shadowMapSize;\\n\\t};\\n\\tuniform SpotLight spotLights[ NUM_SPOT_LIGHTS ];\\n\\tvoid getSpotDirectLightIrradiance( const in SpotLight spotLight, const in GeometricContext geometry, out IncidentLight directLight ) {\\n\\t\\tvec3 lVector = spotLight.position - geometry.position;\\n\\t\\tdirectLight.direction = normalize( lVector );\\n\\t\\tfloat lightDistance = length( lVector );\\n\\t\\tfloat angleCos = dot( directLight.direction, spotLight.direction );\\n\\t\\tif ( angleCos > spotLight.coneCos ) {\\n\\t\\t\\tfloat spotEffect = smoothstep( spotLight.coneCos, spotLight.penumbraCos, angleCos );\\n\\t\\t\\tdirectLight.color = spotLight.color;\\n\\t\\t\\tdirectLight.color *= spotEffect * punctualLightIntensityToIrradianceFactor( lightDistance, spotLight.distance, spotLight.decay );\\n\\t\\t\\tdirectLight.visible = true;\\n\\t\\t} else {\\n\\t\\t\\tdirectLight.color = vec3( 0.0 );\\n\\t\\t\\tdirectLight.visible = false;\\n\\t\\t}\\n\\t}\\n#endif\\n#if NUM_RECT_AREA_LIGHTS > 0\\n\\tstruct RectAreaLight {\\n\\t\\tvec3 color;\\n\\t\\tvec3 position;\\n\\t\\tvec3 halfWidth;\\n\\t\\tvec3 halfHeight;\\n\\t};\\n\\tuniform sampler2D ltc_1;\\tuniform sampler2D ltc_2;\\n\\tuniform RectAreaLight rectAreaLights[ NUM_RECT_AREA_LIGHTS ];\\n#endif\\n#if NUM_HEMI_LIGHTS > 0\\n\\tstruct HemisphereLight {\\n\\t\\tvec3 direction;\\n\\t\\tvec3 skyColor;\\n\\t\\tvec3 groundColor;\\n\\t};\\n\\tuniform HemisphereLight hemisphereLights[ NUM_HEMI_LIGHTS ];\\n\\tvec3 getHemisphereLightIrradiance( const in HemisphereLight hemiLight, const in GeometricContext geometry ) {\\n\\t\\tfloat dotNL = dot( geometry.normal, hemiLight.direction );\\n\\t\\tfloat hemiDiffuseWeight = 0.5 * dotNL + 0.5;\\n\\t\\tvec3 irradiance = mix( hemiLight.groundColor, hemiLight.skyColor, hemiDiffuseWeight );\\n\\t\\t#ifndef PHYSICALLY_CORRECT_LIGHTS\\n\\t\\t\\tirradiance *= PI;\\n\\t\\t#endif\\n\\t\\treturn irradiance;\\n\\t}\\n#endif\\n\",\nlights_phong_fragment:\"BlinnPhongMaterial material;\\nmaterial.diffuseColor = diffuseColor.rgb;\\nmaterial.specularColor = specular;\\nmaterial.specularShininess = shininess;\\nmaterial.specularStrength = specularStrength;\\n\",lights_phong_pars_fragment:\"varying vec3 vViewPosition;\\n#ifndef FLAT_SHADED\\n\\tvarying vec3 vNormal;\\n#endif\\nstruct BlinnPhongMaterial {\\n\\tvec3\\tdiffuseColor;\\n\\tvec3\\tspecularColor;\\n\\tfloat\\tspecularShininess;\\n\\tfloat\\tspecularStrength;\\n};\\nvoid RE_Direct_BlinnPhong( const in IncidentLight directLight, const in GeometricContext geometry, const in BlinnPhongMaterial material, inout ReflectedLight reflectedLight ) {\\n\\t#ifdef TOON\\n\\t\\tvec3 irradiance = getGradientIrradiance( geometry.normal, directLight.direction ) * directLight.color;\\n\\t#else\\n\\t\\tfloat dotNL = saturate( dot( geometry.normal, directLight.direction ) );\\n\\t\\tvec3 irradiance = dotNL * directLight.color;\\n\\t#endif\\n\\t#ifndef PHYSICALLY_CORRECT_LIGHTS\\n\\t\\tirradiance *= PI;\\n\\t#endif\\n\\treflectedLight.directDiffuse += irradiance * BRDF_Diffuse_Lambert( material.diffuseColor );\\n\\treflectedLight.directSpecular += irradiance * BRDF_Specular_BlinnPhong( directLight, geometry, material.specularColor, material.specularShininess ) * material.specularStrength;\\n}\\nvoid RE_IndirectDiffuse_BlinnPhong( const in vec3 irradiance, const in GeometricContext geometry, const in BlinnPhongMaterial material, inout ReflectedLight reflectedLight ) {\\n\\treflectedLight.indirectDiffuse += irradiance * BRDF_Diffuse_Lambert( material.diffuseColor );\\n}\\n#define RE_Direct\\t\\t\\t\\tRE_Direct_BlinnPhong\\n#define RE_IndirectDiffuse\\t\\tRE_IndirectDiffuse_BlinnPhong\\n#define Material_LightProbeLOD( material )\\t(0)\\n\",\nlights_physical_fragment:\"PhysicalMaterial material;\\nmaterial.diffuseColor = diffuseColor.rgb * ( 1.0 - metalnessFactor );\\nmaterial.specularRoughness = clamp( roughnessFactor, 0.04, 1.0 );\\n#ifdef STANDARD\\n\\tmaterial.specularColor = mix( vec3( DEFAULT_SPECULAR_COEFFICIENT ), diffuseColor.rgb, metalnessFactor );\\n#else\\n\\tmaterial.specularColor = mix( vec3( MAXIMUM_SPECULAR_COEFFICIENT * pow2( reflectivity ) ), diffuseColor.rgb, metalnessFactor );\\n\\tmaterial.clearCoat = saturate( clearCoat );\\tmaterial.clearCoatRoughness = clamp( clearCoatRoughness, 0.04, 1.0 );\\n#endif\\n\",\nlights_physical_pars_fragment:\"struct PhysicalMaterial {\\n\\tvec3\\tdiffuseColor;\\n\\tfloat\\tspecularRoughness;\\n\\tvec3\\tspecularColor;\\n\\t#ifndef STANDARD\\n\\t\\tfloat clearCoat;\\n\\t\\tfloat clearCoatRoughness;\\n\\t#endif\\n};\\n#define MAXIMUM_SPECULAR_COEFFICIENT 0.16\\n#define DEFAULT_SPECULAR_COEFFICIENT 0.04\\nfloat clearCoatDHRApprox( const in float roughness, const in float dotNL ) {\\n\\treturn DEFAULT_SPECULAR_COEFFICIENT + ( 1.0 - DEFAULT_SPECULAR_COEFFICIENT ) * ( pow( 1.0 - dotNL, 5.0 ) * pow( 1.0 - roughness, 2.0 ) );\\n}\\n#if NUM_RECT_AREA_LIGHTS > 0\\n\\tvoid RE_Direct_RectArea_Physical( const in RectAreaLight rectAreaLight, const in GeometricContext geometry, const in PhysicalMaterial material, inout ReflectedLight reflectedLight ) {\\n\\t\\tvec3 normal = geometry.normal;\\n\\t\\tvec3 viewDir = geometry.viewDir;\\n\\t\\tvec3 position = geometry.position;\\n\\t\\tvec3 lightPos = rectAreaLight.position;\\n\\t\\tvec3 halfWidth = rectAreaLight.halfWidth;\\n\\t\\tvec3 halfHeight = rectAreaLight.halfHeight;\\n\\t\\tvec3 lightColor = rectAreaLight.color;\\n\\t\\tfloat roughness = material.specularRoughness;\\n\\t\\tvec3 rectCoords[ 4 ];\\n\\t\\trectCoords[ 0 ] = lightPos - halfWidth - halfHeight;\\t\\trectCoords[ 1 ] = lightPos + halfWidth - halfHeight;\\n\\t\\trectCoords[ 2 ] = lightPos + halfWidth + halfHeight;\\n\\t\\trectCoords[ 3 ] = lightPos - halfWidth + halfHeight;\\n\\t\\tvec2 uv = LTC_Uv( normal, viewDir, roughness );\\n\\t\\tvec4 t1 = texture2D( ltc_1, uv );\\n\\t\\tvec4 t2 = texture2D( ltc_2, uv );\\n\\t\\tmat3 mInv = mat3(\\n\\t\\t\\tvec3( t1.x, 0, t1.y ),\\n\\t\\t\\tvec3( 0, 1, 0 ),\\n\\t\\t\\tvec3( t1.z, 0, t1.w )\\n\\t\\t);\\n\\t\\tvec3 fresnel = ( material.specularColor * t2.x + ( vec3( 1.0 ) - material.specularColor ) * t2.y );\\n\\t\\treflectedLight.directSpecular += lightColor * fresnel * LTC_Evaluate( normal, viewDir, position, mInv, rectCoords );\\n\\t\\treflectedLight.directDiffuse += lightColor * material.diffuseColor * LTC_Evaluate( normal, viewDir, position, mat3( 1.0 ), rectCoords );\\n\\t}\\n#endif\\nvoid RE_Direct_Physical( const in IncidentLight directLight, const in GeometricContext geometry, const in PhysicalMaterial material, inout ReflectedLight reflectedLight ) {\\n\\tfloat dotNL = saturate( dot( geometry.normal, directLight.direction ) );\\n\\tvec3 irradiance = dotNL * directLight.color;\\n\\t#ifndef PHYSICALLY_CORRECT_LIGHTS\\n\\t\\tirradiance *= PI;\\n\\t#endif\\n\\t#ifndef STANDARD\\n\\t\\tfloat clearCoatDHR = material.clearCoat * clearCoatDHRApprox( material.clearCoatRoughness, dotNL );\\n\\t#else\\n\\t\\tfloat clearCoatDHR = 0.0;\\n\\t#endif\\n\\treflectedLight.directSpecular += ( 1.0 - clearCoatDHR ) * irradiance * BRDF_Specular_GGX( directLight, geometry, material.specularColor, material.specularRoughness );\\n\\treflectedLight.directDiffuse += ( 1.0 - clearCoatDHR ) * irradiance * BRDF_Diffuse_Lambert( material.diffuseColor );\\n\\t#ifndef STANDARD\\n\\t\\treflectedLight.directSpecular += irradiance * material.clearCoat * BRDF_Specular_GGX( directLight, geometry, vec3( DEFAULT_SPECULAR_COEFFICIENT ), material.clearCoatRoughness );\\n\\t#endif\\n}\\nvoid RE_IndirectDiffuse_Physical( const in vec3 irradiance, const in GeometricContext geometry, const in PhysicalMaterial material, inout ReflectedLight reflectedLight ) {\\n\\treflectedLight.indirectDiffuse += irradiance * BRDF_Diffuse_Lambert( material.diffuseColor );\\n}\\nvoid RE_IndirectSpecular_Physical( const in vec3 radiance, const in vec3 clearCoatRadiance, const in GeometricContext geometry, const in PhysicalMaterial material, inout ReflectedLight reflectedLight ) {\\n\\t#ifndef STANDARD\\n\\t\\tfloat dotNV = saturate( dot( geometry.normal, geometry.viewDir ) );\\n\\t\\tfloat dotNL = dotNV;\\n\\t\\tfloat clearCoatDHR = material.clearCoat * clearCoatDHRApprox( material.clearCoatRoughness, dotNL );\\n\\t#else\\n\\t\\tfloat clearCoatDHR = 0.0;\\n\\t#endif\\n\\treflectedLight.indirectSpecular += ( 1.0 - clearCoatDHR ) * radiance * BRDF_Specular_GGX_Environment( geometry, material.specularColor, material.specularRoughness );\\n\\t#ifndef STANDARD\\n\\t\\treflectedLight.indirectSpecular += clearCoatRadiance * material.clearCoat * BRDF_Specular_GGX_Environment( geometry, vec3( DEFAULT_SPECULAR_COEFFICIENT ), material.clearCoatRoughness );\\n\\t#endif\\n}\\n#define RE_Direct\\t\\t\\t\\tRE_Direct_Physical\\n#define RE_Direct_RectArea\\t\\tRE_Direct_RectArea_Physical\\n#define RE_IndirectDiffuse\\t\\tRE_IndirectDiffuse_Physical\\n#define RE_IndirectSpecular\\t\\tRE_IndirectSpecular_Physical\\n#define Material_BlinnShininessExponent( material ) GGXRoughnessToBlinnExponent( material.specularRoughness )\\n#define Material_ClearCoat_BlinnShininessExponent( material ) GGXRoughnessToBlinnExponent( material.clearCoatRoughness )\\nfloat computeSpecularOcclusion( const in float dotNV, const in float ambientOcclusion, const in float roughness ) {\\n\\treturn saturate( pow( dotNV + ambientOcclusion, exp2( - 16.0 * roughness - 1.0 ) ) - 1.0 + ambientOcclusion );\\n}\\n\",\nlights_fragment_begin:\"\\nGeometricContext geometry;\\ngeometry.position = - vViewPosition;\\ngeometry.normal = normal;\\ngeometry.viewDir = normalize( vViewPosition );\\nIncidentLight directLight;\\n#if ( NUM_POINT_LIGHTS > 0 ) && defined( RE_Direct )\\n\\tPointLight pointLight;\\n\\t#pragma unroll_loop\\n\\tfor ( int i = 0; i < NUM_POINT_LIGHTS; i ++ ) {\\n\\t\\tpointLight = pointLights[ i ];\\n\\t\\tgetPointDirectLightIrradiance( pointLight, geometry, directLight );\\n\\t\\t#ifdef USE_SHADOWMAP\\n\\t\\tdirectLight.color *= all( bvec2( pointLight.shadow, directLight.visible ) ) ? getPointShadow( pointShadowMap[ i ], pointLight.shadowMapSize, pointLight.shadowBias, pointLight.shadowRadius, vPointShadowCoord[ i ], pointLight.shadowCameraNear, pointLight.shadowCameraFar ) : 1.0;\\n\\t\\t#endif\\n\\t\\tRE_Direct( directLight, geometry, material, reflectedLight );\\n\\t}\\n#endif\\n#if ( NUM_SPOT_LIGHTS > 0 ) && defined( RE_Direct )\\n\\tSpotLight spotLight;\\n\\t#pragma unroll_loop\\n\\tfor ( int i = 0; i < NUM_SPOT_LIGHTS; i ++ ) {\\n\\t\\tspotLight = spotLights[ i ];\\n\\t\\tgetSpotDirectLightIrradiance( spotLight, geometry, directLight );\\n\\t\\t#ifdef USE_SHADOWMAP\\n\\t\\tdirectLight.color *= all( bvec2( spotLight.shadow, directLight.visible ) ) ? getShadow( spotShadowMap[ i ], spotLight.shadowMapSize, spotLight.shadowBias, spotLight.shadowRadius, vSpotShadowCoord[ i ] ) : 1.0;\\n\\t\\t#endif\\n\\t\\tRE_Direct( directLight, geometry, material, reflectedLight );\\n\\t}\\n#endif\\n#if ( NUM_DIR_LIGHTS > 0 ) && defined( RE_Direct )\\n\\tDirectionalLight directionalLight;\\n\\t#pragma unroll_loop\\n\\tfor ( int i = 0; i < NUM_DIR_LIGHTS; i ++ ) {\\n\\t\\tdirectionalLight = directionalLights[ i ];\\n\\t\\tgetDirectionalDirectLightIrradiance( directionalLight, geometry, directLight );\\n\\t\\t#ifdef USE_SHADOWMAP\\n\\t\\tdirectLight.color *= all( bvec2( directionalLight.shadow, directLight.visible ) ) ? getShadow( directionalShadowMap[ i ], directionalLight.shadowMapSize, directionalLight.shadowBias, directionalLight.shadowRadius, vDirectionalShadowCoord[ i ] ) : 1.0;\\n\\t\\t#endif\\n\\t\\tRE_Direct( directLight, geometry, material, reflectedLight );\\n\\t}\\n#endif\\n#if ( NUM_RECT_AREA_LIGHTS > 0 ) && defined( RE_Direct_RectArea )\\n\\tRectAreaLight rectAreaLight;\\n\\t#pragma unroll_loop\\n\\tfor ( int i = 0; i < NUM_RECT_AREA_LIGHTS; i ++ ) {\\n\\t\\trectAreaLight = rectAreaLights[ i ];\\n\\t\\tRE_Direct_RectArea( rectAreaLight, geometry, material, reflectedLight );\\n\\t}\\n#endif\\n#if defined( RE_IndirectDiffuse )\\n\\tvec3 irradiance = getAmbientLightIrradiance( ambientLightColor );\\n\\t#if ( NUM_HEMI_LIGHTS > 0 )\\n\\t\\t#pragma unroll_loop\\n\\t\\tfor ( int i = 0; i < NUM_HEMI_LIGHTS; i ++ ) {\\n\\t\\t\\tirradiance += getHemisphereLightIrradiance( hemisphereLights[ i ], geometry );\\n\\t\\t}\\n\\t#endif\\n#endif\\n#if defined( RE_IndirectSpecular )\\n\\tvec3 radiance = vec3( 0.0 );\\n\\tvec3 clearCoatRadiance = vec3( 0.0 );\\n#endif\\n\",\nlights_fragment_maps:\"#if defined( RE_IndirectDiffuse )\\n\\t#ifdef USE_LIGHTMAP\\n\\t\\tvec3 lightMapIrradiance = texture2D( lightMap, vUv2 ).xyz * lightMapIntensity;\\n\\t\\t#ifndef PHYSICALLY_CORRECT_LIGHTS\\n\\t\\t\\tlightMapIrradiance *= PI;\\n\\t\\t#endif\\n\\t\\tirradiance += lightMapIrradiance;\\n\\t#endif\\n\\t#if defined( USE_ENVMAP ) && defined( PHYSICAL ) && defined( ENVMAP_TYPE_CUBE_UV )\\n\\t\\tirradiance += getLightProbeIndirectIrradiance( geometry, maxMipLevel );\\n\\t#endif\\n#endif\\n#if defined( USE_ENVMAP ) && defined( RE_IndirectSpecular )\\n\\tradiance += getLightProbeIndirectRadiance( geometry, Material_BlinnShininessExponent( material ), maxMipLevel );\\n\\t#ifndef STANDARD\\n\\t\\tclearCoatRadiance += getLightProbeIndirectRadiance( geometry, Material_ClearCoat_BlinnShininessExponent( material ), maxMipLevel );\\n\\t#endif\\n#endif\\n\",\nlights_fragment_end:\"#if defined( RE_IndirectDiffuse )\\n\\tRE_IndirectDiffuse( irradiance, geometry, material, reflectedLight );\\n#endif\\n#if defined( RE_IndirectSpecular )\\n\\tRE_IndirectSpecular( radiance, clearCoatRadiance, geometry, material, reflectedLight );\\n#endif\\n\",logdepthbuf_fragment:\"#if defined( USE_LOGDEPTHBUF ) && defined( USE_LOGDEPTHBUF_EXT )\\n\\tgl_FragDepthEXT = log2( vFragDepth ) * logDepthBufFC * 0.5;\\n#endif\",logdepthbuf_pars_fragment:\"#ifdef USE_LOGDEPTHBUF\\n\\tuniform float logDepthBufFC;\\n\\t#ifdef USE_LOGDEPTHBUF_EXT\\n\\t\\tvarying float vFragDepth;\\n\\t#endif\\n#endif\\n\",\nlogdepthbuf_pars_vertex:\"#ifdef USE_LOGDEPTHBUF\\n\\t#ifdef USE_LOGDEPTHBUF_EXT\\n\\t\\tvarying float vFragDepth;\\n\\t#endif\\n\\tuniform float logDepthBufFC;\\n#endif\",logdepthbuf_vertex:\"#ifdef USE_LOGDEPTHBUF\\n\\t#ifdef USE_LOGDEPTHBUF_EXT\\n\\t\\tvFragDepth = 1.0 + gl_Position.w;\\n\\t#else\\n\\t\\tgl_Position.z = log2( max( EPSILON, gl_Position.w + 1.0 ) ) * logDepthBufFC - 1.0;\\n\\t\\tgl_Position.z *= gl_Position.w;\\n\\t#endif\\n#endif\\n\",map_fragment:\"#ifdef USE_MAP\\n\\tvec4 texelColor = texture2D( map, vUv );\\n\\ttexelColor = mapTexelToLinear( texelColor );\\n\\tdiffuseColor *= texelColor;\\n#endif\\n\",\nmap_pars_fragment:\"#ifdef USE_MAP\\n\\tuniform sampler2D map;\\n#endif\\n\",map_particle_fragment:\"#ifdef USE_MAP\\n\\tvec2 uv = ( uvTransform * vec3( gl_PointCoord.x, 1.0 - gl_PointCoord.y, 1 ) ).xy;\\n\\tvec4 mapTexel = texture2D( map, uv );\\n\\tdiffuseColor *= mapTexelToLinear( mapTexel );\\n#endif\\n\",map_particle_pars_fragment:\"#ifdef USE_MAP\\n\\tuniform mat3 uvTransform;\\n\\tuniform sampler2D map;\\n#endif\\n\",metalnessmap_fragment:\"float metalnessFactor = metalness;\\n#ifdef USE_METALNESSMAP\\n\\tvec4 texelMetalness = texture2D( metalnessMap, vUv );\\n\\tmetalnessFactor *= texelMetalness.b;\\n#endif\\n\",\nmetalnessmap_pars_fragment:\"#ifdef USE_METALNESSMAP\\n\\tuniform sampler2D metalnessMap;\\n#endif\",morphnormal_vertex:\"#ifdef USE_MORPHNORMALS\\n\\tobjectNormal += ( morphNormal0 - normal ) * morphTargetInfluences[ 0 ];\\n\\tobjectNormal += ( morphNormal1 - normal ) * morphTargetInfluences[ 1 ];\\n\\tobjectNormal += ( morphNormal2 - normal ) * morphTargetInfluences[ 2 ];\\n\\tobjectNormal += ( morphNormal3 - normal ) * morphTargetInfluences[ 3 ];\\n#endif\\n\",morphtarget_pars_vertex:\"#ifdef USE_MORPHTARGETS\\n\\t#ifndef USE_MORPHNORMALS\\n\\tuniform float morphTargetInfluences[ 8 ];\\n\\t#else\\n\\tuniform float morphTargetInfluences[ 4 ];\\n\\t#endif\\n#endif\",\nmorphtarget_vertex:\"#ifdef USE_MORPHTARGETS\\n\\ttransformed += ( morphTarget0 - position ) * morphTargetInfluences[ 0 ];\\n\\ttransformed += ( morphTarget1 - position ) * morphTargetInfluences[ 1 ];\\n\\ttransformed += ( morphTarget2 - position ) * morphTargetInfluences[ 2 ];\\n\\ttransformed += ( morphTarget3 - position ) * morphTargetInfluences[ 3 ];\\n\\t#ifndef USE_MORPHNORMALS\\n\\ttransformed += ( morphTarget4 - position ) * morphTargetInfluences[ 4 ];\\n\\ttransformed += ( morphTarget5 - position ) * morphTargetInfluences[ 5 ];\\n\\ttransformed += ( morphTarget6 - position ) * morphTargetInfluences[ 6 ];\\n\\ttransformed += ( morphTarget7 - position ) * morphTargetInfluences[ 7 ];\\n\\t#endif\\n#endif\\n\",\nnormal_fragment_begin:\"#ifdef FLAT_SHADED\\n\\tvec3 fdx = vec3( dFdx( vViewPosition.x ), dFdx( vViewPosition.y ), dFdx( vViewPosition.z ) );\\n\\tvec3 fdy = vec3( dFdy( vViewPosition.x ), dFdy( vViewPosition.y ), dFdy( vViewPosition.z ) );\\n\\tvec3 normal = normalize( cross( fdx, fdy ) );\\n#else\\n\\tvec3 normal = normalize( vNormal );\\n\\t#ifdef DOUBLE_SIDED\\n\\t\\tnormal = normal * ( float( gl_FrontFacing ) * 2.0 - 1.0 );\\n\\t#endif\\n#endif\\n\",normal_fragment_maps:\"#ifdef USE_NORMALMAP\\n\\t#ifdef OBJECTSPACE_NORMALMAP\\n\\t\\tnormal = texture2D( normalMap, vUv ).xyz * 2.0 - 1.0;\\n\\t\\t#ifdef FLIP_SIDED\\n\\t\\t\\tnormal = - normal;\\n\\t\\t#endif\\n\\t\\t#ifdef DOUBLE_SIDED\\n\\t\\t\\tnormal = normal * ( float( gl_FrontFacing ) * 2.0 - 1.0 );\\n\\t\\t#endif\\n\\t\\tnormal = normalize( normalMatrix * normal );\\n\\t#else\\n\\t\\tnormal = perturbNormal2Arb( -vViewPosition, normal );\\n\\t#endif\\n#elif defined( USE_BUMPMAP )\\n\\tnormal = perturbNormalArb( -vViewPosition, normal, dHdxy_fwd() );\\n#endif\\n\",\nnormalmap_pars_fragment:\"#ifdef USE_NORMALMAP\\n\\tuniform sampler2D normalMap;\\n\\tuniform vec2 normalScale;\\n\\t#ifdef OBJECTSPACE_NORMALMAP\\n\\t\\tuniform mat3 normalMatrix;\\n\\t#else\\n\\t\\tvec3 perturbNormal2Arb( vec3 eye_pos, vec3 surf_norm ) {\\n\\t\\t\\tvec3 q0 = vec3( dFdx( eye_pos.x ), dFdx( eye_pos.y ), dFdx( eye_pos.z ) );\\n\\t\\t\\tvec3 q1 = vec3( dFdy( eye_pos.x ), dFdy( eye_pos.y ), dFdy( eye_pos.z ) );\\n\\t\\t\\tvec2 st0 = dFdx( vUv.st );\\n\\t\\t\\tvec2 st1 = dFdy( vUv.st );\\n\\t\\t\\tfloat scale = sign( st1.t * st0.s - st0.t * st1.s );\\n\\t\\t\\tvec3 S = normalize( ( q0 * st1.t - q1 * st0.t ) * scale );\\n\\t\\t\\tvec3 T = normalize( ( - q0 * st1.s + q1 * st0.s ) * scale );\\n\\t\\t\\tvec3 N = normalize( surf_norm );\\n\\t\\t\\tmat3 tsn = mat3( S, T, N );\\n\\t\\t\\tvec3 mapN = texture2D( normalMap, vUv ).xyz * 2.0 - 1.0;\\n\\t\\t\\tmapN.xy *= normalScale;\\n\\t\\t\\tmapN.xy *= ( float( gl_FrontFacing ) * 2.0 - 1.0 );\\n\\t\\t\\treturn normalize( tsn * mapN );\\n\\t\\t}\\n\\t#endif\\n#endif\\n\",\npacking:\"vec3 packNormalToRGB( const in vec3 normal ) {\\n\\treturn normalize( normal ) * 0.5 + 0.5;\\n}\\nvec3 unpackRGBToNormal( const in vec3 rgb ) {\\n\\treturn 2.0 * rgb.xyz - 1.0;\\n}\\nconst float PackUpscale = 256. / 255.;const float UnpackDownscale = 255. / 256.;\\nconst vec3 PackFactors = vec3( 256. * 256. * 256., 256. * 256., 256. );\\nconst vec4 UnpackFactors = UnpackDownscale / vec4( PackFactors, 1. );\\nconst float ShiftRight8 = 1. / 256.;\\nvec4 packDepthToRGBA( const in float v ) {\\n\\tvec4 r = vec4( fract( v * PackFactors ), v );\\n\\tr.yzw -= r.xyz * ShiftRight8;\\treturn r * PackUpscale;\\n}\\nfloat unpackRGBAToDepth( const in vec4 v ) {\\n\\treturn dot( v, UnpackFactors );\\n}\\nfloat viewZToOrthographicDepth( const in float viewZ, const in float near, const in float far ) {\\n\\treturn ( viewZ + near ) / ( near - far );\\n}\\nfloat orthographicDepthToViewZ( const in float linearClipZ, const in float near, const in float far ) {\\n\\treturn linearClipZ * ( near - far ) - near;\\n}\\nfloat viewZToPerspectiveDepth( const in float viewZ, const in float near, const in float far ) {\\n\\treturn (( near + viewZ ) * far ) / (( far - near ) * viewZ );\\n}\\nfloat perspectiveDepthToViewZ( const in float invClipZ, const in float near, const in float far ) {\\n\\treturn ( near * far ) / ( ( far - near ) * invClipZ - far );\\n}\\n\",\npremultiplied_alpha_fragment:\"#ifdef PREMULTIPLIED_ALPHA\\n\\tgl_FragColor.rgb *= gl_FragColor.a;\\n#endif\\n\",project_vertex:\"vec4 mvPosition = modelViewMatrix * vec4( transformed, 1.0 );\\ngl_Position = projectionMatrix * mvPosition;\\n\",dithering_fragment:\"#if defined( DITHERING )\\n gl_FragColor.rgb = dithering( gl_FragColor.rgb );\\n#endif\\n\",dithering_pars_fragment:\"#if defined( DITHERING )\\n\\tvec3 dithering( vec3 color ) {\\n\\t\\tfloat grid_position = rand( gl_FragCoord.xy );\\n\\t\\tvec3 dither_shift_RGB = vec3( 0.25 / 255.0, -0.25 / 255.0, 0.25 / 255.0 );\\n\\t\\tdither_shift_RGB = mix( 2.0 * dither_shift_RGB, -2.0 * dither_shift_RGB, grid_position );\\n\\t\\treturn color + dither_shift_RGB;\\n\\t}\\n#endif\\n\",\nroughnessmap_fragment:\"float roughnessFactor = roughness;\\n#ifdef USE_ROUGHNESSMAP\\n\\tvec4 texelRoughness = texture2D( roughnessMap, vUv );\\n\\troughnessFactor *= texelRoughness.g;\\n#endif\\n\",roughnessmap_pars_fragment:\"#ifdef USE_ROUGHNESSMAP\\n\\tuniform sampler2D roughnessMap;\\n#endif\",shadowmap_pars_fragment:\"#ifdef USE_SHADOWMAP\\n\\t#if NUM_DIR_LIGHTS > 0\\n\\t\\tuniform sampler2D directionalShadowMap[ NUM_DIR_LIGHTS ];\\n\\t\\tvarying vec4 vDirectionalShadowCoord[ NUM_DIR_LIGHTS ];\\n\\t#endif\\n\\t#if NUM_SPOT_LIGHTS > 0\\n\\t\\tuniform sampler2D spotShadowMap[ NUM_SPOT_LIGHTS ];\\n\\t\\tvarying vec4 vSpotShadowCoord[ NUM_SPOT_LIGHTS ];\\n\\t#endif\\n\\t#if NUM_POINT_LIGHTS > 0\\n\\t\\tuniform sampler2D pointShadowMap[ NUM_POINT_LIGHTS ];\\n\\t\\tvarying vec4 vPointShadowCoord[ NUM_POINT_LIGHTS ];\\n\\t#endif\\n\\tfloat texture2DCompare( sampler2D depths, vec2 uv, float compare ) {\\n\\t\\treturn step( compare, unpackRGBAToDepth( texture2D( depths, uv ) ) );\\n\\t}\\n\\tfloat texture2DShadowLerp( sampler2D depths, vec2 size, vec2 uv, float compare ) {\\n\\t\\tconst vec2 offset = vec2( 0.0, 1.0 );\\n\\t\\tvec2 texelSize = vec2( 1.0 ) / size;\\n\\t\\tvec2 centroidUV = floor( uv * size + 0.5 ) / size;\\n\\t\\tfloat lb = texture2DCompare( depths, centroidUV + texelSize * offset.xx, compare );\\n\\t\\tfloat lt = texture2DCompare( depths, centroidUV + texelSize * offset.xy, compare );\\n\\t\\tfloat rb = texture2DCompare( depths, centroidUV + texelSize * offset.yx, compare );\\n\\t\\tfloat rt = texture2DCompare( depths, centroidUV + texelSize * offset.yy, compare );\\n\\t\\tvec2 f = fract( uv * size + 0.5 );\\n\\t\\tfloat a = mix( lb, lt, f.y );\\n\\t\\tfloat b = mix( rb, rt, f.y );\\n\\t\\tfloat c = mix( a, b, f.x );\\n\\t\\treturn c;\\n\\t}\\n\\tfloat getShadow( sampler2D shadowMap, vec2 shadowMapSize, float shadowBias, float shadowRadius, vec4 shadowCoord ) {\\n\\t\\tfloat shadow = 1.0;\\n\\t\\tshadowCoord.xyz /= shadowCoord.w;\\n\\t\\tshadowCoord.z += shadowBias;\\n\\t\\tbvec4 inFrustumVec = bvec4 ( shadowCoord.x >= 0.0, shadowCoord.x <= 1.0, shadowCoord.y >= 0.0, shadowCoord.y <= 1.0 );\\n\\t\\tbool inFrustum = all( inFrustumVec );\\n\\t\\tbvec2 frustumTestVec = bvec2( inFrustum, shadowCoord.z <= 1.0 );\\n\\t\\tbool frustumTest = all( frustumTestVec );\\n\\t\\tif ( frustumTest ) {\\n\\t\\t#if defined( SHADOWMAP_TYPE_PCF )\\n\\t\\t\\tvec2 texelSize = vec2( 1.0 ) / shadowMapSize;\\n\\t\\t\\tfloat dx0 = - texelSize.x * shadowRadius;\\n\\t\\t\\tfloat dy0 = - texelSize.y * shadowRadius;\\n\\t\\t\\tfloat dx1 = + texelSize.x * shadowRadius;\\n\\t\\t\\tfloat dy1 = + texelSize.y * shadowRadius;\\n\\t\\t\\tshadow = (\\n\\t\\t\\t\\ttexture2DCompare( shadowMap, shadowCoord.xy + vec2( dx0, dy0 ), shadowCoord.z ) +\\n\\t\\t\\t\\ttexture2DCompare( shadowMap, shadowCoord.xy + vec2( 0.0, dy0 ), shadowCoord.z ) +\\n\\t\\t\\t\\ttexture2DCompare( shadowMap, shadowCoord.xy + vec2( dx1, dy0 ), shadowCoord.z ) +\\n\\t\\t\\t\\ttexture2DCompare( shadowMap, shadowCoord.xy + vec2( dx0, 0.0 ), shadowCoord.z ) +\\n\\t\\t\\t\\ttexture2DCompare( shadowMap, shadowCoord.xy, shadowCoord.z ) +\\n\\t\\t\\t\\ttexture2DCompare( shadowMap, shadowCoord.xy + vec2( dx1, 0.0 ), shadowCoord.z ) +\\n\\t\\t\\t\\ttexture2DCompare( shadowMap, shadowCoord.xy + vec2( dx0, dy1 ), shadowCoord.z ) +\\n\\t\\t\\t\\ttexture2DCompare( shadowMap, shadowCoord.xy + vec2( 0.0, dy1 ), shadowCoord.z ) +\\n\\t\\t\\t\\ttexture2DCompare( shadowMap, shadowCoord.xy + vec2( dx1, dy1 ), shadowCoord.z )\\n\\t\\t\\t) * ( 1.0 / 9.0 );\\n\\t\\t#elif defined( SHADOWMAP_TYPE_PCF_SOFT )\\n\\t\\t\\tvec2 texelSize = vec2( 1.0 ) / shadowMapSize;\\n\\t\\t\\tfloat dx0 = - texelSize.x * shadowRadius;\\n\\t\\t\\tfloat dy0 = - texelSize.y * shadowRadius;\\n\\t\\t\\tfloat dx1 = + texelSize.x * shadowRadius;\\n\\t\\t\\tfloat dy1 = + texelSize.y * shadowRadius;\\n\\t\\t\\tshadow = (\\n\\t\\t\\t\\ttexture2DShadowLerp( shadowMap, shadowMapSize, shadowCoord.xy + vec2( dx0, dy0 ), shadowCoord.z ) +\\n\\t\\t\\t\\ttexture2DShadowLerp( shadowMap, shadowMapSize, shadowCoord.xy + vec2( 0.0, dy0 ), shadowCoord.z ) +\\n\\t\\t\\t\\ttexture2DShadowLerp( shadowMap, shadowMapSize, shadowCoord.xy + vec2( dx1, dy0 ), shadowCoord.z ) +\\n\\t\\t\\t\\ttexture2DShadowLerp( shadowMap, shadowMapSize, shadowCoord.xy + vec2( dx0, 0.0 ), shadowCoord.z ) +\\n\\t\\t\\t\\ttexture2DShadowLerp( shadowMap, shadowMapSize, shadowCoord.xy, shadowCoord.z ) +\\n\\t\\t\\t\\ttexture2DShadowLerp( shadowMap, shadowMapSize, shadowCoord.xy + vec2( dx1, 0.0 ), shadowCoord.z ) +\\n\\t\\t\\t\\ttexture2DShadowLerp( shadowMap, shadowMapSize, shadowCoord.xy + vec2( dx0, dy1 ), shadowCoord.z ) +\\n\\t\\t\\t\\ttexture2DShadowLerp( shadowMap, shadowMapSize, shadowCoord.xy + vec2( 0.0, dy1 ), shadowCoord.z ) +\\n\\t\\t\\t\\ttexture2DShadowLerp( shadowMap, shadowMapSize, shadowCoord.xy + vec2( dx1, dy1 ), shadowCoord.z )\\n\\t\\t\\t) * ( 1.0 / 9.0 );\\n\\t\\t#else\\n\\t\\t\\tshadow = texture2DCompare( shadowMap, shadowCoord.xy, shadowCoord.z );\\n\\t\\t#endif\\n\\t\\t}\\n\\t\\treturn shadow;\\n\\t}\\n\\tvec2 cubeToUV( vec3 v, float texelSizeY ) {\\n\\t\\tvec3 absV = abs( v );\\n\\t\\tfloat scaleToCube = 1.0 / max( absV.x, max( absV.y, absV.z ) );\\n\\t\\tabsV *= scaleToCube;\\n\\t\\tv *= scaleToCube * ( 1.0 - 2.0 * texelSizeY );\\n\\t\\tvec2 planar = v.xy;\\n\\t\\tfloat almostATexel = 1.5 * texelSizeY;\\n\\t\\tfloat almostOne = 1.0 - almostATexel;\\n\\t\\tif ( absV.z >= almostOne ) {\\n\\t\\t\\tif ( v.z > 0.0 )\\n\\t\\t\\t\\tplanar.x = 4.0 - v.x;\\n\\t\\t} else if ( absV.x >= almostOne ) {\\n\\t\\t\\tfloat signX = sign( v.x );\\n\\t\\t\\tplanar.x = v.z * signX + 2.0 * signX;\\n\\t\\t} else if ( absV.y >= almostOne ) {\\n\\t\\t\\tfloat signY = sign( v.y );\\n\\t\\t\\tplanar.x = v.x + 2.0 * signY + 2.0;\\n\\t\\t\\tplanar.y = v.z * signY - 2.0;\\n\\t\\t}\\n\\t\\treturn vec2( 0.125, 0.25 ) * planar + vec2( 0.375, 0.75 );\\n\\t}\\n\\tfloat getPointShadow( sampler2D shadowMap, vec2 shadowMapSize, float shadowBias, float shadowRadius, vec4 shadowCoord, float shadowCameraNear, float shadowCameraFar ) {\\n\\t\\tvec2 texelSize = vec2( 1.0 ) / ( shadowMapSize * vec2( 4.0, 2.0 ) );\\n\\t\\tvec3 lightToPosition = shadowCoord.xyz;\\n\\t\\tfloat dp = ( length( lightToPosition ) - shadowCameraNear ) / ( shadowCameraFar - shadowCameraNear );\\t\\tdp += shadowBias;\\n\\t\\tvec3 bd3D = normalize( lightToPosition );\\n\\t\\t#if defined( SHADOWMAP_TYPE_PCF ) || defined( SHADOWMAP_TYPE_PCF_SOFT )\\n\\t\\t\\tvec2 offset = vec2( - 1, 1 ) * shadowRadius * texelSize.y;\\n\\t\\t\\treturn (\\n\\t\\t\\t\\ttexture2DCompare( shadowMap, cubeToUV( bd3D + offset.xyy, texelSize.y ), dp ) +\\n\\t\\t\\t\\ttexture2DCompare( shadowMap, cubeToUV( bd3D + offset.yyy, texelSize.y ), dp ) +\\n\\t\\t\\t\\ttexture2DCompare( shadowMap, cubeToUV( bd3D + offset.xyx, texelSize.y ), dp ) +\\n\\t\\t\\t\\ttexture2DCompare( shadowMap, cubeToUV( bd3D + offset.yyx, texelSize.y ), dp ) +\\n\\t\\t\\t\\ttexture2DCompare( shadowMap, cubeToUV( bd3D, texelSize.y ), dp ) +\\n\\t\\t\\t\\ttexture2DCompare( shadowMap, cubeToUV( bd3D + offset.xxy, texelSize.y ), dp ) +\\n\\t\\t\\t\\ttexture2DCompare( shadowMap, cubeToUV( bd3D + offset.yxy, texelSize.y ), dp ) +\\n\\t\\t\\t\\ttexture2DCompare( shadowMap, cubeToUV( bd3D + offset.xxx, texelSize.y ), dp ) +\\n\\t\\t\\t\\ttexture2DCompare( shadowMap, cubeToUV( bd3D + offset.yxx, texelSize.y ), dp )\\n\\t\\t\\t) * ( 1.0 / 9.0 );\\n\\t\\t#else\\n\\t\\t\\treturn texture2DCompare( shadowMap, cubeToUV( bd3D, texelSize.y ), dp );\\n\\t\\t#endif\\n\\t}\\n#endif\\n\",\nshadowmap_pars_vertex:\"#ifdef USE_SHADOWMAP\\n\\t#if NUM_DIR_LIGHTS > 0\\n\\t\\tuniform mat4 directionalShadowMatrix[ NUM_DIR_LIGHTS ];\\n\\t\\tvarying vec4 vDirectionalShadowCoord[ NUM_DIR_LIGHTS ];\\n\\t#endif\\n\\t#if NUM_SPOT_LIGHTS > 0\\n\\t\\tuniform mat4 spotShadowMatrix[ NUM_SPOT_LIGHTS ];\\n\\t\\tvarying vec4 vSpotShadowCoord[ NUM_SPOT_LIGHTS ];\\n\\t#endif\\n\\t#if NUM_POINT_LIGHTS > 0\\n\\t\\tuniform mat4 pointShadowMatrix[ NUM_POINT_LIGHTS ];\\n\\t\\tvarying vec4 vPointShadowCoord[ NUM_POINT_LIGHTS ];\\n\\t#endif\\n#endif\\n\",\nshadowmap_vertex:\"#ifdef USE_SHADOWMAP\\n\\t#if NUM_DIR_LIGHTS > 0\\n\\t#pragma unroll_loop\\n\\tfor ( int i = 0; i < NUM_DIR_LIGHTS; i ++ ) {\\n\\t\\tvDirectionalShadowCoord[ i ] = directionalShadowMatrix[ i ] * worldPosition;\\n\\t}\\n\\t#endif\\n\\t#if NUM_SPOT_LIGHTS > 0\\n\\t#pragma unroll_loop\\n\\tfor ( int i = 0; i < NUM_SPOT_LIGHTS; i ++ ) {\\n\\t\\tvSpotShadowCoord[ i ] = spotShadowMatrix[ i ] * worldPosition;\\n\\t}\\n\\t#endif\\n\\t#if NUM_POINT_LIGHTS > 0\\n\\t#pragma unroll_loop\\n\\tfor ( int i = 0; i < NUM_POINT_LIGHTS; i ++ ) {\\n\\t\\tvPointShadowCoord[ i ] = pointShadowMatrix[ i ] * worldPosition;\\n\\t}\\n\\t#endif\\n#endif\\n\",\nshadowmask_pars_fragment:\"float getShadowMask() {\\n\\tfloat shadow = 1.0;\\n\\t#ifdef USE_SHADOWMAP\\n\\t#if NUM_DIR_LIGHTS > 0\\n\\tDirectionalLight directionalLight;\\n\\t#pragma unroll_loop\\n\\tfor ( int i = 0; i < NUM_DIR_LIGHTS; i ++ ) {\\n\\t\\tdirectionalLight = directionalLights[ i ];\\n\\t\\tshadow *= bool( directionalLight.shadow ) ? getShadow( directionalShadowMap[ i ], directionalLight.shadowMapSize, directionalLight.shadowBias, directionalLight.shadowRadius, vDirectionalShadowCoord[ i ] ) : 1.0;\\n\\t}\\n\\t#endif\\n\\t#if NUM_SPOT_LIGHTS > 0\\n\\tSpotLight spotLight;\\n\\t#pragma unroll_loop\\n\\tfor ( int i = 0; i < NUM_SPOT_LIGHTS; i ++ ) {\\n\\t\\tspotLight = spotLights[ i ];\\n\\t\\tshadow *= bool( spotLight.shadow ) ? getShadow( spotShadowMap[ i ], spotLight.shadowMapSize, spotLight.shadowBias, spotLight.shadowRadius, vSpotShadowCoord[ i ] ) : 1.0;\\n\\t}\\n\\t#endif\\n\\t#if NUM_POINT_LIGHTS > 0\\n\\tPointLight pointLight;\\n\\t#pragma unroll_loop\\n\\tfor ( int i = 0; i < NUM_POINT_LIGHTS; i ++ ) {\\n\\t\\tpointLight = pointLights[ i ];\\n\\t\\tshadow *= bool( pointLight.shadow ) ? getPointShadow( pointShadowMap[ i ], pointLight.shadowMapSize, pointLight.shadowBias, pointLight.shadowRadius, vPointShadowCoord[ i ], pointLight.shadowCameraNear, pointLight.shadowCameraFar ) : 1.0;\\n\\t}\\n\\t#endif\\n\\t#endif\\n\\treturn shadow;\\n}\\n\",\nskinbase_vertex:\"#ifdef USE_SKINNING\\n\\tmat4 boneMatX = getBoneMatrix( skinIndex.x );\\n\\tmat4 boneMatY = getBoneMatrix( skinIndex.y );\\n\\tmat4 boneMatZ = getBoneMatrix( skinIndex.z );\\n\\tmat4 boneMatW = getBoneMatrix( skinIndex.w );\\n#endif\",skinning_pars_vertex:\"#ifdef USE_SKINNING\\n\\tuniform mat4 bindMatrix;\\n\\tuniform mat4 bindMatrixInverse;\\n\\t#ifdef BONE_TEXTURE\\n\\t\\tuniform sampler2D boneTexture;\\n\\t\\tuniform int boneTextureSize;\\n\\t\\tmat4 getBoneMatrix( const in float i ) {\\n\\t\\t\\tfloat j = i * 4.0;\\n\\t\\t\\tfloat x = mod( j, float( boneTextureSize ) );\\n\\t\\t\\tfloat y = floor( j / float( boneTextureSize ) );\\n\\t\\t\\tfloat dx = 1.0 / float( boneTextureSize );\\n\\t\\t\\tfloat dy = 1.0 / float( boneTextureSize );\\n\\t\\t\\ty = dy * ( y + 0.5 );\\n\\t\\t\\tvec4 v1 = texture2D( boneTexture, vec2( dx * ( x + 0.5 ), y ) );\\n\\t\\t\\tvec4 v2 = texture2D( boneTexture, vec2( dx * ( x + 1.5 ), y ) );\\n\\t\\t\\tvec4 v3 = texture2D( boneTexture, vec2( dx * ( x + 2.5 ), y ) );\\n\\t\\t\\tvec4 v4 = texture2D( boneTexture, vec2( dx * ( x + 3.5 ), y ) );\\n\\t\\t\\tmat4 bone = mat4( v1, v2, v3, v4 );\\n\\t\\t\\treturn bone;\\n\\t\\t}\\n\\t#else\\n\\t\\tuniform mat4 boneMatrices[ MAX_BONES ];\\n\\t\\tmat4 getBoneMatrix( const in float i ) {\\n\\t\\t\\tmat4 bone = boneMatrices[ int(i) ];\\n\\t\\t\\treturn bone;\\n\\t\\t}\\n\\t#endif\\n#endif\\n\",\nskinning_vertex:\"#ifdef USE_SKINNING\\n\\tvec4 skinVertex = bindMatrix * vec4( transformed, 1.0 );\\n\\tvec4 skinned = vec4( 0.0 );\\n\\tskinned += boneMatX * skinVertex * skinWeight.x;\\n\\tskinned += boneMatY * skinVertex * skinWeight.y;\\n\\tskinned += boneMatZ * skinVertex * skinWeight.z;\\n\\tskinned += boneMatW * skinVertex * skinWeight.w;\\n\\ttransformed = ( bindMatrixInverse * skinned ).xyz;\\n#endif\\n\",skinnormal_vertex:\"#ifdef USE_SKINNING\\n\\tmat4 skinMatrix = mat4( 0.0 );\\n\\tskinMatrix += skinWeight.x * boneMatX;\\n\\tskinMatrix += skinWeight.y * boneMatY;\\n\\tskinMatrix += skinWeight.z * boneMatZ;\\n\\tskinMatrix += skinWeight.w * boneMatW;\\n\\tskinMatrix = bindMatrixInverse * skinMatrix * bindMatrix;\\n\\tobjectNormal = vec4( skinMatrix * vec4( objectNormal, 0.0 ) ).xyz;\\n#endif\\n\",\nspecularmap_fragment:\"float specularStrength;\\n#ifdef USE_SPECULARMAP\\n\\tvec4 texelSpecular = texture2D( specularMap, vUv );\\n\\tspecularStrength = texelSpecular.r;\\n#else\\n\\tspecularStrength = 1.0;\\n#endif\",specularmap_pars_fragment:\"#ifdef USE_SPECULARMAP\\n\\tuniform sampler2D specularMap;\\n#endif\",tonemapping_fragment:\"#if defined( TONE_MAPPING )\\n gl_FragColor.rgb = toneMapping( gl_FragColor.rgb );\\n#endif\\n\",tonemapping_pars_fragment:\"#ifndef saturate\\n\\t#define saturate(a) clamp( a, 0.0, 1.0 )\\n#endif\\nuniform float toneMappingExposure;\\nuniform float toneMappingWhitePoint;\\nvec3 LinearToneMapping( vec3 color ) {\\n\\treturn toneMappingExposure * color;\\n}\\nvec3 ReinhardToneMapping( vec3 color ) {\\n\\tcolor *= toneMappingExposure;\\n\\treturn saturate( color / ( vec3( 1.0 ) + color ) );\\n}\\n#define Uncharted2Helper( x ) max( ( ( x * ( 0.15 * x + 0.10 * 0.50 ) + 0.20 * 0.02 ) / ( x * ( 0.15 * x + 0.50 ) + 0.20 * 0.30 ) ) - 0.02 / 0.30, vec3( 0.0 ) )\\nvec3 Uncharted2ToneMapping( vec3 color ) {\\n\\tcolor *= toneMappingExposure;\\n\\treturn saturate( Uncharted2Helper( color ) / Uncharted2Helper( vec3( toneMappingWhitePoint ) ) );\\n}\\nvec3 OptimizedCineonToneMapping( vec3 color ) {\\n\\tcolor *= toneMappingExposure;\\n\\tcolor = max( vec3( 0.0 ), color - 0.004 );\\n\\treturn pow( ( color * ( 6.2 * color + 0.5 ) ) / ( color * ( 6.2 * color + 1.7 ) + 0.06 ), vec3( 2.2 ) );\\n}\\n\",\nuv_pars_fragment:\"#if defined( USE_MAP ) || defined( USE_BUMPMAP ) || defined( USE_NORMALMAP ) || defined( USE_SPECULARMAP ) || defined( USE_ALPHAMAP ) || defined( USE_EMISSIVEMAP ) || defined( USE_ROUGHNESSMAP ) || defined( USE_METALNESSMAP )\\n\\tvarying vec2 vUv;\\n#endif\",uv_pars_vertex:\"#if defined( USE_MAP ) || defined( USE_BUMPMAP ) || defined( USE_NORMALMAP ) || defined( USE_SPECULARMAP ) || defined( USE_ALPHAMAP ) || defined( USE_EMISSIVEMAP ) || defined( USE_ROUGHNESSMAP ) || defined( USE_METALNESSMAP )\\n\\tvarying vec2 vUv;\\n\\tuniform mat3 uvTransform;\\n#endif\\n\",\nuv_vertex:\"#if defined( USE_MAP ) || defined( USE_BUMPMAP ) || defined( USE_NORMALMAP ) || defined( USE_SPECULARMAP ) || defined( USE_ALPHAMAP ) || defined( USE_EMISSIVEMAP ) || defined( USE_ROUGHNESSMAP ) || defined( USE_METALNESSMAP )\\n\\tvUv = ( uvTransform * vec3( uv, 1 ) ).xy;\\n#endif\",uv2_pars_fragment:\"#if defined( USE_LIGHTMAP ) || defined( USE_AOMAP )\\n\\tvarying vec2 vUv2;\\n#endif\",uv2_pars_vertex:\"#if defined( USE_LIGHTMAP ) || defined( USE_AOMAP )\\n\\tattribute vec2 uv2;\\n\\tvarying vec2 vUv2;\\n#endif\",\nuv2_vertex:\"#if defined( USE_LIGHTMAP ) || defined( USE_AOMAP )\\n\\tvUv2 = uv2;\\n#endif\",worldpos_vertex:\"#if defined( USE_ENVMAP ) || defined( DISTANCE ) || defined ( USE_SHADOWMAP )\\n\\tvec4 worldPosition = modelMatrix * vec4( transformed, 1.0 );\\n#endif\\n\",cube_frag:\"uniform samplerCube tCube;\\nuniform float tFlip;\\nuniform float opacity;\\nvarying vec3 vWorldPosition;\\nvoid main() {\\n\\tgl_FragColor = textureCube( tCube, vec3( tFlip * vWorldPosition.x, vWorldPosition.yz ) );\\n\\tgl_FragColor.a *= opacity;\\n}\\n\",\ncube_vert:\"varying vec3 vWorldPosition;\\n#include <common>\\nvoid main() {\\n\\tvWorldPosition = transformDirection( position, modelMatrix );\\n\\t#include <begin_vertex>\\n\\t#include <project_vertex>\\n\\tgl_Position.z = gl_Position.w;\\n}\\n\",depth_frag:\"#if DEPTH_PACKING == 3200\\n\\tuniform float opacity;\\n#endif\\n#include <common>\\n#include <packing>\\n#include <uv_pars_fragment>\\n#include <map_pars_fragment>\\n#include <alphamap_pars_fragment>\\n#include <logdepthbuf_pars_fragment>\\n#include <clipping_planes_pars_fragment>\\nvoid main() {\\n\\t#include <clipping_planes_fragment>\\n\\tvec4 diffuseColor = vec4( 1.0 );\\n\\t#if DEPTH_PACKING == 3200\\n\\t\\tdiffuseColor.a = opacity;\\n\\t#endif\\n\\t#include <map_fragment>\\n\\t#include <alphamap_fragment>\\n\\t#include <alphatest_fragment>\\n\\t#include <logdepthbuf_fragment>\\n\\t#if DEPTH_PACKING == 3200\\n\\t\\tgl_FragColor = vec4( vec3( 1.0 - gl_FragCoord.z ), opacity );\\n\\t#elif DEPTH_PACKING == 3201\\n\\t\\tgl_FragColor = packDepthToRGBA( gl_FragCoord.z );\\n\\t#endif\\n}\\n\",\ndepth_vert:\"#include <common>\\n#include <uv_pars_vertex>\\n#include <displacementmap_pars_vertex>\\n#include <morphtarget_pars_vertex>\\n#include <skinning_pars_vertex>\\n#include <logdepthbuf_pars_vertex>\\n#include <clipping_planes_pars_vertex>\\nvoid main() {\\n\\t#include <uv_vertex>\\n\\t#include <skinbase_vertex>\\n\\t#ifdef USE_DISPLACEMENTMAP\\n\\t\\t#include <beginnormal_vertex>\\n\\t\\t#include <morphnormal_vertex>\\n\\t\\t#include <skinnormal_vertex>\\n\\t#endif\\n\\t#include <begin_vertex>\\n\\t#include <morphtarget_vertex>\\n\\t#include <skinning_vertex>\\n\\t#include <displacementmap_vertex>\\n\\t#include <project_vertex>\\n\\t#include <logdepthbuf_vertex>\\n\\t#include <clipping_planes_vertex>\\n}\\n\",\ndistanceRGBA_frag:\"#define DISTANCE\\nuniform vec3 referencePosition;\\nuniform float nearDistance;\\nuniform float farDistance;\\nvarying vec3 vWorldPosition;\\n#include <common>\\n#include <packing>\\n#include <uv_pars_fragment>\\n#include <map_pars_fragment>\\n#include <alphamap_pars_fragment>\\n#include <clipping_planes_pars_fragment>\\nvoid main () {\\n\\t#include <clipping_planes_fragment>\\n\\tvec4 diffuseColor = vec4( 1.0 );\\n\\t#include <map_fragment>\\n\\t#include <alphamap_fragment>\\n\\t#include <alphatest_fragment>\\n\\tfloat dist = length( vWorldPosition - referencePosition );\\n\\tdist = ( dist - nearDistance ) / ( farDistance - nearDistance );\\n\\tdist = saturate( dist );\\n\\tgl_FragColor = packDepthToRGBA( dist );\\n}\\n\",\ndistanceRGBA_vert:\"#define DISTANCE\\nvarying vec3 vWorldPosition;\\n#include <common>\\n#include <uv_pars_vertex>\\n#include <displacementmap_pars_vertex>\\n#include <morphtarget_pars_vertex>\\n#include <skinning_pars_vertex>\\n#include <clipping_planes_pars_vertex>\\nvoid main() {\\n\\t#include <uv_vertex>\\n\\t#include <skinbase_vertex>\\n\\t#ifdef USE_DISPLACEMENTMAP\\n\\t\\t#include <beginnormal_vertex>\\n\\t\\t#include <morphnormal_vertex>\\n\\t\\t#include <skinnormal_vertex>\\n\\t#endif\\n\\t#include <begin_vertex>\\n\\t#include <morphtarget_vertex>\\n\\t#include <skinning_vertex>\\n\\t#include <displacementmap_vertex>\\n\\t#include <project_vertex>\\n\\t#include <worldpos_vertex>\\n\\t#include <clipping_planes_vertex>\\n\\tvWorldPosition = worldPosition.xyz;\\n}\\n\",\nequirect_frag:\"uniform sampler2D tEquirect;\\nvarying vec3 vWorldPosition;\\n#include <common>\\nvoid main() {\\n\\tvec3 direction = normalize( vWorldPosition );\\n\\tvec2 sampleUV;\\n\\tsampleUV.y = asin( clamp( direction.y, - 1.0, 1.0 ) ) * RECIPROCAL_PI + 0.5;\\n\\tsampleUV.x = atan( direction.z, direction.x ) * RECIPROCAL_PI2 + 0.5;\\n\\tgl_FragColor = texture2D( tEquirect, sampleUV );\\n}\\n\",equirect_vert:\"varying vec3 vWorldPosition;\\n#include <common>\\nvoid main() {\\n\\tvWorldPosition = transformDirection( position, modelMatrix );\\n\\t#include <begin_vertex>\\n\\t#include <project_vertex>\\n}\\n\",\nlinedashed_frag:\"uniform vec3 diffuse;\\nuniform float opacity;\\nuniform float dashSize;\\nuniform float totalSize;\\nvarying float vLineDistance;\\n#include <common>\\n#include <color_pars_fragment>\\n#include <fog_pars_fragment>\\n#include <logdepthbuf_pars_fragment>\\n#include <clipping_planes_pars_fragment>\\nvoid main() {\\n\\t#include <clipping_planes_fragment>\\n\\tif ( mod( vLineDistance, totalSize ) > dashSize ) {\\n\\t\\tdiscard;\\n\\t}\\n\\tvec3 outgoingLight = vec3( 0.0 );\\n\\tvec4 diffuseColor = vec4( diffuse, opacity );\\n\\t#include <logdepthbuf_fragment>\\n\\t#include <color_fragment>\\n\\toutgoingLight = diffuseColor.rgb;\\n\\tgl_FragColor = vec4( outgoingLight, diffuseColor.a );\\n\\t#include <premultiplied_alpha_fragment>\\n\\t#include <tonemapping_fragment>\\n\\t#include <encodings_fragment>\\n\\t#include <fog_fragment>\\n}\\n\",\nlinedashed_vert:\"uniform float scale;\\nattribute float lineDistance;\\nvarying float vLineDistance;\\n#include <common>\\n#include <color_pars_vertex>\\n#include <fog_pars_vertex>\\n#include <logdepthbuf_pars_vertex>\\n#include <clipping_planes_pars_vertex>\\nvoid main() {\\n\\t#include <color_vertex>\\n\\tvLineDistance = scale * lineDistance;\\n\\tvec4 mvPosition = modelViewMatrix * vec4( position, 1.0 );\\n\\tgl_Position = projectionMatrix * mvPosition;\\n\\t#include <logdepthbuf_vertex>\\n\\t#include <clipping_planes_vertex>\\n\\t#include <fog_vertex>\\n}\\n\",\nmeshbasic_frag:\"uniform vec3 diffuse;\\nuniform float opacity;\\n#ifndef FLAT_SHADED\\n\\tvarying vec3 vNormal;\\n#endif\\n#include <common>\\n#include <color_pars_fragment>\\n#include <uv_pars_fragment>\\n#include <uv2_pars_fragment>\\n#include <map_pars_fragment>\\n#include <alphamap_pars_fragment>\\n#include <aomap_pars_fragment>\\n#include <lightmap_pars_fragment>\\n#include <envmap_pars_fragment>\\n#include <fog_pars_fragment>\\n#include <specularmap_pars_fragment>\\n#include <logdepthbuf_pars_fragment>\\n#include <clipping_planes_pars_fragment>\\nvoid main() {\\n\\t#include <clipping_planes_fragment>\\n\\tvec4 diffuseColor = vec4( diffuse, opacity );\\n\\t#include <logdepthbuf_fragment>\\n\\t#include <map_fragment>\\n\\t#include <color_fragment>\\n\\t#include <alphamap_fragment>\\n\\t#include <alphatest_fragment>\\n\\t#include <specularmap_fragment>\\n\\tReflectedLight reflectedLight = ReflectedLight( vec3( 0.0 ), vec3( 0.0 ), vec3( 0.0 ), vec3( 0.0 ) );\\n\\t#ifdef USE_LIGHTMAP\\n\\t\\treflectedLight.indirectDiffuse += texture2D( lightMap, vUv2 ).xyz * lightMapIntensity;\\n\\t#else\\n\\t\\treflectedLight.indirectDiffuse += vec3( 1.0 );\\n\\t#endif\\n\\t#include <aomap_fragment>\\n\\treflectedLight.indirectDiffuse *= diffuseColor.rgb;\\n\\tvec3 outgoingLight = reflectedLight.indirectDiffuse;\\n\\t#include <envmap_fragment>\\n\\tgl_FragColor = vec4( outgoingLight, diffuseColor.a );\\n\\t#include <premultiplied_alpha_fragment>\\n\\t#include <tonemapping_fragment>\\n\\t#include <encodings_fragment>\\n\\t#include <fog_fragment>\\n}\\n\",\nmeshbasic_vert:\"#include <common>\\n#include <uv_pars_vertex>\\n#include <uv2_pars_vertex>\\n#include <envmap_pars_vertex>\\n#include <color_pars_vertex>\\n#include <fog_pars_vertex>\\n#include <morphtarget_pars_vertex>\\n#include <skinning_pars_vertex>\\n#include <logdepthbuf_pars_vertex>\\n#include <clipping_planes_pars_vertex>\\nvoid main() {\\n\\t#include <uv_vertex>\\n\\t#include <uv2_vertex>\\n\\t#include <color_vertex>\\n\\t#include <skinbase_vertex>\\n\\t#ifdef USE_ENVMAP\\n\\t#include <beginnormal_vertex>\\n\\t#include <morphnormal_vertex>\\n\\t#include <skinnormal_vertex>\\n\\t#include <defaultnormal_vertex>\\n\\t#endif\\n\\t#include <begin_vertex>\\n\\t#include <morphtarget_vertex>\\n\\t#include <skinning_vertex>\\n\\t#include <project_vertex>\\n\\t#include <logdepthbuf_vertex>\\n\\t#include <worldpos_vertex>\\n\\t#include <clipping_planes_vertex>\\n\\t#include <envmap_vertex>\\n\\t#include <fog_vertex>\\n}\\n\",\nmeshlambert_frag:\"uniform vec3 diffuse;\\nuniform vec3 emissive;\\nuniform float opacity;\\nvarying vec3 vLightFront;\\n#ifdef DOUBLE_SIDED\\n\\tvarying vec3 vLightBack;\\n#endif\\n#include <common>\\n#include <packing>\\n#include <dithering_pars_fragment>\\n#include <color_pars_fragment>\\n#include <uv_pars_fragment>\\n#include <uv2_pars_fragment>\\n#include <map_pars_fragment>\\n#include <alphamap_pars_fragment>\\n#include <aomap_pars_fragment>\\n#include <lightmap_pars_fragment>\\n#include <emissivemap_pars_fragment>\\n#include <envmap_pars_fragment>\\n#include <bsdfs>\\n#include <lights_pars_begin>\\n#include <fog_pars_fragment>\\n#include <shadowmap_pars_fragment>\\n#include <shadowmask_pars_fragment>\\n#include <specularmap_pars_fragment>\\n#include <logdepthbuf_pars_fragment>\\n#include <clipping_planes_pars_fragment>\\nvoid main() {\\n\\t#include <clipping_planes_fragment>\\n\\tvec4 diffuseColor = vec4( diffuse, opacity );\\n\\tReflectedLight reflectedLight = ReflectedLight( vec3( 0.0 ), vec3( 0.0 ), vec3( 0.0 ), vec3( 0.0 ) );\\n\\tvec3 totalEmissiveRadiance = emissive;\\n\\t#include <logdepthbuf_fragment>\\n\\t#include <map_fragment>\\n\\t#include <color_fragment>\\n\\t#include <alphamap_fragment>\\n\\t#include <alphatest_fragment>\\n\\t#include <specularmap_fragment>\\n\\t#include <emissivemap_fragment>\\n\\treflectedLight.indirectDiffuse = getAmbientLightIrradiance( ambientLightColor );\\n\\t#include <lightmap_fragment>\\n\\treflectedLight.indirectDiffuse *= BRDF_Diffuse_Lambert( diffuseColor.rgb );\\n\\t#ifdef DOUBLE_SIDED\\n\\t\\treflectedLight.directDiffuse = ( gl_FrontFacing ) ? vLightFront : vLightBack;\\n\\t#else\\n\\t\\treflectedLight.directDiffuse = vLightFront;\\n\\t#endif\\n\\treflectedLight.directDiffuse *= BRDF_Diffuse_Lambert( diffuseColor.rgb ) * getShadowMask();\\n\\t#include <aomap_fragment>\\n\\tvec3 outgoingLight = reflectedLight.directDiffuse + reflectedLight.indirectDiffuse + totalEmissiveRadiance;\\n\\t#include <envmap_fragment>\\n\\tgl_FragColor = vec4( outgoingLight, diffuseColor.a );\\n\\t#include <tonemapping_fragment>\\n\\t#include <encodings_fragment>\\n\\t#include <fog_fragment>\\n\\t#include <premultiplied_alpha_fragment>\\n\\t#include <dithering_fragment>\\n}\\n\",\nmeshlambert_vert:\"#define LAMBERT\\nvarying vec3 vLightFront;\\n#ifdef DOUBLE_SIDED\\n\\tvarying vec3 vLightBack;\\n#endif\\n#include <common>\\n#include <uv_pars_vertex>\\n#include <uv2_pars_vertex>\\n#include <envmap_pars_vertex>\\n#include <bsdfs>\\n#include <lights_pars_begin>\\n#include <color_pars_vertex>\\n#include <fog_pars_vertex>\\n#include <morphtarget_pars_vertex>\\n#include <skinning_pars_vertex>\\n#include <shadowmap_pars_vertex>\\n#include <logdepthbuf_pars_vertex>\\n#include <clipping_planes_pars_vertex>\\nvoid main() {\\n\\t#include <uv_vertex>\\n\\t#include <uv2_vertex>\\n\\t#include <color_vertex>\\n\\t#include <beginnormal_vertex>\\n\\t#include <morphnormal_vertex>\\n\\t#include <skinbase_vertex>\\n\\t#include <skinnormal_vertex>\\n\\t#include <defaultnormal_vertex>\\n\\t#include <begin_vertex>\\n\\t#include <morphtarget_vertex>\\n\\t#include <skinning_vertex>\\n\\t#include <project_vertex>\\n\\t#include <logdepthbuf_vertex>\\n\\t#include <clipping_planes_vertex>\\n\\t#include <worldpos_vertex>\\n\\t#include <envmap_vertex>\\n\\t#include <lights_lambert_vertex>\\n\\t#include <shadowmap_vertex>\\n\\t#include <fog_vertex>\\n}\\n\",\nmeshphong_frag:\"#define PHONG\\nuniform vec3 diffuse;\\nuniform vec3 emissive;\\nuniform vec3 specular;\\nuniform float shininess;\\nuniform float opacity;\\n#include <common>\\n#include <packing>\\n#include <dithering_pars_fragment>\\n#include <color_pars_fragment>\\n#include <uv_pars_fragment>\\n#include <uv2_pars_fragment>\\n#include <map_pars_fragment>\\n#include <alphamap_pars_fragment>\\n#include <aomap_pars_fragment>\\n#include <lightmap_pars_fragment>\\n#include <emissivemap_pars_fragment>\\n#include <envmap_pars_fragment>\\n#include <gradientmap_pars_fragment>\\n#include <fog_pars_fragment>\\n#include <bsdfs>\\n#include <lights_pars_begin>\\n#include <lights_phong_pars_fragment>\\n#include <shadowmap_pars_fragment>\\n#include <bumpmap_pars_fragment>\\n#include <normalmap_pars_fragment>\\n#include <specularmap_pars_fragment>\\n#include <logdepthbuf_pars_fragment>\\n#include <clipping_planes_pars_fragment>\\nvoid main() {\\n\\t#include <clipping_planes_fragment>\\n\\tvec4 diffuseColor = vec4( diffuse, opacity );\\n\\tReflectedLight reflectedLight = ReflectedLight( vec3( 0.0 ), vec3( 0.0 ), vec3( 0.0 ), vec3( 0.0 ) );\\n\\tvec3 totalEmissiveRadiance = emissive;\\n\\t#include <logdepthbuf_fragment>\\n\\t#include <map_fragment>\\n\\t#include <color_fragment>\\n\\t#include <alphamap_fragment>\\n\\t#include <alphatest_fragment>\\n\\t#include <specularmap_fragment>\\n\\t#include <normal_fragment_begin>\\n\\t#include <normal_fragment_maps>\\n\\t#include <emissivemap_fragment>\\n\\t#include <lights_phong_fragment>\\n\\t#include <lights_fragment_begin>\\n\\t#include <lights_fragment_maps>\\n\\t#include <lights_fragment_end>\\n\\t#include <aomap_fragment>\\n\\tvec3 outgoingLight = reflectedLight.directDiffuse + reflectedLight.indirectDiffuse + reflectedLight.directSpecular + reflectedLight.indirectSpecular + totalEmissiveRadiance;\\n\\t#include <envmap_fragment>\\n\\tgl_FragColor = vec4( outgoingLight, diffuseColor.a );\\n\\t#include <tonemapping_fragment>\\n\\t#include <encodings_fragment>\\n\\t#include <fog_fragment>\\n\\t#include <premultiplied_alpha_fragment>\\n\\t#include <dithering_fragment>\\n}\\n\",\nmeshphong_vert:\"#define PHONG\\nvarying vec3 vViewPosition;\\n#ifndef FLAT_SHADED\\n\\tvarying vec3 vNormal;\\n#endif\\n#include <common>\\n#include <uv_pars_vertex>\\n#include <uv2_pars_vertex>\\n#include <displacementmap_pars_vertex>\\n#include <envmap_pars_vertex>\\n#include <color_pars_vertex>\\n#include <fog_pars_vertex>\\n#include <morphtarget_pars_vertex>\\n#include <skinning_pars_vertex>\\n#include <shadowmap_pars_vertex>\\n#include <logdepthbuf_pars_vertex>\\n#include <clipping_planes_pars_vertex>\\nvoid main() {\\n\\t#include <uv_vertex>\\n\\t#include <uv2_vertex>\\n\\t#include <color_vertex>\\n\\t#include <beginnormal_vertex>\\n\\t#include <morphnormal_vertex>\\n\\t#include <skinbase_vertex>\\n\\t#include <skinnormal_vertex>\\n\\t#include <defaultnormal_vertex>\\n#ifndef FLAT_SHADED\\n\\tvNormal = normalize( transformedNormal );\\n#endif\\n\\t#include <begin_vertex>\\n\\t#include <morphtarget_vertex>\\n\\t#include <skinning_vertex>\\n\\t#include <displacementmap_vertex>\\n\\t#include <project_vertex>\\n\\t#include <logdepthbuf_vertex>\\n\\t#include <clipping_planes_vertex>\\n\\tvViewPosition = - mvPosition.xyz;\\n\\t#include <worldpos_vertex>\\n\\t#include <envmap_vertex>\\n\\t#include <shadowmap_vertex>\\n\\t#include <fog_vertex>\\n}\\n\",\nmeshphysical_frag:\"#define PHYSICAL\\nuniform vec3 diffuse;\\nuniform vec3 emissive;\\nuniform float roughness;\\nuniform float metalness;\\nuniform float opacity;\\n#ifndef STANDARD\\n\\tuniform float clearCoat;\\n\\tuniform float clearCoatRoughness;\\n#endif\\nvarying vec3 vViewPosition;\\n#ifndef FLAT_SHADED\\n\\tvarying vec3 vNormal;\\n#endif\\n#include <common>\\n#include <packing>\\n#include <dithering_pars_fragment>\\n#include <color_pars_fragment>\\n#include <uv_pars_fragment>\\n#include <uv2_pars_fragment>\\n#include <map_pars_fragment>\\n#include <alphamap_pars_fragment>\\n#include <aomap_pars_fragment>\\n#include <lightmap_pars_fragment>\\n#include <emissivemap_pars_fragment>\\n#include <bsdfs>\\n#include <cube_uv_reflection_fragment>\\n#include <envmap_pars_fragment>\\n#include <envmap_physical_pars_fragment>\\n#include <fog_pars_fragment>\\n#include <lights_pars_begin>\\n#include <lights_physical_pars_fragment>\\n#include <shadowmap_pars_fragment>\\n#include <bumpmap_pars_fragment>\\n#include <normalmap_pars_fragment>\\n#include <roughnessmap_pars_fragment>\\n#include <metalnessmap_pars_fragment>\\n#include <logdepthbuf_pars_fragment>\\n#include <clipping_planes_pars_fragment>\\nvoid main() {\\n\\t#include <clipping_planes_fragment>\\n\\tvec4 diffuseColor = vec4( diffuse, opacity );\\n\\tReflectedLight reflectedLight = ReflectedLight( vec3( 0.0 ), vec3( 0.0 ), vec3( 0.0 ), vec3( 0.0 ) );\\n\\tvec3 totalEmissiveRadiance = emissive;\\n\\t#include <logdepthbuf_fragment>\\n\\t#include <map_fragment>\\n\\t#include <color_fragment>\\n\\t#include <alphamap_fragment>\\n\\t#include <alphatest_fragment>\\n\\t#include <roughnessmap_fragment>\\n\\t#include <metalnessmap_fragment>\\n\\t#include <normal_fragment_begin>\\n\\t#include <normal_fragment_maps>\\n\\t#include <emissivemap_fragment>\\n\\t#include <lights_physical_fragment>\\n\\t#include <lights_fragment_begin>\\n\\t#include <lights_fragment_maps>\\n\\t#include <lights_fragment_end>\\n\\t#include <aomap_fragment>\\n\\tvec3 outgoingLight = reflectedLight.directDiffuse + reflectedLight.indirectDiffuse + reflectedLight.directSpecular + reflectedLight.indirectSpecular + totalEmissiveRadiance;\\n\\tgl_FragColor = vec4( outgoingLight, diffuseColor.a );\\n\\t#include <tonemapping_fragment>\\n\\t#include <encodings_fragment>\\n\\t#include <fog_fragment>\\n\\t#include <premultiplied_alpha_fragment>\\n\\t#include <dithering_fragment>\\n}\\n\",\nmeshphysical_vert:\"#define PHYSICAL\\nvarying vec3 vViewPosition;\\n#ifndef FLAT_SHADED\\n\\tvarying vec3 vNormal;\\n#endif\\n#include <common>\\n#include <uv_pars_vertex>\\n#include <uv2_pars_vertex>\\n#include <displacementmap_pars_vertex>\\n#include <color_pars_vertex>\\n#include <fog_pars_vertex>\\n#include <morphtarget_pars_vertex>\\n#include <skinning_pars_vertex>\\n#include <shadowmap_pars_vertex>\\n#include <logdepthbuf_pars_vertex>\\n#include <clipping_planes_pars_vertex>\\nvoid main() {\\n\\t#include <uv_vertex>\\n\\t#include <uv2_vertex>\\n\\t#include <color_vertex>\\n\\t#include <beginnormal_vertex>\\n\\t#include <morphnormal_vertex>\\n\\t#include <skinbase_vertex>\\n\\t#include <skinnormal_vertex>\\n\\t#include <defaultnormal_vertex>\\n#ifndef FLAT_SHADED\\n\\tvNormal = normalize( transformedNormal );\\n#endif\\n\\t#include <begin_vertex>\\n\\t#include <morphtarget_vertex>\\n\\t#include <skinning_vertex>\\n\\t#include <displacementmap_vertex>\\n\\t#include <project_vertex>\\n\\t#include <logdepthbuf_vertex>\\n\\t#include <clipping_planes_vertex>\\n\\tvViewPosition = - mvPosition.xyz;\\n\\t#include <worldpos_vertex>\\n\\t#include <shadowmap_vertex>\\n\\t#include <fog_vertex>\\n}\\n\",\nnormal_frag:\"#define NORMAL\\nuniform float opacity;\\n#if defined( FLAT_SHADED ) || defined( USE_BUMPMAP ) || ( defined( USE_NORMALMAP ) && ! defined( OBJECTSPACE_NORMALMAP ) )\\n\\tvarying vec3 vViewPosition;\\n#endif\\n#ifndef FLAT_SHADED\\n\\tvarying vec3 vNormal;\\n#endif\\n#include <packing>\\n#include <uv_pars_fragment>\\n#include <bumpmap_pars_fragment>\\n#include <normalmap_pars_fragment>\\n#include <logdepthbuf_pars_fragment>\\nvoid main() {\\n\\t#include <logdepthbuf_fragment>\\n\\t#include <normal_fragment_begin>\\n\\t#include <normal_fragment_maps>\\n\\tgl_FragColor = vec4( packNormalToRGB( normal ), opacity );\\n}\\n\",\nnormal_vert:\"#define NORMAL\\n#if defined( FLAT_SHADED ) || defined( USE_BUMPMAP ) || ( defined( USE_NORMALMAP ) && ! defined( OBJECTSPACE_NORMALMAP ) )\\n\\tvarying vec3 vViewPosition;\\n#endif\\n#ifndef FLAT_SHADED\\n\\tvarying vec3 vNormal;\\n#endif\\n#include <uv_pars_vertex>\\n#include <displacementmap_pars_vertex>\\n#include <morphtarget_pars_vertex>\\n#include <skinning_pars_vertex>\\n#include <logdepthbuf_pars_vertex>\\nvoid main() {\\n\\t#include <uv_vertex>\\n\\t#include <beginnormal_vertex>\\n\\t#include <morphnormal_vertex>\\n\\t#include <skinbase_vertex>\\n\\t#include <skinnormal_vertex>\\n\\t#include <defaultnormal_vertex>\\n#ifndef FLAT_SHADED\\n\\tvNormal = normalize( transformedNormal );\\n#endif\\n\\t#include <begin_vertex>\\n\\t#include <morphtarget_vertex>\\n\\t#include <skinning_vertex>\\n\\t#include <displacementmap_vertex>\\n\\t#include <project_vertex>\\n\\t#include <logdepthbuf_vertex>\\n#if defined( FLAT_SHADED ) || defined( USE_BUMPMAP ) || ( defined( USE_NORMALMAP ) && ! defined( OBJECTSPACE_NORMALMAP ) )\\n\\tvViewPosition = - mvPosition.xyz;\\n#endif\\n}\\n\",\npoints_frag:\"uniform vec3 diffuse;\\nuniform float opacity;\\n#include <common>\\n#include <color_pars_fragment>\\n#include <map_particle_pars_fragment>\\n#include <fog_pars_fragment>\\n#include <logdepthbuf_pars_fragment>\\n#include <clipping_planes_pars_fragment>\\nvoid main() {\\n\\t#include <clipping_planes_fragment>\\n\\tvec3 outgoingLight = vec3( 0.0 );\\n\\tvec4 diffuseColor = vec4( diffuse, opacity );\\n\\t#include <logdepthbuf_fragment>\\n\\t#include <map_particle_fragment>\\n\\t#include <color_fragment>\\n\\t#include <alphatest_fragment>\\n\\toutgoingLight = diffuseColor.rgb;\\n\\tgl_FragColor = vec4( outgoingLight, diffuseColor.a );\\n\\t#include <premultiplied_alpha_fragment>\\n\\t#include <tonemapping_fragment>\\n\\t#include <encodings_fragment>\\n\\t#include <fog_fragment>\\n}\\n\",\npoints_vert:\"uniform float size;\\nuniform float scale;\\n#include <common>\\n#include <color_pars_vertex>\\n#include <fog_pars_vertex>\\n#include <morphtarget_pars_vertex>\\n#include <logdepthbuf_pars_vertex>\\n#include <clipping_planes_pars_vertex>\\nvoid main() {\\n\\t#include <color_vertex>\\n\\t#include <begin_vertex>\\n\\t#include <morphtarget_vertex>\\n\\t#include <project_vertex>\\n\\t#ifdef USE_SIZEATTENUATION\\n\\t\\tgl_PointSize = size * ( scale / - mvPosition.z );\\n\\t#else\\n\\t\\tgl_PointSize = size;\\n\\t#endif\\n\\t#include <logdepthbuf_vertex>\\n\\t#include <clipping_planes_vertex>\\n\\t#include <worldpos_vertex>\\n\\t#include <fog_vertex>\\n}\\n\",\nshadow_frag:\"uniform vec3 color;\\nuniform float opacity;\\n#include <common>\\n#include <packing>\\n#include <fog_pars_fragment>\\n#include <bsdfs>\\n#include <lights_pars_begin>\\n#include <shadowmap_pars_fragment>\\n#include <shadowmask_pars_fragment>\\nvoid main() {\\n\\tgl_FragColor = vec4( color, opacity * ( 1.0 - getShadowMask() ) );\\n\\t#include <fog_fragment>\\n}\\n\",shadow_vert:\"#include <fog_pars_vertex>\\n#include <shadowmap_pars_vertex>\\nvoid main() {\\n\\t#include <begin_vertex>\\n\\t#include <project_vertex>\\n\\t#include <worldpos_vertex>\\n\\t#include <shadowmap_vertex>\\n\\t#include <fog_vertex>\\n}\\n\",\nsprite_frag:\"uniform vec3 diffuse;\\nuniform float opacity;\\n#include <common>\\n#include <uv_pars_fragment>\\n#include <map_pars_fragment>\\n#include <fog_pars_fragment>\\n#include <logdepthbuf_pars_fragment>\\n#include <clipping_planes_pars_fragment>\\nvoid main() {\\n\\t#include <clipping_planes_fragment>\\n\\tvec3 outgoingLight = vec3( 0.0 );\\n\\tvec4 diffuseColor = vec4( diffuse, opacity );\\n\\t#include <logdepthbuf_fragment>\\n\\t#include <map_fragment>\\n\\t#include <alphatest_fragment>\\n\\toutgoingLight = diffuseColor.rgb;\\n\\tgl_FragColor = vec4( outgoingLight, diffuseColor.a );\\n\\t#include <tonemapping_fragment>\\n\\t#include <encodings_fragment>\\n\\t#include <fog_fragment>\\n}\\n\",\nsprite_vert:\"uniform float rotation;\\nuniform vec2 center;\\n#include <common>\\n#include <uv_pars_vertex>\\n#include <fog_pars_vertex>\\n#include <logdepthbuf_pars_vertex>\\n#include <clipping_planes_pars_vertex>\\nvoid main() {\\n\\t#include <uv_vertex>\\n\\tvec2 scale;\\n\\tscale.x = length( vec3( modelMatrix[ 0 ].x, modelMatrix[ 0 ].y, modelMatrix[ 0 ].z ) );\\n\\tscale.y = length( vec3( modelMatrix[ 1 ].x, modelMatrix[ 1 ].y, modelMatrix[ 1 ].z ) );\\n\\tvec2 alignedPosition = ( position.xy - ( center - vec2( 0.5 ) ) ) * scale;\\n\\tvec2 rotatedPosition;\\n\\trotatedPosition.x = cos( rotation ) * alignedPosition.x - sin( rotation ) * alignedPosition.y;\\n\\trotatedPosition.y = sin( rotation ) * alignedPosition.x + cos( rotation ) * alignedPosition.y;\\n\\tvec4 mvPosition;\\n\\tmvPosition = modelViewMatrix * vec4( 0.0, 0.0, 0.0, 1.0 );\\n\\tmvPosition.xy += rotatedPosition;\\n\\tgl_Position = projectionMatrix * mvPosition;\\n\\t#include <logdepthbuf_vertex>\\n\\t#include <clipping_planes_vertex>\\n\\t#include <fog_vertex>\\n}\\n\"},\nAa={merge:function(a){for(var b={},c=0;c<a.length;c++){var d=this.clone(a[c]),e;for(e in d)b[e]=d[e]}return b},clone:function(a){var b={},c;for(c in a){b[c]={};for(var d in a[c]){var e=a[c][d];e&&(e.isColor||e.isMatrix3||e.isMatrix4||e.isVector2||e.isVector3||e.isVector4||e.isTexture)?b[c][d]=e.clone():Array.isArray(e)?b[c][d]=e.slice():b[c][d]=e}}return b}},Tg={aliceblue:15792383,antiquewhite:16444375,aqua:65535,aquamarine:8388564,azure:15794175,beige:16119260,bisque:16770244,black:0,blanchedalmond:16772045,\nblue:255,blueviolet:9055202,brown:10824234,burlywood:14596231,cadetblue:6266528,chartreuse:8388352,chocolate:13789470,coral:16744272,cornflowerblue:6591981,cornsilk:16775388,crimson:14423100,cyan:65535,darkblue:139,darkcyan:35723,darkgoldenrod:12092939,darkgray:11119017,darkgreen:25600,darkgrey:11119017,darkkhaki:12433259,darkmagenta:9109643,darkolivegreen:5597999,darkorange:16747520,darkorchid:10040012,darkred:9109504,darksalmon:15308410,darkseagreen:9419919,darkslateblue:4734347,darkslategray:3100495,\ndarkslategrey:3100495,darkturquoise:52945,darkviolet:9699539,deeppink:16716947,deepskyblue:49151,dimgray:6908265,dimgrey:6908265,dodgerblue:2003199,firebrick:11674146,floralwhite:16775920,forestgreen:2263842,fuchsia:16711935,gainsboro:14474460,ghostwhite:16316671,gold:16766720,goldenrod:14329120,gray:8421504,green:32768,greenyellow:11403055,grey:8421504,honeydew:15794160,hotpink:16738740,indianred:13458524,indigo:4915330,ivory:16777200,khaki:15787660,lavender:15132410,lavenderblush:16773365,lawngreen:8190976,\nlemonchiffon:16775885,lightblue:11393254,lightcoral:15761536,lightcyan:14745599,lightgoldenrodyellow:16448210,lightgray:13882323,lightgreen:9498256,lightgrey:13882323,lightpink:16758465,lightsalmon:16752762,lightseagreen:2142890,lightskyblue:8900346,lightslategray:7833753,lightslategrey:7833753,lightsteelblue:11584734,lightyellow:16777184,lime:65280,limegreen:3329330,linen:16445670,magenta:16711935,maroon:8388608,mediumaquamarine:6737322,mediumblue:205,mediumorchid:12211667,mediumpurple:9662683,mediumseagreen:3978097,\nmediumslateblue:8087790,mediumspringgreen:64154,mediumturquoise:4772300,mediumvioletred:13047173,midnightblue:1644912,mintcream:16121850,mistyrose:16770273,moccasin:16770229,navajowhite:16768685,navy:128,oldlace:16643558,olive:8421376,olivedrab:7048739,orange:16753920,orangered:16729344,orchid:14315734,palegoldenrod:15657130,palegreen:10025880,paleturquoise:11529966,palevioletred:14381203,papayawhip:16773077,peachpuff:16767673,peru:13468991,pink:16761035,plum:14524637,powderblue:11591910,purple:8388736,\nrebeccapurple:6697881,red:16711680,rosybrown:12357519,royalblue:4286945,saddlebrown:9127187,salmon:16416882,sandybrown:16032864,seagreen:3050327,seashell:16774638,sienna:10506797,silver:12632256,skyblue:8900331,slateblue:6970061,slategray:7372944,slategrey:7372944,snow:16775930,springgreen:65407,steelblue:4620980,tan:13808780,teal:32896,thistle:14204888,tomato:16737095,turquoise:4251856,violet:15631086,wheat:16113331,white:16777215,whitesmoke:16119285,yellow:16776960,yellowgreen:10145074};Object.assign(G.prototype,\n{isColor:!0,r:1,g:1,b:1,set:function(a){a&&a.isColor?this.copy(a):\"number\"===typeof a?this.setHex(a):\"string\"===typeof a&&this.setStyle(a);return this},setScalar:function(a){this.b=this.g=this.r=a;return this},setHex:function(a){a=Math.floor(a);this.r=(a>>16&255)/255;this.g=(a>>8&255)/255;this.b=(a&255)/255;return this},setRGB:function(a,b,c){this.r=a;this.g=b;this.b=c;return this},setHSL:function(){function a(a,c,d){0>d&&(d+=1);1<d&&--d;return d<1/6?a+6*(c-a)*d:.5>d?c:d<2/3?a+6*(c-a)*(2/3-d):a}return function(b,\nc,d){b=H.euclideanModulo(b,1);c=H.clamp(c,0,1);d=H.clamp(d,0,1);0===c?this.r=this.g=this.b=d:(c=.5>=d?d*(1+c):d+c-d*c,d=2*d-c,this.r=a(d,c,b+1/3),this.g=a(d,c,b),this.b=a(d,c,b-1/3));return this}}(),setStyle:function(a){function b(b){void 0!==b&&1>parseFloat(b)&&console.warn(\"THREE.Color: Alpha component of \"+a+\" will be ignored.\")}var c;if(c=/^((?:rgb|hsl)a?)\\(\\s*([^\\)]*)\\)/.exec(a)){var d=c[2];switch(c[1]){case \"rgb\":case \"rgba\":if(c=/^(\\d+)\\s*,\\s*(\\d+)\\s*,\\s*(\\d+)\\s*(,\\s*([0-9]*\\.?[0-9]+)\\s*)?$/.exec(d))return this.r=\nMath.min(255,parseInt(c[1],10))/255,this.g=Math.min(255,parseInt(c[2],10))/255,this.b=Math.min(255,parseInt(c[3],10))/255,b(c[5]),this;if(c=/^(\\d+)%\\s*,\\s*(\\d+)%\\s*,\\s*(\\d+)%\\s*(,\\s*([0-9]*\\.?[0-9]+)\\s*)?$/.exec(d))return this.r=Math.min(100,parseInt(c[1],10))/100,this.g=Math.min(100,parseInt(c[2],10))/100,this.b=Math.min(100,parseInt(c[3],10))/100,b(c[5]),this;break;case \"hsl\":case \"hsla\":if(c=/^([0-9]*\\.?[0-9]+)\\s*,\\s*(\\d+)%\\s*,\\s*(\\d+)%\\s*(,\\s*([0-9]*\\.?[0-9]+)\\s*)?$/.exec(d)){d=parseFloat(c[1])/\n360;var e=parseInt(c[2],10)/100,f=parseInt(c[3],10)/100;b(c[5]);return this.setHSL(d,e,f)}}}else if(c=/^#([A-Fa-f0-9]+)$/.exec(a)){c=c[1];d=c.length;if(3===d)return this.r=parseInt(c.charAt(0)+c.charAt(0),16)/255,this.g=parseInt(c.charAt(1)+c.charAt(1),16)/255,this.b=parseInt(c.charAt(2)+c.charAt(2),16)/255,this;if(6===d)return this.r=parseInt(c.charAt(0)+c.charAt(1),16)/255,this.g=parseInt(c.charAt(2)+c.charAt(3),16)/255,this.b=parseInt(c.charAt(4)+c.charAt(5),16)/255,this}a&&0<a.length&&(c=Tg[a],\nvoid 0!==c?this.setHex(c):console.warn(\"THREE.Color: Unknown color \"+a));return this},clone:function(){return new this.constructor(this.r,this.g,this.b)},copy:function(a){this.r=a.r;this.g=a.g;this.b=a.b;return this},copyGammaToLinear:function(a,b){void 0===b&&(b=2);this.r=Math.pow(a.r,b);this.g=Math.pow(a.g,b);this.b=Math.pow(a.b,b);return this},copyLinearToGamma:function(a,b){void 0===b&&(b=2);b=0<b?1/b:1;this.r=Math.pow(a.r,b);this.g=Math.pow(a.g,b);this.b=Math.pow(a.b,b);return this},convertGammaToLinear:function(a){this.copyGammaToLinear(this,\na);return this},convertLinearToGamma:function(a){this.copyLinearToGamma(this,a);return this},copySRGBToLinear:function(){function a(a){return.04045>a?.0773993808*a:Math.pow(.9478672986*a+.0521327014,2.4)}return function(b){this.r=a(b.r);this.g=a(b.g);this.b=a(b.b);return this}}(),copyLinearToSRGB:function(){function a(a){return.0031308>a?12.92*a:1.055*Math.pow(a,.41666)-.055}return function(b){this.r=a(b.r);this.g=a(b.g);this.b=a(b.b);return this}}(),convertSRGBToLinear:function(){this.copySRGBToLinear(this);\nreturn this},convertLinearToSRGB:function(){this.copyLinearToSRGB(this);return this},getHex:function(){return 255*this.r<<16^255*this.g<<8^255*this.b<<0},getHexString:function(){return(\"000000\"+this.getHex().toString(16)).slice(-6)},getHSL:function(a){void 0===a&&(console.warn(\"THREE.Color: .getHSL() target is now required\"),a={h:0,s:0,l:0});var b=this.r,c=this.g,d=this.b,e=Math.max(b,c,d),f=Math.min(b,c,d),g,h=(f+e)/2;if(f===e)f=g=0;else{var k=e-f;f=.5>=h?k/(e+f):k/(2-e-f);switch(e){case b:g=(c-\nd)/k+(c<d?6:0);break;case c:g=(d-b)/k+2;break;case d:g=(b-c)/k+4}g/=6}a.h=g;a.s=f;a.l=h;return a},getStyle:function(){return\"rgb(\"+(255*this.r|0)+\",\"+(255*this.g|0)+\",\"+(255*this.b|0)+\")\"},offsetHSL:function(){var a={};return function(b,c,d){this.getHSL(a);a.h+=b;a.s+=c;a.l+=d;this.setHSL(a.h,a.s,a.l);return this}}(),add:function(a){this.r+=a.r;this.g+=a.g;this.b+=a.b;return this},addColors:function(a,b){this.r=a.r+b.r;this.g=a.g+b.g;this.b=a.b+b.b;return this},addScalar:function(a){this.r+=a;this.g+=\na;this.b+=a;return this},sub:function(a){this.r=Math.max(0,this.r-a.r);this.g=Math.max(0,this.g-a.g);this.b=Math.max(0,this.b-a.b);return this},multiply:function(a){this.r*=a.r;this.g*=a.g;this.b*=a.b;return this},multiplyScalar:function(a){this.r*=a;this.g*=a;this.b*=a;return this},lerp:function(a,b){this.r+=(a.r-this.r)*b;this.g+=(a.g-this.g)*b;this.b+=(a.b-this.b)*b;return this},equals:function(a){return a.r===this.r&&a.g===this.g&&a.b===this.b},fromArray:function(a,b){void 0===b&&(b=0);this.r=\na[b];this.g=a[b+1];this.b=a[b+2];return this},toArray:function(a,b){void 0===a&&(a=[]);void 0===b&&(b=0);a[b]=this.r;a[b+1]=this.g;a[b+2]=this.b;return a},toJSON:function(){return this.getHex()}});var K={common:{diffuse:{value:new G(15658734)},opacity:{value:1},map:{value:null},uvTransform:{value:new ra},alphaMap:{value:null}},specularmap:{specularMap:{value:null}},envmap:{envMap:{value:null},flipEnvMap:{value:-1},reflectivity:{value:1},refractionRatio:{value:.98},maxMipLevel:{value:0}},aomap:{aoMap:{value:null},\naoMapIntensity:{value:1}},lightmap:{lightMap:{value:null},lightMapIntensity:{value:1}},emissivemap:{emissiveMap:{value:null}},bumpmap:{bumpMap:{value:null},bumpScale:{value:1}},normalmap:{normalMap:{value:null},normalScale:{value:new z(1,1)}},displacementmap:{displacementMap:{value:null},displacementScale:{value:1},displacementBias:{value:0}},roughnessmap:{roughnessMap:{value:null}},metalnessmap:{metalnessMap:{value:null}},gradientmap:{gradientMap:{value:null}},fog:{fogDensity:{value:2.5E-4},fogNear:{value:1},\nfogFar:{value:2E3},fogColor:{value:new G(16777215)}},lights:{ambientLightColor:{value:[]},directionalLights:{value:[],properties:{direction:{},color:{},shadow:{},shadowBias:{},shadowRadius:{},shadowMapSize:{}}},directionalShadowMap:{value:[]},directionalShadowMatrix:{value:[]},spotLights:{value:[],properties:{color:{},position:{},direction:{},distance:{},coneCos:{},penumbraCos:{},decay:{},shadow:{},shadowBias:{},shadowRadius:{},shadowMapSize:{}}},spotShadowMap:{value:[]},spotShadowMatrix:{value:[]},\npointLights:{value:[],properties:{color:{},position:{},decay:{},distance:{},shadow:{},shadowBias:{},shadowRadius:{},shadowMapSize:{},shadowCameraNear:{},shadowCameraFar:{}}},pointShadowMap:{value:[]},pointShadowMatrix:{value:[]},hemisphereLights:{value:[],properties:{direction:{},skyColor:{},groundColor:{}}},rectAreaLights:{value:[],properties:{color:{},position:{},width:{},height:{}}}},points:{diffuse:{value:new G(15658734)},opacity:{value:1},size:{value:1},scale:{value:1},map:{value:null},uvTransform:{value:new ra}},\nsprite:{diffuse:{value:new G(15658734)},opacity:{value:1},center:{value:new z(.5,.5)},rotation:{value:0},map:{value:null},uvTransform:{value:new ra}}},nb={basic:{uniforms:Aa.merge([K.common,K.specularmap,K.envmap,K.aomap,K.lightmap,K.fog]),vertexShader:S.meshbasic_vert,fragmentShader:S.meshbasic_frag},lambert:{uniforms:Aa.merge([K.common,K.specularmap,K.envmap,K.aomap,K.lightmap,K.emissivemap,K.fog,K.lights,{emissive:{value:new G(0)}}]),vertexShader:S.meshlambert_vert,fragmentShader:S.meshlambert_frag},\nphong:{uniforms:Aa.merge([K.common,K.specularmap,K.envmap,K.aomap,K.lightmap,K.emissivemap,K.bumpmap,K.normalmap,K.displacementmap,K.gradientmap,K.fog,K.lights,{emissive:{value:new G(0)},specular:{value:new G(1118481)},shininess:{value:30}}]),vertexShader:S.meshphong_vert,fragmentShader:S.meshphong_frag},standard:{uniforms:Aa.merge([K.common,K.envmap,K.aomap,K.lightmap,K.emissivemap,K.bumpmap,K.normalmap,K.displacementmap,K.roughnessmap,K.metalnessmap,K.fog,K.lights,{emissive:{value:new G(0)},roughness:{value:.5},\nmetalness:{value:.5},envMapIntensity:{value:1}}]),vertexShader:S.meshphysical_vert,fragmentShader:S.meshphysical_frag},points:{uniforms:Aa.merge([K.points,K.fog]),vertexShader:S.points_vert,fragmentShader:S.points_frag},dashed:{uniforms:Aa.merge([K.common,K.fog,{scale:{value:1},dashSize:{value:1},totalSize:{value:2}}]),vertexShader:S.linedashed_vert,fragmentShader:S.linedashed_frag},depth:{uniforms:Aa.merge([K.common,K.displacementmap]),vertexShader:S.depth_vert,fragmentShader:S.depth_frag},normal:{uniforms:Aa.merge([K.common,\nK.bumpmap,K.normalmap,K.displacementmap,{opacity:{value:1}}]),vertexShader:S.normal_vert,fragmentShader:S.normal_frag},sprite:{uniforms:Aa.merge([K.sprite,K.fog]),vertexShader:S.sprite_vert,fragmentShader:S.sprite_frag},cube:{uniforms:{tCube:{value:null},tFlip:{value:-1},opacity:{value:1}},vertexShader:S.cube_vert,fragmentShader:S.cube_frag},equirect:{uniforms:{tEquirect:{value:null}},vertexShader:S.equirect_vert,fragmentShader:S.equirect_frag},distanceRGBA:{uniforms:Aa.merge([K.common,K.displacementmap,\n{referencePosition:{value:new p},nearDistance:{value:1},farDistance:{value:1E3}}]),vertexShader:S.distanceRGBA_vert,fragmentShader:S.distanceRGBA_frag},shadow:{uniforms:Aa.merge([K.lights,K.fog,{color:{value:new G(0)},opacity:{value:1}}]),vertexShader:S.shadow_vert,fragmentShader:S.shadow_frag}};nb.physical={uniforms:Aa.merge([nb.standard.uniforms,{clearCoat:{value:0},clearCoatRoughness:{value:0}}]),vertexShader:S.meshphysical_vert,fragmentShader:S.meshphysical_frag};hb.RotationOrders=\"XYZ YZX ZXY XZY YXZ ZYX\".split(\" \");\nhb.DefaultOrder=\"XYZ\";Object.defineProperties(hb.prototype,{x:{get:function(){return this._x},set:function(a){this._x=a;this.onChangeCallback()}},y:{get:function(){return this._y},set:function(a){this._y=a;this.onChangeCallback()}},z:{get:function(){return this._z},set:function(a){this._z=a;this.onChangeCallback()}},order:{get:function(){return this._order},set:function(a){this._order=a;this.onChangeCallback()}}});Object.assign(hb.prototype,{isEuler:!0,set:function(a,b,c,d){this._x=a;this._y=b;this._z=\nc;this._order=d||this._order;this.onChangeCallback();return this},clone:function(){return new this.constructor(this._x,this._y,this._z,this._order)},copy:function(a){this._x=a._x;this._y=a._y;this._z=a._z;this._order=a._order;this.onChangeCallback();return this},setFromRotationMatrix:function(a,b,c){var d=H.clamp,e=a.elements;a=e[0];var f=e[4],g=e[8],h=e[1],k=e[5],m=e[9],l=e[2],n=e[6];e=e[10];b=b||this._order;\"XYZ\"===b?(this._y=Math.asin(d(g,-1,1)),.99999>Math.abs(g)?(this._x=Math.atan2(-m,e),this._z=\nMath.atan2(-f,a)):(this._x=Math.atan2(n,k),this._z=0)):\"YXZ\"===b?(this._x=Math.asin(-d(m,-1,1)),.99999>Math.abs(m)?(this._y=Math.atan2(g,e),this._z=Math.atan2(h,k)):(this._y=Math.atan2(-l,a),this._z=0)):\"ZXY\"===b?(this._x=Math.asin(d(n,-1,1)),.99999>Math.abs(n)?(this._y=Math.atan2(-l,e),this._z=Math.atan2(-f,k)):(this._y=0,this._z=Math.atan2(h,a))):\"ZYX\"===b?(this._y=Math.asin(-d(l,-1,1)),.99999>Math.abs(l)?(this._x=Math.atan2(n,e),this._z=Math.atan2(h,a)):(this._x=0,this._z=Math.atan2(-f,k))):\"YZX\"===\nb?(this._z=Math.asin(d(h,-1,1)),.99999>Math.abs(h)?(this._x=Math.atan2(-m,k),this._y=Math.atan2(-l,a)):(this._x=0,this._y=Math.atan2(g,e))):\"XZY\"===b?(this._z=Math.asin(-d(f,-1,1)),.99999>Math.abs(f)?(this._x=Math.atan2(n,k),this._y=Math.atan2(g,a)):(this._x=Math.atan2(-m,e),this._y=0)):console.warn(\"THREE.Euler: .setFromRotationMatrix() given unsupported order: \"+b);this._order=b;if(!1!==c)this.onChangeCallback();return this},setFromQuaternion:function(){var a=new I;return function(b,c,d){a.makeRotationFromQuaternion(b);\nreturn this.setFromRotationMatrix(a,c,d)}}(),setFromVector3:function(a,b){return this.set(a.x,a.y,a.z,b||this._order)},reorder:function(){var a=new fa;return function(b){a.setFromEuler(this);return this.setFromQuaternion(a,b)}}(),equals:function(a){return a._x===this._x&&a._y===this._y&&a._z===this._z&&a._order===this._order},fromArray:function(a){this._x=a[0];this._y=a[1];this._z=a[2];void 0!==a[3]&&(this._order=a[3]);this.onChangeCallback();return this},toArray:function(a,b){void 0===a&&(a=[]);\nvoid 0===b&&(b=0);a[b]=this._x;a[b+1]=this._y;a[b+2]=this._z;a[b+3]=this._order;return a},toVector3:function(a){return a?a.set(this._x,this._y,this._z):new p(this._x,this._y,this._z)},onChange:function(a){this.onChangeCallback=a;return this},onChangeCallback:function(){}});Object.assign(Rd.prototype,{set:function(a){this.mask=1<<a|0},enable:function(a){this.mask=this.mask|1<<a|0},toggle:function(a){this.mask^=1<<a|0},disable:function(a){this.mask&=~(1<<a|0)},test:function(a){return 0!==(this.mask&\na.mask)}});var Gf=0;D.DefaultUp=new p(0,1,0);D.DefaultMatrixAutoUpdate=!0;D.prototype=Object.assign(Object.create(ya.prototype),{constructor:D,isObject3D:!0,onBeforeRender:function(){},onAfterRender:function(){},applyMatrix:function(a){this.matrix.multiplyMatrices(a,this.matrix);this.matrix.decompose(this.position,this.quaternion,this.scale)},applyQuaternion:function(a){this.quaternion.premultiply(a);return this},setRotationFromAxisAngle:function(a,b){this.quaternion.setFromAxisAngle(a,b)},setRotationFromEuler:function(a){this.quaternion.setFromEuler(a,\n!0)},setRotationFromMatrix:function(a){this.quaternion.setFromRotationMatrix(a)},setRotationFromQuaternion:function(a){this.quaternion.copy(a)},rotateOnAxis:function(){var a=new fa;return function(b,c){a.setFromAxisAngle(b,c);this.quaternion.multiply(a);return this}}(),rotateOnWorldAxis:function(){var a=new fa;return function(b,c){a.setFromAxisAngle(b,c);this.quaternion.premultiply(a);return this}}(),rotateX:function(){var a=new p(1,0,0);return function(b){return this.rotateOnAxis(a,b)}}(),rotateY:function(){var a=\nnew p(0,1,0);return function(b){return this.rotateOnAxis(a,b)}}(),rotateZ:function(){var a=new p(0,0,1);return function(b){return this.rotateOnAxis(a,b)}}(),translateOnAxis:function(){var a=new p;return function(b,c){a.copy(b).applyQuaternion(this.quaternion);this.position.add(a.multiplyScalar(c));return this}}(),translateX:function(){var a=new p(1,0,0);return function(b){return this.translateOnAxis(a,b)}}(),translateY:function(){var a=new p(0,1,0);return function(b){return this.translateOnAxis(a,\nb)}}(),translateZ:function(){var a=new p(0,0,1);return function(b){return this.translateOnAxis(a,b)}}(),localToWorld:function(a){return a.applyMatrix4(this.matrixWorld)},worldToLocal:function(){var a=new I;return function(b){return b.applyMatrix4(a.getInverse(this.matrixWorld))}}(),lookAt:function(){var a=new I,b=new p;return function(c,d,e){c.isVector3?b.copy(c):b.set(c,d,e);this.isCamera?a.lookAt(this.position,b,this.up):a.lookAt(b,this.position,this.up);this.quaternion.setFromRotationMatrix(a)}}(),\nadd:function(a){if(1<arguments.length){for(var b=0;b<arguments.length;b++)this.add(arguments[b]);return this}if(a===this)return console.error(\"THREE.Object3D.add: object can't be added as a child of itself.\",a),this;a&&a.isObject3D?(null!==a.parent&&a.parent.remove(a),a.parent=this,a.dispatchEvent({type:\"added\"}),this.children.push(a)):console.error(\"THREE.Object3D.add: object not an instance of THREE.Object3D.\",a);return this},remove:function(a){if(1<arguments.length){for(var b=0;b<arguments.length;b++)this.remove(arguments[b]);\nreturn this}b=this.children.indexOf(a);-1!==b&&(a.parent=null,a.dispatchEvent({type:\"removed\"}),this.children.splice(b,1));return this},getObjectById:function(a){return this.getObjectByProperty(\"id\",a)},getObjectByName:function(a){return this.getObjectByProperty(\"name\",a)},getObjectByProperty:function(a,b){if(this[a]===b)return this;for(var c=0,d=this.children.length;c<d;c++){var e=this.children[c].getObjectByProperty(a,b);if(void 0!==e)return e}},getWorldPosition:function(a){void 0===a&&(console.warn(\"THREE.Object3D: .getWorldPosition() target is now required\"),\na=new p);this.updateMatrixWorld(!0);return a.setFromMatrixPosition(this.matrixWorld)},getWorldQuaternion:function(){var a=new p,b=new p;return function(c){void 0===c&&(console.warn(\"THREE.Object3D: .getWorldQuaternion() target is now required\"),c=new fa);this.updateMatrixWorld(!0);this.matrixWorld.decompose(a,c,b);return c}}(),getWorldScale:function(){var a=new p,b=new fa;return function(c){void 0===c&&(console.warn(\"THREE.Object3D: .getWorldScale() target is now required\"),c=new p);this.updateMatrixWorld(!0);\nthis.matrixWorld.decompose(a,b,c);return c}}(),getWorldDirection:function(){var a=new fa;return function(b){void 0===b&&(console.warn(\"THREE.Object3D: .getWorldDirection() target is now required\"),b=new p);this.getWorldQuaternion(a);return b.set(0,0,1).applyQuaternion(a)}}(),raycast:function(){},traverse:function(a){a(this);for(var b=this.children,c=0,d=b.length;c<d;c++)b[c].traverse(a)},traverseVisible:function(a){if(!1!==this.visible){a(this);for(var b=this.children,c=0,d=b.length;c<d;c++)b[c].traverseVisible(a)}},\ntraverseAncestors:function(a){var b=this.parent;null!==b&&(a(b),b.traverseAncestors(a))},updateMatrix:function(){this.matrix.compose(this.position,this.quaternion,this.scale);this.matrixWorldNeedsUpdate=!0},updateMatrixWorld:function(a){this.matrixAutoUpdate&&this.updateMatrix();if(this.matrixWorldNeedsUpdate||a)null===this.parent?this.matrixWorld.copy(this.matrix):this.matrixWorld.multiplyMatrices(this.parent.matrixWorld,this.matrix),this.matrixWorldNeedsUpdate=!1,a=!0;for(var b=this.children,c=\n0,d=b.length;c<d;c++)b[c].updateMatrixWorld(a)},toJSON:function(a){function b(b,c){void 0===b[c.uuid]&&(b[c.uuid]=c.toJSON(a));return c.uuid}function c(a){var b=[],c;for(c in a){var d=a[c];delete d.metadata;b.push(d)}return b}var d=void 0===a||\"string\"===typeof a,e={};d&&(a={geometries:{},materials:{},textures:{},images:{},shapes:{}},e.metadata={version:4.5,type:\"Object\",generator:\"Object3D.toJSON\"});var f={};f.uuid=this.uuid;f.type=this.type;\"\"!==this.name&&(f.name=this.name);!0===this.castShadow&&\n(f.castShadow=!0);!0===this.receiveShadow&&(f.receiveShadow=!0);!1===this.visible&&(f.visible=!1);!1===this.frustumCulled&&(f.frustumCulled=!1);0!==this.renderOrder&&(f.renderOrder=this.renderOrder);\"{}\"!==JSON.stringify(this.userData)&&(f.userData=this.userData);f.layers=this.layers.mask;f.matrix=this.matrix.toArray();!1===this.matrixAutoUpdate&&(f.matrixAutoUpdate=!1);if(this.isMesh||this.isLine||this.isPoints){f.geometry=b(a.geometries,this.geometry);var g=this.geometry.parameters;if(void 0!==\ng&&void 0!==g.shapes)if(g=g.shapes,Array.isArray(g))for(var h=0,k=g.length;h<k;h++)b(a.shapes,g[h]);else b(a.shapes,g)}if(void 0!==this.material)if(Array.isArray(this.material)){g=[];h=0;for(k=this.material.length;h<k;h++)g.push(b(a.materials,this.material[h]));f.material=g}else f.material=b(a.materials,this.material);if(0<this.children.length)for(f.children=[],h=0;h<this.children.length;h++)f.children.push(this.children[h].toJSON(a).object);if(d){d=c(a.geometries);h=c(a.materials);k=c(a.textures);\nvar m=c(a.images);g=c(a.shapes);0<d.length&&(e.geometries=d);0<h.length&&(e.materials=h);0<k.length&&(e.textures=k);0<m.length&&(e.images=m);0<g.length&&(e.shapes=g)}e.object=f;return e},clone:function(a){return(new this.constructor).copy(this,a)},copy:function(a,b){void 0===b&&(b=!0);this.name=a.name;this.up.copy(a.up);this.position.copy(a.position);this.quaternion.copy(a.quaternion);this.scale.copy(a.scale);this.matrix.copy(a.matrix);this.matrixWorld.copy(a.matrixWorld);this.matrixAutoUpdate=a.matrixAutoUpdate;\nthis.matrixWorldNeedsUpdate=a.matrixWorldNeedsUpdate;this.layers.mask=a.layers.mask;this.visible=a.visible;this.castShadow=a.castShadow;this.receiveShadow=a.receiveShadow;this.frustumCulled=a.frustumCulled;this.renderOrder=a.renderOrder;this.userData=JSON.parse(JSON.stringify(a.userData));if(!0===b)for(b=0;b<a.children.length;b++)this.add(a.children[b].clone());return this}});Na.prototype=Object.assign(Object.create(D.prototype),{constructor:Na,isCamera:!0,copy:function(a,b){D.prototype.copy.call(this,\na,b);this.matrixWorldInverse.copy(a.matrixWorldInverse);this.projectionMatrix.copy(a.projectionMatrix);return this},getWorldDirection:function(){var a=new fa;return function(b){void 0===b&&(console.warn(\"THREE.Camera: .getWorldDirection() target is now required\"),b=new p);this.getWorldQuaternion(a);return b.set(0,0,-1).applyQuaternion(a)}}(),updateMatrixWorld:function(a){D.prototype.updateMatrixWorld.call(this,a);this.matrixWorldInverse.getInverse(this.matrixWorld)},clone:function(){return(new this.constructor).copy(this)}});\nHb.prototype=Object.assign(Object.create(Na.prototype),{constructor:Hb,isOrthographicCamera:!0,copy:function(a,b){Na.prototype.copy.call(this,a,b);this.left=a.left;this.right=a.right;this.top=a.top;this.bottom=a.bottom;this.near=a.near;this.far=a.far;this.zoom=a.zoom;this.view=null===a.view?null:Object.assign({},a.view);return this},setViewOffset:function(a,b,c,d,e,f){null===this.view&&(this.view={enabled:!0,fullWidth:1,fullHeight:1,offsetX:0,offsetY:0,width:1,height:1});this.view.enabled=!0;this.view.fullWidth=\na;this.view.fullHeight=b;this.view.offsetX=c;this.view.offsetY=d;this.view.width=e;this.view.height=f;this.updateProjectionMatrix()},clearViewOffset:function(){null!==this.view&&(this.view.enabled=!1);this.updateProjectionMatrix()},updateProjectionMatrix:function(){var a=(this.right-this.left)/(2*this.zoom),b=(this.top-this.bottom)/(2*this.zoom),c=(this.right+this.left)/2,d=(this.top+this.bottom)/2,e=c-a;c+=a;a=d+b;b=d-b;if(null!==this.view&&this.view.enabled){c=this.zoom/(this.view.width/this.view.fullWidth);\nb=this.zoom/(this.view.height/this.view.fullHeight);var f=(this.right-this.left)/this.view.width;d=(this.top-this.bottom)/this.view.height;e+=this.view.offsetX/c*f;c=e+this.view.width/c*f;a-=this.view.offsetY/b*d;b=a-this.view.height/b*d}this.projectionMatrix.makeOrthographic(e,c,a,b,this.near,this.far)},toJSON:function(a){a=D.prototype.toJSON.call(this,a);a.object.zoom=this.zoom;a.object.left=this.left;a.object.right=this.right;a.object.top=this.top;a.object.bottom=this.bottom;a.object.near=this.near;\na.object.far=this.far;null!==this.view&&(a.object.view=Object.assign({},this.view));return a}});Object.assign(Ta.prototype,{clone:function(){return(new this.constructor).copy(this)},copy:function(a){this.a=a.a;this.b=a.b;this.c=a.c;this.normal.copy(a.normal);this.color.copy(a.color);this.materialIndex=a.materialIndex;for(var b=0,c=a.vertexNormals.length;b<c;b++)this.vertexNormals[b]=a.vertexNormals[b].clone();b=0;for(c=a.vertexColors.length;b<c;b++)this.vertexColors[b]=a.vertexColors[b].clone();return this}});\nvar Hf=0;R.prototype=Object.assign(Object.create(ya.prototype),{constructor:R,isGeometry:!0,applyMatrix:function(a){for(var b=(new ra).getNormalMatrix(a),c=0,d=this.vertices.length;c<d;c++)this.vertices[c].applyMatrix4(a);c=0;for(d=this.faces.length;c<d;c++){a=this.faces[c];a.normal.applyMatrix3(b).normalize();for(var e=0,f=a.vertexNormals.length;e<f;e++)a.vertexNormals[e].applyMatrix3(b).normalize()}null!==this.boundingBox&&this.computeBoundingBox();null!==this.boundingSphere&&this.computeBoundingSphere();\nthis.normalsNeedUpdate=this.verticesNeedUpdate=!0;return this},rotateX:function(){var a=new I;return function(b){a.makeRotationX(b);this.applyMatrix(a);return this}}(),rotateY:function(){var a=new I;return function(b){a.makeRotationY(b);this.applyMatrix(a);return this}}(),rotateZ:function(){var a=new I;return function(b){a.makeRotationZ(b);this.applyMatrix(a);return this}}(),translate:function(){var a=new I;return function(b,c,d){a.makeTranslation(b,c,d);this.applyMatrix(a);return this}}(),scale:function(){var a=\nnew I;return function(b,c,d){a.makeScale(b,c,d);this.applyMatrix(a);return this}}(),lookAt:function(){var a=new D;return function(b){a.lookAt(b);a.updateMatrix();this.applyMatrix(a.matrix)}}(),fromBufferGeometry:function(a){function b(a,b,d,e){var f=void 0!==g?[l[a].clone(),l[b].clone(),l[d].clone()]:[],q=void 0!==h?[c.colors[a].clone(),c.colors[b].clone(),c.colors[d].clone()]:[];e=new Ta(a,b,d,f,q,e);c.faces.push(e);void 0!==k&&c.faceVertexUvs[0].push([n[a].clone(),n[b].clone(),n[d].clone()]);void 0!==\nm&&c.faceVertexUvs[1].push([t[a].clone(),t[b].clone(),t[d].clone()])}var c=this,d=null!==a.index?a.index.array:void 0,e=a.attributes,f=e.position.array,g=void 0!==e.normal?e.normal.array:void 0,h=void 0!==e.color?e.color.array:void 0,k=void 0!==e.uv?e.uv.array:void 0,m=void 0!==e.uv2?e.uv2.array:void 0;void 0!==m&&(this.faceVertexUvs[1]=[]);for(var l=[],n=[],t=[],u=e=0;e<f.length;e+=3,u+=2)c.vertices.push(new p(f[e],f[e+1],f[e+2])),void 0!==g&&l.push(new p(g[e],g[e+1],g[e+2])),void 0!==h&&c.colors.push(new G(h[e],\nh[e+1],h[e+2])),void 0!==k&&n.push(new z(k[u],k[u+1])),void 0!==m&&t.push(new z(m[u],m[u+1]));var r=a.groups;if(0<r.length)for(e=0;e<r.length;e++){f=r[e];var v=f.start,y=f.count;u=v;for(v+=y;u<v;u+=3)void 0!==d?b(d[u],d[u+1],d[u+2],f.materialIndex):b(u,u+1,u+2,f.materialIndex)}else if(void 0!==d)for(e=0;e<d.length;e+=3)b(d[e],d[e+1],d[e+2]);else for(e=0;e<f.length/3;e+=3)b(e,e+1,e+2);this.computeFaceNormals();null!==a.boundingBox&&(this.boundingBox=a.boundingBox.clone());null!==a.boundingSphere&&\n(this.boundingSphere=a.boundingSphere.clone());return this},center:function(){var a=new p;return function(){this.computeBoundingBox();this.boundingBox.getCenter(a).negate();this.translate(a.x,a.y,a.z);return this}}(),normalize:function(){this.computeBoundingSphere();var a=this.boundingSphere.center,b=this.boundingSphere.radius;b=0===b?1:1/b;var c=new I;c.set(b,0,0,-b*a.x,0,b,0,-b*a.y,0,0,b,-b*a.z,0,0,0,1);this.applyMatrix(c);return this},computeFaceNormals:function(){for(var a=new p,b=new p,c=0,d=\nthis.faces.length;c<d;c++){var e=this.faces[c],f=this.vertices[e.a],g=this.vertices[e.b];a.subVectors(this.vertices[e.c],g);b.subVectors(f,g);a.cross(b);a.normalize();e.normal.copy(a)}},computeVertexNormals:function(a){void 0===a&&(a=!0);var b;var c=Array(this.vertices.length);var d=0;for(b=this.vertices.length;d<b;d++)c[d]=new p;if(a){var e=new p,f=new p;a=0;for(d=this.faces.length;a<d;a++){b=this.faces[a];var g=this.vertices[b.a];var h=this.vertices[b.b];var k=this.vertices[b.c];e.subVectors(k,\nh);f.subVectors(g,h);e.cross(f);c[b.a].add(e);c[b.b].add(e);c[b.c].add(e)}}else for(this.computeFaceNormals(),a=0,d=this.faces.length;a<d;a++)b=this.faces[a],c[b.a].add(b.normal),c[b.b].add(b.normal),c[b.c].add(b.normal);d=0;for(b=this.vertices.length;d<b;d++)c[d].normalize();a=0;for(d=this.faces.length;a<d;a++)b=this.faces[a],g=b.vertexNormals,3===g.length?(g[0].copy(c[b.a]),g[1].copy(c[b.b]),g[2].copy(c[b.c])):(g[0]=c[b.a].clone(),g[1]=c[b.b].clone(),g[2]=c[b.c].clone());0<this.faces.length&&(this.normalsNeedUpdate=\n!0)},computeFlatVertexNormals:function(){var a;this.computeFaceNormals();var b=0;for(a=this.faces.length;b<a;b++){var c=this.faces[b];var d=c.vertexNormals;3===d.length?(d[0].copy(c.normal),d[1].copy(c.normal),d[2].copy(c.normal)):(d[0]=c.normal.clone(),d[1]=c.normal.clone(),d[2]=c.normal.clone())}0<this.faces.length&&(this.normalsNeedUpdate=!0)},computeMorphNormals:function(){var a,b;var c=0;for(b=this.faces.length;c<b;c++){var d=this.faces[c];d.__originalFaceNormal?d.__originalFaceNormal.copy(d.normal):\nd.__originalFaceNormal=d.normal.clone();d.__originalVertexNormals||(d.__originalVertexNormals=[]);var e=0;for(a=d.vertexNormals.length;e<a;e++)d.__originalVertexNormals[e]?d.__originalVertexNormals[e].copy(d.vertexNormals[e]):d.__originalVertexNormals[e]=d.vertexNormals[e].clone()}var f=new R;f.faces=this.faces;e=0;for(a=this.morphTargets.length;e<a;e++){if(!this.morphNormals[e]){this.morphNormals[e]={};this.morphNormals[e].faceNormals=[];this.morphNormals[e].vertexNormals=[];d=this.morphNormals[e].faceNormals;\nvar g=this.morphNormals[e].vertexNormals;c=0;for(b=this.faces.length;c<b;c++){var h=new p;var k={a:new p,b:new p,c:new p};d.push(h);g.push(k)}}g=this.morphNormals[e];f.vertices=this.morphTargets[e].vertices;f.computeFaceNormals();f.computeVertexNormals();c=0;for(b=this.faces.length;c<b;c++)d=this.faces[c],h=g.faceNormals[c],k=g.vertexNormals[c],h.copy(d.normal),k.a.copy(d.vertexNormals[0]),k.b.copy(d.vertexNormals[1]),k.c.copy(d.vertexNormals[2])}c=0;for(b=this.faces.length;c<b;c++)d=this.faces[c],\nd.normal=d.__originalFaceNormal,d.vertexNormals=d.__originalVertexNormals},computeBoundingBox:function(){null===this.boundingBox&&(this.boundingBox=new Sa);this.boundingBox.setFromPoints(this.vertices)},computeBoundingSphere:function(){null===this.boundingSphere&&(this.boundingSphere=new Da);this.boundingSphere.setFromPoints(this.vertices)},merge:function(a,b,c){if(a&&a.isGeometry){var d,e=this.vertices.length,f=this.vertices,g=a.vertices,h=this.faces,k=a.faces,m=this.faceVertexUvs[0],l=a.faceVertexUvs[0],\nn=this.colors,t=a.colors;void 0===c&&(c=0);void 0!==b&&(d=(new ra).getNormalMatrix(b));a=0;for(var p=g.length;a<p;a++){var r=g[a].clone();void 0!==b&&r.applyMatrix4(b);f.push(r)}a=0;for(p=t.length;a<p;a++)n.push(t[a].clone());a=0;for(p=k.length;a<p;a++){g=k[a];var v=g.vertexNormals;t=g.vertexColors;n=new Ta(g.a+e,g.b+e,g.c+e);n.normal.copy(g.normal);void 0!==d&&n.normal.applyMatrix3(d).normalize();b=0;for(f=v.length;b<f;b++)r=v[b].clone(),void 0!==d&&r.applyMatrix3(d).normalize(),n.vertexNormals.push(r);\nn.color.copy(g.color);b=0;for(f=t.length;b<f;b++)r=t[b],n.vertexColors.push(r.clone());n.materialIndex=g.materialIndex+c;h.push(n)}a=0;for(p=l.length;a<p;a++)if(c=l[a],d=[],void 0!==c){b=0;for(f=c.length;b<f;b++)d.push(c[b].clone());m.push(d)}}else console.error(\"THREE.Geometry.merge(): geometry not an instance of THREE.Geometry.\",a)},mergeMesh:function(a){a&&a.isMesh?(a.matrixAutoUpdate&&a.updateMatrix(),this.merge(a.geometry,a.matrix)):console.error(\"THREE.Geometry.mergeMesh(): mesh not an instance of THREE.Mesh.\",\na)},mergeVertices:function(){var a={},b=[],c=[],d=Math.pow(10,4),e;var f=0;for(e=this.vertices.length;f<e;f++){var g=this.vertices[f];g=Math.round(g.x*d)+\"_\"+Math.round(g.y*d)+\"_\"+Math.round(g.z*d);void 0===a[g]?(a[g]=f,b.push(this.vertices[f]),c[f]=b.length-1):c[f]=c[a[g]]}a=[];f=0;for(e=this.faces.length;f<e;f++)for(d=this.faces[f],d.a=c[d.a],d.b=c[d.b],d.c=c[d.c],d=[d.a,d.b,d.c],g=0;3>g;g++)if(d[g]===d[(g+1)%3]){a.push(f);break}for(f=a.length-1;0<=f;f--)for(d=a[f],this.faces.splice(d,1),c=0,e=\nthis.faceVertexUvs.length;c<e;c++)this.faceVertexUvs[c].splice(d,1);f=this.vertices.length-b.length;this.vertices=b;return f},setFromPoints:function(a){this.vertices=[];for(var b=0,c=a.length;b<c;b++){var d=a[b];this.vertices.push(new p(d.x,d.y,d.z||0))}return this},sortFacesByMaterialIndex:function(){for(var a=this.faces,b=a.length,c=0;c<b;c++)a[c]._id=c;a.sort(function(a,b){return a.materialIndex-b.materialIndex});var d=this.faceVertexUvs[0],e=this.faceVertexUvs[1],f,g;d&&d.length===b&&(f=[]);e&&\ne.length===b&&(g=[]);for(c=0;c<b;c++){var h=a[c]._id;f&&f.push(d[h]);g&&g.push(e[h])}f&&(this.faceVertexUvs[0]=f);g&&(this.faceVertexUvs[1]=g)},toJSON:function(){function a(a,b,c){return c?a|1<<b:a&~(1<<b)}function b(a){var b=a.x.toString()+a.y.toString()+a.z.toString();if(void 0!==m[b])return m[b];m[b]=k.length/3;k.push(a.x,a.y,a.z);return m[b]}function c(a){var b=a.r.toString()+a.g.toString()+a.b.toString();if(void 0!==n[b])return n[b];n[b]=l.length;l.push(a.getHex());return n[b]}function d(a){var b=\na.x.toString()+a.y.toString();if(void 0!==p[b])return p[b];p[b]=t.length/2;t.push(a.x,a.y);return p[b]}var e={metadata:{version:4.5,type:\"Geometry\",generator:\"Geometry.toJSON\"}};e.uuid=this.uuid;e.type=this.type;\"\"!==this.name&&(e.name=this.name);if(void 0!==this.parameters){var f=this.parameters,g;for(g in f)void 0!==f[g]&&(e[g]=f[g]);return e}f=[];for(g=0;g<this.vertices.length;g++){var h=this.vertices[g];f.push(h.x,h.y,h.z)}h=[];var k=[],m={},l=[],n={},t=[],p={};for(g=0;g<this.faces.length;g++){var r=\nthis.faces[g],v=void 0!==this.faceVertexUvs[0][g],y=0<r.normal.length(),x=0<r.vertexNormals.length,w=1!==r.color.r||1!==r.color.g||1!==r.color.b,B=0<r.vertexColors.length,E=0;E=a(E,0,0);E=a(E,1,!0);E=a(E,2,!1);E=a(E,3,v);E=a(E,4,y);E=a(E,5,x);E=a(E,6,w);E=a(E,7,B);h.push(E);h.push(r.a,r.b,r.c);h.push(r.materialIndex);v&&(v=this.faceVertexUvs[0][g],h.push(d(v[0]),d(v[1]),d(v[2])));y&&h.push(b(r.normal));x&&(y=r.vertexNormals,h.push(b(y[0]),b(y[1]),b(y[2])));w&&h.push(c(r.color));B&&(r=r.vertexColors,\nh.push(c(r[0]),c(r[1]),c(r[2])))}e.data={};e.data.vertices=f;e.data.normals=k;0<l.length&&(e.data.colors=l);0<t.length&&(e.data.uvs=[t]);e.data.faces=h;return e},clone:function(){return(new R).copy(this)},copy:function(a){var b,c,d;this.vertices=[];this.colors=[];this.faces=[];this.faceVertexUvs=[[]];this.morphTargets=[];this.morphNormals=[];this.skinWeights=[];this.skinIndices=[];this.lineDistances=[];this.boundingSphere=this.boundingBox=null;this.name=a.name;var e=a.vertices;var f=0;for(b=e.length;f<\nb;f++)this.vertices.push(e[f].clone());e=a.colors;f=0;for(b=e.length;f<b;f++)this.colors.push(e[f].clone());e=a.faces;f=0;for(b=e.length;f<b;f++)this.faces.push(e[f].clone());f=0;for(b=a.faceVertexUvs.length;f<b;f++){var g=a.faceVertexUvs[f];void 0===this.faceVertexUvs[f]&&(this.faceVertexUvs[f]=[]);e=0;for(c=g.length;e<c;e++){var h=g[e],k=[];var m=0;for(d=h.length;m<d;m++)k.push(h[m].clone());this.faceVertexUvs[f].push(k)}}m=a.morphTargets;f=0;for(b=m.length;f<b;f++){d={};d.name=m[f].name;if(void 0!==\nm[f].vertices)for(d.vertices=[],e=0,c=m[f].vertices.length;e<c;e++)d.vertices.push(m[f].vertices[e].clone());if(void 0!==m[f].normals)for(d.normals=[],e=0,c=m[f].normals.length;e<c;e++)d.normals.push(m[f].normals[e].clone());this.morphTargets.push(d)}m=a.morphNormals;f=0;for(b=m.length;f<b;f++){d={};if(void 0!==m[f].vertexNormals)for(d.vertexNormals=[],e=0,c=m[f].vertexNormals.length;e<c;e++)g=m[f].vertexNormals[e],h={},h.a=g.a.clone(),h.b=g.b.clone(),h.c=g.c.clone(),d.vertexNormals.push(h);if(void 0!==\nm[f].faceNormals)for(d.faceNormals=[],e=0,c=m[f].faceNormals.length;e<c;e++)d.faceNormals.push(m[f].faceNormals[e].clone());this.morphNormals.push(d)}e=a.skinWeights;f=0;for(b=e.length;f<b;f++)this.skinWeights.push(e[f].clone());e=a.skinIndices;f=0;for(b=e.length;f<b;f++)this.skinIndices.push(e[f].clone());e=a.lineDistances;f=0;for(b=e.length;f<b;f++)this.lineDistances.push(e[f]);f=a.boundingBox;null!==f&&(this.boundingBox=f.clone());f=a.boundingSphere;null!==f&&(this.boundingSphere=f.clone());this.elementsNeedUpdate=\na.elementsNeedUpdate;this.verticesNeedUpdate=a.verticesNeedUpdate;this.uvsNeedUpdate=a.uvsNeedUpdate;this.normalsNeedUpdate=a.normalsNeedUpdate;this.colorsNeedUpdate=a.colorsNeedUpdate;this.lineDistancesNeedUpdate=a.lineDistancesNeedUpdate;this.groupsNeedUpdate=a.groupsNeedUpdate;return this},dispose:function(){this.dispatchEvent({type:\"dispose\"})}});Object.defineProperty(Q.prototype,\"needsUpdate\",{set:function(a){!0===a&&this.version++}});Object.assign(Q.prototype,{isBufferAttribute:!0,onUploadCallback:function(){},\nsetArray:function(a){if(Array.isArray(a))throw new TypeError(\"THREE.BufferAttribute: array should be a Typed Array.\");this.count=void 0!==a?a.length/this.itemSize:0;this.array=a;return this},setDynamic:function(a){this.dynamic=a;return this},copy:function(a){this.name=a.name;this.array=new a.array.constructor(a.array);this.itemSize=a.itemSize;this.count=a.count;this.normalized=a.normalized;this.dynamic=a.dynamic;return this},copyAt:function(a,b,c){a*=this.itemSize;c*=b.itemSize;for(var d=0,e=this.itemSize;d<\ne;d++)this.array[a+d]=b.array[c+d];return this},copyArray:function(a){this.array.set(a);return this},copyColorsArray:function(a){for(var b=this.array,c=0,d=0,e=a.length;d<e;d++){var f=a[d];void 0===f&&(console.warn(\"THREE.BufferAttribute.copyColorsArray(): color is undefined\",d),f=new G);b[c++]=f.r;b[c++]=f.g;b[c++]=f.b}return this},copyVector2sArray:function(a){for(var b=this.array,c=0,d=0,e=a.length;d<e;d++){var f=a[d];void 0===f&&(console.warn(\"THREE.BufferAttribute.copyVector2sArray(): vector is undefined\",\nd),f=new z);b[c++]=f.x;b[c++]=f.y}return this},copyVector3sArray:function(a){for(var b=this.array,c=0,d=0,e=a.length;d<e;d++){var f=a[d];void 0===f&&(console.warn(\"THREE.BufferAttribute.copyVector3sArray(): vector is undefined\",d),f=new p);b[c++]=f.x;b[c++]=f.y;b[c++]=f.z}return this},copyVector4sArray:function(a){for(var b=this.array,c=0,d=0,e=a.length;d<e;d++){var f=a[d];void 0===f&&(console.warn(\"THREE.BufferAttribute.copyVector4sArray(): vector is undefined\",d),f=new V);b[c++]=f.x;b[c++]=f.y;\nb[c++]=f.z;b[c++]=f.w}return this},set:function(a,b){void 0===b&&(b=0);this.array.set(a,b);return this},getX:function(a){return this.array[a*this.itemSize]},setX:function(a,b){this.array[a*this.itemSize]=b;return this},getY:function(a){return this.array[a*this.itemSize+1]},setY:function(a,b){this.array[a*this.itemSize+1]=b;return this},getZ:function(a){return this.array[a*this.itemSize+2]},setZ:function(a,b){this.array[a*this.itemSize+2]=b;return this},getW:function(a){return this.array[a*this.itemSize+\n3]},setW:function(a,b){this.array[a*this.itemSize+3]=b;return this},setXY:function(a,b,c){a*=this.itemSize;this.array[a+0]=b;this.array[a+1]=c;return this},setXYZ:function(a,b,c,d){a*=this.itemSize;this.array[a+0]=b;this.array[a+1]=c;this.array[a+2]=d;return this},setXYZW:function(a,b,c,d,e){a*=this.itemSize;this.array[a+0]=b;this.array[a+1]=c;this.array[a+2]=d;this.array[a+3]=e;return this},onUpload:function(a){this.onUploadCallback=a;return this},clone:function(){return(new this.constructor(this.array,\nthis.itemSize)).copy(this)}});oc.prototype=Object.create(Q.prototype);oc.prototype.constructor=oc;pc.prototype=Object.create(Q.prototype);pc.prototype.constructor=pc;qc.prototype=Object.create(Q.prototype);qc.prototype.constructor=qc;rc.prototype=Object.create(Q.prototype);rc.prototype.constructor=rc;ib.prototype=Object.create(Q.prototype);ib.prototype.constructor=ib;sc.prototype=Object.create(Q.prototype);sc.prototype.constructor=sc;jb.prototype=Object.create(Q.prototype);jb.prototype.constructor=\njb;A.prototype=Object.create(Q.prototype);A.prototype.constructor=A;tc.prototype=Object.create(Q.prototype);tc.prototype.constructor=tc;Object.assign(Ee.prototype,{computeGroups:function(a){var b=[],c=void 0;a=a.faces;for(var d=0;d<a.length;d++){var e=a[d];if(e.materialIndex!==c){c=e.materialIndex;void 0!==f&&(f.count=3*d-f.start,b.push(f));var f={start:3*d,materialIndex:c}}}void 0!==f&&(f.count=3*d-f.start,b.push(f));this.groups=b},fromGeometry:function(a){var b=a.faces,c=a.vertices,d=a.faceVertexUvs,\ne=d[0]&&0<d[0].length,f=d[1]&&0<d[1].length,g=a.morphTargets,h=g.length;if(0<h){var k=[];for(var m=0;m<h;m++)k[m]=[];this.morphTargets.position=k}var l=a.morphNormals,n=l.length;if(0<n){var t=[];for(m=0;m<n;m++)t[m]=[];this.morphTargets.normal=t}var p=a.skinIndices,r=a.skinWeights,v=p.length===c.length,y=r.length===c.length;0<c.length&&0===b.length&&console.error(\"THREE.DirectGeometry: Faceless geometries are not supported.\");for(m=0;m<b.length;m++){var x=b[m];this.vertices.push(c[x.a],c[x.b],c[x.c]);\nvar w=x.vertexNormals;3===w.length?this.normals.push(w[0],w[1],w[2]):(w=x.normal,this.normals.push(w,w,w));w=x.vertexColors;3===w.length?this.colors.push(w[0],w[1],w[2]):(w=x.color,this.colors.push(w,w,w));!0===e&&(w=d[0][m],void 0!==w?this.uvs.push(w[0],w[1],w[2]):(console.warn(\"THREE.DirectGeometry.fromGeometry(): Undefined vertexUv \",m),this.uvs.push(new z,new z,new z)));!0===f&&(w=d[1][m],void 0!==w?this.uvs2.push(w[0],w[1],w[2]):(console.warn(\"THREE.DirectGeometry.fromGeometry(): Undefined vertexUv2 \",\nm),this.uvs2.push(new z,new z,new z)));for(w=0;w<h;w++){var B=g[w].vertices;k[w].push(B[x.a],B[x.b],B[x.c])}for(w=0;w<n;w++)B=l[w].vertexNormals[m],t[w].push(B.a,B.b,B.c);v&&this.skinIndices.push(p[x.a],p[x.b],p[x.c]);y&&this.skinWeights.push(r[x.a],r[x.b],r[x.c])}this.computeGroups(a);this.verticesNeedUpdate=a.verticesNeedUpdate;this.normalsNeedUpdate=a.normalsNeedUpdate;this.colorsNeedUpdate=a.colorsNeedUpdate;this.uvsNeedUpdate=a.uvsNeedUpdate;this.groupsNeedUpdate=a.groupsNeedUpdate;return this}});\nvar If=1;C.prototype=Object.assign(Object.create(ya.prototype),{constructor:C,isBufferGeometry:!0,getIndex:function(){return this.index},setIndex:function(a){Array.isArray(a)?this.index=new (65535<Fe(a)?jb:ib)(a,1):this.index=a},addAttribute:function(a,b,c){if(!(b&&b.isBufferAttribute||b&&b.isInterleavedBufferAttribute))return console.warn(\"THREE.BufferGeometry: .addAttribute() now expects ( name, attribute ).\"),this.addAttribute(a,new Q(b,c));if(\"index\"===a)return console.warn(\"THREE.BufferGeometry.addAttribute: Use .setIndex() for index attribute.\"),\nthis.setIndex(b),this;this.attributes[a]=b;return this},getAttribute:function(a){return this.attributes[a]},removeAttribute:function(a){delete this.attributes[a];return this},addGroup:function(a,b,c){this.groups.push({start:a,count:b,materialIndex:void 0!==c?c:0})},clearGroups:function(){this.groups=[]},setDrawRange:function(a,b){this.drawRange.start=a;this.drawRange.count=b},applyMatrix:function(a){var b=this.attributes.position;void 0!==b&&(a.applyToBufferAttribute(b),b.needsUpdate=!0);b=this.attributes.normal;\nvoid 0!==b&&((new ra).getNormalMatrix(a).applyToBufferAttribute(b),b.needsUpdate=!0);null!==this.boundingBox&&this.computeBoundingBox();null!==this.boundingSphere&&this.computeBoundingSphere();return this},rotateX:function(){var a=new I;return function(b){a.makeRotationX(b);this.applyMatrix(a);return this}}(),rotateY:function(){var a=new I;return function(b){a.makeRotationY(b);this.applyMatrix(a);return this}}(),rotateZ:function(){var a=new I;return function(b){a.makeRotationZ(b);this.applyMatrix(a);\nreturn this}}(),translate:function(){var a=new I;return function(b,c,d){a.makeTranslation(b,c,d);this.applyMatrix(a);return this}}(),scale:function(){var a=new I;return function(b,c,d){a.makeScale(b,c,d);this.applyMatrix(a);return this}}(),lookAt:function(){var a=new D;return function(b){a.lookAt(b);a.updateMatrix();this.applyMatrix(a.matrix)}}(),center:function(){var a=new p;return function(){this.computeBoundingBox();this.boundingBox.getCenter(a).negate();this.translate(a.x,a.y,a.z);return this}}(),\nsetFromObject:function(a){var b=a.geometry;if(a.isPoints||a.isLine){a=new A(3*b.vertices.length,3);var c=new A(3*b.colors.length,3);this.addAttribute(\"position\",a.copyVector3sArray(b.vertices));this.addAttribute(\"color\",c.copyColorsArray(b.colors));b.lineDistances&&b.lineDistances.length===b.vertices.length&&(a=new A(b.lineDistances.length,1),this.addAttribute(\"lineDistance\",a.copyArray(b.lineDistances)));null!==b.boundingSphere&&(this.boundingSphere=b.boundingSphere.clone());null!==b.boundingBox&&\n(this.boundingBox=b.boundingBox.clone())}else a.isMesh&&b&&b.isGeometry&&this.fromGeometry(b);return this},setFromPoints:function(a){for(var b=[],c=0,d=a.length;c<d;c++){var e=a[c];b.push(e.x,e.y,e.z||0)}this.addAttribute(\"position\",new A(b,3));return this},updateFromObject:function(a){var b=a.geometry;if(a.isMesh){var c=b.__directGeometry;!0===b.elementsNeedUpdate&&(c=void 0,b.elementsNeedUpdate=!1);if(void 0===c)return this.fromGeometry(b);c.verticesNeedUpdate=b.verticesNeedUpdate;c.normalsNeedUpdate=\nb.normalsNeedUpdate;c.colorsNeedUpdate=b.colorsNeedUpdate;c.uvsNeedUpdate=b.uvsNeedUpdate;c.groupsNeedUpdate=b.groupsNeedUpdate;b.verticesNeedUpdate=!1;b.normalsNeedUpdate=!1;b.colorsNeedUpdate=!1;b.uvsNeedUpdate=!1;b.groupsNeedUpdate=!1;b=c}!0===b.verticesNeedUpdate&&(c=this.attributes.position,void 0!==c&&(c.copyVector3sArray(b.vertices),c.needsUpdate=!0),b.verticesNeedUpdate=!1);!0===b.normalsNeedUpdate&&(c=this.attributes.normal,void 0!==c&&(c.copyVector3sArray(b.normals),c.needsUpdate=!0),b.normalsNeedUpdate=\n!1);!0===b.colorsNeedUpdate&&(c=this.attributes.color,void 0!==c&&(c.copyColorsArray(b.colors),c.needsUpdate=!0),b.colorsNeedUpdate=!1);b.uvsNeedUpdate&&(c=this.attributes.uv,void 0!==c&&(c.copyVector2sArray(b.uvs),c.needsUpdate=!0),b.uvsNeedUpdate=!1);b.lineDistancesNeedUpdate&&(c=this.attributes.lineDistance,void 0!==c&&(c.copyArray(b.lineDistances),c.needsUpdate=!0),b.lineDistancesNeedUpdate=!1);b.groupsNeedUpdate&&(b.computeGroups(a.geometry),this.groups=b.groups,b.groupsNeedUpdate=!1);return this},\nfromGeometry:function(a){a.__directGeometry=(new Ee).fromGeometry(a);return this.fromDirectGeometry(a.__directGeometry)},fromDirectGeometry:function(a){var b=new Float32Array(3*a.vertices.length);this.addAttribute(\"position\",(new Q(b,3)).copyVector3sArray(a.vertices));0<a.normals.length&&(b=new Float32Array(3*a.normals.length),this.addAttribute(\"normal\",(new Q(b,3)).copyVector3sArray(a.normals)));0<a.colors.length&&(b=new Float32Array(3*a.colors.length),this.addAttribute(\"color\",(new Q(b,3)).copyColorsArray(a.colors)));\n0<a.uvs.length&&(b=new Float32Array(2*a.uvs.length),this.addAttribute(\"uv\",(new Q(b,2)).copyVector2sArray(a.uvs)));0<a.uvs2.length&&(b=new Float32Array(2*a.uvs2.length),this.addAttribute(\"uv2\",(new Q(b,2)).copyVector2sArray(a.uvs2)));this.groups=a.groups;for(var c in a.morphTargets){b=[];for(var d=a.morphTargets[c],e=0,f=d.length;e<f;e++){var g=d[e],h=new A(3*g.length,3);b.push(h.copyVector3sArray(g))}this.morphAttributes[c]=b}0<a.skinIndices.length&&(c=new A(4*a.skinIndices.length,4),this.addAttribute(\"skinIndex\",\nc.copyVector4sArray(a.skinIndices)));0<a.skinWeights.length&&(c=new A(4*a.skinWeights.length,4),this.addAttribute(\"skinWeight\",c.copyVector4sArray(a.skinWeights)));null!==a.boundingSphere&&(this.boundingSphere=a.boundingSphere.clone());null!==a.boundingBox&&(this.boundingBox=a.boundingBox.clone());return this},computeBoundingBox:function(){null===this.boundingBox&&(this.boundingBox=new Sa);var a=this.attributes.position;void 0!==a?this.boundingBox.setFromBufferAttribute(a):this.boundingBox.makeEmpty();\n(isNaN(this.boundingBox.min.x)||isNaN(this.boundingBox.min.y)||isNaN(this.boundingBox.min.z))&&console.error('THREE.BufferGeometry.computeBoundingBox: Computed min/max have NaN values. The \"position\" attribute is likely to have NaN values.',this)},computeBoundingSphere:function(){var a=new Sa,b=new p;return function(){null===this.boundingSphere&&(this.boundingSphere=new Da);var c=this.attributes.position;if(c){var d=this.boundingSphere.center;a.setFromBufferAttribute(c);a.getCenter(d);for(var e=0,\nf=0,g=c.count;f<g;f++)b.x=c.getX(f),b.y=c.getY(f),b.z=c.getZ(f),e=Math.max(e,d.distanceToSquared(b));this.boundingSphere.radius=Math.sqrt(e);isNaN(this.boundingSphere.radius)&&console.error('THREE.BufferGeometry.computeBoundingSphere(): Computed radius is NaN. The \"position\" attribute is likely to have NaN values.',this)}}}(),computeFaceNormals:function(){},computeVertexNormals:function(){var a=this.index,b=this.attributes,c=this.groups;if(b.position){var d=b.position.array;if(void 0===b.normal)this.addAttribute(\"normal\",\nnew Q(new Float32Array(d.length),3));else for(var e=b.normal.array,f=0,g=e.length;f<g;f++)e[f]=0;e=b.normal.array;var h=new p,k=new p,m=new p,l=new p,n=new p;if(a){a=a.array;0===c.length&&this.addGroup(0,a.length);for(var t=0,u=c.length;t<u;++t){f=c[t];g=f.start;var r=f.count;f=g;for(g+=r;f<g;f+=3){r=3*a[f+0];var v=3*a[f+1];var y=3*a[f+2];h.fromArray(d,r);k.fromArray(d,v);m.fromArray(d,y);l.subVectors(m,k);n.subVectors(h,k);l.cross(n);e[r]+=l.x;e[r+1]+=l.y;e[r+2]+=l.z;e[v]+=l.x;e[v+1]+=l.y;e[v+2]+=\nl.z;e[y]+=l.x;e[y+1]+=l.y;e[y+2]+=l.z}}}else for(f=0,g=d.length;f<g;f+=9)h.fromArray(d,f),k.fromArray(d,f+3),m.fromArray(d,f+6),l.subVectors(m,k),n.subVectors(h,k),l.cross(n),e[f]=l.x,e[f+1]=l.y,e[f+2]=l.z,e[f+3]=l.x,e[f+4]=l.y,e[f+5]=l.z,e[f+6]=l.x,e[f+7]=l.y,e[f+8]=l.z;this.normalizeNormals();b.normal.needsUpdate=!0}},merge:function(a,b){if(a&&a.isBufferGeometry){void 0===b&&(b=0,console.warn(\"THREE.BufferGeometry.merge(): Overwriting original geometry, starting at offset=0. Use BufferGeometryUtils.mergeBufferGeometries() for lossless merge.\"));\nvar c=this.attributes,d;for(d in c)if(void 0!==a.attributes[d]){var e=c[d].array,f=a.attributes[d],g=f.array,h=0;for(f=f.itemSize*b;h<g.length;h++,f++)e[f]=g[h]}return this}console.error(\"THREE.BufferGeometry.merge(): geometry not an instance of THREE.BufferGeometry.\",a)},normalizeNormals:function(){var a=new p;return function(){for(var b=this.attributes.normal,c=0,d=b.count;c<d;c++)a.x=b.getX(c),a.y=b.getY(c),a.z=b.getZ(c),a.normalize(),b.setXYZ(c,a.x,a.y,a.z)}}(),toNonIndexed:function(){if(null===\nthis.index)return console.warn(\"THREE.BufferGeometry.toNonIndexed(): Geometry is already non-indexed.\"),this;var a=new C,b=this.index.array,c=this.attributes,d;for(d in c){var e=c[d],f=e.array,g=e.itemSize,h=new f.constructor(b.length*g),k=0;e=0;for(var m=b.length;e<m;e++){var l=b[e]*g;for(var n=0;n<g;n++)h[k++]=f[l++]}a.addAttribute(d,new Q(h,g))}b=this.groups;e=0;for(m=b.length;e<m;e++)c=b[e],a.addGroup(c.start,c.count,c.materialIndex);return a},toJSON:function(){var a={metadata:{version:4.5,type:\"BufferGeometry\",\ngenerator:\"BufferGeometry.toJSON\"}};a.uuid=this.uuid;a.type=this.type;\"\"!==this.name&&(a.name=this.name);0<Object.keys(this.userData).length&&(a.userData=this.userData);if(void 0!==this.parameters){var b=this.parameters;for(e in b)void 0!==b[e]&&(a[e]=b[e]);return a}a.data={attributes:{}};var c=this.index;null!==c&&(b=Array.prototype.slice.call(c.array),a.data.index={type:c.array.constructor.name,array:b});c=this.attributes;for(e in c){var d=c[e];b=Array.prototype.slice.call(d.array);a.data.attributes[e]=\n{itemSize:d.itemSize,type:d.array.constructor.name,array:b,normalized:d.normalized}}var e=this.groups;0<e.length&&(a.data.groups=JSON.parse(JSON.stringify(e)));e=this.boundingSphere;null!==e&&(a.data.boundingSphere={center:e.center.toArray(),radius:e.radius});return a},clone:function(){return(new C).copy(this)},copy:function(a){var b;this.index=null;this.attributes={};this.morphAttributes={};this.groups=[];this.boundingSphere=this.boundingBox=null;this.name=a.name;var c=a.index;null!==c&&this.setIndex(c.clone());\nc=a.attributes;for(g in c)this.addAttribute(g,c[g].clone());var d=a.morphAttributes;for(g in d){var e=[],f=d[g];c=0;for(b=f.length;c<b;c++)e.push(f[c].clone());this.morphAttributes[g]=e}var g=a.groups;c=0;for(b=g.length;c<b;c++)d=g[c],this.addGroup(d.start,d.count,d.materialIndex);g=a.boundingBox;null!==g&&(this.boundingBox=g.clone());g=a.boundingSphere;null!==g&&(this.boundingSphere=g.clone());this.drawRange.start=a.drawRange.start;this.drawRange.count=a.drawRange.count;this.userData=a.userData;\nreturn this},dispose:function(){this.dispatchEvent({type:\"dispose\"})}});Ib.prototype=Object.create(R.prototype);Ib.prototype.constructor=Ib;kb.prototype=Object.create(C.prototype);kb.prototype.constructor=kb;uc.prototype=Object.create(R.prototype);uc.prototype.constructor=uc;lb.prototype=Object.create(C.prototype);lb.prototype.constructor=lb;var Kf=0;J.prototype=Object.assign(Object.create(ya.prototype),{constructor:J,isMaterial:!0,onBeforeCompile:function(){},setValues:function(a){if(void 0!==a)for(var b in a){var c=\na[b];if(void 0===c)console.warn(\"THREE.Material: '\"+b+\"' parameter is undefined.\");else if(\"shading\"===b)console.warn(\"THREE.\"+this.type+\": .shading has been removed. Use the boolean .flatShading instead.\"),this.flatShading=1===c?!0:!1;else{var d=this[b];void 0===d?console.warn(\"THREE.\"+this.type+\": '\"+b+\"' is not a property of this material.\"):d&&d.isColor?d.set(c):d&&d.isVector3&&c&&c.isVector3?d.copy(c):this[b]=\"overdraw\"===b?Number(c):c}}},toJSON:function(a){function b(a){var b=[],c;for(c in a){var d=\na[c];delete d.metadata;b.push(d)}return b}var c=void 0===a||\"string\"===typeof a;c&&(a={textures:{},images:{}});var d={metadata:{version:4.5,type:\"Material\",generator:\"Material.toJSON\"}};d.uuid=this.uuid;d.type=this.type;\"\"!==this.name&&(d.name=this.name);this.color&&this.color.isColor&&(d.color=this.color.getHex());void 0!==this.roughness&&(d.roughness=this.roughness);void 0!==this.metalness&&(d.metalness=this.metalness);this.emissive&&this.emissive.isColor&&(d.emissive=this.emissive.getHex());1!==\nthis.emissiveIntensity&&(d.emissiveIntensity=this.emissiveIntensity);this.specular&&this.specular.isColor&&(d.specular=this.specular.getHex());void 0!==this.shininess&&(d.shininess=this.shininess);void 0!==this.clearCoat&&(d.clearCoat=this.clearCoat);void 0!==this.clearCoatRoughness&&(d.clearCoatRoughness=this.clearCoatRoughness);this.map&&this.map.isTexture&&(d.map=this.map.toJSON(a).uuid);this.alphaMap&&this.alphaMap.isTexture&&(d.alphaMap=this.alphaMap.toJSON(a).uuid);this.lightMap&&this.lightMap.isTexture&&\n(d.lightMap=this.lightMap.toJSON(a).uuid);this.aoMap&&this.aoMap.isTexture&&(d.aoMap=this.aoMap.toJSON(a).uuid,d.aoMapIntensity=this.aoMapIntensity);this.bumpMap&&this.bumpMap.isTexture&&(d.bumpMap=this.bumpMap.toJSON(a).uuid,d.bumpScale=this.bumpScale);this.normalMap&&this.normalMap.isTexture&&(d.normalMap=this.normalMap.toJSON(a).uuid,d.normalMapType=this.normalMapType,d.normalScale=this.normalScale.toArray());this.displacementMap&&this.displacementMap.isTexture&&(d.displacementMap=this.displacementMap.toJSON(a).uuid,\nd.displacementScale=this.displacementScale,d.displacementBias=this.displacementBias);this.roughnessMap&&this.roughnessMap.isTexture&&(d.roughnessMap=this.roughnessMap.toJSON(a).uuid);this.metalnessMap&&this.metalnessMap.isTexture&&(d.metalnessMap=this.metalnessMap.toJSON(a).uuid);this.emissiveMap&&this.emissiveMap.isTexture&&(d.emissiveMap=this.emissiveMap.toJSON(a).uuid);this.specularMap&&this.specularMap.isTexture&&(d.specularMap=this.specularMap.toJSON(a).uuid);this.envMap&&this.envMap.isTexture&&\n(d.envMap=this.envMap.toJSON(a).uuid,d.reflectivity=this.reflectivity);this.gradientMap&&this.gradientMap.isTexture&&(d.gradientMap=this.gradientMap.toJSON(a).uuid);void 0!==this.size&&(d.size=this.size);void 0!==this.sizeAttenuation&&(d.sizeAttenuation=this.sizeAttenuation);1!==this.blending&&(d.blending=this.blending);!0===this.flatShading&&(d.flatShading=this.flatShading);0!==this.side&&(d.side=this.side);0!==this.vertexColors&&(d.vertexColors=this.vertexColors);1>this.opacity&&(d.opacity=this.opacity);\n!0===this.transparent&&(d.transparent=this.transparent);d.depthFunc=this.depthFunc;d.depthTest=this.depthTest;d.depthWrite=this.depthWrite;0!==this.rotation&&(d.rotation=this.rotation);1!==this.linewidth&&(d.linewidth=this.linewidth);void 0!==this.dashSize&&(d.dashSize=this.dashSize);void 0!==this.gapSize&&(d.gapSize=this.gapSize);void 0!==this.scale&&(d.scale=this.scale);!0===this.dithering&&(d.dithering=!0);0<this.alphaTest&&(d.alphaTest=this.alphaTest);!0===this.premultipliedAlpha&&(d.premultipliedAlpha=\nthis.premultipliedAlpha);!0===this.wireframe&&(d.wireframe=this.wireframe);1<this.wireframeLinewidth&&(d.wireframeLinewidth=this.wireframeLinewidth);\"round\"!==this.wireframeLinecap&&(d.wireframeLinecap=this.wireframeLinecap);\"round\"!==this.wireframeLinejoin&&(d.wireframeLinejoin=this.wireframeLinejoin);!0===this.morphTargets&&(d.morphTargets=!0);!0===this.skinning&&(d.skinning=!0);!1===this.visible&&(d.visible=!1);\"{}\"!==JSON.stringify(this.userData)&&(d.userData=this.userData);c&&(c=b(a.textures),\na=b(a.images),0<c.length&&(d.textures=c),0<a.length&&(d.images=a));return d},clone:function(){return(new this.constructor).copy(this)},copy:function(a){this.name=a.name;this.fog=a.fog;this.lights=a.lights;this.blending=a.blending;this.side=a.side;this.flatShading=a.flatShading;this.vertexColors=a.vertexColors;this.opacity=a.opacity;this.transparent=a.transparent;this.blendSrc=a.blendSrc;this.blendDst=a.blendDst;this.blendEquation=a.blendEquation;this.blendSrcAlpha=a.blendSrcAlpha;this.blendDstAlpha=\na.blendDstAlpha;this.blendEquationAlpha=a.blendEquationAlpha;this.depthFunc=a.depthFunc;this.depthTest=a.depthTest;this.depthWrite=a.depthWrite;this.colorWrite=a.colorWrite;this.precision=a.precision;this.polygonOffset=a.polygonOffset;this.polygonOffsetFactor=a.polygonOffsetFactor;this.polygonOffsetUnits=a.polygonOffsetUnits;this.dithering=a.dithering;this.alphaTest=a.alphaTest;this.premultipliedAlpha=a.premultipliedAlpha;this.overdraw=a.overdraw;this.visible=a.visible;this.userData=JSON.parse(JSON.stringify(a.userData));\nthis.clipShadows=a.clipShadows;this.clipIntersection=a.clipIntersection;var b=a.clippingPlanes,c=null;if(null!==b){var d=b.length;c=Array(d);for(var e=0;e!==d;++e)c[e]=b[e].clone()}this.clippingPlanes=c;this.shadowSide=a.shadowSide;return this},dispose:function(){this.dispatchEvent({type:\"dispose\"})}});da.prototype=Object.create(J.prototype);da.prototype.constructor=da;da.prototype.isMeshBasicMaterial=!0;da.prototype.copy=function(a){J.prototype.copy.call(this,a);this.color.copy(a.color);this.map=\na.map;this.lightMap=a.lightMap;this.lightMapIntensity=a.lightMapIntensity;this.aoMap=a.aoMap;this.aoMapIntensity=a.aoMapIntensity;this.specularMap=a.specularMap;this.alphaMap=a.alphaMap;this.envMap=a.envMap;this.combine=a.combine;this.reflectivity=a.reflectivity;this.refractionRatio=a.refractionRatio;this.wireframe=a.wireframe;this.wireframeLinewidth=a.wireframeLinewidth;this.wireframeLinecap=a.wireframeLinecap;this.wireframeLinejoin=a.wireframeLinejoin;this.skinning=a.skinning;this.morphTargets=\na.morphTargets;return this};ta.prototype=Object.create(J.prototype);ta.prototype.constructor=ta;ta.prototype.isShaderMaterial=!0;ta.prototype.copy=function(a){J.prototype.copy.call(this,a);this.fragmentShader=a.fragmentShader;this.vertexShader=a.vertexShader;this.uniforms=Aa.clone(a.uniforms);this.defines=Object.assign({},a.defines);this.wireframe=a.wireframe;this.wireframeLinewidth=a.wireframeLinewidth;this.lights=a.lights;this.clipping=a.clipping;this.skinning=a.skinning;this.morphTargets=a.morphTargets;\nthis.morphNormals=a.morphNormals;this.extensions=a.extensions;return this};ta.prototype.toJSON=function(a){a=J.prototype.toJSON.call(this,a);a.uniforms=this.uniforms;a.vertexShader=this.vertexShader;a.fragmentShader=this.fragmentShader;return a};Object.assign(mb.prototype,{set:function(a,b){this.origin.copy(a);this.direction.copy(b);return this},clone:function(){return(new this.constructor).copy(this)},copy:function(a){this.origin.copy(a.origin);this.direction.copy(a.direction);return this},at:function(a,\nb){void 0===b&&(console.warn(\"THREE.Ray: .at() target is now required\"),b=new p);return b.copy(this.direction).multiplyScalar(a).add(this.origin)},lookAt:function(a){this.direction.copy(a).sub(this.origin).normalize();return this},recast:function(){var a=new p;return function(b){this.origin.copy(this.at(b,a));return this}}(),closestPointToPoint:function(a,b){void 0===b&&(console.warn(\"THREE.Ray: .closestPointToPoint() target is now required\"),b=new p);b.subVectors(a,this.origin);a=b.dot(this.direction);\nreturn 0>a?b.copy(this.origin):b.copy(this.direction).multiplyScalar(a).add(this.origin)},distanceToPoint:function(a){return Math.sqrt(this.distanceSqToPoint(a))},distanceSqToPoint:function(){var a=new p;return function(b){var c=a.subVectors(b,this.origin).dot(this.direction);if(0>c)return this.origin.distanceToSquared(b);a.copy(this.direction).multiplyScalar(c).add(this.origin);return a.distanceToSquared(b)}}(),distanceSqToSegment:function(){var a=new p,b=new p,c=new p;return function(d,e,f,g){a.copy(d).add(e).multiplyScalar(.5);\nb.copy(e).sub(d).normalize();c.copy(this.origin).sub(a);var h=.5*d.distanceTo(e),k=-this.direction.dot(b),m=c.dot(this.direction),l=-c.dot(b),n=c.lengthSq(),t=Math.abs(1-k*k);if(0<t){d=k*l-m;e=k*m-l;var p=h*t;0<=d?e>=-p?e<=p?(h=1/t,d*=h,e*=h,k=d*(d+k*e+2*m)+e*(k*d+e+2*l)+n):(e=h,d=Math.max(0,-(k*e+m)),k=-d*d+e*(e+2*l)+n):(e=-h,d=Math.max(0,-(k*e+m)),k=-d*d+e*(e+2*l)+n):e<=-p?(d=Math.max(0,-(-k*h+m)),e=0<d?-h:Math.min(Math.max(-h,-l),h),k=-d*d+e*(e+2*l)+n):e<=p?(d=0,e=Math.min(Math.max(-h,-l),h),k=\ne*(e+2*l)+n):(d=Math.max(0,-(k*h+m)),e=0<d?h:Math.min(Math.max(-h,-l),h),k=-d*d+e*(e+2*l)+n)}else e=0<k?-h:h,d=Math.max(0,-(k*e+m)),k=-d*d+e*(e+2*l)+n;f&&f.copy(this.direction).multiplyScalar(d).add(this.origin);g&&g.copy(b).multiplyScalar(e).add(a);return k}}(),intersectSphere:function(){var a=new p;return function(b,c){a.subVectors(b.center,this.origin);var d=a.dot(this.direction),e=a.dot(a)-d*d;b=b.radius*b.radius;if(e>b)return null;b=Math.sqrt(b-e);e=d-b;d+=b;return 0>e&&0>d?null:0>e?this.at(d,\nc):this.at(e,c)}}(),intersectsSphere:function(a){return this.distanceToPoint(a.center)<=a.radius},distanceToPlane:function(a){var b=a.normal.dot(this.direction);if(0===b)return 0===a.distanceToPoint(this.origin)?0:null;a=-(this.origin.dot(a.normal)+a.constant)/b;return 0<=a?a:null},intersectPlane:function(a,b){a=this.distanceToPlane(a);return null===a?null:this.at(a,b)},intersectsPlane:function(a){var b=a.distanceToPoint(this.origin);return 0===b||0>a.normal.dot(this.direction)*b?!0:!1},intersectBox:function(a,\nb){var c=1/this.direction.x;var d=1/this.direction.y;var e=1/this.direction.z,f=this.origin;if(0<=c){var g=(a.min.x-f.x)*c;c*=a.max.x-f.x}else g=(a.max.x-f.x)*c,c*=a.min.x-f.x;if(0<=d){var h=(a.min.y-f.y)*d;d*=a.max.y-f.y}else h=(a.max.y-f.y)*d,d*=a.min.y-f.y;if(g>d||h>c)return null;if(h>g||g!==g)g=h;if(d<c||c!==c)c=d;0<=e?(h=(a.min.z-f.z)*e,a=(a.max.z-f.z)*e):(h=(a.max.z-f.z)*e,a=(a.min.z-f.z)*e);if(g>a||h>c)return null;if(h>g||g!==g)g=h;if(a<c||c!==c)c=a;return 0>c?null:this.at(0<=g?g:c,b)},intersectsBox:function(){var a=\nnew p;return function(b){return null!==this.intersectBox(b,a)}}(),intersectTriangle:function(){var a=new p,b=new p,c=new p,d=new p;return function(e,f,g,h,k){b.subVectors(f,e);c.subVectors(g,e);d.crossVectors(b,c);f=this.direction.dot(d);if(0<f){if(h)return null;h=1}else if(0>f)h=-1,f=-f;else return null;a.subVectors(this.origin,e);e=h*this.direction.dot(c.crossVectors(a,c));if(0>e)return null;g=h*this.direction.dot(b.cross(a));if(0>g||e+g>f)return null;e=-h*a.dot(d);return 0>e?null:this.at(e/f,k)}}(),\napplyMatrix4:function(a){this.origin.applyMatrix4(a);this.direction.transformDirection(a);return this},equals:function(a){return a.origin.equals(this.origin)&&a.direction.equals(this.direction)}});Object.assign(ja,{getNormal:function(){var a=new p;return function(b,c,d,e){void 0===e&&(console.warn(\"THREE.Triangle: .getNormal() target is now required\"),e=new p);e.subVectors(d,c);a.subVectors(b,c);e.cross(a);b=e.lengthSq();return 0<b?e.multiplyScalar(1/Math.sqrt(b)):e.set(0,0,0)}}(),getBarycoord:function(){var a=\nnew p,b=new p,c=new p;return function(d,e,f,g,h){a.subVectors(g,e);b.subVectors(f,e);c.subVectors(d,e);d=a.dot(a);e=a.dot(b);f=a.dot(c);var k=b.dot(b);g=b.dot(c);var m=d*k-e*e;void 0===h&&(console.warn(\"THREE.Triangle: .getBarycoord() target is now required\"),h=new p);if(0===m)return h.set(-2,-1,-1);m=1/m;k=(k*f-e*g)*m;d=(d*g-e*f)*m;return h.set(1-k-d,d,k)}}(),containsPoint:function(){var a=new p;return function(b,c,d,e){ja.getBarycoord(b,c,d,e,a);return 0<=a.x&&0<=a.y&&1>=a.x+a.y}}()});Object.assign(ja.prototype,\n{set:function(a,b,c){this.a.copy(a);this.b.copy(b);this.c.copy(c);return this},setFromPointsAndIndices:function(a,b,c,d){this.a.copy(a[b]);this.b.copy(a[c]);this.c.copy(a[d]);return this},clone:function(){return(new this.constructor).copy(this)},copy:function(a){this.a.copy(a.a);this.b.copy(a.b);this.c.copy(a.c);return this},getArea:function(){var a=new p,b=new p;return function(){a.subVectors(this.c,this.b);b.subVectors(this.a,this.b);return.5*a.cross(b).length()}}(),getMidpoint:function(a){void 0===\na&&(console.warn(\"THREE.Triangle: .getMidpoint() target is now required\"),a=new p);return a.addVectors(this.a,this.b).add(this.c).multiplyScalar(1/3)},getNormal:function(a){return ja.getNormal(this.a,this.b,this.c,a)},getPlane:function(a){void 0===a&&(console.warn(\"THREE.Triangle: .getPlane() target is now required\"),a=new p);return a.setFromCoplanarPoints(this.a,this.b,this.c)},getBarycoord:function(a,b){return ja.getBarycoord(a,this.a,this.b,this.c,b)},containsPoint:function(a){return ja.containsPoint(a,\nthis.a,this.b,this.c)},intersectsBox:function(a){return a.intersectsTriangle(this)},closestPointToPoint:function(){var a=new p,b=new p,c=new p,d=new p,e=new p,f=new p;return function(g,h){void 0===h&&(console.warn(\"THREE.Triangle: .closestPointToPoint() target is now required\"),h=new p);var k=this.a,m=this.b,l=this.c;a.subVectors(m,k);b.subVectors(l,k);d.subVectors(g,k);var n=a.dot(d),t=b.dot(d);if(0>=n&&0>=t)return h.copy(k);e.subVectors(g,m);var u=a.dot(e),r=b.dot(e);if(0<=u&&r<=u)return h.copy(m);\nvar v=n*r-u*t;if(0>=v&&0<=n&&0>=u)return m=n/(n-u),h.copy(k).addScaledVector(a,m);f.subVectors(g,l);g=a.dot(f);var y=b.dot(f);if(0<=y&&g<=y)return h.copy(l);n=g*t-n*y;if(0>=n&&0<=t&&0>=y)return v=t/(t-y),h.copy(k).addScaledVector(b,v);t=u*y-g*r;if(0>=t&&0<=r-u&&0<=g-y)return c.subVectors(l,m),v=(r-u)/(r-u+(g-y)),h.copy(m).addScaledVector(c,v);l=1/(t+n+v);m=n*l;v*=l;return h.copy(k).addScaledVector(a,m).addScaledVector(b,v)}}(),equals:function(a){return a.a.equals(this.a)&&a.b.equals(this.b)&&a.c.equals(this.c)}});\nla.prototype=Object.assign(Object.create(D.prototype),{constructor:la,isMesh:!0,setDrawMode:function(a){this.drawMode=a},copy:function(a){D.prototype.copy.call(this,a);this.drawMode=a.drawMode;void 0!==a.morphTargetInfluences&&(this.morphTargetInfluences=a.morphTargetInfluences.slice());void 0!==a.morphTargetDictionary&&(this.morphTargetDictionary=Object.assign({},a.morphTargetDictionary));return this},updateMorphTargets:function(){var a=this.geometry;if(a.isBufferGeometry){a=a.morphAttributes;var b=\nObject.keys(a);if(0<b.length){var c=a[b[0]];if(void 0!==c)for(this.morphTargetInfluences=[],this.morphTargetDictionary={},a=0,b=c.length;a<b;a++){var d=c[a].name||String(a);this.morphTargetInfluences.push(0);this.morphTargetDictionary[d]=a}}}else if(c=a.morphTargets,void 0!==c&&0<c.length)for(this.morphTargetInfluences=[],this.morphTargetDictionary={},a=0,b=c.length;a<b;a++)d=c[a].name||String(a),this.morphTargetInfluences.push(0),this.morphTargetDictionary[d]=a},raycast:function(){function a(a,b,\nc,d,e,f,g){ja.getBarycoord(a,b,c,d,v);e.multiplyScalar(v.x);f.multiplyScalar(v.y);g.multiplyScalar(v.z);e.add(f).add(g);return e.clone()}function b(a,b,c,d,e,f,g,h){if(null===(1===b.side?d.intersectTriangle(g,f,e,!0,h):d.intersectTriangle(e,f,g,2!==b.side,h)))return null;x.copy(h);x.applyMatrix4(a.matrixWorld);b=c.ray.origin.distanceTo(x);return b<c.near||b>c.far?null:{distance:b,point:x.clone(),object:a}}function c(c,d,e,f,m,l,n,q,p){g.fromBufferAttribute(m,n);h.fromBufferAttribute(m,q);k.fromBufferAttribute(m,\np);if(c=b(c,d,e,f,g,h,k,y))l&&(t.fromBufferAttribute(l,n),u.fromBufferAttribute(l,q),r.fromBufferAttribute(l,p),c.uv=a(y,g,h,k,t,u,r)),l=new Ta(n,q,p),ja.getNormal(g,h,k,l.normal),c.face=l;return c}var d=new I,e=new mb,f=new Da,g=new p,h=new p,k=new p,m=new p,l=new p,n=new p,t=new z,u=new z,r=new z,v=new p,y=new p,x=new p;return function(q,p){var v=this.geometry,w=this.material,x=this.matrixWorld;if(void 0!==w&&(null===v.boundingSphere&&v.computeBoundingSphere(),f.copy(v.boundingSphere),f.applyMatrix4(x),\n!1!==q.ray.intersectsSphere(f)&&(d.getInverse(x),e.copy(q.ray).applyMatrix4(d),null===v.boundingBox||!1!==e.intersectsBox(v.boundingBox))))if(v.isBufferGeometry){var z=v.index,B=v.attributes.position,A=v.attributes.uv,D=v.groups;v=v.drawRange;var C;if(null!==z)if(Array.isArray(w)){var H=0;for(C=D.length;H<C;H++){var G=D[H];var K=w[G.materialIndex];x=Math.max(G.start,v.start);var L=Math.min(G.start+G.count,v.start+v.count);for(G=x;G<L;G+=3){x=z.getX(G);var I=z.getX(G+1);var J=z.getX(G+2);if(x=c(this,\nK,q,e,B,A,x,I,J))x.faceIndex=Math.floor(G/3),p.push(x)}}}else for(x=Math.max(0,v.start),L=Math.min(z.count,v.start+v.count),H=x,C=L;H<C;H+=3){if(x=z.getX(H),I=z.getX(H+1),J=z.getX(H+2),x=c(this,w,q,e,B,A,x,I,J))x.faceIndex=Math.floor(H/3),p.push(x)}else if(void 0!==B)if(Array.isArray(w))for(H=0,C=D.length;H<C;H++)for(G=D[H],K=w[G.materialIndex],x=Math.max(G.start,v.start),L=Math.min(G.start+G.count,v.start+v.count),G=x;G<L;G+=3){if(x=G,I=G+1,J=G+2,x=c(this,K,q,e,B,A,x,I,J))x.faceIndex=Math.floor(G/\n3),p.push(x)}else for(x=Math.max(0,v.start),L=Math.min(B.count,v.start+v.count),H=x,C=L;H<C;H+=3)if(x=H,I=H+1,J=H+2,x=c(this,w,q,e,B,A,x,I,J))x.faceIndex=Math.floor(H/3),p.push(x)}else if(v.isGeometry)for(B=Array.isArray(w),A=v.vertices,D=v.faces,x=v.faceVertexUvs[0],0<x.length&&(z=x),G=0,L=D.length;G<L;G++)if(I=D[G],x=B?w[I.materialIndex]:w,void 0!==x){H=A[I.a];C=A[I.b];K=A[I.c];if(!0===x.morphTargets){J=v.morphTargets;var R=this.morphTargetInfluences;g.set(0,0,0);h.set(0,0,0);k.set(0,0,0);for(var Q=\n0,S=J.length;Q<S;Q++){var T=R[Q];if(0!==T){var V=J[Q].vertices;g.addScaledVector(m.subVectors(V[I.a],H),T);h.addScaledVector(l.subVectors(V[I.b],C),T);k.addScaledVector(n.subVectors(V[I.c],K),T)}}g.add(H);h.add(C);k.add(K);H=g;C=h;K=k}if(x=b(this,x,q,e,H,C,K,y))z&&z[G]&&(J=z[G],t.copy(J[0]),u.copy(J[1]),r.copy(J[2]),x.uv=a(y,H,C,K,t,u,r)),x.face=I,x.faceIndex=G,p.push(x)}}}(),clone:function(){return(new this.constructor(this.geometry,this.material)).copy(this)}});Ua.prototype=Object.create(T.prototype);\nUa.prototype.constructor=Ua;Ua.prototype.isCubeTexture=!0;Object.defineProperty(Ua.prototype,\"images\",{get:function(){return this.image},set:function(a){this.image=a}});var Me=new T,Ne=new Ua,Ge=[],Ie=[],Le=new Float32Array(16),Ke=new Float32Array(9),Je=new Float32Array(4);Re.prototype.updateCache=function(a){var b=this.cache;a instanceof Float32Array&&b.length!==a.length&&(this.cache=new Float32Array(a.length));qa(b,a)};Se.prototype.setValue=function(a,b,c){for(var d=this.seq,e=0,f=d.length;e!==\nf;++e){var g=d[e];g.setValue(a,b[g.id],c)}};var Vd=/([\\w\\d_]+)(\\])?(\\[|\\.)?/g;Za.prototype.setValue=function(a,b,c){b=this.map[b];void 0!==b&&b.setValue(a,c,this.renderer)};Za.prototype.setOptional=function(a,b,c){b=b[c];void 0!==b&&this.setValue(a,c,b)};Za.upload=function(a,b,c,d){for(var e=0,f=b.length;e!==f;++e){var g=b[e],h=c[g.id];!1!==h.needsUpdate&&g.setValue(a,h.value,d)}};Za.seqWithValue=function(a,b){for(var c=[],d=0,e=a.length;d!==e;++d){var f=a[d];f.id in b&&c.push(f)}return c};var yg=\n0,Hg=0;$a.prototype=Object.create(J.prototype);$a.prototype.constructor=$a;$a.prototype.isMeshDepthMaterial=!0;$a.prototype.copy=function(a){J.prototype.copy.call(this,a);this.depthPacking=a.depthPacking;this.skinning=a.skinning;this.morphTargets=a.morphTargets;this.map=a.map;this.alphaMap=a.alphaMap;this.displacementMap=a.displacementMap;this.displacementScale=a.displacementScale;this.displacementBias=a.displacementBias;this.wireframe=a.wireframe;this.wireframeLinewidth=a.wireframeLinewidth;return this};\nab.prototype=Object.create(J.prototype);ab.prototype.constructor=ab;ab.prototype.isMeshDistanceMaterial=!0;ab.prototype.copy=function(a){J.prototype.copy.call(this,a);this.referencePosition.copy(a.referencePosition);this.nearDistance=a.nearDistance;this.farDistance=a.farDistance;this.skinning=a.skinning;this.morphTargets=a.morphTargets;this.map=a.map;this.alphaMap=a.alphaMap;this.displacementMap=a.displacementMap;this.displacementScale=a.displacementScale;this.displacementBias=a.displacementBias;\nreturn this};Kb.prototype=Object.assign(Object.create(D.prototype),{constructor:Kb,isGroup:!0});Z.prototype=Object.assign(Object.create(Na.prototype),{constructor:Z,isPerspectiveCamera:!0,copy:function(a,b){Na.prototype.copy.call(this,a,b);this.fov=a.fov;this.zoom=a.zoom;this.near=a.near;this.far=a.far;this.focus=a.focus;this.aspect=a.aspect;this.view=null===a.view?null:Object.assign({},a.view);this.filmGauge=a.filmGauge;this.filmOffset=a.filmOffset;return this},setFocalLength:function(a){a=.5*this.getFilmHeight()/\na;this.fov=2*H.RAD2DEG*Math.atan(a);this.updateProjectionMatrix()},getFocalLength:function(){var a=Math.tan(.5*H.DEG2RAD*this.fov);return.5*this.getFilmHeight()/a},getEffectiveFOV:function(){return 2*H.RAD2DEG*Math.atan(Math.tan(.5*H.DEG2RAD*this.fov)/this.zoom)},getFilmWidth:function(){return this.filmGauge*Math.min(this.aspect,1)},getFilmHeight:function(){return this.filmGauge/Math.max(this.aspect,1)},setViewOffset:function(a,b,c,d,e,f){this.aspect=a/b;null===this.view&&(this.view={enabled:!0,fullWidth:1,\nfullHeight:1,offsetX:0,offsetY:0,width:1,height:1});this.view.enabled=!0;this.view.fullWidth=a;this.view.fullHeight=b;this.view.offsetX=c;this.view.offsetY=d;this.view.width=e;this.view.height=f;this.updateProjectionMatrix()},clearViewOffset:function(){null!==this.view&&(this.view.enabled=!1);this.updateProjectionMatrix()},updateProjectionMatrix:function(){var a=this.near,b=a*Math.tan(.5*H.DEG2RAD*this.fov)/this.zoom,c=2*b,d=this.aspect*c,e=-.5*d,f=this.view;if(null!==this.view&&this.view.enabled){var g=\nf.fullWidth,h=f.fullHeight;e+=f.offsetX*d/g;b-=f.offsetY*c/h;d*=f.width/g;c*=f.height/h}f=this.filmOffset;0!==f&&(e+=a*f/this.getFilmWidth());this.projectionMatrix.makePerspective(e,e+d,b,b-c,a,this.far)},toJSON:function(a){a=D.prototype.toJSON.call(this,a);a.object.fov=this.fov;a.object.zoom=this.zoom;a.object.near=this.near;a.object.far=this.far;a.object.focus=this.focus;a.object.aspect=this.aspect;null!==this.view&&(a.object.view=Object.assign({},this.view));a.object.filmGauge=this.filmGauge;a.object.filmOffset=\nthis.filmOffset;return a}});yc.prototype=Object.assign(Object.create(Z.prototype),{constructor:yc,isArrayCamera:!0});Lb.prototype.isFogExp2=!0;Lb.prototype.clone=function(){return new Lb(this.color,this.density)};Lb.prototype.toJSON=function(){return{type:\"FogExp2\",color:this.color.getHex(),density:this.density}};Mb.prototype.isFog=!0;Mb.prototype.clone=function(){return new Mb(this.color,this.near,this.far)};Mb.prototype.toJSON=function(){return{type:\"Fog\",color:this.color.getHex(),near:this.near,\nfar:this.far}};qd.prototype=Object.assign(Object.create(D.prototype),{constructor:qd,copy:function(a,b){D.prototype.copy.call(this,a,b);null!==a.background&&(this.background=a.background.clone());null!==a.fog&&(this.fog=a.fog.clone());null!==a.overrideMaterial&&(this.overrideMaterial=a.overrideMaterial.clone());this.autoUpdate=a.autoUpdate;this.matrixAutoUpdate=a.matrixAutoUpdate;return this},toJSON:function(a){var b=D.prototype.toJSON.call(this,a);null!==this.background&&(b.object.background=this.background.toJSON(a));\nnull!==this.fog&&(b.object.fog=this.fog.toJSON());return b}});Object.defineProperty(ob.prototype,\"needsUpdate\",{set:function(a){!0===a&&this.version++}});Object.assign(ob.prototype,{isInterleavedBuffer:!0,onUploadCallback:function(){},setArray:function(a){if(Array.isArray(a))throw new TypeError(\"THREE.BufferAttribute: array should be a Typed Array.\");this.count=void 0!==a?a.length/this.stride:0;this.array=a;return this},setDynamic:function(a){this.dynamic=a;return this},copy:function(a){this.array=\nnew a.array.constructor(a.array);this.count=a.count;this.stride=a.stride;this.dynamic=a.dynamic;return this},copyAt:function(a,b,c){a*=this.stride;c*=b.stride;for(var d=0,e=this.stride;d<e;d++)this.array[a+d]=b.array[c+d];return this},set:function(a,b){void 0===b&&(b=0);this.array.set(a,b);return this},clone:function(){return(new this.constructor).copy(this)},onUpload:function(a){this.onUploadCallback=a;return this}});Object.defineProperties(zc.prototype,{count:{get:function(){return this.data.count}},\narray:{get:function(){return this.data.array}}});Object.assign(zc.prototype,{isInterleavedBufferAttribute:!0,setX:function(a,b){this.data.array[a*this.data.stride+this.offset]=b;return this},setY:function(a,b){this.data.array[a*this.data.stride+this.offset+1]=b;return this},setZ:function(a,b){this.data.array[a*this.data.stride+this.offset+2]=b;return this},setW:function(a,b){this.data.array[a*this.data.stride+this.offset+3]=b;return this},getX:function(a){return this.data.array[a*this.data.stride+\nthis.offset]},getY:function(a){return this.data.array[a*this.data.stride+this.offset+1]},getZ:function(a){return this.data.array[a*this.data.stride+this.offset+2]},getW:function(a){return this.data.array[a*this.data.stride+this.offset+3]},setXY:function(a,b,c){a=a*this.data.stride+this.offset;this.data.array[a+0]=b;this.data.array[a+1]=c;return this},setXYZ:function(a,b,c,d){a=a*this.data.stride+this.offset;this.data.array[a+0]=b;this.data.array[a+1]=c;this.data.array[a+2]=d;return this},setXYZW:function(a,\nb,c,d,e){a=a*this.data.stride+this.offset;this.data.array[a+0]=b;this.data.array[a+1]=c;this.data.array[a+2]=d;this.data.array[a+3]=e;return this}});cb.prototype=Object.create(J.prototype);cb.prototype.constructor=cb;cb.prototype.isSpriteMaterial=!0;cb.prototype.copy=function(a){J.prototype.copy.call(this,a);this.color.copy(a.color);this.map=a.map;this.rotation=a.rotation;return this};var Nb;Ac.prototype=Object.assign(Object.create(D.prototype),{constructor:Ac,isSprite:!0,raycast:function(){function a(a,\nb,c,d,h,k){e.subVectors(a,c).addScalar(.5).multiply(d);void 0!==h?(f.x=k*e.x-h*e.y,f.y=h*e.x+k*e.y):f.copy(e);a.copy(b);a.x+=f.x;a.y+=f.y;a.applyMatrix4(g)}var b=new p,c=new p,d=new p,e=new z,f=new z,g=new I,h=new p,k=new p,m=new p;return function(e,f){c.setFromMatrixScale(this.matrixWorld);g.getInverse(this.modelViewMatrix).premultiply(this.matrixWorld);d.setFromMatrixPosition(this.modelViewMatrix);var l=this.material.rotation;if(0!==l){var n=Math.cos(l);var q=Math.sin(l)}l=this.center;a(h.set(-.5,\n-.5,0),d,l,c,q,n);a(k.set(.5,-.5,0),d,l,c,q,n);a(m.set(.5,.5,0),d,l,c,q,n);var p=e.ray.intersectTriangle(h,k,m,!1,b);if(null===p&&(a(k.set(-.5,.5,0),d,l,c,q,n),p=e.ray.intersectTriangle(h,m,k,!1,b),null===p))return;q=e.ray.origin.distanceTo(b);q<e.near||q>e.far||f.push({distance:q,point:b.clone(),face:null,object:this})}}(),clone:function(){return(new this.constructor(this.material)).copy(this)},copy:function(a){D.prototype.copy.call(this,a);void 0!==a.center&&this.center.copy(a.center);return this}});\nBc.prototype=Object.assign(Object.create(D.prototype),{constructor:Bc,copy:function(a){D.prototype.copy.call(this,a,!1);a=a.levels;for(var b=0,c=a.length;b<c;b++){var d=a[b];this.addLevel(d.object.clone(),d.distance)}return this},addLevel:function(a,b){void 0===b&&(b=0);b=Math.abs(b);for(var c=this.levels,d=0;d<c.length&&!(b<c[d].distance);d++);c.splice(d,0,{distance:b,object:a});this.add(a)},getObjectForDistance:function(a){for(var b=this.levels,c=1,d=b.length;c<d&&!(a<b[c].distance);c++);return b[c-\n1].object},raycast:function(){var a=new p;return function(b,c){a.setFromMatrixPosition(this.matrixWorld);var d=b.ray.origin.distanceTo(a);this.getObjectForDistance(d).raycast(b,c)}}(),update:function(){var a=new p,b=new p;return function(c){var d=this.levels;if(1<d.length){a.setFromMatrixPosition(c.matrixWorld);b.setFromMatrixPosition(this.matrixWorld);c=a.distanceTo(b);d[0].object.visible=!0;for(var e=1,f=d.length;e<f;e++)if(c>=d[e].distance)d[e-1].object.visible=!1,d[e].object.visible=!0;else break;\nfor(;e<f;e++)d[e].object.visible=!1}}}(),toJSON:function(a){a=D.prototype.toJSON.call(this,a);a.object.levels=[];for(var b=this.levels,c=0,d=b.length;c<d;c++){var e=b[c];a.object.levels.push({object:e.object.uuid,distance:e.distance})}return a}});Object.assign(Cc.prototype,{calculateInverses:function(){this.boneInverses=[];for(var a=0,b=this.bones.length;a<b;a++){var c=new I;this.bones[a]&&c.getInverse(this.bones[a].matrixWorld);this.boneInverses.push(c)}},pose:function(){var a,b;var c=0;for(b=this.bones.length;c<\nb;c++)(a=this.bones[c])&&a.matrixWorld.getInverse(this.boneInverses[c]);c=0;for(b=this.bones.length;c<b;c++)if(a=this.bones[c])a.parent&&a.parent.isBone?(a.matrix.getInverse(a.parent.matrixWorld),a.matrix.multiply(a.matrixWorld)):a.matrix.copy(a.matrixWorld),a.matrix.decompose(a.position,a.quaternion,a.scale)},update:function(){var a=new I,b=new I;return function(){for(var c=this.bones,d=this.boneInverses,e=this.boneMatrices,f=this.boneTexture,g=0,h=c.length;g<h;g++)a.multiplyMatrices(c[g]?c[g].matrixWorld:\nb,d[g]),a.toArray(e,16*g);void 0!==f&&(f.needsUpdate=!0)}}(),clone:function(){return new Cc(this.bones,this.boneInverses)},getBoneByName:function(a){for(var b=0,c=this.bones.length;b<c;b++){var d=this.bones[b];if(d.name===a)return d}}});rd.prototype=Object.assign(Object.create(D.prototype),{constructor:rd,isBone:!0});sd.prototype=Object.assign(Object.create(la.prototype),{constructor:sd,isSkinnedMesh:!0,initBones:function(){var a=[],b;if(this.geometry&&void 0!==this.geometry.bones){var c=0;for(b=\nthis.geometry.bones.length;c<b;c++){var d=this.geometry.bones[c];var e=new rd;a.push(e);e.name=d.name;e.position.fromArray(d.pos);e.quaternion.fromArray(d.rotq);void 0!==d.scl&&e.scale.fromArray(d.scl)}c=0;for(b=this.geometry.bones.length;c<b;c++)d=this.geometry.bones[c],-1!==d.parent&&null!==d.parent&&void 0!==a[d.parent]?a[d.parent].add(a[c]):this.add(a[c])}this.updateMatrixWorld(!0);return a},bind:function(a,b){this.skeleton=a;void 0===b&&(this.updateMatrixWorld(!0),this.skeleton.calculateInverses(),\nb=this.matrixWorld);this.bindMatrix.copy(b);this.bindMatrixInverse.getInverse(b)},pose:function(){this.skeleton.pose()},normalizeSkinWeights:function(){var a;if(this.geometry&&this.geometry.isGeometry)for(a=0;a<this.geometry.skinWeights.length;a++){var b=this.geometry.skinWeights[a];var c=1/b.manhattanLength();Infinity!==c?b.multiplyScalar(c):b.set(1,0,0,0)}else if(this.geometry&&this.geometry.isBufferGeometry){b=new V;var d=this.geometry.attributes.skinWeight;for(a=0;a<d.count;a++)b.x=d.getX(a),\nb.y=d.getY(a),b.z=d.getZ(a),b.w=d.getW(a),c=1/b.manhattanLength(),Infinity!==c?b.multiplyScalar(c):b.set(1,0,0,0),d.setXYZW(a,b.x,b.y,b.z,b.w)}},updateMatrixWorld:function(a){la.prototype.updateMatrixWorld.call(this,a);\"attached\"===this.bindMode?this.bindMatrixInverse.getInverse(this.matrixWorld):\"detached\"===this.bindMode?this.bindMatrixInverse.getInverse(this.bindMatrix):console.warn(\"THREE.SkinnedMesh: Unrecognized bindMode: \"+this.bindMode)},clone:function(){return(new this.constructor(this.geometry,\nthis.material)).copy(this)}});Y.prototype=Object.create(J.prototype);Y.prototype.constructor=Y;Y.prototype.isLineBasicMaterial=!0;Y.prototype.copy=function(a){J.prototype.copy.call(this,a);this.color.copy(a.color);this.linewidth=a.linewidth;this.linecap=a.linecap;this.linejoin=a.linejoin;return this};sa.prototype=Object.assign(Object.create(D.prototype),{constructor:sa,isLine:!0,computeLineDistances:function(){var a=new p,b=new p;return function(){var c=this.geometry;if(c.isBufferGeometry)if(null===\nc.index){for(var d=c.attributes.position,e=[0],f=1,g=d.count;f<g;f++)a.fromBufferAttribute(d,f-1),b.fromBufferAttribute(d,f),e[f]=e[f-1],e[f]+=a.distanceTo(b);c.addAttribute(\"lineDistance\",new A(e,1))}else console.warn(\"THREE.Line.computeLineDistances(): Computation only possible with non-indexed BufferGeometry.\");else if(c.isGeometry)for(d=c.vertices,e=c.lineDistances,e[0]=0,f=1,g=d.length;f<g;f++)e[f]=e[f-1],e[f]+=d[f-1].distanceTo(d[f]);return this}}(),raycast:function(){var a=new I,b=new mb,c=\nnew Da;return function(d,e){var f=d.linePrecision;f*=f;var g=this.geometry,h=this.matrixWorld;null===g.boundingSphere&&g.computeBoundingSphere();c.copy(g.boundingSphere);c.applyMatrix4(h);if(!1!==d.ray.intersectsSphere(c)){a.getInverse(h);b.copy(d.ray).applyMatrix4(a);var k=new p,m=new p;h=new p;var l=new p,n=this&&this.isLineSegments?2:1;if(g.isBufferGeometry){var t=g.index,u=g.attributes.position.array;if(null!==t){t=t.array;g=0;for(var r=t.length-1;g<r;g+=n){var v=t[g+1];k.fromArray(u,3*t[g]);\nm.fromArray(u,3*v);v=b.distanceSqToSegment(k,m,l,h);v>f||(l.applyMatrix4(this.matrixWorld),v=d.ray.origin.distanceTo(l),v<d.near||v>d.far||e.push({distance:v,point:h.clone().applyMatrix4(this.matrixWorld),index:g,face:null,faceIndex:null,object:this}))}}else for(g=0,r=u.length/3-1;g<r;g+=n)k.fromArray(u,3*g),m.fromArray(u,3*g+3),v=b.distanceSqToSegment(k,m,l,h),v>f||(l.applyMatrix4(this.matrixWorld),v=d.ray.origin.distanceTo(l),v<d.near||v>d.far||e.push({distance:v,point:h.clone().applyMatrix4(this.matrixWorld),\nindex:g,face:null,faceIndex:null,object:this}))}else if(g.isGeometry)for(k=g.vertices,m=k.length,g=0;g<m-1;g+=n)v=b.distanceSqToSegment(k[g],k[g+1],l,h),v>f||(l.applyMatrix4(this.matrixWorld),v=d.ray.origin.distanceTo(l),v<d.near||v>d.far||e.push({distance:v,point:h.clone().applyMatrix4(this.matrixWorld),index:g,face:null,faceIndex:null,object:this}))}}}(),clone:function(){return(new this.constructor(this.geometry,this.material)).copy(this)}});W.prototype=Object.assign(Object.create(sa.prototype),\n{constructor:W,isLineSegments:!0,computeLineDistances:function(){var a=new p,b=new p;return function(){var c=this.geometry;if(c.isBufferGeometry)if(null===c.index){for(var d=c.attributes.position,e=[],f=0,g=d.count;f<g;f+=2)a.fromBufferAttribute(d,f),b.fromBufferAttribute(d,f+1),e[f]=0===f?0:e[f-1],e[f+1]=e[f]+a.distanceTo(b);c.addAttribute(\"lineDistance\",new A(e,1))}else console.warn(\"THREE.LineSegments.computeLineDistances(): Computation only possible with non-indexed BufferGeometry.\");else if(c.isGeometry)for(d=\nc.vertices,e=c.lineDistances,f=0,g=d.length;f<g;f+=2)a.copy(d[f]),b.copy(d[f+1]),e[f]=0===f?0:e[f-1],e[f+1]=e[f]+a.distanceTo(b);return this}}()});td.prototype=Object.assign(Object.create(sa.prototype),{constructor:td,isLineLoop:!0});Ea.prototype=Object.create(J.prototype);Ea.prototype.constructor=Ea;Ea.prototype.isPointsMaterial=!0;Ea.prototype.copy=function(a){J.prototype.copy.call(this,a);this.color.copy(a.color);this.map=a.map;this.size=a.size;this.sizeAttenuation=a.sizeAttenuation;this.morphTargets=\na.morphTargets;return this};Ob.prototype=Object.assign(Object.create(D.prototype),{constructor:Ob,isPoints:!0,raycast:function(){var a=new I,b=new mb,c=new Da;return function(d,e){function f(a,c){var f=b.distanceSqToPoint(a);f<l&&(b.closestPointToPoint(a,n),n.applyMatrix4(k),a=d.ray.origin.distanceTo(n),a<d.near||a>d.far||e.push({distance:a,distanceToRay:Math.sqrt(f),point:n.clone(),index:c,face:null,object:g}))}var g=this,h=this.geometry,k=this.matrixWorld,m=d.params.Points.threshold;null===h.boundingSphere&&\nh.computeBoundingSphere();c.copy(h.boundingSphere);c.applyMatrix4(k);c.radius+=m;if(!1!==d.ray.intersectsSphere(c)){a.getInverse(k);b.copy(d.ray).applyMatrix4(a);m/=(this.scale.x+this.scale.y+this.scale.z)/3;var l=m*m;m=new p;var n=new p;if(h.isBufferGeometry){var t=h.index;h=h.attributes.position.array;if(null!==t){var u=t.array;t=0;for(var r=u.length;t<r;t++){var v=u[t];m.fromArray(h,3*v);f(m,v)}}else for(t=0,u=h.length/3;t<u;t++)m.fromArray(h,3*t),f(m,t)}else for(m=h.vertices,t=0,u=m.length;t<\nu;t++)f(m[t],t)}}}(),clone:function(){return(new this.constructor(this.geometry,this.material)).copy(this)}});$d.prototype=Object.assign(Object.create(T.prototype),{constructor:$d,isVideoTexture:!0,update:function(){var a=this.image;a.readyState>=a.HAVE_CURRENT_DATA&&(this.needsUpdate=!0)}});Pb.prototype=Object.create(T.prototype);Pb.prototype.constructor=Pb;Pb.prototype.isCompressedTexture=!0;Dc.prototype=Object.create(T.prototype);Dc.prototype.constructor=Dc;Dc.prototype.isCanvasTexture=!0;Ec.prototype=\nObject.create(T.prototype);Ec.prototype.constructor=Ec;Ec.prototype.isDepthTexture=!0;Qb.prototype=Object.create(C.prototype);Qb.prototype.constructor=Qb;Fc.prototype=Object.create(R.prototype);Fc.prototype.constructor=Fc;Rb.prototype=Object.create(C.prototype);Rb.prototype.constructor=Rb;Gc.prototype=Object.create(R.prototype);Gc.prototype.constructor=Gc;na.prototype=Object.create(C.prototype);na.prototype.constructor=na;Hc.prototype=Object.create(R.prototype);Hc.prototype.constructor=Hc;Sb.prototype=\nObject.create(na.prototype);Sb.prototype.constructor=Sb;Ic.prototype=Object.create(R.prototype);Ic.prototype.constructor=Ic;pb.prototype=Object.create(na.prototype);pb.prototype.constructor=pb;Jc.prototype=Object.create(R.prototype);Jc.prototype.constructor=Jc;Tb.prototype=Object.create(na.prototype);Tb.prototype.constructor=Tb;Kc.prototype=Object.create(R.prototype);Kc.prototype.constructor=Kc;Ub.prototype=Object.create(na.prototype);Ub.prototype.constructor=Ub;Lc.prototype=Object.create(R.prototype);\nLc.prototype.constructor=Lc;Vb.prototype=Object.create(C.prototype);Vb.prototype.constructor=Vb;Mc.prototype=Object.create(R.prototype);Mc.prototype.constructor=Mc;Wb.prototype=Object.create(C.prototype);Wb.prototype.constructor=Wb;Nc.prototype=Object.create(R.prototype);Nc.prototype.constructor=Nc;Xb.prototype=Object.create(C.prototype);Xb.prototype.constructor=Xb;var Ug={triangulate:function(a,b,c){c=c||2;var d=b&&b.length,e=d?b[0]*c:a.length,f=bf(a,0,e,c,!0),g=[];if(!f)return g;var h;if(d){var k=\nc;d=[];var m;var l=0;for(m=b.length;l<m;l++){var n=b[l]*k;var t=l<m-1?b[l+1]*k:a.length;n=bf(a,n,t,k,!1);n===n.next&&(n.steiner=!0);d.push(Pg(n))}d.sort(Ng);for(l=0;l<d.length;l++){b=d[l];k=f;if(k=Og(b,k))b=ef(k,b),Pc(b,b.next);f=Pc(f,f.next)}}if(a.length>80*c){var p=h=a[0];var r=d=a[1];for(k=c;k<e;k+=c)l=a[k],b=a[k+1],l<p&&(p=l),b<r&&(r=b),l>h&&(h=l),b>d&&(d=b);h=Math.max(h-p,d-r);h=0!==h?1/h:0}Qc(f,g,c,p,r,h);return g}},Va={area:function(a){for(var b=a.length,c=0,d=b-1,e=0;e<b;d=e++)c+=a[d].x*a[e].y-\na[e].x*a[d].y;return.5*c},isClockWise:function(a){return 0>Va.area(a)},triangulateShape:function(a,b){var c=[],d=[],e=[];ff(a);gf(c,a);var f=a.length;b.forEach(ff);for(a=0;a<b.length;a++)d.push(f),f+=b[a].length,gf(c,b[a]);b=Ug.triangulate(c,d);for(a=0;a<b.length;a+=3)e.push(b.slice(a,a+3));return e}};rb.prototype=Object.create(R.prototype);rb.prototype.constructor=rb;rb.prototype.toJSON=function(){var a=R.prototype.toJSON.call(this);return hf(this.parameters.shapes,this.parameters.options,a)};Oa.prototype=\nObject.create(C.prototype);Oa.prototype.constructor=Oa;Oa.prototype.toJSON=function(){var a=C.prototype.toJSON.call(this);return hf(this.parameters.shapes,this.parameters.options,a)};var Qg={generateTopUV:function(a,b,c,d,e){a=b[3*d];d=b[3*d+1];var f=b[3*e];e=b[3*e+1];return[new z(b[3*c],b[3*c+1]),new z(a,d),new z(f,e)]},generateSideWallUV:function(a,b,c,d,e,f){a=b[3*c];var g=b[3*c+1];c=b[3*c+2];var h=b[3*d],k=b[3*d+1];d=b[3*d+2];var m=b[3*e],l=b[3*e+1];e=b[3*e+2];var n=b[3*f],t=b[3*f+1];b=b[3*f+\n2];return.01>Math.abs(g-k)?[new z(a,1-c),new z(h,1-d),new z(m,1-e),new z(n,1-b)]:[new z(g,1-c),new z(k,1-d),new z(l,1-e),new z(t,1-b)]}};Sc.prototype=Object.create(R.prototype);Sc.prototype.constructor=Sc;Yb.prototype=Object.create(Oa.prototype);Yb.prototype.constructor=Yb;Tc.prototype=Object.create(R.prototype);Tc.prototype.constructor=Tc;sb.prototype=Object.create(C.prototype);sb.prototype.constructor=sb;Uc.prototype=Object.create(R.prototype);Uc.prototype.constructor=Uc;Zb.prototype=Object.create(C.prototype);\nZb.prototype.constructor=Zb;Vc.prototype=Object.create(R.prototype);Vc.prototype.constructor=Vc;$b.prototype=Object.create(C.prototype);$b.prototype.constructor=$b;tb.prototype=Object.create(R.prototype);tb.prototype.constructor=tb;tb.prototype.toJSON=function(){var a=R.prototype.toJSON.call(this);return jf(this.parameters.shapes,a)};ub.prototype=Object.create(C.prototype);ub.prototype.constructor=ub;ub.prototype.toJSON=function(){var a=C.prototype.toJSON.call(this);return jf(this.parameters.shapes,\na)};ac.prototype=Object.create(C.prototype);ac.prototype.constructor=ac;vb.prototype=Object.create(R.prototype);vb.prototype.constructor=vb;Wa.prototype=Object.create(C.prototype);Wa.prototype.constructor=Wa;Wc.prototype=Object.create(vb.prototype);Wc.prototype.constructor=Wc;Xc.prototype=Object.create(Wa.prototype);Xc.prototype.constructor=Xc;Yc.prototype=Object.create(R.prototype);Yc.prototype.constructor=Yc;bc.prototype=Object.create(C.prototype);bc.prototype.constructor=bc;var xa=Object.freeze({WireframeGeometry:Qb,\nParametricGeometry:Fc,ParametricBufferGeometry:Rb,TetrahedronGeometry:Hc,TetrahedronBufferGeometry:Sb,OctahedronGeometry:Ic,OctahedronBufferGeometry:pb,IcosahedronGeometry:Jc,IcosahedronBufferGeometry:Tb,DodecahedronGeometry:Kc,DodecahedronBufferGeometry:Ub,PolyhedronGeometry:Gc,PolyhedronBufferGeometry:na,TubeGeometry:Lc,TubeBufferGeometry:Vb,TorusKnotGeometry:Mc,TorusKnotBufferGeometry:Wb,TorusGeometry:Nc,TorusBufferGeometry:Xb,TextGeometry:Sc,TextBufferGeometry:Yb,SphereGeometry:Tc,SphereBufferGeometry:sb,\nRingGeometry:Uc,RingBufferGeometry:Zb,PlaneGeometry:uc,PlaneBufferGeometry:lb,LatheGeometry:Vc,LatheBufferGeometry:$b,ShapeGeometry:tb,ShapeBufferGeometry:ub,ExtrudeGeometry:rb,ExtrudeBufferGeometry:Oa,EdgesGeometry:ac,ConeGeometry:Wc,ConeBufferGeometry:Xc,CylinderGeometry:vb,CylinderBufferGeometry:Wa,CircleGeometry:Yc,CircleBufferGeometry:bc,BoxGeometry:Ib,BoxBufferGeometry:kb});wb.prototype=Object.create(J.prototype);wb.prototype.constructor=wb;wb.prototype.isShadowMaterial=!0;wb.prototype.copy=\nfunction(a){J.prototype.copy.call(this,a);this.color.copy(a.color);return this};cc.prototype=Object.create(ta.prototype);cc.prototype.constructor=cc;cc.prototype.isRawShaderMaterial=!0;Pa.prototype=Object.create(J.prototype);Pa.prototype.constructor=Pa;Pa.prototype.isMeshStandardMaterial=!0;Pa.prototype.copy=function(a){J.prototype.copy.call(this,a);this.defines={STANDARD:\"\"};this.color.copy(a.color);this.roughness=a.roughness;this.metalness=a.metalness;this.map=a.map;this.lightMap=a.lightMap;this.lightMapIntensity=\na.lightMapIntensity;this.aoMap=a.aoMap;this.aoMapIntensity=a.aoMapIntensity;this.emissive.copy(a.emissive);this.emissiveMap=a.emissiveMap;this.emissiveIntensity=a.emissiveIntensity;this.bumpMap=a.bumpMap;this.bumpScale=a.bumpScale;this.normalMap=a.normalMap;this.normalMapType=a.normalMapType;this.normalScale.copy(a.normalScale);this.displacementMap=a.displacementMap;this.displacementScale=a.displacementScale;this.displacementBias=a.displacementBias;this.roughnessMap=a.roughnessMap;this.metalnessMap=\na.metalnessMap;this.alphaMap=a.alphaMap;this.envMap=a.envMap;this.envMapIntensity=a.envMapIntensity;this.refractionRatio=a.refractionRatio;this.wireframe=a.wireframe;this.wireframeLinewidth=a.wireframeLinewidth;this.wireframeLinecap=a.wireframeLinecap;this.wireframeLinejoin=a.wireframeLinejoin;this.skinning=a.skinning;this.morphTargets=a.morphTargets;this.morphNormals=a.morphNormals;return this};xb.prototype=Object.create(Pa.prototype);xb.prototype.constructor=xb;xb.prototype.isMeshPhysicalMaterial=\n!0;xb.prototype.copy=function(a){Pa.prototype.copy.call(this,a);this.defines={PHYSICAL:\"\"};this.reflectivity=a.reflectivity;this.clearCoat=a.clearCoat;this.clearCoatRoughness=a.clearCoatRoughness;return this};Fa.prototype=Object.create(J.prototype);Fa.prototype.constructor=Fa;Fa.prototype.isMeshPhongMaterial=!0;Fa.prototype.copy=function(a){J.prototype.copy.call(this,a);this.color.copy(a.color);this.specular.copy(a.specular);this.shininess=a.shininess;this.map=a.map;this.lightMap=a.lightMap;this.lightMapIntensity=\na.lightMapIntensity;this.aoMap=a.aoMap;this.aoMapIntensity=a.aoMapIntensity;this.emissive.copy(a.emissive);this.emissiveMap=a.emissiveMap;this.emissiveIntensity=a.emissiveIntensity;this.bumpMap=a.bumpMap;this.bumpScale=a.bumpScale;this.normalMap=a.normalMap;this.normalMapType=a.normalMapType;this.normalScale.copy(a.normalScale);this.displacementMap=a.displacementMap;this.displacementScale=a.displacementScale;this.displacementBias=a.displacementBias;this.specularMap=a.specularMap;this.alphaMap=a.alphaMap;\nthis.envMap=a.envMap;this.combine=a.combine;this.reflectivity=a.reflectivity;this.refractionRatio=a.refractionRatio;this.wireframe=a.wireframe;this.wireframeLinewidth=a.wireframeLinewidth;this.wireframeLinecap=a.wireframeLinecap;this.wireframeLinejoin=a.wireframeLinejoin;this.skinning=a.skinning;this.morphTargets=a.morphTargets;this.morphNormals=a.morphNormals;return this};yb.prototype=Object.create(Fa.prototype);yb.prototype.constructor=yb;yb.prototype.isMeshToonMaterial=!0;yb.prototype.copy=function(a){Fa.prototype.copy.call(this,\na);this.gradientMap=a.gradientMap;return this};zb.prototype=Object.create(J.prototype);zb.prototype.constructor=zb;zb.prototype.isMeshNormalMaterial=!0;zb.prototype.copy=function(a){J.prototype.copy.call(this,a);this.bumpMap=a.bumpMap;this.bumpScale=a.bumpScale;this.normalMap=a.normalMap;this.normalMapType=a.normalMapType;this.normalScale.copy(a.normalScale);this.displacementMap=a.displacementMap;this.displacementScale=a.displacementScale;this.displacementBias=a.displacementBias;this.wireframe=a.wireframe;\nthis.wireframeLinewidth=a.wireframeLinewidth;this.skinning=a.skinning;this.morphTargets=a.morphTargets;this.morphNormals=a.morphNormals;return this};Ab.prototype=Object.create(J.prototype);Ab.prototype.constructor=Ab;Ab.prototype.isMeshLambertMaterial=!0;Ab.prototype.copy=function(a){J.prototype.copy.call(this,a);this.color.copy(a.color);this.map=a.map;this.lightMap=a.lightMap;this.lightMapIntensity=a.lightMapIntensity;this.aoMap=a.aoMap;this.aoMapIntensity=a.aoMapIntensity;this.emissive.copy(a.emissive);\nthis.emissiveMap=a.emissiveMap;this.emissiveIntensity=a.emissiveIntensity;this.specularMap=a.specularMap;this.alphaMap=a.alphaMap;this.envMap=a.envMap;this.combine=a.combine;this.reflectivity=a.reflectivity;this.refractionRatio=a.refractionRatio;this.wireframe=a.wireframe;this.wireframeLinewidth=a.wireframeLinewidth;this.wireframeLinecap=a.wireframeLinecap;this.wireframeLinejoin=a.wireframeLinejoin;this.skinning=a.skinning;this.morphTargets=a.morphTargets;this.morphNormals=a.morphNormals;return this};\nBb.prototype=Object.create(Y.prototype);Bb.prototype.constructor=Bb;Bb.prototype.isLineDashedMaterial=!0;Bb.prototype.copy=function(a){Y.prototype.copy.call(this,a);this.scale=a.scale;this.dashSize=a.dashSize;this.gapSize=a.gapSize;return this};var Vg=Object.freeze({ShadowMaterial:wb,SpriteMaterial:cb,RawShaderMaterial:cc,ShaderMaterial:ta,PointsMaterial:Ea,MeshPhysicalMaterial:xb,MeshStandardMaterial:Pa,MeshPhongMaterial:Fa,MeshToonMaterial:yb,MeshNormalMaterial:zb,MeshLambertMaterial:Ab,MeshDepthMaterial:$a,\nMeshDistanceMaterial:ab,MeshBasicMaterial:da,LineDashedMaterial:Bb,LineBasicMaterial:Y,Material:J}),Fb={enabled:!1,files:{},add:function(a,b){!1!==this.enabled&&(this.files[a]=b)},get:function(a){if(!1!==this.enabled)return this.files[a]},remove:function(a){delete this.files[a]},clear:function(){this.files={}}},ka=new ce,Ya={};Object.assign(Ga.prototype,{load:function(a,b,c,d){void 0===a&&(a=\"\");void 0!==this.path&&(a=this.path+a);a=this.manager.resolveURL(a);var e=this,f=Fb.get(a);if(void 0!==f)return e.manager.itemStart(a),\nsetTimeout(function(){b&&b(f);e.manager.itemEnd(a)},0),f;if(void 0!==Ya[a])Ya[a].push({onLoad:b,onProgress:c,onError:d});else{var g=a.match(/^data:(.*?)(;base64)?,(.*)$/);if(g){c=g[1];var h=!!g[2];g=g[3];g=window.decodeURIComponent(g);h&&(g=window.atob(g));try{var k=(this.responseType||\"\").toLowerCase();switch(k){case \"arraybuffer\":case \"blob\":var m=new Uint8Array(g.length);for(h=0;h<g.length;h++)m[h]=g.charCodeAt(h);var l=\"blob\"===k?new Blob([m.buffer],{type:c}):m.buffer;break;case \"document\":l=\n(new DOMParser).parseFromString(g,c);break;case \"json\":l=JSON.parse(g);break;default:l=g}window.setTimeout(function(){b&&b(l);e.manager.itemEnd(a)},0)}catch(t){window.setTimeout(function(){d&&d(t);e.manager.itemEnd(a);e.manager.itemError(a)},0)}}else{Ya[a]=[];Ya[a].push({onLoad:b,onProgress:c,onError:d});var n=new XMLHttpRequest;n.open(\"GET\",a,!0);n.addEventListener(\"load\",function(b){var c=this.response;Fb.add(a,c);var d=Ya[a];delete Ya[a];if(200===this.status||0===this.status){0===this.status&&\nconsole.warn(\"THREE.FileLoader: HTTP Status 0 received.\");for(var f=0,g=d.length;f<g;f++){var h=d[f];if(h.onLoad)h.onLoad(c)}e.manager.itemEnd(a)}else{f=0;for(g=d.length;f<g;f++)if(h=d[f],h.onError)h.onError(b);e.manager.itemEnd(a);e.manager.itemError(a)}},!1);n.addEventListener(\"progress\",function(b){for(var c=Ya[a],d=0,e=c.length;d<e;d++){var f=c[d];if(f.onProgress)f.onProgress(b)}},!1);n.addEventListener(\"error\",function(b){var c=Ya[a];delete Ya[a];for(var d=0,f=c.length;d<f;d++){var g=c[d];if(g.onError)g.onError(b)}e.manager.itemEnd(a);\ne.manager.itemError(a)},!1);void 0!==this.responseType&&(n.responseType=this.responseType);void 0!==this.withCredentials&&(n.withCredentials=this.withCredentials);n.overrideMimeType&&n.overrideMimeType(void 0!==this.mimeType?this.mimeType:\"text/plain\");for(h in this.requestHeader)n.setRequestHeader(h,this.requestHeader[h]);n.send(null)}e.manager.itemStart(a);return n}},setPath:function(a){this.path=a;return this},setResponseType:function(a){this.responseType=a;return this},setWithCredentials:function(a){this.withCredentials=\na;return this},setMimeType:function(a){this.mimeType=a;return this},setRequestHeader:function(a){this.requestHeader=a;return this}});Object.assign(kf.prototype,{load:function(a,b,c,d){function e(e){k.load(a[e],function(a){a=f._parser(a,!0);g[e]={width:a.width,height:a.height,format:a.format,mipmaps:a.mipmaps};m+=1;6===m&&(1===a.mipmapCount&&(h.minFilter=1006),h.format=a.format,h.needsUpdate=!0,b&&b(h))},c,d)}var f=this,g=[],h=new Pb;h.image=g;var k=new Ga(this.manager);k.setPath(this.path);k.setResponseType(\"arraybuffer\");\nif(Array.isArray(a))for(var m=0,l=0,n=a.length;l<n;++l)e(l);else k.load(a,function(a){a=f._parser(a,!0);if(a.isCubemap)for(var c=a.mipmaps.length/a.mipmapCount,d=0;d<c;d++){g[d]={mipmaps:[]};for(var e=0;e<a.mipmapCount;e++)g[d].mipmaps.push(a.mipmaps[d*a.mipmapCount+e]),g[d].format=a.format,g[d].width=a.width,g[d].height=a.height}else h.image.width=a.width,h.image.height=a.height,h.mipmaps=a.mipmaps;1===a.mipmapCount&&(h.minFilter=1006);h.format=a.format;h.needsUpdate=!0;b&&b(h)},c,d);return h},setPath:function(a){this.path=\na;return this}});Object.assign(de.prototype,{load:function(a,b,c,d){var e=this,f=new gb,g=new Ga(this.manager);g.setResponseType(\"arraybuffer\");g.load(a,function(a){if(a=e._parser(a))void 0!==a.image?f.image=a.image:void 0!==a.data&&(f.image.width=a.width,f.image.height=a.height,f.image.data=a.data),f.wrapS=void 0!==a.wrapS?a.wrapS:1001,f.wrapT=void 0!==a.wrapT?a.wrapT:1001,f.magFilter=void 0!==a.magFilter?a.magFilter:1006,f.minFilter=void 0!==a.minFilter?a.minFilter:1008,f.anisotropy=void 0!==a.anisotropy?\na.anisotropy:1,void 0!==a.format&&(f.format=a.format),void 0!==a.type&&(f.type=a.type),void 0!==a.mipmaps&&(f.mipmaps=a.mipmaps),1===a.mipmapCount&&(f.minFilter=1006),f.needsUpdate=!0,b&&b(f,a)},c,d);return f}});Object.assign(Zc.prototype,{crossOrigin:\"anonymous\",load:function(a,b,c,d){function e(){k.removeEventListener(\"load\",e,!1);k.removeEventListener(\"error\",f,!1);Fb.add(a,this);b&&b(this);g.manager.itemEnd(a)}function f(b){k.removeEventListener(\"load\",e,!1);k.removeEventListener(\"error\",f,!1);\nd&&d(b);g.manager.itemEnd(a);g.manager.itemError(a)}void 0===a&&(a=\"\");void 0!==this.path&&(a=this.path+a);a=this.manager.resolveURL(a);var g=this,h=Fb.get(a);if(void 0!==h)return g.manager.itemStart(a),setTimeout(function(){b&&b(h);g.manager.itemEnd(a)},0),h;var k=document.createElementNS(\"http://www.w3.org/1999/xhtml\",\"img\");k.addEventListener(\"load\",e,!1);k.addEventListener(\"error\",f,!1);\"data:\"!==a.substr(0,5)&&void 0!==this.crossOrigin&&(k.crossOrigin=this.crossOrigin);g.manager.itemStart(a);\nk.src=a;return k},setCrossOrigin:function(a){this.crossOrigin=a;return this},setPath:function(a){this.path=a;return this}});Object.assign(ee.prototype,{crossOrigin:\"anonymous\",load:function(a,b,c,d){function e(c){g.load(a[c],function(a){f.images[c]=a;h++;6===h&&(f.needsUpdate=!0,b&&b(f))},void 0,d)}var f=new Ua,g=new Zc(this.manager);g.setCrossOrigin(this.crossOrigin);g.setPath(this.path);var h=0;for(c=0;c<a.length;++c)e(c);return f},setCrossOrigin:function(a){this.crossOrigin=a;return this},setPath:function(a){this.path=\na;return this}});Object.assign(vd.prototype,{crossOrigin:\"anonymous\",load:function(a,b,c,d){var e=new T,f=new Zc(this.manager);f.setCrossOrigin(this.crossOrigin);f.setPath(this.path);f.load(a,function(c){e.image=c;c=0<a.search(/\\.(jpg|jpeg)$/)||0===a.search(/^data:image\\/jpeg/);e.format=c?1022:1023;e.needsUpdate=!0;void 0!==b&&b(e)},c,d);return e},setCrossOrigin:function(a){this.crossOrigin=a;return this},setPath:function(a){this.path=a;return this}});Object.assign(L.prototype,{getPoint:function(){console.warn(\"THREE.Curve: .getPoint() not implemented.\");\nreturn null},getPointAt:function(a,b){a=this.getUtoTmapping(a);return this.getPoint(a,b)},getPoints:function(a){void 0===a&&(a=5);for(var b=[],c=0;c<=a;c++)b.push(this.getPoint(c/a));return b},getSpacedPoints:function(a){void 0===a&&(a=5);for(var b=[],c=0;c<=a;c++)b.push(this.getPointAt(c/a));return b},getLength:function(){var a=this.getLengths();return a[a.length-1]},getLengths:function(a){void 0===a&&(a=this.arcLengthDivisions);if(this.cacheArcLengths&&this.cacheArcLengths.length===a+1&&!this.needsUpdate)return this.cacheArcLengths;\nthis.needsUpdate=!1;var b=[],c=this.getPoint(0),d,e=0;b.push(0);for(d=1;d<=a;d++){var f=this.getPoint(d/a);e+=f.distanceTo(c);b.push(e);c=f}return this.cacheArcLengths=b},updateArcLengths:function(){this.needsUpdate=!0;this.getLengths()},getUtoTmapping:function(a,b){var c=this.getLengths(),d=c.length;b=b?b:a*c[d-1];for(var e=0,f=d-1,g;e<=f;)if(a=Math.floor(e+(f-e)/2),g=c[a]-b,0>g)e=a+1;else if(0<g)f=a-1;else{f=a;break}a=f;if(c[a]===b)return a/(d-1);e=c[a];return(a+(b-e)/(c[a+1]-e))/(d-1)},getTangent:function(a){var b=\na-1E-4;a+=1E-4;0>b&&(b=0);1<a&&(a=1);b=this.getPoint(b);return this.getPoint(a).clone().sub(b).normalize()},getTangentAt:function(a){a=this.getUtoTmapping(a);return this.getTangent(a)},computeFrenetFrames:function(a,b){var c=new p,d=[],e=[],f=[],g=new p,h=new I,k;for(k=0;k<=a;k++){var m=k/a;d[k]=this.getTangentAt(m);d[k].normalize()}e[0]=new p;f[0]=new p;k=Number.MAX_VALUE;m=Math.abs(d[0].x);var l=Math.abs(d[0].y),n=Math.abs(d[0].z);m<=k&&(k=m,c.set(1,0,0));l<=k&&(k=l,c.set(0,1,0));n<=k&&c.set(0,\n0,1);g.crossVectors(d[0],c).normalize();e[0].crossVectors(d[0],g);f[0].crossVectors(d[0],e[0]);for(k=1;k<=a;k++)e[k]=e[k-1].clone(),f[k]=f[k-1].clone(),g.crossVectors(d[k-1],d[k]),g.length()>Number.EPSILON&&(g.normalize(),c=Math.acos(H.clamp(d[k-1].dot(d[k]),-1,1)),e[k].applyMatrix4(h.makeRotationAxis(g,c))),f[k].crossVectors(d[k],e[k]);if(!0===b)for(c=Math.acos(H.clamp(e[0].dot(e[a]),-1,1)),c/=a,0<d[0].dot(g.crossVectors(e[0],e[a]))&&(c=-c),k=1;k<=a;k++)e[k].applyMatrix4(h.makeRotationAxis(d[k],\nc*k)),f[k].crossVectors(d[k],e[k]);return{tangents:d,normals:e,binormals:f}},clone:function(){return(new this.constructor).copy(this)},copy:function(a){this.arcLengthDivisions=a.arcLengthDivisions;return this},toJSON:function(){var a={metadata:{version:4.5,type:\"Curve\",generator:\"Curve.toJSON\"}};a.arcLengthDivisions=this.arcLengthDivisions;a.type=this.type;return a},fromJSON:function(a){this.arcLengthDivisions=a.arcLengthDivisions;return this}});za.prototype=Object.create(L.prototype);za.prototype.constructor=\nza;za.prototype.isEllipseCurve=!0;za.prototype.getPoint=function(a,b){b=b||new z;for(var c=2*Math.PI,d=this.aEndAngle-this.aStartAngle,e=Math.abs(d)<Number.EPSILON;0>d;)d+=c;for(;d>c;)d-=c;d<Number.EPSILON&&(d=e?0:c);!0!==this.aClockwise||e||(d=d===c?-c:d-c);c=this.aStartAngle+a*d;a=this.aX+this.xRadius*Math.cos(c);var f=this.aY+this.yRadius*Math.sin(c);0!==this.aRotation&&(c=Math.cos(this.aRotation),d=Math.sin(this.aRotation),e=a-this.aX,f-=this.aY,a=e*c-f*d+this.aX,f=e*d+f*c+this.aY);return b.set(a,\nf)};za.prototype.copy=function(a){L.prototype.copy.call(this,a);this.aX=a.aX;this.aY=a.aY;this.xRadius=a.xRadius;this.yRadius=a.yRadius;this.aStartAngle=a.aStartAngle;this.aEndAngle=a.aEndAngle;this.aClockwise=a.aClockwise;this.aRotation=a.aRotation;return this};za.prototype.toJSON=function(){var a=L.prototype.toJSON.call(this);a.aX=this.aX;a.aY=this.aY;a.xRadius=this.xRadius;a.yRadius=this.yRadius;a.aStartAngle=this.aStartAngle;a.aEndAngle=this.aEndAngle;a.aClockwise=this.aClockwise;a.aRotation=\nthis.aRotation;return a};za.prototype.fromJSON=function(a){L.prototype.fromJSON.call(this,a);this.aX=a.aX;this.aY=a.aY;this.xRadius=a.xRadius;this.yRadius=a.yRadius;this.aStartAngle=a.aStartAngle;this.aEndAngle=a.aEndAngle;this.aClockwise=a.aClockwise;this.aRotation=a.aRotation;return this};dc.prototype=Object.create(za.prototype);dc.prototype.constructor=dc;dc.prototype.isArcCurve=!0;var Od=new p,Ae=new fe,Be=new fe,Ce=new fe;ca.prototype=Object.create(L.prototype);ca.prototype.constructor=ca;ca.prototype.isCatmullRomCurve3=\n!0;ca.prototype.getPoint=function(a,b){b=b||new p;var c=this.points,d=c.length;a*=d-(this.closed?0:1);var e=Math.floor(a);a-=e;this.closed?e+=0<e?0:(Math.floor(Math.abs(e)/d)+1)*d:0===a&&e===d-1&&(e=d-2,a=1);if(this.closed||0<e)var f=c[(e-1)%d];else Od.subVectors(c[0],c[1]).add(c[0]),f=Od;var g=c[e%d];var h=c[(e+1)%d];this.closed||e+2<d?c=c[(e+2)%d]:(Od.subVectors(c[d-1],c[d-2]).add(c[d-1]),c=Od);if(\"centripetal\"===this.curveType||\"chordal\"===this.curveType){var k=\"chordal\"===this.curveType?.5:.25;\nd=Math.pow(f.distanceToSquared(g),k);e=Math.pow(g.distanceToSquared(h),k);k=Math.pow(h.distanceToSquared(c),k);1E-4>e&&(e=1);1E-4>d&&(d=e);1E-4>k&&(k=e);Ae.initNonuniformCatmullRom(f.x,g.x,h.x,c.x,d,e,k);Be.initNonuniformCatmullRom(f.y,g.y,h.y,c.y,d,e,k);Ce.initNonuniformCatmullRom(f.z,g.z,h.z,c.z,d,e,k)}else\"catmullrom\"===this.curveType&&(Ae.initCatmullRom(f.x,g.x,h.x,c.x,this.tension),Be.initCatmullRom(f.y,g.y,h.y,c.y,this.tension),Ce.initCatmullRom(f.z,g.z,h.z,c.z,this.tension));b.set(Ae.calc(a),\nBe.calc(a),Ce.calc(a));return b};ca.prototype.copy=function(a){L.prototype.copy.call(this,a);this.points=[];for(var b=0,c=a.points.length;b<c;b++)this.points.push(a.points[b].clone());this.closed=a.closed;this.curveType=a.curveType;this.tension=a.tension;return this};ca.prototype.toJSON=function(){var a=L.prototype.toJSON.call(this);a.points=[];for(var b=0,c=this.points.length;b<c;b++)a.points.push(this.points[b].toArray());a.closed=this.closed;a.curveType=this.curveType;a.tension=this.tension;return a};\nca.prototype.fromJSON=function(a){L.prototype.fromJSON.call(this,a);this.points=[];for(var b=0,c=a.points.length;b<c;b++){var d=a.points[b];this.points.push((new p).fromArray(d))}this.closed=a.closed;this.curveType=a.curveType;this.tension=a.tension;return this};Ha.prototype=Object.create(L.prototype);Ha.prototype.constructor=Ha;Ha.prototype.isCubicBezierCurve=!0;Ha.prototype.getPoint=function(a,b){b=b||new z;var c=this.v0,d=this.v1,e=this.v2,f=this.v3;b.set(ad(a,c.x,d.x,e.x,f.x),ad(a,c.y,d.y,e.y,\nf.y));return b};Ha.prototype.copy=function(a){L.prototype.copy.call(this,a);this.v0.copy(a.v0);this.v1.copy(a.v1);this.v2.copy(a.v2);this.v3.copy(a.v3);return this};Ha.prototype.toJSON=function(){var a=L.prototype.toJSON.call(this);a.v0=this.v0.toArray();a.v1=this.v1.toArray();a.v2=this.v2.toArray();a.v3=this.v3.toArray();return a};Ha.prototype.fromJSON=function(a){L.prototype.fromJSON.call(this,a);this.v0.fromArray(a.v0);this.v1.fromArray(a.v1);this.v2.fromArray(a.v2);this.v3.fromArray(a.v3);return this};\nQa.prototype=Object.create(L.prototype);Qa.prototype.constructor=Qa;Qa.prototype.isCubicBezierCurve3=!0;Qa.prototype.getPoint=function(a,b){b=b||new p;var c=this.v0,d=this.v1,e=this.v2,f=this.v3;b.set(ad(a,c.x,d.x,e.x,f.x),ad(a,c.y,d.y,e.y,f.y),ad(a,c.z,d.z,e.z,f.z));return b};Qa.prototype.copy=function(a){L.prototype.copy.call(this,a);this.v0.copy(a.v0);this.v1.copy(a.v1);this.v2.copy(a.v2);this.v3.copy(a.v3);return this};Qa.prototype.toJSON=function(){var a=L.prototype.toJSON.call(this);a.v0=this.v0.toArray();\na.v1=this.v1.toArray();a.v2=this.v2.toArray();a.v3=this.v3.toArray();return a};Qa.prototype.fromJSON=function(a){L.prototype.fromJSON.call(this,a);this.v0.fromArray(a.v0);this.v1.fromArray(a.v1);this.v2.fromArray(a.v2);this.v3.fromArray(a.v3);return this};va.prototype=Object.create(L.prototype);va.prototype.constructor=va;va.prototype.isLineCurve=!0;va.prototype.getPoint=function(a,b){b=b||new z;1===a?b.copy(this.v2):(b.copy(this.v2).sub(this.v1),b.multiplyScalar(a).add(this.v1));return b};va.prototype.getPointAt=\nfunction(a,b){return this.getPoint(a,b)};va.prototype.getTangent=function(){return this.v2.clone().sub(this.v1).normalize()};va.prototype.copy=function(a){L.prototype.copy.call(this,a);this.v1.copy(a.v1);this.v2.copy(a.v2);return this};va.prototype.toJSON=function(){var a=L.prototype.toJSON.call(this);a.v1=this.v1.toArray();a.v2=this.v2.toArray();return a};va.prototype.fromJSON=function(a){L.prototype.fromJSON.call(this,a);this.v1.fromArray(a.v1);this.v2.fromArray(a.v2);return this};Ia.prototype=\nObject.create(L.prototype);Ia.prototype.constructor=Ia;Ia.prototype.isLineCurve3=!0;Ia.prototype.getPoint=function(a,b){b=b||new p;1===a?b.copy(this.v2):(b.copy(this.v2).sub(this.v1),b.multiplyScalar(a).add(this.v1));return b};Ia.prototype.getPointAt=function(a,b){return this.getPoint(a,b)};Ia.prototype.copy=function(a){L.prototype.copy.call(this,a);this.v1.copy(a.v1);this.v2.copy(a.v2);return this};Ia.prototype.toJSON=function(){var a=L.prototype.toJSON.call(this);a.v1=this.v1.toArray();a.v2=this.v2.toArray();\nreturn a};Ia.prototype.fromJSON=function(a){L.prototype.fromJSON.call(this,a);this.v1.fromArray(a.v1);this.v2.fromArray(a.v2);return this};Ja.prototype=Object.create(L.prototype);Ja.prototype.constructor=Ja;Ja.prototype.isQuadraticBezierCurve=!0;Ja.prototype.getPoint=function(a,b){b=b||new z;var c=this.v0,d=this.v1,e=this.v2;b.set($c(a,c.x,d.x,e.x),$c(a,c.y,d.y,e.y));return b};Ja.prototype.copy=function(a){L.prototype.copy.call(this,a);this.v0.copy(a.v0);this.v1.copy(a.v1);this.v2.copy(a.v2);return this};\nJa.prototype.toJSON=function(){var a=L.prototype.toJSON.call(this);a.v0=this.v0.toArray();a.v1=this.v1.toArray();a.v2=this.v2.toArray();return a};Ja.prototype.fromJSON=function(a){L.prototype.fromJSON.call(this,a);this.v0.fromArray(a.v0);this.v1.fromArray(a.v1);this.v2.fromArray(a.v2);return this};Ra.prototype=Object.create(L.prototype);Ra.prototype.constructor=Ra;Ra.prototype.isQuadraticBezierCurve3=!0;Ra.prototype.getPoint=function(a,b){b=b||new p;var c=this.v0,d=this.v1,e=this.v2;b.set($c(a,c.x,\nd.x,e.x),$c(a,c.y,d.y,e.y),$c(a,c.z,d.z,e.z));return b};Ra.prototype.copy=function(a){L.prototype.copy.call(this,a);this.v0.copy(a.v0);this.v1.copy(a.v1);this.v2.copy(a.v2);return this};Ra.prototype.toJSON=function(){var a=L.prototype.toJSON.call(this);a.v0=this.v0.toArray();a.v1=this.v1.toArray();a.v2=this.v2.toArray();return a};Ra.prototype.fromJSON=function(a){L.prototype.fromJSON.call(this,a);this.v0.fromArray(a.v0);this.v1.fromArray(a.v1);this.v2.fromArray(a.v2);return this};Ka.prototype=Object.create(L.prototype);\nKa.prototype.constructor=Ka;Ka.prototype.isSplineCurve=!0;Ka.prototype.getPoint=function(a,b){b=b||new z;var c=this.points,d=(c.length-1)*a;a=Math.floor(d);d-=a;var e=c[0===a?a:a-1],f=c[a],g=c[a>c.length-2?c.length-1:a+1];c=c[a>c.length-3?c.length-1:a+2];b.set(lf(d,e.x,f.x,g.x,c.x),lf(d,e.y,f.y,g.y,c.y));return b};Ka.prototype.copy=function(a){L.prototype.copy.call(this,a);this.points=[];for(var b=0,c=a.points.length;b<c;b++)this.points.push(a.points[b].clone());return this};Ka.prototype.toJSON=function(){var a=\nL.prototype.toJSON.call(this);a.points=[];for(var b=0,c=this.points.length;b<c;b++)a.points.push(this.points[b].toArray());return a};Ka.prototype.fromJSON=function(a){L.prototype.fromJSON.call(this,a);this.points=[];for(var b=0,c=a.points.length;b<c;b++){var d=a.points[b];this.points.push((new z).fromArray(d))}return this};var Af=Object.freeze({ArcCurve:dc,CatmullRomCurve3:ca,CubicBezierCurve:Ha,CubicBezierCurve3:Qa,EllipseCurve:za,LineCurve:va,LineCurve3:Ia,QuadraticBezierCurve:Ja,QuadraticBezierCurve3:Ra,\nSplineCurve:Ka});Xa.prototype=Object.assign(Object.create(L.prototype),{constructor:Xa,add:function(a){this.curves.push(a)},closePath:function(){var a=this.curves[0].getPoint(0),b=this.curves[this.curves.length-1].getPoint(1);a.equals(b)||this.curves.push(new va(b,a))},getPoint:function(a){var b=a*this.getLength(),c=this.getCurveLengths();for(a=0;a<c.length;){if(c[a]>=b)return b=c[a]-b,a=this.curves[a],c=a.getLength(),a.getPointAt(0===c?0:1-b/c);a++}return null},getLength:function(){var a=this.getCurveLengths();\nreturn a[a.length-1]},updateArcLengths:function(){this.needsUpdate=!0;this.cacheLengths=null;this.getCurveLengths()},getCurveLengths:function(){if(this.cacheLengths&&this.cacheLengths.length===this.curves.length)return this.cacheLengths;for(var a=[],b=0,c=0,d=this.curves.length;c<d;c++)b+=this.curves[c].getLength(),a.push(b);return this.cacheLengths=a},getSpacedPoints:function(a){void 0===a&&(a=40);for(var b=[],c=0;c<=a;c++)b.push(this.getPoint(c/a));this.autoClose&&b.push(b[0]);return b},getPoints:function(a){a=\na||12;for(var b=[],c,d=0,e=this.curves;d<e.length;d++){var f=e[d];f=f.getPoints(f&&f.isEllipseCurve?2*a:f&&(f.isLineCurve||f.isLineCurve3)?1:f&&f.isSplineCurve?a*f.points.length:a);for(var g=0;g<f.length;g++){var h=f[g];c&&c.equals(h)||(b.push(h),c=h)}}this.autoClose&&1<b.length&&!b[b.length-1].equals(b[0])&&b.push(b[0]);return b},copy:function(a){L.prototype.copy.call(this,a);this.curves=[];for(var b=0,c=a.curves.length;b<c;b++)this.curves.push(a.curves[b].clone());this.autoClose=a.autoClose;return this},\ntoJSON:function(){var a=L.prototype.toJSON.call(this);a.autoClose=this.autoClose;a.curves=[];for(var b=0,c=this.curves.length;b<c;b++)a.curves.push(this.curves[b].toJSON());return a},fromJSON:function(a){L.prototype.fromJSON.call(this,a);this.autoClose=a.autoClose;this.curves=[];for(var b=0,c=a.curves.length;b<c;b++){var d=a.curves[b];this.curves.push((new Af[d.type]).fromJSON(d))}return this}});La.prototype=Object.assign(Object.create(Xa.prototype),{constructor:La,setFromPoints:function(a){this.moveTo(a[0].x,\na[0].y);for(var b=1,c=a.length;b<c;b++)this.lineTo(a[b].x,a[b].y)},moveTo:function(a,b){this.currentPoint.set(a,b)},lineTo:function(a,b){var c=new va(this.currentPoint.clone(),new z(a,b));this.curves.push(c);this.currentPoint.set(a,b)},quadraticCurveTo:function(a,b,c,d){a=new Ja(this.currentPoint.clone(),new z(a,b),new z(c,d));this.curves.push(a);this.currentPoint.set(c,d)},bezierCurveTo:function(a,b,c,d,e,f){a=new Ha(this.currentPoint.clone(),new z(a,b),new z(c,d),new z(e,f));this.curves.push(a);\nthis.currentPoint.set(e,f)},splineThru:function(a){var b=[this.currentPoint.clone()].concat(a);b=new Ka(b);this.curves.push(b);this.currentPoint.copy(a[a.length-1])},arc:function(a,b,c,d,e,f){this.absarc(a+this.currentPoint.x,b+this.currentPoint.y,c,d,e,f)},absarc:function(a,b,c,d,e,f){this.absellipse(a,b,c,c,d,e,f)},ellipse:function(a,b,c,d,e,f,g,h){this.absellipse(a+this.currentPoint.x,b+this.currentPoint.y,c,d,e,f,g,h)},absellipse:function(a,b,c,d,e,f,g,h){a=new za(a,b,c,d,e,f,g,h);0<this.curves.length&&\n(b=a.getPoint(0),b.equals(this.currentPoint)||this.lineTo(b.x,b.y));this.curves.push(a);a=a.getPoint(1);this.currentPoint.copy(a)},copy:function(a){Xa.prototype.copy.call(this,a);this.currentPoint.copy(a.currentPoint);return this},toJSON:function(){var a=Xa.prototype.toJSON.call(this);a.currentPoint=this.currentPoint.toArray();return a},fromJSON:function(a){Xa.prototype.fromJSON.call(this,a);this.currentPoint.fromArray(a.currentPoint);return this}});db.prototype=Object.assign(Object.create(La.prototype),\n{constructor:db,getPointsHoles:function(a){for(var b=[],c=0,d=this.holes.length;c<d;c++)b[c]=this.holes[c].getPoints(a);return b},extractPoints:function(a){return{shape:this.getPoints(a),holes:this.getPointsHoles(a)}},copy:function(a){La.prototype.copy.call(this,a);this.holes=[];for(var b=0,c=a.holes.length;b<c;b++)this.holes.push(a.holes[b].clone());return this},toJSON:function(){var a=La.prototype.toJSON.call(this);a.uuid=this.uuid;a.holes=[];for(var b=0,c=this.holes.length;b<c;b++)a.holes.push(this.holes[b].toJSON());\nreturn a},fromJSON:function(a){La.prototype.fromJSON.call(this,a);this.uuid=a.uuid;this.holes=[];for(var b=0,c=a.holes.length;b<c;b++){var d=a.holes[b];this.holes.push((new La).fromJSON(d))}return this}});X.prototype=Object.assign(Object.create(D.prototype),{constructor:X,isLight:!0,copy:function(a){D.prototype.copy.call(this,a);this.color.copy(a.color);this.intensity=a.intensity;return this},toJSON:function(a){a=D.prototype.toJSON.call(this,a);a.object.color=this.color.getHex();a.object.intensity=\nthis.intensity;void 0!==this.groundColor&&(a.object.groundColor=this.groundColor.getHex());void 0!==this.distance&&(a.object.distance=this.distance);void 0!==this.angle&&(a.object.angle=this.angle);void 0!==this.decay&&(a.object.decay=this.decay);void 0!==this.penumbra&&(a.object.penumbra=this.penumbra);void 0!==this.shadow&&(a.object.shadow=this.shadow.toJSON());return a}});wd.prototype=Object.assign(Object.create(X.prototype),{constructor:wd,isHemisphereLight:!0,copy:function(a){X.prototype.copy.call(this,\na);this.groundColor.copy(a.groundColor);return this}});Object.assign(Cb.prototype,{copy:function(a){this.camera=a.camera.clone();this.bias=a.bias;this.radius=a.radius;this.mapSize.copy(a.mapSize);return this},clone:function(){return(new this.constructor).copy(this)},toJSON:function(){var a={};0!==this.bias&&(a.bias=this.bias);1!==this.radius&&(a.radius=this.radius);if(512!==this.mapSize.x||512!==this.mapSize.y)a.mapSize=this.mapSize.toArray();a.camera=this.camera.toJSON(!1).object;delete a.camera.matrix;\nreturn a}});xd.prototype=Object.assign(Object.create(Cb.prototype),{constructor:xd,isSpotLightShadow:!0,update:function(a){var b=this.camera,c=2*H.RAD2DEG*a.angle,d=this.mapSize.width/this.mapSize.height;a=a.distance||b.far;if(c!==b.fov||d!==b.aspect||a!==b.far)b.fov=c,b.aspect=d,b.far=a,b.updateProjectionMatrix()}});yd.prototype=Object.assign(Object.create(X.prototype),{constructor:yd,isSpotLight:!0,copy:function(a){X.prototype.copy.call(this,a);this.distance=a.distance;this.angle=a.angle;this.penumbra=\na.penumbra;this.decay=a.decay;this.target=a.target.clone();this.shadow=a.shadow.clone();return this}});zd.prototype=Object.assign(Object.create(X.prototype),{constructor:zd,isPointLight:!0,copy:function(a){X.prototype.copy.call(this,a);this.distance=a.distance;this.decay=a.decay;this.shadow=a.shadow.clone();return this}});Ad.prototype=Object.assign(Object.create(Cb.prototype),{constructor:Ad});Bd.prototype=Object.assign(Object.create(X.prototype),{constructor:Bd,isDirectionalLight:!0,copy:function(a){X.prototype.copy.call(this,\na);this.target=a.target.clone();this.shadow=a.shadow.clone();return this}});Cd.prototype=Object.assign(Object.create(X.prototype),{constructor:Cd,isAmbientLight:!0});Dd.prototype=Object.assign(Object.create(X.prototype),{constructor:Dd,isRectAreaLight:!0,copy:function(a){X.prototype.copy.call(this,a);this.width=a.width;this.height=a.height;return this},toJSON:function(a){a=X.prototype.toJSON.call(this,a);a.object.width=this.width;a.object.height=this.height;return a}});var ia={arraySlice:function(a,\nb,c){return ia.isTypedArray(a)?new a.constructor(a.subarray(b,void 0!==c?c:a.length)):a.slice(b,c)},convertArray:function(a,b,c){return!a||!c&&a.constructor===b?a:\"number\"===typeof b.BYTES_PER_ELEMENT?new b(a):Array.prototype.slice.call(a)},isTypedArray:function(a){return ArrayBuffer.isView(a)&&!(a instanceof DataView)},getKeyframeOrder:function(a){for(var b=a.length,c=Array(b),d=0;d!==b;++d)c[d]=d;c.sort(function(b,c){return a[b]-a[c]});return c},sortedArray:function(a,b,c){for(var d=a.length,e=\nnew a.constructor(d),f=0,g=0;g!==d;++f)for(var h=c[f]*b,k=0;k!==b;++k)e[g++]=a[h+k];return e},flattenJSON:function(a,b,c,d){for(var e=1,f=a[0];void 0!==f&&void 0===f[d];)f=a[e++];if(void 0!==f){var g=f[d];if(void 0!==g)if(Array.isArray(g)){do g=f[d],void 0!==g&&(b.push(f.time),c.push.apply(c,g)),f=a[e++];while(void 0!==f)}else if(void 0!==g.toArray){do g=f[d],void 0!==g&&(b.push(f.time),g.toArray(c,c.length)),f=a[e++];while(void 0!==f)}else{do g=f[d],void 0!==g&&(b.push(f.time),c.push(g)),f=a[e++];\nwhile(void 0!==f)}}}};Object.assign(wa.prototype,{evaluate:function(a){var b=this.parameterPositions,c=this._cachedIndex,d=b[c],e=b[c-1];a:{b:{c:{d:if(!(a<d)){for(var f=c+2;;){if(void 0===d){if(a<e)break d;this._cachedIndex=c=b.length;return this.afterEnd_(c-1,a,e)}if(c===f)break;e=d;d=b[++c];if(a<d)break b}d=b.length;break c}if(a>=e)break a;else{f=b[1];a<f&&(c=2,e=f);for(f=c-2;;){if(void 0===e)return this._cachedIndex=0,this.beforeStart_(0,a,d);if(c===f)break;d=e;e=b[--c-1];if(a>=e)break b}d=c;c=\n0}}for(;c<d;)e=c+d>>>1,a<b[e]?d=e:c=e+1;d=b[c];e=b[c-1];if(void 0===e)return this._cachedIndex=0,this.beforeStart_(0,a,d);if(void 0===d)return this._cachedIndex=c=b.length,this.afterEnd_(c-1,e,a)}this._cachedIndex=c;this.intervalChanged_(c,e,d)}return this.interpolate_(c,e,a,d)},settings:null,DefaultSettings_:{},getSettings_:function(){return this.settings||this.DefaultSettings_},copySampleValue_:function(a){var b=this.resultBuffer,c=this.sampleValues,d=this.valueSize;a*=d;for(var e=0;e!==d;++e)b[e]=\nc[a+e];return b},interpolate_:function(){throw Error(\"call to abstract method\");},intervalChanged_:function(){}});Object.assign(wa.prototype,{beforeStart_:wa.prototype.copySampleValue_,afterEnd_:wa.prototype.copySampleValue_});Ed.prototype=Object.assign(Object.create(wa.prototype),{constructor:Ed,DefaultSettings_:{endingStart:2400,endingEnd:2400},intervalChanged_:function(a,b,c){var d=this.parameterPositions,e=a-2,f=a+1,g=d[e],h=d[f];if(void 0===g)switch(this.getSettings_().endingStart){case 2401:e=\na;g=2*b-c;break;case 2402:e=d.length-2;g=b+d[e]-d[e+1];break;default:e=a,g=c}if(void 0===h)switch(this.getSettings_().endingEnd){case 2401:f=a;h=2*c-b;break;case 2402:f=1;h=c+d[1]-d[0];break;default:f=a-1,h=b}a=.5*(c-b);d=this.valueSize;this._weightPrev=a/(b-g);this._weightNext=a/(h-c);this._offsetPrev=e*d;this._offsetNext=f*d},interpolate_:function(a,b,c,d){var e=this.resultBuffer,f=this.sampleValues,g=this.valueSize;a*=g;var h=a-g,k=this._offsetPrev,m=this._offsetNext,l=this._weightPrev,n=this._weightNext,\np=(c-b)/(d-b);c=p*p;d=c*p;b=-l*d+2*l*c-l*p;l=(1+l)*d+(-1.5-2*l)*c+(-.5+l)*p+1;p=(-1-n)*d+(1.5+n)*c+.5*p;n=n*d-n*c;for(c=0;c!==g;++c)e[c]=b*f[k+c]+l*f[h+c]+p*f[a+c]+n*f[m+c];return e}});bd.prototype=Object.assign(Object.create(wa.prototype),{constructor:bd,interpolate_:function(a,b,c,d){var e=this.resultBuffer,f=this.sampleValues,g=this.valueSize;a*=g;var h=a-g;b=(c-b)/(d-b);c=1-b;for(d=0;d!==g;++d)e[d]=f[h+d]*c+f[a+d]*b;return e}});Fd.prototype=Object.assign(Object.create(wa.prototype),{constructor:Fd,\ninterpolate_:function(a){return this.copySampleValue_(a-1)}});Object.assign(oa,{toJSON:function(a){var b=a.constructor;if(void 0!==b.toJSON)b=b.toJSON(a);else{b={name:a.name,times:ia.convertArray(a.times,Array),values:ia.convertArray(a.values,Array)};var c=a.getInterpolation();c!==a.DefaultInterpolation&&(b.interpolation=c)}b.type=a.ValueTypeName;return b}});Object.assign(oa.prototype,{constructor:oa,TimeBufferType:Float32Array,ValueBufferType:Float32Array,DefaultInterpolation:2301,InterpolantFactoryMethodDiscrete:function(a){return new Fd(this.times,\nthis.values,this.getValueSize(),a)},InterpolantFactoryMethodLinear:function(a){return new bd(this.times,this.values,this.getValueSize(),a)},InterpolantFactoryMethodSmooth:function(a){return new Ed(this.times,this.values,this.getValueSize(),a)},setInterpolation:function(a){switch(a){case 2300:var b=this.InterpolantFactoryMethodDiscrete;break;case 2301:b=this.InterpolantFactoryMethodLinear;break;case 2302:b=this.InterpolantFactoryMethodSmooth}if(void 0===b){b=\"unsupported interpolation for \"+this.ValueTypeName+\n\" keyframe track named \"+this.name;if(void 0===this.createInterpolant)if(a!==this.DefaultInterpolation)this.setInterpolation(this.DefaultInterpolation);else throw Error(b);console.warn(\"THREE.KeyframeTrack:\",b);return this}this.createInterpolant=b;return this},getInterpolation:function(){switch(this.createInterpolant){case this.InterpolantFactoryMethodDiscrete:return 2300;case this.InterpolantFactoryMethodLinear:return 2301;case this.InterpolantFactoryMethodSmooth:return 2302}},getValueSize:function(){return this.values.length/\nthis.times.length},shift:function(a){if(0!==a)for(var b=this.times,c=0,d=b.length;c!==d;++c)b[c]+=a;return this},scale:function(a){if(1!==a)for(var b=this.times,c=0,d=b.length;c!==d;++c)b[c]*=a;return this},trim:function(a,b){for(var c=this.times,d=c.length,e=0,f=d-1;e!==d&&c[e]<a;)++e;for(;-1!==f&&c[f]>b;)--f;++f;if(0!==e||f!==d)e>=f&&(f=Math.max(f,1),e=f-1),a=this.getValueSize(),this.times=ia.arraySlice(c,e,f),this.values=ia.arraySlice(this.values,e*a,f*a);return this},validate:function(){var a=\n!0,b=this.getValueSize();0!==b-Math.floor(b)&&(console.error(\"THREE.KeyframeTrack: Invalid value size in track.\",this),a=!1);var c=this.times;b=this.values;var d=c.length;0===d&&(console.error(\"THREE.KeyframeTrack: Track is empty.\",this),a=!1);for(var e=null,f=0;f!==d;f++){var g=c[f];if(\"number\"===typeof g&&isNaN(g)){console.error(\"THREE.KeyframeTrack: Time is not a valid number.\",this,f,g);a=!1;break}if(null!==e&&e>g){console.error(\"THREE.KeyframeTrack: Out of order keys.\",this,f,g,e);a=!1;break}e=\ng}if(void 0!==b&&ia.isTypedArray(b))for(f=0,c=b.length;f!==c;++f)if(d=b[f],isNaN(d)){console.error(\"THREE.KeyframeTrack: Value is not a valid number.\",this,f,d);a=!1;break}return a},optimize:function(){for(var a=this.times,b=this.values,c=this.getValueSize(),d=2302===this.getInterpolation(),e=1,f=a.length-1,g=1;g<f;++g){var h=!1,k=a[g];if(k!==a[g+1]&&(1!==g||k!==k[0]))if(d)h=!0;else{var m=g*c,l=m-c,n=m+c;for(k=0;k!==c;++k){var p=b[m+k];if(p!==b[l+k]||p!==b[n+k]){h=!0;break}}}if(h){if(g!==e)for(a[e]=\na[g],h=g*c,m=e*c,k=0;k!==c;++k)b[m+k]=b[h+k];++e}}if(0<f){a[e]=a[f];h=f*c;m=e*c;for(k=0;k!==c;++k)b[m+k]=b[h+k];++e}e!==a.length&&(this.times=ia.arraySlice(a,0,e),this.values=ia.arraySlice(b,0,e*c));return this}});Gd.prototype=Object.assign(Object.create(oa.prototype),{constructor:Gd,ValueTypeName:\"bool\",ValueBufferType:Array,DefaultInterpolation:2300,InterpolantFactoryMethodLinear:void 0,InterpolantFactoryMethodSmooth:void 0});Hd.prototype=Object.assign(Object.create(oa.prototype),{constructor:Hd,\nValueTypeName:\"color\"});ec.prototype=Object.assign(Object.create(oa.prototype),{constructor:ec,ValueTypeName:\"number\"});Id.prototype=Object.assign(Object.create(wa.prototype),{constructor:Id,interpolate_:function(a,b,c,d){var e=this.resultBuffer,f=this.sampleValues,g=this.valueSize;a*=g;b=(c-b)/(d-b);for(c=a+g;a!==c;a+=4)fa.slerpFlat(e,0,f,a-g,f,a,b);return e}});cd.prototype=Object.assign(Object.create(oa.prototype),{constructor:cd,ValueTypeName:\"quaternion\",DefaultInterpolation:2301,InterpolantFactoryMethodLinear:function(a){return new Id(this.times,\nthis.values,this.getValueSize(),a)},InterpolantFactoryMethodSmooth:void 0});Jd.prototype=Object.assign(Object.create(oa.prototype),{constructor:Jd,ValueTypeName:\"string\",ValueBufferType:Array,DefaultInterpolation:2300,InterpolantFactoryMethodLinear:void 0,InterpolantFactoryMethodSmooth:void 0});fc.prototype=Object.assign(Object.create(oa.prototype),{constructor:fc,ValueTypeName:\"vector\"});Object.assign(Ca,{parse:function(a){for(var b=[],c=a.tracks,d=1/(a.fps||1),e=0,f=c.length;e!==f;++e)b.push(Sg(c[e]).scale(d));\nreturn new Ca(a.name,a.duration,b)},toJSON:function(a){var b=[],c=a.tracks;a={name:a.name,duration:a.duration,tracks:b,uuid:a.uuid};for(var d=0,e=c.length;d!==e;++d)b.push(oa.toJSON(c[d]));return a},CreateFromMorphTargetSequence:function(a,b,c,d){for(var e=b.length,f=[],g=0;g<e;g++){var h=[],k=[];h.push((g+e-1)%e,g,(g+1)%e);k.push(0,1,0);var m=ia.getKeyframeOrder(h);h=ia.sortedArray(h,1,m);k=ia.sortedArray(k,1,m);d||0!==h[0]||(h.push(e),k.push(k[0]));f.push((new ec(\".morphTargetInfluences[\"+b[g].name+\n\"]\",h,k)).scale(1/c))}return new Ca(a,-1,f)},findByName:function(a,b){var c=a;Array.isArray(a)||(c=a.geometry&&a.geometry.animations||a.animations);for(a=0;a<c.length;a++)if(c[a].name===b)return c[a];return null},CreateClipsFromMorphTargetSequences:function(a,b,c){for(var d={},e=/^([\\w-]*?)([\\d]+)$/,f=0,g=a.length;f<g;f++){var h=a[f],k=h.name.match(e);if(k&&1<k.length){var m=k[1];(k=d[m])||(d[m]=k=[]);k.push(h)}}a=[];for(m in d)a.push(Ca.CreateFromMorphTargetSequence(m,d[m],b,c));return a},parseAnimation:function(a,\nb){if(!a)return console.error(\"THREE.AnimationClip: No animation in JSONLoader data.\"),null;var c=function(a,b,c,d,e){if(0!==c.length){var f=[],g=[];ia.flattenJSON(c,f,g,d);0!==f.length&&e.push(new a(b,f,g))}},d=[],e=a.name||\"default\",f=a.length||-1,g=a.fps||30;a=a.hierarchy||[];for(var h=0;h<a.length;h++){var k=a[h].keys;if(k&&0!==k.length)if(k[0].morphTargets){f={};for(var m=0;m<k.length;m++)if(k[m].morphTargets)for(var l=0;l<k[m].morphTargets.length;l++)f[k[m].morphTargets[l]]=-1;for(var n in f){var p=\n[],u=[];for(l=0;l!==k[m].morphTargets.length;++l){var r=k[m];p.push(r.time);u.push(r.morphTarget===n?1:0)}d.push(new ec(\".morphTargetInfluence[\"+n+\"]\",p,u))}f=f.length*(g||1)}else m=\".bones[\"+b[h].name+\"]\",c(fc,m+\".position\",k,\"pos\",d),c(cd,m+\".quaternion\",k,\"rot\",d),c(fc,m+\".scale\",k,\"scl\",d)}return 0===d.length?null:new Ca(e,f,d)}});Object.assign(Ca.prototype,{resetDuration:function(){for(var a=0,b=0,c=this.tracks.length;b!==c;++b){var d=this.tracks[b];a=Math.max(a,d.times[d.times.length-1])}this.duration=\na;return this},trim:function(){for(var a=0;a<this.tracks.length;a++)this.tracks[a].trim(0,this.duration);return this},validate:function(){for(var a=!0,b=0;b<this.tracks.length;b++)a=a&&this.tracks[b].validate();return a},optimize:function(){for(var a=0;a<this.tracks.length;a++)this.tracks[a].optimize();return this}});Object.assign(Kd.prototype,{load:function(a,b,c,d){var e=this;(new Ga(e.manager)).load(a,function(a){b(e.parse(JSON.parse(a)))},c,d)},setTextures:function(a){this.textures=a},parse:function(a){function b(a){void 0===\nc[a]&&console.warn(\"THREE.MaterialLoader: Undefined texture\",a);return c[a]}var c=this.textures,d=new Vg[a.type];void 0!==a.uuid&&(d.uuid=a.uuid);void 0!==a.name&&(d.name=a.name);void 0!==a.color&&d.color.setHex(a.color);void 0!==a.roughness&&(d.roughness=a.roughness);void 0!==a.metalness&&(d.metalness=a.metalness);void 0!==a.emissive&&d.emissive.setHex(a.emissive);void 0!==a.specular&&d.specular.setHex(a.specular);void 0!==a.shininess&&(d.shininess=a.shininess);void 0!==a.clearCoat&&(d.clearCoat=\na.clearCoat);void 0!==a.clearCoatRoughness&&(d.clearCoatRoughness=a.clearCoatRoughness);void 0!==a.uniforms&&(d.uniforms=a.uniforms);void 0!==a.vertexShader&&(d.vertexShader=a.vertexShader);void 0!==a.fragmentShader&&(d.fragmentShader=a.fragmentShader);void 0!==a.vertexColors&&(d.vertexColors=a.vertexColors);void 0!==a.fog&&(d.fog=a.fog);void 0!==a.flatShading&&(d.flatShading=a.flatShading);void 0!==a.blending&&(d.blending=a.blending);void 0!==a.side&&(d.side=a.side);void 0!==a.opacity&&(d.opacity=\na.opacity);void 0!==a.transparent&&(d.transparent=a.transparent);void 0!==a.alphaTest&&(d.alphaTest=a.alphaTest);void 0!==a.depthTest&&(d.depthTest=a.depthTest);void 0!==a.depthWrite&&(d.depthWrite=a.depthWrite);void 0!==a.colorWrite&&(d.colorWrite=a.colorWrite);void 0!==a.wireframe&&(d.wireframe=a.wireframe);void 0!==a.wireframeLinewidth&&(d.wireframeLinewidth=a.wireframeLinewidth);void 0!==a.wireframeLinecap&&(d.wireframeLinecap=a.wireframeLinecap);void 0!==a.wireframeLinejoin&&(d.wireframeLinejoin=\na.wireframeLinejoin);void 0!==a.rotation&&(d.rotation=a.rotation);1!==a.linewidth&&(d.linewidth=a.linewidth);void 0!==a.dashSize&&(d.dashSize=a.dashSize);void 0!==a.gapSize&&(d.gapSize=a.gapSize);void 0!==a.scale&&(d.scale=a.scale);void 0!==a.polygonOffset&&(d.polygonOffset=a.polygonOffset);void 0!==a.polygonOffsetFactor&&(d.polygonOffsetFactor=a.polygonOffsetFactor);void 0!==a.polygonOffsetUnits&&(d.polygonOffsetUnits=a.polygonOffsetUnits);void 0!==a.skinning&&(d.skinning=a.skinning);void 0!==a.morphTargets&&\n(d.morphTargets=a.morphTargets);void 0!==a.dithering&&(d.dithering=a.dithering);void 0!==a.visible&&(d.visible=a.visible);void 0!==a.userData&&(d.userData=a.userData);void 0!==a.shading&&(d.flatShading=1===a.shading);void 0!==a.size&&(d.size=a.size);void 0!==a.sizeAttenuation&&(d.sizeAttenuation=a.sizeAttenuation);void 0!==a.map&&(d.map=b(a.map));void 0!==a.alphaMap&&(d.alphaMap=b(a.alphaMap),d.transparent=!0);void 0!==a.bumpMap&&(d.bumpMap=b(a.bumpMap));void 0!==a.bumpScale&&(d.bumpScale=a.bumpScale);\nvoid 0!==a.normalMap&&(d.normalMap=b(a.normalMap));void 0!==a.normalMapType&&(d.normalMapType=a.normalMapType);if(void 0!==a.normalScale){var e=a.normalScale;!1===Array.isArray(e)&&(e=[e,e]);d.normalScale=(new z).fromArray(e)}void 0!==a.displacementMap&&(d.displacementMap=b(a.displacementMap));void 0!==a.displacementScale&&(d.displacementScale=a.displacementScale);void 0!==a.displacementBias&&(d.displacementBias=a.displacementBias);void 0!==a.roughnessMap&&(d.roughnessMap=b(a.roughnessMap));void 0!==\na.metalnessMap&&(d.metalnessMap=b(a.metalnessMap));void 0!==a.emissiveMap&&(d.emissiveMap=b(a.emissiveMap));void 0!==a.emissiveIntensity&&(d.emissiveIntensity=a.emissiveIntensity);void 0!==a.specularMap&&(d.specularMap=b(a.specularMap));void 0!==a.envMap&&(d.envMap=b(a.envMap));void 0!==a.reflectivity&&(d.reflectivity=a.reflectivity);void 0!==a.lightMap&&(d.lightMap=b(a.lightMap));void 0!==a.lightMapIntensity&&(d.lightMapIntensity=a.lightMapIntensity);void 0!==a.aoMap&&(d.aoMap=b(a.aoMap));void 0!==\na.aoMapIntensity&&(d.aoMapIntensity=a.aoMapIntensity);void 0!==a.gradientMap&&(d.gradientMap=b(a.gradientMap));return d}});Object.assign(ge.prototype,{load:function(a,b,c,d){var e=this;(new Ga(e.manager)).load(a,function(a){b(e.parse(JSON.parse(a)))},c,d)},parse:function(a){var b=new C,c=a.data.index;void 0!==c&&(c=new Bf[c.type](c.array),b.setIndex(new Q(c,1)));var d=a.data.attributes;for(f in d){var e=d[f];c=new Bf[e.type](e.array);b.addAttribute(f,new Q(c,e.itemSize,e.normalized))}var f=a.data.groups||\na.data.drawcalls||a.data.offsets;if(void 0!==f)for(c=0,d=f.length;c!==d;++c)e=f[c],b.addGroup(e.start,e.count,e.materialIndex);a=a.data.boundingSphere;void 0!==a&&(f=new p,void 0!==a.center&&f.fromArray(a.center),b.boundingSphere=new Da(f,a.radius));return b}});var Bf={Int8Array:Int8Array,Uint8Array:Uint8Array,Uint8ClampedArray:\"undefined\"!==typeof Uint8ClampedArray?Uint8ClampedArray:Uint8Array,Int16Array:Int16Array,Uint16Array:Uint16Array,Int32Array:Int32Array,Uint32Array:Uint32Array,Float32Array:Float32Array,\nFloat64Array:Float64Array};gc.Handlers={handlers:[],add:function(a,b){this.handlers.push(a,b)},get:function(a){for(var b=this.handlers,c=0,d=b.length;c<d;c+=2){var e=b[c+1];if(b[c].test(a))return e}return null}};Object.assign(gc.prototype,{crossOrigin:\"anonymous\",onLoadStart:function(){},onLoadProgress:function(){},onLoadComplete:function(){},initMaterials:function(a,b,c){for(var d=[],e=0;e<a.length;++e)d[e]=this.createMaterial(a[e],b,c);return d},createMaterial:function(){var a={NoBlending:0,NormalBlending:1,\nAdditiveBlending:2,SubtractiveBlending:3,MultiplyBlending:4,CustomBlending:5},b=new G,c=new vd,d=new Kd;return function(e,f,g){function h(a,b,d,e,h){a=f+a;var m=gc.Handlers.get(a);null!==m?a=m.load(a):(c.setCrossOrigin(g),a=c.load(a));void 0!==b&&(a.repeat.fromArray(b),1!==b[0]&&(a.wrapS=1E3),1!==b[1]&&(a.wrapT=1E3));void 0!==d&&a.offset.fromArray(d);void 0!==e&&(\"repeat\"===e[0]&&(a.wrapS=1E3),\"mirror\"===e[0]&&(a.wrapS=1002),\"repeat\"===e[1]&&(a.wrapT=1E3),\"mirror\"===e[1]&&(a.wrapT=1002));void 0!==\nh&&(a.anisotropy=h);b=H.generateUUID();k[b]=a;return b}var k={},m={uuid:H.generateUUID(),type:\"MeshLambertMaterial\"},l;for(l in e){var n=e[l];switch(l){case \"DbgColor\":case \"DbgIndex\":case \"opticalDensity\":case \"illumination\":break;case \"DbgName\":m.name=n;break;case \"blending\":m.blending=a[n];break;case \"colorAmbient\":case \"mapAmbient\":console.warn(\"THREE.Loader.createMaterial:\",l,\"is no longer supported.\");break;case \"colorDiffuse\":m.color=b.fromArray(n).getHex();break;case \"colorSpecular\":m.specular=\nb.fromArray(n).getHex();break;case \"colorEmissive\":m.emissive=b.fromArray(n).getHex();break;case \"specularCoef\":m.shininess=n;break;case \"shading\":\"basic\"===n.toLowerCase()&&(m.type=\"MeshBasicMaterial\");\"phong\"===n.toLowerCase()&&(m.type=\"MeshPhongMaterial\");\"standard\"===n.toLowerCase()&&(m.type=\"MeshStandardMaterial\");break;case \"mapDiffuse\":m.map=h(n,e.mapDiffuseRepeat,e.mapDiffuseOffset,e.mapDiffuseWrap,e.mapDiffuseAnisotropy);break;case \"mapDiffuseRepeat\":case \"mapDiffuseOffset\":case \"mapDiffuseWrap\":case \"mapDiffuseAnisotropy\":break;\ncase \"mapEmissive\":m.emissiveMap=h(n,e.mapEmissiveRepeat,e.mapEmissiveOffset,e.mapEmissiveWrap,e.mapEmissiveAnisotropy);break;case \"mapEmissiveRepeat\":case \"mapEmissiveOffset\":case \"mapEmissiveWrap\":case \"mapEmissiveAnisotropy\":break;case \"mapLight\":m.lightMap=h(n,e.mapLightRepeat,e.mapLightOffset,e.mapLightWrap,e.mapLightAnisotropy);break;case \"mapLightRepeat\":case \"mapLightOffset\":case \"mapLightWrap\":case \"mapLightAnisotropy\":break;case \"mapAO\":m.aoMap=h(n,e.mapAORepeat,e.mapAOOffset,e.mapAOWrap,\ne.mapAOAnisotropy);break;case \"mapAORepeat\":case \"mapAOOffset\":case \"mapAOWrap\":case \"mapAOAnisotropy\":break;case \"mapBump\":m.bumpMap=h(n,e.mapBumpRepeat,e.mapBumpOffset,e.mapBumpWrap,e.mapBumpAnisotropy);break;case \"mapBumpScale\":m.bumpScale=n;break;case \"mapBumpRepeat\":case \"mapBumpOffset\":case \"mapBumpWrap\":case \"mapBumpAnisotropy\":break;case \"mapNormal\":m.normalMap=h(n,e.mapNormalRepeat,e.mapNormalOffset,e.mapNormalWrap,e.mapNormalAnisotropy);break;case \"mapNormalFactor\":m.normalScale=n;break;\ncase \"mapNormalRepeat\":case \"mapNormalOffset\":case \"mapNormalWrap\":case \"mapNormalAnisotropy\":break;case \"mapSpecular\":m.specularMap=h(n,e.mapSpecularRepeat,e.mapSpecularOffset,e.mapSpecularWrap,e.mapSpecularAnisotropy);break;case \"mapSpecularRepeat\":case \"mapSpecularOffset\":case \"mapSpecularWrap\":case \"mapSpecularAnisotropy\":break;case \"mapMetalness\":m.metalnessMap=h(n,e.mapMetalnessRepeat,e.mapMetalnessOffset,e.mapMetalnessWrap,e.mapMetalnessAnisotropy);break;case \"mapMetalnessRepeat\":case \"mapMetalnessOffset\":case \"mapMetalnessWrap\":case \"mapMetalnessAnisotropy\":break;\ncase \"mapRoughness\":m.roughnessMap=h(n,e.mapRoughnessRepeat,e.mapRoughnessOffset,e.mapRoughnessWrap,e.mapRoughnessAnisotropy);break;case \"mapRoughnessRepeat\":case \"mapRoughnessOffset\":case \"mapRoughnessWrap\":case \"mapRoughnessAnisotropy\":break;case \"mapAlpha\":m.alphaMap=h(n,e.mapAlphaRepeat,e.mapAlphaOffset,e.mapAlphaWrap,e.mapAlphaAnisotropy);break;case \"mapAlphaRepeat\":case \"mapAlphaOffset\":case \"mapAlphaWrap\":case \"mapAlphaAnisotropy\":break;case \"flipSided\":m.side=1;break;case \"doubleSided\":m.side=\n2;break;case \"transparency\":console.warn(\"THREE.Loader.createMaterial: transparency has been renamed to opacity\");m.opacity=n;break;case \"depthTest\":case \"depthWrite\":case \"colorWrite\":case \"opacity\":case \"reflectivity\":case \"transparent\":case \"visible\":case \"wireframe\":m[l]=n;break;case \"vertexColors\":!0===n&&(m.vertexColors=2);\"face\"===n&&(m.vertexColors=1);break;default:console.error(\"THREE.Loader.createMaterial: Unsupported\",l,n)}}\"MeshBasicMaterial\"===m.type&&delete m.emissive;\"MeshPhongMaterial\"!==\nm.type&&delete m.specular;1>m.opacity&&(m.transparent=!0);d.setTextures(k);return d.parse(m)}}()});var De={decodeText:function(a){if(\"undefined\"!==typeof TextDecoder)return(new TextDecoder).decode(a);for(var b=\"\",c=0,d=a.length;c<d;c++)b+=String.fromCharCode(a[c]);return decodeURIComponent(escape(b))},extractUrlBase:function(a){var b=a.lastIndexOf(\"/\");return-1===b?\"./\":a.substr(0,b+1)}};Object.assign(he.prototype,{crossOrigin:\"anonymous\",load:function(a,b,c,d){var e=this,f=this.texturePath&&\"string\"===\ntypeof this.texturePath?this.texturePath:De.extractUrlBase(a),g=new Ga(this.manager);g.setWithCredentials(this.withCredentials);g.load(a,function(c){c=JSON.parse(c);var d=c.metadata;if(void 0!==d&&(d=d.type,void 0!==d&&\"object\"===d.toLowerCase())){console.error(\"THREE.JSONLoader: \"+a+\" should be loaded with THREE.ObjectLoader instead.\");return}c=e.parse(c,f);b(c.geometry,c.materials)},c,d)},setCrossOrigin:function(a){this.crossOrigin=a;return this},setTexturePath:function(a){this.texturePath=a;return this},\nparse:function(){return function(a,b){void 0!==a.data&&(a=a.data);a.scale=void 0!==a.scale?1/a.scale:1;var c=new R,d=a,e,f,g,h=d.faces;var k=d.vertices;var m=d.normals,l=d.colors;var n=d.scale;var t=0;if(void 0!==d.uvs){for(e=0;e<d.uvs.length;e++)d.uvs[e].length&&t++;for(e=0;e<t;e++)c.faceVertexUvs[e]=[]}var u=0;for(g=k.length;u<g;)e=new p,e.x=k[u++]*n,e.y=k[u++]*n,e.z=k[u++]*n,c.vertices.push(e);u=0;for(g=h.length;u<g;){k=h[u++];var r=k&1;var v=k&2;e=k&8;var y=k&16;var x=k&32;n=k&64;k&=128;if(r){r=\nnew Ta;r.a=h[u];r.b=h[u+1];r.c=h[u+3];var w=new Ta;w.a=h[u+1];w.b=h[u+2];w.c=h[u+3];u+=4;v&&(v=h[u++],r.materialIndex=v,w.materialIndex=v);v=c.faces.length;if(e)for(e=0;e<t;e++){var B=d.uvs[e];c.faceVertexUvs[e][v]=[];c.faceVertexUvs[e][v+1]=[];for(f=0;4>f;f++){var E=h[u++];var A=B[2*E];E=B[2*E+1];A=new z(A,E);2!==f&&c.faceVertexUvs[e][v].push(A);0!==f&&c.faceVertexUvs[e][v+1].push(A)}}y&&(y=3*h[u++],r.normal.set(m[y++],m[y++],m[y]),w.normal.copy(r.normal));if(x)for(e=0;4>e;e++)y=3*h[u++],x=new p(m[y++],\nm[y++],m[y]),2!==e&&r.vertexNormals.push(x),0!==e&&w.vertexNormals.push(x);n&&(n=h[u++],n=l[n],r.color.setHex(n),w.color.setHex(n));if(k)for(e=0;4>e;e++)n=h[u++],n=l[n],2!==e&&r.vertexColors.push(new G(n)),0!==e&&w.vertexColors.push(new G(n));c.faces.push(r);c.faces.push(w)}else{r=new Ta;r.a=h[u++];r.b=h[u++];r.c=h[u++];v&&(v=h[u++],r.materialIndex=v);v=c.faces.length;if(e)for(e=0;e<t;e++)for(B=d.uvs[e],c.faceVertexUvs[e][v]=[],f=0;3>f;f++)E=h[u++],A=B[2*E],E=B[2*E+1],A=new z(A,E),c.faceVertexUvs[e][v].push(A);\ny&&(y=3*h[u++],r.normal.set(m[y++],m[y++],m[y]));if(x)for(e=0;3>e;e++)y=3*h[u++],x=new p(m[y++],m[y++],m[y]),r.vertexNormals.push(x);n&&(n=h[u++],r.color.setHex(l[n]));if(k)for(e=0;3>e;e++)n=h[u++],r.vertexColors.push(new G(l[n]));c.faces.push(r)}}d=a;u=void 0!==d.influencesPerVertex?d.influencesPerVertex:2;if(d.skinWeights)for(g=0,h=d.skinWeights.length;g<h;g+=u)c.skinWeights.push(new V(d.skinWeights[g],1<u?d.skinWeights[g+1]:0,2<u?d.skinWeights[g+2]:0,3<u?d.skinWeights[g+3]:0));if(d.skinIndices)for(g=\n0,h=d.skinIndices.length;g<h;g+=u)c.skinIndices.push(new V(d.skinIndices[g],1<u?d.skinIndices[g+1]:0,2<u?d.skinIndices[g+2]:0,3<u?d.skinIndices[g+3]:0));c.bones=d.bones;c.bones&&0<c.bones.length&&(c.skinWeights.length!==c.skinIndices.length||c.skinIndices.length!==c.vertices.length)&&console.warn(\"When skinning, number of vertices (\"+c.vertices.length+\"), skinIndices (\"+c.skinIndices.length+\"), and skinWeights (\"+c.skinWeights.length+\") should match.\");g=a;h=g.scale;if(void 0!==g.morphTargets)for(d=\n0,u=g.morphTargets.length;d<u;d++)for(c.morphTargets[d]={},c.morphTargets[d].name=g.morphTargets[d].name,c.morphTargets[d].vertices=[],m=c.morphTargets[d].vertices,l=g.morphTargets[d].vertices,t=0,k=l.length;t<k;t+=3)n=new p,n.x=l[t]*h,n.y=l[t+1]*h,n.z=l[t+2]*h,m.push(n);if(void 0!==g.morphColors&&0<g.morphColors.length)for(console.warn('THREE.JSONLoader: \"morphColors\" no longer supported. Using them as face colors.'),h=c.faces,g=g.morphColors[0].colors,d=0,u=h.length;d<u;d++)h[d].color.fromArray(g,\n3*d);g=a;d=[];u=[];void 0!==g.animation&&u.push(g.animation);void 0!==g.animations&&(g.animations.length?u=u.concat(g.animations):u.push(g.animations));for(g=0;g<u.length;g++)(h=Ca.parseAnimation(u[g],c.bones))&&d.push(h);c.morphTargets&&(u=Ca.CreateClipsFromMorphTargetSequences(c.morphTargets,10),d=d.concat(u));0<d.length&&(c.animations=d);c.computeFaceNormals();c.computeBoundingSphere();if(void 0===a.materials||0===a.materials.length)return{geometry:c};a=gc.prototype.initMaterials(a.materials,b,\nthis.crossOrigin);return{geometry:c,materials:a}}}()});Object.assign(mf.prototype,{crossOrigin:\"anonymous\",load:function(a,b,c,d){\"\"===this.texturePath&&(this.texturePath=a.substring(0,a.lastIndexOf(\"/\")+1));var e=this;(new Ga(e.manager)).load(a,function(c){var f=null;try{f=JSON.parse(c)}catch(h){void 0!==d&&d(h);console.error(\"THREE:ObjectLoader: Can't parse \"+a+\".\",h.message);return}c=f.metadata;void 0===c||void 0===c.type||\"geometry\"===c.type.toLowerCase()?console.error(\"THREE.ObjectLoader: Can't load \"+\na+\". Use THREE.JSONLoader instead.\"):e.parse(f,b)},c,d)},setTexturePath:function(a){this.texturePath=a;return this},setCrossOrigin:function(a){this.crossOrigin=a;return this},parse:function(a,b){var c=this.parseShape(a.shapes);c=this.parseGeometries(a.geometries,c);var d=this.parseImages(a.images,function(){void 0!==b&&b(e)});d=this.parseTextures(a.textures,d);d=this.parseMaterials(a.materials,d);var e=this.parseObject(a.object,c,d);a.animations&&(e.animations=this.parseAnimations(a.animations));\nvoid 0!==a.images&&0!==a.images.length||void 0===b||b(e);return e},parseShape:function(a){var b={};if(void 0!==a)for(var c=0,d=a.length;c<d;c++){var e=(new db).fromJSON(a[c]);b[e.uuid]=e}return b},parseGeometries:function(a,b){var c={};if(void 0!==a)for(var d=new he,e=new ge,f=0,g=a.length;f<g;f++){var h=a[f];switch(h.type){case \"PlaneGeometry\":case \"PlaneBufferGeometry\":var k=new xa[h.type](h.width,h.height,h.widthSegments,h.heightSegments);break;case \"BoxGeometry\":case \"BoxBufferGeometry\":case \"CubeGeometry\":k=\nnew xa[h.type](h.width,h.height,h.depth,h.widthSegments,h.heightSegments,h.depthSegments);break;case \"CircleGeometry\":case \"CircleBufferGeometry\":k=new xa[h.type](h.radius,h.segments,h.thetaStart,h.thetaLength);break;case \"CylinderGeometry\":case \"CylinderBufferGeometry\":k=new xa[h.type](h.radiusTop,h.radiusBottom,h.height,h.radialSegments,h.heightSegments,h.openEnded,h.thetaStart,h.thetaLength);break;case \"ConeGeometry\":case \"ConeBufferGeometry\":k=new xa[h.type](h.radius,h.height,h.radialSegments,\nh.heightSegments,h.openEnded,h.thetaStart,h.thetaLength);break;case \"SphereGeometry\":case \"SphereBufferGeometry\":k=new xa[h.type](h.radius,h.widthSegments,h.heightSegments,h.phiStart,h.phiLength,h.thetaStart,h.thetaLength);break;case \"DodecahedronGeometry\":case \"DodecahedronBufferGeometry\":case \"IcosahedronGeometry\":case \"IcosahedronBufferGeometry\":case \"OctahedronGeometry\":case \"OctahedronBufferGeometry\":case \"TetrahedronGeometry\":case \"TetrahedronBufferGeometry\":k=new xa[h.type](h.radius,h.detail);\nbreak;case \"RingGeometry\":case \"RingBufferGeometry\":k=new xa[h.type](h.innerRadius,h.outerRadius,h.thetaSegments,h.phiSegments,h.thetaStart,h.thetaLength);break;case \"TorusGeometry\":case \"TorusBufferGeometry\":k=new xa[h.type](h.radius,h.tube,h.radialSegments,h.tubularSegments,h.arc);break;case \"TorusKnotGeometry\":case \"TorusKnotBufferGeometry\":k=new xa[h.type](h.radius,h.tube,h.tubularSegments,h.radialSegments,h.p,h.q);break;case \"LatheGeometry\":case \"LatheBufferGeometry\":k=new xa[h.type](h.points,\nh.segments,h.phiStart,h.phiLength);break;case \"PolyhedronGeometry\":case \"PolyhedronBufferGeometry\":k=new xa[h.type](h.vertices,h.indices,h.radius,h.details);break;case \"ShapeGeometry\":case \"ShapeBufferGeometry\":k=[];for(var m=0,l=h.shapes.length;m<l;m++){var n=b[h.shapes[m]];k.push(n)}k=new xa[h.type](k,h.curveSegments);break;case \"ExtrudeGeometry\":case \"ExtrudeBufferGeometry\":k=[];m=0;for(l=h.shapes.length;m<l;m++)n=b[h.shapes[m]],k.push(n);m=h.options.extrudePath;void 0!==m&&(h.options.extrudePath=\n(new Af[m.type]).fromJSON(m));k=new xa[h.type](k,h.options);break;case \"BufferGeometry\":k=e.parse(h);break;case \"Geometry\":k=d.parse(h,this.texturePath).geometry;break;default:console.warn('THREE.ObjectLoader: Unsupported geometry type \"'+h.type+'\"');continue}k.uuid=h.uuid;void 0!==h.name&&(k.name=h.name);!0===k.isBufferGeometry&&void 0!==h.userData&&(k.userData=h.userData);c[h.uuid]=k}return c},parseMaterials:function(a,b){var c={};if(void 0!==a){var d=new Kd;d.setTextures(b);b=0;for(var e=a.length;b<\ne;b++){var f=a[b];if(\"MultiMaterial\"===f.type){for(var g=[],h=0;h<f.materials.length;h++)g.push(d.parse(f.materials[h]));c[f.uuid]=g}else c[f.uuid]=d.parse(f)}}return c},parseAnimations:function(a){for(var b=[],c=0;c<a.length;c++){var d=a[c],e=Ca.parse(d);void 0!==d.uuid&&(e.uuid=d.uuid);b.push(e)}return b},parseImages:function(a,b){function c(a){d.manager.itemStart(a);return f.load(a,function(){d.manager.itemEnd(a)},void 0,function(){d.manager.itemEnd(a);d.manager.itemError(a)})}var d=this,e={};\nif(void 0!==a&&0<a.length){b=new ce(b);var f=new Zc(b);f.setCrossOrigin(this.crossOrigin);b=0;for(var g=a.length;b<g;b++){var h=a[b],k=h.url;if(Array.isArray(k)){e[h.uuid]=[];for(var m=0,l=k.length;m<l;m++){var n=k[m];n=/^(\\/\\/)|([a-z]+:(\\/\\/)?)/i.test(n)?n:d.texturePath+n;e[h.uuid].push(c(n))}}else n=/^(\\/\\/)|([a-z]+:(\\/\\/)?)/i.test(h.url)?h.url:d.texturePath+h.url,e[h.uuid]=c(n)}}return e},parseTextures:function(a,b){function c(a,b){if(\"number\"===typeof a)return a;console.warn(\"THREE.ObjectLoader.parseTexture: Constant should be in numeric form.\",\na);return b[a]}var d={};if(void 0!==a)for(var e=0,f=a.length;e<f;e++){var g=a[e];void 0===g.image&&console.warn('THREE.ObjectLoader: No \"image\" specified for',g.uuid);void 0===b[g.image]&&console.warn(\"THREE.ObjectLoader: Undefined image\",g.image);var h=Array.isArray(b[g.image])?new Ua(b[g.image]):new T(b[g.image]);h.needsUpdate=!0;h.uuid=g.uuid;void 0!==g.name&&(h.name=g.name);void 0!==g.mapping&&(h.mapping=c(g.mapping,Wg));void 0!==g.offset&&h.offset.fromArray(g.offset);void 0!==g.repeat&&h.repeat.fromArray(g.repeat);\nvoid 0!==g.center&&h.center.fromArray(g.center);void 0!==g.rotation&&(h.rotation=g.rotation);void 0!==g.wrap&&(h.wrapS=c(g.wrap[0],Cf),h.wrapT=c(g.wrap[1],Cf));void 0!==g.format&&(h.format=g.format);void 0!==g.minFilter&&(h.minFilter=c(g.minFilter,Df));void 0!==g.magFilter&&(h.magFilter=c(g.magFilter,Df));void 0!==g.anisotropy&&(h.anisotropy=g.anisotropy);void 0!==g.flipY&&(h.flipY=g.flipY);d[g.uuid]=h}return d},parseObject:function(a,b,c){function d(a){void 0===b[a]&&console.warn(\"THREE.ObjectLoader: Undefined geometry\",\na);return b[a]}function e(a){if(void 0!==a){if(Array.isArray(a)){for(var b=[],d=0,e=a.length;d<e;d++){var f=a[d];void 0===c[f]&&console.warn(\"THREE.ObjectLoader: Undefined material\",f);b.push(c[f])}return b}void 0===c[a]&&console.warn(\"THREE.ObjectLoader: Undefined material\",a);return c[a]}}switch(a.type){case \"Scene\":var f=new qd;void 0!==a.background&&Number.isInteger(a.background)&&(f.background=new G(a.background));void 0!==a.fog&&(\"Fog\"===a.fog.type?f.fog=new Mb(a.fog.color,a.fog.near,a.fog.far):\n\"FogExp2\"===a.fog.type&&(f.fog=new Lb(a.fog.color,a.fog.density)));break;case \"PerspectiveCamera\":f=new Z(a.fov,a.aspect,a.near,a.far);void 0!==a.focus&&(f.focus=a.focus);void 0!==a.zoom&&(f.zoom=a.zoom);void 0!==a.filmGauge&&(f.filmGauge=a.filmGauge);void 0!==a.filmOffset&&(f.filmOffset=a.filmOffset);void 0!==a.view&&(f.view=Object.assign({},a.view));break;case \"OrthographicCamera\":f=new Hb(a.left,a.right,a.top,a.bottom,a.near,a.far);void 0!==a.zoom&&(f.zoom=a.zoom);void 0!==a.view&&(f.view=Object.assign({},\na.view));break;case \"AmbientLight\":f=new Cd(a.color,a.intensity);break;case \"DirectionalLight\":f=new Bd(a.color,a.intensity);break;case \"PointLight\":f=new zd(a.color,a.intensity,a.distance,a.decay);break;case \"RectAreaLight\":f=new Dd(a.color,a.intensity,a.width,a.height);break;case \"SpotLight\":f=new yd(a.color,a.intensity,a.distance,a.angle,a.penumbra,a.decay);break;case \"HemisphereLight\":f=new wd(a.color,a.groundColor,a.intensity);break;case \"SkinnedMesh\":console.warn(\"THREE.ObjectLoader.parseObject() does not support SkinnedMesh yet.\");\ncase \"Mesh\":f=d(a.geometry);var g=e(a.material);f=f.bones&&0<f.bones.length?new sd(f,g):new la(f,g);break;case \"LOD\":f=new Bc;break;case \"Line\":f=new sa(d(a.geometry),e(a.material),a.mode);break;case \"LineLoop\":f=new td(d(a.geometry),e(a.material));break;case \"LineSegments\":f=new W(d(a.geometry),e(a.material));break;case \"PointCloud\":case \"Points\":f=new Ob(d(a.geometry),e(a.material));break;case \"Sprite\":f=new Ac(e(a.material));break;case \"Group\":f=new Kb;break;default:f=new D}f.uuid=a.uuid;void 0!==\na.name&&(f.name=a.name);void 0!==a.matrix?(f.matrix.fromArray(a.matrix),void 0!==a.matrixAutoUpdate&&(f.matrixAutoUpdate=a.matrixAutoUpdate),f.matrixAutoUpdate&&f.matrix.decompose(f.position,f.quaternion,f.scale)):(void 0!==a.position&&f.position.fromArray(a.position),void 0!==a.rotation&&f.rotation.fromArray(a.rotation),void 0!==a.quaternion&&f.quaternion.fromArray(a.quaternion),void 0!==a.scale&&f.scale.fromArray(a.scale));void 0!==a.castShadow&&(f.castShadow=a.castShadow);void 0!==a.receiveShadow&&\n(f.receiveShadow=a.receiveShadow);a.shadow&&(void 0!==a.shadow.bias&&(f.shadow.bias=a.shadow.bias),void 0!==a.shadow.radius&&(f.shadow.radius=a.shadow.radius),void 0!==a.shadow.mapSize&&f.shadow.mapSize.fromArray(a.shadow.mapSize),void 0!==a.shadow.camera&&(f.shadow.camera=this.parseObject(a.shadow.camera)));void 0!==a.visible&&(f.visible=a.visible);void 0!==a.frustumCulled&&(f.frustumCulled=a.frustumCulled);void 0!==a.renderOrder&&(f.renderOrder=a.renderOrder);void 0!==a.userData&&(f.userData=a.userData);\nvoid 0!==a.layers&&(f.layers.mask=a.layers);if(void 0!==a.children){g=a.children;for(var h=0;h<g.length;h++)f.add(this.parseObject(g[h],b,c))}if(\"LOD\"===a.type)for(a=a.levels,g=0;g<a.length;g++){h=a[g];var k=f.getObjectByProperty(\"uuid\",h.object);void 0!==k&&f.addLevel(k,h.distance)}return f}});var Wg={UVMapping:300,CubeReflectionMapping:301,CubeRefractionMapping:302,EquirectangularReflectionMapping:303,EquirectangularRefractionMapping:304,SphericalReflectionMapping:305,CubeUVReflectionMapping:306,\nCubeUVRefractionMapping:307},Cf={RepeatWrapping:1E3,ClampToEdgeWrapping:1001,MirroredRepeatWrapping:1002},Df={NearestFilter:1003,NearestMipMapNearestFilter:1004,NearestMipMapLinearFilter:1005,LinearFilter:1006,LinearMipMapNearestFilter:1007,LinearMipMapLinearFilter:1008};ie.prototype={constructor:ie,setOptions:function(a){this.options=a;return this},load:function(a,b,c,d){void 0===a&&(a=\"\");void 0!==this.path&&(a=this.path+a);a=this.manager.resolveURL(a);var e=this,f=Fb.get(a);if(void 0!==f)return e.manager.itemStart(a),\nsetTimeout(function(){b&&b(f);e.manager.itemEnd(a)},0),f;fetch(a).then(function(a){return a.blob()}).then(function(a){return createImageBitmap(a,e.options)}).then(function(c){Fb.add(a,c);b&&b(c);e.manager.itemEnd(a)}).catch(function(b){d&&d(b);e.manager.itemEnd(a);e.manager.itemError(a)})},setCrossOrigin:function(){return this},setPath:function(a){this.path=a;return this}};Object.assign(je.prototype,{moveTo:function(a,b){this.currentPath=new La;this.subPaths.push(this.currentPath);this.currentPath.moveTo(a,\nb)},lineTo:function(a,b){this.currentPath.lineTo(a,b)},quadraticCurveTo:function(a,b,c,d){this.currentPath.quadraticCurveTo(a,b,c,d)},bezierCurveTo:function(a,b,c,d,e,f){this.currentPath.bezierCurveTo(a,b,c,d,e,f)},splineThru:function(a){this.currentPath.splineThru(a)},toShapes:function(a,b){function c(a){for(var b=[],c=0,d=a.length;c<d;c++){var e=a[c],f=new db;f.curves=e.curves;b.push(f)}return b}function d(a,b){for(var c=b.length,d=!1,e=c-1,f=0;f<c;e=f++){var g=b[e],h=b[f],k=h.x-g.x,m=h.y-g.y;if(Math.abs(m)>\nNumber.EPSILON){if(0>m&&(g=b[f],k=-k,h=b[e],m=-m),!(a.y<g.y||a.y>h.y))if(a.y===g.y){if(a.x===g.x)return!0}else{e=m*(a.x-g.x)-k*(a.y-g.y);if(0===e)return!0;0>e||(d=!d)}}else if(a.y===g.y&&(h.x<=a.x&&a.x<=g.x||g.x<=a.x&&a.x<=h.x))return!0}return d}var e=Va.isClockWise,f=this.subPaths;if(0===f.length)return[];if(!0===b)return c(f);b=[];if(1===f.length){var g=f[0];var h=new db;h.curves=g.curves;b.push(h);return b}var k=!e(f[0].getPoints());k=a?!k:k;h=[];var m=[],l=[],n=0;m[n]=void 0;l[n]=[];for(var p=\n0,u=f.length;p<u;p++){g=f[p];var r=g.getPoints();var v=e(r);(v=a?!v:v)?(!k&&m[n]&&n++,m[n]={s:new db,p:r},m[n].s.curves=g.curves,k&&n++,l[n]=[]):l[n].push({h:g,p:r[0]})}if(!m[0])return c(f);if(1<m.length){p=!1;a=[];e=0;for(f=m.length;e<f;e++)h[e]=[];e=0;for(f=m.length;e<f;e++)for(g=l[e],v=0;v<g.length;v++){k=g[v];n=!0;for(r=0;r<m.length;r++)d(k.p,m[r].p)&&(e!==r&&a.push({froms:e,tos:r,hole:v}),n?(n=!1,h[r].push(k)):p=!0);n&&h[e].push(k)}0<a.length&&(p||(l=h))}p=0;for(e=m.length;p<e;p++)for(h=m[p].s,\nb.push(h),a=l[p],f=0,g=a.length;f<g;f++)h.holes.push(a[f].h);return b}});Object.assign(ke.prototype,{isFont:!0,generateShapes:function(a,b){void 0===b&&(b=100);var c=[],d=b;b=this.data;var e=Array.from?Array.from(a):String(a).split(\"\");d/=b.resolution;var f=(b.boundingBox.yMax-b.boundingBox.yMin+b.underlineThickness)*d;a=[];for(var g=0,h=0,k=0;k<e.length;k++){var m=e[k];if(\"\\n\"===m)g=0,h-=f;else{var l=d;var n=g,p=h;if(m=b.glyphs[m]||b.glyphs[\"?\"]){var u=new je;if(m.o)for(var r=m._cachedOutline||(m._cachedOutline=\nm.o.split(\" \")),v=0,y=r.length;v<y;)switch(r[v++]){case \"m\":var x=r[v++]*l+n;var w=r[v++]*l+p;u.moveTo(x,w);break;case \"l\":x=r[v++]*l+n;w=r[v++]*l+p;u.lineTo(x,w);break;case \"q\":var z=r[v++]*l+n;var A=r[v++]*l+p;var C=r[v++]*l+n;var D=r[v++]*l+p;u.quadraticCurveTo(C,D,z,A);break;case \"b\":z=r[v++]*l+n,A=r[v++]*l+p,C=r[v++]*l+n,D=r[v++]*l+p,x=r[v++]*l+n,w=r[v++]*l+p,u.bezierCurveTo(C,D,x,w,z,A)}l={offsetX:m.ha*l,path:u}}else l=void 0;g+=l.offsetX;a.push(l.path)}}b=0;for(e=a.length;b<e;b++)Array.prototype.push.apply(c,\na[b].toShapes());return c}});Object.assign(nf.prototype,{load:function(a,b,c,d){var e=this,f=new Ga(this.manager);f.setPath(this.path);f.load(a,function(a){try{var c=JSON.parse(a)}catch(k){console.warn(\"THREE.FontLoader: typeface.js support is being deprecated. Use typeface.json instead.\"),c=JSON.parse(a.substring(65,a.length-2))}a=e.parse(c);b&&b(a)},c,d)},parse:function(a){return new ke(a)},setPath:function(a){this.path=a;return this}});var Pd,ne={getContext:function(){void 0===Pd&&(Pd=new (window.AudioContext||\nwindow.webkitAudioContext));return Pd},setContext:function(a){Pd=a}};Object.assign(le.prototype,{load:function(a,b,c,d){var e=new Ga(this.manager);e.setResponseType(\"arraybuffer\");e.load(a,function(a){a=a.slice(0);ne.getContext().decodeAudioData(a,function(a){b(a)})},c,d)}});Object.assign(of.prototype,{update:function(){var a,b,c,d,e,f,g,h,k=new I,l=new I;return function(m){if(a!==this||b!==m.focus||c!==m.fov||d!==m.aspect*this.aspect||e!==m.near||f!==m.far||g!==m.zoom||h!==this.eyeSep){a=this;b=\nm.focus;c=m.fov;d=m.aspect*this.aspect;e=m.near;f=m.far;g=m.zoom;var n=m.projectionMatrix.clone();h=this.eyeSep/2;var p=h*e/b,q=e*Math.tan(H.DEG2RAD*c*.5)/g;l.elements[12]=-h;k.elements[12]=h;var r=-q*d+p;var v=q*d+p;n.elements[0]=2*e/(v-r);n.elements[8]=(v+r)/(v-r);this.cameraL.projectionMatrix.copy(n);r=-q*d-p;v=q*d-p;n.elements[0]=2*e/(v-r);n.elements[8]=(v+r)/(v-r);this.cameraR.projectionMatrix.copy(n)}this.cameraL.matrixWorld.copy(m.matrixWorld).multiply(l);this.cameraR.matrixWorld.copy(m.matrixWorld).multiply(k)}}()});\ndd.prototype=Object.create(D.prototype);dd.prototype.constructor=dd;me.prototype=Object.assign(Object.create(D.prototype),{constructor:me,getInput:function(){return this.gain},removeFilter:function(){null!==this.filter&&(this.gain.disconnect(this.filter),this.filter.disconnect(this.context.destination),this.gain.connect(this.context.destination),this.filter=null);return this},getFilter:function(){return this.filter},setFilter:function(a){null!==this.filter?(this.gain.disconnect(this.filter),this.filter.disconnect(this.context.destination)):\nthis.gain.disconnect(this.context.destination);this.filter=a;this.gain.connect(this.filter);this.filter.connect(this.context.destination);return this},getMasterVolume:function(){return this.gain.gain.value},setMasterVolume:function(a){this.gain.gain.setTargetAtTime(a,this.context.currentTime,.01);return this},updateMatrixWorld:function(){var a=new p,b=new fa,c=new p,d=new p;return function(e){D.prototype.updateMatrixWorld.call(this,e);e=this.context.listener;var f=this.up;this.matrixWorld.decompose(a,\nb,c);d.set(0,0,-1).applyQuaternion(b);e.positionX?(e.positionX.setValueAtTime(a.x,this.context.currentTime),e.positionY.setValueAtTime(a.y,this.context.currentTime),e.positionZ.setValueAtTime(a.z,this.context.currentTime),e.forwardX.setValueAtTime(d.x,this.context.currentTime),e.forwardY.setValueAtTime(d.y,this.context.currentTime),e.forwardZ.setValueAtTime(d.z,this.context.currentTime),e.upX.setValueAtTime(f.x,this.context.currentTime),e.upY.setValueAtTime(f.y,this.context.currentTime),e.upZ.setValueAtTime(f.z,\nthis.context.currentTime)):(e.setPosition(a.x,a.y,a.z),e.setOrientation(d.x,d.y,d.z,f.x,f.y,f.z))}}()});hc.prototype=Object.assign(Object.create(D.prototype),{constructor:hc,getOutput:function(){return this.gain},setNodeSource:function(a){this.hasPlaybackControl=!1;this.sourceType=\"audioNode\";this.source=a;this.connect();return this},setMediaElementSource:function(a){this.hasPlaybackControl=!1;this.sourceType=\"mediaNode\";this.source=this.context.createMediaElementSource(a);this.connect();return this},\nsetBuffer:function(a){this.buffer=a;this.sourceType=\"buffer\";this.autoplay&&this.play();return this},play:function(){if(!0===this.isPlaying)console.warn(\"THREE.Audio: Audio is already playing.\");else if(!1===this.hasPlaybackControl)console.warn(\"THREE.Audio: this Audio has no playback control.\");else{var a=this.context.createBufferSource();a.buffer=this.buffer;a.loop=this.loop;a.onended=this.onEnded.bind(this);a.playbackRate.setValueAtTime(this.playbackRate,this.startTime);this.startTime=this.context.currentTime;\na.start(this.startTime,this.offset);this.isPlaying=!0;this.source=a;return this.connect()}},pause:function(){if(!1===this.hasPlaybackControl)console.warn(\"THREE.Audio: this Audio has no playback control.\");else return!0===this.isPlaying&&(this.source.stop(),this.source.onended=null,this.offset+=(this.context.currentTime-this.startTime)*this.playbackRate,this.isPlaying=!1),this},stop:function(){if(!1===this.hasPlaybackControl)console.warn(\"THREE.Audio: this Audio has no playback control.\");else return this.source.stop(),\nthis.source.onended=null,this.offset=0,this.isPlaying=!1,this},connect:function(){if(0<this.filters.length){this.source.connect(this.filters[0]);for(var a=1,b=this.filters.length;a<b;a++)this.filters[a-1].connect(this.filters[a]);this.filters[this.filters.length-1].connect(this.getOutput())}else this.source.connect(this.getOutput());return this},disconnect:function(){if(0<this.filters.length){this.source.disconnect(this.filters[0]);for(var a=1,b=this.filters.length;a<b;a++)this.filters[a-1].disconnect(this.filters[a]);\nthis.filters[this.filters.length-1].disconnect(this.getOutput())}else this.source.disconnect(this.getOutput());return this},getFilters:function(){return this.filters},setFilters:function(a){a||(a=[]);!0===this.isPlaying?(this.disconnect(),this.filters=a,this.connect()):this.filters=a;return this},getFilter:function(){return this.getFilters()[0]},setFilter:function(a){return this.setFilters(a?[a]:[])},setPlaybackRate:function(a){if(!1===this.hasPlaybackControl)console.warn(\"THREE.Audio: this Audio has no playback control.\");\nelse return this.playbackRate=a,!0===this.isPlaying&&this.source.playbackRate.setValueAtTime(this.playbackRate,this.context.currentTime),this},getPlaybackRate:function(){return this.playbackRate},onEnded:function(){this.isPlaying=!1},getLoop:function(){return!1===this.hasPlaybackControl?(console.warn(\"THREE.Audio: this Audio has no playback control.\"),!1):this.loop},setLoop:function(a){if(!1===this.hasPlaybackControl)console.warn(\"THREE.Audio: this Audio has no playback control.\");else return this.loop=\na,!0===this.isPlaying&&(this.source.loop=this.loop),this},getVolume:function(){return this.gain.gain.value},setVolume:function(a){this.gain.gain.setTargetAtTime(a,this.context.currentTime,.01);return this}});oe.prototype=Object.assign(Object.create(hc.prototype),{constructor:oe,getOutput:function(){return this.panner},getRefDistance:function(){return this.panner.refDistance},setRefDistance:function(a){this.panner.refDistance=a;return this},getRolloffFactor:function(){return this.panner.rolloffFactor},\nsetRolloffFactor:function(a){this.panner.rolloffFactor=a;return this},getDistanceModel:function(){return this.panner.distanceModel},setDistanceModel:function(a){this.panner.distanceModel=a;return this},getMaxDistance:function(){return this.panner.maxDistance},setMaxDistance:function(a){this.panner.maxDistance=a;return this},setDirectionalCone:function(a,b,c){this.panner.coneInnerAngle=a;this.panner.coneOuterAngle=b;this.panner.coneOuterGain=c;return this},updateMatrixWorld:function(){var a=new p,\nb=new fa,c=new p,d=new p;return function(e){D.prototype.updateMatrixWorld.call(this,e);e=this.panner;this.matrixWorld.decompose(a,b,c);d.set(0,0,1).applyQuaternion(b);e.setPosition(a.x,a.y,a.z);e.setOrientation(d.x,d.y,d.z)}}()});Object.assign(pe.prototype,{getFrequencyData:function(){this.analyser.getByteFrequencyData(this.data);return this.data},getAverageFrequency:function(){for(var a=0,b=this.getFrequencyData(),c=0;c<b.length;c++)a+=b[c];return a/b.length}});Object.assign(qe.prototype,{accumulate:function(a,\nb){var c=this.buffer,d=this.valueSize;a=a*d+d;var e=this.cumulativeWeight;if(0===e){for(e=0;e!==d;++e)c[a+e]=c[e];e=b}else e+=b,this._mixBufferRegion(c,a,0,b/e,d);this.cumulativeWeight=e},apply:function(a){var b=this.valueSize,c=this.buffer;a=a*b+b;var d=this.cumulativeWeight,e=this.binding;this.cumulativeWeight=0;1>d&&this._mixBufferRegion(c,a,3*b,1-d,b);d=b;for(var f=b+b;d!==f;++d)if(c[d]!==c[d+b]){e.setValue(c,a);break}},saveOriginalState:function(){var a=this.buffer,b=this.valueSize,c=3*b;this.binding.getValue(a,\nc);for(var d=b;d!==c;++d)a[d]=a[c+d%b];this.cumulativeWeight=0},restoreOriginalState:function(){this.binding.setValue(this.buffer,3*this.valueSize)},_select:function(a,b,c,d,e){if(.5<=d)for(d=0;d!==e;++d)a[b+d]=a[c+d]},_slerp:function(a,b,c,d){fa.slerpFlat(a,b,a,b,a,c,d)},_lerp:function(a,b,c,d,e){for(var f=1-d,g=0;g!==e;++g){var h=b+g;a[h]=a[h]*f+a[c+g]*d}}});Object.assign(pf.prototype,{getValue:function(a,b){this.bind();var c=this._bindings[this._targetGroup.nCachedObjects_];void 0!==c&&c.getValue(a,\nb)},setValue:function(a,b){for(var c=this._bindings,d=this._targetGroup.nCachedObjects_,e=c.length;d!==e;++d)c[d].setValue(a,b)},bind:function(){for(var a=this._bindings,b=this._targetGroup.nCachedObjects_,c=a.length;b!==c;++b)a[b].bind()},unbind:function(){for(var a=this._bindings,b=this._targetGroup.nCachedObjects_,c=a.length;b!==c;++b)a[b].unbind()}});Object.assign(pa,{Composite:pf,create:function(a,b,c){return a&&a.isAnimationObjectGroup?new pa.Composite(a,b,c):new pa(a,b,c)},sanitizeNodeName:function(){var a=\n/[\\[\\]\\.:\\/]/g;return function(b){return b.replace(/\\s/g,\"_\").replace(a,\"\")}}(),parseTrackName:function(){var a=\"[^\"+\"\\\\[\\\\]\\\\.:\\\\/\".replace(\"\\\\.\",\"\")+\"]\",b=/((?:WC+[\\/:])*)/.source.replace(\"WC\",\"[^\\\\[\\\\]\\\\.:\\\\/]\");a=/(WCOD+)?/.source.replace(\"WCOD\",a);var c=/(?:\\.(WC+)(?:\\[(.+)\\])?)?/.source.replace(\"WC\",\"[^\\\\[\\\\]\\\\.:\\\\/]\"),d=/\\.(WC+)(?:\\[(.+)\\])?/.source.replace(\"WC\",\"[^\\\\[\\\\]\\\\.:\\\\/]\"),e=new RegExp(\"^\"+b+a+c+d+\"$\"),f=[\"material\",\"materials\",\"bones\"];return function(a){var b=e.exec(a);if(!b)throw Error(\"PropertyBinding: Cannot parse trackName: \"+\na);b={nodeName:b[2],objectName:b[3],objectIndex:b[4],propertyName:b[5],propertyIndex:b[6]};var c=b.nodeName&&b.nodeName.lastIndexOf(\".\");if(void 0!==c&&-1!==c){var d=b.nodeName.substring(c+1);-1!==f.indexOf(d)&&(b.nodeName=b.nodeName.substring(0,c),b.objectName=d)}if(null===b.propertyName||0===b.propertyName.length)throw Error(\"PropertyBinding: can not parse propertyName from trackName: \"+a);return b}}(),findNode:function(a,b){if(!b||\"\"===b||\"root\"===b||\".\"===b||-1===b||b===a.name||b===a.uuid)return a;\nif(a.skeleton){var c=a.skeleton.getBoneByName(b);if(void 0!==c)return c}if(a.children){var d=function(a){for(var c=0;c<a.length;c++){var e=a[c];if(e.name===b||e.uuid===b||(e=d(e.children)))return e}return null};if(a=d(a.children))return a}return null}});Object.assign(pa.prototype,{_getValue_unavailable:function(){},_setValue_unavailable:function(){},BindingType:{Direct:0,EntireArray:1,ArrayElement:2,HasFromToArray:3},Versioning:{None:0,NeedsUpdate:1,MatrixWorldNeedsUpdate:2},GetterByBindingType:[function(a,\nb){a[b]=this.node[this.propertyName]},function(a,b){for(var c=this.resolvedProperty,d=0,e=c.length;d!==e;++d)a[b++]=c[d]},function(a,b){a[b]=this.resolvedProperty[this.propertyIndex]},function(a,b){this.resolvedProperty.toArray(a,b)}],SetterByBindingTypeAndVersioning:[[function(a,b){this.targetObject[this.propertyName]=a[b]},function(a,b){this.targetObject[this.propertyName]=a[b];this.targetObject.needsUpdate=!0},function(a,b){this.targetObject[this.propertyName]=a[b];this.targetObject.matrixWorldNeedsUpdate=\n!0}],[function(a,b){for(var c=this.resolvedProperty,d=0,e=c.length;d!==e;++d)c[d]=a[b++]},function(a,b){for(var c=this.resolvedProperty,d=0,e=c.length;d!==e;++d)c[d]=a[b++];this.targetObject.needsUpdate=!0},function(a,b){for(var c=this.resolvedProperty,d=0,e=c.length;d!==e;++d)c[d]=a[b++];this.targetObject.matrixWorldNeedsUpdate=!0}],[function(a,b){this.resolvedProperty[this.propertyIndex]=a[b]},function(a,b){this.resolvedProperty[this.propertyIndex]=a[b];this.targetObject.needsUpdate=!0},function(a,\nb){this.resolvedProperty[this.propertyIndex]=a[b];this.targetObject.matrixWorldNeedsUpdate=!0}],[function(a,b){this.resolvedProperty.fromArray(a,b)},function(a,b){this.resolvedProperty.fromArray(a,b);this.targetObject.needsUpdate=!0},function(a,b){this.resolvedProperty.fromArray(a,b);this.targetObject.matrixWorldNeedsUpdate=!0}]],getValue:function(a,b){this.bind();this.getValue(a,b)},setValue:function(a,b){this.bind();this.setValue(a,b)},bind:function(){var a=this.node,b=this.parsedPath,c=b.objectName,\nd=b.propertyName,e=b.propertyIndex;a||(this.node=a=pa.findNode(this.rootNode,b.nodeName)||this.rootNode);this.getValue=this._getValue_unavailable;this.setValue=this._setValue_unavailable;if(a){if(c){var f=b.objectIndex;switch(c){case \"materials\":if(!a.material){console.error(\"THREE.PropertyBinding: Can not bind to material as node does not have a material.\",this);return}if(!a.material.materials){console.error(\"THREE.PropertyBinding: Can not bind to material.materials as node.material does not have a materials array.\",\nthis);return}a=a.material.materials;break;case \"bones\":if(!a.skeleton){console.error(\"THREE.PropertyBinding: Can not bind to bones as node does not have a skeleton.\",this);return}a=a.skeleton.bones;for(c=0;c<a.length;c++)if(a[c].name===f){f=c;break}break;default:if(void 0===a[c]){console.error(\"THREE.PropertyBinding: Can not bind to objectName of node undefined.\",this);return}a=a[c]}if(void 0!==f){if(void 0===a[f]){console.error(\"THREE.PropertyBinding: Trying to bind to objectIndex of objectName, but is undefined.\",\nthis,a);return}a=a[f]}}f=a[d];if(void 0===f)console.error(\"THREE.PropertyBinding: Trying to update property for track: \"+b.nodeName+\".\"+d+\" but it wasn't found.\",a);else{b=this.Versioning.None;void 0!==a.needsUpdate?(b=this.Versioning.NeedsUpdate,this.targetObject=a):void 0!==a.matrixWorldNeedsUpdate&&(b=this.Versioning.MatrixWorldNeedsUpdate,this.targetObject=a);c=this.BindingType.Direct;if(void 0!==e){if(\"morphTargetInfluences\"===d){if(!a.geometry){console.error(\"THREE.PropertyBinding: Can not bind to morphTargetInfluences because node does not have a geometry.\",\nthis);return}if(a.geometry.isBufferGeometry){if(!a.geometry.morphAttributes){console.error(\"THREE.PropertyBinding: Can not bind to morphTargetInfluences because node does not have a geometry.morphAttributes.\",this);return}for(c=0;c<this.node.geometry.morphAttributes.position.length;c++)if(a.geometry.morphAttributes.position[c].name===e){e=c;break}}else{if(!a.geometry.morphTargets){console.error(\"THREE.PropertyBinding: Can not bind to morphTargetInfluences because node does not have a geometry.morphTargets.\",\nthis);return}for(c=0;c<this.node.geometry.morphTargets.length;c++)if(a.geometry.morphTargets[c].name===e){e=c;break}}}c=this.BindingType.ArrayElement;this.resolvedProperty=f;this.propertyIndex=e}else void 0!==f.fromArray&&void 0!==f.toArray?(c=this.BindingType.HasFromToArray,this.resolvedProperty=f):Array.isArray(f)?(c=this.BindingType.EntireArray,this.resolvedProperty=f):this.propertyName=d;this.getValue=this.GetterByBindingType[c];this.setValue=this.SetterByBindingTypeAndVersioning[c][b]}}else console.error(\"THREE.PropertyBinding: Trying to update node for track: \"+\nthis.path+\" but it wasn't found.\")},unbind:function(){this.node=null;this.getValue=this._getValue_unbound;this.setValue=this._setValue_unbound}});Object.assign(pa.prototype,{_getValue_unbound:pa.prototype.getValue,_setValue_unbound:pa.prototype.setValue});Object.assign(qf.prototype,{isAnimationObjectGroup:!0,add:function(){for(var a=this._objects,b=a.length,c=this.nCachedObjects_,d=this._indicesByUUID,e=this._paths,f=this._parsedPaths,g=this._bindings,h=g.length,k=void 0,l=0,p=arguments.length;l!==\np;++l){var n=arguments[l],t=n.uuid,u=d[t];if(void 0===u){u=b++;d[t]=u;a.push(n);t=0;for(var r=h;t!==r;++t)g[t].push(new pa(n,e[t],f[t]))}else if(u<c){k=a[u];var v=--c;r=a[v];d[r.uuid]=u;a[u]=r;d[t]=v;a[v]=n;t=0;for(r=h;t!==r;++t){var y=g[t],x=y[u];y[u]=y[v];void 0===x&&(x=new pa(n,e[t],f[t]));y[v]=x}}else a[u]!==k&&console.error(\"THREE.AnimationObjectGroup: Different objects with the same UUID detected. Clean the caches or recreate your infrastructure when reloading scenes.\")}this.nCachedObjects_=\nc},remove:function(){for(var a=this._objects,b=this.nCachedObjects_,c=this._indicesByUUID,d=this._bindings,e=d.length,f=0,g=arguments.length;f!==g;++f){var h=arguments[f],k=h.uuid,l=c[k];if(void 0!==l&&l>=b){var p=b++,n=a[p];c[n.uuid]=l;a[l]=n;c[k]=p;a[p]=h;h=0;for(k=e;h!==k;++h){n=d[h];var t=n[l];n[l]=n[p];n[p]=t}}}this.nCachedObjects_=b},uncache:function(){for(var a=this._objects,b=a.length,c=this.nCachedObjects_,d=this._indicesByUUID,e=this._bindings,f=e.length,g=0,h=arguments.length;g!==h;++g){var k=\narguments[g].uuid,l=d[k];if(void 0!==l)if(delete d[k],l<c){k=--c;var p=a[k],n=--b,t=a[n];d[p.uuid]=l;a[l]=p;d[t.uuid]=k;a[k]=t;a.pop();p=0;for(t=f;p!==t;++p){var u=e[p],r=u[n];u[l]=u[k];u[k]=r;u.pop()}}else for(n=--b,t=a[n],d[t.uuid]=l,a[l]=t,a.pop(),p=0,t=f;p!==t;++p)u=e[p],u[l]=u[n],u.pop()}this.nCachedObjects_=c},subscribe_:function(a,b){var c=this._bindingsIndicesByPath,d=c[a],e=this._bindings;if(void 0!==d)return e[d];var f=this._paths,g=this._parsedPaths,h=this._objects,k=this.nCachedObjects_,\nl=Array(h.length);d=e.length;c[a]=d;f.push(a);g.push(b);e.push(l);c=k;for(d=h.length;c!==d;++c)l[c]=new pa(h[c],a,b);return l},unsubscribe_:function(a){var b=this._bindingsIndicesByPath,c=b[a];if(void 0!==c){var d=this._paths,e=this._parsedPaths,f=this._bindings,g=f.length-1,h=f[g];b[a[g]]=c;f[c]=h;f.pop();e[c]=e[g];e.pop();d[c]=d[g];d.pop()}}});Object.assign(rf.prototype,{play:function(){this._mixer._activateAction(this);return this},stop:function(){this._mixer._deactivateAction(this);return this.reset()},\nreset:function(){this.paused=!1;this.enabled=!0;this.time=0;this._loopCount=-1;this._startTime=null;return this.stopFading().stopWarping()},isRunning:function(){return this.enabled&&!this.paused&&0!==this.timeScale&&null===this._startTime&&this._mixer._isActiveAction(this)},isScheduled:function(){return this._mixer._isActiveAction(this)},startAt:function(a){this._startTime=a;return this},setLoop:function(a,b){this.loop=a;this.repetitions=b;return this},setEffectiveWeight:function(a){this.weight=a;\nthis._effectiveWeight=this.enabled?a:0;return this.stopFading()},getEffectiveWeight:function(){return this._effectiveWeight},fadeIn:function(a){return this._scheduleFading(a,0,1)},fadeOut:function(a){return this._scheduleFading(a,1,0)},crossFadeFrom:function(a,b,c){a.fadeOut(b);this.fadeIn(b);if(c){c=this._clip.duration;var d=a._clip.duration,e=c/d;a.warp(1,d/c,b);this.warp(e,1,b)}return this},crossFadeTo:function(a,b,c){return a.crossFadeFrom(this,b,c)},stopFading:function(){var a=this._weightInterpolant;\nnull!==a&&(this._weightInterpolant=null,this._mixer._takeBackControlInterpolant(a));return this},setEffectiveTimeScale:function(a){this.timeScale=a;this._effectiveTimeScale=this.paused?0:a;return this.stopWarping()},getEffectiveTimeScale:function(){return this._effectiveTimeScale},setDuration:function(a){this.timeScale=this._clip.duration/a;return this.stopWarping()},syncWith:function(a){this.time=a.time;this.timeScale=a.timeScale;return this.stopWarping()},halt:function(a){return this.warp(this._effectiveTimeScale,\n0,a)},warp:function(a,b,c){var d=this._mixer,e=d.time,f=this._timeScaleInterpolant,g=this.timeScale;null===f&&(this._timeScaleInterpolant=f=d._lendControlInterpolant());d=f.parameterPositions;f=f.sampleValues;d[0]=e;d[1]=e+c;f[0]=a/g;f[1]=b/g;return this},stopWarping:function(){var a=this._timeScaleInterpolant;null!==a&&(this._timeScaleInterpolant=null,this._mixer._takeBackControlInterpolant(a));return this},getMixer:function(){return this._mixer},getClip:function(){return this._clip},getRoot:function(){return this._localRoot||\nthis._mixer._root},_update:function(a,b,c,d){if(this.enabled){var e=this._startTime;if(null!==e){b=(a-e)*c;if(0>b||0===c)return;this._startTime=null;b*=c}b*=this._updateTimeScale(a);c=this._updateTime(b);a=this._updateWeight(a);if(0<a){b=this._interpolants;e=this._propertyBindings;for(var f=0,g=b.length;f!==g;++f)b[f].evaluate(c),e[f].accumulate(d,a)}}else this._updateWeight(a)},_updateWeight:function(a){var b=0;if(this.enabled){b=this.weight;var c=this._weightInterpolant;if(null!==c){var d=c.evaluate(a)[0];\nb*=d;a>c.parameterPositions[1]&&(this.stopFading(),0===d&&(this.enabled=!1))}}return this._effectiveWeight=b},_updateTimeScale:function(a){var b=0;if(!this.paused){b=this.timeScale;var c=this._timeScaleInterpolant;if(null!==c){var d=c.evaluate(a)[0];b*=d;a>c.parameterPositions[1]&&(this.stopWarping(),0===b?this.paused=!0:this.timeScale=b)}}return this._effectiveTimeScale=b},_updateTime:function(a){var b=this.time+a,c=this._clip.duration,d=this.loop,e=this._loopCount,f=2202===d;if(0===a)return-1===\ne?b:f&&1===(e&1)?c-b:b;if(2200===d)a:{if(-1===e&&(this._loopCount=0,this._setEndings(!0,!0,!1)),b>=c)b=c;else if(0>b)b=0;else break a;this.clampWhenFinished?this.paused=!0:this.enabled=!1;this._mixer.dispatchEvent({type:\"finished\",action:this,direction:0>a?-1:1})}else{-1===e&&(0<=a?(e=0,this._setEndings(!0,0===this.repetitions,f)):this._setEndings(0===this.repetitions,!0,f));if(b>=c||0>b){d=Math.floor(b/c);b-=c*d;e+=Math.abs(d);var g=this.repetitions-e;0>=g?(this.clampWhenFinished?this.paused=!0:\nthis.enabled=!1,b=0<a?c:0,this._mixer.dispatchEvent({type:\"finished\",action:this,direction:0<a?1:-1})):(1===g?(a=0>a,this._setEndings(a,!a,f)):this._setEndings(!1,!1,f),this._loopCount=e,this._mixer.dispatchEvent({type:\"loop\",action:this,loopDelta:d}))}if(f&&1===(e&1))return this.time=b,c-b}return this.time=b},_setEndings:function(a,b,c){var d=this._interpolantSettings;c?(d.endingStart=2401,d.endingEnd=2401):(d.endingStart=a?this.zeroSlopeAtStart?2401:2400:2402,d.endingEnd=b?this.zeroSlopeAtEnd?2401:\n2400:2402)},_scheduleFading:function(a,b,c){var d=this._mixer,e=d.time,f=this._weightInterpolant;null===f&&(this._weightInterpolant=f=d._lendControlInterpolant());d=f.parameterPositions;f=f.sampleValues;d[0]=e;f[0]=b;d[1]=e+a;f[1]=c;return this}});re.prototype=Object.assign(Object.create(ya.prototype),{constructor:re,_bindAction:function(a,b){var c=a._localRoot||this._root,d=a._clip.tracks,e=d.length,f=a._propertyBindings;a=a._interpolants;var g=c.uuid,h=this._bindingsByRootAndName,k=h[g];void 0===\nk&&(k={},h[g]=k);for(h=0;h!==e;++h){var l=d[h],p=l.name,n=k[p];if(void 0===n){n=f[h];if(void 0!==n){null===n._cacheIndex&&(++n.referenceCount,this._addInactiveBinding(n,g,p));continue}n=new qe(pa.create(c,p,b&&b._propertyBindings[h].binding.parsedPath),l.ValueTypeName,l.getValueSize());++n.referenceCount;this._addInactiveBinding(n,g,p)}f[h]=n;a[h].resultBuffer=n.buffer}},_activateAction:function(a){if(!this._isActiveAction(a)){if(null===a._cacheIndex){var b=(a._localRoot||this._root).uuid,c=a._clip.uuid,\nd=this._actionsByClip[c];this._bindAction(a,d&&d.knownActions[0]);this._addInactiveAction(a,c,b)}b=a._propertyBindings;c=0;for(d=b.length;c!==d;++c){var e=b[c];0===e.useCount++&&(this._lendBinding(e),e.saveOriginalState())}this._lendAction(a)}},_deactivateAction:function(a){if(this._isActiveAction(a)){for(var b=a._propertyBindings,c=0,d=b.length;c!==d;++c){var e=b[c];0===--e.useCount&&(e.restoreOriginalState(),this._takeBackBinding(e))}this._takeBackAction(a)}},_initMemoryManager:function(){this._actions=\n[];this._nActiveActions=0;this._actionsByClip={};this._bindings=[];this._nActiveBindings=0;this._bindingsByRootAndName={};this._controlInterpolants=[];this._nActiveControlInterpolants=0;var a=this;this.stats={actions:{get total(){return a._actions.length},get inUse(){return a._nActiveActions}},bindings:{get total(){return a._bindings.length},get inUse(){return a._nActiveBindings}},controlInterpolants:{get total(){return a._controlInterpolants.length},get inUse(){return a._nActiveControlInterpolants}}}},\n_isActiveAction:function(a){a=a._cacheIndex;return null!==a&&a<this._nActiveActions},_addInactiveAction:function(a,b,c){var d=this._actions,e=this._actionsByClip,f=e[b];void 0===f?(f={knownActions:[a],actionByRoot:{}},a._byClipCacheIndex=0,e[b]=f):(b=f.knownActions,a._byClipCacheIndex=b.length,b.push(a));a._cacheIndex=d.length;d.push(a);f.actionByRoot[c]=a},_removeInactiveAction:function(a){var b=this._actions,c=b[b.length-1],d=a._cacheIndex;c._cacheIndex=d;b[d]=c;b.pop();a._cacheIndex=null;b=a._clip.uuid;\nc=this._actionsByClip;d=c[b];var e=d.knownActions,f=e[e.length-1],g=a._byClipCacheIndex;f._byClipCacheIndex=g;e[g]=f;e.pop();a._byClipCacheIndex=null;delete d.actionByRoot[(a._localRoot||this._root).uuid];0===e.length&&delete c[b];this._removeInactiveBindingsForAction(a)},_removeInactiveBindingsForAction:function(a){a=a._propertyBindings;for(var b=0,c=a.length;b!==c;++b){var d=a[b];0===--d.referenceCount&&this._removeInactiveBinding(d)}},_lendAction:function(a){var b=this._actions,c=a._cacheIndex,\nd=this._nActiveActions++,e=b[d];a._cacheIndex=d;b[d]=a;e._cacheIndex=c;b[c]=e},_takeBackAction:function(a){var b=this._actions,c=a._cacheIndex,d=--this._nActiveActions,e=b[d];a._cacheIndex=d;b[d]=a;e._cacheIndex=c;b[c]=e},_addInactiveBinding:function(a,b,c){var d=this._bindingsByRootAndName,e=d[b],f=this._bindings;void 0===e&&(e={},d[b]=e);e[c]=a;a._cacheIndex=f.length;f.push(a)},_removeInactiveBinding:function(a){var b=this._bindings,c=a.binding,d=c.rootNode.uuid;c=c.path;var e=this._bindingsByRootAndName,\nf=e[d],g=b[b.length-1];a=a._cacheIndex;g._cacheIndex=a;b[a]=g;b.pop();delete f[c];a:{for(var h in f)break a;delete e[d]}},_lendBinding:function(a){var b=this._bindings,c=a._cacheIndex,d=this._nActiveBindings++,e=b[d];a._cacheIndex=d;b[d]=a;e._cacheIndex=c;b[c]=e},_takeBackBinding:function(a){var b=this._bindings,c=a._cacheIndex,d=--this._nActiveBindings,e=b[d];a._cacheIndex=d;b[d]=a;e._cacheIndex=c;b[c]=e},_lendControlInterpolant:function(){var a=this._controlInterpolants,b=this._nActiveControlInterpolants++,\nc=a[b];void 0===c&&(c=new bd(new Float32Array(2),new Float32Array(2),1,this._controlInterpolantsResultBuffer),c.__cacheIndex=b,a[b]=c);return c},_takeBackControlInterpolant:function(a){var b=this._controlInterpolants,c=a.__cacheIndex,d=--this._nActiveControlInterpolants,e=b[d];a.__cacheIndex=d;b[d]=a;e.__cacheIndex=c;b[c]=e},_controlInterpolantsResultBuffer:new Float32Array(1),clipAction:function(a,b){var c=b||this._root,d=c.uuid;c=\"string\"===typeof a?Ca.findByName(c,a):a;a=null!==c?c.uuid:a;var e=\nthis._actionsByClip[a],f=null;if(void 0!==e){f=e.actionByRoot[d];if(void 0!==f)return f;f=e.knownActions[0];null===c&&(c=f._clip)}if(null===c)return null;b=new rf(this,c,b);this._bindAction(b,f);this._addInactiveAction(b,a,d);return b},existingAction:function(a,b){var c=b||this._root;b=c.uuid;c=\"string\"===typeof a?Ca.findByName(c,a):a;a=this._actionsByClip[c?c.uuid:a];return void 0!==a?a.actionByRoot[b]||null:null},stopAllAction:function(){for(var a=this._actions,b=this._nActiveActions,c=this._bindings,\nd=this._nActiveBindings,e=this._nActiveBindings=this._nActiveActions=0;e!==b;++e)a[e].reset();for(e=0;e!==d;++e)c[e].useCount=0;return this},update:function(a){a*=this.timeScale;for(var b=this._actions,c=this._nActiveActions,d=this.time+=a,e=Math.sign(a),f=this._accuIndex^=1,g=0;g!==c;++g)b[g]._update(d,a,e,f);a=this._bindings;b=this._nActiveBindings;for(g=0;g!==b;++g)a[g].apply(f);return this},getRoot:function(){return this._root},uncacheClip:function(a){var b=this._actions;a=a.uuid;var c=this._actionsByClip,\nd=c[a];if(void 0!==d){d=d.knownActions;for(var e=0,f=d.length;e!==f;++e){var g=d[e];this._deactivateAction(g);var h=g._cacheIndex,k=b[b.length-1];g._cacheIndex=null;g._byClipCacheIndex=null;k._cacheIndex=h;b[h]=k;b.pop();this._removeInactiveBindingsForAction(g)}delete c[a]}},uncacheRoot:function(a){a=a.uuid;var b=this._actionsByClip;for(d in b){var c=b[d].actionByRoot[a];void 0!==c&&(this._deactivateAction(c),this._removeInactiveAction(c))}var d=this._bindingsByRootAndName[a];if(void 0!==d)for(var e in d)a=\nd[e],a.restoreOriginalState(),this._removeInactiveBinding(a)},uncacheAction:function(a,b){a=this.existingAction(a,b);null!==a&&(this._deactivateAction(a),this._removeInactiveAction(a))}});Ld.prototype.clone=function(){return new Ld(void 0===this.value.clone?this.value:this.value.clone())};se.prototype=Object.assign(Object.create(C.prototype),{constructor:se,isInstancedBufferGeometry:!0,copy:function(a){C.prototype.copy.call(this,a);this.maxInstancedCount=a.maxInstancedCount;return this},clone:function(){return(new this.constructor).copy(this)}});\nte.prototype=Object.assign(Object.create(ob.prototype),{constructor:te,isInstancedInterleavedBuffer:!0,copy:function(a){ob.prototype.copy.call(this,a);this.meshPerAttribute=a.meshPerAttribute;return this}});ue.prototype=Object.assign(Object.create(Q.prototype),{constructor:ue,isInstancedBufferAttribute:!0,copy:function(a){Q.prototype.copy.call(this,a);this.meshPerAttribute=a.meshPerAttribute;return this}});Object.assign(sf.prototype,{linePrecision:1,set:function(a,b){this.ray.set(a,b)},setFromCamera:function(a,\nb){b&&b.isPerspectiveCamera?(this.ray.origin.setFromMatrixPosition(b.matrixWorld),this.ray.direction.set(a.x,a.y,.5).unproject(b).sub(this.ray.origin).normalize()):b&&b.isOrthographicCamera?(this.ray.origin.set(a.x,a.y,(b.near+b.far)/(b.near-b.far)).unproject(b),this.ray.direction.set(0,0,-1).transformDirection(b.matrixWorld)):console.error(\"THREE.Raycaster: Unsupported camera type.\")},intersectObject:function(a,b,c){c=c||[];ve(a,this,c,b);c.sort(tf);return c},intersectObjects:function(a,b,c){c=c||\n[];if(!1===Array.isArray(a))return console.warn(\"THREE.Raycaster.intersectObjects: objects is not an Array.\"),c;for(var d=0,e=a.length;d<e;d++)ve(a[d],this,c,b);c.sort(tf);return c}});Object.assign(uf.prototype,{start:function(){this.oldTime=this.startTime=(\"undefined\"===typeof performance?Date:performance).now();this.elapsedTime=0;this.running=!0},stop:function(){this.getElapsedTime();this.autoStart=this.running=!1},getElapsedTime:function(){this.getDelta();return this.elapsedTime},getDelta:function(){var a=\n0;if(this.autoStart&&!this.running)return this.start(),0;if(this.running){var b=(\"undefined\"===typeof performance?Date:performance).now();a=(b-this.oldTime)/1E3;this.oldTime=b;this.elapsedTime+=a}return a}});Object.assign(vf.prototype,{set:function(a,b,c){this.radius=a;this.phi=b;this.theta=c;return this},clone:function(){return(new this.constructor).copy(this)},copy:function(a){this.radius=a.radius;this.phi=a.phi;this.theta=a.theta;return this},makeSafe:function(){this.phi=Math.max(1E-6,Math.min(Math.PI-\n1E-6,this.phi));return this},setFromVector3:function(a){this.radius=a.length();0===this.radius?this.phi=this.theta=0:(this.theta=Math.atan2(a.x,a.z),this.phi=Math.acos(H.clamp(a.y/this.radius,-1,1)));return this}});Object.assign(wf.prototype,{set:function(a,b,c){this.radius=a;this.theta=b;this.y=c;return this},clone:function(){return(new this.constructor).copy(this)},copy:function(a){this.radius=a.radius;this.theta=a.theta;this.y=a.y;return this},setFromVector3:function(a){this.radius=Math.sqrt(a.x*\na.x+a.z*a.z);this.theta=Math.atan2(a.x,a.z);this.y=a.y;return this}});Object.assign(we.prototype,{set:function(a,b){this.min.copy(a);this.max.copy(b);return this},setFromPoints:function(a){this.makeEmpty();for(var b=0,c=a.length;b<c;b++)this.expandByPoint(a[b]);return this},setFromCenterAndSize:function(){var a=new z;return function(b,c){c=a.copy(c).multiplyScalar(.5);this.min.copy(b).sub(c);this.max.copy(b).add(c);return this}}(),clone:function(){return(new this.constructor).copy(this)},copy:function(a){this.min.copy(a.min);\nthis.max.copy(a.max);return this},makeEmpty:function(){this.min.x=this.min.y=Infinity;this.max.x=this.max.y=-Infinity;return this},isEmpty:function(){return this.max.x<this.min.x||this.max.y<this.min.y},getCenter:function(a){void 0===a&&(console.warn(\"THREE.Box2: .getCenter() target is now required\"),a=new z);return this.isEmpty()?a.set(0,0):a.addVectors(this.min,this.max).multiplyScalar(.5)},getSize:function(a){void 0===a&&(console.warn(\"THREE.Box2: .getSize() target is now required\"),a=new z);return this.isEmpty()?\na.set(0,0):a.subVectors(this.max,this.min)},expandByPoint:function(a){this.min.min(a);this.max.max(a);return this},expandByVector:function(a){this.min.sub(a);this.max.add(a);return this},expandByScalar:function(a){this.min.addScalar(-a);this.max.addScalar(a);return this},containsPoint:function(a){return a.x<this.min.x||a.x>this.max.x||a.y<this.min.y||a.y>this.max.y?!1:!0},containsBox:function(a){return this.min.x<=a.min.x&&a.max.x<=this.max.x&&this.min.y<=a.min.y&&a.max.y<=this.max.y},getParameter:function(a,\nb){void 0===b&&(console.warn(\"THREE.Box2: .getParameter() target is now required\"),b=new z);return b.set((a.x-this.min.x)/(this.max.x-this.min.x),(a.y-this.min.y)/(this.max.y-this.min.y))},intersectsBox:function(a){return a.max.x<this.min.x||a.min.x>this.max.x||a.max.y<this.min.y||a.min.y>this.max.y?!1:!0},clampPoint:function(a,b){void 0===b&&(console.warn(\"THREE.Box2: .clampPoint() target is now required\"),b=new z);return b.copy(a).clamp(this.min,this.max)},distanceToPoint:function(){var a=new z;\nreturn function(b){return a.copy(b).clamp(this.min,this.max).sub(b).length()}}(),intersect:function(a){this.min.max(a.min);this.max.min(a.max);return this},union:function(a){this.min.min(a.min);this.max.max(a.max);return this},translate:function(a){this.min.add(a);this.max.add(a);return this},equals:function(a){return a.min.equals(this.min)&&a.max.equals(this.max)}});Object.assign(xe.prototype,{set:function(a,b){this.start.copy(a);this.end.copy(b);return this},clone:function(){return(new this.constructor).copy(this)},\ncopy:function(a){this.start.copy(a.start);this.end.copy(a.end);return this},getCenter:function(a){void 0===a&&(console.warn(\"THREE.Line3: .getCenter() target is now required\"),a=new p);return a.addVectors(this.start,this.end).multiplyScalar(.5)},delta:function(a){void 0===a&&(console.warn(\"THREE.Line3: .delta() target is now required\"),a=new p);return a.subVectors(this.end,this.start)},distanceSq:function(){return this.start.distanceToSquared(this.end)},distance:function(){return this.start.distanceTo(this.end)},\nat:function(a,b){void 0===b&&(console.warn(\"THREE.Line3: .at() target is now required\"),b=new p);return this.delta(b).multiplyScalar(a).add(this.start)},closestPointToPointParameter:function(){var a=new p,b=new p;return function(c,d){a.subVectors(c,this.start);b.subVectors(this.end,this.start);c=b.dot(b);c=b.dot(a)/c;d&&(c=H.clamp(c,0,1));return c}}(),closestPointToPoint:function(a,b,c){a=this.closestPointToPointParameter(a,b);void 0===c&&(console.warn(\"THREE.Line3: .closestPointToPoint() target is now required\"),\nc=new p);return this.delta(c).multiplyScalar(a).add(this.start)},applyMatrix4:function(a){this.start.applyMatrix4(a);this.end.applyMatrix4(a);return this},equals:function(a){return a.start.equals(this.start)&&a.end.equals(this.end)}});ed.prototype=Object.create(D.prototype);ed.prototype.constructor=ed;ed.prototype.isImmediateRenderObject=!0;fd.prototype=Object.create(W.prototype);fd.prototype.constructor=fd;fd.prototype.update=function(){var a=new p,b=new p,c=new ra;return function(){var d=[\"a\",\"b\",\n\"c\"];this.object.updateMatrixWorld(!0);c.getNormalMatrix(this.object.matrixWorld);var e=this.object.matrixWorld,f=this.geometry.attributes.position,g=this.object.geometry;if(g&&g.isGeometry)for(var h=g.vertices,k=g.faces,l=g=0,p=k.length;l<p;l++)for(var n=k[l],t=0,u=n.vertexNormals.length;t<u;t++){var r=n.vertexNormals[t];a.copy(h[n[d[t]]]).applyMatrix4(e);b.copy(r).applyMatrix3(c).normalize().multiplyScalar(this.size).add(a);f.setXYZ(g,a.x,a.y,a.z);g+=1;f.setXYZ(g,b.x,b.y,b.z);g+=1}else if(g&&g.isBufferGeometry)for(d=\ng.attributes.position,h=g.attributes.normal,t=g=0,u=d.count;t<u;t++)a.set(d.getX(t),d.getY(t),d.getZ(t)).applyMatrix4(e),b.set(h.getX(t),h.getY(t),h.getZ(t)),b.applyMatrix3(c).normalize().multiplyScalar(this.size).add(a),f.setXYZ(g,a.x,a.y,a.z),g+=1,f.setXYZ(g,b.x,b.y,b.z),g+=1;f.needsUpdate=!0}}();ic.prototype=Object.create(D.prototype);ic.prototype.constructor=ic;ic.prototype.dispose=function(){this.cone.geometry.dispose();this.cone.material.dispose()};ic.prototype.update=function(){var a=new p,\nb=new p;return function(){this.light.updateMatrixWorld();var c=this.light.distance?this.light.distance:1E3,d=c*Math.tan(this.light.angle);this.cone.scale.set(d,d,c);a.setFromMatrixPosition(this.light.matrixWorld);b.setFromMatrixPosition(this.light.target.matrixWorld);this.cone.lookAt(b.sub(a));void 0!==this.color?this.cone.material.color.set(this.color):this.cone.material.color.copy(this.light.color)}}();jc.prototype=Object.create(W.prototype);jc.prototype.constructor=jc;jc.prototype.updateMatrixWorld=\nfunction(){var a=new p,b=new I,c=new I;return function(d){var e=this.bones,f=this.geometry,g=f.getAttribute(\"position\");c.getInverse(this.root.matrixWorld);for(var h=0,k=0;h<e.length;h++){var l=e[h];l.parent&&l.parent.isBone&&(b.multiplyMatrices(c,l.matrixWorld),a.setFromMatrixPosition(b),g.setXYZ(k,a.x,a.y,a.z),b.multiplyMatrices(c,l.parent.matrixWorld),a.setFromMatrixPosition(b),g.setXYZ(k+1,a.x,a.y,a.z),k+=2)}f.getAttribute(\"position\").needsUpdate=!0;D.prototype.updateMatrixWorld.call(this,d)}}();\nkc.prototype=Object.create(la.prototype);kc.prototype.constructor=kc;kc.prototype.dispose=function(){this.geometry.dispose();this.material.dispose()};kc.prototype.update=function(){void 0!==this.color?this.material.color.set(this.color):this.material.color.copy(this.light.color)};lc.prototype=Object.create(D.prototype);lc.prototype.constructor=lc;lc.prototype.dispose=function(){this.children[0].geometry.dispose();this.children[0].material.dispose()};lc.prototype.update=function(){var a=.5*this.light.width,\nb=.5*this.light.height,c=this.line.geometry.attributes.position,d=c.array;d[0]=a;d[1]=-b;d[2]=0;d[3]=a;d[4]=b;d[5]=0;d[6]=-a;d[7]=b;d[8]=0;d[9]=-a;d[10]=-b;d[11]=0;d[12]=a;d[13]=-b;d[14]=0;c.needsUpdate=!0;void 0!==this.color?this.line.material.color.set(this.color):this.line.material.color.copy(this.light.color)};mc.prototype=Object.create(D.prototype);mc.prototype.constructor=mc;mc.prototype.dispose=function(){this.children[0].geometry.dispose();this.children[0].material.dispose()};mc.prototype.update=\nfunction(){var a=new p,b=new G,c=new G;return function(){var d=this.children[0];if(void 0!==this.color)this.material.color.set(this.color);else{var e=d.geometry.getAttribute(\"color\");b.copy(this.light.color);c.copy(this.light.groundColor);for(var f=0,g=e.count;f<g;f++){var h=f<g/2?b:c;e.setXYZ(f,h.r,h.g,h.b)}e.needsUpdate=!0}d.lookAt(a.setFromMatrixPosition(this.light.matrixWorld).negate())}}();gd.prototype=Object.create(W.prototype);gd.prototype.constructor=gd;Md.prototype=Object.create(W.prototype);\nMd.prototype.constructor=Md;hd.prototype=Object.create(W.prototype);hd.prototype.constructor=hd;hd.prototype.update=function(){var a=new p,b=new p,c=new ra;return function(){this.object.updateMatrixWorld(!0);c.getNormalMatrix(this.object.matrixWorld);var d=this.object.matrixWorld,e=this.geometry.attributes.position,f=this.object.geometry,g=f.vertices;f=f.faces;for(var h=0,k=0,l=f.length;k<l;k++){var p=f[k],n=p.normal;a.copy(g[p.a]).add(g[p.b]).add(g[p.c]).divideScalar(3).applyMatrix4(d);b.copy(n).applyMatrix3(c).normalize().multiplyScalar(this.size).add(a);\ne.setXYZ(h,a.x,a.y,a.z);h+=1;e.setXYZ(h,b.x,b.y,b.z);h+=1}e.needsUpdate=!0}}();nc.prototype=Object.create(D.prototype);nc.prototype.constructor=nc;nc.prototype.dispose=function(){this.lightPlane.geometry.dispose();this.lightPlane.material.dispose();this.targetLine.geometry.dispose();this.targetLine.material.dispose()};nc.prototype.update=function(){var a=new p,b=new p,c=new p;return function(){a.setFromMatrixPosition(this.light.matrixWorld);b.setFromMatrixPosition(this.light.target.matrixWorld);c.subVectors(b,\na);this.lightPlane.lookAt(c);void 0!==this.color?(this.lightPlane.material.color.set(this.color),this.targetLine.material.color.set(this.color)):(this.lightPlane.material.color.copy(this.light.color),this.targetLine.material.color.copy(this.light.color));this.targetLine.lookAt(c);this.targetLine.scale.z=c.length()}}();id.prototype=Object.create(W.prototype);id.prototype.constructor=id;id.prototype.update=function(){function a(a,g,h,k){d.set(g,h,k).unproject(e);a=c[a];if(void 0!==a)for(g=b.getAttribute(\"position\"),\nh=0,k=a.length;h<k;h++)g.setXYZ(a[h],d.x,d.y,d.z)}var b,c,d=new p,e=new Na;return function(){b=this.geometry;c=this.pointMap;e.projectionMatrix.copy(this.camera.projectionMatrix);a(\"c\",0,0,-1);a(\"t\",0,0,1);a(\"n1\",-1,-1,-1);a(\"n2\",1,-1,-1);a(\"n3\",-1,1,-1);a(\"n4\",1,1,-1);a(\"f1\",-1,-1,1);a(\"f2\",1,-1,1);a(\"f3\",-1,1,1);a(\"f4\",1,1,1);a(\"u1\",.7,1.1,-1);a(\"u2\",-.7,1.1,-1);a(\"u3\",0,2,-1);a(\"cf1\",-1,0,1);a(\"cf2\",1,0,1);a(\"cf3\",0,-1,1);a(\"cf4\",0,1,1);a(\"cn1\",-1,0,-1);a(\"cn2\",1,0,-1);a(\"cn3\",0,-1,-1);a(\"cn4\",\n0,1,-1);b.getAttribute(\"position\").needsUpdate=!0}}();Db.prototype=Object.create(W.prototype);Db.prototype.constructor=Db;Db.prototype.update=function(){var a=new Sa;return function(b){void 0!==b&&console.warn(\"THREE.BoxHelper: .update() has no longer arguments.\");void 0!==this.object&&a.setFromObject(this.object);if(!a.isEmpty()){b=a.min;var c=a.max,d=this.geometry.attributes.position,e=d.array;e[0]=c.x;e[1]=c.y;e[2]=c.z;e[3]=b.x;e[4]=c.y;e[5]=c.z;e[6]=b.x;e[7]=b.y;e[8]=c.z;e[9]=c.x;e[10]=b.y;e[11]=\nc.z;e[12]=c.x;e[13]=c.y;e[14]=b.z;e[15]=b.x;e[16]=c.y;e[17]=b.z;e[18]=b.x;e[19]=b.y;e[20]=b.z;e[21]=c.x;e[22]=b.y;e[23]=b.z;d.needsUpdate=!0;this.geometry.computeBoundingSphere()}}}();Db.prototype.setFromObject=function(a){this.object=a;this.update();return this};jd.prototype=Object.create(W.prototype);jd.prototype.constructor=jd;jd.prototype.updateMatrixWorld=function(a){var b=this.box;b.isEmpty()||(b.getCenter(this.position),b.getSize(this.scale),this.scale.multiplyScalar(.5),D.prototype.updateMatrixWorld.call(this,\na))};kd.prototype=Object.create(sa.prototype);kd.prototype.constructor=kd;kd.prototype.updateMatrixWorld=function(a){var b=-this.plane.constant;1E-8>Math.abs(b)&&(b=1E-8);this.scale.set(.5*this.size,.5*this.size,b);this.children[0].material.side=0>b?1:0;this.lookAt(this.plane.normal);D.prototype.updateMatrixWorld.call(this,a)};var Nd,ye;Eb.prototype=Object.create(D.prototype);Eb.prototype.constructor=Eb;Eb.prototype.setDirection=function(){var a=new p,b;return function(c){.99999<c.y?this.quaternion.set(0,\n0,0,1):-.99999>c.y?this.quaternion.set(1,0,0,0):(a.set(c.z,0,-c.x).normalize(),b=Math.acos(c.y),this.quaternion.setFromAxisAngle(a,b))}}();Eb.prototype.setLength=function(a,b,c){void 0===b&&(b=.2*a);void 0===c&&(c=.2*b);this.line.scale.set(1,Math.max(0,a-b),1);this.line.updateMatrix();this.cone.scale.set(c,b,c);this.cone.position.y=a;this.cone.updateMatrix()};Eb.prototype.setColor=function(a){this.line.material.color.copy(a);this.cone.material.color.copy(a)};ld.prototype=Object.create(W.prototype);\nld.prototype.constructor=ld;L.create=function(a,b){console.log(\"THREE.Curve.create() has been deprecated\");a.prototype=Object.create(L.prototype);a.prototype.constructor=a;a.prototype.getPoint=b;return a};Object.assign(Xa.prototype,{createPointsGeometry:function(a){console.warn(\"THREE.CurvePath: .createPointsGeometry() has been removed. Use new THREE.Geometry().setFromPoints( points ) instead.\");a=this.getPoints(a);return this.createGeometry(a)},createSpacedPointsGeometry:function(a){console.warn(\"THREE.CurvePath: .createSpacedPointsGeometry() has been removed. Use new THREE.Geometry().setFromPoints( points ) instead.\");\na=this.getSpacedPoints(a);return this.createGeometry(a)},createGeometry:function(a){console.warn(\"THREE.CurvePath: .createGeometry() has been removed. Use new THREE.Geometry().setFromPoints( points ) instead.\");for(var b=new R,c=0,d=a.length;c<d;c++){var e=a[c];b.vertices.push(new p(e.x,e.y,e.z||0))}return b}});Object.assign(La.prototype,{fromPoints:function(a){console.warn(\"THREE.Path: .fromPoints() has been renamed to .setFromPoints().\");this.setFromPoints(a)}});yf.prototype=Object.create(ca.prototype);\nzf.prototype=Object.create(ca.prototype);ze.prototype=Object.create(ca.prototype);Object.assign(ze.prototype,{initFromArray:function(){console.error(\"THREE.Spline: .initFromArray() has been removed.\")},getControlPointsArray:function(){console.error(\"THREE.Spline: .getControlPointsArray() has been removed.\")},reparametrizeByArcLength:function(){console.error(\"THREE.Spline: .reparametrizeByArcLength() has been removed.\")}});gd.prototype.setColors=function(){console.error(\"THREE.GridHelper: setColors() has been deprecated, pass them in the constructor instead.\")};\njc.prototype.update=function(){console.error(\"THREE.SkeletonHelper: update() no longer needs to be called.\")};Object.assign(gc.prototype,{extractUrlBase:function(a){console.warn(\"THREE.Loader: .extractUrlBase() has been deprecated. Use THREE.LoaderUtils.extractUrlBase() instead.\");return De.extractUrlBase(a)}});Object.assign(we.prototype,{center:function(a){console.warn(\"THREE.Box2: .center() has been renamed to .getCenter().\");return this.getCenter(a)},empty:function(){console.warn(\"THREE.Box2: .empty() has been renamed to .isEmpty().\");\nreturn this.isEmpty()},isIntersectionBox:function(a){console.warn(\"THREE.Box2: .isIntersectionBox() has been renamed to .intersectsBox().\");return this.intersectsBox(a)},size:function(a){console.warn(\"THREE.Box2: .size() has been renamed to .getSize().\");return this.getSize(a)}});Object.assign(Sa.prototype,{center:function(a){console.warn(\"THREE.Box3: .center() has been renamed to .getCenter().\");return this.getCenter(a)},empty:function(){console.warn(\"THREE.Box3: .empty() has been renamed to .isEmpty().\");\nreturn this.isEmpty()},isIntersectionBox:function(a){console.warn(\"THREE.Box3: .isIntersectionBox() has been renamed to .intersectsBox().\");return this.intersectsBox(a)},isIntersectionSphere:function(a){console.warn(\"THREE.Box3: .isIntersectionSphere() has been renamed to .intersectsSphere().\");return this.intersectsSphere(a)},size:function(a){console.warn(\"THREE.Box3: .size() has been renamed to .getSize().\");return this.getSize(a)}});xe.prototype.center=function(a){console.warn(\"THREE.Line3: .center() has been renamed to .getCenter().\");\nreturn this.getCenter(a)};Object.assign(H,{random16:function(){console.warn(\"THREE.Math: .random16() has been deprecated. Use Math.random() instead.\");return Math.random()},nearestPowerOfTwo:function(a){console.warn(\"THREE.Math: .nearestPowerOfTwo() has been renamed to .floorPowerOfTwo().\");return H.floorPowerOfTwo(a)},nextPowerOfTwo:function(a){console.warn(\"THREE.Math: .nextPowerOfTwo() has been renamed to .ceilPowerOfTwo().\");return H.ceilPowerOfTwo(a)}});Object.assign(ra.prototype,{flattenToArrayOffset:function(a,\nb){console.warn(\"THREE.Matrix3: .flattenToArrayOffset() has been deprecated. Use .toArray() instead.\");return this.toArray(a,b)},multiplyVector3:function(a){console.warn(\"THREE.Matrix3: .multiplyVector3() has been removed. Use vector.applyMatrix3( matrix ) instead.\");return a.applyMatrix3(this)},multiplyVector3Array:function(){console.error(\"THREE.Matrix3: .multiplyVector3Array() has been removed.\")},applyToBuffer:function(a){console.warn(\"THREE.Matrix3: .applyToBuffer() has been removed. Use matrix.applyToBufferAttribute( attribute ) instead.\");\nreturn this.applyToBufferAttribute(a)},applyToVector3Array:function(){console.error(\"THREE.Matrix3: .applyToVector3Array() has been removed.\")}});Object.assign(I.prototype,{extractPosition:function(a){console.warn(\"THREE.Matrix4: .extractPosition() has been renamed to .copyPosition().\");return this.copyPosition(a)},flattenToArrayOffset:function(a,b){console.warn(\"THREE.Matrix4: .flattenToArrayOffset() has been deprecated. Use .toArray() instead.\");return this.toArray(a,b)},getPosition:function(){var a;\nreturn function(){void 0===a&&(a=new p);console.warn(\"THREE.Matrix4: .getPosition() has been removed. Use Vector3.setFromMatrixPosition( matrix ) instead.\");return a.setFromMatrixColumn(this,3)}}(),setRotationFromQuaternion:function(a){console.warn(\"THREE.Matrix4: .setRotationFromQuaternion() has been renamed to .makeRotationFromQuaternion().\");return this.makeRotationFromQuaternion(a)},multiplyToArray:function(){console.warn(\"THREE.Matrix4: .multiplyToArray() has been removed.\")},multiplyVector3:function(a){console.warn(\"THREE.Matrix4: .multiplyVector3() has been removed. Use vector.applyMatrix4( matrix ) instead.\");\nreturn a.applyMatrix4(this)},multiplyVector4:function(a){console.warn(\"THREE.Matrix4: .multiplyVector4() has been removed. Use vector.applyMatrix4( matrix ) instead.\");return a.applyMatrix4(this)},multiplyVector3Array:function(){console.error(\"THREE.Matrix4: .multiplyVector3Array() has been removed.\")},rotateAxis:function(a){console.warn(\"THREE.Matrix4: .rotateAxis() has been removed. Use Vector3.transformDirection( matrix ) instead.\");a.transformDirection(this)},crossVector:function(a){console.warn(\"THREE.Matrix4: .crossVector() has been removed. Use vector.applyMatrix4( matrix ) instead.\");\nreturn a.applyMatrix4(this)},translate:function(){console.error(\"THREE.Matrix4: .translate() has been removed.\")},rotateX:function(){console.error(\"THREE.Matrix4: .rotateX() has been removed.\")},rotateY:function(){console.error(\"THREE.Matrix4: .rotateY() has been removed.\")},rotateZ:function(){console.error(\"THREE.Matrix4: .rotateZ() has been removed.\")},rotateByAxis:function(){console.error(\"THREE.Matrix4: .rotateByAxis() has been removed.\")},applyToBuffer:function(a){console.warn(\"THREE.Matrix4: .applyToBuffer() has been removed. Use matrix.applyToBufferAttribute( attribute ) instead.\");\nreturn this.applyToBufferAttribute(a)},applyToVector3Array:function(){console.error(\"THREE.Matrix4: .applyToVector3Array() has been removed.\")},makeFrustum:function(a,b,c,d,e,f){console.warn(\"THREE.Matrix4: .makeFrustum() has been removed. Use .makePerspective( left, right, top, bottom, near, far ) instead.\");return this.makePerspective(a,b,d,c,e,f)}});Ma.prototype.isIntersectionLine=function(a){console.warn(\"THREE.Plane: .isIntersectionLine() has been renamed to .intersectsLine().\");return this.intersectsLine(a)};\nfa.prototype.multiplyVector3=function(a){console.warn(\"THREE.Quaternion: .multiplyVector3() has been removed. Use is now vector.applyQuaternion( quaternion ) instead.\");return a.applyQuaternion(this)};Object.assign(mb.prototype,{isIntersectionBox:function(a){console.warn(\"THREE.Ray: .isIntersectionBox() has been renamed to .intersectsBox().\");return this.intersectsBox(a)},isIntersectionPlane:function(a){console.warn(\"THREE.Ray: .isIntersectionPlane() has been renamed to .intersectsPlane().\");return this.intersectsPlane(a)},\nisIntersectionSphere:function(a){console.warn(\"THREE.Ray: .isIntersectionSphere() has been renamed to .intersectsSphere().\");return this.intersectsSphere(a)}});Object.assign(ja.prototype,{area:function(){console.warn(\"THREE.Triangle: .area() has been renamed to .getArea().\");return this.getArea()},barycoordFromPoint:function(a,b){console.warn(\"THREE.Triangle: .barycoordFromPoint() has been renamed to .getBarycoord().\");return this.getBarycoord(a,b)},midpoint:function(a){console.warn(\"THREE.Triangle: .midpoint() has been renamed to .getMidpoint().\");\nreturn this.getMidpoint(a)},normal:function(a){console.warn(\"THREE.Triangle: .normal() has been renamed to .getNormal().\");return this.getNormal(a)},plane:function(a){console.warn(\"THREE.Triangle: .plane() has been renamed to .getPlane().\");return this.getPlane(a)}});Object.assign(ja,{barycoordFromPoint:function(a,b,c,d,e){console.warn(\"THREE.Triangle: .barycoordFromPoint() has been renamed to .getBarycoord().\");return ja.getBarycoord(a,b,c,d,e)},normal:function(a,b,c,d){console.warn(\"THREE.Triangle: .normal() has been renamed to .getNormal().\");\nreturn ja.getNormal(a,b,c,d)}});Object.assign(db.prototype,{extractAllPoints:function(a){console.warn(\"THREE.Shape: .extractAllPoints() has been removed. Use .extractPoints() instead.\");return this.extractPoints(a)},extrude:function(a){console.warn(\"THREE.Shape: .extrude() has been removed. Use ExtrudeGeometry() instead.\");return new rb(this,a)},makeGeometry:function(a){console.warn(\"THREE.Shape: .makeGeometry() has been removed. Use ShapeGeometry() instead.\");return new tb(this,a)}});Object.assign(z.prototype,\n{fromAttribute:function(a,b,c){console.warn(\"THREE.Vector2: .fromAttribute() has been renamed to .fromBufferAttribute().\");return this.fromBufferAttribute(a,b,c)},distanceToManhattan:function(a){console.warn(\"THREE.Vector2: .distanceToManhattan() has been renamed to .manhattanDistanceTo().\");return this.manhattanDistanceTo(a)},lengthManhattan:function(){console.warn(\"THREE.Vector2: .lengthManhattan() has been renamed to .manhattanLength().\");return this.manhattanLength()}});Object.assign(p.prototype,\n{setEulerFromRotationMatrix:function(){console.error(\"THREE.Vector3: .setEulerFromRotationMatrix() has been removed. Use Euler.setFromRotationMatrix() instead.\")},setEulerFromQuaternion:function(){console.error(\"THREE.Vector3: .setEulerFromQuaternion() has been removed. Use Euler.setFromQuaternion() instead.\")},getPositionFromMatrix:function(a){console.warn(\"THREE.Vector3: .getPositionFromMatrix() has been renamed to .setFromMatrixPosition().\");return this.setFromMatrixPosition(a)},getScaleFromMatrix:function(a){console.warn(\"THREE.Vector3: .getScaleFromMatrix() has been renamed to .setFromMatrixScale().\");\nreturn this.setFromMatrixScale(a)},getColumnFromMatrix:function(a,b){console.warn(\"THREE.Vector3: .getColumnFromMatrix() has been renamed to .setFromMatrixColumn().\");return this.setFromMatrixColumn(b,a)},applyProjection:function(a){console.warn(\"THREE.Vector3: .applyProjection() has been removed. Use .applyMatrix4( m ) instead.\");return this.applyMatrix4(a)},fromAttribute:function(a,b,c){console.warn(\"THREE.Vector3: .fromAttribute() has been renamed to .fromBufferAttribute().\");return this.fromBufferAttribute(a,\nb,c)},distanceToManhattan:function(a){console.warn(\"THREE.Vector3: .distanceToManhattan() has been renamed to .manhattanDistanceTo().\");return this.manhattanDistanceTo(a)},lengthManhattan:function(){console.warn(\"THREE.Vector3: .lengthManhattan() has been renamed to .manhattanLength().\");return this.manhattanLength()}});Object.assign(V.prototype,{fromAttribute:function(a,b,c){console.warn(\"THREE.Vector4: .fromAttribute() has been renamed to .fromBufferAttribute().\");return this.fromBufferAttribute(a,\nb,c)},lengthManhattan:function(){console.warn(\"THREE.Vector4: .lengthManhattan() has been renamed to .manhattanLength().\");return this.manhattanLength()}});Object.assign(R.prototype,{computeTangents:function(){console.error(\"THREE.Geometry: .computeTangents() has been removed.\")},computeLineDistances:function(){console.error(\"THREE.Geometry: .computeLineDistances() has been removed. Use THREE.Line.computeLineDistances() instead.\")}});Object.assign(D.prototype,{getChildByName:function(a){console.warn(\"THREE.Object3D: .getChildByName() has been renamed to .getObjectByName().\");\nreturn this.getObjectByName(a)},renderDepth:function(){console.warn(\"THREE.Object3D: .renderDepth has been removed. Use .renderOrder, instead.\")},translate:function(a,b){console.warn(\"THREE.Object3D: .translate() has been removed. Use .translateOnAxis( axis, distance ) instead.\");return this.translateOnAxis(b,a)},getWorldRotation:function(){console.error(\"THREE.Object3D: .getWorldRotation() has been removed. Use THREE.Object3D.getWorldQuaternion( target ) instead.\")}});Object.defineProperties(D.prototype,\n{eulerOrder:{get:function(){console.warn(\"THREE.Object3D: .eulerOrder is now .rotation.order.\");return this.rotation.order},set:function(a){console.warn(\"THREE.Object3D: .eulerOrder is now .rotation.order.\");this.rotation.order=a}},useQuaternion:{get:function(){console.warn(\"THREE.Object3D: .useQuaternion has been removed. The library now uses quaternions by default.\")},set:function(){console.warn(\"THREE.Object3D: .useQuaternion has been removed. The library now uses quaternions by default.\")}}});\nObject.defineProperties(Bc.prototype,{objects:{get:function(){console.warn(\"THREE.LOD: .objects has been renamed to .levels.\");return this.levels}}});Object.defineProperty(Cc.prototype,\"useVertexTexture\",{get:function(){console.warn(\"THREE.Skeleton: useVertexTexture has been removed.\")},set:function(){console.warn(\"THREE.Skeleton: useVertexTexture has been removed.\")}});Object.defineProperty(L.prototype,\"__arcLengthDivisions\",{get:function(){console.warn(\"THREE.Curve: .__arcLengthDivisions is now .arcLengthDivisions.\");\nreturn this.arcLengthDivisions},set:function(a){console.warn(\"THREE.Curve: .__arcLengthDivisions is now .arcLengthDivisions.\");this.arcLengthDivisions=a}});Z.prototype.setLens=function(a,b){console.warn(\"THREE.PerspectiveCamera.setLens is deprecated. Use .setFocalLength and .filmGauge for a photographic setup.\");void 0!==b&&(this.filmGauge=b);this.setFocalLength(a)};Object.defineProperties(X.prototype,{onlyShadow:{set:function(){console.warn(\"THREE.Light: .onlyShadow has been removed.\")}},shadowCameraFov:{set:function(a){console.warn(\"THREE.Light: .shadowCameraFov is now .shadow.camera.fov.\");\nthis.shadow.camera.fov=a}},shadowCameraLeft:{set:function(a){console.warn(\"THREE.Light: .shadowCameraLeft is now .shadow.camera.left.\");this.shadow.camera.left=a}},shadowCameraRight:{set:function(a){console.warn(\"THREE.Light: .shadowCameraRight is now .shadow.camera.right.\");this.shadow.camera.right=a}},shadowCameraTop:{set:function(a){console.warn(\"THREE.Light: .shadowCameraTop is now .shadow.camera.top.\");this.shadow.camera.top=a}},shadowCameraBottom:{set:function(a){console.warn(\"THREE.Light: .shadowCameraBottom is now .shadow.camera.bottom.\");\nthis.shadow.camera.bottom=a}},shadowCameraNear:{set:function(a){console.warn(\"THREE.Light: .shadowCameraNear is now .shadow.camera.near.\");this.shadow.camera.near=a}},shadowCameraFar:{set:function(a){console.warn(\"THREE.Light: .shadowCameraFar is now .shadow.camera.far.\");this.shadow.camera.far=a}},shadowCameraVisible:{set:function(){console.warn(\"THREE.Light: .shadowCameraVisible has been removed. Use new THREE.CameraHelper( light.shadow.camera ) instead.\")}},shadowBias:{set:function(a){console.warn(\"THREE.Light: .shadowBias is now .shadow.bias.\");\nthis.shadow.bias=a}},shadowDarkness:{set:function(){console.warn(\"THREE.Light: .shadowDarkness has been removed.\")}},shadowMapWidth:{set:function(a){console.warn(\"THREE.Light: .shadowMapWidth is now .shadow.mapSize.width.\");this.shadow.mapSize.width=a}},shadowMapHeight:{set:function(a){console.warn(\"THREE.Light: .shadowMapHeight is now .shadow.mapSize.height.\");this.shadow.mapSize.height=a}}});Object.defineProperties(Q.prototype,{length:{get:function(){console.warn(\"THREE.BufferAttribute: .length has been deprecated. Use .count instead.\");\nreturn this.array.length}},copyIndicesArray:function(){console.error(\"THREE.BufferAttribute: .copyIndicesArray() has been removed.\")}});Object.assign(C.prototype,{addIndex:function(a){console.warn(\"THREE.BufferGeometry: .addIndex() has been renamed to .setIndex().\");this.setIndex(a)},addDrawCall:function(a,b,c){void 0!==c&&console.warn(\"THREE.BufferGeometry: .addDrawCall() no longer supports indexOffset.\");console.warn(\"THREE.BufferGeometry: .addDrawCall() is now .addGroup().\");this.addGroup(a,b)},\nclearDrawCalls:function(){console.warn(\"THREE.BufferGeometry: .clearDrawCalls() is now .clearGroups().\");this.clearGroups()},computeTangents:function(){console.warn(\"THREE.BufferGeometry: .computeTangents() has been removed.\")},computeOffsets:function(){console.warn(\"THREE.BufferGeometry: .computeOffsets() has been removed.\")}});Object.defineProperties(C.prototype,{drawcalls:{get:function(){console.error(\"THREE.BufferGeometry: .drawcalls has been renamed to .groups.\");return this.groups}},offsets:{get:function(){console.warn(\"THREE.BufferGeometry: .offsets has been renamed to .groups.\");\nreturn this.groups}}});Object.assign(Oa.prototype,{getArrays:function(){console.error(\"THREE.ExtrudeBufferGeometry: .getArrays() has been removed.\")},addShapeList:function(){console.error(\"THREE.ExtrudeBufferGeometry: .addShapeList() has been removed.\")},addShape:function(){console.error(\"THREE.ExtrudeBufferGeometry: .addShape() has been removed.\")}});Object.defineProperties(Ld.prototype,{dynamic:{set:function(){console.warn(\"THREE.Uniform: .dynamic has been removed. Use object.onBeforeRender() instead.\")}},\nonUpdate:{value:function(){console.warn(\"THREE.Uniform: .onUpdate() has been removed. Use object.onBeforeRender() instead.\");return this}}});Object.defineProperties(J.prototype,{wrapAround:{get:function(){console.warn(\"THREE.Material: .wrapAround has been removed.\")},set:function(){console.warn(\"THREE.Material: .wrapAround has been removed.\")}},wrapRGB:{get:function(){console.warn(\"THREE.Material: .wrapRGB has been removed.\");return new G}},shading:{get:function(){console.error(\"THREE.\"+this.type+\n\": .shading has been removed. Use the boolean .flatShading instead.\")},set:function(a){console.warn(\"THREE.\"+this.type+\": .shading has been removed. Use the boolean .flatShading instead.\");this.flatShading=1===a}}});Object.defineProperties(Fa.prototype,{metal:{get:function(){console.warn(\"THREE.MeshPhongMaterial: .metal has been removed. Use THREE.MeshStandardMaterial instead.\");return!1},set:function(){console.warn(\"THREE.MeshPhongMaterial: .metal has been removed. Use THREE.MeshStandardMaterial instead\")}}});\nObject.defineProperties(ta.prototype,{derivatives:{get:function(){console.warn(\"THREE.ShaderMaterial: .derivatives has been moved to .extensions.derivatives.\");return this.extensions.derivatives},set:function(a){console.warn(\"THREE. ShaderMaterial: .derivatives has been moved to .extensions.derivatives.\");this.extensions.derivatives=a}}});Object.assign(Zd.prototype,{animate:function(a){console.warn(\"THREE.WebGLRenderer: .animate() is now .setAnimationLoop().\");this.setAnimationLoop(a)},getCurrentRenderTarget:function(){console.warn(\"THREE.WebGLRenderer: .getCurrentRenderTarget() is now .getRenderTarget().\");\nreturn this.getRenderTarget()},getMaxAnisotropy:function(){console.warn(\"THREE.WebGLRenderer: .getMaxAnisotropy() is now .capabilities.getMaxAnisotropy().\");return this.capabilities.getMaxAnisotropy()},getPrecision:function(){console.warn(\"THREE.WebGLRenderer: .getPrecision() is now .capabilities.precision.\");return this.capabilities.precision},resetGLState:function(){console.warn(\"THREE.WebGLRenderer: .resetGLState() is now .state.reset().\");return this.state.reset()},supportsFloatTextures:function(){console.warn(\"THREE.WebGLRenderer: .supportsFloatTextures() is now .extensions.get( 'OES_texture_float' ).\");\nreturn this.extensions.get(\"OES_texture_float\")},supportsHalfFloatTextures:function(){console.warn(\"THREE.WebGLRenderer: .supportsHalfFloatTextures() is now .extensions.get( 'OES_texture_half_float' ).\");return this.extensions.get(\"OES_texture_half_float\")},supportsStandardDerivatives:function(){console.warn(\"THREE.WebGLRenderer: .supportsStandardDerivatives() is now .extensions.get( 'OES_standard_derivatives' ).\");return this.extensions.get(\"OES_standard_derivatives\")},supportsCompressedTextureS3TC:function(){console.warn(\"THREE.WebGLRenderer: .supportsCompressedTextureS3TC() is now .extensions.get( 'WEBGL_compressed_texture_s3tc' ).\");\nreturn this.extensions.get(\"WEBGL_compressed_texture_s3tc\")},supportsCompressedTexturePVRTC:function(){console.warn(\"THREE.WebGLRenderer: .supportsCompressedTexturePVRTC() is now .extensions.get( 'WEBGL_compressed_texture_pvrtc' ).\");return this.extensions.get(\"WEBGL_compressed_texture_pvrtc\")},supportsBlendMinMax:function(){console.warn(\"THREE.WebGLRenderer: .supportsBlendMinMax() is now .extensions.get( 'EXT_blend_minmax' ).\");return this.extensions.get(\"EXT_blend_minmax\")},supportsVertexTextures:function(){console.warn(\"THREE.WebGLRenderer: .supportsVertexTextures() is now .capabilities.vertexTextures.\");\nreturn this.capabilities.vertexTextures},supportsInstancedArrays:function(){console.warn(\"THREE.WebGLRenderer: .supportsInstancedArrays() is now .extensions.get( 'ANGLE_instanced_arrays' ).\");return this.extensions.get(\"ANGLE_instanced_arrays\")},enableScissorTest:function(a){console.warn(\"THREE.WebGLRenderer: .enableScissorTest() is now .setScissorTest().\");this.setScissorTest(a)},initMaterial:function(){console.warn(\"THREE.WebGLRenderer: .initMaterial() has been removed.\")},addPrePlugin:function(){console.warn(\"THREE.WebGLRenderer: .addPrePlugin() has been removed.\")},\naddPostPlugin:function(){console.warn(\"THREE.WebGLRenderer: .addPostPlugin() has been removed.\")},updateShadowMap:function(){console.warn(\"THREE.WebGLRenderer: .updateShadowMap() has been removed.\")},setFaceCulling:function(){console.warn(\"THREE.WebGLRenderer: .setFaceCulling() has been removed.\")}});Object.defineProperties(Zd.prototype,{shadowMapEnabled:{get:function(){return this.shadowMap.enabled},set:function(a){console.warn(\"THREE.WebGLRenderer: .shadowMapEnabled is now .shadowMap.enabled.\");\nthis.shadowMap.enabled=a}},shadowMapType:{get:function(){return this.shadowMap.type},set:function(a){console.warn(\"THREE.WebGLRenderer: .shadowMapType is now .shadowMap.type.\");this.shadowMap.type=a}},shadowMapCullFace:{get:function(){console.warn(\"THREE.WebGLRenderer: .shadowMapCullFace has been removed. Set Material.shadowSide instead.\")},set:function(){console.warn(\"THREE.WebGLRenderer: .shadowMapCullFace has been removed. Set Material.shadowSide instead.\")}}});Object.defineProperties(Ze.prototype,\n{cullFace:{get:function(){console.warn(\"THREE.WebGLRenderer: .shadowMap.cullFace has been removed. Set Material.shadowSide instead.\")},set:function(){console.warn(\"THREE.WebGLRenderer: .shadowMap.cullFace has been removed. Set Material.shadowSide instead.\")}},renderReverseSided:{get:function(){console.warn(\"THREE.WebGLRenderer: .shadowMap.renderReverseSided has been removed. Set Material.shadowSide instead.\")},set:function(){console.warn(\"THREE.WebGLRenderer: .shadowMap.renderReverseSided has been removed. Set Material.shadowSide instead.\")}},\nrenderSingleSided:{get:function(){console.warn(\"THREE.WebGLRenderer: .shadowMap.renderSingleSided has been removed. Set Material.shadowSide instead.\")},set:function(){console.warn(\"THREE.WebGLRenderer: .shadowMap.renderSingleSided has been removed. Set Material.shadowSide instead.\")}}});Object.defineProperties(fb.prototype,{wrapS:{get:function(){console.warn(\"THREE.WebGLRenderTarget: .wrapS is now .texture.wrapS.\");return this.texture.wrapS},set:function(a){console.warn(\"THREE.WebGLRenderTarget: .wrapS is now .texture.wrapS.\");\nthis.texture.wrapS=a}},wrapT:{get:function(){console.warn(\"THREE.WebGLRenderTarget: .wrapT is now .texture.wrapT.\");return this.texture.wrapT},set:function(a){console.warn(\"THREE.WebGLRenderTarget: .wrapT is now .texture.wrapT.\");this.texture.wrapT=a}},magFilter:{get:function(){console.warn(\"THREE.WebGLRenderTarget: .magFilter is now .texture.magFilter.\");return this.texture.magFilter},set:function(a){console.warn(\"THREE.WebGLRenderTarget: .magFilter is now .texture.magFilter.\");this.texture.magFilter=\na}},minFilter:{get:function(){console.warn(\"THREE.WebGLRenderTarget: .minFilter is now .texture.minFilter.\");return this.texture.minFilter},set:function(a){console.warn(\"THREE.WebGLRenderTarget: .minFilter is now .texture.minFilter.\");this.texture.minFilter=a}},anisotropy:{get:function(){console.warn(\"THREE.WebGLRenderTarget: .anisotropy is now .texture.anisotropy.\");return this.texture.anisotropy},set:function(a){console.warn(\"THREE.WebGLRenderTarget: .anisotropy is now .texture.anisotropy.\");this.texture.anisotropy=\na}},offset:{get:function(){console.warn(\"THREE.WebGLRenderTarget: .offset is now .texture.offset.\");return this.texture.offset},set:function(a){console.warn(\"THREE.WebGLRenderTarget: .offset is now .texture.offset.\");this.texture.offset=a}},repeat:{get:function(){console.warn(\"THREE.WebGLRenderTarget: .repeat is now .texture.repeat.\");return this.texture.repeat},set:function(a){console.warn(\"THREE.WebGLRenderTarget: .repeat is now .texture.repeat.\");this.texture.repeat=a}},format:{get:function(){console.warn(\"THREE.WebGLRenderTarget: .format is now .texture.format.\");\nreturn this.texture.format},set:function(a){console.warn(\"THREE.WebGLRenderTarget: .format is now .texture.format.\");this.texture.format=a}},type:{get:function(){console.warn(\"THREE.WebGLRenderTarget: .type is now .texture.type.\");return this.texture.type},set:function(a){console.warn(\"THREE.WebGLRenderTarget: .type is now .texture.type.\");this.texture.type=a}},generateMipmaps:{get:function(){console.warn(\"THREE.WebGLRenderTarget: .generateMipmaps is now .texture.generateMipmaps.\");return this.texture.generateMipmaps},\nset:function(a){console.warn(\"THREE.WebGLRenderTarget: .generateMipmaps is now .texture.generateMipmaps.\");this.texture.generateMipmaps=a}}});Object.defineProperties(af.prototype,{standing:{set:function(){console.warn(\"THREE.WebVRManager: .standing has been removed.\")}}});hc.prototype.load=function(a){console.warn(\"THREE.Audio: .load has been deprecated. Use THREE.AudioLoader instead.\");var b=this;(new le).load(a,function(a){b.setBuffer(a)});return this};pe.prototype.getData=function(){console.warn(\"THREE.AudioAnalyser: .getData() is now .getFrequencyData().\");\nreturn this.getFrequencyData()};dd.prototype.updateCubeMap=function(a,b){console.warn(\"THREE.CubeCamera: .updateCubeMap() is now .update().\");return this.update(a,b)};eb.crossOrigin=void 0;eb.loadTexture=function(a,b,c,d){console.warn(\"THREE.ImageUtils.loadTexture has been deprecated. Use THREE.TextureLoader() instead.\");var e=new vd;e.setCrossOrigin(this.crossOrigin);a=e.load(a,c,void 0,d);b&&(a.mapping=b);return a};eb.loadTextureCube=function(a,b,c,d){console.warn(\"THREE.ImageUtils.loadTextureCube has been deprecated. Use THREE.CubeTextureLoader() instead.\");\nvar e=new ee;e.setCrossOrigin(this.crossOrigin);a=e.load(a,c,void 0,d);b&&(a.mapping=b);return a};eb.loadCompressedTexture=function(){console.error(\"THREE.ImageUtils.loadCompressedTexture has been removed. Use THREE.DDSLoader instead.\")};eb.loadCompressedTextureCube=function(){console.error(\"THREE.ImageUtils.loadCompressedTextureCube has been removed. Use THREE.DDSLoader instead.\")};l.WebGLRenderTargetCube=Gb;l.WebGLRenderTarget=fb;l.WebGLRenderer=Zd;l.ShaderLib=nb;l.UniformsLib=K;l.UniformsUtils=\nAa;l.ShaderChunk=S;l.FogExp2=Lb;l.Fog=Mb;l.Scene=qd;l.Sprite=Ac;l.LOD=Bc;l.SkinnedMesh=sd;l.Skeleton=Cc;l.Bone=rd;l.Mesh=la;l.LineSegments=W;l.LineLoop=td;l.Line=sa;l.Points=Ob;l.Group=Kb;l.VideoTexture=$d;l.DataTexture=gb;l.CompressedTexture=Pb;l.CubeTexture=Ua;l.CanvasTexture=Dc;l.DepthTexture=Ec;l.Texture=T;l.CompressedTextureLoader=kf;l.DataTextureLoader=de;l.CubeTextureLoader=ee;l.TextureLoader=vd;l.ObjectLoader=mf;l.MaterialLoader=Kd;l.BufferGeometryLoader=ge;l.DefaultLoadingManager=ka;l.LoadingManager=\nce;l.JSONLoader=he;l.ImageLoader=Zc;l.ImageBitmapLoader=ie;l.FontLoader=nf;l.FileLoader=Ga;l.Loader=gc;l.LoaderUtils=De;l.Cache=Fb;l.AudioLoader=le;l.SpotLightShadow=xd;l.SpotLight=yd;l.PointLight=zd;l.RectAreaLight=Dd;l.HemisphereLight=wd;l.DirectionalLightShadow=Ad;l.DirectionalLight=Bd;l.AmbientLight=Cd;l.LightShadow=Cb;l.Light=X;l.StereoCamera=of;l.PerspectiveCamera=Z;l.OrthographicCamera=Hb;l.CubeCamera=dd;l.ArrayCamera=yc;l.Camera=Na;l.AudioListener=me;l.PositionalAudio=oe;l.AudioContext=ne;\nl.AudioAnalyser=pe;l.Audio=hc;l.VectorKeyframeTrack=fc;l.StringKeyframeTrack=Jd;l.QuaternionKeyframeTrack=cd;l.NumberKeyframeTrack=ec;l.ColorKeyframeTrack=Hd;l.BooleanKeyframeTrack=Gd;l.PropertyMixer=qe;l.PropertyBinding=pa;l.KeyframeTrack=oa;l.AnimationUtils=ia;l.AnimationObjectGroup=qf;l.AnimationMixer=re;l.AnimationClip=Ca;l.Uniform=Ld;l.InstancedBufferGeometry=se;l.BufferGeometry=C;l.Geometry=R;l.InterleavedBufferAttribute=zc;l.InstancedInterleavedBuffer=te;l.InterleavedBuffer=ob;l.InstancedBufferAttribute=\nue;l.Face3=Ta;l.Object3D=D;l.Raycaster=sf;l.Layers=Rd;l.EventDispatcher=ya;l.Clock=uf;l.QuaternionLinearInterpolant=Id;l.LinearInterpolant=bd;l.DiscreteInterpolant=Fd;l.CubicInterpolant=Ed;l.Interpolant=wa;l.Triangle=ja;l.Math=H;l.Spherical=vf;l.Cylindrical=wf;l.Plane=Ma;l.Frustum=md;l.Sphere=Da;l.Ray=mb;l.Matrix4=I;l.Matrix3=ra;l.Box3=Sa;l.Box2=we;l.Line3=xe;l.Euler=hb;l.Vector4=V;l.Vector3=p;l.Vector2=z;l.Quaternion=fa;l.Color=G;l.ImmediateRenderObject=ed;l.VertexNormalsHelper=fd;l.SpotLightHelper=\nic;l.SkeletonHelper=jc;l.PointLightHelper=kc;l.RectAreaLightHelper=lc;l.HemisphereLightHelper=mc;l.GridHelper=gd;l.PolarGridHelper=Md;l.FaceNormalsHelper=hd;l.DirectionalLightHelper=nc;l.CameraHelper=id;l.BoxHelper=Db;l.Box3Helper=jd;l.PlaneHelper=kd;l.ArrowHelper=Eb;l.AxesHelper=ld;l.Shape=db;l.Path=La;l.ShapePath=je;l.Font=ke;l.CurvePath=Xa;l.Curve=L;l.ImageUtils=eb;l.ShapeUtils=Va;l.WebGLUtils=$e;l.WireframeGeometry=Qb;l.ParametricGeometry=Fc;l.ParametricBufferGeometry=Rb;l.TetrahedronGeometry=\nHc;l.TetrahedronBufferGeometry=Sb;l.OctahedronGeometry=Ic;l.OctahedronBufferGeometry=pb;l.IcosahedronGeometry=Jc;l.IcosahedronBufferGeometry=Tb;l.DodecahedronGeometry=Kc;l.DodecahedronBufferGeometry=Ub;l.PolyhedronGeometry=Gc;l.PolyhedronBufferGeometry=na;l.TubeGeometry=Lc;l.TubeBufferGeometry=Vb;l.TorusKnotGeometry=Mc;l.TorusKnotBufferGeometry=Wb;l.TorusGeometry=Nc;l.TorusBufferGeometry=Xb;l.TextGeometry=Sc;l.TextBufferGeometry=Yb;l.SphereGeometry=Tc;l.SphereBufferGeometry=sb;l.RingGeometry=Uc;l.RingBufferGeometry=\nZb;l.PlaneGeometry=uc;l.PlaneBufferGeometry=lb;l.LatheGeometry=Vc;l.LatheBufferGeometry=$b;l.ShapeGeometry=tb;l.ShapeBufferGeometry=ub;l.ExtrudeGeometry=rb;l.ExtrudeBufferGeometry=Oa;l.EdgesGeometry=ac;l.ConeGeometry=Wc;l.ConeBufferGeometry=Xc;l.CylinderGeometry=vb;l.CylinderBufferGeometry=Wa;l.CircleGeometry=Yc;l.CircleBufferGeometry=bc;l.BoxGeometry=Ib;l.BoxBufferGeometry=kb;l.ShadowMaterial=wb;l.SpriteMaterial=cb;l.RawShaderMaterial=cc;l.ShaderMaterial=ta;l.PointsMaterial=Ea;l.MeshPhysicalMaterial=\nxb;l.MeshStandardMaterial=Pa;l.MeshPhongMaterial=Fa;l.MeshToonMaterial=yb;l.MeshNormalMaterial=zb;l.MeshLambertMaterial=Ab;l.MeshDepthMaterial=$a;l.MeshDistanceMaterial=ab;l.MeshBasicMaterial=da;l.LineDashedMaterial=Bb;l.LineBasicMaterial=Y;l.Material=J;l.Float64BufferAttribute=tc;l.Float32BufferAttribute=A;l.Uint32BufferAttribute=jb;l.Int32BufferAttribute=sc;l.Uint16BufferAttribute=ib;l.Int16BufferAttribute=rc;l.Uint8ClampedBufferAttribute=qc;l.Uint8BufferAttribute=pc;l.Int8BufferAttribute=oc;l.BufferAttribute=\nQ;l.ArcCurve=dc;l.CatmullRomCurve3=ca;l.CubicBezierCurve=Ha;l.CubicBezierCurve3=Qa;l.EllipseCurve=za;l.LineCurve=va;l.LineCurve3=Ia;l.QuadraticBezierCurve=Ja;l.QuadraticBezierCurve3=Ra;l.SplineCurve=Ka;l.REVISION=\"95\";l.MOUSE={LEFT:0,MIDDLE:1,RIGHT:2};l.CullFaceNone=0;l.CullFaceBack=1;l.CullFaceFront=2;l.CullFaceFrontBack=3;l.FrontFaceDirectionCW=0;l.FrontFaceDirectionCCW=1;l.BasicShadowMap=0;l.PCFShadowMap=1;l.PCFSoftShadowMap=2;l.FrontSide=0;l.BackSide=1;l.DoubleSide=2;l.FlatShading=1;l.SmoothShading=\n2;l.NoColors=0;l.FaceColors=1;l.VertexColors=2;l.NoBlending=0;l.NormalBlending=1;l.AdditiveBlending=2;l.SubtractiveBlending=3;l.MultiplyBlending=4;l.CustomBlending=5;l.AddEquation=100;l.SubtractEquation=101;l.ReverseSubtractEquation=102;l.MinEquation=103;l.MaxEquation=104;l.ZeroFactor=200;l.OneFactor=201;l.SrcColorFactor=202;l.OneMinusSrcColorFactor=203;l.SrcAlphaFactor=204;l.OneMinusSrcAlphaFactor=205;l.DstAlphaFactor=206;l.OneMinusDstAlphaFactor=207;l.DstColorFactor=208;l.OneMinusDstColorFactor=\n209;l.SrcAlphaSaturateFactor=210;l.NeverDepth=0;l.AlwaysDepth=1;l.LessDepth=2;l.LessEqualDepth=3;l.EqualDepth=4;l.GreaterEqualDepth=5;l.GreaterDepth=6;l.NotEqualDepth=7;l.MultiplyOperation=0;l.MixOperation=1;l.AddOperation=2;l.NoToneMapping=0;l.LinearToneMapping=1;l.ReinhardToneMapping=2;l.Uncharted2ToneMapping=3;l.CineonToneMapping=4;l.UVMapping=300;l.CubeReflectionMapping=301;l.CubeRefractionMapping=302;l.EquirectangularReflectionMapping=303;l.EquirectangularRefractionMapping=304;l.SphericalReflectionMapping=\n305;l.CubeUVReflectionMapping=306;l.CubeUVRefractionMapping=307;l.RepeatWrapping=1E3;l.ClampToEdgeWrapping=1001;l.MirroredRepeatWrapping=1002;l.NearestFilter=1003;l.NearestMipMapNearestFilter=1004;l.NearestMipMapLinearFilter=1005;l.LinearFilter=1006;l.LinearMipMapNearestFilter=1007;l.LinearMipMapLinearFilter=1008;l.UnsignedByteType=1009;l.ByteType=1010;l.ShortType=1011;l.UnsignedShortType=1012;l.IntType=1013;l.UnsignedIntType=1014;l.FloatType=1015;l.HalfFloatType=1016;l.UnsignedShort4444Type=1017;\nl.UnsignedShort5551Type=1018;l.UnsignedShort565Type=1019;l.UnsignedInt248Type=1020;l.AlphaFormat=1021;l.RGBFormat=1022;l.RGBAFormat=1023;l.LuminanceFormat=1024;l.LuminanceAlphaFormat=1025;l.RGBEFormat=1023;l.DepthFormat=1026;l.DepthStencilFormat=1027;l.RGB_S3TC_DXT1_Format=33776;l.RGBA_S3TC_DXT1_Format=33777;l.RGBA_S3TC_DXT3_Format=33778;l.RGBA_S3TC_DXT5_Format=33779;l.RGB_PVRTC_4BPPV1_Format=35840;l.RGB_PVRTC_2BPPV1_Format=35841;l.RGBA_PVRTC_4BPPV1_Format=35842;l.RGBA_PVRTC_2BPPV1_Format=35843;l.RGB_ETC1_Format=\n36196;l.RGBA_ASTC_4x4_Format=37808;l.RGBA_ASTC_5x4_Format=37809;l.RGBA_ASTC_5x5_Format=37810;l.RGBA_ASTC_6x5_Format=37811;l.RGBA_ASTC_6x6_Format=37812;l.RGBA_ASTC_8x5_Format=37813;l.RGBA_ASTC_8x6_Format=37814;l.RGBA_ASTC_8x8_Format=37815;l.RGBA_ASTC_10x5_Format=37816;l.RGBA_ASTC_10x6_Format=37817;l.RGBA_ASTC_10x8_Format=37818;l.RGBA_ASTC_10x10_Format=37819;l.RGBA_ASTC_12x10_Format=37820;l.RGBA_ASTC_12x12_Format=37821;l.LoopOnce=2200;l.LoopRepeat=2201;l.LoopPingPong=2202;l.InterpolateDiscrete=2300;\nl.InterpolateLinear=2301;l.InterpolateSmooth=2302;l.ZeroCurvatureEnding=2400;l.ZeroSlopeEnding=2401;l.WrapAroundEnding=2402;l.TrianglesDrawMode=0;l.TriangleStripDrawMode=1;l.TriangleFanDrawMode=2;l.LinearEncoding=3E3;l.sRGBEncoding=3001;l.GammaEncoding=3007;l.RGBEEncoding=3002;l.LogLuvEncoding=3003;l.RGBM7Encoding=3004;l.RGBM16Encoding=3005;l.RGBDEncoding=3006;l.BasicDepthPacking=3200;l.RGBADepthPacking=3201;l.TangentSpaceNormalMap=0;l.ObjectSpaceNormalMap=1;l.CubeGeometry=Ib;l.Face4=function(a,b,\nc,d,e,f,g){console.warn(\"THREE.Face4 has been removed. A THREE.Face3 will be created instead.\");return new Ta(a,b,c,e,f,g)};l.LineStrip=0;l.LinePieces=1;l.MeshFaceMaterial=function(a){console.warn(\"THREE.MeshFaceMaterial has been removed. Use an Array instead.\");return a};l.MultiMaterial=function(a){void 0===a&&(a=[]);console.warn(\"THREE.MultiMaterial has been removed. Use an Array instead.\");a.isMultiMaterial=!0;a.materials=a;a.clone=function(){return a.slice()};return a};l.PointCloud=function(a,\nb){console.warn(\"THREE.PointCloud has been renamed to THREE.Points.\");return new Ob(a,b)};l.Particle=function(a){console.warn(\"THREE.Particle has been renamed to THREE.Sprite.\");return new Ac(a)};l.ParticleSystem=function(a,b){console.warn(\"THREE.ParticleSystem has been renamed to THREE.Points.\");return new Ob(a,b)};l.PointCloudMaterial=function(a){console.warn(\"THREE.PointCloudMaterial has been renamed to THREE.PointsMaterial.\");return new Ea(a)};l.ParticleBasicMaterial=function(a){console.warn(\"THREE.ParticleBasicMaterial has been renamed to THREE.PointsMaterial.\");\nreturn new Ea(a)};l.ParticleSystemMaterial=function(a){console.warn(\"THREE.ParticleSystemMaterial has been renamed to THREE.PointsMaterial.\");return new Ea(a)};l.Vertex=function(a,b,c){console.warn(\"THREE.Vertex has been removed. Use THREE.Vector3 instead.\");return new p(a,b,c)};l.DynamicBufferAttribute=function(a,b){console.warn(\"THREE.DynamicBufferAttribute has been removed. Use new THREE.BufferAttribute().setDynamic( true ) instead.\");return(new Q(a,b)).setDynamic(!0)};l.Int8Attribute=function(a,\nb){console.warn(\"THREE.Int8Attribute has been removed. Use new THREE.Int8BufferAttribute() instead.\");return new oc(a,b)};l.Uint8Attribute=function(a,b){console.warn(\"THREE.Uint8Attribute has been removed. Use new THREE.Uint8BufferAttribute() instead.\");return new pc(a,b)};l.Uint8ClampedAttribute=function(a,b){console.warn(\"THREE.Uint8ClampedAttribute has been removed. Use new THREE.Uint8ClampedBufferAttribute() instead.\");return new qc(a,b)};l.Int16Attribute=function(a,b){console.warn(\"THREE.Int16Attribute has been removed. Use new THREE.Int16BufferAttribute() instead.\");\nreturn new rc(a,b)};l.Uint16Attribute=function(a,b){console.warn(\"THREE.Uint16Attribute has been removed. Use new THREE.Uint16BufferAttribute() instead.\");return new ib(a,b)};l.Int32Attribute=function(a,b){console.warn(\"THREE.Int32Attribute has been removed. Use new THREE.Int32BufferAttribute() instead.\");return new sc(a,b)};l.Uint32Attribute=function(a,b){console.warn(\"THREE.Uint32Attribute has been removed. Use new THREE.Uint32BufferAttribute() instead.\");return new jb(a,b)};l.Float32Attribute=\nfunction(a,b){console.warn(\"THREE.Float32Attribute has been removed. Use new THREE.Float32BufferAttribute() instead.\");return new A(a,b)};l.Float64Attribute=function(a,b){console.warn(\"THREE.Float64Attribute has been removed. Use new THREE.Float64BufferAttribute() instead.\");return new tc(a,b)};l.ClosedSplineCurve3=yf;l.SplineCurve3=zf;l.Spline=ze;l.AxisHelper=function(a){console.warn(\"THREE.AxisHelper has been renamed to THREE.AxesHelper.\");return new ld(a)};l.BoundingBoxHelper=function(a,b){console.warn(\"THREE.BoundingBoxHelper has been deprecated. Creating a THREE.BoxHelper instead.\");\nreturn new Db(a,b)};l.EdgesHelper=function(a,b){console.warn(\"THREE.EdgesHelper has been removed. Use THREE.EdgesGeometry instead.\");return new W(new ac(a.geometry),new Y({color:void 0!==b?b:16777215}))};l.WireframeHelper=function(a,b){console.warn(\"THREE.WireframeHelper has been removed. Use THREE.WireframeGeometry instead.\");return new W(new Qb(a.geometry),new Y({color:void 0!==b?b:16777215}))};l.XHRLoader=function(a){console.warn(\"THREE.XHRLoader has been renamed to THREE.FileLoader.\");return new Ga(a)};\nl.BinaryTextureLoader=function(a){console.warn(\"THREE.BinaryTextureLoader has been renamed to THREE.DataTextureLoader.\");return new de(a)};l.GeometryUtils={merge:function(a,b,c){console.warn(\"THREE.GeometryUtils: .merge() has been moved to Geometry. Use geometry.merge( geometry2, matrix, materialIndexOffset ) instead.\");if(b.isMesh){b.matrixAutoUpdate&&b.updateMatrix();var d=b.matrix;b=b.geometry}a.merge(b,d,c)},center:function(a){console.warn(\"THREE.GeometryUtils: .center() has been moved to Geometry. Use geometry.center() instead.\");\nreturn a.center()}};l.Projector=function(){console.error(\"THREE.Projector has been moved to /examples/js/renderers/Projector.js.\");this.projectVector=function(a,b){console.warn(\"THREE.Projector: .projectVector() is now vector.project().\");a.project(b)};this.unprojectVector=function(a,b){console.warn(\"THREE.Projector: .unprojectVector() is now vector.unproject().\");a.unproject(b)};this.pickingRay=function(){console.error(\"THREE.Projector: .pickingRay() is now raycaster.setFromCamera().\")}};l.CanvasRenderer=\nfunction(){console.error(\"THREE.CanvasRenderer has been moved to /examples/js/renderers/CanvasRenderer.js\");this.domElement=document.createElementNS(\"http://www.w3.org/1999/xhtml\",\"canvas\");this.clear=function(){};this.render=function(){};this.setClearColor=function(){};this.setSize=function(){}};l.SceneUtils={createMultiMaterialObject:function(){console.error(\"THREE.SceneUtils has been moved to /examples/js/utils/SceneUtils.js\")},detach:function(){console.error(\"THREE.SceneUtils has been moved to /examples/js/utils/SceneUtils.js\")},\nattach:function(){console.error(\"THREE.SceneUtils has been moved to /examples/js/utils/SceneUtils.js\")}};l.LensFlare=function(){console.error(\"THREE.LensFlare has been moved to /examples/js/objects/Lensflare.js\")};Object.defineProperty(l,\"__esModule\",{value:!0})});\n",
"'use strict';\n\nmodule.exports = TinyQueue;\n\nfunction TinyQueue(data, compare) {\n if (!(this instanceof TinyQueue)) return new TinyQueue(data, compare);\n\n this.data = data || [];\n this.length = this.data.length;\n this.compare = compare || defaultCompare;\n\n if (this.length > 0) {\n for (var i = (this.length >> 1); i >= 0; i--) this._down(i);\n }\n}\n\nfunction defaultCompare(a, b) {\n return a < b ? -1 : a > b ? 1 : 0;\n}\n\nTinyQueue.prototype = {\n\n push: function (item) {\n this.data.push(item);\n this.length++;\n this._up(this.length - 1);\n },\n\n pop: function () {\n if (this.length === 0) return undefined;\n var top = this.data[0];\n this.length--;\n if (this.length > 0) {\n this.data[0] = this.data[this.length];\n this._down(0);\n }\n this.data.pop();\n return top;\n },\n\n peek: function () {\n return this.data[0];\n },\n\n _up: function (pos) {\n var data = this.data;\n var compare = this.compare;\n var item = data[pos];\n\n while (pos > 0) {\n var parent = (pos - 1) >> 1;\n var current = data[parent];\n if (compare(item, current) >= 0) break;\n data[pos] = current;\n pos = parent;\n }\n\n data[pos] = item;\n },\n\n _down: function (pos) {\n var data = this.data;\n var compare = this.compare;\n var len = this.length;\n var halfLen = len >> 1;\n var item = data[pos];\n\n while (pos < halfLen) {\n var left = (pos << 1) + 1;\n var right = left + 1;\n var best = data[left];\n\n if (right < len && compare(data[right], best) < 0) {\n left = right;\n best = data[right];\n }\n if (compare(best, item) >= 0) break;\n\n data[pos] = best;\n pos = left;\n }\n\n data[pos] = item;\n }\n};\n",
- "// Underscore.js 1.8.3\n// http://underscorejs.org\n// (c) 2009-2015 Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors\n// Underscore may be freely distributed under the MIT license.\n\n(function() {\n\n // Baseline setup\n // --------------\n\n // Establish the root object, `window` in the browser, or `exports` on the server.\n var root = this;\n\n // Save the previous value of the `_` variable.\n var previousUnderscore = root._;\n\n // Save bytes in the minified (but not gzipped) version:\n var ArrayProto = Array.prototype, ObjProto = Object.prototype, FuncProto = Function.prototype;\n\n // Create quick reference variables for speed access to core prototypes.\n var\n push = ArrayProto.push,\n slice = ArrayProto.slice,\n toString = ObjProto.toString,\n hasOwnProperty = ObjProto.hasOwnProperty;\n\n // All **ECMAScript 5** native function implementations that we hope to use\n // are declared here.\n var\n nativeIsArray = Array.isArray,\n nativeKeys = Object.keys,\n nativeBind = FuncProto.bind,\n nativeCreate = Object.create;\n\n // Naked function reference for surrogate-prototype-swapping.\n var Ctor = function(){};\n\n // Create a safe reference to the Underscore object for use below.\n var _ = function(obj) {\n if (obj instanceof _) return obj;\n if (!(this instanceof _)) return new _(obj);\n this._wrapped = obj;\n };\n\n // Export the Underscore object for **Node.js**, with\n // backwards-compatibility for the old `require()` API. If we're in\n // the browser, add `_` as a global object.\n if (typeof exports !== 'undefined') {\n if (typeof module !== 'undefined' && module.exports) {\n exports = module.exports = _;\n }\n exports._ = _;\n } else {\n root._ = _;\n }\n\n // Current version.\n _.VERSION = '1.8.3';\n\n // Internal function that returns an efficient (for current engines) version\n // of the passed-in callback, to be repeatedly applied in other Underscore\n // functions.\n var optimizeCb = function(func, context, argCount) {\n if (context === void 0) return func;\n switch (argCount == null ? 3 : argCount) {\n case 1: return function(value) {\n return func.call(context, value);\n };\n case 2: return function(value, other) {\n return func.call(context, value, other);\n };\n case 3: return function(value, index, collection) {\n return func.call(context, value, index, collection);\n };\n case 4: return function(accumulator, value, index, collection) {\n return func.call(context, accumulator, value, index, collection);\n };\n }\n return function() {\n return func.apply(context, arguments);\n };\n };\n\n // A mostly-internal function to generate callbacks that can be applied\n // to each element in a collection, returning the desired result — either\n // identity, an arbitrary callback, a property matcher, or a property accessor.\n var cb = function(value, context, argCount) {\n if (value == null) return _.identity;\n if (_.isFunction(value)) return optimizeCb(value, context, argCount);\n if (_.isObject(value)) return _.matcher(value);\n return _.property(value);\n };\n _.iteratee = function(value, context) {\n return cb(value, context, Infinity);\n };\n\n // An internal function for creating assigner functions.\n var createAssigner = function(keysFunc, undefinedOnly) {\n return function(obj) {\n var length = arguments.length;\n if (length < 2 || obj == null) return obj;\n for (var index = 1; index < length; index++) {\n var source = arguments[index],\n keys = keysFunc(source),\n l = keys.length;\n for (var i = 0; i < l; i++) {\n var key = keys[i];\n if (!undefinedOnly || obj[key] === void 0) obj[key] = source[key];\n }\n }\n return obj;\n };\n };\n\n // An internal function for creating a new object that inherits from another.\n var baseCreate = function(prototype) {\n if (!_.isObject(prototype)) return {};\n if (nativeCreate) return nativeCreate(prototype);\n Ctor.prototype = prototype;\n var result = new Ctor;\n Ctor.prototype = null;\n return result;\n };\n\n var property = function(key) {\n return function(obj) {\n return obj == null ? void 0 : obj[key];\n };\n };\n\n // Helper for collection methods to determine whether a collection\n // should be iterated as an array or as an object\n // Related: http://people.mozilla.org/~jorendorff/es6-draft.html#sec-tolength\n // Avoids a very nasty iOS 8 JIT bug on ARM-64. #2094\n var MAX_ARRAY_INDEX = Math.pow(2, 53) - 1;\n var getLength = property('length');\n var isArrayLike = function(collection) {\n var length = getLength(collection);\n return typeof length == 'number' && length >= 0 && length <= MAX_ARRAY_INDEX;\n };\n\n // Collection Functions\n // --------------------\n\n // The cornerstone, an `each` implementation, aka `forEach`.\n // Handles raw objects in addition to array-likes. Treats all\n // sparse array-likes as if they were dense.\n _.each = _.forEach = function(obj, iteratee, context) {\n iteratee = optimizeCb(iteratee, context);\n var i, length;\n if (isArrayLike(obj)) {\n for (i = 0, length = obj.length; i < length; i++) {\n iteratee(obj[i], i, obj);\n }\n } else {\n var keys = _.keys(obj);\n for (i = 0, length = keys.length; i < length; i++) {\n iteratee(obj[keys[i]], keys[i], obj);\n }\n }\n return obj;\n };\n\n // Return the results of applying the iteratee to each element.\n _.map = _.collect = function(obj, iteratee, context) {\n iteratee = cb(iteratee, context);\n var keys = !isArrayLike(obj) && _.keys(obj),\n length = (keys || obj).length,\n results = Array(length);\n for (var index = 0; index < length; index++) {\n var currentKey = keys ? keys[index] : index;\n results[index] = iteratee(obj[currentKey], currentKey, obj);\n }\n return results;\n };\n\n // Create a reducing function iterating left or right.\n function createReduce(dir) {\n // Optimized iterator function as using arguments.length\n // in the main function will deoptimize the, see #1991.\n function iterator(obj, iteratee, memo, keys, index, length) {\n for (; index >= 0 && index < length; index += dir) {\n var currentKey = keys ? keys[index] : index;\n memo = iteratee(memo, obj[currentKey], currentKey, obj);\n }\n return memo;\n }\n\n return function(obj, iteratee, memo, context) {\n iteratee = optimizeCb(iteratee, context, 4);\n var keys = !isArrayLike(obj) && _.keys(obj),\n length = (keys || obj).length,\n index = dir > 0 ? 0 : length - 1;\n // Determine the initial value if none is provided.\n if (arguments.length < 3) {\n memo = obj[keys ? keys[index] : index];\n index += dir;\n }\n return iterator(obj, iteratee, memo, keys, index, length);\n };\n }\n\n // **Reduce** builds up a single result from a list of values, aka `inject`,\n // or `foldl`.\n _.reduce = _.foldl = _.inject = createReduce(1);\n\n // The right-associative version of reduce, also known as `foldr`.\n _.reduceRight = _.foldr = createReduce(-1);\n\n // Return the first value which passes a truth test. Aliased as `detect`.\n _.find = _.detect = function(obj, predicate, context) {\n var key;\n if (isArrayLike(obj)) {\n key = _.findIndex(obj, predicate, context);\n } else {\n key = _.findKey(obj, predicate, context);\n }\n if (key !== void 0 && key !== -1) return obj[key];\n };\n\n // Return all the elements that pass a truth test.\n // Aliased as `select`.\n _.filter = _.select = function(obj, predicate, context) {\n var results = [];\n predicate = cb(predicate, context);\n _.each(obj, function(value, index, list) {\n if (predicate(value, index, list)) results.push(value);\n });\n return results;\n };\n\n // Return all the elements for which a truth test fails.\n _.reject = function(obj, predicate, context) {\n return _.filter(obj, _.negate(cb(predicate)), context);\n };\n\n // Determine whether all of the elements match a truth test.\n // Aliased as `all`.\n _.every = _.all = function(obj, predicate, context) {\n predicate = cb(predicate, context);\n var keys = !isArrayLike(obj) && _.keys(obj),\n length = (keys || obj).length;\n for (var index = 0; index < length; index++) {\n var currentKey = keys ? keys[index] : index;\n if (!predicate(obj[currentKey], currentKey, obj)) return false;\n }\n return true;\n };\n\n // Determine if at least one element in the object matches a truth test.\n // Aliased as `any`.\n _.some = _.any = function(obj, predicate, context) {\n predicate = cb(predicate, context);\n var keys = !isArrayLike(obj) && _.keys(obj),\n length = (keys || obj).length;\n for (var index = 0; index < length; index++) {\n var currentKey = keys ? keys[index] : index;\n if (predicate(obj[currentKey], currentKey, obj)) return true;\n }\n return false;\n };\n\n // Determine if the array or object contains a given item (using `===`).\n // Aliased as `includes` and `include`.\n _.contains = _.includes = _.include = function(obj, item, fromIndex, guard) {\n if (!isArrayLike(obj)) obj = _.values(obj);\n if (typeof fromIndex != 'number' || guard) fromIndex = 0;\n return _.indexOf(obj, item, fromIndex) >= 0;\n };\n\n // Invoke a method (with arguments) on every item in a collection.\n _.invoke = function(obj, method) {\n var args = slice.call(arguments, 2);\n var isFunc = _.isFunction(method);\n return _.map(obj, function(value) {\n var func = isFunc ? method : value[method];\n return func == null ? func : func.apply(value, args);\n });\n };\n\n // Convenience version of a common use case of `map`: fetching a property.\n _.pluck = function(obj, key) {\n return _.map(obj, _.property(key));\n };\n\n // Convenience version of a common use case of `filter`: selecting only objects\n // containing specific `key:value` pairs.\n _.where = function(obj, attrs) {\n return _.filter(obj, _.matcher(attrs));\n };\n\n // Convenience version of a common use case of `find`: getting the first object\n // containing specific `key:value` pairs.\n _.findWhere = function(obj, attrs) {\n return _.find(obj, _.matcher(attrs));\n };\n\n // Return the maximum element (or element-based computation).\n _.max = function(obj, iteratee, context) {\n var result = -Infinity, lastComputed = -Infinity,\n value, computed;\n if (iteratee == null && obj != null) {\n obj = isArrayLike(obj) ? obj : _.values(obj);\n for (var i = 0, length = obj.length; i < length; i++) {\n value = obj[i];\n if (value > result) {\n result = value;\n }\n }\n } else {\n iteratee = cb(iteratee, context);\n _.each(obj, function(value, index, list) {\n computed = iteratee(value, index, list);\n if (computed > lastComputed || computed === -Infinity && result === -Infinity) {\n result = value;\n lastComputed = computed;\n }\n });\n }\n return result;\n };\n\n // Return the minimum element (or element-based computation).\n _.min = function(obj, iteratee, context) {\n var result = Infinity, lastComputed = Infinity,\n value, computed;\n if (iteratee == null && obj != null) {\n obj = isArrayLike(obj) ? obj : _.values(obj);\n for (var i = 0, length = obj.length; i < length; i++) {\n value = obj[i];\n if (value < result) {\n result = value;\n }\n }\n } else {\n iteratee = cb(iteratee, context);\n _.each(obj, function(value, index, list) {\n computed = iteratee(value, index, list);\n if (computed < lastComputed || computed === Infinity && result === Infinity) {\n result = value;\n lastComputed = computed;\n }\n });\n }\n return result;\n };\n\n // Shuffle a collection, using the modern version of the\n // [Fisher-Yates shuffle](http://en.wikipedia.org/wiki/Fisher–Yates_shuffle).\n _.shuffle = function(obj) {\n var set = isArrayLike(obj) ? obj : _.values(obj);\n var length = set.length;\n var shuffled = Array(length);\n for (var index = 0, rand; index < length; index++) {\n rand = _.random(0, index);\n if (rand !== index) shuffled[index] = shuffled[rand];\n shuffled[rand] = set[index];\n }\n return shuffled;\n };\n\n // Sample **n** random values from a collection.\n // If **n** is not specified, returns a single random element.\n // The internal `guard` argument allows it to work with `map`.\n _.sample = function(obj, n, guard) {\n if (n == null || guard) {\n if (!isArrayLike(obj)) obj = _.values(obj);\n return obj[_.random(obj.length - 1)];\n }\n return _.shuffle(obj).slice(0, Math.max(0, n));\n };\n\n // Sort the object's values by a criterion produced by an iteratee.\n _.sortBy = function(obj, iteratee, context) {\n iteratee = cb(iteratee, context);\n return _.pluck(_.map(obj, function(value, index, list) {\n return {\n value: value,\n index: index,\n criteria: iteratee(value, index, list)\n };\n }).sort(function(left, right) {\n var a = left.criteria;\n var b = right.criteria;\n if (a !== b) {\n if (a > b || a === void 0) return 1;\n if (a < b || b === void 0) return -1;\n }\n return left.index - right.index;\n }), 'value');\n };\n\n // An internal function used for aggregate \"group by\" operations.\n var group = function(behavior) {\n return function(obj, iteratee, context) {\n var result = {};\n iteratee = cb(iteratee, context);\n _.each(obj, function(value, index) {\n var key = iteratee(value, index, obj);\n behavior(result, value, key);\n });\n return result;\n };\n };\n\n // Groups the object's values by a criterion. Pass either a string attribute\n // to group by, or a function that returns the criterion.\n _.groupBy = group(function(result, value, key) {\n if (_.has(result, key)) result[key].push(value); else result[key] = [value];\n });\n\n // Indexes the object's values by a criterion, similar to `groupBy`, but for\n // when you know that your index values will be unique.\n _.indexBy = group(function(result, value, key) {\n result[key] = value;\n });\n\n // Counts instances of an object that group by a certain criterion. Pass\n // either a string attribute to count by, or a function that returns the\n // criterion.\n _.countBy = group(function(result, value, key) {\n if (_.has(result, key)) result[key]++; else result[key] = 1;\n });\n\n // Safely create a real, live array from anything iterable.\n _.toArray = function(obj) {\n if (!obj) return [];\n if (_.isArray(obj)) return slice.call(obj);\n if (isArrayLike(obj)) return _.map(obj, _.identity);\n return _.values(obj);\n };\n\n // Return the number of elements in an object.\n _.size = function(obj) {\n if (obj == null) return 0;\n return isArrayLike(obj) ? obj.length : _.keys(obj).length;\n };\n\n // Split a collection into two arrays: one whose elements all satisfy the given\n // predicate, and one whose elements all do not satisfy the predicate.\n _.partition = function(obj, predicate, context) {\n predicate = cb(predicate, context);\n var pass = [], fail = [];\n _.each(obj, function(value, key, obj) {\n (predicate(value, key, obj) ? pass : fail).push(value);\n });\n return [pass, fail];\n };\n\n // Array Functions\n // ---------------\n\n // Get the first element of an array. Passing **n** will return the first N\n // values in the array. Aliased as `head` and `take`. The **guard** check\n // allows it to work with `_.map`.\n _.first = _.head = _.take = function(array, n, guard) {\n if (array == null) return void 0;\n if (n == null || guard) return array[0];\n return _.initial(array, array.length - n);\n };\n\n // Returns everything but the last entry of the array. Especially useful on\n // the arguments object. Passing **n** will return all the values in\n // the array, excluding the last N.\n _.initial = function(array, n, guard) {\n return slice.call(array, 0, Math.max(0, array.length - (n == null || guard ? 1 : n)));\n };\n\n // Get the last element of an array. Passing **n** will return the last N\n // values in the array.\n _.last = function(array, n, guard) {\n if (array == null) return void 0;\n if (n == null || guard) return array[array.length - 1];\n return _.rest(array, Math.max(0, array.length - n));\n };\n\n // Returns everything but the first entry of the array. Aliased as `tail` and `drop`.\n // Especially useful on the arguments object. Passing an **n** will return\n // the rest N values in the array.\n _.rest = _.tail = _.drop = function(array, n, guard) {\n return slice.call(array, n == null || guard ? 1 : n);\n };\n\n // Trim out all falsy values from an array.\n _.compact = function(array) {\n return _.filter(array, _.identity);\n };\n\n // Internal implementation of a recursive `flatten` function.\n var flatten = function(input, shallow, strict, startIndex) {\n var output = [], idx = 0;\n for (var i = startIndex || 0, length = getLength(input); i < length; i++) {\n var value = input[i];\n if (isArrayLike(value) && (_.isArray(value) || _.isArguments(value))) {\n //flatten current level of array or arguments object\n if (!shallow) value = flatten(value, shallow, strict);\n var j = 0, len = value.length;\n output.length += len;\n while (j < len) {\n output[idx++] = value[j++];\n }\n } else if (!strict) {\n output[idx++] = value;\n }\n }\n return output;\n };\n\n // Flatten out an array, either recursively (by default), or just one level.\n _.flatten = function(array, shallow) {\n return flatten(array, shallow, false);\n };\n\n // Return a version of the array that does not contain the specified value(s).\n _.without = function(array) {\n return _.difference(array, slice.call(arguments, 1));\n };\n\n // Produce a duplicate-free version of the array. If the array has already\n // been sorted, you have the option of using a faster algorithm.\n // Aliased as `unique`.\n _.uniq = _.unique = function(array, isSorted, iteratee, context) {\n if (!_.isBoolean(isSorted)) {\n context = iteratee;\n iteratee = isSorted;\n isSorted = false;\n }\n if (iteratee != null) iteratee = cb(iteratee, context);\n var result = [];\n var seen = [];\n for (var i = 0, length = getLength(array); i < length; i++) {\n var value = array[i],\n computed = iteratee ? iteratee(value, i, array) : value;\n if (isSorted) {\n if (!i || seen !== computed) result.push(value);\n seen = computed;\n } else if (iteratee) {\n if (!_.contains(seen, computed)) {\n seen.push(computed);\n result.push(value);\n }\n } else if (!_.contains(result, value)) {\n result.push(value);\n }\n }\n return result;\n };\n\n // Produce an array that contains the union: each distinct element from all of\n // the passed-in arrays.\n _.union = function() {\n return _.uniq(flatten(arguments, true, true));\n };\n\n // Produce an array that contains every item shared between all the\n // passed-in arrays.\n _.intersection = function(array) {\n var result = [];\n var argsLength = arguments.length;\n for (var i = 0, length = getLength(array); i < length; i++) {\n var item = array[i];\n if (_.contains(result, item)) continue;\n for (var j = 1; j < argsLength; j++) {\n if (!_.contains(arguments[j], item)) break;\n }\n if (j === argsLength) result.push(item);\n }\n return result;\n };\n\n // Take the difference between one array and a number of other arrays.\n // Only the elements present in just the first array will remain.\n _.difference = function(array) {\n var rest = flatten(arguments, true, true, 1);\n return _.filter(array, function(value){\n return !_.contains(rest, value);\n });\n };\n\n // Zip together multiple lists into a single array -- elements that share\n // an index go together.\n _.zip = function() {\n return _.unzip(arguments);\n };\n\n // Complement of _.zip. Unzip accepts an array of arrays and groups\n // each array's elements on shared indices\n _.unzip = function(array) {\n var length = array && _.max(array, getLength).length || 0;\n var result = Array(length);\n\n for (var index = 0; index < length; index++) {\n result[index] = _.pluck(array, index);\n }\n return result;\n };\n\n // Converts lists into objects. Pass either a single array of `[key, value]`\n // pairs, or two parallel arrays of the same length -- one of keys, and one of\n // the corresponding values.\n _.object = function(list, values) {\n var result = {};\n for (var i = 0, length = getLength(list); i < length; i++) {\n if (values) {\n result[list[i]] = values[i];\n } else {\n result[list[i][0]] = list[i][1];\n }\n }\n return result;\n };\n\n // Generator function to create the findIndex and findLastIndex functions\n function createPredicateIndexFinder(dir) {\n return function(array, predicate, context) {\n predicate = cb(predicate, context);\n var length = getLength(array);\n var index = dir > 0 ? 0 : length - 1;\n for (; index >= 0 && index < length; index += dir) {\n if (predicate(array[index], index, array)) return index;\n }\n return -1;\n };\n }\n\n // Returns the first index on an array-like that passes a predicate test\n _.findIndex = createPredicateIndexFinder(1);\n _.findLastIndex = createPredicateIndexFinder(-1);\n\n // Use a comparator function to figure out the smallest index at which\n // an object should be inserted so as to maintain order. Uses binary search.\n _.sortedIndex = function(array, obj, iteratee, context) {\n iteratee = cb(iteratee, context, 1);\n var value = iteratee(obj);\n var low = 0, high = getLength(array);\n while (low < high) {\n var mid = Math.floor((low + high) / 2);\n if (iteratee(array[mid]) < value) low = mid + 1; else high = mid;\n }\n return low;\n };\n\n // Generator function to create the indexOf and lastIndexOf functions\n function createIndexFinder(dir, predicateFind, sortedIndex) {\n return function(array, item, idx) {\n var i = 0, length = getLength(array);\n if (typeof idx == 'number') {\n if (dir > 0) {\n i = idx >= 0 ? idx : Math.max(idx + length, i);\n } else {\n length = idx >= 0 ? Math.min(idx + 1, length) : idx + length + 1;\n }\n } else if (sortedIndex && idx && length) {\n idx = sortedIndex(array, item);\n return array[idx] === item ? idx : -1;\n }\n if (item !== item) {\n idx = predicateFind(slice.call(array, i, length), _.isNaN);\n return idx >= 0 ? idx + i : -1;\n }\n for (idx = dir > 0 ? i : length - 1; idx >= 0 && idx < length; idx += dir) {\n if (array[idx] === item) return idx;\n }\n return -1;\n };\n }\n\n // Return the position of the first occurrence of an item in an array,\n // or -1 if the item is not included in the array.\n // If the array is large and already in sort order, pass `true`\n // for **isSorted** to use binary search.\n _.indexOf = createIndexFinder(1, _.findIndex, _.sortedIndex);\n _.lastIndexOf = createIndexFinder(-1, _.findLastIndex);\n\n // Generate an integer Array containing an arithmetic progression. A port of\n // the native Python `range()` function. See\n // [the Python documentation](http://docs.python.org/library/functions.html#range).\n _.range = function(start, stop, step) {\n if (stop == null) {\n stop = start || 0;\n start = 0;\n }\n step = step || 1;\n\n var length = Math.max(Math.ceil((stop - start) / step), 0);\n var range = Array(length);\n\n for (var idx = 0; idx < length; idx++, start += step) {\n range[idx] = start;\n }\n\n return range;\n };\n\n // Function (ahem) Functions\n // ------------------\n\n // Determines whether to execute a function as a constructor\n // or a normal function with the provided arguments\n var executeBound = function(sourceFunc, boundFunc, context, callingContext, args) {\n if (!(callingContext instanceof boundFunc)) return sourceFunc.apply(context, args);\n var self = baseCreate(sourceFunc.prototype);\n var result = sourceFunc.apply(self, args);\n if (_.isObject(result)) return result;\n return self;\n };\n\n // Create a function bound to a given object (assigning `this`, and arguments,\n // optionally). Delegates to **ECMAScript 5**'s native `Function.bind` if\n // available.\n _.bind = function(func, context) {\n if (nativeBind && func.bind === nativeBind) return nativeBind.apply(func, slice.call(arguments, 1));\n if (!_.isFunction(func)) throw new TypeError('Bind must be called on a function');\n var args = slice.call(arguments, 2);\n var bound = function() {\n return executeBound(func, bound, context, this, args.concat(slice.call(arguments)));\n };\n return bound;\n };\n\n // Partially apply a function by creating a version that has had some of its\n // arguments pre-filled, without changing its dynamic `this` context. _ acts\n // as a placeholder, allowing any combination of arguments to be pre-filled.\n _.partial = function(func) {\n var boundArgs = slice.call(arguments, 1);\n var bound = function() {\n var position = 0, length = boundArgs.length;\n var args = Array(length);\n for (var i = 0; i < length; i++) {\n args[i] = boundArgs[i] === _ ? arguments[position++] : boundArgs[i];\n }\n while (position < arguments.length) args.push(arguments[position++]);\n return executeBound(func, bound, this, this, args);\n };\n return bound;\n };\n\n // Bind a number of an object's methods to that object. Remaining arguments\n // are the method names to be bound. Useful for ensuring that all callbacks\n // defined on an object belong to it.\n _.bindAll = function(obj) {\n var i, length = arguments.length, key;\n if (length <= 1) throw new Error('bindAll must be passed function names');\n for (i = 1; i < length; i++) {\n key = arguments[i];\n obj[key] = _.bind(obj[key], obj);\n }\n return obj;\n };\n\n // Memoize an expensive function by storing its results.\n _.memoize = function(func, hasher) {\n var memoize = function(key) {\n var cache = memoize.cache;\n var address = '' + (hasher ? hasher.apply(this, arguments) : key);\n if (!_.has(cache, address)) cache[address] = func.apply(this, arguments);\n return cache[address];\n };\n memoize.cache = {};\n return memoize;\n };\n\n // Delays a function for the given number of milliseconds, and then calls\n // it with the arguments supplied.\n _.delay = function(func, wait) {\n var args = slice.call(arguments, 2);\n return setTimeout(function(){\n return func.apply(null, args);\n }, wait);\n };\n\n // Defers a function, scheduling it to run after the current call stack has\n // cleared.\n _.defer = _.partial(_.delay, _, 1);\n\n // Returns a function, that, when invoked, will only be triggered at most once\n // during a given window of time. Normally, the throttled function will run\n // as much as it can, without ever going more than once per `wait` duration;\n // but if you'd like to disable the execution on the leading edge, pass\n // `{leading: false}`. To disable execution on the trailing edge, ditto.\n _.throttle = function(func, wait, options) {\n var context, args, result;\n var timeout = null;\n var previous = 0;\n if (!options) options = {};\n var later = function() {\n previous = options.leading === false ? 0 : _.now();\n timeout = null;\n result = func.apply(context, args);\n if (!timeout) context = args = null;\n };\n return function() {\n var now = _.now();\n if (!previous && options.leading === false) previous = now;\n var remaining = wait - (now - previous);\n context = this;\n args = arguments;\n if (remaining <= 0 || remaining > wait) {\n if (timeout) {\n clearTimeout(timeout);\n timeout = null;\n }\n previous = now;\n result = func.apply(context, args);\n if (!timeout) context = args = null;\n } else if (!timeout && options.trailing !== false) {\n timeout = setTimeout(later, remaining);\n }\n return result;\n };\n };\n\n // Returns a function, that, as long as it continues to be invoked, will not\n // be triggered. The function will be called after it stops being called for\n // N milliseconds. If `immediate` is passed, trigger the function on the\n // leading edge, instead of the trailing.\n _.debounce = function(func, wait, immediate) {\n var timeout, args, context, timestamp, result;\n\n var later = function() {\n var last = _.now() - timestamp;\n\n if (last < wait && last >= 0) {\n timeout = setTimeout(later, wait - last);\n } else {\n timeout = null;\n if (!immediate) {\n result = func.apply(context, args);\n if (!timeout) context = args = null;\n }\n }\n };\n\n return function() {\n context = this;\n args = arguments;\n timestamp = _.now();\n var callNow = immediate && !timeout;\n if (!timeout) timeout = setTimeout(later, wait);\n if (callNow) {\n result = func.apply(context, args);\n context = args = null;\n }\n\n return result;\n };\n };\n\n // Returns the first function passed as an argument to the second,\n // allowing you to adjust arguments, run code before and after, and\n // conditionally execute the original function.\n _.wrap = function(func, wrapper) {\n return _.partial(wrapper, func);\n };\n\n // Returns a negated version of the passed-in predicate.\n _.negate = function(predicate) {\n return function() {\n return !predicate.apply(this, arguments);\n };\n };\n\n // Returns a function that is the composition of a list of functions, each\n // consuming the return value of the function that follows.\n _.compose = function() {\n var args = arguments;\n var start = args.length - 1;\n return function() {\n var i = start;\n var result = args[start].apply(this, arguments);\n while (i--) result = args[i].call(this, result);\n return result;\n };\n };\n\n // Returns a function that will only be executed on and after the Nth call.\n _.after = function(times, func) {\n return function() {\n if (--times < 1) {\n return func.apply(this, arguments);\n }\n };\n };\n\n // Returns a function that will only be executed up to (but not including) the Nth call.\n _.before = function(times, func) {\n var memo;\n return function() {\n if (--times > 0) {\n memo = func.apply(this, arguments);\n }\n if (times <= 1) func = null;\n return memo;\n };\n };\n\n // Returns a function that will be executed at most one time, no matter how\n // often you call it. Useful for lazy initialization.\n _.once = _.partial(_.before, 2);\n\n // Object Functions\n // ----------------\n\n // Keys in IE < 9 that won't be iterated by `for key in ...` and thus missed.\n var hasEnumBug = !{toString: null}.propertyIsEnumerable('toString');\n var nonEnumerableProps = ['valueOf', 'isPrototypeOf', 'toString',\n 'propertyIsEnumerable', 'hasOwnProperty', 'toLocaleString'];\n\n function collectNonEnumProps(obj, keys) {\n var nonEnumIdx = nonEnumerableProps.length;\n var constructor = obj.constructor;\n var proto = (_.isFunction(constructor) && constructor.prototype) || ObjProto;\n\n // Constructor is a special case.\n var prop = 'constructor';\n if (_.has(obj, prop) && !_.contains(keys, prop)) keys.push(prop);\n\n while (nonEnumIdx--) {\n prop = nonEnumerableProps[nonEnumIdx];\n if (prop in obj && obj[prop] !== proto[prop] && !_.contains(keys, prop)) {\n keys.push(prop);\n }\n }\n }\n\n // Retrieve the names of an object's own properties.\n // Delegates to **ECMAScript 5**'s native `Object.keys`\n _.keys = function(obj) {\n if (!_.isObject(obj)) return [];\n if (nativeKeys) return nativeKeys(obj);\n var keys = [];\n for (var key in obj) if (_.has(obj, key)) keys.push(key);\n // Ahem, IE < 9.\n if (hasEnumBug) collectNonEnumProps(obj, keys);\n return keys;\n };\n\n // Retrieve all the property names of an object.\n _.allKeys = function(obj) {\n if (!_.isObject(obj)) return [];\n var keys = [];\n for (var key in obj) keys.push(key);\n // Ahem, IE < 9.\n if (hasEnumBug) collectNonEnumProps(obj, keys);\n return keys;\n };\n\n // Retrieve the values of an object's properties.\n _.values = function(obj) {\n var keys = _.keys(obj);\n var length = keys.length;\n var values = Array(length);\n for (var i = 0; i < length; i++) {\n values[i] = obj[keys[i]];\n }\n return values;\n };\n\n // Returns the results of applying the iteratee to each element of the object\n // In contrast to _.map it returns an object\n _.mapObject = function(obj, iteratee, context) {\n iteratee = cb(iteratee, context);\n var keys = _.keys(obj),\n length = keys.length,\n results = {},\n currentKey;\n for (var index = 0; index < length; index++) {\n currentKey = keys[index];\n results[currentKey] = iteratee(obj[currentKey], currentKey, obj);\n }\n return results;\n };\n\n // Convert an object into a list of `[key, value]` pairs.\n _.pairs = function(obj) {\n var keys = _.keys(obj);\n var length = keys.length;\n var pairs = Array(length);\n for (var i = 0; i < length; i++) {\n pairs[i] = [keys[i], obj[keys[i]]];\n }\n return pairs;\n };\n\n // Invert the keys and values of an object. The values must be serializable.\n _.invert = function(obj) {\n var result = {};\n var keys = _.keys(obj);\n for (var i = 0, length = keys.length; i < length; i++) {\n result[obj[keys[i]]] = keys[i];\n }\n return result;\n };\n\n // Return a sorted list of the function names available on the object.\n // Aliased as `methods`\n _.functions = _.methods = function(obj) {\n var names = [];\n for (var key in obj) {\n if (_.isFunction(obj[key])) names.push(key);\n }\n return names.sort();\n };\n\n // Extend a given object with all the properties in passed-in object(s).\n _.extend = createAssigner(_.allKeys);\n\n // Assigns a given object with all the own properties in the passed-in object(s)\n // (https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object/assign)\n _.extendOwn = _.assign = createAssigner(_.keys);\n\n // Returns the first key on an object that passes a predicate test\n _.findKey = function(obj, predicate, context) {\n predicate = cb(predicate, context);\n var keys = _.keys(obj), key;\n for (var i = 0, length = keys.length; i < length; i++) {\n key = keys[i];\n if (predicate(obj[key], key, obj)) return key;\n }\n };\n\n // Return a copy of the object only containing the whitelisted properties.\n _.pick = function(object, oiteratee, context) {\n var result = {}, obj = object, iteratee, keys;\n if (obj == null) return result;\n if (_.isFunction(oiteratee)) {\n keys = _.allKeys(obj);\n iteratee = optimizeCb(oiteratee, context);\n } else {\n keys = flatten(arguments, false, false, 1);\n iteratee = function(value, key, obj) { return key in obj; };\n obj = Object(obj);\n }\n for (var i = 0, length = keys.length; i < length; i++) {\n var key = keys[i];\n var value = obj[key];\n if (iteratee(value, key, obj)) result[key] = value;\n }\n return result;\n };\n\n // Return a copy of the object without the blacklisted properties.\n _.omit = function(obj, iteratee, context) {\n if (_.isFunction(iteratee)) {\n iteratee = _.negate(iteratee);\n } else {\n var keys = _.map(flatten(arguments, false, false, 1), String);\n iteratee = function(value, key) {\n return !_.contains(keys, key);\n };\n }\n return _.pick(obj, iteratee, context);\n };\n\n // Fill in a given object with default properties.\n _.defaults = createAssigner(_.allKeys, true);\n\n // Creates an object that inherits from the given prototype object.\n // If additional properties are provided then they will be added to the\n // created object.\n _.create = function(prototype, props) {\n var result = baseCreate(prototype);\n if (props) _.extendOwn(result, props);\n return result;\n };\n\n // Create a (shallow-cloned) duplicate of an object.\n _.clone = function(obj) {\n if (!_.isObject(obj)) return obj;\n return _.isArray(obj) ? obj.slice() : _.extend({}, obj);\n };\n\n // Invokes interceptor with the obj, and then returns obj.\n // The primary purpose of this method is to \"tap into\" a method chain, in\n // order to perform operations on intermediate results within the chain.\n _.tap = function(obj, interceptor) {\n interceptor(obj);\n return obj;\n };\n\n // Returns whether an object has a given set of `key:value` pairs.\n _.isMatch = function(object, attrs) {\n var keys = _.keys(attrs), length = keys.length;\n if (object == null) return !length;\n var obj = Object(object);\n for (var i = 0; i < length; i++) {\n var key = keys[i];\n if (attrs[key] !== obj[key] || !(key in obj)) return false;\n }\n return true;\n };\n\n\n // Internal recursive comparison function for `isEqual`.\n var eq = function(a, b, aStack, bStack) {\n // Identical objects are equal. `0 === -0`, but they aren't identical.\n // See the [Harmony `egal` proposal](http://wiki.ecmascript.org/doku.php?id=harmony:egal).\n if (a === b) return a !== 0 || 1 / a === 1 / b;\n // A strict comparison is necessary because `null == undefined`.\n if (a == null || b == null) return a === b;\n // Unwrap any wrapped objects.\n if (a instanceof _) a = a._wrapped;\n if (b instanceof _) b = b._wrapped;\n // Compare `[[Class]]` names.\n var className = toString.call(a);\n if (className !== toString.call(b)) return false;\n switch (className) {\n // Strings, numbers, regular expressions, dates, and booleans are compared by value.\n case '[object RegExp]':\n // RegExps are coerced to strings for comparison (Note: '' + /a/i === '/a/i')\n case '[object String]':\n // Primitives and their corresponding object wrappers are equivalent; thus, `\"5\"` is\n // equivalent to `new String(\"5\")`.\n return '' + a === '' + b;\n case '[object Number]':\n // `NaN`s are equivalent, but non-reflexive.\n // Object(NaN) is equivalent to NaN\n if (+a !== +a) return +b !== +b;\n // An `egal` comparison is performed for other numeric values.\n return +a === 0 ? 1 / +a === 1 / b : +a === +b;\n case '[object Date]':\n case '[object Boolean]':\n // Coerce dates and booleans to numeric primitive values. Dates are compared by their\n // millisecond representations. Note that invalid dates with millisecond representations\n // of `NaN` are not equivalent.\n return +a === +b;\n }\n\n var areArrays = className === '[object Array]';\n if (!areArrays) {\n if (typeof a != 'object' || typeof b != 'object') return false;\n\n // Objects with different constructors are not equivalent, but `Object`s or `Array`s\n // from different frames are.\n var aCtor = a.constructor, bCtor = b.constructor;\n if (aCtor !== bCtor && !(_.isFunction(aCtor) && aCtor instanceof aCtor &&\n _.isFunction(bCtor) && bCtor instanceof bCtor)\n && ('constructor' in a && 'constructor' in b)) {\n return false;\n }\n }\n // Assume equality for cyclic structures. The algorithm for detecting cyclic\n // structures is adapted from ES 5.1 section 15.12.3, abstract operation `JO`.\n\n // Initializing stack of traversed objects.\n // It's done here since we only need them for objects and arrays comparison.\n aStack = aStack || [];\n bStack = bStack || [];\n var length = aStack.length;\n while (length--) {\n // Linear search. Performance is inversely proportional to the number of\n // unique nested structures.\n if (aStack[length] === a) return bStack[length] === b;\n }\n\n // Add the first object to the stack of traversed objects.\n aStack.push(a);\n bStack.push(b);\n\n // Recursively compare objects and arrays.\n if (areArrays) {\n // Compare array lengths to determine if a deep comparison is necessary.\n length = a.length;\n if (length !== b.length) return false;\n // Deep compare the contents, ignoring non-numeric properties.\n while (length--) {\n if (!eq(a[length], b[length], aStack, bStack)) return false;\n }\n } else {\n // Deep compare objects.\n var keys = _.keys(a), key;\n length = keys.length;\n // Ensure that both objects contain the same number of properties before comparing deep equality.\n if (_.keys(b).length !== length) return false;\n while (length--) {\n // Deep compare each member\n key = keys[length];\n if (!(_.has(b, key) && eq(a[key], b[key], aStack, bStack))) return false;\n }\n }\n // Remove the first object from the stack of traversed objects.\n aStack.pop();\n bStack.pop();\n return true;\n };\n\n // Perform a deep comparison to check if two objects are equal.\n _.isEqual = function(a, b) {\n return eq(a, b);\n };\n\n // Is a given array, string, or object empty?\n // An \"empty\" object has no enumerable own-properties.\n _.isEmpty = function(obj) {\n if (obj == null) return true;\n if (isArrayLike(obj) && (_.isArray(obj) || _.isString(obj) || _.isArguments(obj))) return obj.length === 0;\n return _.keys(obj).length === 0;\n };\n\n // Is a given value a DOM element?\n _.isElement = function(obj) {\n return !!(obj && obj.nodeType === 1);\n };\n\n // Is a given value an array?\n // Delegates to ECMA5's native Array.isArray\n _.isArray = nativeIsArray || function(obj) {\n return toString.call(obj) === '[object Array]';\n };\n\n // Is a given variable an object?\n _.isObject = function(obj) {\n var type = typeof obj;\n return type === 'function' || type === 'object' && !!obj;\n };\n\n // Add some isType methods: isArguments, isFunction, isString, isNumber, isDate, isRegExp, isError.\n _.each(['Arguments', 'Function', 'String', 'Number', 'Date', 'RegExp', 'Error'], function(name) {\n _['is' + name] = function(obj) {\n return toString.call(obj) === '[object ' + name + ']';\n };\n });\n\n // Define a fallback version of the method in browsers (ahem, IE < 9), where\n // there isn't any inspectable \"Arguments\" type.\n if (!_.isArguments(arguments)) {\n _.isArguments = function(obj) {\n return _.has(obj, 'callee');\n };\n }\n\n // Optimize `isFunction` if appropriate. Work around some typeof bugs in old v8,\n // IE 11 (#1621), and in Safari 8 (#1929).\n if (typeof /./ != 'function' && typeof Int8Array != 'object') {\n _.isFunction = function(obj) {\n return typeof obj == 'function' || false;\n };\n }\n\n // Is a given object a finite number?\n _.isFinite = function(obj) {\n return isFinite(obj) && !isNaN(parseFloat(obj));\n };\n\n // Is the given value `NaN`? (NaN is the only number which does not equal itself).\n _.isNaN = function(obj) {\n return _.isNumber(obj) && obj !== +obj;\n };\n\n // Is a given value a boolean?\n _.isBoolean = function(obj) {\n return obj === true || obj === false || toString.call(obj) === '[object Boolean]';\n };\n\n // Is a given value equal to null?\n _.isNull = function(obj) {\n return obj === null;\n };\n\n // Is a given variable undefined?\n _.isUndefined = function(obj) {\n return obj === void 0;\n };\n\n // Shortcut function for checking if an object has a given property directly\n // on itself (in other words, not on a prototype).\n _.has = function(obj, key) {\n return obj != null && hasOwnProperty.call(obj, key);\n };\n\n // Utility Functions\n // -----------------\n\n // Run Underscore.js in *noConflict* mode, returning the `_` variable to its\n // previous owner. Returns a reference to the Underscore object.\n _.noConflict = function() {\n root._ = previousUnderscore;\n return this;\n };\n\n // Keep the identity function around for default iteratees.\n _.identity = function(value) {\n return value;\n };\n\n // Predicate-generating functions. Often useful outside of Underscore.\n _.constant = function(value) {\n return function() {\n return value;\n };\n };\n\n _.noop = function(){};\n\n _.property = property;\n\n // Generates a function for a given object that returns a given property.\n _.propertyOf = function(obj) {\n return obj == null ? function(){} : function(key) {\n return obj[key];\n };\n };\n\n // Returns a predicate for checking whether an object has a given set of\n // `key:value` pairs.\n _.matcher = _.matches = function(attrs) {\n attrs = _.extendOwn({}, attrs);\n return function(obj) {\n return _.isMatch(obj, attrs);\n };\n };\n\n // Run a function **n** times.\n _.times = function(n, iteratee, context) {\n var accum = Array(Math.max(0, n));\n iteratee = optimizeCb(iteratee, context, 1);\n for (var i = 0; i < n; i++) accum[i] = iteratee(i);\n return accum;\n };\n\n // Return a random integer between min and max (inclusive).\n _.random = function(min, max) {\n if (max == null) {\n max = min;\n min = 0;\n }\n return min + Math.floor(Math.random() * (max - min + 1));\n };\n\n // A (possibly faster) way to get the current timestamp as an integer.\n _.now = Date.now || function() {\n return new Date().getTime();\n };\n\n // List of HTML entities for escaping.\n var escapeMap = {\n '&': '&',\n '<': '<',\n '>': '>',\n '\"': '"',\n \"'\": ''',\n '`': '`'\n };\n var unescapeMap = _.invert(escapeMap);\n\n // Functions for escaping and unescaping strings to/from HTML interpolation.\n var createEscaper = function(map) {\n var escaper = function(match) {\n return map[match];\n };\n // Regexes for identifying a key that needs to be escaped\n var source = '(?:' + _.keys(map).join('|') + ')';\n var testRegexp = RegExp(source);\n var replaceRegexp = RegExp(source, 'g');\n return function(string) {\n string = string == null ? '' : '' + string;\n return testRegexp.test(string) ? string.replace(replaceRegexp, escaper) : string;\n };\n };\n _.escape = createEscaper(escapeMap);\n _.unescape = createEscaper(unescapeMap);\n\n // If the value of the named `property` is a function then invoke it with the\n // `object` as context; otherwise, return it.\n _.result = function(object, property, fallback) {\n var value = object == null ? void 0 : object[property];\n if (value === void 0) {\n value = fallback;\n }\n return _.isFunction(value) ? value.call(object) : value;\n };\n\n // Generate a unique integer id (unique within the entire client session).\n // Useful for temporary DOM ids.\n var idCounter = 0;\n _.uniqueId = function(prefix) {\n var id = ++idCounter + '';\n return prefix ? prefix + id : id;\n };\n\n // By default, Underscore uses ERB-style template delimiters, change the\n // following template settings to use alternative delimiters.\n _.templateSettings = {\n evaluate : /<%([\\s\\S]+?)%>/g,\n interpolate : /<%=([\\s\\S]+?)%>/g,\n escape : /<%-([\\s\\S]+?)%>/g\n };\n\n // When customizing `templateSettings`, if you don't want to define an\n // interpolation, evaluation or escaping regex, we need one that is\n // guaranteed not to match.\n var noMatch = /(.)^/;\n\n // Certain characters need to be escaped so that they can be put into a\n // string literal.\n var escapes = {\n \"'\": \"'\",\n '\\\\': '\\\\',\n '\\r': 'r',\n '\\n': 'n',\n '\\u2028': 'u2028',\n '\\u2029': 'u2029'\n };\n\n var escaper = /\\\\|'|\\r|\\n|\\u2028|\\u2029/g;\n\n var escapeChar = function(match) {\n return '\\\\' + escapes[match];\n };\n\n // JavaScript micro-templating, similar to John Resig's implementation.\n // Underscore templating handles arbitrary delimiters, preserves whitespace,\n // and correctly escapes quotes within interpolated code.\n // NB: `oldSettings` only exists for backwards compatibility.\n _.template = function(text, settings, oldSettings) {\n if (!settings && oldSettings) settings = oldSettings;\n settings = _.defaults({}, settings, _.templateSettings);\n\n // Combine delimiters into one regular expression via alternation.\n var matcher = RegExp([\n (settings.escape || noMatch).source,\n (settings.interpolate || noMatch).source,\n (settings.evaluate || noMatch).source\n ].join('|') + '|$', 'g');\n\n // Compile the template source, escaping string literals appropriately.\n var index = 0;\n var source = \"__p+='\";\n text.replace(matcher, function(match, escape, interpolate, evaluate, offset) {\n source += text.slice(index, offset).replace(escaper, escapeChar);\n index = offset + match.length;\n\n if (escape) {\n source += \"'+\\n((__t=(\" + escape + \"))==null?'':_.escape(__t))+\\n'\";\n } else if (interpolate) {\n source += \"'+\\n((__t=(\" + interpolate + \"))==null?'':__t)+\\n'\";\n } else if (evaluate) {\n source += \"';\\n\" + evaluate + \"\\n__p+='\";\n }\n\n // Adobe VMs need the match returned to produce the correct offest.\n return match;\n });\n source += \"';\\n\";\n\n // If a variable is not specified, place data values in local scope.\n if (!settings.variable) source = 'with(obj||{}){\\n' + source + '}\\n';\n\n source = \"var __t,__p='',__j=Array.prototype.join,\" +\n \"print=function(){__p+=__j.call(arguments,'');};\\n\" +\n source + 'return __p;\\n';\n\n try {\n var render = new Function(settings.variable || 'obj', '_', source);\n } catch (e) {\n e.source = source;\n throw e;\n }\n\n var template = function(data) {\n return render.call(this, data, _);\n };\n\n // Provide the compiled source as a convenience for precompilation.\n var argument = settings.variable || 'obj';\n template.source = 'function(' + argument + '){\\n' + source + '}';\n\n return template;\n };\n\n // Add a \"chain\" function. Start chaining a wrapped Underscore object.\n _.chain = function(obj) {\n var instance = _(obj);\n instance._chain = true;\n return instance;\n };\n\n // OOP\n // ---------------\n // If Underscore is called as a function, it returns a wrapped object that\n // can be used OO-style. This wrapper holds altered versions of all the\n // underscore functions. Wrapped objects may be chained.\n\n // Helper function to continue chaining intermediate results.\n var result = function(instance, obj) {\n return instance._chain ? _(obj).chain() : obj;\n };\n\n // Add your own custom functions to the Underscore object.\n _.mixin = function(obj) {\n _.each(_.functions(obj), function(name) {\n var func = _[name] = obj[name];\n _.prototype[name] = function() {\n var args = [this._wrapped];\n push.apply(args, arguments);\n return result(this, func.apply(_, args));\n };\n });\n };\n\n // Add all of the Underscore functions to the wrapper object.\n _.mixin(_);\n\n // Add all mutator Array functions to the wrapper.\n _.each(['pop', 'push', 'reverse', 'shift', 'sort', 'splice', 'unshift'], function(name) {\n var method = ArrayProto[name];\n _.prototype[name] = function() {\n var obj = this._wrapped;\n method.apply(obj, arguments);\n if ((name === 'shift' || name === 'splice') && obj.length === 0) delete obj[0];\n return result(this, obj);\n };\n });\n\n // Add all accessor Array functions to the wrapper.\n _.each(['concat', 'join', 'slice'], function(name) {\n var method = ArrayProto[name];\n _.prototype[name] = function() {\n return result(this, method.apply(this._wrapped, arguments));\n };\n });\n\n // Extracts the result from a wrapped and chained object.\n _.prototype.value = function() {\n return this._wrapped;\n };\n\n // Provide unwrapping proxy for some methods used in engine operations\n // such as arithmetic and JSON stringification.\n _.prototype.valueOf = _.prototype.toJSON = _.prototype.value;\n\n _.prototype.toString = function() {\n return '' + this._wrapped;\n };\n\n // AMD registration happens at the end for compatibility with AMD loaders\n // that may not enforce next-turn semantics on modules. Even though general\n // practice for AMD registration is to be anonymous, underscore registers\n // as a named module because, like jQuery, it is a base library that is\n // popular enough to be bundled in a third party lib, but not be part of\n // an AMD load request. Those cases could generate an error when an\n // anonymous define() is called outside of a loader request.\n if (typeof define === 'function' && define.amd) {\n define('underscore', [], function() {\n return _;\n });\n }\n}.call(this));\n",
"var createElement = require(\"./vdom/create-element.js\")\n\nmodule.exports = createElement\n",
"var diff = require(\"./vtree/diff.js\")\n\nmodule.exports = diff\n",
"var h = require(\"./virtual-hyperscript/index.js\")\n\nmodule.exports = h\n",
"/** @license MIT License (c) copyright 2010-2014 original author or authors */\n\n/**\n * Promises/A+ and when() implementation\n * when is part of the cujoJS family of libraries (http://cujojs.com/)\n * @author Brian Cavalier\n * @author John Hann\n */\n(function(define) { 'use strict';\ndefine(function (require) {\n\n\tvar timed = require('./lib/decorators/timed');\n\tvar array = require('./lib/decorators/array');\n\tvar flow = require('./lib/decorators/flow');\n\tvar fold = require('./lib/decorators/fold');\n\tvar inspect = require('./lib/decorators/inspect');\n\tvar generate = require('./lib/decorators/iterate');\n\tvar progress = require('./lib/decorators/progress');\n\tvar withThis = require('./lib/decorators/with');\n\tvar unhandledRejection = require('./lib/decorators/unhandledRejection');\n\tvar TimeoutError = require('./lib/TimeoutError');\n\n\tvar Promise = [array, flow, fold, generate, progress,\n\t\tinspect, withThis, timed, unhandledRejection]\n\t\t.reduce(function(Promise, feature) {\n\t\t\treturn feature(Promise);\n\t\t}, require('./lib/Promise'));\n\n\tvar apply = require('./lib/apply')(Promise);\n\n\t// Public API\n\n\twhen.promise = promise; // Create a pending promise\n\twhen.resolve = Promise.resolve; // Create a resolved promise\n\twhen.reject = Promise.reject; // Create a rejected promise\n\n\twhen.lift = lift; // lift a function to return promises\n\twhen['try'] = attempt; // call a function and return a promise\n\twhen.attempt = attempt; // alias for when.try\n\n\twhen.iterate = Promise.iterate; // DEPRECATED (use cujojs/most streams) Generate a stream of promises\n\twhen.unfold = Promise.unfold; // DEPRECATED (use cujojs/most streams) Generate a stream of promises\n\n\twhen.join = join; // Join 2 or more promises\n\n\twhen.all = all; // Resolve a list of promises\n\twhen.settle = settle; // Settle a list of promises\n\n\twhen.any = lift(Promise.any); // One-winner race\n\twhen.some = lift(Promise.some); // Multi-winner race\n\twhen.race = lift(Promise.race); // First-to-settle race\n\n\twhen.map = map; // Array.map() for promises\n\twhen.filter = filter; // Array.filter() for promises\n\twhen.reduce = lift(Promise.reduce); // Array.reduce() for promises\n\twhen.reduceRight = lift(Promise.reduceRight); // Array.reduceRight() for promises\n\n\twhen.isPromiseLike = isPromiseLike; // Is something promise-like, aka thenable\n\n\twhen.Promise = Promise; // Promise constructor\n\twhen.defer = defer; // Create a {promise, resolve, reject} tuple\n\n\t// Error types\n\n\twhen.TimeoutError = TimeoutError;\n\n\t/**\n\t * Get a trusted promise for x, or by transforming x with onFulfilled\n\t *\n\t * @param {*} x\n\t * @param {function?} onFulfilled callback to be called when x is\n\t * successfully fulfilled. If promiseOrValue is an immediate value, callback\n\t * will be invoked immediately.\n\t * @param {function?} onRejected callback to be called when x is\n\t * rejected.\n\t * @param {function?} onProgress callback to be called when progress updates\n\t * are issued for x. @deprecated\n\t * @returns {Promise} a new promise that will fulfill with the return\n\t * value of callback or errback or the completion value of promiseOrValue if\n\t * callback and/or errback is not supplied.\n\t */\n\tfunction when(x, onFulfilled, onRejected, onProgress) {\n\t\tvar p = Promise.resolve(x);\n\t\tif (arguments.length < 2) {\n\t\t\treturn p;\n\t\t}\n\n\t\treturn p.then(onFulfilled, onRejected, onProgress);\n\t}\n\n\t/**\n\t * Creates a new promise whose fate is determined by resolver.\n\t * @param {function} resolver function(resolve, reject, notify)\n\t * @returns {Promise} promise whose fate is determine by resolver\n\t */\n\tfunction promise(resolver) {\n\t\treturn new Promise(resolver);\n\t}\n\n\t/**\n\t * Lift the supplied function, creating a version of f that returns\n\t * promises, and accepts promises as arguments.\n\t * @param {function} f\n\t * @returns {Function} version of f that returns promises\n\t */\n\tfunction lift(f) {\n\t\treturn function() {\n\t\t\tfor(var i=0, l=arguments.length, a=new Array(l); i<l; ++i) {\n\t\t\t\ta[i] = arguments[i];\n\t\t\t}\n\t\t\treturn apply(f, this, a);\n\t\t};\n\t}\n\n\t/**\n\t * Call f in a future turn, with the supplied args, and return a promise\n\t * for the result.\n\t * @param {function} f\n\t * @returns {Promise}\n\t */\n\tfunction attempt(f /*, args... */) {\n\t\t/*jshint validthis:true */\n\t\tfor(var i=0, l=arguments.length-1, a=new Array(l); i<l; ++i) {\n\t\t\ta[i] = arguments[i+1];\n\t\t}\n\t\treturn apply(f, this, a);\n\t}\n\n\t/**\n\t * Creates a {promise, resolver} pair, either or both of which\n\t * may be given out safely to consumers.\n\t * @return {{promise: Promise, resolve: function, reject: function, notify: function}}\n\t */\n\tfunction defer() {\n\t\treturn new Deferred();\n\t}\n\n\tfunction Deferred() {\n\t\tvar p = Promise._defer();\n\n\t\tfunction resolve(x) { p._handler.resolve(x); }\n\t\tfunction reject(x) { p._handler.reject(x); }\n\t\tfunction notify(x) { p._handler.notify(x); }\n\n\t\tthis.promise = p;\n\t\tthis.resolve = resolve;\n\t\tthis.reject = reject;\n\t\tthis.notify = notify;\n\t\tthis.resolver = { resolve: resolve, reject: reject, notify: notify };\n\t}\n\n\t/**\n\t * Determines if x is promise-like, i.e. a thenable object\n\t * NOTE: Will return true for *any thenable object*, and isn't truly\n\t * safe, since it may attempt to access the `then` property of x (i.e.\n\t * clever/malicious getters may do weird things)\n\t * @param {*} x anything\n\t * @returns {boolean} true if x is promise-like\n\t */\n\tfunction isPromiseLike(x) {\n\t\treturn x && typeof x.then === 'function';\n\t}\n\n\t/**\n\t * Return a promise that will resolve only once all the supplied arguments\n\t * have resolved. The resolution value of the returned promise will be an array\n\t * containing the resolution values of each of the arguments.\n\t * @param {...*} arguments may be a mix of promises and values\n\t * @returns {Promise}\n\t */\n\tfunction join(/* ...promises */) {\n\t\treturn Promise.all(arguments);\n\t}\n\n\t/**\n\t * Return a promise that will fulfill once all input promises have\n\t * fulfilled, or reject when any one input promise rejects.\n\t * @param {array|Promise} promises array (or promise for an array) of promises\n\t * @returns {Promise}\n\t */\n\tfunction all(promises) {\n\t\treturn when(promises, Promise.all);\n\t}\n\n\t/**\n\t * Return a promise that will always fulfill with an array containing\n\t * the outcome states of all input promises. The returned promise\n\t * will only reject if `promises` itself is a rejected promise.\n\t * @param {array|Promise} promises array (or promise for an array) of promises\n\t * @returns {Promise} promise for array of settled state descriptors\n\t */\n\tfunction settle(promises) {\n\t\treturn when(promises, Promise.settle);\n\t}\n\n\t/**\n\t * Promise-aware array map function, similar to `Array.prototype.map()`,\n\t * but input array may contain promises or values.\n\t * @param {Array|Promise} promises array of anything, may contain promises and values\n\t * @param {function(x:*, index:Number):*} mapFunc map function which may\n\t * return a promise or value\n\t * @returns {Promise} promise that will fulfill with an array of mapped values\n\t * or reject if any input promise rejects.\n\t */\n\tfunction map(promises, mapFunc) {\n\t\treturn when(promises, function(promises) {\n\t\t\treturn Promise.map(promises, mapFunc);\n\t\t});\n\t}\n\n\t/**\n\t * Filter the provided array of promises using the provided predicate. Input may\n\t * contain promises and values\n\t * @param {Array|Promise} promises array of promises and values\n\t * @param {function(x:*, index:Number):boolean} predicate filtering predicate.\n\t * Must return truthy (or promise for truthy) for items to retain.\n\t * @returns {Promise} promise that will fulfill with an array containing all items\n\t * for which predicate returned truthy.\n\t */\n\tfunction filter(promises, predicate) {\n\t\treturn when(promises, function(promises) {\n\t\t\treturn Promise.filter(promises, predicate);\n\t\t});\n\t}\n\n\treturn when;\n});\n})(typeof define === 'function' && define.amd ? define : function (factory) { module.exports = factory(require); });\n",
"var nativeIsArray = Array.isArray\nvar toString = Object.prototype.toString\n\nmodule.exports = nativeIsArray || isArray\n\nfunction isArray(obj) {\n return toString.call(obj) === \"[object Array]\"\n}\n",
"export {APIv3} from \"./api/APIv3\";\nexport {ModelCreator} from \"./api/ModelCreator\";\nexport * from \"./api/interfaces/interfaces\";\n",
- "export {Component} from \"./component/Component\";\nexport {ComponentService} from \"./component/ComponentService\";\nexport {AttributionComponent} from \"./component/AttributionComponent\";\nexport {BackgroundComponent} from \"./component/BackgroundComponent\";\nexport {BearingComponent} from \"./component/BearingComponent\";\nexport {CacheComponent} from \"./component/CacheComponent\";\nexport {CoverComponent} from \"./component/CoverComponent\";\nexport {DebugComponent} from \"./component/DebugComponent\";\nexport {DirectionComponent} from \"./component/direction/DirectionComponent\";\nexport {DirectionDOMCalculator} from \"./component/direction/DirectionDOMCalculator\";\nexport {DirectionDOMRenderer} from \"./component/direction/DirectionDOMRenderer\";\nexport {ImageComponent} from \"./component/ImageComponent\";\nexport {KeyboardComponent} from \"./component/KeyboardComponent\";\nexport {LoadingComponent} from \"./component/LoadingComponent\";\nexport {Marker} from \"./component/marker/marker/Marker\";\nexport {MarkerComponent} from \"./component/marker/MarkerComponent\";\nexport {MarkerScene} from \"./component/marker/MarkerScene\";\nexport {MarkerSet} from \"./component/marker/MarkerSet\";\nexport {MouseComponent} from \"./component/mouse/MouseComponent\";\nexport * from \"./component/mouse/HandlerTypes\";\nexport {MouseHandlerBase} from \"./component/mouse/MouseHandlerBase\";\nexport {BounceHandler} from \"./component/mouse/BounceHandler\";\nexport {DragPanHandler} from \"./component/mouse/DragPanHandler\";\nexport {DoubleClickZoomHandler} from \"./component/mouse/DoubleClickZoomHandler\";\nexport {ScrollZoomHandler} from \"./component/mouse/ScrollZoomHandler\";\nexport {TouchZoomHandler} from \"./component/mouse/TouchZoomHandler\";\nexport {Popup} from \"./component/popup/popup/Popup\";\nexport {PopupComponent} from \"./component/popup/PopupComponent\";\nexport {PopupAlignment} from \"./component/popup/popup/PopupAlignment\";\nexport {IPopupOptions} from \"./component/popup/interfaces/IPopupOptions\";\nexport {NavigationComponent} from \"./component/NavigationComponent\";\nexport {RouteComponent} from \"./component/RouteComponent\";\nexport {SequenceComponent} from \"./component/sequence/SequenceComponent\";\nexport {SequenceDOMRenderer} from \"./component/sequence/SequenceDOMRenderer\";\nexport {SequenceDOMInteraction} from \"./component/sequence/SequenceDOMInteraction\";\nexport {ImagePlaneComponent} from \"./component/imageplane/ImagePlaneComponent\";\nexport {ImagePlaneFactory} from \"./component/imageplane/ImagePlaneFactory\";\nexport {ImagePlaneGLRenderer} from \"./component/imageplane/ImagePlaneGLRenderer\";\nexport {ImagePlaneScene} from \"./component/imageplane/ImagePlaneScene\";\nexport {ImagePlaneShaders} from \"./component/imageplane/ImagePlaneShaders\";\nexport {SimpleMarker} from \"./component/marker/marker/SimpleMarker\";\nexport {CircleMarker} from \"./component/marker/marker/CircleMarker\";\nexport {SliderComponent} from \"./component/imageplane/SliderComponent\";\nexport {StatsComponent} from \"./component/StatsComponent\";\nexport {Tag} from \"./component/tag/tag/Tag\";\nexport {OutlineTag} from \"./component/tag/tag/OutlineTag\";\nexport {RenderTag} from \"./component/tag/tag/RenderTag\";\nexport {OutlineRenderTag} from \"./component/tag/tag/OutlineRenderTag\";\nexport {OutlineCreateTag} from \"./component/tag/tag/OutlineCreateTag\";\nexport {SpotTag} from \"./component/tag/tag/SpotTag\";\nexport {SpotRenderTag} from \"./component/tag/tag/SpotRenderTag\";\nexport {TagComponent} from \"./component/tag/TagComponent\";\nexport {TagCreator} from \"./component/tag/TagCreator\";\nexport {TagDOMRenderer} from \"./component/tag/TagDOMRenderer\";\nexport {TagMode} from \"./component/tag/TagMode\";\nexport {TagOperation} from \"./component/tag/TagOperation\";\nexport {TagScene} from \"./component/tag/TagScene\";\nexport {TagSet} from \"./component/tag/TagSet\";\nexport {Geometry} from \"./component/tag/geometry/Geometry\";\nexport {VertexGeometry} from \"./component/tag/geometry/VertexGeometry\";\nexport {RectGeometry} from \"./component/tag/geometry/RectGeometry\";\nexport {PointGeometry} from \"./component/tag/geometry/PointGeometry\";\nexport {PolygonGeometry} from \"./component/tag/geometry/PolygonGeometry\";\nexport {GeometryTagError} from \"./component/tag/error/GeometryTagError\";\nexport * from \"./component/interfaces/interfaces\";\n",
+ "export {Component} from \"./component/Component\";\nexport {ComponentService} from \"./component/ComponentService\";\nexport {HandlerBase} from \"./component/utils/HandlerBase\";\nexport {MeshFactory} from \"./component/utils/MeshFactory\";\nexport {MeshScene} from \"./component/utils/MeshScene\";\nexport {MouseOperator} from \"./component/utils/MouseOperator\";\nexport {ComponentSize} from \"./component/utils/ComponentSize\";\nexport {AttributionComponent} from \"./component/AttributionComponent\";\nexport {BackgroundComponent} from \"./component/BackgroundComponent\";\nexport {BearingComponent} from \"./component/BearingComponent\";\nexport {CacheComponent} from \"./component/CacheComponent\";\nexport {CoverComponent} from \"./component/CoverComponent\";\nexport {DebugComponent} from \"./component/DebugComponent\";\nexport {DirectionComponent} from \"./component/direction/DirectionComponent\";\nexport {DirectionDOMCalculator} from \"./component/direction/DirectionDOMCalculator\";\nexport {DirectionDOMRenderer} from \"./component/direction/DirectionDOMRenderer\";\nexport {ImageComponent} from \"./component/ImageComponent\";\nexport {KeyboardComponent} from \"./component/keyboard/KeyboardComponent\";\nexport {KeyPlayHandler} from \"./component/keyboard/KeyPlayHandler\";\nexport {KeyZoomHandler} from \"./component/keyboard/KeyZoomHandler\";\nexport {KeySequenceNavigationHandler} from \"./component/keyboard/KeySequenceNavigationHandler\";\nexport {KeySpatialNavigationHandler} from \"./component/keyboard/KeySpatialNavigationHandler\";\nexport {LoadingComponent} from \"./component/LoadingComponent\";\nexport {Marker} from \"./component/marker/marker/Marker\";\nexport {MarkerComponent} from \"./component/marker/MarkerComponent\";\nexport {MarkerScene} from \"./component/marker/MarkerScene\";\nexport {MarkerSet} from \"./component/marker/MarkerSet\";\nexport {MouseComponent} from \"./component/mouse/MouseComponent\";\nexport * from \"./component/mouse/HandlerTypes\";\nexport {BounceHandler} from \"./component/mouse/BounceHandler\";\nexport {DragPanHandler} from \"./component/mouse/DragPanHandler\";\nexport {DoubleClickZoomHandler} from \"./component/mouse/DoubleClickZoomHandler\";\nexport {EarthControlHandler} from \"./component/mouse/EarthControlHandler\";\nexport {ScrollZoomHandler} from \"./component/mouse/ScrollZoomHandler\";\nexport {TouchZoomHandler} from \"./component/mouse/TouchZoomHandler\";\nimport * as ImageBoundary from \"./component/mouse/ImageBoundary\";\nexport {ImageBoundary};\nexport {Popup} from \"./component/popup/popup/Popup\";\nexport {PopupComponent} from \"./component/popup/PopupComponent\";\nexport {PopupAlignment} from \"./component/popup/popup/PopupAlignment\";\nexport {IPopupOffset} from \"./component/popup/interfaces/IPopupOffset\";\nexport {IPopupOptions} from \"./component/popup/interfaces/IPopupOptions\";\nexport {NavigationComponent} from \"./component/NavigationComponent\";\nexport {RouteComponent} from \"./component/RouteComponent\";\nexport {SequenceComponent} from \"./component/sequence/SequenceComponent\";\nexport {SequenceDOMRenderer} from \"./component/sequence/SequenceDOMRenderer\";\nexport {SequenceMode} from \"./component/sequence/SequenceMode\";\nexport {NodeData, ReconstructionData, SpatialDataCache} from \"./component/spatialdata/SpatialDataCache\";\nexport {SpatialDataComponent} from \"./component/spatialdata/SpatialDataComponent\";\nexport {SpatialDataScene} from \"./component/spatialdata/SpatialDataScene\";\nexport {ImagePlaneComponent} from \"./component/imageplane/ImagePlaneComponent\";\nexport {ImagePlaneGLRenderer} from \"./component/imageplane/ImagePlaneGLRenderer\";\nexport {Shaders} from \"./component/shaders/Shaders\";\nexport {SimpleMarker} from \"./component/marker/marker/SimpleMarker\";\nexport {CircleMarker} from \"./component/marker/marker/CircleMarker\";\nexport {SliderComponent} from \"./component/slider/SliderComponent\";\nexport {SliderDOMRenderer} from \"./component/slider/SliderDOMRenderer\";\nexport {SliderGLRenderer} from \"./component/slider/SliderGLRenderer\";\nexport {StatsComponent} from \"./component/StatsComponent\";\nexport {TagHandlerBase} from \"./component/tag/handlers/TagHandlerBase\";\nexport {CreateHandlerBase} from \"./component/tag/handlers/CreateHandlerBase\";\nexport {CreatePointHandler} from \"./component/tag/handlers/CreatePointHandler\";\nexport {CreateVertexHandler} from \"./component/tag/handlers/CreateVertexHandler\";\nexport {CreatePolygonHandler} from \"./component/tag/handlers/CreatePolygonHandler\";\nexport {CreateRectHandler} from \"./component/tag/handlers/CreateRectHandler\";\nexport {CreateRectDragHandler} from \"./component/tag/handlers/CreateRectDragHandler\";\nexport {EditVertexHandler} from \"./component/tag/handlers/EditVertexHandler\";\nexport {Tag} from \"./component/tag/tag/Tag\";\nexport {OutlineTag} from \"./component/tag/tag/OutlineTag\";\nexport {RenderTag} from \"./component/tag/tag/RenderTag\";\nexport {OutlineRenderTag} from \"./component/tag/tag/OutlineRenderTag\";\nexport {OutlineCreateTag} from \"./component/tag/tag/OutlineCreateTag\";\nexport {SpotTag} from \"./component/tag/tag/SpotTag\";\nexport {SpotRenderTag} from \"./component/tag/tag/SpotRenderTag\";\nexport {TagDomain} from \"./component/tag/tag/TagDomain\";\nexport {TagComponent} from \"./component/tag/TagComponent\";\nexport {TagCreator} from \"./component/tag/TagCreator\";\nexport {TagDOMRenderer} from \"./component/tag/TagDOMRenderer\";\nexport {TagMode} from \"./component/tag/TagMode\";\nexport {TagOperation} from \"./component/tag/TagOperation\";\nexport {TagScene} from \"./component/tag/TagScene\";\nexport {TagSet} from \"./component/tag/TagSet\";\nexport {Geometry} from \"./component/tag/geometry/Geometry\";\nexport {VertexGeometry} from \"./component/tag/geometry/VertexGeometry\";\nexport {RectGeometry} from \"./component/tag/geometry/RectGeometry\";\nexport {PointGeometry} from \"./component/tag/geometry/PointGeometry\";\nexport {PolygonGeometry} from \"./component/tag/geometry/PolygonGeometry\";\nexport {GeometryTagError} from \"./component/tag/error/GeometryTagError\";\nexport {ZoomComponent} from \"./component/zoom/ZoomComponent\";\nexport * from \"./component/interfaces/interfaces\";\n",
"export {EdgeDirection} from \"./graph/edge/EdgeDirection\";\nexport {EdgeCalculatorSettings} from \"./graph/edge/EdgeCalculatorSettings\";\nexport {EdgeCalculatorDirections} from \"./graph/edge/EdgeCalculatorDirections\";\nexport {EdgeCalculatorCoefficients} from \"./graph/edge/EdgeCalculatorCoefficients\";\nexport {EdgeCalculator} from \"./graph/edge/EdgeCalculator\";\nexport * from \"./graph/edge/interfaces/interfaces\";\n",
- "export {ArgumentMapillaryError} from \"./error/ArgumentMapillaryError\";\nexport {GraphMapillaryError} from \"./error/GraphMapillaryError\";\nexport {MapillaryError} from \"./error/MapillaryError\";\n",
- "export {Camera} from \"./geo/Camera\";\nexport {GeoCoords} from \"./geo/GeoCoords\";\nexport {ViewportCoords} from \"./geo/ViewportCoords\";\nexport {Spatial} from \"./geo/Spatial\";\nexport {Transform} from \"./geo/Transform\";\nexport * from \"./geo/interfaces/interfaces\";\n",
- "export {\n FilterCreator,\n FilterFunction,\n} from \"./graph/FilterCreator\";\nexport {\n FilterExpression,\n FilterOperation,\n FilterOperator,\n FilterValue,\n} from \"./graph/FilterExpression\";\nexport {Graph} from \"./graph/Graph\";\nexport {GraphCalculator} from \"./graph/GraphCalculator\";\nexport {GraphService} from \"./graph/GraphService\";\nexport {ImageLoadingService} from \"./graph/ImageLoadingService\";\nexport {MeshReader} from \"./graph/MeshReader\";\nexport {Node} from \"./graph/Node\";\nexport {NodeCache} from \"./graph/NodeCache\";\nexport {Sequence} from \"./graph/Sequence\";\nexport * from \"./graph/interfaces/interfaces\";\n",
- "/**\n * MapillaryJS is a WebGL JavaScript library for exploring street level imagery\n * @name Mapillary\n */\n\nexport {EdgeDirection} from \"./Edge\";\nexport {RenderMode} from \"./Render\";\nexport {\n Alignment,\n ImageSize,\n Viewer,\n} from \"./Viewer\";\n\nimport * as TagComponent from \"./component/tag/Tag\";\nexport {TagComponent};\n\nimport * as MarkerComponent from \"./component/marker/Marker\";\nexport {MarkerComponent};\n\nimport * as PopupComponent from \"./component/popup/Popup\";\nexport {PopupComponent};\n",
+ "export {AbortMapillaryError} from \"./error/AbortMapillaryError\";\nexport {ArgumentMapillaryError} from \"./error/ArgumentMapillaryError\";\nexport {GraphMapillaryError} from \"./error/GraphMapillaryError\";\nexport {MapillaryError} from \"./error/MapillaryError\";\n",
+ "export {Camera} from \"./geo/Camera\";\nexport {GeoCoords} from \"./geo/GeoCoords\";\nexport {ViewportCoords} from \"./geo/ViewportCoords\";\nexport {Spatial} from \"./geo/Spatial\";\nexport {Transform} from \"./geo/Transform\";\nexport * from \"./geo/interfaces/interfaces\";\n\nimport * as Geo from \"./geo/Geo\";\nexport {Geo};\n\nimport * as Lines from \"./geo/Lines\";\nexport {Lines};\n",
+ "export {\n FilterCreator,\n FilterFunction,\n} from \"./graph/FilterCreator\";\nexport {\n FilterExpression,\n FilterOperation,\n FilterOperator,\n FilterValue,\n} from \"./graph/FilterExpression\";\nexport {Graph} from \"./graph/Graph\";\nexport {GraphCalculator} from \"./graph/GraphCalculator\";\nexport {GraphMode} from \"./graph/GraphMode\";\nexport {GraphService} from \"./graph/GraphService\";\nexport {ImageLoadingService} from \"./graph/ImageLoadingService\";\nexport {MeshReader} from \"./graph/MeshReader\";\nexport {Node} from \"./graph/Node\";\nexport {NodeCache} from \"./graph/NodeCache\";\nexport {Sequence} from \"./graph/Sequence\";\nexport * from \"./graph/interfaces/interfaces\";\n",
+ "/**\n * MapillaryJS is a WebGL JavaScript library for exploring street level imagery\n * @name Mapillary\n */\n\nexport * from \"./Support\";\n\nexport {EdgeDirection} from \"./Edge\";\nexport {AbortMapillaryError} from \"./Error\";\nexport {RenderMode} from \"./Render\";\nexport {TransitionMode} from \"./State\";\nexport {\n Alignment,\n ImageSize,\n Viewer,\n} from \"./Viewer\";\nexport {\n SliderMode,\n ComponentSize,\n} from \"./Component\";\n\nimport * as TagComponent from \"./component/tag/Tag\";\nexport {TagComponent};\n\nimport * as MarkerComponent from \"./component/marker/Marker\";\nexport {MarkerComponent};\n\nimport * as PopupComponent from \"./component/popup/Popup\";\nexport {PopupComponent};\n",
"export {DOMRenderer} from \"./render/DOMRenderer\";\nexport {GLRenderer} from \"./render/GLRenderer\";\nexport {GLRenderStage} from \"./render/GLRenderStage\";\nexport {RenderCamera} from \"./render/RenderCamera\";\nexport {RenderMode} from \"./render/RenderMode\";\nexport {RenderService} from \"./render/RenderService\";\nexport * from \"./render/interfaces/interfaces\";\n",
- "export {State} from \"./state/State\";\nexport {StateBase} from \"./state/states/StateBase\";\nexport {StateContext} from \"./state/StateContext\";\nexport {StateService} from \"./state/StateService\";\nexport {TraversingState} from \"./state/states/TraversingState\";\nexport {WaitingState} from \"./state/states/WaitingState\";\nexport * from \"./state/interfaces/interfaces\";\n",
+ "export {FrameGenerator} from \"./state/FrameGenerator\";\nexport {RotationDelta} from \"./state/RotationDelta\";\nexport {State} from \"./state/State\";\nexport {StateBase} from \"./state/states/StateBase\";\nexport {StateContext} from \"./state/StateContext\";\nexport {StateService} from \"./state/StateService\";\nexport {TransitionMode} from \"./state/TransitionMode\";\nexport {EarthState} from \"./state/states/EarthState\";\nexport {InteractiveStateBase} from \"./state/states/InteractiveStateBase\";\nexport {InteractiveWaitingState} from \"./state/states/InteractiveWaitingState\";\nexport {TraversingState} from \"./state/states/TraversingState\";\nexport {WaitingState} from \"./state/states/WaitingState\";\nexport * from \"./state/interfaces/interfaces\";\n",
+ "import * as support from \"./utils/Support\";\n\n/**\n * Test whether the current browser supports the full\n * functionality of MapillaryJS.\n *\n * @description The full functionality includes WebGL rendering.\n *\n * @return {boolean}\n *\n * @example `var supported = Mapillary.isSupported();`\n */\nexport function isSupported(): boolean {\n return isFallbackSupported() &&\n support.isWebGLSupportedCached();\n}\n\n/**\n * Test whether the current browser supports the fallback\n * functionality of MapillaryJS.\n *\n * @description The fallback functionality does not include WebGL\n * rendering, only 2D canvas rendering.\n *\n * @return {boolean}\n *\n * @example `var fallbackSupported = Mapillary.isFallbackSupported();`\n */\nexport function isFallbackSupported(): boolean {\n return support.isBrowser() &&\n support.isBlobSupported() &&\n support.isArraySupported() &&\n support.isFunctionSupported() &&\n support.isJSONSupported() &&\n support.isObjectSupported();\n}\n",
"export {ImageTileLoader} from \"./tiles/ImageTileLoader\";\nexport {ImageTileStore} from \"./tiles/ImageTileStore\";\nexport {TextureProvider} from \"./tiles/TextureProvider\";\nexport {RegionOfInterestCalculator} from \"./tiles/RegionOfInterestCalculator\";\nexport * from \"./tiles/interfaces/interfaces\";\n",
- "export {EventEmitter} from \"./utils/EventEmitter\";\nexport {Func} from \"./utils/Func\";\nexport {Settings} from \"./utils/Settings\";\nexport {Urls} from \"./utils/Urls\";\n",
- "export {Alignment} from \"./viewer/Alignment\";\nexport {CacheService} from \"./viewer/CacheService\";\nexport {ComponentController} from \"./viewer/ComponentController\";\nexport {Container} from \"./viewer/Container\";\nexport {Observer} from \"./viewer/Observer\";\nexport {ImageSize} from \"./viewer/ImageSize\";\nexport {LoadingService} from \"./viewer/LoadingService\";\nexport {MouseService} from \"./viewer/MouseService\";\nexport {Navigator} from \"./viewer/Navigator\";\nexport {Projection} from \"./viewer/Projection\";\nexport {SpriteService} from \"./viewer/SpriteService\";\nexport {TouchService} from \"./viewer/TouchService\";\nexport {Viewer} from \"./viewer/Viewer\";\nexport * from \"./viewer/interfaces/interfaces\";\n",
- "/// <reference path=\"../../typings/index.d.ts\" />\n\nimport * as falcor from \"falcor\";\n\nimport {Observable} from \"rxjs/Observable\";\n\nimport \"rxjs/add/observable/defer\";\nimport \"rxjs/add/observable/fromPromise\";\n\nimport \"rxjs/add/operator/catch\";\nimport \"rxjs/add/operator/map\";\n\nimport {\n ICoreNode,\n IFillNode,\n IFullNode,\n ISequence,\n ModelCreator,\n} from \"../API\";\n\ninterface IFalcorResult<T> {\n json: T;\n}\n\ninterface IImageByKey<T> {\n imageByKey: { [key: string]: T };\n}\n\ninterface IImageCloseTo<T> {\n imageCloseTo: { [key: string]: T };\n}\n\ninterface IImagesByH<T> {\n imagesByH: { [key: string]: { [index: string]: T } };\n}\n\ninterface ISequenceByKey<T> {\n sequenceByKey: { [sequenceKey: string]: T };\n}\n\ntype APIPath =\n \"imageByKey\" |\n \"imageCloseTo\" |\n \"imagesByH\" |\n \"imageViewAdd\" |\n \"sequenceByKey\" |\n \"sequenceViewAdd\";\n\n/**\n * @class APIv3\n *\n * @classdesc Provides methods for access of API v3.\n */\nexport class APIv3 {\n private _clientId: string;\n\n private _model: falcor.Model;\n private _modelCreator: ModelCreator;\n\n private _pageCount: number;\n\n private _pathImageByKey: APIPath;\n private _pathImageCloseTo: APIPath;\n private _pathImagesByH: APIPath;\n private _pathImageViewAdd: APIPath;\n private _pathSequenceByKey: APIPath;\n private _pathSequenceViewAdd: APIPath;\n\n private _propertiesCore: string[];\n private _propertiesFill: string[];\n private _propertiesKey: string[];\n private _propertiesSequence: string[];\n private _propertiesSpatial: string[];\n private _propertiesUser: string[];\n\n /**\n * Create a new api v3 instance.\n *\n * @param {number} clientId - Client id for API requests.\n * @param {number} [token] - Optional bearer token for API requests of\n * protected resources.\n * @param {ModelCreator} [creator] - Optional model creator instance.\n */\n constructor(clientId: string, token?: string, creator?: ModelCreator) {\n this._clientId = clientId;\n\n this._modelCreator = creator != null ? creator : new ModelCreator();\n this._model = this._modelCreator.createModel(clientId, token);\n\n this._pageCount = 999;\n\n this._pathImageByKey = \"imageByKey\";\n this._pathImageCloseTo = \"imageCloseTo\";\n this._pathImagesByH = \"imagesByH\";\n this._pathImageViewAdd = \"imageViewAdd\";\n this._pathSequenceByKey = \"sequenceByKey\";\n this._pathSequenceViewAdd = \"sequenceViewAdd\";\n\n this._propertiesCore = [\n \"cl\",\n \"l\",\n \"sequence\",\n ];\n\n this._propertiesFill = [\n \"captured_at\",\n \"user\",\n \"project\",\n ];\n\n this._propertiesKey = [\n \"key\",\n ];\n\n this._propertiesSequence = [\n \"keys\",\n ];\n\n this._propertiesSpatial = [\n \"atomic_scale\",\n \"ca\",\n \"calt\",\n \"cca\",\n \"cfocal\",\n \"gpano\",\n \"height\",\n \"merge_cc\",\n \"merge_version\",\n \"c_rotation\",\n \"orientation\",\n \"width\",\n ];\n\n this._propertiesUser = [\n \"username\",\n ];\n }\n\n public imageByKeyFill$(keys: string[]): Observable<{ [key: string]: IFillNode }> {\n return this._catchInvalidateGet$(\n this._wrapPromise$<IFalcorResult<IImageByKey<IFillNode>>>(this._model.get([\n this._pathImageByKey,\n keys,\n this._propertiesKey\n .concat(this._propertiesFill)\n .concat(this._propertiesSpatial),\n this._propertiesKey\n .concat(this._propertiesUser)]))\n .map(\n (value: IFalcorResult<IImageByKey<IFillNode>>): { [key: string]: IFillNode } => {\n if (!value) {\n throw new Error(`Images (${keys.join(\", \")}) could not be found.`);\n }\n\n return value.json.imageByKey;\n }),\n this._pathImageByKey,\n keys);\n }\n\n public imageByKeyFull$(keys: string[]): Observable<{ [key: string]: IFullNode }> {\n return this._catchInvalidateGet$(\n this._wrapPromise$<IFalcorResult<IImageByKey<IFullNode>>>(this._model.get([\n this._pathImageByKey,\n keys,\n this._propertiesKey\n .concat(this._propertiesCore)\n .concat(this._propertiesFill)\n .concat(this._propertiesSpatial),\n this._propertiesKey\n .concat(this._propertiesUser)]))\n .map(\n (value: IFalcorResult<IImageByKey<IFullNode>>): { [key: string]: IFullNode } => {\n if (!value) {\n throw new Error(`Images (${keys.join(\", \")}) could not be found.`);\n }\n\n return value.json.imageByKey;\n }),\n this._pathImageByKey,\n keys);\n }\n\n public imageCloseTo$(lat: number, lon: number): Observable<IFullNode> {\n let lonLat: string = `${lon}:${lat}`;\n return this._catchInvalidateGet$(\n this._wrapPromise$<IFalcorResult<IImageCloseTo<IFullNode>>>(this._model.get([\n this._pathImageCloseTo,\n [lonLat],\n this._propertiesKey\n .concat(this._propertiesCore)\n .concat(this._propertiesFill)\n .concat(this._propertiesSpatial),\n this._propertiesKey\n .concat(this._propertiesUser)]))\n .map(\n (value: IFalcorResult<IImageCloseTo<IFullNode>>): IFullNode => {\n return value != null ? value.json.imageCloseTo[lonLat] : null;\n }),\n this._pathImageCloseTo,\n [lonLat]);\n }\n\n public imagesByH$(hs: string[]): Observable<{ [h: string]: { [index: string]: ICoreNode } }> {\n return this._catchInvalidateGet$(\n this._wrapPromise$<IFalcorResult<IImagesByH<ICoreNode>>>(this._model.get([\n this._pathImagesByH,\n hs,\n { from: 0, to: this._pageCount },\n this._propertiesKey\n .concat(this._propertiesCore),\n this._propertiesKey]))\n .map(\n (value: IFalcorResult<IImagesByH<ICoreNode>>): { [h: string]: { [index: string]: ICoreNode } } => {\n if (value == null) {\n value = { json: { imagesByH: {} } };\n for (let h of hs) {\n value.json.imagesByH[h] = {};\n for (let i: number = 0; i <= this._pageCount; i++) {\n value.json.imagesByH[h][i] = null;\n }\n }\n }\n\n return value.json.imagesByH;\n }),\n this._pathImagesByH,\n hs);\n }\n\n public imageViewAdd$(keys: string[]): Observable<void> {\n return this._catchInvalidateCall$(\n this._wrapPromise$<void>(\n this._model.call(\n [this._pathImageViewAdd],\n [keys])),\n this._pathImageViewAdd,\n keys);\n }\n\n public invalidateImageByKey(keys: string[]): void {\n this._invalidateGet(this._pathImageByKey, keys);\n }\n\n public invalidateImagesByH(hs: string[]): void {\n this._invalidateGet(this._pathImagesByH, hs);\n }\n\n public invalidateSequenceByKey(sKeys: string[]): void {\n this._invalidateGet(this._pathSequenceByKey, sKeys);\n }\n\n public setToken(token?: string): void {\n this._model.invalidate([]);\n this._model = null;\n this._model = this._modelCreator.createModel(this._clientId, token);\n }\n\n public sequenceByKey$(sequenceKeys: string[]): Observable<{ [sequenceKey: string]: ISequence }> {\n return this._catchInvalidateGet$(\n this._wrapPromise$<IFalcorResult<ISequenceByKey<ISequence>>>(this._model.get([\n this._pathSequenceByKey,\n sequenceKeys,\n this._propertiesKey\n .concat(this._propertiesSequence)]))\n .map(\n (value: IFalcorResult<ISequenceByKey<ISequence>>): { [sequenceKey: string]: ISequence } => {\n return value.json.sequenceByKey;\n }),\n this._pathSequenceByKey,\n sequenceKeys);\n }\n\n public sequenceViewAdd$(sequenceKeys: string[]): Observable<void> {\n return this._catchInvalidateCall$(\n this._wrapPromise$<void>(\n this._model.call(\n [this._pathSequenceViewAdd],\n [sequenceKeys])),\n this._pathSequenceViewAdd,\n sequenceKeys);\n }\n\n public get clientId(): string {\n return this._clientId;\n }\n\n private _catchInvalidateGet$<TResult>(observable: Observable<TResult>, path: APIPath, paths: string[]): Observable<TResult> {\n return observable\n .catch(\n (error: Error): Observable<TResult> => {\n this._invalidateGet(path, paths);\n\n throw error;\n });\n }\n\n private _catchInvalidateCall$<TResult>(observable: Observable<TResult>, path: APIPath, paths: string[]): Observable<TResult> {\n return observable\n .catch(\n (error: Error): Observable<TResult> => {\n this._invalidateCall(path, paths);\n\n throw error;\n });\n }\n\n private _invalidateGet(path: APIPath, paths: string[]): void {\n this._model.invalidate([path, paths]);\n }\n\n private _invalidateCall(path: APIPath, paths: string[]): void {\n this._model.invalidate([path], [paths]);\n }\n\n private _wrapPromise$<T>(promise: Promise<T>): Observable<T> {\n return Observable.defer(() => Observable.fromPromise(promise));\n }\n}\n\nexport default APIv3;\n",
- "/// <reference path=\"../../typings/index.d.ts\" />\n\nimport * as falcor from \"falcor\";\nimport * as HttpDataSource from \"falcor-http-datasource\";\n\nimport {Urls} from \"../Utils\";\n\ntype HttpDataSourceConfiguration = {\n crossDomain: boolean;\n withCredentials: boolean;\n headers?: { [key: string]: string } ;\n};\n\n/**\n * @class ModelCreator\n *\n * @classdesc Creates API models.\n */\nexport class ModelCreator {\n /**\n * Creates a Falcor model.\n *\n * @description Max cache size will be set to 16 MB. Authorization\n * header will be added if bearer token is supplied.\n *\n * @param {number} clientId - Client id for API requests.\n * @param {number} [token] - Optional bearer token for API requests of\n * protected resources.\n * @returns {falcor.Model} Falcor model for HTTP requests.\n */\n public createModel(clientId: string, token?: string): falcor.Model {\n const configuration: HttpDataSourceConfiguration = {\n crossDomain: true,\n withCredentials: false,\n };\n\n if (token != null) {\n configuration.headers = { \"Authorization\": `Bearer ${token}` };\n }\n\n return new falcor.Model({\n maxSize: 16 * 1024 * 1024,\n source: new HttpDataSource(Urls.falcorModel(clientId), configuration),\n });\n }\n}\n\nexport default ModelCreator;\n",
- "/// <reference path=\"../../typings/index.d.ts\" />\n\nimport * as vd from \"virtual-dom\";\n\nimport {Subscription} from \"rxjs/Subscription\";\n\nimport {Container, Navigator} from \"../Viewer\";\nimport {Node} from \"../Graph\";\n\nimport {ComponentService, Component, IComponentConfiguration} from \"../Component\";\nimport {IVNodeHash} from \"../Render\";\n\nexport class AttributionComponent extends Component<IComponentConfiguration> {\n public static componentName: string = \"attribution\";\n private _disposable: Subscription;\n\n constructor(name: string, container: Container, navigator: Navigator) {\n super(name, container, navigator);\n }\n\n protected _activate(): void {\n this._disposable = this._navigator.stateService.currentNode$\n .map(\n (node: Node): IVNodeHash => {\n return {name: this._name, vnode: this._getAttributionNode(node.username, node.key)};\n })\n .subscribe(this._container.domRenderer.render$);\n }\n\n protected _deactivate(): void {\n this._disposable.unsubscribe();\n }\n\n protected _getDefaultConfiguration(): IComponentConfiguration {\n return {};\n }\n\n private _getAttributionNode(username: string, photoId: string): vd.VNode {\n return vd.h(\"div.Attribution\", {}, [\n vd.h(\"a\", {href: `https://www.mapillary.com/app/user/${username}`,\n target: \"_blank\",\n textContent: `@${username}`,\n },\n []),\n vd.h(\"span\", {textContent: \"|\"}, []),\n vd.h(\"a\", {href: `https://www.mapillary.com/app/?pKey=${photoId}&focus=photo`,\n target: \"_blank\",\n textContent: \"mapillary.com\",\n },\n []),\n ]);\n }\n}\n\nComponentService.register(AttributionComponent);\nexport default AttributionComponent;\n",
- "/// <reference path=\"../../typings/index.d.ts\" />\n\nimport * as vd from \"virtual-dom\";\n\nimport {Container, Navigator} from \"../Viewer\";\n\nimport {ComponentService, Component, IComponentConfiguration} from \"../Component\";\n\nexport class BackgroundComponent extends Component<IComponentConfiguration> {\n public static componentName: string = \"background\";\n\n constructor(name: string, container: Container, navigator: Navigator) {\n super(name, container, navigator);\n }\n\n protected _activate(): void {\n this._container.domRenderer.render$\n .next({name: this._name, vnode: this._getBackgroundNode(\"The viewer can't display the given photo.\")});\n }\n\n protected _deactivate(): void {\n return;\n }\n\n protected _getDefaultConfiguration(): IComponentConfiguration {\n return {};\n }\n\n private _getBackgroundNode(notice: string): vd.VNode {\n // todo: add condition for when to display the DOM node\n return vd.h(\"div.BackgroundWrapper\", {}, [\n vd.h(\"p\", {textContent: notice}, []),\n ]);\n }\n}\n\nComponentService.register(BackgroundComponent);\nexport default BackgroundComponent;\n",
- "/// <reference path=\"../../typings/index.d.ts\" />\n\nimport * as vd from \"virtual-dom\";\n\nimport {Observable} from \"rxjs/Observable\";\nimport {Subscription} from \"rxjs/Subscription\";\n\nimport {\n Component,\n ComponentService,\n IComponentConfiguration,\n} from \"../Component\";\nimport {\n Spatial,\n Transform,\n} from \"../Geo\";\nimport {Node} from \"../Graph\";\nimport {\n IVNodeHash,\n RenderCamera,\n} from \"../Render\";\nimport {IFrame} from \"../State\";\nimport {\n Container,\n Navigator,\n} from \"../Viewer\";\n\nexport class BearingComponent extends Component<IComponentConfiguration> {\n public static componentName: string = \"bearing\";\n\n private _spatial: Spatial;\n private _svgNamespace: string;\n private _distinctThreshold: number;\n\n private _renderSubscription: Subscription;\n\n constructor(name: string, container: Container, navigator: Navigator) {\n super(name, container, navigator);\n\n this._spatial = new Spatial();\n this._svgNamespace = \"http://www.w3.org/2000/svg\";\n this._distinctThreshold = Math.PI / 90;\n }\n\n protected _activate(): void {\n let nodeBearingFov$: Observable<[number, number]> = this._navigator.stateService.currentState$\n .distinctUntilChanged(\n undefined,\n (frame: IFrame): string => {\n return frame.state.currentNode.key;\n })\n .map(\n (frame: IFrame): [number, number] => {\n let node: Node = frame.state.currentNode;\n let transform: Transform = frame.state.currentTransform;\n\n if (node.pano) {\n let hFov: number = 2 * Math.PI * node.gpano.CroppedAreaImageWidthPixels / node.gpano.FullPanoWidthPixels;\n\n return [this._spatial.degToRad(node.ca), hFov];\n }\n\n let size: number = Math.max(transform.basicWidth, transform.basicHeight);\n\n if (size <= 0) {\n console.warn(\n `Original image size (${transform.basicWidth}, ${transform.basicHeight}) is invalid (${node.key}. ` +\n \"Not showing available fov.\");\n }\n\n let hFov: number = size > 0 ?\n 2 * Math.atan(0.5 * transform.basicWidth / (size * transform.focal)) :\n 0;\n\n return [this._spatial.degToRad(node.ca), hFov];\n })\n .distinctUntilChanged(\n (a1: [number, number], a2: [number, number]): boolean => {\n return Math.abs(a2[0] - a1[0]) < this._distinctThreshold &&\n Math.abs(a2[1] - a1[1]) < this._distinctThreshold;\n });\n\n let cameraBearingFov$: Observable<[number, number]> = this._container.renderService.renderCamera$\n .map(\n (rc: RenderCamera): [number, number] => {\n let vFov: number = this._spatial.degToRad(rc.perspective.fov);\n let hFov: number = rc.perspective.aspect === Number.POSITIVE_INFINITY ?\n Math.PI :\n Math.atan(rc.perspective.aspect * Math.tan(0.5 * vFov)) * 2;\n\n return [this._spatial.azimuthalToBearing(rc.rotation.phi), hFov];\n })\n .distinctUntilChanged(\n (a1: [number, number], a2: [number, number]): boolean => {\n return Math.abs(a2[0] - a1[0]) < this._distinctThreshold &&\n Math.abs(a2[1] - a1[1]) < this._distinctThreshold;\n });\n\n this._renderSubscription = Observable\n .combineLatest(\n nodeBearingFov$,\n cameraBearingFov$)\n .map(\n (args: [[number, number], [number, number]]): IVNodeHash => {\n let background: vd.VNode = vd.h(\n \"div.BearingIndicatorBackground\",\n { oncontextmenu: (event: MouseEvent): void => { event.preventDefault(); } },\n [\n vd.h(\"div.BearingIndicatorBackgroundRectangle\", {}, []),\n vd.h(\"div.BearingIndicatorBackgroundCircle\", {}, []),\n ]);\n\n let north: vd.VNode = vd.h(\"div.BearingIndicatorNorth\", {}, []);\n\n let nodeSector: vd.VNode = this._createCircleSector(args[0][0], args[0][1], \"#000\");\n let cameraSector: vd.VNode = this._createCircleSector(args[1][0], args[1][1], \"#fff\");\n\n let compass: vd.VNode = this._createCircleSectorCompass(nodeSector, cameraSector);\n\n return {\n name: this._name,\n vnode: vd.h(\n \"div.BearingIndicator\",\n {},\n [\n background,\n north,\n compass,\n ]),\n };\n })\n .subscribe(this._container.domRenderer.render$);\n }\n\n protected _deactivate(): void {\n this._renderSubscription.unsubscribe();\n }\n\n protected _getDefaultConfiguration(): IComponentConfiguration {\n return {};\n }\n\n private _createCircleSectorCompass(nodeSector: vd.VNode, cameraSector: vd.VNode): vd.VNode {\n let group: vd.VNode =\n vd.h(\n \"g\",\n {\n attributes: { transform: \"translate(1,1)\" },\n namespace: this._svgNamespace,\n },\n [nodeSector, cameraSector]);\n\n let centerCircle: vd.VNode =\n vd.h(\n \"circle\",\n {\n attributes: {\n cx: \"1\",\n cy: \"1\",\n fill: \"#abb1b9\",\n r: \"0.291667\",\n stroke: \"#000\",\n \"stroke-width\": \"0.0833333\",\n },\n namespace: this._svgNamespace,\n },\n []);\n\n let svg: vd.VNode =\n vd.h(\n \"svg\",\n {\n attributes: { viewBox: \"0 0 2 2\" },\n namespace: this._svgNamespace,\n style: {\n bottom: \"4px\",\n height: \"48px\",\n left: \"4px\",\n position: \"absolute\",\n width: \"48px\",\n },\n },\n [group, centerCircle]);\n\n return svg;\n }\n\n private _createCircleSector(bearing: number, fov: number, fill: string): vd.VNode {\n if (fov > 2 * Math.PI - Math.PI / 90) {\n return vd.h(\n \"circle\",\n {\n attributes: { cx: \"0\", cy: \"0\", fill: fill, r: \"1\" },\n namespace: this._svgNamespace,\n },\n []);\n }\n\n let arcStart: number = bearing - fov / 2 - Math.PI / 2;\n let arcEnd: number = arcStart + fov;\n\n let startX: number = Math.cos(arcStart);\n let startY: number = Math.sin(arcStart);\n\n let endX: number = Math.cos(arcEnd);\n let endY: number = Math.sin(arcEnd);\n\n let largeArc: number = fov >= Math.PI ? 1 : 0;\n\n let description: string = `M 0 0 ${startX} ${startY} A 1 1 0 ${largeArc} 1 ${endX} ${endY}`;\n\n return vd.h(\n \"path\",\n {\n attributes: { d: description, fill: fill },\n namespace: this._svgNamespace,\n },\n []);\n }\n}\n\nComponentService.register(BearingComponent);\nexport default BearingComponent;\n",
- "import {Observable} from \"rxjs/Observable\";\nimport {Subscription} from \"rxjs/Subscription\";\n\nimport \"rxjs/add/observable/combineLatest\";\nimport \"rxjs/add/observable/from\";\nimport \"rxjs/add/observable/merge\";\nimport \"rxjs/add/observable/of\";\nimport \"rxjs/add/observable/zip\";\n\nimport \"rxjs/add/operator/catch\";\nimport \"rxjs/add/operator/combineLatest\";\nimport \"rxjs/add/operator/distinct\";\nimport \"rxjs/add/operator/expand\";\nimport \"rxjs/add/operator/filter\";\nimport \"rxjs/add/operator/map\";\nimport \"rxjs/add/operator/merge\";\nimport \"rxjs/add/operator/mergeMap\";\nimport \"rxjs/add/operator/mergeAll\";\nimport \"rxjs/add/operator/skip\";\nimport \"rxjs/add/operator/switchMap\";\n\nimport {EdgeDirection, IEdge} from \"../Edge\";\nimport {IEdgeStatus, Node} from \"../Graph\";\nimport {ComponentService, Component, ICacheConfiguration, ICacheDepth} from \"../Component\";\nimport {Container, Navigator} from \"../Viewer\";\n\ntype EdgesDepth = [IEdge[], number];\n\nexport class CacheComponent extends Component<ICacheConfiguration> {\n public static componentName: string = \"cache\";\n\n private _sequenceSubscription: Subscription;\n private _spatialSubscription: Subscription;\n\n constructor(name: string, container: Container, navigator: Navigator) {\n super(name, container, navigator);\n }\n\n /**\n * Set the cache depth.\n *\n * Configures the cache depth. The cache depth can be different for\n * different edge direction types.\n *\n * @param {ICacheDepth} depth - Cache depth structure.\n */\n public setDepth(depth: ICacheDepth): void {\n this.configure({ depth: depth });\n }\n\n protected _activate(): void {\n this._sequenceSubscription = Observable\n .combineLatest(\n this._navigator.stateService.currentNode$\n .switchMap(\n (node: Node): Observable<IEdgeStatus> => {\n return node.sequenceEdges$;\n })\n .filter(\n (status: IEdgeStatus): boolean => {\n return status.cached;\n }),\n this._configuration$)\n .switchMap(\n (nc: [IEdgeStatus, ICacheConfiguration]): Observable<EdgesDepth> => {\n let status: IEdgeStatus = nc[0];\n let configuration: ICacheConfiguration = nc[1];\n\n let sequenceDepth: number = Math.max(0, Math.min(4, configuration.depth.sequence));\n\n let next$: Observable<EdgesDepth> = this._cache$(status.edges, EdgeDirection.Next, sequenceDepth);\n let prev$: Observable<EdgesDepth> = this._cache$(status.edges, EdgeDirection.Prev, sequenceDepth);\n\n return Observable\n .merge<EdgesDepth>(\n next$,\n prev$)\n .catch(\n (error: Error, caught: Observable<EdgesDepth>): Observable<EdgesDepth> => {\n console.error(\"Failed to cache sequence edges.\", error);\n\n return Observable.empty<EdgesDepth>();\n });\n })\n .subscribe(() => { /*noop*/ });\n\n this._spatialSubscription = this._navigator.stateService.currentNode$\n .switchMap(\n (node: Node): Observable<[Node, IEdgeStatus]> => {\n return Observable\n .combineLatest(\n Observable.of<Node>(node),\n node.spatialEdges$\n .filter(\n (status: IEdgeStatus): boolean => {\n return status.cached;\n }));\n })\n .combineLatest(\n this._configuration$,\n (ns: [Node, IEdgeStatus], configuration: ICacheConfiguration):\n [Node, IEdgeStatus, ICacheConfiguration] => {\n return [ns[0], ns[1], configuration];\n })\n .switchMap(\n (args: [Node, IEdgeStatus, ICacheConfiguration]): Observable<EdgesDepth> => {\n let node: Node = args[0];\n let edges: IEdge[] = args[1].edges;\n let depth: ICacheDepth = args[2].depth;\n\n let panoDepth: number = Math.max(0, Math.min(2, depth.pano));\n let stepDepth: number = node.pano ? 0 : Math.max(0, Math.min(3, depth.step));\n let turnDepth: number = node.pano ? 0 : Math.max(0, Math.min(1, depth.turn));\n\n let pano$: Observable<EdgesDepth> = this._cache$(edges, EdgeDirection.Pano, panoDepth);\n\n let forward$: Observable<EdgesDepth> = this._cache$(edges, EdgeDirection.StepForward, stepDepth);\n let backward$: Observable<EdgesDepth> = this._cache$(edges, EdgeDirection.StepBackward, stepDepth);\n let left$: Observable<EdgesDepth> = this._cache$(edges, EdgeDirection.StepLeft, stepDepth);\n let right$: Observable<EdgesDepth> = this._cache$(edges, EdgeDirection.StepRight, stepDepth);\n\n let turnLeft$: Observable<EdgesDepth> = this._cache$(edges, EdgeDirection.TurnLeft, turnDepth);\n let turnRight$: Observable<EdgesDepth> = this._cache$(edges, EdgeDirection.TurnRight, turnDepth);\n let turnU$: Observable<EdgesDepth> = this._cache$(edges, EdgeDirection.TurnU, turnDepth);\n\n return Observable\n .merge<EdgesDepth>(\n forward$,\n backward$,\n left$,\n right$,\n pano$,\n turnLeft$,\n turnRight$,\n turnU$)\n .catch(\n (error: Error, caught: Observable<EdgesDepth>): Observable<EdgesDepth> => {\n console.error(\"Failed to cache spatial edges.\", error);\n\n return Observable.empty<EdgesDepth>();\n });\n })\n .subscribe(() => { /*noop*/ });\n }\n\n protected _deactivate(): void {\n this._sequenceSubscription.unsubscribe();\n this._spatialSubscription.unsubscribe();\n }\n\n protected _getDefaultConfiguration(): ICacheConfiguration {\n return { depth: { pano: 1, sequence: 2, step: 1, turn: 0 } };\n }\n\n private _cache$(edges: IEdge[], direction: EdgeDirection, depth: number): Observable<EdgesDepth> {\n return Observable\n .zip(\n Observable.of<IEdge[]>(edges),\n Observable.of<number>(depth))\n .expand(\n (ed: EdgesDepth): Observable<EdgesDepth> => {\n let es: IEdge[] = ed[0];\n let d: number = ed[1];\n\n let edgesDepths$: Observable<EdgesDepth>[] = [];\n\n if (d > 0) {\n for (let edge of es) {\n if (edge.data.direction === direction) {\n edgesDepths$.push(\n Observable\n .zip(\n this._navigator.graphService.cacheNode$(edge.to)\n .mergeMap(\n (n: Node): Observable<IEdge[]> => {\n return this._nodeToEdges$(n, direction);\n }),\n Observable.of<number>(d - 1)));\n }\n }\n }\n\n return Observable\n .from<Observable<EdgesDepth>>(edgesDepths$)\n .mergeAll();\n })\n .skip(1);\n }\n\n private _nodeToEdges$(node: Node, direction: EdgeDirection): Observable<IEdge[]> {\n return ([EdgeDirection.Next, EdgeDirection.Prev].indexOf(direction) > -1 ?\n node.sequenceEdges$ :\n node.spatialEdges$)\n .first(\n (status: IEdgeStatus): boolean => {\n return status.cached;\n })\n .map(\n (status: IEdgeStatus): IEdge[] => {\n return status.edges;\n });\n }\n}\n\nComponentService.register(CacheComponent);\nexport default CacheComponent;\n",
- "import {BehaviorSubject} from \"rxjs/BehaviorSubject\";\nimport {Observable} from \"rxjs/Observable\";\nimport {Subject} from \"rxjs/Subject\";\n\nimport \"rxjs/add/operator/publishReplay\";\nimport \"rxjs/add/operator/scan\";\nimport \"rxjs/add/operator/startWith\";\n\nimport {IComponentConfiguration} from \"../Component\";\nimport {\n Container,\n Navigator,\n} from \"../Viewer\";\nimport {EventEmitter} from \"../Utils\";\n\nexport abstract class Component<TConfiguration extends IComponentConfiguration> extends EventEmitter {\n /**\n * Component name. Used when interacting with component through the Viewer's API.\n */\n public static componentName: string = \"not_worthy\";\n\n protected _activated: boolean;\n protected _container: Container;\n protected _name: string;\n protected _navigator: Navigator;\n\n protected _activated$: BehaviorSubject<boolean> = new BehaviorSubject<boolean>(false);\n protected _configuration$: Observable<TConfiguration>;\n protected _configurationSubject$: Subject<TConfiguration> = new Subject<TConfiguration>();\n\n constructor (name: string, container: Container, navigator: Navigator) {\n super();\n\n this._activated = false;\n this._container = container;\n this._name = name;\n this._navigator = navigator;\n\n this._configuration$ =\n this._configurationSubject$\n .startWith(this.defaultConfiguration)\n .scan(\n (conf: TConfiguration, newConf: TConfiguration): TConfiguration => {\n for (let key in newConf) {\n if (newConf.hasOwnProperty(key)) {\n conf[key] = <any>newConf[key];\n }\n }\n\n return conf;\n })\n .publishReplay(1)\n .refCount();\n\n this._configuration$.subscribe(() => { /*noop*/ });\n }\n\n public get activated(): boolean {\n return this._activated;\n }\n\n public get activated$(): Observable<boolean> {\n return this._activated$;\n }\n\n /**\n * Get default configuration.\n *\n * @returns {TConfiguration} Default configuration for component.\n */\n public get defaultConfiguration(): TConfiguration {\n return this._getDefaultConfiguration();\n }\n\n public get configuration$(): Observable<TConfiguration> {\n return this._configuration$;\n }\n\n public get name(): string {\n return this._name;\n }\n\n public activate(conf?: TConfiguration): void {\n if (this._activated) {\n return;\n }\n\n if (conf !== undefined) {\n this._configurationSubject$.next(conf);\n }\n\n this._activated = true;\n this._activate();\n this._activated$.next(true);\n }\n\n public configure(conf: TConfiguration): void {\n this._configurationSubject$.next(conf);\n }\n\n public deactivate(): void {\n if (!this._activated) {\n return;\n }\n\n this._activated = false;\n this._deactivate();\n this._container.domRenderer.clear(this._name);\n this._container.glRenderer.clear(this._name);\n this._activated$.next(false);\n }\n\n /**\n * Detect the viewer's new width and height and resize the component's\n * rendered elements accordingly if applicable.\n */\n public resize(): void { return; }\n\n protected abstract _activate(): void;\n\n protected abstract _deactivate(): void;\n\n protected abstract _getDefaultConfiguration(): TConfiguration;\n}\n\nexport default Component;\n",
- "/// <reference path=\"../../typings/index.d.ts\" />\n\nimport * as _ from \"underscore\";\n\nimport {ArgumentMapillaryError} from \"../Error\";\nimport {Container, Navigator} from \"../Viewer\";\nimport {CoverComponent, Component, IComponentConfiguration} from \"../Component\";\n\ninterface IActiveComponent {\n active: boolean;\n component: Component<IComponentConfiguration>;\n}\n\nexport class ComponentService {\n public static registeredCoverComponent: typeof CoverComponent;\n public static registeredComponents: {[key: string]: { new (...args: any[]): Component<IComponentConfiguration>; }} = {};\n\n private _container: Container;\n private _coverActivated: boolean;\n private _coverComponent: CoverComponent;\n private _navigator: Navigator;\n private _components: {[key: string]: IActiveComponent} = {};\n\n public static register<T extends Component<IComponentConfiguration>>(\n component: { componentName: string, new (...args: any[]): T; }): void {\n if (ComponentService.registeredComponents[component.componentName] === undefined) {\n ComponentService.registeredComponents[component.componentName] = component;\n }\n }\n\n public static registerCover(coverComponent: typeof CoverComponent): void {\n ComponentService.registeredCoverComponent = coverComponent;\n }\n\n constructor (container: Container, navigator: Navigator) {\n this._container = container;\n this._navigator = navigator;\n\n for (let component of _.values(ComponentService.registeredComponents)) {\n this._components[component.componentName] = {\n active: false,\n component: new component(component.componentName, container, navigator),\n };\n }\n\n this._coverComponent = new ComponentService.registeredCoverComponent(\"cover\", container, navigator);\n this._coverComponent.activate();\n this._coverActivated = true;\n }\n\n public activateCover(): void {\n if (this._coverActivated) {\n return;\n }\n this._coverActivated = true;\n\n for (let component of _.values(this._components)) {\n if (component.active) {\n component.component.deactivate();\n }\n }\n return;\n }\n\n public deactivateCover(): void {\n if (!this._coverActivated) {\n return;\n }\n this._coverActivated = false;\n\n for (let component of _.values(this._components)) {\n if (component.active) {\n component.component.activate();\n }\n }\n return;\n }\n\n public activate(name: string): void {\n this._checkName(name);\n this._components[name].active = true;\n if (!this._coverActivated) {\n this.get(name).activate();\n }\n }\n\n public configure<TConfiguration extends IComponentConfiguration>(name: string, conf: TConfiguration): void {\n this._checkName(name);\n this.get(name).configure(conf);\n }\n\n public deactivate(name: string): void {\n this._checkName(name);\n this._components[name].active = false;\n if (!this._coverActivated) {\n this.get(name).deactivate();\n }\n }\n\n public resize(): void {\n for (let component of _.values(this._components)) {\n component.component.resize();\n }\n }\n\n public get<TComponent extends Component<IComponentConfiguration>>(name: string): TComponent {\n return <TComponent>this._components[name].component;\n }\n\n public getCover(): CoverComponent {\n return this._coverComponent;\n }\n\n private _checkName(name: string): void {\n if (!(name in this._components)) {\n throw new ArgumentMapillaryError(`Component does not exist: ${name}`);\n }\n }\n}\n\nexport default ComponentService;\n",
- "/// <reference path=\"../../typings/index.d.ts\" />\n\nimport * as vd from \"virtual-dom\";\n\nimport {Subscription} from \"rxjs/Subscription\";\n\nimport \"rxjs/add/operator/filter\";\nimport \"rxjs/add/operator/map\";\nimport \"rxjs/add/operator/withLatestFrom\";\n\nimport {Node} from \"../Graph\";\nimport {Container, Navigator} from \"../Viewer\";\nimport {ICoverConfiguration, ComponentService, Component} from \"../Component\";\n\nimport {IVNodeHash} from \"../Render\";\n\nexport class CoverComponent extends Component<ICoverConfiguration> {\n public static componentName: string = \"cover\";\n\n private _disposable: Subscription;\n private _keyDisposable: Subscription;\n\n constructor(name: string, container: Container, navigator: Navigator) {\n super(name, container, navigator);\n }\n\n public _activate(): void {\n this._keyDisposable = this._navigator.stateService.currentNode$\n .withLatestFrom(\n this._configuration$,\n (node: Node, configuration: ICoverConfiguration): [Node, ICoverConfiguration] => {\n return [node, configuration];\n })\n .filter(\n (nc: [Node, ICoverConfiguration]): boolean => {\n return nc[0].key !== nc[1].key;\n })\n .map((nc: [Node, ICoverConfiguration]): Node => { return nc[0]; })\n .map(\n (node: Node): ICoverConfiguration => {\n return { key: node.key, src: node.image.src };\n })\n .subscribe(this._configurationSubject$);\n\n this._disposable = this._configuration$\n .map(\n (conf: ICoverConfiguration): IVNodeHash => {\n if (!conf.key) {\n return { name: this._name, vnode: vd.h(\"div\", []) };\n }\n\n if (!conf.visible) {\n return {name: this._name, vnode: vd.h(\"div.Cover.CoverDone\", [ this._getCoverBackgroundVNode(conf) ])};\n }\n\n return { name: this._name, vnode: this._getCoverButtonVNode(conf) };\n })\n .subscribe(this._container.domRenderer.render$);\n }\n\n public _deactivate(): void {\n this._disposable.unsubscribe();\n this._keyDisposable.unsubscribe();\n }\n\n protected _getDefaultConfiguration(): ICoverConfiguration {\n return { \"loading\": false, \"visible\": true };\n }\n\n private _getCoverButtonVNode(conf: ICoverConfiguration): vd.VNode {\n const cover: string = conf.loading ? \"div.Cover.CoverLoading\" : \"div.Cover\";\n\n return vd.h(cover, [\n this._getCoverBackgroundVNode(conf),\n vd.h(\"button.CoverButton\", { onclick: (): void => { this.configure({ loading: true }); } }, [\"Explore\"]),\n vd.h(\"a.CoverLogo\", {href: `https://www.mapillary.com`, target: \"_blank\"}, []),\n ]);\n }\n\n private _getCoverBackgroundVNode(conf: ICoverConfiguration): vd.VNode {\n let url: string = conf.src != null ?\n `url(${conf.src})` :\n `url(https://d1cuyjsrcm0gby.cloudfront.net/${conf.key}/thumb-640.jpg)`;\n\n let properties: vd.createProperties = { style: { backgroundImage: url } };\n\n let children: vd.VNode[] = [];\n if (conf.loading) {\n children.push(vd.h(\"div.Spinner\", {}, []));\n }\n\n children.push(vd.h(\"div.CoverBackgroundGradient\", {}, []));\n\n return vd.h(\"div.CoverBackground\", properties, children);\n }\n}\n\nComponentService.registerCover(CoverComponent);\nexport default CoverComponent;\n",
- "/// <reference path=\"../../typings/index.d.ts\" />\n\nimport * as _ from \"underscore\";\nimport * as vd from \"virtual-dom\";\n\nimport {BehaviorSubject} from \"rxjs/BehaviorSubject\";\nimport {Subscription} from \"rxjs/Subscription\";\n\nimport \"rxjs/add/operator/combineLatest\";\n\nimport {IVNodeHash} from \"../Render\";\nimport {IFrame} from \"../State\";\nimport {Component, ComponentService, IComponentConfiguration} from \"../Component\";\nimport {Container, Navigator} from \"../Viewer\";\n\nexport class DebugComponent extends Component<IComponentConfiguration> {\n public static componentName: string = \"debug\";\n\n private _displaying: boolean;\n private _disposable: Subscription;\n\n private _open$: BehaviorSubject<boolean> = new BehaviorSubject<boolean>(false);\n\n constructor(name: string, container: Container, navigator: Navigator) {\n super(name, container, navigator);\n this._displaying = false;\n }\n\n public _activate(): void {\n this._disposable = this._navigator.stateService.currentState$\n .combineLatest(\n this._open$,\n this._navigator.imageLoadingService.loadstatus$,\n (frame: IFrame, open: boolean, loadStatus: any): IVNodeHash => {\n return {name: this._name, vnode: this._getDebugVNode(open, this._getDebugInfo(frame, loadStatus))};\n })\n .subscribe(this._container.domRenderer.render$);\n }\n\n public _deactivate(): void {\n this._disposable.unsubscribe();\n }\n\n protected _getDefaultConfiguration(): IComponentConfiguration {\n return {};\n }\n\n private _getDebugInfo(frame: IFrame, loadStatus: any): vd.VNode[] {\n let ret: vd.VNode[] = [];\n\n ret.push(vd.h(\"h2\", \"Node\"));\n\n if (frame.state.currentNode) {\n ret.push(vd.h(\"p\", `currentNode: ${frame.state.currentNode.key}`));\n }\n\n if (frame.state.previousNode) {\n ret.push(vd.h(\"p\", `previousNode: ${frame.state.previousNode.key}`));\n }\n\n ret.push(vd.h(\"h2\", \"Loading\"));\n\n let total: number = 0;\n let loaded: number = 0;\n let loading: number = 0;\n\n for (let loadStat of _.values(loadStatus)) {\n total += loadStat.loaded;\n if (loadStat.loaded !== loadStat.total) {\n loading++;\n } else {\n loaded++;\n }\n }\n\n ret.push(vd.h(\"p\", `Loaded Images: ${loaded}`));\n ret.push(vd.h(\"p\", `Loading Images: ${loading}`));\n ret.push(vd.h(\"p\", `Total bytes loaded: ${total}`));\n\n ret.push(vd.h(\"h2\", \"Camera\"));\n\n ret.push(vd.h(\"p\", `camera.position.x: ${frame.state.camera.position.x}`));\n ret.push(vd.h(\"p\", `camera.position.y: ${frame.state.camera.position.y}`));\n ret.push(vd.h(\"p\", `camera.position.z: ${frame.state.camera.position.z}`));\n\n ret.push(vd.h(\"p\", `camera.lookat.x: ${frame.state.camera.lookat.x}`));\n ret.push(vd.h(\"p\", `camera.lookat.y: ${frame.state.camera.lookat.y}`));\n ret.push(vd.h(\"p\", `camera.lookat.z: ${frame.state.camera.lookat.z}`));\n\n ret.push(vd.h(\"p\", `camera.up.x: ${frame.state.camera.up.x}`));\n ret.push(vd.h(\"p\", `camera.up.y: ${frame.state.camera.up.y}`));\n ret.push(vd.h(\"p\", `camera.up.z: ${frame.state.camera.up.z}`));\n\n return ret;\n }\n\n private _getDebugVNode(open: boolean, info: vd.VNode[]): vd.VNode {\n if (open) {\n return vd.h(\"div.Debug\", {}, [\n vd.h(\"h2\", {}, [\"Debug\"]),\n this._getDebugVNodeButton(open),\n vd.h(\"pre\", {}, info),\n ]);\n } else {\n return this._getDebugVNodeButton(open);\n }\n }\n\n private _getDebugVNodeButton(open: boolean): any {\n let buttonText: string = open ? \"Disable Debug\" : \"D\";\n let buttonCssClass: string = open ? \"\" : \".DebugButtonFixed\";\n\n if (open) {\n return vd.h(`button.DebugButton${buttonCssClass}`,\n {onclick: this._closeDebugElement.bind(this)},\n [buttonText]);\n } else {\n return vd.h(`button.DebugButton${buttonCssClass}`,\n {onclick: this._openDebugElement.bind(this)},\n [buttonText]);\n }\n }\n\n private _closeDebugElement(open: boolean): void {\n this._open$.next(false);\n }\n\n private _openDebugElement(): void {\n this._open$.next(true);\n }\n}\n\nComponentService.register(DebugComponent);\nexport default DebugComponent;\n",
- "/// <reference path=\"../../typings/index.d.ts\" />\n\nimport * as vd from \"virtual-dom\";\n\nimport {Subscription} from \"rxjs/Subscription\";\n\nimport \"rxjs/add/operator/combineLatest\";\n\nimport {ComponentService, Component, IComponentConfiguration} from \"../Component\";\nimport {Node} from \"../Graph\";\nimport {Container, Navigator} from \"../Viewer\";\n\ninterface ICanvasNode {\n canvas: HTMLCanvasElement;\n node: Node;\n}\n\nexport class ImageComponent extends Component<IComponentConfiguration> {\n public static componentName: string = \"image\";\n\n private _canvasId: string;\n private drawSubscription: Subscription;\n\n constructor(name: string, container: Container, navigator: Navigator) {\n super(name, container, navigator);\n this._canvasId = `${container.id}-${this._name}`;\n }\n\n protected _activate(): void {\n this.drawSubscription = this._container.domRenderer.element$\n .combineLatest(\n this._navigator.stateService.currentNode$,\n (element: Element, node: Node): ICanvasNode => {\n let canvas: HTMLCanvasElement = <HTMLCanvasElement>document.getElementById(this._canvasId);\n return {canvas: canvas, node: node};\n })\n .subscribe(\n (canvasNode: ICanvasNode): void => {\n let canvas: HTMLCanvasElement = canvasNode.canvas;\n let node: Node = canvasNode.node;\n\n if (!node || !canvas) {\n return null;\n }\n\n let adaptableDomRenderer: HTMLElement = canvas.parentElement;\n\n let width: number = adaptableDomRenderer.offsetWidth;\n let height: number = adaptableDomRenderer.offsetHeight;\n\n canvas.width = width;\n canvas.height = height;\n\n let ctx: any = canvas.getContext(\"2d\");\n ctx.drawImage(node.image, 0, 0, width, height);\n });\n\n this._container.domRenderer.renderAdaptive$.next({name: this._name, vnode: vd.h(`canvas#${this._canvasId}`, [])});\n }\n\n protected _deactivate(): void {\n this.drawSubscription.unsubscribe();\n }\n\n protected _getDefaultConfiguration(): IComponentConfiguration {\n return {};\n }\n}\n\nComponentService.register(ImageComponent);\nexport default ImageComponent;\n",
- "import {Observable} from \"rxjs/Observable\";\nimport {Subscription} from \"rxjs/Subscription\";\n\nimport \"rxjs/add/observable/fromEvent\";\n\nimport \"rxjs/add/operator/withLatestFrom\";\n\nimport {EdgeDirection, IEdge} from \"../Edge\";\nimport {ComponentService, Component, IComponentConfiguration} from \"../Component\";\nimport {Container, Navigator} from \"../Viewer\";\nimport {IFrame, IRotation} from \"../State\";\nimport {IEdgeStatus, Node} from \"../Graph\";\nimport {Spatial, Camera} from \"../Geo\";\n\ninterface IKeyboardFrame {\n event: KeyboardEvent;\n frame: IFrame;\n sequenceEdges: IEdgeStatus;\n spatialEdges: IEdgeStatus;\n}\n\nexport class KeyboardComponent extends Component<IComponentConfiguration> {\n public static componentName: string = \"keyboard\";\n\n private _spatial: Spatial;\n\n private _disposable: Subscription;\n private _perspectiveDirections: EdgeDirection[];\n\n constructor(name: string, container: Container, navigator: Navigator) {\n super(name, container, navigator);\n\n this._spatial = new Spatial();\n\n this._perspectiveDirections = [\n EdgeDirection.StepForward,\n EdgeDirection.StepBackward,\n EdgeDirection.StepLeft,\n EdgeDirection.StepRight,\n EdgeDirection.TurnLeft,\n EdgeDirection.TurnRight,\n EdgeDirection.TurnU,\n ];\n }\n\n protected _activate(): void {\n let sequenceEdges$: Observable<IEdgeStatus> = this._navigator.stateService.currentNode$\n .switchMap(\n (node: Node): Observable<IEdgeStatus> => {\n return node.sequenceEdges$;\n });\n\n let spatialEdges$: Observable<IEdgeStatus> = this._navigator.stateService.currentNode$\n .switchMap(\n (node: Node): Observable<IEdgeStatus> => {\n return node.spatialEdges$;\n });\n\n this._disposable = Observable\n .fromEvent(document, \"keydown\")\n .withLatestFrom(\n this._navigator.stateService.currentState$,\n sequenceEdges$,\n spatialEdges$,\n (event: KeyboardEvent, frame: IFrame, sequenceEdges: IEdgeStatus, spatialEdges: IEdgeStatus): IKeyboardFrame => {\n return { event: event, frame: frame, sequenceEdges: sequenceEdges, spatialEdges: spatialEdges };\n })\n .subscribe((kf: IKeyboardFrame): void => {\n if (!kf.frame.state.currentNode.pano) {\n this._navigatePerspective(kf.event, kf.sequenceEdges, kf.spatialEdges);\n } else {\n this._navigatePanorama(kf.event, kf.sequenceEdges, kf.spatialEdges, kf.frame.state.camera);\n }\n });\n }\n\n protected _deactivate(): void {\n this._disposable.unsubscribe();\n }\n\n protected _getDefaultConfiguration(): IComponentConfiguration {\n return {};\n }\n\n private _navigatePanorama(event: KeyboardEvent, sequenceEdges: IEdgeStatus, spatialEdges: IEdgeStatus, camera: Camera): void {\n let navigationAngle: number = 0;\n let stepDirection: EdgeDirection = null;\n let sequenceDirection: EdgeDirection = null;\n\n let phi: number = this._rotationFromCamera(camera).phi;\n\n switch (event.keyCode) {\n case 37: // left\n if (event.shiftKey || event.altKey) {\n break;\n }\n\n navigationAngle = Math.PI / 2 + phi;\n stepDirection = EdgeDirection.StepLeft;\n break;\n case 38: // up\n if (event.shiftKey) {\n break;\n }\n\n if (event.altKey) {\n sequenceDirection = EdgeDirection.Next;\n break;\n }\n\n navigationAngle = phi;\n stepDirection = EdgeDirection.StepForward;\n break;\n case 39: // right\n if (event.shiftKey || event.altKey) {\n break;\n }\n\n navigationAngle = -Math.PI / 2 + phi;\n stepDirection = EdgeDirection.StepRight;\n break;\n case 40: // down\n if (event.shiftKey) {\n break;\n }\n\n if (event.altKey) {\n sequenceDirection = EdgeDirection.Prev;\n break;\n }\n\n navigationAngle = Math.PI + phi;\n stepDirection = EdgeDirection.StepBackward;\n break;\n default:\n return;\n }\n\n event.preventDefault();\n\n if (sequenceDirection != null) {\n this._moveInDir(sequenceDirection, sequenceEdges);\n return;\n }\n\n if (stepDirection == null || !spatialEdges.cached) {\n return;\n }\n\n navigationAngle = this._spatial.wrapAngle(navigationAngle);\n\n let threshold: number = Math.PI / 4;\n\n let edges: IEdge[] = spatialEdges.edges.filter(\n (e: IEdge): boolean => {\n return e.data.direction === EdgeDirection.Pano ||\n e.data.direction === stepDirection;\n });\n\n let smallestAngle: number = Number.MAX_VALUE;\n let toKey: string = null;\n\n for (let edge of edges) {\n let angle: number = Math.abs(this._spatial.wrapAngle(edge.data.worldMotionAzimuth - navigationAngle));\n\n if (angle < Math.min(smallestAngle, threshold)) {\n smallestAngle = angle;\n toKey = edge.to;\n }\n }\n\n if (toKey == null) {\n return;\n }\n\n this._navigator.moveToKey$(toKey)\n .subscribe(\n (n: Node): void => { return; },\n (e: Error): void => { console.error(e); });\n }\n\n private _rotationFromCamera(camera: Camera): IRotation {\n let direction: THREE.Vector3 = camera.lookat.clone().sub(camera.position);\n\n let upProjection: number = direction.clone().dot(camera.up);\n let planeProjection: THREE.Vector3 = direction.clone().sub(camera.up.clone().multiplyScalar(upProjection));\n\n let phi: number = Math.atan2(planeProjection.y, planeProjection.x);\n let theta: number = Math.PI / 2 - this._spatial.angleToPlane(direction.toArray(), [0, 0, 1]);\n\n return { phi: phi, theta: theta };\n }\n\n private _navigatePerspective(event: KeyboardEvent, sequenceEdges: IEdgeStatus, spatialEdges: IEdgeStatus): void {\n let direction: EdgeDirection = null;\n let sequenceDirection: EdgeDirection = null;\n\n switch (event.keyCode) {\n case 37: // left\n if (event.altKey) {\n break;\n }\n\n direction = event.shiftKey ? EdgeDirection.TurnLeft : EdgeDirection.StepLeft;\n break;\n case 38: // up\n if (event.altKey) {\n sequenceDirection = EdgeDirection.Next;\n break;\n }\n\n direction = event.shiftKey ? EdgeDirection.Pano : EdgeDirection.StepForward;\n break;\n case 39: // right\n if (event.altKey) {\n break;\n }\n\n direction = event.shiftKey ? EdgeDirection.TurnRight : EdgeDirection.StepRight;\n break;\n case 40: // down\n if (event.altKey) {\n sequenceDirection = EdgeDirection.Prev;\n break;\n }\n\n direction = event.shiftKey ? EdgeDirection.TurnU : EdgeDirection.StepBackward;\n break;\n default:\n return;\n }\n\n event.preventDefault();\n\n if (sequenceDirection != null) {\n this._moveInDir(sequenceDirection, sequenceEdges);\n return;\n }\n\n this._moveInDir(direction, spatialEdges);\n }\n\n private _moveInDir(direction: EdgeDirection, edgeStatus: IEdgeStatus): void {\n if (!edgeStatus.cached) {\n return;\n }\n\n for (let edge of edgeStatus.edges) {\n if (edge.data.direction === direction) {\n this._navigator.moveToKey$(edge.to)\n .subscribe(\n (n: Node): void => { return; },\n (e: Error): void => { console.error(e); });\n\n return;\n }\n }\n }\n}\n\nComponentService.register(KeyboardComponent);\nexport default KeyboardComponent;\n",
- "/// <reference path=\"../../typings/index.d.ts\" />\n\nimport * as _ from \"underscore\";\nimport * as vd from \"virtual-dom\";\n\nimport {Subscription} from \"rxjs/Subscription\";\n\nimport \"rxjs/add/operator/combineLatest\";\n\nimport {Container, Navigator} from \"../Viewer\";\nimport {ComponentService, Component, IComponentConfiguration} from \"../Component\";\n\nimport {IVNodeHash} from \"../Render\";\n\nexport class LoadingComponent extends Component<IComponentConfiguration> {\n public static componentName: string = \"loading\";\n\n private _loadingSubscription: Subscription;\n\n constructor(name: string, container: Container, navigator: Navigator) {\n super(name, container, navigator);\n }\n\n protected _activate(): void {\n this._loadingSubscription = this._navigator.loadingService.loading$\n .combineLatest(\n this._navigator.imageLoadingService.loadstatus$,\n (loading: boolean, loadStatus: any): IVNodeHash => {\n if (!loading) {\n return {name: \"loading\", vnode: this._getBarVNode(100)};\n }\n\n let total: number = 0;\n let loaded: number = 0;\n\n for (let loadStat of _.values(loadStatus)) {\n if (loadStat.loaded !== loadStat.total) {\n loaded += loadStat.loaded;\n total += loadStat.total;\n }\n }\n\n let percentage: number = 100;\n if (total !== 0) {\n percentage = (loaded / total) * 100;\n }\n\n return {name: this._name, vnode: this._getBarVNode(percentage)};\n })\n .subscribe(this._container.domRenderer.render$);\n }\n\n protected _deactivate(): void {\n this._loadingSubscription.unsubscribe();\n }\n\n protected _getDefaultConfiguration(): IComponentConfiguration {\n return {};\n }\n\n private _getBarVNode(percentage: number): vd.VNode {\n let loadingBarStyle: any = {};\n let loadingContainerStyle: any = {};\n\n if (percentage !== 100) {\n loadingBarStyle.width = percentage.toFixed(0) + \"%\";\n loadingBarStyle.opacity = \"1\";\n\n } else {\n loadingBarStyle.width = \"100%\";\n loadingBarStyle.opacity = \"0\";\n }\n\n return vd.h(\"div.Loading\", { style: loadingContainerStyle }, [ vd.h(\"div.LoadingBar\", {style: loadingBarStyle}, [])]);\n }\n}\n\nComponentService.register(LoadingComponent);\nexport default LoadingComponent;\n",
- "/// <reference path=\"../../typings/index.d.ts\" />\n\nimport * as vd from \"virtual-dom\";\n\nimport {Observable} from \"rxjs/Observable\";\nimport {Subscription} from \"rxjs/Subscription\";\n\nimport \"rxjs/add/operator/map\";\nimport \"rxjs/add/operator/first\";\n\nimport {EdgeDirection, IEdge} from \"../Edge\";\nimport {IEdgeStatus, Node} from \"../Graph\";\nimport {Container, Navigator} from \"../Viewer\";\nimport {ComponentService, Component, IComponentConfiguration} from \"../Component\";\n\nimport {IVNodeHash} from \"../Render\";\n\nexport class NavigationComponent extends Component<IComponentConfiguration> {\n public static componentName: string = \"navigation\";\n\n private _renderSubscription: Subscription;\n\n private _dirNames: {[dir: number]: string};\n\n constructor(name: string, container: Container, navigator: Navigator) {\n super(name, container, navigator);\n\n this._dirNames = {};\n this._dirNames[EdgeDirection.StepForward] = \"Forward\";\n this._dirNames[EdgeDirection.StepBackward] = \"Backward\";\n this._dirNames[EdgeDirection.StepLeft] = \"Left\";\n this._dirNames[EdgeDirection.StepRight] = \"Right\";\n this._dirNames[EdgeDirection.TurnLeft] = \"Turnleft\";\n this._dirNames[EdgeDirection.TurnRight] = \"Turnright\";\n this._dirNames[EdgeDirection.TurnU] = \"Turnaround\";\n }\n\n protected _activate(): void {\n this._renderSubscription = this._navigator.stateService.currentNode$\n .switchMap(\n (node: Node): Observable<IEdge[]> => {\n return node.pano ?\n Observable.of<IEdge[]>([]) :\n Observable.combineLatest<IEdge[]>(\n node.sequenceEdges$,\n node.spatialEdges$,\n (seq: IEdgeStatus, spa: IEdgeStatus): IEdge[] => {\n return seq.edges.concat(spa.edges);\n });\n })\n .map(\n (edges: IEdge[]): IVNodeHash => {\n let btns: vd.VNode[] = [];\n\n for (let edge of edges) {\n let direction: EdgeDirection = edge.data.direction;\n let name: string = this._dirNames[direction];\n if (name == null) {\n continue;\n }\n\n btns.push(this._createVNode(direction, name));\n }\n\n return {name: this._name, vnode: vd.h(`div.NavigationComponent`, btns)};\n })\n .subscribe(this._container.domRenderer.render$);\n }\n\n protected _deactivate(): void {\n this._renderSubscription.unsubscribe();\n }\n\n protected _getDefaultConfiguration(): IComponentConfiguration {\n return {};\n }\n\n private _createVNode(direction: EdgeDirection, name: string): vd.VNode {\n return vd.h(\n `span.Direction.Direction${name}`,\n {\n onclick: (ev: Event): void => {\n this._navigator.moveDir$(direction)\n .subscribe(\n (node: Node): void => { return; },\n (error: Error): void => { console.error(error); });\n },\n },\n []);\n }\n}\n\nComponentService.register(NavigationComponent);\nexport default NavigationComponent;\n",
- "/// <reference path=\"../../typings/index.d.ts\" />\n\nimport * as _ from \"underscore\";\nimport * as vd from \"virtual-dom\";\n\nimport {Observable} from \"rxjs/Observable\";\nimport {Subscription} from \"rxjs/Subscription\";\n\nimport \"rxjs/add/observable/fromPromise\";\nimport \"rxjs/add/observable/of\";\n\nimport \"rxjs/add/operator/combineLatest\";\nimport \"rxjs/add/operator/distinct\";\nimport \"rxjs/add/operator/distinctUntilChanged\";\nimport \"rxjs/add/operator/filter\";\nimport \"rxjs/add/operator/map\";\nimport \"rxjs/add/operator/mergeMap\";\nimport \"rxjs/add/operator/pluck\";\nimport \"rxjs/add/operator/scan\";\n\nimport {ISequence} from \"../API\";\nimport {IRouteConfiguration, IRoutePath, ComponentService, Component} from \"../Component\";\nimport {Node} from \"../Graph\";\nimport {IVNodeHash} from \"../Render\";\nimport {IFrame} from \"../State\";\nimport {Container, Navigator} from \"../Viewer\";\n\ninterface IRtAndFrame {\n routeTrack: RouteTrack;\n frame: IFrame;\n conf: IRouteConfiguration;\n}\n\ninterface IConfAndNode {\n conf: IRouteConfiguration;\n node: Node;\n}\n\ninterface INodeInstruction {\n key: string;\n description: string;\n}\n\ninterface IInstructionPlace {\n place: number;\n nodeInstructions: INodeInstruction[];\n}\n\nclass DescriptionState {\n public description: string;\n public showsLeft: number;\n}\n\nclass RouteState {\n public routeTrack: RouteTrack;\n public currentNode: Node;\n public lastNode: Node;\n public playing: boolean;\n}\n\nclass RouteTrack {\n public nodeInstructions: INodeInstruction[] = [];\n public nodeInstructionsOrdered: INodeInstruction[][] = [];\n}\n\nexport class RouteComponent extends Component<IRouteConfiguration> {\n public static componentName: string = \"route\";\n\n private _disposable: Subscription;\n private _disposableDescription: Subscription;\n\n constructor(name: string, container: Container, navigator: Navigator) {\n super(name, container, navigator);\n }\n\n protected _activate(): void {\n let _slowedStream$: Observable<IFrame>;\n\n _slowedStream$ = this._navigator.stateService.currentState$.filter((frame: IFrame) => {\n return (frame.id % 2) === 0;\n }).filter((frame: IFrame) => {\n return frame.state.nodesAhead < 15;\n }).distinctUntilChanged(undefined, (frame: IFrame): string => {\n return frame.state.lastNode.key;\n });\n\n let _routeTrack$: Observable<RouteTrack>;\n\n _routeTrack$ = this.configuration$.mergeMap((conf: IRouteConfiguration): Observable<IRoutePath> => {\n return Observable.from<IRoutePath>(conf.paths);\n }).distinct((p: IRoutePath): string => {\n return p.sequenceKey;\n }).mergeMap((path: IRoutePath): Observable<ISequence> => {\n return this._navigator.apiV3.sequenceByKey$([path.sequenceKey])\n .map(\n (sequenceByKey: { [sequenceKey: string]: ISequence }): ISequence => {\n return sequenceByKey[path.sequenceKey];\n });\n }).combineLatest(this.configuration$, (sequence: ISequence, conf: IRouteConfiguration): IInstructionPlace[] => {\n let i: number = 0;\n let instructionPlaces: IInstructionPlace[] = [];\n\n for (let path of conf.paths) {\n if (path.sequenceKey === sequence.key) {\n let nodeInstructions: INodeInstruction[] = [];\n let saveKey: boolean = false;\n for (let key of sequence.keys) {\n if (path.startKey === key) {\n saveKey = true;\n }\n if (saveKey) {\n let description: string = null;\n\n for (let infoKey of path.infoKeys) {\n if (infoKey.key === key) {\n description = infoKey.description;\n }\n }\n\n nodeInstructions.push({description: description, key: key});\n }\n if (path.stopKey === key) {\n saveKey = false;\n }\n }\n instructionPlaces.push({nodeInstructions: nodeInstructions, place: i});\n }\n i++;\n }\n\n return instructionPlaces;\n }).scan(\n (routeTrack: RouteTrack, instructionPlaces: IInstructionPlace[]): RouteTrack => {\n for (let instructionPlace of instructionPlaces) {\n routeTrack.nodeInstructionsOrdered[instructionPlace.place] = instructionPlace.nodeInstructions;\n }\n routeTrack.nodeInstructions = _.flatten(routeTrack.nodeInstructionsOrdered);\n return routeTrack;\n },\n new RouteTrack());\n\n this._disposable = _slowedStream$\n .combineLatest(_routeTrack$, this.configuration$,\n (frame: IFrame, routeTrack: RouteTrack, conf: IRouteConfiguration): IRtAndFrame => {\n return {conf: conf, frame: frame, routeTrack: routeTrack};\n }).scan(\n (routeState: RouteState, rtAndFrame: IRtAndFrame): RouteState => {\n if (rtAndFrame.conf.playing === undefined || rtAndFrame.conf.playing) {\n routeState.routeTrack = rtAndFrame.routeTrack;\n routeState.currentNode = rtAndFrame.frame.state.currentNode;\n routeState.lastNode = rtAndFrame.frame.state.lastNode;\n routeState.playing = true;\n } else {\n this._navigator.stateService.cutNodes();\n routeState.playing = false;\n }\n return routeState;\n },\n new RouteState())\n .filter((routeState: RouteState): boolean => {\n return routeState.playing;\n }).filter((routeState: RouteState): boolean => {\n for (let nodeInstruction of routeState.routeTrack.nodeInstructions) {\n if (!nodeInstruction) {\n continue;\n }\n if (nodeInstruction.key === routeState.lastNode.key) {\n return true;\n }\n }\n return false;\n }).distinctUntilChanged(undefined, (routeState: RouteState): string => {\n return routeState.lastNode.key;\n }).mergeMap((routeState: RouteState): Observable<Node> => {\n let i: number = 0;\n for (let nodeInstruction of routeState.routeTrack.nodeInstructions) {\n if (nodeInstruction.key === routeState.lastNode.key) {\n break;\n }\n i++;\n }\n\n let nextInstruction: INodeInstruction = routeState.routeTrack.nodeInstructions[i + 1];\n if (!nextInstruction) {\n return Observable.of<Node>(null);\n }\n\n return this._navigator.graphService.cacheNode$(nextInstruction.key);\n }).combineLatest(this.configuration$, (node: Node, conf: IRouteConfiguration): IConfAndNode => {\n return {conf: conf, node: node};\n }).filter((cAN: IConfAndNode) => {\n return cAN.node !== null && cAN.conf.playing;\n }).pluck<IConfAndNode, Node>(\"node\").subscribe(this._navigator.stateService.appendNode$);\n\n this._disposableDescription = this._navigator.stateService.currentNode$\n .combineLatest(_routeTrack$, this.configuration$,\n (node: Node, routeTrack: RouteTrack, conf: IRouteConfiguration): string => {\n if (conf.playing !== undefined && !conf.playing) {\n return \"quit\";\n }\n\n let description: string = null;\n\n for (let nodeInstruction of routeTrack.nodeInstructions) {\n if (nodeInstruction.key === node.key) {\n description = nodeInstruction.description;\n break;\n }\n }\n\n return description;\n }).scan(\n (descriptionState: DescriptionState, description: string): DescriptionState => {\n if (description !== descriptionState.description && description !== null) {\n descriptionState.description = description;\n descriptionState.showsLeft = 6;\n } else {\n descriptionState.showsLeft--;\n }\n\n if (description === \"quit\") {\n descriptionState.description = null;\n }\n\n return descriptionState;\n },\n new DescriptionState(),\n ).map((descriptionState: DescriptionState): IVNodeHash => {\n if (descriptionState.showsLeft > 0 && descriptionState.description) {\n return {name: this._name, vnode: this._getRouteAnnotationNode(descriptionState.description)};\n } else {\n return {name: this._name, vnode: vd.h(\"div\", [])};\n }\n }).subscribe(this._container.domRenderer.render$);\n }\n\n protected _deactivate(): void {\n this._disposable.unsubscribe();\n this._disposableDescription.unsubscribe();\n }\n\n protected _getDefaultConfiguration(): IRouteConfiguration {\n return {};\n }\n\n public play(): void {\n this.configure({ playing: true });\n }\n\n public stop(): void {\n this.configure({ playing: false });\n }\n\n private _getRouteAnnotationNode(description: string): vd.VNode {\n return vd.h(\"div.RouteFrame\", {}, [\n vd.h(\"p\", {textContent: description}, []),\n ]);\n }\n}\n\nComponentService.register(RouteComponent);\nexport default RouteComponent;\n",
- "import {Observable} from \"rxjs/Observable\";\nimport {Subscription} from \"rxjs/Subscription\";\n\nimport \"rxjs/add/operator/buffer\";\nimport \"rxjs/add/operator/debounceTime\";\nimport \"rxjs/add/operator/filter\";\nimport \"rxjs/add/operator/map\";\nimport \"rxjs/add/operator/scan\";\n\nimport {ComponentService, Component, IComponentConfiguration} from \"../Component\";\nimport {Node} from \"../Graph\";\nimport {Container, Navigator} from \"../Viewer\";\n\ntype Keys = { [key: string]: boolean };\n\ninterface IKeys {\n report: string[];\n reported: Keys;\n}\n\nexport class StatsComponent extends Component<IComponentConfiguration> {\n public static componentName: string = \"stats\";\n\n private _sequenceSubscription: Subscription;\n private _imageSubscription: Subscription;\n\n constructor(name: string, container: Container, navigator: Navigator) {\n super(name, container, navigator);\n }\n\n protected _activate(): void {\n this._sequenceSubscription = this._navigator.stateService.currentNode$\n .scan(\n (keys: IKeys, node: Node): IKeys => {\n let sKey: string = node.sequenceKey;\n keys.report = [];\n\n if (!(sKey in keys.reported)) {\n keys.report = [sKey];\n keys.reported[sKey] = true;\n }\n\n return keys;\n },\n { report: [], reported: {} })\n .filter(\n (keys: IKeys): boolean => {\n return keys.report.length > 0;\n })\n .mergeMap(\n (keys: IKeys): Observable<void> => {\n return this._navigator.apiV3.sequenceViewAdd$(keys.report)\n .catch(\n (error: Error, caught: Observable<void>): Observable<void> => {\n console.error(`Failed to report sequence stats (${keys.report})`, error);\n\n return Observable.empty<void>();\n });\n })\n .subscribe(() => { /*noop*/ });\n\n this._imageSubscription = this._navigator.stateService.currentNode$\n .map(\n (node: Node): string => {\n return node.key;\n })\n .buffer(this._navigator.stateService.currentNode$.debounceTime(5000))\n .scan(\n (keys: IKeys, newKeys: string[]): IKeys => {\n keys.report = [];\n\n for (let key of newKeys) {\n if (!(key in keys.reported)) {\n keys.report.push(key);\n keys.reported[key] = true;\n }\n }\n\n return keys;\n },\n { report: [], reported: {} })\n .filter(\n (keys: IKeys): boolean => {\n return keys.report.length > 0;\n })\n .mergeMap(\n (keys: IKeys): Observable<void> => {\n return this._navigator.apiV3.imageViewAdd$(keys.report)\n .catch(\n (error: Error, caught: Observable<void>): Observable<void> => {\n console.error(`Failed to report image stats (${keys.report})`, error);\n\n return Observable.empty<void>();\n });\n })\n .subscribe(() => { /*noop*/ });\n }\n\n protected _deactivate(): void {\n this._sequenceSubscription.unsubscribe();\n this._imageSubscription.unsubscribe();\n }\n\n protected _getDefaultConfiguration(): IComponentConfiguration {\n return {};\n }\n}\n\nComponentService.register(StatsComponent);\nexport default StatsComponent;\n",
- "/// <reference path=\"../../../typings/index.d.ts\" />\n\nimport * as vd from \"virtual-dom\";\n\nimport {Observable} from \"rxjs/Observable\";\nimport {Subscription} from \"rxjs/Subscription\";\nimport {Subject} from \"rxjs/Subject\";\n\nimport \"rxjs/add/observable/combineLatest\";\n\nimport \"rxjs/add/operator/do\";\nimport \"rxjs/add/operator/distinctUntilChanged\";\nimport \"rxjs/add/operator/filter\";\nimport \"rxjs/add/operator/map\";\nimport \"rxjs/add/operator/share\";\n\nimport {\n ComponentService,\n Component,\n DirectionDOMRenderer,\n IDirectionConfiguration,\n} from \"../../Component\";\nimport {IEdgeStatus, Node, Sequence} from \"../../Graph\";\nimport {IVNodeHash, RenderCamera} from \"../../Render\";\nimport {Container, Navigator} from \"../../Viewer\";\n\n/**\n * @class DirectionComponent\n * @classdesc Component showing navigation arrows for steps and turns.\n */\nexport class DirectionComponent extends Component<IDirectionConfiguration> {\n /** @inheritdoc */\n public static componentName: string = \"direction\";\n\n private _renderer: DirectionDOMRenderer;\n\n private _hoveredKeySubject$: Subject<string>;\n private _hoveredKey$: Observable<string>;\n\n private _configurationSubscription: Subscription;\n private _nodeSubscription: Subscription;\n private _renderCameraSubscription: Subscription;\n private _hoveredKeySubscription: Subscription;\n\n constructor(name: string, container: Container, navigator: Navigator) {\n super(name, container, navigator);\n\n this._renderer = new DirectionDOMRenderer(this.defaultConfiguration, container.element);\n\n this._hoveredKeySubject$ = new Subject<string>();\n\n this._hoveredKey$ = this._hoveredKeySubject$.share();\n }\n\n /**\n * Get hovered key observable.\n *\n * @description An observable emitting the key of the node for the direction\n * arrow that is being hovered. When the mouse leaves a direction arrow null\n * is emitted.\n *\n * @returns {Observable<string>}\n */\n public get hoveredKey$(): Observable<string> {\n return this._hoveredKey$;\n }\n\n /**\n * Set highlight key.\n *\n * @description The arrow pointing towards the node corresponding to the\n * highlight key will be highlighted.\n *\n * @param {string} highlightKey Key of node to be highlighted if existing\n * among arrows.\n */\n public setHighlightKey(highlightKey: string): void {\n this.configure({ highlightKey: highlightKey });\n }\n\n /**\n * Set min width of container element.\n *\n * @description Set min width of the non transformed container element holding\n * the navigation arrows. If the min width is larger than the max width the\n * min width value will be used.\n *\n * The container element is automatically resized when the resize\n * method on the Viewer class is called.\n *\n * @param {number} minWidth\n */\n public setMinWidth(minWidth: number): void {\n this.configure({ minWidth: minWidth });\n }\n\n /**\n * Set max width of container element.\n *\n * @description Set max width of the non transformed container element holding\n * the navigation arrows. If the min width is larger than the max width the\n * min width value will be used.\n *\n * The container element is automatically resized when the resize\n * method on the Viewer class is called.\n *\n * @param {number} minWidth\n */\n public setMaxWidth(maxWidth: number): void {\n this.configure({ maxWidth: maxWidth });\n }\n\n /** @inheritdoc */\n public resize(): void {\n this._renderer.resize(this._container.element);\n }\n\n protected _activate(): void {\n this._configurationSubscription = this._configuration$\n .subscribe(\n (configuration: IDirectionConfiguration): void => {\n this._renderer.setConfiguration(configuration);\n });\n\n this._nodeSubscription = this._navigator.stateService.currentNode$\n .do(\n (node: Node): void => {\n this._container.domRenderer.render$.next({name: this._name, vnode: vd.h(\"div\", {}, [])});\n this._renderer.setNode(node);\n })\n .withLatestFrom(this._configuration$)\n .switchMap(\n (nc: [Node, IDirectionConfiguration]): Observable<[IEdgeStatus, Sequence]> => {\n let node: Node = nc[0];\n let configuration: IDirectionConfiguration = nc[1];\n\n return node.spatialEdges$\n .withLatestFrom(\n configuration.distinguishSequence ?\n this._navigator.graphService\n .cacheSequence$(node.sequenceKey)\n .catch(\n (error: Error, caught: Observable<Sequence>): Observable<Sequence> => {\n console.error(`Failed to cache sequence (${node.sequenceKey})`, error);\n\n return Observable.empty<Sequence>();\n }) :\n Observable.of<Sequence>(null));\n })\n .subscribe(\n (es: [IEdgeStatus, Sequence]): void => {\n this._renderer.setEdges(es[0], es[1]);\n });\n\n this._renderCameraSubscription = this._container.renderService.renderCameraFrame$\n .do(\n (renderCamera: RenderCamera): void => {\n this._renderer.setRenderCamera(renderCamera);\n })\n .map(\n (renderCamera: RenderCamera): DirectionDOMRenderer => {\n return this._renderer;\n })\n .filter(\n (renderer: DirectionDOMRenderer): boolean => {\n return renderer.needsRender;\n })\n .map(\n (renderer: DirectionDOMRenderer): IVNodeHash => {\n return { name: this._name, vnode: renderer.render(this._navigator) };\n })\n .subscribe(this._container.domRenderer.render$);\n\n this._hoveredKeySubscription = Observable\n .combineLatest(\n [\n this._container.domRenderer.element$,\n this._container.renderService.renderCamera$,\n this._container.mouseService.mouseMove$.startWith(null),\n this._container.mouseService.mouseUp$.startWith(null),\n ],\n (e: Element, rc: RenderCamera, mm: MouseEvent, mu: MouseEvent): Element => {\n return e;\n })\n .map(\n (element: Element): string => {\n let elements: NodeListOf<Element> = element.getElementsByClassName(\"DirectionsPerspective\");\n\n for (let i: number = 0; i < elements.length; i++) {\n let hovered: Element = elements.item(i).querySelector(\":hover\");\n\n if (hovered != null && hovered.hasAttribute(\"data-key\")) {\n return hovered.getAttribute(\"data-key\");\n }\n }\n\n return null;\n })\n .distinctUntilChanged()\n .subscribe(this._hoveredKeySubject$);\n }\n\n protected _deactivate(): void {\n this._configurationSubscription.unsubscribe();\n this._nodeSubscription.unsubscribe();\n this._renderCameraSubscription.unsubscribe();\n this._hoveredKeySubscription.unsubscribe();\n }\n\n protected _getDefaultConfiguration(): IDirectionConfiguration {\n return {\n distinguishSequence: false,\n maxWidth: 460,\n minWidth: 260,\n };\n }\n}\n\nComponentService.register(DirectionComponent);\nexport default DirectionComponent;\n",
- "import {IDirectionConfiguration} from \"../../Component\";\nimport {Spatial} from \"../../Geo\";\n\n/**\n * @class DirectionDOMCalculator\n * @classdesc Helper class for calculating DOM CSS properties.\n */\nexport class DirectionDOMCalculator {\n private _spatial: Spatial;\n\n private _elementWidth: number;\n private _elementHeight: number;\n\n private _minWidth: number;\n private _maxWidth: number;\n\n private _minThresholdWidth: number;\n private _maxThresholdWidth: number;\n private _minThresholdHeight: number;\n private _maxThresholdHeight: number;\n\n private _containerWidth: number;\n private _containerWidthCss: string;\n private _containerMarginCss: string;\n private _containerLeftCss: string;\n private _containerHeight: number;\n private _containerHeightCss: string;\n private _containerBottomCss: string;\n\n private _stepCircleSize: number;\n private _stepCircleSizeCss: string;\n private _stepCircleMarginCss: string;\n\n private _turnCircleSize: number;\n private _turnCircleSizeCss: string;\n\n private _outerRadius: number;\n private _innerRadius: number;\n\n private _shadowOffset: number;\n\n constructor(configuration: IDirectionConfiguration, element: HTMLElement) {\n this._spatial = new Spatial();\n\n this._minThresholdWidth = 320;\n this._maxThresholdWidth = 1480;\n this._minThresholdHeight = 240;\n this._maxThresholdHeight = 820;\n\n this._configure(configuration);\n this._resize(element);\n this._reset();\n }\n\n public get minWidth(): number {\n return this._minWidth;\n }\n\n public get maxWidth(): number {\n return this._maxWidth;\n }\n\n public get containerWidth(): number {\n return this._containerWidth;\n }\n\n public get containerWidthCss(): string {\n return this._containerWidthCss;\n }\n\n public get containerMarginCss(): string {\n return this._containerMarginCss;\n }\n\n public get containerLeftCss(): string {\n return this._containerLeftCss;\n }\n\n public get containerHeight(): number {\n return this._containerHeight;\n }\n\n public get containerHeightCss(): string {\n return this._containerHeightCss;\n }\n\n public get containerBottomCss(): string {\n return this._containerBottomCss;\n }\n\n public get stepCircleSize(): number {\n return this._stepCircleSize;\n }\n\n public get stepCircleSizeCss(): string {\n return this._stepCircleSizeCss;\n }\n\n public get stepCircleMarginCss(): string {\n return this._stepCircleMarginCss;\n }\n\n public get turnCircleSize(): number {\n return this._turnCircleSize;\n }\n\n public get turnCircleSizeCss(): string {\n return this._turnCircleSizeCss;\n }\n\n public get outerRadius(): number {\n return this._outerRadius;\n }\n\n public get innerRadius(): number {\n return this._innerRadius;\n }\n\n public get shadowOffset(): number {\n return this._shadowOffset;\n }\n\n /**\n * Configures the min and max width values.\n *\n * @param {IDirectionConfiguration} configuration Configuration\n * with min and max width values.\n */\n public configure(configuration: IDirectionConfiguration): void {\n this._configure(configuration);\n this._reset();\n }\n\n /**\n * Resizes all properties according to the width and height\n * of the element.\n *\n * @param {HTMLElement} element The container element from which to extract\n * the width and height.\n */\n public resize(element: HTMLElement): void {\n this._resize(element);\n this._reset();\n }\n\n /**\n * Calculates the coordinates on the unit circle for an angle.\n *\n * @param {number} angle Angle in radians.\n * @returns {Array<number>} The x and y coordinates on the unit circle.\n */\n public angleToCoordinates(angle: number): Array<number> {\n return [Math.cos(angle), Math.sin(angle)];\n }\n\n /**\n * Calculates the coordinates on the unit circle for the\n * relative angle between the first and second angle.\n *\n * @param {number} first Angle in radians.\n * @param {number} second Angle in radians.\n * @returns {Array<number>} The x and y coordinates on the unit circle\n * for the relative angle between the first and second angle.\n */\n public relativeAngleToCoordiantes(first: number, second: number): Array<number> {\n let relativeAngle: number = this._spatial.wrapAngle(first - second);\n\n return this.angleToCoordinates(relativeAngle);\n }\n\n private _configure(configuration: IDirectionConfiguration): void {\n this._minWidth = configuration.minWidth;\n this._maxWidth = this._getMaxWidth(configuration.minWidth, configuration.maxWidth);\n }\n\n private _resize(element: HTMLElement): void {\n this._elementWidth = element.offsetWidth;\n this._elementHeight = element.offsetHeight;\n }\n\n private _reset(): void {\n this._containerWidth = this._getContainerWidth(this._elementWidth, this._elementHeight);\n this._containerHeight = this._getContainerHeight(this.containerWidth);\n this._stepCircleSize = this._getStepCircleDiameter(this._containerHeight);\n this._turnCircleSize = this._getTurnCircleDiameter(this.containerHeight);\n this._outerRadius = this._getOuterRadius(this._containerHeight);\n this._innerRadius = this._getInnerRadius(this._containerHeight);\n\n this._shadowOffset = 3;\n\n this._containerWidthCss = this._numberToCssPixels(this._containerWidth);\n this._containerMarginCss = this._numberToCssPixels(-0.5 * this._containerWidth);\n this._containerLeftCss = this._numberToCssPixels(Math.floor(0.5 * this._elementWidth));\n this._containerHeightCss = this._numberToCssPixels(this._containerHeight);\n this._containerBottomCss = this._numberToCssPixels(Math.floor(-0.08 * this._containerHeight));\n this._stepCircleSizeCss = this._numberToCssPixels(this._stepCircleSize);\n this._stepCircleMarginCss = this._numberToCssPixels(-0.5 * this._stepCircleSize);\n this._turnCircleSizeCss = this._numberToCssPixels(this._turnCircleSize);\n }\n\n private _getContainerWidth(elementWidth: number, elementHeight: number): number {\n let relativeWidth: number =\n (elementWidth - this._minThresholdWidth) / (this._maxThresholdWidth - this._minThresholdWidth);\n let relativeHeight: number =\n (elementHeight - this._minThresholdHeight) / (this._maxThresholdHeight - this._minThresholdHeight);\n\n let coeff: number = Math.max(0, Math.min(1, Math.min(relativeWidth, relativeHeight)));\n\n coeff = 0.04 * Math.round(25 * coeff);\n\n return this._minWidth + coeff * (this._maxWidth - this._minWidth);\n }\n\n private _getContainerHeight(containerWidth: number): number {\n return 0.77 * containerWidth;\n }\n\n private _getStepCircleDiameter(containerHeight: number): number {\n return 0.34 * containerHeight;\n }\n\n private _getTurnCircleDiameter(containerHeight: number): number {\n return 0.3 * containerHeight;\n }\n\n private _getOuterRadius(containerHeight: number): number {\n return 0.31 * containerHeight;\n }\n\n private _getInnerRadius(containerHeight: number): number {\n return 0.125 * containerHeight;\n }\n\n private _numberToCssPixels(value: number): string {\n return value + \"px\";\n }\n\n private _getMaxWidth(value: number, minWidth: number): number {\n return value > minWidth ? value : minWidth;\n }\n}\n\nexport default DirectionDOMCalculator;\n",
- "/// <reference path=\"../../../typings/index.d.ts\" />\n\nimport * as vd from \"virtual-dom\";\n\nimport {DirectionDOMCalculator, IDirectionConfiguration} from \"../../Component\";\nimport {EdgeDirection, IEdge} from \"../../Edge\";\nimport {Spatial} from \"../../Geo\";\nimport {IEdgeStatus, Node, Sequence} from \"../../Graph\";\nimport {RenderCamera} from \"../../Render\";\nimport {IRotation} from \"../../State\";\nimport {Navigator} from \"../../Viewer\";\n\n/**\n * @class DirectionDOMRenderer\n * @classdesc DOM renderer for direction arrows.\n */\nexport class DirectionDOMRenderer {\n private _spatial: Spatial;\n private _calculator: DirectionDOMCalculator;\n\n private _node: Node;\n\n private _rotation: IRotation;\n private _epsilon: number;\n\n private _highlightKey: string;\n private _distinguishSequence: boolean;\n\n private _needsRender: boolean;\n\n private _stepEdges: IEdge[];\n private _turnEdges: IEdge[];\n private _panoEdges: IEdge[];\n private _sequenceEdgeKeys: string[];\n\n private _stepDirections: EdgeDirection[];\n private _turnDirections: EdgeDirection[];\n private _turnNames: {[dir: number]: string};\n\n private _isEdge: boolean = false;\n\n constructor(configuration: IDirectionConfiguration, element: HTMLElement) {\n this._spatial = new Spatial();\n this._calculator = new DirectionDOMCalculator(configuration, element);\n\n this._node = null;\n\n this._rotation = { phi: 0, theta: 0 };\n this._epsilon = 0.5 * Math.PI / 180;\n\n this._highlightKey = null;\n this._distinguishSequence = false;\n\n this._needsRender = false;\n\n this._stepEdges = [];\n this._turnEdges = [];\n this._panoEdges = [];\n this._sequenceEdgeKeys = [];\n\n this._stepDirections = [\n EdgeDirection.StepForward,\n EdgeDirection.StepBackward,\n EdgeDirection.StepLeft,\n EdgeDirection.StepRight,\n ];\n\n this._turnDirections = [\n EdgeDirection.TurnLeft,\n EdgeDirection.TurnRight,\n EdgeDirection.TurnU,\n ];\n\n this._turnNames = {};\n this._turnNames[EdgeDirection.TurnLeft] = \"TurnLeft\";\n this._turnNames[EdgeDirection.TurnRight] = \"TurnRight\";\n this._turnNames[EdgeDirection.TurnU] = \"TurnAround\";\n\n // detects IE 8-11, then Edge 20+.\n let isIE: boolean = !!(<any>document).documentMode;\n this._isEdge = !isIE && !!(<any>window).StyleMedia;\n }\n\n /**\n * Get needs render.\n *\n * @returns {boolean} Value indicating whether render should be called.\n */\n public get needsRender(): boolean {\n return this._needsRender;\n }\n\n /**\n * Renders virtual DOM elements.\n *\n * @description Calling render resets the needs render property.\n */\n public render(navigator: Navigator): vd.VNode {\n this._needsRender = false;\n\n let rotation: IRotation = this._rotation;\n\n let steps: vd.VNode[] = [];\n let turns: vd.VNode[] = [];\n\n if (this._node.pano) {\n steps = steps.concat(this._createPanoArrows(navigator, rotation));\n } else {\n steps = steps.concat(this._createPerspectiveToPanoArrows(navigator, rotation));\n steps = steps.concat(this._createStepArrows(navigator, rotation));\n turns = turns.concat(this._createTurnArrows(navigator));\n }\n\n return this._getContainer(steps, turns, rotation);\n }\n\n public setEdges(edgeStatus: IEdgeStatus, sequence: Sequence): void {\n this._setEdges(edgeStatus, sequence);\n\n this._setNeedsRender();\n }\n\n /**\n * Set node for which to show edges.\n *\n * @param {Node} node\n */\n public setNode(node: Node): void {\n this._node = node;\n this._clearEdges();\n\n this._setNeedsRender();\n }\n\n /**\n * Set the render camera to use for calculating rotations.\n *\n * @param {RenderCamera} renderCamera\n */\n public setRenderCamera(renderCamera: RenderCamera): void {\n let rotation: IRotation = renderCamera.rotation;\n\n if (Math.abs(rotation.phi - this._rotation.phi) < this._epsilon) {\n return;\n }\n\n this._rotation = rotation;\n\n this._setNeedsRender();\n }\n\n /**\n * Set configuration values.\n *\n * @param {IDirectionConfiguration} configuration\n */\n public setConfiguration(configuration: IDirectionConfiguration): void {\n let needsRender: boolean = false;\n if (this._highlightKey !== configuration.highlightKey ||\n this._distinguishSequence !== configuration.distinguishSequence) {\n this._highlightKey = configuration.highlightKey;\n this._distinguishSequence = configuration.distinguishSequence;\n\n needsRender = true;\n }\n\n if (this._calculator.minWidth !== configuration.minWidth ||\n this._calculator.maxWidth !== configuration.maxWidth) {\n this._calculator.configure(configuration);\n needsRender = true;\n }\n\n if (needsRender) {\n this._setNeedsRender();\n }\n }\n\n /**\n * Detect the element's width and height and resize\n * elements accordingly.\n *\n * @param {HTMLElement} element Viewer container element.\n */\n public resize(element: HTMLElement): void {\n this._calculator.resize(element);\n\n this._setNeedsRender();\n }\n\n private _setNeedsRender(): void {\n if (this._node != null) {\n this._needsRender = true;\n }\n }\n\n private _clearEdges(): void {\n this._stepEdges = [];\n this._turnEdges = [];\n this._panoEdges = [];\n this._sequenceEdgeKeys = [];\n }\n\n private _setEdges(edgeStatus: IEdgeStatus, sequence: Sequence): void {\n this._stepEdges = [];\n this._turnEdges = [];\n this._panoEdges = [];\n this._sequenceEdgeKeys = [];\n\n for (let edge of edgeStatus.edges) {\n let direction: EdgeDirection = edge.data.direction;\n\n if (this._stepDirections.indexOf(direction) > -1) {\n this._stepEdges.push(edge);\n continue;\n }\n\n if (this._turnDirections.indexOf(direction) > -1) {\n this._turnEdges.push(edge);\n continue;\n }\n\n if (edge.data.direction === EdgeDirection.Pano) {\n this._panoEdges.push(edge);\n }\n }\n\n if (this._distinguishSequence && sequence != null) {\n let edges: IEdge[] = this._panoEdges\n .concat(this._stepEdges)\n .concat(this._turnEdges);\n\n for (let edge of edges) {\n let edgeKey: string = edge.to;\n\n for (let sequenceKey of sequence.keys) {\n if (sequenceKey === edgeKey) {\n this._sequenceEdgeKeys.push(edgeKey);\n break;\n }\n }\n }\n }\n }\n\n private _createPanoArrows(navigator: Navigator, rotation: IRotation): Array<vd.VNode> {\n let arrows: Array<vd.VNode> = [];\n\n for (let panoEdge of this._panoEdges) {\n arrows.push(\n this._createVNodeByKey(\n navigator,\n panoEdge.to,\n panoEdge.data.worldMotionAzimuth,\n rotation,\n this._calculator.outerRadius,\n \"DirectionsArrowPano\"));\n }\n\n for (let stepEdge of this._stepEdges) {\n arrows.push(\n this._createPanoToPerspectiveArrow(\n navigator,\n stepEdge.to,\n stepEdge.data.worldMotionAzimuth,\n rotation,\n stepEdge.data.direction));\n }\n\n return arrows;\n }\n\n private _createPanoToPerspectiveArrow(\n navigator: Navigator,\n key: string,\n azimuth: number,\n rotation: IRotation,\n direction: EdgeDirection): vd.VNode {\n\n let threshold: number = Math.PI / 8;\n\n let relativePhi: number = rotation.phi;\n\n switch (direction) {\n case EdgeDirection.StepBackward:\n relativePhi = rotation.phi - Math.PI;\n break;\n case EdgeDirection.StepLeft:\n relativePhi = rotation.phi + Math.PI / 2;\n break;\n case EdgeDirection.StepRight:\n relativePhi = rotation.phi - Math.PI / 2;\n break;\n default:\n break;\n }\n\n if (Math.abs(this._spatial.wrapAngle(azimuth - relativePhi)) < threshold) {\n return this._createVNodeByKey(\n navigator,\n key,\n azimuth,\n rotation,\n this._calculator.outerRadius,\n \"DirectionsArrowStep\");\n }\n\n return this._createVNodeDisabled(key, azimuth, rotation);\n }\n\n private _createPerspectiveToPanoArrows(navigator: Navigator, rotation: IRotation): Array<vd.VNode> {\n let arrows: Array<vd.VNode> = [];\n\n for (let panoEdge of this._panoEdges) {\n arrows.push(\n this._createVNodeByKey(\n navigator,\n panoEdge.to,\n panoEdge.data.worldMotionAzimuth,\n rotation,\n this._calculator.innerRadius,\n \"DirectionsArrowPano\",\n true));\n }\n\n return arrows;\n }\n\n private _createStepArrows(navigator: Navigator, rotation: IRotation): Array<vd.VNode> {\n let arrows: Array<vd.VNode> = [];\n\n for (let stepEdge of this._stepEdges) {\n arrows.push(\n this._createVNodeByDirection(\n navigator,\n stepEdge.to,\n stepEdge.data.worldMotionAzimuth,\n rotation,\n stepEdge.data.direction));\n }\n\n return arrows;\n }\n\n\n private _createTurnArrows(navigator: Navigator): Array<vd.VNode> {\n let turns: Array<vd.VNode> = [];\n\n for (let turnEdge of this._turnEdges) {\n let direction: EdgeDirection = turnEdge.data.direction;\n let name: string = this._turnNames[direction];\n\n turns.push(\n this._createVNodeByTurn(\n navigator,\n turnEdge.to,\n name,\n direction));\n }\n\n return turns;\n }\n\n private _createVNodeByKey(\n navigator: Navigator,\n key: string,\n azimuth: number,\n rotation: IRotation,\n offset: number,\n className: string,\n shiftVertically?: boolean): vd.VNode {\n\n let onClick: (e: Event) => void =\n (e: Event): void => {\n navigator.moveToKey$(key)\n .subscribe(\n (node: Node): void => { return; },\n (error: Error): void => { console.error(error); });\n };\n\n return this._createVNode(\n key,\n azimuth,\n rotation,\n offset,\n className,\n \"DirectionsCircle\",\n onClick,\n shiftVertically);\n }\n\n private _createVNodeByDirection(\n navigator: Navigator,\n key: string,\n azimuth: number,\n rotation: IRotation,\n direction: EdgeDirection): vd.VNode {\n\n let onClick: (e: Event) => void =\n (e: Event): void => {\n navigator.moveDir$(direction)\n .subscribe(\n (node: Node): void => { return; },\n (error: Error): void => { console.error(error); });\n };\n\n return this._createVNode(\n key,\n azimuth,\n rotation,\n this._calculator.outerRadius,\n \"DirectionsArrowStep\",\n \"DirectionsCircle\",\n onClick);\n }\n\n private _createVNodeByTurn(\n navigator: Navigator,\n key: string,\n className: string,\n direction: EdgeDirection): vd.VNode {\n\n let onClick: (e: Event) => void =\n (e: Event): void => {\n navigator.moveDir$(direction)\n .subscribe(\n (node: Node): void => { return; },\n (error: Error): void => { console.error(error); });\n };\n\n let style: any = {\n height: this._calculator.turnCircleSizeCss,\n transform: \"rotate(0)\", // apply transform to preserve 3D\n width: this._calculator.turnCircleSizeCss,\n };\n\n switch (direction) {\n case EdgeDirection.TurnLeft:\n style.left = \"5px\";\n style.top = \"5px\";\n break;\n case EdgeDirection.TurnRight:\n style.right = \"5px\";\n style.top = \"5px\";\n break;\n case EdgeDirection.TurnU:\n style.left = \"5px\";\n style.bottom = \"5px\";\n break;\n default:\n break;\n }\n\n let circleProperties: vd.createProperties = {\n attributes: {\n \"data-key\": key,\n },\n onclick: onClick,\n style: style,\n };\n\n let circleClassName: string = \"TurnCircle\";\n\n if (this._sequenceEdgeKeys.indexOf(key) > -1) {\n circleClassName += \"Sequence\";\n }\n\n if (this._highlightKey === key) {\n circleClassName += \"Highlight\";\n }\n\n let turn: vd.VNode = vd.h(`div.${className}`, {}, []);\n\n return vd.h(\"div.\" + circleClassName, circleProperties, [turn]);\n }\n\n private _createVNodeDisabled(key: string, azimuth: number, rotation: IRotation): vd.VNode {\n return this._createVNode(\n key,\n azimuth,\n rotation,\n this._calculator.outerRadius,\n \"DirectionsArrowDisabled\",\n \"DirectionsCircleDisabled\");\n }\n\n private _createVNode(\n key: string,\n azimuth: number,\n rotation: IRotation,\n radius: number,\n className: string,\n circleClassName: string,\n onClick?: (e: Event) => void,\n shiftVertically?: boolean): vd.VNode {\n\n let translation: Array<number> = this._calculator.angleToCoordinates(azimuth - rotation.phi);\n\n // rotate 90 degrees clockwise and flip over X-axis\n let translationX: number = Math.round(-radius * translation[1] + 0.5 * this._calculator.containerWidth);\n let translationY: number = Math.round(-radius * translation[0] + 0.5 * this._calculator.containerHeight);\n\n let shadowTranslation: Array<number> = this._calculator.relativeAngleToCoordiantes(azimuth, rotation.phi);\n let shadowOffset: number = this._calculator.shadowOffset;\n let shadowTranslationX: number = -shadowOffset * shadowTranslation[1];\n let shadowTranslationY: number = shadowOffset * shadowTranslation[0];\n\n let filter: string = `drop-shadow(${shadowTranslationX}px ${shadowTranslationY}px 1px rgba(0,0,0,0.8))`;\n\n let properties: vd.createProperties = {\n style: {\n \"-webkit-filter\": filter,\n filter: filter,\n },\n };\n\n let chevron: vd.VNode = vd.h(\"div.\" + className, properties, []);\n\n let azimuthDeg: number = -this._spatial.radToDeg(azimuth - rotation.phi);\n let circleTransform: string = shiftVertically ?\n `translate(${translationX}px, ${translationY}px) rotate(${azimuthDeg}deg) translateZ(-0.01px)` :\n `translate(${translationX}px, ${translationY}px) rotate(${azimuthDeg}deg)`;\n\n let circleProperties: vd.createProperties = {\n attributes: { \"data-key\": key },\n onclick: onClick,\n style: {\n height: this._calculator.stepCircleSizeCss,\n marginLeft: this._calculator.stepCircleMarginCss,\n marginTop: this._calculator.stepCircleMarginCss,\n transform: circleTransform,\n width: this._calculator.stepCircleSizeCss,\n },\n };\n\n if (this._sequenceEdgeKeys.indexOf(key) > -1) {\n circleClassName += \"Sequence\";\n }\n\n if (this._highlightKey === key) {\n circleClassName += \"Highlight\";\n }\n\n return vd.h(\"div.\" + circleClassName, circleProperties, [chevron]);\n }\n\n private _getContainer(\n steps: vd.VNode[],\n turns: vd.VNode[],\n rotation: IRotation): vd.VNode {\n\n // edge does not handle hover on perspective transforms.\n let transform: string = this._isEdge ?\n \"rotateX(60deg)\" :\n `perspective(${this._calculator.containerWidthCss}) rotateX(60deg)`;\n\n let properties: vd.createProperties = {\n oncontextmenu: (event: MouseEvent): void => { event.preventDefault(); },\n style: {\n bottom: this._calculator.containerBottomCss,\n height: this._calculator.containerHeightCss,\n left: this._calculator.containerLeftCss,\n marginLeft: this._calculator.containerMarginCss,\n transform: transform,\n width: this._calculator.containerWidthCss,\n },\n };\n\n return vd.h(\"div.DirectionsPerspective\", properties, turns.concat(steps));\n }\n}\n\nexport default DirectionDOMRenderer;\n",
- "import {Observable} from \"rxjs/Observable\";\nimport {Subscription} from \"rxjs/Subscription\";\nimport {Subject} from \"rxjs/Subject\";\n\nimport \"rxjs/add/operator/catch\";\nimport \"rxjs/add/operator/combineLatest\";\nimport \"rxjs/add/operator/debounceTime\";\nimport \"rxjs/add/operator/distinctUntilChanged\";\nimport \"rxjs/add/operator/filter\";\nimport \"rxjs/add/operator/map\";\nimport \"rxjs/add/operator/pairwise\";\nimport \"rxjs/add/operator/publish\";\nimport \"rxjs/add/operator/publishReplay\";\nimport \"rxjs/add/operator/scan\";\nimport \"rxjs/add/operator/skipWhile\";\nimport \"rxjs/add/operator/startWith\";\nimport \"rxjs/add/operator/switchMap\";\nimport \"rxjs/add/operator/takeUntil\";\nimport \"rxjs/add/operator/withLatestFrom\";\n\nimport {\n ComponentService,\n Component,\n IImagePlaneConfiguration,\n ImagePlaneGLRenderer,\n} from \"../../Component\";\nimport {\n Transform,\n} from \"../../Geo\";\nimport {\n ICurrentState,\n IFrame,\n} from \"../../State\";\nimport {\n Container,\n Navigator,\n ImageSize,\n} from \"../../Viewer\";\nimport {\n GLRenderStage,\n IGLRenderHash,\n ISize,\n RenderCamera,\n} from \"../../Render\";\nimport {Node} from \"../../Graph\";\nimport {\n ImageTileLoader,\n ImageTileStore,\n IRegionOfInterest,\n RegionOfInterestCalculator,\n TextureProvider,\n} from \"../../Tiles\";\nimport {\n Settings,\n Urls,\n} from \"../../Utils\";\n\ninterface IImagePlaneGLRendererOperation {\n (renderer: ImagePlaneGLRenderer): ImagePlaneGLRenderer;\n}\n\ntype PositionLookat = [THREE.Vector3, THREE.Vector3, number];\n\nexport class ImagePlaneComponent extends Component<IImagePlaneConfiguration> {\n public static componentName: string = \"imagePlane\";\n\n private _rendererOperation$: Subject<IImagePlaneGLRendererOperation>;\n private _renderer$: Observable<ImagePlaneGLRenderer>;\n private _rendererCreator$: Subject<void>;\n private _rendererDisposer$: Subject<void>;\n\n private _abortTextureProviderSubscription: Subscription;\n private _hasTextureSubscription: Subscription;\n private _rendererSubscription: Subscription;\n private _setRegionOfInterestSubscription: Subscription;\n private _setTextureProviderSubscription: Subscription;\n private _stateSubscription: Subscription;\n private _textureProviderSubscription: Subscription;\n private _updateBackgroundSubscription: Subscription;\n private _updateTextureImageSubscription: Subscription;\n\n private _imageTileLoader: ImageTileLoader;\n private _roiCalculator: RegionOfInterestCalculator;\n\n constructor (name: string, container: Container, navigator: Navigator) {\n super(name, container, navigator);\n\n this._imageTileLoader = new ImageTileLoader(Urls.tileScheme, Urls.tileDomain, Urls.origin);\n this._roiCalculator = new RegionOfInterestCalculator();\n\n this._rendererOperation$ = new Subject<IImagePlaneGLRendererOperation>();\n this._rendererCreator$ = new Subject<void>();\n this._rendererDisposer$ = new Subject<void>();\n\n this._renderer$ = this._rendererOperation$\n .scan(\n (renderer: ImagePlaneGLRenderer, operation: IImagePlaneGLRendererOperation): ImagePlaneGLRenderer => {\n return operation(renderer);\n },\n null)\n .filter(\n (renderer: ImagePlaneGLRenderer): boolean => {\n return renderer != null;\n })\n .distinctUntilChanged(\n undefined,\n (renderer: ImagePlaneGLRenderer): number => {\n return renderer.frameId;\n });\n\n this._rendererCreator$\n .map(\n (): IImagePlaneGLRendererOperation => {\n return (renderer: ImagePlaneGLRenderer): ImagePlaneGLRenderer => {\n if (renderer != null) {\n throw new Error(\"Multiple image plane states can not be created at the same time\");\n }\n\n return new ImagePlaneGLRenderer();\n };\n })\n .subscribe(this._rendererOperation$);\n\n this._rendererDisposer$\n .map(\n (): IImagePlaneGLRendererOperation => {\n return (renderer: ImagePlaneGLRenderer): ImagePlaneGLRenderer => {\n renderer.dispose();\n\n return null;\n };\n })\n .subscribe(this._rendererOperation$);\n }\n\n protected _activate(): void {\n this._rendererSubscription = this._renderer$\n .map(\n (renderer: ImagePlaneGLRenderer): IGLRenderHash => {\n let renderHash: IGLRenderHash = {\n name: this._name,\n render: {\n frameId: renderer.frameId,\n needsRender: renderer.needsRender,\n render: renderer.render.bind(renderer),\n stage: GLRenderStage.Background,\n },\n };\n\n renderer.clearNeedsRender();\n\n return renderHash;\n })\n .subscribe(this._container.glRenderer.render$);\n\n this._rendererCreator$.next(null);\n\n this._stateSubscription = this._navigator.stateService.currentState$\n .map(\n (frame: IFrame): IImagePlaneGLRendererOperation => {\n return (renderer: ImagePlaneGLRenderer): ImagePlaneGLRenderer => {\n renderer.updateFrame(frame);\n\n return renderer;\n };\n })\n .subscribe(this._rendererOperation$);\n\n let textureProvider$: Observable<TextureProvider> = this._navigator.stateService.currentState$\n .distinctUntilChanged(\n undefined,\n (frame: IFrame): string => {\n return frame.state.currentNode.key;\n })\n .combineLatest(this._configuration$)\n .filter(\n (args: [IFrame, IImagePlaneConfiguration]): boolean => {\n return args[1].imageTiling === true;\n })\n .map(\n (args: [IFrame, IImagePlaneConfiguration]): IFrame => {\n return args[0];\n })\n .withLatestFrom(\n this._container.glRenderer.webGLRenderer$,\n this._container.renderService.size$)\n .map(\n (args: [IFrame, THREE.WebGLRenderer, ISize]): TextureProvider => {\n let state: ICurrentState = args[0].state;\n let renderer: THREE.WebGLRenderer = args[1];\n let viewportSize: ISize = args[2];\n\n let currentNode: Node = state.currentNode;\n let currentTransform: Transform = state.currentTransform;\n let tileSize: number = Math.max(viewportSize.width, viewportSize.height) > 1024 ? 1024 : 512;\n\n return new TextureProvider(\n currentNode.key,\n currentTransform.basicWidth,\n currentTransform.basicHeight,\n tileSize,\n currentNode.image,\n this._imageTileLoader,\n new ImageTileStore(),\n renderer);\n })\n .publishReplay(1)\n .refCount();\n\n this._textureProviderSubscription = textureProvider$.subscribe(() => { /*noop*/ });\n\n this._setTextureProviderSubscription = textureProvider$\n .map(\n (provider: TextureProvider): IImagePlaneGLRendererOperation => {\n return (renderer: ImagePlaneGLRenderer): ImagePlaneGLRenderer => {\n renderer.setTextureProvider(provider.key, provider);\n\n return renderer;\n };\n })\n .subscribe(this._rendererOperation$);\n\n this._abortTextureProviderSubscription = textureProvider$\n .pairwise()\n .subscribe(\n (pair: [TextureProvider, TextureProvider]): void => {\n let previous: TextureProvider = pair[0];\n previous.abort();\n });\n\n let roiTrigger$: Observable<[RenderCamera, ISize, Transform]> = this._container.renderService.renderCameraFrame$\n .map(\n (renderCamera: RenderCamera): PositionLookat => {\n return [\n renderCamera.camera.position.clone(),\n renderCamera.camera.lookat.clone(),\n renderCamera.zoom.valueOf()];\n })\n .pairwise()\n .skipWhile(\n (pls: [PositionLookat, PositionLookat]): boolean => {\n return pls[1][2] - pls[0][2] < 0 || pls[1][2] === 0;\n })\n .map(\n (pls: [PositionLookat, PositionLookat]): boolean => {\n let samePosition: boolean = pls[0][0].equals(pls[1][0]);\n let sameLookat: boolean = pls[0][1].equals(pls[1][1]);\n let sameZoom: boolean = pls[0][2] === pls[1][2];\n\n return samePosition && sameLookat && sameZoom;\n })\n .distinctUntilChanged()\n .filter(\n (stalled: boolean): boolean => {\n return stalled;\n })\n .switchMap(\n (stalled: boolean): Observable<RenderCamera> => {\n return this._container.renderService.renderCameraFrame$\n .first();\n })\n .withLatestFrom(\n this._container.renderService.size$,\n this._navigator.stateService.currentTransform$);\n\n this._setRegionOfInterestSubscription = textureProvider$\n .switchMap(\n (provider: TextureProvider): Observable<[IRegionOfInterest, TextureProvider]> => {\n return roiTrigger$\n .map(\n (args: [RenderCamera, ISize, Transform]): [IRegionOfInterest, TextureProvider] => {\n return [\n this._roiCalculator.computeRegionOfInterest(args[0], args[1], args[2]),\n provider,\n ];\n });\n })\n .filter(\n (args: [IRegionOfInterest, TextureProvider]): boolean => {\n return !args[1].disposed;\n })\n .subscribe(\n (args: [IRegionOfInterest, TextureProvider]): void => {\n let roi: IRegionOfInterest = args[0];\n let provider: TextureProvider = args[1];\n\n provider.setRegionOfInterest(roi);\n });\n\n let hasTexture$: Observable<boolean> = textureProvider$\n .switchMap(\n (provider: TextureProvider): Observable<boolean> => {\n return provider.hasTexture$;\n })\n .startWith(false)\n .publishReplay(1)\n .refCount();\n\n this._hasTextureSubscription = hasTexture$.subscribe(() => { /*noop*/ });\n\n let nodeImage$: Observable<[HTMLImageElement, Node]> = this._navigator.stateService.currentNode$\n .debounceTime(1000)\n .withLatestFrom(hasTexture$)\n .filter(\n (args: [Node, boolean]): boolean => {\n return !args[1];\n })\n .map(\n (args: [Node, boolean]): Node => {\n return args[0];\n })\n .filter(\n (node: Node): boolean => {\n return node.pano ?\n Settings.maxImageSize > Settings.basePanoramaSize :\n Settings.maxImageSize > Settings.baseImageSize;\n })\n .switchMap(\n (node: Node): Observable<[HTMLImageElement, Node]> => {\n let baseImageSize: ImageSize = node.pano ?\n Settings.basePanoramaSize :\n Settings.baseImageSize;\n\n if (Math.max(node.image.width, node.image.height) > baseImageSize) {\n return Observable.empty<[HTMLImageElement, Node]>();\n }\n\n let image$: Observable<[HTMLImageElement, Node]> = node\n .cacheImage$(Settings.maxImageSize)\n .map(\n (n: Node): [HTMLImageElement, Node] => {\n return [n.image, n];\n });\n\n return image$\n .takeUntil(\n hasTexture$\n .filter(\n (hasTexture: boolean): boolean => {\n\n return hasTexture;\n }))\n .catch(\n (error: Error, caught: Observable<[HTMLImageElement, Node]>):\n Observable<[HTMLImageElement, Node]> => {\n console.error(`Failed to fetch high res image (${node.key})`, error);\n\n return Observable.empty<[HTMLImageElement, Node]>();\n });\n })\n .publish()\n .refCount();\n\n this._updateBackgroundSubscription = nodeImage$\n .withLatestFrom(textureProvider$)\n .subscribe(\n (args: [[HTMLImageElement, Node], TextureProvider]): void => {\n if (args[0][1].key !== args[1].key ||\n args[1].disposed) {\n return;\n }\n\n args[1].updateBackground(args[0][0]);\n });\n\n this._updateTextureImageSubscription = nodeImage$\n .map(\n (imn: [HTMLImageElement, Node]): IImagePlaneGLRendererOperation => {\n return (renderer: ImagePlaneGLRenderer): ImagePlaneGLRenderer => {\n renderer.updateTextureImage(imn[0], imn[1]);\n\n return renderer;\n };\n })\n .subscribe(this._rendererOperation$);\n }\n\n protected _deactivate(): void {\n this._rendererDisposer$.next(null);\n\n this._abortTextureProviderSubscription.unsubscribe();\n this._hasTextureSubscription.unsubscribe();\n this._rendererSubscription.unsubscribe();\n this._setRegionOfInterestSubscription.unsubscribe();\n this._setTextureProviderSubscription.unsubscribe();\n this._stateSubscription.unsubscribe();\n this._textureProviderSubscription.unsubscribe();\n this._updateBackgroundSubscription.unsubscribe();\n this._updateTextureImageSubscription.unsubscribe();\n }\n\n protected _getDefaultConfiguration(): IImagePlaneConfiguration {\n return { imageTiling: false };\n }\n}\n\nComponentService.register(ImagePlaneComponent);\nexport default ImagePlaneComponent;\n",
- "/// <reference path=\"../../../typings/index.d.ts\" />\n\nimport * as THREE from \"three\";\n\nimport {IGPano} from \"../../API\";\nimport {Transform} from \"../../Geo\";\nimport {Node} from \"../../Graph\";\nimport {ImagePlaneShaders} from \"../../Component\";\n\nexport class ImagePlaneFactory {\n private _imagePlaneDepth: number;\n private _imageSphereRadius: number;\n\n constructor(imagePlaneDepth?: number, imageSphereRadius?: number) {\n this._imagePlaneDepth = imagePlaneDepth != null ? imagePlaneDepth : 200;\n this._imageSphereRadius = imageSphereRadius != null ? imageSphereRadius : 200;\n }\n\n public createMesh(node: Node, transform: Transform): THREE.Mesh {\n let mesh: THREE.Mesh = node.pano ?\n this._createImageSphere(node, transform) :\n this._createImagePlane(node, transform);\n\n return mesh;\n }\n\n private _createImageSphere(node: Node, transform: Transform): THREE.Mesh {\n let texture: THREE.Texture = this._createTexture(node.image);\n let materialParameters: THREE.ShaderMaterialParameters = this._createSphereMaterialParameters(transform, texture);\n let material: THREE.ShaderMaterial = new THREE.ShaderMaterial(materialParameters);\n\n let mesh: THREE.Mesh = this._useMesh(transform, node) ?\n new THREE.Mesh(this._getImageSphereGeo(transform, node), material) :\n new THREE.Mesh(this._getFlatImageSphereGeo(transform), material);\n\n return mesh;\n }\n\n private _createImagePlane(node: Node, transform: Transform): THREE.Mesh {\n let texture: THREE.Texture = this._createTexture(node.image);\n let materialParameters: THREE.ShaderMaterialParameters = this._createPlaneMaterialParameters(transform, texture);\n let material: THREE.ShaderMaterial = new THREE.ShaderMaterial(materialParameters);\n\n let geometry: THREE.BufferGeometry = this._useMesh(transform, node) ?\n this._getImagePlaneGeo(transform, node) :\n this._getFlatImagePlaneGeo(transform);\n\n return new THREE.Mesh(geometry, material);\n }\n\n private _createSphereMaterialParameters(transform: Transform, texture: THREE.Texture): THREE.ShaderMaterialParameters {\n let gpano: IGPano = transform.gpano;\n\n let halfCroppedWidth: number = (gpano.FullPanoWidthPixels - gpano.CroppedAreaImageWidthPixels) / 2;\n let phiShift: number = 2 * Math.PI * (gpano.CroppedAreaLeftPixels - halfCroppedWidth) / gpano.FullPanoWidthPixels;\n let phiLength: number = 2 * Math.PI * gpano.CroppedAreaImageWidthPixels / gpano.FullPanoWidthPixels;\n\n let halfCroppedHeight: number = (gpano.FullPanoHeightPixels - gpano.CroppedAreaImageHeightPixels) / 2;\n let thetaShift: number = Math.PI * (halfCroppedHeight - gpano.CroppedAreaTopPixels) / gpano.FullPanoHeightPixels;\n let thetaLength: number = Math.PI * gpano.CroppedAreaImageHeightPixels / gpano.FullPanoHeightPixels;\n\n let materialParameters: THREE.ShaderMaterialParameters = {\n depthWrite: false,\n fragmentShader: ImagePlaneShaders.equirectangular.fragment,\n side: THREE.DoubleSide,\n transparent: true,\n uniforms: {\n opacity: {\n type: \"f\",\n value: 1,\n },\n phiLength: {\n type: \"f\",\n value: phiLength,\n },\n phiShift: {\n type: \"f\",\n value: phiShift,\n },\n projectorMat: {\n type: \"m4\",\n value: transform.rt,\n },\n projectorTex: {\n type: \"t\",\n value: texture,\n },\n thetaLength: {\n type: \"f\",\n value: thetaLength,\n },\n thetaShift: {\n type: \"f\",\n value: thetaShift,\n },\n },\n vertexShader: ImagePlaneShaders.equirectangular.vertex,\n };\n\n return materialParameters;\n }\n\n private _createPlaneMaterialParameters(transform: Transform, texture: THREE.Texture): THREE.ShaderMaterialParameters {\n let materialParameters: THREE.ShaderMaterialParameters = {\n depthWrite: false,\n fragmentShader: ImagePlaneShaders.perspective.fragment,\n side: THREE.DoubleSide,\n transparent: true,\n uniforms: {\n bbox: {\n type: \"v4\",\n value: new THREE.Vector4(0, 0, 1, 1),\n },\n opacity: {\n type: \"f\",\n value: 1,\n },\n projectorMat: {\n type: \"m4\",\n value: transform.projectorMatrix(),\n },\n projectorTex: {\n type: \"t\",\n value: texture,\n },\n },\n vertexShader: ImagePlaneShaders.perspective.vertex,\n };\n\n return materialParameters;\n }\n\n private _createTexture(image: HTMLImageElement): THREE.Texture {\n let texture: THREE.Texture = new THREE.Texture(image);\n texture.minFilter = THREE.LinearFilter;\n texture.needsUpdate = true;\n\n return texture;\n }\n\n private _useMesh(transform: Transform, node: Node): boolean {\n return node.mesh.vertices.length && transform.hasValidScale;\n }\n\n private _getImageSphereGeo(transform: Transform, node: Node): THREE.BufferGeometry {\n let t: THREE.Matrix4 = new THREE.Matrix4().getInverse(transform.srt);\n\n // push everything at least 5 meters in front of the camera\n let minZ: number = 5.0 * transform.scale;\n let maxZ: number = this._imageSphereRadius * transform.scale;\n\n let vertices: number[] = node.mesh.vertices;\n let numVertices: number = vertices.length / 3;\n let positions: Float32Array = new Float32Array(vertices.length);\n for (let i: number = 0; i < numVertices; ++i) {\n let index: number = 3 * i;\n let x: number = vertices[index + 0];\n let y: number = vertices[index + 1];\n let z: number = vertices[index + 2];\n\n let l: number = Math.sqrt(x * x + y * y + z * z);\n let boundedL: number = Math.max(minZ, Math.min(l, maxZ));\n let factor: number = boundedL / l;\n let p: THREE.Vector3 = new THREE.Vector3(x * factor, y * factor, z * factor);\n\n p.applyMatrix4(t);\n\n positions[index + 0] = p.x;\n positions[index + 1] = p.y;\n positions[index + 2] = p.z;\n }\n\n let faces: number[] = node.mesh.faces;\n let indices: Uint16Array = new Uint16Array(faces.length);\n for (let i: number = 0; i < faces.length; ++i) {\n indices[i] = faces[i];\n }\n\n let geometry: THREE.BufferGeometry = new THREE.BufferGeometry();\n\n geometry.addAttribute(\"position\", new THREE.BufferAttribute(positions, 3));\n geometry.setIndex(new THREE.BufferAttribute(indices, 1));\n\n return geometry;\n }\n\n private _getImagePlaneGeo(transform: Transform, node: Node): THREE.BufferGeometry {\n let t: THREE.Matrix4 = new THREE.Matrix4().getInverse(transform.srt);\n\n // push everything at least 5 meters in front of the camera\n let minZ: number = 5.0 * transform.scale;\n let maxZ: number = this._imagePlaneDepth * transform.scale;\n\n let vertices: number[] = node.mesh.vertices;\n let numVertices: number = vertices.length / 3;\n let positions: Float32Array = new Float32Array(vertices.length);\n for (let i: number = 0; i < numVertices; ++i) {\n let index: number = 3 * i;\n let x: number = vertices[index + 0];\n let y: number = vertices[index + 1];\n let z: number = vertices[index + 2];\n\n let boundedZ: number = Math.max(minZ, Math.min(z, maxZ));\n let factor: number = boundedZ / z;\n let p: THREE.Vector3 = new THREE.Vector3(x * factor, y * factor, boundedZ);\n\n p.applyMatrix4(t);\n\n positions[index + 0] = p.x;\n positions[index + 1] = p.y;\n positions[index + 2] = p.z;\n }\n\n let faces: number[] = node.mesh.faces;\n let indices: Uint16Array = new Uint16Array(faces.length);\n for (let i: number = 0; i < faces.length; ++i) {\n indices[i] = faces[i];\n }\n\n let geometry: THREE.BufferGeometry = new THREE.BufferGeometry();\n\n geometry.addAttribute(\"position\", new THREE.BufferAttribute(positions, 3));\n geometry.setIndex(new THREE.BufferAttribute(indices, 1));\n\n return geometry;\n }\n\n private _getFlatImageSphereGeo(transform: Transform): THREE.Geometry {\n let gpano: IGPano = transform.gpano;\n let phiStart: number = 2 * Math.PI * gpano.CroppedAreaLeftPixels / gpano.FullPanoWidthPixels;\n let phiLength: number = 2 * Math.PI * gpano.CroppedAreaImageWidthPixels / gpano.FullPanoWidthPixels;\n let thetaStart: number = Math.PI *\n (gpano.FullPanoHeightPixels - gpano.CroppedAreaImageHeightPixels - gpano.CroppedAreaTopPixels) /\n gpano.FullPanoHeightPixels;\n let thetaLength: number = Math.PI * gpano.CroppedAreaImageHeightPixels / gpano.FullPanoHeightPixels;\n let geometry: THREE.SphereGeometry = new THREE.SphereGeometry(\n this._imageSphereRadius,\n 20,\n 40,\n phiStart - Math.PI / 2,\n phiLength,\n thetaStart,\n thetaLength);\n\n geometry.applyMatrix(new THREE.Matrix4().getInverse(transform.rt));\n\n return geometry;\n }\n\n private _getFlatImagePlaneGeo(transform: Transform): THREE.BufferGeometry {\n let width: number = transform.width;\n let height: number = transform.height;\n let size: number = Math.max(width, height);\n let dx: number = width / 2.0 / size;\n let dy: number = height / 2.0 / size;\n\n let vertices: number[][] = [];\n vertices.push(transform.unprojectSfM([-dx, -dy], this._imagePlaneDepth));\n vertices.push(transform.unprojectSfM([dx, -dy], this._imagePlaneDepth));\n vertices.push(transform.unprojectSfM([dx, dy], this._imagePlaneDepth));\n vertices.push(transform.unprojectSfM([-dx, dy], this._imagePlaneDepth));\n\n let positions: Float32Array = new Float32Array(12);\n for (let i: number = 0; i < vertices.length; i++) {\n let index: number = 3 * i;\n positions[index + 0] = vertices[i][0];\n positions[index + 1] = vertices[i][1];\n positions[index + 2] = vertices[i][2];\n }\n\n let indices: Uint16Array = new Uint16Array(6);\n indices[0] = 0;\n indices[1] = 1;\n indices[2] = 3;\n indices[3] = 1;\n indices[4] = 2;\n indices[5] = 3;\n\n let geometry: THREE.BufferGeometry = new THREE.BufferGeometry();\n\n geometry.addAttribute(\"position\", new THREE.BufferAttribute(positions, 3));\n geometry.setIndex(new THREE.BufferAttribute(indices, 1));\n\n return geometry;\n }\n}\n\nexport default ImagePlaneFactory;\n",
- "/// <reference path=\"../../../typings/index.d.ts\" />\n\nimport * as THREE from \"three\";\n\nimport {Subscription} from \"rxjs/Subscription\";\n\nimport {\n ImagePlaneScene,\n ImagePlaneFactory,\n IShaderMaterial,\n} from \"../../Component\";\nimport {Camera} from \"../../Geo\";\nimport {Node} from \"../../Graph\";\nimport {\n ICurrentState,\n IFrame,\n} from \"../../State\";\nimport {TextureProvider} from \"../../Tiles\";\n\nexport class ImagePlaneGLRenderer {\n private _imagePlaneFactory: ImagePlaneFactory;\n private _imagePlaneScene: ImagePlaneScene;\n\n private _alpha: number;\n private _alphaOld: number;\n private _fadeOutSpeed: number;\n private _lastCamera: Camera;\n private _epsilon: number;\n\n private _currentKey: string;\n private _previousKey: string;\n private _providerDisposers: { [key: string]: () => void };\n\n private _frameId: number;\n private _needsRender: boolean;\n\n constructor() {\n this._imagePlaneFactory = new ImagePlaneFactory();\n this._imagePlaneScene = new ImagePlaneScene();\n\n this._alpha = 0;\n this._alphaOld = 0;\n this._fadeOutSpeed = 0.05;\n this._lastCamera = new Camera();\n this._epsilon = 0.000001;\n\n this._currentKey = null;\n this._previousKey = null;\n this._providerDisposers = {};\n\n this._frameId = 0;\n this._needsRender = false;\n }\n\n public get frameId(): number {\n return this._frameId;\n }\n\n public get needsRender(): boolean {\n return this._needsRender;\n }\n\n public indicateNeedsRender(): void {\n this._needsRender = true;\n }\n\n public updateFrame(frame: IFrame): void {\n this._updateFrameId(frame.id);\n this._needsRender = this._updateAlpha(frame.state.alpha) || this._needsRender;\n this._needsRender = this._updateAlphaOld(frame.state.alpha) || this._needsRender;\n this._needsRender = this._updateImagePlanes(frame.state) || this._needsRender;\n }\n\n public setTextureProvider(key: string, provider: TextureProvider): void {\n if (key !== this._currentKey) {\n return;\n }\n\n let createdSubscription: Subscription = provider.textureCreated$\n .subscribe(\n (texture: THREE.Texture): void => {\n this._updateTexture(texture);\n });\n\n let updatedSubscription: Subscription = provider.textureUpdated$\n .subscribe(\n (updated: boolean): void => {\n this._needsRender = true;\n });\n\n let dispose: () => void = (): void => {\n createdSubscription.unsubscribe();\n updatedSubscription.unsubscribe();\n provider.dispose();\n };\n\n if (key in this._providerDisposers) {\n let disposeProvider: () => void = this._providerDisposers[key];\n disposeProvider();\n\n delete this._providerDisposers[key];\n }\n\n this._providerDisposers[key] = dispose;\n }\n\n public _updateTexture(texture: THREE.Texture): void {\n this._needsRender = true;\n\n for (let plane of this._imagePlaneScene.imagePlanes) {\n let material: IShaderMaterial = <IShaderMaterial>plane.material;\n\n let oldTexture: THREE.Texture = <THREE.Texture>material.uniforms.projectorTex.value;\n material.uniforms.projectorTex.value = null;\n oldTexture.dispose();\n\n material.uniforms.projectorTex.value = texture;\n }\n }\n\n public updateTextureImage(image: HTMLImageElement, node?: Node): void {\n if (this._currentKey !== node.key) {\n return;\n }\n\n this._needsRender = true;\n\n for (let plane of this._imagePlaneScene.imagePlanes) {\n let material: IShaderMaterial = <IShaderMaterial>plane.material;\n let texture: THREE.Texture = <THREE.Texture>material.uniforms.projectorTex.value;\n\n texture.image = image;\n texture.needsUpdate = true;\n }\n }\n\n public render(\n perspectiveCamera: THREE.PerspectiveCamera,\n renderer: THREE.WebGLRenderer): void {\n let planeAlpha: number = this._imagePlaneScene.imagePlanesOld.length ? 1 : this._alpha;\n\n for (let plane of this._imagePlaneScene.imagePlanes) {\n (<IShaderMaterial>plane.material).uniforms.opacity.value = planeAlpha;\n }\n\n for (let plane of this._imagePlaneScene.imagePlanesOld) {\n (<IShaderMaterial>plane.material).uniforms.opacity.value = this._alphaOld;\n }\n\n renderer.render(this._imagePlaneScene.scene, perspectiveCamera);\n renderer.render(this._imagePlaneScene.sceneOld, perspectiveCamera);\n\n for (let plane of this._imagePlaneScene.imagePlanes) {\n (<IShaderMaterial>plane.material).uniforms.opacity.value = this._alpha;\n }\n\n renderer.render(this._imagePlaneScene.scene, perspectiveCamera);\n }\n\n public clearNeedsRender(): void {\n this._needsRender = false;\n }\n\n public dispose(): void {\n this._imagePlaneScene.clear();\n }\n\n private _updateFrameId(frameId: number): void {\n this._frameId = frameId;\n }\n\n private _updateAlpha(alpha: number): boolean {\n if (alpha === this._alpha) {\n return false;\n }\n\n this._alpha = alpha;\n\n return true;\n }\n\n private _updateAlphaOld(alpha: number): boolean {\n if (alpha < 1 || this._alphaOld === 0) {\n return false;\n }\n\n this._alphaOld = Math.max(0, this._alphaOld - this._fadeOutSpeed);\n\n return true;\n }\n\n private _updateImagePlanes(state: ICurrentState): boolean {\n if (state.currentNode == null || state.currentNode.key === this._currentKey) {\n return false;\n }\n\n let previousKey: string = state.previousNode != null ? state.previousNode.key : null;\n let currentKey: string = state.currentNode.key;\n\n if (this._previousKey !== previousKey &&\n this._previousKey !== currentKey &&\n this._previousKey in this._providerDisposers) {\n\n let disposeProvider: () => void = this._providerDisposers[this._previousKey];\n disposeProvider();\n\n delete this._providerDisposers[this._previousKey];\n }\n\n if (previousKey != null) {\n if (previousKey !== this._currentKey && previousKey !== this._previousKey) {\n let previousMesh: THREE.Mesh =\n this._imagePlaneFactory.createMesh(state.previousNode, state.previousTransform);\n\n this._imagePlaneScene.updateImagePlanes([previousMesh]);\n }\n\n this._previousKey = previousKey;\n }\n\n this._currentKey = currentKey;\n let currentMesh: THREE.Mesh =\n this._imagePlaneFactory.createMesh(state.currentNode, state.currentTransform);\n\n this._imagePlaneScene.updateImagePlanes([currentMesh]);\n\n this._alphaOld = 1;\n\n return true;\n }\n}\n\nexport default ImagePlaneGLRenderer;\n",
- "/// <reference path=\"../../../typings/index.d.ts\" />\n\nimport * as THREE from \"three\";\n\nimport {IShaderMaterial} from \"../../Component\";\n\nexport class ImagePlaneScene {\n public scene: THREE.Scene;\n public sceneOld: THREE.Scene;\n\n public imagePlanes: THREE.Mesh[];\n public imagePlanesOld: THREE.Mesh[];\n\n constructor() {\n this.scene = new THREE.Scene();\n this.sceneOld = new THREE.Scene();\n\n this.imagePlanes = [];\n this.imagePlanesOld = [];\n }\n\n public updateImagePlanes(planes: THREE.Mesh[]): void {\n this._dispose(this.imagePlanesOld, this.sceneOld);\n\n for (let plane of this.imagePlanes) {\n this.scene.remove(plane);\n this.sceneOld.add(plane);\n }\n\n for (let plane of planes) {\n this.scene.add(plane);\n }\n\n this.imagePlanesOld = this.imagePlanes;\n this.imagePlanes = planes;\n }\n\n public addImagePlanes(planes: THREE.Mesh[]): void {\n for (let plane of planes) {\n this.scene.add(plane);\n this.imagePlanes.push(plane);\n }\n }\n\n public addImagePlanesOld(planes: THREE.Mesh[]): void {\n for (let plane of planes) {\n this.sceneOld.add(plane);\n this.imagePlanesOld.push(plane);\n }\n }\n\n public setImagePlanes(planes: THREE.Mesh[]): void {\n this._clear();\n this.addImagePlanes(planes);\n }\n\n public setImagePlanesOld(planes: THREE.Mesh[]): void {\n this._clearOld();\n this.addImagePlanesOld(planes);\n }\n\n public clear(): void {\n this._clear();\n this._clearOld();\n }\n\n private _clear(): void {\n this._dispose(this.imagePlanes, this.scene);\n this.imagePlanes.length = 0;\n }\n\n private _clearOld(): void {\n this._dispose(this.imagePlanesOld, this.sceneOld);\n this.imagePlanesOld.length = 0;\n }\n\n private _dispose(planes: THREE.Mesh[], scene: THREE.Scene): void {\n for (let plane of planes) {\n scene.remove(plane);\n plane.geometry.dispose();\n plane.material.dispose();\n let texture: THREE.Texture = (<IShaderMaterial>plane.material).uniforms.projectorTex.value;\n if (texture != null) {\n texture.dispose();\n }\n }\n }\n}\n\nexport default ImagePlaneScene;\n",
- "/// <reference path=\"../../../typings/index.d.ts\" />\n\nimport * as fs from \"fs\";\nimport * as path from \"path\";\n\nimport {IShader} from \"../../Component\";\n\nexport class ImagePlaneShaders {\n public static equirectangular: IShader = {\n fragment: fs.readFileSync(path.join(__dirname, \"./shaders/equirectangular.fragment.glsl\"), \"utf8\"),\n vertex: fs.readFileSync(path.join(__dirname, \"./shaders/equirectangular.vertex.glsl\"), \"utf8\"),\n };\n public static perspective: IShader = {\n fragment: fs.readFileSync(path.join(__dirname, \"./shaders/perspective.fragment.glsl\"), \"utf8\"),\n vertex: fs.readFileSync(path.join(__dirname, \"./shaders/perspective.vertex.glsl\"), \"utf8\"),\n };\n}\n",
- "/// <reference path=\"../../../typings/index.d.ts\" />\n\nimport * as THREE from \"three\";\n\nimport {Observable} from \"rxjs/Observable\";\nimport {Subscription} from \"rxjs/Subscription\";\nimport {Subject} from \"rxjs/Subject\";\n\nimport \"rxjs/add/observable/combineLatest\";\nimport \"rxjs/add/observable/fromEvent\";\nimport \"rxjs/add/observable/of\";\nimport \"rxjs/add/observable/zip\";\n\nimport \"rxjs/add/operator/distinctUntilChanged\";\nimport \"rxjs/add/operator/filter\";\nimport \"rxjs/add/operator/first\";\nimport \"rxjs/add/operator/map\";\nimport \"rxjs/add/operator/merge\";\nimport \"rxjs/add/operator/mergeMap\";\nimport \"rxjs/add/operator/scan\";\nimport \"rxjs/add/operator/switchMap\";\nimport \"rxjs/add/operator/withLatestFrom\";\nimport \"rxjs/add/operator/zip\";\n\nimport {Node} from \"../../Graph\";\nimport {\n ICurrentState,\n IFrame,\n State,\n} from \"../../State\";\nimport {\n Container,\n ImageSize,\n Navigator,\n} from \"../../Viewer\";\nimport {\n IGLRenderHash,\n GLRenderStage,\n} from \"../../Render\";\nimport {Settings} from \"../../Utils\";\nimport {\n IBBoxShaderMaterial,\n Component,\n ComponentService,\n ImagePlaneScene,\n ImagePlaneFactory,\n ISliderKeys,\n ISliderConfiguration,\n IShaderMaterial,\n} from \"../../Component\";\n\ninterface ISliderNodes {\n background: Node;\n foreground: Node;\n}\n\ninterface ISliderCombination {\n nodes: ISliderNodes;\n state: ICurrentState;\n}\n\ninterface ISliderStateOperation {\n (sliderState: SliderState): SliderState;\n}\n\nclass SliderState {\n private _imagePlaneFactory: ImagePlaneFactory;\n private _imagePlaneScene: ImagePlaneScene;\n\n private _currentKey: string;\n private _previousKey: string;\n private _currentPano: boolean;\n\n private _frameId: number;\n\n private _glNeedsRender: boolean;\n private _domNeedsRender: boolean;\n private _sliderVisible: boolean;\n\n private _curtain: number;\n\n constructor() {\n this._imagePlaneFactory = new ImagePlaneFactory();\n this._imagePlaneScene = new ImagePlaneScene();\n\n this._currentKey = null;\n this._previousKey = null;\n this._currentPano = false;\n\n this._frameId = 0;\n\n this._glNeedsRender = false;\n this._domNeedsRender = true;\n\n this._curtain = 1;\n }\n\n public get frameId(): number {\n return this._frameId;\n }\n\n public get curtain(): number {\n return this._curtain;\n }\n\n public get glNeedsRender(): boolean {\n return this._glNeedsRender;\n }\n\n public get domNeedsRender(): boolean {\n return this._domNeedsRender;\n }\n\n public get sliderVisible(): boolean {\n return this._sliderVisible;\n }\n\n public set sliderVisible(value: boolean) {\n this._sliderVisible = value;\n this._domNeedsRender = true;\n }\n\n public get disabled(): boolean {\n return this._currentKey == null ||\n this._previousKey == null ||\n this._currentPano;\n }\n\n public update(frame: IFrame): void {\n this._updateFrameId(frame.id);\n let needsRender: boolean = this._updateImagePlanes(frame.state);\n\n this._domNeedsRender = needsRender || this._domNeedsRender;\n\n needsRender = this._updateCurtain(frame.state.alpha) || needsRender;\n this._glNeedsRender = needsRender || this._glNeedsRender;\n }\n\n public updateTexture(image: HTMLImageElement, node: Node): void {\n let imagePlanes: THREE.Mesh[] = node.key === this._currentKey ?\n this._imagePlaneScene.imagePlanes :\n node.key === this._previousKey ?\n this._imagePlaneScene.imagePlanesOld :\n [];\n\n if (imagePlanes.length === 0) {\n return;\n }\n\n this._glNeedsRender = true;\n\n for (let plane of imagePlanes) {\n let material: IShaderMaterial = <IShaderMaterial>plane.material;\n let texture: THREE.Texture = <THREE.Texture>material.uniforms.projectorTex.value;\n\n texture.image = image;\n texture.needsUpdate = true;\n }\n }\n\n public render(\n perspectiveCamera: THREE.PerspectiveCamera,\n renderer: THREE.WebGLRenderer): void {\n\n if (!this.disabled) {\n renderer.render(this._imagePlaneScene.sceneOld, perspectiveCamera);\n }\n\n renderer.render(this._imagePlaneScene.scene, perspectiveCamera);\n }\n\n public dispose(): void {\n this._imagePlaneScene.clear();\n }\n\n public clearGLNeedsRender(): void {\n this._glNeedsRender = false;\n }\n\n public clearDomNeedsRender(): void {\n this._domNeedsRender = false;\n }\n\n private _updateFrameId(frameId: number): void {\n this._frameId = frameId;\n }\n\n private _updateImagePlanes(state: ICurrentState): boolean {\n if (state.currentNode == null) {\n return;\n }\n\n let needsRender: boolean = false;\n\n if (state.previousNode != null && this._previousKey !== state.previousNode.key) {\n needsRender = true;\n\n this._previousKey = state.previousNode.key;\n this._imagePlaneScene.setImagePlanesOld([\n this._imagePlaneFactory.createMesh(state.previousNode, state.previousTransform),\n ]);\n }\n\n if (this._currentKey !== state.currentNode.key) {\n needsRender = true;\n\n this._currentKey = state.currentNode.key;\n this._currentPano = state.currentNode.pano;\n this._imagePlaneScene.setImagePlanes([\n this._imagePlaneFactory.createMesh(state.currentNode, state.currentTransform),\n ]);\n\n if (!this.disabled) {\n this._updateBbox();\n }\n }\n\n return needsRender;\n }\n\n private _updateCurtain(alpha: number): boolean {\n if (this.disabled ||\n Math.abs(this._curtain - alpha) < 0.001) {\n return false;\n }\n\n this._curtain = alpha;\n this._updateBbox();\n\n return true;\n }\n\n private _updateBbox(): void {\n for (let plane of this._imagePlaneScene.imagePlanes) {\n let shaderMaterial: IBBoxShaderMaterial = <IBBoxShaderMaterial>plane.material;\n let bbox: THREE.Vector4 = <THREE.Vector4>shaderMaterial.uniforms.bbox.value;\n\n bbox.z = this._curtain;\n }\n }\n}\n\nexport class SliderComponent extends Component<ISliderConfiguration> {\n public static componentName: string = \"slider\";\n\n private _sliderContainer: HTMLDivElement;\n private _sliderWrapper: HTMLDivElement;\n private _sliderControl: HTMLInputElement;\n\n private _moveToHandler: (event: Event) => void;\n\n private _sliderStateOperation$: Subject<ISliderStateOperation>;\n private _sliderState$: Observable<SliderState>;\n private _sliderStateCreator$: Subject<void>;\n private _sliderStateDisposer$: Subject<void>;\n\n private _setKeysSubscription: Subscription;\n private _setSliderVisibleSubscription: Subscription;\n\n private _stateSubscription: Subscription;\n private _glRenderSubscription: Subscription;\n private _domRenderSubscription: Subscription;\n private _nodeSubscription: Subscription;\n\n /**\n * Create a new slider component instance.\n * @class SliderComponent\n */\n constructor (name: string, container: Container, navigator: Navigator) {\n super(name, container, navigator);\n\n this._sliderStateOperation$ = new Subject<ISliderStateOperation>();\n this._sliderStateCreator$ = new Subject<void>();\n this._sliderStateDisposer$ = new Subject<void>();\n\n this._sliderState$ = this._sliderStateOperation$\n .scan(\n (sliderState: SliderState, operation: ISliderStateOperation): SliderState => {\n return operation(sliderState);\n },\n null)\n .filter(\n (sliderState: SliderState): boolean => {\n return sliderState != null;\n })\n .distinctUntilChanged(\n undefined,\n (sliderState: SliderState): number => {\n return sliderState.frameId;\n });\n\n this._sliderStateCreator$\n .map(\n (): ISliderStateOperation => {\n return (sliderState: SliderState): SliderState => {\n if (sliderState != null) {\n throw new Error(\"Multiple slider states can not be created at the same time\");\n }\n\n return new SliderState();\n };\n })\n .subscribe(this._sliderStateOperation$);\n\n this._sliderStateDisposer$\n .map(\n (): ISliderStateOperation => {\n return (sliderState: SliderState): SliderState => {\n sliderState.dispose();\n\n return null;\n };\n })\n .subscribe(this._sliderStateOperation$);\n }\n\n /**\n * Set the image keys.\n *\n * Configures the component to show the image planes for the supplied image keys.\n *\n * @param {keys} ISliderKeys - Slider keys object specifying the images to be shown in the foreground and the background.\n */\n public setKeys(keys: ISliderKeys): void {\n this.configure({ keys: keys });\n }\n\n /**\n * Set the initial position.\n *\n * Configures the intial position of the slider. The inital position value will be used when the component is activated.\n *\n * @param {number} initialPosition - Initial slider position.\n */\n public setInitialPosition(initialPosition: number): void {\n this.configure({ initialPosition: initialPosition });\n }\n\n /**\n * Set the value controlling if the slider is visible.\n *\n * @param {boolean} sliderVisible - Value indicating if the slider should be visible or not.\n */\n public setSliderVisible(sliderVisible: boolean): void {\n this.configure({ sliderVisible: sliderVisible });\n }\n\n protected _activate(): void {\n this._sliderContainer = <HTMLDivElement>this._createElement(\"div\", \"mapillary-js-slider-container\", this._container.element);\n this._sliderWrapper = <HTMLDivElement>this._createElement(\"div\", \"SliderWrapper\", this._sliderContainer);\n this._sliderControl = <HTMLInputElement>this._createElement(\"input\", \"SliderControl\", this._sliderWrapper);\n this._sliderControl.setAttribute(\"type\", \"range\");\n this._sliderControl.setAttribute(\"min\", \"0\");\n this._sliderControl.setAttribute(\"max\", \"1000\");\n this._sliderControl.style.visibility = \"hidden\";\n\n this._moveToHandler = (e: Event): void => {\n const curtain: number = Number((<HTMLInputElement>e.target).value) / 1000;\n this._navigator.stateService.moveTo(curtain);\n };\n\n this._sliderControl.addEventListener(\"input\", this._moveToHandler);\n this._sliderControl.addEventListener(\"change\", this._moveToHandler);\n\n Observable\n .combineLatest<State, ISliderConfiguration>(\n this._navigator.stateService.state$,\n this._configuration$)\n .first()\n .subscribe(\n ([state, configuration]: [State, ISliderConfiguration]): void => {\n if (state === State.Traversing) {\n this._navigator.stateService.wait();\n\n let position: number = configuration.initialPosition != null ? configuration.initialPosition : 1;\n\n this._sliderControl.value = (1000 * position).toString();\n this._navigator.stateService.moveTo(position);\n }\n });\n\n this._glRenderSubscription = this._sliderState$\n .map(\n (sliderState: SliderState): IGLRenderHash => {\n let renderHash: IGLRenderHash = {\n name: this._name,\n render: {\n frameId: sliderState.frameId,\n needsRender: sliderState.glNeedsRender,\n render: sliderState.render.bind(sliderState),\n stage: GLRenderStage.Background,\n },\n };\n\n sliderState.clearGLNeedsRender();\n\n return renderHash;\n })\n .subscribe(this._container.glRenderer.render$);\n\n this._domRenderSubscription = this._sliderState$\n .filter(\n (sliderState: SliderState): boolean => {\n return sliderState.domNeedsRender;\n })\n .subscribe(\n (sliderState: SliderState): void => {\n this._sliderControl.value = (1000 * sliderState.curtain).toString();\n\n const visibility: string = sliderState.disabled || !sliderState.sliderVisible ? \"hidden\" : \"visible\";\n this._sliderControl.style.visibility = visibility;\n\n sliderState.clearDomNeedsRender();\n });\n\n this._sliderStateCreator$.next(null);\n\n this._stateSubscription = this._navigator.stateService.currentState$\n .map(\n (frame: IFrame): ISliderStateOperation => {\n return (sliderState: SliderState): SliderState => {\n sliderState.update(frame);\n\n return sliderState;\n };\n })\n .subscribe(this._sliderStateOperation$);\n\n this._setSliderVisibleSubscription = this._configuration$\n .map(\n (configuration: ISliderConfiguration): boolean => {\n return configuration.sliderVisible == null || configuration.sliderVisible;\n })\n .distinctUntilChanged()\n .map(\n (sliderVisible: boolean): ISliderStateOperation => {\n return (sliderState: SliderState): SliderState => {\n sliderState.sliderVisible = sliderVisible;\n\n return sliderState;\n };\n })\n .subscribe(this._sliderStateOperation$);\n\n this._setKeysSubscription = this._configuration$\n .filter(\n (configuration: ISliderConfiguration): boolean => {\n return configuration.keys != null;\n })\n .switchMap(\n (configuration: ISliderConfiguration): Observable<ISliderCombination> => {\n return Observable\n .zip(\n this._catchCacheNode$(configuration.keys.background),\n this._catchCacheNode$(configuration.keys.foreground))\n .map(\n (nodes: [Node, Node]): ISliderNodes => {\n return { background: nodes[0], foreground: nodes[1] };\n })\n .zip(this._navigator.stateService.currentState$.first())\n .map(\n (nf: [ISliderNodes, IFrame]): ISliderCombination => {\n return { nodes: nf[0], state: nf[1].state };\n });\n })\n .subscribe(\n (co: ISliderCombination): void => {\n if (co.state.currentNode != null &&\n co.state.previousNode != null &&\n co.state.currentNode.key === co.nodes.foreground.key &&\n co.state.previousNode.key === co.nodes.background.key) {\n return;\n }\n\n if (co.state.currentNode.key === co.nodes.background.key) {\n this._navigator.stateService.setNodes([co.nodes.foreground]);\n return;\n }\n\n if (co.state.currentNode.key === co.nodes.foreground.key &&\n co.state.trajectory.length === 1) {\n this._navigator.stateService.prependNodes([co.nodes.background]);\n return;\n }\n\n this._navigator.stateService.setNodes([co.nodes.background]);\n this._navigator.stateService.setNodes([co.nodes.foreground]);\n },\n (e: Error): void => {\n console.error(e);\n });\n\n let previousNode$: Observable<Node> = this._navigator.stateService.currentState$\n .map(\n (frame: IFrame): Node => {\n return frame.state.previousNode;\n })\n .filter(\n (node: Node): boolean => {\n return node != null;\n })\n .distinctUntilChanged(\n undefined,\n (node: Node): string => {\n return node.key;\n });\n\n this._nodeSubscription = Observable\n .merge(\n previousNode$,\n this._navigator.stateService.currentNode$)\n .filter(\n (node: Node): boolean => {\n return node.pano ?\n Settings.maxImageSize > Settings.basePanoramaSize :\n Settings.maxImageSize > Settings.baseImageSize;\n })\n .mergeMap(\n (node: Node): Observable<[HTMLImageElement, Node]> => {\n let baseImageSize: ImageSize = node.pano ?\n Settings.basePanoramaSize :\n Settings.baseImageSize;\n\n if (Math.max(node.image.width, node.image.height) > baseImageSize) {\n return Observable.empty<[HTMLImageElement, Node]>();\n }\n\n return node.cacheImage$(Settings.maxImageSize)\n .map(\n (n: Node): [HTMLImageElement, Node] => {\n return [n.image, n];\n })\n .catch(\n (error: Error, caught: Observable<[HTMLImageElement, Node]>):\n Observable<[HTMLImageElement, Node]> => {\n console.error(`Failed to fetch high res slider image (${node.key})`, error);\n\n return Observable.empty<[HTMLImageElement, Node]>();\n });\n })\n .map(\n ([element, node]: [HTMLImageElement, Node]): ISliderStateOperation => {\n return (sliderState: SliderState): SliderState => {\n sliderState.updateTexture(element, node);\n\n return sliderState;\n };\n })\n .subscribe(this._sliderStateOperation$);\n }\n\n protected _deactivate(): void {\n this._navigator.stateService.state$\n .first()\n .subscribe(\n (state: State): void => {\n if (state === State.Waiting) {\n this._navigator.stateService.traverse();\n }\n });\n\n this._sliderStateDisposer$.next(null);\n\n this._setKeysSubscription.unsubscribe();\n this._setSliderVisibleSubscription.unsubscribe();\n this._stateSubscription.unsubscribe();\n this._glRenderSubscription.unsubscribe();\n this._domRenderSubscription.unsubscribe();\n this._nodeSubscription.unsubscribe();\n\n this.configure({ keys: null });\n\n this._sliderControl.removeEventListener(\"input\", this._moveToHandler);\n this._sliderControl.removeEventListener(\"change\", this._moveToHandler);\n\n this._container.element.removeChild(this._sliderContainer);\n\n this._moveToHandler = null;\n this._sliderControl = null;\n this._sliderWrapper = null;\n this._sliderContainer = null;\n }\n\n protected _getDefaultConfiguration(): ISliderConfiguration {\n return {};\n }\n\n private _catchCacheNode$(key: string): Observable<Node> {\n return this._navigator.graphService.cacheNode$(key)\n .catch(\n (error: Error, caught: Observable<Node>): Observable<Node> => {\n console.error(`Failed to cache slider node (${key})`, error);\n\n return Observable.empty<Node>();\n });\n }\n\n private _createElement(tagName: string, className: string, container: HTMLElement): HTMLElement {\n const element: HTMLElement = document.createElement(tagName);\n\n if (!!className) {\n element.className = className;\n }\n\n if (!!container) {\n container.appendChild(element);\n }\n\n return element;\n }\n}\n\nComponentService.register(SliderComponent);\nexport default SliderComponent;\n",
+ "export {DOM} from \"./utils/DOM\";\nexport {EventEmitter} from \"./utils/EventEmitter\";\nexport {Func} from \"./utils/Func\";\nexport {Settings} from \"./utils/Settings\";\nexport * from \"./utils/Support\";\nexport {Urls} from \"./utils/Urls\";\n",
+ "export {Alignment} from \"./viewer/Alignment\";\nexport {CacheService} from \"./viewer/CacheService\";\nexport {ComponentController} from \"./viewer/ComponentController\";\nexport {Container} from \"./viewer/Container\";\nexport {Observer} from \"./viewer/Observer\";\nexport {ImageSize} from \"./viewer/ImageSize\";\nexport {KeyboardService} from \"./viewer/KeyboardService\";\nexport {LoadingService} from \"./viewer/LoadingService\";\nexport {MouseService} from \"./viewer/MouseService\";\nexport {Navigator} from \"./viewer/Navigator\";\nexport {PlayService} from \"./viewer/PlayService\";\nexport {Projection} from \"./viewer/Projection\";\nexport {SpriteService} from \"./viewer/SpriteService\";\nexport {TouchService} from \"./viewer/TouchService\";\nexport {Viewer} from \"./viewer/Viewer\";\nexport * from \"./viewer/interfaces/interfaces\";\n",
+ "import {catchError, map} from \"rxjs/operators\";\nimport * as falcor from \"falcor\";\n\nimport {Observable, Subscriber} from \"rxjs\";\n\nimport {\n ICoreNode,\n IFillNode,\n IFullNode,\n ISequence,\n ModelCreator,\n} from \"../API\";\n\ninterface IImageByKey<T> {\n imageByKey: { [key: string]: T };\n}\n\ninterface IImageCloseTo<T> {\n imageCloseTo: { [key: string]: T };\n}\n\ninterface IImagesByH<T> {\n imagesByH: { [key: string]: { [index: string]: T } };\n}\n\ninterface ISequenceByKey<T> {\n sequenceByKey: { [sequenceKey: string]: T };\n}\n\ntype APIPath =\n \"imageByKey\" |\n \"imageCloseTo\" |\n \"imagesByH\" |\n \"imageViewAdd\" |\n \"sequenceByKey\" |\n \"sequenceViewAdd\";\n\n/**\n * @class APIv3\n *\n * @classdesc Provides methods for access of API v3.\n */\nexport class APIv3 {\n private _clientId: string;\n\n private _model: falcor.Model;\n private _modelCreator: ModelCreator;\n\n private _pageCount: number;\n\n private _pathImageByKey: APIPath;\n private _pathImageCloseTo: APIPath;\n private _pathImagesByH: APIPath;\n private _pathImageViewAdd: APIPath;\n private _pathSequenceByKey: APIPath;\n private _pathSequenceViewAdd: APIPath;\n\n private _propertiesCore: string[];\n private _propertiesFill: string[];\n private _propertiesKey: string[];\n private _propertiesSequence: string[];\n private _propertiesSpatial: string[];\n private _propertiesUser: string[];\n\n /**\n * Create a new api v3 instance.\n *\n * @param {number} clientId - Client id for API requests.\n * @param {number} [token] - Optional bearer token for API requests of\n * protected resources.\n * @param {ModelCreator} [creator] - Optional model creator instance.\n */\n constructor(clientId: string, token?: string, creator?: ModelCreator) {\n this._clientId = clientId;\n\n this._modelCreator = creator != null ? creator : new ModelCreator();\n this._model = this._modelCreator.createModel(clientId, token);\n\n this._pageCount = 999;\n\n this._pathImageByKey = \"imageByKey\";\n this._pathImageCloseTo = \"imageCloseTo\";\n this._pathImagesByH = \"imagesByH\";\n this._pathImageViewAdd = \"imageViewAdd\";\n this._pathSequenceByKey = \"sequenceByKey\";\n this._pathSequenceViewAdd = \"sequenceViewAdd\";\n\n this._propertiesCore = [\n \"cl\",\n \"l\",\n \"sequence_key\",\n ];\n\n this._propertiesFill = [\n \"captured_at\",\n \"captured_with_camera_uuid\",\n \"user\",\n \"organization_key\",\n \"private\",\n \"project\",\n ];\n\n this._propertiesKey = [\n \"key\",\n ];\n\n this._propertiesSequence = [\n \"keys\",\n ];\n\n this._propertiesSpatial = [\n \"atomic_scale\",\n \"c_rotation\",\n \"ca\",\n \"calt\",\n \"camera_projection_type\",\n \"cca\",\n \"cfocal\",\n \"ck1\",\n \"ck2\",\n \"gpano\",\n \"height\",\n \"merge_cc\",\n \"merge_version\",\n \"orientation\",\n \"width\",\n ];\n\n this._propertiesUser = [\n \"username\",\n ];\n }\n\n public imageByKeyFill$(keys: string[]): Observable<{ [key: string]: IFillNode }> {\n return this._catchInvalidateGet$(\n this._wrapModelResponse$<falcor.JSONEnvelope<IImageByKey<IFillNode>>>(this._model.get([\n this._pathImageByKey,\n keys,\n this._propertiesKey\n .concat(this._propertiesFill)\n .concat(this._propertiesSpatial),\n this._propertiesKey\n .concat(this._propertiesUser)])).pipe(\n map(\n (value: falcor.JSONEnvelope<IImageByKey<IFillNode>>): { [key: string]: IFillNode } => {\n if (!value) {\n throw new Error(`Images (${keys.join(\", \")}) could not be found.`);\n }\n\n return value.json.imageByKey;\n })),\n this._pathImageByKey,\n keys);\n }\n\n public imageByKeyFull$(keys: string[]): Observable<{ [key: string]: IFullNode }> {\n return this._catchInvalidateGet$(\n this._wrapModelResponse$<falcor.JSONEnvelope<IImageByKey<IFullNode>>>(this._model.get([\n this._pathImageByKey,\n keys,\n this._propertiesKey\n .concat(this._propertiesCore)\n .concat(this._propertiesFill)\n .concat(this._propertiesSpatial),\n this._propertiesKey\n .concat(this._propertiesUser)])).pipe(\n map(\n (value: falcor.JSONEnvelope<IImageByKey<IFullNode>>): { [key: string]: IFullNode } => {\n if (!value) {\n throw new Error(`Images (${keys.join(\", \")}) could not be found.`);\n }\n\n return value.json.imageByKey;\n })),\n this._pathImageByKey,\n keys);\n }\n\n public imageCloseTo$(lat: number, lon: number): Observable<IFullNode> {\n let lonLat: string = `${lon}:${lat}`;\n return this._catchInvalidateGet$(\n this._wrapModelResponse$<falcor.JSONEnvelope<IImageCloseTo<IFullNode>>>(this._model.get([\n this._pathImageCloseTo,\n [lonLat],\n this._propertiesKey\n .concat(this._propertiesCore)\n .concat(this._propertiesFill)\n .concat(this._propertiesSpatial),\n this._propertiesKey\n .concat(this._propertiesUser)])).pipe(\n map(\n (value: falcor.JSONEnvelope<IImageCloseTo<IFullNode>>): IFullNode => {\n return value != null ? value.json.imageCloseTo[lonLat] : null;\n })),\n this._pathImageCloseTo,\n [lonLat]);\n }\n\n public imagesByH$(hs: string[]): Observable<{ [h: string]: { [index: string]: ICoreNode } }> {\n return this._catchInvalidateGet$(\n this._wrapModelResponse$<falcor.JSONEnvelope<IImagesByH<ICoreNode>>>(this._model.get([\n this._pathImagesByH,\n hs,\n { from: 0, to: this._pageCount },\n this._propertiesKey\n .concat(this._propertiesCore)])).pipe(\n map(\n (value: falcor.JSONEnvelope<IImagesByH<ICoreNode>>): { [h: string]: { [index: string]: ICoreNode } } => {\n if (!value) {\n value = { json: { imagesByH: {} } };\n for (let h of hs) {\n value.json.imagesByH[h] = {};\n for (let i: number = 0; i <= this._pageCount; i++) {\n value.json.imagesByH[h][i] = null;\n }\n }\n }\n\n return value.json.imagesByH;\n })),\n this._pathImagesByH,\n hs);\n }\n\n public imageViewAdd$(keys: string[]): Observable<void> {\n return this._catchInvalidateCall$(\n this._wrapCallModelResponse$(\n this._model.call(\n [this._pathImageViewAdd],\n [keys])),\n this._pathImageViewAdd,\n keys);\n }\n\n public invalidateImageByKey(keys: string[]): void {\n this._invalidateGet(this._pathImageByKey, keys);\n }\n\n public invalidateImagesByH(hs: string[]): void {\n this._invalidateGet(this._pathImagesByH, hs);\n }\n\n public invalidateSequenceByKey(sKeys: string[]): void {\n this._invalidateGet(this._pathSequenceByKey, sKeys);\n }\n\n public setToken(token?: string): void {\n this._model.invalidate([]);\n this._model = null;\n this._model = this._modelCreator.createModel(this._clientId, token);\n }\n\n public sequenceByKey$(sequenceKeys: string[]): Observable<{ [sequenceKey: string]: ISequence }> {\n return this._catchInvalidateGet$(\n this._wrapModelResponse$<falcor.JSONEnvelope<ISequenceByKey<ISequence>>>(this._model.get([\n this._pathSequenceByKey,\n sequenceKeys,\n this._propertiesKey\n .concat(this._propertiesSequence)])).pipe(\n map(\n (value: falcor.JSONEnvelope<ISequenceByKey<ISequence>>): { [sequenceKey: string]: ISequence } => {\n if (!value) {\n value = { json: { sequenceByKey: {} } };\n }\n\n for (const sequenceKey of sequenceKeys) {\n if (!(sequenceKey in value.json.sequenceByKey)) {\n console.warn(`Sequence data missing (${sequenceKey})`);\n\n value.json.sequenceByKey[sequenceKey] = { key: sequenceKey, keys: [] };\n }\n }\n\n return value.json.sequenceByKey;\n })),\n this._pathSequenceByKey,\n sequenceKeys);\n }\n\n public sequenceViewAdd$(sequenceKeys: string[]): Observable<void> {\n return this._catchInvalidateCall$(\n this._wrapCallModelResponse$(\n this._model.call(\n [this._pathSequenceViewAdd],\n [sequenceKeys])),\n this._pathSequenceViewAdd,\n sequenceKeys);\n }\n\n public get clientId(): string {\n return this._clientId;\n }\n\n private _catchInvalidateGet$<TResult>(observable: Observable<TResult>, path: APIPath, paths: string[]): Observable<TResult> {\n return observable.pipe(\n catchError(\n (error: Error): Observable<TResult> => {\n this._invalidateGet(path, paths);\n\n throw error;\n }));\n }\n\n private _catchInvalidateCall$<TResult>(observable: Observable<TResult>, path: APIPath, paths: string[]): Observable<TResult> {\n return observable.pipe(\n catchError(\n (error: Error): Observable<TResult> => {\n this._invalidateCall(path, paths);\n\n throw error;\n }));\n }\n\n private _invalidateGet(path: APIPath, paths: string[]): void {\n this._model.invalidate([path, paths]);\n }\n\n private _invalidateCall(path: APIPath, paths: string[]): void {\n this._model.invalidate([path], [paths]);\n }\n\n private _wrapModelResponse$<T>(modelResponse: falcor.ModelResponse<T>): Observable<T> {\n return Observable\n .create(\n (subscriber: Subscriber<T>): void => {\n modelResponse\n .then(\n (value: T): void => {\n subscriber.next(value);\n subscriber.complete();\n },\n (error: Error): void => {\n subscriber.error(error);\n });\n });\n }\n\n private _wrapCallModelResponse$<T>(modelResponse: falcor.ModelResponse<falcor.JSONEnvelope<T>>): Observable<T> {\n return this._wrapModelResponse$(modelResponse).pipe(\n map<falcor.JSONEnvelope<T>, T>(\n (value: falcor.JSONEnvelope<T>): T => {\n return;\n }));\n }\n}\n\nexport default APIv3;\n",
+ "import * as falcor from \"falcor\";\nimport XmlHttpSource from \"falcor-http-datasource\";\n\nimport {Urls} from \"../Utils\";\n\ntype HttpDataSourceConfiguration = {\n crossDomain: boolean;\n withCredentials: boolean;\n headers?: { [key: string]: string } ;\n};\n\n/**\n * @class ModelCreator\n *\n * @classdesc Creates API models.\n */\nexport class ModelCreator {\n /**\n * Creates a Falcor model.\n *\n * @description Max cache size will be set to 16 MB. Authorization\n * header will be added if bearer token is supplied.\n *\n * @param {number} clientId - Client id for API requests.\n * @param {number} [token] - Optional bearer token for API requests of\n * protected resources.\n * @returns {falcor.Model} Falcor model for HTTP requests.\n */\n public createModel(clientId: string, token?: string): falcor.Model {\n const configuration: HttpDataSourceConfiguration = {\n crossDomain: true,\n withCredentials: false,\n };\n\n if (token != null) {\n configuration.headers = { \"Authorization\": `Bearer ${token}` };\n }\n\n return new falcor.Model({\n maxSize: 16 * 1024 * 1024,\n source: new XmlHttpSource(Urls.falcorModel(clientId), configuration),\n });\n }\n}\n\nexport default ModelCreator;\n",
+ "import {combineLatest as observableCombineLatest, Observable, Subscription} from \"rxjs\";\n\nimport {map} from \"rxjs/operators\";\nimport * as vd from \"virtual-dom\";\n\nimport {\n ComponentService,\n Component,\n IComponentConfiguration,\n} from \"../Component\";\nimport {Node} from \"../Graph\";\nimport {\n IVNodeHash,\n ISize,\n} from \"../Render\";\nimport {Urls} from \"../Utils\";\nimport {\n Container,\n Navigator,\n} from \"../Viewer\";\n\nexport class AttributionComponent extends Component<IComponentConfiguration> {\n public static componentName: string = \"attribution\";\n private _disposable: Subscription;\n\n constructor(name: string, container: Container, navigator: Navigator) {\n super(name, container, navigator);\n }\n\n protected _activate(): void {\n this._disposable = observableCombineLatest(\n this._navigator.stateService.currentNode$,\n this._container.renderService.size$).pipe(\n map(\n ([node, size]: [Node, ISize]): IVNodeHash => {\n return {\n name: this._name,\n vnode: this._getAttributionNode(node.username, node.key, node.capturedAt, size.width),\n };\n }))\n .subscribe(this._container.domRenderer.render$);\n }\n\n protected _deactivate(): void {\n this._disposable.unsubscribe();\n }\n\n protected _getDefaultConfiguration(): IComponentConfiguration {\n return {};\n }\n\n private _getAttributionNode(username: string, key: string, capturedAt: number, width: number): vd.VNode {\n const compact: boolean = width <= 640;\n\n const mapillaryIcon: vd.VNode = vd.h(\"div.AttributionMapillaryLogo\", []);\n const mapillaryLink: vd.VNode = vd.h(\n \"a.AttributionIconContainer\",\n { href: Urls.explore, target: \"_blank\" },\n [mapillaryIcon]);\n\n const imageBy: string = compact ? `${username}` : `image by ${username}`;\n const imageByContent: vd.VNode = vd.h(\"div.AttributionUsername\", { textContent: imageBy }, []);\n\n const date: string[] = new Date(capturedAt).toDateString().split(\" \");\n const formatted: string = (date.length > 3 ?\n compact ?\n [date[3]] :\n [date[1], date[2] + \",\", date[3]] :\n date).join(\" \");\n\n const dateContent: vd.VNode = vd.h(\"div.AttributionDate\", { textContent: formatted }, []);\n\n const imageLink: vd.VNode =\n vd.h(\n \"a.AttributionImageContainer\",\n { href: Urls.exporeImage(key), target: \"_blank\" },\n [imageByContent, dateContent]);\n\n const compactClass: string = compact ? \".AttributionCompact\" : \"\";\n\n return vd.h(\"div.AttributionContainer\" + compactClass, {}, [mapillaryLink, imageLink]);\n }\n }\n\nComponentService.register(AttributionComponent);\nexport default AttributionComponent;\n",
+ "import * as vd from \"virtual-dom\";\n\nimport {Container, Navigator} from \"../Viewer\";\n\nimport {ComponentService, Component, IComponentConfiguration} from \"../Component\";\n\nexport class BackgroundComponent extends Component<IComponentConfiguration> {\n public static componentName: string = \"background\";\n\n constructor(name: string, container: Container, navigator: Navigator) {\n super(name, container, navigator);\n }\n\n protected _activate(): void {\n this._container.domRenderer.render$\n .next({name: this._name, vnode: this._getBackgroundNode(\"The viewer can't display the given image.\")});\n }\n\n protected _deactivate(): void {\n return;\n }\n\n protected _getDefaultConfiguration(): IComponentConfiguration {\n return {};\n }\n\n private _getBackgroundNode(notice: string): vd.VNode {\n // todo: add condition for when to display the DOM node\n return vd.h(\"div.BackgroundWrapper\", {}, [\n vd.h(\"p\", {textContent: notice}, []),\n ]);\n }\n}\n\nComponentService.register(BackgroundComponent);\nexport default BackgroundComponent;\n",
+ "import {distinctUntilChanged, map, switchMap, takeWhile, scan, skip} from \"rxjs/operators\";\nimport * as vd from \"virtual-dom\";\nimport * as UnitBezier from \"@mapbox/unitbezier\";\n\nimport {\n Observable,\n Subscription,\n combineLatest as observableCombineLatest,\n Subject,\n} from \"rxjs\";\n\nimport {\n Component,\n ComponentService,\n} from \"../Component\";\nimport {\n Spatial, Transform, Geo,\n} from \"../Geo\";\nimport {Node} from \"../Graph\";\nimport {\n IVNodeHash,\n RenderCamera,\n} from \"../Render\";\nimport {\n Container,\n Navigator,\n} from \"../Viewer\";\nimport { IFrame } from \"../state/interfaces/IFrame\";\nimport ViewportCoords from \"../geo/ViewportCoords\";\nimport IBearingConfiguration from \"./interfaces/IBearingConfiguration\";\nimport ISize from \"../render/interfaces/ISize\";\nimport ComponentSize from \"./utils/ComponentSize\";\n\ntype NodeFov = [number, number];\n\ntype NodeBearingFov = [number, number, number];\n\ntype NodeFovState = {\n alpha: number,\n curr: NodeFov,\n prev: NodeFov,\n};\n\ninterface INodeFovOperation {\n (state: NodeFovState): NodeFovState;\n}\n\n/**\n * @class BearingComponent\n *\n * @classdesc Component for indicating bearing and field of view.\n *\n * @example\n * ```\n * var viewer = new Mapillary.Viewer(\n * \"<element-id>\",\n * \"<client-id>\",\n * \"<my key>\");\n *\n * var bearingComponent = viewer.getComponent(\"bearing\");\n * bearingComponent.configure({ size: Mapillary.ComponentSize.Small });\n * ```\n */\nexport class BearingComponent extends Component<IBearingConfiguration> {\n public static componentName: string = \"bearing\";\n\n private _spatial: Spatial;\n private _viewportCoords: ViewportCoords;\n\n private _svgNamespace: string;\n private _distinctThreshold: number;\n\n private _animationSpeed: number;\n private _unitBezier: UnitBezier;\n\n private _renderSubscription: Subscription;\n private _fovSubscription: Subscription;\n private _fovAnimationSubscription: Subscription;\n\n constructor(name: string, container: Container, navigator: Navigator) {\n super(name, container, navigator);\n\n this._spatial = new Spatial();\n this._viewportCoords = new ViewportCoords();\n\n this._svgNamespace = \"http://www.w3.org/2000/svg\";\n this._distinctThreshold = Math.PI / 360;\n\n this._animationSpeed = 0.075;\n this._unitBezier = new UnitBezier(0.74, 0.67, 0.38, 0.96);\n }\n\n protected _activate(): void {\n const cameraBearingFov$: Observable<[number, number]> = this._container.renderService.renderCamera$.pipe(\n map(\n (rc: RenderCamera): [number, number] => {\n let vFov: number = this._spatial.degToRad(rc.perspective.fov);\n let hFov: number = rc.perspective.aspect === Number.POSITIVE_INFINITY ?\n Math.PI :\n Math.atan(rc.perspective.aspect * Math.tan(0.5 * vFov)) * 2;\n\n return [this._spatial.azimuthalToBearing(rc.rotation.phi), hFov];\n }),\n distinctUntilChanged(\n (a1: [number, number], a2: [number, number]): boolean => {\n return Math.abs(a2[0] - a1[0]) < this._distinctThreshold &&\n Math.abs(a2[1] - a1[1]) < this._distinctThreshold;\n }));\n\n const nodeFov$: Observable<NodeFov> = observableCombineLatest(\n this._navigator.stateService.currentState$.pipe(\n distinctUntilChanged(\n undefined,\n (frame: IFrame): string => {\n return frame.state.currentNode.key;\n })),\n this._navigator.panService.panNodes$).pipe(\n map(\n ([frame, panNodes]: [IFrame, [Node, Transform, number][]]): NodeFov => {\n const node: Node = frame.state.currentNode;\n const transform: Transform = frame.state.currentTransform;\n\n if (node.pano) {\n let panoHFov: number = 2 * Math.PI * node.gpano.CroppedAreaImageWidthPixels / node.gpano.FullPanoWidthPixels;\n\n return [panoHFov / 2, panoHFov / 2];\n }\n\n const currentProjectedPoints: number[][] = this._computeProjectedPoints(transform);\n const hFov: number = this._spatial.degToRad(this._computeHorizontalFov(currentProjectedPoints));\n\n let hFovLeft: number = hFov / 2;\n let hFovRight: number = hFov / 2;\n\n for (const [n, , f] of panNodes) {\n const diff: number = this._spatial.wrap(n.ca - node.ca, -180, 180);\n if (diff < 0) {\n hFovLeft = this._spatial.degToRad(Math.abs(diff)) + f / 2;\n } else {\n hFovRight = this._spatial.degToRad(Math.abs(diff)) + f / 2;\n }\n }\n\n return [hFovLeft, hFovRight];\n }),\n distinctUntilChanged(\n (\n [hFovLeft1, hFovRight1]: NodeFov,\n [hFovLeft2, hFovRight2]: NodeFov): boolean => {\n\n return Math.abs(hFovLeft2 - hFovLeft1) < this._distinctThreshold &&\n Math.abs(hFovRight2 - hFovRight1) < this._distinctThreshold;\n }));\n\n const offset$: Observable<number> = observableCombineLatest(\n this._navigator.stateService.currentState$.pipe(\n distinctUntilChanged(\n undefined,\n (frame: IFrame): string => {\n return frame.state.currentNode.key;\n })),\n this._container.renderService.bearing$).pipe(\n map(\n ([frame, bearing]: [IFrame, number]): number => {\n const offset: number = this._spatial.degToRad(frame.state.currentNode.ca - bearing);\n\n return offset;\n }));\n\n const nodeFovOperation$: Subject<INodeFovOperation> = new Subject<INodeFovOperation>();\n\n const smoothNodeFov$: Observable<NodeFov> = nodeFovOperation$.pipe(\n scan(\n (state: NodeFovState, operation: INodeFovOperation): NodeFovState => {\n return operation(state);\n },\n { alpha: 0, curr: [0, 0, 0], prev: [0, 0, 0] }),\n map(\n (state: NodeFovState): NodeFov => {\n const alpha: number = this._unitBezier.solve(state.alpha);\n const curr: NodeFov = state.curr;\n const prev: NodeFov = state.prev;\n\n return [\n this._interpolate(prev[0], curr[0], alpha),\n this._interpolate(prev[1], curr[1], alpha),\n ];\n }));\n\n this._fovSubscription = nodeFov$.pipe(\n map(\n (nbf: NodeFov): INodeFovOperation => {\n return (state: NodeFovState): NodeFovState => {\n const a: number = this._unitBezier.solve(state.alpha);\n const c: NodeFov = state.curr;\n const p: NodeFov = state.prev;\n\n const prev: NodeFov = [\n this._interpolate(p[0], c[0], a),\n this._interpolate(p[1], c[1], a),\n ];\n\n const curr: NodeFov = <NodeFov>nbf.slice();\n\n return {\n alpha: 0,\n curr: curr,\n prev: prev,\n };\n };\n }))\n .subscribe(nodeFovOperation$);\n\n this._fovAnimationSubscription = nodeFov$.pipe(\n switchMap(\n (): Observable<number> => {\n return this._container.renderService.renderCameraFrame$.pipe(\n skip(1),\n scan<RenderCamera, number>(\n (alpha: number): number => {\n return alpha + this._animationSpeed;\n },\n 0),\n takeWhile(\n (alpha: number): boolean => {\n return alpha <= 1 + this._animationSpeed;\n }),\n map(\n (alpha: number): number => {\n return Math.min(alpha, 1);\n }));\n }),\n map(\n (alpha: number): INodeFovOperation => {\n return (nbfState: NodeFovState): NodeFovState => {\n return {\n alpha: alpha,\n curr: <NodeFov>nbfState.curr.slice(),\n prev: <NodeFov>nbfState.prev.slice(),\n };\n };\n }))\n .subscribe(nodeFovOperation$);\n\n const nodeBearingFov$: Observable<NodeBearingFov> = observableCombineLatest(\n offset$,\n smoothNodeFov$).pipe(\n map(\n ([offset, fov]: [number, NodeFov]): NodeBearingFov => {\n return [offset, fov[0], fov[1]];\n }));\n\n this._renderSubscription = observableCombineLatest(\n cameraBearingFov$,\n nodeBearingFov$,\n this._configuration$,\n this._container.renderService.size$).pipe(\n map(\n ([[cb, cf], [no, nfl, nfr], configuration, size]:\n [[number, number], [number, number, number], IBearingConfiguration, ISize]): IVNodeHash => {\n\n const background: vd.VNode = this._createBackground(cb);\n const fovIndicator: vd.VNode = this._createFovIndicator(nfl, nfr, no);\n const north: vd.VNode = this._createNorth(cb);\n const cameraSector: vd.VNode = this._createCircleSectorCompass(\n this._createCircleSector(Math.max(Math.PI / 20, cf), \"#FFF\"));\n\n const compact: string = configuration.size === ComponentSize.Small ||\n configuration.size === ComponentSize.Automatic && size.width < 640 ?\n \".BearingCompact\" : \"\";\n\n return {\n name: this._name,\n vnode: vd.h(\n \"div.BearingIndicatorContainer\" + compact,\n { oncontextmenu: (event: MouseEvent): void => { event.preventDefault(); } },\n [\n background,\n fovIndicator,\n north,\n cameraSector,\n ]),\n };\n }))\n .subscribe(this._container.domRenderer.render$);\n }\n\n protected _deactivate(): void {\n this._renderSubscription.unsubscribe();\n this._fovSubscription.unsubscribe();\n this._fovAnimationSubscription.unsubscribe();\n }\n\n protected _getDefaultConfiguration(): IBearingConfiguration {\n return { size: ComponentSize.Automatic };\n }\n\n private _createFovIndicator(fovLeft: number, fovRigth: number, offset: number): vd.VNode {\n const arc: vd.VNode = this._createFovArc(fovLeft, fovRigth);\n\n const group: vd.VNode =\n vd.h(\n \"g\",\n {\n attributes: { transform: \"translate(18,18)\" },\n namespace: this._svgNamespace,\n },\n [arc]);\n\n const svg: vd.VNode =\n vd.h(\n \"svg\",\n {\n attributes: { viewBox: \"0 0 36 36\" },\n namespace: this._svgNamespace,\n style: {\n height: \"36px\",\n left: \"2px\",\n position: \"absolute\",\n top: \"2px\",\n transform: `rotateZ(${this._spatial.radToDeg(offset)}deg)`,\n width: \"36px\",\n },\n },\n [group]);\n\n return svg;\n }\n\n private _createFovArc(fovLeft: number, fovRigth: number): vd.VNode {\n const radius: number = 16.75;\n const strokeWidth: number = 2.5;\n const fov: number = fovLeft + fovRigth;\n\n if (fov > 2 * Math.PI - Math.PI / 90) {\n return vd.h(\n \"circle\",\n {\n attributes: {\n cx: \"0\",\n cy: \"0\",\n \"fill-opacity\": \"0\",\n r: `${radius}`,\n stroke: \"#FFF\",\n \"stroke-width\":\n `${strokeWidth}`,\n },\n namespace: this._svgNamespace,\n },\n []);\n }\n\n let arcStart: number = -Math.PI / 2 - fovLeft;\n let arcEnd: number = arcStart + fov;\n\n let startX: number = radius * Math.cos(arcStart);\n let startY: number = radius * Math.sin(arcStart);\n\n let endX: number = radius * Math.cos(arcEnd);\n let endY: number = radius * Math.sin(arcEnd);\n\n let largeArc: number = fov >= Math.PI ? 1 : 0;\n\n let description: string = `M ${startX} ${startY} A ${radius} ${radius} 0 ${largeArc} 1 ${endX} ${endY}`;\n\n return vd.h(\n \"path\",\n {\n attributes: {\n d: description,\n \"fill-opacity\": \"0\",\n stroke: \"#FFF\",\n \"stroke-width\": `${strokeWidth}`,\n },\n namespace: this._svgNamespace,\n },\n []);\n }\n\n private _createCircleSectorCompass(cameraSector: vd.VNode): vd.VNode {\n let group: vd.VNode =\n vd.h(\n \"g\",\n {\n attributes: { transform: \"translate(1,1)\" },\n namespace: this._svgNamespace,\n },\n [cameraSector]);\n\n let svg: vd.VNode =\n vd.h(\n \"svg\",\n {\n attributes: { viewBox: \"0 0 2 2\" },\n namespace: this._svgNamespace,\n style: {\n height: \"26px\",\n left: \"7px\",\n position: \"absolute\",\n top: \"7px\",\n width: \"26px\",\n },\n },\n [group]);\n\n return svg;\n }\n\n private _createCircleSector(fov: number, fill: string): vd.VNode {\n if (fov > 2 * Math.PI - Math.PI / 90) {\n return vd.h(\n \"circle\",\n {\n attributes: { cx: \"0\", cy: \"0\", fill: fill, r: \"1\" },\n namespace: this._svgNamespace,\n },\n []);\n }\n\n let arcStart: number = -Math.PI / 2 - fov / 2;\n let arcEnd: number = arcStart + fov;\n\n let startX: number = Math.cos(arcStart);\n let startY: number = Math.sin(arcStart);\n\n let endX: number = Math.cos(arcEnd);\n let endY: number = Math.sin(arcEnd);\n\n let largeArc: number = fov >= Math.PI ? 1 : 0;\n\n let description: string = `M 0 0 ${startX} ${startY} A 1 1 0 ${largeArc} 1 ${endX} ${endY}`;\n\n return vd.h(\n \"path\",\n {\n attributes: { d: description, fill: fill },\n namespace: this._svgNamespace,\n },\n []);\n }\n\n private _createNorth(bearing: number): vd.VNode {\n const north: vd.VNode = vd.h(\"div.BearingNorth\", []);\n const container: vd.VNode = vd.h(\n \"div.BearingNorthContainer\",\n { style: { transform: `rotateZ(${this._spatial.radToDeg(-bearing)}deg)` } },\n [north]);\n\n return container;\n }\n\n private _createBackground(bearing: number): vd.VNode {\n return vd.h(\n \"div.BearingIndicatorBackground\",\n { style: { transform: `rotateZ(${this._spatial.radToDeg(-bearing)}deg)` } },\n [\n vd.h(\"div.BearingIndicatorBackgroundCircle\", []),\n vd.h(\n \"div.BearingIndicatorBackgroundArrowContainer\",\n [\n vd.h(\"div.BearingIndicatorBackgroundArrow\", []),\n ]),\n ]);\n }\n\n private _computeProjectedPoints(transform: Transform): number[][] {\n const vertices: number[][] = [[1, 0]];\n const directions: number[][] = [[0, 0.5]];\n const pointsPerLine: number = 12;\n\n return Geo.computeProjectedPoints(transform, vertices, directions, pointsPerLine, this._viewportCoords);\n }\n\n private _computeHorizontalFov(projectedPoints: number[][]): number {\n const fovs: number[] = projectedPoints\n .map(\n (projectedPoint: number[]): number => {\n return this._coordToFov(projectedPoint[0]);\n });\n\n const fov: number = Math.min(...fovs);\n\n return fov;\n }\n\n private _coordToFov(x: number): number {\n return this._spatial.radToDeg(2 * Math.atan(x));\n }\n\n private _interpolate(x1: number, x2: number, alpha: number): number {\n return (1 - alpha) * x1 + alpha * x2;\n }\n}\n\nComponentService.register(BearingComponent);\nexport default BearingComponent;\n",
+ "import {\n from as observableFrom,\n merge as observableMerge,\n empty as observableEmpty,\n of as observableOf,\n combineLatest as observableCombineLatest,\n zip as observableZip,\n Observable,\n Subscription,\n} from \"rxjs\";\n\nimport {\n map,\n first,\n switchMap,\n filter,\n catchError,\n mergeMap,\n expand,\n skip,\n mergeAll,\n} from \"rxjs/operators\";\n\nimport {EdgeDirection, IEdge} from \"../Edge\";\nimport {IEdgeStatus, Node} from \"../Graph\";\nimport {ComponentService, Component, ICacheConfiguration, ICacheDepth} from \"../Component\";\nimport {Container, Navigator} from \"../Viewer\";\n\ntype EdgesDepth = [IEdge[], number];\n\nexport class CacheComponent extends Component<ICacheConfiguration> {\n public static componentName: string = \"cache\";\n\n private _sequenceSubscription: Subscription;\n private _spatialSubscription: Subscription;\n\n constructor(name: string, container: Container, navigator: Navigator) {\n super(name, container, navigator);\n }\n\n /**\n * Set the cache depth.\n *\n * Configures the cache depth. The cache depth can be different for\n * different edge direction types.\n *\n * @param {ICacheDepth} depth - Cache depth structure.\n */\n public setDepth(depth: ICacheDepth): void {\n this.configure({ depth: depth });\n }\n\n protected _activate(): void {\n this._sequenceSubscription = observableCombineLatest(\n this._navigator.stateService.currentNode$.pipe(\n switchMap(\n (node: Node): Observable<IEdgeStatus> => {\n return node.sequenceEdges$;\n }),\n filter(\n (status: IEdgeStatus): boolean => {\n return status.cached;\n })),\n this._configuration$).pipe(\n switchMap(\n (nc: [IEdgeStatus, ICacheConfiguration]): Observable<EdgesDepth> => {\n let status: IEdgeStatus = nc[0];\n let configuration: ICacheConfiguration = nc[1];\n\n let sequenceDepth: number = Math.max(0, Math.min(4, configuration.depth.sequence));\n\n let next$: Observable<EdgesDepth> = this._cache$(status.edges, EdgeDirection.Next, sequenceDepth);\n let prev$: Observable<EdgesDepth> = this._cache$(status.edges, EdgeDirection.Prev, sequenceDepth);\n\n return observableMerge<EdgesDepth>(\n next$,\n prev$).pipe(\n catchError(\n (error: Error, caught: Observable<EdgesDepth>): Observable<EdgesDepth> => {\n console.error(\"Failed to cache sequence edges.\", error);\n\n return observableEmpty();\n }));\n }))\n .subscribe(() => { /*noop*/ });\n\n this._spatialSubscription = observableCombineLatest(\n this._navigator.stateService.currentNode$.pipe(\n switchMap(\n (node: Node): Observable<[Node, IEdgeStatus]> => {\n return observableCombineLatest(\n observableOf<Node>(node),\n node.spatialEdges$.pipe(\n filter(\n (status: IEdgeStatus): boolean => {\n return status.cached;\n })));\n })),\n this._configuration$).pipe(\n switchMap(\n ([[node, edgeStatus], configuration]: [[Node, IEdgeStatus], ICacheConfiguration]): Observable<EdgesDepth> => {\n let edges: IEdge[] = edgeStatus.edges;\n let depth: ICacheDepth = configuration.depth;\n\n let panoDepth: number = Math.max(0, Math.min(2, depth.pano));\n let stepDepth: number = node.pano ? 0 : Math.max(0, Math.min(3, depth.step));\n let turnDepth: number = node.pano ? 0 : Math.max(0, Math.min(1, depth.turn));\n\n let pano$: Observable<EdgesDepth> = this._cache$(edges, EdgeDirection.Pano, panoDepth);\n\n let forward$: Observable<EdgesDepth> = this._cache$(edges, EdgeDirection.StepForward, stepDepth);\n let backward$: Observable<EdgesDepth> = this._cache$(edges, EdgeDirection.StepBackward, stepDepth);\n let left$: Observable<EdgesDepth> = this._cache$(edges, EdgeDirection.StepLeft, stepDepth);\n let right$: Observable<EdgesDepth> = this._cache$(edges, EdgeDirection.StepRight, stepDepth);\n\n let turnLeft$: Observable<EdgesDepth> = this._cache$(edges, EdgeDirection.TurnLeft, turnDepth);\n let turnRight$: Observable<EdgesDepth> = this._cache$(edges, EdgeDirection.TurnRight, turnDepth);\n let turnU$: Observable<EdgesDepth> = this._cache$(edges, EdgeDirection.TurnU, turnDepth);\n\n return observableMerge<EdgesDepth>(\n forward$,\n backward$,\n left$,\n right$,\n pano$,\n turnLeft$,\n turnRight$,\n turnU$).pipe(\n catchError(\n (error: Error, caught: Observable<EdgesDepth>): Observable<EdgesDepth> => {\n console.error(\"Failed to cache spatial edges.\", error);\n\n return observableEmpty();\n }));\n }))\n .subscribe(() => { /*noop*/ });\n }\n\n protected _deactivate(): void {\n this._sequenceSubscription.unsubscribe();\n this._spatialSubscription.unsubscribe();\n }\n\n protected _getDefaultConfiguration(): ICacheConfiguration {\n return { depth: { pano: 1, sequence: 2, step: 1, turn: 0 } };\n }\n\n private _cache$(edges: IEdge[], direction: EdgeDirection, depth: number): Observable<EdgesDepth> {\n return observableZip(\n observableOf<IEdge[]>(edges),\n observableOf<number>(depth)).pipe(\n expand(\n (ed: EdgesDepth): Observable<EdgesDepth> => {\n let es: IEdge[] = ed[0];\n let d: number = ed[1];\n\n let edgesDepths$: Observable<EdgesDepth>[] = [];\n\n if (d > 0) {\n for (let edge of es) {\n if (edge.data.direction === direction) {\n edgesDepths$.push(\n observableZip(\n this._navigator.graphService.cacheNode$(edge.to).pipe(\n mergeMap(\n (n: Node): Observable<IEdge[]> => {\n return this._nodeToEdges$(n, direction);\n })),\n observableOf<number>(d - 1)));\n }\n }\n }\n\n return observableFrom<Observable<EdgesDepth>>(edgesDepths$).pipe(\n mergeAll());\n }),\n skip(1));\n }\n\n private _nodeToEdges$(node: Node, direction: EdgeDirection): Observable<IEdge[]> {\n return ([EdgeDirection.Next, EdgeDirection.Prev].indexOf(direction) > -1 ?\n node.sequenceEdges$ :\n node.spatialEdges$).pipe(\n first(\n (status: IEdgeStatus): boolean => {\n return status.cached;\n }),\n map(\n (status: IEdgeStatus): IEdge[] => {\n return status.edges;\n }));\n }\n}\n\nComponentService.register(CacheComponent);\nexport default CacheComponent;\n",
+ "import {refCount, publishReplay, scan, startWith} from \"rxjs/operators\";\nimport {BehaviorSubject, Observable, Subject} from \"rxjs\";\n\nimport {IComponentConfiguration} from \"../Component\";\nimport {\n Container,\n Navigator,\n} from \"../Viewer\";\nimport {EventEmitter} from \"../Utils\";\n\nexport abstract class Component<TConfiguration extends IComponentConfiguration> extends EventEmitter {\n public static componentName: string = \"not_worthy\";\n\n protected _activated: boolean;\n protected _container: Container;\n protected _name: string;\n protected _navigator: Navigator;\n\n protected _activated$: BehaviorSubject<boolean> = new BehaviorSubject<boolean>(false);\n protected _configuration$: Observable<TConfiguration>;\n protected _configurationSubject$: Subject<TConfiguration> = new Subject<TConfiguration>();\n\n constructor (name: string, container: Container, navigator: Navigator) {\n super();\n\n this._activated = false;\n this._container = container;\n this._name = name;\n this._navigator = navigator;\n\n this._configuration$ =\n this._configurationSubject$.pipe(\n startWith(this.defaultConfiguration),\n scan(\n (conf: TConfiguration, newConf: TConfiguration): TConfiguration => {\n for (let key in newConf) {\n if (newConf.hasOwnProperty(key)) {\n conf[key] = <any>newConf[key];\n }\n }\n\n return conf;\n }),\n publishReplay(1),\n refCount());\n\n this._configuration$.subscribe(() => { /*noop*/ });\n }\n\n public get activated(): boolean {\n return this._activated;\n }\n\n /** @ignore */\n public get activated$(): Observable<boolean> {\n return this._activated$;\n }\n\n /**\n * Get default configuration.\n *\n * @returns {TConfiguration} Default configuration for component.\n */\n public get defaultConfiguration(): TConfiguration {\n return this._getDefaultConfiguration();\n }\n\n /** @ignore */\n public get configuration$(): Observable<TConfiguration> {\n return this._configuration$;\n }\n\n /**\n * Get name.\n *\n * @description The name of the component. Used when interacting with the\n * component through the Viewer's API.\n */\n public get name(): string {\n return this._name;\n }\n\n public activate(conf?: TConfiguration): void {\n if (this._activated) {\n return;\n }\n\n if (conf !== undefined) {\n this._configurationSubject$.next(conf);\n }\n\n this._activated = true;\n this._activate();\n this._activated$.next(true);\n }\n\n public configure(conf: TConfiguration): void {\n this._configurationSubject$.next(conf);\n }\n\n public deactivate(): void {\n if (!this._activated) {\n return;\n }\n\n this._activated = false;\n this._deactivate();\n this._container.domRenderer.clear(this._name);\n this._container.glRenderer.clear(this._name);\n this._activated$.next(false);\n }\n\n /**\n * Detect the viewer's new width and height and resize the component's\n * rendered elements accordingly if applicable.\n *\n * @ignore\n */\n public resize(): void { return; }\n\n protected abstract _activate(): void;\n\n protected abstract _deactivate(): void;\n\n protected abstract _getDefaultConfiguration(): TConfiguration;\n}\n\nexport default Component;\n",
+ "import {ArgumentMapillaryError} from \"../Error\";\nimport {Container, Navigator} from \"../Viewer\";\nimport {CoverComponent, Component, IComponentConfiguration} from \"../Component\";\n\ninterface IActiveComponent {\n active: boolean;\n component: Component<IComponentConfiguration>;\n}\n\nexport class ComponentService {\n public static registeredCoverComponent: typeof CoverComponent;\n public static registeredComponents: {[key: string]: { new (...args: any[]): Component<IComponentConfiguration>; }} = {};\n\n private _coverActivated: boolean;\n private _coverComponent: CoverComponent;\n private _components: {[key: string]: IActiveComponent} = {};\n\n public static register<T extends Component<IComponentConfiguration>>(\n component: { componentName: string, new (...args: any[]): T; }): void {\n if (ComponentService.registeredComponents[component.componentName] === undefined) {\n ComponentService.registeredComponents[component.componentName] = component;\n }\n }\n\n public static registerCover(coverComponent: typeof CoverComponent): void {\n ComponentService.registeredCoverComponent = coverComponent;\n }\n\n constructor (container: Container, navigator: Navigator) {\n for (const componentName in ComponentService.registeredComponents) {\n if (!ComponentService.registeredComponents.hasOwnProperty(componentName)) {\n continue;\n }\n\n const component: new (...args: any[]) => Component<IComponentConfiguration> =\n ComponentService.registeredComponents[componentName];\n\n this._components[componentName] = {\n active: false,\n component: new component(componentName, container, navigator),\n };\n }\n\n this._coverComponent = new ComponentService.registeredCoverComponent(\"cover\", container, navigator);\n this._coverComponent.activate();\n this._coverActivated = true;\n }\n\n public get coverActivated(): boolean {\n return this._coverActivated;\n }\n\n public activateCover(): void {\n if (this._coverActivated) {\n return;\n }\n\n this._coverActivated = true;\n\n for (const componentName in this._components) {\n if (!this._components.hasOwnProperty(componentName)) {\n continue;\n }\n\n const component: IActiveComponent = this._components[componentName];\n\n if (component.active) {\n component.component.deactivate();\n }\n }\n }\n\n public deactivateCover(): void {\n if (!this._coverActivated) {\n return;\n }\n\n this._coverActivated = false;\n\n for (const componentName in this._components) {\n if (!this._components.hasOwnProperty(componentName)) {\n continue;\n }\n\n const component: IActiveComponent = this._components[componentName];\n\n if (component.active) {\n component.component.activate();\n }\n }\n }\n\n public activate(name: string): void {\n this._checkName(name);\n this._components[name].active = true;\n\n if (!this._coverActivated) {\n this.get(name).activate();\n }\n }\n\n public configure<TConfiguration extends IComponentConfiguration>(name: string, conf: TConfiguration): void {\n this._checkName(name);\n this.get(name).configure(conf);\n }\n\n public deactivate(name: string): void {\n this._checkName(name);\n this._components[name].active = false;\n\n if (!this._coverActivated) {\n this.get(name).deactivate();\n }\n }\n\n public get<TComponent extends Component<IComponentConfiguration>>(name: string): TComponent {\n return <TComponent>this._components[name].component;\n }\n\n public getCover(): CoverComponent {\n return this._coverComponent;\n }\n\n private _checkName(name: string): void {\n if (!(name in this._components)) {\n throw new ArgumentMapillaryError(`Component does not exist: ${name}`);\n }\n }\n}\n\nexport default ComponentService;\n",
+ "import {of as observableOf, combineLatest as observableCombineLatest, Observable, Subscription} from \"rxjs\";\n\nimport {map, distinctUntilChanged, switchMap, first, filter} from \"rxjs/operators\";\nimport * as vd from \"virtual-dom\";\n\nimport {\n CoverState,\n ICoverConfiguration,\n ComponentService,\n Component,\n} from \"../Component\";\nimport {Node} from \"../Graph\";\nimport {\n IVNodeHash,\n ISize,\n} from \"../Render\";\nimport {Urls} from \"../Utils\";\nimport {\n Container,\n ImageSize,\n Navigator,\n} from \"../Viewer\";\n\nexport class CoverComponent extends Component<ICoverConfiguration> {\n public static componentName: string = \"cover\";\n\n private _renderSubscription: Subscription;\n private _keySubscription: Subscription;\n\n constructor(name: string, container: Container, navigator: Navigator) {\n super(name, container, navigator);\n }\n\n public _activate(): void {\n this._configuration$.pipe(\n distinctUntilChanged(\n undefined,\n (configuration: ICoverConfiguration): CoverState => {\n return configuration.state;\n }),\n switchMap(\n (configuration: ICoverConfiguration): Observable<[CoverState, Node]> => {\n return observableCombineLatest(\n observableOf(configuration.state),\n this._navigator.stateService.currentNode$);\n }),\n switchMap(\n ([state, node]: [CoverState, Node]): Observable<[string, string]> => {\n const keySrc$: Observable<[string, string]> = observableCombineLatest(\n observableOf(node.key),\n node.image$.pipe(\n filter(\n (image: HTMLImageElement): boolean => {\n return !!image;\n }),\n map(\n (image: HTMLImageElement): string => {\n return image.src;\n })));\n\n return state === CoverState.Visible ? keySrc$.pipe(first()) : keySrc$;\n }),\n distinctUntilChanged(\n ([k1, s1]: [string, string], [k2, s2]: [string, string]): boolean => {\n return k1 === k2 && s1 === s2;\n }),\n map(\n ([key, src]: [string, string]): ICoverConfiguration => {\n return { key: key, src: src };\n }))\n .subscribe(this._configurationSubject$);\n\n this._renderSubscription = observableCombineLatest(\n this._configuration$,\n this._container.renderService.size$).pipe(\n map(\n ([configuration, size]: [ICoverConfiguration, ISize]): IVNodeHash => {\n if (!configuration.key) {\n return { name: this._name, vnode: vd.h(\"div\", []) };\n }\n\n const compactClass: string = size.width <= 640 || size.height <= 480 ? \".CoverCompact\" : \"\";\n\n if (configuration.state === CoverState.Hidden) {\n const doneContainer: vd.VNode = vd.h(\n \"div.CoverContainer.CoverDone\" + compactClass,\n [this._getCoverBackgroundVNode(configuration)]);\n\n return { name: this._name, vnode: doneContainer };\n }\n\n const container: vd.VNode = vd.h(\n \"div.CoverContainer\" + compactClass,\n [this._getCoverButtonVNode(configuration)]);\n\n return { name: this._name, vnode: container };\n }))\n .subscribe(this._container.domRenderer.render$);\n }\n\n public _deactivate(): void {\n this._renderSubscription.unsubscribe();\n this._keySubscription.unsubscribe();\n }\n\n protected _getDefaultConfiguration(): ICoverConfiguration {\n return { state: CoverState.Visible };\n }\n\n private _getCoverButtonVNode(configuration: ICoverConfiguration): vd.VNode {\n const cover: string = configuration.state === CoverState.Loading ? \"div.Cover.CoverLoading\" : \"div.Cover\";\n const coverButton: vd.VNode = vd.h(\n \"div.CoverButton\",\n [vd.h(\"div.CoverButtonIcon\", [])]);\n\n const coverLogo: vd.VNode = vd.h(\"a.CoverLogo\", {href: Urls.explore, target: \"_blank\"}, []);\n const coverIndicator: vd.VNode = vd.h(\n \"div.CoverIndicator\",\n { onclick: (): void => { this.configure({ state: CoverState.Loading }); } },\n []);\n\n return vd.h(\n cover,\n [\n this._getCoverBackgroundVNode(configuration),\n coverIndicator,\n coverButton,\n coverLogo,\n ]);\n }\n\n private _getCoverBackgroundVNode(conf: ICoverConfiguration): vd.VNode {\n let url: string = conf.src != null ?\n conf.src : Urls.thumbnail(conf.key, ImageSize.Size640);\n\n let properties: vd.createProperties = { style: { backgroundImage: `url(${url})` } };\n\n let children: vd.VNode[] = [];\n if (conf.state === CoverState.Loading) {\n children.push(vd.h(\"div.Spinner\", {}, []));\n }\n\n return vd.h(\"div.CoverBackground\", properties, children);\n }\n}\n\nComponentService.registerCover(CoverComponent);\nexport default CoverComponent;\n",
+ "import {combineLatest as observableCombineLatest, Observable, BehaviorSubject, Subscription} from \"rxjs\";\nimport {map} from \"rxjs/operators\";\nimport * as vd from \"virtual-dom\";\n\nimport {Component, ComponentService, IComponentConfiguration} from \"../Component\";\nimport {ILoadStatus} from \"../Graph\";\nimport {IVNodeHash} from \"../Render\";\nimport {IFrame} from \"../State\";\n\nexport class DebugComponent extends Component<IComponentConfiguration> {\n public static componentName: string = \"debug\";\n\n private _disposable: Subscription;\n\n private _open$: BehaviorSubject<boolean> = new BehaviorSubject<boolean>(false);\n\n public _activate(): void {\n this._disposable = observableCombineLatest(\n this._navigator.stateService.currentState$,\n this._open$,\n this._navigator.imageLoadingService.loadstatus$).pipe(\n map(\n ([frame, open, loadStatus]: [IFrame, boolean, {[key: string]: ILoadStatus}]): IVNodeHash => {\n return {name: this._name, vnode: this._getDebugVNode(open, this._getDebugInfo(frame, loadStatus))};\n }))\n .subscribe(this._container.domRenderer.render$);\n }\n\n public _deactivate(): void {\n this._disposable.unsubscribe();\n }\n\n protected _getDefaultConfiguration(): IComponentConfiguration {\n return {};\n }\n\n private _getDebugInfo(frame: IFrame, loadStatus: {[key: string]: ILoadStatus}): vd.VNode[] {\n let ret: vd.VNode[] = [];\n\n ret.push(vd.h(\"h2\", \"Node\"));\n\n if (frame.state.currentNode) {\n ret.push(vd.h(\"p\", `currentNode: ${frame.state.currentNode.key}`));\n }\n\n if (frame.state.previousNode) {\n ret.push(vd.h(\"p\", `previousNode: ${frame.state.previousNode.key}`));\n }\n\n ret.push(vd.h(\"h2\", \"Loading\"));\n\n let total: number = 0;\n let loaded: number = 0;\n let loading: number = 0;\n\n for (const key in loadStatus) {\n if (!loadStatus.hasOwnProperty(key)) {\n continue;\n }\n\n const status: ILoadStatus = loadStatus[key];\n\n total += status.loaded;\n\n if (status.loaded !== status.total) {\n loading++;\n } else {\n loaded++;\n }\n }\n\n ret.push(vd.h(\"p\", `Loaded Images: ${loaded}`));\n ret.push(vd.h(\"p\", `Loading Images: ${loading}`));\n ret.push(vd.h(\"p\", `Total bytes loaded: ${total}`));\n\n ret.push(vd.h(\"h2\", \"Camera\"));\n\n ret.push(vd.h(\"p\", `camera.position.x: ${frame.state.camera.position.x}`));\n ret.push(vd.h(\"p\", `camera.position.y: ${frame.state.camera.position.y}`));\n ret.push(vd.h(\"p\", `camera.position.z: ${frame.state.camera.position.z}`));\n\n ret.push(vd.h(\"p\", `camera.lookat.x: ${frame.state.camera.lookat.x}`));\n ret.push(vd.h(\"p\", `camera.lookat.y: ${frame.state.camera.lookat.y}`));\n ret.push(vd.h(\"p\", `camera.lookat.z: ${frame.state.camera.lookat.z}`));\n\n ret.push(vd.h(\"p\", `camera.up.x: ${frame.state.camera.up.x}`));\n ret.push(vd.h(\"p\", `camera.up.y: ${frame.state.camera.up.y}`));\n ret.push(vd.h(\"p\", `camera.up.z: ${frame.state.camera.up.z}`));\n\n return ret;\n }\n\n private _getDebugVNode(open: boolean, info: vd.VNode[]): vd.VNode {\n if (open) {\n return vd.h(\"div.Debug\", {}, [\n vd.h(\"h2\", {}, [\"Debug\"]),\n this._getDebugVNodeButton(open),\n vd.h(\"pre\", {}, info),\n ]);\n } else {\n return this._getDebugVNodeButton(open);\n }\n }\n\n private _getDebugVNodeButton(open: boolean): any {\n let buttonText: string = open ? \"Disable Debug\" : \"D\";\n let buttonCssClass: string = open ? \"\" : \".DebugButtonFixed\";\n\n if (open) {\n return vd.h(`button.DebugButton${buttonCssClass}`,\n {onclick: this._closeDebugElement.bind(this)},\n [buttonText]);\n } else {\n return vd.h(`button.DebugButton${buttonCssClass}`,\n {onclick: this._openDebugElement.bind(this)},\n [buttonText]);\n }\n }\n\n private _closeDebugElement(open: boolean): void {\n this._open$.next(false);\n }\n\n private _openDebugElement(): void {\n this._open$.next(true);\n }\n}\n\nComponentService.register(DebugComponent);\nexport default DebugComponent;\n",
+ "import {combineLatest as observableCombineLatest, Observable, Subscription} from \"rxjs\";\n\nimport {distinctUntilChanged, filter, map} from \"rxjs/operators\";\nimport * as vd from \"virtual-dom\";\n\nimport {ComponentService, Component, IComponentConfiguration} from \"../Component\";\nimport {Node} from \"../Graph\";\nimport {ISize} from \"../Render\";\nimport {DOM} from \"../Utils\";\nimport {Container, Navigator} from \"../Viewer\";\n\nexport class ImageComponent extends Component<IComponentConfiguration> {\n public static componentName: string = \"image\";\n\n private _canvasId: string;\n private _dom: DOM;\n private drawSubscription: Subscription;\n\n constructor(name: string, container: Container, navigator: Navigator, dom?: DOM) {\n super(name, container, navigator);\n\n this._canvasId = `${container.id}-${this._name}`;\n this._dom = !!dom ? dom : new DOM();\n }\n\n protected _activate(): void {\n const canvasSize$: Observable<[HTMLCanvasElement, ISize]> = this._container.domRenderer.element$.pipe(\n map(\n (element: HTMLElement): HTMLCanvasElement => {\n return <HTMLCanvasElement>this._dom.document.getElementById(this._canvasId);\n }),\n filter(\n (canvas: HTMLCanvasElement): boolean => {\n return !!canvas;\n }),\n map(\n (canvas: HTMLCanvasElement): [HTMLCanvasElement, ISize] => {\n const adaptableDomRenderer: HTMLElement = canvas.parentElement;\n const width: number = adaptableDomRenderer.offsetWidth;\n const height: number = adaptableDomRenderer.offsetHeight;\n\n return [canvas, { height: height, width: width }];\n }),\n distinctUntilChanged(\n (s1: ISize, s2: ISize): boolean => {\n return s1.height === s2.height && s1.width === s2.width;\n },\n ([canvas, size]: [HTMLCanvasElement, ISize]): ISize => {\n return size;\n }));\n\n this.drawSubscription = observableCombineLatest(\n canvasSize$,\n this._navigator.stateService.currentNode$)\n .subscribe(\n ([[canvas, size], node]: [[HTMLCanvasElement, ISize], Node]): void => {\n canvas.width = size.width;\n canvas.height = size.height;\n canvas\n .getContext(\"2d\")\n .drawImage(node.image, 0, 0, size.width, size.height);\n });\n\n this._container.domRenderer.renderAdaptive$.next({name: this._name, vnode: vd.h(`canvas#${this._canvasId}`, [])});\n }\n\n protected _deactivate(): void {\n this.drawSubscription.unsubscribe();\n }\n\n protected _getDefaultConfiguration(): IComponentConfiguration {\n return {};\n }\n}\n\nComponentService.register(ImageComponent);\nexport default ImageComponent;\n",
+ "import {of as observableOf, Observable, Subscription} from \"rxjs\";\n\nimport {map, switchMap} from \"rxjs/operators\";\nimport * as vd from \"virtual-dom\";\n\nimport {Container, Navigator} from \"../Viewer\";\nimport {ComponentService, Component, IComponentConfiguration} from \"../Component\";\n\nimport {IVNodeHash} from \"../Render\";\nimport {ILoadStatus} from \"../Graph\";\n\nexport class LoadingComponent extends Component<IComponentConfiguration> {\n public static componentName: string = \"loading\";\n\n private _loadingSubscription: Subscription;\n\n constructor(name: string, container: Container, navigator: Navigator) {\n super(name, container, navigator);\n }\n\n protected _activate(): void {\n this._loadingSubscription = this._navigator.loadingService.loading$.pipe(\n switchMap(\n (loading: boolean): Observable<{ [key: string]: ILoadStatus }> => {\n return loading ?\n this._navigator.imageLoadingService.loadstatus$ :\n observableOf({});\n }),\n map(\n (loadStatus: { [key: string]: ILoadStatus }): IVNodeHash => {\n let total: number = 0;\n let loaded: number = 0;\n\n for (const key in loadStatus) {\n if (!loadStatus.hasOwnProperty(key)) {\n continue;\n }\n\n const status: ILoadStatus = loadStatus[key];\n\n if (status.loaded !== status.total) {\n loaded += status.loaded;\n total += status.total;\n }\n }\n\n let percentage: number = 100;\n if (total !== 0) {\n percentage = (loaded / total) * 100;\n }\n\n return {name: this._name, vnode: this._getBarVNode(percentage)};\n }))\n .subscribe(this._container.domRenderer.render$);\n }\n\n protected _deactivate(): void {\n this._loadingSubscription.unsubscribe();\n }\n\n protected _getDefaultConfiguration(): IComponentConfiguration {\n return {};\n }\n\n private _getBarVNode(percentage: number): vd.VNode {\n let loadingBarStyle: any = {};\n let loadingContainerStyle: any = {};\n\n if (percentage !== 100) {\n loadingBarStyle.width = percentage.toFixed(0) + \"%\";\n loadingBarStyle.opacity = \"1\";\n\n } else {\n loadingBarStyle.width = \"100%\";\n loadingBarStyle.opacity = \"0\";\n }\n\n return vd.h(\"div.Loading\", { style: loadingContainerStyle }, [ vd.h(\"div.LoadingBar\", {style: loadingBarStyle}, [])]);\n }\n}\n\nComponentService.register(LoadingComponent);\nexport default LoadingComponent;\n",
+ "import {of as observableOf, combineLatest as observableCombineLatest, Observable, Subscription} from \"rxjs\";\n\nimport {switchMap, map} from \"rxjs/operators\";\nimport * as vd from \"virtual-dom\";\n\nimport {EdgeDirection, IEdge} from \"../Edge\";\nimport {AbortMapillaryError} from \"../Error\";\nimport {IEdgeStatus, Node} from \"../Graph\";\nimport {Container, Navigator} from \"../Viewer\";\nimport {ComponentService, Component, IComponentConfiguration, INavigationConfiguration} from \"../Component\";\n\nimport {IVNodeHash} from \"../Render\";\n\n/**\n * @class NavigationComponent\n *\n * @classdesc Fallback navigation component for environments without WebGL support.\n *\n * Replaces the functionality in the Direction and Sequence components.\n */\nexport class NavigationComponent extends Component<IComponentConfiguration> {\n public static componentName: string = \"navigation\";\n\n private _renderSubscription: Subscription;\n\n private _seqNames: { [dir: string]: string };\n private _spaTopNames: { [dir: string]: string };\n private _spaBottomNames: { [dir: string]: string };\n\n /** @ignore */\n constructor(name: string, container: Container, navigator: Navigator) {\n super(name, container, navigator);\n\n this._seqNames = {};\n this._seqNames[EdgeDirection[EdgeDirection.Prev]] = \"Prev\";\n this._seqNames[EdgeDirection[EdgeDirection.Next]] = \"Next\";\n\n this._spaTopNames = {};\n this._spaTopNames[EdgeDirection[EdgeDirection.TurnLeft]] = \"Turnleft\";\n this._spaTopNames[EdgeDirection[EdgeDirection.StepLeft]] = \"Left\";\n this._spaTopNames[EdgeDirection[EdgeDirection.StepForward]] = \"Forward\";\n this._spaTopNames[EdgeDirection[EdgeDirection.StepRight]] = \"Right\";\n this._spaTopNames[EdgeDirection[EdgeDirection.TurnRight]] = \"Turnright\";\n\n this._spaBottomNames = {};\n this._spaBottomNames[EdgeDirection[EdgeDirection.TurnU]] = \"Turnaround\";\n this._spaBottomNames[EdgeDirection[EdgeDirection.StepBackward]] = \"Backward\";\n }\n\n protected _activate(): void {\n this._renderSubscription = observableCombineLatest(\n this._navigator.stateService.currentNode$,\n this._configuration$).pipe(\n switchMap(\n ([node, configuration]: [Node, INavigationConfiguration]): Observable<EdgeDirection[]> => {\n const sequenceEdges$: Observable<EdgeDirection[]> = configuration.sequence ?\n node.sequenceEdges$.pipe(\n map(\n (status: IEdgeStatus): EdgeDirection[] => {\n return status.edges\n .map(\n (edge: IEdge): EdgeDirection => {\n return edge.data.direction;\n });\n })) :\n observableOf<EdgeDirection[]>([]);\n\n const spatialEdges$: Observable<EdgeDirection[]> = !node.pano && configuration.spatial ?\n node.spatialEdges$.pipe(\n map(\n (status: IEdgeStatus): EdgeDirection[] => {\n return status.edges\n .map(\n (edge: IEdge): EdgeDirection => {\n return edge.data.direction;\n });\n })) :\n observableOf<EdgeDirection[]>([]);\n\n return observableCombineLatest(\n sequenceEdges$,\n spatialEdges$).pipe(\n map(\n ([seq, spa]: [EdgeDirection[], EdgeDirection[]]): EdgeDirection[] => {\n return seq.concat(spa);\n }));\n }),\n map(\n (edgeDirections: EdgeDirection[]): IVNodeHash => {\n const seqs: vd.VNode[] = this._createArrowRow(this._seqNames, edgeDirections);\n const spaTops: vd.VNode[] = this._createArrowRow(this._spaTopNames, edgeDirections);\n const spaBottoms: vd.VNode[] = this._createArrowRow(this._spaBottomNames, edgeDirections);\n\n const seqContainer: vd.VNode = vd.h(`div.NavigationSequence`, seqs);\n const spaTopContainer: vd.VNode = vd.h(`div.NavigationSpatialTop`, spaTops);\n const spaBottomContainer: vd.VNode = vd.h(`div.NavigationSpatialBottom`, spaBottoms);\n const spaContainer: vd.VNode = vd.h(`div.NavigationSpatial`, [spaTopContainer, spaBottomContainer]);\n\n return { name: this._name, vnode: vd.h(`div.NavigationContainer`, [seqContainer, spaContainer]) };\n }))\n .subscribe(this._container.domRenderer.render$);\n }\n\n protected _deactivate(): void {\n this._renderSubscription.unsubscribe();\n }\n\n protected _getDefaultConfiguration(): INavigationConfiguration {\n return { sequence: true, spatial: true };\n }\n\n private _createArrowRow(arrowNames: { [dir: string]: string }, edgeDirections: EdgeDirection[]): vd.VNode[] {\n const arrows: vd.VNode[] = [];\n\n for (const arrowName in arrowNames) {\n if (!(arrowNames.hasOwnProperty(arrowName))) {\n continue;\n }\n\n const direction: EdgeDirection = EdgeDirection[<keyof typeof EdgeDirection>arrowName];\n if (edgeDirections.indexOf(direction) !== -1) {\n arrows.push(this._createVNode(direction, arrowNames[arrowName], \"visible\"));\n } else {\n arrows.push(this._createVNode(direction, arrowNames[arrowName], \"hidden\"));\n }\n }\n\n return arrows;\n }\n\n private _createVNode(direction: EdgeDirection, name: string, visibility: string): vd.VNode {\n return vd.h(\n `span.Direction.Direction${name}`,\n {\n onclick: (ev: Event): void => {\n this._navigator.moveDir$(direction)\n .subscribe(\n undefined,\n (error: Error): void => {\n if (!(error instanceof AbortMapillaryError)) {\n console.error(error);\n }\n });\n },\n style: {\n visibility: visibility,\n },\n },\n []);\n }\n}\n\nComponentService.register(NavigationComponent);\nexport default NavigationComponent;\n",
+ "import {\n combineLatest as observableCombineLatest,\n of as observableOf,\n from as observableFrom,\n Observable,\n Subscription,\n} from \"rxjs\";\n\nimport {\n map,\n filter,\n distinctUntilChanged,\n mergeMap,\n distinct,\n scan,\n pluck,\n} from \"rxjs/operators\";\n\nimport * as vd from \"virtual-dom\";\n\nimport {ISequence} from \"../API\";\nimport {IRouteConfiguration, IRoutePath, ComponentService, Component} from \"../Component\";\nimport {Node} from \"../Graph\";\nimport {IVNodeHash} from \"../Render\";\nimport {IFrame} from \"../State\";\nimport {Container, Navigator} from \"../Viewer\";\n\ninterface IRtAndFrame {\n routeTrack: RouteTrack;\n frame: IFrame;\n conf: IRouteConfiguration;\n}\n\ninterface IConfAndNode {\n conf: IRouteConfiguration;\n node: Node;\n}\n\ninterface INodeInstruction {\n key: string;\n description: string;\n}\n\ninterface IInstructionPlace {\n place: number;\n nodeInstructions: INodeInstruction[];\n}\n\nclass DescriptionState {\n public description: string;\n public showsLeft: number;\n}\n\nclass RouteState {\n public routeTrack: RouteTrack;\n public currentNode: Node;\n public lastNode: Node;\n public playing: boolean;\n}\n\nclass RouteTrack {\n public nodeInstructions: INodeInstruction[] = [];\n public nodeInstructionsOrdered: INodeInstruction[][] = [];\n}\n\nexport class RouteComponent extends Component<IRouteConfiguration> {\n public static componentName: string = \"route\";\n\n private _disposable: Subscription;\n private _disposableDescription: Subscription;\n\n constructor(name: string, container: Container, navigator: Navigator) {\n super(name, container, navigator);\n }\n\n protected _activate(): void {\n let slowedStream$: Observable<IFrame> = this._navigator.stateService.currentState$.pipe(\n filter(\n (frame: IFrame) => {\n return (frame.id % 2) === 0;\n }),\n filter(\n (frame: IFrame) => {\n return frame.state.nodesAhead < 15;\n }),\n distinctUntilChanged(\n undefined,\n (frame: IFrame): string => {\n return frame.state.lastNode.key;\n }));\n\n let routeTrack$: Observable<RouteTrack> = observableCombineLatest(\n this.configuration$.pipe(\n mergeMap(\n (conf: IRouteConfiguration): Observable<IRoutePath> => {\n return observableFrom<IRoutePath>(conf.paths);\n }),\n distinct(\n (p: IRoutePath): string => {\n return p.sequenceKey;\n }),\n mergeMap(\n (path: IRoutePath): Observable<ISequence> => {\n return this._navigator.apiV3.sequenceByKey$([path.sequenceKey]).pipe(\n map(\n (sequenceByKey: { [sequenceKey: string]: ISequence }): ISequence => {\n return sequenceByKey[path.sequenceKey];\n }));\n })),\n this.configuration$).pipe(\n map(\n ([sequence, conf]: [ISequence, IRouteConfiguration]): IInstructionPlace[] => {\n let i: number = 0;\n let instructionPlaces: IInstructionPlace[] = [];\n\n for (let path of conf.paths) {\n if (path.sequenceKey === sequence.key) {\n let nodeInstructions: INodeInstruction[] = [];\n let saveKey: boolean = false;\n for (let key of sequence.keys) {\n if (path.startKey === key) {\n saveKey = true;\n }\n if (saveKey) {\n let description: string = null;\n\n for (let infoKey of path.infoKeys) {\n if (infoKey.key === key) {\n description = infoKey.description;\n }\n }\n\n nodeInstructions.push({description: description, key: key});\n }\n if (path.stopKey === key) {\n saveKey = false;\n }\n }\n instructionPlaces.push({nodeInstructions: nodeInstructions, place: i});\n }\n i++;\n }\n\n return instructionPlaces;\n }),\n scan(\n (routeTrack: RouteTrack, instructionPlaces: IInstructionPlace[]): RouteTrack => {\n for (let instructionPlace of instructionPlaces) {\n routeTrack.nodeInstructionsOrdered[instructionPlace.place] = instructionPlace.nodeInstructions;\n }\n\n for (const place in routeTrack.nodeInstructionsOrdered) {\n if (!routeTrack.nodeInstructionsOrdered.hasOwnProperty(place)) {\n continue;\n }\n\n const instructionGroup: INodeInstruction[] = routeTrack.nodeInstructionsOrdered[place];\n\n for (const instruction of instructionGroup) {\n routeTrack.nodeInstructions.push(instruction);\n }\n }\n\n return routeTrack;\n },\n new RouteTrack()));\n\n const cacheNode$: any = observableCombineLatest(\n slowedStream$,\n routeTrack$,\n this.configuration$).pipe(\n map(\n ([frame, routeTrack, conf]: [IFrame, RouteTrack, IRouteConfiguration]): IRtAndFrame => {\n return {conf: conf, frame: frame, routeTrack: routeTrack};\n }),\n scan(\n (routeState: RouteState, rtAndFrame: IRtAndFrame): RouteState => {\n if (rtAndFrame.conf.playing === undefined || rtAndFrame.conf.playing) {\n routeState.routeTrack = rtAndFrame.routeTrack;\n routeState.currentNode = rtAndFrame.frame.state.currentNode;\n routeState.lastNode = rtAndFrame.frame.state.lastNode;\n routeState.playing = true;\n } else {\n this._navigator.stateService.cutNodes();\n routeState.playing = false;\n }\n return routeState;\n },\n new RouteState()),\n filter(\n (routeState: RouteState): boolean => {\n return routeState.playing;\n }),\n filter(\n (routeState: RouteState): boolean => {\n for (let nodeInstruction of routeState.routeTrack.nodeInstructions) {\n if (!nodeInstruction) {\n continue;\n }\n if (nodeInstruction.key === routeState.lastNode.key) {\n return true;\n }\n }\n\n return false;\n }),\n distinctUntilChanged(\n undefined,\n (routeState: RouteState): string => {\n return routeState.lastNode.key;\n }),\n mergeMap(\n (routeState: RouteState): Observable<Node> => {\n let i: number = 0;\n for (let nodeInstruction of routeState.routeTrack.nodeInstructions) {\n if (nodeInstruction.key === routeState.lastNode.key) {\n break;\n }\n i++;\n }\n\n let nextInstruction: INodeInstruction = routeState.routeTrack.nodeInstructions[i + 1];\n if (!nextInstruction) {\n return observableOf<Node>(null);\n }\n\n return this._navigator.graphService.cacheNode$(nextInstruction.key);\n }));\n\n this._disposable = observableCombineLatest(\n cacheNode$,\n this.configuration$).pipe(\n map(\n ([node, conf]: [Node, IRouteConfiguration]): IConfAndNode => {\n return {conf: conf, node: node};\n }),\n filter(\n (cAN: IConfAndNode) => {\n return cAN.node !== null && cAN.conf.playing;\n }),\n pluck<IConfAndNode, Node>(\"node\"))\n .subscribe(this._navigator.stateService.appendNode$);\n\n this._disposableDescription = observableCombineLatest(\n this._navigator.stateService.currentNode$,\n routeTrack$,\n this.configuration$).pipe(\n map(\n ([node, routeTrack, conf]: [Node, RouteTrack, IRouteConfiguration]): string => {\n if (conf.playing !== undefined && !conf.playing) {\n return \"quit\";\n }\n\n let description: string = null;\n\n for (let nodeInstruction of routeTrack.nodeInstructions) {\n if (nodeInstruction.key === node.key) {\n description = nodeInstruction.description;\n break;\n }\n }\n\n return description;\n }),\n scan(\n (descriptionState: DescriptionState, description: string): DescriptionState => {\n if (description !== descriptionState.description && description !== null) {\n descriptionState.description = description;\n descriptionState.showsLeft = 6;\n } else {\n descriptionState.showsLeft--;\n }\n\n if (description === \"quit\") {\n descriptionState.description = null;\n }\n\n return descriptionState;\n },\n new DescriptionState(),\n ),\n map(\n (descriptionState: DescriptionState): IVNodeHash => {\n if (descriptionState.showsLeft > 0 && descriptionState.description) {\n return {name: this._name, vnode: this._getRouteAnnotationNode(descriptionState.description)};\n } else {\n return {name: this._name, vnode: vd.h(\"div\", [])};\n }\n }))\n .subscribe(this._container.domRenderer.render$);\n }\n\n protected _deactivate(): void {\n this._disposable.unsubscribe();\n this._disposableDescription.unsubscribe();\n }\n\n protected _getDefaultConfiguration(): IRouteConfiguration {\n return {};\n }\n\n public play(): void {\n this.configure({ playing: true });\n }\n\n public stop(): void {\n this.configure({ playing: false });\n }\n\n private _getRouteAnnotationNode(description: string): vd.VNode {\n return vd.h(\"div.RouteFrame\", {}, [\n vd.h(\"p\", {textContent: description}, []),\n ]);\n }\n}\n\nComponentService.register(RouteComponent);\nexport default RouteComponent;\n",
+ "import {empty as observableEmpty, Observable, Subscription, Scheduler} from \"rxjs\";\n\nimport {scan, catchError, mergeMap, debounceTime, filter, map, buffer} from \"rxjs/operators\";\n\nimport {ComponentService, Component, IComponentConfiguration} from \"../Component\";\nimport {Node} from \"../Graph\";\nimport {Container, Navigator} from \"../Viewer\";\n\ntype Keys = { [key: string]: boolean };\n\ninterface IKeys {\n report: string[];\n reported: Keys;\n}\n\nexport class StatsComponent extends Component<IComponentConfiguration> {\n public static componentName: string = \"stats\";\n\n private _sequenceSubscription: Subscription;\n private _imageSubscription: Subscription;\n\n private _scheduler: Scheduler;\n\n constructor(name: string, container: Container, navigator: Navigator, scheduler?: Scheduler) {\n super(name, container, navigator);\n\n this._scheduler = scheduler;\n }\n\n protected _activate(): void {\n this._sequenceSubscription = this._navigator.stateService.currentNode$.pipe(\n scan(\n (keys: IKeys, node: Node): IKeys => {\n let sKey: string = node.sequenceKey;\n keys.report = [];\n\n if (!(sKey in keys.reported)) {\n keys.report = [sKey];\n keys.reported[sKey] = true;\n }\n\n return keys;\n },\n { report: [], reported: {} }),\n filter(\n (keys: IKeys): boolean => {\n return keys.report.length > 0;\n }),\n mergeMap(\n (keys: IKeys): Observable<void> => {\n return this._navigator.apiV3.sequenceViewAdd$(keys.report).pipe(\n catchError(\n (error: Error, caught: Observable<void>): Observable<void> => {\n console.error(`Failed to report sequence stats (${keys.report})`, error);\n\n return observableEmpty();\n }));\n }))\n .subscribe(() => { /*noop*/ });\n\n this._imageSubscription = this._navigator.stateService.currentNode$.pipe(\n map(\n (node: Node): string => {\n return node.key;\n })).pipe(\n buffer(this._navigator.stateService.currentNode$.pipe(debounceTime(5000, this._scheduler))),\n scan(\n (keys: IKeys, newKeys: string[]): IKeys => {\n keys.report = [];\n\n for (let key of newKeys) {\n if (!(key in keys.reported)) {\n keys.report.push(key);\n keys.reported[key] = true;\n }\n }\n\n return keys;\n },\n { report: [], reported: {} }),\n filter(\n (keys: IKeys): boolean => {\n return keys.report.length > 0;\n }),\n mergeMap(\n (keys: IKeys): Observable<void> => {\n return this._navigator.apiV3.imageViewAdd$(keys.report).pipe(\n catchError(\n (error: Error, caught: Observable<void>): Observable<void> => {\n console.error(`Failed to report image stats (${keys.report})`, error);\n\n return observableEmpty();\n }));\n }))\n .subscribe(() => { /*noop*/ });\n }\n\n protected _deactivate(): void {\n this._sequenceSubscription.unsubscribe();\n this._imageSubscription.unsubscribe();\n }\n\n protected _getDefaultConfiguration(): IComponentConfiguration {\n return {};\n }\n}\n\nComponentService.register(StatsComponent);\nexport default StatsComponent;\n",
+ "import * as vd from \"virtual-dom\";\n\nimport {\n of as observableOf,\n combineLatest as observableCombineLatest,\n Observable,\n Subscription,\n Subject,\n} from \"rxjs\";\n\nimport {\n switchMap,\n share,\n startWith,\n withLatestFrom,\n map,\n filter,\n distinctUntilChanged,\n tap,\n catchError,\n} from \"rxjs/operators\";\n\nimport {\n ComponentService,\n Component,\n DirectionDOMRenderer,\n IDirectionConfiguration,\n} from \"../../Component\";\nimport {IEdgeStatus, Node, Sequence} from \"../../Graph\";\nimport {\n ISize,\n IVNodeHash,\n RenderCamera,\n} from \"../../Render\";\nimport {Container, Navigator} from \"../../Viewer\";\n\n/**\n * @class DirectionComponent\n * @classdesc Component showing navigation arrows for steps and turns.\n */\nexport class DirectionComponent extends Component<IDirectionConfiguration> {\n /** @inheritdoc */\n public static componentName: string = \"direction\";\n\n /**\n * Event fired when the hovered key changes.\n *\n * @description Emits the key of the node for the direction\n * arrow that is being hovered. When the mouse leaves a\n * direction arrow null is emitted.\n *\n * @event DirectionComponent#hoveredkeychanged\n * @type {string} The hovered key, null if no key is hovered.\n */\n public static hoveredkeychanged: string = \"hoveredkeychanged\";\n\n private _renderer: DirectionDOMRenderer;\n\n private _hoveredKeySubject$: Subject<string>;\n private _hoveredKey$: Observable<string>;\n\n private _configurationSubscription: Subscription;\n private _emitHoveredKeySubscription: Subscription;\n private _hoveredKeySubscription: Subscription;\n private _nodeSubscription: Subscription;\n private _renderCameraSubscription: Subscription;\n private _resizeSubscription: Subscription;\n\n constructor(name: string, container: Container, navigator: Navigator, directionDOMRenderer?: DirectionDOMRenderer) {\n super(name, container, navigator);\n\n this._renderer = !!directionDOMRenderer ?\n directionDOMRenderer :\n new DirectionDOMRenderer(\n this.defaultConfiguration,\n { height: container.element.offsetHeight, width: container.element.offsetWidth });\n\n this._hoveredKeySubject$ = new Subject<string>();\n\n this._hoveredKey$ = this._hoveredKeySubject$.pipe(share());\n }\n\n /**\n * Get hovered key observable.\n *\n * @description An observable emitting the key of the node for the direction\n * arrow that is being hovered. When the mouse leaves a direction arrow null\n * is emitted.\n *\n * @returns {Observable<string>}\n */\n public get hoveredKey$(): Observable<string> {\n return this._hoveredKey$;\n }\n\n /**\n * Set highlight key.\n *\n * @description The arrow pointing towards the node corresponding to the\n * highlight key will be highlighted.\n *\n * @param {string} highlightKey Key of node to be highlighted if existing\n * among arrows.\n */\n public setHighlightKey(highlightKey: string): void {\n this.configure({ highlightKey: highlightKey });\n }\n\n /**\n * Set min width of container element.\n *\n * @description Set min width of the non transformed container element holding\n * the navigation arrows. If the min width is larger than the max width the\n * min width value will be used.\n *\n * The container element is automatically resized when the resize\n * method on the Viewer class is called.\n *\n * @param {number} minWidth\n */\n public setMinWidth(minWidth: number): void {\n this.configure({ minWidth: minWidth });\n }\n\n /**\n * Set max width of container element.\n *\n * @description Set max width of the non transformed container element holding\n * the navigation arrows. If the min width is larger than the max width the\n * min width value will be used.\n *\n * The container element is automatically resized when the resize\n * method on the Viewer class is called.\n *\n * @param {number} minWidth\n */\n public setMaxWidth(maxWidth: number): void {\n this.configure({ maxWidth: maxWidth });\n }\n\n protected _activate(): void {\n this._configurationSubscription = this._configuration$\n .subscribe(\n (configuration: IDirectionConfiguration): void => {\n this._renderer.setConfiguration(configuration);\n });\n\n this._resizeSubscription = this._container.renderService.size$\n .subscribe(\n (size: ISize): void => {\n this._renderer.resize(size);\n });\n\n this._nodeSubscription = this._navigator.stateService.currentNode$.pipe(\n tap(\n (node: Node): void => {\n this._container.domRenderer.render$.next({name: this._name, vnode: vd.h(\"div\", {}, [])});\n this._renderer.setNode(node);\n }),\n withLatestFrom(this._configuration$),\n switchMap(\n ([node, configuration]: [Node, IDirectionConfiguration]): Observable<[IEdgeStatus, Sequence]> => {\n return observableCombineLatest(\n node.spatialEdges$,\n configuration.distinguishSequence ?\n this._navigator.graphService\n .cacheSequence$(node.sequenceKey).pipe(\n catchError(\n (error: Error, caught: Observable<Sequence>): Observable<Sequence> => {\n console.error(`Failed to cache sequence (${node.sequenceKey})`, error);\n\n return observableOf<Sequence>(null);\n })) :\n observableOf<Sequence>(null));\n }))\n .subscribe(\n ([edgeStatus, sequence]: [IEdgeStatus, Sequence]): void => {\n this._renderer.setEdges(edgeStatus, sequence);\n });\n\n this._renderCameraSubscription = this._container.renderService.renderCameraFrame$.pipe(\n tap(\n (renderCamera: RenderCamera): void => {\n this._renderer.setRenderCamera(renderCamera);\n }),\n map(\n (): DirectionDOMRenderer => {\n return this._renderer;\n }),\n filter(\n (renderer: DirectionDOMRenderer): boolean => {\n return renderer.needsRender;\n }),\n map(\n (renderer: DirectionDOMRenderer): IVNodeHash => {\n return { name: this._name, vnode: renderer.render(this._navigator) };\n }))\n .subscribe(this._container.domRenderer.render$);\n\n this._hoveredKeySubscription = observableCombineLatest(\n this._container.domRenderer.element$,\n this._container.renderService.renderCamera$,\n this._container.mouseService.mouseMove$.pipe(startWith(null)),\n this._container.mouseService.mouseUp$.pipe(startWith(null))).pipe(\n map(\n ([element]: [Element, RenderCamera, MouseEvent, MouseEvent]): string => {\n let elements: HTMLCollectionOf<Element> =\n <HTMLCollectionOf<Element>>element.getElementsByClassName(\"DirectionsPerspective\");\n\n for (let i: number = 0; i < elements.length; i++) {\n let hovered: Element = elements.item(i).querySelector(\":hover\");\n\n if (hovered != null && hovered.hasAttribute(\"data-key\")) {\n return hovered.getAttribute(\"data-key\");\n }\n }\n\n return null;\n }),\n distinctUntilChanged())\n .subscribe(this._hoveredKeySubject$);\n\n this._emitHoveredKeySubscription = this._hoveredKey$\n .subscribe(\n (key: string): void => {\n this.fire(DirectionComponent.hoveredkeychanged, key);\n });\n }\n\n protected _deactivate(): void {\n this._configurationSubscription.unsubscribe();\n this._emitHoveredKeySubscription.unsubscribe();\n this._hoveredKeySubscription.unsubscribe();\n this._nodeSubscription.unsubscribe();\n this._renderCameraSubscription.unsubscribe();\n }\n\n protected _getDefaultConfiguration(): IDirectionConfiguration {\n return {\n distinguishSequence: false,\n maxWidth: 460,\n minWidth: 260,\n };\n }\n}\n\nComponentService.register(DirectionComponent);\nexport default DirectionComponent;\n",
+ "import {IDirectionConfiguration} from \"../../Component\";\nimport {Spatial} from \"../../Geo\";\nimport {ISize} from \"../../Render\";\n\n/**\n * @class DirectionDOMCalculator\n * @classdesc Helper class for calculating DOM CSS properties.\n */\nexport class DirectionDOMCalculator {\n private _spatial: Spatial;\n\n private _elementWidth: number;\n private _elementHeight: number;\n\n private _minWidth: number;\n private _maxWidth: number;\n\n private _minThresholdWidth: number;\n private _maxThresholdWidth: number;\n private _minThresholdHeight: number;\n private _maxThresholdHeight: number;\n\n private _containerWidth: number;\n private _containerWidthCss: string;\n private _containerMarginCss: string;\n private _containerLeftCss: string;\n private _containerHeight: number;\n private _containerHeightCss: string;\n private _containerBottomCss: string;\n\n private _stepCircleSize: number;\n private _stepCircleSizeCss: string;\n private _stepCircleMarginCss: string;\n\n private _turnCircleSize: number;\n private _turnCircleSizeCss: string;\n\n private _outerRadius: number;\n private _innerRadius: number;\n\n private _shadowOffset: number;\n\n constructor(configuration: IDirectionConfiguration, size: ISize) {\n this._spatial = new Spatial();\n\n this._minThresholdWidth = 320;\n this._maxThresholdWidth = 1480;\n this._minThresholdHeight = 240;\n this._maxThresholdHeight = 820;\n\n this._configure(configuration);\n this._resize(size);\n this._reset();\n }\n\n public get minWidth(): number {\n return this._minWidth;\n }\n\n public get maxWidth(): number {\n return this._maxWidth;\n }\n\n public get containerWidth(): number {\n return this._containerWidth;\n }\n\n public get containerWidthCss(): string {\n return this._containerWidthCss;\n }\n\n public get containerMarginCss(): string {\n return this._containerMarginCss;\n }\n\n public get containerLeftCss(): string {\n return this._containerLeftCss;\n }\n\n public get containerHeight(): number {\n return this._containerHeight;\n }\n\n public get containerHeightCss(): string {\n return this._containerHeightCss;\n }\n\n public get containerBottomCss(): string {\n return this._containerBottomCss;\n }\n\n public get stepCircleSize(): number {\n return this._stepCircleSize;\n }\n\n public get stepCircleSizeCss(): string {\n return this._stepCircleSizeCss;\n }\n\n public get stepCircleMarginCss(): string {\n return this._stepCircleMarginCss;\n }\n\n public get turnCircleSize(): number {\n return this._turnCircleSize;\n }\n\n public get turnCircleSizeCss(): string {\n return this._turnCircleSizeCss;\n }\n\n public get outerRadius(): number {\n return this._outerRadius;\n }\n\n public get innerRadius(): number {\n return this._innerRadius;\n }\n\n public get shadowOffset(): number {\n return this._shadowOffset;\n }\n\n /**\n * Configures the min and max width values.\n *\n * @param {IDirectionConfiguration} configuration Configuration\n * with min and max width values.\n */\n public configure(configuration: IDirectionConfiguration): void {\n this._configure(configuration);\n this._reset();\n }\n\n /**\n * Resizes all properties according to the width and height\n * of the size object.\n *\n * @param {ISize} size The size of the container element.\n */\n public resize(size: ISize): void {\n this._resize(size);\n this._reset();\n }\n\n /**\n * Calculates the coordinates on the unit circle for an angle.\n *\n * @param {number} angle Angle in radians.\n * @returns {Array<number>} The x and y coordinates on the unit circle.\n */\n public angleToCoordinates(angle: number): number[] {\n return [Math.cos(angle), Math.sin(angle)];\n }\n\n /**\n * Calculates the coordinates on the unit circle for the\n * relative angle between the first and second angle.\n *\n * @param {number} first Angle in radians.\n * @param {number} second Angle in radians.\n * @returns {Array<number>} The x and y coordinates on the unit circle\n * for the relative angle between the first and second angle.\n */\n public relativeAngleToCoordiantes(first: number, second: number): number[] {\n let relativeAngle: number = this._spatial.wrapAngle(first - second);\n\n return this.angleToCoordinates(relativeAngle);\n }\n\n private _configure(configuration: IDirectionConfiguration): void {\n this._minWidth = configuration.minWidth;\n this._maxWidth = this._getMaxWidth(configuration.minWidth, configuration.maxWidth);\n }\n\n private _resize(size: ISize): void {\n this._elementWidth = size.width;\n this._elementHeight = size.height;\n }\n\n private _reset(): void {\n this._containerWidth = this._getContainerWidth(this._elementWidth, this._elementHeight);\n this._containerHeight = this._getContainerHeight(this.containerWidth);\n this._stepCircleSize = this._getStepCircleDiameter(this._containerHeight);\n this._turnCircleSize = this._getTurnCircleDiameter(this.containerHeight);\n this._outerRadius = this._getOuterRadius(this._containerHeight);\n this._innerRadius = this._getInnerRadius(this._containerHeight);\n\n this._shadowOffset = 3;\n\n this._containerWidthCss = this._numberToCssPixels(this._containerWidth);\n this._containerMarginCss = this._numberToCssPixels(-0.5 * this._containerWidth);\n this._containerLeftCss = this._numberToCssPixels(Math.floor(0.5 * this._elementWidth));\n this._containerHeightCss = this._numberToCssPixels(this._containerHeight);\n this._containerBottomCss = this._numberToCssPixels(Math.floor(-0.08 * this._containerHeight));\n this._stepCircleSizeCss = this._numberToCssPixels(this._stepCircleSize);\n this._stepCircleMarginCss = this._numberToCssPixels(-0.5 * this._stepCircleSize);\n this._turnCircleSizeCss = this._numberToCssPixels(this._turnCircleSize);\n }\n\n private _getContainerWidth(elementWidth: number, elementHeight: number): number {\n let relativeWidth: number =\n (elementWidth - this._minThresholdWidth) / (this._maxThresholdWidth - this._minThresholdWidth);\n let relativeHeight: number =\n (elementHeight - this._minThresholdHeight) / (this._maxThresholdHeight - this._minThresholdHeight);\n\n let coeff: number = Math.max(0, Math.min(1, Math.min(relativeWidth, relativeHeight)));\n\n coeff = 0.04 * Math.round(25 * coeff);\n\n return this._minWidth + coeff * (this._maxWidth - this._minWidth);\n }\n\n private _getContainerHeight(containerWidth: number): number {\n return 0.77 * containerWidth;\n }\n\n private _getStepCircleDiameter(containerHeight: number): number {\n return 0.34 * containerHeight;\n }\n\n private _getTurnCircleDiameter(containerHeight: number): number {\n return 0.3 * containerHeight;\n }\n\n private _getOuterRadius(containerHeight: number): number {\n return 0.31 * containerHeight;\n }\n\n private _getInnerRadius(containerHeight: number): number {\n return 0.125 * containerHeight;\n }\n\n private _numberToCssPixels(value: number): string {\n return value + \"px\";\n }\n\n private _getMaxWidth(value: number, minWidth: number): number {\n return value > minWidth ? value : minWidth;\n }\n}\n\nexport default DirectionDOMCalculator;\n",
+ "import * as vd from \"virtual-dom\";\n\nimport {\n DirectionDOMCalculator,\n IDirectionConfiguration,\n} from \"../../Component\";\nimport {\n EdgeDirection,\n IEdge,\n} from \"../../Edge\";\nimport {AbortMapillaryError} from \"../../Error\";\nimport {Spatial} from \"../../Geo\";\nimport {\n IEdgeStatus,\n Node,\n Sequence,\n} from \"../../Graph\";\nimport {\n ISize,\n RenderCamera,\n} from \"../../Render\";\nimport {IRotation} from \"../../State\";\nimport {Navigator} from \"../../Viewer\";\n\n/**\n * @class DirectionDOMRenderer\n * @classdesc DOM renderer for direction arrows.\n */\nexport class DirectionDOMRenderer {\n private _spatial: Spatial;\n private _calculator: DirectionDOMCalculator;\n\n private _node: Node;\n\n private _rotation: IRotation;\n private _epsilon: number;\n\n private _highlightKey: string;\n private _distinguishSequence: boolean;\n\n private _needsRender: boolean;\n\n private _stepEdges: IEdge[];\n private _turnEdges: IEdge[];\n private _panoEdges: IEdge[];\n private _sequenceEdgeKeys: string[];\n\n private _stepDirections: EdgeDirection[];\n private _turnDirections: EdgeDirection[];\n private _turnNames: {[dir: number]: string};\n\n private _isEdge: boolean = false;\n\n constructor(configuration: IDirectionConfiguration, size: ISize) {\n this._spatial = new Spatial();\n this._calculator = new DirectionDOMCalculator(configuration, size);\n\n this._node = null;\n\n this._rotation = { phi: 0, theta: 0 };\n this._epsilon = 0.5 * Math.PI / 180;\n\n this._highlightKey = null;\n this._distinguishSequence = false;\n\n this._needsRender = false;\n\n this._stepEdges = [];\n this._turnEdges = [];\n this._panoEdges = [];\n this._sequenceEdgeKeys = [];\n\n this._stepDirections = [\n EdgeDirection.StepForward,\n EdgeDirection.StepBackward,\n EdgeDirection.StepLeft,\n EdgeDirection.StepRight,\n ];\n\n this._turnDirections = [\n EdgeDirection.TurnLeft,\n EdgeDirection.TurnRight,\n EdgeDirection.TurnU,\n ];\n\n this._turnNames = {};\n this._turnNames[EdgeDirection.TurnLeft] = \"TurnLeft\";\n this._turnNames[EdgeDirection.TurnRight] = \"TurnRight\";\n this._turnNames[EdgeDirection.TurnU] = \"TurnAround\";\n\n // detects IE 8-11, then Edge 20+.\n let isIE: boolean = !!(<any>document).documentMode;\n this._isEdge = !isIE && !!(<any>window).StyleMedia;\n }\n\n /**\n * Get needs render.\n *\n * @returns {boolean} Value indicating whether render should be called.\n */\n public get needsRender(): boolean {\n return this._needsRender;\n }\n\n /**\n * Renders virtual DOM elements.\n *\n * @description Calling render resets the needs render property.\n */\n public render(navigator: Navigator): vd.VNode {\n this._needsRender = false;\n\n let rotation: IRotation = this._rotation;\n\n let steps: vd.VNode[] = [];\n let turns: vd.VNode[] = [];\n\n if (this._node.pano) {\n steps = steps.concat(this._createPanoArrows(navigator, rotation));\n } else {\n steps = steps.concat(this._createPerspectiveToPanoArrows(navigator, rotation));\n steps = steps.concat(this._createStepArrows(navigator, rotation));\n turns = turns.concat(this._createTurnArrows(navigator));\n }\n\n return this._getContainer(steps, turns, rotation);\n }\n\n public setEdges(edgeStatus: IEdgeStatus, sequence: Sequence): void {\n this._setEdges(edgeStatus, sequence);\n\n this._setNeedsRender();\n }\n\n /**\n * Set node for which to show edges.\n *\n * @param {Node} node\n */\n public setNode(node: Node): void {\n this._node = node;\n this._clearEdges();\n\n this._setNeedsRender();\n }\n\n /**\n * Set the render camera to use for calculating rotations.\n *\n * @param {RenderCamera} renderCamera\n */\n public setRenderCamera(renderCamera: RenderCamera): void {\n let rotation: IRotation = renderCamera.rotation;\n\n if (Math.abs(rotation.phi - this._rotation.phi) < this._epsilon) {\n return;\n }\n\n this._rotation = rotation;\n\n this._setNeedsRender();\n }\n\n /**\n * Set configuration values.\n *\n * @param {IDirectionConfiguration} configuration\n */\n public setConfiguration(configuration: IDirectionConfiguration): void {\n let needsRender: boolean = false;\n if (this._highlightKey !== configuration.highlightKey ||\n this._distinguishSequence !== configuration.distinguishSequence) {\n this._highlightKey = configuration.highlightKey;\n this._distinguishSequence = configuration.distinguishSequence;\n\n needsRender = true;\n }\n\n if (this._calculator.minWidth !== configuration.minWidth ||\n this._calculator.maxWidth !== configuration.maxWidth) {\n this._calculator.configure(configuration);\n needsRender = true;\n }\n\n if (needsRender) {\n this._setNeedsRender();\n }\n }\n\n /**\n * Detect the element's width and height and resize\n * elements accordingly.\n *\n * @param {ISize} size Size of vßiewer container element.\n */\n public resize(size: ISize): void {\n this._calculator.resize(size);\n\n this._setNeedsRender();\n }\n\n private _setNeedsRender(): void {\n if (this._node != null) {\n this._needsRender = true;\n }\n }\n\n private _clearEdges(): void {\n this._stepEdges = [];\n this._turnEdges = [];\n this._panoEdges = [];\n this._sequenceEdgeKeys = [];\n }\n\n private _setEdges(edgeStatus: IEdgeStatus, sequence: Sequence): void {\n this._stepEdges = [];\n this._turnEdges = [];\n this._panoEdges = [];\n this._sequenceEdgeKeys = [];\n\n for (let edge of edgeStatus.edges) {\n let direction: EdgeDirection = edge.data.direction;\n\n if (this._stepDirections.indexOf(direction) > -1) {\n this._stepEdges.push(edge);\n continue;\n }\n\n if (this._turnDirections.indexOf(direction) > -1) {\n this._turnEdges.push(edge);\n continue;\n }\n\n if (edge.data.direction === EdgeDirection.Pano) {\n this._panoEdges.push(edge);\n }\n }\n\n if (this._distinguishSequence && sequence != null) {\n let edges: IEdge[] = this._panoEdges\n .concat(this._stepEdges)\n .concat(this._turnEdges);\n\n for (let edge of edges) {\n let edgeKey: string = edge.to;\n\n for (let sequenceKey of sequence.keys) {\n if (sequenceKey === edgeKey) {\n this._sequenceEdgeKeys.push(edgeKey);\n break;\n }\n }\n }\n }\n }\n\n private _createPanoArrows(navigator: Navigator, rotation: IRotation): vd.VNode[] {\n let arrows: vd.VNode[] = [];\n\n for (let panoEdge of this._panoEdges) {\n arrows.push(\n this._createVNodeByKey(\n navigator,\n panoEdge.to,\n panoEdge.data.worldMotionAzimuth,\n rotation,\n this._calculator.outerRadius,\n \"DirectionsArrowPano\"));\n }\n\n for (let stepEdge of this._stepEdges) {\n arrows.push(\n this._createPanoToPerspectiveArrow(\n navigator,\n stepEdge.to,\n stepEdge.data.worldMotionAzimuth,\n rotation,\n stepEdge.data.direction));\n }\n\n return arrows;\n }\n\n private _createPanoToPerspectiveArrow(\n navigator: Navigator,\n key: string,\n azimuth: number,\n rotation: IRotation,\n direction: EdgeDirection): vd.VNode {\n\n let threshold: number = Math.PI / 8;\n\n let relativePhi: number = rotation.phi;\n\n switch (direction) {\n case EdgeDirection.StepBackward:\n relativePhi = rotation.phi - Math.PI;\n break;\n case EdgeDirection.StepLeft:\n relativePhi = rotation.phi + Math.PI / 2;\n break;\n case EdgeDirection.StepRight:\n relativePhi = rotation.phi - Math.PI / 2;\n break;\n default:\n break;\n }\n\n if (Math.abs(this._spatial.wrapAngle(azimuth - relativePhi)) < threshold) {\n return this._createVNodeByKey(\n navigator,\n key,\n azimuth,\n rotation,\n this._calculator.outerRadius,\n \"DirectionsArrowStep\");\n }\n\n return this._createVNodeDisabled(key, azimuth, rotation);\n }\n\n private _createPerspectiveToPanoArrows(navigator: Navigator, rotation: IRotation): vd.VNode[] {\n let arrows: vd.VNode[] = [];\n\n for (let panoEdge of this._panoEdges) {\n arrows.push(\n this._createVNodeByKey(\n navigator,\n panoEdge.to,\n panoEdge.data.worldMotionAzimuth,\n rotation,\n this._calculator.innerRadius,\n \"DirectionsArrowPano\",\n true));\n }\n\n return arrows;\n }\n\n private _createStepArrows(navigator: Navigator, rotation: IRotation): vd.VNode[] {\n let arrows: vd.VNode[] = [];\n\n for (let stepEdge of this._stepEdges) {\n arrows.push(\n this._createVNodeByDirection(\n navigator,\n stepEdge.to,\n stepEdge.data.worldMotionAzimuth,\n rotation,\n stepEdge.data.direction));\n }\n\n return arrows;\n }\n\n private _createTurnArrows(navigator: Navigator): vd.VNode[] {\n let turns: vd.VNode[] = [];\n\n for (let turnEdge of this._turnEdges) {\n let direction: EdgeDirection = turnEdge.data.direction;\n let name: string = this._turnNames[direction];\n\n turns.push(\n this._createVNodeByTurn(\n navigator,\n turnEdge.to,\n name,\n direction));\n }\n\n return turns;\n }\n\n private _createVNodeByKey(\n navigator: Navigator,\n key: string,\n azimuth: number,\n rotation: IRotation,\n offset: number,\n className: string,\n shiftVertically?: boolean): vd.VNode {\n\n let onClick: (e: Event) => void =\n (e: Event): void => {\n navigator.moveToKey$(key)\n .subscribe(\n undefined,\n (error: Error): void => {\n if (!(error instanceof AbortMapillaryError)) {\n console.error(error);\n }\n });\n };\n\n return this._createVNode(\n key,\n azimuth,\n rotation,\n offset,\n className,\n \"DirectionsCircle\",\n onClick,\n shiftVertically);\n }\n\n private _createVNodeByDirection(\n navigator: Navigator,\n key: string,\n azimuth: number,\n rotation: IRotation,\n direction: EdgeDirection): vd.VNode {\n\n let onClick: (e: Event) => void =\n (e: Event): void => {\n navigator.moveDir$(direction)\n .subscribe(\n undefined,\n (error: Error): void => {\n if (!(error instanceof AbortMapillaryError)) {\n console.error(error);\n }\n });\n };\n\n return this._createVNode(\n key,\n azimuth,\n rotation,\n this._calculator.outerRadius,\n \"DirectionsArrowStep\",\n \"DirectionsCircle\",\n onClick);\n }\n\n private _createVNodeByTurn(\n navigator: Navigator,\n key: string,\n className: string,\n direction: EdgeDirection): vd.VNode {\n\n let onClick: (e: Event) => void =\n (e: Event): void => {\n navigator.moveDir$(direction)\n .subscribe(\n undefined,\n (error: Error): void => {\n if (!(error instanceof AbortMapillaryError)) {\n console.error(error);\n }\n });\n };\n\n let style: any = {\n height: this._calculator.turnCircleSizeCss,\n transform: \"rotate(0)\", // apply transform to preserve 3D\n width: this._calculator.turnCircleSizeCss,\n };\n\n switch (direction) {\n case EdgeDirection.TurnLeft:\n style.left = \"5px\";\n style.top = \"5px\";\n break;\n case EdgeDirection.TurnRight:\n style.right = \"5px\";\n style.top = \"5px\";\n break;\n case EdgeDirection.TurnU:\n style.left = \"5px\";\n style.bottom = \"5px\";\n break;\n default:\n break;\n }\n\n let circleProperties: vd.createProperties = {\n attributes: {\n \"data-key\": key,\n },\n onclick: onClick,\n style: style,\n };\n\n let circleClassName: string = \"TurnCircle\";\n\n if (this._sequenceEdgeKeys.indexOf(key) > -1) {\n circleClassName += \"Sequence\";\n }\n\n if (this._highlightKey === key) {\n circleClassName += \"Highlight\";\n }\n\n let turn: vd.VNode = vd.h(`div.${className}`, {}, []);\n\n return vd.h(\"div.\" + circleClassName, circleProperties, [turn]);\n }\n\n private _createVNodeDisabled(key: string, azimuth: number, rotation: IRotation): vd.VNode {\n return this._createVNode(\n key,\n azimuth,\n rotation,\n this._calculator.outerRadius,\n \"DirectionsArrowDisabled\",\n \"DirectionsCircleDisabled\");\n }\n\n private _createVNode(\n key: string,\n azimuth: number,\n rotation: IRotation,\n radius: number,\n className: string,\n circleClassName: string,\n onClick?: (e: Event) => void,\n shiftVertically?: boolean): vd.VNode {\n\n let translation: number[] = this._calculator.angleToCoordinates(azimuth - rotation.phi);\n\n // rotate 90 degrees clockwise and flip over X-axis\n let translationX: number = Math.round(-radius * translation[1] + 0.5 * this._calculator.containerWidth);\n let translationY: number = Math.round(-radius * translation[0] + 0.5 * this._calculator.containerHeight);\n\n let shadowTranslation: number[] = this._calculator.relativeAngleToCoordiantes(azimuth, rotation.phi);\n let shadowOffset: number = this._calculator.shadowOffset;\n let shadowTranslationX: number = -shadowOffset * shadowTranslation[1];\n let shadowTranslationY: number = shadowOffset * shadowTranslation[0];\n\n let filter: string = `drop-shadow(${shadowTranslationX}px ${shadowTranslationY}px 1px rgba(0,0,0,0.8))`;\n\n let properties: vd.createProperties = {\n style: {\n \"-webkit-filter\": filter,\n filter: filter,\n },\n };\n\n let chevron: vd.VNode = vd.h(\"div.\" + className, properties, []);\n\n let azimuthDeg: number = -this._spatial.radToDeg(azimuth - rotation.phi);\n let circleTransform: string = shiftVertically ?\n `translate(${translationX}px, ${translationY}px) rotate(${azimuthDeg}deg) translateZ(-0.01px)` :\n `translate(${translationX}px, ${translationY}px) rotate(${azimuthDeg}deg)`;\n\n let circleProperties: vd.createProperties = {\n attributes: { \"data-key\": key },\n onclick: onClick,\n style: {\n height: this._calculator.stepCircleSizeCss,\n marginLeft: this._calculator.stepCircleMarginCss,\n marginTop: this._calculator.stepCircleMarginCss,\n transform: circleTransform,\n width: this._calculator.stepCircleSizeCss,\n },\n };\n\n if (this._sequenceEdgeKeys.indexOf(key) > -1) {\n circleClassName += \"Sequence\";\n }\n\n if (this._highlightKey === key) {\n circleClassName += \"Highlight\";\n }\n\n return vd.h(\"div.\" + circleClassName, circleProperties, [chevron]);\n }\n\n private _getContainer(\n steps: vd.VNode[],\n turns: vd.VNode[],\n rotation: IRotation): vd.VNode {\n\n // edge does not handle hover on perspective transforms.\n let transform: string = this._isEdge ?\n \"rotateX(60deg)\" :\n `perspective(${this._calculator.containerWidthCss}) rotateX(60deg)`;\n\n let properties: vd.createProperties = {\n oncontextmenu: (event: MouseEvent): void => { event.preventDefault(); },\n style: {\n bottom: this._calculator.containerBottomCss,\n height: this._calculator.containerHeightCss,\n left: this._calculator.containerLeftCss,\n marginLeft: this._calculator.containerMarginCss,\n transform: transform,\n width: this._calculator.containerWidthCss,\n },\n };\n\n return vd.h(\"div.DirectionsPerspective\", properties, turns.concat(steps));\n }\n}\n\nexport default DirectionDOMRenderer;\n",
+ "import * as THREE from \"three\";\n\nimport {\n empty as observableEmpty,\n of as observableOf,\n from as observableFrom,\n combineLatest as observableCombineLatest,\n Observable,\n Subscription,\n Subject,\n} from \"rxjs\";\n\nimport {\n switchMap,\n pairwise,\n debounceTime,\n refCount,\n publishReplay,\n withLatestFrom,\n scan,\n filter,\n first,\n catchError,\n takeUntil,\n startWith,\n skipWhile,\n map,\n publish,\n distinctUntilChanged,\n mergeMap,\n share,\n} from \"rxjs/operators\";\n\nimport {\n ComponentService,\n Component,\n IComponentConfiguration,\n ImagePlaneGLRenderer,\n} from \"../../Component\";\nimport {\n GeoCoords,\n Transform,\n Geo,\n} from \"../../Geo\";\nimport {\n ICurrentState,\n IFrame,\n} from \"../../State\";\nimport {\n Container,\n Navigator,\n ImageSize,\n} from \"../../Viewer\";\nimport {\n GLRenderStage,\n IGLRenderHash,\n ISize,\n RenderCamera,\n} from \"../../Render\";\nimport {\n Node as GraphNode,\n} from \"../../Graph\";\nimport {\n ImageTileLoader,\n ImageTileStore,\n IRegionOfInterest,\n RegionOfInterestCalculator,\n TextureProvider,\n} from \"../../Tiles\";\nimport {\n Settings,\n Urls,\n} from \"../../Utils\";\nimport ViewportCoords from \"../../geo/ViewportCoords\";\nimport Spatial from \"../../geo/Spatial\";\n\ninterface IImagePlaneGLRendererOperation {\n (renderer: ImagePlaneGLRenderer): ImagePlaneGLRenderer;\n}\n\ntype PositionLookat = [THREE.Vector3, THREE.Vector3, number, number, number];\n\nexport class ImagePlaneComponent extends Component<IComponentConfiguration> {\n public static componentName: string = \"imagePlane\";\n\n private _rendererOperation$: Subject<IImagePlaneGLRendererOperation>;\n private _renderer$: Observable<ImagePlaneGLRenderer>;\n private _rendererCreator$: Subject<void>;\n private _rendererDisposer$: Subject<void>;\n\n private _abortTextureProviderSubscription: Subscription;\n private _hasTextureSubscription: Subscription;\n private _rendererSubscription: Subscription;\n private _setRegionOfInterestSubscription: Subscription;\n private _setTextureProviderSubscription: Subscription;\n private _setTileSizeSubscription: Subscription;\n private _stateSubscription: Subscription;\n private _textureProviderSubscription: Subscription;\n private _updateBackgroundSubscription: Subscription;\n private _updateTextureImageSubscription: Subscription;\n\n private _clearPeripheryPlaneSubscription: Subscription;\n private _addPeripheryPlaneSubscription: Subscription;\n private _updatePeripheryPlaneTextureSubscription: Subscription;\n private _moveToPeripheryNodeSubscription: Subscription;\n\n private _imageTileLoader: ImageTileLoader;\n private _roiCalculator: RegionOfInterestCalculator;\n\n constructor (name: string, container: Container, navigator: Navigator) {\n super(name, container, navigator);\n\n this._imageTileLoader = new ImageTileLoader(Urls.tileScheme, Urls.tileDomain, Urls.origin);\n this._roiCalculator = new RegionOfInterestCalculator();\n\n this._rendererOperation$ = new Subject<IImagePlaneGLRendererOperation>();\n this._rendererCreator$ = new Subject<void>();\n this._rendererDisposer$ = new Subject<void>();\n\n this._renderer$ = this._rendererOperation$.pipe(\n scan(\n (renderer: ImagePlaneGLRenderer, operation: IImagePlaneGLRendererOperation): ImagePlaneGLRenderer => {\n return operation(renderer);\n },\n null),\n filter(\n (renderer: ImagePlaneGLRenderer): boolean => {\n return renderer != null;\n }),\n distinctUntilChanged(\n undefined,\n (renderer: ImagePlaneGLRenderer): number => {\n return renderer.frameId;\n }));\n\n this._rendererCreator$.pipe(\n map(\n (): IImagePlaneGLRendererOperation => {\n return (renderer: ImagePlaneGLRenderer): ImagePlaneGLRenderer => {\n if (renderer != null) {\n throw new Error(\"Multiple image plane states can not be created at the same time\");\n }\n\n return new ImagePlaneGLRenderer();\n };\n }))\n .subscribe(this._rendererOperation$);\n\n this._rendererDisposer$.pipe(\n map(\n (): IImagePlaneGLRendererOperation => {\n return (renderer: ImagePlaneGLRenderer): ImagePlaneGLRenderer => {\n renderer.dispose();\n\n return null;\n };\n }))\n .subscribe(this._rendererOperation$);\n }\n\n protected _activate(): void {\n this._rendererSubscription = this._renderer$.pipe(\n map(\n (renderer: ImagePlaneGLRenderer): IGLRenderHash => {\n let renderHash: IGLRenderHash = {\n name: this._name,\n render: {\n frameId: renderer.frameId,\n needsRender: renderer.needsRender,\n render: renderer.render.bind(renderer),\n stage: GLRenderStage.Background,\n },\n };\n\n renderer.clearNeedsRender();\n\n return renderHash;\n }))\n .subscribe(this._container.glRenderer.render$);\n\n this._rendererCreator$.next(null);\n\n this._stateSubscription = this._navigator.stateService.currentState$.pipe(\n map(\n (frame: IFrame): IImagePlaneGLRendererOperation => {\n return (renderer: ImagePlaneGLRenderer): ImagePlaneGLRenderer => {\n renderer.updateFrame(frame);\n\n return renderer;\n };\n }))\n .subscribe(this._rendererOperation$);\n\n let textureProvider$: Observable<TextureProvider> = this._navigator.stateService.currentState$.pipe(\n distinctUntilChanged(\n undefined,\n (frame: IFrame): string => {\n return frame.state.currentNode.key;\n }),\n withLatestFrom(\n this._container.glRenderer.webGLRenderer$,\n this._container.renderService.size$),\n map(\n ([frame, renderer, size]: [IFrame, THREE.WebGLRenderer, ISize]): TextureProvider => {\n let state: ICurrentState = frame.state;\n let viewportSize: number = Math.max(size.width, size.height);\n\n let currentNode: GraphNode = state.currentNode;\n let currentTransform: Transform = state.currentTransform;\n let tileSize: number = viewportSize > 2048 ? 2048 : viewportSize > 1024 ? 1024 : 512;\n\n return new TextureProvider(\n currentNode.key,\n currentTransform.basicWidth,\n currentTransform.basicHeight,\n tileSize,\n currentNode.image,\n this._imageTileLoader,\n new ImageTileStore(),\n renderer);\n }),\n publishReplay(1),\n refCount());\n\n this._textureProviderSubscription = textureProvider$.subscribe(() => { /*noop*/ });\n\n this._setTextureProviderSubscription = textureProvider$.pipe(\n map(\n (provider: TextureProvider): IImagePlaneGLRendererOperation => {\n return (renderer: ImagePlaneGLRenderer): ImagePlaneGLRenderer => {\n renderer.setTextureProvider(provider.key, provider);\n\n return renderer;\n };\n }))\n .subscribe(this._rendererOperation$);\n\n this._setTileSizeSubscription = this._container.renderService.size$.pipe(\n switchMap(\n (size: ISize): Observable<[TextureProvider, ISize]> => {\n return observableCombineLatest(\n textureProvider$,\n observableOf<ISize>(size)).pipe(\n first());\n }))\n .subscribe(\n ([provider, size]: [TextureProvider, ISize]): void => {\n let viewportSize: number = Math.max(size.width, size.height);\n let tileSize: number = viewportSize > 2048 ? 2048 : viewportSize > 1024 ? 1024 : 512;\n\n provider.setTileSize(tileSize);\n });\n\n this._abortTextureProviderSubscription = textureProvider$.pipe(\n pairwise())\n .subscribe(\n (pair: [TextureProvider, TextureProvider]): void => {\n let previous: TextureProvider = pair[0];\n previous.abort();\n });\n\n let roiTrigger$: Observable<[RenderCamera, ISize, Transform]> = observableCombineLatest(\n this._container.renderService.renderCameraFrame$,\n this._container.renderService.size$.pipe(debounceTime(250))).pipe(\n map(\n ([camera, size]: [RenderCamera, ISize]): PositionLookat => {\n return [\n camera.camera.position.clone(),\n camera.camera.lookat.clone(),\n camera.zoom.valueOf(),\n size.height.valueOf(),\n size.width.valueOf()];\n }),\n pairwise(),\n skipWhile(\n (pls: [PositionLookat, PositionLookat]): boolean => {\n return pls[1][2] - pls[0][2] < 0 || pls[1][2] === 0;\n }),\n map(\n (pls: [PositionLookat, PositionLookat]): boolean => {\n let samePosition: boolean = pls[0][0].equals(pls[1][0]);\n let sameLookat: boolean = pls[0][1].equals(pls[1][1]);\n let sameZoom: boolean = pls[0][2] === pls[1][2];\n let sameHeight: boolean = pls[0][3] === pls[1][3];\n let sameWidth: boolean = pls[0][4] === pls[1][4];\n\n return samePosition && sameLookat && sameZoom && sameHeight && sameWidth;\n }),\n distinctUntilChanged(),\n filter(\n (stalled: boolean): boolean => {\n return stalled;\n }),\n switchMap(\n (stalled: boolean): Observable<RenderCamera> => {\n return this._container.renderService.renderCameraFrame$.pipe(\n first());\n }),\n withLatestFrom(\n this._container.renderService.size$,\n this._navigator.stateService.currentTransform$));\n\n this._setRegionOfInterestSubscription = textureProvider$.pipe(\n switchMap(\n (provider: TextureProvider): Observable<[IRegionOfInterest, TextureProvider]> => {\n return roiTrigger$.pipe(\n map(\n ([camera, size, transform]: [RenderCamera, ISize, Transform]):\n [IRegionOfInterest, TextureProvider] => {\n const basic: number[] = new ViewportCoords().viewportToBasic(0, 0, transform, camera.perspective);\n\n if (basic[0] < 0 || basic[1] < 0 || basic[0] > 1 || basic[1] > 1) {\n return undefined;\n }\n\n return [\n this._roiCalculator.computeRegionOfInterest(camera, size, transform),\n provider,\n ];\n }),\n filter(\n (args: [IRegionOfInterest, TextureProvider]): boolean => {\n return !!args;\n }));\n }),\n filter(\n (args: [IRegionOfInterest, TextureProvider]): boolean => {\n return !args[1].disposed;\n }))\n .subscribe(\n (args: [IRegionOfInterest, TextureProvider]): void => {\n let roi: IRegionOfInterest = args[0];\n let provider: TextureProvider = args[1];\n\n provider.setRegionOfInterest(roi);\n });\n\n let hasTexture$: Observable<boolean> = textureProvider$.pipe(\n switchMap(\n (provider: TextureProvider): Observable<boolean> => {\n return provider.hasTexture$;\n }),\n startWith(false),\n publishReplay(1),\n refCount());\n\n this._hasTextureSubscription = hasTexture$.subscribe(() => { /*noop*/ });\n\n let nodeImage$: Observable<[HTMLImageElement, GraphNode]> = this._navigator.stateService.currentState$.pipe(\n filter(\n (frame: IFrame): boolean => {\n return frame.state.nodesAhead === 0;\n }),\n map(\n (frame: IFrame): GraphNode => {\n return frame.state.currentNode;\n }),\n distinctUntilChanged(\n undefined,\n (node: GraphNode): string => {\n return node.key;\n }),\n debounceTime(1000),\n withLatestFrom(hasTexture$),\n filter(\n (args: [GraphNode, boolean]): boolean => {\n return !args[1];\n }),\n map(\n (args: [GraphNode, boolean]): GraphNode => {\n return args[0];\n }),\n filter(\n (node: GraphNode): boolean => {\n return node.pano ?\n Settings.maxImageSize > Settings.basePanoramaSize :\n Settings.maxImageSize > Settings.baseImageSize;\n }),\n switchMap(\n (node: GraphNode): Observable<[HTMLImageElement, GraphNode]> => {\n let baseImageSize: ImageSize = node.pano ?\n Settings.basePanoramaSize :\n Settings.baseImageSize;\n\n if (Math.max(node.image.width, node.image.height) > baseImageSize) {\n return observableEmpty();\n }\n\n let image$: Observable<[HTMLImageElement, GraphNode]> = node\n .cacheImage$(Settings.maxImageSize).pipe(\n map(\n (n: GraphNode): [HTMLImageElement, GraphNode] => {\n return [n.image, n];\n }));\n\n return image$.pipe(\n takeUntil(\n hasTexture$.pipe(\n filter(\n (hasTexture: boolean): boolean => {\n\n return hasTexture;\n }))),\n catchError(\n (error: Error, caught: Observable<[HTMLImageElement, GraphNode]>):\n Observable<[HTMLImageElement, GraphNode]> => {\n console.error(`Failed to fetch high res image (${node.key})`, error);\n\n return observableEmpty();\n }));\n })).pipe(\n publish(),\n refCount());\n\n this._updateBackgroundSubscription = nodeImage$.pipe(\n withLatestFrom(textureProvider$))\n .subscribe(\n (args: [[HTMLImageElement, GraphNode], TextureProvider]): void => {\n if (args[0][1].key !== args[1].key ||\n args[1].disposed) {\n return;\n }\n\n args[1].updateBackground(args[0][0]);\n });\n\n this._updateTextureImageSubscription = nodeImage$.pipe(\n map(\n (imn: [HTMLImageElement, GraphNode]): IImagePlaneGLRendererOperation => {\n return (renderer: ImagePlaneGLRenderer): ImagePlaneGLRenderer => {\n renderer.updateTextureImage(imn[0], imn[1]);\n\n return renderer;\n };\n }))\n .subscribe(this._rendererOperation$);\n\n this._clearPeripheryPlaneSubscription = this._navigator.panService.panNodes$.pipe(\n filter(\n (panNodes: []): boolean => {\n return panNodes.length === 0;\n }),\n map(\n (): IImagePlaneGLRendererOperation => {\n return (renderer: ImagePlaneGLRenderer): ImagePlaneGLRenderer => {\n renderer.clearPeripheryPlanes();\n\n return renderer;\n };\n }))\n .subscribe(this._rendererOperation$);\n\n const cachedPanNodes$: Observable<[GraphNode, Transform]> = this._navigator.panService.panNodes$.pipe(\n switchMap(\n (nts: [GraphNode, Transform, number][]): Observable<[GraphNode, Transform]> => {\n return observableFrom(nts).pipe(\n mergeMap(\n ([n, t]: [GraphNode, Transform, number]): Observable<[GraphNode, Transform]> => {\n return observableCombineLatest(\n this._navigator.graphService.cacheNode$(n.key).pipe(\n catchError(\n (error: Error): Observable<GraphNode> => {\n console.error(`Failed to cache periphery node (${n.key})`, error);\n\n return observableEmpty();\n })),\n observableOf(t));\n }));\n }),\n share());\n\n this._addPeripheryPlaneSubscription = cachedPanNodes$.pipe(\n map(\n ([n, t]: [GraphNode, Transform]): IImagePlaneGLRendererOperation => {\n return (renderer: ImagePlaneGLRenderer): ImagePlaneGLRenderer => {\n renderer.addPeripheryPlane(n, t);\n\n return renderer;\n };\n }))\n .subscribe(this._rendererOperation$);\n\n this._updatePeripheryPlaneTextureSubscription = cachedPanNodes$.pipe(\n mergeMap(\n ([n]: [GraphNode, Transform]): Observable<GraphNode> => {\n return ImageSize.Size2048 > Math.max(n.image.width, n.image.height) ?\n n.cacheImage$(ImageSize.Size2048).pipe(\n catchError(\n (): Observable<GraphNode> => {\n return observableEmpty();\n })) :\n observableEmpty();\n }),\n map(\n (n: GraphNode): IImagePlaneGLRendererOperation => {\n return (renderer: ImagePlaneGLRenderer): ImagePlaneGLRenderer => {\n renderer.updateTextureImage(n.image, n);\n\n return renderer;\n };\n }))\n .subscribe(this._rendererOperation$);\n\n const inTransition$: Observable<boolean> = this._navigator.stateService.currentState$.pipe(\n map(\n (frame: IFrame): boolean => {\n return frame.state.alpha < 1;\n }),\n distinctUntilChanged());\n\n const panTrigger$: Observable<boolean> = observableCombineLatest(\n this._container.mouseService.active$,\n this._container.touchService.active$,\n this._navigator.stateService.inMotion$,\n inTransition$).pipe(\n map(\n ([mouseActive, touchActive, inMotion, inTransition]: [boolean, boolean, boolean, boolean]): boolean => {\n return !(mouseActive || touchActive || inMotion || inTransition);\n }),\n filter(\n (trigger: boolean): boolean => {\n return trigger;\n }));\n\n this._moveToPeripheryNodeSubscription = this._navigator.panService.panNodes$.pipe(\n switchMap(\n (nts: [GraphNode, Transform, number][]):\n Observable<[RenderCamera, GraphNode, Transform, [GraphNode, Transform, number][]]> => {\n\n return panTrigger$.pipe(\n withLatestFrom(\n this._container.renderService.renderCamera$,\n this._navigator.stateService.currentNode$,\n this._navigator.stateService.currentTransform$),\n mergeMap(\n ([, renderCamera, currentNode, currentTransform]: [boolean, RenderCamera, GraphNode, Transform]):\n Observable<[RenderCamera, GraphNode, Transform, [GraphNode, Transform, number][]]> => {\n return observableOf(\n [\n renderCamera,\n currentNode,\n currentTransform,\n nts,\n ] as [RenderCamera, GraphNode, Transform, [GraphNode, Transform, number][]]);\n }));\n }),\n switchMap(\n ([camera, cn, ct, nts]: [RenderCamera, GraphNode, Transform, [GraphNode, Transform, number][]]): Observable<GraphNode> => {\n const direction: THREE.Vector3 = camera.camera.lookat.clone().sub(camera.camera.position);\n\n const cd: THREE.Vector3 = new Spatial().viewingDirection(cn.rotation);\n const ca: number = cd.angleTo(direction);\n const closest: [number, string] = [ca, undefined];\n const basic: number[] = new ViewportCoords().viewportToBasic(0, 0, ct, camera.perspective);\n\n if (basic[0] >= 0 && basic[0] <= 1 && basic[1] >= 0 && basic[1] <= 1) {\n closest[0] = Number.NEGATIVE_INFINITY;\n }\n\n for (const [n] of nts) {\n const d: THREE.Vector3 = new Spatial().viewingDirection(n.rotation);\n const a: number = d.angleTo(direction);\n\n if (a < closest[0]) {\n closest[0] = a;\n closest[1] = n.key;\n }\n }\n\n if (!closest[1]) {\n return observableEmpty();\n }\n\n return this._navigator.moveToKey$(closest[1]).pipe(\n catchError(\n (): Observable<GraphNode> => {\n return observableEmpty();\n }));\n }))\n .subscribe();\n }\n\n protected _deactivate(): void {\n this._rendererDisposer$.next(null);\n\n this._abortTextureProviderSubscription.unsubscribe();\n this._hasTextureSubscription.unsubscribe();\n this._rendererSubscription.unsubscribe();\n this._setRegionOfInterestSubscription.unsubscribe();\n this._setTextureProviderSubscription.unsubscribe();\n this._setTileSizeSubscription.unsubscribe();\n this._stateSubscription.unsubscribe();\n this._textureProviderSubscription.unsubscribe();\n this._updateBackgroundSubscription.unsubscribe();\n this._updateTextureImageSubscription.unsubscribe();\n\n this._clearPeripheryPlaneSubscription.unsubscribe();\n this._addPeripheryPlaneSubscription.unsubscribe();\n this._updatePeripheryPlaneTextureSubscription.unsubscribe();\n this._moveToPeripheryNodeSubscription.unsubscribe();\n }\n\n protected _getDefaultConfiguration(): IComponentConfiguration {\n return { };\n }\n}\n\nComponentService.register(ImagePlaneComponent);\nexport default ImagePlaneComponent;\n",
+ "import * as THREE from \"three\";\n\nimport {Subscription} from \"rxjs\";\n\nimport {\n MeshFactory,\n MeshScene,\n IShaderMaterial,\n} from \"../../Component\";\nimport {Node} from \"../../Graph\";\nimport {\n ICurrentState,\n IFrame,\n} from \"../../State\";\nimport {TextureProvider} from \"../../Tiles\";\nimport { Transform } from \"../../geo/Transform\";\n\nexport class ImagePlaneGLRenderer {\n private _factory: MeshFactory;\n private _scene: MeshScene;\n\n private _alpha: number;\n private _alphaOld: number;\n private _fadeOutSpeed: number;\n\n private _currentKey: string;\n private _previousKey: string;\n private _providerDisposers: { [key: string]: () => void };\n\n private _frameId: number;\n private _needsRender: boolean;\n\n constructor() {\n this._factory = new MeshFactory();\n this._scene = new MeshScene();\n\n this._alpha = 0;\n this._alphaOld = 0;\n this._fadeOutSpeed = 0.05;\n\n this._currentKey = null;\n this._previousKey = null;\n this._providerDisposers = {};\n\n this._frameId = 0;\n this._needsRender = false;\n }\n\n public get frameId(): number {\n return this._frameId;\n }\n\n public get needsRender(): boolean {\n return this._needsRender;\n }\n\n public indicateNeedsRender(): void {\n this._needsRender = true;\n }\n\n public addPeripheryPlane(node: Node, transform: Transform): void {\n const mesh: THREE.Mesh = this._factory.createMesh(node, transform);\n const planes: { [key: string]: THREE.Mesh } = {};\n planes[node.key] = mesh;\n this._scene.addPeripheryPlanes(planes);\n\n this._needsRender = true;\n }\n\n public clearPeripheryPlanes(): void {\n this._scene.setPeripheryPlanes({});\n\n this._needsRender = true;\n }\n\n public updateFrame(frame: IFrame): void {\n this._updateFrameId(frame.id);\n this._needsRender = this._updateAlpha(frame.state.alpha) || this._needsRender;\n this._needsRender = this._updateAlphaOld(frame.state.alpha) || this._needsRender;\n this._needsRender = this._updateImagePlanes(frame.state) || this._needsRender;\n }\n\n public setTextureProvider(key: string, provider: TextureProvider): void {\n if (key !== this._currentKey) {\n return;\n }\n\n let createdSubscription: Subscription = provider.textureCreated$\n .subscribe(\n (texture: THREE.Texture): void => {\n this._updateTexture(texture);\n });\n\n let updatedSubscription: Subscription = provider.textureUpdated$\n .subscribe(\n (updated: boolean): void => {\n this._needsRender = true;\n });\n\n let dispose: () => void = (): void => {\n createdSubscription.unsubscribe();\n updatedSubscription.unsubscribe();\n provider.dispose();\n };\n\n if (key in this._providerDisposers) {\n let disposeProvider: () => void = this._providerDisposers[key];\n disposeProvider();\n\n delete this._providerDisposers[key];\n }\n\n this._providerDisposers[key] = dispose;\n }\n\n public updateTextureImage(image: HTMLImageElement, node: Node): void {\n this._needsRender = true;\n\n const planes: { [key: string]: THREE.Mesh } =\n this._extend({}, this._scene.planes, this._scene.planesOld, this._scene.planesPeriphery);\n\n for (const key in planes) {\n if (!planes.hasOwnProperty(key)) {\n continue;\n }\n\n if (key !== node.key) {\n continue;\n }\n\n const plane: THREE.Mesh = planes[key];\n\n let material: IShaderMaterial = <IShaderMaterial>plane.material;\n let texture: THREE.Texture = <THREE.Texture>material.uniforms.projectorTex.value;\n\n texture.image = image;\n texture.needsUpdate = true;\n }\n }\n\n public render(\n perspectiveCamera: THREE.PerspectiveCamera,\n renderer: THREE.WebGLRenderer): void {\n\n const planes: { [key: string]: THREE.Mesh } = this._scene.planes;\n const planesOld: { [key: string]: THREE.Mesh } = this._scene.planesOld;\n const planesPeriphery: { [key: string]: THREE.Mesh } = this._scene.planesPeriphery;\n\n const planeAlpha: number = Object.keys(planesOld).length ? 1 : this._alpha;\n const peripheryAlpha: number = Object.keys(planesOld).length ? 1 : Math.floor(this._alpha);\n\n for (const key in planes) {\n if (!planes.hasOwnProperty(key)) {\n continue;\n }\n\n const plane: THREE.Mesh = planes[key];\n (<IShaderMaterial>plane.material).uniforms.opacity.value = planeAlpha;\n }\n\n for (const key in planesOld) {\n if (!planesOld.hasOwnProperty(key)) {\n continue;\n }\n\n const plane: THREE.Mesh = planesOld[key];\n (<IShaderMaterial>plane.material).uniforms.opacity.value = this._alphaOld;\n }\n\n for (const key in planesPeriphery) {\n if (!planesPeriphery.hasOwnProperty(key)) {\n continue;\n }\n\n const plane: THREE.Mesh = planesPeriphery[key];\n (<IShaderMaterial>plane.material).uniforms.opacity.value = peripheryAlpha;\n }\n\n renderer.render(this._scene.scenePeriphery, perspectiveCamera);\n renderer.render(this._scene.scene, perspectiveCamera);\n renderer.render(this._scene.sceneOld, perspectiveCamera);\n\n for (const key in planes) {\n if (!planes.hasOwnProperty(key)) {\n continue;\n }\n\n const plane: THREE.Mesh = planes[key];\n (<IShaderMaterial>plane.material).uniforms.opacity.value = this._alpha;\n }\n\n renderer.render(this._scene.scene, perspectiveCamera);\n }\n\n public clearNeedsRender(): void {\n this._needsRender = false;\n }\n\n public dispose(): void {\n this._scene.clear();\n }\n\n private _updateFrameId(frameId: number): void {\n this._frameId = frameId;\n }\n\n private _updateAlpha(alpha: number): boolean {\n if (alpha === this._alpha) {\n return false;\n }\n\n this._alpha = alpha;\n\n return true;\n }\n\n private _updateAlphaOld(alpha: number): boolean {\n if (alpha < 1 || this._alphaOld === 0) {\n return false;\n }\n\n this._alphaOld = Math.max(0, this._alphaOld - this._fadeOutSpeed);\n\n return true;\n }\n\n private _updateImagePlanes(state: ICurrentState): boolean {\n if (state.currentNode == null || state.currentNode.key === this._currentKey) {\n return false;\n }\n\n let previousKey: string = state.previousNode != null ? state.previousNode.key : null;\n let currentKey: string = state.currentNode.key;\n\n if (this._previousKey !== previousKey &&\n this._previousKey !== currentKey &&\n this._previousKey in this._providerDisposers) {\n\n let disposeProvider: () => void = this._providerDisposers[this._previousKey];\n disposeProvider();\n\n delete this._providerDisposers[this._previousKey];\n }\n\n if (previousKey != null) {\n if (previousKey !== this._currentKey && previousKey !== this._previousKey) {\n let previousMesh: THREE.Mesh =\n this._factory.createMesh(state.previousNode, state.previousTransform);\n\n const previousPlanes: { [key: string]: THREE.Mesh } = {};\n previousPlanes[previousKey] = previousMesh;\n this._scene.updateImagePlanes(previousPlanes);\n }\n\n this._previousKey = previousKey;\n }\n\n this._currentKey = currentKey;\n let currentMesh: THREE.Mesh =\n this._factory.createMesh(state.currentNode, state.currentTransform);\n\n const planes: { [key: string]: THREE.Mesh } = {};\n planes[currentKey] = currentMesh;\n this._scene.updateImagePlanes(planes);\n\n this._alphaOld = 1;\n\n return true;\n }\n\n private _updateTexture(texture: THREE.Texture): void {\n this._needsRender = true;\n\n const planes: { [key: string]: THREE.Mesh } = this._scene.planes;\n\n for (const key in planes) {\n if (!planes.hasOwnProperty(key)) {\n continue;\n }\n\n const plane: THREE.Mesh = planes[key];\n let material: IShaderMaterial = <IShaderMaterial>plane.material;\n\n let oldTexture: THREE.Texture = <THREE.Texture>material.uniforms.projectorTex.value;\n material.uniforms.projectorTex.value = null;\n oldTexture.dispose();\n\n material.uniforms.projectorTex.value = texture;\n }\n }\n\n private _extend<T>(dest: T, ...sources: T[]): T {\n for (const src of sources) {\n for (const k in src) {\n if (!src.hasOwnProperty(k)) {\n continue;\n }\n\n dest[k] = src[k];\n }\n }\n return dest;\n }\n}\n\nexport default ImagePlaneGLRenderer;\n",
+ "import {IComponentConfiguration} from \"../../Component\";\n\nexport enum CoverState {\n Hidden,\n Loading,\n Visible,\n}\n\nexport interface ICoverConfiguration extends IComponentConfiguration {\n key?: string;\n src?: string;\n state?: CoverState;\n}\n\nexport default ICoverConfiguration;\n",
+ "import {IComponentConfiguration} from \"../../Component\";\n\n/**\n * Enumeration for slider mode.\n *\n * @enum {number}\n * @readonly\n *\n * @description Modes for specifying how transitions\n * between nodes are performed in slider mode. Only\n * applicable when the slider component determines\n * that transitions with motion is possilble. When it\n * is not, the stationary mode will be applied.\n */\nexport enum SliderMode {\n /**\n * Transitions with motion.\n *\n * @description The slider component moves the\n * camera between the node origins.\n *\n * In this mode it is not possible to zoom or pan.\n *\n * The slider component falls back to stationary\n * mode when it determines that the pair of nodes\n * does not have a strong enough relation.\n */\n Motion,\n\n /**\n * Stationary transitions.\n *\n * @description The camera is stationary.\n *\n * In this mode it is possible to zoom and pan.\n */\n Stationary,\n}\n\n/**\n * Interface for configuration of slider keys.\n *\n * @interface\n */\nexport interface ISliderKeys {\n /**\n * Key for the image plane in the background.\n */\n background: string;\n\n /**\n * Key for the image plane in the foreground.\n */\n foreground: string;\n}\n\n/**\n * Interface for configuration of slider component.\n *\n * @interface\n * ```\n * var viewer = new Mapillary.Viewer('<element-id>', '<client-id>', '<image-key>',\n * {\n * component: {\n * slider: {\n * initialPosition: 0.5,\n * keys: {\n * background: '<background-key>',\n * foreground: '<foreground-key>',\n * },\n * sliderVisible: true,\n * },\n * },\n * })\n * ```\n */\nexport interface ISliderConfiguration extends IComponentConfiguration {\n /**\n * Initial position of the slider on the interval [0, 1].\n *\n * @default 1\n */\n initialPosition?: number;\n\n /**\n * Slider keys.\n */\n keys?: ISliderKeys;\n\n /**\n * Value indicating whether the slider should be visible.\n *\n * @default true\n */\n sliderVisible?: boolean;\n\n /**\n * Mode used for image pair transitions.\n */\n mode?: SliderMode;\n}\n\nexport default ISliderConfiguration;\n",
+ "export {IBearingConfiguration} from \"./IBearingConfiguration\";\nexport {ICacheConfiguration, ICacheDepth} from \"./ICacheConfiguration\";\nexport {CoverState, ICoverConfiguration} from \"./ICoverConfiguration\";\nexport {IDirectionConfiguration} from \"./IDirectionConfiguration\";\nexport {IKeyboardConfiguration} from \"./IKeyboardConfiguration\";\nexport {IMarkerConfiguration} from \"./IMarkerConfiguration\";\nexport {IMouseConfiguration} from \"./IMouseConfiguration\";\nexport {INavigationConfiguration} from \"./INavigationConfiguration\";\nexport {IRouteConfiguration, IRoutePath, IRouteInfoKey} from \"./IRouteConfiguration\";\nexport {ISliderConfiguration, ISliderKeys, SliderMode} from \"./ISliderConfiguration\";\nexport {IComponentConfiguration} from \"./IComponentConfiguration\";\nexport {ISequenceConfiguration} from \"./ISequenceConfiguration\";\nexport {ISpatialDataConfiguration} from \"./ISpatialDataConfiguration\";\nexport {ITagConfiguration} from \"./ITagConfiguration\";\nexport {IZoomConfiguration} from \"./IZoomConfiguration\";\nexport {IShader} from \"./IShader\";\nexport * from \"../imageplane/interfaces/interfaces\";\nexport * from \"../marker/interfaces/interfaces\";\nexport * from \"../spatialdata/interfaces/interfaces\";\nexport * from \"../tag/interfaces/interfaces\";\n",
+ "import {switchMap, withLatestFrom} from \"rxjs/operators\";\nimport {Observable, Subscription} from \"rxjs\";\n\nimport {\n IKeyboardConfiguration,\n HandlerBase,\n} from \"../../Component\";\nimport {EdgeDirection} from \"../../Edge\";\nimport {\n IEdgeStatus,\n Node,\n} from \"../../Graph\";\n\n/**\n * The `KeyPlayHandler` allows the user to control the play behavior\n * using the following key commands:\n *\n * `Spacebar`: Start or stop playing.\n * `SHIFT` + `D`: Switch direction.\n * `<`: Decrease speed.\n * `>`: Increase speed.\n *\n * @example\n * ```\n * var keyboardComponent = viewer.getComponent(\"keyboard\");\n *\n * keyboardComponent.keyPlay.disable();\n * keyboardComponent.keyPlay.enable();\n *\n * var isEnabled = keyboardComponent.keyPlay.isEnabled;\n * ```\n */\nexport class KeyPlayHandler extends HandlerBase<IKeyboardConfiguration> {\n private _keyDownSubscription: Subscription;\n\n protected _enable(): void {\n this._keyDownSubscription = this._container.keyboardService.keyDown$.pipe(\n withLatestFrom(\n this._navigator.playService.playing$,\n this._navigator.playService.direction$,\n this._navigator.playService.speed$,\n this._navigator.stateService.currentNode$.pipe(\n switchMap(\n (node: Node): Observable<IEdgeStatus> => {\n return node.sequenceEdges$;\n }))))\n .subscribe(\n (\n [event, playing, direction, speed, status]:\n [KeyboardEvent, boolean, EdgeDirection, number, IEdgeStatus]): void => {\n\n if (event.altKey || event.ctrlKey || event.metaKey) {\n return;\n }\n\n switch (event.key) {\n case \"D\":\n if (!event.shiftKey) {\n return;\n }\n\n const newDirection: EdgeDirection = playing ?\n null : direction === EdgeDirection.Next ?\n EdgeDirection.Prev : direction === EdgeDirection.Prev ?\n EdgeDirection.Next : null;\n\n if (newDirection != null) {\n this._navigator.playService.setDirection(newDirection);\n }\n\n break;\n case \" \":\n if (event.shiftKey) {\n return;\n }\n\n if (playing) {\n this._navigator.playService.stop();\n } else {\n for (let edge of status.edges) {\n if (edge.data.direction === direction) {\n this._navigator.playService.play();\n }\n }\n }\n\n break;\n case \"<\":\n this._navigator.playService.setSpeed(speed - 0.05);\n break;\n case \">\":\n this._navigator.playService.setSpeed(speed + 0.05);\n break;\n default:\n return;\n }\n\n event.preventDefault();\n });\n }\n\n protected _disable(): void {\n this._keyDownSubscription.unsubscribe();\n }\n\n protected _getConfiguration(enable: boolean): IKeyboardConfiguration {\n return { keyZoom: enable };\n }\n}\n\nexport default KeyPlayHandler;\n",
+ "import {withLatestFrom, switchMap} from \"rxjs/operators\";\nimport {Observable, Subscription} from \"rxjs\";\n\nimport {\n IKeyboardConfiguration,\n HandlerBase,\n} from \"../../Component\";\nimport {EdgeDirection} from \"../../Edge\";\nimport {AbortMapillaryError} from \"../../Error\";\nimport {\n IEdgeStatus,\n Node,\n} from \"../../Graph\";\n\n/**\n * The `KeySequenceNavigationHandler` allows the user to navigate through a sequence using the\n * following key commands:\n *\n * `ALT` + `Up Arrow`: Navigate to next image in the sequence.\n * `ALT` + `Down Arrow`: Navigate to previous image in sequence.\n *\n * @example\n * ```\n * var keyboardComponent = viewer.getComponent(\"keyboard\");\n *\n * keyboardComponent.keySequenceNavigation.disable();\n * keyboardComponent.keySequenceNavigation.enable();\n *\n * var isEnabled = keyboardComponent.keySequenceNavigation.isEnabled;\n * ```\n */\nexport class KeySequenceNavigationHandler extends HandlerBase<IKeyboardConfiguration> {\n private _keyDownSubscription: Subscription;\n\n protected _enable(): void {\n const sequenceEdges$: Observable<IEdgeStatus> = this._navigator.stateService.currentNode$.pipe(\n switchMap(\n (node: Node): Observable<IEdgeStatus> => {\n return node.sequenceEdges$;\n }));\n\n this._keyDownSubscription = this._container.keyboardService.keyDown$.pipe(\n withLatestFrom(sequenceEdges$))\n .subscribe(\n ([event, edgeStatus]: [KeyboardEvent, IEdgeStatus]): void => {\n let direction: EdgeDirection = null;\n switch (event.keyCode) {\n case 38: // up\n direction = EdgeDirection.Next;\n break;\n case 40: // down\n direction = EdgeDirection.Prev;\n break;\n default:\n return;\n }\n\n event.preventDefault();\n\n if (!event.altKey || event.shiftKey || !edgeStatus.cached) {\n return;\n }\n\n for (const edge of edgeStatus.edges) {\n if (edge.data.direction === direction) {\n this._navigator.moveToKey$(edge.to)\n .subscribe(\n undefined,\n (error: Error): void => {\n if (!(error instanceof AbortMapillaryError)) {\n console.error(error);\n }\n });\n\n return;\n }\n }\n });\n }\n\n protected _disable(): void {\n this._keyDownSubscription.unsubscribe();\n }\n\n protected _getConfiguration(enable: boolean): IKeyboardConfiguration {\n return { keySequenceNavigation: enable };\n }\n}\n\nexport default KeySequenceNavigationHandler;\n",
+ "import {withLatestFrom, switchMap} from \"rxjs/operators\";\nimport * as THREE from \"three\";\n\nimport {Observable, Subscription} from \"rxjs\";\n\nimport {\n Component,\n IKeyboardConfiguration,\n HandlerBase,\n} from \"../../Component\";\nimport {\n EdgeDirection,\n IEdge,\n} from \"../../Edge\";\nimport {AbortMapillaryError} from \"../../Error\";\nimport {\n Camera,\n Spatial,\n} from \"../../Geo\";\nimport {\n IEdgeStatus,\n Node,\n} from \"../../Graph\";\nimport {\n IFrame,\n IRotation,\n} from \"../../State\";\nimport {\n Container,\n Navigator,\n} from \"../../Viewer\";\n\n/**\n * The `KeySpatialNavigationHandler` allows the user to navigate through a sequence using the\n * following key commands:\n *\n * `Up Arrow`: Step forward.\n * `Down Arrow`: Step backward.\n * `Left Arrow`: Step to the left.\n * `Rigth Arrow`: Step to the right.\n * `SHIFT` + `Down Arrow`: Turn around.\n * `SHIFT` + `Left Arrow`: Turn to the left.\n * `SHIFT` + `Rigth Arrow`: Turn to the right.\n *\n * @example\n * ```\n * var keyboardComponent = viewer.getComponent(\"keyboard\");\n *\n * keyboardComponent.keySpatialNavigation.disable();\n * keyboardComponent.keySpatialNavigation.enable();\n *\n * var isEnabled = keyboardComponent.keySpatialNavigation.isEnabled;\n * ```\n */\nexport class KeySpatialNavigationHandler extends HandlerBase<IKeyboardConfiguration> {\n private _spatial: Spatial;\n\n private _keyDownSubscription: Subscription;\n\n /** @ignore */\n constructor(\n component: Component<IKeyboardConfiguration>,\n container: Container,\n navigator: Navigator,\n spatial: Spatial) {\n super(component, container, navigator);\n\n this._spatial = spatial;\n }\n\n protected _enable(): void {\n const spatialEdges$: Observable<IEdgeStatus> = this._navigator.stateService.currentNode$.pipe(\n switchMap(\n (node: Node): Observable<IEdgeStatus> => {\n return node.spatialEdges$;\n }));\n\n this._keyDownSubscription = this._container.keyboardService.keyDown$.pipe(\n withLatestFrom(\n spatialEdges$,\n this._navigator.stateService.currentState$))\n .subscribe(([event, edgeStatus, frame]: [KeyboardEvent, IEdgeStatus, IFrame]): void => {\n let pano: boolean = frame.state.currentNode.pano;\n let direction: EdgeDirection = null;\n switch (event.keyCode) {\n case 37: // left\n direction = event.shiftKey && !pano ? EdgeDirection.TurnLeft : EdgeDirection.StepLeft;\n break;\n case 38: // up\n direction = event.shiftKey && !pano ? EdgeDirection.Pano : EdgeDirection.StepForward;\n break;\n case 39: // right\n direction = event.shiftKey && !pano ? EdgeDirection.TurnRight : EdgeDirection.StepRight;\n break;\n case 40: // down\n direction = event.shiftKey && !pano ? EdgeDirection.TurnU : EdgeDirection.StepBackward;\n break;\n default:\n return;\n }\n\n event.preventDefault();\n\n if (event.altKey || !edgeStatus.cached ||\n (event.shiftKey && pano)) {\n return;\n }\n\n if (!pano) {\n this._moveDir(direction, edgeStatus);\n } else {\n const shifts: { [dir: number]: number } = {};\n\n shifts[EdgeDirection.StepBackward] = Math.PI;\n shifts[EdgeDirection.StepForward] = 0;\n shifts[EdgeDirection.StepLeft] = Math.PI / 2;\n shifts[EdgeDirection.StepRight] = -Math.PI / 2;\n\n const phi: number = this._rotationFromCamera(frame.state.camera).phi;\n const navigationAngle: number = this._spatial.wrapAngle(phi + shifts[direction]);\n const threshold: number = Math.PI / 4;\n const edges: IEdge[] = edgeStatus.edges.filter(\n (e: IEdge): boolean => {\n return e.data.direction === EdgeDirection.Pano || e.data.direction === direction;\n });\n\n let smallestAngle: number = Number.MAX_VALUE;\n let toKey: string = null;\n for (const edge of edges) {\n const angle: number = Math.abs(this._spatial.wrapAngle(edge.data.worldMotionAzimuth - navigationAngle));\n\n if (angle < Math.min(smallestAngle, threshold)) {\n smallestAngle = angle;\n toKey = edge.to;\n }\n }\n\n if (toKey == null) {\n return;\n }\n\n this._moveToKey(toKey);\n }\n });\n }\n\n protected _disable(): void {\n this._keyDownSubscription.unsubscribe();\n }\n\n protected _getConfiguration(enable: boolean): IKeyboardConfiguration {\n return { keySpatialNavigation: enable };\n }\n\n private _moveDir(direction: EdgeDirection, edgeStatus: IEdgeStatus): void {\n for (const edge of edgeStatus.edges) {\n if (edge.data.direction === direction) {\n this._moveToKey(edge.to);\n return;\n }\n }\n }\n\n private _moveToKey(key: string): void {\n this._navigator.moveToKey$(key)\n .subscribe(\n undefined,\n (error: Error): void => {\n if (!(error instanceof AbortMapillaryError)) {\n console.error(error);\n }\n });\n }\n\n private _rotationFromCamera(camera: Camera): IRotation {\n let direction: THREE.Vector3 = camera.lookat.clone().sub(camera.position);\n\n let upProjection: number = direction.clone().dot(camera.up);\n let planeProjection: THREE.Vector3 = direction.clone().sub(camera.up.clone().multiplyScalar(upProjection));\n\n let phi: number = Math.atan2(planeProjection.y, planeProjection.x);\n let theta: number = Math.PI / 2 - this._spatial.angleToPlane(direction.toArray(), [0, 0, 1]);\n\n return { phi: phi, theta: theta };\n }\n}\n\nexport default KeySpatialNavigationHandler;\n",
+ "import {withLatestFrom} from \"rxjs/operators\";\nimport {Subscription} from \"rxjs\";\n\nimport {\n Component,\n IKeyboardConfiguration,\n HandlerBase,\n} from \"../../Component\";\nimport {\n Transform,\n ViewportCoords,\n} from \"../../Geo\";\nimport {RenderCamera} from \"../../Render\";\nimport {\n Container,\n Navigator,\n} from \"../../Viewer\";\n\n/**\n * The `KeyZoomHandler` allows the user to zoom in and out using the\n * following key commands:\n *\n * `+`: Zoom in.\n * `-`: Zoom out.\n *\n * @example\n * ```\n * var keyboardComponent = viewer.getComponent(\"keyboard\");\n *\n * keyboardComponent.keyZoom.disable();\n * keyboardComponent.keyZoom.enable();\n *\n * var isEnabled = keyboardComponent.keyZoom.isEnabled;\n * ```\n */\nexport class KeyZoomHandler extends HandlerBase<IKeyboardConfiguration> {\n private _keyDownSubscription: Subscription;\n\n private _viewportCoords: ViewportCoords;\n\n /** @ignore */\n constructor(\n component: Component<IKeyboardConfiguration>,\n container: Container,\n navigator: Navigator,\n viewportCoords: ViewportCoords) {\n super(component, container, navigator);\n\n this._viewportCoords = viewportCoords;\n }\n\n protected _enable(): void {\n this._keyDownSubscription = this._container.keyboardService.keyDown$.pipe(\n withLatestFrom(\n this._container.renderService.renderCamera$,\n this._navigator.stateService.currentTransform$))\n .subscribe(\n ([event, render, transform]: [KeyboardEvent, RenderCamera, Transform]): void => {\n if (event.altKey || event.shiftKey || event.ctrlKey || event.metaKey) {\n return;\n }\n\n let delta: number = 0;\n switch (event.key) {\n case \"+\":\n delta = 1;\n break;\n case \"-\":\n delta = -1;\n break;\n default:\n return;\n }\n\n event.preventDefault();\n\n const unprojected: THREE.Vector3 = this._viewportCoords.unprojectFromViewport(0, 0, render.perspective);\n const reference: number[] = transform.projectBasic(unprojected.toArray());\n\n this._navigator.stateService.zoomIn(delta, reference);\n });\n }\n\n protected _disable(): void {\n this._keyDownSubscription.unsubscribe();\n }\n\n protected _getConfiguration(enable: boolean): IKeyboardConfiguration {\n return { keyZoom: enable };\n }\n}\n\nexport default KeyZoomHandler;\n",
+ "import {Subscription} from \"rxjs\";\n\nimport {\n ComponentService,\n Component,\n IKeyboardConfiguration,\n KeyPlayHandler,\n KeySequenceNavigationHandler,\n KeySpatialNavigationHandler,\n KeyZoomHandler,\n} from \"../../Component\";\nimport {\n Spatial,\n ViewportCoords,\n} from \"../../Geo\";\nimport {\n Container,\n Navigator,\n} from \"../../Viewer\";\n\n/**\n * @class KeyboardComponent\n *\n * @classdesc Component for keyboard event handling.\n *\n * To retrive and use the keyboard component\n *\n * @example\n * ```\n * var viewer = new Mapillary.Viewer(\n * \"<element-id>\",\n * \"<client-id>\",\n * \"<my key>\");\n *\n * var keyboardComponent = viewer.getComponent(\"keyboard\");\n * ```\n */\nexport class KeyboardComponent extends Component<IKeyboardConfiguration> {\n public static componentName: string = \"keyboard\";\n\n private _keyPlayHandler: KeyPlayHandler;\n private _keySequenceNavigationHandler: KeySequenceNavigationHandler;\n private _keySpatialNavigationHandler: KeySpatialNavigationHandler;\n private _keyZoomHandler: KeyZoomHandler;\n\n private _configurationSubscription: Subscription;\n\n /** @ignore */\n constructor(name: string, container: Container, navigator: Navigator) {\n super(name, container, navigator);\n\n this._keyPlayHandler = new KeyPlayHandler(this, container, navigator);\n this._keySequenceNavigationHandler = new KeySequenceNavigationHandler(this, container, navigator);\n this._keySpatialNavigationHandler = new KeySpatialNavigationHandler(this, container, navigator, new Spatial());\n this._keyZoomHandler = new KeyZoomHandler(this, container, navigator, new ViewportCoords());\n }\n\n /**\n * Get key play.\n *\n * @returns {KeyPlayHandler} The key play handler.\n */\n public get keyPlay(): KeyPlayHandler {\n return this._keyPlayHandler;\n }\n\n /**\n * Get key sequence navigation.\n *\n * @returns {KeySequenceNavigationHandler} The key sequence navigation handler.\n */\n public get keySequenceNavigation(): KeySequenceNavigationHandler {\n return this._keySequenceNavigationHandler;\n }\n\n /**\n * Get spatial.\n *\n * @returns {KeySpatialNavigationHandler} The spatial handler.\n */\n public get keySpatialNavigation(): KeySpatialNavigationHandler {\n return this._keySpatialNavigationHandler;\n }\n\n /**\n * Get key zoom.\n *\n * @returns {KeyZoomHandler} The key zoom handler.\n */\n public get keyZoom(): KeyZoomHandler {\n return this._keyZoomHandler;\n }\n\n protected _activate(): void {\n this._configurationSubscription = this._configuration$\n .subscribe(\n (configuration: IKeyboardConfiguration): void => {\n if (configuration.keyPlay) {\n this._keyPlayHandler.enable();\n } else {\n this._keyPlayHandler.disable();\n }\n\n if (configuration.keySequenceNavigation) {\n this._keySequenceNavigationHandler.enable();\n } else {\n this._keySequenceNavigationHandler.disable();\n }\n\n if (configuration.keySpatialNavigation) {\n this._keySpatialNavigationHandler.enable();\n } else {\n this._keySpatialNavigationHandler.disable();\n }\n\n if (configuration.keyZoom) {\n this._keyZoomHandler.enable();\n } else {\n this._keyZoomHandler.disable();\n }\n });\n }\n\n protected _deactivate(): void {\n this._configurationSubscription.unsubscribe();\n\n this._keyPlayHandler.disable();\n this._keySequenceNavigationHandler.disable();\n this._keySpatialNavigationHandler.disable();\n this._keyZoomHandler.disable();\n }\n\n protected _getDefaultConfiguration(): IKeyboardConfiguration {\n return { keyPlay: true, keySequenceNavigation: true, keySpatialNavigation: true, keyZoom: true };\n }\n}\n\nComponentService.register(KeyboardComponent);\nexport default KeyboardComponent;\n",
"export {MarkerComponent} from \"./MarkerComponent\";\nexport {SimpleMarker} from \"./marker/SimpleMarker\";\nexport {CircleMarker} from \"./marker/CircleMarker\";\n",
- "/// <reference path=\"../../../typings/index.d.ts\" />\n\nimport * as THREE from \"three\";\nimport * as when from \"when\";\n\nimport {Observable} from \"rxjs/Observable\";\nimport {Subscription} from \"rxjs/Subscription\";\n\nimport \"rxjs/add/observable/combineLatest\";\n\nimport \"rxjs/add/operator/distinctUntilChanged\";\nimport \"rxjs/add/operator/map\";\n\nimport {ILatLon} from \"../../API\";\nimport {\n IMarkerConfiguration,\n IMarkerEvent,\n Marker,\n MarkerScene,\n MarkerSet,\n ComponentService,\n Component,\n} from \"../../Component\";\nimport {IFrame} from \"../../State\";\nimport {\n Container,\n Navigator,\n} from \"../../Viewer\";\nimport {\n IGLRenderHash,\n GLRenderStage,\n RenderCamera,\n} from \"../../Render\";\nimport {\n GraphCalculator,\n Node,\n} from \"../../Graph\";\nimport {\n GeoCoords,\n ILatLonAlt,\n ViewportCoords,\n} from \"../../Geo\";\n\n\n/**\n * @class MarkerComponent\n *\n * @classdesc Component for showing and editing 3D marker objects.\n *\n * The `add` method is used for adding new markers or replacing\n * markers already in the set.\n *\n * If a marker already in the set has the same\n * id as one of the markers added, the old marker will be removed and\n * the added marker will take its place.\n *\n * It is not possible to update markers in the set by updating any properties\n * directly on the marker object. Markers need to be replaced by\n * re-adding them for updates to geographic position or configuration\n * to be reflected.\n *\n * Markers added to the marker component can be either interactive\n * or non-interactive. Different marker types define their behavior.\n * Markers with interaction support can be configured with options\n * to respond to dragging inside the viewer and be detected when\n * retrieving markers from pixel points with the `getMarkerIdAt` method.\n *\n * To retrive and use the marker component\n *\n * @example\n * ```\n * var viewer = new Mapillary.Viewer(\n * \"<element-id>\",\n * \"<client-id>\",\n * \"<my key>\",\n * { component: { marker: true } });\n *\n * var markerComponent = viewer.getComponent(\"marker\");\n * ```\n */\nexport class MarkerComponent extends Component<IMarkerConfiguration> {\n public static componentName: string = \"marker\";\n\n /**\n * Fired when the position of a marker is changed.\n * @event\n * @type {IMarkerEvent} markerEvent - Marker event data.\n * @example\n * ```\n * markerComponent.on(\"changed\", function(e) {\n * console.log(e.marker.id, e.marker.latLon);\n * });\n * ```\n */\n public static changed: string = \"changed\";\n\n /**\n * Fired when a marker drag interaction starts.\n * @event\n * @type {IMarkerEvent} markerEvent - Marker event data.\n * @example\n * ```\n * markerComponent.on(\"dragstart\", function(e) {\n * console.log(e.marker.id, e.marker.latLon);\n * });\n * ```\n */\n public static dragstart: string = \"dragstart\";\n\n /**\n * Fired when a marker drag interaction ends.\n * @event\n * @type {IMarkerEvent} markerEvent - Marker event data.\n * @example\n * ```\n * markerComponent.on(\"dragend\", function(e) {\n * console.log(e.marker.id, e.marker.latLon);\n * });\n * ```\n */\n public static dragend: string = \"dragend\";\n\n private _relativeGroundAltitude: number;\n\n private _geoCoords: GeoCoords;\n private _graphCalculator: GraphCalculator;\n private _markerScene: MarkerScene;\n private _markerSet: MarkerSet;\n private _viewportCoords: ViewportCoords;\n\n private _adjustHeightSubscription: Subscription;\n private _dragEventSubscription: Subscription;\n private _markersUpdatedSubscription: Subscription;\n private _mouseClaimSubscription: Subscription;\n private _referenceSubscription: Subscription;\n private _renderSubscription: Subscription;\n private _setChangedSubscription: Subscription;\n private _updateMarkerSubscription: Subscription;\n\n constructor(name: string, container: Container, navigator: Navigator) {\n super(name, container, navigator);\n\n this._relativeGroundAltitude = -2;\n\n this._geoCoords = new GeoCoords();\n this._graphCalculator = new GraphCalculator();\n this._markerScene = new MarkerScene();\n this._markerSet = new MarkerSet();\n this._viewportCoords = new ViewportCoords();\n }\n\n /**\n * Add markers to the marker set or replace markers in the marker set.\n *\n * @description If a marker already in the set has the same\n * id as one of the markers added, the old marker will be removed\n * the added marker will take its place.\n *\n * Any marker inside the visible bounding bbox\n * will be initialized and placed in the viewer.\n *\n * @param {Array<Marker>} markers - Markers to add.\n *\n * @example ```markerComponent.add([marker1, marker2]);```\n */\n public add(markers: Marker[]): void {\n this._markerSet.add(markers);\n }\n\n /**\n * Returns the marker in the marker set with the specified id, or\n * undefined if the id matches no marker.\n *\n * @param {string} markerId - Id of the marker.\n *\n * @example ```var marker = markerComponent.get(\"markerId\");```\n *\n */\n public get(markerId: string): Marker {\n return this._markerSet.get(markerId);\n }\n\n\n /**\n * Returns an array of all markers.\n *\n * @example ```var markers = markerComponent.getAll();```\n */\n public getAll(): Marker[] {\n return this._markerSet.getAll();\n }\n\n /**\n * Returns the id of the interactive marker closest to the current camera\n * position at the specified point.\n *\n * @description Notice that the pixelPoint argument requires x, y\n * coordinates from pixel space.\n *\n * With this function, you can use the coordinates provided by mouse\n * events to get information out of the marker component.\n *\n * If no interactive geometry of an interactive marker exist at the pixel\n * point, `null` will be returned.\n *\n * @param {Array<number>} pixelPoint - Pixel coordinates on the viewer element.\n * @returns {string} Id of the interactive marker closest to the camera. If no\n * interactive marker exist at the pixel point, `null` will be returned.\n *\n * @example\n * ```\n * markerComponent.getMarkerIdAt([100, 100])\n * .then((markerId) => { console.log(markerId); });\n * ```\n */\n public getMarkerIdAt(pixelPoint: number[]): when.Promise<string> {\n return when.promise<string>((resolve: (value: string) => void, reject: (reason: Error) => void): void => {\n this._container.renderService.renderCamera$\n .first()\n .map(\n (render: RenderCamera): string => {\n const viewport: number[] = this._viewportCoords\n .canvasToViewport(\n pixelPoint[0],\n pixelPoint[1],\n this._container.element);\n\n const id: string = this._markerScene.intersectObjects(viewport, render.perspective);\n\n return id;\n })\n .subscribe(\n (id: string): void => {\n resolve(id);\n },\n (error: Error): void => {\n reject(error);\n });\n });\n }\n\n /**\n * Check if a marker exist in the marker set.\n *\n * @param {string} markerId - Id of the marker.\n *\n * @example ```var markerExists = markerComponent.has(\"markerId\");```\n */\n public has(markerId: string): boolean {\n return this._markerSet.has(markerId);\n }\n\n /**\n * Remove markers with the specified ids from the marker set.\n *\n * @param {Array<string>} markerIds - Ids for markers to remove.\n *\n * @example ```markerComponent.remove([\"id-1\", \"id-2\"]);```\n */\n public remove(markerIds: string[]): void {\n this._markerSet.remove(markerIds);\n }\n\n /**\n * Remove all markers from the marker set.\n *\n * @example ```markerComponent.removeAll();```\n */\n public removeAll(): void {\n this._markerSet.removeAll();\n }\n\n protected _activate(): void {\n const groundAltitude$: Observable<number> = this._navigator.stateService.currentState$\n .map(\n (frame: IFrame): number => {\n return frame.state.camera.position.z + this._relativeGroundAltitude;\n })\n .distinctUntilChanged(\n (a1: number, a2: number): boolean => {\n return Math.abs(a1 - a2) < 0.01;\n })\n .publishReplay(1)\n .refCount();\n\n const geoInitiated$: Observable<void> = Observable\n .combineLatest(\n groundAltitude$,\n this._navigator.stateService.reference$)\n .first()\n .map((): void => { /* noop */ })\n .publishReplay(1)\n .refCount();\n\n const clampedConfiguration$: Observable<IMarkerConfiguration> = this._configuration$\n .map(\n (configuration: IMarkerConfiguration): IMarkerConfiguration => {\n return { visibleBBoxSize: Math.max(1, Math.min(200, configuration.visibleBBoxSize)) };\n });\n\n const currentlatLon$: Observable<ILatLon> = this._navigator.stateService.currentNode$\n .map((node: Node): ILatLon => { return node.latLon; })\n .publishReplay(1)\n .refCount();\n\n const visibleBBox$: Observable<[ILatLon, ILatLon]> = Observable\n .combineLatest(\n clampedConfiguration$,\n currentlatLon$)\n .map(\n ([configuration, latLon]: [IMarkerConfiguration, ILatLon]): [ILatLon, ILatLon] => {\n return this._graphCalculator\n .boundingBoxCorners(latLon, configuration.visibleBBoxSize / 2);\n })\n .publishReplay(1)\n .refCount();\n\n const visibleMarkers$: Observable<Marker[]> = Observable\n .combineLatest(\n Observable\n .of<MarkerSet>(this._markerSet)\n .concat(this._markerSet.changed$),\n visibleBBox$)\n .map(\n ([set, bbox]: [MarkerSet, [ILatLon, ILatLon]]): Marker[] => {\n return set.search(bbox);\n });\n\n this._setChangedSubscription = geoInitiated$\n .switchMap(\n (): Observable<[Marker[], ILatLonAlt, number]> => {\n return visibleMarkers$\n .withLatestFrom(\n this._navigator.stateService.reference$,\n groundAltitude$);\n })\n .subscribe(\n ([markers, reference, alt]: [Marker[], ILatLonAlt, number]): void => {\n const geoCoords: GeoCoords = this._geoCoords;\n const markerScene: MarkerScene = this._markerScene;\n const sceneMarkers: { [id: string]: Marker } = markerScene.markers;\n const markersToRemove: { [id: string]: Marker } = Object.assign({}, sceneMarkers);\n\n for (const marker of markers) {\n if (marker.id in sceneMarkers) {\n delete markersToRemove[marker.id];\n } else {\n const point3d: number[] = geoCoords\n .geodeticToEnu(\n marker.latLon.lat,\n marker.latLon.lon,\n reference.alt + alt,\n reference.lat,\n reference.lon,\n reference.alt);\n\n markerScene.add(marker, point3d);\n }\n }\n\n for (const id in markersToRemove) {\n if (!markersToRemove.hasOwnProperty(id)) {\n continue;\n }\n\n markerScene.remove(id);\n }\n });\n\n this._markersUpdatedSubscription = geoInitiated$\n .switchMap(\n (): Observable<[Marker[], [ILatLon, ILatLon], ILatLonAlt, number]> => {\n return this._markerSet.updated$\n .withLatestFrom(\n visibleBBox$,\n this._navigator.stateService.reference$,\n groundAltitude$);\n })\n .subscribe(\n ([markers, [sw, ne], reference, alt]: [Marker[], [ILatLon, ILatLon], ILatLonAlt, number]): void => {\n const geoCoords: GeoCoords = this._geoCoords;\n const markerScene: MarkerScene = this._markerScene;\n\n for (const marker of markers) {\n const exists: boolean = markerScene.has(marker.id);\n const visible: boolean = marker.latLon.lat > sw.lat &&\n marker.latLon.lat < ne.lat &&\n marker.latLon.lon > sw.lon &&\n marker.latLon.lon < ne.lon;\n\n if (visible) {\n const point3d: number[] = geoCoords\n .geodeticToEnu(\n marker.latLon.lat,\n marker.latLon.lon,\n reference.alt + alt,\n reference.lat,\n reference.lon,\n reference.alt);\n\n markerScene.add(marker, point3d);\n } else if (!visible && exists) {\n markerScene.remove(marker.id);\n }\n }\n });\n\n this._referenceSubscription = this._navigator.stateService.reference$\n .skip(1)\n .withLatestFrom(groundAltitude$)\n .subscribe(\n ([reference, alt]: [ILatLonAlt, number]): void => {\n const geoCoords: GeoCoords = this._geoCoords;\n const markerScene: MarkerScene = this._markerScene;\n\n for (const marker of markerScene.getAll()) {\n const point3d: number[] = geoCoords\n .geodeticToEnu(\n marker.latLon.lat,\n marker.latLon.lon,\n reference.alt + alt,\n reference.lat,\n reference.lon,\n reference.alt);\n\n markerScene.update(marker.id, point3d);\n }\n });\n\n this._adjustHeightSubscription = groundAltitude$\n .skip(1)\n .withLatestFrom(\n this._navigator.stateService.reference$,\n currentlatLon$)\n .subscribe(\n ([alt, reference, latLon]: [number, ILatLonAlt, ILatLon]): void => {\n const geoCoords: GeoCoords = this._geoCoords;\n const markerScene: MarkerScene = this._markerScene;\n\n const position: number[] = geoCoords\n .geodeticToEnu(\n latLon.lat,\n latLon.lon,\n reference.alt + alt,\n reference.lat,\n reference.lon,\n reference.alt);\n\n for (const marker of markerScene.getAll()) {\n const point3d: number[] = geoCoords\n .geodeticToEnu(\n marker.latLon.lat,\n marker.latLon.lon,\n reference.alt + alt,\n reference.lat,\n reference.lon,\n reference.alt);\n\n const distanceX: number = point3d[0] - position[0];\n const distanceY: number = point3d[1] - position[1];\n\n const groundDistance: number = Math.sqrt(distanceX * distanceX + distanceY * distanceY);\n if (groundDistance > 50) {\n continue;\n }\n\n markerScene.lerpAltitude(marker.id, alt, Math.min(1, Math.max(0, 1.2 - 1.2 * groundDistance / 50)));\n }\n });\n\n this._renderSubscription = this._navigator.stateService.currentState$\n .map(\n (frame: IFrame): IGLRenderHash => {\n const scene: MarkerScene = this._markerScene;\n\n return {\n name: this._name,\n render: {\n frameId: frame.id,\n needsRender: scene.needsRender,\n render: scene.render.bind(scene),\n stage: GLRenderStage.Foreground,\n },\n };\n })\n .subscribe(this._container.glRenderer.render$);\n\n const hoveredMarkerId$: Observable<string> = Observable\n .combineLatest(\n this._container.renderService.renderCamera$,\n this._container.mouseService.mouseMove$)\n .map(\n ([render, event]: [RenderCamera, MouseEvent]): string => {\n const element: HTMLElement = this._container.element;\n const [canvasX, canvasY]: number[] = this._viewportCoords.canvasPosition(event, element);\n const viewport: number[] = this._viewportCoords.canvasToViewport(\n canvasX,\n canvasY,\n element);\n\n const markerId: string = this._markerScene.intersectObjects(viewport, render.perspective);\n\n return markerId;\n })\n .publishReplay(1)\n .refCount();\n\n const draggingStarted$: Observable<boolean> =\n this._container.mouseService\n .filtered$(this._name, this._container.mouseService.mouseDragStart$)\n .map(\n (event: MouseEvent): boolean => {\n return true;\n });\n\n const draggingStopped$: Observable<boolean> =\n this._container.mouseService\n .filtered$(this._name, this._container.mouseService.mouseDragEnd$)\n .map(\n (event: MouseEvent): boolean => {\n return false;\n });\n\n const dragging$: Observable<boolean> = Observable\n .merge(\n draggingStarted$,\n draggingStopped$)\n .startWith(false);\n\n this._dragEventSubscription = draggingStarted$\n .withLatestFrom(hoveredMarkerId$)\n .merge(Observable\n .combineLatest(\n draggingStopped$,\n Observable.of<string>(null)))\n .startWith([false, null])\n .pairwise()\n .subscribe(\n ([previous, current]: [boolean, string][]): void => {\n const dragging: boolean = current[0];\n const eventType: string = dragging ? MarkerComponent.dragstart : MarkerComponent.dragend;\n const id: string = dragging ? current[1] : previous[1];\n const marker: Marker = this._markerScene.get(id);\n const markerEvent: IMarkerEvent = { marker: marker, target: this, type: eventType };\n\n this.fire(eventType, markerEvent);\n });\n\n this._mouseClaimSubscription = Observable\n .combineLatest(\n this._container.mouseService.active$,\n hoveredMarkerId$,\n dragging$)\n .map(\n ([active, markerId, dragging]: [boolean, string, boolean]): boolean => {\n return (!active && markerId != null) || dragging;\n })\n .distinctUntilChanged()\n .subscribe(\n (hovered: boolean): void => {\n if (hovered) {\n this._container.mouseService.claimMouse(this._name, 1);\n } else {\n this._container.mouseService.unclaimMouse(this._name);\n }\n });\n\n const offset$: Observable<[Marker, number[], RenderCamera]> = this._container.mouseService\n .filtered$(this._name, this._container.mouseService.mouseDragStart$)\n .withLatestFrom(\n hoveredMarkerId$,\n this._container.renderService.renderCamera$)\n .map(\n ([e, id, r]: [MouseEvent, string, RenderCamera]): [Marker, number[], RenderCamera] => {\n const marker: Marker = this._markerScene.get(id);\n const element: HTMLElement = this._container.element;\n\n const [groundCanvasX, groundCanvasY]: number[] =\n this._viewportCoords.projectToCanvas(\n marker.geometry.position.toArray(),\n element,\n r.perspective);\n\n const [canvasX, canvasY]: number[] = this._viewportCoords.canvasPosition(e, element);\n\n const offset: number[] = [canvasX - groundCanvasX, canvasY - groundCanvasY];\n\n return [marker, offset, r];\n })\n .publishReplay(1)\n .refCount();\n\n this._updateMarkerSubscription = this._container.mouseService\n .filtered$(this._name, this._container.mouseService.mouseDrag$)\n .withLatestFrom(\n offset$,\n this._navigator.stateService.reference$,\n clampedConfiguration$)\n .subscribe(\n ([event, [marker, offset, render], reference, configuration]:\n [MouseEvent, [Marker, number[], RenderCamera], ILatLonAlt, IMarkerConfiguration]): void => {\n if (!this._markerScene.has(marker.id)) {\n return;\n }\n\n const element: HTMLElement = this._container.element;\n const [canvasX, canvasY]: number[] = this._viewportCoords.canvasPosition(event, element);\n\n const groundX: number = canvasX - offset[0];\n const groundY: number = canvasY - offset[1];\n\n const [viewportX, viewportY]: number[] = this._viewportCoords\n .canvasToViewport(\n groundX,\n groundY,\n element);\n\n const direction: THREE.Vector3 = new THREE.Vector3(viewportX, viewportY, 1)\n .unproject(render.perspective)\n .sub(render.perspective.position)\n .normalize();\n\n const distance: number = Math.min(\n this._relativeGroundAltitude / direction.z,\n configuration.visibleBBoxSize / 2 - 0.1);\n\n if (distance < 0) {\n return;\n }\n\n const intersection: THREE.Vector3 = direction\n .clone()\n .multiplyScalar(distance)\n .add(render.perspective.position);\n\n intersection.z = render.perspective.position.z + this._relativeGroundAltitude;\n\n const [lat, lon]: number[] = this._geoCoords\n .enuToGeodetic(\n intersection.x,\n intersection.y,\n intersection.z,\n reference.lat,\n reference.lon,\n reference.alt);\n\n this._markerScene.update(marker.id, intersection.toArray(), { lat: lat, lon: lon });\n this._markerSet.update(marker);\n\n const markerEvent: IMarkerEvent = { marker: marker, target: this, type: MarkerComponent.changed };\n this.fire(MarkerComponent.changed, markerEvent);\n });\n }\n\n protected _deactivate(): void {\n this._adjustHeightSubscription.unsubscribe();\n this._dragEventSubscription.unsubscribe();\n this._markersUpdatedSubscription.unsubscribe();\n this._mouseClaimSubscription.unsubscribe();\n this._referenceSubscription.unsubscribe();\n this._renderSubscription.unsubscribe();\n this._setChangedSubscription.unsubscribe();\n this._updateMarkerSubscription.unsubscribe();\n\n this._markerScene.clear();\n }\n\n protected _getDefaultConfiguration(): IMarkerConfiguration {\n return { visibleBBoxSize: 100 };\n }\n}\n\nComponentService.register(MarkerComponent);\nexport default MarkerComponent;\n",
- "/// <reference path=\"../../../typings/index.d.ts\" />\n\nimport * as THREE from \"three\";\n\nimport {ILatLon} from \"../../API\";\nimport {Marker} from \"../../Component\";\n\nexport class MarkerScene {\n private _needsRender: boolean;\n private _interactiveObjects: THREE.Object3D[];\n private _markers: { [key: string]: Marker };\n private _objectMarkers: { [id: string]: string };\n private _raycaster: THREE.Raycaster;\n private _scene: THREE.Scene;\n\n constructor(scene?: THREE.Scene, raycaster?: THREE.Raycaster) {\n this._needsRender = false;\n this._interactiveObjects = [];\n this._markers = {};\n this._objectMarkers = {};\n this._raycaster = !!raycaster ? raycaster : new THREE.Raycaster();\n this._scene = !!scene ? scene : new THREE.Scene();\n }\n\n public get markers(): { [key: string]: Marker } {\n return this._markers;\n }\n\n public get needsRender(): boolean {\n return this._needsRender;\n }\n\n public add(marker: Marker, position: number[]): void {\n if (marker.id in this._markers) {\n this._dispose(marker.id);\n }\n\n marker.createGeometry(position);\n this._scene.add(marker.geometry);\n this._markers[marker.id] = marker;\n for (let interactiveObject of marker.getInteractiveObjects()) {\n this._interactiveObjects.push(interactiveObject);\n this._objectMarkers[interactiveObject.uuid] = marker.id;\n }\n\n this._needsRender = true;\n }\n\n public clear(): void {\n for (const id in this._markers) {\n if (!this._markers.hasOwnProperty) {\n continue;\n }\n\n this._dispose(id);\n }\n\n this._needsRender = true;\n }\n\n public get(id: string): Marker {\n return this._markers[id];\n }\n\n public getAll(): Marker[] {\n return Object\n .keys(this._markers)\n .map((id: string): Marker => { return this._markers[id]; });\n }\n\n public has(id: string): boolean {\n return id in this._markers;\n }\n\n public intersectObjects([viewportX, viewportY]: number[], camera: THREE.Camera): string {\n this._raycaster.setFromCamera(new THREE.Vector2(viewportX, viewportY), camera);\n\n const intersects: THREE.Intersection[] = this._raycaster.intersectObjects(this._interactiveObjects);\n for (const intersect of intersects) {\n if (intersect.object.uuid in this._objectMarkers) {\n return this._objectMarkers[intersect.object.uuid];\n }\n }\n\n return null;\n }\n\n public lerpAltitude(id: string, alt: number, alpha: number): void {\n if (!(id in this._markers)) {\n return;\n }\n\n this._markers[id].lerpAltitude(alt, alpha);\n\n this._needsRender = true;\n }\n\n public remove(id: string): void {\n if (!(id in this._markers)) {\n return;\n }\n\n this._dispose(id);\n\n this._needsRender = true;\n }\n\n public render(\n perspectiveCamera: THREE.PerspectiveCamera,\n renderer: THREE.WebGLRenderer): void {\n\n renderer.render(this._scene, perspectiveCamera);\n\n this._needsRender = false;\n }\n\n public update(id: string, position: number[], latLon?: ILatLon): void {\n if (!(id in this._markers)) {\n return;\n }\n\n const marker: Marker = this._markers[id];\n marker.updatePosition(position, latLon);\n\n this._needsRender = true;\n }\n\n private _dispose(id: string): void {\n const marker: Marker = this._markers[id];\n this._scene.remove(marker.geometry);\n for (let interactiveObject of marker.getInteractiveObjects()) {\n const index: number = this._interactiveObjects.indexOf(interactiveObject);\n if (index !== -1) {\n this._interactiveObjects.splice(index, 1);\n } else {\n console.warn(`Object does not exist (${interactiveObject.id}) for ${id}`);\n }\n\n delete this._objectMarkers[interactiveObject.uuid];\n }\n\n marker.disposeGeometry();\n\n delete this._markers[id];\n }\n}\n\nexport default MarkerScene;\n",
- "/// <reference path=\"../../../typings/index.d.ts\" />\n\nimport * as rbush from \"rbush\";\n\nimport {Observable} from \"rxjs/Observable\";\nimport {Subject} from \"rxjs/Subject\";\n\nimport \"rxjs/add/operator/map\";\nimport \"rxjs/add/operator/publishReplay\";\nimport \"rxjs/add/operator/scan\";\n\nimport {ILatLon} from \"../../API\";\nimport {Marker} from \"../../Component\";\n\ntype MarkerIndexItem = {\n lat: number;\n lon: number;\n marker: Marker;\n};\n\ntype MarkerIndex = rbush.RBush<MarkerIndexItem>;\n\nexport class MarkerSet {\n private _hash: { [id: string]: MarkerIndexItem };\n private _index: MarkerIndex;\n\n private _indexChanged$: Subject<MarkerSet>;\n private _updated$: Subject<Marker[]>;\n\n constructor() {\n this._hash = {};\n this._index = rbush<MarkerIndexItem>(16, [\".lon\", \".lat\", \".lon\", \".lat\"]);\n\n this._indexChanged$ = new Subject<MarkerSet>();\n this._updated$ = new Subject<Marker[]>();\n }\n\n public get changed$(): Observable<MarkerSet> {\n return this._indexChanged$;\n }\n\n public get updated$(): Observable<Marker[]> {\n return this._updated$;\n }\n\n public add(markers: Marker[]): void {\n const updated: Marker[] = [];\n const hash: { [id: string]: MarkerIndexItem } = this._hash;\n const index: MarkerIndex = this._index;\n\n for (const marker of markers) {\n const id: string = marker.id;\n\n if (id in hash) {\n index.remove(hash[id]);\n updated.push(marker);\n }\n\n const item: MarkerIndexItem = {\n lat: marker.latLon.lat,\n lon: marker.latLon.lon,\n marker: marker,\n };\n\n hash[id] = item;\n index.insert(item);\n }\n\n if (updated.length > 0) {\n this._updated$.next(updated);\n }\n\n if (markers.length > updated.length) {\n this._indexChanged$.next(this);\n }\n }\n\n public has(id: string): boolean {\n return id in this._hash;\n }\n\n public get(id: string): Marker {\n return this.has(id) ? this._hash[id].marker : undefined;\n }\n\n public getAll(): Marker[] {\n return this._index\n .all()\n .map(\n (indexItem: MarkerIndexItem): Marker => {\n return indexItem.marker;\n });\n }\n\n public remove(ids: string[]): void {\n const hash: { [id: string]: MarkerIndexItem } = this._hash;\n const index: MarkerIndex = this._index;\n\n let changed: boolean = false;\n for (const id of ids) {\n if (!(id in hash)) {\n continue;\n }\n\n const item: MarkerIndexItem = hash[id];\n index.remove(item);\n delete hash[id];\n changed = true;\n }\n\n if (changed) {\n this._indexChanged$.next(this);\n }\n }\n\n public removeAll(): void {\n this._hash = {};\n this._index.clear();\n\n this._indexChanged$.next(this);\n }\n\n public search([sw, ne]: [ILatLon, ILatLon]): Marker[] {\n return this._index\n .search({ maxX: ne.lon, maxY: ne.lat, minX: sw.lon, minY: sw.lat })\n .map(\n (indexItem: MarkerIndexItem): Marker => {\n return indexItem.marker;\n });\n }\n\n public update(marker: Marker): void {\n const hash: { [id: string]: MarkerIndexItem } = this._hash;\n const index: MarkerIndex = this._index;\n const id: string = marker.id;\n\n if (!(id in hash)) {\n return;\n }\n\n index.remove(hash[id]);\n\n const item: MarkerIndexItem = {\n lat: marker.latLon.lat,\n lon: marker.latLon.lon,\n marker: marker,\n };\n\n hash[id] = item;\n index.insert(item);\n }\n}\n\nexport default MarkerSet;\n",
- "/// <reference path=\"../../../../typings/index.d.ts\" />\n\nimport * as THREE from \"three\";\n\nimport {ILatLon} from \"../../../API\";\nimport {\n ICircleMarkerOptions,\n Marker,\n} from \"../../../Component\";\n\n/**\n * @class CircleMarker\n *\n * @classdesc Non-interactive marker with a flat circle shape. The circle\n * marker can not be configured to be interactive.\n *\n * Circle marker properties can not be updated after creation.\n *\n * To create and add one `CircleMarker` with default configuration\n * and one with configuration use\n *\n * @example\n * ```\n * var defaultMarker = new Mapillary.MarkerComponent.CircleMarker(\n * \"id-1\",\n * { lat: 0, lon: 0, });\n *\n * var configuredMarker = new Mapillary.MarkerComponent.CircleMarker(\n * \"id-2\",\n * { lat: 0, lon: 0, },\n * {\n * color: \"#0Ff\",\n * opacity: 0.3,\n * radius: 0.7,\n * });\n *\n * markerComponent.add([defaultMarker, configuredMarker]);\n * ```\n */\nexport class CircleMarker extends Marker {\n private _color: number | string;\n private _opacity: number;\n private _radius: number;\n\n constructor(id: string, latLon: ILatLon, options?: ICircleMarkerOptions) {\n super(id, latLon);\n\n options = !!options ? options : {};\n this._color = options.color != null ? options.color : 0xffffff;\n this._opacity = options.opacity != null ? options.opacity : 0.4;\n this._radius = options.radius != null ? options.radius : 1;\n }\n\n protected _createGeometry(position: number[]): void {\n const circle: THREE.Mesh = new THREE.Mesh(\n new THREE.CircleGeometry(this._radius, 16),\n new THREE.MeshBasicMaterial({\n color: this._color,\n opacity: this._opacity,\n transparent: true,\n }));\n\n circle.up.fromArray([0, 0, 1]);\n circle.renderOrder = -1;\n\n const group: THREE.Object3D = new THREE.Object3D();\n group.add(circle);\n group.position.fromArray(position);\n\n this._geometry = group;\n }\n\n protected _disposeGeometry(): void {\n for (let mesh of <THREE.Mesh[]>this._geometry.children) {\n mesh.geometry.dispose();\n mesh.material.dispose();\n }\n }\n\n protected _getInteractiveObjects(): THREE.Object3D[] {\n return [];\n }\n}\n\nexport default CircleMarker;\n",
- "/// <reference path=\"../../../../typings/index.d.ts\" />\n\nimport * as THREE from \"three\";\n\nimport {ILatLon} from \"../../../API\";\n\n/**\n * @class Marker\n *\n * @classdesc Represents an abstract marker class that should be extended\n * by marker implementations used in the marker component.\n */\nexport abstract class Marker {\n protected _id: string;\n protected _geometry: THREE.Object3D;\n protected _latLon: ILatLon;\n\n constructor(id: string, latLon: ILatLon) {\n this._id = id;\n this._latLon = latLon;\n }\n\n /**\n * Get id.\n * @returns {string} The id of the marker.\n */\n public get id(): string {\n return this._id;\n }\n\n public get geometry(): THREE.Object3D {\n return this._geometry;\n }\n\n /**\n * Get lat lon.\n * @returns {ILatLon} The geographic coordinates of the marker.\n */\n public get latLon(): ILatLon {\n return this._latLon;\n }\n\n public createGeometry(position: number[]): void {\n if (!!this._geometry) {\n return;\n }\n\n this._createGeometry(position);\n\n // update matrix world if raycasting occurs before first render\n this._geometry.updateMatrixWorld(true);\n }\n\n public disposeGeometry(): void {\n if (!this._geometry) {\n return;\n }\n\n this._disposeGeometry();\n\n this._geometry = undefined;\n }\n\n public getInteractiveObjects(): THREE.Object3D[] {\n if (!this._geometry) {\n return [];\n }\n\n return this._getInteractiveObjects();\n }\n\n public lerpAltitude(alt: number, alpha: number): void {\n if (!this._geometry) {\n return;\n }\n\n this._geometry.position.z = (1 - alpha) * this._geometry.position.z + alpha * alt;\n }\n\n public updatePosition(position: number[], latLon?: ILatLon): void {\n if (!!latLon) {\n this._latLon.lat = latLon.lat;\n this._latLon.lon = latLon.lon;\n }\n\n if (!this._geometry) {\n return;\n }\n\n this._geometry.position.fromArray(position);\n this._geometry.updateMatrixWorld(true);\n }\n\n protected abstract _createGeometry(position: number[]): void;\n\n protected abstract _disposeGeometry(): void;\n\n protected abstract _getInteractiveObjects(): THREE.Object3D[];\n}\n\nexport default Marker;\n",
- "/// <reference path=\"../../../../typings/index.d.ts\" />\n\nimport * as THREE from \"three\";\n\nimport {ILatLon} from \"../../../API\";\nimport {\n ISimpleMarkerOptions,\n Marker,\n} from \"../../../Component\";\n\n/**\n * @class SimpleMarker\n *\n * @classdesc Interactive marker with ice cream shape. The sphere\n * inside the ice cream can be configured to be interactive.\n *\n * Simple marker properties can not be updated after creation.\n *\n * To create and add one `SimpleMarker` with default configuration\n * (non-interactive) and one interactive with configuration use\n *\n * @example\n * ```\n * var defaultMarker = new Mapillary.MarkerComponent.SimpleMarker(\n * \"id-1\",\n * { lat: 0, lon: 0, });\n *\n * var interactiveMarker = new Mapillary.MarkerComponent.SimpleMarker(\n * \"id-2\",\n * { lat: 0, lon: 0, },\n * {\n * ballColor: \"#00f\",\n * ballOpacity: 0.5,\n * color: \"#00f\",\n * interactive: true,\n * opacity: 0.3,\n * radius: 0.7,\n * });\n *\n * markerComponent.add([defaultMarker, interactiveMarker]);\n * ```\n */\nexport class SimpleMarker extends Marker {\n private _ballColor: number | string;\n private _ballOpacity: number;\n private _circleToRayAngle: number;\n private _color: number | string;\n private _interactive: boolean;\n private _opacity: number;\n private _radius: number;\n\n constructor(id: string, latLon: ILatLon, options?: ISimpleMarkerOptions) {\n super(id, latLon);\n\n options = !!options ? options : {};\n this._ballColor = options.ballColor != null ? options.ballColor : 0xff0000;\n this._ballOpacity = options.ballOpacity != null ? options.ballOpacity : 0.8;\n this._circleToRayAngle = 2;\n this._color = options.color != null ? options.color : 0xff0000;\n this._interactive = !!options.interactive;\n this._opacity = options.opacity != null ? options.opacity : 0.4;\n this._radius = options.radius != null ? options.radius : 1;\n }\n\n protected _createGeometry(position: number[]): void {\n const radius: number = this._radius;\n const cone: THREE.Mesh = new THREE.Mesh(\n this._markerGeometry(radius, 8, 8),\n new THREE.MeshBasicMaterial({\n color: this._color,\n opacity: this._opacity,\n shading: THREE.SmoothShading,\n transparent: true,\n }));\n\n cone.renderOrder = 1;\n\n const ball: THREE.Mesh = new THREE.Mesh(\n new THREE.SphereGeometry(radius / 2, 8, 8),\n new THREE.MeshBasicMaterial({\n color: this._ballColor,\n opacity: this._ballOpacity,\n shading: THREE.SmoothShading,\n transparent: true,\n }));\n\n ball.position.z = this._markerHeight(radius);\n\n const group: THREE.Object3D = new THREE.Object3D();\n group.add(ball);\n group.add(cone);\n group.position.fromArray(position);\n\n this._geometry = group;\n }\n\n protected _disposeGeometry(): void {\n for (let mesh of <THREE.Mesh[]>this._geometry.children) {\n mesh.geometry.dispose();\n mesh.material.dispose();\n }\n }\n\n protected _getInteractiveObjects(): THREE.Object3D[] {\n return this._interactive ? [this._geometry.children[0]] : [];\n }\n\n private _markerHeight(radius: number): number {\n let t: number = Math.tan(Math.PI - this._circleToRayAngle);\n return radius * Math.sqrt(1 + t * t);\n }\n\n private _markerGeometry(radius: number, widthSegments: number, heightSegments: number ): THREE.Geometry {\n let geometry: THREE.Geometry = new THREE.Geometry();\n\n widthSegments = Math.max(3, Math.floor(widthSegments) || 8);\n heightSegments = Math.max(2, Math.floor(heightSegments) || 6);\n let height: number = this._markerHeight(radius);\n\n let vertices: any[] = [];\n\n for (let y: number = 0; y <= heightSegments; ++y) {\n\n let verticesRow: any[] = [];\n\n for (let x: number = 0; x <= widthSegments; ++x) {\n let u: number = x / widthSegments * Math.PI * 2;\n let v: number = y / heightSegments * Math.PI;\n\n let r: number;\n if (v < this._circleToRayAngle) {\n r = radius;\n } else {\n let t: number = Math.tan(v - this._circleToRayAngle);\n r = radius * Math.sqrt(1 + t * t);\n }\n\n let vertex: THREE.Vector3 = new THREE.Vector3();\n vertex.x = r * Math.cos(u) * Math.sin(v);\n vertex.y = r * Math.sin(u) * Math.sin(v);\n vertex.z = r * Math.cos(v) + height;\n\n geometry.vertices.push(vertex);\n verticesRow.push(geometry.vertices.length - 1);\n }\n vertices.push(verticesRow);\n }\n\n for (let y: number = 0; y < heightSegments; ++y) {\n for (let x: number = 0; x < widthSegments; ++x) {\n let v1: number = vertices[y][x + 1];\n let v2: number = vertices[y][x];\n let v3: number = vertices[y + 1][x];\n let v4: number = vertices[y + 1][x + 1];\n\n let n1: THREE.Vector3 = geometry.vertices[v1].clone().normalize();\n let n2: THREE.Vector3 = geometry.vertices[v2].clone().normalize();\n let n3: THREE.Vector3 = geometry.vertices[v3].clone().normalize();\n let n4: THREE.Vector3 = geometry.vertices[v4].clone().normalize();\n\n geometry.faces.push(new THREE.Face3(v1, v2, v4, [n1, n2, n4]));\n geometry.faces.push(new THREE.Face3(v2, v3, v4, [n2.clone(), n3, n4.clone()]));\n }\n }\n\n geometry.computeFaceNormals();\n geometry.boundingSphere = new THREE.Sphere(new THREE.Vector3(), radius + height);\n\n return geometry;\n }\n}\n\nexport default SimpleMarker;\n",
- "/// <reference path=\"../../../typings/index.d.ts\" />\n\nimport {Observable} from \"rxjs/Observable\";\nimport {Subscription} from \"rxjs/Subscription\";\n\nimport {\n Component,\n IMouseConfiguration,\n MouseHandlerBase,\n} from \"../../Component\";\nimport {\n Spatial,\n Transform,\n ViewportCoords,\n} from \"../../Geo\";\nimport {\n RenderCamera,\n} from \"../../Render\";\nimport {IFrame} from \"../../State\";\nimport {\n Container,\n Navigator,\n} from \"../../Viewer\";\n\n/**\n * The `BounceHandler` ensures that the viewer bounces back to the image\n * when drag panning outside of the image edge.\n */\nexport class BounceHandler extends MouseHandlerBase<IMouseConfiguration> {\n private _spatial: Spatial;\n\n private _basicDistanceThreshold: number;\n private _basicRotationThreshold: number;\n private _bounceCoeff: number;\n\n private _bounceSubscription: Subscription;\n\n constructor(\n component: Component<IMouseConfiguration>,\n container: Container,\n navigator: Navigator,\n viewportCoords: ViewportCoords,\n spatial: Spatial) {\n super(component, container, navigator, viewportCoords);\n\n this._spatial = spatial;\n\n this._basicDistanceThreshold = 1e-3;\n this._basicRotationThreshold = 5e-2;\n this._bounceCoeff = 1e-1;\n }\n\n protected _enable(): void {\n const inTransition$: Observable<boolean> = this._navigator.stateService.currentState$\n .map(\n (frame: IFrame): boolean => {\n return frame.state.alpha < 1;\n });\n\n this._bounceSubscription = Observable\n .combineLatest(\n inTransition$,\n this._navigator.stateService.inTranslation$,\n this._container.mouseService.active$,\n this._container.touchService.active$)\n .map(\n (noForce: boolean[]): boolean => {\n return noForce[0] || noForce[1] || noForce[2] || noForce[3];\n })\n .distinctUntilChanged()\n .switchMap(\n (noForce: boolean): Observable<[RenderCamera, Transform]> => {\n return noForce ?\n Observable.empty() :\n Observable.combineLatest(\n this._container.renderService.renderCamera$,\n this._navigator.stateService.currentTransform$.first());\n })\n .subscribe(\n (args: [RenderCamera, Transform]): void => {\n let renderCamera: RenderCamera = args[0];\n let perspectiveCamera: THREE.PerspectiveCamera = renderCamera.perspective;\n let transform: Transform = args[1];\n\n if (!transform.hasValidScale && renderCamera.camera.focal < 0.1) {\n return;\n }\n\n if (renderCamera.perspective.aspect === 0 || renderCamera.perspective.aspect === Number.POSITIVE_INFINITY) {\n return;\n }\n\n let distanceThreshold: number = this._basicDistanceThreshold / Math.pow(2, renderCamera.zoom);\n let basicCenter: number[] = this._viewportCoords.viewportToBasic(0, 0, transform, perspectiveCamera);\n\n if (Math.abs(basicCenter[0] - 0.5) < distanceThreshold && Math.abs(basicCenter[1] - 0.5) < distanceThreshold) {\n return;\n }\n\n let basicDistances: number[] = this._viewportCoords.getBasicDistances(transform, perspectiveCamera);\n let basicX: number = 0;\n let basicY: number = 0;\n\n if (basicDistances[0] < distanceThreshold && basicDistances[1] < distanceThreshold &&\n basicDistances[2] < distanceThreshold && basicDistances[3] < distanceThreshold) {\n return;\n }\n\n if (Math.abs(basicDistances[0] - basicDistances[2]) < distanceThreshold &&\n Math.abs(basicDistances[1] - basicDistances[3]) < distanceThreshold) {\n return;\n }\n\n let coeff: number = this._bounceCoeff;\n\n if (basicDistances[1] > 0 && basicDistances[3] === 0) {\n basicX = -coeff * basicDistances[1];\n } else if (basicDistances[1] === 0 && basicDistances[3] > 0) {\n basicX = coeff * basicDistances[3];\n } else if (basicDistances[1] > 0 && basicDistances[3] > 0) {\n basicX = coeff * (basicDistances[3] - basicDistances[1]) / 2;\n }\n\n if (basicDistances[0] > 0 && basicDistances[2] === 0) {\n basicY = coeff * basicDistances[0];\n } else if (basicDistances[0] === 0 && basicDistances[2] > 0) {\n basicY = -coeff * basicDistances[2];\n } else if (basicDistances[0] > 0 && basicDistances[2] > 0) {\n basicY = coeff * (basicDistances[0] - basicDistances[2]) / 2;\n }\n\n let rotationThreshold: number = this._basicRotationThreshold;\n\n basicX = this._spatial.clamp(basicX, -rotationThreshold, rotationThreshold);\n basicY = this._spatial.clamp(basicY, -rotationThreshold, rotationThreshold);\n\n this._navigator.stateService.rotateBasicUnbounded([basicX, basicY]);\n });\n }\n\n protected _disable(): void {\n this._bounceSubscription.unsubscribe();\n }\n\n protected _getConfiguration(enable: boolean): IMouseConfiguration {\n return { };\n }\n}\n\nexport default BounceHandler;\n",
- "import {Observable} from \"rxjs/Observable\";\nimport {Subscription} from \"rxjs/Subscription\";\n\nimport {\n IMouseConfiguration,\n MouseHandlerBase,\n ClientTouch,\n} from \"../../Component\";\nimport {Transform} from \"../../Geo\";\nimport {RenderCamera} from \"../../Render\";\n\n/**\n * The `DoubleClickZoomHandler` allows the user to zoom the viewer photo at a point by double clicking.\n *\n * @example\n * ```\n * var mouseComponent = viewer.getComponent(\"mouse\");\n *\n * mouseComponent.doubleClickZoom.disable();\n * mouseComponent.doubleClickZoom.enable();\n *\n * var isEnabled = mouseComponent.doubleClickZoom.isEnabled;\n * ```\n */\nexport class DoubleClickZoomHandler extends MouseHandlerBase<IMouseConfiguration> {\n private _zoomSubscription: Subscription;\n\n protected _enable(): void {\n this._zoomSubscription = Observable\n .merge(\n this._container.mouseService\n .filtered$(this._component.name, this._container.mouseService.dblClick$),\n this._container.touchService.doubleTap$\n .map(\n (e: TouchEvent): ClientTouch => {\n let touch: Touch = e.touches[0];\n return { clientX: touch.clientX, clientY: touch.clientY, shiftKey: e.shiftKey };\n }))\n .withLatestFrom(\n this._container.renderService.renderCamera$,\n this._navigator.stateService.currentTransform$)\n .subscribe(\n ([event, render, transform]: [MouseEvent | ClientTouch, RenderCamera, Transform]): void => {\n const element: HTMLElement = this._container.element;\n\n const [canvasX, canvasY]: number[] = this._viewportCoords.canvasPosition(event, element);\n\n const unprojected: THREE.Vector3 =\n this._viewportCoords.unprojectFromCanvas(\n canvasX,\n canvasY,\n element,\n render.perspective);\n\n const reference: number[] = transform.projectBasic(unprojected.toArray());\n const delta: number = !!(<{ shiftKey: boolean }>event).shiftKey ? -1 : 1;\n\n this._navigator.stateService.zoomIn(delta, reference);\n });\n }\n\n protected _disable(): void {\n this._zoomSubscription.unsubscribe();\n }\n\n protected _getConfiguration(enable: boolean): IMouseConfiguration {\n return { doubleClickZoom: enable };\n }\n}\n\nexport default DoubleClickZoomHandler;\n",
- "/// <reference path=\"../../../typings/index.d.ts\" />\n\nimport * as THREE from \"three\";\n\nimport {Observable} from \"rxjs/Observable\";\nimport {Subscription} from \"rxjs/Subscription\";\n\nimport {\n Component,\n IMouseConfiguration,\n MouseHandlerBase,\n MouseTouchPair,\n} from \"../../Component\";\nimport {\n Camera,\n Spatial,\n Transform,\n ViewportCoords,\n} from \"../../Geo\";\nimport {\n RenderCamera,\n} from \"../../Render\";\nimport {IFrame} from \"../../State\";\nimport {\n Container,\n Navigator,\n} from \"../../Viewer\";\n\n/**\n * The `DragPanHandler` allows the user to pan the viewer photo by clicking and dragging the cursor.\n *\n * @example\n * ```\n * var mouseComponent = viewer.getComponent(\"mouse\");\n *\n * mouseComponent.dragPan.disable();\n * mouseComponent.dragPan.enable();\n *\n * var isEnabled = mouseComponent.dragPan.isEnabled;\n * ```\n */\nexport class DragPanHandler extends MouseHandlerBase<IMouseConfiguration> {\n private _spatial: Spatial;\n\n private _basicRotationThreshold: number;\n private _forceCoeff: number;\n\n private _activeMouseSubscription: Subscription;\n private _activeTouchSubscription: Subscription;\n private _preventDefaultSubscription: Subscription;\n private _rotateBasicSubscription: Subscription;\n\n constructor(\n component: Component<IMouseConfiguration>,\n container: Container,\n navigator: Navigator,\n viewportCoords: ViewportCoords,\n spatial: Spatial) {\n super(component, container, navigator, viewportCoords);\n\n this._spatial = spatial;\n\n this._basicRotationThreshold = 5e-2;\n this._forceCoeff = 2e-1;\n }\n\n protected _enable(): void {\n let draggingStarted$: Observable<boolean> =\n this._container.mouseService\n .filtered$(this._component.name, this._container.mouseService.mouseDragStart$)\n .map(\n (event: MouseEvent): boolean => {\n return true;\n });\n\n let draggingStopped$: Observable<boolean> =\n this._container.mouseService\n .filtered$(this._component.name, this._container.mouseService.mouseDragEnd$)\n .map(\n (event: MouseEvent): boolean => {\n return false;\n });\n\n this._activeMouseSubscription = Observable\n .merge(\n draggingStarted$,\n draggingStopped$)\n .subscribe(this._container.mouseService.activate$);\n\n this._preventDefaultSubscription = Observable\n .merge(\n draggingStarted$,\n draggingStopped$)\n .switchMap(\n (dragging: boolean): Observable<MouseEvent> => {\n return dragging ?\n this._container.mouseService.documentMouseMove$ :\n Observable.empty<MouseEvent>();\n })\n .merge(this._container.touchService.touchMove$)\n .subscribe(\n (event: MouseEvent | TouchEvent): void => {\n event.preventDefault(); // prevent selection of content outside the viewer\n });\n\n let touchMovingStarted$: Observable<boolean> =\n this._container.touchService.singleTouchDragStart$\n .map(\n (event: TouchEvent): boolean => {\n return true;\n });\n\n let touchMovingStopped$: Observable<boolean> =\n this._container.touchService.singleTouchDragEnd$\n .map(\n (event: TouchEvent): boolean => {\n return false;\n });\n\n this._activeTouchSubscription = Observable\n .merge(\n touchMovingStarted$,\n touchMovingStopped$)\n .subscribe(this._container.touchService.activate$);\n\n this._rotateBasicSubscription = this._navigator.stateService.currentState$\n .map(\n (frame: IFrame): boolean => {\n return frame.state.currentNode.fullPano || frame.state.nodesAhead < 1;\n })\n .distinctUntilChanged()\n .switchMap(\n (enable: boolean): Observable<MouseTouchPair> => {\n if (!enable) {\n return Observable.empty<MouseTouchPair>();\n }\n\n let mouseDrag$: Observable<[MouseEvent, MouseEvent]> = Observable\n .merge(\n this._container.mouseService.filtered$(this._component.name, this._container.mouseService.mouseDragStart$),\n this._container.mouseService.filtered$(this._component.name, this._container.mouseService.mouseDrag$),\n this._container.mouseService.filtered$(this._component.name, this._container.mouseService.mouseDragEnd$)\n .map((e: MouseEvent): MouseEvent => { return null; }))\n .pairwise()\n .filter(\n (pair: [MouseEvent, MouseEvent]): boolean => {\n return pair[0] != null && pair[1] != null;\n });\n\n let singleTouchDrag$: Observable<[Touch, Touch]> = Observable\n .merge(\n this._container.touchService.singleTouchDragStart$,\n this._container.touchService.singleTouchDrag$,\n this._container.touchService.singleTouchDragEnd$.map((t: TouchEvent): TouchEvent => { return null; }))\n .map(\n (event: TouchEvent): Touch => {\n return event != null && event.touches.length > 0 ?\n event.touches[0] : null;\n })\n .pairwise()\n .filter(\n (pair: [Touch, Touch]): boolean => {\n return pair[0] != null && pair[1] != null;\n });\n\n return Observable\n .merge(\n mouseDrag$,\n singleTouchDrag$);\n })\n .withLatestFrom(\n this._container.renderService.renderCamera$,\n this._navigator.stateService.currentTransform$,\n this._navigator.stateService.currentCamera$)\n .map(\n ([events, render, transform, c]: [MouseTouchPair, RenderCamera, Transform, Camera]): number[] => {\n let camera: Camera = c.clone();\n\n let previousEvent: MouseEvent | Touch = events[0];\n let event: MouseEvent | Touch = events[1];\n\n let movementX: number = event.clientX - previousEvent.clientX;\n let movementY: number = event.clientY - previousEvent.clientY;\n\n let element: HTMLElement = this._container.element;\n\n let [canvasX, canvasY]: number[] = this._viewportCoords.canvasPosition(event, element);\n\n let currentDirection: THREE.Vector3 =\n this._viewportCoords.unprojectFromCanvas(\n canvasX,\n canvasY,\n element,\n render.perspective)\n .sub(render.perspective.position);\n\n let directionX: THREE.Vector3 =\n this._viewportCoords.unprojectFromCanvas(\n canvasX - movementX,\n canvasY,\n element,\n render.perspective)\n .sub(render.perspective.position);\n\n let directionY: THREE.Vector3 =\n this._viewportCoords.unprojectFromCanvas(\n canvasX,\n canvasY - movementY,\n element,\n render.perspective)\n .sub(render.perspective.position);\n\n let deltaPhi: number = (movementX > 0 ? 1 : -1) * directionX.angleTo(currentDirection);\n let deltaTheta: number = (movementY > 0 ? -1 : 1) * directionY.angleTo(currentDirection);\n\n let upQuaternion: THREE.Quaternion = new THREE.Quaternion().setFromUnitVectors(camera.up, new THREE.Vector3(0, 0, 1));\n let upQuaternionInverse: THREE.Quaternion = upQuaternion.clone().inverse();\n\n let offset: THREE.Vector3 = new THREE.Vector3();\n offset.copy(camera.lookat).sub(camera.position);\n offset.applyQuaternion(upQuaternion);\n let length: number = offset.length();\n\n let phi: number = Math.atan2(offset.y, offset.x);\n phi += deltaPhi;\n\n let theta: number = Math.atan2(Math.sqrt(offset.x * offset.x + offset.y * offset.y), offset.z);\n theta += deltaTheta;\n theta = Math.max(0.01, Math.min(Math.PI - 0.01, theta));\n\n offset.x = Math.sin(theta) * Math.cos(phi);\n offset.y = Math.sin(theta) * Math.sin(phi);\n offset.z = Math.cos(theta);\n offset.applyQuaternion(upQuaternionInverse);\n\n let lookat: THREE.Vector3 = new THREE.Vector3().copy(camera.position).add(offset.multiplyScalar(length));\n\n let basic: number[] = transform.projectBasic(lookat.toArray());\n let original: number[] = transform.projectBasic(camera.lookat.toArray());\n\n let x: number = basic[0] - original[0];\n let y: number = basic[1] - original[1];\n\n if (Math.abs(x) > 1) {\n x = 0;\n } else if (x > 0.5) {\n x = x - 1;\n } else if (x < -0.5) {\n x = x + 1;\n }\n\n let rotationThreshold: number = this._basicRotationThreshold;\n\n x = this._spatial.clamp(x, -rotationThreshold, rotationThreshold);\n y = this._spatial.clamp(y, -rotationThreshold, rotationThreshold);\n\n if (transform.fullPano) {\n return [x, y];\n }\n\n let pixelDistances: number[] =\n this._viewportCoords.getPixelDistances(\n this._container.element,\n transform,\n render.perspective);\n\n let coeff: number = this._forceCoeff;\n\n if (pixelDistances[0] > 0 && y < 0 && basic[1] < 0.5) {\n y /= Math.max(1, coeff * pixelDistances[0]);\n }\n\n if (pixelDistances[1] > 0 && x > 0 && basic[0] > 0.5) {\n x /= Math.max(1, coeff * pixelDistances[1]);\n }\n\n if (pixelDistances[2] > 0 && y > 0 && basic[1] > 0.5) {\n y /= Math.max(1, coeff * pixelDistances[2]);\n }\n\n if (pixelDistances[3] > 0 && x < 0 && basic[0] < 0.5) {\n x /= Math.max(1, coeff * pixelDistances[3]);\n }\n\n return [x, y];\n })\n .subscribe(\n (basicRotation: number[]): void => {\n this._navigator.stateService.rotateBasic(basicRotation);\n });\n }\n\n protected _disable(): void {\n this._activeMouseSubscription.unsubscribe();\n this._activeTouchSubscription.unsubscribe();\n this._preventDefaultSubscription.unsubscribe();\n this._rotateBasicSubscription.unsubscribe();\n\n this._activeMouseSubscription = null;\n this._activeTouchSubscription = null;\n this._preventDefaultSubscription = null;\n this._rotateBasicSubscription = null;\n }\n\n protected _getConfiguration(enable: boolean): IMouseConfiguration {\n return { dragPan: enable };\n }\n}\n\nexport default DragPanHandler;\n",
- "import {Subscription} from \"rxjs/Subscription\";\n\nimport \"rxjs/add/observable/merge\";\n\nimport \"rxjs/add/operator/filter\";\nimport \"rxjs/add/operator/map\";\nimport \"rxjs/add/operator/withLatestFrom\";\n\nimport {\n BounceHandler,\n ComponentService,\n Component,\n DoubleClickZoomHandler,\n DragPanHandler,\n IMouseConfiguration,\n ScrollZoomHandler,\n TouchZoomHandler,\n} from \"../../Component\";\nimport {\n ViewportCoords,\n Spatial,\n} from \"../../Geo\";\nimport {\n Container,\n Navigator,\n} from \"../../Viewer\";\n\n/**\n * @class MouseComponent\n *\n * @classdesc Component handling mouse and touch events for camera movement.\n */\nexport class MouseComponent extends Component<IMouseConfiguration> {\n /** @inheritdoc */\n public static componentName: string = \"mouse\";\n\n private _viewportCoords: ViewportCoords;\n private _spatial: Spatial;\n\n private _bounceHandler: BounceHandler;\n private _doubleClickZoomHandler: DoubleClickZoomHandler;\n private _dragPanHandler: DragPanHandler;\n private _scrollZoomHandler: ScrollZoomHandler;\n private _touchZoomHandler: TouchZoomHandler;\n\n private _configurationSubscription: Subscription;\n\n constructor(name: string, container: Container, navigator: Navigator) {\n super(name, container, navigator);\n\n let spatial: Spatial = new Spatial();\n let viewportCoords: ViewportCoords = new ViewportCoords();\n\n this._spatial = spatial;\n this._viewportCoords = viewportCoords;\n\n this._bounceHandler = new BounceHandler(this, container, navigator, viewportCoords, spatial);\n this._doubleClickZoomHandler = new DoubleClickZoomHandler(this, container, navigator, viewportCoords);\n this._dragPanHandler = new DragPanHandler(this, container, navigator, viewportCoords, spatial);\n this._scrollZoomHandler = new ScrollZoomHandler(this, container, navigator, viewportCoords);\n this._touchZoomHandler = new TouchZoomHandler(this, container, navigator, viewportCoords);\n }\n\n /**\n * Get double click zoom.\n *\n * @returns {DoubleClickZoomHandler} The double click zoom handler.\n */\n public get doubleClickZoom(): DoubleClickZoomHandler {\n return this._doubleClickZoomHandler;\n }\n\n /**\n * Get drag pan.\n *\n * @returns {DragPanHandler} The drag pan handler.\n */\n public get dragPan(): DragPanHandler {\n return this._dragPanHandler;\n }\n\n /**\n * Get scroll zoom.\n *\n * @returns {ScrollZoomHandler} The scroll zoom handler.\n */\n public get scrollZoom(): ScrollZoomHandler {\n return this._scrollZoomHandler;\n }\n\n /**\n * Get touch zoom.\n *\n * @returns {TouchZoomHandler} The touch zoom handler.\n */\n public get touchZoom(): TouchZoomHandler {\n return this._touchZoomHandler;\n }\n\n protected _activate(): void {\n this._bounceHandler.enable();\n\n this._configurationSubscription = this._configuration$\n .subscribe(\n (configuration: IMouseConfiguration): void => {\n if (configuration.doubleClickZoom) {\n this._doubleClickZoomHandler.enable();\n } else {\n this._doubleClickZoomHandler.disable();\n }\n\n if (configuration.dragPan) {\n this._dragPanHandler.enable();\n } else {\n this._dragPanHandler.disable();\n }\n\n if (configuration.scrollZoom) {\n this._scrollZoomHandler.enable();\n } else {\n this._scrollZoomHandler.disable();\n }\n\n if (configuration.touchZoom) {\n this._touchZoomHandler.enable();\n } else {\n this._touchZoomHandler.disable();\n }\n });\n\n this._container.mouseService.claimMouse(this._name, 0);\n }\n\n protected _deactivate(): void {\n this._container.mouseService.unclaimMouse(this._name);\n\n this._configurationSubscription.unsubscribe();\n\n this._bounceHandler.disable();\n this._doubleClickZoomHandler.disable();\n this._dragPanHandler.disable();\n this._scrollZoomHandler.disable();\n this._touchZoomHandler.disable();\n }\n\n protected _getDefaultConfiguration(): IMouseConfiguration {\n return { doubleClickZoom: true, dragPan: true, scrollZoom: true, touchZoom: true };\n }\n}\n\nComponentService.register(MouseComponent);\nexport default MouseComponent;\n",
- "import {\n Component,\n IComponentConfiguration,\n} from \"../../Component\";\nimport {ViewportCoords} from \"../../Geo\";\nimport {\n Container,\n Navigator,\n} from \"../../Viewer\";\n\nexport abstract class MouseHandlerBase<TConfiguration extends IComponentConfiguration> {\n protected _component: Component<TConfiguration>;\n protected _container: Container;\n protected _navigator: Navigator;\n protected _viewportCoords: ViewportCoords;\n\n protected _enabled: boolean;\n\n constructor(component: Component<TConfiguration>, container: Container, navigator: Navigator, viewportCoords: ViewportCoords) {\n this._component = component;\n this._container = container;\n this._navigator = navigator;\n this._viewportCoords = viewportCoords;\n\n this._enabled = false;\n }\n\n /**\n * Returns a Boolean indicating whether the interaction is enabled.\n *\n * @returns {boolean} `true` if the interaction is enabled.\n */\n public get isEnabled(): boolean {\n return this._enabled;\n }\n\n /**\n * Enables the interaction.\n *\n * @example ```mouseComponent.<handler-name>.enable();```\n */\n public enable(): void {\n if (this._enabled || !this._component.activated) { return; }\n\n this._enable();\n this._enabled = true;\n\n this._component.configure(this._getConfiguration(true));\n }\n\n /**\n * Disables the interaction.\n *\n * @example ```mouseComponent.<handler-name>.disable();```\n */\n public disable(): void {\n if (!this._enabled) { return; }\n\n this._disable();\n this._enabled = false;\n\n if (this._component.activated) {\n this._component.configure(this._getConfiguration(false));\n }\n }\n\n protected abstract _enable(): void;\n\n protected abstract _disable(): void;\n\n protected abstract _getConfiguration(enable: boolean): TConfiguration;\n}\n\nexport default MouseHandlerBase;\n",
- "import {Subscription} from \"rxjs/Subscription\";\n\nimport {\n IMouseConfiguration,\n MouseHandlerBase,\n} from \"../../Component\";\nimport {Transform} from \"../../Geo\";\nimport {RenderCamera} from \"../../Render\";\nimport {\n ICurrentState,\n IFrame,\n} from \"../../State\";\n\n/**\n * The `ScrollZoomHandler` allows the user to zoom the viewer photo by scrolling.\n *\n * @example\n * ```\n * var mouseComponent = viewer.getComponent(\"mouse\");\n *\n * mouseComponent.scrollZoom.disable();\n * mouseComponent.scrollZoom.enable();\n *\n * var isEnabled = mouseComponent.scrollZoom.isEnabled;\n * ```\n */\nexport class ScrollZoomHandler extends MouseHandlerBase<IMouseConfiguration> {\n private _preventDefaultSubscription: Subscription;\n private _zoomSubscription: Subscription;\n\n protected _enable(): void {\n this._preventDefaultSubscription = this._container.mouseService.mouseWheel$\n .subscribe(\n (event: WheelEvent): void => {\n event.preventDefault();\n });\n\n this._zoomSubscription = this._container.mouseService\n .filtered$(this._component.name, this._container.mouseService.mouseWheel$)\n .withLatestFrom(\n this._navigator.stateService.currentState$,\n (w: WheelEvent, f: IFrame): [WheelEvent, IFrame] => {\n return [w, f];\n })\n .filter(\n (args: [WheelEvent, IFrame]): boolean => {\n let state: ICurrentState = args[1].state;\n return state.currentNode.fullPano || state.nodesAhead < 1;\n })\n .map(\n (args: [WheelEvent, IFrame]): WheelEvent => {\n return args[0];\n })\n .withLatestFrom(\n this._container.renderService.renderCamera$,\n this._navigator.stateService.currentTransform$,\n (w: WheelEvent, r: RenderCamera, t: Transform): [WheelEvent, RenderCamera, Transform] => {\n return [w, r, t];\n })\n .subscribe(\n (args: [WheelEvent, RenderCamera, Transform]): void => {\n let event: WheelEvent = args[0];\n let render: RenderCamera = args[1];\n let transform: Transform = args[2];\n\n let element: HTMLElement = this._container.element;\n\n let [canvasX, canvasY]: number[] = this._viewportCoords.canvasPosition(event, element);\n\n let unprojected: THREE.Vector3 =\n this._viewportCoords.unprojectFromCanvas(\n canvasX,\n canvasY,\n element,\n render.perspective);\n\n let reference: number[] = transform.projectBasic(unprojected.toArray());\n\n let deltaY: number = event.deltaY;\n if (event.deltaMode === 1) {\n deltaY = 40 * deltaY;\n } else if (event.deltaMode === 2) {\n deltaY = 800 * deltaY;\n }\n\n const canvasSize: number[] = this._viewportCoords.containerToCanvas(element);\n\n let zoom: number = -3 * deltaY / canvasSize[1];\n\n this._navigator.stateService.zoomIn(zoom, reference);\n });\n }\n\n protected _disable(): void {\n this._preventDefaultSubscription.unsubscribe();\n this._zoomSubscription.unsubscribe();\n\n this._preventDefaultSubscription = null;\n this._zoomSubscription = null;\n }\n\n protected _getConfiguration(enable: boolean): IMouseConfiguration {\n return { scrollZoom: enable };\n }\n}\n\nexport default ScrollZoomHandler;\n",
- "/// <reference path=\"../../../typings/index.d.ts\" />\n\nimport * as THREE from \"three\";\n\nimport {Observable} from \"rxjs/Observable\";\nimport {Subscription} from \"rxjs/Subscription\";\n\nimport {\n IMouseConfiguration,\n MouseHandlerBase,\n} from \"../../Component\";\nimport {Transform} from \"../../Geo\";\nimport {RenderCamera} from \"../../Render\";\nimport {\n ICurrentState,\n IFrame,\n} from \"../../State\";\nimport {IPinch} from \"../../Viewer\";\n\n/**\n * The `TouchZoomHandler` allows the user to zoom the viewer photo by pinching on a touchscreen.\n *\n * @example\n * ```\n * var mouseComponent = viewer.getComponent(\"mouse\");\n *\n * mouseComponent.touchZoom.disable();\n * mouseComponent.touchZoom.enable();\n *\n * var isEnabled = mouseComponent.touchZoom.isEnabled;\n * ```\n */\nexport class TouchZoomHandler extends MouseHandlerBase<IMouseConfiguration> {\n private _activeSubscription: Subscription;\n private _preventDefaultSubscription: Subscription;\n private _zoomSubscription: Subscription;\n\n protected _enable(): void {\n this._preventDefaultSubscription = this._container.touchService.pinch$\n .subscribe(\n (pinch: IPinch): void => {\n pinch.originalEvent.preventDefault();\n });\n\n let pinchStarted$: Observable<boolean> =\n this._container.touchService.pinchStart$\n .map(\n (event: TouchEvent): boolean => {\n return true;\n });\n\n let pinchStopped$: Observable<boolean> =\n this._container.touchService.pinchEnd$\n .map(\n (event: TouchEvent): boolean => {\n return false;\n });\n\n this._activeSubscription = Observable\n .merge(\n pinchStarted$,\n pinchStopped$)\n .subscribe(this._container.touchService.activate$);\n\n this._zoomSubscription = this._container.touchService.pinch$\n .withLatestFrom(this._navigator.stateService.currentState$)\n .filter(\n (args: [IPinch, IFrame]): boolean => {\n let state: ICurrentState = args[1].state;\n return state.currentNode.fullPano || state.nodesAhead < 1;\n })\n .map(\n (args: [IPinch, IFrame]): IPinch => {\n return args[0];\n })\n .withLatestFrom(\n this._container.renderService.renderCamera$,\n this._navigator.stateService.currentTransform$)\n .subscribe(\n ([pinch, render, transform]: [IPinch, RenderCamera, Transform]): void => {\n let element: HTMLElement = this._container.element;\n\n\n let [canvasX, canvasY]: number[] = this._viewportCoords.canvasPosition(pinch, element);\n\n let unprojected: THREE.Vector3 =\n this._viewportCoords.unprojectFromCanvas(\n canvasX,\n canvasY,\n element,\n render.perspective);\n\n let reference: number[] = transform.projectBasic(unprojected.toArray());\n\n const [canvasWidth, canvasHeight]: number[] = this._viewportCoords.containerToCanvas(element);\n let zoom: number = 3 * pinch.distanceChange / Math.min(canvasWidth, canvasHeight);\n\n this._navigator.stateService.zoomIn(zoom, reference);\n });\n }\n\n protected _disable(): void {\n this._activeSubscription.unsubscribe();\n this._preventDefaultSubscription.unsubscribe();\n this._zoomSubscription.unsubscribe();\n\n this._preventDefaultSubscription = null;\n this._zoomSubscription = null;\n }\n\n protected _getConfiguration(enable: boolean): IMouseConfiguration {\n return { touchZoom: enable };\n }\n}\n\nexport default TouchZoomHandler;\n",
+ "import {\n concat as observableConcat,\n merge as observableMerge,\n of as observableOf,\n combineLatest as observableCombineLatest,\n Observable,\n Subscription,\n} from \"rxjs\";\n\nimport {\n startWith,\n withLatestFrom,\n skip,\n first,\n publishReplay,\n pairwise,\n switchMap,\n refCount,\n distinctUntilChanged,\n map,\n} from \"rxjs/operators\";\n\nimport * as THREE from \"three\";\nimport * as when from \"when\";\n\nimport {ILatLon} from \"../../API\";\nimport {\n IMarkerConfiguration,\n IMarkerEvent,\n Marker,\n MarkerScene,\n MarkerSet,\n ComponentService,\n Component,\n} from \"../../Component\";\nimport {IFrame} from \"../../State\";\nimport {\n Container,\n Navigator,\n} from \"../../Viewer\";\nimport {\n IGLRenderHash,\n GLRenderStage,\n RenderCamera,\n} from \"../../Render\";\nimport {\n GraphCalculator,\n Node,\n} from \"../../Graph\";\nimport {\n GeoCoords,\n ILatLonAlt,\n ViewportCoords,\n} from \"../../Geo\";\n\n/**\n * @class MarkerComponent\n *\n * @classdesc Component for showing and editing 3D marker objects.\n *\n * The `add` method is used for adding new markers or replacing\n * markers already in the set.\n *\n * If a marker already in the set has the same\n * id as one of the markers added, the old marker will be removed and\n * the added marker will take its place.\n *\n * It is not possible to update markers in the set by updating any properties\n * directly on the marker object. Markers need to be replaced by\n * re-adding them for updates to geographic position or configuration\n * to be reflected.\n *\n * Markers added to the marker component can be either interactive\n * or non-interactive. Different marker types define their behavior.\n * Markers with interaction support can be configured with options\n * to respond to dragging inside the viewer and be detected when\n * retrieving markers from pixel points with the `getMarkerIdAt` method.\n *\n * To retrive and use the marker component\n *\n * @example\n * ```\n * var viewer = new Mapillary.Viewer(\n * \"<element-id>\",\n * \"<client-id>\",\n * \"<my key>\",\n * { component: { marker: true } });\n *\n * var markerComponent = viewer.getComponent(\"marker\");\n * ```\n */\nexport class MarkerComponent extends Component<IMarkerConfiguration> {\n public static componentName: string = \"marker\";\n\n /**\n * Fired when the position of a marker is changed.\n * @event\n * @type {IMarkerEvent} markerEvent - Marker event data.\n * @example\n * ```\n * markerComponent.on(\"changed\", function(e) {\n * console.log(e.marker.id, e.marker.latLon);\n * });\n * ```\n */\n public static changed: string = \"changed\";\n\n /**\n * Fired when a marker drag interaction starts.\n * @event\n * @type {IMarkerEvent} markerEvent - Marker event data.\n * @example\n * ```\n * markerComponent.on(\"dragstart\", function(e) {\n * console.log(e.marker.id, e.marker.latLon);\n * });\n * ```\n */\n public static dragstart: string = \"dragstart\";\n\n /**\n * Fired when a marker drag interaction ends.\n * @event\n * @type {IMarkerEvent} markerEvent - Marker event data.\n * @example\n * ```\n * markerComponent.on(\"dragend\", function(e) {\n * console.log(e.marker.id, e.marker.latLon);\n * });\n * ```\n */\n public static dragend: string = \"dragend\";\n\n private _relativeGroundAltitude: number;\n\n private _geoCoords: GeoCoords;\n private _graphCalculator: GraphCalculator;\n private _markerScene: MarkerScene;\n private _markerSet: MarkerSet;\n private _viewportCoords: ViewportCoords;\n\n private _adjustHeightSubscription: Subscription;\n private _dragEventSubscription: Subscription;\n private _markersUpdatedSubscription: Subscription;\n private _mouseClaimSubscription: Subscription;\n private _referenceSubscription: Subscription;\n private _renderSubscription: Subscription;\n private _setChangedSubscription: Subscription;\n private _updateMarkerSubscription: Subscription;\n\n /** @ignore */\n constructor(name: string, container: Container, navigator: Navigator) {\n super(name, container, navigator);\n\n this._relativeGroundAltitude = -2;\n\n this._geoCoords = new GeoCoords();\n this._graphCalculator = new GraphCalculator();\n this._markerScene = new MarkerScene();\n this._markerSet = new MarkerSet();\n this._viewportCoords = new ViewportCoords();\n }\n\n /**\n * Add markers to the marker set or replace markers in the marker set.\n *\n * @description If a marker already in the set has the same\n * id as one of the markers added, the old marker will be removed\n * the added marker will take its place.\n *\n * Any marker inside the visible bounding bbox\n * will be initialized and placed in the viewer.\n *\n * @param {Array<Marker>} markers - Markers to add.\n *\n * @example ```markerComponent.add([marker1, marker2]);```\n */\n public add(markers: Marker[]): void {\n this._markerSet.add(markers);\n }\n\n /**\n * Returns the marker in the marker set with the specified id, or\n * undefined if the id matches no marker.\n *\n * @param {string} markerId - Id of the marker.\n *\n * @example ```var marker = markerComponent.get(\"markerId\");```\n *\n */\n public get(markerId: string): Marker {\n return this._markerSet.get(markerId);\n }\n\n /**\n * Returns an array of all markers.\n *\n * @example ```var markers = markerComponent.getAll();```\n */\n public getAll(): Marker[] {\n return this._markerSet.getAll();\n }\n\n /**\n * Returns the id of the interactive marker closest to the current camera\n * position at the specified point.\n *\n * @description Notice that the pixelPoint argument requires x, y\n * coordinates from pixel space.\n *\n * With this function, you can use the coordinates provided by mouse\n * events to get information out of the marker component.\n *\n * If no interactive geometry of an interactive marker exist at the pixel\n * point, `null` will be returned.\n *\n * @param {Array<number>} pixelPoint - Pixel coordinates on the viewer element.\n * @returns {string} Id of the interactive marker closest to the camera. If no\n * interactive marker exist at the pixel point, `null` will be returned.\n *\n * @example\n * ```\n * markerComponent.getMarkerIdAt([100, 100])\n * .then((markerId) => { console.log(markerId); });\n * ```\n */\n public getMarkerIdAt(pixelPoint: number[]): when.Promise<string> {\n return when.promise<string>((resolve: (value: string) => void, reject: (reason: Error) => void): void => {\n this._container.renderService.renderCamera$.pipe(\n first(),\n map(\n (render: RenderCamera): string => {\n const viewport: number[] = this._viewportCoords\n .canvasToViewport(\n pixelPoint[0],\n pixelPoint[1],\n this._container.element);\n\n const id: string = this._markerScene.intersectObjects(viewport, render.perspective);\n\n return id;\n }))\n .subscribe(\n (id: string): void => {\n resolve(id);\n },\n (error: Error): void => {\n reject(error);\n });\n });\n }\n\n /**\n * Check if a marker exist in the marker set.\n *\n * @param {string} markerId - Id of the marker.\n *\n * @example ```var markerExists = markerComponent.has(\"markerId\");```\n */\n public has(markerId: string): boolean {\n return this._markerSet.has(markerId);\n }\n\n /**\n * Remove markers with the specified ids from the marker set.\n *\n * @param {Array<string>} markerIds - Ids for markers to remove.\n *\n * @example ```markerComponent.remove([\"id-1\", \"id-2\"]);```\n */\n public remove(markerIds: string[]): void {\n this._markerSet.remove(markerIds);\n }\n\n /**\n * Remove all markers from the marker set.\n *\n * @example ```markerComponent.removeAll();```\n */\n public removeAll(): void {\n this._markerSet.removeAll();\n }\n\n protected _activate(): void {\n const groundAltitude$: Observable<number> = this._navigator.stateService.currentState$.pipe(\n map(\n (frame: IFrame): number => {\n return frame.state.camera.position.z + this._relativeGroundAltitude;\n }),\n distinctUntilChanged(\n (a1: number, a2: number): boolean => {\n return Math.abs(a1 - a2) < 0.01;\n }),\n publishReplay(1),\n refCount());\n\n const geoInitiated$: Observable<void> = observableCombineLatest(\n groundAltitude$,\n this._navigator.stateService.reference$).pipe(\n first(),\n map((): void => { /* noop */ }),\n publishReplay(1),\n refCount());\n\n const clampedConfiguration$: Observable<IMarkerConfiguration> = this._configuration$.pipe(\n map(\n (configuration: IMarkerConfiguration): IMarkerConfiguration => {\n return { visibleBBoxSize: Math.max(1, Math.min(200, configuration.visibleBBoxSize)) };\n }));\n\n const currentlatLon$: Observable<ILatLon> = this._navigator.stateService.currentNode$.pipe(\n map((node: Node): ILatLon => { return node.latLon; }),\n publishReplay(1),\n refCount());\n\n const visibleBBox$: Observable<[ILatLon, ILatLon]> = observableCombineLatest(\n clampedConfiguration$,\n currentlatLon$).pipe(\n map(\n ([configuration, latLon]: [IMarkerConfiguration, ILatLon]): [ILatLon, ILatLon] => {\n return this._graphCalculator\n .boundingBoxCorners(latLon, configuration.visibleBBoxSize / 2);\n }),\n publishReplay(1),\n refCount());\n\n const visibleMarkers$: Observable<Marker[]> = observableCombineLatest(\n observableConcat(\n observableOf<MarkerSet>(this._markerSet),\n this._markerSet.changed$),\n visibleBBox$).pipe(\n map(\n ([set, bbox]: [MarkerSet, [ILatLon, ILatLon]]): Marker[] => {\n return set.search(bbox);\n }));\n\n this._setChangedSubscription = geoInitiated$.pipe(\n switchMap(\n (): Observable<[Marker[], ILatLonAlt, number]> => {\n return visibleMarkers$.pipe(\n withLatestFrom(\n this._navigator.stateService.reference$,\n groundAltitude$));\n }))\n .subscribe(\n ([markers, reference, alt]: [Marker[], ILatLonAlt, number]): void => {\n const geoCoords: GeoCoords = this._geoCoords;\n const markerScene: MarkerScene = this._markerScene;\n const sceneMarkers: { [id: string]: Marker } = markerScene.markers;\n const markersToRemove: { [id: string]: Marker } = Object.assign({}, sceneMarkers);\n\n for (const marker of markers) {\n if (marker.id in sceneMarkers) {\n delete markersToRemove[marker.id];\n } else {\n const point3d: number[] = geoCoords\n .geodeticToEnu(\n marker.latLon.lat,\n marker.latLon.lon,\n reference.alt + alt,\n reference.lat,\n reference.lon,\n reference.alt);\n\n markerScene.add(marker, point3d);\n }\n }\n\n for (const id in markersToRemove) {\n if (!markersToRemove.hasOwnProperty(id)) {\n continue;\n }\n\n markerScene.remove(id);\n }\n });\n\n this._markersUpdatedSubscription = geoInitiated$.pipe(\n switchMap(\n (): Observable<[Marker[], [ILatLon, ILatLon], ILatLonAlt, number]> => {\n return this._markerSet.updated$.pipe(\n withLatestFrom(\n visibleBBox$,\n this._navigator.stateService.reference$,\n groundAltitude$));\n }))\n .subscribe(\n ([markers, [sw, ne], reference, alt]: [Marker[], [ILatLon, ILatLon], ILatLonAlt, number]): void => {\n const geoCoords: GeoCoords = this._geoCoords;\n const markerScene: MarkerScene = this._markerScene;\n\n for (const marker of markers) {\n const exists: boolean = markerScene.has(marker.id);\n const visible: boolean = marker.latLon.lat > sw.lat &&\n marker.latLon.lat < ne.lat &&\n marker.latLon.lon > sw.lon &&\n marker.latLon.lon < ne.lon;\n\n if (visible) {\n const point3d: number[] = geoCoords\n .geodeticToEnu(\n marker.latLon.lat,\n marker.latLon.lon,\n reference.alt + alt,\n reference.lat,\n reference.lon,\n reference.alt);\n\n markerScene.add(marker, point3d);\n } else if (!visible && exists) {\n markerScene.remove(marker.id);\n }\n }\n });\n\n this._referenceSubscription = this._navigator.stateService.reference$.pipe(\n skip(1),\n withLatestFrom(groundAltitude$))\n .subscribe(\n ([reference, alt]: [ILatLonAlt, number]): void => {\n const geoCoords: GeoCoords = this._geoCoords;\n const markerScene: MarkerScene = this._markerScene;\n\n for (const marker of markerScene.getAll()) {\n const point3d: number[] = geoCoords\n .geodeticToEnu(\n marker.latLon.lat,\n marker.latLon.lon,\n reference.alt + alt,\n reference.lat,\n reference.lon,\n reference.alt);\n\n markerScene.update(marker.id, point3d);\n }\n });\n\n this._adjustHeightSubscription = groundAltitude$.pipe(\n skip(1),\n withLatestFrom(\n this._navigator.stateService.reference$,\n currentlatLon$))\n .subscribe(\n ([alt, reference, latLon]: [number, ILatLonAlt, ILatLon]): void => {\n const geoCoords: GeoCoords = this._geoCoords;\n const markerScene: MarkerScene = this._markerScene;\n\n const position: number[] = geoCoords\n .geodeticToEnu(\n latLon.lat,\n latLon.lon,\n reference.alt + alt,\n reference.lat,\n reference.lon,\n reference.alt);\n\n for (const marker of markerScene.getAll()) {\n const point3d: number[] = geoCoords\n .geodeticToEnu(\n marker.latLon.lat,\n marker.latLon.lon,\n reference.alt + alt,\n reference.lat,\n reference.lon,\n reference.alt);\n\n const distanceX: number = point3d[0] - position[0];\n const distanceY: number = point3d[1] - position[1];\n\n const groundDistance: number = Math.sqrt(distanceX * distanceX + distanceY * distanceY);\n if (groundDistance > 50) {\n continue;\n }\n\n markerScene.lerpAltitude(marker.id, alt, Math.min(1, Math.max(0, 1.2 - 1.2 * groundDistance / 50)));\n }\n });\n\n this._renderSubscription = this._navigator.stateService.currentState$.pipe(\n map(\n (frame: IFrame): IGLRenderHash => {\n const scene: MarkerScene = this._markerScene;\n\n return {\n name: this._name,\n render: {\n frameId: frame.id,\n needsRender: scene.needsRender,\n render: scene.render.bind(scene),\n stage: GLRenderStage.Foreground,\n },\n };\n }))\n .subscribe(this._container.glRenderer.render$);\n\n const hoveredMarkerId$: Observable<string> = observableCombineLatest(\n this._container.renderService.renderCamera$,\n this._container.mouseService.mouseMove$).pipe(\n map(\n ([render, event]: [RenderCamera, MouseEvent]): string => {\n const element: HTMLElement = this._container.element;\n const [canvasX, canvasY]: number[] = this._viewportCoords.canvasPosition(event, element);\n const viewport: number[] = this._viewportCoords.canvasToViewport(\n canvasX,\n canvasY,\n element);\n\n const markerId: string = this._markerScene.intersectObjects(viewport, render.perspective);\n\n return markerId;\n }),\n publishReplay(1),\n refCount());\n\n const draggingStarted$: Observable<boolean> =\n this._container.mouseService\n .filtered$(this._name, this._container.mouseService.mouseDragStart$).pipe(\n map(\n (event: MouseEvent): boolean => {\n return true;\n }));\n\n const draggingStopped$: Observable<boolean> =\n this._container.mouseService\n .filtered$(this._name, this._container.mouseService.mouseDragEnd$).pipe(\n map(\n (event: Event): boolean => {\n return false;\n }));\n\n const filteredDragging$: Observable<boolean> = observableMerge(\n draggingStarted$,\n draggingStopped$).pipe(\n startWith(false));\n\n this._dragEventSubscription = observableMerge(\n draggingStarted$.pipe(\n withLatestFrom(hoveredMarkerId$)),\n observableCombineLatest(\n draggingStopped$,\n observableOf<string>(null))).pipe(\n startWith<[boolean, string]>([false, null]),\n pairwise())\n .subscribe(\n ([previous, current]: [boolean, string][]): void => {\n const dragging: boolean = current[0];\n const eventType: string = dragging ? MarkerComponent.dragstart : MarkerComponent.dragend;\n const id: string = dragging ? current[1] : previous[1];\n const marker: Marker = this._markerScene.get(id);\n const markerEvent: IMarkerEvent = { marker: marker, target: this, type: eventType };\n\n this.fire(eventType, markerEvent);\n });\n\n const mouseDown$: Observable<boolean> = observableMerge(\n this._container.mouseService.mouseDown$.pipe(\n map((event: MouseEvent): boolean => { return true; })),\n this._container.mouseService.documentMouseUp$.pipe(\n map((event: MouseEvent): boolean => { return false; }))).pipe(\n startWith(false));\n\n this._mouseClaimSubscription = observableCombineLatest(\n this._container.mouseService.active$,\n hoveredMarkerId$.pipe(distinctUntilChanged()),\n mouseDown$,\n filteredDragging$).pipe(\n map(\n ([active, markerId, mouseDown, filteredDragging]: [boolean, string, boolean, boolean]): boolean => {\n return (!active && markerId != null && mouseDown) || filteredDragging;\n }),\n distinctUntilChanged())\n .subscribe(\n (claim: boolean): void => {\n if (claim) {\n this._container.mouseService.claimMouse(this._name, 1);\n this._container.mouseService.claimWheel(this._name, 1);\n } else {\n this._container.mouseService.unclaimMouse(this._name);\n this._container.mouseService.unclaimWheel(this._name);\n }\n });\n\n const offset$: Observable<[Marker, number[], RenderCamera]> = this._container.mouseService\n .filtered$(this._name, this._container.mouseService.mouseDragStart$).pipe(\n withLatestFrom(\n hoveredMarkerId$,\n this._container.renderService.renderCamera$),\n map(\n ([e, id, r]: [MouseEvent, string, RenderCamera]): [Marker, number[], RenderCamera] => {\n const marker: Marker = this._markerScene.get(id);\n const element: HTMLElement = this._container.element;\n\n const [groundCanvasX, groundCanvasY]: number[] =\n this._viewportCoords.projectToCanvas(\n marker.geometry.position.toArray(),\n element,\n r.perspective);\n\n const [canvasX, canvasY]: number[] = this._viewportCoords.canvasPosition(e, element);\n\n const offset: number[] = [canvasX - groundCanvasX, canvasY - groundCanvasY];\n\n return [marker, offset, r];\n }),\n publishReplay(1),\n refCount());\n\n this._updateMarkerSubscription = this._container.mouseService\n .filtered$(this._name, this._container.mouseService.mouseDrag$).pipe(\n withLatestFrom(\n offset$,\n this._navigator.stateService.reference$,\n clampedConfiguration$))\n .subscribe(\n ([event, [marker, offset, render], reference, configuration]:\n [MouseEvent, [Marker, number[], RenderCamera], ILatLonAlt, IMarkerConfiguration]): void => {\n if (!this._markerScene.has(marker.id)) {\n return;\n }\n\n const element: HTMLElement = this._container.element;\n const [canvasX, canvasY]: number[] = this._viewportCoords.canvasPosition(event, element);\n\n const groundX: number = canvasX - offset[0];\n const groundY: number = canvasY - offset[1];\n\n const [viewportX, viewportY]: number[] = this._viewportCoords\n .canvasToViewport(\n groundX,\n groundY,\n element);\n\n const direction: THREE.Vector3 = new THREE.Vector3(viewportX, viewportY, 1)\n .unproject(render.perspective)\n .sub(render.perspective.position)\n .normalize();\n\n const distance: number = Math.min(\n this._relativeGroundAltitude / direction.z,\n configuration.visibleBBoxSize / 2 - 0.1);\n\n if (distance < 0) {\n return;\n }\n\n const intersection: THREE.Vector3 = direction\n .clone()\n .multiplyScalar(distance)\n .add(render.perspective.position);\n\n intersection.z = render.perspective.position.z + this._relativeGroundAltitude;\n\n const [lat, lon]: number[] = this._geoCoords\n .enuToGeodetic(\n intersection.x,\n intersection.y,\n intersection.z,\n reference.lat,\n reference.lon,\n reference.alt);\n\n this._markerScene.update(marker.id, intersection.toArray(), { lat: lat, lon: lon });\n this._markerSet.update(marker);\n\n const markerEvent: IMarkerEvent = { marker: marker, target: this, type: MarkerComponent.changed };\n this.fire(MarkerComponent.changed, markerEvent);\n });\n }\n\n protected _deactivate(): void {\n this._adjustHeightSubscription.unsubscribe();\n this._dragEventSubscription.unsubscribe();\n this._markersUpdatedSubscription.unsubscribe();\n this._mouseClaimSubscription.unsubscribe();\n this._referenceSubscription.unsubscribe();\n this._renderSubscription.unsubscribe();\n this._setChangedSubscription.unsubscribe();\n this._updateMarkerSubscription.unsubscribe();\n\n this._markerScene.clear();\n }\n\n protected _getDefaultConfiguration(): IMarkerConfiguration {\n return { visibleBBoxSize: 100 };\n }\n}\n\nComponentService.register(MarkerComponent);\nexport default MarkerComponent;\n",
+ "import * as THREE from \"three\";\n\nimport {ILatLon} from \"../../API\";\nimport {Marker} from \"../../Component\";\n\nexport class MarkerScene {\n private _needsRender: boolean;\n private _interactiveObjects: THREE.Object3D[];\n private _markers: { [key: string]: Marker };\n private _objectMarkers: { [id: string]: string };\n private _raycaster: THREE.Raycaster;\n private _scene: THREE.Scene;\n\n constructor(scene?: THREE.Scene, raycaster?: THREE.Raycaster) {\n this._needsRender = false;\n this._interactiveObjects = [];\n this._markers = {};\n this._objectMarkers = {};\n this._raycaster = !!raycaster ? raycaster : new THREE.Raycaster();\n this._scene = !!scene ? scene : new THREE.Scene();\n }\n\n public get markers(): { [key: string]: Marker } {\n return this._markers;\n }\n\n public get needsRender(): boolean {\n return this._needsRender;\n }\n\n public add(marker: Marker, position: number[]): void {\n if (marker.id in this._markers) {\n this._dispose(marker.id);\n }\n\n marker.createGeometry(position);\n this._scene.add(marker.geometry);\n this._markers[marker.id] = marker;\n for (let interactiveObject of marker.getInteractiveObjects()) {\n this._interactiveObjects.push(interactiveObject);\n this._objectMarkers[interactiveObject.uuid] = marker.id;\n }\n\n this._needsRender = true;\n }\n\n public clear(): void {\n for (const id in this._markers) {\n if (!this._markers.hasOwnProperty) {\n continue;\n }\n\n this._dispose(id);\n }\n\n this._needsRender = true;\n }\n\n public get(id: string): Marker {\n return this._markers[id];\n }\n\n public getAll(): Marker[] {\n return Object\n .keys(this._markers)\n .map((id: string): Marker => { return this._markers[id]; });\n }\n\n public has(id: string): boolean {\n return id in this._markers;\n }\n\n public intersectObjects([viewportX, viewportY]: number[], camera: THREE.Camera): string {\n this._raycaster.setFromCamera(new THREE.Vector2(viewportX, viewportY), camera);\n\n const intersects: THREE.Intersection[] = this._raycaster.intersectObjects(this._interactiveObjects);\n for (const intersect of intersects) {\n if (intersect.object.uuid in this._objectMarkers) {\n return this._objectMarkers[intersect.object.uuid];\n }\n }\n\n return null;\n }\n\n public lerpAltitude(id: string, alt: number, alpha: number): void {\n if (!(id in this._markers)) {\n return;\n }\n\n this._markers[id].lerpAltitude(alt, alpha);\n\n this._needsRender = true;\n }\n\n public remove(id: string): void {\n if (!(id in this._markers)) {\n return;\n }\n\n this._dispose(id);\n\n this._needsRender = true;\n }\n\n public render(\n perspectiveCamera: THREE.PerspectiveCamera,\n renderer: THREE.WebGLRenderer): void {\n\n renderer.render(this._scene, perspectiveCamera);\n\n this._needsRender = false;\n }\n\n public update(id: string, position: number[], latLon?: ILatLon): void {\n if (!(id in this._markers)) {\n return;\n }\n\n const marker: Marker = this._markers[id];\n marker.updatePosition(position, latLon);\n\n this._needsRender = true;\n }\n\n private _dispose(id: string): void {\n const marker: Marker = this._markers[id];\n this._scene.remove(marker.geometry);\n for (let interactiveObject of marker.getInteractiveObjects()) {\n const index: number = this._interactiveObjects.indexOf(interactiveObject);\n if (index !== -1) {\n this._interactiveObjects.splice(index, 1);\n } else {\n console.warn(`Object does not exist (${interactiveObject.id}) for ${id}`);\n }\n\n delete this._objectMarkers[interactiveObject.uuid];\n }\n\n marker.disposeGeometry();\n\n delete this._markers[id];\n }\n}\n\nexport default MarkerScene;\n",
+ "import * as rbush from \"rbush\";\n\nimport {Observable, Subject} from \"rxjs\";\n\nimport {ILatLon} from \"../../API\";\nimport {Marker} from \"../../Component\";\n\ntype MarkerIndexItem = {\n lat: number;\n lon: number;\n marker: Marker;\n};\n\ntype MarkerIndex = rbush.RBush<MarkerIndexItem>;\n\nexport class MarkerSet {\n private _hash: { [id: string]: MarkerIndexItem };\n private _index: MarkerIndex;\n\n private _indexChanged$: Subject<MarkerSet>;\n private _updated$: Subject<Marker[]>;\n\n constructor() {\n this._hash = {};\n this._index = rbush<MarkerIndexItem>(16, [\".lon\", \".lat\", \".lon\", \".lat\"]);\n\n this._indexChanged$ = new Subject<MarkerSet>();\n this._updated$ = new Subject<Marker[]>();\n }\n\n public get changed$(): Observable<MarkerSet> {\n return this._indexChanged$;\n }\n\n public get updated$(): Observable<Marker[]> {\n return this._updated$;\n }\n\n public add(markers: Marker[]): void {\n const updated: Marker[] = [];\n const hash: { [id: string]: MarkerIndexItem } = this._hash;\n const index: MarkerIndex = this._index;\n\n for (const marker of markers) {\n const id: string = marker.id;\n\n if (id in hash) {\n index.remove(hash[id]);\n updated.push(marker);\n }\n\n const item: MarkerIndexItem = {\n lat: marker.latLon.lat,\n lon: marker.latLon.lon,\n marker: marker,\n };\n\n hash[id] = item;\n index.insert(item);\n }\n\n if (updated.length > 0) {\n this._updated$.next(updated);\n }\n\n if (markers.length > updated.length) {\n this._indexChanged$.next(this);\n }\n }\n\n public has(id: string): boolean {\n return id in this._hash;\n }\n\n public get(id: string): Marker {\n return this.has(id) ? this._hash[id].marker : undefined;\n }\n\n public getAll(): Marker[] {\n return this._index\n .all()\n .map(\n (indexItem: MarkerIndexItem): Marker => {\n return indexItem.marker;\n });\n }\n\n public remove(ids: string[]): void {\n const hash: { [id: string]: MarkerIndexItem } = this._hash;\n const index: MarkerIndex = this._index;\n\n let changed: boolean = false;\n for (const id of ids) {\n if (!(id in hash)) {\n continue;\n }\n\n const item: MarkerIndexItem = hash[id];\n index.remove(item);\n delete hash[id];\n changed = true;\n }\n\n if (changed) {\n this._indexChanged$.next(this);\n }\n }\n\n public removeAll(): void {\n this._hash = {};\n this._index.clear();\n\n this._indexChanged$.next(this);\n }\n\n public search([sw, ne]: [ILatLon, ILatLon]): Marker[] {\n return this._index\n .search({ maxX: ne.lon, maxY: ne.lat, minX: sw.lon, minY: sw.lat })\n .map(\n (indexItem: MarkerIndexItem): Marker => {\n return indexItem.marker;\n });\n }\n\n public update(marker: Marker): void {\n const hash: { [id: string]: MarkerIndexItem } = this._hash;\n const index: MarkerIndex = this._index;\n const id: string = marker.id;\n\n if (!(id in hash)) {\n return;\n }\n\n index.remove(hash[id]);\n\n const item: MarkerIndexItem = {\n lat: marker.latLon.lat,\n lon: marker.latLon.lon,\n marker: marker,\n };\n\n hash[id] = item;\n index.insert(item);\n }\n}\n\nexport default MarkerSet;\n",
+ "import * as THREE from \"three\";\n\nimport {ILatLon} from \"../../../API\";\nimport {\n ICircleMarkerOptions,\n Marker,\n} from \"../../../Component\";\n\n/**\n * @class CircleMarker\n *\n * @classdesc Non-interactive marker with a flat circle shape. The circle\n * marker can not be configured to be interactive.\n *\n * Circle marker properties can not be updated after creation.\n *\n * To create and add one `CircleMarker` with default configuration\n * and one with configuration use\n *\n * @example\n * ```\n * var defaultMarker = new Mapillary.MarkerComponent.CircleMarker(\n * \"id-1\",\n * { lat: 0, lon: 0, });\n *\n * var configuredMarker = new Mapillary.MarkerComponent.CircleMarker(\n * \"id-2\",\n * { lat: 0, lon: 0, },\n * {\n * color: \"#0Ff\",\n * opacity: 0.3,\n * radius: 0.7,\n * });\n *\n * markerComponent.add([defaultMarker, configuredMarker]);\n * ```\n */\nexport class CircleMarker extends Marker {\n private _color: number | string;\n private _opacity: number;\n private _radius: number;\n\n constructor(id: string, latLon: ILatLon, options?: ICircleMarkerOptions) {\n super(id, latLon);\n\n options = !!options ? options : {};\n this._color = options.color != null ? options.color : 0xffffff;\n this._opacity = options.opacity != null ? options.opacity : 0.4;\n this._radius = options.radius != null ? options.radius : 1;\n }\n\n protected _createGeometry(position: number[]): void {\n const circle: THREE.Mesh = new THREE.Mesh(\n new THREE.CircleGeometry(this._radius, 16),\n new THREE.MeshBasicMaterial({\n color: this._color,\n opacity: this._opacity,\n transparent: true,\n }));\n\n circle.up.fromArray([0, 0, 1]);\n circle.renderOrder = -1;\n\n const group: THREE.Object3D = new THREE.Object3D();\n group.add(circle);\n group.position.fromArray(position);\n\n this._geometry = group;\n }\n\n protected _disposeGeometry(): void {\n for (let mesh of <THREE.Mesh[]>this._geometry.children) {\n mesh.geometry.dispose();\n (<THREE.Material>mesh.material).dispose();\n }\n }\n\n protected _getInteractiveObjects(): THREE.Object3D[] {\n return [];\n }\n}\n\nexport default CircleMarker;\n",
+ "import * as THREE from \"three\";\n\nimport {ILatLon} from \"../../../API\";\n\n/**\n * @class Marker\n *\n * @classdesc Represents an abstract marker class that should be extended\n * by marker implementations used in the marker component.\n */\nexport abstract class Marker {\n protected _id: string;\n protected _geometry: THREE.Object3D;\n protected _latLon: ILatLon;\n\n constructor(id: string, latLon: ILatLon) {\n this._id = id;\n this._latLon = latLon;\n }\n\n /**\n * Get id.\n * @returns {string} The id of the marker.\n */\n public get id(): string {\n return this._id;\n }\n\n /**\n * Get geometry.\n *\n * @ignore\n */\n public get geometry(): THREE.Object3D {\n return this._geometry;\n }\n\n /**\n * Get lat lon.\n * @returns {ILatLon} The geographic coordinates of the marker.\n */\n public get latLon(): ILatLon {\n return this._latLon;\n }\n\n /** @ignore */\n public createGeometry(position: number[]): void {\n if (!!this._geometry) {\n return;\n }\n\n this._createGeometry(position);\n\n // update matrix world if raycasting occurs before first render\n this._geometry.updateMatrixWorld(true);\n }\n\n /** @ignore */\n public disposeGeometry(): void {\n if (!this._geometry) {\n return;\n }\n\n this._disposeGeometry();\n\n this._geometry = undefined;\n }\n\n /** @ignore */\n public getInteractiveObjects(): THREE.Object3D[] {\n if (!this._geometry) {\n return [];\n }\n\n return this._getInteractiveObjects();\n }\n\n /** @ignore */\n public lerpAltitude(alt: number, alpha: number): void {\n if (!this._geometry) {\n return;\n }\n\n this._geometry.position.z = (1 - alpha) * this._geometry.position.z + alpha * alt;\n }\n\n /** @ignore */\n public updatePosition(position: number[], latLon?: ILatLon): void {\n if (!!latLon) {\n this._latLon.lat = latLon.lat;\n this._latLon.lon = latLon.lon;\n }\n\n if (!this._geometry) {\n return;\n }\n\n this._geometry.position.fromArray(position);\n this._geometry.updateMatrixWorld(true);\n }\n\n protected abstract _createGeometry(position: number[]): void;\n\n protected abstract _disposeGeometry(): void;\n\n protected abstract _getInteractiveObjects(): THREE.Object3D[];\n}\n\nexport default Marker;\n",
+ "import * as THREE from \"three\";\n\nimport {ILatLon} from \"../../../API\";\nimport {\n ISimpleMarkerOptions,\n Marker,\n} from \"../../../Component\";\n\n/**\n * @class SimpleMarker\n *\n * @classdesc Interactive marker with ice cream shape. The sphere\n * inside the ice cream can be configured to be interactive.\n *\n * Simple marker properties can not be updated after creation.\n *\n * To create and add one `SimpleMarker` with default configuration\n * (non-interactive) and one interactive with configuration use\n *\n * @example\n * ```\n * var defaultMarker = new Mapillary.MarkerComponent.SimpleMarker(\n * \"id-1\",\n * { lat: 0, lon: 0, });\n *\n * var interactiveMarker = new Mapillary.MarkerComponent.SimpleMarker(\n * \"id-2\",\n * { lat: 0, lon: 0, },\n * {\n * ballColor: \"#00f\",\n * ballOpacity: 0.5,\n * color: \"#00f\",\n * interactive: true,\n * opacity: 0.3,\n * radius: 0.7,\n * });\n *\n * markerComponent.add([defaultMarker, interactiveMarker]);\n * ```\n */\nexport class SimpleMarker extends Marker {\n private _ballColor: number | string;\n private _ballOpacity: number;\n private _circleToRayAngle: number;\n private _color: number | string;\n private _interactive: boolean;\n private _opacity: number;\n private _radius: number;\n\n constructor(id: string, latLon: ILatLon, options?: ISimpleMarkerOptions) {\n super(id, latLon);\n\n options = !!options ? options : {};\n this._ballColor = options.ballColor != null ? options.ballColor : 0xff0000;\n this._ballOpacity = options.ballOpacity != null ? options.ballOpacity : 0.8;\n this._circleToRayAngle = 2;\n this._color = options.color != null ? options.color : 0xff0000;\n this._interactive = !!options.interactive;\n this._opacity = options.opacity != null ? options.opacity : 0.4;\n this._radius = options.radius != null ? options.radius : 1;\n }\n\n protected _createGeometry(position: number[]): void {\n const radius: number = this._radius;\n const cone: THREE.Mesh = new THREE.Mesh(\n this._markerGeometry(radius, 8, 8),\n new THREE.MeshBasicMaterial({\n color: this._color,\n opacity: this._opacity,\n transparent: true,\n }));\n\n cone.renderOrder = 1;\n\n const ball: THREE.Mesh = new THREE.Mesh(\n new THREE.SphereGeometry(radius / 2, 8, 8),\n new THREE.MeshBasicMaterial({\n color: this._ballColor,\n opacity: this._ballOpacity,\n transparent: true,\n }));\n\n ball.position.z = this._markerHeight(radius);\n\n const group: THREE.Object3D = new THREE.Object3D();\n group.add(ball);\n group.add(cone);\n group.position.fromArray(position);\n\n this._geometry = group;\n }\n\n protected _disposeGeometry(): void {\n for (let mesh of <THREE.Mesh[]>this._geometry.children) {\n mesh.geometry.dispose();\n (<THREE.Material>mesh.material).dispose();\n }\n }\n\n protected _getInteractiveObjects(): THREE.Object3D[] {\n return this._interactive ? [this._geometry.children[0]] : [];\n }\n\n private _markerHeight(radius: number): number {\n let t: number = Math.tan(Math.PI - this._circleToRayAngle);\n return radius * Math.sqrt(1 + t * t);\n }\n\n private _markerGeometry(radius: number, widthSegments: number, heightSegments: number): THREE.Geometry {\n let geometry: THREE.Geometry = new THREE.Geometry();\n\n widthSegments = Math.max(3, Math.floor(widthSegments) || 8);\n heightSegments = Math.max(2, Math.floor(heightSegments) || 6);\n let height: number = this._markerHeight(radius);\n\n let vertices: any[] = [];\n\n for (let y: number = 0; y <= heightSegments; ++y) {\n\n let verticesRow: any[] = [];\n\n for (let x: number = 0; x <= widthSegments; ++x) {\n let u: number = x / widthSegments * Math.PI * 2;\n let v: number = y / heightSegments * Math.PI;\n\n let r: number;\n if (v < this._circleToRayAngle) {\n r = radius;\n } else {\n let t: number = Math.tan(v - this._circleToRayAngle);\n r = radius * Math.sqrt(1 + t * t);\n }\n\n let vertex: THREE.Vector3 = new THREE.Vector3();\n vertex.x = r * Math.cos(u) * Math.sin(v);\n vertex.y = r * Math.sin(u) * Math.sin(v);\n vertex.z = r * Math.cos(v) + height;\n\n geometry.vertices.push(vertex);\n verticesRow.push(geometry.vertices.length - 1);\n }\n vertices.push(verticesRow);\n }\n\n for (let y: number = 0; y < heightSegments; ++y) {\n for (let x: number = 0; x < widthSegments; ++x) {\n let v1: number = vertices[y][x + 1];\n let v2: number = vertices[y][x];\n let v3: number = vertices[y + 1][x];\n let v4: number = vertices[y + 1][x + 1];\n\n let n1: THREE.Vector3 = geometry.vertices[v1].clone().normalize();\n let n2: THREE.Vector3 = geometry.vertices[v2].clone().normalize();\n let n3: THREE.Vector3 = geometry.vertices[v3].clone().normalize();\n let n4: THREE.Vector3 = geometry.vertices[v4].clone().normalize();\n\n geometry.faces.push(new THREE.Face3(v1, v2, v4, [n1, n2, n4]));\n geometry.faces.push(new THREE.Face3(v2, v3, v4, [n2.clone(), n3, n4.clone()]));\n }\n }\n\n geometry.computeFaceNormals();\n geometry.boundingSphere = new THREE.Sphere(new THREE.Vector3(), radius + height);\n\n return geometry;\n }\n}\n\nexport default SimpleMarker;\n",
+ "import * as THREE from \"three\";\n\nimport {empty as observableEmpty, combineLatest as observableCombineLatest, Observable, Subscription} from \"rxjs\";\n\nimport {first, map, distinctUntilChanged, switchMap, withLatestFrom, startWith} from \"rxjs/operators\";\n\nimport {\n Component,\n ImageBoundary,\n IMouseConfiguration,\n HandlerBase,\n} from \"../../Component\";\nimport {\n Spatial,\n Transform,\n ViewportCoords,\n} from \"../../Geo\";\nimport {\n RenderCamera,\n} from \"../../Render\";\nimport {IFrame} from \"../../State\";\nimport {\n Container,\n Navigator,\n} from \"../../Viewer\";\nimport Node from \"../../graph/Node\";\n\n/**\n * The `BounceHandler` ensures that the viewer bounces back to the image\n * when drag panning outside of the image edge.\n */\nexport class BounceHandler extends HandlerBase<IMouseConfiguration> {\n private _spatial: Spatial;\n private _viewportCoords: ViewportCoords;\n\n private _bounceSubscription: Subscription;\n\n constructor(\n component: Component<IMouseConfiguration>,\n container: Container,\n navigator: Navigator,\n viewportCoords: ViewportCoords,\n spatial: Spatial) {\n super(component, container, navigator);\n\n this._spatial = spatial;\n this._viewportCoords = viewportCoords;\n }\n\n protected _enable(): void {\n const inTransition$: Observable<boolean> = this._navigator.stateService.currentState$.pipe(\n map(\n (frame: IFrame): boolean => {\n return frame.state.alpha < 1;\n }),\n distinctUntilChanged());\n\n this._bounceSubscription = observableCombineLatest(\n inTransition$,\n this._navigator.stateService.inTranslation$,\n this._container.mouseService.active$,\n this._container.touchService.active$).pipe(\n map(\n (noForce: boolean[]): boolean => {\n return noForce[0] || noForce[1] || noForce[2] || noForce[3];\n }),\n distinctUntilChanged(),\n switchMap(\n (noForce: boolean): Observable<[RenderCamera, Transform]> => {\n return noForce ?\n observableEmpty() :\n observableCombineLatest(\n this._container.renderService.renderCamera$,\n this._navigator.stateService.currentTransform$.pipe(first()));\n }),\n withLatestFrom(this._navigator.panService.panNodes$))\n .subscribe(\n ([[render, transform], nts]: [[RenderCamera, Transform], [Node, Transform, number][]]): void => {\n if (!transform.hasValidScale && render.camera.focal < 0.1) {\n return;\n }\n\n if (render.perspective.aspect === 0 || render.perspective.aspect === Number.POSITIVE_INFINITY) {\n return;\n }\n\n const distances: number[] = ImageBoundary.viewportDistances(transform, render.perspective, this._viewportCoords);\n\n const basic: number[] = this._viewportCoords.viewportToBasic(0, 0, transform, render.perspective);\n\n if ((basic[0] < 0 || basic[0] > 1) && nts.length > 0) {\n distances[0] = distances[2] = 0;\n }\n\n for (const [, t] of nts) {\n const d: number[] = ImageBoundary.viewportDistances(t, render.perspective, this._viewportCoords);\n\n for (let i: number = 1; i < distances.length; i += 2) {\n if (d[i] < distances[i]) {\n distances[i] = d[i];\n }\n }\n }\n\n if (Math.max(...distances) < 0.01) {\n return;\n }\n\n const horizontalDistance: number = distances[1] - distances[3];\n const verticalDistance: number = distances[0] - distances[2];\n\n const currentDirection: THREE.Vector3 = this._viewportCoords\n .unprojectFromViewport(0, 0, render.perspective)\n .sub(render.perspective.position);\n\n const directionPhi: THREE.Vector3 = this._viewportCoords\n .unprojectFromViewport(horizontalDistance, 0, render.perspective)\n .sub(render.perspective.position);\n\n const directionTheta: THREE.Vector3 = this._viewportCoords\n .unprojectFromViewport(0, verticalDistance, render.perspective)\n .sub(render.perspective.position);\n\n let phi: number = (horizontalDistance > 0 ? 1 : -1) * directionPhi.angleTo(currentDirection);\n let theta: number = (verticalDistance > 0 ? 1 : -1) * directionTheta.angleTo(currentDirection);\n\n const threshold: number = Math.PI / 60;\n const coeff: number = 1e-1;\n\n phi = this._spatial.clamp(coeff * phi, -threshold, threshold);\n theta = this._spatial.clamp(coeff * theta, -threshold, threshold);\n\n this._navigator.stateService.rotateUnbounded({ phi: phi, theta: theta });\n });\n }\n\n protected _disable(): void {\n this._bounceSubscription.unsubscribe();\n }\n\n protected _getConfiguration(): IMouseConfiguration {\n return { };\n }\n}\n\nexport default BounceHandler;\n",
+ "import {merge as observableMerge, Subscription} from \"rxjs\";\n\nimport {map, withLatestFrom} from \"rxjs/operators\";\n\nimport {\n Component,\n IMouseConfiguration,\n HandlerBase,\n ClientTouch,\n} from \"../../Component\";\nimport {\n Transform,\n ViewportCoords,\n} from \"../../Geo\";\nimport {RenderCamera} from \"../../Render\";\nimport {\n Container,\n Navigator,\n} from \"../../Viewer\";\n\n/**\n * The `DoubleClickZoomHandler` allows the user to zoom the viewer image at a point by double clicking.\n *\n * @example\n * ```\n * var mouseComponent = viewer.getComponent(\"mouse\");\n *\n * mouseComponent.doubleClickZoom.disable();\n * mouseComponent.doubleClickZoom.enable();\n *\n * var isEnabled = mouseComponent.doubleClickZoom.isEnabled;\n * ```\n */\nexport class DoubleClickZoomHandler extends HandlerBase<IMouseConfiguration> {\n private _viewportCoords: ViewportCoords;\n\n private _zoomSubscription: Subscription;\n\n /** @ignore */\n constructor(\n component: Component<IMouseConfiguration>,\n container: Container,\n navigator: Navigator,\n viewportCoords: ViewportCoords) {\n super(component, container, navigator);\n\n this._viewportCoords = viewportCoords;\n }\n\n protected _enable(): void {\n this._zoomSubscription = observableMerge(\n this._container.mouseService\n .filtered$(this._component.name, this._container.mouseService.dblClick$),\n this._container.touchService.doubleTap$.pipe(\n map(\n (e: TouchEvent): ClientTouch => {\n let touch: Touch = e.touches[0];\n return { clientX: touch.clientX, clientY: touch.clientY, shiftKey: e.shiftKey };\n }))).pipe(\n withLatestFrom(\n this._container.renderService.renderCamera$,\n this._navigator.stateService.currentTransform$))\n .subscribe(\n ([event, render, transform]: [MouseEvent | ClientTouch, RenderCamera, Transform]): void => {\n const element: HTMLElement = this._container.element;\n\n const [canvasX, canvasY]: number[] = this._viewportCoords.canvasPosition(event, element);\n\n const unprojected: THREE.Vector3 =\n this._viewportCoords.unprojectFromCanvas(\n canvasX,\n canvasY,\n element,\n render.perspective);\n\n const reference: number[] = transform.projectBasic(unprojected.toArray());\n const delta: number = !!(<{ shiftKey: boolean }>event).shiftKey ? -1 : 1;\n\n this._navigator.stateService.zoomIn(delta, reference);\n });\n }\n\n protected _disable(): void {\n this._zoomSubscription.unsubscribe();\n }\n\n protected _getConfiguration(enable: boolean): IMouseConfiguration {\n return { doubleClickZoom: enable };\n }\n}\n\nexport default DoubleClickZoomHandler;\n",
+ "import {\n empty as observableEmpty,\n merge as observableMerge,\n Observable,\n Subscription,\n} from \"rxjs\";\n\nimport {\n sample,\n scan,\n map,\n share,\n switchMap,\n withLatestFrom,\n pairwise,\n filter,\n distinctUntilChanged,\n startWith,\n} from \"rxjs/operators\";\n\nimport * as THREE from \"three\";\n\nimport {\n Component,\n ImageBoundary,\n IMouseConfiguration,\n HandlerBase,\n MouseTouchPair,\n MouseOperator,\n} from \"../../Component\";\nimport {\n Spatial,\n Transform,\n ViewportCoords,\n} from \"../../Geo\";\nimport {\n RenderCamera,\n} from \"../../Render\";\nimport {\n IFrame,\n IRotation,\n} from \"../../State\";\nimport {\n Container,\n Navigator,\n} from \"../../Viewer\";\nimport Node from \"../../graph/Node\";\n\n/**\n * The `DragPanHandler` allows the user to pan the viewer image by clicking and dragging the cursor.\n *\n * @example\n * ```\n * var mouseComponent = viewer.getComponent(\"mouse\");\n *\n * mouseComponent.dragPan.disable();\n * mouseComponent.dragPan.enable();\n *\n * var isEnabled = mouseComponent.dragPan.isEnabled;\n * ```\n */\nexport class DragPanHandler extends HandlerBase<IMouseConfiguration> {\n private _spatial: Spatial;\n private _viewportCoords: ViewportCoords;\n\n private _activeMouseSubscription: Subscription;\n private _activeTouchSubscription: Subscription;\n private _preventDefaultSubscription: Subscription;\n private _rotateSubscription: Subscription;\n private _rotateWithoutInertiaSubscription: Subscription;\n\n /** @ignore */\n constructor(\n component: Component<IMouseConfiguration>,\n container: Container,\n navigator: Navigator,\n viewportCoords: ViewportCoords,\n spatial: Spatial) {\n super(component, container, navigator);\n\n this._spatial = spatial;\n this._viewportCoords = viewportCoords;\n }\n\n protected _enable(): void {\n let draggingStarted$: Observable<boolean> =\n this._container.mouseService\n .filtered$(this._component.name, this._container.mouseService.mouseDragStart$).pipe(\n map(\n (): boolean => {\n return true;\n }),\n share());\n\n let draggingStopped$: Observable<boolean> =\n this._container.mouseService\n .filtered$(this._component.name, this._container.mouseService.mouseDragEnd$).pipe(\n map(\n (): boolean => {\n return false;\n }),\n share());\n\n this._activeMouseSubscription = observableMerge(\n draggingStarted$,\n draggingStopped$)\n .subscribe(this._container.mouseService.activate$);\n\n const documentMouseMove$: Observable<MouseEvent> = observableMerge(\n draggingStarted$,\n draggingStopped$).pipe(\n switchMap(\n (dragging: boolean): Observable<MouseEvent> => {\n return dragging ?\n this._container.mouseService.documentMouseMove$ :\n observableEmpty();\n }));\n\n this._preventDefaultSubscription = observableMerge(\n documentMouseMove$,\n this._container.touchService.touchMove$)\n .subscribe(\n (event: MouseEvent | TouchEvent): void => {\n event.preventDefault(); // prevent selection of content outside the viewer\n });\n\n let touchMovingStarted$: Observable<boolean> =\n this._container.touchService.singleTouchDragStart$.pipe(\n map(\n (): boolean => {\n return true;\n }));\n\n let touchMovingStopped$: Observable<boolean> =\n this._container.touchService.singleTouchDragEnd$.pipe(\n map(\n (): boolean => {\n return false;\n }));\n\n this._activeTouchSubscription = observableMerge(\n touchMovingStarted$,\n touchMovingStopped$)\n .subscribe(this._container.touchService.activate$);\n\n const rotation$: Observable<IRotation> = this._navigator.stateService.currentState$.pipe(\n map(\n (frame: IFrame): boolean => {\n return frame.state.currentNode.fullPano || frame.state.nodesAhead < 1;\n }),\n distinctUntilChanged(),\n switchMap(\n (enable: boolean): Observable<MouseTouchPair> => {\n if (!enable) {\n return observableEmpty();\n }\n\n const mouseDrag$: Observable<[MouseEvent, MouseEvent]> =\n MouseOperator.filteredPairwiseMouseDrag$(this._component.name, this._container.mouseService);\n\n const singleTouchDrag$: Observable<[Touch, Touch]> = observableMerge(\n this._container.touchService.singleTouchDragStart$,\n this._container.touchService.singleTouchDrag$,\n this._container.touchService.singleTouchDragEnd$.pipe(\n map((): TouchEvent => { return null; }))).pipe(\n map(\n (event: TouchEvent): Touch => {\n return event != null && event.touches.length > 0 ?\n event.touches[0] : null;\n }),\n pairwise(),\n filter(\n (pair: [Touch, Touch]): boolean => {\n return pair[0] != null && pair[1] != null;\n }));\n\n return observableMerge(\n mouseDrag$,\n singleTouchDrag$);\n }),\n withLatestFrom(\n this._container.renderService.renderCamera$,\n this._navigator.stateService.currentTransform$,\n this._navigator.panService.panNodes$),\n map(\n ([events, render, transform, nts]: [MouseTouchPair, RenderCamera, Transform, [Node, Transform, number][]]): IRotation => {\n let previousEvent: MouseEvent | Touch = events[0];\n let event: MouseEvent | Touch = events[1];\n\n let movementX: number = event.clientX - previousEvent.clientX;\n let movementY: number = event.clientY - previousEvent.clientY;\n\n let element: HTMLElement = this._container.element;\n\n let [canvasX, canvasY]: number[] = this._viewportCoords.canvasPosition(event, element);\n\n let currentDirection: THREE.Vector3 =\n this._viewportCoords.unprojectFromCanvas(\n canvasX,\n canvasY,\n element,\n render.perspective)\n .sub(render.perspective.position);\n\n let directionX: THREE.Vector3 =\n this._viewportCoords.unprojectFromCanvas(\n canvasX - movementX,\n canvasY,\n element,\n render.perspective)\n .sub(render.perspective.position);\n\n let directionY: THREE.Vector3 =\n this._viewportCoords.unprojectFromCanvas(\n canvasX,\n canvasY - movementY,\n element,\n render.perspective)\n .sub(render.perspective.position);\n\n let phi: number = (movementX > 0 ? 1 : -1) * directionX.angleTo(currentDirection);\n let theta: number = (movementY > 0 ? -1 : 1) * directionY.angleTo(currentDirection);\n\n const distances: number[] = ImageBoundary.viewportDistances(transform, render.perspective, this._viewportCoords);\n\n for (const [, t] of nts) {\n const d: number[] = ImageBoundary.viewportDistances(t, render.perspective, this._viewportCoords);\n\n for (let i: number = 0; i < distances.length; i++) {\n if (d[i] < distances[i]) {\n distances[i] = d[i];\n }\n }\n }\n\n if (distances[0] > 0 && theta < 0) {\n theta /= Math.max(1, 2e2 * distances[0]);\n }\n\n if (distances[2] > 0 && theta > 0) {\n theta /= Math.max(1, 2e2 * distances[2]);\n }\n\n if (distances[1] > 0 && phi < 0) {\n phi /= Math.max(1, 2e2 * distances[1]);\n }\n\n if (distances[3] > 0 && phi > 0) {\n phi /= Math.max(1, 2e2 * distances[3]);\n }\n\n return { phi: phi, theta: theta };\n }),\n share());\n\n this._rotateWithoutInertiaSubscription = rotation$\n .subscribe(\n (rotation: IRotation): void => {\n this._navigator.stateService.rotateWithoutInertia(rotation);\n });\n\n this._rotateSubscription = rotation$.pipe(\n scan(\n (rotationBuffer: [number, IRotation][], rotation: IRotation): [number, IRotation][] => {\n this._drainBuffer(rotationBuffer);\n\n rotationBuffer.push([Date.now(), rotation]);\n\n return rotationBuffer;\n },\n []),\n sample(\n observableMerge(\n this._container.mouseService.filtered$(\n this._component.name,\n this._container.mouseService.mouseDragEnd$),\n this._container.touchService.singleTouchDragEnd$)),\n map(\n (rotationBuffer: [number, IRotation][]): IRotation => {\n const drainedBuffer: [number, IRotation][] = this._drainBuffer(rotationBuffer.slice());\n const rotation: IRotation = { phi: 0, theta: 0 };\n\n for (const bufferedRotation of drainedBuffer) {\n rotation.phi += bufferedRotation[1].phi;\n rotation.theta += bufferedRotation[1].theta;\n }\n\n const count: number = drainedBuffer.length;\n if (count > 0) {\n rotation.phi /= count;\n rotation.theta /= count;\n }\n\n const threshold: number = Math.PI / 18;\n\n rotation.phi = this._spatial.clamp(rotation.phi, -threshold, threshold);\n rotation.theta = this._spatial.clamp(rotation.theta, -threshold, threshold);\n\n return rotation;\n }))\n .subscribe(\n (rotation: IRotation): void => {\n this._navigator.stateService.rotate(rotation);\n });\n }\n\n protected _disable(): void {\n this._activeMouseSubscription.unsubscribe();\n this._activeTouchSubscription.unsubscribe();\n this._preventDefaultSubscription.unsubscribe();\n this._rotateSubscription.unsubscribe();\n this._rotateWithoutInertiaSubscription.unsubscribe();\n\n this._activeMouseSubscription = null;\n this._activeTouchSubscription = null;\n this._preventDefaultSubscription = null;\n this._rotateSubscription = null;\n }\n\n protected _getConfiguration(enable: boolean): IMouseConfiguration {\n return { dragPan: enable };\n }\n\n private _drainBuffer<T>(buffer: [number, T][]): [number, T][] {\n const cutoff: number = 50;\n const now: number = Date.now();\n\n while (buffer.length > 0 && now - buffer[0][0] > cutoff) {\n buffer.shift();\n }\n\n return buffer;\n }\n}\n\nexport default DragPanHandler;\n",
+ "import * as THREE from \"three\";\n\nimport {\n combineLatest as observableCombinLatest,\n empty as observableEmpty,\n merge as observableMerge,\n of as observableOf,\n Subscription,\n Observable,\n} from \"rxjs\";\n\nimport {\n map,\n filter,\n withLatestFrom,\n share,\n switchMap,\n startWith,\n distinctUntilChanged,\n} from \"rxjs/operators\";\n\nimport {\n Component,\n IMouseConfiguration,\n HandlerBase,\n MouseOperator,\n} from \"../../Component\";\nimport {\n Spatial,\n Transform,\n ViewportCoords,\n} from \"../../Geo\";\nimport {\n RenderCamera,\n} from \"../../Render\";\nimport {\n IRotation,\n State,\n} from \"../../State\";\nimport {\n Container,\n Navigator,\n} from \"../../Viewer\";\n\nexport class EarthControlHandler extends HandlerBase<IMouseConfiguration> {\n private _viewportCoords: ViewportCoords;\n private _spatial: Spatial;\n\n private _dollySubscription: Subscription;\n private _orbitSubscription: Subscription;\n private _preventDefaultSubscription: Subscription;\n private _truckSubscription: Subscription;\n\n constructor(\n component: Component<IMouseConfiguration>,\n container: Container,\n navigator: Navigator,\n viewportCoords: ViewportCoords,\n spatial: Spatial) {\n super(component, container, navigator);\n\n this._spatial = spatial;\n this._viewportCoords = viewportCoords;\n }\n\n protected _enable(): void {\n const earth$: Observable<boolean> = this._navigator.stateService.state$.pipe(\n map(\n (state: State): boolean => {\n return state === State.Earth;\n }),\n share());\n\n this._preventDefaultSubscription = earth$.pipe(\n switchMap(\n (earth: boolean): Observable<MouseEvent> => {\n return earth ?\n this._container.mouseService.mouseWheel$ :\n observableEmpty();\n }))\n .subscribe(\n (event: WheelEvent): void => {\n event.preventDefault();\n });\n\n this._truckSubscription = earth$.pipe(\n switchMap(\n (earth: boolean): Observable<[MouseEvent, MouseEvent]> => {\n if (!earth) {\n return observableEmpty();\n }\n\n return MouseOperator.filteredPairwiseMouseDrag$(this._component.name, this._container.mouseService).pipe(\n filter(\n ([e1, e2]: [MouseEvent, MouseEvent]): boolean => {\n return !(e1.ctrlKey && e2.ctrlKey);\n }));\n }),\n withLatestFrom(\n this._container.renderService.renderCamera$,\n this._navigator.stateService.currentTransform$),\n map(\n ([[previous, current], render, transform]: [[MouseEvent, MouseEvent], RenderCamera, Transform]): number[] => {\n const planeNormal: number[] = [0, 0, 1];\n const planePoint: number[] = transform.unprojectBasic([0.5, 0.5], 0);\n planePoint[2] -= 2;\n\n const currentIntersection: THREE.Vector3 = this._planeIntersection(\n current,\n planeNormal,\n planePoint,\n render.perspective,\n this._container.element);\n\n const previousIntersection: THREE.Vector3 = this._planeIntersection(\n previous,\n planeNormal,\n planePoint,\n render.perspective,\n this._container.element);\n\n if (!currentIntersection || !previousIntersection) {\n return null;\n }\n\n const direction: number[] = new THREE.Vector3()\n .subVectors(currentIntersection, previousIntersection)\n .multiplyScalar(-1)\n .toArray();\n\n return direction;\n }),\n filter(\n (direction: number[]): boolean => {\n return !!direction;\n }))\n .subscribe(\n (direction: number[]): void => {\n this._navigator.stateService.truck(direction);\n });\n\n this._orbitSubscription = earth$.pipe(\n switchMap(\n (earth: boolean): Observable<[MouseEvent, MouseEvent]> => {\n if (!earth) {\n return observableEmpty();\n }\n\n return MouseOperator.filteredPairwiseMouseDrag$(this._component.name, this._container.mouseService).pipe(\n filter(\n ([e1, e2]: [MouseEvent, MouseEvent]): boolean => {\n return e1.ctrlKey && e2.ctrlKey;\n }));\n }),\n map(\n ([previous, current]: [MouseEvent, MouseEvent]): IRotation => {\n const [currentX, currentY]: number[] = this._eventToViewport(current, this._container.element);\n const [previousX, previousY]: number[] = this._eventToViewport(previous, this._container.element);\n\n const phi: number = (previousX - currentX) * Math.PI;\n const theta: number = (currentY - previousY) * Math.PI / 2;\n\n return { phi: phi, theta: theta };\n }))\n .subscribe(\n (rotation: IRotation): void => {\n this._navigator.stateService.orbit(rotation);\n });\n\n this._dollySubscription = earth$.pipe(\n switchMap(\n (earth: boolean): Observable<WheelEvent> => {\n if (!earth) {\n return observableEmpty();\n }\n\n return this._container.mouseService\n .filteredWheel$(this._component.name, this._container.mouseService.mouseWheel$);\n }),\n map(\n (event: WheelEvent): number => {\n let delta: number = event.deltaY;\n\n if (event.deltaMode === 1) {\n delta = 40 * delta;\n } else if (event.deltaMode === 2) {\n delta = 800 * delta;\n }\n\n const canvasSize: number[] = this._viewportCoords.containerToCanvas(this._container.element);\n\n return -delta / canvasSize[1];\n }))\n .subscribe(\n (delta: number): void => {\n this._navigator.stateService.dolly(delta);\n });\n }\n\n protected _disable(): void {\n this._dollySubscription.unsubscribe();\n this._orbitSubscription.unsubscribe();\n this._preventDefaultSubscription.unsubscribe();\n this._truckSubscription.unsubscribe();\n }\n\n protected _getConfiguration(): IMouseConfiguration {\n return { };\n }\n\n private _eventToViewport(event: MouseEvent, element: HTMLElement): number[] {\n const previousCanvas: number[] = this._viewportCoords.canvasPosition(event, element);\n\n return this._viewportCoords.canvasToViewport(previousCanvas[0], previousCanvas[1], element);\n }\n\n private _planeIntersection(\n event: MouseEvent,\n planeNormal: number[],\n planePoint: number[],\n camera: THREE.Camera,\n element: HTMLElement): THREE.Vector3 {\n\n const [canvasX, canvasY]: number[] = this._viewportCoords.canvasPosition(event, element);\n const direction: THREE.Vector3 =\n this._viewportCoords\n .unprojectFromCanvas(\n canvasX,\n canvasY,\n element,\n camera)\n .sub(camera.position)\n .normalize();\n\n if (Math.abs(this._spatial.angleToPlane(direction.toArray(), planeNormal)) < Math.PI / 90) {\n return null;\n }\n\n const l0: THREE.Vector3 = camera.position.clone();\n const n: THREE.Vector3 = new THREE.Vector3().fromArray(planeNormal);\n const p0: THREE.Vector3 = new THREE.Vector3().fromArray(planePoint);\n\n const d: number = new THREE.Vector3().subVectors(p0, l0).dot(n) / direction.clone().dot(n);\n\n const intersection: THREE.Vector3 = new THREE.Vector3().addVectors(l0, direction.multiplyScalar(d));\n\n if (this._viewportCoords.worldToCamera(intersection.toArray(), camera)[2] > 0) {\n return null;\n }\n\n return intersection;\n }\n}\n\nexport default EarthControlHandler;\n",
+ "import * as THREE from \"three\";\n\nimport {\n Lines,\n Transform,\n ViewportCoords,\n} from \"../../../src/Geo\";\n\nfunction basicBoundaryPoints(pointsPerSide: number): number[][] {\n let points: number[][] = [];\n let os: number[][] = [[0, 0], [1, 0], [1, 1], [0, 1]];\n let ds: number[][] = [[1, 0], [0, 1], [-1, 0], [0, -1]];\n\n for (let side: number = 0; side < 4; ++side) {\n let o: number[] = os[side];\n let d: number[] = ds[side];\n\n for (let i: number = 0; i < pointsPerSide; ++i) {\n points.push([o[0] + d[0] * i / pointsPerSide,\n o[1] + d[1] * i / pointsPerSide]);\n }\n }\n\n return points;\n}\n\nfunction insideViewport(x: number, y: number): boolean {\n return x >= -1 && x <= 1 && y >= -1 && y <= 1;\n}\n\nfunction insideBasic(x: number, y: number): boolean {\n return x >= 0 && x <= 1 && y >= 0 && y <= 1;\n}\n\nexport function viewportDistances(transform: Transform, perspective: THREE.PerspectiveCamera, viewportCoords: ViewportCoords): number[] {\n const boundaryPointsBasic: number[][] = basicBoundaryPoints(100);\n const boundaryPointsViewport: number[][] = boundaryPointsBasic\n .map(\n (basic: number[]) => {\n return viewportCoords.basicToViewportSafe(basic[0], basic[1], transform, perspective);\n });\n\n const visibleBoundaryPoints: number[][] = [];\n const viewportSides: Lines.Point[] = [\n { x: -1, y: 1 },\n { x: 1, y: 1 },\n { x: 1, y: -1 },\n { x: -1, y: -1 }];\n\n const intersections: boolean[] = [false, false, false, false];\n\n for (let i: number = 0; i < boundaryPointsViewport.length; i++) {\n const p1: number[] = boundaryPointsViewport[i];\n const p2: number[] = boundaryPointsViewport[(i + 1) % boundaryPointsViewport.length];\n\n if (p1 === null) {\n continue;\n }\n\n if (p2 === null) {\n if (insideViewport(p1[0], p1[1])) {\n visibleBoundaryPoints.push(p1);\n }\n\n continue;\n }\n\n const [x1, y1]: number[] = p1;\n const [x2, y2]: number[] = p2;\n\n if (insideViewport(x1, y1)) {\n if (insideViewport(x2, y2)) {\n visibleBoundaryPoints.push(p1);\n } else {\n for (let side: number = 0; side < 4; side++) {\n const s1: Lines.Segment = { p1: { x: x1, y: y1 }, p2: { x: x2, y: y2 } };\n const s2: Lines.Segment = { p1: viewportSides[side], p2: viewportSides[(side + 1) % 4] };\n\n const intersecting: boolean = Lines.segmentsIntersect(s1, s2);\n\n if (intersecting) {\n const intersection: Lines.Point = Lines.segmentIntersection(s1, s2);\n\n visibleBoundaryPoints.push(p1, [intersection.x, intersection.y]);\n intersections[side] = true;\n }\n }\n }\n }\n }\n\n const [topLeftBasicX, topLeftBasicY]: number[] =\n viewportCoords.viewportToBasic(-1, 1, transform, perspective);\n\n const [topRightBasicX, topRightBasicY]: number[] =\n viewportCoords.viewportToBasic(1, 1, transform, perspective);\n\n const [bottomRightBasicX, bottomRightBasicY]: number[] =\n viewportCoords.viewportToBasic(1, -1, transform, perspective);\n\n const [bottomLeftBasicX, bottomLeftBasicY]: number[] =\n viewportCoords.viewportToBasic(-1, -1, transform, perspective);\n\n if (insideBasic(topLeftBasicX, topLeftBasicY)) {\n intersections[3] = intersections[0] = true;\n }\n\n if (insideBasic(topRightBasicX, topRightBasicY)) {\n intersections[0] = intersections[1] = true;\n }\n\n if (insideBasic(bottomRightBasicX, bottomRightBasicY)) {\n intersections[1] = intersections[2] = true;\n }\n\n if (insideBasic(bottomLeftBasicX, bottomLeftBasicY)) {\n intersections[2] = intersections[3] = true;\n }\n\n const maximums: number[] = [-1, -1, 1, 1];\n\n for (let visibleBoundaryPoint of visibleBoundaryPoints) {\n const x: number = visibleBoundaryPoint[0];\n const y: number = visibleBoundaryPoint[1];\n\n if (x > maximums[1]) {\n maximums[1] = x;\n }\n\n if (x < maximums[3]) {\n maximums[3] = x;\n }\n\n if (y > maximums[0]) {\n maximums[0] = y;\n }\n\n if (y < maximums[2]) {\n maximums[2] = y;\n }\n }\n\n const boundary: number[] = [1, 1, -1, -1];\n const distances: number[] = [];\n\n for (let side: number = 0; side < 4; side++) {\n if (intersections[side]) {\n distances.push(0);\n continue;\n }\n\n distances.push(Math.abs(boundary[side] - maximums[side]));\n }\n\n return distances;\n}\n",
+ "import {Subscription} from \"rxjs\";\n\nimport {\n BounceHandler,\n ComponentService,\n Component,\n DoubleClickZoomHandler,\n DragPanHandler,\n EarthControlHandler,\n IMouseConfiguration,\n ScrollZoomHandler,\n TouchZoomHandler,\n} from \"../../Component\";\nimport {\n ViewportCoords,\n Spatial,\n} from \"../../Geo\";\nimport {\n Container,\n Navigator,\n} from \"../../Viewer\";\n\n/**\n * @class MouseComponent\n *\n * @classdesc Component handling mouse and touch events for camera movement.\n *\n * To retrive and use the mouse component\n *\n * @example\n * ```\n * var viewer = new Mapillary.Viewer(\n * \"<element-id>\",\n * \"<client-id>\",\n * \"<my key>\");\n *\n * var mouseComponent = viewer.getComponent(\"mouse\");\n * ```\n */\nexport class MouseComponent extends Component<IMouseConfiguration> {\n /** @inheritdoc */\n public static componentName: string = \"mouse\";\n\n private _bounceHandler: BounceHandler;\n private _doubleClickZoomHandler: DoubleClickZoomHandler;\n private _dragPanHandler: DragPanHandler;\n private _earthControlHandler: EarthControlHandler;\n private _scrollZoomHandler: ScrollZoomHandler;\n private _touchZoomHandler: TouchZoomHandler;\n\n private _configurationSubscription: Subscription;\n\n /** @ignore */\n constructor(name: string, container: Container, navigator: Navigator) {\n super(name, container, navigator);\n\n const spatial: Spatial = new Spatial();\n const viewportCoords: ViewportCoords = new ViewportCoords();\n\n this._bounceHandler = new BounceHandler(this, container, navigator, viewportCoords, spatial);\n this._doubleClickZoomHandler = new DoubleClickZoomHandler(this, container, navigator, viewportCoords);\n this._dragPanHandler = new DragPanHandler(this, container, navigator, viewportCoords, spatial);\n this._earthControlHandler = new EarthControlHandler(this, container, navigator, viewportCoords, spatial);\n this._scrollZoomHandler = new ScrollZoomHandler(this, container, navigator, viewportCoords);\n this._touchZoomHandler = new TouchZoomHandler(this, container, navigator, viewportCoords);\n }\n\n /**\n * Get double click zoom.\n *\n * @returns {DoubleClickZoomHandler} The double click zoom handler.\n */\n public get doubleClickZoom(): DoubleClickZoomHandler {\n return this._doubleClickZoomHandler;\n }\n\n /**\n * Get drag pan.\n *\n * @returns {DragPanHandler} The drag pan handler.\n */\n public get dragPan(): DragPanHandler {\n return this._dragPanHandler;\n }\n\n /**\n * Get scroll zoom.\n *\n * @returns {ScrollZoomHandler} The scroll zoom handler.\n */\n public get scrollZoom(): ScrollZoomHandler {\n return this._scrollZoomHandler;\n }\n\n /**\n * Get touch zoom.\n *\n * @returns {TouchZoomHandler} The touch zoom handler.\n */\n public get touchZoom(): TouchZoomHandler {\n return this._touchZoomHandler;\n }\n\n protected _activate(): void {\n this._bounceHandler.enable();\n this._earthControlHandler.enable();\n\n this._configurationSubscription = this._configuration$\n .subscribe(\n (configuration: IMouseConfiguration): void => {\n if (configuration.doubleClickZoom) {\n this._doubleClickZoomHandler.enable();\n } else {\n this._doubleClickZoomHandler.disable();\n }\n\n if (configuration.dragPan) {\n this._dragPanHandler.enable();\n } else {\n this._dragPanHandler.disable();\n }\n\n if (configuration.scrollZoom) {\n this._scrollZoomHandler.enable();\n } else {\n this._scrollZoomHandler.disable();\n }\n\n if (configuration.touchZoom) {\n this._touchZoomHandler.enable();\n } else {\n this._touchZoomHandler.disable();\n }\n });\n\n this._container.mouseService.claimMouse(this._name, 0);\n }\n\n protected _deactivate(): void {\n this._container.mouseService.unclaimMouse(this._name);\n\n this._configurationSubscription.unsubscribe();\n\n this._bounceHandler.disable();\n this._doubleClickZoomHandler.disable();\n this._dragPanHandler.disable();\n this._earthControlHandler.disable();\n this._scrollZoomHandler.disable();\n this._touchZoomHandler.disable();\n }\n\n protected _getDefaultConfiguration(): IMouseConfiguration {\n return { doubleClickZoom: false, dragPan: true, scrollZoom: true, touchZoom: true };\n }\n}\n\nComponentService.register(MouseComponent);\nexport default MouseComponent;\n",
+ "import {map, filter, withLatestFrom} from \"rxjs/operators\";\nimport {Subscription} from \"rxjs\";\n\nimport {\n Component,\n IMouseConfiguration,\n HandlerBase,\n} from \"../../Component\";\nimport {\n Transform,\n ViewportCoords,\n} from \"../../Geo\";\nimport {RenderCamera} from \"../../Render\";\nimport {\n ICurrentState,\n IFrame,\n} from \"../../State\";\nimport {\n Container,\n Navigator,\n} from \"../../Viewer\";\n\n/**\n * The `ScrollZoomHandler` allows the user to zoom the viewer image by scrolling.\n *\n * @example\n * ```\n * var mouseComponent = viewer.getComponent(\"mouse\");\n *\n * mouseComponent.scrollZoom.disable();\n * mouseComponent.scrollZoom.enable();\n *\n * var isEnabled = mouseComponent.scrollZoom.isEnabled;\n * ```\n */\nexport class ScrollZoomHandler extends HandlerBase<IMouseConfiguration> {\n private _viewportCoords: ViewportCoords;\n\n private _preventDefaultSubscription: Subscription;\n private _zoomSubscription: Subscription;\n\n /** @ignore */\n constructor(\n component: Component<IMouseConfiguration>,\n container: Container,\n navigator: Navigator,\n viewportCoords: ViewportCoords) {\n super(component, container, navigator);\n\n this._viewportCoords = viewportCoords;\n }\n\n protected _enable(): void {\n this._container.mouseService.claimWheel(this._component.name, 0);\n\n this._preventDefaultSubscription = this._container.mouseService.mouseWheel$\n .subscribe(\n (event: WheelEvent): void => {\n event.preventDefault();\n });\n\n this._zoomSubscription = this._container.mouseService\n .filteredWheel$(this._component.name, this._container.mouseService.mouseWheel$).pipe(\n withLatestFrom(\n this._navigator.stateService.currentState$,\n (w: WheelEvent, f: IFrame): [WheelEvent, IFrame] => {\n return [w, f];\n }),\n filter(\n (args: [WheelEvent, IFrame]): boolean => {\n let state: ICurrentState = args[1].state;\n return state.currentNode.fullPano || state.nodesAhead < 1;\n }),\n map(\n (args: [WheelEvent, IFrame]): WheelEvent => {\n return args[0];\n }),\n withLatestFrom(\n this._container.renderService.renderCamera$,\n this._navigator.stateService.currentTransform$,\n (w: WheelEvent, r: RenderCamera, t: Transform): [WheelEvent, RenderCamera, Transform] => {\n return [w, r, t];\n }))\n .subscribe(\n (args: [WheelEvent, RenderCamera, Transform]): void => {\n let event: WheelEvent = args[0];\n let render: RenderCamera = args[1];\n let transform: Transform = args[2];\n\n let element: HTMLElement = this._container.element;\n\n let [canvasX, canvasY]: number[] = this._viewportCoords.canvasPosition(event, element);\n\n let unprojected: THREE.Vector3 =\n this._viewportCoords.unprojectFromCanvas(\n canvasX,\n canvasY,\n element,\n render.perspective);\n\n let reference: number[] = transform.projectBasic(unprojected.toArray());\n\n let deltaY: number = event.deltaY;\n if (event.deltaMode === 1) {\n deltaY = 40 * deltaY;\n } else if (event.deltaMode === 2) {\n deltaY = 800 * deltaY;\n }\n\n const canvasSize: number[] = this._viewportCoords.containerToCanvas(element);\n\n let zoom: number = -3 * deltaY / canvasSize[1];\n\n this._navigator.stateService.zoomIn(zoom, reference);\n });\n }\n\n protected _disable(): void {\n this._container.mouseService.unclaimWheel(this._component.name);\n\n this._preventDefaultSubscription.unsubscribe();\n this._zoomSubscription.unsubscribe();\n\n this._preventDefaultSubscription = null;\n this._zoomSubscription = null;\n }\n\n protected _getConfiguration(enable: boolean): IMouseConfiguration {\n return { scrollZoom: enable };\n }\n}\n\nexport default ScrollZoomHandler;\n",
+ "import {merge as observableMerge, Observable, Subscription} from \"rxjs\";\n\nimport {filter, withLatestFrom, map} from \"rxjs/operators\";\nimport * as THREE from \"three\";\n\nimport {\n Component,\n IMouseConfiguration,\n HandlerBase,\n} from \"../../Component\";\nimport {\n Transform,\n ViewportCoords,\n} from \"../../Geo\";\nimport {RenderCamera} from \"../../Render\";\nimport {\n ICurrentState,\n IFrame,\n} from \"../../State\";\nimport {\n Container,\n IPinch,\n Navigator,\n} from \"../../Viewer\";\n\n/**\n * The `TouchZoomHandler` allows the user to zoom the viewer image by pinching on a touchscreen.\n *\n * @example\n * ```\n * var mouseComponent = viewer.getComponent(\"mouse\");\n *\n * mouseComponent.touchZoom.disable();\n * mouseComponent.touchZoom.enable();\n *\n * var isEnabled = mouseComponent.touchZoom.isEnabled;\n * ```\n */\nexport class TouchZoomHandler extends HandlerBase<IMouseConfiguration> {\n private _viewportCoords: ViewportCoords;\n\n private _activeSubscription: Subscription;\n private _preventDefaultSubscription: Subscription;\n private _zoomSubscription: Subscription;\n\n /** @ignore */\n constructor(\n component: Component<IMouseConfiguration>,\n container: Container,\n navigator: Navigator,\n viewportCoords: ViewportCoords) {\n super(component, container, navigator);\n\n this._viewportCoords = viewportCoords;\n }\n\n protected _enable(): void {\n this._preventDefaultSubscription = this._container.touchService.pinch$\n .subscribe(\n (pinch: IPinch): void => {\n pinch.originalEvent.preventDefault();\n });\n\n let pinchStarted$: Observable<boolean> =\n this._container.touchService.pinchStart$.pipe(\n map(\n (event: TouchEvent): boolean => {\n return true;\n }));\n\n let pinchStopped$: Observable<boolean> =\n this._container.touchService.pinchEnd$.pipe(\n map(\n (event: TouchEvent): boolean => {\n return false;\n }));\n\n this._activeSubscription = observableMerge(\n pinchStarted$,\n pinchStopped$)\n .subscribe(this._container.touchService.activate$);\n\n this._zoomSubscription = this._container.touchService.pinch$.pipe(\n withLatestFrom(this._navigator.stateService.currentState$),\n filter(\n (args: [IPinch, IFrame]): boolean => {\n let state: ICurrentState = args[1].state;\n return state.currentNode.fullPano || state.nodesAhead < 1;\n }),\n map(\n (args: [IPinch, IFrame]): IPinch => {\n return args[0];\n }),\n withLatestFrom(\n this._container.renderService.renderCamera$,\n this._navigator.stateService.currentTransform$))\n .subscribe(\n ([pinch, render, transform]: [IPinch, RenderCamera, Transform]): void => {\n let element: HTMLElement = this._container.element;\n\n let [canvasX, canvasY]: number[] = this._viewportCoords.canvasPosition(pinch, element);\n\n let unprojected: THREE.Vector3 =\n this._viewportCoords.unprojectFromCanvas(\n canvasX,\n canvasY,\n element,\n render.perspective);\n\n let reference: number[] = transform.projectBasic(unprojected.toArray());\n\n const [canvasWidth, canvasHeight]: number[] = this._viewportCoords.containerToCanvas(element);\n let zoom: number = 3 * pinch.distanceChange / Math.min(canvasWidth, canvasHeight);\n\n this._navigator.stateService.zoomIn(zoom, reference);\n });\n }\n\n protected _disable(): void {\n this._activeSubscription.unsubscribe();\n this._preventDefaultSubscription.unsubscribe();\n this._zoomSubscription.unsubscribe();\n\n this._preventDefaultSubscription = null;\n this._zoomSubscription = null;\n }\n\n protected _getConfiguration(enable: boolean): IMouseConfiguration {\n return { touchZoom: enable };\n }\n}\n\nexport default TouchZoomHandler;\n",
"export {Popup} from \"./popup/Popup\";\nexport {PopupComponent} from \"./PopupComponent\";\n",
- "import {Observable} from \"rxjs/Observable\";\nimport {Subject} from \"rxjs/Subject\";\nimport {Subscription} from \"rxjs/Subscription\";\n\nimport {\n ComponentService,\n Component,\n IComponentConfiguration,\n Popup,\n} from \"../../Component\";\nimport {Transform} from \"../../Geo\";\nimport {\n ISize,\n RenderCamera,\n} from \"../../Render\";\nimport {\n Container,\n Navigator,\n} from \"../../Viewer\";\n\n/**\n * @class PopupComponent\n *\n * @classdesc Component for showing HTML popup objects.\n *\n * The `add` method is used for adding new popups. Popups are removed by reference.\n *\n * It is not possible to update popups in the set by updating any properties\n * directly on the popup object. Popups need to be replaced by\n * removing them and creating new ones with relevant changed properties and\n * adding those instead.\n *\n * Popups are only relevant to a single image because they are based on\n * 2D basic image coordinates. Popups related to a certain image should\n * be removed when the viewer is moved to another node.\n *\n * To retrive and use the popup component\n *\n * @example\n * ```\n * var viewer = new Mapillary.Viewer(\n * \"<element-id>\",\n * \"<client-id>\",\n * \"<my key>\",\n * { component: { popup: true } });\n *\n * var popupComponent = viewer.getComponent(\"popup\");\n * ```\n */\nexport class PopupComponent extends Component<IComponentConfiguration> {\n public static componentName: string = \"popup\";\n\n private _popupContainer: HTMLDivElement;\n private _popups: Popup[];\n\n private _added$: Subject<Popup[]>;\n private _popups$: Subject<Popup[]>;\n\n private _updateAllSubscription: Subscription;\n private _updateAddedChangedSubscription: Subscription;\n\n constructor(name: string, container: Container, navigator: Navigator) {\n super(name, container, navigator);\n\n this._popups = [];\n\n this._added$ = new Subject<Popup[]>();\n this._popups$ = new Subject<Popup[]>();\n }\n\n /**\n * Add popups to the popups set.\n *\n * @description Adding a new popup never replaces an old one\n * because they are stored by reference. Adding an already\n * existing popup has no effect.\n *\n * @param {Array<Popup>} popups - Popups to add.\n *\n * @example ```popupComponent.add([popup1, popup2]);```\n */\n public add(popups: Popup[]): void {\n for (const popup of popups) {\n if (this._popups.indexOf(popup) !== -1) {\n continue;\n }\n\n this._popups.push(popup);\n\n if (this._activated) {\n popup.setParentContainer(this._popupContainer);\n }\n }\n\n this._added$.next(popups);\n this._popups$.next(this._popups);\n }\n\n /**\n * Returns an array of all popups.\n *\n * @example ```var popups = popupComponent.getAll();```\n */\n public getAll(): Popup[] {\n return this._popups.slice();\n }\n\n /**\n * Remove popups based on reference from the popup set.\n *\n * @param {Array<Popup>} popups - Popups to remove.\n *\n * @example ```popupComponent.remove([popup1, popup2]);```\n */\n public remove(popups: Popup[]): void {\n for (const popup of popups) {\n this._remove(popup);\n }\n\n this._popups$.next(this._popups);\n }\n\n /**\n * Remove all popups from the popup set.\n *\n * @example ```popupComponent.removeAll();```\n */\n public removeAll(): void {\n for (const popup of this._popups.slice()) {\n this._remove(popup);\n }\n\n this._popups$.next(this._popups);\n }\n\n protected _activate(): void {\n this._popupContainer = document.createElement(\"div\");\n this._popupContainer.className = \"mapillary-js-popup-container\";\n\n this._container.element.appendChild(this._popupContainer);\n\n for (const popup of this._popups) {\n popup.setParentContainer(this._popupContainer);\n }\n\n this._updateAllSubscription = Observable\n .combineLatest(\n this._container.renderService.renderCamera$,\n this._container.renderService.size$,\n this._navigator.stateService.currentTransform$)\n .subscribe(\n ([renderCamera, size, transform]: [RenderCamera, ISize, Transform]): void => {\n for (const popup of this._popups) {\n popup.update(renderCamera, size, transform);\n }\n });\n\n const changed$: Observable<Popup[]> = this._popups$\n .startWith(this._popups)\n .switchMap(\n (popups: Popup[]): Observable<Popup> => {\n return Observable\n .from(popups)\n .mergeMap(\n (popup: Popup): Observable<Popup> => {\n return popup.changed$;\n });\n })\n .map(\n (popup: Popup): Popup[] => {\n return [popup];\n });\n\n this._updateAddedChangedSubscription = this._added$\n .merge(changed$)\n .withLatestFrom(\n this._container.renderService.renderCamera$,\n this._container.renderService.size$,\n this._navigator.stateService.currentTransform$)\n .subscribe(\n ([popups, renderCamera, size, transform]: [Popup[], RenderCamera, ISize, Transform]): void => {\n for (const popup of popups) {\n popup.update(renderCamera, size, transform);\n }\n });\n }\n\n protected _deactivate(): void {\n this._updateAllSubscription.unsubscribe();\n this._updateAddedChangedSubscription.unsubscribe();\n\n for (const popup of this._popups) {\n popup.remove();\n }\n\n this._container.element.removeChild(this._popupContainer);\n delete this._popupContainer;\n }\n\n protected _getDefaultConfiguration(): IComponentConfiguration {\n return {};\n }\n\n private _remove(popup: Popup): void {\n const index: number = this._popups.indexOf(popup);\n if (index === -1) {\n return;\n }\n\n const removed: Popup = this._popups.splice(index, 1)[0];\n if (this._activated) {\n removed.remove();\n }\n }\n}\n\nComponentService.register(PopupComponent);\nexport default PopupComponent;\n",
- "/// <reference path=\"../../../../typings/index.d.ts\" />\n\nimport {Observable} from \"rxjs/Observable\";\nimport {Subject} from \"rxjs/Subject\";\n\nimport {\n IPopupOptions,\n PopupAlignment,\n} from \"../../../Component\";\nimport {\n Transform,\n ViewportCoords,\n} from \"../../../Geo\";\nimport {\n ISize,\n RenderCamera,\n} from \"../../../Render\";\nimport {Alignment} from \"../../../Viewer\";\n\n/**\n * @class Popup\n *\n * @classdesc Popup instance for rendering custom HTML content\n * on top of images. Popups are based on 2D basic image coordinates\n * (see the {@link Viewer} class documentation for more information about coordinate\n * systems) and a certain popup is therefore only relevant to a single image.\n * Popups related to a certain image should be removed when moving\n * to another image.\n *\n * A popup must have both its content and its point or rect set to be\n * rendered. Popup options can not be updated after creation but the\n * basic point or rect as well as its content can be changed by calling\n * the appropriate methods.\n *\n * To create and add one `Popup` with default configuration\n * (tooltip visuals and automatic float) and one with specific options\n * use\n *\n * @example\n * ```\n * var defaultSpan = document.createElement('span');\n * defaultSpan.innerHTML = 'hello default';\n *\n * var defaultPopup = new Mapillary.PopupComponent.Popup();\n * defaultPopup.setDOMContent(defaultSpan);\n * defaultPopup.setBasicPoint([0.3, 0.3]);\n *\n * var cleanSpan = document.createElement('span');\n * cleanSpan.innerHTML = 'hello clean';\n *\n * var cleanPopup = new Mapillary.PopupComponent.Popup({\n * clean: true,\n * float: Mapillary.Alignment.Top,\n * offset: 10,\n * opacity: 0.7,\n * });\n *\n * cleanPopup.setDOMContent(cleanSpan);\n * cleanPopup.setBasicPoint([0.6, 0.6]);\n *\n * popupComponent.add([defaultPopup, cleanPopup]);\n * ```\n *\n * @description Implementation of API methods and API documentation inspired\n * by/used from https://github.com/mapbox/mapbox-gl-js/blob/v0.38.0/src/ui/popup.js\n */\nexport class Popup {\n protected _notifyChanged$: Subject<Popup>;\n\n private _container: HTMLDivElement;\n private _content: HTMLDivElement;\n private _parentContainer: HTMLElement;\n private _options: IPopupOptions;\n private _tip: HTMLDivElement;\n\n private _point: number[];\n private _rect: number[];\n\n private _viewportCoords: ViewportCoords;\n\n constructor(options?: IPopupOptions, viewportCoords?: ViewportCoords) {\n this._options = {};\n\n if (!!options) {\n this._options.clean = options.clean;\n this._options.float = options.float;\n this._options.offset = options.offset;\n this._options.opacity = options.opacity;\n this._options.position = options.position;\n }\n\n this._viewportCoords = !!viewportCoords ? viewportCoords : new ViewportCoords();\n\n this._notifyChanged$ = new Subject<Popup>();\n }\n\n /**\n * @ignore\n *\n * @description Internal observable used by the component to\n * render the popup when its position or content has changed.\n */\n public get changed$(): Observable<Popup> {\n return this._notifyChanged$;\n }\n\n /**\n * @ignore\n *\n * @description Internal method used by the component to\n * remove all references to the popup.\n */\n public remove(): void {\n if (this._content && this._content.parentNode) {\n this._content.parentNode.removeChild(this._content);\n }\n\n if (this._container) {\n this._container.parentNode.removeChild(this._container);\n delete this._container;\n }\n\n if (this._parentContainer) {\n delete this._parentContainer;\n }\n }\n\n /**\n * Sets a 2D basic image coordinates point to the popup's anchor, and\n * moves the popup to it.\n *\n * @description Overwrites any previously set point or rect.\n *\n * @param {Array<number>} basicPoint - Point in 2D basic image coordinates.\n *\n * @example\n * ```\n * var popup = new Mapillary.PopupComponent.Popup();\n * popup.setText('hello image');\n * popup.setBasicPoint([0.3, 0.3]);\n *\n * popupComponent.add([popup]);\n * ```\n */\n public setBasicPoint(basicPoint: number[]): void {\n this._point = basicPoint.slice();\n this._rect = null;\n\n this._notifyChanged$.next(this);\n }\n\n /**\n * Sets a 2D basic image coordinates rect to the popup's anchor, and\n * moves the popup to it.\n *\n * @description Overwrites any previously set point or rect.\n *\n * @param {Array<number>} basicRect - Rect in 2D basic image\n * coordinates ([topLeftX, topLeftY, bottomRightX, bottomRightY]) .\n *\n * @example\n * ```\n * var popup = new Mapillary.PopupComponent.Popup();\n * popup.setText('hello image');\n * popup.setBasicRect([0.3, 0.3, 0.5, 0.6]);\n *\n * popupComponent.add([popup]);\n * ```\n */\n public setBasicRect(basicRect: number[]): void {\n this._rect = basicRect.slice();\n this._point = null;\n\n this._notifyChanged$.next(this);\n }\n\n /**\n * Sets the popup's content to the element provided as a DOM node.\n *\n * @param {Node} htmlNode - A DOM node to be used as content for the popup.\n *\n * @example\n * ```\n * var div = document.createElement('div');\n * div.innerHTML = 'hello image';\n *\n * var popup = new Mapillary.PopupComponent.Popup();\n * popup.setDOMContent(div);\n * popup.setBasicPoint([0.3, 0.3]);\n *\n * popupComponent.add([popup]);\n * ```\n */\n public setDOMContent(htmlNode: Node): void {\n if (this._content && this._content.parentNode) {\n this._content.parentNode.removeChild(this._content);\n }\n\n const className: string = \"mapillaryjs-popup-content\" + (this._options.clean === true ? \"-clean\" : \"\");\n this._content = <HTMLDivElement>this._createElement(\"div\", className, this._container);\n\n this._content.appendChild(htmlNode);\n\n this._notifyChanged$.next(this);\n }\n\n /**\n * Sets the popup's content to the HTML provided as a string.\n *\n * @description This method does not perform HTML filtering or sanitization,\n * and must be used only with trusted content. Consider Popup#setText if the\n * content is an untrusted text string.\n *\n * @param {string} html - A string representing HTML content for the popup.\n *\n * @example\n * ```\n * var popup = new Mapillary.PopupComponent.Popup();\n * popup.setHTML('<div>hello image</div>');\n * popup.setBasicPoint([0.3, 0.3]);\n *\n * popupComponent.add([popup]);\n * ```\n */\n public setHTML(html: string): void {\n const frag: DocumentFragment = document.createDocumentFragment();\n const temp: HTMLBodyElement = document.createElement(\"body\");\n let child: Node;\n temp.innerHTML = html;\n\n while (true) {\n child = temp.firstChild;\n if (!child) {\n break;\n }\n\n frag.appendChild(child);\n }\n\n this.setDOMContent(frag);\n }\n\n /**\n * Sets the popup's content to a string of text.\n *\n * @description This function creates a Text node in the DOM, so it cannot insert raw HTML.\n * Use this method for security against XSS if the popup content is user-provided.\n *\n * @param {string} text - Textual content for the popup.\n *\n * @example\n * ```\n * var popup = new Mapillary.PopupComponent.Popup();\n * popup.setText('hello image');\n * popup.setBasicPoint([0.3, 0.3]);\n *\n * popupComponent.add([popup]);\n * ```\n */\n public setText(text: string): void {\n this.setDOMContent(document.createTextNode(text));\n }\n\n /**\n * @ignore\n *\n * @description Internal method for attaching the popup to\n * its parent container so that it is rendered in the DOM tree.\n */\n public setParentContainer(parentContainer: HTMLElement): void {\n this._parentContainer = parentContainer;\n }\n\n /**\n * @ignore\n *\n * @description Internal method for updating the rendered\n * position of the popup called by the popup component.\n */\n public update(renderCamera: RenderCamera, size: ISize, transform: Transform): void {\n if (!this._parentContainer || !this._content) {\n return;\n }\n\n if (!this._point && !this._rect) {\n return;\n }\n\n if (!this._container) {\n this._container = <HTMLDivElement>this._createElement(\"div\", \"mapillaryjs-popup\", this._parentContainer);\n\n let showTip: boolean =\n this._options.clean !== true &&\n this._options.float !== Alignment.Center;\n\n if (showTip) {\n this._tip = <HTMLDivElement>this._createElement(\"div\", \"mapillaryjs-popup-tip\", this._container);\n this._createElement(\"div\", \"mapillaryjs-popup-tip-inner\", this._tip);\n }\n\n this._container.appendChild(this._content);\n this._parentContainer.appendChild(this._container);\n\n if (this._options.opacity != null) {\n this._container.style.opacity = this._options.opacity.toString();\n }\n }\n\n let pointPixel: number[] = null;\n let position: PopupAlignment = this._alignmentToPopupAligment(this._options.position);\n let float: PopupAlignment = this._alignmentToPopupAligment(this._options.float);\n\n if (this._point != null) {\n pointPixel =\n this._viewportCoords.basicToCanvasSafe(\n this._point[0],\n this._point[1],\n { offsetHeight: size.height, offsetWidth: size.width },\n transform,\n renderCamera.perspective);\n } else {\n [pointPixel, position] = this._rectToPixel(this._rect, position, renderCamera, size, transform);\n\n if (!float) {\n float = position;\n }\n }\n\n if (pointPixel == null) {\n this._container.style.visibility = \"hidden\";\n return;\n }\n\n this._container.style.visibility = \"visible\";\n\n if (!float) {\n const width: number = this._container.offsetWidth;\n const height: number = this._container.offsetHeight;\n const floats: PopupAlignment[] = this._pixelToFloats(pointPixel, size, width, height);\n\n float = floats.length === 0 ? \"bottom\" : <PopupAlignment>floats.join(\"-\");\n }\n\n if (!!this._options.offset) {\n const offset: number = this._options.offset;\n const sign: number = offset >= 0 ? 1 : -1;\n const cornerOffset: number = sign * Math.round(Math.sqrt(0.5 * Math.pow(offset, 2)));\n const floatOffset: { [key in PopupAlignment]: number[] } = {\n \"bottom\": [0, offset],\n \"bottom-left\": [-cornerOffset, cornerOffset],\n \"bottom-right\": [cornerOffset, cornerOffset],\n \"center\": [0, 0],\n \"left\": [-offset, 0],\n \"right\": [offset, 0],\n \"top\": [0, -offset],\n \"top-left\": [-cornerOffset, -cornerOffset],\n \"top-right\": [cornerOffset, -cornerOffset],\n };\n\n pointPixel = [pointPixel[0] + floatOffset[float][0], pointPixel[1] + floatOffset[float][1]];\n }\n\n pointPixel = [Math.round(pointPixel[0]), Math.round(pointPixel[1])];\n\n const floatTranslate: {[key in PopupAlignment]: string } = {\n \"bottom\": \"translate(-50%,0)\",\n \"bottom-left\": \"translate(-100%,0)\",\n \"bottom-right\": \"translate(0,0)\",\n \"center\": \"translate(-50%,-50%)\",\n \"left\": \"translate(-100%,-50%)\",\n \"right\": \"translate(0,-50%)\",\n \"top\": \"translate(-50%,-100%)\",\n \"top-left\": \"translate(-100%,-100%)\",\n \"top-right\": \"translate(0,-100%)\",\n };\n\n const classList: DOMTokenList = this._container.classList;\n for (const key in floatTranslate) {\n if (!floatTranslate.hasOwnProperty(key)) {\n continue;\n }\n\n classList.remove(`mapillaryjs-popup-float-${key}`);\n }\n\n classList.add(`mapillaryjs-popup-float-${float}`);\n\n this._container.style.transform = `${floatTranslate[float]} translate(${pointPixel[0]}px,${pointPixel[1]}px)`;\n }\n\n private _createElement(tagName: string, className: string, container: HTMLElement): HTMLElement {\n const element: HTMLElement = document.createElement(tagName);\n\n if (!!className) {\n element.className = className;\n }\n\n if (!!container) {\n container.appendChild(element);\n }\n\n return element;\n }\n\n private _rectToPixel(\n rect: number[],\n position: PopupAlignment,\n renderCamera: RenderCamera,\n size: ISize, transform:\n Transform): [number[], PopupAlignment] {\n\n if (!position) {\n const width: number = this._container.offsetWidth;\n const height: number = this._container.offsetHeight;\n\n const floatOffsets: { [key: string]: number[] } = {\n \"bottom\": [0, height / 2],\n \"bottom-left\": [-width / 2, height / 2],\n \"bottom-right\": [width / 2, height / 2],\n \"left\": [-width / 2, 0],\n \"right\": [width / 2, 0],\n \"top\": [0, -height / 2],\n \"top-left\": [-width / 2, -height / 2],\n \"top-right\": [width / 2, -height / 2],\n };\n\n const automaticPositions: PopupAlignment[] =\n [\"bottom\", \"top\", \"left\", \"right\"];\n\n let largestVisibleArea: [number, number[], PopupAlignment] = [0, null, null];\n\n for (const automaticPosition of automaticPositions) {\n const pointBasic: number[] = this._pointFromRectPosition(rect, automaticPosition);\n const pointPixel: number[] =\n this._viewportCoords.basicToCanvasSafe(\n pointBasic[0],\n pointBasic[1],\n { offsetHeight: size.height, offsetWidth: size.width },\n transform,\n renderCamera.perspective);\n\n if (pointPixel == null) {\n continue;\n }\n\n const floatOffset: number[] = floatOffsets[automaticPosition];\n const offsetedPosition: number[] = [pointPixel[0] + floatOffset[0], pointPixel[1] + floatOffset[1]];\n const floats: PopupAlignment[] = this._pixelToFloats(offsetedPosition, size, width, height / 2);\n\n if (floats.length === 0 &&\n pointPixel[0] > 0 &&\n pointPixel[0] < size.width &&\n pointPixel[1] > 0 &&\n pointPixel[1] < size.height) {\n\n return [pointPixel, automaticPosition];\n }\n\n const minX: number = Math.max(offsetedPosition[0] - width / 2, 0);\n const maxX: number = Math.min(offsetedPosition[0] + width / 2, size.width);\n const minY: number = Math.max(offsetedPosition[1] - height / 2, 0);\n const maxY: number = Math.min(offsetedPosition[1] + height / 2, size.height);\n\n const visibleX: number = Math.max(0, maxX - minX);\n const visibleY: number = Math.max(0, maxY - minY);\n const visibleArea: number = visibleX * visibleY;\n\n if (visibleArea > largestVisibleArea[0]) {\n largestVisibleArea[0] = visibleArea;\n largestVisibleArea[1] = pointPixel;\n largestVisibleArea[2] = automaticPosition;\n }\n }\n\n if (largestVisibleArea[0] > 0) {\n return [largestVisibleArea[1], largestVisibleArea[2]];\n }\n }\n\n const pointBasic: number[] = this._pointFromRectPosition(rect, position);\n const pointCanvas: number[] =\n this._viewportCoords.basicToCanvasSafe(\n pointBasic[0],\n pointBasic[1],\n { offsetHeight: size.height, offsetWidth: size.width },\n transform,\n renderCamera.perspective);\n\n return [pointCanvas, position != null ? position : \"bottom\"];\n }\n\n private _alignmentToPopupAligment(float: Alignment): PopupAlignment {\n switch (float) {\n case Alignment.Bottom:\n return \"bottom\";\n case Alignment.BottomLeft:\n return \"bottom-left\";\n case Alignment.BottomRight:\n return \"bottom-right\";\n case Alignment.Center:\n return \"center\";\n case Alignment.Left:\n return \"left\";\n case Alignment.Right:\n return \"right\";\n case Alignment.Top:\n return \"top\";\n case Alignment.TopLeft:\n return \"top-left\";\n case Alignment.TopRight:\n return \"top-right\";\n default:\n return null;\n }\n }\n\n private _pixelToFloats(pointPixel: number[], size: ISize, width: number, height: number): PopupAlignment[] {\n const floats: PopupAlignment[] = [];\n\n if (pointPixel[1] < height) {\n floats.push(\"bottom\");\n } else if (pointPixel[1] > size.height - height) {\n floats.push(\"top\");\n }\n\n if (pointPixel[0] < width / 2) {\n floats.push(\"right\");\n } else if (pointPixel[0] > size.width - width / 2) {\n floats.push(\"left\");\n }\n\n return floats;\n }\n\n private _pointFromRectPosition(rect: number[], position: PopupAlignment): number[] {\n switch (position) {\n case \"bottom\":\n return [(rect[0] + rect[2]) / 2, rect[3]];\n case \"bottom-left\":\n return [rect[0], rect[3]];\n case \"bottom-right\":\n return [rect[2], rect[3]];\n case \"center\":\n return [(rect[0] + rect[2]) / 2, (rect[1] + rect[3]) / 2];\n case \"left\":\n return [rect[0], (rect[1] + rect[3]) / 2];\n case \"right\":\n return [rect[2], (rect[1] + rect[3]) / 2];\n case \"top\":\n return [(rect[0] + rect[2]) / 2, rect[1]];\n case \"top-left\":\n return [rect[0], rect[1]];\n case \"top-right\":\n return [rect[2], rect[1]];\n default:\n return [(rect[0] + rect[2]) / 2, rect[3]];\n }\n }\n}\n\nexport default Popup;\n",
- "/// <reference path=\"../../../typings/index.d.ts\" />\n\nimport * as vd from \"virtual-dom\";\n\nimport {Observable} from \"rxjs/Observable\";\nimport {Subscription} from \"rxjs/Subscription\";\nimport {Subject} from \"rxjs/Subject\";\n\nimport \"rxjs/add/observable/combineLatest\";\nimport \"rxjs/add/observable/of\";\n\nimport \"rxjs/add/operator/bufferCount\";\nimport \"rxjs/add/operator/concat\";\nimport \"rxjs/add/operator/distinctUntilChanged\";\nimport \"rxjs/add/operator/filter\";\nimport \"rxjs/add/operator/finally\";\nimport \"rxjs/add/operator/first\";\nimport \"rxjs/add/operator/map\";\nimport \"rxjs/add/operator/publishReplay\";\nimport \"rxjs/add/operator/scan\";\nimport \"rxjs/add/operator/share\";\nimport \"rxjs/add/operator/switchMap\";\nimport \"rxjs/add/operator/takeUntil\";\nimport \"rxjs/add/operator/withLatestFrom\";\n\nimport {\n Component,\n ComponentService,\n ISequenceConfiguration,\n SequenceDOMRenderer,\n SequenceDOMInteraction,\n} from \"../../Component\";\nimport {EdgeDirection} from \"../../Edge\";\nimport {IEdgeStatus, Node} from \"../../Graph\";\nimport {IVNodeHash} from \"../../Render\";\nimport {IFrame} from \"../../State\";\nimport {Container, Navigator} from \"../../Viewer\";\n\ninterface IConfigurationOperation {\n (configuration: ISequenceConfiguration): ISequenceConfiguration;\n}\n\n/**\n * @class SequenceComponent\n * @classdesc Component showing navigation arrows for sequence directions\n * as well as playing button. Exposes an API to start and stop play.\n */\nexport class SequenceComponent extends Component<ISequenceConfiguration> {\n /** @inheritdoc */\n public static componentName: string = \"sequence\";\n\n /**\n * Event fired when playing starts or stops.\n *\n * @event PlayerComponent#playingchanged\n * @type {boolean} Indicates whether the player is playing.\n */\n public static playingchanged: string = \"playingchanged\";\n\n private _sequenceDOMRenderer: SequenceDOMRenderer;\n private _sequenceDOMInteraction: SequenceDOMInteraction;\n private _nodesAhead: number = 5;\n\n private _configurationOperation$: Subject<IConfigurationOperation> = new Subject<IConfigurationOperation>();\n private _hoveredKeySubject$: Subject<string>;\n private _hoveredKey$: Observable<string>;\n private _containerWidth$: Subject<number>;\n private _edgeStatus$: Observable<IEdgeStatus>;\n\n private _configurationSubscription: Subscription;\n private _renderSubscription: Subscription;\n private _containerWidthSubscription: Subscription;\n private _hoveredKeySubscription: Subscription;\n\n private _playingSubscription: Subscription;\n private _clearSubscription: Subscription;\n private _stopSubscription: Subscription;\n\n constructor(name: string, container: Container, navigator: Navigator) {\n super(name, container, navigator);\n\n this._sequenceDOMRenderer = new SequenceDOMRenderer(container.element);\n this._sequenceDOMInteraction = new SequenceDOMInteraction();\n\n this._containerWidth$ = new Subject<number>();\n this._hoveredKeySubject$ = new Subject<string>();\n\n this._hoveredKey$ = this._hoveredKeySubject$.share();\n\n this._edgeStatus$ = this._navigator.stateService.currentNode$\n .switchMap(\n (node: Node): Observable<IEdgeStatus> => {\n return node.sequenceEdges$;\n })\n .publishReplay(1)\n .refCount();\n }\n\n /**\n * Get hovered key observable.\n *\n * @description An observable emitting the key of the node for the direction\n * arrow that is being hovered. When the mouse leaves a direction arrow null\n * is emitted.\n *\n * @returns {Observable<string>}\n */\n public get hoveredKey$(): Observable<string> {\n return this._hoveredKey$;\n }\n\n /**\n * Start playing.\n *\n * @fires PlayerComponent#playingchanged\n */\n public play(): void {\n this.configure({ playing: true });\n }\n\n /**\n * Stop playing.\n *\n * @fires PlayerComponent#playingchanged\n */\n public stop(): void {\n this.configure({ playing: false });\n }\n\n /**\n * Set the direction to follow when playing.\n *\n * @param {EdgeDirection} direction - The direction that will be followed when playing.\n */\n public setDirection(direction: EdgeDirection): void {\n this.configure({ direction: direction });\n }\n\n /**\n * Set highlight key.\n *\n * @description The arrow pointing towards the node corresponding to the\n * highlight key will be highlighted.\n *\n * @param {string} highlightKey Key of node to be highlighted if existing.\n */\n public setHighlightKey(highlightKey: string): void {\n this.configure({ highlightKey: highlightKey });\n }\n\n /**\n * Set max width of container element.\n *\n * @description Set max width of the container element holding\n * the sequence navigation elements. If the min width is larger than the\n * max width the min width value will be used.\n *\n * The container element is automatically resized when the resize\n * method on the Viewer class is called.\n *\n * @param {number} minWidth\n */\n public setMaxWidth(maxWidth: number): void {\n this.configure({ maxWidth: maxWidth });\n }\n\n /**\n * Set min width of container element.\n *\n * @description Set min width of the container element holding\n * the sequence navigation elements. If the min width is larger than the\n * max width the min width value will be used.\n *\n * The container element is automatically resized when the resize\n * method on the Viewer class is called.\n *\n * @param {number} minWidth\n */\n public setMinWidth(minWidth: number): void {\n this.configure({ minWidth: minWidth });\n }\n\n /**\n * Set the value indicating whether the sequence UI elements should be visible.\n *\n * @param {boolean} visible\n */\n public setVisible(visible: boolean): void {\n this.configure({ visible: visible });\n }\n\n /** @inheritdoc */\n public resize(): void {\n this._configuration$\n .first()\n .map(\n (configuration: ISequenceConfiguration): number => {\n return this._sequenceDOMRenderer.getContainerWidth(\n this._container.element,\n configuration);\n })\n .subscribe(\n (containerWidth: number): void => {\n this._containerWidth$.next(containerWidth);\n });\n }\n\n protected _activate(): void {\n this._renderSubscription = Observable\n .combineLatest(\n this._edgeStatus$,\n this._configuration$,\n this._containerWidth$)\n .map(\n (ec: [IEdgeStatus, ISequenceConfiguration, number]): IVNodeHash => {\n let edgeStatus: IEdgeStatus = ec[0];\n let configuration: ISequenceConfiguration = ec[1];\n let containerWidth: number = ec[2];\n\n let vNode: vd.VNode = this._sequenceDOMRenderer\n .render(\n edgeStatus,\n configuration,\n containerWidth,\n this,\n this._sequenceDOMInteraction,\n this._navigator);\n\n return {name: this._name, vnode: vNode };\n })\n .subscribe(this._container.domRenderer.render$);\n\n this._containerWidthSubscription = this._configuration$\n .distinctUntilChanged(\n (value1: [number, number], value2: [number, number]): boolean => {\n return value1[0] === value2[0] && value1[1] === value2[1];\n },\n (configuration: ISequenceConfiguration) => {\n return [configuration.minWidth, configuration.maxWidth];\n })\n .map(\n (configuration: ISequenceConfiguration): number => {\n return this._sequenceDOMRenderer.getContainerWidth(\n this._container.element,\n configuration);\n })\n .subscribe(this._containerWidth$);\n\n this._configurationSubscription = this._configurationOperation$\n .scan<ISequenceConfiguration>(\n (configuration: ISequenceConfiguration, operation: IConfigurationOperation): ISequenceConfiguration => {\n return operation(configuration);\n },\n { playing: false })\n .finally(\n (): void => {\n if (this._playingSubscription != null) {\n this._navigator.stateService.cutNodes();\n this._stop();\n }\n })\n .subscribe(() => { /*noop*/ });\n\n this._configuration$\n .map(\n (newConfiguration: ISequenceConfiguration) => {\n return (configuration: ISequenceConfiguration): ISequenceConfiguration => {\n if (newConfiguration.playing !== configuration.playing) {\n\n this._navigator.stateService.cutNodes();\n\n if (newConfiguration.playing) {\n this._play();\n } else {\n this._stop();\n }\n }\n\n configuration.playing = newConfiguration.playing;\n\n return configuration;\n };\n })\n .subscribe(this._configurationOperation$);\n\n this._stopSubscription = this._configuration$\n .switchMap(\n (configuration: ISequenceConfiguration): Observable<[IEdgeStatus, EdgeDirection]> => {\n let edgeStatus$: Observable<IEdgeStatus> = configuration.playing ?\n this._edgeStatus$ :\n Observable.empty<IEdgeStatus>();\n\n let edgeDirection$: Observable<EdgeDirection> = Observable\n .of(configuration.direction);\n\n return Observable\n .combineLatest<IEdgeStatus, EdgeDirection>(edgeStatus$, edgeDirection$);\n })\n .map(\n (ne: [IEdgeStatus, EdgeDirection]): boolean => {\n let edgeStatus: IEdgeStatus = ne[0];\n let direction: EdgeDirection = ne[1];\n\n if (!edgeStatus.cached) {\n return true;\n }\n\n for (let edge of edgeStatus.edges) {\n if (edge.data.direction === direction) {\n return true;\n }\n }\n\n return false;\n })\n .filter(\n (hasEdge: boolean): boolean => {\n return !hasEdge;\n })\n .map(\n (hasEdge: boolean): ISequenceConfiguration => {\n return { playing: false };\n })\n .subscribe(this._configurationSubject$);\n\n this._hoveredKeySubscription = this._sequenceDOMInteraction.mouseEnterDirection$\n .switchMap(\n (direction: EdgeDirection): Observable<string> => {\n return this._edgeStatus$\n .map(\n (edgeStatus: IEdgeStatus): string => {\n for (let edge of edgeStatus.edges) {\n if (edge.data.direction === direction) {\n return edge.to;\n }\n }\n\n return null;\n })\n .takeUntil(this._sequenceDOMInteraction.mouseLeaveDirection$)\n .concat<string>(Observable.of<string>(null));\n })\n .distinctUntilChanged()\n .subscribe(this._hoveredKeySubject$);\n }\n\n protected _deactivate(): void {\n this._stopSubscription.unsubscribe();\n this._renderSubscription.unsubscribe();\n this._configurationSubscription.unsubscribe();\n this._containerWidthSubscription.unsubscribe();\n this._hoveredKeySubscription.unsubscribe();\n\n this.stop();\n }\n\n protected _getDefaultConfiguration(): ISequenceConfiguration {\n return {\n direction: EdgeDirection.Next,\n maxWidth: 117,\n minWidth: 70,\n playing: false,\n visible: true,\n };\n }\n\n private _play(): void {\n this._playingSubscription = this._navigator.stateService.currentState$\n .filter(\n (frame: IFrame): boolean => {\n return frame.state.nodesAhead < this._nodesAhead;\n })\n .map(\n (frame: IFrame): Node => {\n return frame.state.lastNode;\n })\n .distinctUntilChanged(\n undefined,\n (lastNode: Node): string => {\n return lastNode.key;\n })\n .withLatestFrom(\n this._configuration$,\n (lastNode: Node, configuration: ISequenceConfiguration): [Node, EdgeDirection] => {\n return [lastNode, configuration.direction];\n })\n .switchMap(\n (nd: [Node, EdgeDirection]): Observable<[IEdgeStatus, EdgeDirection]> => {\n return ([EdgeDirection.Next, EdgeDirection.Prev].indexOf(nd[1]) > -1 ?\n nd[0].sequenceEdges$ :\n nd[0].spatialEdges$)\n .filter(\n (status: IEdgeStatus): boolean => {\n return status.cached;\n })\n .zip(\n Observable.of<EdgeDirection>(nd[1]),\n (status: IEdgeStatus, direction: EdgeDirection): [IEdgeStatus, EdgeDirection] => {\n return [status, direction];\n });\n })\n .map(\n (ed: [IEdgeStatus, EdgeDirection]): string => {\n let direction: EdgeDirection = ed[1];\n\n for (let edge of ed[0].edges) {\n if (edge.data.direction === direction) {\n return edge.to;\n }\n }\n\n return null;\n })\n .filter(\n (key: string): boolean => {\n return key != null;\n })\n .switchMap(\n (key: string): Observable<Node> => {\n return this._navigator.graphService.cacheNode$(key);\n })\n .subscribe(\n (node: Node): void => {\n this._navigator.stateService.appendNodes([node]);\n },\n (error: Error): void => {\n console.error(error);\n this.stop();\n });\n\n this._clearSubscription = this._navigator.stateService.currentNode$\n .bufferCount(1, 7)\n .subscribe(\n (nodes: Node[]): void => {\n this._navigator.stateService.clearPriorNodes();\n });\n\n this.fire(SequenceComponent.playingchanged, true);\n }\n\n private _stop(): void {\n this._playingSubscription.unsubscribe();\n this._playingSubscription = null;\n\n this._clearSubscription.unsubscribe();\n this._clearSubscription = null;\n\n this.fire(SequenceComponent.playingchanged, false);\n }\n}\n\nComponentService.register(SequenceComponent);\nexport default SequenceComponent;\n",
- "import {Subject} from \"rxjs/Subject\";\n\nimport {EdgeDirection} from \"../../Edge\";\n\nexport class SequenceDOMInteraction {\n private _mouseEnterDirection$: Subject<EdgeDirection>;\n private _mouseLeaveDirection$: Subject<EdgeDirection>;\n\n constructor() {\n this._mouseEnterDirection$ = new Subject<EdgeDirection>();\n this._mouseLeaveDirection$ = new Subject<EdgeDirection>();\n }\n\n public get mouseEnterDirection$(): Subject<EdgeDirection> {\n return this._mouseEnterDirection$;\n }\n\n public get mouseLeaveDirection$(): Subject<EdgeDirection> {\n return this._mouseLeaveDirection$;\n }\n}\n\nexport default SequenceDOMInteraction;\n",
- "/// <reference path=\"../../../typings/index.d.ts\" />\n\nimport * as vd from \"virtual-dom\";\n\nimport {\n ISequenceConfiguration,\n SequenceComponent,\n SequenceDOMInteraction,\n} from \"../../Component\";\nimport {EdgeDirection} from \"../../Edge\";\nimport {IEdgeStatus, Node} from \"../../Graph\";\nimport {Navigator} from \"../../Viewer\";\n\nexport class SequenceDOMRenderer {\n private _minThresholdWidth: number;\n private _maxThresholdWidth: number;\n private _minThresholdHeight: number;\n private _maxThresholdHeight: number;\n\n constructor(element: HTMLElement) {\n this._minThresholdWidth = 320;\n this._maxThresholdWidth = 1480;\n this._minThresholdHeight = 240;\n this._maxThresholdHeight = 820;\n }\n\n public render(\n edgeStatus: IEdgeStatus,\n configuration: ISequenceConfiguration,\n containerWidth: number,\n component: SequenceComponent,\n interaction: SequenceDOMInteraction,\n navigator: Navigator): vd.VNode {\n\n if (configuration.visible === false) {\n return vd.h(\"div.SequenceContainer\", {}, []);\n }\n\n let nextKey: string = null;\n let prevKey: string = null;\n\n for (let edge of edgeStatus.edges) {\n if (edge.data.direction === EdgeDirection.Next) {\n nextKey = edge.to;\n }\n\n if (edge.data.direction === EdgeDirection.Prev) {\n prevKey = edge.to;\n }\n }\n\n let playingButton: vd.VNode = this._createPlayingButton(nextKey, prevKey, configuration, component);\n let arrows: vd.VNode[] = this._createSequenceArrows(nextKey, prevKey, configuration, interaction, navigator);\n\n let containerProperties: vd.createProperties = {\n oncontextmenu: (event: MouseEvent): void => { event.preventDefault(); },\n style: { height: (0.27 * containerWidth) + \"px\", width: containerWidth + \"px\" },\n };\n\n return vd.h(\"div.SequenceContainer\", containerProperties, arrows.concat([playingButton]));\n }\n\n public getContainerWidth(element: HTMLElement, configuration: ISequenceConfiguration): number {\n let elementWidth: number = element.offsetWidth;\n let elementHeight: number = element.offsetHeight;\n\n let minWidth: number = configuration.minWidth;\n let maxWidth: number = configuration.maxWidth;\n if (maxWidth < minWidth) {\n maxWidth = minWidth;\n }\n\n let relativeWidth: number =\n (elementWidth - this._minThresholdWidth) / (this._maxThresholdWidth - this._minThresholdWidth);\n let relativeHeight: number =\n (elementHeight - this._minThresholdHeight) / (this._maxThresholdHeight - this._minThresholdHeight);\n\n let coeff: number = Math.max(0, Math.min(1, Math.min(relativeWidth, relativeHeight)));\n\n return minWidth + coeff * (maxWidth - minWidth);\n }\n\n private _createPlayingButton(\n nextKey: string,\n prevKey: string,\n configuration: ISequenceConfiguration,\n component: SequenceComponent): vd.VNode {\n\n let canPlay: boolean = configuration.direction === EdgeDirection.Next && nextKey != null ||\n configuration.direction === EdgeDirection.Prev && prevKey != null;\n\n let onclick: (e: Event) => void = configuration.playing ?\n (e: Event): void => { component.stop(); } :\n canPlay ? (e: Event): void => { component.play(); } : null;\n\n let buttonProperties: vd.createProperties = {\n onclick: onclick,\n style: {\n\n },\n };\n\n let iconClass: string = configuration.playing ?\n \"Stop\" :\n canPlay ? \"Play\" : \"PlayDisabled\";\n\n let icon: vd.VNode = vd.h(\"div.SequenceComponentIcon\", { className: iconClass }, []);\n\n let buttonClass: string = canPlay ? \"SequencePlay\" : \"SequencePlayDisabled\";\n\n return vd.h(\"div.\" + buttonClass, buttonProperties, [icon]);\n }\n\n private _createSequenceArrows(\n nextKey: string,\n prevKey: string,\n configuration: ISequenceConfiguration,\n interaction: SequenceDOMInteraction,\n navigator: Navigator): vd.VNode[] {\n\n let nextProperties: vd.createProperties = {\n onclick: nextKey != null ?\n (e: Event): void => {\n navigator.moveDir$(EdgeDirection.Next)\n .subscribe(\n (node: Node): void => { return; },\n (error: Error): void => { console.error(error); });\n } :\n null,\n onmouseenter: (e: MouseEvent): void => { interaction.mouseEnterDirection$.next(EdgeDirection.Next); },\n onmouseleave: (e: MouseEvent): void => { interaction.mouseLeaveDirection$.next(EdgeDirection.Next); },\n style: {\n\n },\n };\n\n let prevProperties: vd.createProperties = {\n onclick: prevKey != null ?\n (e: Event): void => {\n navigator.moveDir$(EdgeDirection.Prev)\n .subscribe(\n (node: Node): void => { return; },\n (error: Error): void => { console.error(error); });\n } :\n null,\n onmouseenter: (e: MouseEvent): void => { interaction.mouseEnterDirection$.next(EdgeDirection.Prev); },\n onmouseleave: (e: MouseEvent): void => { interaction.mouseLeaveDirection$.next(EdgeDirection.Prev); },\n style: {\n\n },\n };\n\n let nextClass: string = this._getStepClassName(EdgeDirection.Next, nextKey, configuration.highlightKey);\n let prevClass: string = this._getStepClassName(EdgeDirection.Prev, prevKey, configuration.highlightKey);\n\n let nextIcon: vd.VNode = vd.h(\"div.SequenceComponentIcon\", []);\n let prevIcon: vd.VNode = vd.h(\"div.SequenceComponentIcon\", []);\n\n return [\n vd.h(\"div.\" + nextClass, nextProperties, [nextIcon]),\n vd.h(\"div.\" + prevClass, prevProperties, [prevIcon]),\n ];\n }\n\n private _getStepClassName(direction: EdgeDirection, key: string, highlightKey: string): string {\n let className: string = direction === EdgeDirection.Next ?\n \"SequenceStepNext\" :\n \"SequenceStepPrev\";\n\n if (key == null) {\n className += \"Disabled\";\n } else {\n if (highlightKey === key) {\n className += \"Highlight\";\n }\n }\n\n return className;\n }\n}\n\nexport default SequenceDOMRenderer;\n",
- "export {GeometryTagError} from \"./error/GeometryTagError\";\nexport {PointGeometry} from \"./geometry/PointGeometry\";\nexport {RectGeometry} from \"./geometry/RectGeometry\";\nexport {PolygonGeometry} from \"./geometry/PolygonGeometry\";\nexport {IOutlineTagOptions} from \"./interfaces/IOutlineTagOptions\";\nexport {OutlineTag} from \"./tag/OutlineTag\";\nexport {SpotTag} from \"./tag/SpotTag\";\nexport {TagComponent} from \"./TagComponent\";\nexport {TagMode} from \"./TagMode\";\n",
- "/// <reference path=\"../../../typings/index.d.ts\" />\n\nimport * as when from \"when\";\n\nimport {Observable} from \"rxjs/Observable\";\nimport {Subscription} from \"rxjs/Subscription\";\nimport {Subject} from \"rxjs/Subject\";\n\nimport \"rxjs/add/observable/combineLatest\";\nimport \"rxjs/add/observable/empty\";\nimport \"rxjs/add/observable/from\";\nimport \"rxjs/add/observable/merge\";\nimport \"rxjs/add/observable/of\";\n\nimport \"rxjs/add/operator/combineLatest\";\nimport \"rxjs/add/operator/concat\";\nimport \"rxjs/add/operator/distinctUntilChanged\";\nimport \"rxjs/add/operator/do\";\nimport \"rxjs/add/operator/filter\";\nimport \"rxjs/add/operator/map\";\nimport \"rxjs/add/operator/merge\";\nimport \"rxjs/add/operator/mergeMap\";\nimport \"rxjs/add/operator/publishReplay\";\nimport \"rxjs/add/operator/scan\";\nimport \"rxjs/add/operator/share\";\nimport \"rxjs/add/operator/skip\";\nimport \"rxjs/add/operator/skipUntil\";\nimport \"rxjs/add/operator/startWith\";\nimport \"rxjs/add/operator/switchMap\";\nimport \"rxjs/add/operator/take\";\nimport \"rxjs/add/operator/takeUntil\";\nimport \"rxjs/add/operator/withLatestFrom\";\n\nimport {\n ComponentService,\n Component,\n Geometry,\n IInteraction,\n ITagConfiguration,\n PointGeometry,\n OutlineCreateTag,\n PolygonGeometry,\n RectGeometry,\n RenderTag,\n Tag,\n TagCreator,\n TagDOMRenderer,\n TagMode,\n TagOperation,\n TagScene,\n TagSet,\n VertexGeometry,\n} from \"../../Component\";\nimport {\n Transform,\n ViewportCoords,\n} from \"../../Geo\";\nimport {\n GLRenderStage,\n IGLRenderHash,\n ISize,\n IVNodeHash,\n RenderCamera,\n} from \"../../Render\";\nimport {IFrame} from \"../../State\";\nimport {\n Container,\n ISpriteAtlas,\n Navigator,\n} from \"../../Viewer\";\n\n/**\n * @class TagComponent\n *\n * @classdesc Component for showing and editing tags with different\n * geometries composed from 2D basic image coordinates (see the\n * {@link Viewer} class documentation for more information about coordinate\n * systems).\n *\n * The `add` method is used for adding new tags or replacing\n * tags already in the set. Tags are removed by id.\n *\n * If a tag already in the set has the same\n * id as one of the tags added, the old tag will be removed and\n * the added tag will take its place.\n *\n * The tag component mode can be set to either be non interactive or\n * to be in creating mode of a certain geometry type.\n *\n * The tag properties can be updated at any time and the change will\n * be visibile immediately.\n *\n * Tags are only relevant to a single image because they are based on\n * 2D basic image coordinates. Tags related to a certain image should\n * be removed when the viewer is moved to another node.\n *\n * To retrive and use the tag component\n *\n * @example\n * ```\n * var viewer = new Mapillary.Viewer(\n * \"<element-id>\",\n * \"<client-id>\",\n * \"<my key>\",\n * { component: { tag: true } });\n *\n * var tagComponent = viewer.getComponent(\"tag\");\n * ```\n */\nexport class TagComponent extends Component<ITagConfiguration> {\n /** @inheritdoc */\n public static componentName: string = \"tag\";\n\n /**\n * Event fired when the create mode is changed.\n *\n * @event TagComponent#modechanged\n * @type {TagMode} Tag mode\n * @example\n * ```\n * tagComponent.on(\"modechanged\", function(mode) {\n * console.log(mode);\n * });\n * ```\n */\n public static modechanged: string = \"modechanged\";\n\n /**\n * Event fired when a geometry has been created.\n *\n * @event TagComponent#geometrycreated\n * @type {Geometry} Created geometry.\n * @example\n * ```\n * tagComponent.on(\"geometrycreated\", function(geometry) {\n * console.log(geometry);\n * });\n * ```\n */\n public static geometrycreated: string = \"geometrycreated\";\n\n /**\n * Event fired when the tags collection has changed.\n *\n * @event TagComponent#tagschanged\n * @type {TagComponent} Tag component.\n * @example\n * ```\n * tagComponent.on(\"tagschanged\", function(component) {\n * console.log(component.getAll());\n * });\n * ```\n */\n public static tagschanged: string = \"tagschanged\";\n\n private _tagDomRenderer: TagDOMRenderer;\n private _tagScene: TagScene;\n private _tagSet: TagSet;\n private _tagCreator: TagCreator;\n private _viewportCoords: ViewportCoords;\n\n private _renderTags$: Observable<RenderTag<Tag>[]>;\n private _tagChanged$: Observable<Tag>;\n private _renderTagGLChanged$: Observable<RenderTag<Tag>>;\n private _tagInterationInitiated$: Observable<string>;\n private _tagInteractionAbort$: Observable<void>;\n private _activeTag$: Observable<IInteraction>;\n\n private _basicClick$: Observable<number[]>;\n private _validBasicClick$: Observable<number[]>;\n\n private _createGeometryChanged$: Observable<OutlineCreateTag>;\n private _createGLObjectsChanged$: Observable<OutlineCreateTag>;\n private _tagCreated$: Observable<OutlineCreateTag>;\n private _vertexGeometryCreated$: Observable<Geometry>;\n private _pointGeometryCreated$: Subject<Geometry>;\n private _geometryCreated$: Observable<Geometry>;\n\n private _creating$: Observable<boolean>;\n private _creatingConfiguration$: Observable<ITagConfiguration>;\n\n private _claimMouseSubscription: Subscription;\n private _mouseDragSubscription: Subscription;\n private _unclaimMouseSubscription: Subscription;\n private _updateGLObjectsSubscription: Subscription;\n private _updateTagSceneSubscription: Subscription;\n\n private _stopCreateSubscription: Subscription;\n private _deleteCreatingSubscription: Subscription;\n private _createSubscription: Subscription;\n private _createPointSubscription: Subscription;\n private _setCreateVertexSubscription: Subscription;\n private _addPointSubscription: Subscription;\n private _deleteCreatedSubscription: Subscription;\n private _setGLCreateTagSubscription: Subscription;\n private _createGLObjectsChangedSubscription: Subscription;\n private _preventDefaultSubscription: Subscription;\n private _containerClassListSubscription: Subscription;\n\n private _domSubscription: Subscription;\n private _glSubscription: Subscription;\n\n private _geometryCreatedEventSubscription: Subscription;\n private _tagsChangedEventSubscription: Subscription;\n\n constructor(name: string, container: Container, navigator: Navigator) {\n super(name, container, navigator);\n\n this._tagDomRenderer = new TagDOMRenderer();\n this._tagScene = new TagScene();\n this._tagSet = new TagSet();\n this._tagCreator = new TagCreator(this, navigator);\n this._viewportCoords = new ViewportCoords();\n\n this._renderTags$ = this._tagSet.changed$\n .map(\n (tagSet: TagSet): RenderTag<Tag>[] => {\n const tags: RenderTag<Tag>[] = tagSet.getAll();\n\n // ensure that tags are always rendered in the same order\n // to avoid hover tracking problems on first resize.\n tags.sort(\n (t1: RenderTag<Tag>, t2: RenderTag<Tag>): number => {\n const id1: string = t1.tag.id;\n const id2: string = t2.tag.id;\n\n if (id1 < id2) {\n return -1;\n }\n\n if (id1 > id2) {\n return 1;\n }\n\n return 0;\n });\n\n return tags;\n })\n .share();\n\n this._tagChanged$ = this._renderTags$\n .switchMap(\n (tags: RenderTag<Tag>[]): Observable<Tag> => {\n return Observable\n .from(tags)\n .mergeMap(\n (tag: RenderTag<Tag>): Observable<Tag> => {\n return Observable\n .merge(\n tag.tag.changed$,\n tag.tag.geometryChanged$);\n });\n })\n .share();\n\n this._renderTagGLChanged$ = this._renderTags$\n .switchMap(\n (tags: RenderTag<Tag>[]): Observable<RenderTag<Tag>> => {\n return Observable\n .from(tags)\n .mergeMap(\n (tag: RenderTag<Tag>): Observable<RenderTag<Tag>> => {\n return tag.glObjectsChanged$;\n });\n })\n .share();\n\n this._tagInterationInitiated$ = this._renderTags$\n .switchMap(\n (tags: RenderTag<Tag>[]): Observable<string> => {\n return Observable\n .from(tags)\n .mergeMap(\n (tag: RenderTag<Tag>): Observable<string> => {\n return tag.interact$\n .map(\n (interaction: IInteraction): string => {\n return interaction.tag.id;\n });\n });\n })\n .share();\n\n this._tagInteractionAbort$ = Observable\n .merge(this._container.mouseService.documentMouseUp$)\n .map((e: MouseEvent): void => { /* noop */ })\n .share();\n\n this._activeTag$ = this._renderTags$\n .switchMap(\n (tags: RenderTag<Tag>[]): Observable<IInteraction> => {\n return Observable\n .from(tags)\n .mergeMap(\n (tag: RenderTag<Tag>): Observable<IInteraction> => {\n return tag.interact$;\n });\n })\n .merge<IInteraction>(\n this._tagInteractionAbort$\n .map(\n (): IInteraction => {\n return { offsetX: 0, offsetY: 0, operation: TagOperation.None, tag: null };\n }))\n .share();\n\n this._createGeometryChanged$ = this._tagCreator.tag$\n .switchMap(\n (tag: OutlineCreateTag): Observable<OutlineCreateTag> => {\n return tag != null ?\n tag.geometryChanged$ :\n Observable.empty<OutlineCreateTag>();\n })\n .share();\n\n this._createGLObjectsChanged$ = this._tagCreator.tag$\n .switchMap(\n (tag: OutlineCreateTag): Observable<OutlineCreateTag> => {\n return tag != null ?\n tag.glObjectsChanged$ :\n Observable.empty<OutlineCreateTag>();\n })\n .share();\n\n this._tagCreated$ = this._tagCreator.tag$\n .switchMap(\n (tag: OutlineCreateTag): Observable<OutlineCreateTag> => {\n return tag != null ?\n tag.created$ :\n Observable.empty<OutlineCreateTag>();\n })\n .share();\n\n this._vertexGeometryCreated$ = this._tagCreated$\n .map(\n (tag: OutlineCreateTag): Geometry => {\n return tag.geometry;\n })\n .share();\n\n this._pointGeometryCreated$ = new Subject<Geometry>();\n\n this._geometryCreated$ = Observable\n .merge<Geometry>(\n this._vertexGeometryCreated$,\n this._pointGeometryCreated$)\n .share();\n\n this._basicClick$ = this._container.mouseService.staticClick$\n .withLatestFrom(\n this._container.renderService.renderCamera$,\n this._navigator.stateService.currentTransform$,\n (\n event: MouseEvent,\n renderCamera: RenderCamera,\n transform: Transform):\n [MouseEvent, RenderCamera, Transform] => {\n return [event, renderCamera, transform];\n })\n .map(\n (ert: [MouseEvent, RenderCamera, Transform]): number[] => {\n let event: MouseEvent = ert[0];\n let camera: RenderCamera = ert[1];\n let transform: Transform = ert[2];\n\n let basic: number[] = this._mouseEventToBasic(\n event,\n this._container.element,\n camera,\n transform);\n\n return basic;\n })\n .share();\n\n this._validBasicClick$ = this._basicClick$\n .filter(\n (basic: number[]): boolean => {\n let x: number = basic[0];\n let y: number = basic[1];\n\n return 0 <= x && x <= 1 && 0 <= y && y <= 1;\n })\n .share();\n\n this._creatingConfiguration$ = this._configuration$\n .distinctUntilChanged(\n (c1: ITagConfiguration, c2: ITagConfiguration): boolean => {\n return c1.mode === c2.mode;\n },\n (configuration: ITagConfiguration): ITagConfiguration => {\n return {\n createColor: configuration.createColor,\n mode: configuration.mode,\n };\n })\n .publishReplay(1)\n .refCount();\n\n this._creating$ = this._creatingConfiguration$\n .map(\n (configuration: ITagConfiguration): boolean => {\n return configuration.mode !== TagMode.Default;\n })\n .publishReplay(1)\n .refCount();\n\n this._creatingConfiguration$\n .subscribe(\n (configuration: ITagConfiguration): void => {\n this.fire(TagComponent.modechanged, configuration.mode);\n });\n }\n\n /**\n * Add tags to the tag set or replace tags in the tag set.\n *\n * @description If a tag already in the set has the same\n * id as one of the tags added, the old tag will be removed\n * the added tag will take its place.\n *\n * @param {Array<Tag>} tags - Tags to add.\n *\n * @example ```tagComponent.add([tag1, tag2]);```\n */\n public add(tags: Tag[]): void {\n if (this._activated) {\n this._navigator.stateService.currentTransform$\n .first()\n .subscribe(\n (transform: Transform): void => {\n this._tagSet.add(tags, transform);\n\n const renderTags: RenderTag<Tag>[] = tags\n .map(\n (tag: Tag): RenderTag<Tag> => {\n return this._tagSet.get(tag.id);\n });\n\n this._tagScene.add(renderTags);\n });\n } else {\n this._tagSet.addDeactivated(tags);\n }\n }\n\n /**\n * Change the current tag mode.\n *\n * @description Change the tag mode to one of the create modes for creating new geometries.\n *\n * @param {TagMode} mode - New tag mode.\n *\n * @fires TagComponent#modechanged\n *\n * @example ```tagComponent.changeMode(Mapillary.TagComponent.TagMode.CreateRect);```\n */\n public changeMode(mode: TagMode): void {\n this.configure({ mode: mode });\n }\n\n /**\n * Returns the tag in the tag set with the specified id, or\n * undefined if the id matches no tag.\n *\n * @param {string} tagId - Id of the tag.\n *\n * @example ```var tag = tagComponent.get(\"tagId\");```\n */\n public get(tagId: string): Tag {\n if (this._activated) {\n const renderTag: RenderTag<Tag> = this._tagSet.get(tagId);\n return renderTag !== undefined ? renderTag.tag : undefined;\n } else {\n return this._tagSet.getDeactivated(tagId);\n }\n }\n\n /**\n * Returns an array of all tags.\n *\n * @example ```var tags = tagComponent.getAll();```\n */\n public getAll(): Tag[] {\n if (this.activated) {\n return this._tagSet\n .getAll()\n .map(\n (renderTag: RenderTag<Tag>): Tag => {\n return renderTag.tag;\n });\n } else {\n return this._tagSet.getAllDeactivated();\n }\n }\n\n /**\n * Returns an array of tag ids for tags that contain the specified point.\n *\n * @description The pixel point must lie inside the polygon or rectangle\n * of an added tag for the tag id to be returned. Tag ids for\n * tags that do not have a fill will also be returned if the point is inside\n * the geometry of the tag. Tags with point geometries can not be retrieved.\n *\n * No tag ids will be returned for panoramas.\n *\n * Notice that the pixelPoint argument requires x, y coordinates from pixel space.\n *\n * With this function, you can use the coordinates provided by mouse\n * events to get information out of the tag component.\n *\n * If no tag at exist the pixel point, an empty array will be returned.\n *\n * @param {Array<number>} pixelPoint - Pixel coordinates on the viewer element.\n * @returns {Array<string>} Ids of the tags that contain the specified pixel point.\n *\n * @example\n * ```\n * tagComponent.getTagIdsAt([100, 100])\n * .then((tagIds) => { console.log(tagIds); });\n * ```\n */\n public getTagIdsAt(pixelPoint: number[]): when.Promise<string[]> {\n return when.promise<string[]>((resolve: (value: string[]) => void, reject: (reason: Error) => void): void => {\n this._container.renderService.renderCamera$\n .first()\n .map(\n (render: RenderCamera): string[] => {\n const viewport: number[] = this._viewportCoords\n .canvasToViewport(\n pixelPoint[0],\n pixelPoint[1],\n this._container.element);\n\n const ids: string[] = this._tagScene.intersectObjects(viewport, render.perspective);\n\n return ids;\n })\n .subscribe(\n (ids: string[]): void => {\n resolve(ids);\n },\n (error: Error): void => {\n reject(error);\n });\n });\n }\n\n /**\n * Check if a tag exist in the tag set.\n *\n * @param {string} tagId - Id of the tag.\n *\n * @example ```var tagExists = tagComponent.has(\"tagId\");```\n */\n public has(tagId: string): boolean {\n return this._activated ? this._tagSet.has(tagId) : this._tagSet.hasDeactivated(tagId);\n }\n\n /**\n * Remove tags with the specified ids from the tag set.\n *\n * @param {Array<string>} tagIds - Ids for tags to remove.\n *\n * @example ```tagComponent.remove([\"id-1\", \"id-2\"]);```\n */\n public remove(tagIds: string[]): void {\n if (this._activated) {\n this._tagSet.remove(tagIds);\n this._tagScene.remove(tagIds);\n } else {\n this._tagSet.removeDeactivated(tagIds);\n }\n }\n\n /**\n * Remove all tags from the tag set.\n *\n * @example ```tagComponent.removeAll();```\n */\n public removeAll(): void {\n if (this._activated) {\n this._tagSet.removeAll();\n this._tagScene.removeAll();\n } else {\n this._tagSet.removeAllDeactivated();\n }\n }\n\n protected _activate(): void {\n this._preventDefaultSubscription = this._activeTag$\n .switchMap(\n (interaction: IInteraction): Observable<MouseEvent> => {\n return interaction.tag != null ?\n this._container.mouseService.documentMouseMove$ :\n Observable.empty<MouseEvent>();\n })\n .subscribe(\n (event: MouseEvent): void => {\n event.preventDefault(); // prevent selection of content outside the viewer\n });\n\n this._geometryCreatedEventSubscription = this._geometryCreated$\n .subscribe(\n (geometry: Geometry): void => {\n this.fire(TagComponent.geometrycreated, geometry);\n });\n\n this._tagsChangedEventSubscription = this._renderTags$\n .subscribe(\n (tags: RenderTag<Tag>[]): void => {\n this.fire(TagComponent.tagschanged, this);\n });\n\n const transformChanged$: Observable<void> = this.configuration$\n .switchMap(\n (configuration: ITagConfiguration): Observable<void> => {\n return configuration.mode !== TagMode.Default ?\n this._navigator.stateService.currentTransform$\n .map((n: Transform): void => { return null; }) :\n Observable.empty<void>();\n })\n .publishReplay(1)\n .refCount();\n\n this._deleteCreatingSubscription = transformChanged$\n .skip(1)\n .subscribe(\n (): void => {\n this._tagCreator.delete$.next(null);\n });\n\n let tagAborted$: Observable<void> = this._tagCreator.tag$\n .switchMap(\n (tag: OutlineCreateTag): Observable<void> => {\n return tag != null ?\n tag.aborted$\n .map((t: OutlineCreateTag): void => { return null; }) :\n Observable.empty<void>();\n });\n\n let tagCreated$: Observable<void> = this._tagCreated$\n .map((t: OutlineCreateTag): void => { return null; });\n\n let pointGeometryCreated$: Observable<void> = this._pointGeometryCreated$\n .map((p: PointGeometry): void => { return null; });\n\n this._stopCreateSubscription = Observable\n .merge(\n tagAborted$,\n tagCreated$,\n pointGeometryCreated$)\n .subscribe((): void => { this.changeMode(TagMode.Default); });\n\n const creatingStarted$: Observable<ITagConfiguration> = Observable\n .combineLatest(\n this._creatingConfiguration$,\n transformChanged$)\n .map(\n ([configuration]: [ITagConfiguration, void]): ITagConfiguration => {\n return configuration;\n })\n .publishReplay(1)\n .refCount();\n\n this._createSubscription = creatingStarted$\n .switchMap(\n (configuration: ITagConfiguration): Observable<number[]> => {\n return configuration.mode === TagMode.CreateRect ||\n configuration.mode === TagMode.CreatePolygon ?\n this._validBasicClick$.take(1) :\n Observable.empty<number[]>();\n })\n .subscribe(this._tagCreator.create$);\n\n this._createPointSubscription = creatingStarted$\n .switchMap(\n (configuration: ITagConfiguration): Observable<number[]> => {\n return configuration.mode === TagMode.CreatePoint ?\n this._validBasicClick$.take(1) :\n Observable.empty<number[]>();\n })\n .map(\n (basic: number[]): Geometry => {\n return new PointGeometry(basic);\n })\n .subscribe(this._pointGeometryCreated$);\n\n const containerMouseMove$: Observable<MouseEvent> = Observable\n .merge(\n this._container.mouseService.mouseMove$,\n this._container.mouseService.domMouseMove$)\n .share();\n\n this._setCreateVertexSubscription = Observable\n .combineLatest<MouseEvent, OutlineCreateTag, RenderCamera>(\n containerMouseMove$,\n this._tagCreator.tag$,\n this._container.renderService.renderCamera$)\n .filter(\n (etr: [MouseEvent, OutlineCreateTag, RenderCamera]): boolean => {\n return etr[1] != null;\n })\n .withLatestFrom(\n this._navigator.stateService.currentTransform$,\n (etr: [MouseEvent, OutlineCreateTag, RenderCamera], transform: Transform):\n [MouseEvent, OutlineCreateTag, RenderCamera, Transform] => {\n return [etr[0], etr[1], etr[2], transform];\n })\n .subscribe(\n (etrt: [MouseEvent, OutlineCreateTag, RenderCamera, Transform]): void => {\n let event: MouseEvent = etrt[0];\n let tag: OutlineCreateTag = etrt[1];\n let camera: RenderCamera = etrt[2];\n let transform: Transform = etrt[3];\n\n let basic: number[] = this._mouseEventToBasic(\n event,\n this._container.element,\n camera,\n transform);\n\n if (tag.geometry instanceof RectGeometry) {\n tag.geometry.setVertex2d(3, basic, transform);\n } else if (tag.geometry instanceof PolygonGeometry) {\n tag.geometry.setVertex2d((<PolygonGeometry>tag.geometry).polygon.length - 2, basic, transform);\n }\n });\n\n this._addPointSubscription = creatingStarted$\n .switchMap(\n (configuration: ITagConfiguration): Observable<number[]> => {\n return configuration.mode === TagMode.CreateRect || configuration.mode === TagMode.CreatePolygon ?\n this._basicClick$.skipUntil(this._validBasicClick$).skip(1) :\n Observable.empty<number[]>();\n })\n .withLatestFrom(\n this._tagCreator.tag$,\n (basic: number[], tag: OutlineCreateTag): [number[], OutlineCreateTag] => {\n return [basic, tag];\n })\n .subscribe(\n (bt: [number[], OutlineCreateTag]): void => {\n let basic: number[] = bt[0];\n let tag: OutlineCreateTag = bt[1];\n\n tag.addPoint(basic);\n });\n\n this._containerClassListSubscription = this._creating$\n .subscribe(\n (creating: boolean): void => {\n if (creating) {\n this._container.element.classList.add(\"component-tag-create\");\n } else {\n this._container.element.classList.remove(\"component-tag-create\");\n }\n });\n\n this._deleteCreatedSubscription = this._creating$\n .subscribe(\n (creating: boolean): void => {\n this._tagCreator.delete$.next(null);\n });\n\n this._setGLCreateTagSubscription = this._tagCreator.tag$\n .subscribe(\n (tag: OutlineCreateTag): void => {\n if (this._tagScene.hasCreateTag()) {\n this._tagScene.removeCreateTag();\n }\n\n if (tag != null) {\n this._tagScene.addCreateTag(tag);\n }\n });\n\n this._createGLObjectsChangedSubscription = this._createGLObjectsChanged$\n .subscribe(\n (tag: OutlineCreateTag): void => {\n this._tagScene.updateCreateTagObjects(tag);\n });\n\n this._claimMouseSubscription = this._tagInterationInitiated$\n .switchMap(\n (id: string): Observable<MouseEvent> => {\n return containerMouseMove$\n .takeUntil(this._tagInteractionAbort$)\n .take(1);\n })\n .subscribe(\n (e: MouseEvent): void => {\n this._container.mouseService.claimMouse(this._name, 1);\n });\n\n this._mouseDragSubscription = this._activeTag$\n .withLatestFrom(\n containerMouseMove$,\n (a: IInteraction, e: MouseEvent): [IInteraction, MouseEvent] => {\n return [a, e];\n })\n .switchMap(\n (args: [IInteraction, MouseEvent]): Observable<[MouseEvent, RenderCamera, IInteraction, Transform]> => {\n let activeTag: IInteraction = args[0];\n let mouseMove: MouseEvent = args[1];\n\n if (activeTag.operation === TagOperation.None) {\n return Observable.empty<[MouseEvent, RenderCamera, IInteraction, Transform]>();\n }\n\n let mouseDrag$: Observable<MouseEvent> = Observable\n .of<MouseEvent>(mouseMove)\n .concat<MouseEvent>(\n this._container.mouseService\n .filtered$(\n this._name,\n this._container.mouseService.domMouseDrag$)\n .filter(\n (event: MouseEvent): boolean => {\n return this._viewportCoords.insideElement(event, this._container.element);\n }));\n\n return Observable\n .combineLatest<MouseEvent, RenderCamera>(\n mouseDrag$,\n this._container.renderService.renderCamera$)\n .withLatestFrom(\n Observable.of(activeTag),\n this._navigator.stateService.currentTransform$,\n (\n ec: [MouseEvent, RenderCamera],\n a: IInteraction,\n t: Transform):\n [MouseEvent, RenderCamera, IInteraction, Transform] => {\n return [ec[0], ec[1], a, t];\n });\n })\n .subscribe(\n (args: [MouseEvent, RenderCamera, IInteraction, Transform]): void => {\n let mouseEvent: MouseEvent = args[0];\n let renderCamera: RenderCamera = args[1];\n let activeTag: IInteraction = args[2];\n let transform: Transform = args[3];\n\n if (activeTag.operation === TagOperation.None) {\n return;\n }\n\n let basic: number[] = this._mouseEventToBasic(\n mouseEvent,\n this._container.element,\n renderCamera,\n transform,\n activeTag.offsetX,\n activeTag.offsetY);\n\n if (activeTag.operation === TagOperation.Centroid) {\n activeTag.tag.geometry.setCentroid2d(basic, transform);\n } else if (activeTag.operation === TagOperation.Vertex) {\n let vertexGeometry: VertexGeometry = <VertexGeometry>activeTag.tag.geometry;\n vertexGeometry.setVertex2d(activeTag.vertexIndex, basic, transform);\n }\n });\n\n this._unclaimMouseSubscription = this._container.mouseService\n .filtered$(this._name, this._container.mouseService.domMouseDragEnd$)\n .subscribe((e: MouseEvent): void => {\n this._container.mouseService.unclaimMouse(this._name);\n });\n\n this._updateGLObjectsSubscription = this._renderTagGLChanged$\n .subscribe(\n (tag: RenderTag<Tag>): void => {\n this._tagScene.updateObjects(tag);\n });\n\n this._updateTagSceneSubscription = this._tagChanged$\n .subscribe(\n (tag: Tag): void => {\n this._tagScene.update();\n });\n\n this._domSubscription = this._renderTags$\n .startWith([])\n .do(\n (tags: RenderTag<Tag>[]): void => {\n this._container.domRenderer.render$.next({\n name: this._name,\n vnode: this._tagDomRenderer.clear(),\n });\n })\n .combineLatest(\n this._container.renderService.renderCamera$,\n this._container.spriteService.spriteAtlas$,\n this._container.renderService.size$,\n this._tagChanged$.startWith(null),\n this._tagCreator.tag$.merge(this._createGeometryChanged$).startWith(null),\n (renderTags: RenderTag<Tag>[], rc: RenderCamera, atlas: ISpriteAtlas, size: ISize, tag: Tag, ct: OutlineCreateTag):\n [RenderCamera, ISpriteAtlas, ISize, RenderTag<Tag>[], Tag, OutlineCreateTag] => {\n return [rc, atlas, size, renderTags, tag, ct];\n })\n .map(\n (args: [RenderCamera, ISpriteAtlas, ISize, RenderTag<Tag>[], Tag, OutlineCreateTag]):\n IVNodeHash => {\n return {\n name: this._name,\n vnode: this._tagDomRenderer.render(args[3], args[5], args[1], args[0].perspective, args[2]),\n };\n })\n .subscribe(this._container.domRenderer.render$);\n\n this._glSubscription = this._navigator.stateService.currentState$\n .map(\n (frame: IFrame): IGLRenderHash => {\n const tagScene: TagScene = this._tagScene;\n\n return {\n name: this._name,\n render: {\n frameId: frame.id,\n needsRender: tagScene.needsRender,\n render: tagScene.render.bind(tagScene),\n stage: GLRenderStage.Foreground,\n },\n };\n })\n .subscribe(this._container.glRenderer.render$);\n\n this._navigator.stateService.currentTransform$\n .first()\n .subscribe(\n (transform: Transform): void => {\n this._tagSet.activate(transform);\n this._tagScene.add(this._tagSet.getAll());\n });\n\n }\n\n protected _deactivate(): void {\n this._tagScene.clear();\n this._tagSet.deactivate();\n\n this._tagCreator.delete$.next(null);\n\n this._claimMouseSubscription.unsubscribe();\n this._mouseDragSubscription.unsubscribe();\n this._unclaimMouseSubscription.unsubscribe();\n this._updateGLObjectsSubscription.unsubscribe();\n this._updateTagSceneSubscription.unsubscribe();\n\n this._stopCreateSubscription.unsubscribe();\n this._deleteCreatingSubscription.unsubscribe();\n this._createSubscription.unsubscribe();\n this._createPointSubscription.unsubscribe();\n this._setCreateVertexSubscription.unsubscribe();\n this._addPointSubscription.unsubscribe();\n this._deleteCreatedSubscription.unsubscribe();\n this._setGLCreateTagSubscription.unsubscribe();\n this._createGLObjectsChangedSubscription.unsubscribe();\n this._preventDefaultSubscription.unsubscribe();\n this._containerClassListSubscription.unsubscribe();\n\n this._domSubscription.unsubscribe();\n this._glSubscription.unsubscribe();\n\n this._geometryCreatedEventSubscription.unsubscribe();\n this._tagsChangedEventSubscription.unsubscribe();\n\n this._container.element.classList.remove(\"component-tag-create\");\n }\n\n protected _getDefaultConfiguration(): ITagConfiguration {\n return {\n createColor: 0xFFFFFF,\n mode: TagMode.Default,\n };\n }\n\n private _mouseEventToBasic(\n event: MouseEvent,\n element: HTMLElement,\n camera: RenderCamera,\n transform: Transform,\n offsetX?: number,\n offsetY?: number):\n number[] {\n\n offsetX = offsetX != null ? offsetX : 0;\n offsetY = offsetY != null ? offsetY : 0;\n\n const [canvasX, canvasY]: number[] = this._viewportCoords.canvasPosition(event, element);\n const basic: number[] =\n this._viewportCoords.canvasToBasic(\n canvasX - offsetX,\n canvasY - offsetY,\n element,\n transform,\n camera.perspective);\n\n return basic;\n }\n}\n\nComponentService.register(TagComponent);\nexport default TagComponent;\n",
- "import {Observable} from \"rxjs/Observable\";\nimport {Subject} from \"rxjs/Subject\";\n\nimport \"rxjs/add/operator/map\";\nimport \"rxjs/add/operator/scan\";\nimport \"rxjs/add/operator/share\";\nimport \"rxjs/add/operator/withLatestFrom\";\n\nimport {\n Component,\n ITagConfiguration,\n OutlineCreateTag,\n PolygonGeometry,\n RectGeometry,\n TagMode,\n} from \"../../Component\";\nimport {Transform} from \"../../Geo\";\nimport {Navigator} from \"../../Viewer\";\n\ninterface ICreateTagOperation {\n (tag: OutlineCreateTag): OutlineCreateTag;\n}\n\nexport class TagCreator {\n private _component: Component<ITagConfiguration>;\n private _navigator: Navigator;\n\n private _tagOperation$: Subject<ICreateTagOperation>;\n private _tag$: Observable<OutlineCreateTag>;\n\n private _create$: Subject<number[]>;\n private _delete$: Subject<void>;\n\n constructor(component: Component<ITagConfiguration>, navigator: Navigator) {\n this._component = component;\n this._navigator = navigator;\n\n this._tagOperation$ = new Subject<ICreateTagOperation>();\n this._create$ = new Subject<number[]>();\n this._delete$ = new Subject<void>();\n\n this._tag$ = this._tagOperation$\n .scan(\n (tag: OutlineCreateTag, operation: ICreateTagOperation): OutlineCreateTag => {\n return operation(tag);\n },\n null)\n .share();\n\n this._create$\n .withLatestFrom(\n this._component.configuration$,\n this._navigator.stateService.currentTransform$)\n .map(\n ([coord, conf, transform]: [number[], ITagConfiguration, Transform]): ICreateTagOperation => {\n return (tag: OutlineCreateTag): OutlineCreateTag => {\n if (conf.mode === TagMode.CreateRect) {\n let geometry: RectGeometry = new RectGeometry([\n coord[0],\n coord[1],\n coord[0],\n coord[1],\n ]);\n\n return new OutlineCreateTag(geometry, { color: conf.createColor }, transform);\n } else if (conf.mode === TagMode.CreatePolygon) {\n let geometry: PolygonGeometry = new PolygonGeometry([\n [coord[0], coord[1]],\n [coord[0], coord[1]],\n [coord[0], coord[1]],\n ]);\n\n return new OutlineCreateTag(geometry, { color: conf.createColor }, transform);\n }\n\n return null;\n };\n })\n .subscribe(this._tagOperation$);\n\n this._delete$\n .map(\n (): ICreateTagOperation => {\n return (tag: OutlineCreateTag): OutlineCreateTag => {\n return null;\n };\n })\n .subscribe(this._tagOperation$);\n }\n\n public get create$(): Subject<number[]> {\n return this._create$;\n }\n\n public get delete$(): Subject<void> {\n return this._delete$;\n }\n\n public get tag$(): Observable<OutlineCreateTag> {\n return this._tag$;\n }\n}\n\nexport default TagCreator;\n",
- "/// <reference path=\"../../../typings/index.d.ts\" />\n\nimport * as THREE from \"three\";\nimport * as vd from \"virtual-dom\";\n\nimport {\n OutlineCreateTag,\n RenderTag,\n Tag,\n} from \"../../Component\";\nimport {ISize} from \"../../Render\";\nimport {ISpriteAtlas} from \"../../Viewer\";\n\nexport class TagDOMRenderer {\n public render(\n tags: RenderTag<Tag>[],\n createTag: OutlineCreateTag,\n atlas: ISpriteAtlas,\n camera: THREE.PerspectiveCamera,\n size: ISize): vd.VNode {\n\n let vNodes: vd.VNode[] = [];\n\n for (const tag of tags) {\n vNodes = vNodes.concat(tag.getDOMObjects(atlas, camera, size));\n }\n\n if (createTag != null) {\n vNodes = vNodes.concat(createTag.getDOMObjects(camera, size));\n }\n\n return vd.h(\"div.TagContainer\", {}, vNodes);\n }\n\n public clear(): vd.VNode {\n return vd.h(\"div\", {}, []);\n }\n}\n",
- "/**\n * Enumeration for tag modes\n * @enum {number}\n * @readonly\n * @description Modes for the interaction in the tag component.\n */\nexport enum TagMode {\n /**\n * Disables creating tags.\n */\n Default,\n\n /**\n * Create a point geometry through a click.\n */\n CreatePoint,\n\n /**\n * Create a polygon geometry through clicks.\n */\n CreatePolygon,\n\n /**\n * Create a rect geometry through clicks.\n */\n CreateRect,\n}\n\nexport default TagMode;\n",
+ "import {\n merge as observableMerge,\n from as observableFrom,\n combineLatest as observableCombineLatest,\n Observable,\n Subject,\n Subscription,\n} from \"rxjs\";\n\nimport {\n withLatestFrom,\n startWith,\n switchMap,\n map,\n mergeMap,\n} from \"rxjs/operators\";\n\nimport {\n ComponentService,\n Component,\n IComponentConfiguration,\n Popup,\n} from \"../../Component\";\nimport {Transform} from \"../../Geo\";\nimport {\n ISize,\n RenderCamera,\n} from \"../../Render\";\nimport {DOM} from \"../../Utils\";\nimport {\n Container,\n Navigator,\n} from \"../../Viewer\";\n\n/**\n * @class PopupComponent\n *\n * @classdesc Component for showing HTML popup objects.\n *\n * The `add` method is used for adding new popups. Popups are removed by reference.\n *\n * It is not possible to update popups in the set by updating any properties\n * directly on the popup object. Popups need to be replaced by\n * removing them and creating new ones with relevant changed properties and\n * adding those instead.\n *\n * Popups are only relevant to a single image because they are based on\n * 2D basic image coordinates. Popups related to a certain image should\n * be removed when the viewer is moved to another node.\n *\n * To retrive and use the popup component\n *\n * @example\n * ```\n * var viewer = new Mapillary.Viewer(\n * \"<element-id>\",\n * \"<client-id>\",\n * \"<my key>\",\n * { component: { popup: true } });\n *\n * var popupComponent = viewer.getComponent(\"popup\");\n * ```\n */\nexport class PopupComponent extends Component<IComponentConfiguration> {\n public static componentName: string = \"popup\";\n\n private _dom: DOM;\n\n private _popupContainer: HTMLDivElement;\n private _popups: Popup[];\n\n private _added$: Subject<Popup[]>;\n private _popups$: Subject<Popup[]>;\n\n private _updateAllSubscription: Subscription;\n private _updateAddedChangedSubscription: Subscription;\n\n /** @ignore */\n constructor(name: string, container: Container, navigator: Navigator, dom?: DOM) {\n super(name, container, navigator);\n\n this._dom = !!dom ? dom : new DOM();\n\n this._popups = [];\n\n this._added$ = new Subject<Popup[]>();\n this._popups$ = new Subject<Popup[]>();\n }\n\n /**\n * Add popups to the popups set.\n *\n * @description Adding a new popup never replaces an old one\n * because they are stored by reference. Adding an already\n * existing popup has no effect.\n *\n * @param {Array<Popup>} popups - Popups to add.\n *\n * @example ```popupComponent.add([popup1, popup2]);```\n */\n public add(popups: Popup[]): void {\n for (const popup of popups) {\n if (this._popups.indexOf(popup) !== -1) {\n continue;\n }\n\n this._popups.push(popup);\n\n if (this._activated) {\n popup.setParentContainer(this._popupContainer);\n }\n }\n\n this._added$.next(popups);\n this._popups$.next(this._popups);\n }\n\n /**\n * Returns an array of all popups.\n *\n * @example ```var popups = popupComponent.getAll();```\n */\n public getAll(): Popup[] {\n return this._popups.slice();\n }\n\n /**\n * Remove popups based on reference from the popup set.\n *\n * @param {Array<Popup>} popups - Popups to remove.\n *\n * @example ```popupComponent.remove([popup1, popup2]);```\n */\n public remove(popups: Popup[]): void {\n for (const popup of popups) {\n this._remove(popup);\n }\n\n this._popups$.next(this._popups);\n }\n\n /**\n * Remove all popups from the popup set.\n *\n * @example ```popupComponent.removeAll();```\n */\n public removeAll(): void {\n for (const popup of this._popups.slice()) {\n this._remove(popup);\n }\n\n this._popups$.next(this._popups);\n }\n\n protected _activate(): void {\n this._popupContainer = this._dom.createElement(\"div\", \"mapillary-js-popup-container\", this._container.element) ;\n\n for (const popup of this._popups) {\n popup.setParentContainer(this._popupContainer);\n }\n\n this._updateAllSubscription = observableCombineLatest(\n this._container.renderService.renderCamera$,\n this._container.renderService.size$,\n this._navigator.stateService.currentTransform$)\n .subscribe(\n ([renderCamera, size, transform]: [RenderCamera, ISize, Transform]): void => {\n for (const popup of this._popups) {\n popup.update(renderCamera, size, transform);\n }\n });\n\n const changed$: Observable<Popup[]> = this._popups$.pipe(\n startWith(this._popups),\n switchMap(\n (popups: Popup[]): Observable<Popup> => {\n return observableFrom(popups).pipe(\n mergeMap(\n (popup: Popup): Observable<Popup> => {\n return popup.changed$;\n }));\n }),\n map(\n (popup: Popup): Popup[] => {\n return [popup];\n }));\n\n this._updateAddedChangedSubscription = observableMerge(this._added$, changed$).pipe(\n withLatestFrom(\n this._container.renderService.renderCamera$,\n this._container.renderService.size$,\n this._navigator.stateService.currentTransform$))\n .subscribe(\n ([popups, renderCamera, size, transform]: [Popup[], RenderCamera, ISize, Transform]): void => {\n for (const popup of popups) {\n popup.update(renderCamera, size, transform);\n }\n });\n }\n\n protected _deactivate(): void {\n this._updateAllSubscription.unsubscribe();\n this._updateAddedChangedSubscription.unsubscribe();\n\n for (const popup of this._popups) {\n popup.remove();\n }\n\n this._container.element.removeChild(this._popupContainer);\n delete this._popupContainer;\n }\n\n protected _getDefaultConfiguration(): IComponentConfiguration {\n return {};\n }\n\n private _remove(popup: Popup): void {\n const index: number = this._popups.indexOf(popup);\n if (index === -1) {\n return;\n }\n\n const removed: Popup = this._popups.splice(index, 1)[0];\n if (this._activated) {\n removed.remove();\n }\n }\n}\n\nComponentService.register(PopupComponent);\nexport default PopupComponent;\n",
+ "import {Observable, Subject} from \"rxjs\";\n\nimport {\n IPopupOffset,\n IPopupOptions,\n PopupAlignment,\n} from \"../../../Component\";\nimport {\n Transform,\n ViewportCoords,\n} from \"../../../Geo\";\nimport {\n ISize,\n RenderCamera,\n} from \"../../../Render\";\nimport {DOM} from \"../../../Utils\";\nimport {Alignment} from \"../../../Viewer\";\n\n/**\n * @class Popup\n *\n * @classdesc Popup instance for rendering custom HTML content\n * on top of images. Popups are based on 2D basic image coordinates\n * (see the {@link Viewer} class documentation for more information about coordinate\n * systems) and a certain popup is therefore only relevant to a single image.\n * Popups related to a certain image should be removed when moving\n * to another image.\n *\n * A popup must have both its content and its point or rect set to be\n * rendered. Popup options can not be updated after creation but the\n * basic point or rect as well as its content can be changed by calling\n * the appropriate methods.\n *\n * To create and add one `Popup` with default configuration\n * (tooltip visuals and automatic float) and one with specific options\n * use\n *\n * @example\n * ```\n * var defaultSpan = document.createElement('span');\n * defaultSpan.innerHTML = 'hello default';\n *\n * var defaultPopup = new Mapillary.PopupComponent.Popup();\n * defaultPopup.setDOMContent(defaultSpan);\n * defaultPopup.setBasicPoint([0.3, 0.3]);\n *\n * var cleanSpan = document.createElement('span');\n * cleanSpan.innerHTML = 'hello clean';\n *\n * var cleanPopup = new Mapillary.PopupComponent.Popup({\n * clean: true,\n * float: Mapillary.Alignment.Top,\n * offset: 10,\n * opacity: 0.7,\n * });\n *\n * cleanPopup.setDOMContent(cleanSpan);\n * cleanPopup.setBasicPoint([0.6, 0.6]);\n *\n * popupComponent.add([defaultPopup, cleanPopup]);\n * ```\n *\n * @description Implementation of API methods and API documentation inspired\n * by/used from https://github.com/mapbox/mapbox-gl-js/blob/v0.38.0/src/ui/popup.js\n */\nexport class Popup {\n protected _notifyChanged$: Subject<Popup>;\n\n private _container: HTMLDivElement;\n private _content: HTMLDivElement;\n private _parentContainer: HTMLElement;\n private _options: IPopupOptions;\n private _tip: HTMLDivElement;\n\n private _point: number[];\n private _rect: number[];\n\n private _dom: DOM;\n private _viewportCoords: ViewportCoords;\n\n constructor(options?: IPopupOptions, viewportCoords?: ViewportCoords, dom?: DOM) {\n this._options = {};\n\n options = !!options ? options : {};\n\n this._options.capturePointer = options.capturePointer === false ?\n options.capturePointer : true;\n\n this._options.clean = options.clean;\n this._options.float = options.float;\n this._options.offset = options.offset;\n this._options.opacity = options.opacity;\n this._options.position = options.position;\n\n this._dom = !!dom ? dom : new DOM();\n this._viewportCoords = !!viewportCoords ? viewportCoords : new ViewportCoords();\n\n this._notifyChanged$ = new Subject<Popup>();\n }\n\n /**\n * @description Internal observable used by the component to\n * render the popup when its position or content has changed.\n * @ignore\n */\n public get changed$(): Observable<Popup> {\n return this._notifyChanged$;\n }\n\n /**\n * @description Internal method used by the component to\n * remove all references to the popup.\n * @ignore\n */\n public remove(): void {\n if (this._content && this._content.parentNode) {\n this._content.parentNode.removeChild(this._content);\n }\n\n if (this._container) {\n this._container.parentNode.removeChild(this._container);\n delete this._container;\n }\n\n if (this._parentContainer) {\n delete this._parentContainer;\n }\n }\n\n /**\n * Sets a 2D basic image coordinates point to the popup's anchor, and\n * moves the popup to it.\n *\n * @description Overwrites any previously set point or rect.\n *\n * @param {Array<number>} basicPoint - Point in 2D basic image coordinates.\n *\n * @example\n * ```\n * var popup = new Mapillary.PopupComponent.Popup();\n * popup.setText('hello image');\n * popup.setBasicPoint([0.3, 0.3]);\n *\n * popupComponent.add([popup]);\n * ```\n */\n public setBasicPoint(basicPoint: number[]): void {\n this._point = basicPoint.slice();\n this._rect = null;\n\n this._notifyChanged$.next(this);\n }\n\n /**\n * Sets a 2D basic image coordinates rect to the popup's anchor, and\n * moves the popup to it.\n *\n * @description Overwrites any previously set point or rect.\n *\n * @param {Array<number>} basicRect - Rect in 2D basic image\n * coordinates ([topLeftX, topLeftY, bottomRightX, bottomRightY]) .\n *\n * @example\n * ```\n * var popup = new Mapillary.PopupComponent.Popup();\n * popup.setText('hello image');\n * popup.setBasicRect([0.3, 0.3, 0.5, 0.6]);\n *\n * popupComponent.add([popup]);\n * ```\n */\n public setBasicRect(basicRect: number[]): void {\n this._rect = basicRect.slice();\n this._point = null;\n\n this._notifyChanged$.next(this);\n }\n\n /**\n * Sets the popup's content to the element provided as a DOM node.\n *\n * @param {Node} htmlNode - A DOM node to be used as content for the popup.\n *\n * @example\n * ```\n * var div = document.createElement('div');\n * div.innerHTML = 'hello image';\n *\n * var popup = new Mapillary.PopupComponent.Popup();\n * popup.setDOMContent(div);\n * popup.setBasicPoint([0.3, 0.3]);\n *\n * popupComponent.add([popup]);\n * ```\n */\n public setDOMContent(htmlNode: Node): void {\n if (this._content && this._content.parentNode) {\n this._content.parentNode.removeChild(this._content);\n }\n\n const className: string = \"mapillaryjs-popup-content\" +\n (this._options.clean === true ? \"-clean\" : \"\") +\n (this._options.capturePointer === true ? \" mapillaryjs-popup-capture-pointer\" : \"\");\n\n this._content = this._dom.createElement(\"div\", className, this._container);\n\n this._content.appendChild(htmlNode);\n\n this._notifyChanged$.next(this);\n }\n\n /**\n * Sets the popup's content to the HTML provided as a string.\n *\n * @description This method does not perform HTML filtering or sanitization,\n * and must be used only with trusted content. Consider Popup#setText if the\n * content is an untrusted text string.\n *\n * @param {string} html - A string representing HTML content for the popup.\n *\n * @example\n * ```\n * var popup = new Mapillary.PopupComponent.Popup();\n * popup.setHTML('<div>hello image</div>');\n * popup.setBasicPoint([0.3, 0.3]);\n *\n * popupComponent.add([popup]);\n * ```\n */\n public setHTML(html: string): void {\n const frag: DocumentFragment = this._dom.document.createDocumentFragment();\n const temp: HTMLBodyElement = this._dom.createElement(\"body\");\n let child: Node;\n temp.innerHTML = html;\n\n while (true) {\n child = temp.firstChild;\n if (!child) {\n break;\n }\n\n frag.appendChild(child);\n }\n\n this.setDOMContent(frag);\n }\n\n /**\n * Sets the popup's content to a string of text.\n *\n * @description This function creates a Text node in the DOM, so it cannot insert raw HTML.\n * Use this method for security against XSS if the popup content is user-provided.\n *\n * @param {string} text - Textual content for the popup.\n *\n * @example\n * ```\n * var popup = new Mapillary.PopupComponent.Popup();\n * popup.setText('hello image');\n * popup.setBasicPoint([0.3, 0.3]);\n *\n * popupComponent.add([popup]);\n * ```\n */\n public setText(text: string): void {\n this.setDOMContent(this._dom.document.createTextNode(text));\n }\n\n /**\n * @description Internal method for attaching the popup to\n * its parent container so that it is rendered in the DOM tree.\n * @ignore\n */\n public setParentContainer(parentContainer: HTMLElement): void {\n this._parentContainer = parentContainer;\n }\n\n /**\n * @description Internal method for updating the rendered\n * position of the popup called by the popup component.\n * @ignore\n */\n public update(renderCamera: RenderCamera, size: ISize, transform: Transform): void {\n if (!this._parentContainer || !this._content) {\n return;\n }\n\n if (!this._point && !this._rect) {\n return;\n }\n\n if (!this._container) {\n this._container = this._dom.createElement(\"div\", \"mapillaryjs-popup\", this._parentContainer);\n\n const showTip: boolean =\n this._options.clean !== true &&\n this._options.float !== Alignment.Center;\n\n if (showTip) {\n const tipClassName: string =\n \"mapillaryjs-popup-tip\" +\n (this._options.capturePointer === true ? \" mapillaryjs-popup-capture-pointer\" : \"\");\n\n this._tip = this._dom.createElement(\"div\", tipClassName, this._container);\n this._dom.createElement(\"div\", \"mapillaryjs-popup-tip-inner\", this._tip);\n }\n\n this._container.appendChild(this._content);\n this._parentContainer.appendChild(this._container);\n\n if (this._options.opacity != null) {\n this._container.style.opacity = this._options.opacity.toString();\n }\n }\n\n let pointPixel: number[] = null;\n let position: PopupAlignment = this._alignmentToPopupAligment(this._options.position);\n let float: PopupAlignment = this._alignmentToPopupAligment(this._options.float);\n\n const classList: DOMTokenList = this._container.classList;\n\n if (this._point != null) {\n pointPixel =\n this._viewportCoords.basicToCanvasSafe(\n this._point[0],\n this._point[1],\n { offsetHeight: size.height, offsetWidth: size.width },\n transform,\n renderCamera.perspective);\n } else {\n const alignments: PopupAlignment[] =\n [\"center\", \"top\", \"bottom\", \"left\", \"right\", \"top-left\", \"top-right\", \"bottom-left\", \"bottom-right\"];\n\n let appliedPosition: PopupAlignment = null;\n for (const alignment of alignments) {\n if (classList.contains(`mapillaryjs-popup-float-${alignment}`)) {\n appliedPosition = alignment;\n break;\n }\n }\n\n [pointPixel, position] = this._rectToPixel(this._rect, position, appliedPosition, renderCamera, size, transform);\n\n if (!float) {\n float = position;\n }\n }\n\n if (pointPixel == null) {\n this._container.style.display = \"none\";\n return;\n }\n\n this._container.style.display = \"\";\n\n if (!float) {\n const width: number = this._container.offsetWidth;\n const height: number = this._container.offsetHeight;\n const floats: PopupAlignment[] = this._pixelToFloats(pointPixel, size, width, height);\n\n float = floats.length === 0 ? \"top\" : <PopupAlignment>floats.join(\"-\");\n }\n\n const offset: { [key in PopupAlignment]: number[] } = this._normalizeOffset(this._options.offset);\n\n pointPixel = [pointPixel[0] + offset[float][0], pointPixel[1] + offset[float][1]];\n pointPixel = [Math.round(pointPixel[0]), Math.round(pointPixel[1])];\n\n const floatTranslate: {[key in PopupAlignment]: string } = {\n \"bottom\": \"translate(-50%,0)\",\n \"bottom-left\": \"translate(-100%,0)\",\n \"bottom-right\": \"translate(0,0)\",\n \"center\": \"translate(-50%,-50%)\",\n \"left\": \"translate(-100%,-50%)\",\n \"right\": \"translate(0,-50%)\",\n \"top\": \"translate(-50%,-100%)\",\n \"top-left\": \"translate(-100%,-100%)\",\n \"top-right\": \"translate(0,-100%)\",\n };\n\n for (const key in floatTranslate) {\n if (!floatTranslate.hasOwnProperty(key)) {\n continue;\n }\n\n classList.remove(`mapillaryjs-popup-float-${key}`);\n }\n\n classList.add(`mapillaryjs-popup-float-${float}`);\n\n this._container.style.transform = `${floatTranslate[float]} translate(${pointPixel[0]}px,${pointPixel[1]}px)`;\n }\n\n private _rectToPixel(\n rect: number[],\n position: PopupAlignment,\n appliedPosition: PopupAlignment,\n renderCamera: RenderCamera,\n size: ISize,\n transform: Transform): [number[], PopupAlignment] {\n\n if (!position) {\n const width: number = this._container.offsetWidth;\n const height: number = this._container.offsetHeight;\n\n const floatOffsets: { [key: string]: number[] } = {\n \"bottom\": [0, height / 2],\n \"bottom-left\": [-width / 2, height / 2],\n \"bottom-right\": [width / 2, height / 2],\n \"left\": [-width / 2, 0],\n \"right\": [width / 2, 0],\n \"top\": [0, -height / 2],\n \"top-left\": [-width / 2, -height / 2],\n \"top-right\": [width / 2, -height / 2],\n };\n\n const automaticPositions: PopupAlignment[] =\n [\"top\", \"bottom\", \"left\", \"right\"];\n\n let largestVisibleArea: [number, number[], PopupAlignment] = [0, null, null];\n\n for (const automaticPosition of automaticPositions) {\n const autoPointBasic: number[] = this._pointFromRectPosition(rect, automaticPosition);\n const autoPointPixel: number[] =\n this._viewportCoords.basicToCanvasSafe(\n autoPointBasic[0],\n autoPointBasic[1],\n { offsetHeight: size.height, offsetWidth: size.width },\n transform,\n renderCamera.perspective);\n\n if (autoPointPixel == null) {\n continue;\n }\n\n const floatOffset: number[] = floatOffsets[automaticPosition];\n const offsetedPosition: number[] = [autoPointPixel[0] + floatOffset[0], autoPointPixel[1] + floatOffset[1]];\n const staticCoeff: number = appliedPosition != null && appliedPosition === automaticPosition ? 1 : 0.7;\n const floats: PopupAlignment[] =\n this._pixelToFloats(offsetedPosition, size, width / staticCoeff, height / (2 * staticCoeff));\n\n if (floats.length === 0 &&\n autoPointPixel[0] > 0 &&\n autoPointPixel[0] < size.width &&\n autoPointPixel[1] > 0 &&\n autoPointPixel[1] < size.height) {\n\n return [autoPointPixel, automaticPosition];\n }\n\n const minX: number = Math.max(offsetedPosition[0] - width / 2, 0);\n const maxX: number = Math.min(offsetedPosition[0] + width / 2, size.width);\n const minY: number = Math.max(offsetedPosition[1] - height / 2, 0);\n const maxY: number = Math.min(offsetedPosition[1] + height / 2, size.height);\n\n const visibleX: number = Math.max(0, maxX - minX);\n const visibleY: number = Math.max(0, maxY - minY);\n\n const visibleArea: number = staticCoeff * visibleX * visibleY;\n\n if (visibleArea > largestVisibleArea[0]) {\n largestVisibleArea[0] = visibleArea;\n largestVisibleArea[1] = autoPointPixel;\n largestVisibleArea[2] = automaticPosition;\n }\n }\n\n if (largestVisibleArea[0] > 0) {\n return [largestVisibleArea[1], largestVisibleArea[2]];\n }\n }\n\n const pointBasic: number[] = this._pointFromRectPosition(rect, position);\n const pointPixel: number[] =\n this._viewportCoords.basicToCanvasSafe(\n pointBasic[0],\n pointBasic[1],\n { offsetHeight: size.height, offsetWidth: size.width },\n transform,\n renderCamera.perspective);\n\n return [pointPixel, position != null ? position : \"top\"];\n }\n\n private _alignmentToPopupAligment(float: Alignment): PopupAlignment {\n switch (float) {\n case Alignment.Bottom:\n return \"bottom\";\n case Alignment.BottomLeft:\n return \"bottom-left\";\n case Alignment.BottomRight:\n return \"bottom-right\";\n case Alignment.Center:\n return \"center\";\n case Alignment.Left:\n return \"left\";\n case Alignment.Right:\n return \"right\";\n case Alignment.Top:\n return \"top\";\n case Alignment.TopLeft:\n return \"top-left\";\n case Alignment.TopRight:\n return \"top-right\";\n default:\n return null;\n }\n }\n\n private _normalizeOffset(offset: number | IPopupOffset): { [key in PopupAlignment]: number[] } {\n if (offset == null) {\n return this._normalizeOffset(0);\n }\n\n if (typeof offset === \"number\") {\n // input specifies a radius\n const sideOffset: number = <number>offset;\n const sign: number = sideOffset >= 0 ? 1 : -1;\n const cornerOffset: number = sign * Math.round(Math.sqrt(0.5 * Math.pow(sideOffset, 2)));\n return {\n \"bottom\": [0, sideOffset],\n \"bottom-left\": [-cornerOffset, cornerOffset],\n \"bottom-right\": [cornerOffset, cornerOffset],\n \"center\": [0, 0],\n \"left\": [-sideOffset, 0],\n \"right\": [sideOffset, 0],\n \"top\": [0, -sideOffset],\n \"top-left\": [-cornerOffset, -cornerOffset],\n \"top-right\": [cornerOffset, -cornerOffset],\n };\n } else {\n // input specifes a value for each position\n return {\n \"bottom\": offset.bottom || [0, 0],\n \"bottom-left\": offset.bottomLeft || [0, 0],\n \"bottom-right\": offset.bottomRight || [0, 0],\n \"center\": offset.center || [0, 0],\n \"left\": offset.left || [0, 0],\n \"right\": offset.right || [0, 0],\n \"top\": offset.top || [0, 0],\n \"top-left\": offset.topLeft || [0, 0],\n \"top-right\": offset.topRight || [0, 0],\n };\n }\n }\n\n private _pixelToFloats(pointPixel: number[], size: ISize, width: number, height: number): PopupAlignment[] {\n const floats: PopupAlignment[] = [];\n\n if (pointPixel[1] < height) {\n floats.push(\"bottom\");\n } else if (pointPixel[1] > size.height - height) {\n floats.push(\"top\");\n }\n\n if (pointPixel[0] < width / 2) {\n floats.push(\"right\");\n } else if (pointPixel[0] > size.width - width / 2) {\n floats.push(\"left\");\n }\n\n return floats;\n }\n\n private _pointFromRectPosition(rect: number[], position: PopupAlignment): number[] {\n const x0: number = rect[0];\n const x1: number = rect[0] < rect[2] ? rect[2] : rect[2] + 1;\n const y0: number = rect[1];\n const y1: number = rect[3];\n\n switch (position) {\n case \"bottom\":\n return [(x0 + x1) / 2, y1];\n case \"bottom-left\":\n return [x0, y1];\n case \"bottom-right\":\n return [x1, y1];\n case \"center\":\n return [(x0 + x1) / 2, (y0 + y1) / 2];\n case \"left\":\n return [x0, (y0 + y1) / 2];\n case \"right\":\n return [x1, (y0 + y1) / 2];\n case \"top\":\n return [(x0 + x1) / 2, y0];\n case \"top-left\":\n return [x0, y0];\n case \"top-right\":\n return [x1, y0];\n default:\n return [(x0 + x1) / 2, y1];\n }\n }\n}\n\nexport default Popup;\n",
+ "import {\n of as observableOf,\n combineLatest as observableCombineLatest,\n merge as observableMerge,\n concat as observableConcat,\n empty as observableEmpty,\n Observable,\n Scheduler,\n Subject,\n Subscription,\n} from \"rxjs\";\n\nimport {\n takeUntil,\n share,\n skip,\n withLatestFrom,\n first,\n map,\n switchMap,\n publishReplay,\n auditTime,\n distinctUntilChanged,\n startWith,\n retry,\n catchError,\n filter,\n publish,\n debounceTime,\n take,\n refCount,\n} from \"rxjs/operators\";\n\nimport * as vd from \"virtual-dom\";\n\nimport {\n Component,\n ComponentService,\n ISequenceConfiguration,\n SequenceDOMRenderer,\n} from \"../../Component\";\nimport {EdgeDirection} from \"../../Edge\";\nimport {\n IEdgeStatus,\n GraphMode,\n Node,\n Sequence,\n} from \"../../Graph\";\nimport {\n ISize,\n IVNodeHash,\n} from \"../../Render\";\nimport {\n Container,\n Navigator,\n} from \"../../Viewer\";\n\n/**\n * @class SequenceComponent\n * @classdesc Component showing navigation arrows for sequence directions\n * as well as playing button. Exposes an API to start and stop play.\n */\nexport class SequenceComponent extends Component<ISequenceConfiguration> {\n /** @inheritdoc */\n public static componentName: string = \"sequence\";\n\n /**\n * Event fired when playing starts or stops.\n *\n * @event SequenceComponent#playingchanged\n * @type {boolean} Indicates whether the player is playing.\n */\n public static playingchanged: string = \"playingchanged\";\n\n /**\n * Event fired when the hovered key changes.\n *\n * @description Emits the key of the node for the direction\n * arrow that is being hovered. When the mouse leaves a\n * direction arrow null is emitted.\n *\n * @event SequenceComponent#hoveredkeychanged\n * @type {string} The hovered key, null if no key is hovered.\n */\n public static hoveredkeychanged: string = \"hoveredkeychanged\";\n\n private _sequenceDOMRenderer: SequenceDOMRenderer;\n private _scheduler: Scheduler;\n\n private _hoveredKeySubject$: Subject<string>;\n private _hoveredKey$: Observable<string>;\n private _containerWidth$: Subject<number>;\n\n private _emitHoveredKeySubscription: Subscription;\n private _renderSubscription: Subscription;\n private _playingSubscription: Subscription;\n private _containerWidthSubscription: Subscription;\n private _hoveredKeySubscription: Subscription;\n private _setSpeedSubscription: Subscription;\n private _setDirectionSubscription: Subscription;\n private _setSequenceGraphModeSubscription: Subscription;\n private _setSpatialGraphModeSubscription: Subscription;\n private _sequenceSubscription: Subscription;\n private _moveSubscription: Subscription;\n private _cacheSequenceNodesSubscription: Subscription;\n private _stopSubscription: Subscription;\n\n constructor(\n name: string,\n container: Container,\n navigator: Navigator,\n renderer?: SequenceDOMRenderer,\n scheduler?: Scheduler) {\n\n super(name, container, navigator);\n\n this._sequenceDOMRenderer = !!renderer ? renderer : new SequenceDOMRenderer(container);\n this._scheduler = scheduler;\n\n this._containerWidth$ = new Subject<number>();\n this._hoveredKeySubject$ = new Subject<string>();\n\n this._hoveredKey$ = this._hoveredKeySubject$.pipe(share());\n\n this._navigator.playService.playing$.pipe(\n skip(1),\n withLatestFrom(this._configuration$))\n .subscribe(\n ([playing, configuration]: [boolean, ISequenceConfiguration]): void => {\n this.fire(SequenceComponent.playingchanged, playing);\n\n if (playing === configuration.playing) {\n return;\n }\n\n if (playing) {\n this.play();\n } else {\n this.stop();\n }\n });\n\n this._navigator.playService.direction$.pipe(\n skip(1),\n withLatestFrom(this._configuration$))\n .subscribe(\n ([direction, configuration]: [EdgeDirection, ISequenceConfiguration]): void => {\n if (direction !== configuration.direction) {\n this.setDirection(direction);\n }\n });\n }\n\n /**\n * Get hovered key observable.\n *\n * @description An observable emitting the key of the node for the direction\n * arrow that is being hovered. When the mouse leaves a direction arrow null\n * is emitted.\n *\n * @returns {Observable<string>}\n */\n public get hoveredKey$(): Observable<string> {\n return this._hoveredKey$;\n }\n\n /**\n * Start playing.\n *\n * @fires PlayerComponent#playingchanged\n */\n public play(): void {\n this.configure({ playing: true });\n }\n\n /**\n * Stop playing.\n *\n * @fires PlayerComponent#playingchanged\n */\n public stop(): void {\n this.configure({ playing: false });\n }\n\n /**\n * Set the direction to follow when playing.\n *\n * @param {EdgeDirection} direction - The direction that will be followed when playing.\n */\n public setDirection(direction: EdgeDirection): void {\n this.configure({ direction: direction });\n }\n\n /**\n * Set highlight key.\n *\n * @description The arrow pointing towards the node corresponding to the\n * highlight key will be highlighted.\n *\n * @param {string} highlightKey Key of node to be highlighted if existing.\n */\n public setHighlightKey(highlightKey: string): void {\n this.configure({ highlightKey: highlightKey });\n }\n\n /**\n * Set max width of container element.\n *\n * @description Set max width of the container element holding\n * the sequence navigation elements. If the min width is larger than the\n * max width the min width value will be used.\n *\n * The container element is automatically resized when the resize\n * method on the Viewer class is called.\n *\n * @param {number} minWidth\n */\n public setMaxWidth(maxWidth: number): void {\n this.configure({ maxWidth: maxWidth });\n }\n\n /**\n * Set min width of container element.\n *\n * @description Set min width of the container element holding\n * the sequence navigation elements. If the min width is larger than the\n * max width the min width value will be used.\n *\n * The container element is automatically resized when the resize\n * method on the Viewer class is called.\n *\n * @param {number} minWidth\n */\n public setMinWidth(minWidth: number): void {\n this.configure({ minWidth: minWidth });\n }\n\n /**\n * Set the value indicating whether the sequence UI elements should be visible.\n *\n * @param {boolean} visible\n */\n public setVisible(visible: boolean): void {\n this.configure({ visible: visible });\n }\n\n protected _activate(): void {\n this._sequenceDOMRenderer.activate();\n\n const edgeStatus$: Observable<IEdgeStatus> = this._navigator.stateService.currentNode$.pipe(\n switchMap(\n (node: Node): Observable<IEdgeStatus> => {\n return node.sequenceEdges$;\n }),\n publishReplay(1),\n refCount());\n\n const sequence$: Observable<Sequence> = this._navigator.stateService.currentNode$.pipe(\n distinctUntilChanged(\n undefined,\n (node: Node): string => {\n return node.sequenceKey;\n }),\n switchMap(\n (node: Node): Observable<Sequence> => {\n return observableConcat(\n observableOf(null),\n this._navigator.graphService.cacheSequence$(node.sequenceKey).pipe(\n retry(3),\n catchError(\n (e: Error): Observable<Sequence> => {\n console.error(\"Failed to cache sequence\", e);\n\n return observableOf(null);\n })));\n }),\n startWith(null),\n publishReplay(1),\n refCount());\n\n this._sequenceSubscription = sequence$.subscribe();\n\n const rendererKey$: Observable<string> = this._sequenceDOMRenderer.index$.pipe(\n withLatestFrom(sequence$),\n map(\n ([index, sequence]: [number, Sequence]): string => {\n return sequence != null ? sequence.keys[index] : null;\n }),\n filter(\n (key: string): boolean => {\n return !!key;\n }),\n distinctUntilChanged(),\n publish(),\n refCount());\n\n this._moveSubscription = observableMerge(\n rendererKey$.pipe(debounceTime(100, this._scheduler)),\n rendererKey$.pipe(auditTime(400, this._scheduler))).pipe(\n distinctUntilChanged(),\n switchMap(\n (key: string): Observable<Node> => {\n return this._navigator.moveToKey$(key).pipe(\n catchError(\n (e: Error): Observable<Node> => {\n return observableEmpty();\n }));\n }))\n .subscribe();\n\n this._setSequenceGraphModeSubscription = this._sequenceDOMRenderer.changingPositionChanged$.pipe(\n filter(\n (changing: boolean): boolean => {\n return changing;\n }))\n .subscribe(\n (): void => {\n this._navigator.graphService.setGraphMode(GraphMode.Sequence);\n });\n\n this._setSpatialGraphModeSubscription = this._sequenceDOMRenderer.changingPositionChanged$.pipe(\n filter(\n (changing: boolean): boolean => {\n return !changing;\n }))\n .subscribe(\n (): void => {\n this._navigator.graphService.setGraphMode(GraphMode.Spatial);\n });\n\n this._navigator.graphService.graphMode$.pipe(\n switchMap(\n (mode: GraphMode): Observable<Node> => {\n return mode === GraphMode.Spatial ?\n this._navigator.stateService.currentNode$.pipe(\n take(2)) :\n observableEmpty();\n }),\n filter(\n (node: Node): boolean => {\n return !node.spatialEdges.cached;\n }),\n switchMap(\n (node: Node): Observable<Node> => {\n return this._navigator.graphService.cacheNode$(node.key).pipe(\n catchError(\n (e: Error): Observable<Node> => {\n return observableEmpty();\n }));\n }))\n .subscribe();\n\n this._stopSubscription = this._sequenceDOMRenderer.changingPositionChanged$.pipe(\n filter(\n (changing: boolean): boolean => {\n return changing;\n }))\n .subscribe(\n (): void => {\n this._navigator.playService.stop();\n });\n\n this._cacheSequenceNodesSubscription = observableCombineLatest(\n this._navigator.graphService.graphMode$,\n this._sequenceDOMRenderer.changingPositionChanged$.pipe(\n startWith(false),\n distinctUntilChanged())).pipe(\n withLatestFrom(this._navigator.stateService.currentNode$),\n switchMap(\n ([[mode, changing], node]: [[GraphMode, boolean], Node]): Observable<Sequence> => {\n return changing && mode === GraphMode.Sequence ?\n this._navigator.graphService.cacheSequenceNodes$(node.sequenceKey, node.key).pipe(\n retry(3),\n catchError(\n (error: Error): Observable<Sequence> => {\n console.error(\"Failed to cache sequence nodes.\", error);\n\n return observableEmpty();\n })) :\n observableEmpty();\n }))\n .subscribe();\n\n const position$: Observable<{ index: number, max: number }> = sequence$.pipe(\n switchMap(\n (sequence: Sequence): Observable<{ index: number, max: number }> => {\n if (!sequence) {\n return observableOf({ index: null, max: null });\n }\n\n let firstCurrentKey: boolean = true;\n\n return this._sequenceDOMRenderer.changingPositionChanged$.pipe(\n startWith(false),\n distinctUntilChanged(),\n switchMap(\n (changingPosition: boolean): Observable<string> => {\n const skipCount: number = !changingPosition && firstCurrentKey ? 0 : 1;\n firstCurrentKey = false;\n\n return changingPosition ?\n rendererKey$ :\n this._navigator.stateService.currentNode$.pipe(\n map(\n (node: Node): string => {\n return node.key;\n }),\n distinctUntilChanged(),\n skip(skipCount));\n }),\n map(\n (key: string): { index: number, max: number } => {\n const index: number = sequence.keys.indexOf(key);\n\n if (index === -1) {\n return { index: null, max: null };\n }\n\n return { index: index, max: sequence.keys.length - 1 };\n }));\n }));\n\n this._renderSubscription = observableCombineLatest(\n edgeStatus$,\n this._configuration$,\n this._containerWidth$,\n this._sequenceDOMRenderer.changed$.pipe(startWith(this._sequenceDOMRenderer)),\n this._navigator.playService.speed$,\n position$).pipe(\n map(\n (\n [edgeStatus, configuration, containerWidth, renderer, speed, position]:\n [\n IEdgeStatus,\n ISequenceConfiguration,\n number,\n SequenceDOMRenderer,\n number,\n { index: number, max: number }\n ]): IVNodeHash => {\n\n const vNode: vd.VNode = this._sequenceDOMRenderer\n .render(\n edgeStatus,\n configuration,\n containerWidth,\n speed,\n position.index,\n position.max,\n this,\n this._navigator);\n\n return {name: this._name, vnode: vNode };\n }))\n .subscribe(this._container.domRenderer.render$);\n\n this._setSpeedSubscription = this._sequenceDOMRenderer.speed$\n .subscribe(\n (speed: number): void => {\n this._navigator.playService.setSpeed(speed);\n });\n\n this._setDirectionSubscription = this._configuration$.pipe(\n map(\n (configuration: ISequenceConfiguration): EdgeDirection => {\n return configuration.direction;\n }),\n distinctUntilChanged())\n .subscribe(\n (direction: EdgeDirection): void => {\n this._navigator.playService.setDirection(direction);\n });\n\n this._containerWidthSubscription = observableCombineLatest(\n this._container.renderService.size$,\n this._configuration$.pipe(\n distinctUntilChanged(\n (value1: [number, number], value2: [number, number]): boolean => {\n return value1[0] === value2[0] && value1[1] === value2[1];\n },\n (configuration: ISequenceConfiguration) => {\n return [configuration.minWidth, configuration.maxWidth];\n }))).pipe(\n map(\n ([size, configuration]: [ISize, ISequenceConfiguration]): number => {\n return this._sequenceDOMRenderer.getContainerWidth(\n size,\n configuration);\n }))\n .subscribe(this._containerWidth$);\n\n this._playingSubscription = this._configuration$.pipe(\n map(\n (configuration: ISequenceConfiguration): boolean => {\n return configuration.playing;\n }),\n distinctUntilChanged())\n .subscribe(\n (playing: boolean) => {\n if (playing) {\n this._navigator.playService.play();\n } else {\n this._navigator.playService.stop();\n }\n });\n\n this._hoveredKeySubscription = this._sequenceDOMRenderer.mouseEnterDirection$.pipe(\n switchMap(\n (direction: EdgeDirection): Observable<string> => {\n const edgeTo$: Observable<string> = edgeStatus$.pipe(\n map(\n (edgeStatus: IEdgeStatus): string => {\n for (let edge of edgeStatus.edges) {\n if (edge.data.direction === direction) {\n return edge.to;\n }\n }\n\n return null;\n }),\n takeUntil(this._sequenceDOMRenderer.mouseLeaveDirection$));\n\n return observableConcat(edgeTo$, observableOf<string>(null));\n }),\n distinctUntilChanged())\n .subscribe(this._hoveredKeySubject$);\n\n this._emitHoveredKeySubscription = this._hoveredKey$\n .subscribe(\n (key: string): void => {\n this.fire(SequenceComponent.hoveredkeychanged, key);\n });\n }\n\n protected _deactivate(): void {\n this._emitHoveredKeySubscription.unsubscribe();\n this._renderSubscription.unsubscribe();\n this._playingSubscription.unsubscribe();\n this._containerWidthSubscription.unsubscribe();\n this._hoveredKeySubscription.unsubscribe();\n this._setSpeedSubscription.unsubscribe();\n this._setDirectionSubscription.unsubscribe();\n this._setSequenceGraphModeSubscription.unsubscribe();\n this._setSpatialGraphModeSubscription.unsubscribe();\n this._sequenceSubscription.unsubscribe();\n this._moveSubscription.unsubscribe();\n this._cacheSequenceNodesSubscription.unsubscribe();\n this._stopSubscription.unsubscribe();\n\n this._sequenceDOMRenderer.deactivate();\n }\n\n protected _getDefaultConfiguration(): ISequenceConfiguration {\n return {\n direction: EdgeDirection.Next,\n maxWidth: 108,\n minWidth: 70,\n playing: false,\n visible: true,\n };\n }\n}\n\nComponentService.register(SequenceComponent);\nexport default SequenceComponent;\n",
+ "import {merge as observableMerge, Observable, Subject, Subscription} from \"rxjs\";\n\nimport {filter} from \"rxjs/operators\";\nimport * as vd from \"virtual-dom\";\n\nimport {\n SequenceMode,\n ISequenceConfiguration,\n SequenceComponent,\n} from \"../../Component\";\nimport {EdgeDirection} from \"../../Edge\";\nimport {AbortMapillaryError} from \"../../Error\";\nimport {\n IEdgeStatus,\n Node,\n} from \"../../Graph\";\nimport {ISize} from \"../../Render\";\nimport {\n Container,\n Navigator,\n} from \"../../Viewer\";\n\nexport class SequenceDOMRenderer {\n private _container: Container;\n\n private _minThresholdWidth: number;\n private _maxThresholdWidth: number;\n private _minThresholdHeight: number;\n private _maxThresholdHeight: number;\n private _stepperDefaultWidth: number;\n private _controlsDefaultWidth: number;\n private _defaultHeight: number;\n private _expandControls: boolean;\n private _mode: SequenceMode;\n private _speed: number;\n private _changingSpeed: boolean;\n private _index: number;\n private _changingPosition: boolean;\n\n private _mouseEnterDirection$: Subject<EdgeDirection>;\n private _mouseLeaveDirection$: Subject<EdgeDirection>;\n private _notifyChanged$: Subject<SequenceDOMRenderer>;\n private _notifyChangingPositionChanged$: Subject<boolean>;\n private _notifySpeedChanged$: Subject<number>;\n private _notifyIndexChanged$: Subject<number>;\n\n private _changingSubscription: Subscription;\n\n constructor(container: Container) {\n this._container = container;\n\n this._minThresholdWidth = 320;\n this._maxThresholdWidth = 1480;\n this._minThresholdHeight = 240;\n this._maxThresholdHeight = 820;\n this._stepperDefaultWidth = 108;\n this._controlsDefaultWidth = 88;\n\n this._defaultHeight = 30;\n this._expandControls = false;\n this._mode = SequenceMode.Default;\n this._speed = 0.5;\n this._changingSpeed = false;\n this._index = null;\n this._changingPosition = false;\n\n this._mouseEnterDirection$ = new Subject<EdgeDirection>();\n this._mouseLeaveDirection$ = new Subject<EdgeDirection>();\n this._notifyChanged$ = new Subject<SequenceDOMRenderer>();\n this._notifyChangingPositionChanged$ = new Subject<boolean>();\n this._notifySpeedChanged$ = new Subject<number>();\n this._notifyIndexChanged$ = new Subject<number>();\n }\n\n public get changed$(): Observable<SequenceDOMRenderer> {\n return this._notifyChanged$;\n }\n\n public get changingPositionChanged$(): Observable<boolean> {\n return this._notifyChangingPositionChanged$;\n }\n\n public get speed$(): Observable<number> {\n return this._notifySpeedChanged$;\n }\n\n public get index$(): Observable<number> {\n return this._notifyIndexChanged$;\n }\n\n public get mouseEnterDirection$(): Observable<EdgeDirection> {\n return this._mouseEnterDirection$;\n }\n\n public get mouseLeaveDirection$(): Observable<EdgeDirection> {\n return this._mouseLeaveDirection$;\n }\n\n public activate(): void {\n if (!!this._changingSubscription) {\n return;\n }\n\n this._changingSubscription = observableMerge(\n this._container.mouseService.documentMouseUp$,\n this._container.touchService.touchEnd$.pipe(\n filter(\n (touchEvent: TouchEvent): boolean => {\n return touchEvent.touches.length === 0;\n })))\n .subscribe(\n (event: Event): void => {\n if (this._changingSpeed) {\n this._changingSpeed = false;\n }\n\n if (this._changingPosition) {\n this._setChangingPosition(false);\n }\n });\n }\n\n public deactivate(): void {\n if (!this._changingSubscription) {\n return;\n }\n\n this._changingSpeed = false;\n this._changingPosition = false;\n this._expandControls = false;\n this._mode = SequenceMode.Default;\n\n this._changingSubscription.unsubscribe();\n this._changingSubscription = null;\n }\n\n public render(\n edgeStatus: IEdgeStatus,\n configuration: ISequenceConfiguration,\n containerWidth: number,\n speed: number,\n index: number,\n max: number,\n component: SequenceComponent,\n navigator: Navigator): vd.VNode {\n\n if (configuration.visible === false) {\n return vd.h(\"div.SequenceContainer\", {}, []);\n }\n\n const stepper: vd.VNode =\n this._createStepper(edgeStatus, configuration, containerWidth, component, navigator);\n const controls: vd.VNode = this._createSequenceControls(containerWidth);\n const playback: vd.VNode = this._createPlaybackControls(containerWidth, speed, component, configuration);\n const timeline: vd.VNode = this._createTimelineControls(containerWidth, index, max);\n\n return vd.h(\"div.SequenceContainer\", [stepper, controls, playback, timeline]);\n }\n\n public getContainerWidth(size: ISize, configuration: ISequenceConfiguration): number {\n let minWidth: number = configuration.minWidth;\n let maxWidth: number = configuration.maxWidth;\n if (maxWidth < minWidth) {\n maxWidth = minWidth;\n }\n\n let relativeWidth: number =\n (size.width - this._minThresholdWidth) / (this._maxThresholdWidth - this._minThresholdWidth);\n let relativeHeight: number =\n (size.height - this._minThresholdHeight) / (this._maxThresholdHeight - this._minThresholdHeight);\n\n let coeff: number = Math.max(0, Math.min(1, Math.min(relativeWidth, relativeHeight)));\n\n return minWidth + coeff * (maxWidth - minWidth);\n }\n\n private _createPositionInput(index: number, max: number): vd.VNode {\n this._index = index;\n\n const onPosition: (e: Event) => void = (e: Event): void => {\n this._index = Number((<HTMLInputElement>e.target).value);\n this._notifyIndexChanged$.next(this._index);\n };\n\n const boundingRect: ClientRect = this._container.domContainer.getBoundingClientRect();\n const width: number = Math.max(276, Math.min(410, 5 + 0.8 * boundingRect.width)) - 65;\n\n const onStart: (e: Event) => void = (e: Event): void => {\n e.stopPropagation();\n this._setChangingPosition(true);\n };\n\n const onMove: (e: Event) => void = (e: Event): void => {\n if (this._changingPosition === true) {\n e.stopPropagation();\n }\n };\n\n const onKeyDown: (e: KeyboardEvent) => void = (e: KeyboardEvent): void => {\n if (e.key === \"ArrowDown\" || e.key === \"ArrowLeft\" ||\n e.key === \"ArrowRight\" || e.key === \"ArrowUp\") {\n e.preventDefault();\n }\n };\n\n const positionInputProperties: vd.createProperties = {\n max: max != null ? max : 1,\n min: 0,\n onchange: onPosition,\n oninput: onPosition,\n onkeydown: onKeyDown,\n onmousedown: onStart,\n onmousemove: onMove,\n ontouchmove: onMove,\n ontouchstart: onStart,\n style: {\n width: `${width}px`,\n },\n type: \"range\",\n value: index != null ? index : 0,\n };\n\n const disabled: boolean = index == null || max == null || max <= 1;\n\n if (disabled) {\n positionInputProperties.disabled = \"true\";\n }\n\n const positionInput: vd.VNode = vd.h(\"input.SequencePosition\", positionInputProperties, []);\n\n const positionContainerClass: string = disabled ? \".SequencePositionContainerDisabled\" : \".SequencePositionContainer\";\n\n return vd.h(\"div\" + positionContainerClass, [positionInput]);\n }\n\n private _createSpeedInput(speed: number): vd.VNode {\n this._speed = speed;\n\n const onSpeed: (e: Event) => void = (e: Event): void => {\n this._speed = Number((<HTMLInputElement>e.target).value) / 1000;\n this._notifySpeedChanged$.next(this._speed);\n };\n\n const boundingRect: ClientRect = this._container.domContainer.getBoundingClientRect();\n const width: number = Math.max(276, Math.min(410, 5 + 0.8 * boundingRect.width)) - 160;\n\n const onStart: (e: Event) => void = (e: Event): void => {\n this._changingSpeed = true;\n e.stopPropagation();\n };\n\n const onMove: (e: Event) => void = (e: Event): void => {\n if (this._changingSpeed === true) {\n e.stopPropagation();\n }\n };\n\n const onKeyDown: (e: KeyboardEvent) => void = (e: KeyboardEvent): void => {\n if (e.key === \"ArrowDown\" || e.key === \"ArrowLeft\" ||\n e.key === \"ArrowRight\" || e.key === \"ArrowUp\") {\n e.preventDefault();\n }\n };\n\n const speedInput: vd.VNode = vd.h(\n \"input.SequenceSpeed\",\n {\n max: 1000,\n min: 0,\n onchange: onSpeed,\n oninput: onSpeed,\n onkeydown: onKeyDown,\n onmousedown: onStart,\n onmousemove: onMove,\n ontouchmove: onMove,\n ontouchstart: onStart,\n style: {\n width: `${width}px`,\n },\n type: \"range\",\n value: 1000 * speed,\n },\n []);\n\n return vd.h(\"div.SequenceSpeedContainer\", [speedInput]);\n }\n\n private _createPlaybackControls(\n containerWidth: number,\n speed: number,\n component: SequenceComponent,\n configuration: ISequenceConfiguration): vd.VNode {\n\n if (this._mode !== SequenceMode.Playback) {\n return vd.h(\"div.SequencePlayback\", []);\n }\n\n const switchIcon: vd.VNode = vd.h(\"div.SequenceSwitchIcon.SequenceIconVisible\", []);\n const direction: EdgeDirection = configuration.direction === EdgeDirection.Next ?\n EdgeDirection.Prev : EdgeDirection.Next;\n\n const playing: boolean = configuration.playing;\n const switchButtonProperties: vd.createProperties = {\n onclick: (): void => {\n if (!playing) {\n component.setDirection(direction);\n }\n },\n };\n const switchButtonClassName: string = configuration.playing ? \".SequenceSwitchButtonDisabled\" : \".SequenceSwitchButton\";\n const switchButton: vd.VNode = vd.h(\"div\" + switchButtonClassName, switchButtonProperties, [switchIcon]);\n const slowIcon: vd.VNode = vd.h(\"div.SequenceSlowIcon.SequenceIconVisible\", []);\n const slowContainer: vd.VNode = vd.h(\"div.SequenceSlowContainer\", [slowIcon]);\n const fastIcon: vd.VNode = vd.h(\"div.SequenceFastIcon.SequenceIconVisible\", []);\n const fastContainer: vd.VNode = vd.h(\"div.SequenceFastContainer\", [fastIcon]);\n const closeIcon: vd.VNode = vd.h(\"div.SequenceCloseIcon.SequenceIconVisible\", []);\n const closeButtonProperties: vd.createProperties = {\n onclick: (): void => {\n this._mode = SequenceMode.Default;\n this._notifyChanged$.next(this);\n },\n };\n const closeButton: vd.VNode = vd.h(\"div.SequenceCloseButton\", closeButtonProperties, [closeIcon]);\n const speedInput: vd.VNode = this._createSpeedInput(speed);\n\n const playbackChildren: vd.VNode[] = [switchButton, slowContainer, speedInput, fastContainer, closeButton];\n\n const top: number = Math.round(containerWidth / this._stepperDefaultWidth * this._defaultHeight + 10);\n const playbackProperties: vd.createProperties = { style: { top: `${top}px` } };\n\n return vd.h(\"div.SequencePlayback\", playbackProperties, playbackChildren);\n }\n\n private _createPlayingButton(\n nextKey: string,\n prevKey: string,\n configuration: ISequenceConfiguration,\n component: SequenceComponent): vd.VNode {\n\n let canPlay: boolean = configuration.direction === EdgeDirection.Next && nextKey != null ||\n configuration.direction === EdgeDirection.Prev && prevKey != null;\n\n let onclick: (e: Event) => void = configuration.playing ?\n (e: Event): void => { component.stop(); } :\n canPlay ? (e: Event): void => { component.play(); } : null;\n\n let buttonProperties: vd.createProperties = { onclick: onclick };\n\n let iconClass: string = configuration.playing ?\n \"Stop\" :\n canPlay ? \"Play\" : \"PlayDisabled\";\n\n let iconProperties: vd.createProperties = { className: iconClass };\n if (configuration.direction === EdgeDirection.Prev) {\n iconProperties.style = {\n transform: \"rotate(180deg) translate(50%, 50%)\",\n };\n }\n\n let icon: vd.VNode = vd.h(\"div.SequenceComponentIcon\", iconProperties, []);\n\n let buttonClass: string = canPlay ? \"SequencePlay\" : \"SequencePlayDisabled\";\n\n return vd.h(\"div.\" + buttonClass, buttonProperties, [icon]);\n }\n\n private _createSequenceControls(containerWidth: number): vd.VNode {\n const borderRadius: number = Math.round(8 / this._stepperDefaultWidth * containerWidth);\n const expanderProperties: vd.createProperties = {\n onclick: (): void => {\n this._expandControls = !this._expandControls;\n this._mode = SequenceMode.Default;\n this._notifyChanged$.next(this);\n },\n style: {\n \"border-bottom-right-radius\": `${borderRadius}px`,\n \"border-top-right-radius\": `${borderRadius}px`,\n },\n };\n const expanderBar: vd.VNode = vd.h(\"div.SequenceExpanderBar\", []);\n const expander: vd.VNode = vd.h(\"div.SequenceExpanderButton\", expanderProperties, [expanderBar]);\n\n const fastIconClassName: string = this._mode === SequenceMode.Playback ?\n \".SequenceFastIconGrey.SequenceIconVisible\" : \".SequenceFastIcon\";\n const fastIcon: vd.VNode = vd.h(\"div\" + fastIconClassName, []);\n const playbackProperties: vd.createProperties = {\n onclick: (): void => {\n this._mode = this._mode === SequenceMode.Playback ?\n SequenceMode.Default :\n SequenceMode.Playback;\n this._notifyChanged$.next(this);\n },\n };\n\n const playback: vd.VNode = vd.h(\"div.SequencePlaybackButton\", playbackProperties, [fastIcon]);\n\n const timelineIconClassName: string = this._mode === SequenceMode.Timeline ?\n \".SequenceTimelineIconGrey.SequenceIconVisible\" : \".SequenceTimelineIcon\";\n const timelineIcon: vd.VNode = vd.h(\"div\" + timelineIconClassName, []);\n const timelineProperties: vd.createProperties = {\n onclick: (): void => {\n this._mode = this._mode === SequenceMode.Timeline ?\n SequenceMode.Default :\n SequenceMode.Timeline;\n this._notifyChanged$.next(this);\n },\n };\n\n const timeline: vd.VNode = vd.h(\"div.SequenceTimelineButton\", timelineProperties, [timelineIcon]);\n\n const properties: vd.createProperties = {\n style: {\n height: (this._defaultHeight / this._stepperDefaultWidth * containerWidth) + \"px\",\n transform: `translate(${containerWidth / 2 + 2}px, 0)`,\n width: (this._controlsDefaultWidth / this._stepperDefaultWidth * containerWidth) + \"px\",\n },\n };\n\n const className: string = \".SequenceControls\" +\n (this._expandControls ? \".SequenceControlsExpanded\" : \"\");\n\n return vd.h(\"div\" + className, properties, [playback, timeline, expander]);\n }\n\n private _createSequenceArrows(\n nextKey: string,\n prevKey: string,\n containerWidth: number,\n configuration: ISequenceConfiguration,\n navigator: Navigator): vd.VNode[] {\n\n let nextProperties: vd.createProperties = {\n onclick: nextKey != null ?\n (e: Event): void => {\n navigator.moveDir$(EdgeDirection.Next)\n .subscribe(\n undefined,\n (error: Error): void => {\n if (!(error instanceof AbortMapillaryError)) {\n console.error(error);\n }\n });\n } :\n null,\n onmouseenter: (e: MouseEvent): void => { this._mouseEnterDirection$.next(EdgeDirection.Next); },\n onmouseleave: (e: MouseEvent): void => { this._mouseLeaveDirection$.next(EdgeDirection.Next); },\n };\n\n const borderRadius: number = Math.round(8 / this._stepperDefaultWidth * containerWidth);\n let prevProperties: vd.createProperties = {\n onclick: prevKey != null ?\n (e: Event): void => {\n navigator.moveDir$(EdgeDirection.Prev)\n .subscribe(\n undefined,\n (error: Error): void => {\n if (!(error instanceof AbortMapillaryError)) {\n console.error(error);\n }\n });\n } :\n null,\n onmouseenter: (e: MouseEvent): void => { this._mouseEnterDirection$.next(EdgeDirection.Prev); },\n onmouseleave: (e: MouseEvent): void => { this._mouseLeaveDirection$.next(EdgeDirection.Prev); },\n style: {\n \"border-bottom-left-radius\": `${borderRadius}px`,\n \"border-top-left-radius\": `${borderRadius}px`,\n },\n };\n\n let nextClass: string = this._getStepClassName(EdgeDirection.Next, nextKey, configuration.highlightKey);\n let prevClass: string = this._getStepClassName(EdgeDirection.Prev, prevKey, configuration.highlightKey);\n\n let nextIcon: vd.VNode = vd.h(\"div.SequenceComponentIcon\", []);\n let prevIcon: vd.VNode = vd.h(\"div.SequenceComponentIcon\", []);\n\n return [\n vd.h(\"div.\" + prevClass, prevProperties, [prevIcon]),\n vd.h(\"div.\" + nextClass, nextProperties, [nextIcon]),\n ];\n }\n\n private _createStepper(\n edgeStatus: IEdgeStatus,\n configuration: ISequenceConfiguration,\n containerWidth: number,\n component: SequenceComponent,\n navigator: Navigator,\n ): vd.VNode {\n\n let nextKey: string = null;\n let prevKey: string = null;\n\n for (let edge of edgeStatus.edges) {\n if (edge.data.direction === EdgeDirection.Next) {\n nextKey = edge.to;\n }\n\n if (edge.data.direction === EdgeDirection.Prev) {\n prevKey = edge.to;\n }\n }\n\n const playingButton: vd.VNode = this._createPlayingButton(nextKey, prevKey, configuration, component);\n const buttons: vd.VNode[] = this._createSequenceArrows(nextKey, prevKey, containerWidth, configuration, navigator);\n buttons.splice(1, 0, playingButton);\n\n const containerProperties: vd.createProperties = {\n oncontextmenu: (event: MouseEvent): void => { event.preventDefault(); },\n style: {\n height: (this._defaultHeight / this._stepperDefaultWidth * containerWidth) + \"px\",\n width: containerWidth + \"px\",\n },\n };\n\n return vd.h(\"div.SequenceStepper\", containerProperties, buttons);\n }\n\n private _createTimelineControls(containerWidth: number, index: number, max: number): vd.VNode {\n if (this._mode !== SequenceMode.Timeline) {\n return vd.h(\"div.SequenceTimeline\", []);\n }\n\n const positionInput: vd.VNode = this._createPositionInput(index, max);\n\n const closeIcon: vd.VNode = vd.h(\"div.SequenceCloseIcon.SequenceIconVisible\", []);\n const closeButtonProperties: vd.createProperties = {\n onclick: (): void => {\n this._mode = SequenceMode.Default;\n this._notifyChanged$.next(this);\n },\n };\n\n const closeButton: vd.VNode = vd.h(\"div.SequenceCloseButton\", closeButtonProperties, [closeIcon]);\n\n const top: number = Math.round(containerWidth / this._stepperDefaultWidth * this._defaultHeight + 10);\n const playbackProperties: vd.createProperties = { style: { top: `${top}px` } };\n\n return vd.h(\"div.SequenceTimeline\", playbackProperties, [positionInput, closeButton]);\n }\n\n private _getStepClassName(direction: EdgeDirection, key: string, highlightKey: string): string {\n let className: string = direction === EdgeDirection.Next ?\n \"SequenceStepNext\" :\n \"SequenceStepPrev\";\n\n if (key == null) {\n className += \"Disabled\";\n } else {\n if (highlightKey === key) {\n className += \"Highlight\";\n }\n }\n\n return className;\n }\n\n private _setChangingPosition(value: boolean): void {\n this._changingPosition = value;\n this._notifyChangingPositionChanged$.next(value);\n }\n}\n\nexport default SequenceDOMRenderer;\n",
+ "export enum SequenceMode {\n Default,\n Playback,\n Timeline,\n}\n\nexport default SequenceMode;\n",
+ "import * as fs from \"fs\";\nimport * as path from \"path\";\n\nimport {IShader} from \"../../Component\";\n\nexport class Shaders {\n public static equirectangular: IShader = {\n fragment: fs.readFileSync(path.join(__dirname, \"./equirectangular.fragment.glsl\"), \"utf8\"),\n vertex: fs.readFileSync(path.join(__dirname, \"./equirectangular.vertex.glsl\"), \"utf8\"),\n };\n\n public static equirectangularCurtain: IShader = {\n fragment: fs.readFileSync(path.join(__dirname, \"./equirectangular_curtain.fragment.glsl\"), \"utf8\"),\n vertex: fs.readFileSync(path.join(__dirname, \"./equirectangular_curtain.vertex.glsl\"), \"utf8\"),\n };\n\n public static perspective: IShader = {\n fragment: fs.readFileSync(path.join(__dirname, \"./perspective.fragment.glsl\"), \"utf8\"),\n vertex: fs.readFileSync(path.join(__dirname, \"./perspective.vertex.glsl\"), \"utf8\"),\n };\n\n public static perspectiveCurtain: IShader = {\n fragment: fs.readFileSync(path.join(__dirname, \"./perspective_curtain.fragment.glsl\"), \"utf8\"),\n vertex: fs.readFileSync(path.join(__dirname, \"./perspective_curtain.vertex.glsl\"), \"utf8\"),\n };\n\n public static fisheye: IShader = {\n fragment: fs.readFileSync(path.join(__dirname, \"./fisheye.fragment.glsl\"), \"utf8\"),\n vertex: fs.readFileSync(path.join(__dirname, \"./fisheye.vertex.glsl\"), \"utf8\"),\n };\n\n public static fisheyeCurtain: IShader = {\n fragment: fs.readFileSync(path.join(__dirname, \"./fisheye_curtain.fragment.glsl\"), \"utf8\"),\n vertex: fs.readFileSync(path.join(__dirname, \"./fisheye_curtain.vertex.glsl\"), \"utf8\"),\n };\n\n public static perspectiveDistorted: IShader = {\n fragment: fs.readFileSync(path.join(__dirname, \"./perspective_distorted.fragment.glsl\"), \"utf8\"),\n vertex: fs.readFileSync(path.join(__dirname, \"./perspective_distorted.vertex.glsl\"), \"utf8\"),\n };\n\n public static perspectiveDistortedCurtain: IShader = {\n fragment: fs.readFileSync(path.join(__dirname, \"./perspective_distorted_curtain.fragment.glsl\"), \"utf8\"),\n vertex: fs.readFileSync(path.join(__dirname, \"./perspective_distorted_curtain.vertex.glsl\"), \"utf8\"),\n };\n}\n",
+ "import {\n concat as observableConcat,\n of as observableOf,\n zip as observableZip,\n combineLatest as observableCombineLatest,\n empty as observableEmpty,\n Observable,\n Subscription,\n Subject,\n} from \"rxjs\";\n\nimport {\n publishReplay,\n pairwise,\n catchError,\n takeUntil,\n publish,\n skipWhile,\n scan,\n filter,\n debounceTime,\n startWith,\n map,\n switchMap,\n withLatestFrom,\n refCount,\n first,\n distinctUntilChanged,\n} from \"rxjs/operators\";\n\nimport * as THREE from \"three\";\n\nimport {\n ISliderNodes,\n ISliderCombination,\n IGLRendererOperation,\n PositionLookat,\n} from \"./interfaces/interfaces\";\n\nimport {\n Component,\n ComponentService,\n ISliderConfiguration,\n ISliderKeys,\n SliderDOMRenderer,\n SliderGLRenderer,\n SliderMode,\n} from \"../../Component\";\nimport {\n Spatial,\n Transform,\n ViewportCoords,\n} from \"../../Geo\";\nimport { Node } from \"../../Graph\";\nimport {\n ICurrentState,\n IFrame,\n State,\n} from \"../../State\";\nimport {\n Container,\n ImageSize,\n Navigator,\n} from \"../../Viewer\";\nimport {\n GLRenderStage,\n IGLRenderHash,\n ISize,\n IVNodeHash,\n RenderCamera,\n} from \"../../Render\";\nimport {\n IBoundingBox,\n ImageTileLoader,\n ImageTileStore,\n IRegionOfInterest,\n RegionOfInterestCalculator,\n TextureProvider,\n} from \"../../Tiles\";\nimport {\n Settings,\n Urls,\n} from \"../../Utils\";\n\n/**\n * @class SliderComponent\n *\n * @classdesc Component for comparing pairs of images. Renders\n * a slider for adjusting the curtain of the first image.\n *\n * Deactivate the sequence, direction and image plane\n * components when activating the slider component to avoid\n * interfering UI elements.\n *\n * To retrive and use the slider component\n *\n * @example\n * ```\n * var viewer = new Mapillary.Viewer(\n * \"<element-id>\",\n * \"<client-id>\",\n * \"<my key>\");\n *\n * viewer.deactivateComponent(\"imagePlane\");\n * viewer.deactivateComponent(\"direction\");\n * viewer.deactivateComponent(\"sequence\");\n *\n * viewer.activateComponent(\"slider\");\n *\n * var sliderComponent = viewer.getComponent(\"slider\");\n * ```\n */\nexport class SliderComponent extends Component<ISliderConfiguration> {\n public static componentName: string = \"slider\";\n\n private _viewportCoords: ViewportCoords;\n private _domRenderer: SliderDOMRenderer;\n private _imageTileLoader: ImageTileLoader;\n private _roiCalculator: RegionOfInterestCalculator;\n private _spatial: Spatial;\n\n private _glRendererOperation$: Subject<IGLRendererOperation>;\n private _glRenderer$: Observable<SliderGLRenderer>;\n private _glRendererCreator$: Subject<void>;\n private _glRendererDisposer$: Subject<void>;\n\n private _setKeysSubscription: Subscription;\n\n private _modeSubcription: Subscription;\n private _stateSubscription: Subscription;\n private _glRenderSubscription: Subscription;\n private _domRenderSubscription: Subscription;\n private _moveSubscription: Subscription;\n private _updateCurtainSubscription: Subscription;\n private _waitSubscription: Subscription;\n\n private _textureProviderSubscription: Subscription;\n private _setTextureProviderSubscription: Subscription;\n private _setTileSizeSubscription: Subscription;\n private _abortTextureProviderSubscription: Subscription;\n private _setRegionOfInterestSubscription: Subscription;\n private _hasTextureSubscription: Subscription;\n private _updateBackgroundSubscription: Subscription;\n private _updateTextureImageSubscription: Subscription;\n\n private _textureProviderSubscriptionPrev: Subscription;\n private _setTextureProviderSubscriptionPrev: Subscription;\n private _setTileSizeSubscriptionPrev: Subscription;\n private _abortTextureProviderSubscriptionPrev: Subscription;\n private _setRegionOfInterestSubscriptionPrev: Subscription;\n private _hasTextureSubscriptionPrev: Subscription;\n private _updateBackgroundSubscriptionPrev: Subscription;\n private _updateTextureImageSubscriptionPrev: Subscription;\n\n /** @ignore */\n constructor (name: string, container: Container, navigator: Navigator, viewportCoords?: ViewportCoords) {\n super(name, container, navigator);\n\n this._viewportCoords = !!viewportCoords ? viewportCoords : new ViewportCoords();\n this._domRenderer = new SliderDOMRenderer(container);\n this._imageTileLoader = new ImageTileLoader(Urls.tileScheme, Urls.tileDomain, Urls.origin);\n this._roiCalculator = new RegionOfInterestCalculator();\n this._spatial = new Spatial();\n\n this._glRendererOperation$ = new Subject<IGLRendererOperation>();\n this._glRendererCreator$ = new Subject<void>();\n this._glRendererDisposer$ = new Subject<void>();\n\n this._glRenderer$ = this._glRendererOperation$.pipe(\n scan(\n (glRenderer: SliderGLRenderer, operation: IGLRendererOperation): SliderGLRenderer => {\n return operation(glRenderer);\n },\n null),\n filter(\n (glRenderer: SliderGLRenderer): boolean => {\n return glRenderer != null;\n }),\n distinctUntilChanged(\n undefined,\n (glRenderer: SliderGLRenderer): number => {\n return glRenderer.frameId;\n }));\n\n this._glRendererCreator$.pipe(\n map(\n (): IGLRendererOperation => {\n return (glRenderer: SliderGLRenderer): SliderGLRenderer => {\n if (glRenderer != null) {\n throw new Error(\"Multiple slider states can not be created at the same time\");\n }\n\n return new SliderGLRenderer();\n };\n }))\n .subscribe(this._glRendererOperation$);\n\n this._glRendererDisposer$.pipe(\n map(\n (): IGLRendererOperation => {\n return (glRenderer: SliderGLRenderer): SliderGLRenderer => {\n glRenderer.dispose();\n\n return null;\n };\n }))\n .subscribe(this._glRendererOperation$);\n }\n\n /**\n * Set the initial position.\n *\n * @description Configures the intial position of the slider.\n * The inital position value will be used when the component\n * is activated.\n *\n * @param {number} initialPosition - Initial slider position.\n */\n public setInitialPosition(initialPosition: number): void {\n this.configure({ initialPosition: initialPosition });\n }\n\n /**\n * Set the image keys.\n *\n * @description Configures the component to show the image\n * planes for the supplied image keys.\n *\n * @param {ISliderKeys} keys - Slider keys object specifying\n * the images to be shown in the foreground and the background.\n */\n public setKeys(keys: ISliderKeys): void {\n this.configure({ keys: keys });\n }\n\n /**\n * Set the slider mode.\n *\n * @description Configures the mode for transitions between\n * image pairs.\n *\n * @param {SliderMode} mode - Slider mode to be set.\n */\n public setSliderMode(mode: SliderMode): void {\n this.configure({ mode: mode });\n }\n\n /**\n * Set the value controlling if the slider is visible.\n *\n * @param {boolean} sliderVisible - Value indicating if\n * the slider should be visible or not.\n */\n public setSliderVisible(sliderVisible: boolean): void {\n this.configure({ sliderVisible: sliderVisible });\n }\n\n protected _activate(): void {\n this._modeSubcription = this._domRenderer.mode$\n .subscribe(\n (mode: SliderMode): void => {\n this.setSliderMode(mode);\n });\n\n this._glRenderSubscription = this._glRenderer$.pipe(\n map(\n (glRenderer: SliderGLRenderer): IGLRenderHash => {\n let renderHash: IGLRenderHash = {\n name: this._name,\n render: {\n frameId: glRenderer.frameId,\n needsRender: glRenderer.needsRender,\n render: glRenderer.render.bind(glRenderer),\n stage: GLRenderStage.Background,\n },\n };\n\n return renderHash;\n }))\n .subscribe(this._container.glRenderer.render$);\n\n const position$: Observable<number> = observableConcat(\n this.configuration$.pipe(\n map(\n (configuration: ISliderConfiguration): number => {\n return configuration.initialPosition != null ?\n configuration.initialPosition : 1;\n }),\n first()),\n this._domRenderer.position$);\n\n const mode$: Observable<SliderMode> = this.configuration$.pipe(\n map(\n (configuration: ISliderConfiguration): SliderMode => {\n return configuration.mode;\n }),\n distinctUntilChanged());\n\n const motionless$: Observable<boolean> = this._navigator.stateService.currentState$.pipe(\n map(\n (frame: IFrame): boolean => {\n return frame.state.motionless;\n }),\n distinctUntilChanged());\n\n const fullPano$: Observable<boolean> = this._navigator.stateService.currentState$.pipe(\n map(\n (frame: IFrame): boolean => {\n return frame.state.currentNode.fullPano;\n }),\n distinctUntilChanged());\n\n const sliderVisible$: Observable<boolean> = observableCombineLatest(\n this._configuration$.pipe(\n map(\n (configuration: ISliderConfiguration): boolean => {\n return configuration.sliderVisible;\n })),\n this._navigator.stateService.currentState$.pipe(\n map(\n (frame: IFrame): boolean => {\n return !(frame.state.currentNode == null ||\n frame.state.previousNode == null ||\n (frame.state.currentNode.pano && !frame.state.currentNode.fullPano) ||\n (frame.state.previousNode.pano && !frame.state.previousNode.fullPano) ||\n (frame.state.currentNode.fullPano && !frame.state.previousNode.fullPano));\n }),\n distinctUntilChanged())).pipe(\n map(\n ([sliderVisible, enabledState]: [boolean, boolean]): boolean => {\n return sliderVisible && enabledState;\n }),\n distinctUntilChanged());\n\n this._waitSubscription = observableCombineLatest(\n mode$,\n motionless$,\n fullPano$,\n sliderVisible$).pipe(\n withLatestFrom(this._navigator.stateService.state$))\n .subscribe(\n ([[mode, motionless, fullPano, sliderVisible], state]: [[SliderMode, boolean, boolean, boolean], State]): void => {\n const interactive: boolean = sliderVisible &&\n (motionless || mode === SliderMode.Stationary || fullPano);\n\n if (interactive && state !== State.WaitingInteractively) {\n this._navigator.stateService.waitInteractively();\n } else if (!interactive && state !== State.Waiting) {\n this._navigator.stateService.wait();\n }\n });\n\n this._moveSubscription = observableCombineLatest(\n position$,\n mode$,\n motionless$,\n fullPano$,\n sliderVisible$)\n .subscribe(\n ([position, mode, motionless, fullPano, sliderVisible]: [number, SliderMode, boolean, boolean, boolean]): void => {\n if (motionless || mode === SliderMode.Stationary || fullPano) {\n this._navigator.stateService.moveTo(1);\n } else {\n this._navigator.stateService.moveTo(position);\n }\n });\n\n this._domRenderSubscription = observableCombineLatest(\n position$,\n mode$,\n motionless$,\n fullPano$,\n sliderVisible$,\n this._container.renderService.size$).pipe(\n map(\n ([position, mode, motionless, fullPano, sliderVisible, size]:\n [number, SliderMode, boolean, boolean, boolean, ISize]): IVNodeHash => {\n return {\n name: this._name,\n vnode: this._domRenderer.render(position, mode, motionless, fullPano, sliderVisible),\n };\n }))\n .subscribe(this._container.domRenderer.render$);\n\n this._glRendererCreator$.next(null);\n\n this._updateCurtainSubscription = observableCombineLatest(\n position$,\n fullPano$,\n sliderVisible$,\n this._container.renderService.renderCamera$,\n this._navigator.stateService.currentTransform$).pipe(\n map(\n ([position, fullPano, visible, render, transform]: [number, boolean, boolean, RenderCamera, Transform]): number => {\n if (!fullPano) {\n return visible ? position : 1;\n }\n\n const basicMin: number[] = this._viewportCoords.viewportToBasic(-1.15, 0, transform, render.perspective);\n const basicMax: number[] = this._viewportCoords.viewportToBasic(1.15, 0, transform, render.perspective);\n\n const shiftedMax: number = basicMax[0] < basicMin[0] ? basicMax[0] + 1 : basicMax[0];\n const basicPosition: number = basicMin[0] + position * (shiftedMax - basicMin[0]);\n\n return basicPosition > 1 ? basicPosition - 1 : basicPosition;\n }),\n map(\n (position: number): IGLRendererOperation => {\n return (glRenderer: SliderGLRenderer): SliderGLRenderer => {\n glRenderer.updateCurtain(position);\n\n return glRenderer;\n };\n }))\n .subscribe(this._glRendererOperation$);\n\n this._stateSubscription = observableCombineLatest(\n this._navigator.stateService.currentState$,\n mode$).pipe(\n map(\n ([frame, mode]: [IFrame, SliderMode]): IGLRendererOperation => {\n return (glRenderer: SliderGLRenderer): SliderGLRenderer => {\n glRenderer.update(frame, mode);\n\n return glRenderer;\n };\n }))\n .subscribe(this._glRendererOperation$);\n\n this._setKeysSubscription = this._configuration$.pipe(\n filter(\n (configuration: ISliderConfiguration): boolean => {\n return configuration.keys != null;\n }),\n switchMap(\n (configuration: ISliderConfiguration): Observable<ISliderCombination> => {\n return observableZip(\n observableZip(\n this._catchCacheNode$(configuration.keys.background),\n this._catchCacheNode$(configuration.keys.foreground)).pipe(\n map(\n (nodes: [Node, Node]): ISliderNodes => {\n return { background: nodes[0], foreground: nodes[1] };\n })),\n this._navigator.stateService.currentState$.pipe(first())).pipe(\n map(\n (nf: [ISliderNodes, IFrame]): ISliderCombination => {\n return { nodes: nf[0], state: nf[1].state };\n }));\n }))\n .subscribe(\n (co: ISliderCombination): void => {\n if (co.state.currentNode != null &&\n co.state.previousNode != null &&\n co.state.currentNode.key === co.nodes.foreground.key &&\n co.state.previousNode.key === co.nodes.background.key) {\n return;\n }\n\n if (co.state.currentNode.key === co.nodes.background.key) {\n this._navigator.stateService.setNodes([co.nodes.foreground]);\n return;\n }\n\n if (co.state.currentNode.key === co.nodes.foreground.key &&\n co.state.trajectory.length === 1) {\n this._navigator.stateService.prependNodes([co.nodes.background]);\n return;\n }\n\n this._navigator.stateService.setNodes([co.nodes.background]);\n this._navigator.stateService.setNodes([co.nodes.foreground]);\n },\n (e: Error): void => {\n console.error(e);\n });\n\n let previousNode$: Observable<Node> = this._navigator.stateService.currentState$.pipe(\n map(\n (frame: IFrame): Node => {\n return frame.state.previousNode;\n }),\n filter(\n (node: Node): boolean => {\n return node != null;\n }),\n distinctUntilChanged(\n undefined,\n (node: Node): string => {\n return node.key;\n }));\n\n const textureProvider$: Observable<TextureProvider> = this._navigator.stateService.currentState$.pipe(\n distinctUntilChanged(\n undefined,\n (frame: IFrame): string => {\n return frame.state.currentNode.key;\n }),\n withLatestFrom(\n this._container.glRenderer.webGLRenderer$,\n this._container.renderService.size$),\n map(\n ([frame, renderer, size]: [IFrame, THREE.WebGLRenderer, ISize]): TextureProvider => {\n const state: ICurrentState = frame.state;\n const viewportSize: number = Math.max(size.width, size.height);\n\n const currentNode: Node = state.currentNode;\n const currentTransform: Transform = state.currentTransform;\n const tileSize: number = viewportSize > 2048 ? 2048 : viewportSize > 1024 ? 1024 : 512;\n\n return new TextureProvider(\n currentNode.key,\n currentTransform.basicWidth,\n currentTransform.basicHeight,\n tileSize,\n currentNode.image,\n this._imageTileLoader,\n new ImageTileStore(),\n renderer);\n }),\n publishReplay(1),\n refCount());\n\n this._textureProviderSubscription = textureProvider$.subscribe(() => { /*noop*/ });\n\n this._setTextureProviderSubscription = textureProvider$.pipe(\n map(\n (provider: TextureProvider): IGLRendererOperation => {\n return (renderer: SliderGLRenderer): SliderGLRenderer => {\n renderer.setTextureProvider(provider.key, provider);\n\n return renderer;\n };\n }))\n .subscribe(this._glRendererOperation$);\n\n this._setTileSizeSubscription = this._container.renderService.size$.pipe(\n switchMap(\n (size: ISize): Observable<[TextureProvider, ISize]> => {\n return observableCombineLatest(\n textureProvider$,\n observableOf<ISize>(size)).pipe(\n first());\n }))\n .subscribe(\n ([provider, size]: [TextureProvider, ISize]): void => {\n let viewportSize: number = Math.max(size.width, size.height);\n let tileSize: number = viewportSize > 2048 ? 2048 : viewportSize > 1024 ? 1024 : 512;\n\n provider.setTileSize(tileSize);\n });\n\n this._abortTextureProviderSubscription = textureProvider$.pipe(\n pairwise())\n .subscribe(\n (pair: [TextureProvider, TextureProvider]): void => {\n let previous: TextureProvider = pair[0];\n previous.abort();\n });\n\n let roiTrigger$: Observable<[RenderCamera, ISize, Transform]> = observableCombineLatest(\n this._container.renderService.renderCameraFrame$,\n this._container.renderService.size$.pipe(debounceTime(250))).pipe(\n map(\n ([camera, size]: [RenderCamera, ISize]): PositionLookat => {\n return [\n camera.camera.position.clone(),\n camera.camera.lookat.clone(),\n camera.zoom.valueOf(),\n size.height.valueOf(),\n size.width.valueOf()];\n }),\n pairwise(),\n skipWhile(\n (pls: [PositionLookat, PositionLookat]): boolean => {\n return pls[1][2] - pls[0][2] < 0 || pls[1][2] === 0;\n }),\n map(\n (pls: [PositionLookat, PositionLookat]): boolean => {\n let samePosition: boolean = pls[0][0].equals(pls[1][0]);\n let sameLookat: boolean = pls[0][1].equals(pls[1][1]);\n let sameZoom: boolean = pls[0][2] === pls[1][2];\n let sameHeight: boolean = pls[0][3] === pls[1][3];\n let sameWidth: boolean = pls[0][4] === pls[1][4];\n\n return samePosition && sameLookat && sameZoom && sameHeight && sameWidth;\n }),\n distinctUntilChanged(),\n filter(\n (stalled: boolean): boolean => {\n return stalled;\n }),\n switchMap(\n (stalled: boolean): Observable<RenderCamera> => {\n return this._container.renderService.renderCameraFrame$.pipe(\n first());\n }),\n withLatestFrom(\n this._container.renderService.size$,\n this._navigator.stateService.currentTransform$));\n\n this._setRegionOfInterestSubscription = textureProvider$.pipe(\n switchMap(\n (provider: TextureProvider): Observable<[IRegionOfInterest, TextureProvider]> => {\n return roiTrigger$.pipe(\n map(\n ([camera, size, transform]: [RenderCamera, ISize, Transform]):\n [IRegionOfInterest, TextureProvider] => {\n return [\n this._roiCalculator.computeRegionOfInterest(camera, size, transform),\n provider,\n ];\n }));\n }),\n filter(\n (args: [IRegionOfInterest, TextureProvider]): boolean => {\n return !args[1].disposed;\n }))\n .subscribe(\n (args: [IRegionOfInterest, TextureProvider]): void => {\n let roi: IRegionOfInterest = args[0];\n let provider: TextureProvider = args[1];\n\n provider.setRegionOfInterest(roi);\n });\n\n let hasTexture$: Observable<boolean> = textureProvider$.pipe(\n switchMap(\n (provider: TextureProvider): Observable<boolean> => {\n return provider.hasTexture$;\n }),\n startWith(false),\n publishReplay(1),\n refCount());\n\n this._hasTextureSubscription = hasTexture$.subscribe(() => { /*noop*/ });\n\n let nodeImage$: Observable<[HTMLImageElement, Node]> = this._navigator.stateService.currentState$.pipe(\n filter(\n (frame: IFrame): boolean => {\n return frame.state.nodesAhead === 0;\n }),\n map(\n (frame: IFrame): Node => {\n return frame.state.currentNode;\n }),\n distinctUntilChanged(\n undefined,\n (node: Node): string => {\n return node.key;\n }),\n debounceTime(1000),\n withLatestFrom(hasTexture$),\n filter(\n (args: [Node, boolean]): boolean => {\n return !args[1];\n }),\n map(\n (args: [Node, boolean]): Node => {\n return args[0];\n }),\n filter(\n (node: Node): boolean => {\n return node.pano ?\n Settings.maxImageSize > Settings.basePanoramaSize :\n Settings.maxImageSize > Settings.baseImageSize;\n }),\n switchMap(\n (node: Node): Observable<[HTMLImageElement, Node]> => {\n let baseImageSize: ImageSize = node.pano ?\n Settings.basePanoramaSize :\n Settings.baseImageSize;\n\n if (Math.max(node.image.width, node.image.height) > baseImageSize) {\n return observableEmpty();\n }\n\n let image$: Observable<[HTMLImageElement, Node]> = node\n .cacheImage$(Settings.maxImageSize).pipe(\n map(\n (n: Node): [HTMLImageElement, Node] => {\n return [n.image, n];\n }));\n\n return image$.pipe(\n takeUntil(\n hasTexture$.pipe(\n filter(\n (hasTexture: boolean): boolean => {\n\n return hasTexture;\n }))),\n catchError(\n (error: Error, caught: Observable<[HTMLImageElement, Node]>):\n Observable<[HTMLImageElement, Node]> => {\n console.error(`Failed to fetch high res image (${node.key})`, error);\n\n return observableEmpty();\n }));\n })).pipe(\n publish(),\n refCount());\n\n this._updateBackgroundSubscription = nodeImage$.pipe(\n withLatestFrom(textureProvider$))\n .subscribe(\n (args: [[HTMLImageElement, Node], TextureProvider]): void => {\n if (args[0][1].key !== args[1].key ||\n args[1].disposed) {\n return;\n }\n\n args[1].updateBackground(args[0][0]);\n });\n\n this._updateTextureImageSubscription = nodeImage$.pipe(\n map(\n (imn: [HTMLImageElement, Node]): IGLRendererOperation => {\n return (renderer: SliderGLRenderer): SliderGLRenderer => {\n renderer.updateTextureImage(imn[0], imn[1]);\n\n return renderer;\n };\n }))\n .subscribe(this._glRendererOperation$);\n\n const textureProviderPrev$: Observable<TextureProvider> = this._navigator.stateService.currentState$.pipe(\n filter(\n (frame: IFrame): boolean => {\n return !!frame.state.previousNode;\n }),\n distinctUntilChanged(\n undefined,\n (frame: IFrame): string => {\n return frame.state.previousNode.key;\n }),\n withLatestFrom(\n this._container.glRenderer.webGLRenderer$,\n this._container.renderService.size$),\n map(\n ([frame, renderer, size]: [IFrame, THREE.WebGLRenderer, ISize]): TextureProvider => {\n const state: ICurrentState = frame.state;\n const viewportSize: number = Math.max(size.width, size.height);\n\n const previousNode: Node = state.previousNode;\n const previousTransform: Transform = state.previousTransform;\n const tileSize: number = viewportSize > 2048 ? 2048 : viewportSize > 1024 ? 1024 : 512;\n\n return new TextureProvider(\n previousNode.key,\n previousTransform.basicWidth,\n previousTransform.basicHeight,\n tileSize,\n previousNode.image,\n this._imageTileLoader,\n new ImageTileStore(),\n renderer);\n }),\n publishReplay(1),\n refCount());\n\n this._textureProviderSubscriptionPrev = textureProviderPrev$.subscribe(() => { /*noop*/ });\n\n this._setTextureProviderSubscriptionPrev = textureProviderPrev$.pipe(\n map(\n (provider: TextureProvider): IGLRendererOperation => {\n return (renderer: SliderGLRenderer): SliderGLRenderer => {\n renderer.setTextureProviderPrev(provider.key, provider);\n\n return renderer;\n };\n }))\n .subscribe(this._glRendererOperation$);\n\n this._setTileSizeSubscriptionPrev = this._container.renderService.size$.pipe(\n switchMap(\n (size: ISize): Observable<[TextureProvider, ISize]> => {\n return observableCombineLatest(\n textureProviderPrev$,\n observableOf<ISize>(size)).pipe(\n first());\n }))\n .subscribe(\n ([provider, size]: [TextureProvider, ISize]): void => {\n let viewportSize: number = Math.max(size.width, size.height);\n let tileSize: number = viewportSize > 2048 ? 2048 : viewportSize > 1024 ? 1024 : 512;\n\n provider.setTileSize(tileSize);\n });\n\n this._abortTextureProviderSubscriptionPrev = textureProviderPrev$.pipe(\n pairwise())\n .subscribe(\n (pair: [TextureProvider, TextureProvider]): void => {\n let previous: TextureProvider = pair[0];\n previous.abort();\n });\n\n let roiTriggerPrev$: Observable<[RenderCamera, ISize, Transform]> = observableCombineLatest(\n this._container.renderService.renderCameraFrame$,\n this._container.renderService.size$.pipe(debounceTime(250))).pipe(\n map(\n ([camera, size]: [RenderCamera, ISize]): PositionLookat => {\n return [\n camera.camera.position.clone(),\n camera.camera.lookat.clone(),\n camera.zoom.valueOf(),\n size.height.valueOf(),\n size.width.valueOf()];\n }),\n pairwise(),\n skipWhile(\n (pls: [PositionLookat, PositionLookat]): boolean => {\n return pls[1][2] - pls[0][2] < 0 || pls[1][2] === 0;\n }),\n map(\n (pls: [PositionLookat, PositionLookat]): boolean => {\n let samePosition: boolean = pls[0][0].equals(pls[1][0]);\n let sameLookat: boolean = pls[0][1].equals(pls[1][1]);\n let sameZoom: boolean = pls[0][2] === pls[1][2];\n let sameHeight: boolean = pls[0][3] === pls[1][3];\n let sameWidth: boolean = pls[0][4] === pls[1][4];\n\n return samePosition && sameLookat && sameZoom && sameHeight && sameWidth;\n }),\n distinctUntilChanged(),\n filter(\n (stalled: boolean): boolean => {\n return stalled;\n }),\n switchMap(\n (stalled: boolean): Observable<RenderCamera> => {\n return this._container.renderService.renderCameraFrame$.pipe(\n first());\n }),\n withLatestFrom(\n this._container.renderService.size$,\n this._navigator.stateService.currentTransform$));\n\n this._setRegionOfInterestSubscriptionPrev = textureProviderPrev$.pipe(\n switchMap(\n (provider: TextureProvider): Observable<[IRegionOfInterest, TextureProvider]> => {\n return roiTriggerPrev$.pipe(\n map(\n ([camera, size, transform]: [RenderCamera, ISize, Transform]):\n [IRegionOfInterest, TextureProvider] => {\n return [\n this._roiCalculator.computeRegionOfInterest(camera, size, transform),\n provider,\n ];\n }));\n }),\n filter(\n (args: [IRegionOfInterest, TextureProvider]): boolean => {\n return !args[1].disposed;\n }),\n withLatestFrom(this._navigator.stateService.currentState$))\n .subscribe(\n ([[roi, provider], frame]: [[IRegionOfInterest, TextureProvider], IFrame]): void => {\n let shiftedRoi: IRegionOfInterest = null;\n\n if (frame.state.previousNode.fullPano) {\n if (frame.state.currentNode.fullPano) {\n const currentViewingDirection: THREE.Vector3 =\n this._spatial.viewingDirection(frame.state.currentNode.rotation);\n const previousViewingDirection: THREE.Vector3 =\n this._spatial.viewingDirection(frame.state.previousNode.rotation);\n\n const directionDiff: number = this._spatial.angleBetweenVector2(\n currentViewingDirection.x,\n currentViewingDirection.y,\n previousViewingDirection.x,\n previousViewingDirection.y);\n\n const shift: number = directionDiff / (2 * Math.PI);\n\n const bbox: IBoundingBox = {\n maxX: this._spatial.wrap(roi.bbox.maxX + shift, 0, 1),\n maxY: roi.bbox.maxY,\n minX: this._spatial.wrap(roi.bbox.minX + shift, 0, 1),\n minY: roi.bbox.minY,\n };\n\n shiftedRoi = {\n bbox: bbox,\n pixelHeight: roi.pixelHeight,\n pixelWidth: roi.pixelWidth,\n };\n } else {\n const currentViewingDirection: THREE.Vector3 =\n this._spatial.viewingDirection(frame.state.currentNode.rotation);\n const previousViewingDirection: THREE.Vector3 =\n this._spatial.viewingDirection(frame.state.previousNode.rotation);\n\n const directionDiff: number = this._spatial.angleBetweenVector2(\n currentViewingDirection.x,\n currentViewingDirection.y,\n previousViewingDirection.x,\n previousViewingDirection.y);\n\n const shiftX: number = directionDiff / (2 * Math.PI);\n\n const a1: number = this._spatial.angleToPlane(currentViewingDirection.toArray(), [0, 0, 1]);\n const a2: number = this._spatial.angleToPlane(previousViewingDirection.toArray(), [0, 0, 1]);\n\n const shiftY: number = (a2 - a1) / (2 * Math.PI);\n\n const currentTransform: Transform = frame.state.currentTransform;\n const size: number = Math.max(currentTransform.basicWidth, currentTransform.basicHeight);\n const hFov: number = size > 0 ?\n 2 * Math.atan(0.5 * currentTransform.basicWidth / (size * currentTransform.focal)) :\n Math.PI / 3;\n const vFov: number = size > 0 ?\n 2 * Math.atan(0.5 * currentTransform.basicHeight / (size * currentTransform.focal)) :\n Math.PI / 3;\n\n const spanningWidth: number = hFov / (2 * Math.PI);\n const spanningHeight: number = vFov / Math.PI;\n\n const basicWidth: number = (roi.bbox.maxX - roi.bbox.minX) * spanningWidth;\n const basicHeight: number = (roi.bbox.maxY - roi.bbox.minY) * spanningHeight;\n\n const pixelWidth: number = roi.pixelWidth * spanningWidth;\n const pixelHeight: number = roi.pixelHeight * spanningHeight;\n\n const zoomShiftX: number = (roi.bbox.minX + roi.bbox.maxX) / 2 - 0.5;\n const zoomShiftY: number = (roi.bbox.minY + roi.bbox.maxY) / 2 - 0.5;\n\n const minX: number = 0.5 + shiftX + spanningWidth * zoomShiftX - basicWidth / 2;\n const maxX: number = 0.5 + shiftX + spanningWidth * zoomShiftX + basicWidth / 2;\n const minY: number = 0.5 + shiftY + spanningHeight * zoomShiftY - basicHeight / 2;\n const maxY: number = 0.5 + shiftY + spanningHeight * zoomShiftY + basicHeight / 2;\n\n const bbox: IBoundingBox = {\n maxX: this._spatial.wrap(maxX, 0, 1),\n maxY: maxY,\n minX: this._spatial.wrap(minX, 0, 1),\n minY: minY,\n };\n\n shiftedRoi = {\n bbox: bbox,\n pixelHeight: pixelHeight,\n pixelWidth: pixelWidth,\n };\n }\n } else {\n const currentBasicAspect: number = frame.state.currentTransform.basicAspect;\n const previousBasicAspect: number = frame.state.previousTransform.basicAspect;\n\n const [[cornerMinX, cornerMinY], [cornerMaxX, cornerMaxY]]: number[][] =\n this._getBasicCorners(currentBasicAspect, previousBasicAspect);\n\n const basicWidth: number = cornerMaxX - cornerMinX;\n const basicHeight: number = cornerMaxY - cornerMinY;\n\n const pixelWidth: number = roi.pixelWidth / basicWidth;\n const pixelHeight: number = roi.pixelHeight / basicHeight;\n\n const minX: number = (basicWidth - 1) / (2 * basicWidth) + roi.bbox.minX / basicWidth;\n const maxX: number = (basicWidth - 1) / (2 * basicWidth) + roi.bbox.maxX / basicWidth;\n const minY: number = (basicHeight - 1) / (2 * basicHeight) + roi.bbox.minY / basicHeight;\n const maxY: number = (basicHeight - 1) / (2 * basicHeight) + roi.bbox.maxY / basicHeight;\n\n const bbox: IBoundingBox = {\n maxX: maxX,\n maxY: maxY,\n minX: minX,\n minY: minY,\n };\n\n this._clipBoundingBox(bbox);\n\n shiftedRoi = {\n bbox: bbox,\n pixelHeight: pixelHeight,\n pixelWidth: pixelWidth,\n };\n }\n\n provider.setRegionOfInterest(shiftedRoi);\n });\n\n let hasTexturePrev$: Observable<boolean> = textureProviderPrev$.pipe(\n switchMap(\n (provider: TextureProvider): Observable<boolean> => {\n return provider.hasTexture$;\n }),\n startWith(false),\n publishReplay(1),\n refCount());\n\n this._hasTextureSubscriptionPrev = hasTexturePrev$.subscribe(() => { /*noop*/ });\n\n let nodeImagePrev$: Observable<[HTMLImageElement, Node]> = this._navigator.stateService.currentState$.pipe(\n filter(\n (frame: IFrame): boolean => {\n return frame.state.nodesAhead === 0 && !!frame.state.previousNode;\n }),\n map(\n (frame: IFrame): Node => {\n return frame.state.previousNode;\n }),\n distinctUntilChanged(\n undefined,\n (node: Node): string => {\n return node.key;\n }),\n debounceTime(1000),\n withLatestFrom(hasTexturePrev$),\n filter(\n (args: [Node, boolean]): boolean => {\n return !args[1];\n }),\n map(\n (args: [Node, boolean]): Node => {\n return args[0];\n }),\n filter(\n (node: Node): boolean => {\n return node.pano ?\n Settings.maxImageSize > Settings.basePanoramaSize :\n Settings.maxImageSize > Settings.baseImageSize;\n }),\n switchMap(\n (node: Node): Observable<[HTMLImageElement, Node]> => {\n let baseImageSize: ImageSize = node.pano ?\n Settings.basePanoramaSize :\n Settings.baseImageSize;\n\n if (Math.max(node.image.width, node.image.height) > baseImageSize) {\n return observableEmpty();\n }\n\n let image$: Observable<[HTMLImageElement, Node]> = node\n .cacheImage$(Settings.maxImageSize).pipe(\n map(\n (n: Node): [HTMLImageElement, Node] => {\n return [n.image, n];\n }));\n\n return image$.pipe(\n takeUntil(\n hasTexturePrev$.pipe(\n filter(\n (hasTexture: boolean): boolean => {\n\n return hasTexture;\n }))),\n catchError(\n (error: Error, caught: Observable<[HTMLImageElement, Node]>):\n Observable<[HTMLImageElement, Node]> => {\n console.error(`Failed to fetch high res image (${node.key})`, error);\n\n return observableEmpty();\n }));\n })).pipe(\n publish(),\n refCount());\n\n this._updateBackgroundSubscriptionPrev = nodeImagePrev$.pipe(\n withLatestFrom(textureProviderPrev$))\n .subscribe(\n (args: [[HTMLImageElement, Node], TextureProvider]): void => {\n if (args[0][1].key !== args[1].key ||\n args[1].disposed) {\n return;\n }\n\n args[1].updateBackground(args[0][0]);\n });\n\n this._updateTextureImageSubscriptionPrev = nodeImagePrev$.pipe(\n map(\n (imn: [HTMLImageElement, Node]): IGLRendererOperation => {\n return (renderer: SliderGLRenderer): SliderGLRenderer => {\n renderer.updateTextureImage(imn[0], imn[1]);\n\n return renderer;\n };\n }))\n .subscribe(this._glRendererOperation$);\n }\n\n protected _deactivate(): void {\n this._waitSubscription.unsubscribe();\n\n this._navigator.stateService.state$.pipe(\n first())\n .subscribe(\n (state: State): void => {\n if (state !== State.Traversing) {\n this._navigator.stateService.traverse();\n }\n });\n\n this._glRendererDisposer$.next(null);\n this._domRenderer.deactivate();\n\n this._modeSubcription.unsubscribe();\n this._setKeysSubscription.unsubscribe();\n this._stateSubscription.unsubscribe();\n this._glRenderSubscription.unsubscribe();\n this._domRenderSubscription.unsubscribe();\n this._moveSubscription.unsubscribe();\n this._updateCurtainSubscription.unsubscribe();\n\n this._textureProviderSubscription.unsubscribe();\n this._setTextureProviderSubscription.unsubscribe();\n this._setTileSizeSubscription.unsubscribe();\n this._abortTextureProviderSubscription.unsubscribe();\n this._setRegionOfInterestSubscription.unsubscribe();\n this._hasTextureSubscription.unsubscribe();\n this._updateBackgroundSubscription.unsubscribe();\n this._updateTextureImageSubscription.unsubscribe();\n\n this._textureProviderSubscriptionPrev.unsubscribe();\n this._setTextureProviderSubscriptionPrev.unsubscribe();\n this._setTileSizeSubscriptionPrev.unsubscribe();\n this._abortTextureProviderSubscriptionPrev.unsubscribe();\n this._setRegionOfInterestSubscriptionPrev.unsubscribe();\n this._hasTextureSubscriptionPrev.unsubscribe();\n this._updateBackgroundSubscriptionPrev.unsubscribe();\n this._updateTextureImageSubscriptionPrev.unsubscribe();\n\n this.configure({ keys: null });\n }\n\n protected _getDefaultConfiguration(): ISliderConfiguration {\n return {\n initialPosition: 1,\n mode: SliderMode.Motion,\n sliderVisible: true,\n };\n }\n\n private _catchCacheNode$(key: string): Observable<Node> {\n return this._navigator.graphService.cacheNode$(key).pipe(\n catchError(\n (error: Error, caught: Observable<Node>): Observable<Node> => {\n console.error(`Failed to cache slider node (${key})`, error);\n\n return observableEmpty();\n }));\n }\n\n private _getBasicCorners(currentAspect: number, previousAspect: number): number[][] {\n let offsetX: number;\n let offsetY: number;\n\n if (currentAspect > previousAspect) {\n offsetX = 0.5;\n offsetY = 0.5 * currentAspect / previousAspect;\n } else {\n offsetX = 0.5 * previousAspect / currentAspect;\n offsetY = 0.5;\n }\n\n return [[0.5 - offsetX, 0.5 - offsetY], [0.5 + offsetX, 0.5 + offsetY]];\n }\n\n private _clipBoundingBox(bbox: IBoundingBox): void {\n bbox.minX = Math.max(0, Math.min(1, bbox.minX));\n bbox.maxX = Math.max(0, Math.min(1, bbox.maxX));\n bbox.minY = Math.max(0, Math.min(1, bbox.minY));\n bbox.maxY = Math.max(0, Math.min(1, bbox.maxY));\n }\n}\n\nComponentService.register(SliderComponent);\nexport default SliderComponent;\n",
+ "import {merge as observableMerge, Observable , Subject , Subscription } from \"rxjs\";\n\nimport {filter} from \"rxjs/operators\";\nimport * as vd from \"virtual-dom\";\n\nimport { SliderMode } from \"../../Component\";\nimport { Container } from \"../../Viewer\";\n\nexport class SliderDOMRenderer {\n private _container: Container;\n\n private _interacting: boolean;\n private _notifyModeChanged$: Subject<SliderMode>;\n private _notifyPositionChanged$: Subject<number>;\n private _stopInteractionSubscription: Subscription;\n\n constructor(container: Container) {\n this._container = container;\n\n this._interacting = false;\n this._notifyModeChanged$ = new Subject<SliderMode>();\n this._notifyPositionChanged$ = new Subject<number>();\n this._stopInteractionSubscription = null;\n }\n\n public get mode$(): Observable<SliderMode> {\n return this._notifyModeChanged$;\n }\n\n public get position$(): Observable<number> {\n return this._notifyPositionChanged$;\n }\n\n public activate(): void {\n if (!!this._stopInteractionSubscription) {\n return;\n }\n\n this._stopInteractionSubscription = observableMerge(\n this._container.mouseService.documentMouseUp$,\n this._container.touchService.touchEnd$.pipe(\n filter(\n (touchEvent: TouchEvent): boolean => {\n return touchEvent.touches.length === 0;\n })))\n .subscribe(\n (event: Event): void => {\n if (this._interacting) {\n this._interacting = false;\n }\n });\n }\n\n public deactivate(): void {\n if (!this._stopInteractionSubscription) {\n return;\n }\n\n this._interacting = false;\n\n this._stopInteractionSubscription.unsubscribe();\n this._stopInteractionSubscription = null;\n }\n\n public render(position: number, mode: SliderMode, motionless: boolean, pano: boolean, visible: boolean): vd.VNode {\n const children: vd.VNode[] = [];\n\n if (visible) {\n children.push(vd.h(\"div.SliderBorder\", []));\n\n const modeVisible: boolean = !(motionless || pano);\n if (modeVisible) {\n children.push(this._createModeButton(mode));\n children.push(this._createModeButton2d(mode));\n }\n\n children.push(this._createPositionInput(position, modeVisible));\n }\n\n const boundingRect: ClientRect = this._container.domContainer.getBoundingClientRect();\n const width: number = Math.max(215, Math.min(400, boundingRect.width - 100));\n\n return vd.h(\"div.SliderContainer\", { style: { width: `${width}px` } }, children);\n }\n\n private _createModeButton(mode: SliderMode): vd.VNode {\n const properties: vd.createProperties = {\n onclick: (): void => {\n if (mode === SliderMode.Motion) {\n return;\n }\n\n this._notifyModeChanged$.next(SliderMode.Motion);\n },\n };\n\n const className: string = mode === SliderMode.Stationary ?\n \"SliderModeButtonDisabled\" :\n \"SliderModeButton\";\n\n return vd.h(\"div.\" + className, properties, [vd.h(\"div.SliderModeIcon\", [])]);\n }\n\n private _createModeButton2d(mode: SliderMode): vd.VNode {\n const properties: vd.createProperties = {\n onclick: (): void => {\n if (mode === SliderMode.Stationary) {\n return;\n }\n\n this._notifyModeChanged$.next(SliderMode.Stationary);\n },\n };\n\n const className: string = mode === SliderMode.Motion ?\n \"SliderModeButton2dDisabled\" :\n \"SliderModeButton2d\";\n\n return vd.h(\"div.\" + className, properties, [vd.h(\"div.SliderModeIcon2d\", [])]);\n }\n\n private _createPositionInput(position: number, modeVisible: boolean): vd.VNode {\n const onChange: (e: Event) => void = (e: Event): void => {\n this._notifyPositionChanged$.next(Number((<HTMLInputElement>e.target).value) / 1000);\n };\n\n const onStart: (e: Event) => void = (e: Event): void => {\n this._interacting = true;\n e.stopPropagation();\n };\n\n const onMove: (e: Event) => void = (e: Event): void => {\n if (this._interacting) {\n e.stopPropagation();\n }\n };\n\n const onKeyDown: (e: KeyboardEvent) => void = (e: KeyboardEvent): void => {\n if (e.key === \"ArrowDown\" || e.key === \"ArrowLeft\" ||\n e.key === \"ArrowRight\" || e.key === \"ArrowUp\") {\n e.preventDefault();\n }\n };\n\n const boundingRect: ClientRect = this._container.domContainer.getBoundingClientRect();\n const width: number = Math.max(215, Math.min(400, boundingRect.width - 105)) - 84 + (modeVisible ? 0 : 52);\n\n const positionInput: vd.VNode = vd.h(\n \"input.SliderPosition\",\n {\n max: 1000,\n min: 0,\n onchange: onChange,\n oninput: onChange,\n onkeydown: onKeyDown,\n onmousedown: onStart,\n onmousemove: onMove,\n ontouchmove: onMove,\n ontouchstart: onStart,\n style: {\n width: `${width}px`,\n },\n type: \"range\",\n value: 1000 * position,\n },\n []);\n\n return vd.h(\"div.SliderPositionContainer\", [positionInput]);\n }\n}\n\nexport default SliderDOMRenderer;\n",
+ "import * as THREE from \"three\";\n\nimport {Subscription} from \"rxjs\";\n\nimport {\n IBBoxShaderMaterial,\n IShaderMaterial,\n MeshFactory,\n MeshScene,\n SliderMode,\n} from \"../../Component\";\nimport {\n Transform,\n Spatial,\n} from \"../../Geo\";\nimport { Node } from \"../../Graph\";\nimport {\n ICurrentState,\n IFrame,\n} from \"../../State\";\nimport { TextureProvider } from \"../../Tiles\";\n\nexport class SliderGLRenderer {\n private _factory: MeshFactory;\n private _scene: MeshScene;\n private _spatial: Spatial;\n\n private _currentKey: string;\n private _previousKey: string;\n\n private _disabled: boolean;\n private _curtain: number;\n private _frameId: number;\n private _needsRender: boolean;\n\n private _mode: SliderMode;\n\n private _currentProviderDisposers: { [key: string]: () => void };\n private _previousProviderDisposers: { [key: string]: () => void };\n\n constructor() {\n this._factory = new MeshFactory();\n this._scene = new MeshScene();\n this._spatial = new Spatial();\n\n this._currentKey = null;\n this._previousKey = null;\n\n this._disabled = false;\n this._curtain = 1;\n this._frameId = 0;\n this._needsRender = false;\n\n this._mode = null;\n\n this._currentProviderDisposers = {};\n this._previousProviderDisposers = {};\n }\n\n public get disabled(): boolean {\n return this._disabled;\n }\n\n public get frameId(): number {\n return this._frameId;\n }\n\n public get needsRender(): boolean {\n return this._needsRender;\n }\n\n public setTextureProvider(key: string, provider: TextureProvider): void {\n this._setTextureProvider(\n key,\n this._currentKey,\n provider,\n this._currentProviderDisposers,\n this._updateTexture.bind(this));\n }\n\n public setTextureProviderPrev(key: string, provider: TextureProvider): void {\n this._setTextureProvider(\n key,\n this._previousKey,\n provider,\n this._previousProviderDisposers,\n this._updateTexturePrev.bind(this));\n }\n\n public update(frame: IFrame, mode: SliderMode): void {\n this._updateFrameId(frame.id);\n this._updateImagePlanes(frame.state, mode);\n }\n\n public updateCurtain(curtain: number): void {\n if (this._curtain === curtain) {\n return;\n }\n\n this._curtain = curtain;\n this._updateCurtain();\n\n this._needsRender = true;\n }\n\n public updateTexture(image: HTMLImageElement, node: Node): void {\n const planes: { [key: string]: THREE.Mesh } = node.key === this._currentKey ?\n this._scene.planes :\n node.key === this._previousKey ?\n this._scene.planesOld :\n {};\n\n if (Object.keys(planes).length === 0) {\n return;\n }\n\n this._needsRender = true;\n\n for (const key in planes) {\n if (!planes.hasOwnProperty(key)) {\n continue;\n }\n\n const plane: THREE.Mesh = planes[key];\n let material: IShaderMaterial = <IShaderMaterial>plane.material;\n let texture: THREE.Texture = <THREE.Texture>material.uniforms.projectorTex.value;\n\n texture.image = image;\n texture.needsUpdate = true;\n }\n }\n\n public updateTextureImage(image: HTMLImageElement, node?: Node): void {\n if (this._currentKey !== node.key) {\n return;\n }\n\n this._needsRender = true;\n\n const planes: { [key: string]: THREE.Mesh } = this._scene.planes;\n\n for (const key in planes) {\n if (!planes.hasOwnProperty(key)) {\n continue;\n }\n\n const plane: THREE.Mesh = planes[key];\n let material: IShaderMaterial = <IShaderMaterial>plane.material;\n let texture: THREE.Texture = <THREE.Texture>material.uniforms.projectorTex.value;\n\n texture.image = image;\n texture.needsUpdate = true;\n }\n }\n\n public render(\n perspectiveCamera: THREE.PerspectiveCamera,\n renderer: THREE.WebGLRenderer): void {\n\n if (!this.disabled) {\n renderer.render(this._scene.sceneOld, perspectiveCamera);\n }\n\n renderer.render(this._scene.scene, perspectiveCamera);\n\n this._needsRender = false;\n }\n\n public dispose(): void {\n this._scene.clear();\n\n for (const key in this._currentProviderDisposers) {\n if (!this._currentProviderDisposers.hasOwnProperty(key)) {\n continue;\n }\n\n this._currentProviderDisposers[key]();\n }\n\n for (const key in this._previousProviderDisposers) {\n if (!this._previousProviderDisposers.hasOwnProperty(key)) {\n continue;\n }\n\n this._previousProviderDisposers[key]();\n }\n\n this._currentProviderDisposers = {};\n this._previousProviderDisposers = {};\n }\n\n private _getBasicCorners(currentAspect: number, previousAspect: number): number[][] {\n let offsetX: number;\n let offsetY: number;\n\n if (currentAspect > previousAspect) {\n offsetX = 0.5;\n offsetY = 0.5 * currentAspect / previousAspect;\n } else {\n offsetX = 0.5 * previousAspect / currentAspect;\n offsetY = 0.5;\n }\n\n return [[0.5 - offsetX, 0.5 - offsetY], [0.5 + offsetX, 0.5 + offsetY]];\n }\n\n private _setDisabled(state: ICurrentState): void {\n this._disabled = state.currentNode == null ||\n state.previousNode == null ||\n (state.currentNode.pano && !state.currentNode.fullPano) ||\n (state.previousNode.pano && !state.previousNode.fullPano) ||\n (state.currentNode.fullPano && !state.previousNode.fullPano);\n }\n\n private _setTextureProvider(\n key: string,\n originalKey: string,\n provider: TextureProvider,\n providerDisposers: { [key: string]: () => void },\n updateTexture: (texture: THREE.Texture) => void): void {\n\n if (key !== originalKey) {\n return;\n }\n\n let createdSubscription: Subscription = provider.textureCreated$\n .subscribe(updateTexture);\n\n let updatedSubscription: Subscription = provider.textureUpdated$\n .subscribe(\n (updated: boolean): void => {\n this._needsRender = true;\n });\n\n let dispose: () => void = (): void => {\n createdSubscription.unsubscribe();\n updatedSubscription.unsubscribe();\n provider.dispose();\n };\n\n if (key in providerDisposers) {\n let disposeProvider: () => void = providerDisposers[key];\n disposeProvider();\n\n delete providerDisposers[key];\n }\n\n providerDisposers[key] = dispose;\n }\n\n private _updateCurtain(): void {\n const planes: { [key: string]: THREE.Mesh } = this._scene.planes;\n\n for (const key in planes) {\n if (!planes.hasOwnProperty(key)) {\n continue;\n }\n\n const plane: THREE.Mesh = planes[key];\n let shaderMaterial: IBBoxShaderMaterial = <IBBoxShaderMaterial>plane.material;\n\n if (!!shaderMaterial.uniforms.curtain) {\n shaderMaterial.uniforms.curtain.value = this._curtain;\n }\n }\n }\n\n private _updateFrameId(frameId: number): void {\n this._frameId = frameId;\n }\n\n private _updateImagePlanes(state: ICurrentState, mode: SliderMode): void {\n const currentChanged: boolean = state.currentNode != null && this._currentKey !== state.currentNode.key;\n const previousChanged: boolean = state.previousNode != null && this._previousKey !== state.previousNode.key;\n const modeChanged: boolean = this._mode !== mode;\n\n if (!(currentChanged || previousChanged || modeChanged)) {\n return;\n }\n\n this._setDisabled(state);\n this._needsRender = true;\n this._mode = mode;\n\n const motionless: boolean = state.motionless || mode === SliderMode.Stationary || state.currentNode.pano;\n\n if (this.disabled || previousChanged) {\n if (this._previousKey in this._previousProviderDisposers) {\n this._previousProviderDisposers[this._previousKey]();\n\n delete this._previousProviderDisposers[this._previousKey];\n }\n }\n\n if (this.disabled) {\n this._scene.setImagePlanesOld({});\n } else {\n if (previousChanged || modeChanged) {\n const previousNode: Node = state.previousNode;\n\n this._previousKey = previousNode.key;\n\n const elements: Float32Array = state.currentTransform.rt.elements;\n let translation: number[] = [elements[12], elements[13], elements[14]];\n\n const currentAspect: number = state.currentTransform.basicAspect;\n const previousAspect: number = state.previousTransform.basicAspect;\n\n const textureScale: number[] = currentAspect > previousAspect ?\n [1, previousAspect / currentAspect] :\n [currentAspect / previousAspect, 1];\n\n let rotation: number[] = state.currentNode.rotation;\n let width: number = state.currentNode.width;\n let height: number = state.currentNode.height;\n\n if (previousNode.fullPano) {\n rotation = state.previousNode.rotation;\n translation = this._spatial\n .rotate(\n this._spatial\n .opticalCenter(state.currentNode.rotation, translation)\n .toArray(),\n rotation)\n .multiplyScalar(-1)\n .toArray();\n\n width = state.previousNode.width;\n height = state.previousNode.height;\n }\n\n const transform: Transform = new Transform(\n state.currentNode.orientation,\n width,\n height,\n state.currentNode.focal,\n state.currentNode.scale,\n previousNode.gpano,\n rotation,\n translation,\n previousNode.image,\n textureScale);\n\n let mesh: THREE.Mesh = undefined;\n\n if (previousNode.fullPano) {\n mesh = this._factory.createMesh(\n previousNode,\n motionless || state.currentNode.fullPano ? transform : state.previousTransform);\n } else {\n if (motionless) {\n const [[basicX0, basicY0], [basicX1, basicY1]]: number[][] = this._getBasicCorners(currentAspect, previousAspect);\n\n mesh = this._factory.createFlatMesh(\n state.previousNode,\n transform,\n basicX0,\n basicX1,\n basicY0,\n basicY1);\n } else {\n mesh = this._factory.createMesh(state.previousNode, state.previousTransform);\n }\n }\n\n const previousPlanes: { [key: string]: THREE.Mesh } = {};\n previousPlanes[previousNode.key] = mesh;\n this._scene.setImagePlanesOld(previousPlanes);\n }\n }\n\n if (currentChanged || modeChanged) {\n if (this._currentKey in this._currentProviderDisposers) {\n this._currentProviderDisposers[this._currentKey]();\n\n delete this._currentProviderDisposers[this._currentKey];\n }\n\n this._currentKey = state.currentNode.key;\n\n const planes: { [key: string]: THREE.Mesh } = {};\n\n if (state.currentNode.fullPano) {\n planes[state.currentNode.key] = this._factory.createCurtainMesh(state.currentNode, state.currentTransform);\n } else if (state.currentNode.pano && !state.currentNode.fullPano) {\n planes[state.currentNode.key] = this._factory.createMesh(state.currentNode, state.currentTransform);\n } else {\n if (motionless) {\n planes[state.currentNode.key] = this._factory.createDistortedCurtainMesh(state.currentNode, state.currentTransform);\n } else {\n planes[state.currentNode.key] = this._factory.createCurtainMesh(state.currentNode, state.currentTransform);\n }\n }\n\n this._scene.setImagePlanes(planes);\n\n this._updateCurtain();\n }\n }\n\n private _updateTexture(texture: THREE.Texture): void {\n this._needsRender = true;\n\n const planes: { [key: string]: THREE.Mesh } = this._scene.planes;\n\n for (const key in planes) {\n if (!planes.hasOwnProperty(key)) {\n continue;\n }\n\n const plane: THREE.Mesh = planes[key];\n let material: IShaderMaterial = <IShaderMaterial>plane.material;\n\n let oldTexture: THREE.Texture = <THREE.Texture>material.uniforms.projectorTex.value;\n material.uniforms.projectorTex.value = null;\n oldTexture.dispose();\n\n material.uniforms.projectorTex.value = texture;\n }\n }\n\n private _updateTexturePrev(texture: THREE.Texture): void {\n this._needsRender = true;\n\n const planes: { [key: string]: THREE.Mesh } = this._scene.planesOld;\n\n for (const key in planes) {\n if (!planes.hasOwnProperty(key)) {\n continue;\n }\n\n const plane: THREE.Mesh = planes[key];\n let material: IShaderMaterial = <IShaderMaterial>plane.material;\n\n let oldTexture: THREE.Texture = <THREE.Texture>material.uniforms.projectorTex.value;\n material.uniforms.projectorTex.value = null;\n oldTexture.dispose();\n\n material.uniforms.projectorTex.value = texture;\n }\n }\n}\n\nexport default SliderGLRenderer;\n",
+ "import * as geohash from \"latlon-geohash\";\n\nimport {\n empty as observableEmpty,\n from as observableFrom,\n of as observableOf,\n zip as observableZip,\n Observable,\n Subscriber,\n} from \"rxjs\";\n\nimport {\n mergeMap,\n catchError,\n tap,\n publish,\n refCount,\n finalize,\n map,\n filter,\n} from \"rxjs/operators\";\n\nimport {\n IGPano,\n ILatLon,\n} from \"../../API\";\nimport {\n IReconstruction,\n} from \"../../Component\";\nimport {\n AbortMapillaryError,\n} from \"../../Error\";\nimport {\n GraphService,\n Node,\n} from \"../../Graph\";\nimport {\n Urls,\n} from \"../../Utils\";\nimport { CameraProjection } from \"../../api/interfaces/CameraProjection\";\n\nexport type NodeData = {\n alt: number;\n cameraProjection: CameraProjection;\n focal: number;\n gpano: IGPano;\n height: number;\n k1: number;\n k2: number;\n key: string,\n lat: number;\n lon: number;\n mergeCC: number;\n orientation: number;\n originalLat: number;\n originalLon: number;\n rotation: number[];\n scale: number;\n width: number;\n};\n\nexport type ReconstructionData = {\n data: NodeData,\n reconstruction: IReconstruction,\n};\n\nexport class SpatialDataCache {\n private _graphService: GraphService;\n\n private _cacheRequests: { [hash: string]: XMLHttpRequest[] };\n private _reconstructions: { [hash: string]: ReconstructionData[] };\n private _tiles: { [hash: string]: NodeData[] };\n\n private _cachingReconstructions$: { [hash: string]: Observable<ReconstructionData> };\n private _cachingTiles$: { [hash: string]: Observable<NodeData[]> };\n\n constructor(graphService: GraphService) {\n this._graphService = graphService;\n\n this._tiles = {};\n this._cacheRequests = {};\n this._reconstructions = {};\n\n this._cachingReconstructions$ = {};\n this._cachingTiles$ = {};\n }\n\n public cacheReconstructions$(hash: string): Observable<ReconstructionData> {\n if (!this.hasTile(hash)) {\n throw new Error(\"Cannot cache reconstructions of a non-existing tile.\");\n }\n\n if (this.hasReconstructions(hash)) {\n throw new Error(\"Cannot cache reconstructions that already exists.\");\n }\n\n if (this.isCachingReconstructions(hash)) {\n return this._cachingReconstructions$[hash];\n }\n\n const tile: NodeData[] = [];\n\n if (hash in this._reconstructions) {\n const reconstructionKeys: string[] =\n this.getReconstructions(hash)\n .map(\n (reconstruction: ReconstructionData): string => {\n return reconstruction.data.key;\n });\n\n for (const node of this.getTile(hash)) {\n if (reconstructionKeys.indexOf(node.key) === -1) {\n tile.push(node);\n }\n }\n } else {\n tile.push(...this.getTile(hash));\n\n this._reconstructions[hash] = [];\n }\n\n this._cacheRequests[hash] = [];\n this._cachingReconstructions$[hash] = observableFrom(tile).pipe(\n mergeMap(\n (nodeData: NodeData): Observable<[NodeData, IReconstruction]> => {\n return !this._cacheRequests[hash] ?\n observableEmpty() :\n observableZip(\n observableOf(nodeData),\n this._getAtomicReconstruction(nodeData.key, this._cacheRequests[hash]))\n .pipe(\n catchError(\n (error: Error): Observable<[NodeData, IReconstruction]> => {\n if (error instanceof AbortMapillaryError) {\n return observableEmpty();\n }\n\n console.error(error);\n\n return observableOf(<[NodeData, IReconstruction]>[nodeData, null]);\n }));\n },\n 6),\n map(\n ([nodeData, reconstruction]: [NodeData, IReconstruction]): ReconstructionData => {\n return { data: nodeData, reconstruction: reconstruction };\n }),\n filter(\n (): boolean => {\n return hash in this._reconstructions;\n }),\n tap(\n (data: ReconstructionData): void => {\n this._reconstructions[hash].push(data);\n }),\n filter(\n (data: ReconstructionData): boolean => {\n return !!data.reconstruction;\n }),\n finalize(\n (): void => {\n if (hash in this._cachingReconstructions$) {\n delete this._cachingReconstructions$[hash];\n }\n\n if (hash in this._cacheRequests) {\n delete this._cacheRequests[hash];\n }\n }),\n publish(),\n refCount());\n\n return this._cachingReconstructions$[hash];\n }\n\n public cacheTile$(hash: string): Observable<NodeData[]> {\n if (hash.length !== 8) {\n throw new Error(\"Hash needs to be level 8.\");\n }\n\n if (this.hasTile(hash)) {\n throw new Error(\"Cannot cache tile that already exists.\");\n\n }\n\n if (this.hasTile(hash)) {\n return this._cachingTiles$[hash];\n }\n\n const bounds: geohash.Bounds = geohash.bounds(hash);\n const sw: ILatLon = { lat: bounds.sw.lat, lon: bounds.sw.lon };\n const ne: ILatLon = { lat: bounds.ne.lat, lon: bounds.ne.lon };\n\n this._tiles[hash] = [];\n this._cachingTiles$[hash] = this._graphService.cacheBoundingBox$(sw, ne).pipe(\n catchError(\n (error: Error): Observable<Node[]> => {\n console.error(error);\n\n delete this._tiles[hash];\n\n return observableEmpty();\n }),\n map(\n (nodes: Node[]): NodeData[] => {\n return nodes\n .map(\n (n: Node): NodeData => {\n return this._createNodeData(n);\n });\n }),\n filter(\n (): boolean => {\n return hash in this._tiles;\n }),\n tap(\n (nodeData: NodeData[]): void => {\n this._tiles[hash].push(...nodeData);\n\n delete this._cachingTiles$[hash];\n }),\n finalize(\n (): void => {\n if (hash in this._cachingTiles$) {\n delete this._cachingTiles$[hash];\n }\n }),\n publish(),\n refCount());\n\n return this._cachingTiles$[hash];\n }\n\n public isCachingReconstructions(hash: string): boolean {\n return hash in this._cachingReconstructions$;\n }\n\n public isCachingTile(hash: string): boolean {\n return hash in this._cachingTiles$;\n }\n\n public hasReconstructions(hash: string): boolean {\n return !(hash in this._cachingReconstructions$) &&\n hash in this._reconstructions &&\n this._reconstructions[hash].length === this._tiles[hash].length;\n }\n\n public hasTile(hash: string): boolean {\n return !(hash in this._cachingTiles$) && hash in this._tiles;\n }\n\n public getReconstructions(hash: string): ReconstructionData[] {\n return hash in this._reconstructions ?\n this._reconstructions[hash]\n .filter(\n (data: ReconstructionData): boolean => {\n return !!data.reconstruction;\n }) :\n [];\n }\n\n public getTile(hash: string): NodeData[] {\n return hash in this._tiles ? this._tiles[hash] : [];\n }\n\n public uncache(keepHashes?: string[]): void {\n for (let hash of Object.keys(this._cacheRequests)) {\n if (!!keepHashes && keepHashes.indexOf(hash) !== -1) {\n continue;\n }\n\n for (const request of this._cacheRequests[hash]) {\n request.abort();\n }\n\n delete this._cacheRequests[hash];\n }\n\n for (let hash of Object.keys(this._reconstructions)) {\n if (!!keepHashes && keepHashes.indexOf(hash) !== -1) {\n continue;\n }\n\n delete this._reconstructions[hash];\n }\n\n for (let hash of Object.keys(this._tiles)) {\n if (!!keepHashes && keepHashes.indexOf(hash) !== -1) {\n continue;\n }\n\n delete this._tiles[hash];\n }\n }\n\n private _createNodeData(node: Node): NodeData {\n return {\n alt: node.alt,\n cameraProjection: node.cameraProjection,\n focal: node.focal,\n gpano: node.gpano,\n height: node.height,\n k1: node.ck1,\n k2: node.ck2,\n key: node.key,\n lat: node.latLon.lat,\n lon: node.latLon.lon,\n mergeCC: node.mergeCC,\n orientation: node.orientation,\n originalLat: node.originalLatLon.lat,\n originalLon: node.originalLatLon.lon,\n rotation: [node.rotation[0], node.rotation[1], node.rotation[2]],\n scale: node.scale,\n width: node.width,\n };\n }\n\n private _getAtomicReconstruction(key: string, requests: XMLHttpRequest[]): Observable<IReconstruction> {\n return Observable.create(\n (subscriber: Subscriber<IReconstruction>): void => {\n const xmlHTTP: XMLHttpRequest = new XMLHttpRequest();\n\n xmlHTTP.open(\"GET\", Urls.atomicReconstruction(key), true);\n xmlHTTP.responseType = \"json\";\n xmlHTTP.timeout = 15000;\n\n xmlHTTP.onload = () => {\n if (!xmlHTTP.response) {\n subscriber.error(new Error(`Atomic reconstruction does not exist (${key})`));\n } else {\n subscriber.next(xmlHTTP.response);\n subscriber.complete();\n }\n };\n\n xmlHTTP.onerror = () => {\n subscriber.error(new Error(`Failed to get atomic reconstruction (${key})`));\n };\n\n xmlHTTP.ontimeout = () => {\n subscriber.error(new Error(`Atomic reconstruction request timed out (${key})`));\n };\n\n xmlHTTP.onabort = () => {\n subscriber.error(new AbortMapillaryError(`Atomic reconstruction request was aborted (${key})`));\n };\n\n requests.push(xmlHTTP);\n\n xmlHTTP.send(null);\n });\n }\n}\n\nexport default SpatialDataCache;\n",
+ "import * as geohash from \"latlon-geohash\";\n\nimport {\n combineLatest as observableCombineLatest,\n empty as observableEmpty,\n from as observableFrom,\n of as observableOf,\n Observable,\n Subscription,\n} from \"rxjs\";\n\nimport {\n catchError,\n withLatestFrom,\n map,\n distinctUntilChanged,\n concatMap,\n switchMap,\n tap,\n filter,\n last,\n mergeMap,\n first,\n refCount,\n publishReplay,\n} from \"rxjs/operators\";\n\nimport {\n ComponentService,\n Component,\n ISpatialDataConfiguration,\n NodeData,\n ReconstructionData,\n SpatialDataCache,\n SpatialDataScene,\n} from \"../../Component\";\nimport {\n Geo,\n GeoCoords,\n ILatLonAlt,\n Transform,\n ViewportCoords,\n} from \"../../Geo\";\nimport {\n Node,\n} from \"../../Graph\";\nimport {\n IGLRenderHash,\n GLRenderStage,\n RenderCamera,\n} from \"../../Render\";\nimport {\n IFrame,\n} from \"../../State\";\nimport {\n Container,\n Navigator,\n} from \"../../Viewer\";\nimport PlayService from \"../../viewer/PlayService\";\nimport State from \"../../state/State\";\n\nexport class SpatialDataComponent extends Component<ISpatialDataConfiguration> {\n public static componentName: string = \"spatialData\";\n\n private _cache: SpatialDataCache;\n private _scene: SpatialDataScene;\n private _viewportCoords: ViewportCoords;\n private _geoCoords: GeoCoords;\n\n private _addSubscription: Subscription;\n private _cameraVisibilitySubscription: Subscription;\n private _earthControlsSubscription: Subscription;\n private _moveSubscription: Subscription;\n private _pointVisibilitySubscription: Subscription;\n private _positionVisibilitySubscription: Subscription;\n private _renderSubscription: Subscription;\n private _tileVisibilitySubscription: Subscription;\n private _uncacheSubscription: Subscription;\n private _visualizeConnectedComponentSubscription: Subscription;\n\n constructor(name: string, container: Container, navigator: Navigator) {\n super(name, container, navigator);\n\n this._cache = new SpatialDataCache(navigator.graphService);\n this._scene = new SpatialDataScene(this._getDefaultConfiguration());\n this._viewportCoords = new ViewportCoords();\n this._geoCoords = new GeoCoords();\n }\n\n protected _activate(): void {\n this._earthControlsSubscription = this._configuration$.pipe(\n map(\n (configuration: ISpatialDataConfiguration): boolean => {\n return configuration.earthControls;\n }),\n distinctUntilChanged(),\n withLatestFrom(this._navigator.stateService.state$))\n .subscribe(\n ([earth, state]: [boolean, State]): void => {\n if (earth && state !== State.Earth) {\n this._navigator.stateService.earth();\n } else if (!earth && state === State.Earth) {\n this._navigator.stateService.traverse();\n }\n });\n\n const direction$: Observable<string> = this._container.renderService.bearing$.pipe(\n map(\n (bearing: number): string => {\n let direction: string = \"\";\n\n if (bearing > 292.5 || bearing <= 67.5) {\n direction += \"n\";\n }\n\n if (bearing > 112.5 && bearing <= 247.5) {\n direction += \"s\";\n }\n\n if (bearing > 22.5 && bearing <= 157.5) {\n direction += \"e\";\n }\n\n if (bearing > 202.5 && bearing <= 337.5) {\n direction += \"w\";\n }\n\n return direction;\n }),\n distinctUntilChanged(),\n publishReplay(1),\n refCount());\n\n const hash$: Observable<string> = this._navigator.stateService.reference$.pipe(\n tap(\n (): void => {\n this._scene.uncache();\n }),\n switchMap(\n (): Observable<string> => {\n return this._navigator.stateService.currentNode$.pipe(\n map(\n (node: Node): string => {\n return geohash.encode(node.latLon.lat, node.latLon.lon, 8);\n }),\n distinctUntilChanged());\n }),\n publishReplay(1),\n refCount());\n\n const sequencePlay$: Observable<boolean> = observableCombineLatest(\n this._navigator.playService.playing$,\n this._navigator.playService.speed$).pipe(\n map(\n ([playing, speed]: [boolean, number]): boolean => {\n return playing && speed > PlayService.sequenceSpeed;\n }),\n distinctUntilChanged(),\n publishReplay(1),\n refCount());\n\n this._addSubscription = observableCombineLatest(\n this._navigator.stateService.state$.pipe(\n map(\n (state: State): boolean => {\n return state === State.Earth;\n }),\n distinctUntilChanged()),\n hash$,\n sequencePlay$,\n direction$).pipe(\n distinctUntilChanged(\n (\n [e1, h1, s1, d1]: [boolean, string, boolean, string],\n [e2, h2, s2, d2]: [boolean, string, boolean, string]): boolean => {\n\n if (e1 !== e2) {\n return false;\n }\n\n if (e1) {\n return h1 === h2 && s1 === s2;\n }\n\n return h1 === h2 && s1 === s2 && d1 === d2;\n }),\n concatMap(\n ([earth, hash, sequencePlay, direction]: [boolean, string, boolean, string]): Observable<string[]> => {\n if (earth) {\n return sequencePlay ?\n observableOf([hash]) :\n observableOf(this._adjacentComponent(hash, 4));\n }\n\n return sequencePlay ?\n observableOf([hash, geohash.neighbours(hash)[<keyof geohash.Neighbours>direction]]) :\n observableOf(this._computeTiles(hash, direction));\n }),\n switchMap(\n (hashes: string[]): Observable<string> => {\n return observableFrom(hashes).pipe(\n mergeMap(\n (h: string): Observable<[string, NodeData[]]> => {\n let tile$: Observable<NodeData[]>;\n\n if (this._cache.hasTile(h)) {\n tile$ = observableOf(this._cache.getTile(h));\n } else if (this._cache.isCachingTile(h)) {\n tile$ = this._cache.cacheTile$(h).pipe(\n last(null, {}),\n switchMap(\n (): Observable<NodeData[]> => {\n return observableOf(this._cache.getTile(h));\n }));\n } else {\n tile$ = this._cache.cacheTile$(h);\n }\n\n return observableCombineLatest(observableOf(h), tile$);\n },\n 1),\n map(\n ([hash]: [string, NodeData[]]): string => {\n return hash;\n }));\n }),\n concatMap(\n (hash: string): Observable<[string, ReconstructionData]> => {\n let reconstructions$: Observable<ReconstructionData>;\n\n if (this._cache.hasReconstructions(hash)) {\n reconstructions$ = observableFrom(this._cache.getReconstructions(hash));\n } else if (this._cache.isCachingReconstructions(hash)) {\n reconstructions$ = this._cache.cacheReconstructions$(hash).pipe(\n last(null, {}),\n switchMap(\n (): Observable<ReconstructionData> => {\n return observableFrom(this._cache.getReconstructions(hash));\n }));\n } else if (this._cache.hasTile(hash)) {\n reconstructions$ = this._cache.cacheReconstructions$(hash);\n } else {\n reconstructions$ = observableEmpty();\n }\n\n return observableCombineLatest(observableOf(hash), reconstructions$);\n }),\n withLatestFrom(this._navigator.stateService.reference$),\n tap(\n ([[hash], reference]: [[string, ReconstructionData], ILatLonAlt]): boolean => {\n if (this._scene.hasTile(hash)) {\n return;\n }\n\n this._scene.addTile(this._computeTileBBox(hash, reference), hash);\n }),\n filter(\n ([[hash, data]]: [[string, ReconstructionData], ILatLonAlt]): boolean => {\n return !this._scene.hasReconstruction(data.reconstruction.main_shot, hash);\n }),\n map(\n ([[hash, data], reference]: [[string, ReconstructionData], ILatLonAlt]):\n [ReconstructionData, Transform, number[], string] => {\n return [\n data,\n this._createTransform(data.data, reference),\n this._computeOriginalPosition(data.data, reference),\n hash];\n }))\n .subscribe(\n ([data, transform, position, hash]: [ReconstructionData, Transform, number[], string]): void => {\n this._scene.addReconstruction(\n data.reconstruction,\n transform,\n position,\n !!data.data.mergeCC ? data.data.mergeCC.toString() : \"\",\n hash);\n });\n\n this._cameraVisibilitySubscription = this._configuration$.pipe(\n map(\n (configuration: ISpatialDataConfiguration): boolean => {\n return configuration.camerasVisible;\n }),\n distinctUntilChanged())\n .subscribe(\n (visible: boolean): void => {\n this._scene.setCameraVisibility(visible);\n });\n\n this._pointVisibilitySubscription = this._configuration$.pipe(\n map(\n (configuration: ISpatialDataConfiguration): boolean => {\n return configuration.pointsVisible;\n }),\n distinctUntilChanged())\n .subscribe(\n (visible: boolean): void => {\n this._scene.setPointVisibility(visible);\n });\n\n this._positionVisibilitySubscription = this._configuration$.pipe(\n map(\n (configuration: ISpatialDataConfiguration): boolean => {\n return configuration.positionsVisible;\n }),\n distinctUntilChanged())\n .subscribe(\n (visible: boolean): void => {\n this._scene.setPositionVisibility(visible);\n });\n\n this._tileVisibilitySubscription = this._configuration$.pipe(\n map(\n (configuration: ISpatialDataConfiguration): boolean => {\n return configuration.tilesVisible;\n }),\n distinctUntilChanged())\n .subscribe(\n (visible: boolean): void => {\n this._scene.setTileVisibility(visible);\n });\n\n this._visualizeConnectedComponentSubscription = this._configuration$.pipe(\n map(\n (configuration: ISpatialDataConfiguration): boolean => {\n return configuration.connectedComponents;\n }),\n distinctUntilChanged())\n .subscribe(\n (visualize: boolean): void => {\n this._scene.setConnectedComponentVisualization(visualize);\n });\n\n this._uncacheSubscription = hash$\n .subscribe(\n (hash: string): void => {\n const keepHashes: string[] = this._adjacentComponent(hash, 4);\n this._scene.uncache(keepHashes);\n this._cache.uncache(keepHashes);\n });\n\n this._moveSubscription = this._navigator.playService.playing$.pipe(\n switchMap(\n (playing: boolean): Observable<MouseEvent> => {\n return playing ?\n observableEmpty() :\n this._container.mouseService.dblClick$;\n }),\n withLatestFrom(this._container.renderService.renderCamera$),\n switchMap(\n ([event, render]: [MouseEvent, RenderCamera]): Observable<Node> => {\n const element: HTMLElement = this._container.element;\n const [canvasX, canvasY]: number[] = this._viewportCoords.canvasPosition(event, element);\n const viewport: number[] = this._viewportCoords.canvasToViewport(\n canvasX,\n canvasY,\n element);\n\n const key: string = this._scene.intersectObjects(viewport, render.perspective);\n\n return !!key ?\n this._navigator.moveToKey$(key).pipe(\n catchError(\n (): Observable<Node> => {\n return observableEmpty();\n })) :\n observableEmpty();\n }))\n .subscribe();\n\n this._renderSubscription = this._navigator.stateService.currentState$.pipe(\n map(\n (frame: IFrame): IGLRenderHash => {\n const scene: SpatialDataScene = this._scene;\n\n return {\n name: this._name,\n render: {\n frameId: frame.id,\n needsRender: scene.needsRender,\n render: scene.render.bind(scene),\n stage: GLRenderStage.Foreground,\n },\n };\n }))\n .subscribe(this._container.glRenderer.render$);\n }\n\n protected _deactivate(): void {\n this._cache.uncache();\n this._scene.uncache();\n\n this._addSubscription.unsubscribe();\n this._cameraVisibilitySubscription.unsubscribe();\n this._earthControlsSubscription.unsubscribe();\n this._moveSubscription.unsubscribe();\n this._pointVisibilitySubscription.unsubscribe();\n this._positionVisibilitySubscription.unsubscribe();\n this._renderSubscription.unsubscribe();\n this._tileVisibilitySubscription.unsubscribe();\n this._uncacheSubscription.unsubscribe();\n this._visualizeConnectedComponentSubscription.unsubscribe();\n\n this._navigator.stateService.state$.pipe(\n first())\n .subscribe(\n (state: State): void => {\n if (state === State.Earth) {\n this._navigator.stateService.traverse();\n }\n });\n }\n\n protected _getDefaultConfiguration(): ISpatialDataConfiguration {\n return { camerasVisible: false, pointsVisible: true, positionsVisible: false, tilesVisible: false };\n }\n\n private _adjacentComponent(hash: string, depth: number): string[] {\n const hashSet: Set<string> = new Set<string>();\n hashSet.add(hash);\n\n this._adjacentComponentRecursive(hashSet, [hash], 0, depth);\n\n return this._setToArray(hashSet);\n }\n\n private _adjacentComponentRecursive(\n hashSet: Set<string>,\n currentHashes: string[],\n currentDepth: number,\n maxDepth: number): void {\n\n if (currentDepth === maxDepth) {\n return;\n }\n\n const neighbours: string[] = [];\n\n for (const hash of currentHashes) {\n const hashNeighbours: geohash.Neighbours = geohash.neighbours(hash);\n\n for (const direction in hashNeighbours) {\n if (!hashNeighbours.hasOwnProperty(direction)) {\n continue;\n }\n\n neighbours.push(hashNeighbours[<keyof geohash.Neighbours>direction]);\n }\n }\n\n const newHashes: string[] = [];\n for (const neighbour of neighbours) {\n if (!hashSet.has(neighbour)) {\n hashSet.add(neighbour);\n newHashes.push(neighbour);\n }\n }\n\n this._adjacentComponentRecursive(hashSet, newHashes, currentDepth + 1, maxDepth);\n }\n\n private _computeOriginalPosition(data: NodeData, reference: ILatLonAlt): number[] {\n return this._geoCoords.geodeticToEnu(\n data.originalLat,\n data.originalLon,\n data.alt,\n reference.lat,\n reference.lon,\n reference.alt);\n }\n\n private _computeTileBBox(hash: string, reference: ILatLonAlt): number[][] {\n const bounds: geohash.Bounds = geohash.bounds(hash);\n\n const sw: number[] = this._geoCoords.geodeticToEnu(\n bounds.sw.lat,\n bounds.sw.lon,\n 0,\n reference.lat,\n reference.lon,\n reference.alt);\n\n const ne: number[] = this._geoCoords.geodeticToEnu(\n bounds.ne.lat,\n bounds.ne.lon,\n 0,\n reference.lat,\n reference.lon,\n reference.alt);\n\n return [sw, ne];\n }\n\n private _createTransform(data: NodeData, reference: ILatLonAlt): Transform {\n const translation: number[] = Geo.computeTranslation(\n { alt: data.alt, lat: data.lat, lon: data.lon },\n data.rotation,\n reference);\n\n const transform: Transform = new Transform(\n data.orientation,\n data.width,\n data.height,\n data.focal,\n data.scale,\n data.gpano,\n data.rotation,\n translation,\n undefined,\n undefined,\n data.k1,\n data.k2,\n data.cameraProjection);\n\n return transform;\n }\n\n private _computeTiles(hash: string, direction: string): string[] {\n const hashSet: Set<string> = new Set<string>();\n const directions: string[] = [\"n\", \"ne\", \"e\", \"se\", \"s\", \"sw\", \"w\", \"nw\"];\n\n this._computeTilesRecursive(hashSet, hash, direction, directions, 0, 2);\n\n return this._setToArray(hashSet);\n }\n\n private _computeTilesRecursive(\n hashSet: Set<string>,\n currentHash: string,\n direction: string,\n directions: string[],\n currentDepth: number,\n maxDepth: number): void {\n\n hashSet.add(currentHash);\n\n if (currentDepth === maxDepth) {\n return;\n }\n\n const neighbours: geohash.Neighbours = geohash.neighbours(currentHash);\n const directionIndex: number = directions.indexOf(direction);\n const length: number = directions.length;\n\n const directionNeighbours: string[] = [\n neighbours[<keyof geohash.Neighbours>directions[this._modulo((directionIndex - 1), length)]],\n neighbours[<keyof geohash.Neighbours>direction],\n neighbours[<keyof geohash.Neighbours>directions[this._modulo((directionIndex + 1), length)]],\n ];\n\n for (let directionNeighbour of directionNeighbours) {\n this._computeTilesRecursive(hashSet, directionNeighbour, direction, directions, currentDepth + 1, maxDepth);\n }\n }\n\n private _modulo(a: number, n: number): number {\n return ((a % n) + n) % n;\n }\n\n private _setToArray<T>(s: Set<T>): T[] {\n const a: T[] = [];\n\n s.forEach(\n (value: T) => {\n a.push(value);\n });\n\n return a;\n }\n}\n\nComponentService.register(SpatialDataComponent);\nexport default SpatialDataComponent;\n",
+ "import * as THREE from \"three\";\n\nimport {\n IReconstruction,\n IReconstructionPoint,\n ISpatialDataConfiguration,\n} from \"../../Component\";\nimport {\n Transform,\n} from \"../../Geo\";\n\nexport class SpatialDataScene {\n private _scene: THREE.Scene;\n private _raycaster: THREE.Raycaster;\n\n private _connectedComponentColors: { [id: string]: string };\n private _needsRender: boolean;\n private _interactiveObjects: THREE.Object3D[];\n private _reconstructions: {\n [hash: string]: {\n cameraKeys: { [id: string]: string };\n cameras: THREE.Object3D;\n connectedComponents: { [id: string]: THREE.Object3D[] };\n keys: string[];\n points: THREE.Object3D;\n positions: THREE.Object3D;\n };\n };\n\n private _tiles: { [hash: string]: THREE.Object3D };\n\n private _camerasVisible: boolean;\n private _pointsVisible: boolean;\n private _positionsVisible: boolean;\n private _tilesVisible: boolean;\n private _visualizeConnectedComponents: boolean;\n\n constructor(configuration: ISpatialDataConfiguration, scene?: THREE.Scene, raycaster?: THREE.Raycaster) {\n this._scene = !!scene ? scene : new THREE.Scene();\n this._raycaster = !!raycaster ? raycaster : new THREE.Raycaster(undefined, undefined, 0.8);\n\n this._connectedComponentColors = {};\n this._needsRender = false;\n this._interactiveObjects = [];\n this._reconstructions = {};\n this._tiles = {};\n\n this._camerasVisible = configuration.camerasVisible;\n this._pointsVisible = configuration.pointsVisible;\n this._positionsVisible = configuration.positionsVisible;\n this._tilesVisible = configuration.tilesVisible;\n this._visualizeConnectedComponents = configuration.connectedComponents;\n }\n\n public get needsRender(): boolean {\n return this._needsRender;\n }\n\n public addReconstruction(\n reconstruction: IReconstruction,\n transform: Transform,\n originalPosition: number[],\n connectedComponent: string,\n hash: string): void {\n\n if (!(hash in this._reconstructions)) {\n this._reconstructions[hash] = {\n cameraKeys: {},\n cameras: new THREE.Object3D(),\n connectedComponents: {},\n keys: [],\n points: new THREE.Object3D(),\n positions: new THREE.Object3D(),\n };\n\n this._reconstructions[hash].cameras.visible = this._camerasVisible;\n this._reconstructions[hash].points.visible = this._pointsVisible;\n this._reconstructions[hash].positions.visible = this._positionsVisible;\n\n this._scene.add(\n this._reconstructions[hash].cameras,\n this._reconstructions[hash].points,\n this._reconstructions[hash].positions);\n }\n\n if (!(connectedComponent in this._reconstructions[hash].connectedComponents)) {\n this._reconstructions[hash].connectedComponents[connectedComponent] = [];\n }\n\n if (transform.hasValidScale) {\n this._reconstructions[hash].points.add(this._createPoints(reconstruction, transform));\n }\n\n const camera: THREE.Object3D = this._createCamera(transform);\n this._reconstructions[hash].cameras.add(camera);\n for (const child of camera.children) {\n this._reconstructions[hash].cameraKeys[child.uuid] = reconstruction.main_shot;\n this._interactiveObjects.push(child);\n }\n\n this._reconstructions[hash].connectedComponents[connectedComponent].push(camera);\n\n const color: string = this._getColor(connectedComponent, this._visualizeConnectedComponents);\n this._setCameraColor(color, camera);\n\n this._reconstructions[hash].positions.add(this._createPosition(transform, originalPosition));\n\n this._reconstructions[hash].keys.push(reconstruction.main_shot);\n\n this._needsRender = true;\n }\n\n public addTile(tileBBox: number[][], hash: string): void {\n if (this.hasTile(hash)) {\n return;\n }\n\n const sw: number[] = tileBBox[0];\n const ne: number[] = tileBBox[1];\n\n const geometry: THREE.Geometry = new THREE.Geometry();\n geometry.vertices.push(\n new THREE.Vector3().fromArray(sw),\n new THREE.Vector3(sw[0], ne[1], (sw[2] + ne[2]) / 2),\n new THREE.Vector3().fromArray(ne),\n new THREE.Vector3(ne[0], sw[1], (sw[2] + ne[2]) / 2),\n new THREE.Vector3().fromArray(sw));\n\n const tile: THREE.Object3D = new THREE.Line(geometry, new THREE.LineBasicMaterial());\n\n this._tiles[hash] = new THREE.Object3D();\n this._tiles[hash].visible = this._tilesVisible;\n this._tiles[hash].add(tile);\n this._scene.add(this._tiles[hash]);\n\n this._needsRender = true;\n }\n\n public uncache(keepHashes?: string[]): void {\n for (const hash of Object.keys(this._reconstructions)) {\n if (!!keepHashes && keepHashes.indexOf(hash) !== -1) {\n continue;\n }\n\n this._disposeReconstruction(hash);\n }\n\n for (const hash of Object.keys(this._tiles)) {\n if (!!keepHashes && keepHashes.indexOf(hash) !== -1) {\n continue;\n }\n\n this._disposeTile(hash);\n }\n\n this._needsRender = true;\n }\n\n public hasReconstruction(key: string, hash: string): boolean {\n return hash in this._reconstructions && this._reconstructions[hash].keys.indexOf(key) !== -1;\n }\n\n public hasTile(hash: string): boolean {\n return hash in this._tiles;\n }\n\n public intersectObjects([viewportX, viewportY]: number[], camera: THREE.Camera): string {\n if (!this._camerasVisible) {\n return null;\n }\n\n this._raycaster.setFromCamera(new THREE.Vector2(viewportX, viewportY), camera);\n\n const intersects: THREE.Intersection[] = this._raycaster.intersectObjects(this._interactiveObjects);\n for (const intersect of intersects) {\n for (const hash in this._reconstructions) {\n if (!this._reconstructions.hasOwnProperty(hash)) {\n continue;\n }\n\n if (intersect.object.uuid in this._reconstructions[hash].cameraKeys) {\n return this._reconstructions[hash].cameraKeys[intersect.object.uuid];\n }\n }\n }\n\n return null;\n }\n\n public setCameraVisibility(visible: boolean): void {\n if (visible === this._camerasVisible) {\n return;\n }\n\n for (const hash in this._reconstructions) {\n if (!this._reconstructions.hasOwnProperty(hash)) {\n continue;\n }\n\n this._reconstructions[hash].cameras.visible = visible;\n }\n\n this._camerasVisible = visible;\n this._needsRender = true;\n }\n\n public setPointVisibility(visible: boolean): void {\n if (visible === this._pointsVisible) {\n return;\n }\n\n for (const hash in this._reconstructions) {\n if (!this._reconstructions.hasOwnProperty(hash)) {\n continue;\n }\n\n this._reconstructions[hash].points.visible = visible;\n }\n\n this._pointsVisible = visible;\n this._needsRender = true;\n\n }\n\n public setPositionVisibility(visible: boolean): void {\n if (visible === this._positionsVisible) {\n return;\n }\n\n for (const hash in this._reconstructions) {\n if (!this._reconstructions.hasOwnProperty(hash)) {\n continue;\n }\n\n this._reconstructions[hash].positions.visible = visible;\n }\n\n this._positionsVisible = visible;\n this._needsRender = true;\n }\n\n public setTileVisibility(visible: boolean): void {\n if (visible === this._tilesVisible) {\n return;\n }\n\n for (const hash in this._tiles) {\n if (!this._tiles.hasOwnProperty(hash)) {\n continue;\n }\n\n this._tiles[hash].visible = visible;\n }\n\n this._tilesVisible = visible;\n this._needsRender = true;\n }\n\n public setConnectedComponentVisualization(visualize: boolean): void {\n if (visualize === this._visualizeConnectedComponents) {\n return;\n }\n\n for (const hash in this._reconstructions) {\n if (!this._reconstructions.hasOwnProperty(hash)) {\n continue;\n }\n\n const connectedComponents: { [id: number]: THREE.Object3D[] } =\n this._reconstructions[hash].connectedComponents;\n\n for (const connectedComponent in connectedComponents) {\n if (!connectedComponents.hasOwnProperty(connectedComponent)) {\n continue;\n }\n\n const color: string = this._getColor(connectedComponent, visualize);\n\n for (const camera of connectedComponents[connectedComponent]) {\n this._setCameraColor(color, camera);\n }\n }\n }\n\n this._visualizeConnectedComponents = visualize;\n this._needsRender = true;\n }\n\n public render(\n perspectiveCamera: THREE.PerspectiveCamera,\n renderer: THREE.WebGLRenderer): void {\n\n renderer.render(this._scene, perspectiveCamera);\n\n this._needsRender = false;\n }\n\n private _arrayToFloatArray(a: number[][], columns: number): Float32Array {\n const n: number = a.length;\n const f: Float32Array = new Float32Array(n * columns);\n\n for (let i: number = 0; i < n; i++) {\n const item: number[] = a[i];\n const index: number = 3 * i;\n\n f[index + 0] = item[0];\n f[index + 1] = item[1];\n f[index + 2] = item[2];\n }\n\n return f;\n }\n\n private _createAxis(transform: Transform): THREE.Object3D {\n const north: number[] = transform.unprojectBasic([0.5, 0], 0.22);\n const south: number[] = transform.unprojectBasic([0.5, 1], 0.16);\n\n const axis: THREE.BufferGeometry = new THREE.BufferGeometry();\n axis.addAttribute(\"position\", new THREE.BufferAttribute(this._arrayToFloatArray([north, south], 3), 3));\n\n return new THREE.Line(axis, new THREE.LineBasicMaterial());\n }\n\n private _createCamera(transform: Transform): THREE.Object3D {\n return !!transform.gpano ?\n this._createPanoCamera(transform) :\n this._createPrespectiveCamera(transform);\n }\n\n private _createDiagonals(transform: Transform, depth: number): THREE.Object3D {\n const origin: number [] = transform.unprojectBasic([0, 0], 0, true);\n const topLeft: number[] = transform.unprojectBasic([0, 0], depth, true);\n const topRight: number[] = transform.unprojectBasic([1, 0], depth, true);\n const bottomRight: number[] = transform.unprojectBasic([1, 1], depth, true);\n const bottomLeft: number[] = transform.unprojectBasic([0, 1], depth, true);\n\n const vertices: number[][] = [\n origin, topLeft,\n origin, topRight,\n origin, bottomRight,\n origin, bottomLeft,\n ];\n\n const diagonals: THREE.BufferGeometry = new THREE.BufferGeometry();\n diagonals.addAttribute(\"position\", new THREE.BufferAttribute(this._arrayToFloatArray(vertices, 3), 3));\n\n return new THREE.LineSegments(diagonals, new THREE.LineBasicMaterial());\n }\n\n private _createFrame(transform: Transform, depth: number): THREE.Object3D {\n const vertices2d: number[][] = [];\n vertices2d.push(...this._subsample([0, 1], [0, 0], 20));\n vertices2d.push(...this._subsample([0, 0], [1, 0], 20));\n vertices2d.push(...this._subsample([1, 0], [1, 1], 20));\n\n const vertices3d: number[][] = vertices2d\n .map(\n (basic: number[]): number[] => {\n return transform.unprojectBasic(basic, depth, true);\n });\n\n const frame: THREE.BufferGeometry = new THREE.BufferGeometry();\n frame.addAttribute(\"position\", new THREE.BufferAttribute(this._arrayToFloatArray(vertices3d, 3), 3));\n\n return new THREE.Line(frame, new THREE.LineBasicMaterial());\n }\n\n private _createLatitude(basicY: number, numVertices: number, transform: Transform): THREE.Object3D {\n const positions: Float32Array = new Float32Array((numVertices + 1) * 3);\n\n for (let i: number = 0; i <= numVertices; i++) {\n const position: number[] = transform.unprojectBasic([i / numVertices, basicY], 0.16);\n const index: number = 3 * i;\n\n positions[index + 0] = position[0];\n positions[index + 1] = position[1];\n positions[index + 2] = position[2];\n }\n\n const latitude: THREE.BufferGeometry = new THREE.BufferGeometry();\n latitude.addAttribute(\"position\", new THREE.BufferAttribute(positions, 3));\n\n return new THREE.Line(latitude, new THREE.LineBasicMaterial());\n }\n\n private _createLongitude(basicX: number, numVertices: number, transform: Transform): THREE.Object3D {\n const positions: Float32Array = new Float32Array((numVertices + 1) * 3);\n\n for (let i: number = 0; i <= numVertices; i++) {\n const position: number[] = transform.unprojectBasic([basicX, i / numVertices], 0.16);\n const index: number = 3 * i;\n\n positions[index + 0] = position[0];\n positions[index + 1] = position[1];\n positions[index + 2] = position[2];\n }\n\n const latitude: THREE.BufferGeometry = new THREE.BufferGeometry();\n latitude.addAttribute(\"position\", new THREE.BufferAttribute(positions, 3));\n\n return new THREE.Line(latitude, new THREE.LineBasicMaterial());\n }\n\n private _createPanoCamera(transform: Transform): THREE.Object3D {\n const camera: THREE.Object3D = new THREE.Object3D();\n\n camera.children.push(this._createAxis(transform));\n camera.children.push(this._createLatitude(0.5, 10, transform));\n camera.children.push(this._createLongitude(0, 6, transform));\n camera.children.push(this._createLongitude(0.25, 6, transform));\n camera.children.push(this._createLongitude(0.5, 6, transform));\n camera.children.push(this._createLongitude(0.75, 6, transform));\n\n return camera;\n }\n\n private _createPoints(reconstruction: IReconstruction, transform: Transform): THREE.Object3D {\n const srtInverse: THREE.Matrix4 = new THREE.Matrix4().getInverse(transform.srt);\n const points: IReconstructionPoint[] = Object\n .keys(reconstruction.points)\n .map(\n (key: string): IReconstructionPoint => {\n return reconstruction.points[key];\n });\n\n const numPoints: number = points.length;\n const positions: Float32Array = new Float32Array(numPoints * 3);\n const colors: Float32Array = new Float32Array(numPoints * 3);\n\n for (let i: number = 0; i < numPoints; i++) {\n const index: number = 3 * i;\n\n const coords: number[] = points[i].coordinates;\n const point: THREE.Vector3 = new THREE.Vector3(coords[0], coords[1], coords[2])\n .applyMatrix4(srtInverse);\n\n positions[index + 0] = point.x;\n positions[index + 1] = point.y;\n positions[index + 2] = point.z;\n\n const color: number[] = points[i].color;\n colors[index + 0] = color[0] / 255.0;\n colors[index + 1] = color[1] / 255.0;\n colors[index + 2] = color[2] / 255.0;\n }\n\n const geometry: THREE.BufferGeometry = new THREE.BufferGeometry();\n geometry.addAttribute(\"position\", new THREE.BufferAttribute(positions, 3));\n geometry.addAttribute(\"color\", new THREE.BufferAttribute(colors, 3));\n\n const material: THREE.PointsMaterial = new THREE.PointsMaterial({\n size: 0.1,\n vertexColors: THREE.VertexColors,\n });\n\n return new THREE.Points(geometry, material);\n }\n\n private _createPosition(transform: Transform, originalPosition: number[]): THREE.Object3D {\n const computedPosition: number[] = transform.unprojectBasic([0, 0], 0);\n const vertices: number[][] = [originalPosition, computedPosition];\n const geometry: THREE.BufferGeometry = new THREE.BufferGeometry();\n geometry.addAttribute(\"position\", new THREE.BufferAttribute(this._arrayToFloatArray(vertices, 3), 3));\n\n return new THREE.Line(\n geometry,\n new THREE.LineBasicMaterial({ color: new THREE.Color(1, 0, 0) }));\n }\n\n private _createPrespectiveCamera(transform: Transform): THREE.Object3D {\n const depth: number = 0.2;\n const camera: THREE.Object3D = new THREE.Object3D();\n\n camera.children.push(this._createDiagonals(transform, depth));\n camera.children.push(this._createFrame(transform, depth));\n\n return camera;\n }\n\n private _disposeCameras(hash: string): void {\n const tileCameras: THREE.Object3D = this._reconstructions[hash].cameras;\n\n for (const camera of tileCameras.children.slice()) {\n for (const child of camera.children) {\n (<THREE.Line>child).geometry.dispose();\n (<THREE.Line>child).material.dispose();\n\n const index: number = this._interactiveObjects.indexOf(child);\n if (index !== -1) {\n this._interactiveObjects.splice(index, 1);\n } else {\n console.warn(`Object does not exist (${child.id}) for ${hash}`);\n }\n }\n\n tileCameras.remove(camera);\n }\n\n this._scene.remove(tileCameras);\n }\n\n private _disposePoints(hash: string): void {\n const tilePoints: THREE.Object3D = this._reconstructions[hash].points;\n\n for (const points of tilePoints.children.slice()) {\n (<THREE.Points>points).geometry.dispose();\n (<THREE.Points>points).material.dispose();\n\n tilePoints.remove(points);\n }\n\n this._scene.remove(tilePoints);\n }\n\n private _disposePositions(hash: string): void {\n const tilePositions: THREE.Object3D = this._reconstructions[hash].positions;\n\n for (const position of tilePositions.children.slice()) {\n (<THREE.Points>position).geometry.dispose();\n (<THREE.Points>position).material.dispose();\n\n tilePositions.remove(position);\n }\n\n this._scene.remove(tilePositions);\n }\n\n private _disposeReconstruction(hash: string): void {\n this._disposeCameras(hash);\n this._disposePoints(hash);\n this._disposePositions(hash);\n\n delete this._reconstructions[hash];\n }\n\n private _disposeTile(hash: string): void {\n const tile: THREE.Object3D = this._tiles[hash];\n\n for (const line of tile.children.slice()) {\n (<THREE.Line>line).geometry.dispose();\n (<THREE.Line>line).material.dispose();\n\n tile.remove(line);\n }\n\n this._scene.remove(tile);\n\n delete this._tiles[hash];\n }\n\n private _getColor(connectedComponent: string, visualizeConnectedComponents: boolean): string {\n return visualizeConnectedComponents ?\n this._getConnectedComponentColor(connectedComponent) :\n \"#FFFFFF\";\n }\n\n private _getConnectedComponentColor(connectedComponent: string): string {\n if (!(connectedComponent in this._connectedComponentColors)) {\n this._connectedComponentColors[connectedComponent] = this._randomColor();\n }\n\n return this._connectedComponentColors[connectedComponent];\n }\n\n private _interpolate(a: number, b: number, alpha: number): number {\n return a + alpha * (b - a);\n }\n\n private _randomColor(): string {\n return `hsl(${Math.floor(360 * Math.random())}, 100%, 65%)`;\n }\n\n private _setCameraColor(color: string, camera: THREE.Object3D): void {\n for (const child of camera.children) {\n (<THREE.LineBasicMaterial>(<THREE.Line>child).material).color = new THREE.Color(color);\n }\n }\n\n private _subsample(p1: number[], p2: number[], subsamples: number): number[][] {\n if (subsamples < 1) {\n return [p1, p2];\n }\n\n const samples: number[][] = [];\n\n for (let i: number = 0; i <= subsamples + 1; i++) {\n const p: number[] = [];\n\n for (let j: number = 0; j < 3; j++) {\n p.push(this._interpolate(p1[j], p2[j], i / (subsamples + 1)));\n }\n\n samples.push(p);\n }\n\n return samples;\n }\n}\n\nexport default SpatialDataScene;\n",
+ "export {GeometryTagError} from \"./error/GeometryTagError\";\nexport {PointGeometry} from \"./geometry/PointGeometry\";\nexport {RectGeometry} from \"./geometry/RectGeometry\";\nexport {PolygonGeometry} from \"./geometry/PolygonGeometry\";\nexport {IOutlineTagOptions} from \"./interfaces/IOutlineTagOptions\";\nexport {OutlineTag} from \"./tag/OutlineTag\";\nexport {SpotTag} from \"./tag/SpotTag\";\nexport {TagDomain} from \"./tag/TagDomain\";\nexport {TagComponent} from \"./TagComponent\";\nexport {TagMode} from \"./TagMode\";\n",
+ "import {\n combineLatest as observableCombineLatest,\n empty as observableEmpty,\n merge as observableMerge,\n from as observableFrom,\n Observable,\n Subscription,\n} from \"rxjs\";\n\nimport {\n startWith,\n first,\n tap,\n map,\n share,\n skipWhile,\n filter,\n mergeMap,\n refCount,\n publishReplay,\n switchMap,\n distinctUntilChanged,\n} from \"rxjs/operators\";\n\nimport * as when from \"when\";\n\nimport {\n ComponentService,\n Component,\n CreateHandlerBase,\n CreatePointHandler,\n CreatePolygonHandler,\n CreateRectHandler,\n CreateRectDragHandler,\n EditVertexHandler,\n Geometry,\n ITagConfiguration,\n OutlineCreateTag,\n RenderTag,\n Tag,\n TagCreator,\n TagDOMRenderer,\n TagMode,\n TagScene,\n TagSet,\n} from \"../../Component\";\nimport {\n Transform,\n ViewportCoords,\n} from \"../../Geo\";\nimport {\n GLRenderStage,\n IGLRenderHash,\n ISize,\n IVNodeHash,\n RenderCamera,\n} from \"../../Render\";\nimport {IFrame} from \"../../State\";\nimport {\n Container,\n ISpriteAtlas,\n Navigator,\n} from \"../../Viewer\";\n\n/**\n * @class TagComponent\n *\n * @classdesc Component for showing and editing tags with different\n * geometries composed from 2D basic image coordinates (see the\n * {@link Viewer} class documentation for more information about coordinate\n * systems).\n *\n * The `add` method is used for adding new tags or replacing\n * tags already in the set. Tags are removed by id.\n *\n * If a tag already in the set has the same\n * id as one of the tags added, the old tag will be removed and\n * the added tag will take its place.\n *\n * The tag component mode can be set to either be non interactive or\n * to be in creating mode of a certain geometry type.\n *\n * The tag properties can be updated at any time and the change will\n * be visibile immediately.\n *\n * Tags are only relevant to a single image because they are based on\n * 2D basic image coordinates. Tags related to a certain image should\n * be removed when the viewer is moved to another node.\n *\n * To retrive and use the tag component\n *\n * @example\n * ```\n * var viewer = new Mapillary.Viewer(\n * \"<element-id>\",\n * \"<client-id>\",\n * \"<my key>\",\n * { component: { tag: true } });\n *\n * var tagComponent = viewer.getComponent(\"tag\");\n * ```\n */\nexport class TagComponent extends Component<ITagConfiguration> {\n /** @inheritdoc */\n public static componentName: string = \"tag\";\n\n /**\n * Event fired when an interaction to create a geometry ends.\n *\n * @description A create interaction can by a geometry being created\n * or by the creation being aborted.\n *\n * @event TagComponent#creategeometryend\n * @type {TagComponent} Tag component.\n * @example\n * ```\n * tagComponent.on(\"creategeometryend\", function(component) {\n * console.log(component);\n * });\n * ```\n */\n public static creategeometryend: string = \"creategeometryend\";\n\n /**\n * Event fired when an interaction to create a geometry starts.\n *\n * @description A create interaction starts when the first vertex\n * is created in the geometry.\n *\n * @event TagComponent#creategeometrystart\n * @type {TagComponent} Tag component.\n * @example\n * ```\n * tagComponent.on(\"creategeometrystart\", function(component) {\n * console.log(component);\n * });\n * ```\n */\n public static creategeometrystart: string = \"creategeometrystart\";\n\n /**\n * Event fired when the create mode is changed.\n *\n * @event TagComponent#modechanged\n * @type {TagMode} Tag mode\n * @example\n * ```\n * tagComponent.on(\"modechanged\", function(mode) {\n * console.log(mode);\n * });\n * ```\n */\n public static modechanged: string = \"modechanged\";\n\n /**\n * Event fired when a geometry has been created.\n *\n * @event TagComponent#geometrycreated\n * @type {Geometry} Created geometry.\n * @example\n * ```\n * tagComponent.on(\"geometrycreated\", function(geometry) {\n * console.log(geometry);\n * });\n * ```\n */\n public static geometrycreated: string = \"geometrycreated\";\n\n /**\n * Event fired when the tags collection has changed.\n *\n * @event TagComponent#tagschanged\n * @type {TagComponent} Tag component.\n * @example\n * ```\n * tagComponent.on(\"tagschanged\", function(component) {\n * console.log(component.getAll());\n * });\n * ```\n */\n public static tagschanged: string = \"tagschanged\";\n\n private _tagDomRenderer: TagDOMRenderer;\n private _tagScene: TagScene;\n private _tagSet: TagSet;\n private _tagCreator: TagCreator;\n private _viewportCoords: ViewportCoords;\n\n private _renderTags$: Observable<RenderTag<Tag>[]>;\n private _tagChanged$: Observable<Tag>;\n private _renderTagGLChanged$: Observable<RenderTag<Tag>>;\n private _createGeometryChanged$: Observable<OutlineCreateTag>;\n private _createGLObjectsChanged$: Observable<OutlineCreateTag>;\n\n private _creatingConfiguration$: Observable<ITagConfiguration>;\n\n private _updateGLObjectsSubscription: Subscription;\n private _updateTagSceneSubscription: Subscription;\n\n private _stopCreateSubscription: Subscription;\n private _setGLCreateTagSubscription: Subscription;\n private _createGLObjectsChangedSubscription: Subscription;\n\n private _handlerStopCreateSubscription: Subscription;\n private _handlerEnablerSubscription: Subscription;\n\n private _domSubscription: Subscription;\n private _glSubscription: Subscription;\n\n private _fireCreateGeometryEventSubscription: Subscription;\n private _fireGeometryCreatedSubscription: Subscription;\n private _fireTagsChangedSubscription: Subscription;\n\n private _createHandlers: { [K in keyof typeof TagMode]: CreateHandlerBase };\n private _editVertexHandler: EditVertexHandler;\n\n /** @ignore */\n constructor(name: string, container: Container, navigator: Navigator) {\n super(name, container, navigator);\n\n this._tagDomRenderer = new TagDOMRenderer();\n this._tagScene = new TagScene();\n this._tagSet = new TagSet();\n this._tagCreator = new TagCreator(this, navigator);\n this._viewportCoords = new ViewportCoords();\n\n this._createHandlers = {\n \"CreatePoint\": new CreatePointHandler(this, container, navigator, this._viewportCoords, this._tagCreator),\n \"CreatePolygon\": new CreatePolygonHandler(this, container, navigator, this._viewportCoords, this._tagCreator),\n \"CreateRect\": new CreateRectHandler(this, container, navigator, this._viewportCoords, this._tagCreator),\n \"CreateRectDrag\": new CreateRectDragHandler(this, container, navigator, this._viewportCoords, this._tagCreator),\n \"Default\": undefined,\n };\n\n this._editVertexHandler = new EditVertexHandler(this, container, navigator, this._viewportCoords, this._tagSet);\n\n this._renderTags$ = this._tagSet.changed$.pipe(\n map(\n (tagSet: TagSet): RenderTag<Tag>[] => {\n const tags: RenderTag<Tag>[] = tagSet.getAll();\n\n // ensure that tags are always rendered in the same order\n // to avoid hover tracking problems on first resize.\n tags.sort(\n (t1: RenderTag<Tag>, t2: RenderTag<Tag>): number => {\n const id1: string = t1.tag.id;\n const id2: string = t2.tag.id;\n\n if (id1 < id2) {\n return -1;\n }\n\n if (id1 > id2) {\n return 1;\n }\n\n return 0;\n });\n\n return tags;\n }),\n share());\n\n this._tagChanged$ = this._renderTags$.pipe(\n switchMap(\n (tags: RenderTag<Tag>[]): Observable<Tag> => {\n return observableFrom(tags).pipe(\n mergeMap(\n (tag: RenderTag<Tag>): Observable<Tag> => {\n return observableMerge(\n tag.tag.changed$,\n tag.tag.geometryChanged$);\n }));\n }),\n share());\n\n this._renderTagGLChanged$ = this._renderTags$.pipe(\n switchMap(\n (tags: RenderTag<Tag>[]): Observable<RenderTag<Tag>> => {\n return observableFrom(tags).pipe(\n mergeMap(\n (tag: RenderTag<Tag>): Observable<RenderTag<Tag>> => {\n return tag.glObjectsChanged$;\n }));\n }),\n share());\n\n this._createGeometryChanged$ = this._tagCreator.tag$.pipe(\n switchMap(\n (tag: OutlineCreateTag): Observable<OutlineCreateTag> => {\n return tag != null ?\n tag.geometryChanged$ :\n observableEmpty();\n }),\n share());\n\n this._createGLObjectsChanged$ = this._tagCreator.tag$.pipe(\n switchMap(\n (tag: OutlineCreateTag): Observable<OutlineCreateTag> => {\n return tag != null ?\n tag.glObjectsChanged$ :\n observableEmpty();\n }),\n share());\n\n this._creatingConfiguration$ = this._configuration$.pipe(\n distinctUntilChanged(\n (c1: ITagConfiguration, c2: ITagConfiguration): boolean => {\n return c1.mode === c2.mode;\n },\n (configuration: ITagConfiguration): ITagConfiguration => {\n return {\n createColor: configuration.createColor,\n mode: configuration.mode,\n };\n }),\n publishReplay(1),\n refCount());\n\n this._creatingConfiguration$\n .subscribe(\n (configuration: ITagConfiguration): void => {\n this.fire(TagComponent.modechanged, configuration.mode);\n });\n }\n\n /**\n * Add tags to the tag set or replace tags in the tag set.\n *\n * @description If a tag already in the set has the same\n * id as one of the tags added, the old tag will be removed\n * the added tag will take its place.\n *\n * @param {Array<Tag>} tags - Tags to add.\n *\n * @example ```tagComponent.add([tag1, tag2]);```\n */\n public add(tags: Tag[]): void {\n if (this._activated) {\n this._navigator.stateService.currentTransform$.pipe(\n first())\n .subscribe(\n (transform: Transform): void => {\n this._tagSet.add(tags, transform);\n\n const renderTags: RenderTag<Tag>[] = tags\n .map(\n (tag: Tag): RenderTag<Tag> => {\n return this._tagSet.get(tag.id);\n });\n\n this._tagScene.add(renderTags);\n });\n } else {\n this._tagSet.addDeactivated(tags);\n }\n }\n\n /**\n * Change the current tag mode.\n *\n * @description Change the tag mode to one of the create modes for creating new geometries.\n *\n * @param {TagMode} mode - New tag mode.\n *\n * @fires TagComponent#modechanged\n *\n * @example ```tagComponent.changeMode(Mapillary.TagComponent.TagMode.CreateRect);```\n */\n public changeMode(mode: TagMode): void {\n this.configure({ mode: mode });\n }\n\n /**\n * Returns the tag in the tag set with the specified id, or\n * undefined if the id matches no tag.\n *\n * @param {string} tagId - Id of the tag.\n *\n * @example ```var tag = tagComponent.get(\"tagId\");```\n */\n public get(tagId: string): Tag {\n if (this._activated) {\n const renderTag: RenderTag<Tag> = this._tagSet.get(tagId);\n return renderTag !== undefined ? renderTag.tag : undefined;\n } else {\n return this._tagSet.getDeactivated(tagId);\n }\n }\n\n /**\n * Returns an array of all tags.\n *\n * @example ```var tags = tagComponent.getAll();```\n */\n public getAll(): Tag[] {\n if (this.activated) {\n return this._tagSet\n .getAll()\n .map(\n (renderTag: RenderTag<Tag>): Tag => {\n return renderTag.tag;\n });\n } else {\n return this._tagSet.getAllDeactivated();\n }\n }\n\n /**\n * Returns an array of tag ids for tags that contain the specified point.\n *\n * @description The pixel point must lie inside the polygon or rectangle\n * of an added tag for the tag id to be returned. Tag ids for\n * tags that do not have a fill will also be returned if the point is inside\n * the geometry of the tag. Tags with point geometries can not be retrieved.\n *\n * No tag ids will be returned for polygons rendered in cropped panoramas or\n * rectangles rendered in panoramas.\n *\n * Notice that the pixelPoint argument requires x, y coordinates from pixel space.\n *\n * With this function, you can use the coordinates provided by mouse\n * events to get information out of the tag component.\n *\n * If no tag at exist the pixel point, an empty array will be returned.\n *\n * @param {Array<number>} pixelPoint - Pixel coordinates on the viewer element.\n * @returns {Array<string>} Ids of the tags that contain the specified pixel point.\n *\n * @example\n * ```\n * tagComponent.getTagIdsAt([100, 100])\n * .then((tagIds) => { console.log(tagIds); });\n * ```\n */\n public getTagIdsAt(pixelPoint: number[]): when.Promise<string[]> {\n return when.promise<string[]>((resolve: (value: string[]) => void, reject: (reason: Error) => void): void => {\n this._container.renderService.renderCamera$.pipe(\n first(),\n map(\n (render: RenderCamera): string[] => {\n const viewport: number[] = this._viewportCoords\n .canvasToViewport(\n pixelPoint[0],\n pixelPoint[1],\n this._container.element);\n\n const ids: string[] = this._tagScene.intersectObjects(viewport, render.perspective);\n\n return ids;\n }))\n .subscribe(\n (ids: string[]): void => {\n resolve(ids);\n },\n (error: Error): void => {\n reject(error);\n });\n });\n }\n\n /**\n * Check if a tag exist in the tag set.\n *\n * @param {string} tagId - Id of the tag.\n *\n * @example ```var tagExists = tagComponent.has(\"tagId\");```\n */\n public has(tagId: string): boolean {\n return this._activated ? this._tagSet.has(tagId) : this._tagSet.hasDeactivated(tagId);\n }\n\n /**\n * Remove tags with the specified ids from the tag set.\n *\n * @param {Array<string>} tagIds - Ids for tags to remove.\n *\n * @example ```tagComponent.remove([\"id-1\", \"id-2\"]);```\n */\n public remove(tagIds: string[]): void {\n if (this._activated) {\n this._tagSet.remove(tagIds);\n this._tagScene.remove(tagIds);\n } else {\n this._tagSet.removeDeactivated(tagIds);\n }\n }\n\n /**\n * Remove all tags from the tag set.\n *\n * @example ```tagComponent.removeAll();```\n */\n public removeAll(): void {\n if (this._activated) {\n this._tagSet.removeAll();\n this._tagScene.removeAll();\n } else {\n this._tagSet.removeAllDeactivated();\n }\n }\n\n protected _activate(): void {\n this._editVertexHandler.enable();\n\n const handlerGeometryCreated$: Observable<Geometry> =\n observableFrom<keyof typeof TagMode>(<(keyof typeof TagMode)[]>Object.keys(this._createHandlers)).pipe(\n map(\n (key: keyof typeof TagMode): CreateHandlerBase => {\n return this._createHandlers[key];\n }),\n filter(\n (handler: CreateHandlerBase): boolean => {\n return !!handler;\n }),\n mergeMap(\n (handler: CreateHandlerBase): Observable<Geometry> => {\n return handler.geometryCreated$;\n }),\n share());\n\n this._fireGeometryCreatedSubscription = handlerGeometryCreated$\n .subscribe(\n (geometry: Geometry): void => {\n this.fire(TagComponent.geometrycreated, geometry);\n });\n\n this._fireCreateGeometryEventSubscription = this._tagCreator.tag$.pipe(\n skipWhile(\n (tag: OutlineCreateTag): boolean => {\n return tag == null;\n }),\n distinctUntilChanged())\n .subscribe(\n (tag: OutlineCreateTag): void => {\n const eventType: string = tag != null ?\n TagComponent.creategeometrystart :\n TagComponent.creategeometryend;\n\n this.fire(eventType, this);\n });\n\n this._handlerStopCreateSubscription = handlerGeometryCreated$\n .subscribe(\n (): void => {\n this.changeMode(TagMode.Default);\n });\n\n this._handlerEnablerSubscription = this._creatingConfiguration$\n .subscribe(\n (configuration: ITagConfiguration): void => {\n this._disableCreateHandlers();\n\n const mode: keyof typeof TagMode = <keyof typeof TagMode>TagMode[configuration.mode];\n const handler: CreateHandlerBase = this._createHandlers[mode];\n if (!!handler) {\n handler.enable();\n }\n });\n\n this._fireTagsChangedSubscription = this._renderTags$\n .subscribe(\n (tags: RenderTag<Tag>[]): void => {\n this.fire(TagComponent.tagschanged, this);\n });\n\n this._stopCreateSubscription = this._tagCreator.tag$.pipe(\n switchMap(\n (tag: OutlineCreateTag): Observable<void> => {\n return tag != null ?\n tag.aborted$.pipe(\n map((t: OutlineCreateTag): void => { return null; })) :\n observableEmpty();\n }))\n .subscribe((): void => { this.changeMode(TagMode.Default); });\n\n this._setGLCreateTagSubscription = this._tagCreator.tag$\n .subscribe(\n (tag: OutlineCreateTag): void => {\n if (this._tagScene.hasCreateTag()) {\n this._tagScene.removeCreateTag();\n }\n\n if (tag != null) {\n this._tagScene.addCreateTag(tag);\n }\n });\n\n this._createGLObjectsChangedSubscription = this._createGLObjectsChanged$\n .subscribe(\n (tag: OutlineCreateTag): void => {\n this._tagScene.updateCreateTagObjects(tag);\n });\n\n this._updateGLObjectsSubscription = this._renderTagGLChanged$\n .subscribe(\n (tag: RenderTag<Tag>): void => {\n this._tagScene.updateObjects(tag);\n });\n\n this._updateTagSceneSubscription = this._tagChanged$\n .subscribe(\n (tag: Tag): void => {\n this._tagScene.update();\n });\n\n this._domSubscription = observableCombineLatest(\n this._renderTags$.pipe(\n startWith([]),\n tap(\n (tags: RenderTag<Tag>[]): void => {\n this._container.domRenderer.render$.next({\n name: this._name,\n vnode: this._tagDomRenderer.clear(),\n });\n })),\n this._container.renderService.renderCamera$,\n this._container.spriteService.spriteAtlas$,\n this._container.renderService.size$,\n this._tagChanged$.pipe(startWith(null)),\n observableMerge(\n this._tagCreator.tag$,\n this._createGeometryChanged$).pipe(startWith(null))).pipe(\n map(\n ([renderTags, rc, atlas, size, tag, ct]: [RenderTag<Tag>[], RenderCamera, ISpriteAtlas, ISize, Tag, OutlineCreateTag]):\n IVNodeHash => {\n return {\n name: this._name,\n vnode: this._tagDomRenderer.render(renderTags, ct, atlas, rc.perspective, size),\n };\n }))\n .subscribe(this._container.domRenderer.render$);\n\n this._glSubscription = this._navigator.stateService.currentState$.pipe(\n map(\n (frame: IFrame): IGLRenderHash => {\n const tagScene: TagScene = this._tagScene;\n\n return {\n name: this._name,\n render: {\n frameId: frame.id,\n needsRender: tagScene.needsRender,\n render: tagScene.render.bind(tagScene),\n stage: GLRenderStage.Foreground,\n },\n };\n }))\n .subscribe(this._container.glRenderer.render$);\n\n this._navigator.stateService.currentTransform$.pipe(\n first())\n .subscribe(\n (transform: Transform): void => {\n this._tagSet.activate(transform);\n this._tagScene.add(this._tagSet.getAll());\n });\n\n }\n\n protected _deactivate(): void {\n this._editVertexHandler.disable();\n this._disableCreateHandlers();\n\n this._tagScene.clear();\n this._tagSet.deactivate();\n\n this._tagCreator.delete$.next(null);\n\n this._updateGLObjectsSubscription.unsubscribe();\n this._updateTagSceneSubscription.unsubscribe();\n\n this._stopCreateSubscription.unsubscribe();\n this._setGLCreateTagSubscription.unsubscribe();\n this._createGLObjectsChangedSubscription.unsubscribe();\n\n this._domSubscription.unsubscribe();\n this._glSubscription.unsubscribe();\n\n this._fireCreateGeometryEventSubscription.unsubscribe();\n this._fireGeometryCreatedSubscription.unsubscribe();\n this._fireTagsChangedSubscription.unsubscribe();\n\n this._handlerStopCreateSubscription.unsubscribe();\n this._handlerEnablerSubscription.unsubscribe();\n\n this._container.element.classList.remove(\"component-tag-create\");\n }\n\n protected _getDefaultConfiguration(): ITagConfiguration {\n return {\n createColor: 0xFFFFFF,\n mode: TagMode.Default,\n };\n }\n\n private _disableCreateHandlers(): void {\n const createHandlers: { [K in keyof typeof TagMode]: CreateHandlerBase } = this._createHandlers;\n for (const key in createHandlers) {\n if (!createHandlers.hasOwnProperty(key)) {\n continue;\n }\n\n const handler: CreateHandlerBase = createHandlers[<keyof typeof TagMode>key];\n if (!!handler) {\n handler.disable();\n }\n }\n }\n}\n\nComponentService.register(TagComponent);\nexport default TagComponent;\n",
+ "import {scan, share, withLatestFrom, map} from \"rxjs/operators\";\nimport {Observable, Subject} from \"rxjs\";\n\nimport {\n Component,\n ITagConfiguration,\n OutlineCreateTag,\n PolygonGeometry,\n RectGeometry,\n} from \"../../Component\";\nimport {Transform} from \"../../Geo\";\nimport {Navigator} from \"../../Viewer\";\n\ninterface ICreateTagOperation {\n (tag: OutlineCreateTag): OutlineCreateTag;\n}\n\nexport class TagCreator {\n private _component: Component<ITagConfiguration>;\n private _navigator: Navigator;\n\n private _tagOperation$: Subject<ICreateTagOperation>;\n private _tag$: Observable<OutlineCreateTag>;\n\n private _createPolygon$: Subject<number[]>;\n private _createRect$: Subject<number[]>;\n private _delete$: Subject<void>;\n\n constructor(component: Component<ITagConfiguration>, navigator: Navigator) {\n this._component = component;\n this._navigator = navigator;\n\n this._tagOperation$ = new Subject<ICreateTagOperation>();\n this._createPolygon$ = new Subject<number[]>();\n this._createRect$ = new Subject<number[]>();\n this._delete$ = new Subject<void>();\n\n this._tag$ = this._tagOperation$.pipe(\n scan(\n (tag: OutlineCreateTag, operation: ICreateTagOperation): OutlineCreateTag => {\n return operation(tag);\n },\n null),\n share());\n\n this._createRect$.pipe(\n withLatestFrom(\n this._component.configuration$,\n this._navigator.stateService.currentTransform$),\n map(\n ([coord, conf, transform]: [number[], ITagConfiguration, Transform]): ICreateTagOperation => {\n return (tag: OutlineCreateTag): OutlineCreateTag => {\n const geometry: RectGeometry = new RectGeometry([\n coord[0],\n coord[1],\n coord[0],\n coord[1],\n ]);\n\n return new OutlineCreateTag(geometry, { color: conf.createColor }, transform);\n };\n }))\n .subscribe(this._tagOperation$);\n\n this._createPolygon$.pipe(\n withLatestFrom(\n this._component.configuration$,\n this._navigator.stateService.currentTransform$),\n map(\n ([coord, conf, transform]: [number[], ITagConfiguration, Transform]): ICreateTagOperation => {\n return (tag: OutlineCreateTag): OutlineCreateTag => {\n const geometry: PolygonGeometry = new PolygonGeometry([\n [coord[0], coord[1]],\n [coord[0], coord[1]],\n [coord[0], coord[1]],\n ]);\n\n return new OutlineCreateTag(geometry, { color: conf.createColor }, transform);\n };\n }))\n .subscribe(this._tagOperation$);\n\n this._delete$.pipe(\n map(\n (): ICreateTagOperation => {\n return (tag: OutlineCreateTag): OutlineCreateTag => {\n return null;\n };\n }))\n .subscribe(this._tagOperation$);\n }\n\n public get createRect$(): Subject<number[]> {\n return this._createRect$;\n }\n\n public get createPolygon$(): Subject<number[]> {\n return this._createPolygon$;\n }\n\n public get delete$(): Subject<void> {\n return this._delete$;\n }\n\n public get tag$(): Observable<OutlineCreateTag> {\n return this._tag$;\n }\n}\n\nexport default TagCreator;\n",
+ "import * as THREE from \"three\";\nimport * as vd from \"virtual-dom\";\n\nimport {\n OutlineCreateTag,\n RenderTag,\n Tag,\n} from \"../../Component\";\nimport {ISize} from \"../../Render\";\nimport {ISpriteAtlas} from \"../../Viewer\";\n\nexport class TagDOMRenderer {\n public render(\n tags: RenderTag<Tag>[],\n createTag: OutlineCreateTag,\n atlas: ISpriteAtlas,\n camera: THREE.PerspectiveCamera,\n size: ISize): vd.VNode {\n\n let vNodes: vd.VNode[] = [];\n\n for (const tag of tags) {\n vNodes = vNodes.concat(tag.getDOMObjects(atlas, camera, size));\n }\n\n if (createTag != null) {\n vNodes = vNodes.concat(createTag.getDOMObjects(camera, size));\n }\n\n return vd.h(\"div.TagContainer\", {}, vNodes);\n }\n\n public clear(): vd.VNode {\n return vd.h(\"div\", {}, []);\n }\n}\n",
+ "/**\n * Enumeration for tag modes\n * @enum {number}\n * @readonly\n * @description Modes for the interaction in the tag component.\n */\nexport enum TagMode {\n /**\n * Disables creating tags.\n */\n Default,\n\n /**\n * Create a point geometry through a click.\n */\n CreatePoint,\n\n /**\n * Create a polygon geometry through clicks.\n */\n CreatePolygon,\n\n /**\n * Create a rect geometry through clicks.\n */\n CreateRect,\n\n /**\n * Create a rect geometry through drag.\n *\n * @description Claims the mouse which results in mouse handlers like\n * drag pan and scroll zoom becoming inactive.\n */\n CreateRectDrag,\n}\n\nexport default TagMode;\n",
"export enum TagOperation {\n None,\n Centroid,\n Vertex,\n}\n\nexport default TagOperation;\n",
- "/// <reference path=\"../../../typings/index.d.ts\" />\n\nimport * as THREE from \"three\";\n\nimport {OutlineCreateTag, RenderTag, Tag} from \"../../Component\";\n\ntype TagObjects = {\n tag: RenderTag<Tag>;\n objects: THREE.Object3D[];\n retrievableObjects: THREE.Object3D[];\n};\n\ntype CreateTagObjects = {\n tag: OutlineCreateTag;\n objects: THREE.Object3D[];\n};\n\nexport class TagScene {\n private _createTag: CreateTagObjects;\n private _needsRender: boolean;\n private _objectTags: { [uuid: string]: string };\n private _raycaster: THREE.Raycaster;\n private _retrievableObjects: THREE.Object3D[];\n private _scene: THREE.Scene;\n private _tags: { [id: string]: TagObjects };\n\n constructor(scene?: THREE.Scene, raycaster?: THREE.Raycaster) {\n this._createTag = null;\n this._needsRender = false;\n this._raycaster = !!raycaster ? raycaster : new THREE.Raycaster();\n this._scene = !!scene ? scene : new THREE.Scene();\n\n this._objectTags = {};\n this._retrievableObjects = [];\n this._tags = {};\n }\n\n public get needsRender(): boolean {\n return this._needsRender;\n }\n\n public add(tags: RenderTag<Tag>[]): void {\n for (let tag of tags) {\n if (tag.tag.id in this._tags) {\n this._remove(tag.tag.id);\n }\n\n this._add(tag);\n }\n\n this._needsRender = true;\n }\n\n public addCreateTag(tag: OutlineCreateTag): void {\n for (const object of tag.glObjects) {\n this._scene.add(object);\n }\n\n this._createTag = { tag: tag, objects: tag.glObjects };\n\n this._needsRender = true;\n }\n\n public clear(): void {\n for (const id of Object.keys(this._tags)) {\n this._remove(id);\n }\n\n this._needsRender = false;\n }\n\n public get(id: string): RenderTag<Tag> {\n return this.has(id) ? this._tags[id].tag : undefined;\n }\n\n public has(id: string): boolean {\n return id in this._tags;\n }\n\n public hasCreateTag(): boolean {\n return this._createTag != null;\n }\n\n public intersectObjects([viewportX, viewportY]: number[], camera: THREE.Camera): string[] {\n this._raycaster.setFromCamera(new THREE.Vector2(viewportX, viewportY), camera);\n\n const intersects: THREE.Intersection[] = this._raycaster.intersectObjects(this._retrievableObjects);\n const intersectedIds: string[] = [];\n for (const intersect of intersects) {\n if (intersect.object.uuid in this._objectTags) {\n intersectedIds.push(this._objectTags[intersect.object.uuid]);\n }\n }\n\n return intersectedIds;\n }\n\n public remove(ids: string[]): void {\n for (const id of ids) {\n this._remove(id);\n }\n\n this._needsRender = true;\n }\n\n public removeAll(): void {\n for (const id of Object.keys(this._tags)) {\n this._remove(id);\n }\n\n this._needsRender = true;\n }\n\n public removeCreateTag(): void {\n if (this._createTag == null) {\n return;\n }\n\n for (const object of this._createTag.objects) {\n this._scene.remove(object);\n }\n\n this._createTag.tag.dispose();\n this._createTag = null;\n\n this._needsRender = true;\n }\n\n public render(\n perspectiveCamera: THREE.PerspectiveCamera,\n renderer: THREE.Renderer): void {\n\n renderer.render(this._scene, perspectiveCamera);\n\n this._needsRender = false;\n }\n\n public update(): void {\n this._needsRender = true;\n }\n\n public updateCreateTagObjects(tag: OutlineCreateTag): void {\n if (this._createTag.tag !== tag) {\n throw new Error(\"Create tags do not have the same reference.\");\n }\n\n for (let object of this._createTag.objects) {\n this._scene.remove(object);\n }\n\n for (const object of tag.glObjects) {\n this._scene.add(object);\n }\n\n this._createTag.objects = tag.glObjects;\n\n this._needsRender = true;\n }\n\n public updateObjects(tag: RenderTag<Tag>): void {\n const id: string = tag.tag.id;\n\n if (this._tags[id].tag !== tag) {\n throw new Error(\"Tags do not have the same reference.\");\n }\n\n const tagObjects: TagObjects = this._tags[id];\n\n this._removeObjects(tagObjects);\n\n delete this._tags[id];\n\n this._add(tag);\n this._needsRender = true;\n }\n\n private _add(tag: RenderTag<Tag>): void {\n const id: string = tag.tag.id;\n const tagObjects: TagObjects = { tag: tag, objects: [], retrievableObjects: [] };\n\n this._tags[id] = tagObjects;\n\n for (const object of tag.getGLObjects()) {\n tagObjects.objects.push(object);\n this._scene.add(object);\n }\n\n for (const retrievableObject of tag.getRetrievableObjects()) {\n tagObjects.retrievableObjects.push(retrievableObject);\n this._retrievableObjects.push(retrievableObject);\n this._objectTags[retrievableObject.uuid] = tag.tag.id;\n }\n }\n\n private _remove(id: string): void {\n const tagObjects: TagObjects = this._tags[id];\n\n this._removeObjects(tagObjects);\n\n tagObjects.tag.dispose();\n\n delete this._tags[id];\n }\n\n private _removeObjects(tagObjects: TagObjects): void {\n for (const object of tagObjects.objects) {\n this._scene.remove(object);\n }\n\n for (const retrievableObject of tagObjects.retrievableObjects) {\n const index: number = this._retrievableObjects.indexOf(retrievableObject);\n if (index !== -1) {\n this._retrievableObjects.splice(index, 1);\n }\n }\n }\n}\n\nexport default TagScene;\n",
- "import {Observable} from \"rxjs/Observable\";\nimport {Subject} from \"rxjs/Subject\";\n\nimport \"rxjs/add/operator/map\";\nimport \"rxjs/add/operator/scan\";\nimport \"rxjs/add/operator/share\";\n\nimport {\n OutlineRenderTag,\n OutlineTag,\n RenderTag,\n SpotRenderTag,\n SpotTag,\n Tag,\n} from \"../../Component\";\nimport {Transform} from \"../../Geo\";\n\nexport class TagSet {\n private _active: boolean;\n\n private _hash: { [id: string]: RenderTag<Tag> };\n private _hashDeactivated: { [id: string]: Tag };\n\n private _notifyChanged$: Subject<TagSet>;\n\n constructor() {\n this._active = false;\n this._hash = {};\n this._hashDeactivated = {};\n this._notifyChanged$ = new Subject<TagSet>();\n }\n\n public get active(): boolean {\n return this._active;\n }\n\n public get changed$(): Observable<TagSet> {\n return this._notifyChanged$;\n }\n\n public activate(transform: Transform): void {\n if (this._active) {\n return;\n }\n\n for (const id in this._hashDeactivated) {\n if (!this._hashDeactivated.hasOwnProperty(id)) {\n continue;\n }\n\n const tag: Tag = this._hashDeactivated[id];\n this._add(tag, transform);\n }\n\n this._hashDeactivated = {};\n this._active = true;\n\n this._notifyChanged$.next(this);\n }\n\n public deactivate(): void {\n if (!this._active) {\n return;\n }\n\n for (const id in this._hash) {\n if (!this._hash.hasOwnProperty(id)) {\n continue;\n }\n\n this._hashDeactivated[id] = this._hash[id].tag;\n }\n\n this._hash = {};\n this._active = false;\n }\n\n public add(tags: Tag[], transform: Transform): void {\n this._assertActivationState(true);\n\n for (const tag of tags) {\n this._add(tag, transform);\n }\n\n this._notifyChanged$.next(this);\n }\n\n public addDeactivated(tags: Tag[]): void {\n this._assertActivationState(false);\n\n for (const tag of tags) {\n if (!(tag instanceof OutlineTag || tag instanceof SpotTag)) {\n throw new Error(\"Tag type not supported\");\n }\n\n this._hashDeactivated[tag.id] = tag;\n }\n }\n\n public get(id: string): RenderTag<Tag> {\n return this.has(id) ? this._hash[id] : undefined;\n }\n\n public getAll(): RenderTag<Tag>[] {\n const hash: { [id: string]: RenderTag<Tag> } = this._hash;\n\n return Object.keys(hash)\n .map(\n (id: string): RenderTag<Tag> => {\n return hash[id];\n });\n }\n\n public getAllDeactivated(): Tag[] {\n const hashDeactivated: { [id: string]: Tag } = this._hashDeactivated;\n\n return Object.keys(hashDeactivated)\n .map(\n (id: string): Tag => {\n return hashDeactivated[id];\n });\n }\n\n public getDeactivated(id: string): Tag {\n return this.hasDeactivated(id) ? this._hashDeactivated[id] : undefined;\n }\n\n public has(id: string): boolean {\n return id in this._hash;\n }\n\n public hasDeactivated(id: string): boolean {\n return id in this._hashDeactivated;\n }\n\n public remove(ids: string[]): void {\n this._assertActivationState(true);\n\n const hash: { [id: string]: RenderTag<Tag> } = this._hash;\n for (const id of ids) {\n if (!(id in hash)) {\n continue;\n }\n\n delete hash[id];\n }\n\n this._notifyChanged$.next(this);\n }\n\n public removeAll(): void {\n this._assertActivationState(true);\n\n this._hash = {};\n\n this._notifyChanged$.next(this);\n }\n\n public removeAllDeactivated(): void {\n this._assertActivationState(false);\n\n this._hashDeactivated = {};\n }\n\n public removeDeactivated(ids: string[]): void {\n this._assertActivationState(false);\n\n const hashDeactivated: { [id: string]: Tag } = this._hashDeactivated;\n for (const id of ids) {\n if (!(id in hashDeactivated)) {\n continue;\n }\n\n delete hashDeactivated[id];\n }\n }\n\n private _add(tag: Tag, transform: Transform): void {\n if (tag instanceof OutlineTag) {\n this._hash[tag.id] = new OutlineRenderTag(<OutlineTag>tag, transform);\n } else if (tag instanceof SpotTag) {\n this._hash[tag.id] = new SpotRenderTag(<SpotTag>tag, transform);\n } else {\n throw new Error(\"Tag type not supported\");\n }\n }\n\n private _assertActivationState(should: boolean): void {\n if (should !== this._active) {\n throw new Error(\"Tag set not in correct state for operation.\");\n }\n }\n}\n\nexport default TagSet;\n",
+ "import * as THREE from \"three\";\n\nimport {OutlineCreateTag, RenderTag, Tag} from \"../../Component\";\n\ntype TagObjects = {\n tag: RenderTag<Tag>;\n objects: THREE.Object3D[];\n retrievableObjects: THREE.Object3D[];\n};\n\ntype CreateTagObjects = {\n tag: OutlineCreateTag;\n objects: THREE.Object3D[];\n};\n\nexport class TagScene {\n private _createTag: CreateTagObjects;\n private _needsRender: boolean;\n private _objectTags: { [uuid: string]: string };\n private _raycaster: THREE.Raycaster;\n private _retrievableObjects: THREE.Object3D[];\n private _scene: THREE.Scene;\n private _tags: { [id: string]: TagObjects };\n\n constructor(scene?: THREE.Scene, raycaster?: THREE.Raycaster) {\n this._createTag = null;\n this._needsRender = false;\n this._raycaster = !!raycaster ? raycaster : new THREE.Raycaster();\n this._scene = !!scene ? scene : new THREE.Scene();\n\n this._objectTags = {};\n this._retrievableObjects = [];\n this._tags = {};\n }\n\n public get needsRender(): boolean {\n return this._needsRender;\n }\n\n public add(tags: RenderTag<Tag>[]): void {\n for (let tag of tags) {\n if (tag.tag.id in this._tags) {\n this._remove(tag.tag.id);\n }\n\n this._add(tag);\n }\n\n this._needsRender = true;\n }\n\n public addCreateTag(tag: OutlineCreateTag): void {\n for (const object of tag.glObjects) {\n this._scene.add(object);\n }\n\n this._createTag = { tag: tag, objects: tag.glObjects };\n\n this._needsRender = true;\n }\n\n public clear(): void {\n for (const id of Object.keys(this._tags)) {\n this._remove(id);\n }\n\n this._needsRender = false;\n }\n\n public get(id: string): RenderTag<Tag> {\n return this.has(id) ? this._tags[id].tag : undefined;\n }\n\n public has(id: string): boolean {\n return id in this._tags;\n }\n\n public hasCreateTag(): boolean {\n return this._createTag != null;\n }\n\n public intersectObjects([viewportX, viewportY]: number[], camera: THREE.Camera): string[] {\n this._raycaster.setFromCamera(new THREE.Vector2(viewportX, viewportY), camera);\n\n const intersects: THREE.Intersection[] = this._raycaster.intersectObjects(this._retrievableObjects);\n const intersectedIds: string[] = [];\n for (const intersect of intersects) {\n if (intersect.object.uuid in this._objectTags) {\n intersectedIds.push(this._objectTags[intersect.object.uuid]);\n }\n }\n\n return intersectedIds;\n }\n\n public remove(ids: string[]): void {\n for (const id of ids) {\n this._remove(id);\n }\n\n this._needsRender = true;\n }\n\n public removeAll(): void {\n for (const id of Object.keys(this._tags)) {\n this._remove(id);\n }\n\n this._needsRender = true;\n }\n\n public removeCreateTag(): void {\n if (this._createTag == null) {\n return;\n }\n\n for (const object of this._createTag.objects) {\n this._scene.remove(object);\n }\n\n this._createTag.tag.dispose();\n this._createTag = null;\n\n this._needsRender = true;\n }\n\n public render(\n perspectiveCamera: THREE.PerspectiveCamera,\n renderer: THREE.Renderer): void {\n\n renderer.render(this._scene, perspectiveCamera);\n\n this._needsRender = false;\n }\n\n public update(): void {\n this._needsRender = true;\n }\n\n public updateCreateTagObjects(tag: OutlineCreateTag): void {\n if (this._createTag.tag !== tag) {\n throw new Error(\"Create tags do not have the same reference.\");\n }\n\n for (let object of this._createTag.objects) {\n this._scene.remove(object);\n }\n\n for (const object of tag.glObjects) {\n this._scene.add(object);\n }\n\n this._createTag.objects = tag.glObjects;\n\n this._needsRender = true;\n }\n\n public updateObjects(tag: RenderTag<Tag>): void {\n const id: string = tag.tag.id;\n\n if (this._tags[id].tag !== tag) {\n throw new Error(\"Tags do not have the same reference.\");\n }\n\n const tagObjects: TagObjects = this._tags[id];\n\n this._removeObjects(tagObjects);\n\n delete this._tags[id];\n\n this._add(tag);\n this._needsRender = true;\n }\n\n private _add(tag: RenderTag<Tag>): void {\n const id: string = tag.tag.id;\n const tagObjects: TagObjects = { tag: tag, objects: [], retrievableObjects: [] };\n\n this._tags[id] = tagObjects;\n\n for (const object of tag.getGLObjects()) {\n tagObjects.objects.push(object);\n this._scene.add(object);\n }\n\n for (const retrievableObject of tag.getRetrievableObjects()) {\n tagObjects.retrievableObjects.push(retrievableObject);\n this._retrievableObjects.push(retrievableObject);\n this._objectTags[retrievableObject.uuid] = tag.tag.id;\n }\n }\n\n private _remove(id: string): void {\n const tagObjects: TagObjects = this._tags[id];\n\n this._removeObjects(tagObjects);\n\n tagObjects.tag.dispose();\n\n delete this._tags[id];\n }\n\n private _removeObjects(tagObjects: TagObjects): void {\n for (const object of tagObjects.objects) {\n this._scene.remove(object);\n }\n\n for (const retrievableObject of tagObjects.retrievableObjects) {\n const index: number = this._retrievableObjects.indexOf(retrievableObject);\n if (index !== -1) {\n this._retrievableObjects.splice(index, 1);\n }\n }\n }\n}\n\nexport default TagScene;\n",
+ "import {Observable, Subject} from \"rxjs\";\n\nimport {\n OutlineRenderTag,\n OutlineTag,\n RenderTag,\n SpotRenderTag,\n SpotTag,\n Tag,\n} from \"../../Component\";\nimport {Transform} from \"../../Geo\";\n\nexport class TagSet {\n private _active: boolean;\n\n private _hash: { [id: string]: RenderTag<Tag> };\n private _hashDeactivated: { [id: string]: Tag };\n\n private _notifyChanged$: Subject<TagSet>;\n\n constructor() {\n this._active = false;\n this._hash = {};\n this._hashDeactivated = {};\n this._notifyChanged$ = new Subject<TagSet>();\n }\n\n public get active(): boolean {\n return this._active;\n }\n\n public get changed$(): Observable<TagSet> {\n return this._notifyChanged$;\n }\n\n public activate(transform: Transform): void {\n if (this._active) {\n return;\n }\n\n for (const id in this._hashDeactivated) {\n if (!this._hashDeactivated.hasOwnProperty(id)) {\n continue;\n }\n\n const tag: Tag = this._hashDeactivated[id];\n this._add(tag, transform);\n }\n\n this._hashDeactivated = {};\n this._active = true;\n\n this._notifyChanged$.next(this);\n }\n\n public deactivate(): void {\n if (!this._active) {\n return;\n }\n\n for (const id in this._hash) {\n if (!this._hash.hasOwnProperty(id)) {\n continue;\n }\n\n this._hashDeactivated[id] = this._hash[id].tag;\n }\n\n this._hash = {};\n this._active = false;\n }\n\n public add(tags: Tag[], transform: Transform): void {\n this._assertActivationState(true);\n\n for (const tag of tags) {\n this._add(tag, transform);\n }\n\n this._notifyChanged$.next(this);\n }\n\n public addDeactivated(tags: Tag[]): void {\n this._assertActivationState(false);\n\n for (const tag of tags) {\n if (!(tag instanceof OutlineTag || tag instanceof SpotTag)) {\n throw new Error(\"Tag type not supported\");\n }\n\n this._hashDeactivated[tag.id] = tag;\n }\n }\n\n public get(id: string): RenderTag<Tag> {\n return this.has(id) ? this._hash[id] : undefined;\n }\n\n public getAll(): RenderTag<Tag>[] {\n const hash: { [id: string]: RenderTag<Tag> } = this._hash;\n\n return Object.keys(hash)\n .map(\n (id: string): RenderTag<Tag> => {\n return hash[id];\n });\n }\n\n public getAllDeactivated(): Tag[] {\n const hashDeactivated: { [id: string]: Tag } = this._hashDeactivated;\n\n return Object.keys(hashDeactivated)\n .map(\n (id: string): Tag => {\n return hashDeactivated[id];\n });\n }\n\n public getDeactivated(id: string): Tag {\n return this.hasDeactivated(id) ? this._hashDeactivated[id] : undefined;\n }\n\n public has(id: string): boolean {\n return id in this._hash;\n }\n\n public hasDeactivated(id: string): boolean {\n return id in this._hashDeactivated;\n }\n\n public remove(ids: string[]): void {\n this._assertActivationState(true);\n\n const hash: { [id: string]: RenderTag<Tag> } = this._hash;\n for (const id of ids) {\n if (!(id in hash)) {\n continue;\n }\n\n delete hash[id];\n }\n\n this._notifyChanged$.next(this);\n }\n\n public removeAll(): void {\n this._assertActivationState(true);\n\n this._hash = {};\n\n this._notifyChanged$.next(this);\n }\n\n public removeAllDeactivated(): void {\n this._assertActivationState(false);\n\n this._hashDeactivated = {};\n }\n\n public removeDeactivated(ids: string[]): void {\n this._assertActivationState(false);\n\n const hashDeactivated: { [id: string]: Tag } = this._hashDeactivated;\n for (const id of ids) {\n if (!(id in hashDeactivated)) {\n continue;\n }\n\n delete hashDeactivated[id];\n }\n }\n\n private _add(tag: Tag, transform: Transform): void {\n if (tag instanceof OutlineTag) {\n this._hash[tag.id] = new OutlineRenderTag(<OutlineTag>tag, transform);\n } else if (tag instanceof SpotTag) {\n this._hash[tag.id] = new SpotRenderTag(<SpotTag>tag, transform);\n } else {\n throw new Error(\"Tag type not supported\");\n }\n }\n\n private _assertActivationState(should: boolean): void {\n if (should !== this._active) {\n throw new Error(\"Tag set not in correct state for operation.\");\n }\n }\n}\n\nexport default TagSet;\n",
"import {MapillaryError} from \"../../../Error\";\n\nexport class GeometryTagError extends MapillaryError {\n constructor (message?: string) {\n super(message != null ? message : \"The provided geometry value is incorrect\");\n\n this.name = \"GeometryTagError\";\n }\n}\n\nexport default MapillaryError;\n",
- "import {Observable} from \"rxjs/Observable\";\nimport {Subject} from \"rxjs/Subject\";\n\nimport {Transform} from \"../../../Geo\";\n\n/**\n * @class Geometry\n * @abstract\n * @classdesc Represents a geometry.\n */\nexport abstract class Geometry {\n protected _notifyChanged$: Subject<Geometry>;\n\n /**\n * Create a geometry.\n *\n * @constructor\n */\n constructor() {\n this._notifyChanged$ = new Subject<Geometry>();\n }\n\n /**\n * Get changed observable.\n *\n * @description Emits the geometry itself every time the geometry\n * has changed.\n *\n * @returns {Observable<Geometry>} Observable emitting the geometry instance.\n * @ignore\n */\n public get changed$(): Observable<Geometry> {\n return this._notifyChanged$;\n }\n\n /**\n * Get the 2D basic coordinates for the centroid of the geometry.\n *\n * @returns {Array<number>} 2D basic coordinates representing the centroid.\n * @ignore\n */\n public abstract getCentroid2d(): number[];\n\n /**\n * Get the 3D world coordinates for the centroid of the geometry.\n *\n * @param {Transform} transform - The transform of the node related to the geometry.\n * @returns {Array<number>} 3D world coordinates representing the centroid.\n * @ignore\n */\n public abstract getCentroid3d(transform: Transform): number[];\n\n /**\n * Set the 2D centroid of the geometry.\n *\n * @param {Array<number>} value - The new value of the centroid in basic coordinates.\n * @param {Transform} transform - The transform of the node related to the geometry.\n * @ignore\n */\n public abstract setCentroid2d(value: number[], transform: Transform): void;\n}\n\nexport default Geometry;\n",
- "import {Geometry, GeometryTagError} from \"../../../Component\";\nimport {Transform} from \"../../../Geo\";\n\n/**\n * @class PointGeometry\n *\n * @classdesc Represents a point geometry in the 2D basic image coordinate system.\n *\n * @example\n * ```\n * var basicPoint = [0.5, 0.7];\n * var pointGeometry = new Mapillary.TagComponent.PointGeometry(basicPoint);\n * ```\n */\nexport class PointGeometry extends Geometry {\n private _point: number[];\n\n /**\n * Create a point geometry.\n *\n * @constructor\n * @param {Array<number>} point - An array representing the basic coordinates of\n * the point.\n *\n * @throws {GeometryTagError} Point coordinates must be valid basic coordinates.\n */\n constructor(point: number[]) {\n super();\n\n let x: number = point[0];\n let y: number = point[1];\n\n if (x < 0 || x > 1 || y < 0 || y > 1) {\n throw new GeometryTagError(\"Basic coordinates must be on the interval [0, 1].\");\n }\n\n this._point = point.slice();\n }\n\n /**\n * Get point property.\n * @returns {Array<number>} Array representing the basic coordinates of the point.\n */\n public get point(): number[] {\n return this._point;\n }\n\n /**\n * Get the 2D basic coordinates for the centroid of the point, i.e. the 2D\n * basic coordinates of the point itself.\n *\n * @returns {Array<number>} 2D basic coordinates representing the centroid.\n */\n public getCentroid2d(): number[] {\n return this._point.slice();\n }\n\n /**\n * Get the 3D world coordinates for the centroid of the point, i.e. the 3D\n * world coordinates of the point itself.\n *\n * @param {Transform} transform - The transform of the node related to the point.\n * @returns {Array<number>} 3D world coordinates representing the centroid.\n */\n public getCentroid3d(transform: Transform): number[] {\n return transform.unprojectBasic(this._point, 200);\n }\n\n /**\n * Set the centroid of the point, i.e. the point coordinates.\n *\n * @param {Array<number>} value - The new value of the centroid.\n * @param {Transform} transform - The transform of the node related to the point.\n */\n public setCentroid2d(value: number[], transform: Transform): void {\n let changed: number[] = [\n Math.max(0, Math.min(1, value[0])),\n Math.max(0, Math.min(1, value[1])),\n ];\n\n this._point[0] = changed[0];\n this._point[1] = changed[1];\n\n this._notifyChanged$.next(this);\n }\n}\n",
- "import {GeometryTagError, VertexGeometry} from \"../../../Component\";\nimport {Transform} from \"../../../Geo\";\n\n/**\n * @class PolygonGeometry\n *\n * @classdesc Represents a polygon geometry in the 2D basic image coordinate system.\n * All polygons and holes provided to the constructor needs to be closed.\n *\n * @example\n * ```\n * var basicPolygon = [[0.5, 0.3], [0.7, 0.3], [0.6, 0.5], [0.5, 0.3]];\n * var polygonGeometry = new Mapillary.TagComponent.PointGeometry(basicPolygon);\n * ```\n */\nexport class PolygonGeometry extends VertexGeometry {\n private _polygon: number[][];\n private _holes: number[][][];\n\n /**\n * Create a polygon geometry.\n *\n * @constructor\n * @param {Array<Array<number>>} polygon - Array of polygon vertices. Must be closed.\n * @param {Array<Array<Array<number>>>} [holes] - Array of arrays of hole vertices.\n * Each array of holes vertices must be closed.\n *\n * @throws {GeometryTagError} Polygon coordinates must be valid basic coordinates.\n */\n constructor(polygon: number[][], holes?: number[][][]) {\n super();\n\n let polygonLength: number = polygon.length;\n\n if (polygonLength < 3) {\n throw new GeometryTagError(\"A polygon must have three or more positions.\");\n }\n\n if (polygon[0][0] !== polygon[polygonLength - 1][0] ||\n polygon[0][1] !== polygon[polygonLength - 1][1]) {\n throw new GeometryTagError(\"First and last positions must be equivalent.\");\n }\n\n this._polygon = [];\n for (let vertex of polygon) {\n if (vertex[0] < 0 || vertex[0] > 1 ||\n vertex[1] < 0 || vertex[1] > 1) {\n throw new GeometryTagError(\"Basic coordinates of polygon must be on the interval [0, 1].\");\n }\n\n this._polygon.push(vertex.slice());\n }\n\n this._holes = [];\n\n if (holes == null) {\n return;\n }\n\n for (let i: number = 0; i < holes.length; i++) {\n let hole: number[][] = holes[i];\n let holeLength: number = hole.length;\n\n if (holeLength < 3) {\n throw new GeometryTagError(\"A polygon hole must have three or more positions.\");\n }\n\n if (hole[0][0] !== hole[holeLength - 1][0] ||\n hole[0][1] !== hole[holeLength - 1][1]) {\n throw new GeometryTagError(\"First and last positions of hole must be equivalent.\");\n }\n\n this._holes.push([]);\n\n for (let vertex of hole) {\n if (vertex[0] < 0 || vertex[0] > 1 ||\n vertex[1] < 0 || vertex[1] > 1) {\n throw new GeometryTagError(\"Basic coordinates of hole must be on the interval [0, 1].\");\n }\n\n this._holes[i].push(vertex.slice());\n }\n }\n }\n\n /**\n * Get polygon property.\n * @returns {Array<Array<number>>} Closed 2d polygon.\n */\n public get polygon(): number[][] {\n return this._polygon;\n }\n\n /**\n * Get holes property.\n * @returns {Array<Array<Array<number>>>} Holes of 2d polygon.\n */\n public get holes(): number[][][] {\n return this._holes;\n }\n\n /**\n * Add a vertex to the polygon by appending it after the last vertex.\n *\n * @param {Array<number>} vertex - Vertex to add.\n */\n public addVertex2d(vertex: number[]): void {\n let clamped: number[] = [\n Math.max(0, Math.min(1, vertex[0])),\n Math.max(0, Math.min(1, vertex[1])),\n ];\n\n this._polygon.splice(this._polygon.length - 1, 0, clamped);\n\n this._notifyChanged$.next(this);\n }\n\n /**\n * Get the coordinates of a vertex from the polygon representation of the geometry.\n *\n * @description The first vertex represents the bottom-left corner with the rest of\n * the vertices following in clockwise order.\n *\n * @param {number} index - Vertex index.\n * @returns {Array<number>} Array representing the 2D basic coordinates of the vertex.\n */\n public getVertex2d(index: number): number[] {\n return this._polygon[index].slice();\n }\n\n /**\n * Remove a vertex from the polygon.\n *\n * @param {number} index - The index of the vertex to remove.\n */\n public removeVertex2d(index: number): void {\n if (index < 0 ||\n index >= this._polygon.length ||\n this._polygon.length < 4) {\n throw new GeometryTagError(\"Index for removed vertex must be valid.\");\n }\n\n if (index > 0 && index < this._polygon.length - 1) {\n this._polygon.splice(index, 1);\n } else {\n this._polygon.splice(0, 1);\n this._polygon.pop();\n\n let closing: number[] = this._polygon[0].slice();\n this._polygon.push(closing);\n }\n\n this._notifyChanged$.next(this);\n }\n\n /** @inheritdoc */\n public setVertex2d(index: number, value: number[], transform: Transform): void {\n let changed: number[] = [\n Math.max(0, Math.min(1, value[0])),\n Math.max(0, Math.min(1, value[1])),\n ];\n\n if (index === 0 || index === this._polygon.length - 1) {\n this._polygon[0] = changed.slice();\n this._polygon[this._polygon.length - 1] = changed.slice();\n } else {\n this._polygon[index] = changed.slice();\n }\n\n this._notifyChanged$.next(this);\n }\n\n /** @inheritdoc */\n public setCentroid2d(value: number[], transform: Transform): void {\n let xs: number[] = this._polygon.map((point: number[]): number => { return point[0]; });\n let ys: number[] = this._polygon.map((point: number[]): number => { return point[1]; });\n\n let minX: number = Math.min.apply(Math, xs);\n let maxX: number = Math.max.apply(Math, xs);\n let minY: number = Math.min.apply(Math, ys);\n let maxY: number = Math.max.apply(Math, ys);\n\n let centroid: number[] = this.getCentroid2d();\n\n let minTranslationX: number = -minX;\n let maxTranslationX: number = 1 - maxX;\n let minTranslationY: number = -minY;\n let maxTranslationY: number = 1 - maxY;\n\n let translationX: number = Math.max(minTranslationX, Math.min(maxTranslationX, value[0] - centroid[0]));\n let translationY: number = Math.max(minTranslationY, Math.min(maxTranslationY, value[1] - centroid[1]));\n\n for (let point of this._polygon) {\n point[0] += translationX;\n point[1] += translationY;\n }\n\n this._notifyChanged$.next(this);\n }\n\n /** @inheritdoc */\n public getPoints3d(transform: Transform): number[][] {\n return this.getVertices3d(transform);\n }\n\n /** @inheritdoc */\n public getVertex3d(index: number, transform: Transform): number[] {\n return transform.unprojectBasic(this._polygon[index], 200);\n }\n\n /** @inheritdoc */\n public getVertices2d(): number[][] {\n return this._polygon.slice();\n }\n\n /** @inheritdoc */\n public getVertices3d(transform: Transform): number[][] {\n return this._polygon\n .map(\n (point: number[]) => {\n return transform.unprojectBasic(point, 200);\n });\n }\n\n /**\n * Get a polygon representation of the 3D coordinates for the vertices of each hole\n * of the geometry.\n *\n * @param {Transform} transform - The transform of the node related to the geometry.\n * @returns {Array<Array<Array<number>>>} Array of hole polygons in 3D world coordinates\n * representing the vertices of each hole of the geometry.\n */\n public getHoleVertices3d(transform: Transform): number[][][] {\n let holes3d: number[][][] = [];\n\n for (let hole of this._holes) {\n let hole3d: number[][] = hole\n .map(\n (point: number[]) => {\n return transform.unprojectBasic(point, 200);\n });\n\n holes3d.push(hole3d);\n }\n\n return holes3d;\n }\n\n /** @inheritdoc */\n public getCentroid2d(): number[] {\n let polygon: number[][] = this._polygon;\n\n let area: number = 0;\n let centroidX: number = 0;\n let centroidY: number = 0;\n\n for (let i: number = 0; i < polygon.length - 1; i++) {\n let xi: number = polygon[i][0];\n let yi: number = polygon[i][1];\n let xi1: number = polygon[i + 1][0];\n let yi1: number = polygon[i + 1][1];\n\n let a: number = xi * yi1 - xi1 * yi;\n\n area += a;\n centroidX += (xi + xi1) * a;\n centroidY += (yi + yi1) * a;\n }\n\n area /= 2;\n\n centroidX /= 6 * area;\n centroidY /= 6 * area;\n\n return [centroidX, centroidY];\n }\n\n /** @inheritdoc */\n public getCentroid3d(transform: Transform): number[] {\n let centroid2d: number[] = this.getCentroid2d();\n\n return transform.unprojectBasic(centroid2d, 200);\n }\n\n /** @inheritdoc */\n public getTriangles3d(transform: Transform): number[] {\n return this._triangulate(\n this._polygon,\n this.getPoints3d(transform),\n this._holes,\n this.getHoleVertices3d(transform));\n }\n\n /** @inheritdoc */\n public getPoleOfAccessibility2d(): number[] {\n return this._getPoleOfInaccessibility2d(this._polygon.slice());\n }\n\n /** @inheritdoc */\n public getPoleOfAccessibility3d(transform: Transform): number[] {\n let pole2d: number[] = this._getPoleOfInaccessibility2d(this._polygon.slice());\n\n return transform.unprojectBasic(pole2d, 200);\n }\n}\n\nexport default PolygonGeometry;\n",
- "import {GeometryTagError, VertexGeometry} from \"../../../Component\";\nimport {Transform} from \"../../../Geo\";\n\n/**\n * @class RectGeometry\n *\n * @classdesc Represents a rectangle geometry in the 2D basic image coordinate system.\n *\n * @example\n * ```\n * var basicRect = [0.5, 0.3, 0.7, 0.4];\n * var rectGeometry = new Mapillary.TagComponent.RectGeometry(basicRect);\n * ```\n */\nexport class RectGeometry extends VertexGeometry {\n private _rect: number[];\n\n private _inverted: boolean;\n\n /**\n * Create a rectangle geometry.\n *\n * @constructor\n * @param {Array<number>} rect - An array representing the top-left and bottom-right\n * corners of the rectangle in basic coordinates. Ordered according to [x0, y0, x1, y1].\n *\n * @throws {GeometryTagError} Rectangle coordinates must be valid basic coordinates.\n */\n constructor(rect: number[]) {\n super();\n\n if (rect[1] > rect[3]) {\n throw new GeometryTagError(\"Basic Y coordinates values can not be inverted.\");\n }\n\n for (let coord of rect) {\n if (coord < 0 || coord > 1) {\n throw new GeometryTagError(\"Basic coordinates must be on the interval [0, 1].\");\n }\n }\n\n this._rect = rect.slice(0, 4);\n\n if (this._rect[0] > this._rect[2]) {\n this._inverted = true;\n }\n }\n\n /**\n * Get rect property.\n * @returns {Array<number>} Array representing the top-left and bottom-right\n * corners of the rectangle in basic coordinates.\n */\n public get rect(): number[] {\n return this._rect;\n }\n\n /**\n * Set the value of a vertex in the polygon representation of the rectangle.\n *\n * @description The polygon is defined to have the first vertex at the\n * bottom-left corner with the rest of the vertices following in clockwise order.\n *\n * @param {number} index - The index of the vertex to be set.\n * @param {Array<number>} value - The new value of the vertex.\n * @param {Transform} transform - The transform of the node related to the rectangle.\n */\n public setVertex2d(index: number, value: number[], transform: Transform): void {\n let original: number[] = this._rect.slice();\n\n let changed: number[] = [\n Math.max(0, Math.min(1, value[0])),\n Math.max(0, Math.min(1, value[1])),\n ];\n\n let rect: number[] = [];\n if (index === 0) {\n rect[0] = changed[0];\n rect[1] = original[1];\n rect[2] = original[2];\n rect[3] = changed[1];\n } else if (index === 1) {\n rect[0] = changed[0];\n rect[1] = changed[1];\n rect[2] = original[2];\n rect[3] = original[3];\n } else if (index === 2) {\n rect[0] = original[0];\n rect[1] = changed[1];\n rect[2] = changed[0];\n rect[3] = original[3];\n } else if (index === 3) {\n rect[0] = original[0];\n rect[1] = original[1];\n rect[2] = changed[0];\n rect[3] = changed[1];\n }\n\n if (transform.gpano) {\n let passingBoundaryLeft: boolean =\n index < 2 && changed[0] > 0.75 && original[0] < 0.25 ||\n index >= 2 && this._inverted && changed[0] > 0.75 && original[2] < 0.25;\n\n let passingBoundaryRight: boolean =\n index < 2 && this._inverted && changed[0] < 0.25 && original[0] > 0.75 ||\n index >= 2 && changed[0] < 0.25 && original[2] > 0.75;\n\n if (passingBoundaryLeft || passingBoundaryRight) {\n this._inverted = !this._inverted;\n } else {\n if (rect[0] - original[0] < -0.25) {\n rect[0] = original[0];\n }\n\n if (rect[2] - original[2] > 0.25) {\n rect[2] = original[2];\n }\n }\n\n if (!this._inverted && rect[0] > rect[2] ||\n this._inverted && rect[0] < rect[2]) {\n rect[0] = original[0];\n rect[2] = original[2];\n }\n } else {\n if (rect[0] > rect[2]) {\n rect[0] = original[0];\n rect[2] = original[2];\n }\n }\n\n if (rect[1] > rect[3]) {\n rect[1] = original[1];\n rect[3] = original[3];\n }\n\n this._rect[0] = rect[0];\n this._rect[1] = rect[1];\n this._rect[2] = rect[2];\n this._rect[3] = rect[3];\n\n this._notifyChanged$.next(this);\n }\n\n /** @inheritdoc */\n public setCentroid2d(value: number[], transform: Transform): void {\n let original: number[] = this._rect.slice();\n\n let x0: number = original[0];\n let x1: number = this._inverted ? original[2] + 1 : original[2];\n\n let y0: number = original[1];\n let y1: number = original[3];\n\n let centerX: number = x0 + (x1 - x0) / 2;\n let centerY: number = y0 + (y1 - y0) / 2;\n\n let translationX: number = 0;\n\n if (transform.gpano != null &&\n transform.gpano.CroppedAreaImageWidthPixels === transform.gpano.FullPanoWidthPixels) {\n translationX = this._inverted ? value[0] + 1 - centerX : value[0] - centerX;\n } else {\n let minTranslationX: number = -x0;\n let maxTranslationX: number = 1 - x1;\n\n translationX = Math.max(minTranslationX, Math.min(maxTranslationX, value[0] - centerX));\n }\n\n let minTranslationY: number = -y0;\n let maxTranslationY: number = 1 - y1;\n\n let translationY: number = Math.max(minTranslationY, Math.min(maxTranslationY, value[1] - centerY));\n\n this._rect[0] = original[0] + translationX;\n this._rect[1] = original[1] + translationY;\n this._rect[2] = original[2] + translationX;\n this._rect[3] = original[3] + translationY;\n\n if (this._rect[0] < 0) {\n this._rect[0] += 1;\n this._inverted = !this._inverted;\n } else if (this._rect[0] > 1) {\n this._rect[0] -= 1;\n this._inverted = !this._inverted;\n }\n\n if (this._rect[2] < 0) {\n this._rect[2] += 1;\n this._inverted = !this._inverted;\n } else if (this._rect[2] > 1) {\n this._rect[2] -= 1;\n this._inverted = !this._inverted;\n }\n\n this._notifyChanged$.next(this);\n }\n\n /**\n * Get the 3D coordinates for the vertices of the rectangle with\n * interpolated points along the lines.\n *\n * @param {Transform} transform - The transform of the node related to\n * the rectangle.\n * @returns {Array<Array<number>>} Polygon array of 3D world coordinates\n * representing the rectangle.\n */\n public getPoints3d(transform: Transform): number[][] {\n return this._getPoints2d(transform)\n .map(\n (point: number[]) => {\n return transform.unprojectBasic(point, 200);\n });\n }\n\n /**\n * Get the coordinates of a vertex from the polygon representation of the geometry.\n *\n * @description The first vertex represents the bottom-left corner with the rest of\n * the vertices following in clockwise order.\n *\n * @param {number} index - Vertex index.\n * @returns {Array<number>} Array representing the 2D basic coordinates of the vertex.\n */\n public getVertex2d(index: number): number[] {\n return this._rectToVertices2d(this._rect)[index];\n }\n\n /**\n * Get a vertex from the polygon representation of the 3D coordinates for the\n * vertices of the geometry.\n *\n * @description The first vertex represents the bottom-left corner with the rest of\n * the vertices following in clockwise order.\n *\n * @param {number} index - Vertex index.\n * @param {Transform} transform - The transform of the node related to the geometry.\n * @returns {Array<Array<number>>} Polygon array of 3D world coordinates representing\n * the vertices of the geometry.\n */\n public getVertex3d(index: number, transform: Transform): number[] {\n return transform.unprojectBasic(this._rectToVertices2d(this._rect)[index], 200);\n }\n\n /**\n * Get a polygon representation of the 2D basic coordinates for the vertices of the rectangle.\n *\n * @description The first vertex represents the bottom-left corner with the rest of\n * the vertices following in clockwise order.\n *\n * @returns {Array<Array<number>>} Polygon array of 2D basic coordinates representing\n * the rectangle vertices.\n */\n public getVertices2d(): number[][] {\n return this._rectToVertices2d(this._rect);\n }\n\n /**\n * Get a polygon representation of the 3D coordinates for the vertices of the rectangle.\n *\n * @description The first vertex represents the bottom-left corner with the rest of\n * the vertices following in clockwise order.\n *\n * @param {Transform} transform - The transform of the node related to the rectangle.\n * @returns {Array<Array<number>>} Polygon array of 3D world coordinates representing\n * the rectangle vertices.\n */\n public getVertices3d(transform: Transform): number[][] {\n return this._rectToVertices2d(this._rect)\n .map(\n (vertex: number[]) => {\n return transform.unprojectBasic(vertex, 200);\n });\n }\n\n /** @inheritdoc */\n public getCentroid2d(): number[] {\n const rect: number[] = this._rect;\n\n const x0: number = rect[0];\n const x1: number = this._inverted ? rect[2] + 1 : rect[2];\n\n const y0: number = rect[1];\n const y1: number = rect[3];\n\n const centroidX: number = x0 + (x1 - x0) / 2;\n const centroidY: number = y0 + (y1 - y0) / 2;\n\n return [centroidX, centroidY];\n }\n\n /** @inheritdoc */\n public getCentroid3d(transform: Transform): number[] {\n const centroid2d: number[] = this.getCentroid2d();\n\n return transform.unprojectBasic(centroid2d, 200);\n }\n\n /** @inheritdoc */\n public getPoleOfAccessibility2d(): number[] {\n return this._getPoleOfInaccessibility2d(this._rectToVertices2d(this._rect));\n }\n\n /** @inheritdoc */\n public getPoleOfAccessibility3d(transform: Transform): number[] {\n let pole2d: number[] = this._getPoleOfInaccessibility2d(this._rectToVertices2d(this._rect));\n\n return transform.unprojectBasic(pole2d, 200);\n }\n\n /** @inheritdoc */\n public getTriangles3d(transform: Transform): number[] {\n return this._triangulate(this._rectToVertices2d(this._rect), this.getVertices3d(transform));\n }\n\n /**\n * Check if a particular bottom-right value is valid according to the current\n * rectangle coordinates.\n *\n * @param {Array<number>} bottomRight - The bottom-right coordinates to validate\n * @returns {boolean} Value indicating whether the provided bottom-right coordinates\n * are valid.\n */\n public validate(bottomRight: number[]): boolean {\n let rect: number[] = this._rect;\n\n if (!this._inverted && bottomRight[0] < rect[0] ||\n bottomRight[0] - rect[2] > 0.25 ||\n bottomRight[1] < rect[1]) {\n return false;\n }\n\n return true;\n }\n\n /**\n * Get the 2D coordinates for the vertices of the rectangle with\n * interpolated points along the lines.\n *\n * @param {Transform} transform - The transform of the node related to\n * the rectangle.\n * @returns {Array<Array<number>>} Polygon array of 2D basic coordinates\n * representing the rectangle.\n */\n private _getPoints2d(transform: Transform): number[][] {\n let vertices2d: number[][] = this._rectToVertices2d(this._rect);\n\n let sides: number = vertices2d.length - 1;\n let sections: number = 10;\n\n let points2d: number[][] = [];\n\n for (let i: number = 0; i < sides; ++i) {\n let startX: number = vertices2d[i][0];\n let startY: number = vertices2d[i][1];\n\n let endX: number = vertices2d[i + 1][0];\n let endY: number = vertices2d[i + 1][1];\n\n let intervalX: number = (endX - startX) / (sections - 1);\n let intervalY: number = (endY - startY) / (sections - 1);\n\n for (let j: number = 0; j < sections; ++j) {\n let point: number[] = [\n startX + j * intervalX,\n startY + j * intervalY,\n ];\n\n points2d.push(point);\n }\n }\n\n return points2d;\n }\n\n /**\n * Convert the top-left, bottom-right representation of a rectangle to a polygon\n * representation of the vertices starting at the bottom-right corner going\n * clockwise.\n *\n * @param {Array<number>} rect - Top-left, bottom-right representation of a\n * rectangle.\n * @returns {Array<Array<number>>} Polygon representation of the vertices of the\n * rectangle.\n */\n private _rectToVertices2d(rect: number[]): number[][] {\n return [\n [rect[0], rect[3]],\n [rect[0], rect[1]],\n [this._inverted ? rect[2] + 1 : rect[2], rect[1]],\n [this._inverted ? rect[2] + 1 : rect[2], rect[3]],\n [rect[0], rect[3]],\n ];\n }\n}\n\nexport default RectGeometry;\n",
- "/// <reference path=\"../../../../typings/index.d.ts\" />\n\nimport * as earcut from \"earcut\";\nimport * as polylabel from \"@mapbox/polylabel\";\n\nimport {Geometry} from \"../../../Component\";\nimport {Transform} from \"../../../Geo\";\n\n/**\n * @class VertexGeometry\n * @abstract\n * @classdesc Represents a vertex geometry.\n */\nexport abstract class VertexGeometry extends Geometry {\n\n /**\n * Create a vertex geometry.\n *\n * @constructor\n */\n constructor() {\n super();\n }\n\n /**\n * Get the 3D coordinates for the vertices of the geometry with possibly\n * interpolated points along the lines.\n *\n * @param {Transform} transform - The transform of the node related to\n * the geometry.\n * @returns {Array<Array<number>>} Polygon array of 3D world coordinates\n * representing the geometry.\n * @ignore\n */\n public abstract getPoints3d(transform: Transform): number[][];\n\n /**\n * Get the polygon pole of inaccessibility, the most\n * distant internal point from the polygon outline.\n *\n * @returns {Array<number>} 2D basic coordinates for the pole of inaccessibility.\n * @ignore\n */\n public abstract getPoleOfAccessibility2d(): number[];\n\n /**\n * Get the polygon pole of inaccessibility, the most\n * distant internal point from the polygon outline.\n *\n * @param transform - The transform of the node related to\n * the geometry.\n * @returns {Array<number>} 3D world coordinates for the pole of inaccessibility.\n * @ignore\n */\n public abstract getPoleOfAccessibility3d(transform: Transform): number[];\n\n /**\n * Get the coordinates of a vertex from the polygon representation of the geometry.\n *\n * @param {number} index - Vertex index.\n * @returns {Array<number>} Array representing the 2D basic coordinates of the vertex.\n * @ignore\n */\n public abstract getVertex2d(index: number): number[];\n\n /**\n * Get a vertex from the polygon representation of the 3D coordinates for the\n * vertices of the geometry.\n *\n * @param {number} index - Vertex index.\n * @param {Transform} transform - The transform of the node related to the geometry.\n * @returns {Array<number>} Array representing the 3D world coordinates of the vertex.\n * @ignore\n */\n public abstract getVertex3d(index: number, transform: Transform): number[];\n\n /**\n * Get a polygon representation of the 2D basic coordinates for the vertices of the geometry.\n *\n * @returns {Array<Array<number>>} Polygon array of 2D basic coordinates representing\n * the vertices of the geometry.\n * @ignore\n */\n public abstract getVertices2d(): number[][];\n\n /**\n * Get a polygon representation of the 3D world coordinates for the vertices of the geometry.\n *\n * @param {Transform} transform - The transform of the node related to the geometry.\n * @returns {Array<Array<number>>} Polygon array of 3D world coordinates representing\n * the vertices of the geometry.\n * @ignore\n */\n public abstract getVertices3d(transform: Transform): number[][];\n\n /**\n * Get a flattend array of the 3D world coordinates for the\n * triangles filling the geometry.\n *\n * @param {Transform} transform - The transform of the node related to the geometry.\n * @returns {Array<number>} Flattened array of 3D world coordinates of the triangles.\n * @ignore\n */\n public abstract getTriangles3d(transform: Transform): number[];\n\n /**\n * Set the value of a vertex in the polygon representation of the geometry.\n *\n * @description The polygon is defined to have the first vertex at the\n * bottom-left corner with the rest of the vertices following in clockwise order.\n *\n * @param {number} index - The index of the vertex to be set.\n * @param {Array<number>} value - The new value of the vertex.\n * @param {Transform} transform - The transform of the node related to the geometry.\n * @ignore\n */\n public abstract setVertex2d(index: number, value: number[], transform: Transform): void;\n\n /**\n * Finds the polygon pole of inaccessibility, the most distant internal\n * point from the polygon outline.\n *\n * @param {Array<Array<number>>} points2d - 2d points of outline to triangulate.\n * @returns {Array<number>} Point of inaccessibility.\n * @ignore\n */\n protected _getPoleOfInaccessibility2d(points2d: number[][]): number[] {\n let pole2d: number[] = polylabel([points2d], 3e-2);\n\n return pole2d;\n }\n\n /**\n * Triangulates a 2d polygon and returns the triangle\n * representation as a flattened array of 3d points.\n *\n * @param {Array<Array<number>>} points2d - 2d points of outline to triangulate.\n * @param {Array<Array<number>>} points3d - 3d points of outline corresponding to the 2d points.\n * @param {Array<Array<Array<number>>>} [holes2d] - 2d points of holes to triangulate.\n * @param {Array<Array<Array<number>>>} [holes3d] - 3d points of holes corresponding to the 2d points.\n * @returns {Array<number>} Flattened array of 3d points ordered based on the triangles.\n * @ignore\n */\n protected _triangulate(\n points2d: number[][],\n points3d: number[][],\n holes2d?: number[][][],\n holes3d?: number[][][]): number[] {\n\n let data: number[][][] = [points2d.slice(0, -1)];\n for (let hole2d of holes2d != null ? holes2d : []) {\n data.push(hole2d.slice(0, -1));\n }\n\n let points: number[][] = points3d.slice(0, -1);\n for (let hole3d of holes3d != null ? holes3d : []) {\n points = points.concat(hole3d.slice(0, -1));\n }\n\n let flattened: earcut.Data = earcut.flatten(data);\n let indices: number[] = earcut(flattened.vertices, flattened.holes, flattened.dimensions);\n let triangles: number[] = [];\n\n for (let i: number = 0; i < indices.length; ++i) {\n let point: number[] = points[indices[i]];\n\n triangles.push(point[0]);\n triangles.push(point[1]);\n triangles.push(point[2]);\n }\n\n return triangles;\n }\n}\n\nexport default VertexGeometry;\n",
- "/// <reference path=\"../../../../typings/index.d.ts\" />\n\nimport * as THREE from \"three\";\nimport * as vd from \"virtual-dom\";\n\nimport {Observable} from \"rxjs/Observable\";\nimport {Subject} from \"rxjs/Subject\";\nimport {Subscription} from \"rxjs/Subscription\";\n\nimport {\n IOutlineCreateTagOptions,\n PolygonGeometry,\n RectGeometry,\n VertexGeometry,\n} from \"../../../Component\";\nimport {\n Transform,\n ViewportCoords,\n} from \"../../../Geo\";\nimport {ISize} from \"../../../Render\";\n\nexport class OutlineCreateTag {\n private _geometry: VertexGeometry;\n private _outline: THREE.Line;\n private _glObjects: THREE.Object3D[];\n private _options: IOutlineCreateTagOptions;\n private _transform: Transform;\n private _viewportCoords: ViewportCoords;\n\n private _aborted$: Subject<OutlineCreateTag>;\n private _created$: Subject<OutlineCreateTag>;\n private _glObjectsChanged$: Subject<OutlineCreateTag>;\n\n private _geometryChangedSubscription: Subscription;\n\n constructor(geometry: VertexGeometry, options: IOutlineCreateTagOptions, transform: Transform, viewportCoords?: ViewportCoords) {\n this._geometry = geometry;\n this._options = { color: options.color == null ? 0xFFFFFF : options.color };\n this._transform = transform;\n this._viewportCoords = !!viewportCoords ? viewportCoords : new ViewportCoords();\n\n this._outline = this._createOutine();\n this._glObjects = [this._outline];\n\n this._aborted$ = new Subject<OutlineCreateTag>();\n this._created$ = new Subject<OutlineCreateTag>();\n this._glObjectsChanged$ = new Subject<OutlineCreateTag>();\n\n this._geometryChangedSubscription = this._geometry.changed$\n .subscribe(\n (vertexGeometry: VertexGeometry): void => {\n this._disposeOutline();\n this._outline = this._createOutine();\n this._glObjects = [this._outline];\n\n this._glObjectsChanged$.next(this);\n });\n }\n\n public get geometry(): VertexGeometry {\n return this._geometry;\n }\n\n public get glObjects(): THREE.Object3D[] {\n return this._glObjects;\n }\n\n public get aborted$(): Observable<OutlineCreateTag> {\n return this._aborted$;\n }\n\n public get created$(): Observable<OutlineCreateTag> {\n return this._created$;\n }\n\n public get glObjectsChanged$(): Observable<OutlineCreateTag> {\n return this._glObjectsChanged$;\n }\n\n public get geometryChanged$(): Observable<OutlineCreateTag> {\n return this._geometry.changed$\n .map(\n (geometry: VertexGeometry): OutlineCreateTag => {\n return this;\n });\n }\n\n public dispose(): void {\n this._disposeOutline();\n this._geometryChangedSubscription.unsubscribe();\n }\n\n public getDOMObjects(camera: THREE.Camera, size: ISize): vd.VNode[] {\n const vNodes: vd.VNode[] = [];\n const container: { offsetHeight: number, offsetWidth: number } = {\n offsetHeight: size.height, offsetWidth: size.width,\n };\n\n const abort: (e: MouseEvent) => void = (e: MouseEvent): void => {\n e.stopPropagation();\n this._aborted$.next(this);\n };\n\n if (this._geometry instanceof RectGeometry) {\n const [basicX, basicY]: number[] = this._geometry.getVertex2d(1);\n const canvasPoint: number[] =\n this._viewportCoords.basicToCanvasSafe(\n basicX,\n basicY,\n container,\n this._transform,\n camera);\n\n if (canvasPoint != null) {\n const background: string = this._colorToBackground(this._options.color);\n const transform: string = this._canvasToTransform(canvasPoint);\n const pointProperties: vd.createProperties = {\n style: { background: background, transform: transform },\n };\n\n const completerProperties: vd.createProperties = {\n onclick: abort,\n style: { transform: transform },\n };\n\n vNodes.push(vd.h(\"div.TagInteractor\", completerProperties, []));\n vNodes.push(vd.h(\"div.TagVertex\", pointProperties, []));\n }\n } else if (this._geometry instanceof PolygonGeometry) {\n const polygonGeometry: PolygonGeometry = <PolygonGeometry>this._geometry;\n\n const [firstVertexBasicX, firstVertexBasicY]: number[] = polygonGeometry.getVertex2d(0);\n const firstVertexCanvas: number[] =\n this._viewportCoords.basicToCanvasSafe(\n firstVertexBasicX,\n firstVertexBasicY,\n container,\n this._transform,\n camera);\n\n if (firstVertexCanvas != null) {\n const firstOnclick: (e: MouseEvent) => void = polygonGeometry.polygon.length > 4 ?\n (e: MouseEvent): void => {\n e.stopPropagation();\n polygonGeometry.removeVertex2d(polygonGeometry.polygon.length - 2);\n this._created$.next(this);\n } :\n abort;\n\n const transform: string = this._canvasToTransform(firstVertexCanvas);\n const completerProperties: vd.createProperties = {\n onclick: firstOnclick,\n style: { transform: transform },\n };\n\n const firstClass: string = polygonGeometry.polygon.length > 4 ?\n \"TagCompleter\" :\n \"TagInteractor\";\n\n vNodes.push(vd.h(\"div.\" + firstClass, completerProperties, []));\n }\n\n if (polygonGeometry.polygon.length > 3) {\n const [lastVertexBasicX, lastVertexBasicY]: number[] = polygonGeometry.getVertex2d(polygonGeometry.polygon.length - 3);\n const lastVertexCanvas: number[] =\n this._viewportCoords.basicToCanvasSafe(\n lastVertexBasicX,\n lastVertexBasicY,\n container,\n this._transform,\n camera);\n\n if (lastVertexCanvas != null) {\n const remove: (e: MouseEvent) => void = (e: MouseEvent): void => {\n e.stopPropagation();\n polygonGeometry.removeVertex2d(polygonGeometry.polygon.length - 3);\n };\n\n const transform: string = this._canvasToTransform(lastVertexCanvas);\n const completerProperties: vd.createProperties = {\n onclick: remove,\n style: { transform: transform },\n };\n\n vNodes.push(vd.h(\"div.TagInteractor\", completerProperties, []));\n }\n }\n\n const verticesBasic: number[][] = polygonGeometry.polygon.slice();\n verticesBasic.splice(-2, 2);\n for (const vertexBasic of verticesBasic) {\n const vertexCanvas: number[] =\n this._viewportCoords.basicToCanvasSafe(\n vertexBasic[0],\n vertexBasic[1],\n container,\n this._transform,\n camera);\n\n if (vertexCanvas != null) {\n const background: string = this._colorToBackground(this._options.color);\n const transform: string = this._canvasToTransform(vertexCanvas);\n const pointProperties: vd.createProperties = {\n style: {\n background: background,\n transform: transform,\n },\n };\n\n vNodes.push(vd.h(\"div.TagVertex\", pointProperties, []));\n }\n }\n }\n\n return vNodes;\n }\n\n public addPoint(point: number[]): void {\n if (this._geometry instanceof RectGeometry) {\n const rectGeometry: RectGeometry = <RectGeometry>this._geometry;\n\n if (!rectGeometry.validate(point)) {\n return;\n }\n\n this._created$.next(this);\n } else if (this._geometry instanceof PolygonGeometry) {\n const polygonGeometry: PolygonGeometry = <PolygonGeometry>this._geometry;\n\n polygonGeometry.addVertex2d(point);\n }\n }\n\n private _canvasToTransform(canvas: number[]): string {\n const canvasX: number = Math.round(canvas[0]);\n const canvasY: number = Math.round(canvas[1]);\n const transform: string = `translate(-50%,-50%) translate(${canvasX}px,${canvasY}px)`;\n\n return transform;\n }\n\n private _colorToBackground(color: number): string {\n return \"#\" + (\"000000\" + color.toString(16)).substr(-6);\n }\n\n private _createOutine(): THREE.Line {\n const polygon3d: number[][] = this._geometry.getPoints3d(this._transform);\n const positions: Float32Array = this._getLinePositions(polygon3d);\n\n const geometry: THREE.BufferGeometry = new THREE.BufferGeometry();\n geometry.addAttribute(\"position\", new THREE.BufferAttribute(positions, 3));\n\n const material: THREE.LineBasicMaterial =\n new THREE.LineBasicMaterial(\n {\n color: this._options.color,\n linewidth: 1,\n });\n\n return new THREE.Line(geometry, material);\n }\n\n private _disposeOutline(): void {\n if (this._outline == null) {\n return;\n }\n\n const line: THREE.Line = this._outline;\n line.geometry.dispose();\n line.material.dispose();\n this._outline = null;\n this._glObjects = [];\n }\n\n private _getLinePositions(polygon3d: number[][]): Float32Array {\n const length: number = polygon3d.length;\n const positions: Float32Array = new Float32Array(length * 3);\n\n for (let i: number = 0; i < length; ++i) {\n const index: number = 3 * i;\n\n const position: number[] = polygon3d[i];\n\n positions[index] = position[0];\n positions[index + 1] = position[1];\n positions[index + 2] = position[2];\n }\n\n return positions;\n }\n}\n\nexport default OutlineCreateTag;\n",
- "/// <reference path=\"../../../../typings/index.d.ts\" />\n\nimport * as THREE from \"three\";\nimport * as vd from \"virtual-dom\";\n\nimport {Subscription} from \"rxjs/Subscription\";\n\nimport {\n Geometry,\n OutlineTag,\n PolygonGeometry,\n RectGeometry,\n RenderTag,\n TagOperation,\n} from \"../../../Component\";\nimport {Transform} from \"../../../Geo\";\nimport {ISize} from \"../../../Render\";\nimport {ISpriteAtlas} from \"../../../Viewer\";\n\n/**\n * @class OutlineRenderTag\n * @classdesc Tag visualizing the properties of an OutlineTag.\n */\nexport class OutlineRenderTag extends RenderTag<OutlineTag> {\n private _fill: THREE.Mesh;\n private _holes: THREE.Line[];\n private _outline: THREE.Line;\n\n private _changedSubscription: Subscription;\n private _geometryChangedSubscription: Subscription;\n\n constructor(tag: OutlineTag, transform: Transform) {\n super(tag, transform);\n\n this._fill = !transform.gpano ?\n this._createFill() :\n null;\n\n this._holes = this._tag.lineWidth >= 1 ?\n this._createHoles() :\n [];\n\n this._outline = this._tag.lineWidth >= 1 ?\n this._createOutline() :\n null;\n\n this._geometryChangedSubscription = this._tag.geometry.changed$\n .subscribe(\n (geometry: Geometry): void => {\n if (this._fill != null) {\n this._updateFillGeometry();\n }\n\n if (this._holes.length > 0) {\n this._updateHoleGeometries();\n }\n\n if (this._outline != null) {\n this._updateOulineGeometry();\n }\n });\n\n this._changedSubscription = this._tag.changed$\n .subscribe(\n (changedTag: OutlineTag): void => {\n let glObjectsChanged: boolean = false;\n\n if (this._fill != null) {\n this._updateFillMaterial(<THREE.MeshBasicMaterial>this._fill.material);\n }\n\n if (this._outline == null) {\n if (this._tag.lineWidth >= 1) {\n this._holes = this._createHoles();\n this._outline = this._createOutline();\n glObjectsChanged = true;\n }\n } else {\n this._updateHoleMaterials();\n this._updateOutlineMaterial();\n }\n\n if (glObjectsChanged) {\n this._glObjectsChanged$.next(this);\n }\n });\n }\n\n public dispose(): void {\n this._disposeFill();\n this._disposeHoles();\n this._disposeOutline();\n\n this._changedSubscription.unsubscribe();\n this._geometryChangedSubscription.unsubscribe();\n }\n\n public getDOMObjects(atlas: ISpriteAtlas, camera: THREE.Camera, size: ISize): vd.VNode[] {\n const vNodes: vd.VNode[] = [];\n const isRect: boolean = this._tag.geometry instanceof RectGeometry;\n const isPerspective: boolean = !this._transform.gpano;\n const container: { offsetHeight: number, offsetWidth: number } = {\n offsetHeight: size.height, offsetWidth: size.width,\n };\n\n if (this._tag.icon != null && (isRect || isPerspective)) {\n const [iconBasicX, iconBasicY]: number[] = this._tag.geometry instanceof RectGeometry ?\n this._tag.geometry.getVertex2d(this._tag.iconIndex) :\n this._tag.geometry.getPoleOfAccessibility2d();\n\n const iconCanvas: number[] =\n this._viewportCoords.basicToCanvasSafe(\n iconBasicX,\n iconBasicY,\n container,\n this._transform,\n camera);\n\n if (iconCanvas != null) {\n const interact: (e: MouseEvent) => void = (e: MouseEvent): void => {\n this._interact$.next({ offsetX: 0, offsetY: 0, operation: TagOperation.None, tag: this._tag });\n };\n\n if (atlas.loaded) {\n const sprite: vd.VNode = atlas.getDOMSprite(this._tag.icon, this._tag.iconFloat);\n const iconCanvasX: number = Math.round(iconCanvas[0]);\n const iconCanvasY: number = Math.round(iconCanvas[1]);\n const transform: string = `translate(${iconCanvasX}px,${iconCanvasY}px)`;\n\n const click: (e: MouseEvent) => void = (e: MouseEvent): void => {\n e.stopPropagation();\n this._tag.click$.next(this._tag);\n };\n\n const properties: vd.createProperties = {\n onclick: click,\n onmousedown: interact,\n style: { transform: transform },\n };\n\n vNodes.push(vd.h(\"div.TagSymbol\", properties, [sprite]));\n }\n }\n } else if (this._tag.text != null && (isRect || isPerspective)) {\n const [textBasicX, textBasicY]: number[] = this._tag.geometry instanceof RectGeometry ?\n this._tag.geometry.getVertex2d(3) :\n this._tag.geometry.getPoleOfAccessibility2d();\n\n const textCanvas: number[] =\n this._viewportCoords.basicToCanvasSafe(\n textBasicX,\n textBasicY,\n container,\n this._transform,\n camera);\n\n if (textCanvas != null) {\n const textCanvasX: number = Math.round(textCanvas[0]);\n const textCanvasY: number = Math.round(textCanvas[1]);\n const transform: string = this._tag.geometry instanceof RectGeometry ?\n `translate(${textCanvasX}px,${textCanvasY}px)` :\n `translate(-50%, -50%) translate(${textCanvasX}px,${textCanvasY}px)`;\n\n const interact: (e: MouseEvent) => void = (e: MouseEvent): void => {\n this._interact$.next({ offsetX: 0, offsetY: 0, operation: TagOperation.None, tag: this._tag });\n };\n\n const properties: vd.createProperties = {\n onmousedown: interact,\n style: {\n color: this._colorToCss(this._tag.textColor),\n transform: transform,\n },\n textContent: this._tag.text,\n };\n\n vNodes.push(vd.h(\"span.TagSymbol\", properties, []));\n }\n }\n\n if (!this._tag.editable) {\n return vNodes;\n }\n\n const lineColor: string = this._colorToCss(this._tag.lineColor);\n\n if (this._tag.geometry instanceof RectGeometry) {\n const [centroidBasicX, centroidBasicY]: number[] = this._tag.geometry.getCentroid2d();\n const centroidCanvas: number[] =\n this._viewportCoords.basicToCanvasSafe(\n centroidBasicX,\n centroidBasicY,\n container,\n this._transform,\n camera);\n\n if (centroidCanvas != null) {\n const interact: (e: MouseEvent) => void = this._interact(TagOperation.Centroid);\n const centroidCanvasX: number = Math.round(centroidCanvas[0]);\n const centroidCanvasY: number = Math.round(centroidCanvas[1]);\n const transform: string = `translate(-50%, -50%) translate(${centroidCanvasX}px,${centroidCanvasY}px)`;\n\n const properties: vd.createProperties = {\n onmousedown: interact,\n style: { background: lineColor, transform: transform },\n };\n\n vNodes.push(vd.h(\"div.TagMover\", properties, []));\n }\n }\n\n const vertices2d: number[][] = this._tag.geometry.getVertices2d();\n\n for (let i: number = 0; i < vertices2d.length - 1; i++) {\n if (isRect &&\n ((this._tag.icon != null && i === this._tag.iconIndex) ||\n (this._tag.icon == null && this._tag.text != null && i === 3))) {\n continue;\n }\n\n const [vertexBasicX, vertexBasicY]: number[] = vertices2d[i];\n const vertexCanvas: number[] =\n this._viewportCoords.basicToCanvasSafe(\n vertexBasicX,\n vertexBasicY,\n container,\n this._transform,\n camera);\n\n if (vertexCanvas == null) {\n continue;\n }\n\n const interact: (e: MouseEvent) => void = this._interact(TagOperation.Vertex, i);\n const vertexCanvasX: number = Math.round(vertexCanvas[0]);\n const vertexCanvasY: number = Math.round(vertexCanvas[1]);\n const transform: string = `translate(-50%, -50%) translate(${vertexCanvasX}px,${vertexCanvasY}px)`;\n\n const properties: vd.createProperties = {\n onmousedown: interact,\n style: { background: lineColor, transform: transform },\n };\n\n if (isRect) {\n properties.style.cursor = i % 2 === 0 ? \"nesw-resize\" : \"nwse-resize\";\n }\n\n vNodes.push(vd.h(\"div.TagResizer\", properties, []));\n\n if (!this._tag.indicateVertices) {\n continue;\n }\n\n const pointProperties: vd.createProperties = {\n style: { background: lineColor, transform: transform },\n };\n\n vNodes.push(vd.h(\"div.TagVertex\", pointProperties, []));\n }\n\n return vNodes;\n }\n\n public getGLObjects(): THREE.Object3D[] {\n const glObjects: THREE.Object3D[] = [];\n\n if (this._fill != null) {\n glObjects.push(this._fill);\n }\n\n for (const hole of this._holes) {\n glObjects.push(hole);\n }\n\n if (this._outline != null) {\n glObjects.push(this._outline);\n }\n\n return glObjects;\n }\n\n public getRetrievableObjects(): THREE.Object3D[] {\n return this._fill != null ? [this._fill] : [];\n }\n\n private _colorToCss(color: number): string {\n return \"#\" + (\"000000\" + color.toString(16)).substr(-6);\n }\n\n private _createFill(): THREE.Mesh {\n let triangles: number[] = this._tag.geometry.getTriangles3d(this._transform);\n let positions: Float32Array = new Float32Array(triangles);\n\n let geometry: THREE.BufferGeometry = new THREE.BufferGeometry();\n geometry.addAttribute(\"position\", new THREE.BufferAttribute(positions, 3));\n geometry.computeBoundingSphere();\n\n let material: THREE.MeshBasicMaterial =\n new THREE.MeshBasicMaterial({ side: THREE.DoubleSide, transparent: true });\n\n this._updateFillMaterial(material);\n\n return new THREE.Mesh(geometry, material);\n }\n\n private _createHoles(): THREE.Line[] {\n let holes: THREE.Line[] = [];\n\n if (this._tag.geometry instanceof PolygonGeometry) {\n let polygonGeometry: PolygonGeometry = <PolygonGeometry>this._tag.geometry;\n let holes3d: number[][][] = polygonGeometry.getHoleVertices3d(this._transform);\n\n for (let holePoints3d of holes3d) {\n let hole: THREE.Line = this._createLine(holePoints3d);\n holes.push(hole);\n }\n }\n\n return holes;\n }\n\n private _createLine(points3d: number[][]): THREE.Line {\n let positions: Float32Array = this._getLinePositions(points3d);\n\n let geometry: THREE.BufferGeometry = new THREE.BufferGeometry();\n geometry.addAttribute(\"position\", new THREE.BufferAttribute(positions, 3));\n geometry.computeBoundingSphere();\n\n let material: THREE.LineBasicMaterial = new THREE.LineBasicMaterial();\n this._updateLineBasicMaterial(material);\n\n const line: THREE.Line = new THREE.Line(geometry, material);\n line.renderOrder = 1;\n\n return line;\n }\n\n private _createOutline(): THREE.Line {\n let points3d: number[][] = this._tag.geometry.getPoints3d(this._transform);\n return this._createLine(points3d);\n }\n\n private _disposeFill(): void {\n if (this._fill == null) {\n return;\n }\n\n this._fill.geometry.dispose();\n this._fill.material.dispose();\n this._fill = null;\n }\n\n private _disposeHoles(): void {\n for (let hole of this._holes) {\n hole.geometry.dispose();\n hole.material.dispose();\n }\n\n this._holes = [];\n }\n\n private _disposeOutline(): void {\n if (this._outline == null) {\n return;\n }\n\n this._outline.geometry.dispose();\n this._outline.material.dispose();\n this._outline = null;\n }\n\n private _getLinePositions(points3d: number[][]): Float32Array {\n let length: number = points3d.length;\n let positions: Float32Array = new Float32Array(length * 3);\n\n for (let i: number = 0; i < length; ++i) {\n let index: number = 3 * i;\n let position: number[] = points3d[i];\n\n positions[index + 0] = position[0];\n positions[index + 1] = position[1];\n positions[index + 2] = position[2];\n }\n\n return positions;\n }\n\n private _interact(operation: TagOperation, vertexIndex?: number): (e: MouseEvent) => void {\n return (e: MouseEvent): void => {\n let offsetX: number = e.offsetX - (<HTMLElement>e.target).offsetWidth / 2;\n let offsetY: number = e.offsetY - (<HTMLElement>e.target).offsetHeight / 2;\n\n this._interact$.next({\n offsetX: offsetX,\n offsetY: offsetY,\n operation: operation,\n tag: this._tag,\n vertexIndex: vertexIndex,\n });\n };\n }\n\n private _updateFillGeometry(): void {\n let triangles: number[] = this._tag.geometry.getTriangles3d(this._transform);\n let positions: Float32Array = new Float32Array(triangles);\n\n let geometry: THREE.BufferGeometry = <THREE.BufferGeometry>this._fill.geometry;\n let attribute: THREE.BufferAttribute = <THREE.BufferAttribute>geometry.getAttribute(\"position\");\n\n if (attribute.array.length === positions.length) {\n attribute.set(positions);\n attribute.needsUpdate = true;\n } else {\n geometry.removeAttribute(\"position\");\n geometry.addAttribute(\"position\", new THREE.BufferAttribute(positions, 3));\n }\n\n geometry.computeBoundingSphere();\n }\n\n private _updateFillMaterial(material: THREE.MeshBasicMaterial): void {\n material.color = new THREE.Color(this._tag.fillColor);\n material.opacity = this._tag.fillOpacity;\n material.needsUpdate = true;\n }\n\n private _updateHoleGeometries(): void {\n let polygonGeometry: PolygonGeometry = <PolygonGeometry>this._tag.geometry;\n let holes3d: number[][][] = polygonGeometry.getHoleVertices3d(this._transform);\n\n if (holes3d.length !== this._holes.length) {\n throw new Error(\"Changing the number of holes is not supported.\");\n }\n\n for (let i: number = 0; i < this._holes.length; i++) {\n let holePoints3d: number[][] = holes3d[i];\n let hole: THREE.Line = this._holes[i];\n\n this._updateLine(hole, holePoints3d);\n }\n }\n\n private _updateHoleMaterials(): void {\n for (let hole of this._holes) {\n let material: THREE.LineBasicMaterial = <THREE.LineBasicMaterial>hole.material;\n\n this._updateLineBasicMaterial(material);\n }\n }\n\n private _updateLine(line: THREE.Line, points3d: number[][]): void {\n let positions: Float32Array = this._getLinePositions(points3d);\n\n let geometry: THREE.BufferGeometry = <THREE.BufferGeometry>line.geometry;\n let attribute: THREE.BufferAttribute = <THREE.BufferAttribute>geometry.getAttribute(\"position\");\n\n attribute.set(positions);\n attribute.needsUpdate = true;\n\n geometry.computeBoundingSphere();\n }\n\n private _updateOulineGeometry(): void {\n let points3d: number[][] = this._tag.geometry.getPoints3d(this._transform);\n\n this._updateLine(this._outline, points3d);\n }\n\n private _updateOutlineMaterial(): void {\n let material: THREE.LineBasicMaterial = <THREE.LineBasicMaterial>this._outline.material;\n\n this._updateLineBasicMaterial(material);\n }\n\n private _updateLineBasicMaterial(material: THREE.LineBasicMaterial): void {\n material.color = new THREE.Color(this._tag.lineColor);\n material.linewidth = Math.max(this._tag.lineWidth, 1);\n material.visible = this._tag.lineWidth >= 1 && this._tag.lineOpacity > 0;\n material.opacity = this._tag.lineOpacity;\n material.transparent = this._tag.lineOpacity < 1;\n material.needsUpdate = true;\n }\n}\n",
- "import {Subject} from \"rxjs/Subject\";\n\nimport {\n IOutlineTagOptions,\n Tag,\n VertexGeometry,\n} from \"../../../Component\";\nimport {Alignment} from \"../../../Viewer\";\n\n/**\n * @class OutlineTag\n *\n * @classdesc Tag holding properties for visualizing a geometry outline.\n *\n * @example\n * ```\n * var geometry = new Mapillary.TagComponent.RectGeometry([0.3, 0.3, 0.5, 0.4]);\n * var tag = new Mapillary.TagComponent.OutlineTag(\n * \"id-1\",\n * geometry\n * { editable: true, lineColor: 0xff0000 });\n *\n * tagComponent.add([tag]);\n * ```\n */\nexport class OutlineTag extends Tag {\n /**\n * Event fired when the icon of the outline tag is clicked.\n *\n * @event OutlineTag#click\n * @type {OutlineTag} The tag instance that was clicked.\n */\n public static click: string = \"click\";\n\n protected _geometry: VertexGeometry;\n\n private _editable: boolean;\n private _icon: string;\n private _iconFloat: Alignment;\n private _iconIndex: number;\n private _indicateVertices: boolean;\n private _lineColor: number;\n private _lineOpacity: number;\n private _lineWidth: number;\n private _fillColor: number;\n private _fillOpacity: number;\n private _text: string;\n private _textColor: number;\n\n private _click$: Subject<OutlineTag>;\n\n /**\n * Create an outline tag.\n *\n * @override\n * @constructor\n * @param {string} id - Unique identifier of the tag.\n * @param {VertexGeometry} geometry - Geometry defining vertices of tag.\n * @param {IOutlineTagOptions} options - Options defining the visual appearance and\n * behavior of the outline tag.\n */\n constructor(id: string, geometry: VertexGeometry, options?: IOutlineTagOptions) {\n super(id, geometry);\n\n options = !!options ? options : {};\n\n this._editable = options.editable == null ? false : options.editable;\n this._fillColor = options.fillColor == null ? 0xFFFFFF : options.fillColor;\n this._fillOpacity = options.fillOpacity == null ? 0.0 : options.fillOpacity;\n this._icon = options.icon === undefined ? null : options.icon;\n this._iconFloat = options.iconFloat == null ? Alignment.Center : options.iconFloat;\n this._iconIndex = options.iconIndex == null ? 3 : options.iconIndex;\n this._indicateVertices = options.indicateVertices == null ? true : options.indicateVertices;\n this._lineColor = options.lineColor == null ? 0xFFFFFF : options.lineColor;\n this._lineOpacity = options.lineOpacity == null ? 1 : options.lineOpacity;\n this._lineWidth = options.lineWidth == null ? 1 : options.lineWidth;\n this._text = options.text === undefined ? null : options.text;\n this._textColor = options.textColor == null ? 0xFFFFFF : options.textColor;\n\n this._click$ = new Subject<OutlineTag>();\n\n this._click$\n .subscribe(\n (t: Tag): void => {\n this.fire(OutlineTag.click, this);\n });\n }\n\n /**\n * Click observable.\n *\n * @description An observable emitting the tag when the icon of the\n * tag has been clicked.\n *\n * @returns {Observable<Tag>}\n */\n public get click$(): Subject<OutlineTag> {\n return this._click$;\n }\n\n /**\n * Get editable property.\n * @returns {boolean} Value indicating if tag is editable.\n */\n public get editable(): boolean {\n return this._editable;\n }\n\n /**\n * Set editable property.\n * @param {boolean}\n *\n * @fires Tag#changed\n */\n public set editable(value: boolean) {\n this._editable = value;\n this._notifyChanged$.next(this);\n }\n\n /**\n * Get fill color property.\n * @returns {number}\n */\n public get fillColor(): number {\n return this._fillColor;\n }\n\n /**\n * Set fill color property.\n * @param {number}\n *\n * @fires Tag#changed\n */\n public set fillColor(value: number) {\n this._fillColor = value;\n this._notifyChanged$.next(this);\n }\n\n /**\n * Get fill opacity property.\n * @returns {number}\n */\n public get fillOpacity(): number {\n return this._fillOpacity;\n }\n\n /**\n * Set fill opacity property.\n * @param {number}\n *\n * @fires Tag#changed\n */\n public set fillOpacity(value: number) {\n this._fillOpacity = value;\n this._notifyChanged$.next(this);\n }\n\n /** @inheritdoc */\n public get geometry(): VertexGeometry {\n return this._geometry;\n }\n\n /**\n * Get icon property.\n * @returns {string}\n */\n public get icon(): string {\n return this._icon;\n }\n\n /**\n * Set icon property.\n * @param {string}\n *\n * @fires Tag#changed\n */\n public set icon(value: string) {\n this._icon = value;\n this._notifyChanged$.next(this);\n }\n\n /**\n * Get icon float property.\n * @returns {Alignment}\n */\n public get iconFloat(): Alignment {\n return this._iconFloat;\n }\n\n /**\n * Set icon float property.\n * @param {Alignment}\n *\n * @fires Tag#changed\n */\n public set iconFloat(value: Alignment) {\n this._iconFloat = value;\n this._notifyChanged$.next(this);\n }\n\n /**\n * Get icon index property.\n * @returns {number}\n */\n public get iconIndex(): number {\n return this._iconIndex;\n }\n\n /**\n * Set icon index property.\n * @param {number}\n *\n * @fires Tag#changed\n */\n public set iconIndex(value: number) {\n this._iconIndex = value;\n this._notifyChanged$.next(this);\n }\n\n /**\n * Get indicate vertices property.\n * @returns {boolean} Value indicating if vertices should be indicated\n * when tag is editable.\n */\n public get indicateVertices(): boolean {\n return this._indicateVertices;\n }\n\n /**\n * Set indicate vertices property.\n * @param {boolean}\n *\n * @fires Tag#changed\n */\n public set indicateVertices(value: boolean) {\n this._indicateVertices = value;\n this._notifyChanged$.next(this);\n }\n\n /**\n * Get line color property.\n * @returns {number}\n */\n public get lineColor(): number {\n return this._lineColor;\n }\n\n /**\n * Set line color property.\n * @param {number}\n *\n * @fires Tag#changed\n */\n public set lineColor(value: number) {\n this._lineColor = value;\n this._notifyChanged$.next(this);\n }\n\n /**\n * Get line opacity property.\n * @returns {number}\n */\n public get lineOpacity(): number {\n return this._lineOpacity;\n }\n\n /**\n * Set line opacity property.\n * @param {number}\n *\n * @fires Tag#changed\n */\n public set lineOpacity(value: number) {\n this._lineOpacity = value;\n this._notifyChanged$.next(this);\n }\n\n /**\n * Get line width property.\n * @returns {number}\n */\n public get lineWidth(): number {\n return this._lineWidth;\n }\n\n /**\n * Set line width property.\n * @param {number}\n *\n * @fires Tag#changed\n */\n public set lineWidth(value: number) {\n this._lineWidth = value;\n this._notifyChanged$.next(this);\n }\n\n /**\n * Get text property.\n * @returns {string}\n */\n public get text(): string {\n return this._text;\n }\n\n /**\n * Set text property.\n * @param {string}\n *\n * @fires Tag#changed\n */\n public set text(value: string) {\n this._text = value;\n this._notifyChanged$.next(this);\n }\n\n /**\n * Get text color property.\n * @returns {number}\n */\n public get textColor(): number {\n return this._textColor;\n }\n\n /**\n * Set text color property.\n * @param {number}\n *\n * @fires Tag#changed\n */\n public set textColor(value: number) {\n this._textColor = value;\n this._notifyChanged$.next(this);\n }\n\n /**\n * Set options for tag.\n *\n * @description Sets all the option properties provided and keeps\n * the rest of the values as is.\n *\n * @param {IOutlineTagOptions} options - Outline tag options\n *\n * @fires {Tag#changed}\n */\n public setOptions(options: IOutlineTagOptions): void {\n this._editable = options.editable == null ? this._editable : options.editable;\n this._icon = options.icon === undefined ? this._icon : options.icon;\n this._iconFloat = options.iconFloat == null ? this._iconFloat : options.iconFloat;\n this._iconIndex = options.iconIndex == null ? this._iconIndex : options.iconIndex;\n this._indicateVertices = options.indicateVertices == null ? this._indicateVertices : options.indicateVertices;\n this._lineColor = options.lineColor == null ? this._lineColor : options.lineColor;\n this._lineWidth = options.lineWidth == null ? this._lineWidth : options.lineWidth;\n this._fillColor = options.fillColor == null ? this._fillColor : options.fillColor;\n this._fillOpacity = options.fillOpacity == null ? this._fillOpacity : options.fillOpacity;\n this._text = options.text === undefined ? this._text : options.text;\n this._textColor = options.textColor == null ? this._textColor : options.textColor;\n this._notifyChanged$.next(this);\n }\n}\n\nexport default OutlineTag;\n",
- "/// <reference path=\"../../../../typings/index.d.ts\" />\n\nimport * as THREE from \"three\";\nimport * as vd from \"virtual-dom\";\n\nimport {Observable} from \"rxjs/Observable\";\nimport {Subject} from \"rxjs/Subject\";\n\nimport {IInteraction} from \"../../../Component\";\nimport {\n Transform,\n ViewportCoords,\n} from \"../../../Geo\";\nimport {ISize} from \"../../../Render\";\nimport {ISpriteAtlas} from \"../../../Viewer\";\n\nexport abstract class RenderTag<T> {\n protected _tag: T;\n protected _transform: Transform;\n protected _viewportCoords: ViewportCoords;\n\n protected _glObjectsChanged$: Subject<RenderTag<T>>;\n protected _interact$: Subject<IInteraction>;\n\n constructor(tag: T, transform: Transform, viewportCoords?: ViewportCoords) {\n this._tag = tag;\n this._transform = transform;\n this._viewportCoords = !!viewportCoords ? viewportCoords : new ViewportCoords();\n\n this._glObjectsChanged$ = new Subject<RenderTag<T>>();\n this._interact$ = new Subject<IInteraction>();\n }\n\n public get glObjectsChanged$(): Observable<RenderTag<T>> {\n return this._glObjectsChanged$;\n }\n\n public get interact$(): Observable<IInteraction> {\n return this._interact$;\n }\n\n public get tag(): T {\n return this._tag;\n }\n\n public abstract dispose(): void;\n\n public abstract getDOMObjects(atlas: ISpriteAtlas, camera: THREE.Camera, size: ISize): vd.VNode[];\n\n public abstract getGLObjects(): THREE.Object3D[];\n\n public abstract getRetrievableObjects(): THREE.Object3D[];\n}\n\nexport default RenderTag;\n",
- "/// <reference path=\"../../../../typings/index.d.ts\" />\n\nimport * as THREE from \"three\";\nimport * as vd from \"virtual-dom\";\n\nimport {\n RenderTag,\n SpotTag,\n Tag,\n TagOperation,\n} from \"../../../Component\";\nimport {ISize} from \"../../../Render\";\nimport {\n Alignment,\n ISpriteAtlas,\n} from \"../../../Viewer\";\n\n/**\n * @class SpotRenderTag\n * @classdesc Tag visualizing the properties of a SpotTag.\n */\nexport class SpotRenderTag extends RenderTag<SpotTag> {\n public dispose(): void { /* noop */ }\n\n public getDOMObjects(atlas: ISpriteAtlas, camera: THREE.Camera, size: ISize): vd.VNode[] {\n const tag: SpotTag = this._tag;\n const container: { offsetHeight: number, offsetWidth: number } = {\n offsetHeight: size.height, offsetWidth: size.width,\n };\n\n const vNodes: vd.VNode[] = [];\n const [centroidBasicX, centroidBasicY]: number[] = tag.geometry.getCentroid2d();\n const centroidCanvas: number[] =\n this._viewportCoords.basicToCanvasSafe(\n centroidBasicX,\n centroidBasicY,\n container,\n this._transform,\n camera);\n\n if (centroidCanvas != null) {\n const interactNone: (e: MouseEvent) => void = (e: MouseEvent): void => {\n this._interact$.next({ offsetX: 0, offsetY: 0, operation: TagOperation.None, tag: tag });\n };\n\n const canvasX: number = Math.round(centroidCanvas[0]);\n const canvasY: number = Math.round(centroidCanvas[1]);\n\n if (tag.icon != null) {\n if (atlas.loaded) {\n const sprite: vd.VNode = atlas.getDOMSprite(tag.icon, Alignment.Bottom);\n const transform: string = `translate(${canvasX}px,${canvasY + 8}px)`;\n const properties: vd.createProperties = {\n onmousedown: interactNone,\n style: {\n pointerEvents: \"all\",\n transform: transform,\n },\n };\n\n vNodes.push(vd.h(\"div\", properties, [sprite]));\n }\n } else if (tag.text != null) {\n const transform: string = `translate(-50%,0%) translate(${canvasX}px,${canvasY + 8}px)`;\n const properties: vd.createProperties = {\n onmousedown: interactNone,\n style: {\n color: this._colorToCss(tag.textColor),\n transform: transform,\n },\n textContent: tag.text,\n };\n\n vNodes.push(vd.h(\"span.TagSymbol\", properties, []));\n }\n\n const interact: (e: MouseEvent) => void = this._interact(TagOperation.Centroid, tag);\n const background: string = this._colorToCss(tag.color);\n const transform: string = `translate(-50%,-50%) translate(${canvasX}px,${canvasY}px)`;\n\n if (tag.editable) {\n let interactorProperties: vd.createProperties = {\n onmousedown: interact,\n style: {\n background: background,\n transform: transform,\n },\n };\n\n vNodes.push(vd.h(\"div.TagSpotInteractor\", interactorProperties, []));\n }\n\n const pointProperties: vd.createProperties = {\n style: {\n background: background,\n transform: transform,\n },\n };\n\n vNodes.push(vd.h(\"div.TagVertex\", pointProperties, []));\n }\n\n return vNodes;\n }\n\n public getGLObjects(): THREE.Object3D[] { return []; }\n\n public getRetrievableObjects(): THREE.Object3D[] { return []; }\n\n private _colorToCss(color: number): string {\n return \"#\" + (\"000000\" + color.toString(16)).substr(-6);\n }\n\n private _interact(operation: TagOperation, tag: Tag, vertexIndex?: number): (e: MouseEvent) => void {\n return (e: MouseEvent): void => {\n const offsetX: number = e.offsetX - (<HTMLElement>e.target).offsetWidth / 2;\n const offsetY: number = e.offsetY - (<HTMLElement>e.target).offsetHeight / 2;\n\n this._interact$.next({\n offsetX: offsetX,\n offsetY: offsetY,\n operation: operation,\n tag: tag,\n vertexIndex: vertexIndex,\n });\n };\n }\n}\n",
+ "import {Observable, Subject} from \"rxjs\";\n\nimport {Transform} from \"../../../Geo\";\n\n/**\n * @class Geometry\n * @abstract\n * @classdesc Represents a geometry.\n */\nexport abstract class Geometry {\n protected _notifyChanged$: Subject<Geometry>;\n\n /**\n * Create a geometry.\n *\n * @constructor\n * @ignore\n */\n constructor() {\n this._notifyChanged$ = new Subject<Geometry>();\n }\n\n /**\n * Get changed observable.\n *\n * @description Emits the geometry itself every time the geometry\n * has changed.\n *\n * @returns {Observable<Geometry>} Observable emitting the geometry instance.\n * @ignore\n */\n public get changed$(): Observable<Geometry> {\n return this._notifyChanged$;\n }\n\n /**\n * Get the 2D basic coordinates for the centroid of the geometry.\n *\n * @returns {Array<number>} 2D basic coordinates representing the centroid.\n * @ignore\n */\n public abstract getCentroid2d(): number[];\n\n /**\n * Get the 3D world coordinates for the centroid of the geometry.\n *\n * @param {Transform} transform - The transform of the node related to the geometry.\n * @returns {Array<number>} 3D world coordinates representing the centroid.\n * @ignore\n */\n public abstract getCentroid3d(transform: Transform): number[];\n\n /**\n * Set the 2D centroid of the geometry.\n *\n * @param {Array<number>} value - The new value of the centroid in basic coordinates.\n * @param {Transform} transform - The transform of the node related to the geometry.\n * @ignore\n */\n public abstract setCentroid2d(value: number[], transform: Transform): void;\n}\n\nexport default Geometry;\n",
+ "import {Geometry, GeometryTagError} from \"../../../Component\";\nimport {Transform} from \"../../../Geo\";\n\n/**\n * @class PointGeometry\n *\n * @classdesc Represents a point geometry in the 2D basic image coordinate system.\n *\n * @example\n * ```\n * var basicPoint = [0.5, 0.7];\n * var pointGeometry = new Mapillary.TagComponent.PointGeometry(basicPoint);\n * ```\n */\nexport class PointGeometry extends Geometry {\n private _point: number[];\n\n /**\n * Create a point geometry.\n *\n * @constructor\n * @param {Array<number>} point - An array representing the basic coordinates of\n * the point.\n *\n * @throws {GeometryTagError} Point coordinates must be valid basic coordinates.\n */\n constructor(point: number[]) {\n super();\n\n let x: number = point[0];\n let y: number = point[1];\n\n if (x < 0 || x > 1 || y < 0 || y > 1) {\n throw new GeometryTagError(\"Basic coordinates must be on the interval [0, 1].\");\n }\n\n this._point = point.slice();\n }\n\n /**\n * Get point property.\n * @returns {Array<number>} Array representing the basic coordinates of the point.\n */\n public get point(): number[] {\n return this._point;\n }\n\n /**\n * Get the 2D basic coordinates for the centroid of the point, i.e. the 2D\n * basic coordinates of the point itself.\n *\n * @returns {Array<number>} 2D basic coordinates representing the centroid.\n * @ignore\n */\n public getCentroid2d(): number[] {\n return this._point.slice();\n }\n\n /**\n * Get the 3D world coordinates for the centroid of the point, i.e. the 3D\n * world coordinates of the point itself.\n *\n * @param {Transform} transform - The transform of the node related to the point.\n * @returns {Array<number>} 3D world coordinates representing the centroid.\n * @ignore\n */\n public getCentroid3d(transform: Transform): number[] {\n return transform.unprojectBasic(this._point, 200);\n }\n\n /**\n * Set the centroid of the point, i.e. the point coordinates.\n *\n * @param {Array<number>} value - The new value of the centroid.\n * @param {Transform} transform - The transform of the node related to the point.\n * @ignore\n */\n public setCentroid2d(value: number[], transform: Transform): void {\n let changed: number[] = [\n Math.max(0, Math.min(1, value[0])),\n Math.max(0, Math.min(1, value[1])),\n ];\n\n this._point[0] = changed[0];\n this._point[1] = changed[1];\n\n this._notifyChanged$.next(this);\n }\n}\n",
+ "import {GeometryTagError, VertexGeometry} from \"../../../Component\";\nimport {Transform} from \"../../../Geo\";\n\n/**\n * @class PolygonGeometry\n *\n * @classdesc Represents a polygon geometry in the 2D basic image coordinate system.\n * All polygons and holes provided to the constructor needs to be closed.\n *\n * @example\n * ```\n * var basicPolygon = [[0.5, 0.3], [0.7, 0.3], [0.6, 0.5], [0.5, 0.3]];\n * var polygonGeometry = new Mapillary.TagComponent.PolygonGeometry(basicPolygon);\n * ```\n */\nexport class PolygonGeometry extends VertexGeometry {\n private _polygon: number[][];\n private _holes: number[][][];\n\n /**\n * Create a polygon geometry.\n *\n * @constructor\n * @param {Array<Array<number>>} polygon - Array of polygon vertices. Must be closed.\n * @param {Array<Array<Array<number>>>} [holes] - Array of arrays of hole vertices.\n * Each array of holes vertices must be closed.\n *\n * @throws {GeometryTagError} Polygon coordinates must be valid basic coordinates.\n */\n constructor(polygon: number[][], holes?: number[][][]) {\n super();\n\n let polygonLength: number = polygon.length;\n\n if (polygonLength < 3) {\n throw new GeometryTagError(\"A polygon must have three or more positions.\");\n }\n\n if (polygon[0][0] !== polygon[polygonLength - 1][0] ||\n polygon[0][1] !== polygon[polygonLength - 1][1]) {\n throw new GeometryTagError(\"First and last positions must be equivalent.\");\n }\n\n this._polygon = [];\n for (let vertex of polygon) {\n if (vertex[0] < 0 || vertex[0] > 1 ||\n vertex[1] < 0 || vertex[1] > 1) {\n throw new GeometryTagError(\"Basic coordinates of polygon must be on the interval [0, 1].\");\n }\n\n this._polygon.push(vertex.slice());\n }\n\n this._holes = [];\n\n if (holes == null) {\n return;\n }\n\n for (let i: number = 0; i < holes.length; i++) {\n let hole: number[][] = holes[i];\n let holeLength: number = hole.length;\n\n if (holeLength < 3) {\n throw new GeometryTagError(\"A polygon hole must have three or more positions.\");\n }\n\n if (hole[0][0] !== hole[holeLength - 1][0] ||\n hole[0][1] !== hole[holeLength - 1][1]) {\n throw new GeometryTagError(\"First and last positions of hole must be equivalent.\");\n }\n\n this._holes.push([]);\n\n for (let vertex of hole) {\n if (vertex[0] < 0 || vertex[0] > 1 ||\n vertex[1] < 0 || vertex[1] > 1) {\n throw new GeometryTagError(\"Basic coordinates of hole must be on the interval [0, 1].\");\n }\n\n this._holes[i].push(vertex.slice());\n }\n }\n }\n\n /**\n * Get polygon property.\n * @returns {Array<Array<number>>} Closed 2d polygon.\n */\n public get polygon(): number[][] {\n return this._polygon;\n }\n\n /**\n * Get holes property.\n * @returns {Array<Array<Array<number>>>} Holes of 2d polygon.\n */\n public get holes(): number[][][] {\n return this._holes;\n }\n\n /**\n * Add a vertex to the polygon by appending it after the last vertex.\n *\n * @param {Array<number>} vertex - Vertex to add.\n * @ignore\n */\n public addVertex2d(vertex: number[]): void {\n let clamped: number[] = [\n Math.max(0, Math.min(1, vertex[0])),\n Math.max(0, Math.min(1, vertex[1])),\n ];\n\n this._polygon.splice(this._polygon.length - 1, 0, clamped);\n\n this._notifyChanged$.next(this);\n }\n\n /**\n * Get the coordinates of a vertex from the polygon representation of the geometry.\n *\n * @description The first vertex represents the bottom-left corner with the rest of\n * the vertices following in clockwise order.\n *\n * @param {number} index - Vertex index.\n * @returns {Array<number>} Array representing the 2D basic coordinates of the vertex.\n * @ignore\n */\n public getVertex2d(index: number): number[] {\n return this._polygon[index].slice();\n }\n\n /**\n * Remove a vertex from the polygon.\n *\n * @param {number} index - The index of the vertex to remove.\n * @ignore\n */\n public removeVertex2d(index: number): void {\n if (index < 0 ||\n index >= this._polygon.length ||\n this._polygon.length < 4) {\n throw new GeometryTagError(\"Index for removed vertex must be valid.\");\n }\n\n if (index > 0 && index < this._polygon.length - 1) {\n this._polygon.splice(index, 1);\n } else {\n this._polygon.splice(0, 1);\n this._polygon.pop();\n\n let closing: number[] = this._polygon[0].slice();\n this._polygon.push(closing);\n }\n\n this._notifyChanged$.next(this);\n }\n\n /** @ignore */\n public setVertex2d(index: number, value: number[], transform: Transform): void {\n let changed: number[] = [\n Math.max(0, Math.min(1, value[0])),\n Math.max(0, Math.min(1, value[1])),\n ];\n\n if (index === 0 || index === this._polygon.length - 1) {\n this._polygon[0] = changed.slice();\n this._polygon[this._polygon.length - 1] = changed.slice();\n } else {\n this._polygon[index] = changed.slice();\n }\n\n this._notifyChanged$.next(this);\n }\n\n /** @ignore */\n public setCentroid2d(value: number[], transform: Transform): void {\n let xs: number[] = this._polygon.map((point: number[]): number => { return point[0]; });\n let ys: number[] = this._polygon.map((point: number[]): number => { return point[1]; });\n\n let minX: number = Math.min.apply(Math, xs);\n let maxX: number = Math.max.apply(Math, xs);\n let minY: number = Math.min.apply(Math, ys);\n let maxY: number = Math.max.apply(Math, ys);\n\n let centroid: number[] = this.getCentroid2d();\n\n let minTranslationX: number = -minX;\n let maxTranslationX: number = 1 - maxX;\n let minTranslationY: number = -minY;\n let maxTranslationY: number = 1 - maxY;\n\n let translationX: number = Math.max(minTranslationX, Math.min(maxTranslationX, value[0] - centroid[0]));\n let translationY: number = Math.max(minTranslationY, Math.min(maxTranslationY, value[1] - centroid[1]));\n\n for (let point of this._polygon) {\n point[0] += translationX;\n point[1] += translationY;\n }\n\n this._notifyChanged$.next(this);\n }\n\n /** @ignore */\n public getPoints3d(transform: Transform): number[][] {\n return this._getPoints3d(\n this._subsample(this._polygon),\n transform);\n }\n\n /** @ignore */\n public getVertex3d(index: number, transform: Transform): number[] {\n return transform.unprojectBasic(this._polygon[index], 200);\n }\n\n /** @ignore */\n public getVertices2d(): number[][] {\n return this._polygon.slice();\n }\n\n /** @ignore */\n public getVertices3d(transform: Transform): number[][] {\n return this._getPoints3d(this._polygon, transform);\n }\n\n /**\n * Get a polygon representation of the 3D coordinates for the vertices of each hole\n * of the geometry. Line segments between vertices will possibly be subsampled\n * resulting in a larger number of points than the total number of vertices.\n *\n * @param {Transform} transform - The transform of the node related to the geometry.\n * @returns {Array<Array<Array<number>>>} Array of hole polygons in 3D world coordinates\n * representing the vertices of each hole of the geometry.\n * @ignore\n */\n public getHolePoints3d(transform: Transform): number[][][] {\n return this._holes\n .map(\n (hole2d: number[][]): number[][] => {\n return this._getPoints3d(\n this._subsample(hole2d),\n transform);\n });\n }\n\n /**\n * Get a polygon representation of the 3D coordinates for the vertices of each hole\n * of the geometry.\n *\n * @param {Transform} transform - The transform of the node related to the geometry.\n * @returns {Array<Array<Array<number>>>} Array of hole polygons in 3D world coordinates\n * representing the vertices of each hole of the geometry.\n * @ignore\n */\n public getHoleVertices3d(transform: Transform): number[][][] {\n return this._holes\n .map(\n (hole2d: number[][]): number[][] => {\n return this._getPoints3d(hole2d, transform);\n });\n }\n\n /** @ignore */\n public getCentroid2d(): number[] {\n let polygon: number[][] = this._polygon;\n\n let area: number = 0;\n let centroidX: number = 0;\n let centroidY: number = 0;\n\n for (let i: number = 0; i < polygon.length - 1; i++) {\n let xi: number = polygon[i][0];\n let yi: number = polygon[i][1];\n let xi1: number = polygon[i + 1][0];\n let yi1: number = polygon[i + 1][1];\n\n let a: number = xi * yi1 - xi1 * yi;\n\n area += a;\n centroidX += (xi + xi1) * a;\n centroidY += (yi + yi1) * a;\n }\n\n area /= 2;\n\n centroidX /= 6 * area;\n centroidY /= 6 * area;\n\n return [centroidX, centroidY];\n }\n\n /** @ignore */\n public getCentroid3d(transform: Transform): number[] {\n let centroid2d: number[] = this.getCentroid2d();\n\n return transform.unprojectBasic(centroid2d, 200);\n }\n\n /** @ignore */\n public get3dDomainTriangles3d(transform: Transform): number[] {\n return this._triangulate(\n this._project(this._polygon, transform),\n this.getVertices3d(transform),\n this._holes\n .map(\n (hole2d: number[][]): number[][] => {\n return this._project(hole2d, transform);\n }),\n this.getHoleVertices3d(transform));\n }\n\n /** @ignore */\n public getTriangles3d(transform: Transform): number[] {\n if (transform.fullPano) {\n return this._triangulatePano(\n this._polygon.slice(),\n this.holes.slice(),\n transform);\n }\n\n const points2d: number[][] = this._project(this._subsample(this._polygon), transform);\n const points3d: number[][] = this.getPoints3d(transform);\n\n const holes2d: number[][][] = this._holes\n .map(\n (hole: number[][]): number[][] => {\n return this._project(this._subsample(hole), transform);\n });\n\n const holes3d: number[][][] = this.getHolePoints3d(transform);\n\n return this._triangulate(\n points2d,\n points3d,\n holes2d,\n holes3d);\n }\n\n /** @ignore */\n public getPoleOfInaccessibility2d(): number[] {\n return this._getPoleOfInaccessibility2d(this._polygon.slice());\n }\n\n /** @ignore */\n public getPoleOfInaccessibility3d(transform: Transform): number[] {\n let pole2d: number[] = this._getPoleOfInaccessibility2d(this._polygon.slice());\n\n return transform.unprojectBasic(pole2d, 200);\n }\n\n private _getPoints3d(points2d: number[][], transform: Transform): number[][] {\n return points2d\n .map(\n (point: number[]) => {\n return transform.unprojectBasic(point, 200);\n });\n }\n}\n\nexport default PolygonGeometry;\n",
+ "import {GeometryTagError, VertexGeometry} from \"../../../Component\";\nimport {Transform} from \"../../../Geo\";\n\n/**\n * @class RectGeometry\n *\n * @classdesc Represents a rectangle geometry in the 2D basic image coordinate system.\n *\n * @example\n * ```\n * var basicRect = [0.5, 0.3, 0.7, 0.4];\n * var rectGeometry = new Mapillary.TagComponent.RectGeometry(basicRect);\n * ```\n */\nexport class RectGeometry extends VertexGeometry {\n private _anchorIndex: number;\n private _inverted: boolean;\n private _rect: number[];\n\n /**\n * Create a rectangle geometry.\n *\n * @constructor\n * @param {Array<number>} rect - An array representing the top-left and bottom-right\n * corners of the rectangle in basic coordinates. Ordered according to [x0, y0, x1, y1].\n *\n * @throws {GeometryTagError} Rectangle coordinates must be valid basic coordinates.\n */\n constructor(rect: number[]) {\n super();\n\n if (rect[1] > rect[3]) {\n throw new GeometryTagError(\"Basic Y coordinates values can not be inverted.\");\n }\n\n for (let coord of rect) {\n if (coord < 0 || coord > 1) {\n throw new GeometryTagError(\"Basic coordinates must be on the interval [0, 1].\");\n }\n }\n\n this._anchorIndex = undefined;\n this._rect = rect.slice(0, 4);\n this._inverted = this._rect[0] > this._rect[2];\n }\n\n /**\n * Get anchor index property.\n *\n * @returns {number} Index representing the current anchor property if\n * achoring indexing has been initialized. If anchor indexing has not been\n * initialized or has been terminated undefined will be returned.\n * @ignore\n */\n public get anchorIndex(): number {\n return this._anchorIndex;\n }\n\n /**\n * Get inverted property.\n *\n * @returns {boolean} Boolean determining whether the rect geometry is\n * inverted. For panoramas the rect geometrye may be inverted.\n * @ignore\n */\n public get inverted(): boolean {\n return this._inverted;\n }\n\n /**\n * Get rect property.\n *\n * @returns {Array<number>} Array representing the top-left and bottom-right\n * corners of the rectangle in basic coordinates.\n */\n public get rect(): number[] {\n return this._rect;\n }\n\n /**\n * Initialize anchor indexing to enable setting opposite vertex.\n *\n * @param {number} [index] - The index of the vertex to use as anchor.\n *\n * @throws {Error} If anchor indexing has already been initialized.\n * @throws {Error} If index is not valid (0 to 3).\n * @ignore\n */\n public initializeAnchorIndexing(index?: number): void {\n if (this._anchorIndex !== undefined) {\n throw new Error(\"Anchor indexing is already initialized.\");\n }\n\n if (index < 0 || index > 3) {\n throw new Error(`Invalid anchor index: ${index}.`);\n }\n\n this._anchorIndex = index === undefined ? 0 : index;\n }\n\n /**\n * Terminate anchor indexing to disable setting pposite vertex.\n * @ignore\n */\n public terminateAnchorIndexing(): void {\n this._anchorIndex = undefined;\n }\n\n /**\n * Set the value of the vertex opposite to the anchor in the polygon\n * representation of the rectangle.\n *\n * @description Setting the opposite vertex may change the anchor index.\n *\n * @param {Array<number>} opposite - The new value of the vertex opposite to the anchor.\n * @param {Transform} transform - The transform of the node related to the rectangle.\n *\n * @throws {Error} When anchor indexing has not been initialized.\n * @ignore\n */\n public setOppositeVertex2d(opposite: number[], transform: Transform): void {\n if (this._anchorIndex === undefined) {\n throw new Error(\"Anchor indexing needs to be initialized.\");\n }\n\n const changed: number[] = [\n Math.max(0, Math.min(1, opposite[0])),\n Math.max(0, Math.min(1, opposite[1])),\n ];\n\n const original: number[] = this._rect.slice();\n const anchor: number[] = this._anchorIndex === 0 ? [original[0], original[3]] :\n this._anchorIndex === 1 ? [original[0], original[1]] :\n this._anchorIndex === 2 ? [original[2], original[1]] :\n [original[2], original[3]];\n\n if (transform.fullPano) {\n const deltaX: number = this._anchorIndex < 2 ?\n changed[0] - original[2] :\n changed[0] - original[0];\n\n if (!this._inverted && this._anchorIndex < 2 && changed[0] < 0.25 && original[2] > 0.75 && deltaX < -0.5) {\n // right side passes boundary rightward\n this._inverted = true;\n this._anchorIndex = anchor[1] > changed[1] ? 0 : 1;\n } else if (!this._inverted && this._anchorIndex >= 2 && changed[0] < 0.25 && original[2] > 0.75 && deltaX < -0.5) {\n // left side passes right side and boundary rightward\n this._inverted = true;\n this._anchorIndex = anchor[1] > changed[1] ? 0 : 1;\n } else if (this._inverted && this._anchorIndex >= 2 && changed[0] < 0.25 && original[0] > 0.75 && deltaX < -0.5) {\n this._inverted = false;\n if (anchor[0] > changed[0]) {\n // left side passes boundary rightward\n this._anchorIndex = anchor[1] > changed[1] ? 3 : 2;\n } else {\n // left side passes right side and boundary rightward\n this._anchorIndex = anchor[1] > changed[1] ? 0 : 1;\n }\n } else if (!this._inverted && this._anchorIndex >= 2 && changed[0] > 0.75 && original[0] < 0.25 && deltaX > 0.5) {\n // left side passes boundary leftward\n this._inverted = true;\n this._anchorIndex = anchor[1] > changed[1] ? 3 : 2;\n } else if (!this._inverted && this._anchorIndex < 2 && changed[0] > 0.75 && original[0] < 0.25 && deltaX > 0.5) {\n // right side passes left side and boundary leftward\n this._inverted = true;\n this._anchorIndex = anchor[1] > changed[1] ? 3 : 2;\n } else if (this._inverted && this._anchorIndex < 2 && changed[0] > 0.75 && original[2] < 0.25 && deltaX > 0.5) {\n this._inverted = false;\n if (anchor[0] > changed[0]) {\n // right side passes boundary leftward\n this._anchorIndex = anchor[1] > changed[1] ? 3 : 2;\n } else {\n // right side passes left side and boundary leftward\n this._anchorIndex = anchor[1] > changed[1] ? 0 : 1;\n }\n } else if (this._inverted && this._anchorIndex < 2 && changed[0] > original[0]) {\n // inverted and right side passes left side completing a loop\n this._inverted = false;\n this._anchorIndex = anchor[1] > changed[1] ? 0 : 1;\n } else if (this._inverted && this._anchorIndex >= 2 && changed[0] < original[2]) {\n // inverted and left side passes right side completing a loop\n this._inverted = false;\n this._anchorIndex = anchor[1] > changed[1] ? 3 : 2;\n } else if (this._inverted) {\n // if still inverted only top and bottom can switch\n if (this._anchorIndex < 2) {\n this._anchorIndex = anchor[1] > changed[1] ? 0 : 1;\n } else {\n this._anchorIndex = anchor[1] > changed[1] ? 3 : 2;\n }\n } else {\n // if still not inverted treat as non full pano\n if (anchor[0] <= changed[0] && anchor[1] > changed[1]) {\n this._anchorIndex = 0;\n } else if (anchor[0] <= changed[0] && anchor[1] <= changed[1]) {\n this._anchorIndex = 1;\n } else if (anchor[0] > changed[0] && anchor[1] <= changed[1]) {\n this._anchorIndex = 2;\n } else {\n this._anchorIndex = 3;\n }\n }\n\n const rect: number[] = [];\n if (this._anchorIndex === 0) {\n rect[0] = anchor[0];\n rect[1] = changed[1];\n rect[2] = changed[0];\n rect[3] = anchor[1];\n } else if (this._anchorIndex === 1) {\n rect[0] = anchor[0];\n rect[1] = anchor[1];\n rect[2] = changed[0];\n rect[3] = changed[1];\n } else if (this._anchorIndex === 2) {\n rect[0] = changed[0];\n rect[1] = anchor[1];\n rect[2] = anchor[0];\n rect[3] = changed[1];\n } else {\n rect[0] = changed[0];\n rect[1] = changed[1];\n rect[2] = anchor[0];\n rect[3] = anchor[1];\n }\n\n if (!this._inverted && rect[0] > rect[2] ||\n this._inverted && rect[0] < rect[2]) {\n rect[0] = original[0];\n rect[2] = original[2];\n }\n\n if (rect[1] > rect[3]) {\n rect[1] = original[1];\n rect[3] = original[3];\n }\n\n this._rect[0] = rect[0];\n this._rect[1] = rect[1];\n this._rect[2] = rect[2];\n this._rect[3] = rect[3];\n } else {\n if (anchor[0] <= changed[0] && anchor[1] > changed[1]) {\n this._anchorIndex = 0;\n } else if (anchor[0] <= changed[0] && anchor[1] <= changed[1]) {\n this._anchorIndex = 1;\n } else if (anchor[0] > changed[0] && anchor[1] <= changed[1]) {\n this._anchorIndex = 2;\n } else {\n this._anchorIndex = 3;\n }\n\n const rect: number[] = [];\n if (this._anchorIndex === 0) {\n rect[0] = anchor[0];\n rect[1] = changed[1];\n rect[2] = changed[0];\n rect[3] = anchor[1];\n } else if (this._anchorIndex === 1) {\n rect[0] = anchor[0];\n rect[1] = anchor[1];\n rect[2] = changed[0];\n rect[3] = changed[1];\n } else if (this._anchorIndex === 2) {\n rect[0] = changed[0];\n rect[1] = anchor[1];\n rect[2] = anchor[0];\n rect[3] = changed[1];\n } else {\n rect[0] = changed[0];\n rect[1] = changed[1];\n rect[2] = anchor[0];\n rect[3] = anchor[1];\n }\n\n if (rect[0] > rect[2]) {\n rect[0] = original[0];\n rect[2] = original[2];\n }\n\n if (rect[1] > rect[3]) {\n rect[1] = original[1];\n rect[3] = original[3];\n }\n\n this._rect[0] = rect[0];\n this._rect[1] = rect[1];\n this._rect[2] = rect[2];\n this._rect[3] = rect[3];\n }\n\n this._notifyChanged$.next(this);\n }\n\n /**\n * Set the value of a vertex in the polygon representation of the rectangle.\n *\n * @description The polygon is defined to have the first vertex at the\n * bottom-left corner with the rest of the vertices following in clockwise order.\n *\n * @param {number} index - The index of the vertex to be set.\n * @param {Array<number>} value - The new value of the vertex.\n * @param {Transform} transform - The transform of the node related to the rectangle.\n * @ignore\n */\n public setVertex2d(index: number, value: number[], transform: Transform): void {\n let original: number[] = this._rect.slice();\n\n let changed: number[] = [\n Math.max(0, Math.min(1, value[0])),\n Math.max(0, Math.min(1, value[1])),\n ];\n\n let rect: number[] = [];\n if (index === 0) {\n rect[0] = changed[0];\n rect[1] = original[1];\n rect[2] = original[2];\n rect[3] = changed[1];\n } else if (index === 1) {\n rect[0] = changed[0];\n rect[1] = changed[1];\n rect[2] = original[2];\n rect[3] = original[3];\n } else if (index === 2) {\n rect[0] = original[0];\n rect[1] = changed[1];\n rect[2] = changed[0];\n rect[3] = original[3];\n } else if (index === 3) {\n rect[0] = original[0];\n rect[1] = original[1];\n rect[2] = changed[0];\n rect[3] = changed[1];\n }\n\n if (transform.fullPano) {\n let passingBoundaryLeftward: boolean =\n index < 2 && changed[0] > 0.75 && original[0] < 0.25 ||\n index >= 2 && this._inverted && changed[0] > 0.75 && original[2] < 0.25;\n\n let passingBoundaryRightward: boolean =\n index < 2 && this._inverted && changed[0] < 0.25 && original[0] > 0.75 ||\n index >= 2 && changed[0] < 0.25 && original[2] > 0.75;\n\n if (passingBoundaryLeftward || passingBoundaryRightward) {\n this._inverted = !this._inverted;\n } else {\n if (rect[0] - original[0] < -0.25) {\n rect[0] = original[0];\n }\n\n if (rect[2] - original[2] > 0.25) {\n rect[2] = original[2];\n }\n }\n\n if (!this._inverted && rect[0] > rect[2] ||\n this._inverted && rect[0] < rect[2]) {\n rect[0] = original[0];\n rect[2] = original[2];\n }\n } else {\n if (rect[0] > rect[2]) {\n rect[0] = original[0];\n rect[2] = original[2];\n }\n }\n\n if (rect[1] > rect[3]) {\n rect[1] = original[1];\n rect[3] = original[3];\n }\n\n this._rect[0] = rect[0];\n this._rect[1] = rect[1];\n this._rect[2] = rect[2];\n this._rect[3] = rect[3];\n\n this._notifyChanged$.next(this);\n }\n\n /** @ignore */\n public setCentroid2d(value: number[], transform: Transform): void {\n let original: number[] = this._rect.slice();\n\n let x0: number = original[0];\n let x1: number = this._inverted ? original[2] + 1 : original[2];\n\n let y0: number = original[1];\n let y1: number = original[3];\n\n let centerX: number = x0 + (x1 - x0) / 2;\n let centerY: number = y0 + (y1 - y0) / 2;\n\n let translationX: number = 0;\n\n if (transform.gpano != null &&\n transform.gpano.CroppedAreaImageWidthPixels === transform.gpano.FullPanoWidthPixels) {\n translationX = this._inverted ? value[0] + 1 - centerX : value[0] - centerX;\n } else {\n let minTranslationX: number = -x0;\n let maxTranslationX: number = 1 - x1;\n\n translationX = Math.max(minTranslationX, Math.min(maxTranslationX, value[0] - centerX));\n }\n\n let minTranslationY: number = -y0;\n let maxTranslationY: number = 1 - y1;\n\n let translationY: number = Math.max(minTranslationY, Math.min(maxTranslationY, value[1] - centerY));\n\n this._rect[0] = original[0] + translationX;\n this._rect[1] = original[1] + translationY;\n this._rect[2] = original[2] + translationX;\n this._rect[3] = original[3] + translationY;\n\n if (this._rect[0] < 0) {\n this._rect[0] += 1;\n this._inverted = !this._inverted;\n } else if (this._rect[0] > 1) {\n this._rect[0] -= 1;\n this._inverted = !this._inverted;\n }\n\n if (this._rect[2] < 0) {\n this._rect[2] += 1;\n this._inverted = !this._inverted;\n } else if (this._rect[2] > 1) {\n this._rect[2] -= 1;\n this._inverted = !this._inverted;\n }\n\n this._notifyChanged$.next(this);\n }\n\n /**\n * Get the 3D coordinates for the vertices of the rectangle with\n * interpolated points along the lines.\n *\n * @param {Transform} transform - The transform of the node related to\n * the rectangle.\n * @returns {Array<Array<number>>} Polygon array of 3D world coordinates\n * representing the rectangle.\n * @ignore\n */\n public getPoints3d(transform: Transform): number[][] {\n return this._getPoints2d()\n .map(\n (point: number[]) => {\n return transform.unprojectBasic(point, 200);\n });\n }\n\n /**\n * Get the coordinates of a vertex from the polygon representation of the geometry.\n *\n * @description The first vertex represents the bottom-left corner with the rest of\n * the vertices following in clockwise order. The method shifts the right side\n * coordinates of the rectangle by one unit to ensure that the vertices are ordered\n * clockwise.\n *\n * @param {number} index - Vertex index.\n * @returns {Array<number>} Array representing the 2D basic coordinates of the vertex.\n * @ignore\n */\n public getVertex2d(index: number): number[] {\n return this._rectToVertices2d(this._rect)[index];\n }\n\n /**\n * Get the coordinates of a vertex from the polygon representation of the geometry.\n *\n * @description The first vertex represents the bottom-left corner with the rest of\n * the vertices following in clockwise order. The coordinates will not be shifted\n * so they may not appear in clockwise order when layed out on the plane.\n *\n * @param {number} index - Vertex index.\n * @returns {Array<number>} Array representing the 2D basic coordinates of the vertex.\n * @ignore\n */\n public getNonAdjustedVertex2d(index: number): number[] {\n return this._rectToNonAdjustedVertices2d(this._rect)[index];\n }\n\n /**\n * Get a vertex from the polygon representation of the 3D coordinates for the\n * vertices of the geometry.\n *\n * @description The first vertex represents the bottom-left corner with the rest of\n * the vertices following in clockwise order.\n *\n * @param {number} index - Vertex index.\n * @param {Transform} transform - The transform of the node related to the geometry.\n * @returns {Array<Array<number>>} Polygon array of 3D world coordinates representing\n * the vertices of the geometry.\n * @ignore\n */\n public getVertex3d(index: number, transform: Transform): number[] {\n return transform.unprojectBasic(this._rectToVertices2d(this._rect)[index], 200);\n }\n\n /**\n * Get a polygon representation of the 2D basic coordinates for the vertices of the rectangle.\n *\n * @description The first vertex represents the bottom-left corner with the rest of\n * the vertices following in clockwise order.\n *\n * @returns {Array<Array<number>>} Polygon array of 2D basic coordinates representing\n * the rectangle vertices.\n * @ignore\n */\n public getVertices2d(): number[][] {\n return this._rectToVertices2d(this._rect);\n }\n\n /**\n * Get a polygon representation of the 3D coordinates for the vertices of the rectangle.\n *\n * @description The first vertex represents the bottom-left corner with the rest of\n * the vertices following in clockwise order.\n *\n * @param {Transform} transform - The transform of the node related to the rectangle.\n * @returns {Array<Array<number>>} Polygon array of 3D world coordinates representing\n * the rectangle vertices.\n * @ignore\n */\n public getVertices3d(transform: Transform): number[][] {\n return this._rectToVertices2d(this._rect)\n .map(\n (vertex: number[]) => {\n return transform.unprojectBasic(vertex, 200);\n });\n }\n\n /** @ignore */\n public getCentroid2d(): number[] {\n const rect: number[] = this._rect;\n\n const x0: number = rect[0];\n const x1: number = this._inverted ? rect[2] + 1 : rect[2];\n\n const y0: number = rect[1];\n const y1: number = rect[3];\n\n const centroidX: number = (x0 + x1) / 2;\n const centroidY: number = (y0 + y1) / 2;\n\n return [centroidX, centroidY];\n }\n\n /** @ignore */\n public getCentroid3d(transform: Transform): number[] {\n const centroid2d: number[] = this.getCentroid2d();\n\n return transform.unprojectBasic(centroid2d, 200);\n }\n\n /**\n * @ignore\n */\n public getPoleOfInaccessibility2d(): number[] {\n return this._getPoleOfInaccessibility2d(this._rectToVertices2d(this._rect));\n }\n\n /** @ignore */\n public getPoleOfInaccessibility3d(transform: Transform): number[] {\n let pole2d: number[] = this._getPoleOfInaccessibility2d(this._rectToVertices2d(this._rect));\n\n return transform.unprojectBasic(pole2d, 200);\n }\n\n /** @ignore */\n public getTriangles3d(transform: Transform): number[] {\n return transform.fullPano ?\n [] :\n this._triangulate(\n this._project(this._getPoints2d(), transform),\n this.getPoints3d(transform));\n }\n\n /**\n * Check if a particular bottom-right value is valid according to the current\n * rectangle coordinates.\n *\n * @param {Array<number>} bottomRight - The bottom-right coordinates to validate\n * @returns {boolean} Value indicating whether the provided bottom-right coordinates\n * are valid.\n * @ignore\n */\n public validate(bottomRight: number[]): boolean {\n let rect: number[] = this._rect;\n\n if (!this._inverted && bottomRight[0] < rect[0] ||\n bottomRight[0] - rect[2] > 0.25 ||\n bottomRight[1] < rect[1]) {\n return false;\n }\n\n return true;\n }\n\n /**\n * Get the 2D coordinates for the vertices of the rectangle with\n * interpolated points along the lines.\n *\n * @returns {Array<Array<number>>} Polygon array of 2D basic coordinates\n * representing the rectangle.\n */\n private _getPoints2d(): number[][] {\n let vertices2d: number[][] = this._rectToVertices2d(this._rect);\n\n let sides: number = vertices2d.length - 1;\n let sections: number = 10;\n\n let points2d: number[][] = [];\n\n for (let i: number = 0; i < sides; ++i) {\n let startX: number = vertices2d[i][0];\n let startY: number = vertices2d[i][1];\n\n let endX: number = vertices2d[i + 1][0];\n let endY: number = vertices2d[i + 1][1];\n\n let intervalX: number = (endX - startX) / (sections - 1);\n let intervalY: number = (endY - startY) / (sections - 1);\n\n for (let j: number = 0; j < sections; ++j) {\n let point: number[] = [\n startX + j * intervalX,\n startY + j * intervalY,\n ];\n\n points2d.push(point);\n }\n }\n\n return points2d;\n }\n\n /**\n * Convert the top-left, bottom-right representation of a rectangle to a polygon\n * representation of the vertices starting at the bottom-left corner going\n * clockwise.\n *\n * @description The method shifts the right side coordinates of the rectangle\n * by one unit to ensure that the vertices are ordered clockwise.\n *\n * @param {Array<number>} rect - Top-left, bottom-right representation of a\n * rectangle.\n * @returns {Array<Array<number>>} Polygon representation of the vertices of the\n * rectangle.\n */\n private _rectToVertices2d(rect: number[]): number[][] {\n return [\n [rect[0], rect[3]],\n [rect[0], rect[1]],\n [this._inverted ? rect[2] + 1 : rect[2], rect[1]],\n [this._inverted ? rect[2] + 1 : rect[2], rect[3]],\n [rect[0], rect[3]],\n ];\n }\n\n /**\n * Convert the top-left, bottom-right representation of a rectangle to a polygon\n * representation of the vertices starting at the bottom-left corner going\n * clockwise.\n *\n * @description The first vertex represents the bottom-left corner with the rest of\n * the vertices following in clockwise order. The coordinates will not be shifted\n * to ensure that the vertices are ordered clockwise when layed out on the plane.\n *\n * @param {Array<number>} rect - Top-left, bottom-right representation of a\n * rectangle.\n * @returns {Array<Array<number>>} Polygon representation of the vertices of the\n * rectangle.\n */\n private _rectToNonAdjustedVertices2d(rect: number[]): number[][] {\n return [\n [rect[0], rect[3]],\n [rect[0], rect[1]],\n [rect[2], rect[1]],\n [rect[2], rect[3]],\n [rect[0], rect[3]],\n ];\n }\n}\n\nexport default RectGeometry;\n",
+ "import earcut from \"earcut\";\nimport * as martinez from \"martinez-polygon-clipping\";\nimport * as polylabel from \"@mapbox/polylabel\";\nimport * as THREE from \"three\";\n\nimport {Geometry} from \"../../../Component\";\nimport {Transform} from \"../../../Geo\";\n\n/**\n * @class VertexGeometry\n * @abstract\n * @classdesc Represents a vertex geometry.\n */\nexport abstract class VertexGeometry extends Geometry {\n\n private _subsampleThreshold: number;\n\n /**\n * Create a vertex geometry.\n *\n * @constructor\n * @ignore\n */\n constructor() {\n super();\n\n this._subsampleThreshold = 0.005;\n\n }\n\n /**\n * Get the 3D coordinates for the vertices of the geometry with possibly\n * subsampled points along the lines.\n *\n * @param {Transform} transform - The transform of the node related to\n * the geometry.\n * @returns {Array<Array<number>>} Polygon array of 3D world coordinates\n * representing the geometry.\n * @ignore\n */\n public abstract getPoints3d(transform: Transform): number[][];\n\n /**\n * Get the polygon pole of inaccessibility, the most\n * distant internal point from the polygon outline.\n *\n * @returns {Array<number>} 2D basic coordinates for the pole of inaccessibility.\n * @ignore\n */\n public abstract getPoleOfInaccessibility2d(): number[];\n\n /**\n * Get the polygon pole of inaccessibility, the most\n * distant internal point from the polygon outline.\n *\n * @param transform - The transform of the node related to\n * the geometry.\n * @returns {Array<number>} 3D world coordinates for the pole of inaccessibility.\n * @ignore\n */\n public abstract getPoleOfInaccessibility3d(transform: Transform): number[];\n\n /**\n * Get the coordinates of a vertex from the polygon representation of the geometry.\n *\n * @param {number} index - Vertex index.\n * @returns {Array<number>} Array representing the 2D basic coordinates of the vertex.\n * @ignore\n */\n public abstract getVertex2d(index: number): number[];\n\n /**\n * Get a vertex from the polygon representation of the 3D coordinates for the\n * vertices of the geometry.\n *\n * @param {number} index - Vertex index.\n * @param {Transform} transform - The transform of the node related to the geometry.\n * @returns {Array<number>} Array representing the 3D world coordinates of the vertex.\n * @ignore\n */\n public abstract getVertex3d(index: number, transform: Transform): number[];\n\n /**\n * Get a polygon representation of the 2D basic coordinates for the vertices of the geometry.\n *\n * @returns {Array<Array<number>>} Polygon array of 2D basic coordinates representing\n * the vertices of the geometry.\n * @ignore\n */\n public abstract getVertices2d(): number[][];\n\n /**\n * Get a polygon representation of the 3D world coordinates for the vertices of the geometry.\n *\n * @param {Transform} transform - The transform of the node related to the geometry.\n * @returns {Array<Array<number>>} Polygon array of 3D world coordinates representing\n * the vertices of the geometry.\n * @ignore\n */\n public abstract getVertices3d(transform: Transform): number[][];\n\n /**\n * Get a flattend array of the 3D world coordinates for the\n * triangles filling the geometry.\n *\n * @param {Transform} transform - The transform of the node related to the geometry.\n * @returns {Array<number>} Flattened array of 3D world coordinates of the triangles.\n * @ignore\n */\n public abstract getTriangles3d(transform: Transform): number[];\n\n /**\n * Set the value of a vertex in the polygon representation of the geometry.\n *\n * @description The polygon is defined to have the first vertex at the\n * bottom-left corner with the rest of the vertices following in clockwise order.\n *\n * @param {number} index - The index of the vertex to be set.\n * @param {Array<number>} value - The new value of the vertex.\n * @param {Transform} transform - The transform of the node related to the geometry.\n * @ignore\n */\n public abstract setVertex2d(index: number, value: number[], transform: Transform): void;\n\n /**\n * Finds the polygon pole of inaccessibility, the most distant internal\n * point from the polygon outline.\n *\n * @param {Array<Array<number>>} points2d - 2d points of outline to triangulate.\n * @returns {Array<number>} Point of inaccessibility.\n * @ignore\n */\n protected _getPoleOfInaccessibility2d(points2d: number[][]): number[] {\n let pole2d: number[] = polylabel([points2d], 3e-2);\n\n return pole2d;\n }\n\n protected _project(points2d: number[][], transform: Transform): number[][] {\n const camera: THREE.Camera = this._createCamera(\n transform.upVector().toArray(),\n transform.unprojectSfM([0, 0], 0),\n transform.unprojectSfM([0, 0], 10));\n\n return this._deunproject(\n points2d,\n transform,\n camera);\n }\n\n protected _subsample(points2d: number[][], threshold: number = this._subsampleThreshold): number[][] {\n const subsampled: number[][] = [];\n const length: number = points2d.length;\n\n for (let index: number = 0; index < length; index++) {\n const p1: number[] = points2d[index];\n const p2: number[] = points2d[(index + 1) % length];\n\n subsampled.push(p1);\n\n const dist: number = Math.sqrt((p2[0] - p1[0]) ** 2 + (p2[1] - p1[1]) ** 2);\n const subsamples: number = Math.floor(dist / threshold);\n const coeff: number = 1 / (subsamples + 1);\n\n for (let i: number = 1; i <= subsamples; i++) {\n const alpha: number = i * coeff;\n\n const subsample: number[] = [\n (1 - alpha) * p1[0] + alpha * p2[0],\n (1 - alpha) * p1[1] + alpha * p2[1],\n ];\n\n subsampled.push(subsample);\n }\n }\n\n return subsampled;\n }\n\n /**\n * Triangulates a 2d polygon and returns the triangle\n * representation as a flattened array of 3d points.\n *\n * @param {Array<Array<number>>} points2d - 2d points of outline to triangulate.\n * @param {Array<Array<number>>} points3d - 3d points of outline corresponding to the 2d points.\n * @param {Array<Array<Array<number>>>} [holes2d] - 2d points of holes to triangulate.\n * @param {Array<Array<Array<number>>>} [holes3d] - 3d points of holes corresponding to the 2d points.\n * @returns {Array<number>} Flattened array of 3d points ordered based on the triangles.\n * @ignore\n */\n protected _triangulate(\n points2d: number[][],\n points3d: number[][],\n holes2d?: number[][][],\n holes3d?: number[][][]): number[] {\n\n let data: number[][][] = [points2d.slice(0, -1)];\n for (let hole2d of holes2d != null ? holes2d : []) {\n data.push(hole2d.slice(0, -1));\n }\n\n let points: number[][] = points3d.slice(0, -1);\n for (let hole3d of holes3d != null ? holes3d : []) {\n points = points.concat(hole3d.slice(0, -1));\n }\n\n let flattened: { vertices: number[], holes: number[], dimensions: number } = earcut.flatten(data);\n let indices: number[] = earcut(flattened.vertices, flattened.holes, flattened.dimensions);\n let triangles: number[] = [];\n\n for (let i: number = 0; i < indices.length; ++i) {\n let point: number[] = points[indices[i]];\n\n triangles.push(point[0]);\n triangles.push(point[1]);\n triangles.push(point[2]);\n }\n\n return triangles;\n }\n\n protected _triangulatePano(points2d: number[][], holes2d: number[][][], transform: Transform): number[] {\n const triangles: number[] = [];\n\n const epsilon: number = 1e-9;\n const subareasX: number = 3;\n const subareasY: number = 3;\n\n for (let x: number = 0; x < subareasX; x++) {\n for (let y: number = 0; y < subareasY; y++) {\n const epsilonX0: number = x === 0 ? -epsilon : epsilon;\n const epsilonY0: number = y === 0 ? -epsilon : epsilon;\n\n const x0: number = x / subareasX + epsilonX0;\n const y0: number = y / subareasY + epsilonY0;\n const x1: number = (x + 1) / subareasX + epsilon;\n const y1: number = (y + 1) / subareasY + epsilon;\n\n const bbox2d: number[][] = [\n [x0, y0],\n [x0, y1],\n [x1, y1],\n [x1, y0],\n [x0, y0],\n ];\n\n const lookat2d: number[] = [\n (2 * x + 1) / (2 * subareasX),\n (2 * y + 1) / (2 * subareasY),\n ];\n\n triangles.push(...this._triangulateSubarea(points2d, holes2d, bbox2d, lookat2d, transform));\n }\n }\n\n return triangles;\n }\n\n protected _unproject(points2d: number[][], transform: Transform, distance: number = 200): number[][] {\n return points2d\n .map(\n (point: number[]) => {\n return transform.unprojectBasic(point, distance);\n });\n }\n\n private _createCamera(upVector: number[], position: number[], lookAt: number[]): THREE.Camera {\n const camera: THREE.Camera = new THREE.Camera();\n camera.up.copy(new THREE.Vector3().fromArray(upVector));\n camera.position.copy(new THREE.Vector3().fromArray(position));\n camera.lookAt(new THREE.Vector3().fromArray(lookAt));\n camera.updateMatrix();\n camera.updateMatrixWorld(true);\n\n return camera;\n }\n\n private _deunproject(points2d: number[][], transform: Transform, camera: THREE.Camera): number[][] {\n return points2d\n .map(\n (point2d: number[]): number[] => {\n const pointWorld: number[] = transform.unprojectBasic(point2d, 10000);\n const pointCamera: THREE.Vector3 =\n new THREE.Vector3(pointWorld[0], pointWorld[1], pointWorld[2])\n .applyMatrix4(camera.matrixWorldInverse);\n\n return [pointCamera.x / pointCamera.z, pointCamera.y / pointCamera.z];\n });\n }\n\n private _triangulateSubarea(\n points2d: number[][],\n holes2d: number[][][],\n bbox2d: number[][],\n lookat2d: number[],\n transform: Transform): number[] {\n\n const intersections: martinez.MultiPolygon = martinez.intersection([points2d, ...holes2d], [bbox2d]) as martinez.MultiPolygon;\n if (!intersections) {\n return [];\n }\n\n const triangles: number[] = [];\n const threshold: number = this._subsampleThreshold;\n const camera: THREE.Camera = this._createCamera(\n transform.upVector().toArray(),\n transform.unprojectSfM([0, 0], 0),\n transform.unprojectBasic(lookat2d, 10));\n\n for (const intersection of intersections) {\n const subsampledPolygon2d: number[][] = this._subsample(intersection[0], threshold);\n\n const polygon2d: number[][] = this._deunproject(subsampledPolygon2d, transform, camera);\n const polygon3d: number[][] = this._unproject(subsampledPolygon2d, transform);\n\n const polygonHoles2d: number[][][] = [];\n const polygonHoles3d: number[][][] = [];\n for (let i: number = 1; i < intersection.length; i++) {\n let subsampledHole2d: number[][] = this._subsample(intersection[i], threshold);\n\n const hole2d: number[][] = this._deunproject(subsampledHole2d, transform, camera);\n const hole3d: number[][] = this._unproject(subsampledHole2d, transform);\n\n polygonHoles2d.push(hole2d);\n polygonHoles3d.push(hole3d);\n }\n\n triangles.push(...this._triangulate(polygon2d, polygon3d, polygonHoles2d, polygonHoles3d));\n }\n\n return triangles;\n }\n}\n\nexport default VertexGeometry;\n",
+ "import {map, withLatestFrom} from \"rxjs/operators\";\nimport {Observable, Subject} from \"rxjs\";\n\nimport {\n Component,\n Geometry,\n ITagConfiguration,\n TagCreator,\n TagHandlerBase,\n} from \"../../../Component\";\nimport {\n Transform,\n ViewportCoords,\n} from \"../../../Geo\";\nimport {RenderCamera} from \"../../../Render\";\nimport {\n Container,\n Navigator,\n} from \"../../../Viewer\";\n\nexport abstract class CreateHandlerBase extends TagHandlerBase {\n protected _tagCreator: TagCreator;\n\n protected _geometryCreated$: Subject<Geometry>;\n\n constructor(\n component: Component<ITagConfiguration>,\n container: Container,\n navigator: Navigator,\n viewportCoords: ViewportCoords,\n tagCreator: TagCreator) {\n super(component, container, navigator, viewportCoords);\n\n this._tagCreator = tagCreator;\n this._geometryCreated$ = new Subject<Geometry>();\n }\n\n public get geometryCreated$(): Observable<Geometry> {\n return this._geometryCreated$;\n }\n\n protected abstract _enableCreate(): void;\n\n protected abstract _disableCreate(): void;\n\n protected _enable(): void {\n this._enableCreate();\n this._container.element.classList.add(\"component-tag-create\");\n }\n\n protected _disable(): void {\n this._container.element.classList.remove(\"component-tag-create\");\n this._disableCreate();\n }\n\n protected _validateBasic(basic: number[]): boolean {\n const x: number = basic[0];\n const y: number = basic[1];\n\n return 0 <= x && x <= 1 && 0 <= y && y <= 1;\n }\n\n protected _mouseEventToBasic$(mouseEvent$: Observable<MouseEvent>): Observable<number[]> {\n return mouseEvent$.pipe(\n withLatestFrom(\n this._container.renderService.renderCamera$,\n this._navigator.stateService.currentTransform$),\n map(\n ([event, camera, transform]: [MouseEvent, RenderCamera, Transform]): number[] => {\n return this._mouseEventToBasic(\n event,\n this._container.element,\n camera,\n transform);\n }));\n }\n}\n\nexport default CreateHandlerBase;\n",
+ "import {map, filter} from \"rxjs/operators\";\nimport {Subscription} from \"rxjs\";\n\nimport {\n CreateHandlerBase,\n PointGeometry,\n} from \"../../../Component\";\n\nexport class CreatePointHandler extends CreateHandlerBase {\n private _geometryCreatedSubscription: Subscription;\n\n protected _enableCreate(): void {\n this._container.mouseService.deferPixels(this._name, 4);\n\n this._geometryCreatedSubscription = this._mouseEventToBasic$(this._container.mouseService.proximateClick$).pipe(\n filter(this._validateBasic),\n map(\n (basic: number[]): PointGeometry => {\n return new PointGeometry(basic);\n }))\n .subscribe(this._geometryCreated$);\n }\n\n protected _disableCreate(): void {\n this._container.mouseService.undeferPixels(this._name);\n\n this._geometryCreatedSubscription.unsubscribe();\n }\n\n protected _getNameExtension(): string {\n return \"create-point\";\n }\n}\n\nexport default CreatePointHandler;\n",
+ "import {Subject} from \"rxjs\";\n\nimport {\n CreateVertexHandler,\n OutlineCreateTag,\n PolygonGeometry,\n} from \"../../../Component\";\nimport {Transform} from \"../../../Geo\";\n\nexport class CreatePolygonHandler extends CreateVertexHandler {\n protected _addPoint(tag: OutlineCreateTag, basicPoint: number[]): void {\n tag.addPoint(basicPoint);\n }\n\n protected get _create$(): Subject<number[]> {\n return this._tagCreator.createPolygon$;\n }\n\n protected _getNameExtension(): string {\n return \"create-polygon\";\n }\n\n protected _setVertex2d(tag: OutlineCreateTag, basicPoint: number[], transform: Transform): void {\n tag.geometry.setVertex2d((<PolygonGeometry>tag.geometry).polygon.length - 2, basicPoint, transform);\n }\n}\n\nexport default CreatePolygonHandler;\n",
+ "import {\n combineLatest as observableCombineLatest,\n empty as observableEmpty,\n merge as observableMerge,\n of as observableOf,\n Observable,\n Subscription,\n} from \"rxjs\";\n\nimport {\n withLatestFrom,\n map,\n skip,\n filter,\n switchMap,\n share,\n} from \"rxjs/operators\";\n\nimport {\n CreateHandlerBase,\n Geometry,\n OutlineCreateTag,\n RectGeometry,\n} from \"../../../Component\";\nimport {Transform} from \"../../../Geo\";\nimport {RenderCamera} from \"../../../Render\";\n\nexport class CreateRectDragHandler extends CreateHandlerBase {\n private _addPointSubscription: Subscription;\n private _createSubscription: Subscription;\n private _deleteSubscription: Subscription;\n private _geometryCreatedSubscription: Subscription;\n private _initializeAnchorIndexingSubscription: Subscription;\n private _setVertexSubscription: Subscription;\n\n protected _enableCreate(): void {\n this._container.mouseService.claimMouse(this._name, 2);\n\n this._deleteSubscription = this._navigator.stateService.currentTransform$.pipe(\n map((transform: Transform): void => { return null; }),\n skip(1))\n .subscribe(this._tagCreator.delete$);\n\n this._createSubscription = this._mouseEventToBasic$(\n this._container.mouseService.filtered$(this._name, this._container.mouseService.mouseDragStart$)).pipe(\n filter(this._validateBasic))\n .subscribe(this._tagCreator.createRect$);\n\n this._initializeAnchorIndexingSubscription = this._tagCreator.tag$.pipe(\n filter(\n (tag: OutlineCreateTag): boolean => {\n return !!tag;\n }))\n .subscribe(\n (tag: OutlineCreateTag): void => {\n (<RectGeometry>tag.geometry).initializeAnchorIndexing();\n });\n\n const basicMouse$: Observable<number[]> = observableCombineLatest(\n observableMerge(\n this._container.mouseService.filtered$(this._name, this._container.mouseService.mouseMove$),\n this._container.mouseService.filtered$(this._name, this._container.mouseService.domMouseMove$)),\n this._container.renderService.renderCamera$).pipe(\n withLatestFrom(this._navigator.stateService.currentTransform$),\n map(\n ([[event, camera], transform]: [[MouseEvent, RenderCamera], Transform]): number[] => {\n return this._mouseEventToBasic(\n event,\n this._container.element,\n camera,\n transform);\n }));\n\n this._setVertexSubscription = this._tagCreator.tag$.pipe(\n switchMap(\n (tag: OutlineCreateTag): Observable<[OutlineCreateTag, number[], Transform]> => {\n return !!tag ?\n observableCombineLatest(\n observableOf(tag),\n basicMouse$,\n this._navigator.stateService.currentTransform$) :\n observableEmpty();\n }))\n .subscribe(\n ([tag, basicPoint, transform]: [OutlineCreateTag, number[], Transform]): void => {\n (<RectGeometry>tag.geometry).setOppositeVertex2d(basicPoint, transform);\n });\n\n const basicMouseDragEnd$: Observable<number[]> = this._container.mouseService.mouseDragEnd$.pipe(\n withLatestFrom(\n this._mouseEventToBasic$(this._container.mouseService.filtered$(this._name, this._container.mouseService.mouseDrag$)).pipe(\n filter(this._validateBasic)),\n (event: Event, basicPoint: number[]): number[] => {\n return basicPoint;\n }),\n share());\n\n this._addPointSubscription = this._tagCreator.tag$.pipe(\n switchMap(\n (tag: OutlineCreateTag): Observable<[OutlineCreateTag, number[]]> => {\n return !!tag ?\n observableCombineLatest(\n observableOf(tag),\n basicMouseDragEnd$) :\n observableEmpty();\n }))\n .subscribe(\n ([tag, basicPoint]: [OutlineCreateTag, number[]]): void => {\n const rectGeometry: RectGeometry = <RectGeometry>tag.geometry;\n if (!rectGeometry.validate(basicPoint)) {\n basicPoint = rectGeometry.getNonAdjustedVertex2d(3);\n }\n\n tag.addPoint(basicPoint);\n });\n\n this._geometryCreatedSubscription = this._tagCreator.tag$.pipe(\n switchMap(\n (tag: OutlineCreateTag): Observable<Geometry> => {\n return !!tag ?\n tag.created$.pipe(\n map(\n (t: OutlineCreateTag): Geometry => {\n return t.geometry;\n })) :\n observableEmpty();\n }))\n .subscribe(this._geometryCreated$);\n }\n\n protected _disableCreate(): void {\n this._container.mouseService.unclaimMouse(this._name);\n\n this._tagCreator.delete$.next(null);\n\n this._addPointSubscription.unsubscribe();\n this._createSubscription.unsubscribe();\n this._deleteSubscription.unsubscribe();\n this._geometryCreatedSubscription.unsubscribe();\n this._initializeAnchorIndexingSubscription.unsubscribe();\n this._setVertexSubscription.unsubscribe();\n }\n\n protected _getNameExtension(): string {\n return \"create-rect-drag\";\n }\n}\n\nexport default CreateRectDragHandler;\n",
+ "import {filter} from \"rxjs/operators\";\nimport {Subject, Subscription} from \"rxjs\";\n\nimport {\n CreateVertexHandler,\n OutlineCreateTag,\n RectGeometry,\n} from \"../../../Component\";\nimport {Transform} from \"../../../Geo\";\n\nexport class CreateRectHandler extends CreateVertexHandler {\n private _initializeAnchorIndexingSubscription: Subscription;\n\n protected get _create$(): Subject<number[]> {\n return this._tagCreator.createRect$;\n }\n\n protected _addPoint(tag: OutlineCreateTag, basicPoint: number[]): void {\n const rectGeometry: RectGeometry = <RectGeometry>tag.geometry;\n if (!rectGeometry.validate(basicPoint)) {\n basicPoint = rectGeometry.getNonAdjustedVertex2d(3);\n }\n\n tag.addPoint(basicPoint);\n }\n\n protected _enable(): void {\n super._enable();\n\n this._initializeAnchorIndexingSubscription = this._tagCreator.tag$.pipe(\n filter(\n (tag: OutlineCreateTag): boolean => {\n return !!tag;\n }))\n .subscribe(\n (tag: OutlineCreateTag): void => {\n (<RectGeometry>tag.geometry).initializeAnchorIndexing();\n });\n }\n\n protected _disable(): void {\n super._disable();\n\n this._initializeAnchorIndexingSubscription.unsubscribe();\n }\n\n protected _getNameExtension(): string {\n return \"create-rect\";\n }\n\n protected _setVertex2d(tag: OutlineCreateTag, basicPoint: number[], transform: Transform): void {\n (<RectGeometry>tag.geometry).setOppositeVertex2d(basicPoint, transform);\n }\n}\n\nexport default CreateRectHandler;\n",
+ "import {\n of as observableOf,\n empty as observableEmpty,\n combineLatest as observableCombineLatest,\n merge as observableMerge,\n Observable,\n Subject,\n Subscription,\n} from \"rxjs\";\n\nimport {\n filter,\n refCount,\n switchMap,\n skip,\n share,\n take,\n map,\n publishReplay,\n} from \"rxjs/operators\";\n\nimport {\n CreateHandlerBase,\n Geometry,\n OutlineCreateTag,\n} from \"../../../Component\";\nimport {Transform} from \"../../../Geo\";\nimport {RenderCamera} from \"../../../Render\";\n\nexport abstract class CreateVertexHandler extends CreateHandlerBase {\n private _addPointSubscription: Subscription;\n private _createSubscription: Subscription;\n private _deleteSubscription: Subscription;\n private _geometryCreateSubscription: Subscription;\n private _setVertexSubscription: Subscription;\n\n protected abstract get _create$(): Subject<number[]>;\n\n protected _enableCreate(): void {\n this._container.mouseService.deferPixels(this._name, 4);\n\n const transformChanged$: Observable<void> = this._navigator.stateService.currentTransform$.pipe(\n map((transform: Transform): void => { /*noop*/ }),\n publishReplay(1),\n refCount());\n\n this._deleteSubscription = transformChanged$.pipe(\n skip(1))\n .subscribe(this._tagCreator.delete$);\n\n const basicClick$: Observable<number[]> = this._mouseEventToBasic$(this._container.mouseService.proximateClick$).pipe(share());\n\n this._createSubscription = transformChanged$.pipe(\n switchMap(\n (): Observable<number[]> => {\n return basicClick$.pipe(\n filter(this._validateBasic),\n take(1));\n }))\n .subscribe(this._create$);\n\n this._setVertexSubscription = this._tagCreator.tag$.pipe(\n switchMap(\n (tag: OutlineCreateTag): Observable<[OutlineCreateTag, MouseEvent, RenderCamera, Transform]> => {\n return !!tag ?\n observableCombineLatest(\n observableOf(tag),\n observableMerge(\n this._container.mouseService.mouseMove$,\n this._container.mouseService.domMouseMove$),\n this._container.renderService.renderCamera$,\n this._navigator.stateService.currentTransform$) :\n observableEmpty();\n }))\n .subscribe(\n ([tag, event, camera, transform]: [OutlineCreateTag, MouseEvent, RenderCamera, Transform]): void => {\n const basicPoint: number[] = this._mouseEventToBasic(\n event,\n this._container.element,\n camera,\n transform);\n\n this._setVertex2d(tag, basicPoint, transform);\n });\n\n this._addPointSubscription = this._tagCreator.tag$.pipe(\n switchMap(\n (tag: OutlineCreateTag): Observable<[OutlineCreateTag, number[]]> => {\n return !!tag ?\n observableCombineLatest(\n observableOf(tag),\n basicClick$) :\n observableEmpty();\n }))\n .subscribe(\n ([tag, basicPoint]: [OutlineCreateTag, number[]]): void => {\n this._addPoint(tag, basicPoint);\n });\n\n this._geometryCreateSubscription = this._tagCreator.tag$.pipe(\n switchMap(\n (tag: OutlineCreateTag): Observable<Geometry> => {\n return !!tag ?\n tag.created$.pipe(\n map(\n (t: OutlineCreateTag): Geometry => {\n return t.geometry;\n })) :\n observableEmpty();\n }))\n .subscribe(this._geometryCreated$);\n }\n\n protected abstract _addPoint(tag: OutlineCreateTag, basicPoint: number[]): void;\n\n protected abstract _setVertex2d(tag: OutlineCreateTag, basicPoint: number[], transform: Transform): void;\n\n protected _disableCreate(): void {\n this._container.mouseService.undeferPixels(this._name);\n\n this._tagCreator.delete$.next(null);\n\n this._addPointSubscription.unsubscribe();\n this._createSubscription.unsubscribe();\n this._deleteSubscription.unsubscribe();\n this._geometryCreateSubscription.unsubscribe();\n this._setVertexSubscription.unsubscribe();\n }\n}\n\nexport default CreateVertexHandler;\n",
+ "import {\n concat as observableConcat,\n empty as observableEmpty,\n combineLatest as observableCombineLatest,\n of as observableOf,\n merge as observableMerge,\n from as observableFrom,\n Observable,\n Subscription,\n} from \"rxjs\";\n\nimport {\n distinctUntilChanged,\n share,\n switchMap,\n filter,\n withLatestFrom,\n first,\n map,\n mergeMap,\n} from \"rxjs/operators\";\n\nimport {\n Component,\n TagHandlerBase,\n Geometry,\n IInteraction,\n InteractionCursor,\n ITagConfiguration,\n RenderTag,\n Tag,\n TagOperation,\n TagSet,\n VertexGeometry,\n} from \"../../../Component\";\nimport {\n Transform,\n ViewportCoords,\n} from \"../../../Geo\";\nimport {RenderCamera} from \"../../../Render\";\nimport {\n Container,\n Navigator,\n} from \"../../../Viewer\";\n\nexport class EditVertexHandler extends TagHandlerBase {\n private _tagSet: TagSet;\n\n private _claimMouseSubscription: Subscription;\n private _cursorSubscription: Subscription;\n private _preventDefaultSubscription: Subscription;\n private _unclaimMouseSubscription: Subscription;\n private _updateGeometrySubscription: Subscription;\n\n constructor(\n component: Component<ITagConfiguration>,\n container: Container,\n navigator: Navigator,\n viewportCoords: ViewportCoords,\n tagSet: TagSet) {\n super(component, container, navigator, viewportCoords);\n\n this._tagSet = tagSet;\n }\n\n protected _enable(): void {\n const interaction$: Observable<IInteraction> = this._tagSet.changed$.pipe(\n map(\n (tagSet: TagSet): RenderTag<Tag>[] => {\n return tagSet.getAll();\n }),\n switchMap(\n (tags: RenderTag<Tag>[]): Observable<IInteraction> => {\n return observableFrom(tags).pipe(\n mergeMap(\n (tag: RenderTag<Tag>): Observable<IInteraction> => {\n return tag.interact$;\n }));\n }),\n switchMap(\n (interaction: IInteraction): Observable<IInteraction> => {\n return observableConcat(\n observableOf(interaction),\n this._container.mouseService.documentMouseUp$.pipe(\n map(\n (): IInteraction => {\n return { offsetX: 0, offsetY: 0, operation: TagOperation.None, tag: null };\n }),\n first()));\n }),\n share());\n\n const mouseMove$: Observable<MouseEvent> = observableMerge(\n this._container.mouseService.mouseMove$,\n this._container.mouseService.domMouseMove$).pipe(\n share());\n\n this._claimMouseSubscription = interaction$.pipe(\n switchMap(\n (interaction: IInteraction): Observable<MouseEvent> => {\n return !!interaction.tag ? this._container.mouseService.domMouseDragStart$ : observableEmpty();\n }))\n .subscribe(\n (): void => {\n this._container.mouseService.claimMouse(this._name, 3);\n });\n\n this._cursorSubscription = interaction$.pipe(\n map(\n (interaction: IInteraction): string => {\n return interaction.cursor;\n }),\n distinctUntilChanged())\n .subscribe(\n (cursor: string): void => {\n const interactionCursors: InteractionCursor[] = [\"crosshair\", \"move\", \"nesw-resize\", \"nwse-resize\"];\n for (const interactionCursor of interactionCursors) {\n this._container.element.classList.remove(`component-tag-edit-${interactionCursor}`);\n }\n\n if (!!cursor) {\n this._container.element.classList.add(`component-tag-edit-${cursor}`);\n }\n });\n\n this._unclaimMouseSubscription = this._container.mouseService\n .filtered$(this._name, this._container.mouseService.domMouseDragEnd$)\n .subscribe(\n (e: MouseEvent): void => {\n this._container.mouseService.unclaimMouse(this._name);\n });\n\n this._preventDefaultSubscription = interaction$.pipe(\n switchMap(\n (interaction: IInteraction): Observable<MouseEvent> => {\n return !!interaction.tag ?\n this._container.mouseService.documentMouseMove$ :\n observableEmpty();\n }))\n .subscribe(\n (event: MouseEvent): void => {\n event.preventDefault(); // prevent selection of content outside the viewer\n });\n\n this._updateGeometrySubscription = interaction$.pipe(\n switchMap(\n (interaction: IInteraction): Observable<[MouseEvent, RenderCamera, IInteraction, Transform]> => {\n if (interaction.operation === TagOperation.None || !interaction.tag) {\n return observableEmpty();\n }\n\n const mouseDrag$: Observable<MouseEvent> =\n this._container.mouseService\n .filtered$(\n this._name,\n this._container.mouseService.domMouseDrag$).pipe(\n filter(\n (event: MouseEvent): boolean => {\n return this._viewportCoords.insideElement(event, this._container.element);\n }));\n\n return observableCombineLatest<MouseEvent, RenderCamera>(\n mouseDrag$,\n this._container.renderService.renderCamera$).pipe(\n withLatestFrom(\n observableOf(interaction),\n this._navigator.stateService.currentTransform$,\n (\n [event, render]: [MouseEvent, RenderCamera],\n i: IInteraction,\n transform: Transform):\n [MouseEvent, RenderCamera, IInteraction, Transform] => {\n return [event, render, i, transform];\n }));\n }))\n .subscribe(\n ([mouseEvent, renderCamera, interaction, transform]: [MouseEvent, RenderCamera, IInteraction, Transform]): void => {\n const basic: number[] = this._mouseEventToBasic(\n mouseEvent,\n this._container.element,\n renderCamera,\n transform,\n interaction.offsetX,\n interaction.offsetY);\n\n const geometry: Geometry = interaction.tag.geometry;\n if (interaction.operation === TagOperation.Centroid) {\n geometry.setCentroid2d(basic, transform);\n } else if (interaction.operation === TagOperation.Vertex) {\n (<VertexGeometry>geometry).setVertex2d(interaction.vertexIndex, basic, transform);\n }\n });\n }\n\n protected _disable(): void {\n this._claimMouseSubscription.unsubscribe();\n this._cursorSubscription.unsubscribe();\n this._preventDefaultSubscription.unsubscribe();\n this._unclaimMouseSubscription.unsubscribe();\n this._updateGeometrySubscription.unsubscribe();\n }\n\n protected _getNameExtension(): string {\n return \"edit-vertex\";\n }\n}\n\nexport default EditVertexHandler;\n",
+ "import {\n Component,\n HandlerBase,\n ITagConfiguration,\n} from \"../../../Component\";\nimport {\n Transform,\n ViewportCoords,\n} from \"../../../Geo\";\nimport {RenderCamera} from \"../../../Render\";\nimport {\n Container,\n Navigator,\n} from \"../../../Viewer\";\n\nexport abstract class TagHandlerBase extends HandlerBase<ITagConfiguration> {\n protected _name: string;\n\n protected _viewportCoords: ViewportCoords;\n\n constructor(\n component: Component<ITagConfiguration>,\n container: Container,\n navigator: Navigator,\n viewportCoords: ViewportCoords) {\n super(component, container, navigator);\n\n this._name = `${this._component.name}-${this._getNameExtension()}`;\n\n this._viewportCoords = viewportCoords;\n }\n\n protected _getConfiguration(enable: boolean): ITagConfiguration {\n return {};\n }\n\n protected abstract _getNameExtension(): string;\n\n protected _mouseEventToBasic(\n event: MouseEvent,\n element: HTMLElement,\n camera: RenderCamera,\n transform: Transform,\n offsetX?: number,\n offsetY?: number):\n number[] {\n\n offsetX = offsetX != null ? offsetX : 0;\n offsetY = offsetY != null ? offsetY : 0;\n\n const [canvasX, canvasY]: number[] = this._viewportCoords.canvasPosition(event, element);\n const basic: number[] =\n this._viewportCoords.canvasToBasic(\n canvasX - offsetX,\n canvasY - offsetY,\n element,\n transform,\n camera.perspective);\n\n return basic;\n }\n}\n\nexport default TagHandlerBase;\n",
+ "import {map} from \"rxjs/operators\";\nimport * as THREE from \"three\";\nimport * as vd from \"virtual-dom\";\n\nimport {Observable, Subject, Subscription} from \"rxjs\";\n\nimport {\n IOutlineCreateTagOptions,\n PolygonGeometry,\n RectGeometry,\n VertexGeometry,\n} from \"../../../Component\";\nimport {\n Transform,\n ViewportCoords,\n} from \"../../../Geo\";\nimport {ISize} from \"../../../Render\";\n\nexport class OutlineCreateTag {\n private _geometry: VertexGeometry;\n private _outline: THREE.Line;\n private _glObjects: THREE.Object3D[];\n private _options: IOutlineCreateTagOptions;\n private _transform: Transform;\n private _viewportCoords: ViewportCoords;\n\n private _aborted$: Subject<OutlineCreateTag>;\n private _created$: Subject<OutlineCreateTag>;\n private _glObjectsChanged$: Subject<OutlineCreateTag>;\n\n private _geometryChangedSubscription: Subscription;\n\n constructor(geometry: VertexGeometry, options: IOutlineCreateTagOptions, transform: Transform, viewportCoords?: ViewportCoords) {\n this._geometry = geometry;\n this._options = { color: options.color == null ? 0xFFFFFF : options.color };\n this._transform = transform;\n this._viewportCoords = !!viewportCoords ? viewportCoords : new ViewportCoords();\n\n this._outline = this._createOutine();\n this._glObjects = [this._outline];\n\n this._aborted$ = new Subject<OutlineCreateTag>();\n this._created$ = new Subject<OutlineCreateTag>();\n this._glObjectsChanged$ = new Subject<OutlineCreateTag>();\n\n this._geometryChangedSubscription = this._geometry.changed$\n .subscribe(\n (vertexGeometry: VertexGeometry): void => {\n this._disposeOutline();\n this._outline = this._createOutine();\n this._glObjects = [this._outline];\n\n this._glObjectsChanged$.next(this);\n });\n }\n\n public get geometry(): VertexGeometry {\n return this._geometry;\n }\n\n public get glObjects(): THREE.Object3D[] {\n return this._glObjects;\n }\n\n public get aborted$(): Observable<OutlineCreateTag> {\n return this._aborted$;\n }\n\n public get created$(): Observable<OutlineCreateTag> {\n return this._created$;\n }\n\n public get glObjectsChanged$(): Observable<OutlineCreateTag> {\n return this._glObjectsChanged$;\n }\n\n public get geometryChanged$(): Observable<OutlineCreateTag> {\n return this._geometry.changed$.pipe(\n map(\n (geometry: VertexGeometry): OutlineCreateTag => {\n return this;\n }));\n }\n\n public dispose(): void {\n this._disposeOutline();\n this._geometryChangedSubscription.unsubscribe();\n }\n\n public getDOMObjects(camera: THREE.Camera, size: ISize): vd.VNode[] {\n const vNodes: vd.VNode[] = [];\n const container: { offsetHeight: number, offsetWidth: number } = {\n offsetHeight: size.height, offsetWidth: size.width,\n };\n\n const abort: (e: MouseEvent) => void = (e: MouseEvent): void => {\n e.stopPropagation();\n this._aborted$.next(this);\n };\n\n if (this._geometry instanceof RectGeometry) {\n const anchorIndex: number = (<RectGeometry>this._geometry).anchorIndex;\n const vertexIndex: number = anchorIndex === undefined ? 1 : anchorIndex;\n const [basicX, basicY]: number[] = this._geometry.getVertex2d(vertexIndex);\n const canvasPoint: number[] =\n this._viewportCoords.basicToCanvasSafe(\n basicX,\n basicY,\n container,\n this._transform,\n camera);\n\n if (canvasPoint != null) {\n const background: string = this._colorToBackground(this._options.color);\n const transform: string = this._canvasToTransform(canvasPoint);\n const pointProperties: vd.createProperties = {\n style: { background: background, transform: transform },\n };\n\n const completerProperties: vd.createProperties = {\n onclick: abort,\n style: { transform: transform },\n };\n\n vNodes.push(vd.h(\"div.TagInteractor\", completerProperties, []));\n vNodes.push(vd.h(\"div.TagVertex\", pointProperties, []));\n }\n } else if (this._geometry instanceof PolygonGeometry) {\n const polygonGeometry: PolygonGeometry = <PolygonGeometry>this._geometry;\n\n const [firstVertexBasicX, firstVertexBasicY]: number[] = polygonGeometry.getVertex2d(0);\n const firstVertexCanvas: number[] =\n this._viewportCoords.basicToCanvasSafe(\n firstVertexBasicX,\n firstVertexBasicY,\n container,\n this._transform,\n camera);\n\n if (firstVertexCanvas != null) {\n const firstOnclick: (e: MouseEvent) => void = polygonGeometry.polygon.length > 4 ?\n (e: MouseEvent): void => {\n e.stopPropagation();\n polygonGeometry.removeVertex2d(polygonGeometry.polygon.length - 2);\n this._created$.next(this);\n } :\n abort;\n\n const transform: string = this._canvasToTransform(firstVertexCanvas);\n const completerProperties: vd.createProperties = {\n onclick: firstOnclick,\n style: { transform: transform },\n };\n\n const firstClass: string = polygonGeometry.polygon.length > 4 ?\n \"TagCompleter\" :\n \"TagInteractor\";\n\n vNodes.push(vd.h(\"div.\" + firstClass, completerProperties, []));\n }\n\n if (polygonGeometry.polygon.length > 3) {\n const [lastVertexBasicX, lastVertexBasicY]: number[] = polygonGeometry.getVertex2d(polygonGeometry.polygon.length - 3);\n const lastVertexCanvas: number[] =\n this._viewportCoords.basicToCanvasSafe(\n lastVertexBasicX,\n lastVertexBasicY,\n container,\n this._transform,\n camera);\n\n if (lastVertexCanvas != null) {\n const remove: (e: MouseEvent) => void = (e: MouseEvent): void => {\n e.stopPropagation();\n polygonGeometry.removeVertex2d(polygonGeometry.polygon.length - 3);\n };\n\n const transform: string = this._canvasToTransform(lastVertexCanvas);\n const completerProperties: vd.createProperties = {\n onclick: remove,\n style: { transform: transform },\n };\n\n vNodes.push(vd.h(\"div.TagInteractor\", completerProperties, []));\n }\n }\n\n const verticesBasic: number[][] = polygonGeometry.polygon.slice();\n verticesBasic.splice(-2, 2);\n for (const vertexBasic of verticesBasic) {\n const vertexCanvas: number[] =\n this._viewportCoords.basicToCanvasSafe(\n vertexBasic[0],\n vertexBasic[1],\n container,\n this._transform,\n camera);\n\n if (vertexCanvas != null) {\n const background: string = this._colorToBackground(this._options.color);\n const transform: string = this._canvasToTransform(vertexCanvas);\n const pointProperties: vd.createProperties = {\n style: {\n background: background,\n transform: transform,\n },\n };\n\n vNodes.push(vd.h(\"div.TagVertex\", pointProperties, []));\n }\n }\n }\n\n return vNodes;\n }\n\n public addPoint(point: number[]): void {\n if (this._geometry instanceof RectGeometry) {\n const rectGeometry: RectGeometry = <RectGeometry>this._geometry;\n\n if (!rectGeometry.validate(point)) {\n return;\n }\n\n this._created$.next(this);\n } else if (this._geometry instanceof PolygonGeometry) {\n const polygonGeometry: PolygonGeometry = <PolygonGeometry>this._geometry;\n\n polygonGeometry.addVertex2d(point);\n }\n }\n\n private _canvasToTransform(canvas: number[]): string {\n const canvasX: number = Math.round(canvas[0]);\n const canvasY: number = Math.round(canvas[1]);\n const transform: string = `translate(-50%,-50%) translate(${canvasX}px,${canvasY}px)`;\n\n return transform;\n }\n\n private _colorToBackground(color: number): string {\n return \"#\" + (\"000000\" + color.toString(16)).substr(-6);\n }\n\n private _createOutine(): THREE.Line {\n const polygon3d: number[][] = this._geometry instanceof RectGeometry ?\n this._geometry.getPoints3d(this._transform) :\n (<PolygonGeometry>this._geometry).getVertices3d(this._transform);\n\n const positions: Float32Array = this._getLinePositions(polygon3d);\n\n const geometry: THREE.BufferGeometry = new THREE.BufferGeometry();\n geometry.addAttribute(\"position\", new THREE.BufferAttribute(positions, 3));\n\n const material: THREE.LineBasicMaterial =\n new THREE.LineBasicMaterial(\n {\n color: this._options.color,\n linewidth: 1,\n });\n\n return new THREE.Line(geometry, material);\n }\n\n private _disposeOutline(): void {\n if (this._outline == null) {\n return;\n }\n\n const line: THREE.Line = this._outline;\n line.geometry.dispose();\n line.material.dispose();\n this._outline = null;\n this._glObjects = [];\n }\n\n private _getLinePositions(polygon3d: number[][]): Float32Array {\n const length: number = polygon3d.length;\n const positions: Float32Array = new Float32Array(length * 3);\n\n for (let i: number = 0; i < length; ++i) {\n const index: number = 3 * i;\n\n const position: number[] = polygon3d[i];\n\n positions[index] = position[0];\n positions[index + 1] = position[1];\n positions[index + 2] = position[2];\n }\n\n return positions;\n }\n}\n\nexport default OutlineCreateTag;\n",
+ "import * as THREE from \"three\";\nimport * as vd from \"virtual-dom\";\n\nimport {Subscription} from \"rxjs\";\n\nimport {\n InteractionCursor,\n OutlineTag,\n PolygonGeometry,\n RectGeometry,\n RenderTag,\n TagDomain,\n TagOperation,\n} from \"../../../Component\";\nimport {Transform} from \"../../../Geo\";\nimport {ISize} from \"../../../Render\";\nimport {ISpriteAtlas} from \"../../../Viewer\";\n\n/**\n * @class OutlineRenderTag\n * @classdesc Tag visualizing the properties of an OutlineTag.\n */\nexport class OutlineRenderTag extends RenderTag<OutlineTag> {\n private _fill: THREE.Mesh;\n private _holes: THREE.Line[];\n private _outline: THREE.Line;\n\n private _changedSubscription: Subscription;\n private _geometryChangedSubscription: Subscription;\n\n constructor(tag: OutlineTag, transform: Transform) {\n super(tag, transform);\n\n this._fill = !transform.gpano ?\n this._createFill() :\n transform.fullPano &&\n tag.domain === TagDomain.TwoDimensional &&\n tag.geometry instanceof PolygonGeometry ?\n this._createFill() :\n null;\n\n this._holes = this._tag.lineWidth >= 1 ?\n this._createHoles() :\n [];\n\n this._outline = this._tag.lineWidth >= 1 ?\n this._createOutline() :\n null;\n\n this._geometryChangedSubscription = this._tag.geometry.changed$\n .subscribe(\n (): void => {\n if (this._fill != null) {\n this._updateFillGeometry();\n }\n\n if (this._holes.length > 0) {\n this._updateHoleGeometries();\n }\n\n if (this._outline != null) {\n this._updateOulineGeometry();\n }\n });\n\n this._changedSubscription = this._tag.changed$\n .subscribe(\n (): void => {\n let glObjectsChanged: boolean = false;\n\n if (this._fill != null) {\n this._updateFillMaterial(<THREE.MeshBasicMaterial>this._fill.material);\n }\n\n if (this._outline == null) {\n if (this._tag.lineWidth >= 1) {\n this._holes = this._createHoles();\n this._outline = this._createOutline();\n glObjectsChanged = true;\n }\n } else {\n this._updateHoleMaterials();\n this._updateOutlineMaterial();\n }\n\n if (glObjectsChanged) {\n this._glObjectsChanged$.next(this);\n }\n });\n }\n\n public dispose(): void {\n this._disposeFill();\n this._disposeHoles();\n this._disposeOutline();\n\n this._changedSubscription.unsubscribe();\n this._geometryChangedSubscription.unsubscribe();\n }\n\n public getDOMObjects(atlas: ISpriteAtlas, camera: THREE.Camera, size: ISize): vd.VNode[] {\n const vNodes: vd.VNode[] = [];\n const isRect: boolean = this._tag.geometry instanceof RectGeometry;\n const isPerspective: boolean = !this._transform.gpano;\n const container: { offsetHeight: number, offsetWidth: number } = {\n offsetHeight: size.height, offsetWidth: size.width,\n };\n\n if (this._tag.icon != null && (isRect || isPerspective)) {\n const [iconBasicX, iconBasicY]: number[] = this._tag.geometry instanceof RectGeometry ?\n this._tag.geometry.getVertex2d(this._tag.iconIndex) :\n this._tag.geometry.getPoleOfInaccessibility2d();\n\n const iconCanvas: number[] =\n this._viewportCoords.basicToCanvasSafe(\n iconBasicX,\n iconBasicY,\n container,\n this._transform,\n camera);\n\n if (iconCanvas != null) {\n const interact: (e: MouseEvent) => void = (e: MouseEvent): void => {\n this._interact$.next({ offsetX: 0, offsetY: 0, operation: TagOperation.None, tag: this._tag });\n };\n\n if (atlas.loaded) {\n const sprite: vd.VNode = atlas.getDOMSprite(this._tag.icon, this._tag.iconFloat);\n const iconCanvasX: number = Math.round(iconCanvas[0]);\n const iconCanvasY: number = Math.round(iconCanvas[1]);\n const transform: string = `translate(${iconCanvasX}px,${iconCanvasY}px)`;\n\n const click: (e: MouseEvent) => void = (e: MouseEvent): void => {\n e.stopPropagation();\n this._tag.click$.next(this._tag);\n };\n\n const properties: vd.createProperties = {\n onclick: click,\n onmousedown: interact,\n style: { transform: transform },\n };\n\n vNodes.push(vd.h(\"div.TagSymbol\", properties, [sprite]));\n }\n }\n } else if (this._tag.text != null && (isRect || isPerspective)) {\n const [textBasicX, textBasicY]: number[] = this._tag.geometry instanceof RectGeometry ?\n this._tag.geometry.getVertex2d(3) :\n this._tag.geometry.getPoleOfInaccessibility2d();\n\n const textCanvas: number[] =\n this._viewportCoords.basicToCanvasSafe(\n textBasicX,\n textBasicY,\n container,\n this._transform,\n camera);\n\n if (textCanvas != null) {\n const textCanvasX: number = Math.round(textCanvas[0]);\n const textCanvasY: number = Math.round(textCanvas[1]);\n const transform: string = this._tag.geometry instanceof RectGeometry ?\n `translate(${textCanvasX}px,${textCanvasY}px)` :\n `translate(-50%, -50%) translate(${textCanvasX}px,${textCanvasY}px)`;\n\n const interact: (e: MouseEvent) => void = (e: MouseEvent): void => {\n this._interact$.next({ offsetX: 0, offsetY: 0, operation: TagOperation.None, tag: this._tag });\n };\n\n const properties: vd.createProperties = {\n onmousedown: interact,\n style: {\n color: this._colorToCss(this._tag.textColor),\n transform: transform,\n },\n textContent: this._tag.text,\n };\n\n vNodes.push(vd.h(\"span.TagSymbol\", properties, []));\n }\n }\n\n if (!this._tag.editable) {\n return vNodes;\n }\n\n const lineColor: string = this._colorToCss(this._tag.lineColor);\n\n if (this._tag.geometry instanceof RectGeometry) {\n const [centroidBasicX, centroidBasicY]: number[] = this._tag.geometry.getCentroid2d();\n const centroidCanvas: number[] =\n this._viewportCoords.basicToCanvasSafe(\n centroidBasicX,\n centroidBasicY,\n container,\n this._transform,\n camera);\n\n if (centroidCanvas != null) {\n const interact: (e: MouseEvent) => void = this._interact(TagOperation.Centroid, \"move\");\n const centroidCanvasX: number = Math.round(centroidCanvas[0]);\n const centroidCanvasY: number = Math.round(centroidCanvas[1]);\n const transform: string = `translate(-50%, -50%) translate(${centroidCanvasX}px,${centroidCanvasY}px)`;\n\n const properties: vd.createProperties = {\n onmousedown: interact,\n style: { background: lineColor, transform: transform },\n };\n\n vNodes.push(vd.h(\"div.TagMover\", properties, []));\n }\n }\n\n const vertices2d: number[][] = this._tag.geometry.getVertices2d();\n\n for (let i: number = 0; i < vertices2d.length - 1; i++) {\n if (isRect &&\n ((this._tag.icon != null && i === this._tag.iconIndex) ||\n (this._tag.icon == null && this._tag.text != null && i === 3))) {\n continue;\n }\n\n const [vertexBasicX, vertexBasicY]: number[] = vertices2d[i];\n const vertexCanvas: number[] =\n this._viewportCoords.basicToCanvasSafe(\n vertexBasicX,\n vertexBasicY,\n container,\n this._transform,\n camera);\n\n if (vertexCanvas == null) {\n continue;\n }\n\n const cursor: InteractionCursor = isRect ?\n i % 2 === 0 ? \"nesw-resize\" : \"nwse-resize\" :\n \"crosshair\";\n\n const interact: (e: MouseEvent) => void = this._interact(TagOperation.Vertex, cursor, i);\n const vertexCanvasX: number = Math.round(vertexCanvas[0]);\n const vertexCanvasY: number = Math.round(vertexCanvas[1]);\n const transform: string = `translate(-50%, -50%) translate(${vertexCanvasX}px,${vertexCanvasY}px)`;\n\n const properties: vd.createProperties = {\n onmousedown: interact,\n style: { background: lineColor, transform: transform, cursor: cursor },\n };\n\n vNodes.push(vd.h(\"div.TagResizer\", properties, []));\n\n if (!this._tag.indicateVertices) {\n continue;\n }\n\n const pointProperties: vd.createProperties = {\n style: { background: lineColor, transform: transform },\n };\n\n vNodes.push(vd.h(\"div.TagVertex\", pointProperties, []));\n }\n\n return vNodes;\n }\n\n public getGLObjects(): THREE.Object3D[] {\n const glObjects: THREE.Object3D[] = [];\n\n if (this._fill != null) {\n glObjects.push(this._fill);\n }\n\n for (const hole of this._holes) {\n glObjects.push(hole);\n }\n\n if (this._outline != null) {\n glObjects.push(this._outline);\n }\n\n return glObjects;\n }\n\n public getRetrievableObjects(): THREE.Object3D[] {\n return this._fill != null ? [this._fill] : [];\n }\n\n private _colorToCss(color: number): string {\n return \"#\" + (\"000000\" + color.toString(16)).substr(-6);\n }\n\n private _createFill(): THREE.Mesh {\n let triangles: number[] = this._getTriangles();\n let positions: Float32Array = new Float32Array(triangles);\n\n let geometry: THREE.BufferGeometry = new THREE.BufferGeometry();\n geometry.addAttribute(\"position\", new THREE.BufferAttribute(positions, 3));\n geometry.computeBoundingSphere();\n\n let material: THREE.MeshBasicMaterial =\n new THREE.MeshBasicMaterial({ side: THREE.DoubleSide, transparent: true });\n\n this._updateFillMaterial(material);\n\n return new THREE.Mesh(geometry, material);\n }\n\n private _createHoles(): THREE.Line[] {\n let holes: THREE.Line[] = [];\n\n if (this._tag.geometry instanceof PolygonGeometry) {\n let holes3d: number[][][] = this._getHoles3d();\n\n for (let holePoints3d of holes3d) {\n let hole: THREE.Line = this._createLine(holePoints3d);\n holes.push(hole);\n }\n }\n\n return holes;\n }\n\n private _createLine(points3d: number[][]): THREE.Line {\n let positions: Float32Array = this._getLinePositions(points3d);\n\n let geometry: THREE.BufferGeometry = new THREE.BufferGeometry();\n geometry.addAttribute(\"position\", new THREE.BufferAttribute(positions, 3));\n geometry.computeBoundingSphere();\n\n let material: THREE.LineBasicMaterial = new THREE.LineBasicMaterial();\n this._updateLineBasicMaterial(material);\n\n const line: THREE.Line = new THREE.Line(geometry, material);\n line.renderOrder = 1;\n\n return line;\n }\n\n private _createOutline(): THREE.Line {\n return this._createLine(this._getPoints3d());\n }\n\n private _disposeFill(): void {\n if (this._fill == null) {\n return;\n }\n\n this._fill.geometry.dispose();\n (<THREE.Material>this._fill.material).dispose();\n this._fill = null;\n }\n\n private _disposeHoles(): void {\n for (let hole of this._holes) {\n hole.geometry.dispose();\n hole.material.dispose();\n }\n\n this._holes = [];\n }\n\n private _disposeOutline(): void {\n if (this._outline == null) {\n return;\n }\n\n this._outline.geometry.dispose();\n this._outline.material.dispose();\n this._outline = null;\n }\n\n private _getLinePositions(points3d: number[][]): Float32Array {\n let length: number = points3d.length;\n let positions: Float32Array = new Float32Array(length * 3);\n\n for (let i: number = 0; i < length; ++i) {\n let index: number = 3 * i;\n let position: number[] = points3d[i];\n\n positions[index + 0] = position[0];\n positions[index + 1] = position[1];\n positions[index + 2] = position[2];\n }\n\n return positions;\n }\n\n private _getHoles3d(): number[][][] {\n const polygonGeometry: PolygonGeometry = <PolygonGeometry>this._tag.geometry;\n\n return this._in3dDomain() ?\n polygonGeometry.getHoleVertices3d(this._transform) :\n polygonGeometry.getHolePoints3d(this._transform);\n }\n\n private _getPoints3d(): number[][] {\n return this._in3dDomain() ?\n (<PolygonGeometry>this._tag.geometry).getVertices3d(this._transform) :\n this._tag.geometry.getPoints3d(this._transform);\n }\n\n private _getTriangles(): number[] {\n return this._in3dDomain() ?\n (<PolygonGeometry>this._tag.geometry).get3dDomainTriangles3d(this._transform) :\n this._tag.geometry.getTriangles3d(this._transform);\n }\n\n private _in3dDomain(): boolean {\n return this._tag.geometry instanceof PolygonGeometry && this._tag.domain === TagDomain.ThreeDimensional;\n }\n\n private _interact(operation: TagOperation, cursor?: InteractionCursor, vertexIndex?: number): (e: MouseEvent) => void {\n return (e: MouseEvent): void => {\n let offsetX: number = e.offsetX - (<HTMLElement>e.target).offsetWidth / 2;\n let offsetY: number = e.offsetY - (<HTMLElement>e.target).offsetHeight / 2;\n\n this._interact$.next({\n cursor: cursor,\n offsetX: offsetX,\n offsetY: offsetY,\n operation: operation,\n tag: this._tag,\n vertexIndex: vertexIndex,\n });\n };\n }\n\n private _updateFillGeometry(): void {\n let triangles: number[] = this._getTriangles();\n let positions: Float32Array = new Float32Array(triangles);\n\n let geometry: THREE.BufferGeometry = <THREE.BufferGeometry>this._fill.geometry;\n let attribute: THREE.BufferAttribute = <THREE.BufferAttribute>geometry.getAttribute(\"position\");\n\n if (attribute.array.length === positions.length) {\n attribute.set(positions);\n attribute.needsUpdate = true;\n } else {\n geometry.removeAttribute(\"position\");\n geometry.addAttribute(\"position\", new THREE.BufferAttribute(positions, 3));\n }\n\n geometry.computeBoundingSphere();\n }\n\n private _updateFillMaterial(material: THREE.MeshBasicMaterial): void {\n material.color = new THREE.Color(this._tag.fillColor);\n material.opacity = this._tag.fillOpacity;\n material.needsUpdate = true;\n }\n\n private _updateHoleGeometries(): void {\n let holes3d: number[][][] = this._getHoles3d();\n\n if (holes3d.length !== this._holes.length) {\n throw new Error(\"Changing the number of holes is not supported.\");\n }\n\n for (let i: number = 0; i < this._holes.length; i++) {\n let holePoints3d: number[][] = holes3d[i];\n let hole: THREE.Line = this._holes[i];\n\n this._updateLine(hole, holePoints3d);\n }\n }\n\n private _updateHoleMaterials(): void {\n for (let hole of this._holes) {\n let material: THREE.LineBasicMaterial = <THREE.LineBasicMaterial>hole.material;\n\n this._updateLineBasicMaterial(material);\n }\n }\n\n private _updateLine(line: THREE.Line, points3d: number[][]): void {\n let positions: Float32Array = this._getLinePositions(points3d);\n\n let geometry: THREE.BufferGeometry = <THREE.BufferGeometry>line.geometry;\n let attribute: THREE.BufferAttribute = <THREE.BufferAttribute>geometry.getAttribute(\"position\");\n\n attribute.set(positions);\n attribute.needsUpdate = true;\n\n geometry.computeBoundingSphere();\n }\n\n private _updateOulineGeometry(): void {\n this._updateLine(this._outline, this._getPoints3d());\n }\n\n private _updateOutlineMaterial(): void {\n let material: THREE.LineBasicMaterial = <THREE.LineBasicMaterial>this._outline.material;\n\n this._updateLineBasicMaterial(material);\n }\n\n private _updateLineBasicMaterial(material: THREE.LineBasicMaterial): void {\n material.color = new THREE.Color(this._tag.lineColor);\n material.linewidth = Math.max(this._tag.lineWidth, 1);\n material.visible = this._tag.lineWidth >= 1 && this._tag.lineOpacity > 0;\n material.opacity = this._tag.lineOpacity;\n material.transparent = this._tag.lineOpacity < 1;\n material.needsUpdate = true;\n }\n}\n",
+ "import {Subject} from \"rxjs\";\n\nimport {\n IOutlineTagOptions,\n PolygonGeometry,\n RectGeometry,\n Tag,\n TagDomain,\n VertexGeometry,\n} from \"../../../Component\";\nimport {Alignment} from \"../../../Viewer\";\n\n/**\n * @class OutlineTag\n *\n * @classdesc Tag holding properties for visualizing a geometry outline.\n *\n * @example\n * ```\n * var geometry = new Mapillary.TagComponent.RectGeometry([0.3, 0.3, 0.5, 0.4]);\n * var tag = new Mapillary.TagComponent.OutlineTag(\n * \"id-1\",\n * geometry\n * { editable: true, lineColor: 0xff0000 });\n *\n * tagComponent.add([tag]);\n * ```\n */\nexport class OutlineTag extends Tag {\n /**\n * Event fired when the icon of the outline tag is clicked.\n *\n * @event OutlineTag#click\n * @type {OutlineTag} The tag instance that was clicked.\n */\n public static click: string = \"click\";\n\n protected _geometry: VertexGeometry;\n\n private _domain: TagDomain;\n private _editable: boolean;\n private _icon: string;\n private _iconFloat: Alignment;\n private _iconIndex: number;\n private _indicateVertices: boolean;\n private _lineColor: number;\n private _lineOpacity: number;\n private _lineWidth: number;\n private _fillColor: number;\n private _fillOpacity: number;\n private _text: string;\n private _textColor: number;\n\n private _click$: Subject<OutlineTag>;\n\n /**\n * Create an outline tag.\n *\n * @override\n * @constructor\n * @param {string} id - Unique identifier of the tag.\n * @param {VertexGeometry} geometry - Geometry defining vertices of tag.\n * @param {IOutlineTagOptions} options - Options defining the visual appearance and\n * behavior of the outline tag.\n */\n constructor(id: string, geometry: VertexGeometry, options?: IOutlineTagOptions) {\n super(id, geometry);\n\n options = !!options ? options : {};\n\n const domain: TagDomain = options.domain != null && geometry instanceof PolygonGeometry ?\n options.domain : TagDomain.TwoDimensional;\n\n const twoDimensionalPolygon: boolean = this._twoDimensionalPolygon(domain, geometry);\n\n this._domain = domain;\n this._editable = options.editable == null || twoDimensionalPolygon ? false : options.editable;\n this._fillColor = options.fillColor == null ? 0xFFFFFF : options.fillColor;\n this._fillOpacity = options.fillOpacity == null ? 0.0 : options.fillOpacity;\n this._icon = options.icon === undefined ? null : options.icon;\n this._iconFloat = options.iconFloat == null ? Alignment.Center : options.iconFloat;\n this._iconIndex = options.iconIndex == null ? 3 : options.iconIndex;\n this._indicateVertices = options.indicateVertices == null ? true : options.indicateVertices;\n this._lineColor = options.lineColor == null ? 0xFFFFFF : options.lineColor;\n this._lineOpacity = options.lineOpacity == null ? 1 : options.lineOpacity;\n this._lineWidth = options.lineWidth == null ? 1 : options.lineWidth;\n this._text = options.text === undefined ? null : options.text;\n this._textColor = options.textColor == null ? 0xFFFFFF : options.textColor;\n\n this._click$ = new Subject<OutlineTag>();\n\n this._click$\n .subscribe(\n (t: Tag): void => {\n this.fire(OutlineTag.click, this);\n });\n }\n\n /**\n * Click observable.\n *\n * @description An observable emitting the tag when the icon of the\n * tag has been clicked.\n *\n * @returns {Observable<Tag>}\n */\n public get click$(): Subject<OutlineTag> {\n return this._click$;\n }\n\n /**\n * Get domain property.\n *\n * @description Readonly property that can only be set in constructor.\n *\n * @returns Value indicating the domain of the tag.\n */\n public get domain(): TagDomain {\n return this._domain;\n }\n\n /**\n * Get editable property.\n * @returns {boolean} Value indicating if tag is editable.\n */\n public get editable(): boolean {\n return this._editable;\n }\n\n /**\n * Set editable property.\n * @param {boolean}\n *\n * @fires Tag#changed\n */\n public set editable(value: boolean) {\n if (this._twoDimensionalPolygon(this._domain, this._geometry)) {\n return;\n }\n\n this._editable = value;\n this._notifyChanged$.next(this);\n }\n\n /**\n * Get fill color property.\n * @returns {number}\n */\n public get fillColor(): number {\n return this._fillColor;\n }\n\n /**\n * Set fill color property.\n * @param {number}\n *\n * @fires Tag#changed\n */\n public set fillColor(value: number) {\n this._fillColor = value;\n this._notifyChanged$.next(this);\n }\n\n /**\n * Get fill opacity property.\n * @returns {number}\n */\n public get fillOpacity(): number {\n return this._fillOpacity;\n }\n\n /**\n * Set fill opacity property.\n * @param {number}\n *\n * @fires Tag#changed\n */\n public set fillOpacity(value: number) {\n this._fillOpacity = value;\n this._notifyChanged$.next(this);\n }\n\n /** @inheritdoc */\n public get geometry(): VertexGeometry {\n return this._geometry;\n }\n\n /**\n * Get icon property.\n * @returns {string}\n */\n public get icon(): string {\n return this._icon;\n }\n\n /**\n * Set icon property.\n * @param {string}\n *\n * @fires Tag#changed\n */\n public set icon(value: string) {\n this._icon = value;\n this._notifyChanged$.next(this);\n }\n\n /**\n * Get icon float property.\n * @returns {Alignment}\n */\n public get iconFloat(): Alignment {\n return this._iconFloat;\n }\n\n /**\n * Set icon float property.\n * @param {Alignment}\n *\n * @fires Tag#changed\n */\n public set iconFloat(value: Alignment) {\n this._iconFloat = value;\n this._notifyChanged$.next(this);\n }\n\n /**\n * Get icon index property.\n * @returns {number}\n */\n public get iconIndex(): number {\n return this._iconIndex;\n }\n\n /**\n * Set icon index property.\n * @param {number}\n *\n * @fires Tag#changed\n */\n public set iconIndex(value: number) {\n this._iconIndex = value;\n this._notifyChanged$.next(this);\n }\n\n /**\n * Get indicate vertices property.\n * @returns {boolean} Value indicating if vertices should be indicated\n * when tag is editable.\n */\n public get indicateVertices(): boolean {\n return this._indicateVertices;\n }\n\n /**\n * Set indicate vertices property.\n * @param {boolean}\n *\n * @fires Tag#changed\n */\n public set indicateVertices(value: boolean) {\n this._indicateVertices = value;\n this._notifyChanged$.next(this);\n }\n\n /**\n * Get line color property.\n * @returns {number}\n */\n public get lineColor(): number {\n return this._lineColor;\n }\n\n /**\n * Set line color property.\n * @param {number}\n *\n * @fires Tag#changed\n */\n public set lineColor(value: number) {\n this._lineColor = value;\n this._notifyChanged$.next(this);\n }\n\n /**\n * Get line opacity property.\n * @returns {number}\n */\n public get lineOpacity(): number {\n return this._lineOpacity;\n }\n\n /**\n * Set line opacity property.\n * @param {number}\n *\n * @fires Tag#changed\n */\n public set lineOpacity(value: number) {\n this._lineOpacity = value;\n this._notifyChanged$.next(this);\n }\n\n /**\n * Get line width property.\n * @returns {number}\n */\n public get lineWidth(): number {\n return this._lineWidth;\n }\n\n /**\n * Set line width property.\n * @param {number}\n *\n * @fires Tag#changed\n */\n public set lineWidth(value: number) {\n this._lineWidth = value;\n this._notifyChanged$.next(this);\n }\n\n /**\n * Get text property.\n * @returns {string}\n */\n public get text(): string {\n return this._text;\n }\n\n /**\n * Set text property.\n * @param {string}\n *\n * @fires Tag#changed\n */\n public set text(value: string) {\n this._text = value;\n this._notifyChanged$.next(this);\n }\n\n /**\n * Get text color property.\n * @returns {number}\n */\n public get textColor(): number {\n return this._textColor;\n }\n\n /**\n * Set text color property.\n * @param {number}\n *\n * @fires Tag#changed\n */\n public set textColor(value: number) {\n this._textColor = value;\n this._notifyChanged$.next(this);\n }\n\n /**\n * Set options for tag.\n *\n * @description Sets all the option properties provided and keeps\n * the rest of the values as is.\n *\n * @param {IOutlineTagOptions} options - Outline tag options\n *\n * @fires {Tag#changed}\n */\n public setOptions(options: IOutlineTagOptions): void {\n const twoDimensionalPolygon: boolean = this._twoDimensionalPolygon(this._domain, this._geometry);\n\n this._editable = twoDimensionalPolygon || options.editable == null ? this._editable : options.editable;\n this._icon = options.icon === undefined ? this._icon : options.icon;\n this._iconFloat = options.iconFloat == null ? this._iconFloat : options.iconFloat;\n this._iconIndex = options.iconIndex == null ? this._iconIndex : options.iconIndex;\n this._indicateVertices = options.indicateVertices == null ? this._indicateVertices : options.indicateVertices;\n this._lineColor = options.lineColor == null ? this._lineColor : options.lineColor;\n this._lineWidth = options.lineWidth == null ? this._lineWidth : options.lineWidth;\n this._fillColor = options.fillColor == null ? this._fillColor : options.fillColor;\n this._fillOpacity = options.fillOpacity == null ? this._fillOpacity : options.fillOpacity;\n this._text = options.text === undefined ? this._text : options.text;\n this._textColor = options.textColor == null ? this._textColor : options.textColor;\n this._notifyChanged$.next(this);\n }\n\n private _twoDimensionalPolygon(domain: TagDomain, geometry: VertexGeometry): boolean {\n return domain !== TagDomain.ThreeDimensional && geometry instanceof PolygonGeometry;\n }\n}\n\nexport default OutlineTag;\n",
+ "import * as THREE from \"three\";\nimport * as vd from \"virtual-dom\";\n\nimport {Observable, Subject} from \"rxjs\";\n\nimport {IInteraction} from \"../../../Component\";\nimport {\n Transform,\n ViewportCoords,\n} from \"../../../Geo\";\nimport {ISize} from \"../../../Render\";\nimport {ISpriteAtlas} from \"../../../Viewer\";\n\nexport abstract class RenderTag<T> {\n protected _tag: T;\n protected _transform: Transform;\n protected _viewportCoords: ViewportCoords;\n\n protected _glObjectsChanged$: Subject<RenderTag<T>>;\n protected _interact$: Subject<IInteraction>;\n\n constructor(tag: T, transform: Transform, viewportCoords?: ViewportCoords) {\n this._tag = tag;\n this._transform = transform;\n this._viewportCoords = !!viewportCoords ? viewportCoords : new ViewportCoords();\n\n this._glObjectsChanged$ = new Subject<RenderTag<T>>();\n this._interact$ = new Subject<IInteraction>();\n }\n\n public get glObjectsChanged$(): Observable<RenderTag<T>> {\n return this._glObjectsChanged$;\n }\n\n public get interact$(): Observable<IInteraction> {\n return this._interact$;\n }\n\n public get tag(): T {\n return this._tag;\n }\n\n public abstract dispose(): void;\n\n public abstract getDOMObjects(atlas: ISpriteAtlas, camera: THREE.Camera, size: ISize): vd.VNode[];\n\n public abstract getGLObjects(): THREE.Object3D[];\n\n public abstract getRetrievableObjects(): THREE.Object3D[];\n}\n\nexport default RenderTag;\n",
+ "import * as THREE from \"three\";\nimport * as vd from \"virtual-dom\";\n\nimport {\n InteractionCursor,\n RenderTag,\n SpotTag,\n Tag,\n TagOperation,\n} from \"../../../Component\";\nimport {ISize} from \"../../../Render\";\nimport {\n Alignment,\n ISpriteAtlas,\n} from \"../../../Viewer\";\n\n/**\n * @class SpotRenderTag\n * @classdesc Tag visualizing the properties of a SpotTag.\n */\nexport class SpotRenderTag extends RenderTag<SpotTag> {\n public dispose(): void { /* noop */ }\n\n public getDOMObjects(atlas: ISpriteAtlas, camera: THREE.Camera, size: ISize): vd.VNode[] {\n const tag: SpotTag = this._tag;\n const container: { offsetHeight: number, offsetWidth: number } = {\n offsetHeight: size.height, offsetWidth: size.width,\n };\n\n const vNodes: vd.VNode[] = [];\n const [centroidBasicX, centroidBasicY]: number[] = tag.geometry.getCentroid2d();\n const centroidCanvas: number[] =\n this._viewportCoords.basicToCanvasSafe(\n centroidBasicX,\n centroidBasicY,\n container,\n this._transform,\n camera);\n\n if (centroidCanvas != null) {\n const interactNone: (e: MouseEvent) => void = (e: MouseEvent): void => {\n this._interact$.next({ offsetX: 0, offsetY: 0, operation: TagOperation.None, tag: tag });\n };\n\n const canvasX: number = Math.round(centroidCanvas[0]);\n const canvasY: number = Math.round(centroidCanvas[1]);\n\n if (tag.icon != null) {\n if (atlas.loaded) {\n const sprite: vd.VNode = atlas.getDOMSprite(tag.icon, Alignment.Bottom);\n const iconTransform: string = `translate(${canvasX}px,${canvasY + 8}px)`;\n const properties: vd.createProperties = {\n onmousedown: interactNone,\n style: {\n pointerEvents: \"all\",\n transform: iconTransform,\n },\n };\n\n vNodes.push(vd.h(\"div\", properties, [sprite]));\n }\n } else if (tag.text != null) {\n const textTransform: string = `translate(-50%,0%) translate(${canvasX}px,${canvasY + 8}px)`;\n const properties: vd.createProperties = {\n onmousedown: interactNone,\n style: {\n color: this._colorToCss(tag.textColor),\n transform: textTransform,\n },\n textContent: tag.text,\n };\n\n vNodes.push(vd.h(\"span.TagSymbol\", properties, []));\n }\n\n const interact: (e: MouseEvent) => void = this._interact(TagOperation.Centroid, tag, \"move\");\n const background: string = this._colorToCss(tag.color);\n const transform: string = `translate(-50%,-50%) translate(${canvasX}px,${canvasY}px)`;\n\n if (tag.editable) {\n let interactorProperties: vd.createProperties = {\n onmousedown: interact,\n style: {\n background: background,\n transform: transform,\n },\n };\n\n vNodes.push(vd.h(\"div.TagSpotInteractor\", interactorProperties, []));\n }\n\n const pointProperties: vd.createProperties = {\n style: {\n background: background,\n transform: transform,\n },\n };\n\n vNodes.push(vd.h(\"div.TagVertex\", pointProperties, []));\n }\n\n return vNodes;\n }\n\n public getGLObjects(): THREE.Object3D[] { return []; }\n\n public getRetrievableObjects(): THREE.Object3D[] { return []; }\n\n private _colorToCss(color: number): string {\n return \"#\" + (\"000000\" + color.toString(16)).substr(-6);\n }\n\n private _interact(operation: TagOperation, tag: Tag, cursor: InteractionCursor, vertexIndex?: number): (e: MouseEvent) => void {\n return (e: MouseEvent): void => {\n const offsetX: number = e.offsetX - (<HTMLElement>e.target).offsetWidth / 2;\n const offsetY: number = e.offsetY - (<HTMLElement>e.target).offsetHeight / 2;\n\n this._interact$.next({\n cursor: cursor,\n offsetX: offsetX,\n offsetY: offsetY,\n operation: operation,\n tag: tag,\n vertexIndex: vertexIndex,\n });\n };\n }\n}\n",
"import {\n Geometry,\n ISpotTagOptions,\n Tag,\n} from \"../../../Component\";\n\n/**\n * @class SpotTag\n *\n * @classdesc Tag holding properties for visualizing the centroid of a geometry.\n *\n * @example\n * ```\n * var geometry = new Mapillary.TagComponent.PointGeometry([0.3, 0.3]);\n * var tag = new Mapillary.TagComponent.SpotTag(\n * \"id-1\",\n * geometry\n * { editable: true, color: 0xff0000 });\n *\n * tagComponent.add([tag]);\n * ```\n */\nexport class SpotTag extends Tag {\n protected _geometry: Geometry;\n\n private _color: number;\n private _editable: boolean;\n private _icon: string;\n private _text: string;\n private _textColor: number;\n\n /**\n * Create a spot tag.\n *\n * @override\n * @constructor\n * @param {string} id\n * @param {Geometry} geometry\n * @param {IOutlineTagOptions} options - Options defining the visual appearance and\n * behavior of the spot tag.\n */\n constructor(id: string, geometry: Geometry, options?: ISpotTagOptions) {\n super(id, geometry);\n\n options = !!options ? options : {};\n\n this._color = options.color == null ? 0xFFFFFF : options.color;\n this._editable = options.editable == null ? false : options.editable;\n this._icon = options.icon === undefined ? null : options.icon;\n this._text = options.text === undefined ? null : options.text;\n this._textColor = options.textColor == null ? 0xFFFFFF : options.textColor;\n }\n\n /**\n * Get color property.\n * @returns {number} The color of the spot as a hexagonal number;\n */\n public get color(): number {\n return this._color;\n }\n\n /**\n * Set color property.\n * @param {number}\n *\n * @fires Tag#changed\n */\n public set color(value: number) {\n this._color = value;\n this._notifyChanged$.next(this);\n }\n\n /**\n * Get editable property.\n * @returns {boolean} Value indicating if tag is editable.\n */\n public get editable(): boolean {\n return this._editable;\n }\n\n /**\n * Set editable property.\n * @param {boolean}\n *\n * @fires Tag#changed\n */\n public set editable(value: boolean) {\n this._editable = value;\n this._notifyChanged$.next(this);\n }\n\n /**\n * Get icon property.\n * @returns {string}\n */\n public get icon(): string {\n return this._icon;\n }\n\n /**\n * Set icon property.\n * @param {string}\n *\n * @fires Tag#changed\n */\n public set icon(value: string) {\n this._icon = value;\n this._notifyChanged$.next(this);\n }\n\n /**\n * Get text property.\n * @returns {string}\n */\n public get text(): string {\n return this._text;\n }\n\n /**\n * Set text property.\n * @param {string}\n *\n * @fires Tag#changed\n */\n public set text(value: string) {\n this._text = value;\n this._notifyChanged$.next(this);\n }\n\n /**\n * Get text color property.\n * @returns {number}\n */\n public get textColor(): number {\n return this._textColor;\n }\n\n /**\n * Set text color property.\n * @param {number}\n *\n * @fires Tag#changed\n */\n public set textColor(value: number) {\n this._textColor = value;\n this._notifyChanged$.next(this);\n }\n\n /**\n * Set options for tag.\n *\n * @description Sets all the option properties provided and keps\n * the rest of the values as is.\n *\n * @param {ISpotTagOptions} options - Spot tag options\n *\n * @fires {Tag#changed}\n */\n public setOptions(options: ISpotTagOptions): void {\n this._color = options.color == null ? this._color : options.color;\n this._editable = options.editable == null ? this._editable : options.editable;\n this._icon = options.icon === undefined ? this._icon : options.icon;\n this._text = options.text === undefined ? this._text : options.text;\n this._textColor = options.textColor == null ? this._textColor : options.textColor;\n this._notifyChanged$.next(this);\n }\n}\n\nexport default SpotTag;\n",
- "import {Observable} from \"rxjs/Observable\";\nimport {Subject} from \"rxjs/Subject\";\n\nimport \"rxjs/add/operator/map\";\nimport \"rxjs/add/operator/share\";\n\nimport {Geometry} from \"../../../Component\";\nimport {EventEmitter} from \"../../../Utils\";\n\n/**\n * @class Tag\n * @abstract\n * @classdesc Abstract class representing the basic functionality of for a tag.\n */\nexport abstract class Tag extends EventEmitter {\n /**\n * Event fired when a property related to the visual appearance of the\n * tag has changed.\n *\n * @event Tag#changed\n * @type {Tag} The tag instance that has changed.\n */\n public static changed: string = \"changed\";\n\n /**\n * Event fired when the geometry of the tag has changed.\n *\n * @event Tag#geometrychanged\n * @type {Tag} The tag instance whose geometry has changed.\n */\n public static geometrychanged: string = \"geometrychanged\";\n\n protected _id: string;\n protected _geometry: Geometry;\n\n protected _notifyChanged$: Subject<Tag>;\n\n /**\n * Create a tag.\n *\n * @constructor\n * @param {string} id\n * @param {Geometry} geometry\n */\n constructor(id: string, geometry: Geometry) {\n super();\n\n this._id = id;\n this._geometry = geometry;\n\n this._notifyChanged$ = new Subject<Tag>();\n\n this._notifyChanged$\n .subscribe(\n (t: Tag): void => {\n this.fire(Tag.changed, this);\n });\n\n this._geometry.changed$\n .subscribe(\n (g: Geometry): void => {\n this.fire(Tag.geometrychanged, this);\n });\n }\n\n /**\n * Get id property.\n * @returns {string}\n */\n public get id(): string {\n return this._id;\n }\n\n /**\n * Get geometry property.\n * @returns {Geometry} The geometry of the tag.\n */\n public get geometry(): Geometry {\n return this._geometry;\n }\n\n /**\n * Get changed observable.\n * @returns {Observable<Tag>}\n * @ignore\n */\n public get changed$(): Observable<Tag> {\n return this._notifyChanged$;\n }\n\n /**\n * Get geometry changed observable.\n * @returns {Observable<Tag>}\n * @ignore\n */\n public get geometryChanged$(): Observable<Tag> {\n return this._geometry.changed$\n .map(\n (geometry: Geometry): Tag => {\n return this;\n })\n .share();\n }\n}\n\nexport default Tag;\n",
- "import {MapillaryError} from \"./MapillaryError\";\n\nexport class ArgumentMapillaryError extends MapillaryError {\n constructor (message?: string) {\n super(message != null ? message : \"The argument is not valid.\");\n\n this.name = \"ArgumentMapillaryError\";\n }\n}\n\nexport default ArgumentMapillaryError;\n",
- "import {MapillaryError} from \"./MapillaryError\";\n\nexport class GraphMapillaryError extends MapillaryError {\n constructor (message: string) {\n super(message);\n\n this.name = \"GraphMapillaryError\";\n }\n}\n\nexport default GraphMapillaryError;\n",
- "export class MapillaryError extends Error {\n constructor (message?: string) {\n super(message);\n\n this.name = \"MapillaryError\";\n }\n}\n\nexport default MapillaryError;\n",
- "/// <reference path=\"../../typings/index.d.ts\" />\n\nimport * as THREE from \"three\";\n\nimport {Transform} from \"../Geo\";\n\n/**\n * @class Camera\n *\n * @classdesc Holds information about a camera.\n */\nexport class Camera {\n private _position: THREE.Vector3;\n private _lookat: THREE.Vector3;\n private _up: THREE.Vector3;\n private _focal: number;\n\n /**\n * Create a new camera instance.\n * @param {Transform} [transform] - Optional transform instance.\n */\n constructor(transform?: Transform) {\n if (transform != null) {\n this._position = new THREE.Vector3().fromArray(transform.unprojectSfM([0, 0], 0));\n this._lookat = new THREE.Vector3().fromArray(transform.unprojectSfM([0, 0], 10));\n this._up = transform.upVector();\n this._focal = this._getFocal(transform);\n } else {\n this._position = new THREE.Vector3(0, 0, 0);\n this._lookat = new THREE.Vector3(0, 0, 1);\n this._up = new THREE.Vector3(0, -1, 0);\n this._focal = 1;\n }\n }\n\n /**\n * Get position.\n * @returns {THREE.Vector3} The position vector.\n */\n public get position(): THREE.Vector3 {\n return this._position;\n }\n\n /**\n * Get lookat.\n * @returns {THREE.Vector3} The lookat vector.\n */\n public get lookat(): THREE.Vector3 {\n return this._lookat;\n }\n\n /**\n * Get up.\n * @returns {THREE.Vector3} The up vector.\n */\n public get up(): THREE.Vector3 {\n return this._up;\n }\n\n /**\n * Get focal.\n * @returns {number} The focal length.\n */\n public get focal(): number {\n return this._focal;\n }\n\n /**\n * Set focal.\n */\n public set focal(value: number) {\n this._focal = value;\n }\n\n /**\n * Update this camera to the linearly interpolated value of two other cameras.\n *\n * @param {Camera} a - First camera.\n * @param {Camera} b - Second camera.\n * @param {number} alpha - Interpolation value on the interval [0, 1].\n */\n public lerpCameras(a: Camera, b: Camera, alpha: number): void {\n this._position.subVectors(b.position, a.position).multiplyScalar(alpha).add(a.position);\n this._lookat.subVectors(b.lookat, a.lookat).multiplyScalar(alpha).add(a.lookat);\n this._up.subVectors(b.up, a.up).multiplyScalar(alpha).add(a.up);\n this._focal = (1 - alpha) * a.focal + alpha * b.focal;\n }\n\n /**\n * Copy the properties of another camera to this camera.\n *\n * @param {Camera} other - Another camera.\n */\n public copy(other: Camera): void {\n this._position.copy(other.position);\n this._lookat.copy(other.lookat);\n this._up.copy(other.up);\n this._focal = other.focal;\n }\n\n /**\n * Clone this camera.\n *\n * @returns {Camera} A camera with cloned properties equal to this camera.\n */\n public clone(): Camera {\n let camera: Camera = new Camera();\n\n camera.position.copy(this._position);\n camera.lookat.copy(this._lookat);\n camera.up.copy(this._up);\n camera.focal = this._focal;\n\n return camera;\n }\n\n /**\n * Determine the distance between this camera and another camera.\n *\n * @param {Camera} other - Another camera.\n * @returns {number} The distance between the cameras.\n */\n public diff(other: Camera): number {\n let pd: number = this._position.distanceToSquared(other.position);\n let ld: number = this._lookat.distanceToSquared(other.lookat);\n let ud: number = this._up.distanceToSquared(other.up);\n let fd: number = 100 * Math.abs(this._focal - other.focal);\n\n return Math.max(pd, ld, ud, fd);\n }\n\n /**\n * Get the focal length based on the transform.\n *\n * @description Returns the focal length of the transform if gpano info is not available.\n * Returns a focal length corresponding to a vertical fov clamped to [45, 90] degrees based on\n * the gpano information if available.\n *\n * @returns {number} Focal length.\n */\n private _getFocal(transform: Transform): number {\n if (transform.gpano == null) {\n return transform.focal;\n }\n\n let vFov: number = Math.PI * transform.gpano.CroppedAreaImageHeightPixels / transform.gpano.FullPanoHeightPixels;\n let focal: number = 0.5 / Math.tan(vFov / 2);\n\n return Math.min(1 / (2 * (Math.sqrt(2) - 1)), Math.max(0.5, focal));\n }\n}\n",
+ "import {share, map} from \"rxjs/operators\";\nimport {Observable, Subject} from \"rxjs\";\n\nimport {Geometry} from \"../../../Component\";\nimport {EventEmitter} from \"../../../Utils\";\n\n/**\n * @class Tag\n * @abstract\n * @classdesc Abstract class representing the basic functionality of for a tag.\n */\nexport abstract class Tag extends EventEmitter {\n /**\n * Event fired when a property related to the visual appearance of the\n * tag has changed.\n *\n * @event Tag#changed\n * @type {Tag} The tag instance that has changed.\n */\n public static changed: string = \"changed\";\n\n /**\n * Event fired when the geometry of the tag has changed.\n *\n * @event Tag#geometrychanged\n * @type {Tag} The tag instance whose geometry has changed.\n */\n public static geometrychanged: string = \"geometrychanged\";\n\n protected _id: string;\n protected _geometry: Geometry;\n\n protected _notifyChanged$: Subject<Tag>;\n\n /**\n * Create a tag.\n *\n * @constructor\n * @param {string} id\n * @param {Geometry} geometry\n */\n constructor(id: string, geometry: Geometry) {\n super();\n\n this._id = id;\n this._geometry = geometry;\n\n this._notifyChanged$ = new Subject<Tag>();\n\n this._notifyChanged$\n .subscribe(\n (t: Tag): void => {\n this.fire(Tag.changed, this);\n });\n\n this._geometry.changed$\n .subscribe(\n (g: Geometry): void => {\n this.fire(Tag.geometrychanged, this);\n });\n }\n\n /**\n * Get id property.\n * @returns {string}\n */\n public get id(): string {\n return this._id;\n }\n\n /**\n * Get geometry property.\n * @returns {Geometry} The geometry of the tag.\n */\n public get geometry(): Geometry {\n return this._geometry;\n }\n\n /**\n * Get changed observable.\n * @returns {Observable<Tag>}\n * @ignore\n */\n public get changed$(): Observable<Tag> {\n return this._notifyChanged$;\n }\n\n /**\n * Get geometry changed observable.\n * @returns {Observable<Tag>}\n * @ignore\n */\n public get geometryChanged$(): Observable<Tag> {\n return this._geometry.changed$.pipe(\n map(\n (geometry: Geometry): Tag => {\n return this;\n }),\n share());\n }\n}\n\nexport default Tag;\n",
+ "/**\n * Enumeration for tag domains.\n * @enum {number}\n * @readonly\n * @description Defines where lines between two vertices are treated\n * as straight.\n *\n * Only applicable for polygons. For rectangles lines between\n * vertices are always treated as straight in the distorted 2D\n * projection and bended in the undistorted 3D space.\n */\nexport enum TagDomain {\n /**\n * Treats lines between two vertices as straight in the\n * distorted 2D projection, i.e. on the image. If the image\n * is distorted this will result in bended lines when rendered\n * in the undistorted 3D space.\n */\n TwoDimensional,\n\n /**\n * Treats lines as straight in the undistorted 3D space. If the\n * image is distorted this will result in bended lines when rendered\n * on the distorted 2D projection of the image.\n */\n ThreeDimensional,\n}\n\nexport default TagDomain;\n",
+ "/**\n * Enumeration for component size.\n * @enum {number}\n * @readonly\n * @description May be used by a component to allow for resizing\n * of the UI elements rendered by the component.\n */\nexport enum ComponentSize {\n /**\n * Automatic size. The size of the elements will automatically\n * change at a predefined threshold.\n */\n Automatic,\n\n /**\n * Large size. The size of the elements will be fixed until another\n * component size is configured.\n */\n Large,\n\n /**\n * Small size. The size of the elements will be fixed until another\n * component size is configured.\n */\n Small,\n}\n\nexport default ComponentSize;\n",
+ "import {\n Component,\n IComponentConfiguration,\n} from \"../../Component\";\nimport {\n Container,\n Navigator,\n} from \"../../Viewer\";\n\nexport abstract class HandlerBase<TConfiguration extends IComponentConfiguration> {\n protected _component: Component<TConfiguration>;\n protected _container: Container;\n protected _navigator: Navigator;\n\n protected _enabled: boolean;\n\n /** @ignore */\n constructor(component: Component<TConfiguration>, container: Container, navigator: Navigator) {\n this._component = component;\n this._container = container;\n this._navigator = navigator;\n\n this._enabled = false;\n }\n\n /**\n * Returns a Boolean indicating whether the interaction is enabled.\n *\n * @returns {boolean} `true` if the interaction is enabled.\n */\n public get isEnabled(): boolean {\n return this._enabled;\n }\n\n /**\n * Enables the interaction.\n *\n * @example ```<component-name>.<handler-name>.enable();```\n */\n public enable(): void {\n if (this._enabled || !this._component.activated) { return; }\n\n this._enable();\n this._enabled = true;\n\n this._component.configure(this._getConfiguration(true));\n }\n\n /**\n * Disables the interaction.\n *\n * @example ```<component-name>.<handler-name>.disable();```\n */\n public disable(): void {\n if (!this._enabled) { return; }\n\n this._disable();\n this._enabled = false;\n\n if (this._component.activated) {\n this._component.configure(this._getConfiguration(false));\n }\n }\n\n protected abstract _enable(): void;\n\n protected abstract _disable(): void;\n\n protected abstract _getConfiguration(enable: boolean): TConfiguration;\n}\n\nexport default HandlerBase;\n",
+ "import * as THREE from \"three\";\n\nimport {IGPano} from \"../../API\";\nimport {Transform} from \"../../Geo\";\nimport {Node} from \"../../Graph\";\nimport {Shaders} from \"../../Component\";\n\nexport class MeshFactory {\n private _imagePlaneDepth: number;\n private _imageSphereRadius: number;\n\n constructor(imagePlaneDepth?: number, imageSphereRadius?: number) {\n this._imagePlaneDepth = imagePlaneDepth != null ? imagePlaneDepth : 200;\n this._imageSphereRadius = imageSphereRadius != null ? imageSphereRadius : 200;\n }\n\n public createMesh(node: Node, transform: Transform): THREE.Mesh {\n if (node.pano) {\n return this._createImageSphere(node, transform);\n } else if (transform.cameraProjection === \"fisheye\") {\n return this._createImagePlaneFisheye(node, transform);\n } else {\n return this._createImagePlane(node, transform);\n }\n }\n\n public createFlatMesh(\n node: Node,\n transform: Transform,\n basicX0: number,\n basicX1: number,\n basicY0: number,\n basicY1: number): THREE.Mesh {\n\n let texture: THREE.Texture = this._createTexture(node.image);\n let materialParameters: THREE.ShaderMaterialParameters =\n this._createDistortedPlaneMaterialParameters(transform, texture);\n let material: THREE.ShaderMaterial = new THREE.ShaderMaterial(materialParameters);\n\n let geometry: THREE.BufferGeometry = this._getFlatImagePlaneGeoFromBasic(transform, basicX0, basicX1, basicY0, basicY1);\n\n return new THREE.Mesh(geometry, material);\n }\n\n public createCurtainMesh(node: Node, transform: Transform): THREE.Mesh {\n if (node.pano && !node.fullPano) {\n throw new Error(\"Cropped panoramas cannot have curtain.\");\n }\n\n if (node.pano) {\n return this._createSphereCurtainMesh(node, transform);\n } else if (transform.cameraProjection === \"fisheye\") {\n return this._createCurtainMeshFisheye(node, transform);\n } else {\n return this._createCurtainMesh(node, transform);\n }\n }\n\n public createDistortedCurtainMesh(node: Node, transform: Transform): THREE.Mesh {\n if (node.pano) {\n throw new Error(\"Cropped panoramas cannot have curtain.\");\n }\n\n return this._createDistortedCurtainMesh(node, transform);\n }\n\n private _createCurtainMesh(node: Node, transform: Transform): THREE.Mesh {\n let texture: THREE.Texture = this._createTexture(node.image);\n let materialParameters: THREE.ShaderMaterialParameters =\n this._createCurtainPlaneMaterialParameters(transform, texture);\n let material: THREE.ShaderMaterial = new THREE.ShaderMaterial(materialParameters);\n\n let geometry: THREE.BufferGeometry = this._useMesh(transform, node) ?\n this._getImagePlaneGeo(transform, node) :\n this._getRegularFlatImagePlaneGeo(transform);\n\n return new THREE.Mesh(geometry, material);\n }\n\n private _createCurtainMeshFisheye(node: Node, transform: Transform): THREE.Mesh {\n let texture: THREE.Texture = this._createTexture(node.image);\n let materialParameters: THREE.ShaderMaterialParameters =\n this._createCurtainPlaneMaterialParametersFisheye(transform, texture);\n let material: THREE.ShaderMaterial = new THREE.ShaderMaterial(materialParameters);\n\n let geometry: THREE.BufferGeometry = this._useMesh(transform, node) ?\n this._getImagePlaneGeoFisheye(transform, node) :\n this._getRegularFlatImagePlaneGeo(transform);\n\n return new THREE.Mesh(geometry, material);\n }\n\n private _createDistortedCurtainMesh(node: Node, transform: Transform): THREE.Mesh {\n let texture: THREE.Texture = this._createTexture(node.image);\n let materialParameters: THREE.ShaderMaterialParameters =\n this._createDistortedCurtainPlaneMaterialParameters(transform, texture);\n let material: THREE.ShaderMaterial = new THREE.ShaderMaterial(materialParameters);\n\n let geometry: THREE.BufferGeometry = this._getRegularFlatImagePlaneGeo(transform);\n\n return new THREE.Mesh(geometry, material);\n }\n\n private _createSphereCurtainMesh(node: Node, transform: Transform): THREE.Mesh {\n let texture: THREE.Texture = this._createTexture(node.image);\n let materialParameters: THREE.ShaderMaterialParameters =\n this._createCurtainSphereMaterialParameters(transform, texture);\n let material: THREE.ShaderMaterial = new THREE.ShaderMaterial(materialParameters);\n\n return this._useMesh(transform, node) ?\n new THREE.Mesh(this._getImageSphereGeo(transform, node), material) :\n new THREE.Mesh(this._getFlatImageSphereGeo(transform), material);\n }\n\n private _createImageSphere(node: Node, transform: Transform): THREE.Mesh {\n let texture: THREE.Texture = this._createTexture(node.image);\n let materialParameters: THREE.ShaderMaterialParameters = this._createSphereMaterialParameters(transform, texture);\n let material: THREE.ShaderMaterial = new THREE.ShaderMaterial(materialParameters);\n\n let mesh: THREE.Mesh = this._useMesh(transform, node) ?\n new THREE.Mesh(this._getImageSphereGeo(transform, node), material) :\n new THREE.Mesh(this._getFlatImageSphereGeo(transform), material);\n\n return mesh;\n }\n\n private _createImagePlane(node: Node, transform: Transform): THREE.Mesh {\n let texture: THREE.Texture = this._createTexture(node.image);\n let materialParameters: THREE.ShaderMaterialParameters = this._createPlaneMaterialParameters(transform, texture);\n let material: THREE.ShaderMaterial = new THREE.ShaderMaterial(materialParameters);\n\n let geometry: THREE.BufferGeometry = this._useMesh(transform, node) ?\n this._getImagePlaneGeo(transform, node) :\n this._getRegularFlatImagePlaneGeo(transform);\n\n return new THREE.Mesh(geometry, material);\n }\n\n private _createImagePlaneFisheye(node: Node, transform: Transform): THREE.Mesh {\n let texture: THREE.Texture = this._createTexture(node.image);\n let materialParameters: THREE.ShaderMaterialParameters = this._createPlaneMaterialParametersFisheye(transform, texture);\n let material: THREE.ShaderMaterial = new THREE.ShaderMaterial(materialParameters);\n\n let geometry: THREE.BufferGeometry = this._useMesh(transform, node) ?\n this._getImagePlaneGeoFisheye(transform, node) :\n this._getRegularFlatImagePlaneGeoFisheye(transform);\n\n return new THREE.Mesh(geometry, material);\n }\n\n private _createSphereMaterialParameters(transform: Transform, texture: THREE.Texture): THREE.ShaderMaterialParameters {\n let gpano: IGPano = transform.gpano;\n\n let halfCroppedWidth: number = (gpano.FullPanoWidthPixels - gpano.CroppedAreaImageWidthPixels) / 2;\n let phiShift: number = 2 * Math.PI * (gpano.CroppedAreaLeftPixels - halfCroppedWidth) / gpano.FullPanoWidthPixels;\n let phiLength: number = 2 * Math.PI * gpano.CroppedAreaImageWidthPixels / gpano.FullPanoWidthPixels;\n\n let halfCroppedHeight: number = (gpano.FullPanoHeightPixels - gpano.CroppedAreaImageHeightPixels) / 2;\n let thetaShift: number = Math.PI * (halfCroppedHeight - gpano.CroppedAreaTopPixels) / gpano.FullPanoHeightPixels;\n let thetaLength: number = Math.PI * gpano.CroppedAreaImageHeightPixels / gpano.FullPanoHeightPixels;\n\n let materialParameters: THREE.ShaderMaterialParameters = {\n depthWrite: false,\n fragmentShader: Shaders.equirectangular.fragment,\n side: THREE.DoubleSide,\n transparent: true,\n uniforms: {\n opacity: {\n type: \"f\",\n value: 1,\n },\n phiLength: {\n type: \"f\",\n value: phiLength,\n },\n phiShift: {\n type: \"f\",\n value: phiShift,\n },\n projectorMat: {\n type: \"m4\",\n value: transform.rt,\n },\n projectorTex: {\n type: \"t\",\n value: texture,\n },\n thetaLength: {\n type: \"f\",\n value: thetaLength,\n },\n thetaShift: {\n type: \"f\",\n value: thetaShift,\n },\n },\n vertexShader: Shaders.equirectangular.vertex,\n };\n\n return materialParameters;\n }\n\n private _createCurtainSphereMaterialParameters(transform: Transform, texture: THREE.Texture): THREE.ShaderMaterialParameters {\n let gpano: IGPano = transform.gpano;\n\n let halfCroppedWidth: number = (gpano.FullPanoWidthPixels - gpano.CroppedAreaImageWidthPixels) / 2;\n let phiShift: number = 2 * Math.PI * (gpano.CroppedAreaLeftPixels - halfCroppedWidth) / gpano.FullPanoWidthPixels;\n let phiLength: number = 2 * Math.PI * gpano.CroppedAreaImageWidthPixels / gpano.FullPanoWidthPixels;\n\n let halfCroppedHeight: number = (gpano.FullPanoHeightPixels - gpano.CroppedAreaImageHeightPixels) / 2;\n let thetaShift: number = Math.PI * (halfCroppedHeight - gpano.CroppedAreaTopPixels) / gpano.FullPanoHeightPixels;\n let thetaLength: number = Math.PI * gpano.CroppedAreaImageHeightPixels / gpano.FullPanoHeightPixels;\n\n let materialParameters: THREE.ShaderMaterialParameters = {\n depthWrite: false,\n fragmentShader: Shaders.equirectangularCurtain.fragment,\n side: THREE.DoubleSide,\n transparent: true,\n uniforms: {\n curtain: {\n type: \"f\",\n value: 1,\n },\n opacity: {\n type: \"f\",\n value: 1,\n },\n phiLength: {\n type: \"f\",\n value: phiLength,\n },\n phiShift: {\n type: \"f\",\n value: phiShift,\n },\n projectorMat: {\n type: \"m4\",\n value: transform.rt,\n },\n projectorTex: {\n type: \"t\",\n value: texture,\n },\n thetaLength: {\n type: \"f\",\n value: thetaLength,\n },\n thetaShift: {\n type: \"f\",\n value: thetaShift,\n },\n },\n vertexShader: Shaders.equirectangularCurtain.vertex,\n };\n\n return materialParameters;\n }\n\n private _createPlaneMaterialParameters(transform: Transform, texture: THREE.Texture): THREE.ShaderMaterialParameters {\n let materialParameters: THREE.ShaderMaterialParameters = {\n depthWrite: false,\n fragmentShader: Shaders.perspective.fragment,\n side: THREE.DoubleSide,\n transparent: true,\n uniforms: {\n focal: {\n type: \"f\",\n value: transform.focal,\n },\n k1: {\n type: \"f\",\n value: transform.ck1,\n },\n k2: {\n type: \"f\",\n value: transform.ck2,\n },\n opacity: {\n type: \"f\",\n value: 1,\n },\n projectorMat: {\n type: \"m4\",\n value: transform.basicRt,\n },\n projectorTex: {\n type: \"t\",\n value: texture,\n },\n radial_peak: {\n type: \"f\",\n value: !!transform.radialPeak ? transform.radialPeak : 0,\n },\n scale_x: {\n type: \"f\",\n value: Math.max(transform.basicHeight, transform.basicWidth) / transform.basicWidth,\n },\n scale_y: {\n type: \"f\",\n value: Math.max(transform.basicWidth, transform.basicHeight) / transform.basicHeight,\n },\n },\n vertexShader: Shaders.perspective.vertex,\n };\n\n return materialParameters;\n }\n\n private _createPlaneMaterialParametersFisheye(transform: Transform, texture: THREE.Texture): THREE.ShaderMaterialParameters {\n let materialParameters: THREE.ShaderMaterialParameters = {\n depthWrite: false,\n fragmentShader: Shaders.fisheye.fragment,\n side: THREE.DoubleSide,\n transparent: true,\n uniforms: {\n focal: {\n type: \"f\",\n value: transform.focal,\n },\n k1: {\n type: \"f\",\n value: transform.ck1,\n },\n k2: {\n type: \"f\",\n value: transform.ck2,\n },\n opacity: {\n type: \"f\",\n value: 1,\n },\n projectorMat: {\n type: \"m4\",\n value: transform.basicRt,\n },\n projectorTex: {\n type: \"t\",\n value: texture,\n },\n radial_peak: {\n type: \"f\",\n value: !!transform.radialPeak ? transform.radialPeak : 0,\n },\n scale_x: {\n type: \"f\",\n value: Math.max(transform.basicHeight, transform.basicWidth) / transform.basicWidth,\n },\n scale_y: {\n type: \"f\",\n value: Math.max(transform.basicWidth, transform.basicHeight) / transform.basicHeight,\n },\n },\n vertexShader: Shaders.fisheye.vertex,\n };\n\n return materialParameters;\n }\n\n private _createCurtainPlaneMaterialParametersFisheye(transform: Transform, texture: THREE.Texture): THREE.ShaderMaterialParameters {\n let materialParameters: THREE.ShaderMaterialParameters = {\n depthWrite: false,\n fragmentShader: Shaders.fisheyeCurtain.fragment,\n side: THREE.DoubleSide,\n transparent: true,\n uniforms: {\n curtain: {\n type: \"f\",\n value: 1,\n },\n focal: {\n type: \"f\",\n value: transform.focal,\n },\n k1: {\n type: \"f\",\n value: transform.ck1,\n },\n k2: {\n type: \"f\",\n value: transform.ck2,\n },\n opacity: {\n type: \"f\",\n value: 1,\n },\n projectorMat: {\n type: \"m4\",\n value: transform.basicRt,\n },\n projectorTex: {\n type: \"t\",\n value: texture,\n },\n radial_peak: {\n type: \"f\",\n value: !!transform.radialPeak ? transform.radialPeak : 0,\n },\n scale_x: {\n type: \"f\",\n value: Math.max(transform.basicHeight, transform.basicWidth) / transform.basicWidth,\n },\n scale_y: {\n type: \"f\",\n value: Math.max(transform.basicWidth, transform.basicHeight) / transform.basicHeight,\n },\n },\n vertexShader: Shaders.fisheyeCurtain.vertex,\n };\n\n return materialParameters;\n }\n\n private _createCurtainPlaneMaterialParameters(transform: Transform, texture: THREE.Texture): THREE.ShaderMaterialParameters {\n let materialParameters: THREE.ShaderMaterialParameters = {\n depthWrite: false,\n fragmentShader: Shaders.perspectiveCurtain.fragment,\n side: THREE.DoubleSide,\n transparent: true,\n uniforms: {\n curtain: {\n type: \"f\",\n value: 1,\n },\n focal: {\n type: \"f\",\n value: transform.focal,\n },\n k1: {\n type: \"f\",\n value: transform.ck1,\n },\n k2: {\n type: \"f\",\n value: transform.ck2,\n },\n opacity: {\n type: \"f\",\n value: 1,\n },\n projectorMat: {\n type: \"m4\",\n value: transform.basicRt,\n },\n projectorTex: {\n type: \"t\",\n value: texture,\n },\n radial_peak: {\n type: \"f\",\n value: !!transform.radialPeak ? transform.radialPeak : 0,\n },\n scale_x: {\n type: \"f\",\n value: Math.max(transform.basicHeight, transform.basicWidth) / transform.basicWidth,\n },\n scale_y: {\n type: \"f\",\n value: Math.max(transform.basicWidth, transform.basicHeight) / transform.basicHeight,\n },\n },\n vertexShader: Shaders.perspectiveCurtain.vertex,\n };\n\n return materialParameters;\n }\n\n private _createDistortedCurtainPlaneMaterialParameters(transform: Transform, texture: THREE.Texture): THREE.ShaderMaterialParameters {\n let materialParameters: THREE.ShaderMaterialParameters = {\n depthWrite: false,\n fragmentShader: Shaders.perspectiveDistortedCurtain.fragment,\n side: THREE.DoubleSide,\n transparent: true,\n uniforms: {\n curtain: {\n type: \"f\",\n value: 1,\n },\n opacity: {\n type: \"f\",\n value: 1,\n },\n projectorMat: {\n type: \"m4\",\n value: transform.projectorMatrix(),\n },\n projectorTex: {\n type: \"t\",\n value: texture,\n },\n },\n vertexShader: Shaders.perspectiveDistortedCurtain.vertex,\n };\n\n return materialParameters;\n }\n\n private _createDistortedPlaneMaterialParameters(transform: Transform, texture: THREE.Texture): THREE.ShaderMaterialParameters {\n let materialParameters: THREE.ShaderMaterialParameters = {\n depthWrite: false,\n fragmentShader: Shaders.perspectiveDistorted.fragment,\n side: THREE.DoubleSide,\n transparent: true,\n uniforms: {\n opacity: {\n type: \"f\",\n value: 1,\n },\n projectorMat: {\n type: \"m4\",\n value: transform.projectorMatrix(),\n },\n projectorTex: {\n type: \"t\",\n value: texture,\n },\n },\n vertexShader: Shaders.perspectiveDistorted.vertex,\n };\n\n return materialParameters;\n }\n\n private _createTexture(image: HTMLImageElement): THREE.Texture {\n let texture: THREE.Texture = new THREE.Texture(image);\n texture.minFilter = THREE.LinearFilter;\n texture.needsUpdate = true;\n\n return texture;\n }\n\n private _useMesh(transform: Transform, node: Node): boolean {\n return node.mesh.vertices.length && transform.hasValidScale;\n }\n\n private _getImageSphereGeo(transform: Transform, node: Node): THREE.BufferGeometry {\n let t: THREE.Matrix4 = new THREE.Matrix4().getInverse(transform.srt);\n\n // push everything at least 5 meters in front of the camera\n let minZ: number = 5.0 * transform.scale;\n let maxZ: number = this._imageSphereRadius * transform.scale;\n\n let vertices: number[] = node.mesh.vertices;\n let numVertices: number = vertices.length / 3;\n let positions: Float32Array = new Float32Array(vertices.length);\n for (let i: number = 0; i < numVertices; ++i) {\n let index: number = 3 * i;\n let x: number = vertices[index + 0];\n let y: number = vertices[index + 1];\n let z: number = vertices[index + 2];\n\n let l: number = Math.sqrt(x * x + y * y + z * z);\n let boundedL: number = Math.max(minZ, Math.min(l, maxZ));\n let factor: number = boundedL / l;\n let p: THREE.Vector3 = new THREE.Vector3(x * factor, y * factor, z * factor);\n\n p.applyMatrix4(t);\n\n positions[index + 0] = p.x;\n positions[index + 1] = p.y;\n positions[index + 2] = p.z;\n }\n\n let faces: number[] = node.mesh.faces;\n let indices: Uint16Array = new Uint16Array(faces.length);\n for (let i: number = 0; i < faces.length; ++i) {\n indices[i] = faces[i];\n }\n\n let geometry: THREE.BufferGeometry = new THREE.BufferGeometry();\n\n geometry.addAttribute(\"position\", new THREE.BufferAttribute(positions, 3));\n geometry.setIndex(new THREE.BufferAttribute(indices, 1));\n\n return geometry;\n }\n\n private _getImagePlaneGeo(transform: Transform, node: Node): THREE.BufferGeometry {\n const undistortionMarginFactor: number = 3;\n let t: THREE.Matrix4 = new THREE.Matrix4().getInverse(transform.srt);\n\n // push everything at least 5 meters in front of the camera\n let minZ: number = 5.0 * transform.scale;\n let maxZ: number = this._imagePlaneDepth * transform.scale;\n\n let vertices: number[] = node.mesh.vertices;\n let numVertices: number = vertices.length / 3;\n let positions: Float32Array = new Float32Array(vertices.length);\n for (let i: number = 0; i < numVertices; ++i) {\n let index: number = 3 * i;\n let x: number = vertices[index + 0];\n let y: number = vertices[index + 1];\n let z: number = vertices[index + 2];\n\n if (i < 4) {\n x *= undistortionMarginFactor;\n y *= undistortionMarginFactor;\n }\n\n let boundedZ: number = Math.max(minZ, Math.min(z, maxZ));\n let factor: number = boundedZ / z;\n let p: THREE.Vector3 = new THREE.Vector3(x * factor, y * factor, boundedZ);\n\n p.applyMatrix4(t);\n\n positions[index + 0] = p.x;\n positions[index + 1] = p.y;\n positions[index + 2] = p.z;\n }\n\n let faces: number[] = node.mesh.faces;\n let indices: Uint16Array = new Uint16Array(faces.length);\n for (let i: number = 0; i < faces.length; ++i) {\n indices[i] = faces[i];\n }\n\n let geometry: THREE.BufferGeometry = new THREE.BufferGeometry();\n\n geometry.addAttribute(\"position\", new THREE.BufferAttribute(positions, 3));\n geometry.setIndex(new THREE.BufferAttribute(indices, 1));\n\n return geometry;\n }\n\n private _getImagePlaneGeoFisheye(transform: Transform, node: Node): THREE.BufferGeometry {\n let t: THREE.Matrix4 = new THREE.Matrix4().getInverse(transform.srt);\n\n // push everything at least 5 meters in front of the camera\n let minZ: number = 5.0 * transform.scale;\n let maxZ: number = this._imagePlaneDepth * transform.scale;\n\n let vertices: number[] = node.mesh.vertices;\n let numVertices: number = vertices.length / 3;\n let positions: Float32Array = new Float32Array(vertices.length);\n for (let i: number = 0; i < numVertices; ++i) {\n let index: number = 3 * i;\n let x: number = vertices[index + 0];\n let y: number = vertices[index + 1];\n let z: number = vertices[index + 2];\n\n let l: number = Math.sqrt(x * x + y * y + z * z);\n let boundedL: number = Math.max(minZ, Math.min(l, maxZ));\n let factor: number = boundedL / l;\n let p: THREE.Vector3 = new THREE.Vector3(x * factor, y * factor, z * factor);\n\n p.applyMatrix4(t);\n\n positions[index + 0] = p.x;\n positions[index + 1] = p.y;\n positions[index + 2] = p.z;\n }\n\n let faces: number[] = node.mesh.faces;\n let indices: Uint16Array = new Uint16Array(faces.length);\n for (let i: number = 0; i < faces.length; ++i) {\n indices[i] = faces[i];\n }\n\n let geometry: THREE.BufferGeometry = new THREE.BufferGeometry();\n\n geometry.addAttribute(\"position\", new THREE.BufferAttribute(positions, 3));\n geometry.setIndex(new THREE.BufferAttribute(indices, 1));\n\n return geometry;\n }\n\n private _getFlatImageSphereGeo(transform: Transform): THREE.Geometry {\n let gpano: IGPano = transform.gpano;\n let phiStart: number = 2 * Math.PI * gpano.CroppedAreaLeftPixels / gpano.FullPanoWidthPixels;\n let phiLength: number = 2 * Math.PI * gpano.CroppedAreaImageWidthPixels / gpano.FullPanoWidthPixels;\n let thetaStart: number = Math.PI *\n (gpano.FullPanoHeightPixels - gpano.CroppedAreaImageHeightPixels - gpano.CroppedAreaTopPixels) /\n gpano.FullPanoHeightPixels;\n let thetaLength: number = Math.PI * gpano.CroppedAreaImageHeightPixels / gpano.FullPanoHeightPixels;\n let geometry: THREE.SphereGeometry = new THREE.SphereGeometry(\n this._imageSphereRadius,\n 20,\n 40,\n phiStart - Math.PI / 2,\n phiLength,\n thetaStart,\n thetaLength);\n\n geometry.applyMatrix(new THREE.Matrix4().getInverse(transform.rt));\n\n return geometry;\n }\n\n private _getRegularFlatImagePlaneGeo(transform: Transform): THREE.BufferGeometry {\n let width: number = transform.width;\n let height: number = transform.height;\n let size: number = Math.max(width, height);\n let dx: number = width / 2.0 / size;\n let dy: number = height / 2.0 / size;\n\n return this._getFlatImagePlaneGeo(transform, dx, dy);\n }\n\n private _getFlatImagePlaneGeo(transform: Transform, dx: number, dy: number): THREE.BufferGeometry {\n let vertices: number[][] = [];\n vertices.push(transform.unprojectSfM([-dx, -dy], this._imagePlaneDepth));\n vertices.push(transform.unprojectSfM([dx, -dy], this._imagePlaneDepth));\n vertices.push(transform.unprojectSfM([dx, dy], this._imagePlaneDepth));\n vertices.push(transform.unprojectSfM([-dx, dy], this._imagePlaneDepth));\n\n return this._createFlatGeometry(vertices);\n }\n\n private _getRegularFlatImagePlaneGeoFisheye(transform: Transform): THREE.BufferGeometry {\n let width: number = transform.width;\n let height: number = transform.height;\n let size: number = Math.max(width, height);\n let dx: number = width / 2.0 / size;\n let dy: number = height / 2.0 / size;\n\n return this._getFlatImagePlaneGeoFisheye(transform, dx, dy);\n }\n\n private _getFlatImagePlaneGeoFisheye(transform: Transform, dx: number, dy: number): THREE.BufferGeometry {\n let vertices: number[][] = [];\n vertices.push(transform.unprojectSfM([-dx, -dy], this._imagePlaneDepth));\n vertices.push(transform.unprojectSfM([dx, -dy], this._imagePlaneDepth));\n vertices.push(transform.unprojectSfM([dx, dy], this._imagePlaneDepth));\n vertices.push(transform.unprojectSfM([-dx, dy], this._imagePlaneDepth));\n\n return this._createFlatGeometry(vertices);\n }\n\n private _getFlatImagePlaneGeoFromBasic(\n transform: Transform,\n basicX0: number,\n basicX1: number,\n basicY0: number,\n basicY1: number): THREE.BufferGeometry {\n\n let vertices: number[][] = [];\n\n vertices.push(transform.unprojectBasic([basicX0, basicY0], this._imagePlaneDepth));\n vertices.push(transform.unprojectBasic([basicX1, basicY0], this._imagePlaneDepth));\n vertices.push(transform.unprojectBasic([basicX1, basicY1], this._imagePlaneDepth));\n vertices.push(transform.unprojectBasic([basicX0, basicY1], this._imagePlaneDepth));\n\n return this._createFlatGeometry(vertices);\n }\n\n private _createFlatGeometry(vertices: number[][]): THREE.BufferGeometry {\n let positions: Float32Array = new Float32Array(12);\n for (let i: number = 0; i < vertices.length; i++) {\n let index: number = 3 * i;\n positions[index + 0] = vertices[i][0];\n positions[index + 1] = vertices[i][1];\n positions[index + 2] = vertices[i][2];\n }\n\n let indices: Uint16Array = new Uint16Array(6);\n indices[0] = 0;\n indices[1] = 1;\n indices[2] = 3;\n indices[3] = 1;\n indices[4] = 2;\n indices[5] = 3;\n\n let geometry: THREE.BufferGeometry = new THREE.BufferGeometry();\n\n geometry.addAttribute(\"position\", new THREE.BufferAttribute(positions, 3));\n geometry.setIndex(new THREE.BufferAttribute(indices, 1));\n\n return geometry;\n }\n}\n\nexport default MeshFactory;\n",
+ "import * as THREE from \"three\";\n\nimport {IShaderMaterial} from \"../../Component\";\n\nexport class MeshScene {\n private _planes: { [key: string]: THREE.Mesh };\n private _planesOld: { [key: string]: THREE.Mesh };\n private _planesPeriphery: { [key: string]: THREE.Mesh };\n\n private _scene: THREE.Scene;\n private _sceneOld: THREE.Scene;\n private _scenePeriphery: THREE.Scene;\n\n constructor() {\n this._planes = {};\n this._planesOld = {};\n this._planesPeriphery = {};\n\n this._scene = new THREE.Scene();\n this._sceneOld = new THREE.Scene();\n this._scenePeriphery = new THREE.Scene();\n }\n\n public get planes(): { [key: string]: THREE.Mesh } {\n return this._planes;\n }\n\n public get planesOld(): { [key: string]: THREE.Mesh } {\n return this._planesOld;\n }\n\n public get planesPeriphery(): { [key: string]: THREE.Mesh } {\n return this._planesPeriphery;\n }\n\n public get scene(): THREE.Scene {\n return this._scene;\n }\n\n public get sceneOld(): THREE.Scene {\n return this._sceneOld;\n }\n\n public get scenePeriphery(): THREE.Scene {\n return this._scenePeriphery;\n }\n\n public updateImagePlanes(planes: { [key: string]: THREE.Mesh }): void {\n this._dispose(this._planesOld, this.sceneOld);\n\n for (const key in this._planes) {\n if (!this._planes.hasOwnProperty(key)) {\n continue;\n\n }\n\n const plane: THREE.Mesh = this._planes[key];\n this._scene.remove(plane);\n this._sceneOld.add(plane);\n }\n\n for (const key in planes) {\n if (!planes.hasOwnProperty(key)) {\n continue;\n }\n\n this._scene.add(planes[key]);\n }\n\n this._planesOld = this._planes;\n this._planes = planes;\n }\n\n public addImagePlanes(planes: { [key: string]: THREE.Mesh }): void {\n for (const key in planes) {\n if (!planes.hasOwnProperty(key)) {\n continue;\n }\n\n const plane: THREE.Mesh = planes[key];\n this._scene.add(plane);\n this._planes[key] = plane;\n }\n }\n\n public addImagePlanesOld(planes: { [key: string]: THREE.Mesh }): void {\n for (const key in planes) {\n if (!planes.hasOwnProperty(key)) {\n continue;\n }\n\n const plane: THREE.Mesh = planes[key];\n this._sceneOld.add(plane);\n this._planesOld[key] = plane;\n }\n }\n\n public setImagePlanes(planes: { [key: string]: THREE.Mesh }): void {\n this._clear();\n this.addImagePlanes(planes);\n }\n\n public addPeripheryPlanes(planes: { [key: string]: THREE.Mesh }): void {\n for (const key in planes) {\n if (!planes.hasOwnProperty(key)) {\n continue;\n }\n\n const plane: THREE.Mesh = planes[key];\n this._scenePeriphery.add(plane);\n this._planesPeriphery[key] = plane;\n }\n }\n\n public setPeripheryPlanes(planes: { [key: string]: THREE.Mesh }): void {\n this._clearPeriphery();\n this.addPeripheryPlanes(planes);\n }\n\n public setImagePlanesOld(planes: { [key: string]: THREE.Mesh }): void {\n this._clearOld();\n this.addImagePlanesOld(planes);\n }\n\n public clear(): void {\n this._clear();\n this._clearOld();\n }\n\n private _clear(): void {\n this._dispose(this._planes, this._scene);\n this._planes = {};\n }\n\n private _clearOld(): void {\n this._dispose(this._planesOld, this._sceneOld);\n this._planesOld = {};\n }\n\n private _clearPeriphery(): void {\n this._dispose(this._planesPeriphery, this._scenePeriphery);\n this._planesPeriphery = {};\n }\n\n private _dispose(planes: { [key: string]: THREE.Mesh }, scene: THREE.Scene): void {\n for (const key in planes) {\n if (!planes.hasOwnProperty(key)) {\n continue;\n }\n\n const plane: THREE.Mesh = planes[key];\n scene.remove(plane);\n plane.geometry.dispose();\n (<THREE.Material>plane.material).dispose();\n let texture: THREE.Texture = (<IShaderMaterial>plane.material).uniforms.projectorTex.value;\n if (texture != null) {\n texture.dispose();\n }\n }\n }\n}\n\nexport default MeshScene;\n",
+ "import {\n concat as observableConcat,\n merge as observableMerge,\n of as observableOf,\n Observable,\n} from \"rxjs\";\n\nimport {\n map,\n filter,\n pairwise,\n startWith,\n switchMap,\n takeWhile,\n} from \"rxjs/operators\";\n\nimport {MouseService} from \"../../Viewer\";\n\nexport class MouseOperator {\n public static filteredPairwiseMouseDrag$(\n name: string,\n mouseService: MouseService): Observable<[MouseEvent, MouseEvent]> {\n\n return mouseService\n .filtered$(name, mouseService.mouseDragStart$).pipe(\n switchMap(\n (mouseDragStart: MouseEvent): Observable<MouseEvent> => {\n const mouseDragging$: Observable<MouseEvent> = observableConcat(\n observableOf(mouseDragStart),\n mouseService\n .filtered$(name, mouseService.mouseDrag$));\n\n const mouseDragEnd$: Observable<MouseEvent> = mouseService\n .filtered$(name, mouseService.mouseDragEnd$).pipe(\n map(\n (): MouseEvent => {\n return null;\n }));\n\n return observableMerge(mouseDragging$, mouseDragEnd$).pipe(\n takeWhile(\n (e: MouseEvent): boolean => {\n return !!e;\n }),\n startWith(null));\n }),\n pairwise(),\n filter(\n (pair: [MouseEvent, MouseEvent]): boolean => {\n return pair[0] != null && pair[1] != null;\n }));\n }\n}\n\nexport default MouseOperator;\n",
+ "import {combineLatest as observableCombineLatest, Subject, Subscription} from \"rxjs\";\n\nimport {withLatestFrom, map} from \"rxjs/operators\";\nimport * as vd from \"virtual-dom\";\n\nimport {\n ComponentService,\n Component,\n} from \"../../Component\";\nimport {\n Transform,\n ViewportCoords,\n} from \"../../Geo\";\nimport {\n IVNodeHash,\n RenderCamera,\n} from \"../../Render\";\nimport {\n IFrame,\n State,\n} from \"../../State\";\nimport {\n Container,\n Navigator,\n} from \"../../Viewer\";\nimport IZoomConfiguration from \"../interfaces/IZoomConfiguration\";\nimport ISize from \"../../render/interfaces/ISize\";\nimport ComponentSize from \"../utils/ComponentSize\";\n\n/**\n * @class ZoomComponent\n *\n * @classdesc Component rendering UI elements used for zooming.\n *\n * @example\n * ```\n * var viewer = new Mapillary.Viewer(\n * \"<element-id>\",\n * \"<client-id>\",\n * \"<my key>\");\n *\n * var zoomComponent = viewer.getComponent(\"zoom\");\n * zoomComponent.configure({ size: Mapillary.ComponentSize.Small });\n * ```\n */\nexport class ZoomComponent extends Component<IZoomConfiguration> {\n public static componentName: string = \"zoom\";\n\n private _viewportCoords: ViewportCoords;\n\n private _zoomDelta$: Subject<number>;\n\n private _renderSubscription: Subscription;\n private _zoomSubscription: Subscription;\n\n constructor(name: string, container: Container, navigator: Navigator) {\n super(name, container, navigator);\n\n this._viewportCoords = new ViewportCoords();\n\n this._zoomDelta$ = new Subject<number>();\n }\n\n protected _activate(): void {\n this._renderSubscription = observableCombineLatest(\n this._navigator.stateService.currentState$,\n this._navigator.stateService.state$,\n this._configuration$,\n this._container.renderService.size$).pipe(\n map(\n ([frame, state, configuration, size]: [IFrame, State, IZoomConfiguration, ISize]): IVNodeHash => {\n const zoom: number = frame.state.zoom;\n\n const zoomInIcon: vd.VNode = vd.h(\"div.ZoomInIcon\", []);\n const zoomInButton: vd.VNode = zoom >= 3 || state === State.Waiting ?\n vd.h(\"div.ZoomInButtonDisabled\", [zoomInIcon]) :\n vd.h(\"div.ZoomInButton\", { onclick: (): void => { this._zoomDelta$.next(1); } }, [zoomInIcon]);\n\n const zoomOutIcon: vd.VNode = vd.h(\"div.ZoomOutIcon\", []);\n const zoomOutButton: vd.VNode = zoom <= 0 || state === State.Waiting ?\n vd.h(\"div.ZoomOutButtonDisabled\", [zoomOutIcon]) :\n vd.h(\"div.ZoomOutButton\", { onclick: (): void => { this._zoomDelta$.next(-1); } }, [zoomOutIcon]);\n\n const compact: string = configuration.size === ComponentSize.Small ||\n configuration.size === ComponentSize.Automatic && size.width < 640 ?\n \".ZoomCompact\" : \"\";\n\n return {\n name: this._name,\n vnode: vd.h(\n \"div.ZoomContainer\" + compact,\n { oncontextmenu: (event: MouseEvent): void => { event.preventDefault(); } },\n [zoomInButton, zoomOutButton]),\n };\n }))\n .subscribe(this._container.domRenderer.render$);\n\n this._zoomSubscription = this._zoomDelta$.pipe(\n withLatestFrom(\n this._container.renderService.renderCamera$,\n this._navigator.stateService.currentTransform$))\n .subscribe(\n ([zoomDelta, render, transform]: [number, RenderCamera, Transform]): void => {\n const unprojected: THREE.Vector3 = this._viewportCoords.unprojectFromViewport(0, 0, render.perspective);\n const reference: number[] = transform.projectBasic(unprojected.toArray());\n\n this._navigator.stateService.zoomIn(zoomDelta, reference);\n });\n }\n\n protected _deactivate(): void {\n this._renderSubscription.unsubscribe();\n this._zoomSubscription.unsubscribe();\n }\n\n protected _getDefaultConfiguration(): IZoomConfiguration {\n return { size: ComponentSize.Automatic };\n }\n}\n\nComponentService.register(ZoomComponent);\nexport default ZoomComponent;\n",
+ "import {MapillaryError} from \"./MapillaryError\";\n\n/**\n * @class AbortMapillaryError\n *\n * @classdesc Error thrown when a move to request has been\n * aborted before completing because of a subsequent request.\n */\nexport class AbortMapillaryError extends MapillaryError {\n constructor (message?: string) {\n super(message != null ? message : \"The request was aborted.\");\n\n Object.setPrototypeOf(this, AbortMapillaryError.prototype);\n\n this.name = \"AbortMapillaryError\";\n }\n}\n\nexport default AbortMapillaryError;\n",
+ "import {MapillaryError} from \"./MapillaryError\";\n\nexport class ArgumentMapillaryError extends MapillaryError {\n constructor (message?: string) {\n super(message != null ? message : \"The argument is not valid.\");\n\n Object.setPrototypeOf(this, ArgumentMapillaryError.prototype);\n\n this.name = \"ArgumentMapillaryError\";\n }\n}\n\nexport default ArgumentMapillaryError;\n",
+ "import {MapillaryError} from \"./MapillaryError\";\n\nexport class GraphMapillaryError extends MapillaryError {\n constructor (message: string) {\n super(message);\n\n Object.setPrototypeOf(this, GraphMapillaryError.prototype);\n\n this.name = \"GraphMapillaryError\";\n }\n}\n\nexport default GraphMapillaryError;\n",
+ "export class MapillaryError extends Error {\n constructor (message?: string) {\n super(message);\n\n Object.setPrototypeOf(this, MapillaryError.prototype);\n\n this.name = \"MapillaryError\";\n }\n}\n\nexport default MapillaryError;\n",
+ "import * as THREE from \"three\";\n\nimport {Transform} from \"../Geo\";\n\n/**\n * @class Camera\n *\n * @classdesc Holds information about a camera.\n */\nexport class Camera {\n private _position: THREE.Vector3;\n private _lookat: THREE.Vector3;\n private _up: THREE.Vector3;\n private _focal: number;\n\n /**\n * Create a new camera instance.\n * @param {Transform} [transform] - Optional transform instance.\n */\n constructor(transform?: Transform) {\n if (transform != null) {\n this._position = new THREE.Vector3().fromArray(transform.unprojectSfM([0, 0], 0));\n this._lookat = new THREE.Vector3().fromArray(transform.unprojectSfM([0, 0], 10));\n this._up = transform.upVector();\n this._focal = this._getFocal(transform);\n } else {\n this._position = new THREE.Vector3(0, 0, 0);\n this._lookat = new THREE.Vector3(0, 0, 1);\n this._up = new THREE.Vector3(0, -1, 0);\n this._focal = 1;\n }\n }\n\n /**\n * Get position.\n * @returns {THREE.Vector3} The position vector.\n */\n public get position(): THREE.Vector3 {\n return this._position;\n }\n\n /**\n * Get lookat.\n * @returns {THREE.Vector3} The lookat vector.\n */\n public get lookat(): THREE.Vector3 {\n return this._lookat;\n }\n\n /**\n * Get up.\n * @returns {THREE.Vector3} The up vector.\n */\n public get up(): THREE.Vector3 {\n return this._up;\n }\n\n /**\n * Get focal.\n * @returns {number} The focal length.\n */\n public get focal(): number {\n return this._focal;\n }\n\n /**\n * Set focal.\n */\n public set focal(value: number) {\n this._focal = value;\n }\n\n /**\n * Update this camera to the linearly interpolated value of two other cameras.\n *\n * @param {Camera} a - First camera.\n * @param {Camera} b - Second camera.\n * @param {number} alpha - Interpolation value on the interval [0, 1].\n */\n public lerpCameras(a: Camera, b: Camera, alpha: number): void {\n this._position.subVectors(b.position, a.position).multiplyScalar(alpha).add(a.position);\n this._lookat.subVectors(b.lookat, a.lookat).multiplyScalar(alpha).add(a.lookat);\n this._up.subVectors(b.up, a.up).multiplyScalar(alpha).add(a.up);\n this._focal = (1 - alpha) * a.focal + alpha * b.focal;\n }\n\n /**\n * Copy the properties of another camera to this camera.\n *\n * @param {Camera} other - Another camera.\n */\n public copy(other: Camera): void {\n this._position.copy(other.position);\n this._lookat.copy(other.lookat);\n this._up.copy(other.up);\n this._focal = other.focal;\n }\n\n /**\n * Clone this camera.\n *\n * @returns {Camera} A camera with cloned properties equal to this camera.\n */\n public clone(): Camera {\n let camera: Camera = new Camera();\n\n camera.position.copy(this._position);\n camera.lookat.copy(this._lookat);\n camera.up.copy(this._up);\n camera.focal = this._focal;\n\n return camera;\n }\n\n /**\n * Determine the distance between this camera and another camera.\n *\n * @param {Camera} other - Another camera.\n * @returns {number} The distance between the cameras.\n */\n public diff(other: Camera): number {\n let pd: number = this._position.distanceToSquared(other.position);\n let ld: number = this._lookat.distanceToSquared(other.lookat);\n let ud: number = this._up.distanceToSquared(other.up);\n let fd: number = 100 * Math.abs(this._focal - other.focal);\n\n return Math.max(pd, ld, ud, fd);\n }\n\n /**\n * Get the focal length based on the transform.\n *\n * @description Returns the focal length of the transform if gpano info is not available.\n * Returns a focal length corresponding to a vertical fov clamped to [45, 90] degrees based on\n * the gpano information if available.\n *\n * @returns {number} Focal length.\n */\n private _getFocal(transform: Transform): number {\n if (transform.gpano == null) {\n return transform.focal;\n }\n\n let vFov: number = Math.PI * transform.gpano.CroppedAreaImageHeightPixels / transform.gpano.FullPanoHeightPixels;\n let focal: number = 0.5 / Math.tan(vFov / 2);\n\n return Math.min(1 / (2 * (Math.sqrt(2) - 1)), Math.max(0.5, focal));\n }\n}\n",
+ "import * as THREE from \"three\";\n\nimport {\n GeoCoords,\n ILatLonAlt,\n Spatial,\n Transform,\n} from \"../Geo\";\nimport ViewportCoords from \"./ViewportCoords\";\n\nconst geoCoords: GeoCoords = new GeoCoords();\nconst spatial: Spatial = new Spatial();\n\nexport function computeTranslation(position: ILatLonAlt, rotation: number[], reference: ILatLonAlt): number[] {\n const C: number[] = geoCoords.geodeticToEnu(\n position.lat,\n position.lon,\n position.alt,\n reference.lat,\n reference.lon,\n reference.alt);\n\n const RC: THREE.Vector3 = spatial.rotate(C, rotation);\n const translation: number[] = [-RC.x, -RC.y, -RC.z];\n\n return translation;\n}\n\nexport function computeProjectedPoints(\n transform: Transform,\n basicVertices: number[][],\n basicDirections: number[][],\n pointsPerLine: number,\n viewportCoords: ViewportCoords): number[][] {\n\n const basicPoints: number[][] = [];\n\n for (let side: number = 0; side < basicVertices.length; ++side) {\n const v: number[] = basicVertices[side];\n const d: number[] = basicDirections[side];\n\n for (let i: number = 0; i <= pointsPerLine; ++i) {\n basicPoints.push([v[0] + d[0] * i / pointsPerLine,\n v[1] + d[1] * i / pointsPerLine]);\n }\n }\n\n const camera: THREE.Camera = new THREE.Camera();\n camera.up.copy(transform.upVector());\n camera.position.copy(new THREE.Vector3().fromArray(transform.unprojectSfM([0, 0], 0)));\n camera.lookAt(new THREE.Vector3().fromArray(transform.unprojectSfM([0, 0], 10)));\n camera.updateMatrix();\n camera.updateMatrixWorld(true);\n\n const projectedPoints: number[][] = basicPoints\n .map(\n (basicPoint: number[]): number[] => {\n const worldPoint: number[] = transform.unprojectBasic(basicPoint, 10000);\n const cameraPoint: number[] = viewportCoords.worldToCamera(worldPoint, camera);\n\n return [\n Math.abs(cameraPoint[0] / cameraPoint[2]),\n Math.abs(cameraPoint[1] / cameraPoint[2]),\n ];\n });\n\n return projectedPoints;\n}\n",
"/**\n * @class GeoCoords\n *\n * @classdesc Converts coordinates between the geodetic (WGS84),\n * Earth-Centered, Earth-Fixed (ECEF) and local topocentric\n * East, North, Up (ENU) reference frames.\n *\n * The WGS84 has latitude (degrees), longitude (degrees) and\n * altitude (meters) values.\n *\n * The ECEF Z-axis pierces the north pole and the\n * XY-axis defines the equatorial plane. The X-axis extends\n * from the geocenter to the intersection of the Equator and\n * the Greenwich Meridian. All values in meters.\n *\n * The WGS84 parameters are:\n *\n * a = 6378137\n * b = a * (1 - f)\n * f = 1 / 298.257223563\n * e = Math.sqrt((a^2 - b^2) / a^2)\n * e' = Math.sqrt((a^2 - b^2) / b^2)\n *\n * The WGS84 to ECEF conversion is performed using the following:\n *\n * X = (N - h) * cos(phi) * cos(lambda)\n * Y = (N + h) * cos(phi) * sin(lambda)\n * Z = (b^2 * N / a^2 + h) * sin(phi)\n *\n * where\n *\n * phi = latitude\n * lambda = longitude\n * h = height above ellipsoid (altitude)\n * N = Radius of curvature (meters)\n * = a / Math.sqrt(1 - e^2 * sin(phi)^2)\n *\n * The ECEF to WGS84 conversion is performed using the following:\n *\n * phi = arctan((Z + e'^2 * b * sin(theta)^3) / (p - e^2 * a * cos(theta)^3))\n * lambda = arctan(Y / X)\n * h = p / cos(phi) - N\n *\n * where\n *\n * p = Math.sqrt(X^2 + Y^2)\n * theta = arctan(Z * a / p * b)\n *\n * In the ENU reference frame the x-axis points to the\n * East, the y-axis to the North and the z-axis Up. All values\n * in meters.\n *\n * The ECEF to ENU conversion is performed using the following:\n *\n * | x | | -sin(lambda_r) cos(lambda_r) 0 | | X - X_r |\n * | y | = | -sin(phi_r) * cos(lambda_r) -sin(phi_r) * sin(lambda_r) cos(phi_r) | | Y - Y_r |\n * | z | | cos(phi_r) * cos(lambda_r) cos(phi_r) * sin(lambda_r) sin(phi_r) | | Z - Z_r |\n *\n * where\n *\n * phi_r = latitude of reference\n * lambda_r = longitude of reference\n * X_r, Y_r, Z_r = ECEF coordinates of reference\n *\n * The ENU to ECEF conversion is performed by solving the above equation for X, Y, Z.\n *\n * WGS84 to ENU and ENU to WGS84 are two step conversions with ECEF calculated in\n * the first step for both conversions.\n */\nexport class GeoCoords {\n private _wgs84a: number = 6378137.0;\n private _wgs84b: number = 6356752.31424518;\n\n /**\n * Convert coordinates from geodetic (WGS84) reference to local topocentric\n * (ENU) reference.\n *\n * @param {number} lat Latitude in degrees.\n * @param {number} lon Longitude in degrees.\n * @param {number} alt Altitude in meters.\n * @param {number} refLat Reference latitude in degrees.\n * @param {number} refLon Reference longitude in degrees.\n * @param {number} refAlt Reference altitude in meters.\n * @returns {Array<number>} The x, y, z local topocentric ENU coordinates.\n */\n public geodeticToEnu(\n lat: number,\n lon: number,\n alt: number,\n refLat: number,\n refLon: number,\n refAlt: number): number[] {\n\n let ecef: number[] = this.geodeticToEcef(lat, lon, alt);\n\n return this.ecefToEnu(ecef[0], ecef[1], ecef[2], refLat, refLon, refAlt);\n }\n\n /**\n * Convert coordinates from local topocentric (ENU) reference to\n * geodetic (WGS84) reference.\n *\n * @param {number} x Topocentric ENU coordinate in East direction.\n * @param {number} y Topocentric ENU coordinate in North direction.\n * @param {number} z Topocentric ENU coordinate in Up direction.\n * @param {number} refLat Reference latitude in degrees.\n * @param {number} refLon Reference longitude in degrees.\n * @param {number} refAlt Reference altitude in meters.\n * @returns {Array<number>} The latitude and longitude in degrees\n * as well as altitude in meters.\n */\n public enuToGeodetic(\n x: number,\n y: number,\n z: number,\n refLat: number,\n refLon: number,\n refAlt: number): number[] {\n\n let ecef: number[] = this.enuToEcef(x, y, z, refLat, refLon, refAlt);\n\n return this.ecefToGeodetic(ecef[0], ecef[1], ecef[2]);\n }\n\n /**\n * Convert coordinates from Earth-Centered, Earth-Fixed (ECEF) reference\n * to local topocentric (ENU) reference.\n *\n * @param {number} X ECEF X-value.\n * @param {number} Y ECEF Y-value.\n * @param {number} Z ECEF Z-value.\n * @param {number} refLat Reference latitude in degrees.\n * @param {number} refLon Reference longitude in degrees.\n * @param {number} refAlt Reference altitude in meters.\n * @returns {Array<number>} The x, y, z topocentric ENU coordinates in East, North\n * and Up directions respectively.\n */\n public ecefToEnu(\n X: number,\n Y: number,\n Z: number,\n refLat: number,\n refLon: number,\n refAlt: number): number[] {\n\n let refEcef: number[] = this.geodeticToEcef(refLat, refLon, refAlt);\n\n let V: number[] = [X - refEcef[0], Y - refEcef[1], Z - refEcef[2]];\n\n refLat = refLat * Math.PI / 180.0;\n refLon = refLon * Math.PI / 180.0;\n\n let cosLat: number = Math.cos(refLat);\n let sinLat: number = Math.sin(refLat);\n let cosLon: number = Math.cos(refLon);\n let sinLon: number = Math.sin(refLon);\n\n let x: number = -sinLon * V[0] + cosLon * V[1];\n let y: number = -sinLat * cosLon * V[0] - sinLat * sinLon * V[1] + cosLat * V[2];\n let z: number = cosLat * cosLon * V[0] + cosLat * sinLon * V[1] + sinLat * V[2];\n\n return [x, y, z];\n }\n\n /**\n * Convert coordinates from local topocentric (ENU) reference\n * to Earth-Centered, Earth-Fixed (ECEF) reference.\n *\n * @param {number} x Topocentric ENU coordinate in East direction.\n * @param {number} y Topocentric ENU coordinate in North direction.\n * @param {number} z Topocentric ENU coordinate in Up direction.\n * @param {number} refLat Reference latitude in degrees.\n * @param {number} refLon Reference longitude in degrees.\n * @param {number} refAlt Reference altitude in meters.\n * @returns {Array<number>} The X, Y, Z ECEF coordinates.\n */\n public enuToEcef(\n x: number,\n y: number,\n z: number,\n refLat: number,\n refLon: number,\n refAlt: number): number[] {\n\n let refEcef: number[] = this.geodeticToEcef(refLat, refLon, refAlt);\n\n refLat = refLat * Math.PI / 180.0;\n refLon = refLon * Math.PI / 180.0;\n\n let cosLat: number = Math.cos(refLat);\n let sinLat: number = Math.sin(refLat);\n let cosLon: number = Math.cos(refLon);\n let sinLon: number = Math.sin(refLon);\n\n let X: number = -sinLon * x - sinLat * cosLon * y + cosLat * cosLon * z + refEcef[0];\n let Y: number = cosLon * x - sinLat * sinLon * y + cosLat * sinLon * z + refEcef[1];\n let Z: number = cosLat * y + sinLat * z + refEcef[2];\n\n return [X, Y, Z];\n }\n\n /**\n * Convert coordinates from geodetic reference (WGS84) to Earth-Centered,\n * Earth-Fixed (ECEF) reference.\n *\n * @param {number} lat Latitude in degrees.\n * @param {number} lon Longitude in degrees.\n * @param {number} alt Altitude in meters.\n * @returns {Array<number>} The X, Y, Z ECEF coordinates.\n */\n public geodeticToEcef(lat: number, lon: number, alt: number): number[] {\n let a: number = this._wgs84a;\n let b: number = this._wgs84b;\n\n lat = lat * Math.PI / 180.0;\n lon = lon * Math.PI / 180.0;\n\n let cosLat: number = Math.cos(lat);\n let sinLat: number = Math.sin(lat);\n let cosLon: number = Math.cos(lon);\n let sinLon: number = Math.sin(lon);\n\n let a2: number = a * a;\n let b2: number = b * b;\n\n let L: number = 1.0 / Math.sqrt(a2 * cosLat * cosLat + b2 * sinLat * sinLat);\n\n let nhcl: number = (a2 * L + alt) * cosLat;\n\n let X: number = nhcl * cosLon;\n let Y: number = nhcl * sinLon;\n let Z: number = (b2 * L + alt) * sinLat;\n\n return [X, Y, Z];\n }\n\n /**\n * Convert coordinates from Earth-Centered, Earth-Fixed (ECEF) reference\n * to geodetic reference (WGS84).\n *\n * @param {number} X ECEF X-value.\n * @param {number} Y ECEF Y-value.\n * @param {number} Z ECEF Z-value.\n * @returns {Array<number>} The latitude and longitude in degrees\n * as well as altitude in meters.\n */\n public ecefToGeodetic(X: number, Y: number, Z: number): number[] {\n let a: number = this._wgs84a;\n let b: number = this._wgs84b;\n\n let a2: number = a * a;\n let b2: number = b * b;\n\n let a2mb2: number = a2 - b2;\n\n let ea: number = Math.sqrt(a2mb2 / a2);\n let eb: number = Math.sqrt(a2mb2 / b2);\n\n let p: number = Math.sqrt(X * X + Y * Y);\n let theta: number = Math.atan2(Z * a, p * b);\n\n let sinTheta: number = Math.sin(theta);\n let cosTheta: number = Math.cos(theta);\n\n let lon: number = Math.atan2(Y, X);\n let lat: number =\n Math.atan2(Z + eb * eb * b * sinTheta * sinTheta * sinTheta,\n p - ea * ea * a * cosTheta * cosTheta * cosTheta);\n\n let sinLat: number = Math.sin(lat);\n let cosLat: number = Math.cos(lat);\n\n let N: number = a / Math.sqrt(1 - ea * ea * sinLat * sinLat);\n let alt: number = p / cosLat - N;\n\n return [lat * 180.0 / Math.PI, lon * 180.0 / Math.PI, alt];\n }\n}\n\nexport default GeoCoords;\n",
- "/// <reference path=\"../../typings/index.d.ts\" />\n\nimport * as THREE from \"three\";\n\n/**\n * @class Spatial\n *\n * @classdesc Provides methods for scalar, vector and matrix calculations.\n */\nexport class Spatial {\n private _epsilon: number = 1e-9;\n\n /**\n * Converts azimuthal phi rotation (counter-clockwise with origin on X-axis) to\n * bearing (clockwise with origin at north or Y-axis).\n *\n * @param {number} phi - Azimuthal phi angle in radians.\n * @returns {number} Bearing in radians.\n */\n public azimuthalToBearing(phi: number): number {\n return -phi + Math.PI / 2;\n }\n\n /**\n * Converts degrees to radians.\n *\n * @param {number} deg - Degrees.\n * @returns {number} Radians.\n */\n public degToRad(deg: number): number {\n return Math.PI * deg / 180;\n }\n\n /**\n * Converts radians to degrees.\n *\n * @param {number} rad - Radians.\n * @returns {number} Degrees.\n */\n public radToDeg(rad: number): number {\n return 180 * rad / Math.PI;\n }\n\n /**\n * Creates a rotation matrix from an angle-axis vector.\n *\n * @param {Array<number>} angleAxis - Angle-axis representation of a rotation.\n * @returns {THREE.Matrix4} Rotation matrix.\n */\n public rotationMatrix(angleAxis: number[]): THREE.Matrix4 {\n let axis: THREE.Vector3 =\n new THREE.Vector3(angleAxis[0], angleAxis[1], angleAxis[2]);\n let angle: number = axis.length();\n if (angle > 0) {\n axis.normalize();\n }\n\n return new THREE.Matrix4().makeRotationAxis(axis, angle);\n }\n\n /**\n * Rotates a vector according to a angle-axis rotation vector.\n *\n * @param {Array<number>} vector - Vector to rotate.\n * @param {Array<number>} angleAxis - Angle-axis representation of a rotation.\n * @returns {THREE.Vector3} Rotated vector.\n */\n public rotate(vector: number[], angleAxis: number[]): THREE.Vector3 {\n let v: THREE.Vector3 = new THREE.Vector3(vector[0], vector[1], vector[2]);\n let rotationMatrix: THREE.Matrix4 = this.rotationMatrix(angleAxis);\n v.applyMatrix4(rotationMatrix);\n\n return v;\n }\n\n /**\n * Calculates the optical center from a rotation vector\n * on the angle-axis representation and a translation vector\n * according to C = -R^T t.\n *\n * @param {Array<number>} rotation - Angle-axis representation of a rotation.\n * @param {Array<number>} translation - Translation vector.\n * @returns {THREE.Vector3} Optical center.\n */\n public opticalCenter(rotation: number[], translation: number[]): THREE.Vector3 {\n let angleAxis: number[] = [-rotation[0], -rotation[1], -rotation[2]];\n let vector: number[] = [-translation[0], -translation[1], -translation[2]];\n\n return this.rotate(vector, angleAxis);\n }\n\n /**\n * Calculates the viewing direction from a rotation vector\n * on the angle-axis representation.\n *\n * @param {number[]} rotation - Angle-axis representation of a rotation.\n * @returns {THREE.Vector3} Viewing direction.\n */\n public viewingDirection(rotation: number[]): THREE.Vector3 {\n let angleAxis: number[] = [-rotation[0], -rotation[1], -rotation[2]];\n\n return this.rotate([0, 0, 1], angleAxis);\n }\n\n /**\n * Wrap a number on the interval [min, max].\n *\n * @param {number} value - Value to wrap.\n * @param {number} min - Lower endpoint of interval.\n * @param {number} max - Upper endpoint of interval.\n * @returns {number} The wrapped number.\n */\n public wrap(value: number, min: number, max: number): number {\n if (max < min) {\n throw new Error(\"Invalid arguments: max must be larger than min.\");\n }\n\n let interval: number = (max - min);\n\n while (value > max || value < min) {\n if (value > max) {\n value = value - interval;\n } else if (value < min) {\n value = value + interval;\n }\n }\n\n return value;\n }\n\n /**\n * Wrap an angle on the interval [-Pi, Pi].\n *\n * @param {number} angle - Value to wrap.\n * @returns {number} Wrapped angle.\n */\n public wrapAngle(angle: number): number {\n return this.wrap(angle, -Math.PI, Math.PI);\n }\n\n /**\n * Limit the value to the interval [min, max] by changing the value to\n * the nearest available one when it is outside the interval.\n *\n * @param {number} value - Value to clamp.\n * @param {number} min - Minimum of the interval.\n * @param {number} max - Maximum of the interval.\n * @returns {number} Clamped value.\n */\n public clamp(value: number, min: number, max: number): number {\n if (value < min) {\n return min;\n }\n\n if (value > max) {\n return max;\n }\n\n return value;\n }\n\n /**\n * Calculates the counter-clockwise angle from the first\n * vector (x1, y1)^T to the second (x2, y2)^T.\n *\n * @param {number} x1 - X coordinate of first vector.\n * @param {number} y1 - Y coordinate of first vector.\n * @param {number} x2 - X coordinate of second vector.\n * @param {number} y2 - Y coordinate of second vector.\n * @returns {number} Counter clockwise angle between the vectors.\n */\n public angleBetweenVector2(x1: number, y1: number, x2: number, y2: number): number {\n let angle: number = Math.atan2(y2, x2) - Math.atan2(y1, x1);\n\n return this.wrapAngle(angle);\n }\n\n /**\n * Calculates the minimum (absolute) angle change for rotation\n * from one angle to another on the [-Pi, Pi] interval.\n *\n * @param {number} angle1 - Start angle.\n * @param {number} angle2 - Destination angle.\n * @returns {number} Absolute angle change between angles.\n */\n public angleDifference(angle1: number, angle2: number): number {\n let angle: number = angle2 - angle1;\n\n return this.wrapAngle(angle);\n }\n\n /**\n * Calculates the relative rotation angle between two\n * angle-axis vectors.\n *\n * @param {number} rotation1 - First angle-axis vector.\n * @param {number} rotation2 - Second angle-axis vector.\n * @returns {number} Relative rotation angle.\n */\n public relativeRotationAngle(rotation1: number[], rotation2: number[]): number {\n let R1T: THREE.Matrix4 = this.rotationMatrix(\n [-rotation1[0], -rotation1[1], -rotation1[2]]);\n let R2: THREE.Matrix4 = this.rotationMatrix(rotation2);\n\n let R: THREE.Matrix4 = R1T.multiply(R2);\n let elements: Float32Array = R.elements;\n\n // from Tr(R) = 1 + 2*cos(theta)\n let theta: number = Math.acos((elements[0] + elements[5] + elements[10] - 1) / 2);\n\n return theta;\n }\n\n /**\n * Calculates the angle from a vector to a plane.\n *\n * @param {Array<number>} vector - The vector.\n * @param {Array<number>} planeNormal - Normal of the plane.\n * @returns {number} Angle from between plane and vector.\n */\n public angleToPlane(vector: number[], planeNormal: number[]): number {\n let v: THREE.Vector3 = new THREE.Vector3().fromArray(vector);\n let norm: number = v.length();\n\n if (norm < this._epsilon) {\n return 0;\n }\n\n let projection: number = v.dot(new THREE.Vector3().fromArray(planeNormal));\n\n return Math.asin(projection / norm);\n }\n\n /**\n * Calculates the distance between two coordinates\n * (latitude longitude pairs) in meters according to\n * the haversine formula.\n *\n * @param {number} lat1 - Latitude of the first coordinate.\n * @param {number} lon1 - Longitude of the first coordinate.\n * @param {number} lat2 - Latitude of the second coordinate.\n * @param {number} lon2 - Longitude of the second coordinate.\n * @returns {number} Distance between lat lon positions.\n */\n public distanceFromLatLon(lat1: number, lon1: number, lat2: number, lon2: number): number {\n let r: number = 6371000;\n let dLat: number = this.degToRad(lat2 - lat1);\n let dLon: number = this.degToRad(lon2 - lon1);\n\n let hav: number =\n Math.sin(dLat / 2) * Math.sin(dLat / 2) +\n Math.cos(lat1) * Math.cos(lat2) *\n Math.sin(dLon / 2) * Math.sin(dLon / 2);\n\n let d: number = 2 * r * Math.atan2(Math.sqrt(hav), Math.sqrt(1 - hav));\n\n return d;\n }\n}\n\nexport default Spatial;\n",
- "/// <reference path=\"../../typings/index.d.ts\" />\n\nimport * as THREE from \"three\";\n\nimport {IGPano} from \"../API\";\nimport {Node} from \"../Graph\";\n\n/**\n * @class Transform\n *\n * @classdesc Class used for calculating coordinate transformations\n * and projections.\n */\nexport class Transform {\n private _width: number;\n private _height: number;\n private _focal: number;\n private _orientation: number;\n private _scale: number;\n private _basicWidth: number;\n private _basicHeight: number;\n private _basicAspect: number;\n\n private _gpano: IGPano;\n\n private _rt: THREE.Matrix4;\n private _srt: THREE.Matrix4;\n\n /**\n * Create a new transform instance.\n * @param {Node} apiNavImIm - Node properties.\n * @param {HTMLImageElement} image - Node image.\n * @param {Array<number>} translation - Node translation vector in three dimensions.\n */\n constructor(node: Node, image: HTMLImageElement, translation: number[]) {\n this._orientation = this._getValue(node.orientation, 1);\n\n let imageWidth: number = image != null ? image.width : 4;\n let imageHeight: number = image != null ? image.height : 3;\n let keepOrientation: boolean = this._orientation < 5;\n\n this._width = this._getValue(node.width, keepOrientation ? imageWidth : imageHeight);\n this._height = this._getValue(node.height, keepOrientation ? imageHeight : imageWidth);\n\n this._basicAspect = keepOrientation ?\n this._width / this._height :\n this._height / this._width;\n\n this._basicWidth = keepOrientation ? node.width : node.height;\n this._basicHeight = keepOrientation ? node.height : node.width;\n\n this._focal = this._getValue(node.focal, 1);\n this._scale = this._getValue(node.scale, 0);\n\n this._gpano = node.gpano != null ? node.gpano : null;\n\n this._rt = this._getRt(node.rotation, translation);\n this._srt = this._getSrt(this._rt, this._scale);\n }\n\n /**\n * Get basic aspect.\n * @returns {number} The orientation adjusted aspect ratio.\n */\n public get basicAspect(): number {\n return this._basicAspect;\n }\n\n /**\n * Get basic height.\n *\n * @description Does not fall back to node image height but\n * uses original value from API so can be faulty.\n *\n * @returns {number} The height of the basic version image\n * (adjusted for orientation).\n */\n public get basicHeight(): number {\n return this._basicHeight;\n }\n\n /**\n * Get basic width.\n *\n * @description Does not fall back to node image width but\n * uses original value from API so can be faulty.\n *\n * @returns {number} The width of the basic version image\n * (adjusted for orientation).\n */\n public get basicWidth(): number {\n return this._basicWidth;\n }\n\n /**\n * Get focal.\n * @returns {number} The node focal length.\n */\n public get focal(): number {\n return this._focal;\n }\n\n /**\n * Get fullPano.\n *\n * @returns {boolean} Value indicating whether the node is a complete\n * 360 panorama.\n */\n public get fullPano(): boolean {\n return this._gpano != null &&\n this._gpano.CroppedAreaLeftPixels === 0 &&\n this._gpano.CroppedAreaTopPixels === 0 &&\n this._gpano.CroppedAreaImageWidthPixels === this._gpano.FullPanoWidthPixels &&\n this._gpano.CroppedAreaImageHeightPixels === this._gpano.FullPanoHeightPixels;\n }\n\n /**\n * Get gpano.\n * @returns {number} The node gpano information.\n */\n public get gpano(): IGPano {\n return this._gpano;\n }\n\n /**\n * Get height.\n *\n * @description Falls back to the node image height if\n * the API data is faulty.\n *\n * @returns {number} The orientation adjusted image height.\n */\n public get height(): number {\n return this._height;\n }\n\n /**\n * Get orientation.\n * @returns {number} The image orientation.\n */\n public get orientation(): number {\n return this._orientation;\n }\n\n /**\n * Get rt.\n * @returns {THREE.Matrix4} The extrinsic camera matrix.\n */\n public get rt(): THREE.Matrix4 {\n return this._rt;\n }\n\n /**\n * Get srt.\n * @returns {THREE.Matrix4} The scaled extrinsic camera matrix.\n */\n public get srt(): THREE.Matrix4 {\n return this._srt;\n }\n\n /**\n * Get scale.\n * @returns {number} The node atomic reconstruction scale.\n */\n public get scale(): number {\n return this._scale;\n }\n\n /**\n * Get has valid scale.\n * @returns {boolean} Value indicating if the scale of the transform is valid.\n */\n public get hasValidScale(): boolean {\n return this._scale > 1e-2 && this._scale < 50;\n }\n\n /**\n * Get width.\n *\n * @description Falls back to the node image width if\n * the API data is faulty.\n *\n * @returns {number} The orientation adjusted image width.\n */\n public get width(): number {\n return this._width;\n }\n\n /**\n * Calculate the up vector for the node transform.\n *\n * @returns {THREE.Vector3} Normalized and orientation adjusted up vector.\n */\n public upVector(): THREE.Vector3 {\n let rte: Float32Array = this._rt.elements;\n\n switch (this._orientation) {\n case 1:\n return new THREE.Vector3(-rte[1], -rte[5], -rte[9]);\n case 3:\n return new THREE.Vector3(rte[1], rte[5], rte[9]);\n case 6:\n return new THREE.Vector3(-rte[0], -rte[4], -rte[8]);\n case 8:\n return new THREE.Vector3(rte[0], rte[4], rte[8]);\n default:\n return new THREE.Vector3(-rte[1], -rte[5], -rte[9]);\n }\n }\n\n /**\n * Calculate projector matrix for projecting 3D points to texture map\n * coordinates (u and v).\n *\n * @returns {THREE.Matrix4} Projection matrix for 3D point to texture\n * map coordinate calculations.\n */\n public projectorMatrix(): THREE.Matrix4 {\n let projector: THREE.Matrix4 = this._normalizedToTextureMatrix();\n\n let f: number = this._focal;\n let projection: THREE.Matrix4 = new THREE.Matrix4().set(\n f, 0, 0, 0,\n 0, f, 0, 0,\n 0, 0, 0, 0,\n 0, 0, 1, 0);\n\n projector.multiply(projection);\n projector.multiply(this._rt);\n\n return projector;\n }\n\n /**\n * Project 3D world coordinates to basic coordinates.\n *\n * @param {Array<number>} point3d - 3D world coordinates.\n * @return {Array<number>} 2D basic coordinates.\n */\n public projectBasic(point3d: number[]): number[] {\n let sfm: number[] = this.projectSfM(point3d);\n return this._sfmToBasic(sfm);\n }\n\n /**\n * Unproject basic coordinates to 3D world coordinates.\n *\n * @param {Array<number>} basic - 2D basic coordinates.\n * @param {Array<number>} distance - Depth to unproject from camera center.\n * @returns {Array<number>} Unprojected 3D world coordinates.\n */\n public unprojectBasic(basic: number[], distance: number): number[] {\n let sfm: number[] = this._basicToSfm(basic);\n return this.unprojectSfM(sfm, distance);\n }\n\n /**\n * Project 3D world coordinates to SfM coordinates.\n *\n * @param {Array<number>} point3d - 3D world coordinates.\n * @return {Array<number>} 2D SfM coordinates.\n */\n public projectSfM(point3d: number[]): number[] {\n let v: THREE.Vector4 = new THREE.Vector4(point3d[0], point3d[1], point3d[2], 1);\n v.applyMatrix4(this._rt);\n return this._bearingToSfm([v.x, v.y, v.z]);\n }\n\n /**\n * Unproject SfM coordinates to a 3D world coordinates.\n *\n * @param {Array<number>} sfm - 2D SfM coordinates.\n * @param {Array<number>} distance - Depth to unproject from camera center.\n * @returns {Array<number>} Unprojected 3D world coordinates.\n */\n public unprojectSfM(sfm: number[], distance: number): number[] {\n let bearing: number[] = this._sfmToBearing(sfm);\n let v: THREE.Vector4 = new THREE.Vector4(\n distance * bearing[0],\n distance * bearing[1],\n distance * bearing[2],\n 1);\n v.applyMatrix4(new THREE.Matrix4().getInverse(this._rt));\n return [v.x / v.w, v.y / v.w, v.z / v.w];\n }\n\n /**\n * Transform SfM coordinates to bearing vector (3D cartesian\n * coordinates on the unit sphere).\n *\n * @param {Array<number>} sfm - 2D SfM coordinates.\n * @returns {Array<number>} Bearing vector (3D cartesian coordinates\n * on the unit sphere).\n */\n private _sfmToBearing(sfm: number[]): number[] {\n if (this._fullPano()) {\n let lon: number = sfm[0] * 2 * Math.PI;\n let lat: number = -sfm[1] * 2 * Math.PI;\n let x: number = Math.cos(lat) * Math.sin(lon);\n let y: number = -Math.sin(lat);\n let z: number = Math.cos(lat) * Math.cos(lon);\n return [x, y, z];\n } else if (this._gpano) {\n let size: number = Math.max(this.gpano.CroppedAreaImageWidthPixels, this.gpano.CroppedAreaImageHeightPixels);\n let fullPanoPixel: number[] = [\n sfm[0] * size + this.gpano.CroppedAreaImageWidthPixels / 2 + this.gpano.CroppedAreaLeftPixels,\n sfm[1] * size + this.gpano.CroppedAreaImageHeightPixels / 2 + this.gpano.CroppedAreaTopPixels,\n ];\n let lon: number = 2 * Math.PI * (fullPanoPixel[0] / this.gpano.FullPanoWidthPixels - 0.5);\n let lat: number = - Math.PI * (fullPanoPixel[1] / this.gpano.FullPanoHeightPixels - 0.5);\n let x: number = Math.cos(lat) * Math.sin(lon);\n let y: number = -Math.sin(lat);\n let z: number = Math.cos(lat) * Math.cos(lon);\n return [x, y, z];\n } else {\n let v: THREE.Vector3 = new THREE.Vector3(sfm[0], sfm[1], this._focal);\n v.normalize();\n return [v.x, v.y, v.z];\n }\n }\n\n /**\n * Transform bearing vector (3D cartesian coordiantes on the unit sphere) to\n * SfM coordinates.\n *\n * @param {Array<number>} bearing - Bearing vector (3D cartesian coordinates on the\n * unit sphere).\n * @returns {Array<number>} 2D SfM coordinates.\n */\n private _bearingToSfm(bearing: number[]): number[] {\n if (this._fullPano()) {\n let x: number = bearing[0];\n let y: number = bearing[1];\n let z: number = bearing[2];\n let lon: number = Math.atan2(x, z);\n let lat: number = Math.atan2(-y, Math.sqrt(x * x + z * z));\n return [lon / (2 * Math.PI), -lat / (2 * Math.PI)];\n } else if (this._gpano) {\n let x: number = bearing[0];\n let y: number = bearing[1];\n let z: number = bearing[2];\n let lon: number = Math.atan2(x, z);\n let lat: number = Math.atan2(-y, Math.sqrt(x * x + z * z));\n let fullPanoPixel: number[] = [\n (lon / (2 * Math.PI) + 0.5) * this.gpano.FullPanoWidthPixels,\n (- lat / Math.PI + 0.5) * this.gpano.FullPanoHeightPixels,\n ];\n let size: number = Math.max(this.gpano.CroppedAreaImageWidthPixels, this.gpano.CroppedAreaImageHeightPixels);\n return [\n (fullPanoPixel[0] - this.gpano.CroppedAreaLeftPixels - this.gpano.CroppedAreaImageWidthPixels / 2) / size,\n (fullPanoPixel[1] - this.gpano.CroppedAreaTopPixels - this.gpano.CroppedAreaImageHeightPixels / 2) / size,\n ];\n } else {\n if (bearing[2] > 0) {\n return [\n bearing[0] * this._focal / bearing[2],\n bearing[1] * this._focal / bearing[2],\n ];\n } else {\n return [\n bearing[0] < 0 ? Number.NEGATIVE_INFINITY : Number.POSITIVE_INFINITY,\n bearing[1] < 0 ? Number.NEGATIVE_INFINITY : Number.POSITIVE_INFINITY,\n ];\n }\n }\n }\n\n /**\n * Convert basic coordinates to SfM coordinates.\n *\n * @param {Array<number>} basic - 2D basic coordinates.\n * @returns {Array<number>} 2D SfM coordinates.\n */\n private _basicToSfm(basic: number[]): number[] {\n let rotatedX: number;\n let rotatedY: number;\n\n switch (this._orientation) {\n case 1:\n rotatedX = basic[0];\n rotatedY = basic[1];\n break;\n case 3:\n rotatedX = 1 - basic[0];\n rotatedY = 1 - basic[1];\n break;\n case 6:\n rotatedX = basic[1];\n rotatedY = 1 - basic[0];\n break;\n case 8:\n rotatedX = 1 - basic[1];\n rotatedY = basic[0];\n break;\n default:\n rotatedX = basic[0];\n rotatedY = basic[1];\n break;\n }\n\n let w: number = this._width;\n let h: number = this._height;\n let s: number = Math.max(w, h);\n let sfmX: number = rotatedX * w / s - w / s / 2;\n let sfmY: number = rotatedY * h / s - h / s / 2;\n\n return [sfmX, sfmY];\n }\n\n /**\n * Convert SfM coordinates to basic coordinates.\n *\n * @param {Array<number>} sfm - 2D SfM coordinates.\n * @returns {Array<number>} 2D basic coordinates.\n */\n private _sfmToBasic(sfm: number[]): number[] {\n let w: number = this._width;\n let h: number = this._height;\n let s: number = Math.max(w, h);\n let rotatedX: number = (sfm[0] + w / s / 2) / w * s;\n let rotatedY: number = (sfm[1] + h / s / 2) / h * s;\n\n let basicX: number;\n let basicY: number;\n\n switch (this._orientation) {\n case 1:\n basicX = rotatedX;\n basicY = rotatedY;\n break;\n case 3:\n basicX = 1 - rotatedX;\n basicY = 1 - rotatedY;\n break;\n case 6:\n basicX = 1 - rotatedY;\n basicY = rotatedX;\n break;\n case 8:\n basicX = rotatedY;\n basicY = 1 - rotatedX;\n break;\n default:\n basicX = rotatedX;\n basicY = rotatedY;\n break;\n }\n\n return [basicX, basicY];\n }\n\n /**\n * Determines if the gpano information indicates a full panorama.\n *\n * @returns {boolean} Value determining if the gpano information indicates\n * a full panorama.\n */\n private _fullPano(): boolean {\n return this.gpano != null &&\n this.gpano.CroppedAreaLeftPixels === 0 &&\n this.gpano.CroppedAreaTopPixels === 0 &&\n this.gpano.CroppedAreaImageWidthPixels === this.gpano.FullPanoWidthPixels &&\n this.gpano.CroppedAreaImageHeightPixels === this.gpano.FullPanoHeightPixels;\n }\n\n /**\n * Checks a value and returns it if it exists and is larger than 0.\n * Fallbacks if it is null.\n *\n * @param {number} value - Value to check.\n * @param {number} fallback - Value to fall back to.\n * @returns {number} The value or its fallback value if it is not defined or negative.\n */\n private _getValue(value: number, fallback: number): number {\n return value != null && value > 0 ? value : fallback;\n }\n\n /**\n * Creates the extrinsic camera matrix [ R | t ].\n *\n * @param {Array<number>} rotation - Rotation vector in angle axis representation.\n * @param {Array<number>} translation - Translation vector.\n * @returns {THREE.Matrix4} Extrisic camera matrix.\n */\n private _getRt(rotation: number[], translation: number[]): THREE.Matrix4 {\n let axis: THREE.Vector3 = new THREE.Vector3(rotation[0], rotation[1], rotation[2]);\n let angle: number = axis.length();\n if (angle > 0) {\n axis.normalize();\n }\n\n let rt: THREE.Matrix4 = new THREE.Matrix4();\n rt.makeRotationAxis(axis, angle);\n rt.setPosition(\n new THREE.Vector3(\n translation[0],\n translation[1],\n translation[2]));\n\n return rt;\n }\n\n /**\n * Calculates the scaled extrinsic camera matrix scale * [ R | t ].\n *\n * @param {THREE.Matrix4} rt - Extrisic camera matrix.\n * @param {number} scale - Scale factor.\n * @returns {THREE.Matrix4} Scaled extrisic camera matrix.\n */\n private _getSrt(rt: THREE.Matrix4, scale: number): THREE.Matrix4 {\n let srt: THREE.Matrix4 = rt.clone();\n let elements: Float32Array = srt.elements;\n\n elements[12] = scale * elements[12];\n elements[13] = scale * elements[13];\n elements[14] = scale * elements[14];\n\n srt.scale(new THREE.Vector3(scale, scale, scale));\n\n return srt;\n }\n\n /**\n * Calculate a transformation matrix from normalized coordinates for\n * texture map coordinates.\n *\n * @returns {THREE.Matrix4} Normalized coordinates to texture map\n * coordinates transformation matrix.\n */\n private _normalizedToTextureMatrix(): THREE.Matrix4 {\n let size: number = Math.max(this._width, this._height);\n let w: number = size / this._width;\n let h: number = size / this._height;\n\n switch (this._orientation) {\n case 1:\n return new THREE.Matrix4().set(w, 0, 0, 0.5, 0, -h, 0, 0.5, 0, 0, 1, 0, 0, 0, 0, 1);\n case 3:\n return new THREE.Matrix4().set(-w, 0, 0, 0.5, 0, h, 0, 0.5, 0, 0, 1, 0, 0, 0, 0, 1);\n case 6:\n return new THREE.Matrix4().set( 0, -h, 0, 0.5, -w, 0, 0, 0.5, 0, 0, 1, 0, 0, 0, 0, 1);\n case 8:\n return new THREE.Matrix4().set(0, h, 0, 0.5, w, 0, 0, 0.5, 0, 0, 1, 0, 0, 0, 0, 1);\n default:\n return new THREE.Matrix4().set(w, 0, 0, 0.5, 0, -h, 0, 0.5, 0, 0, 1, 0, 0, 0, 0, 1);\n }\n }\n}\n",
- "/// <reference path=\"../../typings/index.d.ts\" />\n\nimport * as THREE from \"three\";\n\nimport {Transform} from \"../Geo\";\n\n/**\n * @class ViewportCoords\n *\n * @classdesc Provides methods for calculating 2D coordinate conversions\n * as well as 3D projection and unprojection.\n *\n * Basic coordinates are 2D coordinates on the [0, 1] interval and\n * have the origin point, (0, 0), at the top left corner and the\n * maximum value, (1, 1), at the bottom right corner of the original\n * photo.\n *\n * Viewport coordinates are 2D coordinates on the [-1, 1] interval and\n * have the origin point in the center. The bottom left corner point is\n * (-1, -1) and the top right corner point is (1, 1).\n *\n * Canvas coordiantes are 2D pixel coordinates on the [0, canvasWidth] and\n * [0, canvasHeight] intervals. The origin point (0, 0) is in the top left\n * corner and the maximum value is (canvasWidth, canvasHeight) is in the\n * bottom right corner.\n *\n * 3D coordinates are in the topocentric world reference frame.\n */\nexport class ViewportCoords {\n private _unprojectDepth: number = 200;\n\n /**\n * Convert basic coordinates to canvas coordinates.\n *\n * @description Transform origin and camera position needs to be the\n * equal for reliable return value.\n *\n * @param {number} basicX - Basic X coordinate.\n * @param {number} basicY - Basic Y coordinate.\n * @param {HTMLElement} container - The viewer container.\n * @param {Transform} transform - Transform of the node to unproject from.\n * @param {THREE.Camera} camera - Camera used in rendering.\n * @returns {Array<number>} 2D canvas coordinates.\n */\n public basicToCanvas(\n basicX: number,\n basicY: number,\n container: { offsetHeight: number, offsetWidth: number },\n transform: Transform,\n camera: THREE.Camera):\n number[] {\n\n const point3d: number[] = transform.unprojectBasic([basicX, basicY], this._unprojectDepth);\n const canvas: number[] = this.projectToCanvas(point3d, container, camera);\n\n return canvas;\n }\n\n /**\n * Convert basic coordinates to canvas coordinates safely. If 3D point is\n * behind camera null will be returned.\n *\n * @description Transform origin and camera position needs to be the\n * equal for reliable return value.\n *\n * @param {number} basicX - Basic X coordinate.\n * @param {number} basicY - Basic Y coordinate.\n * @param {HTMLElement} container - The viewer container.\n * @param {Transform} transform - Transform of the node to unproject from.\n * @param {THREE.Camera} camera - Camera used in rendering.\n * @returns {Array<number>} 2D canvas coordinates if the basic point represents a 3D point\n * in front of the camera, otherwise null.\n */\n public basicToCanvasSafe(\n basicX: number,\n basicY: number,\n container: { offsetHeight: number, offsetWidth: number },\n transform: Transform,\n camera: THREE.Camera):\n number[] {\n\n const point3d: number[] = transform.unprojectBasic([basicX, basicY], this._unprojectDepth);\n const pointCamera: number[] = this.worldToCamera(point3d, camera);\n\n if (pointCamera[2] > 0) {\n return null;\n }\n\n const [viewportX, viewportY]: number[] = this.cameraToViewport(pointCamera, camera);\n const canvas: number[] = this.viewportToCanvas(viewportX, viewportY, container);\n\n return canvas;\n }\n\n /**\n * Convert basic coordinates to viewport coordinates.\n *\n * @description Transform origin and camera position needs to be the\n * equal for reliable return value.\n *\n * @param {number} basicX - Basic X coordinate.\n * @param {number} basicY - Basic Y coordinate.\n * @param {Transform} transform - Transform of the node to unproject from.\n * @param {THREE.Camera} camera - Camera used in rendering.\n * @returns {Array<number>} 2D viewport coordinates.\n */\n public basicToViewport(\n basicX: number,\n basicY: number,\n transform: Transform,\n camera: THREE.Camera):\n number[] {\n\n const point3d: number[] = transform.unprojectBasic([basicX, basicY], this._unprojectDepth);\n const viewport: number[] = this.projectToViewport(point3d, camera);\n\n return viewport;\n }\n\n /**\n * Convert camera 3D coordinates to viewport coordinates.\n *\n * @param {number} pointCamera - 3D point in camera coordinate system.\n * @param {THREE.Camera} camera - Camera used in rendering.\n * @returns {Array<number>} 2D viewport coordinates.\n */\n public cameraToViewport(\n pointCamera: number[],\n camera: THREE.Camera):\n number[] {\n\n const viewport: THREE.Vector3 =\n new THREE.Vector3().fromArray(pointCamera)\n .applyMatrix4(camera.projectionMatrix);\n\n return [viewport.x, viewport.y];\n }\n\n /**\n * Get canvas pixel position from event.\n *\n * @param {Event} event - Event containing clientX and clientY properties.\n * @param {HTMLElement} element - HTML element.\n * @returns {Array<number>} 2D canvas coordinates.\n */\n public canvasPosition(event: { clientX: number, clientY: number }, element: HTMLElement): number[] {\n const clientRect: ClientRect = element.getBoundingClientRect();\n\n const canvasX: number = event.clientX - clientRect.left - element.clientLeft;\n const canvasY: number = event.clientY - clientRect.top - element.clientTop;\n\n return [canvasX, canvasY];\n }\n\n /**\n * Convert canvas coordinates to basic coordinates.\n *\n * @description Transform origin and camera position needs to be the\n * equal for reliable return value.\n *\n * @param {number} canvasX - Canvas X coordinate.\n * @param {number} canvasY - Canvas Y coordinate.\n * @param {HTMLElement} container - The viewer container.\n * @param {Transform} transform - Transform of the node to unproject from.\n * @param {THREE.Camera} camera - Camera used in rendering.\n * @returns {Array<number>} 2D basic coordinates.\n */\n public canvasToBasic(\n canvasX: number,\n canvasY: number,\n container: { offsetHeight: number, offsetWidth: number },\n transform: Transform,\n camera: THREE.Camera):\n number[] {\n\n const point3d: number[] =\n this.unprojectFromCanvas(canvasX, canvasY, container, camera)\n .toArray();\n\n const basic: number[] = transform.projectBasic(point3d);\n\n return basic;\n }\n\n /**\n * Convert canvas coordinates to viewport coordinates.\n *\n * @param {number} canvasX - Canvas X coordinate.\n * @param {number} canvasY - Canvas Y coordinate.\n * @param {HTMLElement} container - The viewer container.\n * @returns {Array<number>} 2D viewport coordinates.\n */\n public canvasToViewport(\n canvasX: number,\n canvasY: number,\n container: { offsetHeight: number, offsetWidth: number }):\n number[] {\n\n const [canvasWidth, canvasHeight]: number[] = this.containerToCanvas(container);\n const viewportX: number = 2 * canvasX / canvasWidth - 1;\n const viewportY: number = 1 - 2 * canvasY / canvasHeight;\n\n return [viewportX, viewportY];\n }\n\n /**\n * Determines the width and height of the container in canvas coordinates.\n *\n * @param {HTMLElement} container - The viewer container.\n * @returns {Array<number>} 2D canvas coordinates.\n */\n public containerToCanvas(container: { offsetHeight: number, offsetWidth: number }): number[] {\n return [container.offsetWidth, container.offsetHeight];\n }\n\n /**\n * Determine basic distances from image to canvas corners.\n *\n * @description Transform origin and camera position needs to be the\n * equal for reliable return value.\n *\n * Determines the smallest basic distance for every side of the canvas.\n *\n * @param {Transform} transform - Transform of the node to unproject from.\n * @param {THREE.Camera} camera - Camera used in rendering.\n * @returns {Array<number>} Array of basic distances as [top, right, bottom, left].\n */\n public getBasicDistances(\n transform: Transform,\n camera: THREE.Camera):\n number[] {\n\n const topLeftBasic: number[] = this.viewportToBasic(-1, 1, transform, camera);\n const topRightBasic: number[] = this.viewportToBasic(1, 1, transform, camera);\n const bottomRightBasic: number[] = this.viewportToBasic(1, -1, transform, camera);\n const bottomLeftBasic: number[] = this.viewportToBasic(-1, -1, transform, camera);\n\n let topBasicDistance: number = 0;\n let rightBasicDistance: number = 0;\n let bottomBasicDistance: number = 0;\n let leftBasicDistance: number = 0;\n\n if (topLeftBasic[1] < 0 && topRightBasic[1] < 0) {\n topBasicDistance = topLeftBasic[1] > topRightBasic[1] ?\n -topLeftBasic[1] :\n -topRightBasic[1];\n }\n\n if (topRightBasic[0] > 1 && bottomRightBasic[0] > 1) {\n rightBasicDistance = topRightBasic[0] < bottomRightBasic[0] ?\n topRightBasic[0] - 1 :\n bottomRightBasic[0] - 1;\n }\n\n if (bottomRightBasic[1] > 1 && bottomLeftBasic[1] > 1) {\n bottomBasicDistance = bottomRightBasic[1] < bottomLeftBasic[1] ?\n bottomRightBasic[1] - 1 :\n bottomLeftBasic[1] - 1;\n }\n\n if (bottomLeftBasic[0] < 0 && topLeftBasic[0] < 0) {\n leftBasicDistance = bottomLeftBasic[0] > topLeftBasic[0] ?\n -bottomLeftBasic[0] :\n -topLeftBasic[0];\n }\n\n return [topBasicDistance, rightBasicDistance, bottomBasicDistance, leftBasicDistance];\n }\n\n /**\n * Determine pixel distances from image to canvas corners.\n *\n * @description Transform origin and camera position needs to be the\n * equal for reliable return value.\n *\n * Determines the smallest pixel distance for every side of the canvas.\n *\n * @param {HTMLElement} container - The viewer container.\n * @param {Transform} transform - Transform of the node to unproject from.\n * @param {THREE.Camera} camera - Camera used in rendering.\n * @returns {Array<number>} Array of pixel distances as [top, right, bottom, left].\n */\n public getPixelDistances(\n container: { offsetHeight: number, offsetWidth: number },\n transform: Transform,\n camera: THREE.Camera):\n number[] {\n\n const topLeftBasic: number[] = this.viewportToBasic(-1, 1, transform, camera);\n const topRightBasic: number[] = this.viewportToBasic(1, 1, transform, camera);\n const bottomRightBasic: number[] = this.viewportToBasic(1, -1, transform, camera);\n const bottomLeftBasic: number[] = this.viewportToBasic(-1, -1, transform, camera);\n\n let topPixelDistance: number = 0;\n let rightPixelDistance: number = 0;\n let bottomPixelDistance: number = 0;\n let leftPixelDistance: number = 0;\n\n const [canvasWidth, canvasHeight]: number[] = this.containerToCanvas(container);\n\n if (topLeftBasic[1] < 0 && topRightBasic[1] < 0) {\n const basicX: number = topLeftBasic[1] > topRightBasic[1] ?\n topLeftBasic[0] :\n topRightBasic[0];\n\n const canvas: number[] = this.basicToCanvas(basicX, 0, container, transform, camera);\n\n topPixelDistance = canvas[1] > 0 ? canvas[1] : 0;\n }\n\n if (topRightBasic[0] > 1 && bottomRightBasic[0] > 1) {\n const basicY: number = topRightBasic[0] < bottomRightBasic[0] ?\n topRightBasic[1] :\n bottomRightBasic[1];\n\n const canvas: number[] = this.basicToCanvas(1, basicY, container, transform, camera);\n\n rightPixelDistance = canvas[0] < canvasWidth ? canvasWidth - canvas[0] : 0;\n }\n\n if (bottomRightBasic[1] > 1 && bottomLeftBasic[1] > 1) {\n const basicX: number = bottomRightBasic[1] < bottomLeftBasic[1] ?\n bottomRightBasic[0] :\n bottomLeftBasic[0];\n\n const canvas: number[] = this.basicToCanvas(basicX, 1, container, transform, camera);\n\n bottomPixelDistance = canvas[1] < canvasHeight ? canvasHeight - canvas[1] : 0;\n }\n\n if (bottomLeftBasic[0] < 0 && topLeftBasic[0] < 0) {\n const basicY: number = bottomLeftBasic[0] > topLeftBasic[0] ?\n bottomLeftBasic[1] :\n topLeftBasic[1];\n\n const canvas: number[] = this.basicToCanvas(0, basicY, container, transform, camera);\n\n leftPixelDistance = canvas[0] > 0 ? canvas[0] : 0;\n }\n\n return [topPixelDistance, rightPixelDistance, bottomPixelDistance, leftPixelDistance];\n }\n\n /**\n * Determine if an event occured inside an element.\n *\n * @param {Event} event - Event containing clientX and clientY properties.\n * @param {HTMLElement} element - HTML element.\n * @returns {boolean} Value indicating if the event occured inside the element or not.\n */\n public insideElement(event: { clientX: number, clientY: number }, element: HTMLElement): boolean {\n const clientRect: ClientRect = element.getBoundingClientRect();\n\n const minX: number = clientRect.left + element.clientLeft;\n const maxX: number = minX + element.clientWidth;\n const minY: number = clientRect.top + element.clientTop;\n const maxY: number = minY + element.clientHeight;\n\n return event.clientX > minX &&\n event.clientX < maxX &&\n event.clientY > minY &&\n event.clientY < maxY;\n }\n\n /**\n * Project 3D world coordinates to canvas coordinates.\n *\n * @param {Array<number>} point3D - 3D world coordinates.\n * @param {HTMLElement} container - The viewer container.\n * @param {THREE.Camera} camera - Camera used in rendering.\n * @returns {Array<number>} 2D canvas coordinates.\n */\n public projectToCanvas(\n point3d: number[],\n container: { offsetHeight: number, offsetWidth: number },\n camera: THREE.Camera):\n number[] {\n\n const viewport: number[] = this.projectToViewport(point3d, camera);\n const canvas: number[] =\n this.viewportToCanvas(viewport[0], viewport[1], container);\n\n return canvas;\n }\n\n /**\n * Project 3D world coordinates to viewport coordinates.\n *\n * @param {Array<number>} point3D - 3D world coordinates.\n * @param {THREE.Camera} camera - Camera used in rendering.\n * @returns {Array<number>} 2D viewport coordinates.\n */\n public projectToViewport(\n point3d: number[],\n camera: THREE.Camera):\n number[] {\n\n const viewport: THREE.Vector3 =\n new THREE.Vector3(point3d[0], point3d[1], point3d[2])\n .project(camera);\n\n return [viewport.x, viewport.y];\n }\n\n /**\n * Uproject canvas coordinates to 3D world coordinates.\n *\n * @param {number} canvasX - Canvas X coordinate.\n * @param {number} canvasY - Canvas Y coordinate.\n * @param {HTMLElement} container - The viewer container.\n * @param {THREE.Camera} camera - Camera used in rendering.\n * @returns {Array<number>} 3D world coordinates.\n */\n public unprojectFromCanvas(\n canvasX: number,\n canvasY: number,\n container: { offsetHeight: number, offsetWidth: number },\n camera: THREE.Camera):\n THREE.Vector3 {\n\n const viewport: number[] =\n this.canvasToViewport(canvasX, canvasY, container);\n\n const point3d: THREE.Vector3 =\n this.unprojectFromViewport(viewport[0], viewport[1], camera);\n\n return point3d;\n }\n\n /**\n * Unproject viewport coordinates to 3D world coordinates.\n *\n * @param {number} viewportX - Viewport X coordinate.\n * @param {number} viewportY - Viewport Y coordinate.\n * @param {THREE.Camera} camera - Camera used in rendering.\n * @returns {Array<number>} 3D world coordinates.\n */\n public unprojectFromViewport(\n viewportX: number,\n viewportY: number,\n camera: THREE.Camera):\n THREE.Vector3 {\n\n const point3d: THREE.Vector3 =\n new THREE.Vector3(viewportX, viewportY, 1)\n .unproject(camera);\n\n return point3d;\n }\n\n /**\n * Convert viewport coordinates to basic coordinates.\n *\n * @description Transform origin and camera position needs to be the\n * equal for reliable return value.\n *\n * @param {number} viewportX - Viewport X coordinate.\n * @param {number} viewportY - Viewport Y coordinate.\n * @param {Transform} transform - Transform of the node to unproject from.\n * @param {THREE.Camera} camera - Camera used in rendering.\n * @returns {Array<number>} 2D basic coordinates.\n */\n public viewportToBasic(\n viewportX: number,\n viewportY: number,\n transform: Transform,\n camera: THREE.Camera):\n number[] {\n\n const point3d: number[] =\n new THREE.Vector3(viewportX, viewportY, 1)\n .unproject(camera)\n .toArray();\n\n const basic: number[] = transform.projectBasic(point3d);\n\n return basic;\n }\n\n /**\n * Convert viewport coordinates to canvas coordinates.\n *\n * @param {number} viewportX - Viewport X coordinate.\n * @param {number} viewportY - Viewport Y coordinate.\n * @param {HTMLElement} container - The viewer container.\n * @returns {Array<number>} 2D canvas coordinates.\n */\n public viewportToCanvas(\n viewportX: number,\n viewportY: number,\n container: { offsetHeight: number, offsetWidth: number }):\n number[] {\n\n const [canvasWidth, canvasHeight]: number[] = this.containerToCanvas(container);\n const canvasX: number = canvasWidth * (viewportX + 1) / 2;\n const canvasY: number = -canvasHeight * (viewportY - 1) / 2;\n\n return [canvasX, canvasY];\n }\n\n /**\n * Convert 3D world coordinates to 3D camera coordinates.\n *\n * @param {number} point3D - 3D point in world coordinate system.\n * @param {THREE.Camera} camera - Camera used in rendering.\n * @returns {Array<number>} 3D camera coordinates.\n */\n public worldToCamera(\n point3d: number[],\n camera: THREE.Camera): number[] {\n\n const pointCamera: THREE.Vector3 =\n new THREE.Vector3(point3d[0], point3d[1], point3d[2])\n .applyMatrix4(camera.matrixWorldInverse);\n\n return pointCamera.toArray();\n }\n}\n\nexport default ViewportCoords;\n",
+ "export type Point = { x: number, y: number };\n\nexport type Segment = { p1: Point, p2: Point };\n\nfunction sign(n: number): number {\n return n > 0 ? 1 : n < 0 ? -1 : 0;\n}\n\nfunction colinearPointOnSegment(p: Point, s: Segment): boolean {\n return p.x <= Math.max(s.p1.x, s.p2.x) &&\n p.x >= Math.min(s.p1.x, s.p2.x) &&\n p.y >= Math.max(s.p1.y, s.p2.y) &&\n p.y >= Math.min(s.p1.y, s.p2.y);\n}\n\nfunction parallel(s1: Segment, s2: Segment): boolean {\n const ux: number = s1.p2.x - s1.p1.x;\n const uy: number = s1.p2.y - s1.p1.y;\n const vx: number = s2.p2.x - s2.p1.x;\n const vy: number = s2.p2.y - s2.p1.y;\n\n const cross: number = ux * vy - uy * vx;\n const u2: number = ux * ux + uy * uy;\n const v2: number = vx * vx + vy * vy;\n\n const epsilon2: number = 1e-10;\n\n return cross * cross < epsilon2 * u2 * v2;\n}\n\nfunction tripletOrientation(p1: Point, p2: Point, p3: Point): number {\n const orientation: number =\n (p2.y - p1.y) * (p3.x - p2.x) -\n (p3.y - p2.y) * (p2.x - p1.x);\n\n return sign(orientation);\n}\n\nexport function segmentsIntersect(s1: Segment, s2: Segment): boolean {\n if (parallel(s1, s2)) {\n return false;\n }\n\n const o1: number = tripletOrientation(s1.p1, s1.p2, s2.p1);\n const o2: number = tripletOrientation(s1.p1, s1.p2, s2.p2);\n const o3: number = tripletOrientation(s2.p1, s2.p2, s1.p1);\n const o4: number = tripletOrientation(s2.p1, s2.p2, s1.p2);\n\n if (o1 !== o2 && o3 !== o4) {\n return true;\n }\n\n if (o1 === 0 && colinearPointOnSegment(s2.p1, s1)) {\n return true;\n }\n\n if (o2 === 0 && colinearPointOnSegment(s2.p2, s1)) {\n return true;\n }\n\n if (o3 === 0 && colinearPointOnSegment(s1.p1, s2)) {\n return true;\n }\n\n if (o4 === 0 && colinearPointOnSegment(s1.p2, s2)) {\n return true;\n }\n\n return false;\n}\n\nexport function segmentIntersection(s1: Segment, s2: Segment): Point {\n if (parallel(s1, s2)) {\n return undefined;\n }\n\n const x1: number = s1.p1.x;\n const x2: number = s1.p2.x;\n const y1: number = s1.p1.y;\n const y2: number = s1.p2.y;\n\n const x3: number = s2.p1.x;\n const x4: number = s2.p2.x;\n const y3: number = s2.p1.y;\n const y4: number = s2.p2.y;\n\n const den: number = (x1 - x2) * (y3 - y4) - (y1 - y2) * (x3 - x4);\n const xNum: number = (x1 * y2 - y1 * x2) * (x3 - x4) - (x1 - x2) * (x3 * y4 - y3 * x4);\n const yNum: number = (x1 * y2 - y1 * x2) * (y3 - y4) - (y1 - y2) * (x3 * y4 - y3 * x4);\n\n return { x: xNum / den, y: yNum / den };\n}\n",
+ "import * as THREE from \"three\";\n\n/**\n * @class Spatial\n *\n * @classdesc Provides methods for scalar, vector and matrix calculations.\n */\nexport class Spatial {\n private _epsilon: number = 1e-9;\n\n /**\n * Converts azimuthal phi rotation (counter-clockwise with origin on X-axis) to\n * bearing (clockwise with origin at north or Y-axis).\n *\n * @param {number} phi - Azimuthal phi angle in radians.\n * @returns {number} Bearing in radians.\n */\n public azimuthalToBearing(phi: number): number {\n return -phi + Math.PI / 2;\n }\n\n /**\n * Converts degrees to radians.\n *\n * @param {number} deg - Degrees.\n * @returns {number} Radians.\n */\n public degToRad(deg: number): number {\n return Math.PI * deg / 180;\n }\n\n /**\n * Converts radians to degrees.\n *\n * @param {number} rad - Radians.\n * @returns {number} Degrees.\n */\n public radToDeg(rad: number): number {\n return 180 * rad / Math.PI;\n }\n\n /**\n * Creates a rotation matrix from an angle-axis vector.\n *\n * @param {Array<number>} angleAxis - Angle-axis representation of a rotation.\n * @returns {THREE.Matrix4} Rotation matrix.\n */\n public rotationMatrix(angleAxis: number[]): THREE.Matrix4 {\n let axis: THREE.Vector3 =\n new THREE.Vector3(angleAxis[0], angleAxis[1], angleAxis[2]);\n let angle: number = axis.length();\n if (angle > 0) {\n axis.normalize();\n }\n\n return new THREE.Matrix4().makeRotationAxis(axis, angle);\n }\n\n /**\n * Rotates a vector according to a angle-axis rotation vector.\n *\n * @param {Array<number>} vector - Vector to rotate.\n * @param {Array<number>} angleAxis - Angle-axis representation of a rotation.\n * @returns {THREE.Vector3} Rotated vector.\n */\n public rotate(vector: number[], angleAxis: number[]): THREE.Vector3 {\n let v: THREE.Vector3 = new THREE.Vector3(vector[0], vector[1], vector[2]);\n let rotationMatrix: THREE.Matrix4 = this.rotationMatrix(angleAxis);\n v.applyMatrix4(rotationMatrix);\n\n return v;\n }\n\n /**\n * Calculates the optical center from a rotation vector\n * on the angle-axis representation and a translation vector\n * according to C = -R^T t.\n *\n * @param {Array<number>} rotation - Angle-axis representation of a rotation.\n * @param {Array<number>} translation - Translation vector.\n * @returns {THREE.Vector3} Optical center.\n */\n public opticalCenter(rotation: number[], translation: number[]): THREE.Vector3 {\n let angleAxis: number[] = [-rotation[0], -rotation[1], -rotation[2]];\n let vector: number[] = [-translation[0], -translation[1], -translation[2]];\n\n return this.rotate(vector, angleAxis);\n }\n\n /**\n * Calculates the viewing direction from a rotation vector\n * on the angle-axis representation.\n *\n * @param {number[]} rotation - Angle-axis representation of a rotation.\n * @returns {THREE.Vector3} Viewing direction.\n */\n public viewingDirection(rotation: number[]): THREE.Vector3 {\n let angleAxis: number[] = [-rotation[0], -rotation[1], -rotation[2]];\n\n return this.rotate([0, 0, 1], angleAxis);\n }\n\n /**\n * Wrap a number on the interval [min, max].\n *\n * @param {number} value - Value to wrap.\n * @param {number} min - Lower endpoint of interval.\n * @param {number} max - Upper endpoint of interval.\n * @returns {number} The wrapped number.\n */\n public wrap(value: number, min: number, max: number): number {\n if (max < min) {\n throw new Error(\"Invalid arguments: max must be larger than min.\");\n }\n\n let interval: number = (max - min);\n\n while (value > max || value < min) {\n if (value > max) {\n value = value - interval;\n } else if (value < min) {\n value = value + interval;\n }\n }\n\n return value;\n }\n\n /**\n * Wrap an angle on the interval [-Pi, Pi].\n *\n * @param {number} angle - Value to wrap.\n * @returns {number} Wrapped angle.\n */\n public wrapAngle(angle: number): number {\n return this.wrap(angle, -Math.PI, Math.PI);\n }\n\n /**\n * Limit the value to the interval [min, max] by changing the value to\n * the nearest available one when it is outside the interval.\n *\n * @param {number} value - Value to clamp.\n * @param {number} min - Minimum of the interval.\n * @param {number} max - Maximum of the interval.\n * @returns {number} Clamped value.\n */\n public clamp(value: number, min: number, max: number): number {\n if (value < min) {\n return min;\n }\n\n if (value > max) {\n return max;\n }\n\n return value;\n }\n\n /**\n * Calculates the counter-clockwise angle from the first\n * vector (x1, y1)^T to the second (x2, y2)^T.\n *\n * @param {number} x1 - X coordinate of first vector.\n * @param {number} y1 - Y coordinate of first vector.\n * @param {number} x2 - X coordinate of second vector.\n * @param {number} y2 - Y coordinate of second vector.\n * @returns {number} Counter clockwise angle between the vectors.\n */\n public angleBetweenVector2(x1: number, y1: number, x2: number, y2: number): number {\n let angle: number = Math.atan2(y2, x2) - Math.atan2(y1, x1);\n\n return this.wrapAngle(angle);\n }\n\n /**\n * Calculates the minimum (absolute) angle change for rotation\n * from one angle to another on the [-Pi, Pi] interval.\n *\n * @param {number} angle1 - Start angle.\n * @param {number} angle2 - Destination angle.\n * @returns {number} Absolute angle change between angles.\n */\n public angleDifference(angle1: number, angle2: number): number {\n let angle: number = angle2 - angle1;\n\n return this.wrapAngle(angle);\n }\n\n /**\n * Calculates the relative rotation angle between two\n * angle-axis vectors.\n *\n * @param {number} rotation1 - First angle-axis vector.\n * @param {number} rotation2 - Second angle-axis vector.\n * @returns {number} Relative rotation angle.\n */\n public relativeRotationAngle(rotation1: number[], rotation2: number[]): number {\n let R1T: THREE.Matrix4 = this.rotationMatrix(\n [-rotation1[0], -rotation1[1], -rotation1[2]]);\n let R2: THREE.Matrix4 = this.rotationMatrix(rotation2);\n\n let R: THREE.Matrix4 = R1T.multiply(R2);\n let elements: Float32Array = R.elements;\n\n // from Tr(R) = 1 + 2 * cos(theta)\n let tr: number = elements[0] + elements[5] + elements[10];\n let theta: number = Math.acos(Math.max(Math.min((tr - 1) / 2, 1), -1));\n\n return theta;\n }\n\n /**\n * Calculates the angle from a vector to a plane.\n *\n * @param {Array<number>} vector - The vector.\n * @param {Array<number>} planeNormal - Normal of the plane.\n * @returns {number} Angle from between plane and vector.\n */\n public angleToPlane(vector: number[], planeNormal: number[]): number {\n let v: THREE.Vector3 = new THREE.Vector3().fromArray(vector);\n let norm: number = v.length();\n\n if (norm < this._epsilon) {\n return 0;\n }\n\n let projection: number = v.dot(new THREE.Vector3().fromArray(planeNormal));\n\n return Math.asin(projection / norm);\n }\n\n public azimuthal(direction: number[], up: number[]): number {\n const directionVector: THREE.Vector3 = new THREE.Vector3().fromArray(direction);\n const upVector: THREE.Vector3 = new THREE.Vector3().fromArray(up);\n\n const upProjection: number = directionVector.clone().dot(upVector);\n const planeProjection: THREE.Vector3 = directionVector.clone().sub(upVector.clone().multiplyScalar(upProjection));\n\n return Math.atan2(planeProjection.y, planeProjection.x);\n }\n\n /**\n * Calculates the distance between two coordinates\n * (latitude longitude pairs) in meters according to\n * the haversine formula.\n *\n * @param {number} lat1 - Latitude of the first coordinate in degrees.\n * @param {number} lon1 - Longitude of the first coordinate in degrees.\n * @param {number} lat2 - Latitude of the second coordinate in degrees.\n * @param {number} lon2 - Longitude of the second coordinate in degrees.\n * @returns {number} Distance between lat lon positions in meters.\n */\n public distanceFromLatLon(lat1: number, lon1: number, lat2: number, lon2: number): number {\n let r: number = 6371000;\n let dLat: number = this.degToRad(lat2 - lat1);\n let dLon: number = this.degToRad(lon2 - lon1);\n\n let hav: number =\n Math.sin(dLat / 2) * Math.sin(dLat / 2) +\n Math.cos(this.degToRad(lat1)) * Math.cos(this.degToRad(lat2)) *\n Math.sin(dLon / 2) * Math.sin(dLon / 2);\n\n let d: number = 2 * r * Math.atan2(Math.sqrt(hav), Math.sqrt(1 - hav));\n\n return d;\n }\n}\n\nexport default Spatial;\n",
+ "import * as THREE from \"three\";\n\nimport {IGPano} from \"../API\";\nimport { CameraProjection } from \"../api/interfaces/CameraProjection\";\n\n/**\n * @class Transform\n *\n * @classdesc Class used for calculating coordinate transformations\n * and projections.\n */\nexport class Transform {\n private _width: number;\n private _height: number;\n private _focal: number;\n private _orientation: number;\n private _scale: number;\n private _basicWidth: number;\n private _basicHeight: number;\n private _basicAspect: number;\n\n private _gpano: IGPano;\n\n private _rt: THREE.Matrix4;\n private _srt: THREE.Matrix4;\n\n private _basicRt: THREE.Matrix4;\n\n private _textureScale: number[];\n\n private _ck1: number;\n private _ck2: number;\n private _cameraProjection: CameraProjection;\n\n private _radialPeak: number;\n\n /**\n * Create a new transform instance.\n * @param {number} orientation - Image orientation.\n * @param {number} width - Image height.\n * @param {number} height - Image width.\n * @param {number} focal - Focal length.\n * @param {number} scale - Atomic scale.\n * @param {IGPano} gpano - Panorama properties.\n * @param {Array<number>} rotation - Rotation vector in three dimensions.\n * @param {Array<number>} translation - Translation vector in three dimensions.\n * @param {HTMLImageElement} image - Image for fallback size calculations.\n */\n constructor(\n orientation: number,\n width: number,\n height: number,\n focal: number,\n scale: number,\n gpano: IGPano,\n rotation: number[],\n translation: number[],\n image: HTMLImageElement,\n textureScale?: number[],\n ck1?: number,\n ck2?: number,\n cameraProjection?: CameraProjection) {\n\n this._orientation = this._getValue(orientation, 1);\n\n let imageWidth: number = image != null ? image.width : 4;\n let imageHeight: number = image != null ? image.height : 3;\n let keepOrientation: boolean = this._orientation < 5;\n\n this._width = this._getValue(width, keepOrientation ? imageWidth : imageHeight);\n this._height = this._getValue(height, keepOrientation ? imageHeight : imageWidth);\n\n this._basicAspect = keepOrientation ?\n this._width / this._height :\n this._height / this._width;\n\n this._basicWidth = keepOrientation ? width : height;\n this._basicHeight = keepOrientation ? height : width;\n\n this._focal = this._getValue(focal, 1);\n this._scale = this._getValue(scale, 0);\n\n this._gpano = gpano != null ? gpano : null;\n\n this._rt = this._getRt(rotation, translation);\n this._srt = this._getSrt(this._rt, this._scale);\n\n this._basicRt = this._getBasicRt(this._rt, orientation);\n\n this._textureScale = !!textureScale ? textureScale : [1, 1];\n\n this._ck1 = !!ck1 ? ck1 : 0;\n this._ck2 = !!ck2 ? ck2 : 0;\n this._cameraProjection = !!cameraProjection ?\n cameraProjection :\n !!gpano ?\n \"equirectangular\" :\n \"perspective\";\n\n this._radialPeak = this._getRadialPeak(this._ck1, this._ck2);\n }\n\n public get ck1(): number {\n return this._ck1;\n }\n\n public get ck2(): number {\n return this._ck2;\n }\n\n public get cameraProjection(): string {\n return this._cameraProjection;\n }\n\n /**\n * Get basic aspect.\n * @returns {number} The orientation adjusted aspect ratio.\n */\n public get basicAspect(): number {\n return this._basicAspect;\n }\n\n /**\n * Get basic height.\n *\n * @description Does not fall back to node image height but\n * uses original value from API so can be faulty.\n *\n * @returns {number} The height of the basic version image\n * (adjusted for orientation).\n */\n public get basicHeight(): number {\n return this._basicHeight;\n }\n\n public get basicRt(): THREE.Matrix4 {\n return this._basicRt;\n }\n\n /**\n * Get basic width.\n *\n * @description Does not fall back to node image width but\n * uses original value from API so can be faulty.\n *\n * @returns {number} The width of the basic version image\n * (adjusted for orientation).\n */\n public get basicWidth(): number {\n return this._basicWidth;\n }\n\n /**\n * Get focal.\n * @returns {number} The node focal length.\n */\n public get focal(): number {\n return this._focal;\n }\n\n /**\n * Get fullPano.\n *\n * @returns {boolean} Value indicating whether the node is a complete\n * 360 panorama.\n */\n public get fullPano(): boolean {\n return this._gpano != null &&\n this._gpano.CroppedAreaLeftPixels === 0 &&\n this._gpano.CroppedAreaTopPixels === 0 &&\n this._gpano.CroppedAreaImageWidthPixels === this._gpano.FullPanoWidthPixels &&\n this._gpano.CroppedAreaImageHeightPixels === this._gpano.FullPanoHeightPixels;\n }\n\n /**\n * Get gpano.\n * @returns {number} The node gpano information.\n */\n public get gpano(): IGPano {\n return this._gpano;\n }\n\n /**\n * Get height.\n *\n * @description Falls back to the node image height if\n * the API data is faulty.\n *\n * @returns {number} The orientation adjusted image height.\n */\n public get height(): number {\n return this._height;\n }\n\n /**\n * Get orientation.\n * @returns {number} The image orientation.\n */\n public get orientation(): number {\n return this._orientation;\n }\n\n /**\n * Get rt.\n * @returns {THREE.Matrix4} The extrinsic camera matrix.\n */\n public get rt(): THREE.Matrix4 {\n return this._rt;\n }\n\n /**\n * Get srt.\n * @returns {THREE.Matrix4} The scaled extrinsic camera matrix.\n */\n public get srt(): THREE.Matrix4 {\n return this._srt;\n }\n\n /**\n * Get scale.\n * @returns {number} The node atomic reconstruction scale.\n */\n public get scale(): number {\n return this._scale;\n }\n\n /**\n * Get has valid scale.\n * @returns {boolean} Value indicating if the scale of the transform is valid.\n */\n public get hasValidScale(): boolean {\n return this._scale > 1e-2 && this._scale < 50;\n }\n\n /**\n * Get radial peak.\n * @returns {number} Value indicating the radius where the radial\n * undistortion function peaks.\n */\n public get radialPeak(): number {\n return this._radialPeak;\n }\n\n /**\n * Get width.\n *\n * @description Falls back to the node image width if\n * the API data is faulty.\n *\n * @returns {number} The orientation adjusted image width.\n */\n public get width(): number {\n return this._width;\n }\n\n /**\n * Calculate the up vector for the node transform.\n *\n * @returns {THREE.Vector3} Normalized and orientation adjusted up vector.\n */\n public upVector(): THREE.Vector3 {\n let rte: Float32Array = this._rt.elements;\n\n switch (this._orientation) {\n case 1:\n return new THREE.Vector3(-rte[1], -rte[5], -rte[9]);\n case 3:\n return new THREE.Vector3(rte[1], rte[5], rte[9]);\n case 6:\n return new THREE.Vector3(-rte[0], -rte[4], -rte[8]);\n case 8:\n return new THREE.Vector3(rte[0], rte[4], rte[8]);\n default:\n return new THREE.Vector3(-rte[1], -rte[5], -rte[9]);\n }\n }\n\n /**\n * Calculate projector matrix for projecting 3D points to texture map\n * coordinates (u and v).\n *\n * @returns {THREE.Matrix4} Projection matrix for 3D point to texture\n * map coordinate calculations.\n */\n public projectorMatrix(): THREE.Matrix4 {\n let projector: THREE.Matrix4 = this._normalizedToTextureMatrix();\n\n let f: number = this._focal;\n let projection: THREE.Matrix4 = new THREE.Matrix4().set(\n f, 0, 0, 0,\n 0, f, 0, 0,\n 0, 0, 0, 0,\n 0, 0, 1, 0);\n\n projector.multiply(projection);\n projector.multiply(this._rt);\n\n return projector;\n }\n\n /**\n * Project 3D world coordinates to basic coordinates.\n *\n * @param {Array<number>} point3d - 3D world coordinates.\n * @return {Array<number>} 2D basic coordinates.\n */\n public projectBasic(point3d: number[]): number[] {\n let sfm: number[] = this.projectSfM(point3d);\n return this._sfmToBasic(sfm);\n }\n\n /**\n * Unproject basic coordinates to 3D world coordinates.\n *\n * @param {Array<number>} basic - 2D basic coordinates.\n * @param {Array<number>} distance - Distance to unproject from camera center.\n * @param {boolean} [depth] - Treat the distance value as depth from camera center.\n * Only applicable for perspective images. Will be\n * ignored for panoramas.\n * @returns {Array<number>} Unprojected 3D world coordinates.\n */\n public unprojectBasic(basic: number[], distance: number, depth?: boolean): number[] {\n let sfm: number[] = this._basicToSfm(basic);\n return this.unprojectSfM(sfm, distance, depth);\n }\n\n /**\n * Project 3D world coordinates to SfM coordinates.\n *\n * @param {Array<number>} point3d - 3D world coordinates.\n * @return {Array<number>} 2D SfM coordinates.\n */\n public projectSfM(point3d: number[]): number[] {\n let v: THREE.Vector4 = new THREE.Vector4(point3d[0], point3d[1], point3d[2], 1);\n v.applyMatrix4(this._rt);\n return this._bearingToSfm([v.x, v.y, v.z]);\n }\n\n /**\n * Unproject SfM coordinates to a 3D world coordinates.\n *\n * @param {Array<number>} sfm - 2D SfM coordinates.\n * @param {Array<number>} distance - Distance to unproject from camera center.\n * @param {boolean} [depth] - Treat the distance value as depth from camera center.\n * Only applicable for perspective images. Will be\n * ignored for panoramas.\n * @returns {Array<number>} Unprojected 3D world coordinates.\n */\n public unprojectSfM(sfm: number[], distance: number, depth?: boolean): number[] {\n let bearing: number[] = this._sfmToBearing(sfm);\n\n const v: THREE.Vector4 = depth && !this.gpano ?\n new THREE.Vector4(\n distance * bearing[0] / bearing[2],\n distance * bearing[1] / bearing[2],\n distance,\n 1) :\n new THREE.Vector4(\n distance * bearing[0],\n distance * bearing[1],\n distance * bearing[2],\n 1);\n\n v.applyMatrix4(new THREE.Matrix4().getInverse(this._rt));\n return [v.x / v.w, v.y / v.w, v.z / v.w];\n }\n\n /**\n * Transform SfM coordinates to bearing vector (3D cartesian\n * coordinates on the unit sphere).\n *\n * @param {Array<number>} sfm - 2D SfM coordinates.\n * @returns {Array<number>} Bearing vector (3D cartesian coordinates\n * on the unit sphere).\n */\n private _sfmToBearing(sfm: number[]): number[] {\n if (this._fullPano()) {\n let lon: number = sfm[0] * 2 * Math.PI;\n let lat: number = -sfm[1] * 2 * Math.PI;\n let x: number = Math.cos(lat) * Math.sin(lon);\n let y: number = -Math.sin(lat);\n let z: number = Math.cos(lat) * Math.cos(lon);\n return [x, y, z];\n } else if (this._gpano) {\n let size: number = Math.max(this.gpano.CroppedAreaImageWidthPixels, this.gpano.CroppedAreaImageHeightPixels);\n let fullPanoPixel: number[] = [\n sfm[0] * size + this.gpano.CroppedAreaImageWidthPixels / 2 + this.gpano.CroppedAreaLeftPixels,\n sfm[1] * size + this.gpano.CroppedAreaImageHeightPixels / 2 + this.gpano.CroppedAreaTopPixels,\n ];\n let lon: number = 2 * Math.PI * (fullPanoPixel[0] / this.gpano.FullPanoWidthPixels - 0.5);\n let lat: number = - Math.PI * (fullPanoPixel[1] / this.gpano.FullPanoHeightPixels - 0.5);\n let x: number = Math.cos(lat) * Math.sin(lon);\n let y: number = -Math.sin(lat);\n let z: number = Math.cos(lat) * Math.cos(lon);\n return [x, y, z];\n } else if (this._cameraProjection === \"fisheye\") {\n let [dxn, dyn]: number[] = [sfm[0] / this._focal, sfm[1] / this._focal];\n const dTheta: number = Math.sqrt(dxn * dxn + dyn * dyn);\n let d: number = this._distortionFromDistortedRadius(dTheta, this._ck1, this._ck2, this._radialPeak);\n let theta: number = dTheta / d;\n let z: number = Math.cos(theta);\n let r: number = Math.sin(theta);\n let x: number = r * dxn / dTheta;\n let y: number = r * dyn / dTheta;\n return [x, y, z];\n } else {\n let [dxn, dyn]: number[] = [sfm[0] / this._focal, sfm[1] / this._focal];\n const dr: number = Math.sqrt(dxn * dxn + dyn * dyn);\n let d: number = this._distortionFromDistortedRadius(dr, this._ck1, this._ck2, this._radialPeak);\n\n const xn: number = dxn / d;\n const yn: number = dyn / d;\n\n let v: THREE.Vector3 = new THREE.Vector3(xn, yn, 1);\n v.normalize();\n return [v.x, v.y, v.z];\n }\n }\n\n /** Compute distortion given the distorted radius.\n *\n * Solves for d in the equation\n * y = d(x, k1, k2) * x\n * given the distorted radius, y.\n */\n private _distortionFromDistortedRadius(distortedRadius: number, k1: number, k2: number, radialPeak: number): number {\n let d: number = 1.0;\n for (let i: number = 0; i < 10; i++) {\n let radius: number = distortedRadius / d;\n if (radius > radialPeak) {\n radius = radialPeak;\n }\n d = 1 + k1 * radius ** 2 + k2 * radius ** 4;\n }\n return d;\n }\n\n /**\n * Transform bearing vector (3D cartesian coordiantes on the unit sphere) to\n * SfM coordinates.\n *\n * @param {Array<number>} bearing - Bearing vector (3D cartesian coordinates on the\n * unit sphere).\n * @returns {Array<number>} 2D SfM coordinates.\n */\n private _bearingToSfm(bearing: number[]): number[] {\n if (this._fullPano()) {\n let x: number = bearing[0];\n let y: number = bearing[1];\n let z: number = bearing[2];\n let lon: number = Math.atan2(x, z);\n let lat: number = Math.atan2(-y, Math.sqrt(x * x + z * z));\n return [lon / (2 * Math.PI), -lat / (2 * Math.PI)];\n } else if (this._gpano) {\n let x: number = bearing[0];\n let y: number = bearing[1];\n let z: number = bearing[2];\n let lon: number = Math.atan2(x, z);\n let lat: number = Math.atan2(-y, Math.sqrt(x * x + z * z));\n let fullPanoPixel: number[] = [\n (lon / (2 * Math.PI) + 0.5) * this.gpano.FullPanoWidthPixels,\n (- lat / Math.PI + 0.5) * this.gpano.FullPanoHeightPixels,\n ];\n let size: number = Math.max(this.gpano.CroppedAreaImageWidthPixels, this.gpano.CroppedAreaImageHeightPixels);\n return [\n (fullPanoPixel[0] - this.gpano.CroppedAreaLeftPixels - this.gpano.CroppedAreaImageWidthPixels / 2) / size,\n (fullPanoPixel[1] - this.gpano.CroppedAreaTopPixels - this.gpano.CroppedAreaImageHeightPixels / 2) / size,\n ];\n } else if (this._cameraProjection === \"fisheye\") {\n if (bearing[2] > 0) {\n const [x, y, z]: number[] = bearing;\n const r: number = Math.sqrt(x * x + y * y);\n let theta: number = Math.atan2(r, z);\n\n if (theta > this._radialPeak) {\n theta = this._radialPeak;\n }\n\n const distortion: number = 1.0 + theta ** 2 * (this._ck1 + theta ** 2 * this._ck2);\n const s: number = this._focal * distortion * theta / r;\n\n return [s * x, s * y];\n } else {\n return [\n bearing[0] < 0 ? Number.NEGATIVE_INFINITY : Number.POSITIVE_INFINITY,\n bearing[1] < 0 ? Number.NEGATIVE_INFINITY : Number.POSITIVE_INFINITY,\n ];\n }\n } else {\n if (bearing[2] > 0) {\n let [xn, yn]: number[] = [bearing[0] / bearing[2], bearing[1] / bearing[2]];\n let r2: number = xn * xn + yn * yn;\n const rp2: number = this._radialPeak ** 2;\n\n if (r2 > rp2) {\n r2 = rp2;\n }\n\n const d: number = 1 + this._ck1 * r2 + this._ck2 * r2 ** 2;\n return [\n this._focal * d * xn,\n this._focal * d * yn,\n ];\n } else {\n return [\n bearing[0] < 0 ? Number.NEGATIVE_INFINITY : Number.POSITIVE_INFINITY,\n bearing[1] < 0 ? Number.NEGATIVE_INFINITY : Number.POSITIVE_INFINITY,\n ];\n }\n }\n }\n\n /**\n * Convert basic coordinates to SfM coordinates.\n *\n * @param {Array<number>} basic - 2D basic coordinates.\n * @returns {Array<number>} 2D SfM coordinates.\n */\n private _basicToSfm(basic: number[]): number[] {\n let rotatedX: number;\n let rotatedY: number;\n\n switch (this._orientation) {\n case 1:\n rotatedX = basic[0];\n rotatedY = basic[1];\n break;\n case 3:\n rotatedX = 1 - basic[0];\n rotatedY = 1 - basic[1];\n break;\n case 6:\n rotatedX = basic[1];\n rotatedY = 1 - basic[0];\n break;\n case 8:\n rotatedX = 1 - basic[1];\n rotatedY = basic[0];\n break;\n default:\n rotatedX = basic[0];\n rotatedY = basic[1];\n break;\n }\n\n let w: number = this._width;\n let h: number = this._height;\n let s: number = Math.max(w, h);\n let sfmX: number = rotatedX * w / s - w / s / 2;\n let sfmY: number = rotatedY * h / s - h / s / 2;\n\n return [sfmX, sfmY];\n }\n\n /**\n * Convert SfM coordinates to basic coordinates.\n *\n * @param {Array<number>} sfm - 2D SfM coordinates.\n * @returns {Array<number>} 2D basic coordinates.\n */\n private _sfmToBasic(sfm: number[]): number[] {\n let w: number = this._width;\n let h: number = this._height;\n let s: number = Math.max(w, h);\n let rotatedX: number = (sfm[0] + w / s / 2) / w * s;\n let rotatedY: number = (sfm[1] + h / s / 2) / h * s;\n\n let basicX: number;\n let basicY: number;\n\n switch (this._orientation) {\n case 1:\n basicX = rotatedX;\n basicY = rotatedY;\n break;\n case 3:\n basicX = 1 - rotatedX;\n basicY = 1 - rotatedY;\n break;\n case 6:\n basicX = 1 - rotatedY;\n basicY = rotatedX;\n break;\n case 8:\n basicX = rotatedY;\n basicY = 1 - rotatedX;\n break;\n default:\n basicX = rotatedX;\n basicY = rotatedY;\n break;\n }\n\n return [basicX, basicY];\n }\n\n /**\n * Determines if the gpano information indicates a full panorama.\n *\n * @returns {boolean} Value determining if the gpano information indicates\n * a full panorama.\n */\n private _fullPano(): boolean {\n return this.gpano != null &&\n this.gpano.CroppedAreaLeftPixels === 0 &&\n this.gpano.CroppedAreaTopPixels === 0 &&\n this.gpano.CroppedAreaImageWidthPixels === this.gpano.FullPanoWidthPixels &&\n this.gpano.CroppedAreaImageHeightPixels === this.gpano.FullPanoHeightPixels;\n }\n\n /**\n * Checks a value and returns it if it exists and is larger than 0.\n * Fallbacks if it is null.\n *\n * @param {number} value - Value to check.\n * @param {number} fallback - Value to fall back to.\n * @returns {number} The value or its fallback value if it is not defined or negative.\n */\n private _getValue(value: number, fallback: number): number {\n return value != null && value > 0 ? value : fallback;\n }\n\n /**\n * Creates the extrinsic camera matrix [ R | t ].\n *\n * @param {Array<number>} rotation - Rotation vector in angle axis representation.\n * @param {Array<number>} translation - Translation vector.\n * @returns {THREE.Matrix4} Extrisic camera matrix.\n */\n private _getRt(rotation: number[], translation: number[]): THREE.Matrix4 {\n let axis: THREE.Vector3 = new THREE.Vector3(rotation[0], rotation[1], rotation[2]);\n let angle: number = axis.length();\n if (angle > 0) {\n axis.normalize();\n }\n\n let rt: THREE.Matrix4 = new THREE.Matrix4();\n rt.makeRotationAxis(axis, angle);\n rt.setPosition(\n new THREE.Vector3(\n translation[0],\n translation[1],\n translation[2]));\n\n return rt;\n }\n\n /**\n * Calculates the scaled extrinsic camera matrix scale * [ R | t ].\n *\n * @param {THREE.Matrix4} rt - Extrisic camera matrix.\n * @param {number} scale - Scale factor.\n * @returns {THREE.Matrix4} Scaled extrisic camera matrix.\n */\n private _getSrt(rt: THREE.Matrix4, scale: number): THREE.Matrix4 {\n let srt: THREE.Matrix4 = rt.clone();\n let elements: Float32Array = srt.elements;\n\n elements[12] = scale * elements[12];\n elements[13] = scale * elements[13];\n elements[14] = scale * elements[14];\n\n srt.scale(new THREE.Vector3(scale, scale, scale));\n\n return srt;\n }\n\n private _getBasicRt(rt: THREE.Matrix4, orientation: number): THREE.Matrix4 {\n const axis: THREE.Vector3 = new THREE.Vector3(0, 0, 1);\n let angle: number = 0;\n\n switch (orientation) {\n case 3:\n angle = Math.PI;\n break;\n case 6:\n angle = Math.PI / 2;\n break;\n case 8:\n angle = 3 * Math.PI / 2;\n break;\n default:\n break;\n }\n\n return new THREE.Matrix4()\n .makeRotationAxis(axis, angle)\n .multiply(rt);\n }\n\n private _getRadialPeak(k1: number, k2: number): number {\n const a: number = 5 * k2;\n const b: number = 3 * k1;\n const c: number = 1;\n const d: number = b ** 2 - 4 * a * c;\n\n if (d < 0) {\n return undefined;\n }\n\n const root1: number = (-b - Math.sqrt(d)) / 2 / a;\n const root2: number = (-b + Math.sqrt(d)) / 2 / a;\n\n const minRoot: number = Math.min(root1, root2);\n const maxRoot: number = Math.max(root1, root2);\n\n return minRoot > 0 ?\n Math.sqrt(minRoot) :\n maxRoot > 0 ?\n Math.sqrt(maxRoot) :\n undefined;\n }\n\n /**\n * Calculate a transformation matrix from normalized coordinates for\n * texture map coordinates.\n *\n * @returns {THREE.Matrix4} Normalized coordinates to texture map\n * coordinates transformation matrix.\n */\n private _normalizedToTextureMatrix(): THREE.Matrix4 {\n const size: number = Math.max(this._width, this._height);\n\n const scaleX: number = this._orientation < 5 ? this._textureScale[0] : this._textureScale[1];\n const scaleY: number = this._orientation < 5 ? this._textureScale[1] : this._textureScale[0];\n\n const w: number = size / this._width * scaleX;\n const h: number = size / this._height * scaleY;\n\n switch (this._orientation) {\n case 1:\n return new THREE.Matrix4().set(w, 0, 0, 0.5, 0, -h, 0, 0.5, 0, 0, 1, 0, 0, 0, 0, 1);\n case 3:\n return new THREE.Matrix4().set(-w, 0, 0, 0.5, 0, h, 0, 0.5, 0, 0, 1, 0, 0, 0, 0, 1);\n case 6:\n return new THREE.Matrix4().set(0, -h, 0, 0.5, -w, 0, 0, 0.5, 0, 0, 1, 0, 0, 0, 0, 1);\n case 8:\n return new THREE.Matrix4().set(0, h, 0, 0.5, w, 0, 0, 0.5, 0, 0, 1, 0, 0, 0, 0, 1);\n default:\n return new THREE.Matrix4().set(w, 0, 0, 0.5, 0, -h, 0, 0.5, 0, 0, 1, 0, 0, 0, 0, 1);\n }\n }\n}\n",
+ "import * as THREE from \"three\";\n\nimport {Transform} from \"../Geo\";\n\n/**\n * @class ViewportCoords\n *\n * @classdesc Provides methods for calculating 2D coordinate conversions\n * as well as 3D projection and unprojection.\n *\n * Basic coordinates are 2D coordinates on the [0, 1] interval and\n * have the origin point, (0, 0), at the top left corner and the\n * maximum value, (1, 1), at the bottom right corner of the original\n * image.\n *\n * Viewport coordinates are 2D coordinates on the [-1, 1] interval and\n * have the origin point in the center. The bottom left corner point is\n * (-1, -1) and the top right corner point is (1, 1).\n *\n * Canvas coordiantes are 2D pixel coordinates on the [0, canvasWidth] and\n * [0, canvasHeight] intervals. The origin point (0, 0) is in the top left\n * corner and the maximum value is (canvasWidth, canvasHeight) is in the\n * bottom right corner.\n *\n * 3D coordinates are in the topocentric world reference frame.\n */\nexport class ViewportCoords {\n private _unprojectDepth: number = 200;\n\n /**\n * Convert basic coordinates to canvas coordinates.\n *\n * @description Transform origin and camera position needs to be the\n * equal for reliable return value.\n *\n * @param {number} basicX - Basic X coordinate.\n * @param {number} basicY - Basic Y coordinate.\n * @param {HTMLElement} container - The viewer container.\n * @param {Transform} transform - Transform of the node to unproject from.\n * @param {THREE.Camera} camera - Camera used in rendering.\n * @returns {Array<number>} 2D canvas coordinates.\n */\n public basicToCanvas(\n basicX: number,\n basicY: number,\n container: { offsetHeight: number, offsetWidth: number },\n transform: Transform,\n camera: THREE.Camera):\n number[] {\n\n const point3d: number[] = transform.unprojectBasic([basicX, basicY], this._unprojectDepth);\n const canvas: number[] = this.projectToCanvas(point3d, container, camera);\n\n return canvas;\n }\n\n /**\n * Convert basic coordinates to canvas coordinates safely. If 3D point is\n * behind camera null will be returned.\n *\n * @description Transform origin and camera position needs to be the\n * equal for reliable return value.\n *\n * @param {number} basicX - Basic X coordinate.\n * @param {number} basicY - Basic Y coordinate.\n * @param {HTMLElement} container - The viewer container.\n * @param {Transform} transform - Transform of the node to unproject from.\n * @param {THREE.Camera} camera - Camera used in rendering.\n * @returns {Array<number>} 2D canvas coordinates if the basic point represents a 3D point\n * in front of the camera, otherwise null.\n */\n public basicToCanvasSafe(\n basicX: number,\n basicY: number,\n container: { offsetHeight: number, offsetWidth: number },\n transform: Transform,\n camera: THREE.Camera):\n number[] {\n\n const viewport: number[] = this.basicToViewportSafe(basicX, basicY, transform, camera);\n\n if (viewport === null) {\n return null;\n }\n\n const canvas: number[] = this.viewportToCanvas(viewport[0], viewport[1], container);\n\n return canvas;\n }\n\n /**\n * Convert basic coordinates to viewport coordinates.\n *\n * @description Transform origin and camera position needs to be the\n * equal for reliable return value.\n *\n * @param {number} basicX - Basic X coordinate.\n * @param {number} basicY - Basic Y coordinate.\n * @param {Transform} transform - Transform of the node to unproject from.\n * @param {THREE.Camera} camera - Camera used in rendering.\n * @returns {Array<number>} 2D viewport coordinates.\n */\n public basicToViewport(\n basicX: number,\n basicY: number,\n transform: Transform,\n camera: THREE.Camera):\n number[] {\n\n const point3d: number[] = transform.unprojectBasic([basicX, basicY], this._unprojectDepth);\n const viewport: number[] = this.projectToViewport(point3d, camera);\n\n return viewport;\n }\n\n /**\n * Convert basic coordinates to viewport coordinates safely. If 3D point is\n * behind camera null will be returned.\n *\n * @description Transform origin and camera position needs to be the\n * equal for reliable return value.\n *\n * @param {number} basicX - Basic X coordinate.\n * @param {number} basicY - Basic Y coordinate.\n * @param {Transform} transform - Transform of the node to unproject from.\n * @param {THREE.Camera} camera - Camera used in rendering.\n * @returns {Array<number>} 2D viewport coordinates.\n */\n public basicToViewportSafe(\n basicX: number,\n basicY: number,\n transform: Transform,\n camera: THREE.Camera):\n number[] {\n\n const point3d: number[] = transform.unprojectBasic([basicX, basicY], this._unprojectDepth);\n const pointCamera: number[] = this.worldToCamera(point3d, camera);\n\n if (pointCamera[2] > 0) {\n return null;\n }\n\n const viewport: number[] = this.projectToViewport(point3d, camera);\n\n return viewport;\n }\n\n /**\n * Convert camera 3D coordinates to viewport coordinates.\n *\n * @param {number} pointCamera - 3D point in camera coordinate system.\n * @param {THREE.Camera} camera - Camera used in rendering.\n * @returns {Array<number>} 2D viewport coordinates.\n */\n public cameraToViewport(\n pointCamera: number[],\n camera: THREE.Camera):\n number[] {\n\n const viewport: THREE.Vector3 =\n new THREE.Vector3().fromArray(pointCamera)\n .applyMatrix4(camera.projectionMatrix);\n\n return [viewport.x, viewport.y];\n }\n\n /**\n * Get canvas pixel position from event.\n *\n * @param {Event} event - Event containing clientX and clientY properties.\n * @param {HTMLElement} element - HTML element.\n * @returns {Array<number>} 2D canvas coordinates.\n */\n public canvasPosition(event: { clientX: number, clientY: number }, element: HTMLElement): number[] {\n const clientRect: ClientRect = element.getBoundingClientRect();\n\n const canvasX: number = event.clientX - clientRect.left - element.clientLeft;\n const canvasY: number = event.clientY - clientRect.top - element.clientTop;\n\n return [canvasX, canvasY];\n }\n\n /**\n * Convert canvas coordinates to basic coordinates.\n *\n * @description Transform origin and camera position needs to be the\n * equal for reliable return value.\n *\n * @param {number} canvasX - Canvas X coordinate.\n * @param {number} canvasY - Canvas Y coordinate.\n * @param {HTMLElement} container - The viewer container.\n * @param {Transform} transform - Transform of the node to unproject from.\n * @param {THREE.Camera} camera - Camera used in rendering.\n * @returns {Array<number>} 2D basic coordinates.\n */\n public canvasToBasic(\n canvasX: number,\n canvasY: number,\n container: { offsetHeight: number, offsetWidth: number },\n transform: Transform,\n camera: THREE.Camera):\n number[] {\n\n const point3d: number[] =\n this.unprojectFromCanvas(canvasX, canvasY, container, camera)\n .toArray();\n\n const basic: number[] = transform.projectBasic(point3d);\n\n return basic;\n }\n\n /**\n * Convert canvas coordinates to viewport coordinates.\n *\n * @param {number} canvasX - Canvas X coordinate.\n * @param {number} canvasY - Canvas Y coordinate.\n * @param {HTMLElement} container - The viewer container.\n * @returns {Array<number>} 2D viewport coordinates.\n */\n public canvasToViewport(\n canvasX: number,\n canvasY: number,\n container: { offsetHeight: number, offsetWidth: number }):\n number[] {\n\n const [canvasWidth, canvasHeight]: number[] = this.containerToCanvas(container);\n const viewportX: number = 2 * canvasX / canvasWidth - 1;\n const viewportY: number = 1 - 2 * canvasY / canvasHeight;\n\n return [viewportX, viewportY];\n }\n\n /**\n * Determines the width and height of the container in canvas coordinates.\n *\n * @param {HTMLElement} container - The viewer container.\n * @returns {Array<number>} 2D canvas coordinates.\n */\n public containerToCanvas(container: { offsetHeight: number, offsetWidth: number }): number[] {\n return [container.offsetWidth, container.offsetHeight];\n }\n\n /**\n * Determine basic distances from image to canvas corners.\n *\n * @description Transform origin and camera position needs to be the\n * equal for reliable return value.\n *\n * Determines the smallest basic distance for every side of the canvas.\n *\n * @param {Transform} transform - Transform of the node to unproject from.\n * @param {THREE.Camera} camera - Camera used in rendering.\n * @returns {Array<number>} Array of basic distances as [top, right, bottom, left].\n */\n public getBasicDistances(\n transform: Transform,\n camera: THREE.Camera):\n number[] {\n\n const topLeftBasic: number[] = this.viewportToBasic(-1, 1, transform, camera);\n const topRightBasic: number[] = this.viewportToBasic(1, 1, transform, camera);\n const bottomRightBasic: number[] = this.viewportToBasic(1, -1, transform, camera);\n const bottomLeftBasic: number[] = this.viewportToBasic(-1, -1, transform, camera);\n\n let topBasicDistance: number = 0;\n let rightBasicDistance: number = 0;\n let bottomBasicDistance: number = 0;\n let leftBasicDistance: number = 0;\n\n if (topLeftBasic[1] < 0 && topRightBasic[1] < 0) {\n topBasicDistance = topLeftBasic[1] > topRightBasic[1] ?\n -topLeftBasic[1] :\n -topRightBasic[1];\n }\n\n if (topRightBasic[0] > 1 && bottomRightBasic[0] > 1) {\n rightBasicDistance = topRightBasic[0] < bottomRightBasic[0] ?\n topRightBasic[0] - 1 :\n bottomRightBasic[0] - 1;\n }\n\n if (bottomRightBasic[1] > 1 && bottomLeftBasic[1] > 1) {\n bottomBasicDistance = bottomRightBasic[1] < bottomLeftBasic[1] ?\n bottomRightBasic[1] - 1 :\n bottomLeftBasic[1] - 1;\n }\n\n if (bottomLeftBasic[0] < 0 && topLeftBasic[0] < 0) {\n leftBasicDistance = bottomLeftBasic[0] > topLeftBasic[0] ?\n -bottomLeftBasic[0] :\n -topLeftBasic[0];\n }\n\n return [topBasicDistance, rightBasicDistance, bottomBasicDistance, leftBasicDistance];\n }\n\n /**\n * Determine pixel distances from image to canvas corners.\n *\n * @description Transform origin and camera position needs to be the\n * equal for reliable return value.\n *\n * Determines the smallest pixel distance for every side of the canvas.\n *\n * @param {HTMLElement} container - The viewer container.\n * @param {Transform} transform - Transform of the node to unproject from.\n * @param {THREE.Camera} camera - Camera used in rendering.\n * @returns {Array<number>} Array of pixel distances as [top, right, bottom, left].\n */\n public getPixelDistances(\n container: { offsetHeight: number, offsetWidth: number },\n transform: Transform,\n camera: THREE.Camera):\n number[] {\n\n const topLeftBasic: number[] = this.viewportToBasic(-1, 1, transform, camera);\n const topRightBasic: number[] = this.viewportToBasic(1, 1, transform, camera);\n const bottomRightBasic: number[] = this.viewportToBasic(1, -1, transform, camera);\n const bottomLeftBasic: number[] = this.viewportToBasic(-1, -1, transform, camera);\n\n let topPixelDistance: number = 0;\n let rightPixelDistance: number = 0;\n let bottomPixelDistance: number = 0;\n let leftPixelDistance: number = 0;\n\n const [canvasWidth, canvasHeight]: number[] = this.containerToCanvas(container);\n\n if (topLeftBasic[1] < 0 && topRightBasic[1] < 0) {\n const basicX: number = topLeftBasic[1] > topRightBasic[1] ?\n topLeftBasic[0] :\n topRightBasic[0];\n\n const canvas: number[] = this.basicToCanvas(basicX, 0, container, transform, camera);\n\n topPixelDistance = canvas[1] > 0 ? canvas[1] : 0;\n }\n\n if (topRightBasic[0] > 1 && bottomRightBasic[0] > 1) {\n const basicY: number = topRightBasic[0] < bottomRightBasic[0] ?\n topRightBasic[1] :\n bottomRightBasic[1];\n\n const canvas: number[] = this.basicToCanvas(1, basicY, container, transform, camera);\n\n rightPixelDistance = canvas[0] < canvasWidth ? canvasWidth - canvas[0] : 0;\n }\n\n if (bottomRightBasic[1] > 1 && bottomLeftBasic[1] > 1) {\n const basicX: number = bottomRightBasic[1] < bottomLeftBasic[1] ?\n bottomRightBasic[0] :\n bottomLeftBasic[0];\n\n const canvas: number[] = this.basicToCanvas(basicX, 1, container, transform, camera);\n\n bottomPixelDistance = canvas[1] < canvasHeight ? canvasHeight - canvas[1] : 0;\n }\n\n if (bottomLeftBasic[0] < 0 && topLeftBasic[0] < 0) {\n const basicY: number = bottomLeftBasic[0] > topLeftBasic[0] ?\n bottomLeftBasic[1] :\n topLeftBasic[1];\n\n const canvas: number[] = this.basicToCanvas(0, basicY, container, transform, camera);\n\n leftPixelDistance = canvas[0] > 0 ? canvas[0] : 0;\n }\n\n return [topPixelDistance, rightPixelDistance, bottomPixelDistance, leftPixelDistance];\n }\n\n /**\n * Determine if an event occured inside an element.\n *\n * @param {Event} event - Event containing clientX and clientY properties.\n * @param {HTMLElement} element - HTML element.\n * @returns {boolean} Value indicating if the event occured inside the element or not.\n */\n public insideElement(event: { clientX: number, clientY: number }, element: HTMLElement): boolean {\n const clientRect: ClientRect = element.getBoundingClientRect();\n\n const minX: number = clientRect.left + element.clientLeft;\n const maxX: number = minX + element.clientWidth;\n const minY: number = clientRect.top + element.clientTop;\n const maxY: number = minY + element.clientHeight;\n\n return event.clientX > minX &&\n event.clientX < maxX &&\n event.clientY > minY &&\n event.clientY < maxY;\n }\n\n /**\n * Project 3D world coordinates to canvas coordinates.\n *\n * @param {Array<number>} point3D - 3D world coordinates.\n * @param {HTMLElement} container - The viewer container.\n * @param {THREE.Camera} camera - Camera used in rendering.\n * @returns {Array<number>} 2D canvas coordinates.\n */\n public projectToCanvas(\n point3d: number[],\n container: { offsetHeight: number, offsetWidth: number },\n camera: THREE.Camera):\n number[] {\n\n const viewport: number[] = this.projectToViewport(point3d, camera);\n const canvas: number[] =\n this.viewportToCanvas(viewport[0], viewport[1], container);\n\n return canvas;\n }\n\n /**\n * Project 3D world coordinates to viewport coordinates.\n *\n * @param {Array<number>} point3D - 3D world coordinates.\n * @param {THREE.Camera} camera - Camera used in rendering.\n * @returns {Array<number>} 2D viewport coordinates.\n */\n public projectToViewport(\n point3d: number[],\n camera: THREE.Camera):\n number[] {\n\n const viewport: THREE.Vector3 =\n new THREE.Vector3(point3d[0], point3d[1], point3d[2])\n .project(camera);\n\n return [viewport.x, viewport.y];\n }\n\n /**\n * Uproject canvas coordinates to 3D world coordinates.\n *\n * @param {number} canvasX - Canvas X coordinate.\n * @param {number} canvasY - Canvas Y coordinate.\n * @param {HTMLElement} container - The viewer container.\n * @param {THREE.Camera} camera - Camera used in rendering.\n * @returns {Array<number>} 3D world coordinates.\n */\n public unprojectFromCanvas(\n canvasX: number,\n canvasY: number,\n container: { offsetHeight: number, offsetWidth: number },\n camera: THREE.Camera):\n THREE.Vector3 {\n\n const viewport: number[] =\n this.canvasToViewport(canvasX, canvasY, container);\n\n const point3d: THREE.Vector3 =\n this.unprojectFromViewport(viewport[0], viewport[1], camera);\n\n return point3d;\n }\n\n /**\n * Unproject viewport coordinates to 3D world coordinates.\n *\n * @param {number} viewportX - Viewport X coordinate.\n * @param {number} viewportY - Viewport Y coordinate.\n * @param {THREE.Camera} camera - Camera used in rendering.\n * @returns {Array<number>} 3D world coordinates.\n */\n public unprojectFromViewport(\n viewportX: number,\n viewportY: number,\n camera: THREE.Camera):\n THREE.Vector3 {\n\n const point3d: THREE.Vector3 =\n new THREE.Vector3(viewportX, viewportY, 1)\n .unproject(camera);\n\n return point3d;\n }\n\n /**\n * Convert viewport coordinates to basic coordinates.\n *\n * @description Transform origin and camera position needs to be the\n * equal for reliable return value.\n *\n * @param {number} viewportX - Viewport X coordinate.\n * @param {number} viewportY - Viewport Y coordinate.\n * @param {Transform} transform - Transform of the node to unproject from.\n * @param {THREE.Camera} camera - Camera used in rendering.\n * @returns {Array<number>} 2D basic coordinates.\n */\n public viewportToBasic(\n viewportX: number,\n viewportY: number,\n transform: Transform,\n camera: THREE.Camera):\n number[] {\n\n const point3d: number[] =\n new THREE.Vector3(viewportX, viewportY, 1)\n .unproject(camera)\n .toArray();\n\n const basic: number[] = transform.projectBasic(point3d);\n\n return basic;\n }\n\n /**\n * Convert viewport coordinates to canvas coordinates.\n *\n * @param {number} viewportX - Viewport X coordinate.\n * @param {number} viewportY - Viewport Y coordinate.\n * @param {HTMLElement} container - The viewer container.\n * @returns {Array<number>} 2D canvas coordinates.\n */\n public viewportToCanvas(\n viewportX: number,\n viewportY: number,\n container: { offsetHeight: number, offsetWidth: number }):\n number[] {\n\n const [canvasWidth, canvasHeight]: number[] = this.containerToCanvas(container);\n const canvasX: number = canvasWidth * (viewportX + 1) / 2;\n const canvasY: number = -canvasHeight * (viewportY - 1) / 2;\n\n return [canvasX, canvasY];\n }\n\n /**\n * Convert 3D world coordinates to 3D camera coordinates.\n *\n * @param {number} point3D - 3D point in world coordinate system.\n * @param {THREE.Camera} camera - Camera used in rendering.\n * @returns {Array<number>} 3D camera coordinates.\n */\n public worldToCamera(\n point3d: number[],\n camera: THREE.Camera): number[] {\n\n const pointCamera: THREE.Vector3 =\n new THREE.Vector3(point3d[0], point3d[1], point3d[2])\n .applyMatrix4(camera.matrixWorldInverse);\n\n return pointCamera.toArray();\n }\n}\n\nexport default ViewportCoords;\n",
"import {\n FilterExpression,\n FilterOperation,\n FilterOperator,\n FilterValue,\n Node,\n} from \"../Graph\";\nimport {Func} from \"../Utils\";\n\nexport type FilterFunction = Func<Node, boolean>;\n\n/**\n * @class Filter\n *\n * @classdesc Represents a class for creating node filters. Implementation and\n * definitions based on https://github.com/mapbox/feature-filter.\n */\nexport class FilterCreator {\n /**\n * Create a filter from a filter expression.\n *\n * @description The following filters are supported:\n *\n * Comparison\n * `==`\n * `!=`\n * `<`\n * `<=`\n * `>`\n * `>=`\n *\n * Set membership\n * `in`\n * `!in`\n *\n * Combining\n * `all`\n *\n * @param {FilterExpression} filter - Comparison, set membership or combinding filter\n * expression.\n * @returns {FilterFunction} Function taking a node and returning a boolean that\n * indicates whether the node passed the test or not.\n */\n public createFilter(filter: FilterExpression): FilterFunction {\n return <FilterFunction>new Function(\"node\", \"return \" + this._compile(filter) + \";\");\n }\n\n private _compile(filter: FilterExpression): string {\n if (filter == null || filter.length <= 1) {\n return \"true\";\n }\n\n const operator: FilterOperator = <FilterOperator>filter[0];\n const operation: string =\n operator === \"==\" ? this._compileComparisonOp(\"===\", <string>filter[1], filter[2], false) :\n operator === \"!=\" ? this._compileComparisonOp(\"!==\", <string>filter[1], filter[2], false) :\n operator === \">\" ||\n operator === \">=\" ||\n operator === \"<\" ||\n operator === \"<=\" ? this._compileComparisonOp(operator, <string>filter[1], filter[2], true) :\n operator === \"in\" ?\n this._compileInOp<FilterValue>(<string>filter[1], <FilterValue[]>filter.slice(2)) :\n operator === \"!in\" ?\n this._compileNegation(\n this._compileInOp<FilterValue>(<string>filter[1], <FilterValue[]>filter.slice(2))) :\n operator === \"all\" ? this._compileLogicalOp(<FilterOperation[]>filter.slice(1), \"&&\") :\n \"true\";\n\n return \"(\" + operation + \")\";\n }\n\n private _compare<T>(a: T, b: T): number {\n return a < b ? -1 : a > b ? 1 : 0;\n }\n\n private _compileComparisonOp<T>(operator: string, property: string, value: T, checkType: boolean): string {\n const left: string = this._compilePropertyReference(property);\n const right: string = JSON.stringify(value);\n\n return (checkType ? \"typeof \" + left + \"===typeof \" + right + \"&&\" : \"\") + left + operator + right;\n }\n\n private _compileInOp<T>(property: string, values: T[]): string {\n const compare: (a: T, b: T) => number = this._compare;\n const left: string = JSON.stringify(values.sort(compare));\n const right: string = this._compilePropertyReference(property);\n\n return left + \".indexOf(\" + right + \")!==-1\";\n }\n\n private _compileLogicalOp(filters: FilterOperation[], operator: string): string {\n const compile: (filter: FilterExpression) => string = this._compile.bind(this);\n\n return filters.map<string>(compile).join(operator);\n }\n\n private _compileNegation(expression: string): string {\n return \"!(\" + expression + \")\";\n }\n\n private _compilePropertyReference(property: string): string {\n return \"node[\" + JSON.stringify(property) + \"]\";\n }\n}\n\nexport default FilterCreator;\n",
- "/// <reference path=\"../../typings/index.d.ts\" />\n\nimport * as rbush from \"rbush\";\n\nimport {Observable} from \"rxjs/Observable\";\nimport {Subject} from \"rxjs/Subject\";\n\nimport \"rxjs/add/observable/from\";\n\nimport \"rxjs/add/operator/catch\";\nimport \"rxjs/add/operator/do\";\nimport \"rxjs/add/operator/finally\";\nimport \"rxjs/add/operator/map\";\nimport \"rxjs/add/operator/publish\";\n\nimport {\n APIv3,\n ICoreNode,\n IFillNode,\n IFullNode,\n ILatLon,\n ISequence,\n} from \"../API\";\nimport {\n IEdge,\n IPotentialEdge,\n EdgeCalculator,\n} from \"../Edge\";\nimport {GraphMapillaryError} from \"../Error\";\nimport {\n FilterCreator,\n FilterExpression,\n FilterFunction,\n IGraphConfiguration,\n Node,\n NodeCache,\n Sequence,\n GraphCalculator,\n} from \"../Graph\";\n\ntype NodeIndexItem = {\n lat: number;\n lon: number;\n node: Node;\n};\n\ntype NodeTiles = {\n cache: string[];\n caching: string[];\n};\n\ntype SpatialArea = {\n all: { [key: string]: Node };\n cacheKeys: string[];\n cacheNodes: { [key: string]: Node };\n};\n\ntype NodeAccess = {\n node: Node;\n accessed: number;\n};\n\ntype TileAccess = {\n nodes: Node[];\n accessed: number;\n};\n\ntype SequenceAccess = {\n sequence: Sequence;\n accessed: number;\n};\n\n/**\n * @class Graph\n *\n * @classdesc Represents a graph of nodes with edges.\n */\nexport class Graph {\n private _apiV3: APIv3;\n\n /**\n * Nodes that have initialized cache with a timestamp of last access.\n */\n private _cachedNodes: { [key: string]: NodeAccess };\n\n /**\n * Nodes for which the required tiles are cached.\n */\n private _cachedNodeTiles: { [key: string]: boolean };\n\n /**\n * Nodes for which the spatial edges are cached.\n */\n private _cachedSpatialEdges: { [key: string]: Node };\n\n /**\n * Cached tiles with a timestamp of last access.\n */\n private _cachedTiles: { [h: string]: TileAccess };\n\n /**\n * Nodes for which fill properties are being retreived.\n */\n private _cachingFill$: { [key: string]: Observable<Graph> };\n\n /**\n * Nodes for which full properties are being retrieved.\n */\n private _cachingFull$: { [key: string]: Observable<Graph> };\n\n /**\n * Sequences that are being retrieved.\n */\n private _cachingSequences$: { [sequenceKey: string]: Observable<Graph> };\n\n /**\n * Nodes for which the spatial area fill properties are being retrieved.\n */\n private _cachingSpatialArea$: { [key: string]: Observable<Graph>[] };\n\n /**\n * Tiles that are being retrieved.\n */\n private _cachingTiles$: { [h: string]: Observable<Graph> };\n\n private _changed$: Subject<Graph>;\n\n private _defaultAlt: number;\n private _edgeCalculator: EdgeCalculator;\n private _filter: FilterFunction;\n private _filterCreator: FilterCreator;\n private _graphCalculator: GraphCalculator;\n private _configuration: IGraphConfiguration;\n\n /**\n * All nodes in the graph.\n */\n private _nodes: { [key: string]: Node };\n\n /**\n * Contains all nodes in the graph. Used for fast spatial lookups.\n */\n private _nodeIndex: rbush.RBush<NodeIndexItem>;\n\n /**\n * All node index items sorted in tiles for easy uncache.\n */\n private _nodeIndexTiles: { [h: string]: NodeIndexItem[] };\n\n /**\n * Node to tile dictionary for easy tile access updates.\n */\n private _nodeToTile: { [key: string]: string };\n\n /**\n * Nodes retrieved before tiles, stored on tile level.\n */\n private _preStored: { [h: string]: { [key: string]: Node }; };\n\n /**\n * Tiles required for a node to retrive spatial area.\n */\n private _requiredNodeTiles: { [key: string]: NodeTiles };\n\n /**\n * Other nodes required for node to calculate spatial edges.\n */\n private _requiredSpatialArea: { [key: string]: SpatialArea };\n\n /**\n * All sequences in graph with a timestamp of last access.\n */\n private _sequences: { [skey: string]: SequenceAccess };\n\n private _tilePrecision: number;\n private _tileThreshold: number;\n\n /**\n * Create a new graph instance.\n *\n * @param {APIv3} [apiV3] - API instance for retrieving data.\n * @param {rbush.RBush<NodeIndexItem>} [nodeIndex] - Node index for fast spatial retreival.\n * @param {GraphCalculator} [graphCalculator] - Instance for graph calculations.\n * @param {EdgeCalculator} [edgeCalculator] - Instance for edge calculations.\n * @param {FilterCreator} [filterCreator] - Instance for filter creation.\n * @param {IGraphConfiguration} [configuration] - Configuration struct.\n */\n constructor(\n apiV3: APIv3,\n nodeIndex?: rbush.RBush<NodeIndexItem>,\n graphCalculator?: GraphCalculator,\n edgeCalculator?: EdgeCalculator,\n filterCreator?: FilterCreator,\n configuration?: IGraphConfiguration) {\n\n this._apiV3 = apiV3;\n\n this._cachedNodes = {};\n this._cachedNodeTiles = {};\n this._cachedSpatialEdges = {};\n this._cachedTiles = {};\n\n this._cachingFill$ = {};\n this._cachingFull$ = {};\n this._cachingSequences$ = {};\n this._cachingSpatialArea$ = {};\n this._cachingTiles$ = {};\n\n this._changed$ = new Subject<Graph>();\n\n this._defaultAlt = 2;\n this._edgeCalculator = edgeCalculator != null ? edgeCalculator : new EdgeCalculator();\n this._filterCreator = filterCreator != null ? filterCreator : new FilterCreator();\n this._filter = this._filterCreator.createFilter(undefined);\n this._graphCalculator = graphCalculator != null ? graphCalculator : new GraphCalculator();\n this._configuration = configuration != null ?\n configuration :\n {\n maxSequences: 50,\n maxUnusedNodes: 100,\n maxUnusedTiles: 20,\n };\n\n this._nodes = {};\n this._nodeIndex = nodeIndex != null ? nodeIndex : rbush<NodeIndexItem>(16, [\".lat\", \".lon\", \".lat\", \".lon\"]);\n this._nodeIndexTiles = {};\n this._nodeToTile = {};\n\n this._preStored = {};\n\n this._requiredNodeTiles = {};\n this._requiredSpatialArea = {};\n\n this._sequences = {};\n\n this._tilePrecision = 7;\n this._tileThreshold = 20;\n }\n\n /**\n * Get changed$.\n *\n * @returns {Observable<Graph>} Observable emitting\n * the graph every time it has changed.\n */\n public get changed$(): Observable<Graph> {\n return this._changed$;\n }\n\n /**\n * Retrieve and cache node fill properties.\n *\n * @param {string} key - Key of node to fill.\n * @returns {Observable<Graph>} Observable emitting the graph\n * when the node has been updated.\n * @throws {GraphMapillaryError} When the operation is not valid on the\n * current graph.\n */\n public cacheFill$(key: string): Observable<Graph> {\n if (key in this._cachingFull$) {\n throw new GraphMapillaryError(`Cannot fill node while caching full (${key}).`);\n }\n\n if (!this.hasNode(key)) {\n throw new GraphMapillaryError(`Cannot fill node that does not exist in graph (${key}).`);\n }\n\n if (key in this._cachingFill$) {\n return this._cachingFill$[key];\n }\n\n let node: Node = this.getNode(key);\n if (node.full) {\n throw new GraphMapillaryError(`Cannot fill node that is already full (${key}).`);\n }\n\n this._cachingFill$[key] = this._apiV3.imageByKeyFill$([key])\n .do(\n (imageByKeyFill: { [key: string]: IFillNode }): void => {\n if (!node.full) {\n this._makeFull(node, imageByKeyFill[key]);\n }\n\n delete this._cachingFill$[key];\n })\n .map(\n (imageByKeyFill: { [key: string]: IFillNode }): Graph => {\n return this;\n })\n .finally(\n (): void => {\n if (key in this._cachingFill$) {\n delete this._cachingFill$[key];\n }\n\n this._changed$.next(this);\n })\n .publish()\n .refCount();\n\n return this._cachingFill$[key];\n }\n\n /**\n * Retrieve and cache full node properties.\n *\n * @param {string} key - Key of node to fill.\n * @returns {Observable<Graph>} Observable emitting the graph\n * when the node has been updated.\n * @throws {GraphMapillaryError} When the operation is not valid on the\n * current graph.\n */\n public cacheFull$(key: string): Observable<Graph> {\n if (key in this._cachingFull$) {\n return this._cachingFull$[key];\n }\n\n if (this.hasNode(key)) {\n throw new GraphMapillaryError(`Cannot cache full node that already exist in graph (${key}).`);\n }\n\n this._cachingFull$[key] = this._apiV3.imageByKeyFull$([key])\n .do(\n (imageByKeyFull: { [key: string]: IFullNode }): void => {\n let fn: IFullNode = imageByKeyFull[key];\n\n if (this.hasNode(key)) {\n let node: Node = this.getNode(key);\n\n if (!node.full) {\n this._makeFull(node, fn);\n }\n } else {\n if (fn.sequence == null || fn.sequence.key == null) {\n throw new GraphMapillaryError(`Node has no sequence (${key}).`);\n }\n\n let node: Node = new Node(fn);\n this._makeFull(node, fn);\n\n let h: string = this._graphCalculator.encodeH(node.originalLatLon, this._tilePrecision);\n this._preStore(h, node);\n this._setNode(node);\n\n delete this._cachingFull$[key];\n }\n })\n .map(\n (imageByKeyFull: { [key: string]: IFullNode }): Graph => {\n return this;\n })\n .finally(\n (): void => {\n if (key in this._cachingFull$) {\n delete this._cachingFull$[key];\n }\n\n this._changed$.next(this);\n })\n .publish()\n .refCount();\n\n return this._cachingFull$[key];\n }\n\n /**\n * Retrieve and cache a node sequence.\n *\n * @param {string} key - Key of node for which to retrieve sequence.\n * @returns {Observable<Graph>} Observable emitting the graph\n * when the sequence has been retrieved.\n * @throws {GraphMapillaryError} When the operation is not valid on the\n * current graph.\n */\n public cacheNodeSequence$(key: string): Observable<Graph> {\n if (!this.hasNode(key)) {\n throw new GraphMapillaryError(`Cannot cache sequence edges of node that does not exist in graph (${key}).`);\n }\n\n let node: Node = this.getNode(key);\n if (node.sequenceKey in this._sequences) {\n throw new GraphMapillaryError(`Sequence already cached (${key}), (${node.sequenceKey}).`);\n }\n\n return this._cacheSequence$(node.sequenceKey);\n }\n\n /**\n * Retrieve and cache a sequence.\n *\n * @param {string} sequenceKey - Key of sequence to cache.\n * @returns {Observable<Graph>} Observable emitting the graph\n * when the sequence has been retrieved.\n * @throws {GraphMapillaryError} When the operation is not valid on the\n * current graph.\n */\n public cacheSequence$(sequenceKey: string): Observable<Graph> {\n if (sequenceKey in this._sequences) {\n throw new GraphMapillaryError(`Sequence already cached (${sequenceKey})`);\n }\n\n return this._cacheSequence$(sequenceKey);\n }\n\n /**\n * Cache sequence edges for a node.\n *\n * @param {string} key - Key of node.\n * @throws {GraphMapillaryError} When the operation is not valid on the\n * current graph.\n */\n public cacheSequenceEdges(key: string): void {\n let node: Node = this.getNode(key);\n\n if (!(node.sequenceKey in this._sequences)) {\n throw new GraphMapillaryError(`Sequence is not cached (${key}), (${node.sequenceKey})`);\n }\n\n let sequence: Sequence = this._sequences[node.sequenceKey].sequence;\n let edges: IEdge[] = this._edgeCalculator.computeSequenceEdges(node, sequence);\n\n node.cacheSequenceEdges(edges);\n }\n\n /**\n * Retrieve and cache full nodes for a node spatial area.\n *\n * @param {string} key - Key of node for which to retrieve sequence.\n * @returns {Observable<Graph>} Observable emitting the graph\n * when the nodes in the spatial area has been made full.\n * @throws {GraphMapillaryError} When the operation is not valid on the\n * current graph.\n */\n public cacheSpatialArea$(key: string): Observable<Graph>[] {\n if (!this.hasNode(key)) {\n throw new GraphMapillaryError(`Cannot cache spatial area of node that does not exist in graph (${key}).`);\n }\n\n if (key in this._cachedSpatialEdges) {\n throw new GraphMapillaryError(`Node already spatially cached (${key}).`);\n }\n\n if (!(key in this._requiredSpatialArea)) {\n throw new GraphMapillaryError(`Spatial area not determined (${key}).`);\n }\n\n let spatialArea: SpatialArea = this._requiredSpatialArea[key];\n if (Object.keys(spatialArea.cacheNodes).length === 0) {\n throw new GraphMapillaryError(`Spatial nodes already cached (${key}).`);\n }\n\n if (key in this._cachingSpatialArea$) {\n return this._cachingSpatialArea$[key];\n }\n\n let batches: string[][] = [];\n while (spatialArea.cacheKeys.length > 0) {\n batches.push(spatialArea.cacheKeys.splice(0, 200));\n }\n\n let batchesToCache: number = batches.length;\n let spatialNodes$: Observable<Graph>[] = [];\n\n for (let batch of batches) {\n let spatialNodeBatch$: Observable<Graph> = this._apiV3.imageByKeyFill$(batch)\n .do(\n (imageByKeyFill: { [key: string]: IFillNode }): void => {\n for (let fillKey in imageByKeyFill) {\n if (!imageByKeyFill.hasOwnProperty(fillKey)) {\n continue;\n }\n\n let spatialNode: Node = spatialArea.cacheNodes[fillKey];\n if (spatialNode.full) {\n delete spatialArea.cacheNodes[fillKey];\n continue;\n }\n\n let fillNode: IFillNode = imageByKeyFill[fillKey];\n this._makeFull(spatialNode, fillNode);\n\n delete spatialArea.cacheNodes[fillKey];\n }\n\n if (--batchesToCache === 0) {\n delete this._cachingSpatialArea$[key];\n }\n })\n .map(\n (imageByKeyFill: { [key: string]: IFillNode }): Graph => {\n return this;\n })\n .catch(\n (error: Error): Observable<Graph> => {\n for (let batchKey of batch) {\n if (batchKey in spatialArea.all) {\n delete spatialArea.all[batchKey];\n }\n\n if (batchKey in spatialArea.cacheNodes) {\n delete spatialArea.cacheNodes[batchKey];\n }\n }\n\n if (--batchesToCache === 0) {\n delete this._cachingSpatialArea$[key];\n }\n\n throw error;\n })\n .finally(\n (): void => {\n if (Object.keys(spatialArea.cacheNodes).length === 0) {\n this._changed$.next(this);\n }\n })\n .publish()\n .refCount();\n\n spatialNodes$.push(spatialNodeBatch$);\n }\n\n this._cachingSpatialArea$[key] = spatialNodes$;\n\n return spatialNodes$;\n }\n\n /**\n * Cache spatial edges for a node.\n *\n * @param {string} key - Key of node.\n * @throws {GraphMapillaryError} When the operation is not valid on the\n * current graph.\n */\n public cacheSpatialEdges(key: string): void {\n if (key in this._cachedSpatialEdges) {\n throw new GraphMapillaryError(`Spatial edges already cached (${key}).`);\n }\n\n let node: Node = this.getNode(key);\n let sequence: Sequence = this._sequences[node.sequenceKey].sequence;\n\n let fallbackKeys: string[] = [];\n let prevKey: string = sequence.findPrevKey(node.key);\n if (prevKey != null) {\n fallbackKeys.push(prevKey);\n }\n\n let nextKey: string = sequence.findNextKey(node.key);\n if (nextKey != null) {\n fallbackKeys.push(nextKey);\n }\n\n let allSpatialNodes: { [key: string]: Node } = this._requiredSpatialArea[key].all;\n let potentialNodes: Node[] = [];\n let filter: FilterFunction = this._filter;\n for (let spatialNodeKey in allSpatialNodes) {\n if (!allSpatialNodes.hasOwnProperty(spatialNodeKey)) {\n continue;\n }\n\n let spatialNode: Node = allSpatialNodes[spatialNodeKey];\n\n if (filter(spatialNode)) {\n potentialNodes.push(spatialNode);\n }\n }\n\n let potentialEdges: IPotentialEdge[] =\n this._edgeCalculator.getPotentialEdges(node, potentialNodes, fallbackKeys);\n\n let edges: IEdge[] =\n this._edgeCalculator.computeStepEdges(\n node,\n potentialEdges,\n prevKey,\n nextKey);\n\n edges = edges.concat(this._edgeCalculator.computeTurnEdges(node, potentialEdges));\n edges = edges.concat(this._edgeCalculator.computePanoEdges(node, potentialEdges));\n edges = edges.concat(this._edgeCalculator.computePerspectiveToPanoEdges(node, potentialEdges));\n edges = edges.concat(this._edgeCalculator.computeSimilarEdges(node, potentialEdges));\n\n node.cacheSpatialEdges(edges);\n\n this._cachedSpatialEdges[key] = node;\n delete this._requiredSpatialArea[key];\n delete this._cachedNodeTiles[key];\n }\n\n /**\n * Retrieve and cache geohash tiles for a node.\n *\n * @param {string} key - Key of node for which to retrieve tiles.\n * @returns {Observable<Graph>} Observable emitting the graph\n * when the tiles required for the node has been cached.\n * @throws {GraphMapillaryError} When the operation is not valid on the\n * current graph.\n */\n public cacheTiles$(key: string): Observable<Graph>[] {\n if (key in this._cachedNodeTiles) {\n throw new GraphMapillaryError(`Tiles already cached (${key}).`);\n }\n\n if (key in this._cachedSpatialEdges) {\n throw new GraphMapillaryError(`Spatial edges already cached so tiles considered cached (${key}).`);\n }\n\n if (!(key in this._requiredNodeTiles)) {\n throw new GraphMapillaryError(`Tiles have not been determined (${key}).`);\n }\n\n let nodeTiles: NodeTiles = this._requiredNodeTiles[key];\n if (nodeTiles.cache.length === 0 &&\n nodeTiles.caching.length === 0) {\n throw new GraphMapillaryError(`Tiles already cached (${key}).`);\n }\n\n if (!this.hasNode(key)) {\n throw new GraphMapillaryError(`Cannot cache tiles of node that does not exist in graph (${key}).`);\n }\n\n let hs: string[] = nodeTiles.cache.slice();\n nodeTiles.caching = this._requiredNodeTiles[key].caching.concat(hs);\n nodeTiles.cache = [];\n\n let cacheTiles$: Observable<Graph>[] = [];\n\n for (let h of nodeTiles.caching) {\n let cacheTile$: Observable<Graph> = null;\n if (h in this._cachingTiles$) {\n cacheTile$ = this._cachingTiles$[h];\n } else {\n cacheTile$ = this._apiV3.imagesByH$([h])\n .do(\n (imagesByH: { [key: string]: { [index: string]: ICoreNode } }): void => {\n let coreNodes: { [index: string]: ICoreNode } = imagesByH[h];\n\n if (h in this._cachedTiles) {\n return;\n }\n\n this._nodeIndexTiles[h] = [];\n this._cachedTiles[h] = { accessed: new Date().getTime(), nodes: [] };\n let hCache: Node[] = this._cachedTiles[h].nodes;\n let preStored: { [key: string]: Node } = this._removeFromPreStore(h);\n\n for (let index in coreNodes) {\n if (!coreNodes.hasOwnProperty(index)) {\n continue;\n }\n\n let coreNode: ICoreNode = coreNodes[index];\n\n if (coreNode == null) {\n break;\n }\n\n if (coreNode.sequence == null ||\n coreNode.sequence.key == null) {\n console.warn(`Sequence missing, discarding (${coreNode.key})`);\n\n continue;\n }\n\n if (preStored != null && coreNode.key in preStored) {\n let node: Node = preStored[coreNode.key];\n delete preStored[coreNode.key];\n\n hCache.push(node);\n\n let nodeIndexItem: NodeIndexItem = {\n lat: node.latLon.lat,\n lon: node.latLon.lon,\n node: node,\n };\n\n this._nodeIndex.insert(nodeIndexItem);\n this._nodeIndexTiles[h].push(nodeIndexItem);\n this._nodeToTile[node.key] = h;\n\n continue;\n }\n\n let node: Node = new Node(coreNode);\n\n hCache.push(node);\n\n let nodeIndexItem: NodeIndexItem = {\n lat: node.latLon.lat,\n lon: node.latLon.lon,\n node: node,\n };\n\n this._nodeIndex.insert(nodeIndexItem);\n this._nodeIndexTiles[h].push(nodeIndexItem);\n this._nodeToTile[node.key] = h;\n\n this._setNode(node);\n }\n\n delete this._cachingTiles$[h];\n })\n .map(\n (imagesByH: { [key: string]: { [index: string]: ICoreNode } }): Graph => {\n return this;\n })\n .catch(\n (error: Error): Observable<Graph> => {\n delete this._cachingTiles$[h];\n\n throw error;\n })\n .publish()\n .refCount();\n\n this._cachingTiles$[h] = cacheTile$;\n }\n\n cacheTiles$.push(\n cacheTile$\n .do(\n (graph: Graph): void => {\n let index: number = nodeTiles.caching.indexOf(h);\n if (index > -1) {\n nodeTiles.caching.splice(index, 1);\n }\n\n if (nodeTiles.caching.length === 0 &&\n nodeTiles.cache.length === 0) {\n delete this._requiredNodeTiles[key];\n\n this._cachedNodeTiles[key] = true;\n }\n })\n .catch(\n (error: Error): Observable<Graph> => {\n let index: number = nodeTiles.caching.indexOf(h);\n if (index > -1) {\n nodeTiles.caching.splice(index, 1);\n }\n\n if (nodeTiles.caching.length === 0 &&\n nodeTiles.cache.length === 0) {\n delete this._requiredNodeTiles[key];\n\n this._cachedNodeTiles[key] = true;\n }\n\n throw error;\n })\n .finally(\n (): void => {\n this._changed$.next(this);\n })\n .publish()\n .refCount());\n }\n\n return cacheTiles$;\n }\n\n /**\n * Initialize the cache for a node.\n *\n * @param {string} key - Key of node.\n * @throws {GraphMapillaryError} When the operation is not valid on the\n * current graph.\n */\n public initializeCache(key: string): void {\n if (key in this._cachedNodes) {\n throw new GraphMapillaryError(`Node already in cache (${key}).`);\n }\n\n let node: Node = this.getNode(key);\n node.initializeCache(new NodeCache());\n\n let accessed: number = new Date().getTime();\n this._cachedNodes[key] = { accessed: accessed, node: node };\n\n this._updateCachedTileAccess(key, accessed);\n }\n\n /**\n * Get a value indicating if the graph is fill caching a node.\n *\n * @param {string} key - Key of node.\n * @returns {boolean} Value indicating if the node is being fill cached.\n */\n public isCachingFill(key: string): boolean {\n return key in this._cachingFill$;\n }\n\n /**\n * Get a value indicating if the graph is fully caching a node.\n *\n * @param {string} key - Key of node.\n * @returns {boolean} Value indicating if the node is being fully cached.\n */\n public isCachingFull(key: string): boolean {\n return key in this._cachingFull$;\n }\n\n /**\n * Get a value indicating if the graph is caching a sequence of a node.\n *\n * @param {string} key - Key of node.\n * @returns {boolean} Value indicating if the sequence of a node is\n * being cached.\n */\n public isCachingNodeSequence(key: string): boolean {\n let node: Node = this.getNode(key);\n\n return node.sequenceKey in this._cachingSequences$;\n }\n\n /**\n * Get a value indicating if the graph is caching a sequence.\n *\n * @param {string} sequenceKey - Key of sequence.\n * @returns {boolean} Value indicating if the sequence is\n * being cached.\n */\n public isCachingSequence(sequenceKey: string): boolean {\n return sequenceKey in this._cachingSequences$;\n }\n\n /**\n * Get a value indicating if the graph is caching the tiles\n * required for calculating spatial edges of a node.\n *\n * @param {string} key - Key of node.\n * @returns {boolean} Value indicating if the tiles of\n * a node are being cached.\n */\n public isCachingTiles(key: string): boolean {\n return key in this._requiredNodeTiles &&\n this._requiredNodeTiles[key].cache.length === 0 &&\n this._requiredNodeTiles[key].caching.length > 0;\n }\n\n /**\n * Get a value indicating if the cache has been initialized\n * for a node.\n *\n * @param {string} key - Key of node.\n * @returns {boolean} Value indicating if the cache has been\n * initialized for a node.\n */\n public hasInitializedCache(key: string): boolean {\n return key in this._cachedNodes;\n }\n\n /**\n * Get a value indicating if a node exist in the graph.\n *\n * @param {string} key - Key of node.\n * @returns {boolean} Value indicating if a node exist in the graph.\n */\n public hasNode(key: string): boolean {\n let accessed: number = new Date().getTime();\n\n this._updateCachedNodeAccess(key, accessed);\n this._updateCachedTileAccess(key, accessed);\n\n return key in this._nodes;\n }\n\n /**\n * Get a value indicating if a node sequence exist in the graph.\n *\n * @param {string} key - Key of node.\n * @returns {boolean} Value indicating if a node sequence exist\n * in the graph.\n */\n public hasNodeSequence(key: string): boolean {\n let node: Node = this.getNode(key);\n let sequenceKey: string = node.sequenceKey;\n\n let hasNodeSequence: boolean = sequenceKey in this._sequences;\n\n if (hasNodeSequence) {\n this._sequences[sequenceKey].accessed = new Date().getTime();\n }\n\n return hasNodeSequence;\n }\n\n /**\n * Get a value indicating if a sequence exist in the graph.\n *\n * @param {string} sequenceKey - Key of sequence.\n * @returns {boolean} Value indicating if a sequence exist\n * in the graph.\n */\n public hasSequence(sequenceKey: string): boolean {\n let hasSequence: boolean = sequenceKey in this._sequences;\n\n if (hasSequence) {\n this._sequences[sequenceKey].accessed = new Date().getTime();\n }\n\n return hasSequence;\n }\n\n /**\n * Get a value indicating if the graph has fully cached\n * all nodes in the spatial area of a node.\n *\n * @param {string} key - Key of node.\n * @returns {boolean} Value indicating if the spatial area\n * of a node has been cached.\n */\n public hasSpatialArea(key: string): boolean {\n if (!this.hasNode(key)) {\n throw new GraphMapillaryError(`Spatial area nodes cannot be determined if node not in graph (${key}).`);\n }\n\n if (key in this._cachedSpatialEdges) {\n return true;\n }\n\n if (key in this._requiredSpatialArea) {\n return Object.keys(this._requiredSpatialArea[key].cacheNodes).length === 0;\n }\n\n let node: Node = this.getNode(key);\n let bbox: [ILatLon, ILatLon] = this._graphCalculator.boundingBoxCorners(node.latLon, this._tileThreshold);\n\n let spatialItems: NodeIndexItem[] = this._nodeIndex.search({\n maxX: bbox[1].lat,\n maxY: bbox[1].lon,\n minX: bbox[0].lat,\n minY: bbox[0].lon,\n });\n\n let spatialNodes: SpatialArea = {\n all: {},\n cacheKeys: [],\n cacheNodes: {},\n };\n\n for (let spatialItem of spatialItems) {\n spatialNodes.all[spatialItem.node.key] = spatialItem.node;\n\n if (!spatialItem.node.full) {\n spatialNodes.cacheKeys.push(spatialItem.node.key);\n spatialNodes.cacheNodes[spatialItem.node.key] = spatialItem.node;\n }\n }\n\n this._requiredSpatialArea[key] = spatialNodes;\n\n return spatialNodes.cacheKeys.length === 0;\n }\n\n /**\n * Get a value indicating if the graph has a tiles required\n * for a node.\n *\n * @param {string} key - Key of node.\n * @returns {boolean} Value indicating if the the tiles required\n * by a node has been cached.\n */\n public hasTiles(key: string): boolean {\n if (key in this._cachedNodeTiles) {\n return true;\n }\n\n if (key in this._cachedSpatialEdges) {\n return true;\n }\n\n if (!this.hasNode(key)) {\n throw new GraphMapillaryError(`Node does not exist in graph (${key}).`);\n }\n\n let nodeTiles: NodeTiles = { cache: [], caching: [] };\n\n if (!(key in this._requiredNodeTiles)) {\n let node: Node = this.getNode(key);\n nodeTiles.cache = this._graphCalculator\n .encodeHs(\n node.latLon,\n this._tilePrecision,\n this._tileThreshold)\n .filter(\n (h: string): boolean => {\n return !(h in this._cachedTiles);\n });\n\n if (nodeTiles.cache.length > 0) {\n this._requiredNodeTiles[key] = nodeTiles;\n }\n } else {\n nodeTiles = this._requiredNodeTiles[key];\n }\n\n return nodeTiles.cache.length === 0 && nodeTiles.caching.length === 0;\n }\n\n /**\n * Get a node.\n *\n * @param {string} key - Key of node.\n * @returns {Node} Retrieved node.\n */\n public getNode(key: string): Node {\n let accessed: number = new Date().getTime();\n\n this._updateCachedNodeAccess(key, accessed);\n this._updateCachedTileAccess(key, accessed);\n\n return this._nodes[key];\n }\n\n /**\n * Get a sequence.\n *\n * @param {string} sequenceKey - Key of sequence.\n * @returns {Node} Retrieved sequence.\n */\n public getSequence(sequenceKey: string): Sequence {\n let sequenceAccess: SequenceAccess = this._sequences[sequenceKey];\n sequenceAccess.accessed = new Date().getTime();\n\n return sequenceAccess.sequence;\n }\n\n /**\n * Reset all spatial edges of the graph nodes.\n */\n public resetSpatialEdges(): void {\n let cachedKeys: string[] = Object.keys(this._cachedSpatialEdges);\n\n for (let cachedKey of cachedKeys) {\n let node: Node = this._cachedSpatialEdges[cachedKey];\n node.resetSpatialEdges();\n\n delete this._cachedSpatialEdges[cachedKey];\n }\n }\n\n /**\n * Reset the complete graph but keep the nodes corresponding\n * to the supplied keys. All other nodes will be disposed.\n *\n * @param {Array<string>} keepKeys - Keys for nodes to keep\n * in graph after reset.\n */\n public reset(keepKeys: string[]): void {\n const nodes: Node[] = [];\n for (const key of keepKeys) {\n if (!this.hasNode(key)) {\n throw new Error(`Node does not exist ${key}`);\n }\n\n const node: Node = this.getNode(key);\n node.resetSequenceEdges();\n node.resetSpatialEdges();\n nodes.push(node);\n }\n\n for (let cachedKey of Object.keys(this._cachedNodes)) {\n if (keepKeys.indexOf(cachedKey) !== -1) {\n continue;\n }\n\n this._cachedNodes[cachedKey].node.dispose();\n delete this._cachedNodes[cachedKey];\n }\n\n this._cachedNodeTiles = {};\n this._cachedSpatialEdges = {};\n this._cachedTiles = {};\n\n this._cachingFill$ = {};\n this._cachingFull$ = {};\n this._cachingSequences$ = {};\n this._cachingSpatialArea$ = {};\n this._cachingTiles$ = {};\n\n this._nodes = {};\n this._nodeToTile = {};\n\n this._preStored = {};\n\n for (const node of nodes) {\n this._nodes[node.key] = node;\n\n const h: string = this._graphCalculator.encodeH(node.originalLatLon, this._tilePrecision);\n this._preStore(h, node);\n }\n\n this._requiredNodeTiles = {};\n this._requiredSpatialArea = {};\n\n this._sequences = {};\n\n this._nodeIndexTiles = {};\n this._nodeIndex.clear();\n }\n\n /**\n * Set the spatial node filter.\n *\n * @param {FilterExpression} filter - Filter expression to be applied\n * when calculating spatial edges.\n */\n public setFilter(filter: FilterExpression): void {\n this._filter = this._filterCreator.createFilter(filter);\n }\n\n /**\n * Uncache the graph according to the graph configuration.\n *\n * @description Uncaches unused tiles, unused nodes and\n * sequences according to the numbers specified in the\n * graph configuration. Sequences does not have a direct\n * reference to either tiles or nodes and may be uncached\n * even if they are related to the nodes that should be kept.\n *\n * @param {Array<string>} keepKeys - Keys of nodes to keep in\n * graph unrelated to last access. Tiles related to those keys\n * will also be kept in graph.\n */\n public uncache(keepKeys: string[]): void {\n let keysInUse: { [key: string]: boolean } = {};\n\n this._addNewKeys(keysInUse, this._cachingFull$);\n this._addNewKeys(keysInUse, this._cachingFill$);\n this._addNewKeys(keysInUse, this._cachingTiles$);\n this._addNewKeys(keysInUse, this._cachingSpatialArea$);\n this._addNewKeys(keysInUse, this._requiredNodeTiles);\n this._addNewKeys(keysInUse, this._requiredSpatialArea);\n\n for (let key of keepKeys) {\n if (key in keysInUse) {\n continue;\n }\n\n keysInUse[key] = true;\n }\n\n let keepHs: { [h: string]: boolean } = {};\n for (let key in keysInUse) {\n if (!keysInUse.hasOwnProperty(key)) {\n continue;\n }\n\n let node: Node = this._nodes[key];\n\n let nodeHs: string[] = this._graphCalculator.encodeHs(node.latLon);\n for (let nodeH of nodeHs) {\n if (!(nodeH in keepHs)) {\n keepHs[nodeH] = true;\n }\n }\n }\n\n let potentialHs: [string, TileAccess][] = [];\n for (let h in this._cachedTiles) {\n if (!this._cachedTiles.hasOwnProperty(h) || h in keepHs) {\n continue;\n }\n\n potentialHs.push([h, this._cachedTiles[h]]);\n }\n\n let uncacheHs: string[] = potentialHs\n .sort(\n (h1: [string, TileAccess], h2: [string, TileAccess]): number => {\n return h2[1].accessed - h1[1].accessed;\n })\n .slice(this._configuration.maxUnusedTiles)\n .map(\n (h: [string, TileAccess]): string => {\n return h[0];\n });\n\n for (let uncacheH of uncacheHs) {\n this._uncacheTile(uncacheH);\n }\n\n let potentialNodes: NodeAccess[] = [];\n for (let key in this._cachedNodes) {\n if (!this._cachedNodes.hasOwnProperty(key) || key in keysInUse) {\n continue;\n }\n\n potentialNodes.push(this._cachedNodes[key]);\n }\n\n let uncacheNodes: NodeAccess[] = potentialNodes\n .sort(\n (n1: NodeAccess, n2: NodeAccess): number => {\n return n2.accessed - n1.accessed;\n })\n .slice(this._configuration.maxUnusedNodes);\n\n for (let nodeAccess of uncacheNodes) {\n nodeAccess.node.uncache();\n let key: string = nodeAccess.node.key;\n delete this._cachedNodes[key];\n\n if (key in this._cachedNodeTiles) {\n delete this._cachedNodeTiles[key];\n }\n\n if (key in this._cachedSpatialEdges) {\n delete this._cachedSpatialEdges[key];\n }\n }\n\n let potentialSequences: SequenceAccess[] = [];\n for (let sequenceKey in this._sequences) {\n if (!this._sequences.hasOwnProperty(sequenceKey) ||\n sequenceKey in this._cachingSequences$) {\n continue;\n }\n\n potentialSequences.push(this._sequences[sequenceKey]);\n }\n\n let uncacheSequences: SequenceAccess[] = potentialSequences\n .sort(\n (s1: SequenceAccess, s2: SequenceAccess): number => {\n return s2.accessed - s1.accessed;\n })\n .slice(this._configuration.maxSequences);\n\n for (let sequenceAccess of uncacheSequences) {\n let sequenceKey: string = sequenceAccess.sequence.key;\n\n delete this._sequences[sequenceKey];\n\n sequenceAccess.sequence.dispose();\n }\n }\n\n private _addNewKeys<T>(keys: { [key: string]: boolean }, dict: { [key: string]: T }): void {\n for (let key in dict) {\n if (!dict.hasOwnProperty(key) || !this.hasNode(key)) {\n continue;\n }\n\n if (!(key in keys)) {\n keys[key] = true;\n }\n }\n }\n\n private _cacheSequence$(sequenceKey: string): Observable<Graph> {\n if (sequenceKey in this._cachingSequences$) {\n return this._cachingSequences$[sequenceKey];\n }\n\n this._cachingSequences$[sequenceKey] = this._apiV3.sequenceByKey$([sequenceKey])\n .do(\n (sequenceByKey: { [sequenceKey: string]: ISequence }): void => {\n if (!(sequenceKey in this._sequences)) {\n this._sequences[sequenceKey] = {\n accessed: new Date().getTime(),\n sequence: new Sequence(sequenceByKey[sequenceKey]),\n };\n }\n\n delete this._cachingSequences$[sequenceKey];\n })\n .map(\n (sequenceByKey: { [sequenceKey: string]: ISequence }): Graph => {\n return this;\n })\n .finally(\n (): void => {\n if (sequenceKey in this._cachingSequences$) {\n delete this._cachingSequences$[sequenceKey];\n }\n\n this._changed$.next(this);\n })\n .publish()\n .refCount();\n\n return this._cachingSequences$[sequenceKey];\n }\n\n private _makeFull(node: Node, fillNode: IFillNode): void {\n if (fillNode.calt == null) {\n fillNode.calt = this._defaultAlt;\n }\n\n if (fillNode.c_rotation == null) {\n fillNode.c_rotation = this._graphCalculator.rotationFromCompass(fillNode.ca, fillNode.orientation);\n }\n\n node.makeFull(fillNode);\n }\n\n private _preStore(h: string, node: Node): void {\n if (!(h in this._preStored)) {\n this._preStored[h] = {};\n }\n\n this._preStored[h][node.key] = node;\n }\n\n private _removeFromPreStore(h: string): { [key: string]: Node } {\n let preStored: { [key: string]: Node } = null;\n\n if (h in this._preStored) {\n preStored = this._preStored[h];\n delete this._preStored[h];\n }\n\n return preStored;\n }\n\n private _setNode(node: Node): void {\n let key: string = node.key;\n\n if (this.hasNode(key)) {\n throw new GraphMapillaryError(`Node already exist (${key}).`);\n }\n\n this._nodes[key] = node;\n }\n\n private _uncacheTile(h: string): void {\n for (let node of this._cachedTiles[h].nodes) {\n let key: string = node.key;\n\n delete this._nodes[key];\n delete this._nodeToTile[key];\n\n if (key in this._cachedNodes) {\n delete this._cachedNodes[key];\n }\n\n if (key in this._cachedNodeTiles) {\n delete this._cachedNodeTiles[key];\n }\n\n if (key in this._cachedSpatialEdges) {\n delete this._cachedSpatialEdges[key];\n }\n\n node.dispose();\n }\n\n for (let nodeIndexItem of this._nodeIndexTiles[h]) {\n this._nodeIndex.remove(nodeIndexItem);\n }\n\n delete this._nodeIndexTiles[h];\n delete this._cachedTiles[h];\n }\n\n private _updateCachedTileAccess(key: string, accessed: number): void {\n if (key in this._nodeToTile) {\n this._cachedTiles[this._nodeToTile[key]].accessed = accessed;\n }\n }\n\n private _updateCachedNodeAccess(key: string, accessed: number): void {\n if (key in this._cachedNodes) {\n this._cachedNodes[key].accessed = accessed;\n }\n }\n}\n\nexport default Graph;\n",
- "/// <reference path=\"../../typings/index.d.ts\" />\n\nimport * as geohash from \"latlon-geohash\";\nimport * as THREE from \"three\";\n\nimport {ILatLon} from \"../API\";\nimport {GeoCoords} from \"../Geo\";\n\nclass GeoHashDirections {\n public static n: string = \"n\";\n public static nw: string = \"nw\";\n public static w: string = \"w\";\n public static sw: string = \"sw\";\n public static s: string = \"s\";\n public static se: string = \"se\";\n public static e: string = \"e\";\n public static ne: string = \"ne\";\n}\n\n/**\n * @class GraphCalculator\n *\n * @classdesc Represents a calculator for graph entities.\n */\nexport class GraphCalculator {\n private _geoCoords: GeoCoords;\n\n /**\n * Create a new graph calculator instance.\n *\n * @param {GeoCoords} geoCoords - Geo coords instance.\n */\n constructor(geoCoords?: GeoCoords) {\n this._geoCoords = geoCoords != null ? geoCoords : new GeoCoords();\n }\n\n /**\n * Encode the geohash tile for geodetic coordinates.\n *\n * @param {ILatLon} latlon - Latitude and longitude to encode.\n * @param {number} precision - Precision of the encoding.\n *\n * @returns {string} The geohash tile for the lat, lon and precision.\n */\n public encodeH(latLon: ILatLon, precision: number = 7): string {\n return geohash.encode(latLon.lat, latLon.lon, precision);\n }\n\n /**\n * Encode the geohash tiles within a threshold from a position\n * using Manhattan distance.\n *\n * @param {ILatLon} latlon - Latitude and longitude to encode.\n * @param {number} precision - Precision of the encoding.\n * @param {number} threshold - Threshold of the encoding in meters.\n *\n * @returns {string} The geohash tiles reachable within the threshold.\n */\n public encodeHs(latLon: ILatLon, precision: number = 7, threshold: number = 20): string[] {\n let h: string = geohash.encode(latLon.lat, latLon.lon, precision);\n let bounds: geohash.IBounds = geohash.bounds(h);\n let ne: geohash.ILatLon = bounds.ne;\n let sw: geohash.ILatLon = bounds.sw;\n let neighbours: { [key: string]: string } = geohash.neighbours(h);\n\n let bl: number[] = [0, 0, 0];\n let tr: number[] =\n this._geoCoords.geodeticToEnu(\n ne.lat,\n ne.lon,\n 0,\n sw.lat,\n sw.lon,\n 0);\n\n let position: number[] =\n this._geoCoords.geodeticToEnu(\n latLon.lat,\n latLon.lon,\n 0,\n sw.lat,\n sw.lon,\n 0);\n\n let left: number = position[0] - bl[0];\n let right: number = tr[0] - position[0];\n let bottom: number = position[1] - bl[1];\n let top: number = tr[1] - position[1];\n\n let l: boolean = left < threshold;\n let r: boolean = right < threshold;\n let b: boolean = bottom < threshold;\n let t: boolean = top < threshold;\n\n let hs: string[] = [h];\n\n if (t) {\n hs.push(neighbours[GeoHashDirections.n]);\n }\n\n if (t && l) {\n hs.push(neighbours[GeoHashDirections.nw]);\n }\n\n if (l) {\n hs.push(neighbours[GeoHashDirections.w]);\n }\n\n if (l && b) {\n hs.push(neighbours[GeoHashDirections.sw]);\n }\n\n if (b) {\n hs.push(neighbours[GeoHashDirections.s]);\n }\n\n if (b && r) {\n hs.push(neighbours[GeoHashDirections.se]);\n }\n\n if (r) {\n hs.push(neighbours[GeoHashDirections.e]);\n }\n\n if (r && t) {\n hs.push(neighbours[GeoHashDirections.ne]);\n }\n\n return hs;\n }\n\n /**\n * Get the bounding box corners for a circle with radius of a threshold\n * with center in a geodetic position.\n *\n * @param {ILatLon} latlon - Latitude and longitude to encode.\n * @param {number} threshold - Threshold distance from the position in meters.\n *\n * @returns {Array<ILatLon>} The south west and north east corners of the\n * bounding box.\n */\n public boundingBoxCorners(latLon: ILatLon, threshold: number): [ILatLon, ILatLon] {\n let bl: number[] =\n this._geoCoords.enuToGeodetic(\n -threshold,\n -threshold,\n 0,\n latLon.lat,\n latLon.lon,\n 0);\n\n let tr: number[] =\n this._geoCoords.enuToGeodetic(\n threshold,\n threshold,\n 0,\n latLon.lat,\n latLon.lon,\n 0);\n\n return [\n { lat: bl[0], lon: bl[1] },\n { lat: tr[0], lon: tr[1] },\n ];\n }\n\n /**\n * Convert a compass angle to an angle axis rotation vector.\n *\n * @param {number} compassAngle - The compass angle in degrees.\n * @param {number} orientation - The orientation of the original image.\n *\n * @returns {Array<number>} Angle axis rotation vector.\n */\n public rotationFromCompass(compassAngle: number, orientation: number): number[] {\n let x: number = 0;\n let y: number = 0;\n let z: number = 0;\n\n switch (orientation) {\n case 1:\n x = Math.PI / 2;\n break;\n case 3:\n x = -Math.PI / 2;\n z = Math.PI;\n break;\n case 6:\n y = -Math.PI / 2;\n z = -Math.PI / 2;\n break;\n case 8:\n y = Math.PI / 2;\n z = Math.PI / 2;\n break;\n default:\n break;\n }\n\n let rz: THREE.Matrix4 = new THREE.Matrix4().makeRotationZ(z);\n let euler: THREE.Euler = new THREE.Euler(x, y, compassAngle * Math.PI / 180, \"XYZ\");\n let re: THREE.Matrix4 = new THREE.Matrix4().makeRotationFromEuler(euler);\n\n let rotation: THREE.Vector4 = new THREE.Vector4().setAxisAngleFromRotationMatrix(<any>re.multiply(rz));\n\n return rotation.multiplyScalar(rotation.w).toArray().slice(0, 3);\n }\n}\n\nexport default GraphCalculator;\n",
- "import {Observable} from \"rxjs/Observable\";\nimport {Subject} from \"rxjs/Subject\";\nimport {Subscription} from \"rxjs/Subscription\";\n\nimport \"rxjs/add/operator/catch\";\nimport \"rxjs/add/operator/concat\";\nimport \"rxjs/add/operator/do\";\nimport \"rxjs/add/operator/expand\";\nimport \"rxjs/add/operator/finally\";\nimport \"rxjs/add/operator/first\";\nimport \"rxjs/add/operator/last\";\nimport \"rxjs/add/operator/map\";\nimport \"rxjs/add/operator/mergeMap\";\nimport \"rxjs/add/operator/publishReplay\";\n\nimport {\n FilterExpression,\n Graph,\n ImageLoadingService,\n Node,\n Sequence,\n} from \"../Graph\";\n\n\n/**\n * @class GraphService\n *\n * @classdesc Represents a service for graph operations.\n */\nexport class GraphService {\n private _graph$: Observable<Graph>;\n\n private _imageLoadingService: ImageLoadingService;\n\n private _firstGraphSubjects$: Subject<Graph>[];\n\n private _initializeCacheSubscriptions: Subscription[];\n private _sequenceSubscriptions: Subscription[];\n private _spatialSubscriptions: Subscription[];\n\n /**\n * Create a new graph service instance.\n *\n * @param {Graph} graph - Graph instance to be operated on.\n */\n constructor(graph: Graph, imageLoadingService: ImageLoadingService) {\n this._graph$ = Observable\n .of(graph)\n .concat(graph.changed$)\n .publishReplay(1)\n .refCount();\n\n this._graph$.subscribe(() => { /*noop*/ });\n\n this._imageLoadingService = imageLoadingService;\n\n this._firstGraphSubjects$ = [];\n\n this._initializeCacheSubscriptions = [];\n this._sequenceSubscriptions = [];\n this._spatialSubscriptions = [];\n }\n\n /**\n * Cache a node in the graph and retrieve it.\n *\n * @description When called, the full properties of\n * the node are retrieved and the node cache is initialized.\n * After that the node assets are cached and the node\n * is emitted to the observable when.\n * In parallel to caching the node assets, the sequence and\n * spatial edges of the node are cached. For this, the sequence\n * of the node and the required tiles and spatial nodes are\n * retrieved. The sequence and spatial edges may be set before\n * or after the node is returned.\n *\n * @param {string} key - Key of the node to cache.\n * @return {Observable<Node>} Observable emitting a single item,\n * the node, when it has been retrieved and its assets are cached.\n * @throws {Error} Propagates any IO node caching errors to the caller.\n */\n public cacheNode$(key: string): Observable<Node> {\n let firstGraphSubject$: Subject<Graph> = new Subject<Graph>();\n\n this._firstGraphSubjects$.push(firstGraphSubject$);\n\n let firstGraph$: Observable<Graph> = firstGraphSubject$\n .publishReplay(1)\n .refCount();\n\n let node$: Observable<Node> = firstGraph$\n .map(\n (graph: Graph): Node => {\n return graph.getNode(key);\n })\n .mergeMap(\n (node: Node): Observable<Node> => {\n return node.assetsCached ?\n Observable.of(node) :\n node.cacheAssets$();\n })\n .publishReplay(1)\n .refCount();\n\n node$.subscribe(\n (node: Node): void => {\n this._imageLoadingService.loadnode$.next(node);\n },\n (error: Error): void => {\n console.error(`Failed to cache node (${key})`, error);\n });\n\n let initializeCacheSubscription: Subscription = this._graph$\n .first()\n .mergeMap(\n (graph: Graph): Observable<Graph> => {\n if (graph.isCachingFull(key) || !graph.hasNode(key)) {\n return graph.cacheFull$(key);\n }\n\n if (graph.isCachingFill(key) || !graph.getNode(key).full) {\n return graph.cacheFill$(key);\n }\n\n return Observable.of<Graph>(graph);\n })\n .do(\n (graph: Graph): void => {\n if (!graph.hasInitializedCache(key)) {\n graph.initializeCache(key);\n }\n })\n .finally(\n (): void => {\n if (initializeCacheSubscription == null) {\n return;\n }\n\n this._removeFromArray(initializeCacheSubscription, this._initializeCacheSubscriptions);\n this._removeFromArray(firstGraphSubject$, this._firstGraphSubjects$);\n })\n .subscribe(\n (graph: Graph): void => {\n firstGraphSubject$.next(graph);\n firstGraphSubject$.complete();\n },\n (error: Error): void => {\n firstGraphSubject$.error(error);\n });\n\n if (!initializeCacheSubscription.closed) {\n this._initializeCacheSubscriptions.push(initializeCacheSubscription);\n }\n\n let sequenceSubscription: Subscription = firstGraph$\n .mergeMap(\n (graph: Graph): Observable<Graph> => {\n if (graph.isCachingNodeSequence(key) || !graph.hasNodeSequence(key)) {\n return graph.cacheNodeSequence$(key);\n }\n\n return Observable.of<Graph>(graph);\n })\n .do(\n (graph: Graph): void => {\n if (!graph.getNode(key).sequenceEdges.cached) {\n graph.cacheSequenceEdges(key);\n }\n })\n .finally(\n (): void => {\n if (sequenceSubscription == null) {\n return;\n }\n\n this._removeFromArray(sequenceSubscription, this._sequenceSubscriptions);\n })\n .subscribe(\n (graph: Graph): void => { return; },\n (error: Error): void => {\n console.error(`Failed to cache sequence edges (${key}).`, error);\n });\n\n if (!sequenceSubscription.closed) {\n this._sequenceSubscriptions.push(sequenceSubscription);\n }\n\n let spatialSubscription: Subscription = firstGraph$\n .expand(\n (graph: Graph): Observable<Graph> => {\n if (graph.hasTiles(key)) {\n return Observable.empty<Graph>();\n }\n\n return Observable\n .from<Observable<Graph>>(graph.cacheTiles$(key))\n .mergeMap(\n (graph$: Observable<Graph>): Observable<Graph> => {\n return graph$\n .mergeMap(\n (g: Graph): Observable<Graph> => {\n if (g.isCachingTiles(key)) {\n return Observable.empty<Graph>();\n }\n\n return Observable.of<Graph>(g);\n })\n .catch(\n (error: Error, caught$: Observable<Graph>): Observable<Graph> => {\n console.error(`Failed to cache tile data (${key}).`, error);\n\n return Observable.empty<Graph>();\n });\n });\n })\n .last()\n .mergeMap(\n (graph: Graph): Observable<Graph> => {\n if (graph.hasSpatialArea(key)) {\n return Observable.of<Graph>(graph);\n }\n\n return Observable\n .from<Observable<Graph>>(graph.cacheSpatialArea$(key))\n .mergeMap(\n (graph$: Observable<Graph>): Observable<Graph> => {\n return graph$\n .catch(\n (error: Error, caught$: Observable<Graph>): Observable<Graph> => {\n console.error(`Failed to cache spatial nodes (${key}).`, error);\n\n return Observable.empty<Graph>();\n });\n });\n })\n .last()\n .mergeMap(\n (graph: Graph): Observable<Graph> => {\n return graph.hasNodeSequence(key) ?\n Observable.of<Graph>(graph) :\n graph.cacheNodeSequence$(key);\n })\n .do(\n (graph: Graph): void => {\n if (!graph.getNode(key).spatialEdges.cached) {\n graph.cacheSpatialEdges(key);\n }\n })\n .finally(\n (): void => {\n if (spatialSubscription == null) {\n return;\n }\n\n this._removeFromArray(spatialSubscription, this._spatialSubscriptions);\n })\n .subscribe(\n (graph: Graph): void => { return; },\n (error: Error): void => {\n console.error(`Failed to cache spatial edges (${key}).`, error);\n });\n\n if (!spatialSubscription.closed) {\n this._spatialSubscriptions.push(spatialSubscription);\n }\n\n return node$\n .first(\n (node: Node): boolean => {\n return node.assetsCached;\n });\n }\n\n /**\n * Cache a sequence in the graph and retrieve it.\n *\n * @param {string} sequenceKey - Sequence key.\n * @returns {Observable<Sequence>} Observable emitting a single item,\n * the sequence, when it has been retrieved and its assets are cached.\n * @throws {Error} Propagates any IO node caching errors to the caller.\n */\n public cacheSequence$(sequenceKey: string): Observable<Sequence> {\n return this._graph$\n .first()\n .mergeMap(\n (graph: Graph): Observable<Graph> => {\n if (graph.isCachingSequence(sequenceKey) || !graph.hasSequence(sequenceKey)) {\n return graph.cacheSequence$(sequenceKey);\n }\n\n return Observable.of<Graph>(graph);\n })\n .map(\n (graph: Graph): Sequence => {\n return graph.getSequence(sequenceKey);\n });\n }\n\n /**\n * Set a spatial edge filter on the graph.\n *\n * @description Resets the spatial edges of all cached nodes.\n *\n * @param {FilterExpression} filter - Filter expression to be applied.\n * @return {Observable<Graph>} Observable emitting a single item,\n * the graph, when the spatial edges have been reset.\n */\n public setFilter$(filter: FilterExpression): Observable<Graph> {\n this._resetSubscriptions(this._spatialSubscriptions);\n\n return this._graph$\n .first()\n .do(\n (graph: Graph): void => {\n graph.resetSpatialEdges();\n graph.setFilter(filter);\n });\n }\n\n /**\n * Reset the graph.\n *\n * @description Resets the graph but keeps the nodes of the\n * supplied keys.\n *\n * @param {Array<string>} keepKeys - Keys of nodes to keep in graph.\n * @return {Observable<Node>} Observable emitting a single item,\n * the graph, when it has been reset.\n */\n public reset$(keepKeys: string[]): Observable<Graph> {\n this._abortSubjects(this._firstGraphSubjects$);\n this._resetSubscriptions(this._initializeCacheSubscriptions);\n this._resetSubscriptions(this._sequenceSubscriptions);\n this._resetSubscriptions(this._spatialSubscriptions);\n\n return this._graph$\n .first()\n .do(\n (graph: Graph): void => {\n graph.reset(keepKeys);\n });\n }\n\n /**\n * Uncache the graph.\n *\n * @description Uncaches the graph by removing tiles, nodes and\n * sequences. Keeps the nodes of the supplied keys and the tiles\n * related to those nodes.\n *\n * @param {Array<string>} keepKeys - Keys of nodes to keep in graph.\n * @return {Observable<Graph>} Observable emitting a single item,\n * the graph, when the graph has been uncached.\n */\n public uncache$(keepKeys: string[]): Observable<Graph> {\n return this._graph$\n .first()\n .do(\n (graph: Graph): void => {\n graph.uncache(keepKeys);\n });\n }\n\n private _abortSubjects<T>(subjects: Subject<T>[]): void {\n for (let subject of subjects.slice()) {\n this._removeFromArray(subject, subjects);\n\n subject.error(new Error(\"Cache node request was aborted.\"));\n }\n }\n\n private _removeFromArray<T>(object: T, objects: T[]): void {\n let index: number = objects.indexOf(object);\n if (index !== -1) {\n objects.splice(index, 1);\n }\n }\n\n private _resetSubscriptions(subscriptions: Subscription[]): void {\n for (let subscription of subscriptions.slice()) {\n this._removeFromArray(subscription, subscriptions);\n\n if (!subscription.closed) {\n subscription.unsubscribe();\n }\n }\n }\n}\n\nexport default GraphService;\n",
- "/// <reference path=\"../../typings/index.d.ts\" />\n\nimport {Subject} from \"rxjs/Subject\";\nimport {Observable} from \"rxjs/Observable\";\n\nimport {ILoadStatus, Node} from \"../Graph\";\n\nexport class ImageLoadingService {\n private _loadnode$: Subject<Node> = new Subject<Node>();\n private _loadstatus$: Observable<{[key: string]: ILoadStatus}>;\n\n constructor () {\n this._loadstatus$ = this._loadnode$\n .scan(\n (nodes: {[key: string]: ILoadStatus}, node: Node): {[key: string]: ILoadStatus} => {\n nodes[node.key] = node.loadStatus;\n return nodes;\n },\n {})\n .publishReplay(1)\n .refCount();\n\n this._loadstatus$.subscribe(() => { /*noop*/ });\n }\n\n public get loadnode$(): Subject<Node> {\n return this._loadnode$;\n }\n\n public get loadstatus$(): Observable<{[key: string]: ILoadStatus}> {\n return this._loadstatus$;\n }\n}\n",
- "/// <reference path=\"../../typings/index.d.ts\" />\n\nimport * as Pbf from \"pbf\";\n\nimport {IMesh} from \"../Graph\";\n\nexport class MeshReader {\n public static read(buffer: Buffer): IMesh {\n let pbf: Pbf<IMesh> = new Pbf<IMesh>(buffer);\n\n return pbf.readFields(MeshReader._readMeshField, { faces: [], vertices: [] });\n }\n\n private static _readMeshField(tag: number, mesh: IMesh, pbf: Pbf<IMesh>): void {\n if (tag === 1) {\n mesh.vertices.push(pbf.readFloat());\n } else if (tag === 2) {\n mesh.faces.push(pbf.readVarint());\n }\n }\n}\n",
- "import {Observable} from \"rxjs/Observable\";\n\nimport \"rxjs/add/observable/combineLatest\";\n\nimport \"rxjs/add/operator/map\";\n\nimport {\n ICoreNode,\n IFillNode,\n IGPano,\n ILatLon,\n} from \"../API\";\nimport {IEdge} from \"../Edge\";\nimport {\n IEdgeStatus,\n IMesh,\n ILoadStatus,\n NodeCache,\n} from \"../Graph\";\nimport {ImageSize} from \"../Viewer\";\n\n/**\n * @class Node\n *\n * @classdesc Represents a node in the navigation graph.\n *\n * Explanation of position and bearing properties:\n *\n * When images are uploaded they will have GPS information in the EXIF, this is what\n * is called `originalLatLon`(@link Node#originalLatLon).\n *\n * When Structure from Motions has been run for a node a `computedLatLon` that\n * differs from the `originalLatLon` will be created. It is different because\n * GPS positions are not very exact and SfM aligns the camera positions according\n * to the 3D reconstruction (@link Node#computedLatLon).\n *\n * At last there exist a `latLon` property which evaluates to\n * the `computedLatLon` from SfM if it exists but falls back\n * to the `originalLatLon` from the EXIF GPS otherwise (@link Node#latlon).\n *\n * Everything that is done in in the Viewer is based on the SfM positions,\n * i.e. `computedLatLon`. That is why the smooth transitions go in the right\n * direction (nd not in strange directions because of bad GPS).\n *\n * E.g. when placing a marker in the Viewer it is relative to the SfM\n * position i.e. the `computedLatLon`.\n *\n * The same concept as above also applies to the compass angle (or bearing) properties\n * `originalCa`, `computedCa` and `ca`.\n */\nexport class Node {\n private _cache: NodeCache;\n private _core: ICoreNode;\n private _fill: IFillNode;\n\n /**\n * Create a new node instance.\n *\n * @description Nodes are always created internally by the library.\n * Nodes can not be added to the library through any API method.\n *\n * @param {ICoreNode} coreNode - Raw core node data.\n */\n constructor(core: ICoreNode) {\n this._cache = null;\n this._core = core;\n this._fill = null;\n }\n\n /**\n * Get assets cached.\n *\n * @description The assets that need to be cached for this property\n * to report true are the following: fill properties, image and mesh.\n * The library ensures that the current node will always have the\n * assets cached.\n *\n * @returns {boolean} Value indicating whether all assets have been\n * cached.\n */\n public get assetsCached(): boolean {\n return this._core != null &&\n this._fill != null &&\n this._cache != null &&\n this._cache.image != null &&\n this._cache.mesh != null;\n }\n\n /**\n * Get alt.\n *\n * @description If SfM has not been run the computed altitude is\n * set to a default value of two meters.\n *\n * @returns {number} Altitude, in meters.\n */\n public get alt(): number {\n return this._fill.calt;\n }\n\n /**\n * Get ca.\n *\n * @description If the SfM computed compass angle exists it will\n * be returned, otherwise the original EXIF compass angle.\n *\n * @returns {number} Compass angle, measured in degrees.\n */\n public get ca(): number {\n return this._fill.cca != null ? this._fill.cca : this._fill.ca;\n }\n\n /**\n * Get capturedAt.\n *\n * @returns {number} Timestamp when the image was captured.\n */\n public get capturedAt(): number {\n return this._fill.captured_at;\n }\n\n /**\n * Get computedCA.\n *\n * @description Will not be set if SfM has not been run.\n *\n * @returns {number} SfM computed compass angle, measured in degrees.\n */\n public get computedCA(): number {\n return this._fill.cca;\n }\n\n /**\n * Get computedLatLon.\n *\n * @description Will not be set if SfM has not been run.\n *\n * @returns {ILatLon} SfM computed latitude longitude in WGS84 datum,\n * measured in degrees.\n */\n public get computedLatLon(): ILatLon {\n return this._core.cl;\n }\n\n /**\n * Get focal.\n *\n * @description Will not be set if SfM has not been run.\n *\n * @returns {number} SfM computed focal length.\n */\n public get focal(): number {\n return this._fill.cfocal;\n }\n\n /**\n * Get full.\n *\n * @description The library ensures that the current node will\n * always be full.\n *\n * @returns {boolean} Value indicating whether the node has all\n * properties filled.\n */\n public get full(): boolean {\n return this._fill != null;\n }\n\n /**\n * Get fullPano.\n *\n * @returns {boolean} Value indicating whether the node is a complete\n * 360 panorama.\n */\n public get fullPano(): boolean {\n return this._fill.gpano != null &&\n this._fill.gpano.CroppedAreaLeftPixels === 0 &&\n this._fill.gpano.CroppedAreaTopPixels === 0 &&\n this._fill.gpano.CroppedAreaImageWidthPixels === this._fill.gpano.FullPanoWidthPixels &&\n this._fill.gpano.CroppedAreaImageHeightPixels === this._fill.gpano.FullPanoHeightPixels;\n }\n\n /**\n * Get gpano.\n *\n * @description Will not be set for non panoramic images.\n *\n * @returns {IGPano} Panorama information for panorama images.\n */\n public get gpano(): IGPano {\n return this._fill.gpano;\n }\n\n /**\n * Get height.\n *\n * @returns {number} Height of original image, not adjusted\n * for orientation.\n */\n public get height(): number {\n return this._fill.height;\n }\n\n /**\n * Get image.\n *\n * @description The image will always be set on the current node.\n *\n * @returns {HTMLImageElement} Cached image element of the node.\n */\n public get image(): HTMLImageElement {\n return this._cache.image;\n }\n\n /**\n * Get key.\n *\n * @returns {string} Unique key of the node.\n */\n public get key(): string {\n return this._core.key;\n }\n\n /**\n * Get latLon.\n *\n * @description If the SfM computed latitude longitude exist\n * it will be returned, otherwise the original EXIF latitude\n * longitude.\n *\n * @returns {ILatLon} Latitude longitude in WGS84 datum,\n * measured in degrees.\n */\n public get latLon(): ILatLon {\n return this._core.cl != null ? this._core.cl : this._core.l;\n }\n\n /**\n * Get loadStatus.\n *\n * @returns {ILoadStatus} Value indicating the load status\n * of the mesh and image.\n */\n public get loadStatus(): ILoadStatus {\n return this._cache.loadStatus;\n }\n\n /**\n * Get merged.\n *\n * @returns {boolean} Value indicating whether SfM has been\n * run on the node and the node has been merged into a\n * connected component.\n */\n public get merged(): boolean {\n return this._fill != null &&\n this._fill.merge_version != null &&\n this._fill.merge_version > 0;\n }\n\n /**\n * Get mergeCC.\n *\n * @description Will not be set if SfM has not yet been run on\n * node.\n *\n * @returns {number} SfM connected component key to which\n * image belongs.\n */\n public get mergeCC(): number {\n return this._fill.merge_cc;\n }\n\n /**\n * Get mergeVersion.\n *\n * @returns {number} Version for which SfM was run and image was merged.\n */\n public get mergeVersion(): number {\n return this._fill.merge_version;\n }\n\n /**\n * Get mesh.\n *\n * @description The mesh will always be set on the current node.\n *\n * @returns {IMesh} SfM triangulated mesh of reconstructed\n * atomic 3D points.\n */\n public get mesh(): IMesh {\n return this._cache.mesh;\n }\n\n /**\n * Get orientation.\n *\n * @returns {number} EXIF orientation of original image.\n */\n public get orientation(): number {\n return this._fill.orientation;\n }\n\n /**\n * Get originalCA.\n *\n * @returns {number} Original EXIF compass angle, measured in\n * degrees.\n */\n public get originalCA(): number {\n return this._fill.ca;\n }\n\n /**\n * Get originalLatLon.\n *\n * @returns {ILatLon} Original EXIF latitude longitude in\n * WGS84 datum, measured in degrees.\n */\n public get originalLatLon(): ILatLon {\n return this._core.l;\n }\n\n /**\n * Get pano.\n *\n * @returns {boolean} Value indicating whether the node is a panorama.\n * It could be a cropped or full panorama.\n */\n public get pano(): boolean {\n return this._fill.gpano != null &&\n this._fill.gpano.FullPanoWidthPixels != null;\n }\n\n /**\n * Get projectKey.\n *\n * @returns {string} Unique key of the project to which\n * the node belongs.\n */\n public get projectKey(): string {\n return this._fill.project != null ?\n this._fill.project.key :\n null;\n }\n\n /**\n * Get rotation.\n *\n * @description Will not be set if SfM has not been run.\n *\n * @returns {Array<number>} Rotation vector in angle axis representation.\n */\n public get rotation(): number[] {\n return this._fill.c_rotation;\n }\n\n /**\n * Get scale.\n *\n * @description Will not be set if SfM has not been run.\n *\n * @returns {number} Scale of atomic reconstruction.\n */\n public get scale(): number {\n return this._fill.atomic_scale;\n }\n\n /**\n * Get sequenceKey.\n *\n * @returns {string} Unique key of the sequence to which\n * the node belongs.\n */\n public get sequenceKey(): string {\n return this._core.sequence.key;\n }\n\n /**\n * Get sequenceEdges.\n *\n * @returns {IEdgeStatus} Value describing the status of the\n * sequence edges.\n */\n public get sequenceEdges(): IEdgeStatus {\n return this._cache.sequenceEdges;\n }\n\n /**\n * Get sequenceEdges$.\n *\n * @returns {Observable<IEdgeStatus>} Observable emitting\n * values describing the status of the sequence edges.\n */\n public get sequenceEdges$(): Observable<IEdgeStatus> {\n return this._cache.sequenceEdges$;\n }\n\n /**\n * Get spatialEdges.\n *\n * @returns {IEdgeStatus} Value describing the status of the\n * spatial edges.\n */\n public get spatialEdges(): IEdgeStatus {\n return this._cache.spatialEdges;\n }\n\n /**\n * Get spatialEdges$.\n *\n * @returns {Observable<IEdgeStatus>} Observable emitting\n * values describing the status of the spatial edges.\n */\n public get spatialEdges$(): Observable<IEdgeStatus> {\n return this._cache.spatialEdges$;\n }\n\n /**\n * Get userKey.\n *\n * @returns {string} Unique key of the user who uploaded\n * the image.\n */\n public get userKey(): string {\n return this._fill.user.key;\n }\n\n /**\n * Get username.\n *\n * @returns {string} Username of the user who uploaded\n * the image.\n */\n public get username(): string {\n return this._fill.user.username;\n }\n\n /**\n * Get width.\n *\n * @returns {number} Width of original image, not\n * adjusted for orientation.\n */\n public get width(): number {\n return this._fill.width;\n }\n\n /**\n * Cache the image and mesh assets.\n *\n * @description The assets are always cached internally by the\n * library prior to setting a node as the current node.\n *\n * @returns {Observable<Node>} Observable emitting this node whenever the\n * load status has changed and when the mesh or image has been fully loaded.\n */\n public cacheAssets$(): Observable<Node> {\n return this._cache.cacheAssets$(this.key, this.pano, this.merged)\n .map(\n (cache: NodeCache): Node => {\n return this;\n });\n }\n\n public cacheImage$(imageSize: ImageSize): Observable<Node> {\n return this._cache.cacheImage$(this.key, imageSize)\n .map(\n (cache: NodeCache): Node => {\n return this;\n });\n }\n\n /**\n * Cache the sequence edges.\n *\n * @description The sequence edges are cached asynchronously\n * internally by the library.\n *\n * @param {Array<IEdge>} edges - Sequence edges to cache.\n */\n public cacheSequenceEdges(edges: IEdge[]): void {\n this._cache.cacheSequenceEdges(edges);\n }\n\n /**\n * Cache the spatial edges.\n *\n * @description The spatial edges are cached asynchronously\n * internally by the library.\n *\n * @param {Array<IEdge>} edges - Spatial edges to cache.\n */\n public cacheSpatialEdges(edges: IEdge[]): void {\n this._cache.cacheSpatialEdges(edges);\n }\n\n /**\n * Dispose the node.\n *\n * @description Disposes all cached assets.\n */\n public dispose(): void {\n if (this._cache != null) {\n this._cache.dispose();\n this._cache = null;\n }\n\n this._core = null;\n this._fill = null;\n }\n\n /**\n * Initialize the node cache.\n *\n * @description The node cache is initialized internally by\n * the library.\n *\n * @param {NodeCache} cache - The node cache to set as cache.\n */\n public initializeCache(cache: NodeCache): void {\n if (this._cache != null) {\n throw new Error(`Node cache already initialized (${this.key}).`);\n }\n\n this._cache = cache;\n }\n\n /**\n * Fill the node with all properties.\n *\n * @description The node is filled internally by\n * the library.\n *\n * @param {IFillNode} fill - The fill node struct.\n */\n public makeFull(fill: IFillNode): void {\n if (fill == null) {\n throw new Error(\"Fill can not be null.\");\n }\n\n this._fill = fill;\n }\n\n /**\n * Reset the sequence edges.\n */\n public resetSequenceEdges(): void {\n this._cache.resetSequenceEdges();\n }\n\n /**\n * Reset the spatial edges.\n */\n public resetSpatialEdges(): void {\n this._cache.resetSpatialEdges();\n }\n\n /**\n * Clears the image and mesh assets, aborts\n * any outstanding requests and resets edges.\n */\n public uncache(): void {\n if (this._cache == null) {\n return;\n }\n\n this._cache.dispose();\n this._cache = null;\n }\n}\n\nexport default Node;\n",
- "import {Subject} from \"rxjs/Subject\";\nimport {Observable} from \"rxjs/Observable\";\nimport {Subscriber} from \"rxjs/Subscriber\";\nimport {Subscription} from \"rxjs/Subscription\";\n\nimport \"rxjs/add/observable/combineLatest\";\n\nimport \"rxjs/add/operator/publishReplay\";\n\nimport {IEdge} from \"../Edge\";\nimport {\n IEdgeStatus,\n IMesh,\n ILoadStatus,\n ILoadStatusObject,\n MeshReader,\n} from \"../Graph\";\nimport {\n Settings,\n Urls,\n} from \"../Utils\";\nimport {ImageSize} from \"../Viewer\";\n\n/**\n * @class NodeCache\n *\n * @classdesc Represents the cached properties of a node.\n */\nexport class NodeCache {\n private _disposed: boolean;\n\n private _image: HTMLImageElement;\n private _loadStatus: ILoadStatus;\n private _mesh: IMesh;\n private _sequenceEdges: IEdgeStatus;\n private _spatialEdges: IEdgeStatus;\n\n private _imageRequest: XMLHttpRequest;\n private _meshRequest: XMLHttpRequest;\n\n private _sequenceEdgesChanged$: Subject<IEdgeStatus>;\n private _sequenceEdges$: Observable<IEdgeStatus>;\n private _spatialEdgesChanged$: Subject<IEdgeStatus>;\n private _spatialEdges$: Observable<IEdgeStatus>;\n\n private _cachingAssets$: Observable<NodeCache>;\n\n private _sequenceEdgesSubscription: Subscription;\n private _spatialEdgesSubscription: Subscription;\n\n /**\n * Create a new node cache instance.\n */\n constructor() {\n this._disposed = false;\n\n this._image = null;\n this._loadStatus = { loaded: 0, total: 0 };\n this._mesh = null;\n this._sequenceEdges = { cached: false, edges: [] };\n this._spatialEdges = { cached: false, edges: [] };\n\n this._sequenceEdgesChanged$ = new Subject<IEdgeStatus>();\n this._sequenceEdges$ = this._sequenceEdgesChanged$\n .startWith(this._sequenceEdges)\n .publishReplay(1)\n .refCount();\n\n this._sequenceEdgesSubscription = this._sequenceEdges$.subscribe(() => { /*noop*/ });\n\n this._spatialEdgesChanged$ = new Subject<IEdgeStatus>();\n this._spatialEdges$ = this._spatialEdgesChanged$\n .startWith(this._spatialEdges)\n .publishReplay(1)\n .refCount();\n\n this._spatialEdgesSubscription = this._spatialEdges$.subscribe(() => { /*noop*/ });\n\n this._cachingAssets$ = null;\n }\n\n /**\n * Get image.\n *\n * @description Will not be set when assets have not been cached\n * or when the object has been disposed.\n *\n * @returns {HTMLImageElement} Cached image element of the node.\n */\n public get image(): HTMLImageElement {\n return this._image;\n }\n\n /**\n * Get loadStatus.\n *\n * @returns {ILoadStatus} Value indicating the load status\n * of the mesh and image.\n */\n public get loadStatus(): ILoadStatus {\n return this._loadStatus;\n }\n\n /**\n * Get mesh.\n *\n * @description Will not be set when assets have not been cached\n * or when the object has been disposed.\n *\n * @returns {IMesh} SfM triangulated mesh of reconstructed\n * atomic 3D points.\n */\n public get mesh(): IMesh {\n return this._mesh;\n }\n\n /**\n * Get sequenceEdges.\n *\n * @returns {IEdgeStatus} Value describing the status of the\n * sequence edges.\n */\n public get sequenceEdges(): IEdgeStatus {\n return this._sequenceEdges;\n }\n\n /**\n * Get sequenceEdges$.\n *\n * @returns {Observable<IEdgeStatus>} Observable emitting\n * values describing the status of the sequence edges.\n */\n public get sequenceEdges$(): Observable<IEdgeStatus> {\n return this._sequenceEdges$;\n }\n\n /**\n * Get spatialEdges.\n *\n * @returns {IEdgeStatus} Value describing the status of the\n * spatial edges.\n */\n public get spatialEdges(): IEdgeStatus {\n return this._spatialEdges;\n }\n\n /**\n * Get spatialEdges$.\n *\n * @returns {Observable<IEdgeStatus>} Observable emitting\n * values describing the status of the spatial edges.\n */\n public get spatialEdges$(): Observable<IEdgeStatus> {\n return this._spatialEdges$;\n }\n\n /**\n * Cache the image and mesh assets.\n *\n * @param {string} key - Key of the node to cache.\n * @param {boolean} pano - Value indicating whether node is a panorama.\n * @param {boolean} merged - Value indicating whether node is merged.\n * @returns {Observable<NodeCache>} Observable emitting this node\n * cache whenever the load status has changed and when the mesh or image\n * has been fully loaded.\n */\n public cacheAssets$(key: string, pano: boolean, merged: boolean): Observable<NodeCache> {\n if (this._cachingAssets$ != null) {\n return this._cachingAssets$;\n }\n\n let imageSize: ImageSize = pano ?\n Settings.basePanoramaSize :\n Settings.baseImageSize;\n\n this._cachingAssets$ = Observable\n .combineLatest(\n this._cacheImage$(key, imageSize),\n this._cacheMesh$(key, merged),\n (imageStatus: ILoadStatusObject<HTMLImageElement>, meshStatus: ILoadStatusObject<IMesh>): NodeCache => {\n this._loadStatus.loaded = 0;\n this._loadStatus.total = 0;\n\n if (meshStatus) {\n this._mesh = meshStatus.object;\n this._loadStatus.loaded += meshStatus.loaded.loaded;\n this._loadStatus.total += meshStatus.loaded.total;\n }\n\n if (imageStatus) {\n this._image = imageStatus.object;\n this._loadStatus.loaded += imageStatus.loaded.loaded;\n this._loadStatus.total += imageStatus.loaded.total;\n }\n\n return this;\n })\n .finally(\n (): void => {\n this._cachingAssets$ = null;\n })\n .publishReplay(1)\n .refCount();\n\n return this._cachingAssets$;\n }\n\n /**\n * Cache an image with a higher resolution than the current one.\n *\n * @param {string} key - Key of the node to cache.\n * @param {ImageSize} imageSize - The size to cache.\n * @returns {Observable<NodeCache>} Observable emitting a single item,\n * the node cache, when the image has been cached. If supplied image\n * size is not larger than the current image size the node cache is\n * returned immediately.\n */\n public cacheImage$(key: string, imageSize: ImageSize): Observable<NodeCache> {\n if (this._image != null && imageSize <= Math.max(this._image.width, this._image.height)) {\n return Observable.of<NodeCache>(this);\n }\n\n return this._cacheImage$(key, imageSize)\n .first(\n (status: ILoadStatusObject<HTMLImageElement>): boolean => {\n return status.object != null;\n })\n .do(\n (status: ILoadStatusObject<HTMLImageElement>): void => {\n this._disposeImage();\n this._image = status.object;\n })\n .map(\n (imageStatus: ILoadStatusObject<HTMLImageElement>): NodeCache => {\n return this;\n });\n }\n\n /**\n * Cache the sequence edges.\n *\n * @param {Array<IEdge>} edges - Sequence edges to cache.\n */\n public cacheSequenceEdges(edges: IEdge[]): void {\n this._sequenceEdges = { cached: true, edges: edges };\n this._sequenceEdgesChanged$.next(this._sequenceEdges);\n }\n\n /**\n * Cache the spatial edges.\n *\n * @param {Array<IEdge>} edges - Spatial edges to cache.\n */\n public cacheSpatialEdges(edges: IEdge[]): void {\n this._spatialEdges = { cached: true, edges: edges };\n this._spatialEdgesChanged$.next(this._spatialEdges);\n }\n\n /**\n * Dispose the node cache.\n *\n * @description Disposes all cached assets and unsubscribes to\n * all streams.\n */\n public dispose(): void {\n this._sequenceEdgesSubscription.unsubscribe();\n this._spatialEdgesSubscription.unsubscribe();\n\n this._disposeImage();\n\n this._mesh = null;\n this._loadStatus.loaded = 0;\n this._loadStatus.total = 0;\n this._sequenceEdges = { cached: false, edges: [] };\n this._spatialEdges = { cached: false, edges: [] };\n\n this._sequenceEdgesChanged$.next(this._sequenceEdges);\n this._spatialEdgesChanged$.next(this._spatialEdges);\n\n this._disposed = true;\n\n if (this._imageRequest != null) {\n this._imageRequest.abort();\n }\n\n if (this._meshRequest != null) {\n this._meshRequest.abort();\n }\n }\n\n /**\n * Reset the sequence edges.\n */\n public resetSequenceEdges(): void {\n this._sequenceEdges = { cached: false, edges: [] };\n this._sequenceEdgesChanged$.next(this._sequenceEdges);\n }\n\n /**\n * Reset the spatial edges.\n */\n public resetSpatialEdges(): void {\n this._spatialEdges = { cached: false, edges: [] };\n this._spatialEdgesChanged$.next(this._spatialEdges);\n }\n\n /**\n * Cache the image.\n *\n * @param {string} key - Key of the node to cache.\n * @param {boolean} pano - Value indicating whether node is a panorama.\n * @returns {Observable<ILoadStatusObject<HTMLImageElement>>} Observable\n * emitting a load status object every time the load status changes\n * and completes when the image is fully loaded.\n */\n private _cacheImage$(key: string, imageSize: ImageSize): Observable<ILoadStatusObject<HTMLImageElement>> {\n return Observable.create(\n (subscriber: Subscriber<ILoadStatusObject<HTMLImageElement>>): void => {\n let xmlHTTP: XMLHttpRequest = new XMLHttpRequest();\n xmlHTTP.open(\"GET\", Urls.thumbnail(key, imageSize), true);\n xmlHTTP.responseType = \"arraybuffer\";\n xmlHTTP.timeout = 15000;\n\n xmlHTTP.onload = (pe: ProgressEvent) => {\n if (xmlHTTP.status !== 200) {\n this._imageRequest = null;\n\n subscriber.error(\n new Error(`Failed to fetch image (${key}). Status: ${xmlHTTP.status}, ${xmlHTTP.statusText}`));\n\n return;\n }\n\n let image: HTMLImageElement = new Image();\n image.crossOrigin = \"Anonymous\";\n\n image.onload = (e: Event) => {\n this._imageRequest = null;\n\n if (this._disposed) {\n window.URL.revokeObjectURL(image.src);\n subscriber.error(new Error(`Image load was aborted (${key})`));\n\n return;\n }\n\n subscriber.next({ loaded: { loaded: pe.loaded, total: pe.total }, object: image });\n subscriber.complete();\n };\n\n image.onerror = (error: ErrorEvent) => {\n this._imageRequest = null;\n\n subscriber.error(new Error(`Failed to load image (${key})`));\n };\n\n let blob: Blob = new Blob([xmlHTTP.response]);\n image.src = window.URL.createObjectURL(blob);\n };\n\n xmlHTTP.onprogress = (pe: ProgressEvent) => {\n if (this._disposed) {\n return;\n }\n\n subscriber.next({loaded: { loaded: pe.loaded, total: pe.total }, object: null });\n };\n\n xmlHTTP.onerror = (error: Event) => {\n this._imageRequest = null;\n\n subscriber.error(new Error(`Failed to fetch image (${key})`));\n };\n\n xmlHTTP.ontimeout = (e: Event) => {\n this._imageRequest = null;\n\n subscriber.error(new Error(`Image request timed out (${key})`));\n };\n\n xmlHTTP.onabort = (event: Event) => {\n this._imageRequest = null;\n\n subscriber.error(new Error(`Image request was aborted (${key})`));\n };\n\n this._imageRequest = xmlHTTP;\n\n xmlHTTP.send(null);\n });\n }\n\n /**\n * Cache the mesh.\n *\n * @param {string} key - Key of the node to cache.\n * @param {boolean} merged - Value indicating whether node is merged.\n * @returns {Observable<ILoadStatusObject<IMesh>>} Observable emitting\n * a load status object every time the load status changes and completes\n * when the mesh is fully loaded.\n */\n private _cacheMesh$(key: string, merged: boolean): Observable<ILoadStatusObject<IMesh>> {\n return Observable.create(\n (subscriber: Subscriber<ILoadStatusObject<IMesh>>): void => {\n if (!merged) {\n subscriber.next(this._createEmptyMeshLoadStatus());\n subscriber.complete();\n return;\n }\n\n let xmlHTTP: XMLHttpRequest = new XMLHttpRequest();\n xmlHTTP.open(\"GET\", Urls.protoMesh(key), true);\n xmlHTTP.responseType = \"arraybuffer\";\n xmlHTTP.timeout = 15000;\n\n xmlHTTP.onload = (pe: ProgressEvent) => {\n this._meshRequest = null;\n\n if (this._disposed) {\n return;\n }\n\n let mesh: IMesh = xmlHTTP.status === 200 ?\n MeshReader.read(new Buffer(xmlHTTP.response)) :\n { faces: [], vertices: [] };\n\n subscriber.next({ loaded: { loaded: pe.loaded, total: pe.total }, object: mesh });\n subscriber.complete();\n };\n\n xmlHTTP.onprogress = (pe: ProgressEvent) => {\n if (this._disposed) {\n return;\n }\n\n subscriber.next({ loaded: { loaded: pe.loaded, total: pe.total }, object: null });\n };\n\n xmlHTTP.onerror = (e: Event) => {\n this._meshRequest = null;\n\n console.error(`Failed to cache mesh (${key})`);\n\n subscriber.next(this._createEmptyMeshLoadStatus());\n subscriber.complete();\n };\n\n xmlHTTP.ontimeout = (e: Event) => {\n this._meshRequest = null;\n\n console.error(`Mesh request timed out (${key})`);\n\n subscriber.next(this._createEmptyMeshLoadStatus());\n subscriber.complete();\n };\n\n xmlHTTP.onabort = (e: Event) => {\n this._meshRequest = null;\n\n subscriber.error(new Error(`Mesh request was aborted (${key})`));\n };\n\n this._meshRequest = xmlHTTP;\n\n xmlHTTP.send(null);\n });\n }\n\n /**\n * Create a load status object with an empty mesh.\n *\n * @returns {ILoadStatusObject<IMesh>} Load status object\n * with empty mesh.\n */\n private _createEmptyMeshLoadStatus(): ILoadStatusObject<IMesh> {\n return {\n loaded: { loaded: 0, total: 0 },\n object: { faces: [], vertices: [] },\n };\n }\n\n private _disposeImage(): void {\n if (this._image != null) {\n window.URL.revokeObjectURL(this._image.src);\n }\n\n this._image = null;\n }\n}\n\nexport default NodeCache;\n",
- "/// <reference path=\"../../typings/index.d.ts\" />\n\nimport * as _ from \"underscore\";\n\nimport {ISequence} from \"../API\";\n\n/**\n * @class Sequence\n *\n * @classdesc Represents a sequence of ordered nodes.\n */\nexport class Sequence {\n private _key: string;\n private _keys: string[];\n\n /**\n * Create a new sequene instance.\n *\n * @param {ISequence} sequence - Raw sequence data.\n */\n constructor(sequence: ISequence) {\n this._key = sequence.key;\n this._keys = sequence.keys;\n }\n\n /**\n * Get key.\n *\n * @returns {string} Unique sequence key.\n */\n public get key(): string {\n return this._key;\n }\n\n /**\n * Get keys.\n *\n * @returns {Array<string>} Array of ordered node keys in the sequence.\n */\n public get keys(): string[] {\n return this._keys;\n }\n\n /**\n * Dispose the sequence.\n *\n * @description Disposes all cached assets.\n */\n public dispose(): void {\n this._key = null;\n this._keys = null;\n }\n\n /**\n * Find the next node key in the sequence with respect to\n * the provided node key.\n *\n * @param {string} key - Reference node key.\n * @returns {string} Next key in sequence if it exists, null otherwise.\n */\n public findNextKey(key: string): string {\n let i: number = _.indexOf(this._keys, key);\n\n if ((i + 1) >= this._keys.length || i === -1) {\n return null;\n } else {\n return this._keys[i + 1];\n }\n }\n\n /**\n * Find the previous node key in the sequence with respect to\n * the provided node key.\n *\n * @param {string} key - Reference node key.\n * @returns {string} Previous key in sequence if it exists, null otherwise.\n */\n public findPrevKey(key: string): string {\n let i: number = _.indexOf(this._keys, key);\n\n if (i === 0 || i === -1) {\n return null;\n } else {\n return this._keys[i - 1];\n }\n }\n}\n\nexport default Sequence;\n",
- "/// <reference path=\"../../../typings/index.d.ts\" />\n\nimport * as THREE from \"three\";\n\nimport {\n Node,\n Sequence,\n} from \"../../Graph\";\nimport\n{\n EdgeDirection,\n IStep,\n ITurn,\n IPano,\n IEdge,\n IPotentialEdge,\n EdgeCalculatorSettings,\n EdgeCalculatorDirections,\n EdgeCalculatorCoefficients,\n} from \"../../Edge\";\nimport {ArgumentMapillaryError} from \"../../Error\";\nimport {GeoCoords, Spatial} from \"../../Geo\";\n\n/**\n * @class EdgeCalculator\n *\n * @classdesc Represents a class for calculating node edges.\n */\nexport class EdgeCalculator {\n\n private _spatial: Spatial;\n private _geoCoords: GeoCoords;\n\n private _settings: EdgeCalculatorSettings;\n private _directions: EdgeCalculatorDirections;\n private _coefficients: EdgeCalculatorCoefficients;\n\n /**\n * Create a new edge calculator instance.\n *\n * @param {EdgeCalculatorSettings} settings - Settings struct.\n * @param {EdgeCalculatorDirections} directions - Directions struct.\n * @param {EdgeCalculatorCoefficients} coefficients - Coefficients struct.\n */\n constructor(\n settings?: EdgeCalculatorSettings,\n directions?: EdgeCalculatorDirections,\n coefficients?: EdgeCalculatorCoefficients) {\n\n this._spatial = new Spatial();\n this._geoCoords = new GeoCoords();\n\n this._settings = settings != null ? settings : new EdgeCalculatorSettings();\n this._directions = directions != null ? directions : new EdgeCalculatorDirections();\n this._coefficients = coefficients != null ? coefficients : new EdgeCalculatorCoefficients();\n }\n\n /**\n * Returns the potential edges to destination nodes for a set\n * of nodes with respect to a source node.\n *\n * @param {Node} node - Source node.\n * @param {Array<Node>} nodes - Potential destination nodes.\n * @param {Array<string>} fallbackKeys - Keys for destination nodes that should\n * be returned even if they do not meet the criteria for a potential edge.\n * @throws {ArgumentMapillaryError} If node is not full.\n */\n public getPotentialEdges(node: Node, potentialNodes: Node[], fallbackKeys: string[]): IPotentialEdge[] {\n if (!node.full) {\n throw new ArgumentMapillaryError(\"Node has to be full.\");\n }\n\n if (!node.merged) {\n return [];\n }\n\n let currentDirection: THREE.Vector3 =\n this._spatial.viewingDirection(node.rotation);\n let currentVerticalDirection: number =\n this._spatial.angleToPlane(currentDirection.toArray(), [0, 0, 1]);\n\n let potentialEdges: IPotentialEdge[] = [];\n\n for (let potential of potentialNodes) {\n if (!potential.merged ||\n potential.key === node.key) {\n continue;\n }\n\n let enu: number[] = this._geoCoords.geodeticToEnu(\n potential.latLon.lat,\n potential.latLon.lon,\n potential.alt,\n node.latLon.lat,\n node.latLon.lon,\n node.alt);\n\n let motion: THREE.Vector3 = new THREE.Vector3(enu[0], enu[1], enu[2]);\n let distance: number = motion.length();\n\n if (distance > this._settings.maxDistance &&\n fallbackKeys.indexOf(potential.key) < 0) {\n continue;\n }\n\n let motionChange: number = this._spatial.angleBetweenVector2(\n currentDirection.x,\n currentDirection.y,\n motion.x,\n motion.y);\n\n let verticalMotion: number = this._spatial.angleToPlane(motion.toArray(), [0, 0, 1]);\n\n let direction: THREE.Vector3 =\n this._spatial.viewingDirection(potential.rotation);\n\n let directionChange: number = this._spatial.angleBetweenVector2(\n currentDirection.x,\n currentDirection.y,\n direction.x,\n direction.y);\n\n let verticalDirection: number = this._spatial.angleToPlane(direction.toArray(), [0, 0, 1]);\n let verticalDirectionChange: number = verticalDirection - currentVerticalDirection;\n\n let rotation: number = this._spatial.relativeRotationAngle(\n node.rotation,\n potential.rotation);\n\n let worldMotionAzimuth: number =\n this._spatial.angleBetweenVector2(1, 0, motion.x, motion.y);\n\n let sameSequence: boolean = potential.sequenceKey != null &&\n node.sequenceKey != null &&\n potential.sequenceKey === node.sequenceKey;\n\n let sameMergeCC: boolean =\n (potential.mergeCC == null && node.mergeCC == null) ||\n potential.mergeCC === node.mergeCC;\n\n let sameUser: boolean =\n potential.userKey === node.userKey;\n\n let potentialEdge: IPotentialEdge = {\n capturedAt: potential.capturedAt,\n croppedPano: potential.pano && !potential.fullPano,\n directionChange: directionChange,\n distance: distance,\n fullPano: potential.fullPano,\n key: potential.key,\n motionChange: motionChange,\n rotation: rotation,\n sameMergeCC: sameMergeCC,\n sameSequence: sameSequence,\n sameUser: sameUser,\n sequenceKey: potential.sequenceKey,\n verticalDirectionChange: verticalDirectionChange,\n verticalMotion: verticalMotion,\n worldMotionAzimuth: worldMotionAzimuth,\n };\n\n potentialEdges.push(potentialEdge);\n }\n\n return potentialEdges;\n }\n\n /**\n * Computes the sequence edges for a node.\n *\n * @param {Node} node - Source node.\n * @throws {ArgumentMapillaryError} If node is not full.\n */\n public computeSequenceEdges(node: Node, sequence: Sequence): IEdge[] {\n if (!node.full) {\n throw new ArgumentMapillaryError(\"Node has to be full.\");\n }\n\n if (node.sequenceKey !== sequence.key) {\n throw new ArgumentMapillaryError(\"Node and sequence does not correspond.\");\n }\n\n let edges: IEdge[] = [];\n\n let nextKey: string = sequence.findNextKey(node.key);\n if (nextKey != null) {\n edges.push({\n data: {\n direction: EdgeDirection.Next,\n worldMotionAzimuth: Number.NaN,\n },\n from: node.key,\n to: nextKey,\n });\n }\n\n let prevKey: string = sequence.findPrevKey(node.key);\n if (prevKey != null) {\n edges.push({\n data: {\n direction: EdgeDirection.Prev,\n worldMotionAzimuth: Number.NaN,\n },\n from: node.key,\n to: prevKey,\n });\n }\n\n return edges;\n }\n\n /**\n * Computes the similar edges for a node.\n *\n * @description Similar edges for perspective images and cropped panoramas\n * look roughly in the same direction and are positioned closed to the node.\n * Similar edges for full panoramas only target other full panoramas.\n *\n * @param {Node} node - Source node.\n * @param {Array<IPotentialEdge>} potentialEdges - Potential edges.\n * @throws {ArgumentMapillaryError} If node is not full.\n */\n public computeSimilarEdges(node: Node, potentialEdges: IPotentialEdge[]): IEdge[] {\n if (!node.full) {\n throw new ArgumentMapillaryError(\"Node has to be full.\");\n }\n\n let nodeFullPano: boolean = node.fullPano;\n let sequenceGroups: { [key: string]: IPotentialEdge[] } = {};\n\n for (let potentialEdge of potentialEdges) {\n if (potentialEdge.sequenceKey == null) {\n continue;\n }\n\n if (potentialEdge.sameSequence ||\n !potentialEdge.sameMergeCC) {\n continue;\n }\n\n if (nodeFullPano) {\n if (!potentialEdge.fullPano) {\n continue;\n }\n } else {\n if (!potentialEdge.fullPano &&\n Math.abs(potentialEdge.directionChange) > this._settings.similarMaxDirectionChange) {\n continue;\n }\n }\n\n if (potentialEdge.distance > this._settings.similarMaxDistance) {\n continue;\n }\n\n if (potentialEdge.sameUser &&\n Math.abs(potentialEdge.capturedAt - node.capturedAt) <\n this._settings.similarMinTimeDifference) {\n continue;\n }\n\n if (sequenceGroups[potentialEdge.sequenceKey] == null) {\n sequenceGroups[potentialEdge.sequenceKey] = [];\n }\n\n sequenceGroups[potentialEdge.sequenceKey].push(potentialEdge);\n\n }\n\n let similarEdges: IPotentialEdge[] = [];\n\n let calculateScore: (potentialEdge: IPotentialEdge) => number =\n node.fullPano ?\n (potentialEdge: IPotentialEdge): number => {\n return potentialEdge.distance;\n } :\n (potentialEdge: IPotentialEdge): number => {\n return this._coefficients.similarDistance * potentialEdge.distance +\n this._coefficients.similarRotation * potentialEdge.rotation;\n };\n\n for (let sequenceKey in sequenceGroups) {\n if (!sequenceGroups.hasOwnProperty(sequenceKey)) {\n continue;\n }\n\n let lowestScore: number = Number.MAX_VALUE;\n let similarEdge: IPotentialEdge = null;\n\n for (let potentialEdge of sequenceGroups[sequenceKey]) {\n let score: number = calculateScore(potentialEdge);\n\n if (score < lowestScore) {\n lowestScore = score;\n similarEdge = potentialEdge;\n }\n }\n\n if (similarEdge == null) {\n continue;\n }\n\n similarEdges.push(similarEdge);\n }\n\n\n return similarEdges\n .map<IEdge>(\n (potentialEdge: IPotentialEdge): IEdge => {\n return {\n data: {\n direction: EdgeDirection.Similar,\n worldMotionAzimuth: potentialEdge.worldMotionAzimuth,\n },\n from: node.key,\n to: potentialEdge.key,\n };\n });\n }\n\n /**\n * Computes the step edges for a perspective node.\n *\n * @description Step edge targets can only be other perspective nodes.\n * Returns an empty array for cropped and full panoramas.\n *\n * @param {Node} node - Source node.\n * @param {Array<IPotentialEdge>} potentialEdges - Potential edges.\n * @param {string} prevKey - Key of previous node in sequence.\n * @param {string} prevKey - Key of next node in sequence.\n * @throws {ArgumentMapillaryError} If node is not full.\n */\n public computeStepEdges(\n node: Node,\n potentialEdges: IPotentialEdge[],\n prevKey: string,\n nextKey: string): IEdge[] {\n\n if (!node.full) {\n throw new ArgumentMapillaryError(\"Node has to be full.\");\n }\n\n let edges: IEdge[] = [];\n\n if (node.pano) {\n return edges;\n }\n\n for (let k in this._directions.steps) {\n if (!this._directions.steps.hasOwnProperty(k)) {\n continue;\n }\n\n let step: IStep = this._directions.steps[k];\n\n let lowestScore: number = Number.MAX_VALUE;\n let edge: IPotentialEdge = null;\n let fallback: IPotentialEdge = null;\n\n for (let potential of potentialEdges) {\n if (potential.croppedPano || potential.fullPano) {\n continue;\n }\n\n if (Math.abs(potential.directionChange) > this._settings.stepMaxDirectionChange) {\n continue;\n }\n\n let motionDifference: number =\n this._spatial.angleDifference(step.motionChange, potential.motionChange);\n let directionMotionDifference: number =\n this._spatial.angleDifference(potential.directionChange, motionDifference);\n let drift: number =\n Math.max(Math.abs(motionDifference), Math.abs(directionMotionDifference));\n\n if (Math.abs(drift) > this._settings.stepMaxDrift) {\n continue;\n }\n\n let potentialKey: string = potential.key;\n if (step.useFallback && (potentialKey === prevKey || potentialKey === nextKey)) {\n fallback = potential;\n }\n\n if (potential.distance > this._settings.stepMaxDistance) {\n continue;\n }\n\n motionDifference = Math.sqrt(\n motionDifference * motionDifference +\n potential.verticalMotion * potential.verticalMotion);\n\n let score: number =\n this._coefficients.stepPreferredDistance *\n Math.abs(potential.distance - this._settings.stepPreferredDistance) /\n this._settings.stepMaxDistance +\n this._coefficients.stepMotion * motionDifference / this._settings.stepMaxDrift +\n this._coefficients.stepRotation * potential.rotation / this._settings.stepMaxDirectionChange +\n this._coefficients.stepSequencePenalty * (potential.sameSequence ? 0 : 1) +\n this._coefficients.stepMergeCCPenalty * (potential.sameMergeCC ? 0 : 1);\n\n if (score < lowestScore) {\n lowestScore = score;\n edge = potential;\n }\n }\n\n edge = edge == null ? fallback : edge;\n if (edge != null) {\n edges.push({\n data: {\n direction: step.direction,\n worldMotionAzimuth: edge.worldMotionAzimuth,\n },\n from: node.key,\n to: edge.key,\n });\n }\n }\n\n return edges;\n }\n\n /**\n * Computes the turn edges for a perspective node.\n *\n * @description Turn edge targets can only be other perspective images.\n * Returns an empty array for cropped and full panoramas.\n *\n * @param {Node} node - Source node.\n * @param {Array<IPotentialEdge>} potentialEdges - Potential edges.\n * @throws {ArgumentMapillaryError} If node is not full.\n */\n public computeTurnEdges(node: Node, potentialEdges: IPotentialEdge[]): IEdge[] {\n if (!node.full) {\n throw new ArgumentMapillaryError(\"Node has to be full.\");\n }\n\n let edges: IEdge[] = [];\n\n if (node.pano) {\n return edges;\n }\n\n for (let k in this._directions.turns) {\n if (!this._directions.turns.hasOwnProperty(k)) {\n continue;\n }\n\n let turn: ITurn = this._directions.turns[k];\n\n let lowestScore: number = Number.MAX_VALUE;\n let edge: IPotentialEdge = null;\n\n for (let potential of potentialEdges) {\n if (potential.croppedPano || potential.fullPano) {\n continue;\n }\n\n if (potential.distance > this._settings.turnMaxDistance) {\n continue;\n }\n\n let rig: boolean =\n turn.direction !== EdgeDirection.TurnU &&\n potential.distance < this._settings.turnMaxRigDistance &&\n Math.abs(potential.directionChange) > this._settings.turnMinRigDirectionChange;\n\n let directionDifference: number = this._spatial.angleDifference(\n turn.directionChange, potential.directionChange);\n\n let score: number;\n\n if (\n rig &&\n potential.directionChange * turn.directionChange > 0 &&\n Math.abs(potential.directionChange) < Math.abs(turn.directionChange)) {\n score = -Math.PI / 2 + Math.abs(potential.directionChange);\n } else {\n if (Math.abs(directionDifference) > this._settings.turnMaxDirectionChange) {\n continue;\n }\n\n let motionDifference: number = turn.motionChange ?\n this._spatial.angleDifference(turn.motionChange, potential.motionChange) : 0;\n\n motionDifference = Math.sqrt(\n motionDifference * motionDifference +\n potential.verticalMotion * potential.verticalMotion);\n\n score =\n this._coefficients.turnDistance * potential.distance /\n this._settings.turnMaxDistance +\n this._coefficients.turnMotion * motionDifference / Math.PI +\n this._coefficients.turnSequencePenalty * (potential.sameSequence ? 0 : 1) +\n this._coefficients.turnMergeCCPenalty * (potential.sameMergeCC ? 0 : 1);\n }\n\n if (score < lowestScore) {\n lowestScore = score;\n edge = potential;\n }\n }\n\n if (edge != null) {\n edges.push({\n data: {\n direction: turn.direction,\n worldMotionAzimuth: edge.worldMotionAzimuth,\n },\n from: node.key,\n to: edge.key,\n });\n }\n }\n\n return edges;\n }\n\n /**\n * Computes the pano edges for a perspective node.\n *\n * @description Perspective to pano edge targets can only be\n * full pano nodes. Returns an empty array for cropped and full panoramas.\n *\n * @param {Node} node - Source node.\n * @param {Array<IPotentialEdge>} potentialEdges - Potential edges.\n * @throws {ArgumentMapillaryError} If node is not full.\n */\n public computePerspectiveToPanoEdges(node: Node, potentialEdges: IPotentialEdge[]): IEdge[] {\n if (!node.full) {\n throw new ArgumentMapillaryError(\"Node has to be full.\");\n }\n\n if (node.pano) {\n return [];\n }\n\n let lowestScore: number = Number.MAX_VALUE;\n let edge: IPotentialEdge = null;\n\n for (let potential of potentialEdges) {\n if (!potential.fullPano) {\n continue;\n }\n\n let score: number =\n this._coefficients.panoPreferredDistance *\n Math.abs(potential.distance - this._settings.panoPreferredDistance) /\n this._settings.panoMaxDistance +\n this._coefficients.panoMotion * Math.abs(potential.motionChange) / Math.PI +\n this._coefficients.panoMergeCCPenalty * (potential.sameMergeCC ? 0 : 1);\n\n if (score < lowestScore) {\n lowestScore = score;\n edge = potential;\n }\n }\n\n if (edge == null) {\n return [];\n }\n\n return [\n {\n data: {\n direction: EdgeDirection.Pano,\n worldMotionAzimuth: edge.worldMotionAzimuth,\n },\n from: node.key,\n to: edge.key,\n },\n ];\n }\n\n /**\n * Computes the full pano and step edges for a full pano node.\n *\n * @description Pano to pano edge targets can only be\n * full pano nodes. Pano to step edge targets can only be perspective\n * nodes.\n * Returns an empty array for cropped panoramas and perspective nodes.\n *\n * @param {Node} node - Source node.\n * @param {Array<IPotentialEdge>} potentialEdges - Potential edges.\n * @throws {ArgumentMapillaryError} If node is not full.\n */\n public computePanoEdges(node: Node, potentialEdges: IPotentialEdge[]): IEdge[] {\n if (!node.full) {\n throw new ArgumentMapillaryError(\"Node has to be full.\");\n }\n\n if (!node.fullPano) {\n return [];\n }\n\n let panoEdges: IEdge[] = [];\n let potentialPanos: IPotentialEdge[] = [];\n let potentialSteps: [EdgeDirection, IPotentialEdge][] = [];\n\n for (let potential of potentialEdges) {\n if (potential.distance > this._settings.panoMaxDistance) {\n continue;\n }\n\n if (potential.fullPano) {\n if (potential.distance < this._settings.panoMinDistance) {\n continue;\n }\n\n potentialPanos.push(potential);\n } else {\n if (potential.croppedPano) {\n continue;\n }\n\n for (let k in this._directions.panos) {\n if (!this._directions.panos.hasOwnProperty(k)) {\n continue;\n }\n\n let pano: IPano = this._directions.panos[k];\n\n let turn: number = this._spatial.angleDifference(\n potential.directionChange,\n potential.motionChange);\n\n let turnChange: number = this._spatial.angleDifference(pano.directionChange, turn);\n\n if (Math.abs(turnChange) > this._settings.panoMaxStepTurnChange) {\n continue;\n }\n\n potentialSteps.push([pano.direction, potential]);\n\n // break if step direction found\n break;\n }\n }\n }\n\n let maxRotationDifference: number = Math.PI / this._settings.panoMaxItems;\n let occupiedAngles: number[] = [];\n let stepAngles: number[] = [];\n\n for (let index: number = 0; index < this._settings.panoMaxItems; index++) {\n let rotation: number = index / this._settings.panoMaxItems * 2 * Math.PI;\n\n let lowestScore: number = Number.MAX_VALUE;\n let edge: IPotentialEdge = null;\n\n for (let potential of potentialPanos) {\n let motionDifference: number = this._spatial.angleDifference(rotation, potential.motionChange);\n\n if (Math.abs(motionDifference) > maxRotationDifference) {\n continue;\n }\n\n let occupiedDifference: number = Number.MAX_VALUE;\n for (let occupiedAngle of occupiedAngles) {\n let difference: number = Math.abs(this._spatial.angleDifference(occupiedAngle, potential.motionChange));\n if (difference < occupiedDifference) {\n occupiedDifference = difference;\n }\n }\n\n if (occupiedDifference <= maxRotationDifference) {\n continue;\n }\n\n let score: number =\n this._coefficients.panoPreferredDistance *\n Math.abs(potential.distance - this._settings.panoPreferredDistance) /\n this._settings.panoMaxDistance +\n this._coefficients.panoMotion * Math.abs(motionDifference) / maxRotationDifference +\n this._coefficients.panoSequencePenalty * (potential.sameSequence ? 0 : 1) +\n this._coefficients.panoMergeCCPenalty * (potential.sameMergeCC ? 0 : 1);\n\n if (score < lowestScore) {\n lowestScore = score;\n edge = potential;\n }\n }\n\n if (edge != null) {\n occupiedAngles.push(edge.motionChange);\n panoEdges.push({\n data: {\n direction: EdgeDirection.Pano,\n worldMotionAzimuth: edge.worldMotionAzimuth,\n },\n from: node.key,\n to: edge.key,\n });\n } else {\n stepAngles.push(rotation);\n }\n }\n\n let occupiedStepAngles: {[direction: string]: number[] } = {};\n occupiedStepAngles[EdgeDirection.Pano] = occupiedAngles;\n occupiedStepAngles[EdgeDirection.StepForward] = [];\n occupiedStepAngles[EdgeDirection.StepLeft] = [];\n occupiedStepAngles[EdgeDirection.StepBackward] = [];\n occupiedStepAngles[EdgeDirection.StepRight] = [];\n\n for (let stepAngle of stepAngles) {\n let occupations: [EdgeDirection, IPotentialEdge][] = [];\n\n for (let k in this._directions.panos) {\n if (!this._directions.panos.hasOwnProperty(k)) {\n continue;\n }\n\n let pano: IPano = this._directions.panos[k];\n\n let allOccupiedAngles: number[] = occupiedStepAngles[EdgeDirection.Pano]\n .concat(occupiedStepAngles[pano.direction])\n .concat(occupiedStepAngles[pano.prev])\n .concat(occupiedStepAngles[pano.next]);\n\n let lowestScore: number = Number.MAX_VALUE;\n let edge: [EdgeDirection, IPotentialEdge] = null;\n\n for (let potential of potentialSteps) {\n if (potential[0] !== pano.direction) {\n continue;\n }\n\n let motionChange: number = this._spatial.angleDifference(stepAngle, potential[1].motionChange);\n\n if (Math.abs(motionChange) > maxRotationDifference) {\n continue;\n }\n\n let minOccupiedDifference: number = Number.MAX_VALUE;\n for (let occupiedAngle of allOccupiedAngles) {\n let occupiedDifference: number =\n Math.abs(this._spatial.angleDifference(occupiedAngle, potential[1].motionChange));\n\n if (occupiedDifference < minOccupiedDifference) {\n minOccupiedDifference = occupiedDifference;\n }\n }\n\n if (minOccupiedDifference <= maxRotationDifference) {\n continue;\n }\n\n let score: number = this._coefficients.panoPreferredDistance *\n Math.abs(potential[1].distance - this._settings.panoPreferredDistance) /\n this._settings.panoMaxDistance +\n this._coefficients.panoMotion * Math.abs(motionChange) / maxRotationDifference +\n this._coefficients.panoMergeCCPenalty * (potential[1].sameMergeCC ? 0 : 1);\n\n if (score < lowestScore) {\n lowestScore = score;\n edge = potential;\n }\n }\n\n if (edge != null) {\n occupations.push(edge);\n panoEdges.push({\n data: {\n direction: edge[0],\n worldMotionAzimuth: edge[1].worldMotionAzimuth,\n },\n from: node.key,\n to: edge[1].key,\n });\n }\n }\n\n for (let occupation of occupations) {\n occupiedStepAngles[occupation[0]].push(occupation[1].motionChange);\n }\n }\n\n return panoEdges;\n }\n}\n\nexport default EdgeCalculator;\n",
+ "import {merge as observableMerge, from as observableFrom, of as observableOf, Observable, Subject} from \"rxjs\";\n\nimport {tap, refCount, catchError, publish, finalize, map, reduce, mergeMap, mergeAll, last} from \"rxjs/operators\";\nimport * as rbush from \"rbush\";\n\nimport {\n APIv3,\n ICoreNode,\n IFillNode,\n IFullNode,\n ILatLon,\n ISequence,\n} from \"../API\";\nimport {\n IEdge,\n IPotentialEdge,\n EdgeCalculator,\n} from \"../Edge\";\nimport {GraphMapillaryError} from \"../Error\";\nimport {\n FilterCreator,\n FilterExpression,\n FilterFunction,\n IGraphConfiguration,\n Node,\n NodeCache,\n Sequence,\n GraphCalculator,\n} from \"../Graph\";\n\ntype NodeIndexItem = {\n lat: number;\n lon: number;\n node: Node;\n};\n\ntype NodeTiles = {\n cache: string[];\n caching: string[];\n};\n\ntype SpatialArea = {\n all: { [key: string]: Node };\n cacheKeys: string[];\n cacheNodes: { [key: string]: Node };\n};\n\ntype NodeAccess = {\n node: Node;\n accessed: number;\n};\n\ntype TileAccess = {\n nodes: Node[];\n accessed: number;\n};\n\ntype SequenceAccess = {\n sequence: Sequence;\n accessed: number;\n};\n\n/**\n * @class Graph\n *\n * @classdesc Represents a graph of nodes with edges.\n */\nexport class Graph {\n private _apiV3: APIv3;\n\n /**\n * Nodes that have initialized cache with a timestamp of last access.\n */\n private _cachedNodes: { [key: string]: NodeAccess };\n\n /**\n * Nodes for which the required tiles are cached.\n */\n private _cachedNodeTiles: { [key: string]: boolean };\n\n /**\n * Sequences for which the nodes are cached.\n */\n private _cachedSequenceNodes: { [sequenceKey: string]: boolean };\n\n /**\n * Nodes for which the spatial edges are cached.\n */\n private _cachedSpatialEdges: { [key: string]: Node };\n\n /**\n * Cached tiles with a timestamp of last access.\n */\n private _cachedTiles: { [h: string]: TileAccess };\n\n /**\n * Nodes for which fill properties are being retreived.\n */\n private _cachingFill$: { [key: string]: Observable<Graph> };\n\n /**\n * Nodes for which full properties are being retrieved.\n */\n private _cachingFull$: { [key: string]: Observable<Graph> };\n\n /**\n * Sequences for which the nodes are being retrieved.\n */\n private _cachingSequenceNodes$: { [sequenceKey: string]: Observable<Graph> };\n\n /**\n * Sequences that are being retrieved.\n */\n private _cachingSequences$: { [sequenceKey: string]: Observable<Graph> };\n\n /**\n * Nodes for which the spatial area fill properties are being retrieved.\n */\n private _cachingSpatialArea$: { [key: string]: Observable<Graph>[] };\n\n /**\n * Tiles that are being retrieved.\n */\n private _cachingTiles$: { [h: string]: Observable<Graph> };\n\n private _changed$: Subject<Graph>;\n\n private _defaultAlt: number;\n private _edgeCalculator: EdgeCalculator;\n private _filter: FilterFunction;\n private _filterCreator: FilterCreator;\n private _graphCalculator: GraphCalculator;\n private _configuration: IGraphConfiguration;\n\n /**\n * All nodes in the graph.\n */\n private _nodes: { [key: string]: Node };\n\n /**\n * Contains all nodes in the graph. Used for fast spatial lookups.\n */\n private _nodeIndex: rbush.RBush<NodeIndexItem>;\n\n /**\n * All node index items sorted in tiles for easy uncache.\n */\n private _nodeIndexTiles: { [h: string]: NodeIndexItem[] };\n\n /**\n * Node to tile dictionary for easy tile access updates.\n */\n private _nodeToTile: { [key: string]: string };\n\n /**\n * Nodes retrieved before tiles, stored on tile level.\n */\n private _preStored: { [h: string]: { [key: string]: Node } };\n\n /**\n * Tiles required for a node to retrive spatial area.\n */\n private _requiredNodeTiles: { [key: string]: NodeTiles };\n\n /**\n * Other nodes required for node to calculate spatial edges.\n */\n private _requiredSpatialArea: { [key: string]: SpatialArea };\n\n /**\n * All sequences in graph with a timestamp of last access.\n */\n private _sequences: { [skey: string]: SequenceAccess };\n\n private _tilePrecision: number;\n private _tileThreshold: number;\n\n /**\n * Create a new graph instance.\n *\n * @param {APIv3} [apiV3] - API instance for retrieving data.\n * @param {rbush.RBush<NodeIndexItem>} [nodeIndex] - Node index for fast spatial retreival.\n * @param {GraphCalculator} [graphCalculator] - Instance for graph calculations.\n * @param {EdgeCalculator} [edgeCalculator] - Instance for edge calculations.\n * @param {FilterCreator} [filterCreator] - Instance for filter creation.\n * @param {IGraphConfiguration} [configuration] - Configuration struct.\n */\n constructor(\n apiV3: APIv3,\n nodeIndex?: rbush.RBush<NodeIndexItem>,\n graphCalculator?: GraphCalculator,\n edgeCalculator?: EdgeCalculator,\n filterCreator?: FilterCreator,\n configuration?: IGraphConfiguration) {\n\n this._apiV3 = apiV3;\n\n this._cachedNodes = {};\n this._cachedNodeTiles = {};\n this._cachedSequenceNodes = {};\n this._cachedSpatialEdges = {};\n this._cachedTiles = {};\n\n this._cachingFill$ = {};\n this._cachingFull$ = {};\n this._cachingSequenceNodes$ = {};\n this._cachingSequences$ = {};\n this._cachingSpatialArea$ = {};\n this._cachingTiles$ = {};\n\n this._changed$ = new Subject<Graph>();\n\n this._defaultAlt = 2;\n this._edgeCalculator = edgeCalculator != null ? edgeCalculator : new EdgeCalculator();\n this._filterCreator = filterCreator != null ? filterCreator : new FilterCreator();\n this._filter = this._filterCreator.createFilter(undefined);\n this._graphCalculator = graphCalculator != null ? graphCalculator : new GraphCalculator();\n this._configuration = configuration != null ?\n configuration :\n {\n maxSequences: 50,\n maxUnusedNodes: 100,\n maxUnusedPreStoredNodes: 30,\n maxUnusedTiles: 20,\n };\n\n this._nodes = {};\n this._nodeIndex = nodeIndex != null ? nodeIndex : rbush<NodeIndexItem>(16, [\".lat\", \".lon\", \".lat\", \".lon\"]);\n this._nodeIndexTiles = {};\n this._nodeToTile = {};\n\n this._preStored = {};\n\n this._requiredNodeTiles = {};\n this._requiredSpatialArea = {};\n\n this._sequences = {};\n\n this._tilePrecision = 7;\n this._tileThreshold = 20;\n }\n\n /**\n * Get changed$.\n *\n * @returns {Observable<Graph>} Observable emitting\n * the graph every time it has changed.\n */\n public get changed$(): Observable<Graph> {\n return this._changed$;\n }\n\n /**\n * Caches the full node data for all images within a bounding\n * box.\n *\n * @description The node assets are not cached.\n *\n * @param {ILatLon} sw - South west corner of bounding box.\n * @param {ILatLon} ne - North east corner of bounding box.\n * @returns {Observable<Graph>} Observable emitting the full\n * nodes in the bounding box.\n */\n public cacheBoundingBox$(sw: ILatLon, ne: ILatLon): Observable<Node[]> {\n const cacheTiles$: Observable<Graph>[] = this._graphCalculator.encodeHsFromBoundingBox(sw, ne)\n .filter(\n (h: string): boolean => {\n return !(h in this._cachedTiles);\n })\n .map(\n (h): Observable<Graph> => {\n return h in this._cachingTiles$ ?\n this._cachingTiles$[h] :\n this._cacheTile$(h);\n });\n\n if (cacheTiles$.length === 0) {\n cacheTiles$.push(observableOf(this));\n }\n\n return observableFrom(cacheTiles$).pipe(\n mergeAll(),\n last(),\n mergeMap(\n (graph: Graph): Observable<Node[]> => {\n const nodes: Node[] = this._nodeIndex\n .search({\n maxX: ne.lat,\n maxY: ne.lon,\n minX: sw.lat,\n minY: sw.lon,\n })\n .map(\n (item: NodeIndexItem): Node => {\n return item.node;\n });\n\n const fullNodes: Node[] = [];\n const coreNodes: string[] = [];\n\n for (const node of nodes) {\n if (node.full) {\n fullNodes.push(node);\n } else {\n coreNodes.push(node.key);\n }\n }\n\n const coreNodeBatches: string[][] = [];\n const batchSize: number = 200;\n while (coreNodes.length > 0) {\n coreNodeBatches.push(coreNodes.splice(0, batchSize));\n }\n\n const fullNodes$: Observable<Node[]> = observableOf(fullNodes);\n const fillNodes$: Observable<Node[]>[] = coreNodeBatches\n .map(\n (batch: string[]): Observable<Node[]> => {\n return this._apiV3.imageByKeyFill$(batch).pipe(\n map(\n (imageByKeyFill: { [key: string]: IFillNode }): Node[] => {\n const filledNodes: Node[] = [];\n\n for (const fillKey in imageByKeyFill) {\n if (!imageByKeyFill.hasOwnProperty(fillKey)) {\n continue;\n }\n\n if (this.hasNode(fillKey)) {\n const node: Node = this.getNode(fillKey);\n\n if (!node.full) {\n this._makeFull(node, imageByKeyFill[fillKey]);\n }\n\n filledNodes.push(node);\n }\n }\n\n return filledNodes;\n }));\n });\n\n return observableMerge(\n fullNodes$,\n observableFrom(fillNodes$).pipe(\n mergeAll()));\n }),\n reduce(\n (acc: Node[], value: Node[]): Node[] => {\n return acc.concat(value);\n }));\n }\n\n /**\n * Retrieve and cache node fill properties.\n *\n * @param {string} key - Key of node to fill.\n * @returns {Observable<Graph>} Observable emitting the graph\n * when the node has been updated.\n * @throws {GraphMapillaryError} When the operation is not valid on the\n * current graph.\n */\n public cacheFill$(key: string): Observable<Graph> {\n if (key in this._cachingFull$) {\n throw new GraphMapillaryError(`Cannot fill node while caching full (${key}).`);\n }\n\n if (!this.hasNode(key)) {\n throw new GraphMapillaryError(`Cannot fill node that does not exist in graph (${key}).`);\n }\n\n if (key in this._cachingFill$) {\n return this._cachingFill$[key];\n }\n\n let node: Node = this.getNode(key);\n if (node.full) {\n throw new GraphMapillaryError(`Cannot fill node that is already full (${key}).`);\n }\n\n this._cachingFill$[key] = this._apiV3.imageByKeyFill$([key]).pipe(\n tap(\n (imageByKeyFill: { [key: string]: IFillNode }): void => {\n if (!node.full) {\n this._makeFull(node, imageByKeyFill[key]);\n }\n\n delete this._cachingFill$[key];\n }),\n map(\n (imageByKeyFill: { [key: string]: IFillNode }): Graph => {\n return this;\n }),\n finalize(\n (): void => {\n if (key in this._cachingFill$) {\n delete this._cachingFill$[key];\n }\n\n this._changed$.next(this);\n }),\n publish(),\n refCount());\n\n return this._cachingFill$[key];\n }\n\n /**\n * Retrieve and cache full node properties.\n *\n * @param {string} key - Key of node to fill.\n * @returns {Observable<Graph>} Observable emitting the graph\n * when the node has been updated.\n * @throws {GraphMapillaryError} When the operation is not valid on the\n * current graph.\n */\n public cacheFull$(key: string): Observable<Graph> {\n if (key in this._cachingFull$) {\n return this._cachingFull$[key];\n }\n\n if (this.hasNode(key)) {\n throw new GraphMapillaryError(`Cannot cache full node that already exist in graph (${key}).`);\n }\n\n this._cachingFull$[key] = this._apiV3.imageByKeyFull$([key]).pipe(\n tap(\n (imageByKeyFull: { [key: string]: IFullNode }): void => {\n let fn: IFullNode = imageByKeyFull[key];\n\n if (this.hasNode(key)) {\n let node: Node = this.getNode(key);\n\n if (!node.full) {\n this._makeFull(node, fn);\n }\n } else {\n if (fn.sequence_key == null) {\n throw new GraphMapillaryError(`Node has no sequence key (${key}).`);\n }\n\n let node: Node = new Node(fn);\n this._makeFull(node, fn);\n\n let h: string = this._graphCalculator.encodeH(node.originalLatLon, this._tilePrecision);\n this._preStore(h, node);\n this._setNode(node);\n\n delete this._cachingFull$[key];\n }\n }),\n map(\n (imageByKeyFull: { [key: string]: IFullNode }): Graph => {\n return this;\n }),\n finalize(\n (): void => {\n if (key in this._cachingFull$) {\n delete this._cachingFull$[key];\n }\n\n this._changed$.next(this);\n }),\n publish(),\n refCount());\n\n return this._cachingFull$[key];\n }\n\n /**\n * Retrieve and cache a node sequence.\n *\n * @param {string} key - Key of node for which to retrieve sequence.\n * @returns {Observable<Graph>} Observable emitting the graph\n * when the sequence has been retrieved.\n * @throws {GraphMapillaryError} When the operation is not valid on the\n * current graph.\n */\n public cacheNodeSequence$(key: string): Observable<Graph> {\n if (!this.hasNode(key)) {\n throw new GraphMapillaryError(`Cannot cache sequence edges of node that does not exist in graph (${key}).`);\n }\n\n let node: Node = this.getNode(key);\n if (node.sequenceKey in this._sequences) {\n throw new GraphMapillaryError(`Sequence already cached (${key}), (${node.sequenceKey}).`);\n }\n\n return this._cacheSequence$(node.sequenceKey);\n }\n\n /**\n * Retrieve and cache a sequence.\n *\n * @param {string} sequenceKey - Key of sequence to cache.\n * @returns {Observable<Graph>} Observable emitting the graph\n * when the sequence has been retrieved.\n * @throws {GraphMapillaryError} When the operation is not valid on the\n * current graph.\n */\n public cacheSequence$(sequenceKey: string): Observable<Graph> {\n if (sequenceKey in this._sequences) {\n throw new GraphMapillaryError(`Sequence already cached (${sequenceKey})`);\n }\n\n return this._cacheSequence$(sequenceKey);\n }\n\n /**\n * Cache sequence edges for a node.\n *\n * @param {string} key - Key of node.\n * @throws {GraphMapillaryError} When the operation is not valid on the\n * current graph.\n */\n public cacheSequenceEdges(key: string): void {\n let node: Node = this.getNode(key);\n\n if (!(node.sequenceKey in this._sequences)) {\n throw new GraphMapillaryError(`Sequence is not cached (${key}), (${node.sequenceKey})`);\n }\n\n let sequence: Sequence = this._sequences[node.sequenceKey].sequence;\n let edges: IEdge[] = this._edgeCalculator.computeSequenceEdges(node, sequence);\n\n node.cacheSequenceEdges(edges);\n }\n\n /**\n * Retrieve and cache full nodes for all keys in a sequence.\n *\n * @param {string} sequenceKey - Key of sequence.\n * @param {string} referenceNodeKey - Key of node to use as reference\n * for optimized caching.\n * @returns {Observable<Graph>} Observable emitting the graph\n * when the nodes of the sequence has been cached.\n */\n public cacheSequenceNodes$(sequenceKey: string, referenceNodeKey?: string): Observable<Graph> {\n if (!this.hasSequence(sequenceKey)) {\n throw new GraphMapillaryError(\n `Cannot cache sequence nodes of sequence that does not exist in graph (${sequenceKey}).`);\n }\n\n if (this.hasSequenceNodes(sequenceKey)) {\n throw new GraphMapillaryError(`Sequence nodes already cached (${sequenceKey}).`);\n }\n\n const sequence: Sequence = this.getSequence(sequenceKey);\n if (sequence.key in this._cachingSequenceNodes$) {\n return this._cachingSequenceNodes$[sequence.key];\n }\n\n const batches: string[][] = [];\n const keys: string[] = sequence.keys.slice();\n\n const referenceBatchSize: number = 50;\n if (!!referenceNodeKey && keys.length > referenceBatchSize) {\n const referenceIndex: number = keys.indexOf(referenceNodeKey);\n const startIndex: number = Math.max(\n 0,\n Math.min(\n referenceIndex - referenceBatchSize / 2,\n keys.length - referenceBatchSize));\n\n batches.push(keys.splice(startIndex, referenceBatchSize));\n }\n\n const batchSize: number = 200;\n while (keys.length > 0) {\n batches.push(keys.splice(0, batchSize));\n }\n\n let batchesToCache: number = batches.length;\n const sequenceNodes$: Observable<Graph> = observableFrom(batches).pipe(\n mergeMap(\n (batch: string[]): Observable<Graph> => {\n return this._apiV3.imageByKeyFull$(batch).pipe(\n tap(\n (imageByKeyFull: { [key: string]: IFullNode }): void => {\n for (const fullKey in imageByKeyFull) {\n if (!imageByKeyFull.hasOwnProperty(fullKey)) {\n continue;\n }\n\n const fn: IFullNode = imageByKeyFull[fullKey];\n\n if (this.hasNode(fullKey)) {\n const node: Node = this.getNode(fn.key);\n\n if (!node.full) {\n this._makeFull(node, fn);\n }\n } else {\n if (fn.sequence_key == null) {\n console.warn(`Sequence missing, discarding node (${fn.key})`);\n }\n\n const node: Node = new Node(fn);\n this._makeFull(node, fn);\n\n const h: string = this._graphCalculator.encodeH(node.originalLatLon, this._tilePrecision);\n this._preStore(h, node);\n this._setNode(node);\n }\n }\n\n batchesToCache--;\n }),\n map(\n (imageByKeyFull: { [key: string]: IFullNode }): Graph => {\n return this;\n }));\n },\n 6),\n last(),\n finalize(\n (): void => {\n delete this._cachingSequenceNodes$[sequence.key];\n\n if (batchesToCache === 0) {\n this._cachedSequenceNodes[sequence.key] = true;\n }\n }),\n publish(),\n refCount());\n\n this._cachingSequenceNodes$[sequence.key] = sequenceNodes$;\n\n return sequenceNodes$;\n }\n\n /**\n * Retrieve and cache full nodes for a node spatial area.\n *\n * @param {string} key - Key of node for which to retrieve sequence.\n * @returns {Observable<Graph>} Observable emitting the graph\n * when the nodes in the spatial area has been made full.\n * @throws {GraphMapillaryError} When the operation is not valid on the\n * current graph.\n */\n public cacheSpatialArea$(key: string): Observable<Graph>[] {\n if (!this.hasNode(key)) {\n throw new GraphMapillaryError(`Cannot cache spatial area of node that does not exist in graph (${key}).`);\n }\n\n if (key in this._cachedSpatialEdges) {\n throw new GraphMapillaryError(`Node already spatially cached (${key}).`);\n }\n\n if (!(key in this._requiredSpatialArea)) {\n throw new GraphMapillaryError(`Spatial area not determined (${key}).`);\n }\n\n let spatialArea: SpatialArea = this._requiredSpatialArea[key];\n if (Object.keys(spatialArea.cacheNodes).length === 0) {\n throw new GraphMapillaryError(`Spatial nodes already cached (${key}).`);\n }\n\n if (key in this._cachingSpatialArea$) {\n return this._cachingSpatialArea$[key];\n }\n\n let batches: string[][] = [];\n while (spatialArea.cacheKeys.length > 0) {\n batches.push(spatialArea.cacheKeys.splice(0, 200));\n }\n\n let batchesToCache: number = batches.length;\n let spatialNodes$: Observable<Graph>[] = [];\n\n for (let batch of batches) {\n let spatialNodeBatch$: Observable<Graph> = this._apiV3.imageByKeyFill$(batch).pipe(\n tap(\n (imageByKeyFill: { [key: string]: IFillNode }): void => {\n for (let fillKey in imageByKeyFill) {\n if (!imageByKeyFill.hasOwnProperty(fillKey)) {\n continue;\n }\n\n let spatialNode: Node = spatialArea.cacheNodes[fillKey];\n if (spatialNode.full) {\n delete spatialArea.cacheNodes[fillKey];\n continue;\n }\n\n let fillNode: IFillNode = imageByKeyFill[fillKey];\n this._makeFull(spatialNode, fillNode);\n\n delete spatialArea.cacheNodes[fillKey];\n }\n\n if (--batchesToCache === 0) {\n delete this._cachingSpatialArea$[key];\n }\n }),\n map(\n (imageByKeyFill: { [key: string]: IFillNode }): Graph => {\n return this;\n }),\n catchError(\n (error: Error): Observable<Graph> => {\n for (let batchKey of batch) {\n if (batchKey in spatialArea.all) {\n delete spatialArea.all[batchKey];\n }\n\n if (batchKey in spatialArea.cacheNodes) {\n delete spatialArea.cacheNodes[batchKey];\n }\n }\n\n if (--batchesToCache === 0) {\n delete this._cachingSpatialArea$[key];\n }\n\n throw error;\n }),\n finalize(\n (): void => {\n if (Object.keys(spatialArea.cacheNodes).length === 0) {\n this._changed$.next(this);\n }\n }),\n publish(),\n refCount());\n\n spatialNodes$.push(spatialNodeBatch$);\n }\n\n this._cachingSpatialArea$[key] = spatialNodes$;\n\n return spatialNodes$;\n }\n\n /**\n * Cache spatial edges for a node.\n *\n * @param {string} key - Key of node.\n * @throws {GraphMapillaryError} When the operation is not valid on the\n * current graph.\n */\n public cacheSpatialEdges(key: string): void {\n if (key in this._cachedSpatialEdges) {\n throw new GraphMapillaryError(`Spatial edges already cached (${key}).`);\n }\n\n let node: Node = this.getNode(key);\n let sequence: Sequence = this._sequences[node.sequenceKey].sequence;\n\n let fallbackKeys: string[] = [];\n let prevKey: string = sequence.findPrevKey(node.key);\n if (prevKey != null) {\n fallbackKeys.push(prevKey);\n }\n\n let nextKey: string = sequence.findNextKey(node.key);\n if (nextKey != null) {\n fallbackKeys.push(nextKey);\n }\n\n let allSpatialNodes: { [key: string]: Node } = this._requiredSpatialArea[key].all;\n let potentialNodes: Node[] = [];\n let filter: FilterFunction = this._filter;\n for (let spatialNodeKey in allSpatialNodes) {\n if (!allSpatialNodes.hasOwnProperty(spatialNodeKey)) {\n continue;\n }\n\n let spatialNode: Node = allSpatialNodes[spatialNodeKey];\n\n if (filter(spatialNode)) {\n potentialNodes.push(spatialNode);\n }\n }\n\n let potentialEdges: IPotentialEdge[] =\n this._edgeCalculator.getPotentialEdges(node, potentialNodes, fallbackKeys);\n\n let edges: IEdge[] =\n this._edgeCalculator.computeStepEdges(\n node,\n potentialEdges,\n prevKey,\n nextKey);\n\n edges = edges.concat(this._edgeCalculator.computeTurnEdges(node, potentialEdges));\n edges = edges.concat(this._edgeCalculator.computePanoEdges(node, potentialEdges));\n edges = edges.concat(this._edgeCalculator.computePerspectiveToPanoEdges(node, potentialEdges));\n edges = edges.concat(this._edgeCalculator.computeSimilarEdges(node, potentialEdges));\n\n node.cacheSpatialEdges(edges);\n\n this._cachedSpatialEdges[key] = node;\n delete this._requiredSpatialArea[key];\n delete this._cachedNodeTiles[key];\n }\n\n /**\n * Retrieve and cache geohash tiles for a node.\n *\n * @param {string} key - Key of node for which to retrieve tiles.\n * @returns {Array<Observable<Graph>>} Array of observables emitting\n * the graph for each tile required for the node has been cached.\n * @throws {GraphMapillaryError} When the operation is not valid on the\n * current graph.\n */\n public cacheTiles$(key: string): Observable<Graph>[] {\n if (key in this._cachedNodeTiles) {\n throw new GraphMapillaryError(`Tiles already cached (${key}).`);\n }\n\n if (key in this._cachedSpatialEdges) {\n throw new GraphMapillaryError(`Spatial edges already cached so tiles considered cached (${key}).`);\n }\n\n if (!(key in this._requiredNodeTiles)) {\n throw new GraphMapillaryError(`Tiles have not been determined (${key}).`);\n }\n\n let nodeTiles: NodeTiles = this._requiredNodeTiles[key];\n if (nodeTiles.cache.length === 0 &&\n nodeTiles.caching.length === 0) {\n throw new GraphMapillaryError(`Tiles already cached (${key}).`);\n }\n\n if (!this.hasNode(key)) {\n throw new GraphMapillaryError(`Cannot cache tiles of node that does not exist in graph (${key}).`);\n }\n\n let hs: string[] = nodeTiles.cache.slice();\n nodeTiles.caching = this._requiredNodeTiles[key].caching.concat(hs);\n nodeTiles.cache = [];\n\n let cacheTiles$: Observable<Graph>[] = [];\n\n for (let h of nodeTiles.caching) {\n const cacheTile$: Observable<Graph> = h in this._cachingTiles$ ?\n this._cachingTiles$[h] :\n this._cacheTile$(h);\n\n cacheTiles$.push(\n cacheTile$.pipe(\n tap(\n (graph: Graph): void => {\n let index: number = nodeTiles.caching.indexOf(h);\n if (index > -1) {\n nodeTiles.caching.splice(index, 1);\n }\n\n if (nodeTiles.caching.length === 0 &&\n nodeTiles.cache.length === 0) {\n delete this._requiredNodeTiles[key];\n\n this._cachedNodeTiles[key] = true;\n }\n }),\n catchError(\n (error: Error): Observable<Graph> => {\n let index: number = nodeTiles.caching.indexOf(h);\n if (index > -1) {\n nodeTiles.caching.splice(index, 1);\n }\n\n if (nodeTiles.caching.length === 0 &&\n nodeTiles.cache.length === 0) {\n delete this._requiredNodeTiles[key];\n\n this._cachedNodeTiles[key] = true;\n }\n\n throw error;\n }),\n finalize(\n (): void => {\n this._changed$.next(this);\n }),\n publish(),\n refCount()));\n }\n\n return cacheTiles$;\n }\n\n /**\n * Initialize the cache for a node.\n *\n * @param {string} key - Key of node.\n * @throws {GraphMapillaryError} When the operation is not valid on the\n * current graph.\n */\n public initializeCache(key: string): void {\n if (key in this._cachedNodes) {\n throw new GraphMapillaryError(`Node already in cache (${key}).`);\n }\n\n let node: Node = this.getNode(key);\n node.initializeCache(new NodeCache());\n\n let accessed: number = new Date().getTime();\n this._cachedNodes[key] = { accessed: accessed, node: node };\n\n this._updateCachedTileAccess(key, accessed);\n }\n\n /**\n * Get a value indicating if the graph is fill caching a node.\n *\n * @param {string} key - Key of node.\n * @returns {boolean} Value indicating if the node is being fill cached.\n */\n public isCachingFill(key: string): boolean {\n return key in this._cachingFill$;\n }\n\n /**\n * Get a value indicating if the graph is fully caching a node.\n *\n * @param {string} key - Key of node.\n * @returns {boolean} Value indicating if the node is being fully cached.\n */\n public isCachingFull(key: string): boolean {\n return key in this._cachingFull$;\n }\n\n /**\n * Get a value indicating if the graph is caching a sequence of a node.\n *\n * @param {string} key - Key of node.\n * @returns {boolean} Value indicating if the sequence of a node is\n * being cached.\n */\n public isCachingNodeSequence(key: string): boolean {\n let node: Node = this.getNode(key);\n\n return node.sequenceKey in this._cachingSequences$;\n }\n\n /**\n * Get a value indicating if the graph is caching a sequence.\n *\n * @param {string} sequenceKey - Key of sequence.\n * @returns {boolean} Value indicating if the sequence is\n * being cached.\n */\n public isCachingSequence(sequenceKey: string): boolean {\n return sequenceKey in this._cachingSequences$;\n }\n\n /**\n * Get a value indicating if the graph is caching sequence nodes.\n *\n * @param {string} sequenceKey - Key of sequence.\n * @returns {boolean} Value indicating if the sequence nodes are\n * being cached.\n */\n public isCachingSequenceNodes(sequenceKey: string): boolean {\n return sequenceKey in this._cachingSequenceNodes$;\n }\n\n /**\n * Get a value indicating if the graph is caching the tiles\n * required for calculating spatial edges of a node.\n *\n * @param {string} key - Key of node.\n * @returns {boolean} Value indicating if the tiles of\n * a node are being cached.\n */\n public isCachingTiles(key: string): boolean {\n return key in this._requiredNodeTiles &&\n this._requiredNodeTiles[key].cache.length === 0 &&\n this._requiredNodeTiles[key].caching.length > 0;\n }\n\n /**\n * Get a value indicating if the cache has been initialized\n * for a node.\n *\n * @param {string} key - Key of node.\n * @returns {boolean} Value indicating if the cache has been\n * initialized for a node.\n */\n public hasInitializedCache(key: string): boolean {\n return key in this._cachedNodes;\n }\n\n /**\n * Get a value indicating if a node exist in the graph.\n *\n * @param {string} key - Key of node.\n * @returns {boolean} Value indicating if a node exist in the graph.\n */\n public hasNode(key: string): boolean {\n let accessed: number = new Date().getTime();\n\n this._updateCachedNodeAccess(key, accessed);\n this._updateCachedTileAccess(key, accessed);\n\n return key in this._nodes;\n }\n\n /**\n * Get a value indicating if a node sequence exist in the graph.\n *\n * @param {string} key - Key of node.\n * @returns {boolean} Value indicating if a node sequence exist\n * in the graph.\n */\n public hasNodeSequence(key: string): boolean {\n let node: Node = this.getNode(key);\n let sequenceKey: string = node.sequenceKey;\n\n let hasNodeSequence: boolean = sequenceKey in this._sequences;\n\n if (hasNodeSequence) {\n this._sequences[sequenceKey].accessed = new Date().getTime();\n }\n\n return hasNodeSequence;\n }\n\n /**\n * Get a value indicating if a sequence exist in the graph.\n *\n * @param {string} sequenceKey - Key of sequence.\n * @returns {boolean} Value indicating if a sequence exist\n * in the graph.\n */\n public hasSequence(sequenceKey: string): boolean {\n let hasSequence: boolean = sequenceKey in this._sequences;\n\n if (hasSequence) {\n this._sequences[sequenceKey].accessed = new Date().getTime();\n }\n\n return hasSequence;\n }\n\n /**\n * Get a value indicating if sequence nodes has been cached in the graph.\n *\n * @param {string} sequenceKey - Key of sequence.\n * @returns {boolean} Value indicating if a sequence nodes has been\n * cached in the graph.\n */\n public hasSequenceNodes(sequenceKey: string): boolean {\n return sequenceKey in this._cachedSequenceNodes;\n }\n\n /**\n * Get a value indicating if the graph has fully cached\n * all nodes in the spatial area of a node.\n *\n * @param {string} key - Key of node.\n * @returns {boolean} Value indicating if the spatial area\n * of a node has been cached.\n */\n public hasSpatialArea(key: string): boolean {\n if (!this.hasNode(key)) {\n throw new GraphMapillaryError(`Spatial area nodes cannot be determined if node not in graph (${key}).`);\n }\n\n if (key in this._cachedSpatialEdges) {\n return true;\n }\n\n if (key in this._requiredSpatialArea) {\n return Object.keys(this._requiredSpatialArea[key].cacheNodes).length === 0;\n }\n\n let node: Node = this.getNode(key);\n let bbox: [ILatLon, ILatLon] = this._graphCalculator.boundingBoxCorners(node.latLon, this._tileThreshold);\n\n let spatialItems: NodeIndexItem[] = this._nodeIndex.search({\n maxX: bbox[1].lat,\n maxY: bbox[1].lon,\n minX: bbox[0].lat,\n minY: bbox[0].lon,\n });\n\n let spatialNodes: SpatialArea = {\n all: {},\n cacheKeys: [],\n cacheNodes: {},\n };\n\n for (let spatialItem of spatialItems) {\n spatialNodes.all[spatialItem.node.key] = spatialItem.node;\n\n if (!spatialItem.node.full) {\n spatialNodes.cacheKeys.push(spatialItem.node.key);\n spatialNodes.cacheNodes[spatialItem.node.key] = spatialItem.node;\n }\n }\n\n this._requiredSpatialArea[key] = spatialNodes;\n\n return spatialNodes.cacheKeys.length === 0;\n }\n\n /**\n * Get a value indicating if the graph has a tiles required\n * for a node.\n *\n * @param {string} key - Key of node.\n * @returns {boolean} Value indicating if the the tiles required\n * by a node has been cached.\n */\n public hasTiles(key: string): boolean {\n if (key in this._cachedNodeTiles) {\n return true;\n }\n\n if (key in this._cachedSpatialEdges) {\n return true;\n }\n\n if (!this.hasNode(key)) {\n throw new GraphMapillaryError(`Node does not exist in graph (${key}).`);\n }\n\n let nodeTiles: NodeTiles = { cache: [], caching: [] };\n\n if (!(key in this._requiredNodeTiles)) {\n let node: Node = this.getNode(key);\n nodeTiles.cache = this._graphCalculator\n .encodeHs(\n node.latLon,\n this._tilePrecision,\n this._tileThreshold)\n .filter(\n (h: string): boolean => {\n return !(h in this._cachedTiles);\n });\n\n if (nodeTiles.cache.length > 0) {\n this._requiredNodeTiles[key] = nodeTiles;\n }\n } else {\n nodeTiles = this._requiredNodeTiles[key];\n }\n\n return nodeTiles.cache.length === 0 && nodeTiles.caching.length === 0;\n }\n\n /**\n * Get a node.\n *\n * @param {string} key - Key of node.\n * @returns {Node} Retrieved node.\n */\n public getNode(key: string): Node {\n let accessed: number = new Date().getTime();\n\n this._updateCachedNodeAccess(key, accessed);\n this._updateCachedTileAccess(key, accessed);\n\n return this._nodes[key];\n }\n\n /**\n * Get a sequence.\n *\n * @param {string} sequenceKey - Key of sequence.\n * @returns {Node} Retrieved sequence.\n */\n public getSequence(sequenceKey: string): Sequence {\n let sequenceAccess: SequenceAccess = this._sequences[sequenceKey];\n sequenceAccess.accessed = new Date().getTime();\n\n return sequenceAccess.sequence;\n }\n\n /**\n * Reset all spatial edges of the graph nodes.\n */\n public resetSpatialEdges(): void {\n let cachedKeys: string[] = Object.keys(this._cachedSpatialEdges);\n\n for (let cachedKey of cachedKeys) {\n let node: Node = this._cachedSpatialEdges[cachedKey];\n node.resetSpatialEdges();\n\n delete this._cachedSpatialEdges[cachedKey];\n }\n }\n\n /**\n * Reset the complete graph but keep the nodes corresponding\n * to the supplied keys. All other nodes will be disposed.\n *\n * @param {Array<string>} keepKeys - Keys for nodes to keep\n * in graph after reset.\n */\n public reset(keepKeys: string[]): void {\n const nodes: Node[] = [];\n for (const key of keepKeys) {\n if (!this.hasNode(key)) {\n throw new Error(`Node does not exist ${key}`);\n }\n\n const node: Node = this.getNode(key);\n node.resetSequenceEdges();\n node.resetSpatialEdges();\n nodes.push(node);\n }\n\n for (let cachedKey of Object.keys(this._cachedNodes)) {\n if (keepKeys.indexOf(cachedKey) !== -1) {\n continue;\n }\n\n this._cachedNodes[cachedKey].node.dispose();\n delete this._cachedNodes[cachedKey];\n }\n\n this._cachedNodeTiles = {};\n this._cachedSpatialEdges = {};\n this._cachedTiles = {};\n\n this._cachingFill$ = {};\n this._cachingFull$ = {};\n this._cachingSequences$ = {};\n this._cachingSpatialArea$ = {};\n this._cachingTiles$ = {};\n\n this._nodes = {};\n this._nodeToTile = {};\n\n this._preStored = {};\n\n for (const node of nodes) {\n this._nodes[node.key] = node;\n\n const h: string = this._graphCalculator.encodeH(node.originalLatLon, this._tilePrecision);\n this._preStore(h, node);\n }\n\n this._requiredNodeTiles = {};\n this._requiredSpatialArea = {};\n\n this._sequences = {};\n\n this._nodeIndexTiles = {};\n this._nodeIndex.clear();\n }\n\n /**\n * Set the spatial node filter.\n *\n * @param {FilterExpression} filter - Filter expression to be applied\n * when calculating spatial edges.\n */\n public setFilter(filter: FilterExpression): void {\n this._filter = this._filterCreator.createFilter(filter);\n }\n\n /**\n * Uncache the graph according to the graph configuration.\n *\n * @description Uncaches unused tiles, unused nodes and\n * sequences according to the numbers specified in the\n * graph configuration. Sequences does not have a direct\n * reference to either tiles or nodes and may be uncached\n * even if they are related to the nodes that should be kept.\n *\n * @param {Array<string>} keepKeys - Keys of nodes to keep in\n * graph unrelated to last access. Tiles related to those keys\n * will also be kept in graph.\n * @param {string} keepSequenceKey - Optional key of sequence\n * for which the belonging nodes should not be disposed or\n * removed from the graph. These nodes may still be uncached if\n * not specified in keep keys param.\n */\n public uncache(keepKeys: string[], keepSequenceKey?: string): void {\n let keysInUse: { [key: string]: boolean } = {};\n\n this._addNewKeys(keysInUse, this._cachingFull$);\n this._addNewKeys(keysInUse, this._cachingFill$);\n this._addNewKeys(keysInUse, this._cachingSpatialArea$);\n this._addNewKeys(keysInUse, this._requiredNodeTiles);\n this._addNewKeys(keysInUse, this._requiredSpatialArea);\n\n for (let key of keepKeys) {\n if (key in keysInUse) {\n continue;\n }\n\n keysInUse[key] = true;\n }\n\n let keepHs: { [h: string]: boolean } = {};\n for (let key in keysInUse) {\n if (!keysInUse.hasOwnProperty(key)) {\n continue;\n }\n\n let node: Node = this._nodes[key];\n\n let nodeHs: string[] = this._graphCalculator.encodeHs(node.latLon);\n for (let nodeH of nodeHs) {\n if (!(nodeH in keepHs)) {\n keepHs[nodeH] = true;\n }\n }\n }\n\n let potentialHs: [string, TileAccess][] = [];\n for (let h in this._cachedTiles) {\n if (!this._cachedTiles.hasOwnProperty(h) || h in keepHs) {\n continue;\n }\n\n potentialHs.push([h, this._cachedTiles[h]]);\n }\n\n let uncacheHs: string[] = potentialHs\n .sort(\n (h1: [string, TileAccess], h2: [string, TileAccess]): number => {\n return h2[1].accessed - h1[1].accessed;\n })\n .slice(this._configuration.maxUnusedTiles)\n .map(\n (h: [string, TileAccess]): string => {\n return h[0];\n });\n\n for (let uncacheH of uncacheHs) {\n this._uncacheTile(uncacheH, keepSequenceKey);\n }\n\n let potentialPreStored: [NodeAccess, string][] = [];\n let nonCachedPreStored: [string, string][] = [];\n for (let h in this._preStored) {\n if (!this._preStored.hasOwnProperty(h) || h in this._cachingTiles$) {\n continue;\n }\n\n const prestoredNodes: { [key: string]: Node } = this._preStored[h];\n\n for (let key in prestoredNodes) {\n if (!prestoredNodes.hasOwnProperty(key) || key in keysInUse) {\n continue;\n }\n\n if (prestoredNodes[key].sequenceKey === keepSequenceKey) {\n continue;\n }\n\n if (key in this._cachedNodes) {\n potentialPreStored.push([this._cachedNodes[key], h]);\n } else {\n nonCachedPreStored.push([key, h]);\n }\n }\n }\n\n let uncachePreStored: [string, string][] = potentialPreStored\n .sort(\n ([na1, h1]: [NodeAccess, string], [na2, h2]: [NodeAccess, string]): number => {\n return na2.accessed - na1.accessed;\n })\n .slice(this._configuration.maxUnusedPreStoredNodes)\n .map(\n ([na, h]: [NodeAccess, string]): [string, string] => {\n return [na.node.key, h];\n });\n\n this._uncachePreStored(nonCachedPreStored);\n this._uncachePreStored(uncachePreStored);\n\n let potentialNodes: NodeAccess[] = [];\n for (let key in this._cachedNodes) {\n if (!this._cachedNodes.hasOwnProperty(key) || key in keysInUse) {\n continue;\n }\n\n potentialNodes.push(this._cachedNodes[key]);\n }\n\n let uncacheNodes: NodeAccess[] = potentialNodes\n .sort(\n (n1: NodeAccess, n2: NodeAccess): number => {\n return n2.accessed - n1.accessed;\n })\n .slice(this._configuration.maxUnusedNodes);\n\n for (let nodeAccess of uncacheNodes) {\n nodeAccess.node.uncache();\n let key: string = nodeAccess.node.key;\n delete this._cachedNodes[key];\n\n if (key in this._cachedNodeTiles) {\n delete this._cachedNodeTiles[key];\n }\n\n if (key in this._cachedSpatialEdges) {\n delete this._cachedSpatialEdges[key];\n }\n }\n\n let potentialSequences: SequenceAccess[] = [];\n for (let sequenceKey in this._sequences) {\n if (!this._sequences.hasOwnProperty(sequenceKey) ||\n sequenceKey in this._cachingSequences$ ||\n sequenceKey === keepSequenceKey) {\n continue;\n }\n\n potentialSequences.push(this._sequences[sequenceKey]);\n }\n\n let uncacheSequences: SequenceAccess[] = potentialSequences\n .sort(\n (s1: SequenceAccess, s2: SequenceAccess): number => {\n return s2.accessed - s1.accessed;\n })\n .slice(this._configuration.maxSequences);\n\n for (let sequenceAccess of uncacheSequences) {\n let sequenceKey: string = sequenceAccess.sequence.key;\n\n delete this._sequences[sequenceKey];\n\n if (sequenceKey in this._cachedSequenceNodes) {\n delete this._cachedSequenceNodes[sequenceKey];\n }\n\n sequenceAccess.sequence.dispose();\n }\n }\n\n private _addNewKeys<T>(keys: { [key: string]: boolean }, dict: { [key: string]: T }): void {\n for (let key in dict) {\n if (!dict.hasOwnProperty(key) || !this.hasNode(key)) {\n continue;\n }\n\n if (!(key in keys)) {\n keys[key] = true;\n }\n }\n }\n\n private _cacheSequence$(sequenceKey: string): Observable<Graph> {\n if (sequenceKey in this._cachingSequences$) {\n return this._cachingSequences$[sequenceKey];\n }\n\n this._cachingSequences$[sequenceKey] = this._apiV3.sequenceByKey$([sequenceKey]).pipe(\n tap(\n (sequenceByKey: { [sequenceKey: string]: ISequence }): void => {\n if (!(sequenceKey in this._sequences)) {\n this._sequences[sequenceKey] = {\n accessed: new Date().getTime(),\n sequence: new Sequence(sequenceByKey[sequenceKey]),\n };\n }\n\n delete this._cachingSequences$[sequenceKey];\n }),\n map(\n (sequenceByKey: { [sequenceKey: string]: ISequence }): Graph => {\n return this;\n }),\n finalize(\n (): void => {\n if (sequenceKey in this._cachingSequences$) {\n delete this._cachingSequences$[sequenceKey];\n }\n\n this._changed$.next(this);\n }),\n publish(),\n refCount());\n\n return this._cachingSequences$[sequenceKey];\n }\n\n private _cacheTile$(h: string): Observable<Graph> {\n this._cachingTiles$[h] = this._apiV3.imagesByH$([h]).pipe(\n tap(\n (imagesByH: { [key: string]: { [index: string]: ICoreNode } }): void => {\n let coreNodes: { [index: string]: ICoreNode } = imagesByH[h];\n\n if (h in this._cachedTiles) {\n return;\n }\n\n this._nodeIndexTiles[h] = [];\n this._cachedTiles[h] = { accessed: new Date().getTime(), nodes: [] };\n let hCache: Node[] = this._cachedTiles[h].nodes;\n let preStored: { [key: string]: Node } = this._removeFromPreStore(h);\n\n for (let index in coreNodes) {\n if (!coreNodes.hasOwnProperty(index)) {\n continue;\n }\n\n let coreNode: ICoreNode = coreNodes[index];\n\n if (coreNode == null) {\n break;\n }\n\n if (coreNode.sequence_key == null) {\n console.warn(`Sequence missing, discarding node (${coreNode.key})`);\n\n continue;\n }\n\n if (preStored != null && coreNode.key in preStored) {\n let preStoredNode: Node = preStored[coreNode.key];\n delete preStored[coreNode.key];\n\n hCache.push(preStoredNode);\n\n let preStoredNodeIndexItem: NodeIndexItem = {\n lat: preStoredNode.latLon.lat,\n lon: preStoredNode.latLon.lon,\n node: preStoredNode,\n };\n\n this._nodeIndex.insert(preStoredNodeIndexItem);\n this._nodeIndexTiles[h].push(preStoredNodeIndexItem);\n this._nodeToTile[preStoredNode.key] = h;\n\n continue;\n }\n\n let node: Node = new Node(coreNode);\n\n hCache.push(node);\n\n let nodeIndexItem: NodeIndexItem = {\n lat: node.latLon.lat,\n lon: node.latLon.lon,\n node: node,\n };\n\n this._nodeIndex.insert(nodeIndexItem);\n this._nodeIndexTiles[h].push(nodeIndexItem);\n this._nodeToTile[node.key] = h;\n\n this._setNode(node);\n }\n\n delete this._cachingTiles$[h];\n }),\n map(\n (imagesByH: { [key: string]: { [index: string]: ICoreNode } }): Graph => {\n return this;\n }),\n catchError(\n (error: Error): Observable<Graph> => {\n delete this._cachingTiles$[h];\n\n throw error;\n }),\n publish(),\n refCount());\n\n return this._cachingTiles$[h];\n }\n\n private _makeFull(node: Node, fillNode: IFillNode): void {\n if (fillNode.calt == null) {\n fillNode.calt = this._defaultAlt;\n }\n\n if (fillNode.c_rotation == null) {\n fillNode.c_rotation = this._graphCalculator.rotationFromCompass(fillNode.ca, fillNode.orientation);\n }\n\n node.makeFull(fillNode);\n }\n\n private _preStore(h: string, node: Node): void {\n if (!(h in this._preStored)) {\n this._preStored[h] = {};\n }\n\n this._preStored[h][node.key] = node;\n }\n\n private _removeFromPreStore(h: string): { [key: string]: Node } {\n let preStored: { [key: string]: Node } = null;\n\n if (h in this._preStored) {\n preStored = this._preStored[h];\n delete this._preStored[h];\n }\n\n return preStored;\n }\n\n private _setNode(node: Node): void {\n let key: string = node.key;\n\n if (this.hasNode(key)) {\n throw new GraphMapillaryError(`Node already exist (${key}).`);\n }\n\n this._nodes[key] = node;\n }\n\n private _uncacheTile(h: string, keepSequenceKey: string): void {\n for (let node of this._cachedTiles[h].nodes) {\n let key: string = node.key;\n\n delete this._nodeToTile[key];\n\n if (key in this._cachedNodes) {\n delete this._cachedNodes[key];\n }\n\n if (key in this._cachedNodeTiles) {\n delete this._cachedNodeTiles[key];\n }\n\n if (key in this._cachedSpatialEdges) {\n delete this._cachedSpatialEdges[key];\n }\n\n if (node.sequenceKey === keepSequenceKey) {\n this._preStore(h, node);\n node.uncache();\n } else {\n delete this._nodes[key];\n\n if (node.sequenceKey in this._cachedSequenceNodes) {\n delete this._cachedSequenceNodes[node.sequenceKey];\n }\n\n node.dispose();\n }\n }\n\n for (let nodeIndexItem of this._nodeIndexTiles[h]) {\n this._nodeIndex.remove(nodeIndexItem);\n }\n\n delete this._nodeIndexTiles[h];\n delete this._cachedTiles[h];\n }\n\n private _uncachePreStored(preStored: [string, string][]): void {\n let hs: { [h: string]: boolean } = {};\n for (let [key, h] of preStored) {\n if (key in this._nodes) {\n delete this._nodes[key];\n }\n\n if (key in this._cachedNodes) {\n delete this._cachedNodes[key];\n }\n\n let node: Node = this._preStored[h][key];\n\n if (node.sequenceKey in this._cachedSequenceNodes) {\n delete this._cachedSequenceNodes[node.sequenceKey];\n }\n\n delete this._preStored[h][key];\n\n node.dispose();\n\n hs[h] = true;\n }\n\n for (let h in hs) {\n if (!hs.hasOwnProperty(h)) {\n continue;\n }\n\n if (Object.keys(this._preStored[h]).length === 0) {\n delete this._preStored[h];\n }\n }\n }\n\n private _updateCachedTileAccess(key: string, accessed: number): void {\n if (key in this._nodeToTile) {\n this._cachedTiles[this._nodeToTile[key]].accessed = accessed;\n }\n }\n\n private _updateCachedNodeAccess(key: string, accessed: number): void {\n if (key in this._cachedNodes) {\n this._cachedNodes[key].accessed = accessed;\n }\n }\n}\n\nexport default Graph;\n",
+ "import * as geohash from \"latlon-geohash\";\nimport * as THREE from \"three\";\n\nimport {ILatLon} from \"../API\";\nimport {GraphMapillaryError} from \"../Error\";\nimport {GeoCoords} from \"../Geo\";\n\n/**\n * @class GraphCalculator\n *\n * @classdesc Represents a calculator for graph entities.\n */\nexport class GraphCalculator {\n private _geoCoords: GeoCoords;\n\n /**\n * Create a new graph calculator instance.\n *\n * @param {GeoCoords} geoCoords - Geo coords instance.\n */\n constructor(geoCoords?: GeoCoords) {\n this._geoCoords = geoCoords != null ? geoCoords : new GeoCoords();\n }\n\n /**\n * Encode the geohash tile for geodetic coordinates.\n *\n * @param {ILatLon} latlon - Latitude and longitude to encode.\n * @param {number} precision - Precision of the encoding.\n *\n * @returns {string} The geohash tile for the lat, lon and precision.\n */\n public encodeH(latLon: ILatLon, precision: number = 7): string {\n return geohash.encode(latLon.lat, latLon.lon, precision);\n }\n\n /**\n * Encode the geohash tiles within a threshold from a position\n * using Manhattan distance.\n *\n * @param {ILatLon} latlon - Latitude and longitude to encode.\n * @param {number} precision - Precision of the encoding.\n * @param {number} threshold - Threshold of the encoding in meters.\n *\n * @returns {string} The geohash tiles reachable within the threshold.\n */\n public encodeHs(latLon: ILatLon, precision: number = 7, threshold: number = 20): string[] {\n let h: string = geohash.encode(latLon.lat, latLon.lon, precision);\n let bounds: geohash.Bounds = geohash.bounds(h);\n let ne: geohash.Point = bounds.ne;\n let sw: geohash.Point = bounds.sw;\n let neighbours: geohash.Neighbours = geohash.neighbours(h);\n\n let bl: number[] = [0, 0, 0];\n let tr: number[] =\n this._geoCoords.geodeticToEnu(\n ne.lat,\n ne.lon,\n 0,\n sw.lat,\n sw.lon,\n 0);\n\n let position: number[] =\n this._geoCoords.geodeticToEnu(\n latLon.lat,\n latLon.lon,\n 0,\n sw.lat,\n sw.lon,\n 0);\n\n let left: number = position[0] - bl[0];\n let right: number = tr[0] - position[0];\n let bottom: number = position[1] - bl[1];\n let top: number = tr[1] - position[1];\n\n let l: boolean = left < threshold;\n let r: boolean = right < threshold;\n let b: boolean = bottom < threshold;\n let t: boolean = top < threshold;\n\n let hs: string[] = [h];\n\n if (t) {\n hs.push(neighbours.n);\n }\n\n if (t && l) {\n hs.push(neighbours.nw);\n }\n\n if (l) {\n hs.push(neighbours.w);\n }\n\n if (l && b) {\n hs.push(neighbours.sw);\n }\n\n if (b) {\n hs.push(neighbours.s);\n }\n\n if (b && r) {\n hs.push(neighbours.se);\n }\n\n if (r) {\n hs.push(neighbours.e);\n }\n\n if (r && t) {\n hs.push(neighbours.ne);\n }\n\n return hs;\n }\n\n /**\n * Encode the minimum set of geohash tiles containing a bounding box.\n *\n * @description The current algorithm does expect the bounding box\n * to be sufficiently small to be contained in an area with the size\n * of maximally four tiles. Up to nine adjacent tiles may be returned.\n * The method currently uses the largest side as the threshold leading to\n * more tiles being returned than needed in edge cases.\n *\n * @param {ILatLon} sw - South west corner of bounding box.\n * @param {ILatLon} ne - North east corner of bounding box.\n * @param {number} precision - Precision of the encoding.\n *\n * @returns {string} The geohash tiles containing the bounding box.\n */\n public encodeHsFromBoundingBox(sw: ILatLon, ne: ILatLon, precision: number = 7): string[] {\n if (ne.lat <= sw.lat || ne.lon <= sw.lon) {\n throw new GraphMapillaryError(\"North east needs to be top right of south west\");\n }\n\n const centerLat: number = (sw.lat + ne.lat) / 2;\n const centerLon: number = (sw.lon + ne.lon) / 2;\n\n const enu: number[] =\n this._geoCoords.geodeticToEnu(\n ne.lat,\n ne.lon,\n 0,\n centerLat,\n centerLon,\n 0);\n\n const threshold: number = Math.max(enu[0], enu[1]);\n\n return this.encodeHs({ lat: centerLat, lon: centerLon }, precision, threshold);\n }\n\n /**\n * Get the bounding box corners for a circle with radius of a threshold\n * with center in a geodetic position.\n *\n * @param {ILatLon} latlon - Latitude and longitude to encode.\n * @param {number} threshold - Threshold distance from the position in meters.\n *\n * @returns {Array<ILatLon>} The south west and north east corners of the\n * bounding box.\n */\n public boundingBoxCorners(latLon: ILatLon, threshold: number): [ILatLon, ILatLon] {\n let bl: number[] =\n this._geoCoords.enuToGeodetic(\n -threshold,\n -threshold,\n 0,\n latLon.lat,\n latLon.lon,\n 0);\n\n let tr: number[] =\n this._geoCoords.enuToGeodetic(\n threshold,\n threshold,\n 0,\n latLon.lat,\n latLon.lon,\n 0);\n\n return [\n { lat: bl[0], lon: bl[1] },\n { lat: tr[0], lon: tr[1] },\n ];\n }\n\n /**\n * Convert a compass angle to an angle axis rotation vector.\n *\n * @param {number} compassAngle - The compass angle in degrees.\n * @param {number} orientation - The orientation of the original image.\n *\n * @returns {Array<number>} Angle axis rotation vector.\n */\n public rotationFromCompass(compassAngle: number, orientation: number): number[] {\n let x: number = 0;\n let y: number = 0;\n let z: number = 0;\n\n switch (orientation) {\n case 1:\n x = Math.PI / 2;\n break;\n case 3:\n x = -Math.PI / 2;\n z = Math.PI;\n break;\n case 6:\n y = -Math.PI / 2;\n z = -Math.PI / 2;\n break;\n case 8:\n y = Math.PI / 2;\n z = Math.PI / 2;\n break;\n default:\n break;\n }\n\n let rz: THREE.Matrix4 = new THREE.Matrix4().makeRotationZ(z);\n let euler: THREE.Euler = new THREE.Euler(x, y, compassAngle * Math.PI / 180, \"XYZ\");\n let re: THREE.Matrix4 = new THREE.Matrix4().makeRotationFromEuler(euler);\n\n let rotation: THREE.Vector4 = new THREE.Vector4().setAxisAngleFromRotationMatrix(<any>re.multiply(rz));\n\n return rotation.multiplyScalar(rotation.w).toArray().slice(0, 3);\n }\n}\n\nexport default GraphCalculator;\n",
+ "/**\n * Enumeration for graph modes.\n * @enum {number}\n * @readonly\n * @description Modes for the retrieval and caching performed\n * by the graph service on the graph.\n */\nexport enum GraphMode {\n /**\n * Caching is performed on sequences only and sequence edges are\n * calculated. Spatial tiles\n * are not retrieved and spatial edges are not calculated when\n * caching nodes. Complete sequences are being cached for requested\n * nodes within the graph.\n */\n Sequence,\n\n /**\n * Caching is performed with emphasis on spatial data. Sequence edges\n * as well as spatial edges are cached. Sequence data\n * is still requested but complete sequences are not being cached\n * for requested nodes.\n *\n * This is the initial mode of the graph service.\n */\n Spatial,\n}\n\nexport default GraphMode;\n",
+ "import {\n concat as observableConcat,\n empty as observableEmpty,\n from as observableFrom,\n of as observableOf,\n Observable,\n Subject,\n Subscription,\n} from \"rxjs\";\n\nimport {\n first,\n expand,\n map,\n last,\n mergeMap,\n startWith,\n publishReplay,\n refCount,\n catchError,\n finalize,\n tap,\n} from \"rxjs/operators\";\n\nimport {ILatLon} from \"../API\";\nimport {\n FilterExpression,\n Graph,\n GraphMode,\n ImageLoadingService,\n Node,\n Sequence,\n} from \"../Graph\";\n\n/**\n * @class GraphService\n *\n * @classdesc Represents a service for graph operations.\n */\nexport class GraphService {\n private _graph$: Observable<Graph>;\n private _graphMode: GraphMode;\n private _graphMode$: Observable<GraphMode>;\n private _graphModeSubject$: Subject<GraphMode>;\n\n private _imageLoadingService: ImageLoadingService;\n\n private _firstGraphSubjects$: Subject<Graph>[];\n\n private _initializeCacheSubscriptions: Subscription[];\n private _sequenceSubscriptions: Subscription[];\n private _spatialSubscriptions: Subscription[];\n\n /**\n * Create a new graph service instance.\n *\n * @param {Graph} graph - Graph instance to be operated on.\n */\n constructor(graph: Graph, imageLoadingService: ImageLoadingService) {\n this._graph$ = observableConcat(\n observableOf(graph),\n graph.changed$).pipe(\n publishReplay(1),\n refCount());\n\n this._graph$.subscribe(() => { /*noop*/ });\n\n this._graphMode = GraphMode.Spatial;\n this._graphModeSubject$ = new Subject<GraphMode>();\n this._graphMode$ = this._graphModeSubject$.pipe(\n startWith(this._graphMode),\n publishReplay(1),\n refCount());\n\n this._graphMode$.subscribe(() => { /*noop*/ });\n\n this._imageLoadingService = imageLoadingService;\n\n this._firstGraphSubjects$ = [];\n\n this._initializeCacheSubscriptions = [];\n this._sequenceSubscriptions = [];\n this._spatialSubscriptions = [];\n }\n\n /**\n * Get graph mode observable.\n *\n * @description Emits the current graph mode.\n *\n * @returns {Observable<GraphMode>} Observable\n * emitting the current graph mode when it changes.\n */\n public get graphMode$(): Observable<GraphMode> {\n return this._graphMode$;\n }\n\n /**\n * Cache full nodes in a bounding box.\n *\n * @description When called, the full properties of\n * the node are retrieved. The node cache is not initialized\n * for any new nodes retrieved and the node assets are not\n * retrieved, {@link cacheNode$} needs to be called for caching\n * assets.\n *\n * @param {ILatLon} sw - South west corner of bounding box.\n * @param {ILatLon} ne - North east corner of bounding box.\n * @return {Observable<Array<Node>>} Observable emitting a single item,\n * the nodes of the bounding box, when they have all been retrieved.\n * @throws {Error} Propagates any IO node caching errors to the caller.\n */\n public cacheBoundingBox$(sw: ILatLon, ne: ILatLon): Observable<Node[]> {\n return this._graph$.pipe(\n first(),\n mergeMap(\n (graph: Graph): Observable<Node[]> => {\n return graph.cacheBoundingBox$(sw, ne);\n }));\n }\n\n /**\n * Cache a node in the graph and retrieve it.\n *\n * @description When called, the full properties of\n * the node are retrieved and the node cache is initialized.\n * After that the node assets are cached and the node\n * is emitted to the observable when.\n * In parallel to caching the node assets, the sequence and\n * spatial edges of the node are cached. For this, the sequence\n * of the node and the required tiles and spatial nodes are\n * retrieved. The sequence and spatial edges may be set before\n * or after the node is returned.\n *\n * @param {string} key - Key of the node to cache.\n * @return {Observable<Node>} Observable emitting a single item,\n * the node, when it has been retrieved and its assets are cached.\n * @throws {Error} Propagates any IO node caching errors to the caller.\n */\n public cacheNode$(key: string): Observable<Node> {\n const firstGraphSubject$: Subject<Graph> = new Subject<Graph>();\n\n this._firstGraphSubjects$.push(firstGraphSubject$);\n\n const firstGraph$: Observable<Graph> = firstGraphSubject$.pipe(\n publishReplay(1),\n refCount());\n\n const node$: Observable<Node> = firstGraph$.pipe(\n map(\n (graph: Graph): Node => {\n return graph.getNode(key);\n }),\n mergeMap(\n (node: Node): Observable<Node> => {\n return node.assetsCached ?\n observableOf(node) :\n node.cacheAssets$();\n }),\n publishReplay(1),\n refCount());\n\n node$.subscribe(\n (node: Node): void => {\n this._imageLoadingService.loadnode$.next(node);\n },\n (error: Error): void => {\n console.error(`Failed to cache node (${key})`, error);\n });\n\n const initializeCacheSubscription: Subscription = this._graph$.pipe(\n first(),\n mergeMap(\n (graph: Graph): Observable<Graph> => {\n if (graph.isCachingFull(key) || !graph.hasNode(key)) {\n return graph.cacheFull$(key);\n }\n\n if (graph.isCachingFill(key) || !graph.getNode(key).full) {\n return graph.cacheFill$(key);\n }\n\n return observableOf<Graph>(graph);\n }),\n tap(\n (graph: Graph): void => {\n if (!graph.hasInitializedCache(key)) {\n graph.initializeCache(key);\n }\n }),\n finalize(\n (): void => {\n if (initializeCacheSubscription == null) {\n return;\n }\n\n this._removeFromArray(initializeCacheSubscription, this._initializeCacheSubscriptions);\n this._removeFromArray(firstGraphSubject$, this._firstGraphSubjects$);\n }))\n .subscribe(\n (graph: Graph): void => {\n firstGraphSubject$.next(graph);\n firstGraphSubject$.complete();\n },\n (error: Error): void => {\n firstGraphSubject$.error(error);\n });\n\n if (!initializeCacheSubscription.closed) {\n this._initializeCacheSubscriptions.push(initializeCacheSubscription);\n }\n\n const graphSequence$: Observable<Graph> = firstGraph$.pipe(\n mergeMap(\n (graph: Graph): Observable<Graph> => {\n if (graph.isCachingNodeSequence(key) || !graph.hasNodeSequence(key)) {\n return graph.cacheNodeSequence$(key);\n }\n\n return observableOf<Graph>(graph);\n }),\n publishReplay(1),\n refCount());\n\n const sequenceSubscription: Subscription = graphSequence$.pipe(\n tap(\n (graph: Graph): void => {\n if (!graph.getNode(key).sequenceEdges.cached) {\n graph.cacheSequenceEdges(key);\n }\n }),\n finalize(\n (): void => {\n if (sequenceSubscription == null) {\n return;\n }\n\n this._removeFromArray(sequenceSubscription, this._sequenceSubscriptions);\n }))\n .subscribe(\n (graph: Graph): void => { return; },\n (error: Error): void => {\n console.error(`Failed to cache sequence edges (${key}).`, error);\n });\n\n if (!sequenceSubscription.closed) {\n this._sequenceSubscriptions.push(sequenceSubscription);\n }\n\n if (this._graphMode === GraphMode.Spatial) {\n const spatialSubscription: Subscription = firstGraph$.pipe(\n expand(\n (graph: Graph): Observable<Graph> => {\n if (graph.hasTiles(key)) {\n return observableEmpty();\n }\n\n return observableFrom<Observable<Graph>>(graph.cacheTiles$(key)).pipe(\n mergeMap(\n (graph$: Observable<Graph>): Observable<Graph> => {\n return graph$.pipe(\n mergeMap(\n (g: Graph): Observable<Graph> => {\n if (g.isCachingTiles(key)) {\n return observableEmpty();\n }\n\n return observableOf<Graph>(g);\n }),\n catchError(\n (error: Error, caught$: Observable<Graph>): Observable<Graph> => {\n console.error(`Failed to cache tile data (${key}).`, error);\n\n return observableEmpty();\n }));\n }));\n }),\n last(),\n mergeMap(\n (graph: Graph): Observable<Graph> => {\n if (graph.hasSpatialArea(key)) {\n return observableOf<Graph>(graph);\n }\n\n return observableFrom<Observable<Graph>>(graph.cacheSpatialArea$(key)).pipe(\n mergeMap(\n (graph$: Observable<Graph>): Observable<Graph> => {\n return graph$.pipe(\n catchError(\n (error: Error, caught$: Observable<Graph>): Observable<Graph> => {\n console.error(`Failed to cache spatial nodes (${key}).`, error);\n\n return observableEmpty();\n }));\n }));\n }),\n last(),\n mergeMap(\n (graph: Graph): Observable<Graph> => {\n return graph.hasNodeSequence(key) ?\n observableOf<Graph>(graph) :\n graph.cacheNodeSequence$(key);\n }),\n tap(\n (graph: Graph): void => {\n if (!graph.getNode(key).spatialEdges.cached) {\n graph.cacheSpatialEdges(key);\n }\n }),\n finalize(\n (): void => {\n if (spatialSubscription == null) {\n return;\n }\n\n this._removeFromArray(spatialSubscription, this._spatialSubscriptions);\n }))\n .subscribe(\n (graph: Graph): void => { return; },\n (error: Error): void => {\n console.error(`Failed to cache spatial edges (${key}).`, error);\n });\n\n if (!spatialSubscription.closed) {\n this._spatialSubscriptions.push(spatialSubscription);\n }\n }\n\n return node$.pipe(\n first(\n (node: Node): boolean => {\n return node.assetsCached;\n }));\n }\n\n /**\n * Cache a sequence in the graph and retrieve it.\n *\n * @param {string} sequenceKey - Sequence key.\n * @returns {Observable<Sequence>} Observable emitting a single item,\n * the sequence, when it has been retrieved and its assets are cached.\n * @throws {Error} Propagates any IO node caching errors to the caller.\n */\n public cacheSequence$(sequenceKey: string): Observable<Sequence> {\n return this._graph$.pipe(\n first(),\n mergeMap(\n (graph: Graph): Observable<Graph> => {\n if (graph.isCachingSequence(sequenceKey) || !graph.hasSequence(sequenceKey)) {\n return graph.cacheSequence$(sequenceKey);\n }\n\n return observableOf<Graph>(graph);\n }),\n map(\n (graph: Graph): Sequence => {\n return graph.getSequence(sequenceKey);\n }));\n }\n\n /**\n * Cache a sequence and its nodes in the graph and retrieve the sequence.\n *\n * @description Caches a sequence and its assets are cached and\n * retrieves all nodes belonging to the sequence. The node assets\n * or edges will not be cached.\n *\n * @param {string} sequenceKey - Sequence key.\n * @param {string} referenceNodeKey - Key of node to use as reference\n * for optimized caching.\n * @returns {Observable<Sequence>} Observable emitting a single item,\n * the sequence, when it has been retrieved, its assets are cached and\n * all nodes belonging to the sequence has been retrieved.\n * @throws {Error} Propagates any IO node caching errors to the caller.\n */\n public cacheSequenceNodes$(sequenceKey: string, referenceNodeKey?: string): Observable<Sequence> {\n return this._graph$.pipe(\n first(),\n mergeMap(\n (graph: Graph): Observable<Graph> => {\n if (graph.isCachingSequence(sequenceKey) || !graph.hasSequence(sequenceKey)) {\n return graph.cacheSequence$(sequenceKey);\n }\n\n return observableOf<Graph>(graph);\n }),\n mergeMap(\n (graph: Graph): Observable<Graph> => {\n if (graph.isCachingSequenceNodes(sequenceKey) || !graph.hasSequenceNodes(sequenceKey)) {\n return graph.cacheSequenceNodes$(sequenceKey, referenceNodeKey);\n }\n\n return observableOf<Graph>(graph);\n }),\n map(\n (graph: Graph): Sequence => {\n return graph.getSequence(sequenceKey);\n }));\n }\n\n /**\n * Set a spatial edge filter on the graph.\n *\n * @description Resets the spatial edges of all cached nodes.\n *\n * @param {FilterExpression} filter - Filter expression to be applied.\n * @return {Observable<Graph>} Observable emitting a single item,\n * the graph, when the spatial edges have been reset.\n */\n public setFilter$(filter: FilterExpression): Observable<void> {\n this._resetSubscriptions(this._spatialSubscriptions);\n\n return this._graph$.pipe(\n first(),\n tap(\n (graph: Graph): void => {\n graph.resetSpatialEdges();\n graph.setFilter(filter);\n }),\n map(\n (graph: Graph): void => {\n return undefined;\n }));\n }\n\n /**\n * Set the graph mode.\n *\n * @description If graph mode is set to spatial, caching\n * is performed with emphasis on spatial edges. If graph\n * mode is set to sequence no tile data is requested and\n * no spatial edges are computed.\n *\n * When setting graph mode to sequence all spatial\n * subscriptions are aborted.\n *\n * @param {GraphMode} mode - Graph mode to set.\n */\n public setGraphMode(mode: GraphMode): void {\n if (this._graphMode === mode) {\n return;\n }\n\n if (mode === GraphMode.Sequence) {\n this._resetSubscriptions(this._spatialSubscriptions);\n }\n\n this._graphMode = mode;\n this._graphModeSubject$.next(this._graphMode);\n }\n\n /**\n * Reset the graph.\n *\n * @description Resets the graph but keeps the nodes of the\n * supplied keys.\n *\n * @param {Array<string>} keepKeys - Keys of nodes to keep in graph.\n * @return {Observable<Node>} Observable emitting a single item,\n * the graph, when it has been reset.\n */\n public reset$(keepKeys: string[]): Observable<void> {\n this._abortSubjects(this._firstGraphSubjects$);\n this._resetSubscriptions(this._initializeCacheSubscriptions);\n this._resetSubscriptions(this._sequenceSubscriptions);\n this._resetSubscriptions(this._spatialSubscriptions);\n\n return this._graph$.pipe(\n first(),\n tap(\n (graph: Graph): void => {\n graph.reset(keepKeys);\n }),\n map(\n (graph: Graph): void => {\n return undefined;\n }));\n }\n\n /**\n * Uncache the graph.\n *\n * @description Uncaches the graph by removing tiles, nodes and\n * sequences. Keeps the nodes of the supplied keys and the tiles\n * related to those nodes.\n *\n * @param {Array<string>} keepKeys - Keys of nodes to keep in graph.\n * @param {string} keepSequenceKey - Optional key of sequence\n * for which the belonging nodes should not be disposed or\n * removed from the graph. These nodes may still be uncached if\n * not specified in keep keys param.\n * @return {Observable<Graph>} Observable emitting a single item,\n * the graph, when the graph has been uncached.\n */\n public uncache$(keepKeys: string[], keepSequenceKey?: string): Observable<void> {\n return this._graph$.pipe(\n first(),\n tap(\n (graph: Graph): void => {\n graph.uncache(keepKeys, keepSequenceKey);\n }),\n map(\n (graph: Graph): void => {\n return undefined;\n }));\n }\n\n private _abortSubjects<T>(subjects: Subject<T>[]): void {\n for (const subject of subjects.slice()) {\n this._removeFromArray(subject, subjects);\n\n subject.error(new Error(\"Cache node request was aborted.\"));\n }\n }\n\n private _removeFromArray<T>(object: T, objects: T[]): void {\n const index: number = objects.indexOf(object);\n if (index !== -1) {\n objects.splice(index, 1);\n }\n }\n\n private _resetSubscriptions(subscriptions: Subscription[]): void {\n for (const subscription of subscriptions.slice()) {\n this._removeFromArray(subscription, subscriptions);\n\n if (!subscription.closed) {\n subscription.unsubscribe();\n }\n }\n }\n}\n\nexport default GraphService;\n",
+ "import {refCount, publishReplay, map, filter, scan} from \"rxjs/operators\";\nimport {Subject, Observable} from \"rxjs\";\n\nimport {ILoadStatus, Node} from \"../Graph\";\n\ntype LoadStatus = [{ [key: string]: ILoadStatus }, boolean];\n\nexport class ImageLoadingService {\n private _loadnode$: Subject<Node> = new Subject<Node>();\n private _loadstatus$: Observable<{[key: string]: ILoadStatus}>;\n\n constructor () {\n this._loadstatus$ = this._loadnode$.pipe(\n scan<Node, LoadStatus>(\n ([nodes]: LoadStatus, node: Node): [{[key: string]: ILoadStatus}, boolean] => {\n let changed: boolean = false;\n if (node.loadStatus.total === 0 || node.loadStatus.loaded === node.loadStatus.total) {\n if (node.key in nodes) {\n delete nodes[node.key];\n changed = true;\n }\n } else {\n nodes[node.key] = node.loadStatus;\n changed = true;\n }\n\n return [nodes, changed];\n },\n [{}, false]),\n filter(\n ([nodes, changed]: [{[key: string]: ILoadStatus}, boolean]): boolean => {\n return changed;\n }),\n map(\n ([nodes]: [{[key: string]: ILoadStatus}, boolean]): {[key: string]: ILoadStatus} => {\n return nodes;\n }),\n publishReplay(1),\n refCount());\n\n this._loadstatus$.subscribe(() => { /*noop*/ });\n }\n\n public get loadnode$(): Subject<Node> {\n return this._loadnode$;\n }\n\n public get loadstatus$(): Observable<{[key: string]: ILoadStatus}> {\n return this._loadstatus$;\n }\n}\n",
+ "import * as Pbf from \"pbf\";\n\nimport {IMesh} from \"../Graph\";\n\nexport class MeshReader {\n public static read(buffer: Buffer): IMesh {\n let pbf: Pbf<IMesh> = new Pbf<IMesh>(buffer);\n\n return pbf.readFields(MeshReader._readMeshField, { faces: [], vertices: [] });\n }\n\n private static _readMeshField(tag: number, mesh: IMesh, pbf: Pbf<IMesh>): void {\n if (tag === 1) {\n mesh.vertices.push(pbf.readFloat());\n } else if (tag === 2) {\n mesh.faces.push(pbf.readVarint());\n }\n }\n}\n",
+ "import {map} from \"rxjs/operators\";\nimport {Observable} from \"rxjs\";\n\nimport {\n ICoreNode,\n IFillNode,\n IGPano,\n ILatLon,\n} from \"../API\";\nimport {IEdge} from \"../Edge\";\nimport {\n IEdgeStatus,\n IMesh,\n ILoadStatus,\n NodeCache,\n} from \"../Graph\";\nimport {ImageSize} from \"../Viewer\";\n\n/**\n * @class Node\n *\n * @classdesc Represents a node in the navigation graph.\n *\n * Explanation of position and bearing properties:\n *\n * When images are uploaded they will have GPS information in the EXIF, this is what\n * is called `originalLatLon` {@link Node.originalLatLon}.\n *\n * When Structure from Motions has been run for a node a `computedLatLon` that\n * differs from the `originalLatLon` will be created. It is different because\n * GPS positions are not very exact and SfM aligns the camera positions according\n * to the 3D reconstruction {@link Node.computedLatLon}.\n *\n * At last there exist a `latLon` property which evaluates to\n * the `computedLatLon` from SfM if it exists but falls back\n * to the `originalLatLon` from the EXIF GPS otherwise {@link Node.latLon}.\n *\n * Everything that is done in in the Viewer is based on the SfM positions,\n * i.e. `computedLatLon`. That is why the smooth transitions go in the right\n * direction (nd not in strange directions because of bad GPS).\n *\n * E.g. when placing a marker in the Viewer it is relative to the SfM\n * position i.e. the `computedLatLon`.\n *\n * The same concept as above also applies to the compass angle (or bearing) properties\n * `originalCa`, `computedCa` and `ca`.\n */\nexport class Node {\n private _cache: NodeCache;\n private _core: ICoreNode;\n private _fill: IFillNode;\n\n /**\n * Create a new node instance.\n *\n * @description Nodes are always created internally by the library.\n * Nodes can not be added to the library through any API method.\n *\n * @param {ICoreNode} coreNode - Raw core node data.\n * @ignore\n */\n constructor(core: ICoreNode) {\n this._cache = null;\n this._core = core;\n this._fill = null;\n }\n\n /**\n * Get assets cached.\n *\n * @description The assets that need to be cached for this property\n * to report true are the following: fill properties, image and mesh.\n * The library ensures that the current node will always have the\n * assets cached.\n *\n * @returns {boolean} Value indicating whether all assets have been\n * cached.\n *\n * @ignore\n */\n public get assetsCached(): boolean {\n return this._core != null &&\n this._fill != null &&\n this._cache != null &&\n this._cache.image != null &&\n this._cache.mesh != null;\n }\n\n /**\n * Get alt.\n *\n * @description If SfM has not been run the computed altitude is\n * set to a default value of two meters.\n *\n * @returns {number} Altitude, in meters.\n */\n public get alt(): number {\n return this._fill.calt;\n }\n\n /**\n * Get ca.\n *\n * @description If the SfM computed compass angle exists it will\n * be returned, otherwise the original EXIF compass angle.\n *\n * @returns {number} Compass angle, measured in degrees\n * clockwise with respect to north.\n */\n public get ca(): number {\n return this._fill.cca != null ? this._fill.cca : this._fill.ca;\n }\n\n /**\n * Get cameraProjection.\n *\n * @description Will be undefined if SfM has not been run.\n *\n * @returns {number} The camera projection of the image.\n */\n public get cameraProjection(): \"perspective\" | \"fisheye\" | \"equirectangular\" {\n return this._fill.camera_projection_type;\n }\n\n /**\n * Get capturedAt.\n *\n * @returns {number} Timestamp when the image was captured.\n */\n public get capturedAt(): number {\n return this._fill.captured_at;\n }\n\n /**\n * Get camera uuid.\n *\n * @description Will be undefined if the camera uuid was not\n * recorded in the image exif information.\n *\n * @returns {string} Universally unique id for camera used\n * when capturing image.\n */\n public get cameraUuid(): string {\n return this._fill.captured_with_camera_uuid;\n }\n\n /**\n * Get ck1.\n *\n * @description Will not be set if SfM has not been run.\n *\n * @returns {number} SfM computed radial distortion parameter\n * k1.\n */\n public get ck1(): number {\n return this._fill.ck1;\n }\n\n /**\n * Get ck2.\n *\n * @description Will not be set if SfM has not been run.\n *\n * @returns {number} SfM computed radial distortion parameter\n * k2.\n */\n public get ck2(): number {\n return this._fill.ck2;\n }\n\n /**\n * Get computedCA.\n *\n * @description Will not be set if SfM has not been run.\n *\n * @returns {number} SfM computed compass angle, measured\n * in degrees clockwise with respect to north.\n */\n public get computedCA(): number {\n return this._fill.cca;\n }\n\n /**\n * Get computedLatLon.\n *\n * @description Will not be set if SfM has not been run.\n *\n * @returns {ILatLon} SfM computed latitude longitude in WGS84 datum,\n * measured in degrees.\n */\n public get computedLatLon(): ILatLon {\n return this._core.cl;\n }\n\n /**\n * Get focal.\n *\n * @description Will not be set if SfM has not been run.\n *\n * @returns {number} SfM computed focal length.\n */\n public get focal(): number {\n return this._fill.cfocal;\n }\n\n /**\n * Get full.\n *\n * @description The library ensures that the current node will\n * always be full.\n *\n * @returns {boolean} Value indicating whether the node has all\n * properties filled.\n *\n * @ignore\n */\n public get full(): boolean {\n return this._fill != null;\n }\n\n /**\n * Get fullPano.\n *\n * @returns {boolean} Value indicating whether the node is a complete\n * 360 panorama.\n */\n public get fullPano(): boolean {\n return this._fill.gpano != null &&\n this._fill.gpano.CroppedAreaLeftPixels === 0 &&\n this._fill.gpano.CroppedAreaTopPixels === 0 &&\n this._fill.gpano.CroppedAreaImageWidthPixels === this._fill.gpano.FullPanoWidthPixels &&\n this._fill.gpano.CroppedAreaImageHeightPixels === this._fill.gpano.FullPanoHeightPixels;\n }\n\n /**\n * Get gpano.\n *\n * @description Will not be set for non panoramic images.\n *\n * @returns {IGPano} Panorama information for panorama images.\n */\n public get gpano(): IGPano {\n return this._fill.gpano;\n }\n\n /**\n * Get height.\n *\n * @returns {number} Height of original image, not adjusted\n * for orientation.\n */\n public get height(): number {\n return this._fill.height;\n }\n\n /**\n * Get image.\n *\n * @description The image will always be set on the current node.\n *\n * @returns {HTMLImageElement} Cached image element of the node.\n */\n public get image(): HTMLImageElement {\n return this._cache.image;\n }\n\n /**\n * Get image$.\n *\n * @returns {Observable<HTMLImageElement>} Observable emitting\n * the cached image when it is updated.\n *\n * @ignore\n */\n public get image$(): Observable<HTMLImageElement> {\n return this._cache.image$;\n }\n\n /**\n * Get key.\n *\n * @returns {string} Unique key of the node.\n */\n public get key(): string {\n return this._core.key;\n }\n\n /**\n * Get latLon.\n *\n * @description If the SfM computed latitude longitude exist\n * it will be returned, otherwise the original EXIF latitude\n * longitude.\n *\n * @returns {ILatLon} Latitude longitude in WGS84 datum,\n * measured in degrees.\n */\n public get latLon(): ILatLon {\n return this._core.cl != null ? this._core.cl : this._core.l;\n }\n\n /**\n * Get loadStatus.\n *\n * @returns {ILoadStatus} Value indicating the load status\n * of the mesh and image.\n *\n * @ignore\n */\n public get loadStatus(): ILoadStatus {\n return this._cache.loadStatus;\n }\n\n /**\n * Get merged.\n *\n * @returns {boolean} Value indicating whether SfM has been\n * run on the node and the node has been merged into a\n * connected component.\n */\n public get merged(): boolean {\n return this._fill != null &&\n this._fill.merge_version != null &&\n this._fill.merge_version > 0;\n }\n\n /**\n * Get mergeCC.\n *\n * @description Will not be set if SfM has not yet been run on\n * node.\n *\n * @returns {number} SfM connected component key to which\n * image belongs.\n */\n public get mergeCC(): number {\n return this._fill.merge_cc;\n }\n\n /**\n * Get mergeVersion.\n *\n * @returns {number} Version for which SfM was run and image was merged.\n */\n public get mergeVersion(): number {\n return this._fill.merge_version;\n }\n\n /**\n * Get mesh.\n *\n * @description The mesh will always be set on the current node.\n *\n * @returns {IMesh} SfM triangulated mesh of reconstructed\n * atomic 3D points.\n */\n public get mesh(): IMesh {\n return this._cache.mesh;\n }\n\n /**\n * Get organizationKey.\n *\n * @returns {string} Unique key of the organization to which\n * the node belongs. If the node does not belong to an\n * organization the organization key will be undefined.\n */\n public get organizationKey(): string {\n return this._fill.organization_key;\n }\n\n /**\n * Get orientation.\n *\n * @returns {number} EXIF orientation of original image.\n */\n public get orientation(): number {\n return this._fill.orientation;\n }\n\n /**\n * Get originalCA.\n *\n * @returns {number} Original EXIF compass angle, measured in\n * degrees.\n */\n public get originalCA(): number {\n return this._fill.ca;\n }\n\n /**\n * Get originalLatLon.\n *\n * @returns {ILatLon} Original EXIF latitude longitude in\n * WGS84 datum, measured in degrees.\n */\n public get originalLatLon(): ILatLon {\n return this._core.l;\n }\n\n /**\n * Get pano.\n *\n * @returns {boolean} Value indicating whether the node is a panorama.\n * It could be a cropped or full panorama.\n */\n public get pano(): boolean {\n return this._fill.gpano != null &&\n this._fill.gpano.FullPanoWidthPixels != null;\n }\n\n /**\n * Get private.\n *\n * @returns {boolean} Value specifying if image is accessible to\n * organization members only or to everyone.\n */\n public get private(): boolean {\n return this._fill.private;\n }\n\n /**\n * Get projectKey.\n *\n * @returns {string} Unique key of the project to which\n * the node belongs. If the node does not belong to a\n * project the project key will be undefined.\n *\n * @deprecated This property will be deprecated in favor\n * of the organization key and private properties.\n */\n public get projectKey(): string {\n return this._fill.project != null ?\n this._fill.project.key :\n null;\n }\n\n /**\n * Get rotation.\n *\n * @description Will not be set if SfM has not been run.\n *\n * @returns {Array<number>} Rotation vector in angle axis representation.\n */\n public get rotation(): number[] {\n return this._fill.c_rotation;\n }\n\n /**\n * Get scale.\n *\n * @description Will not be set if SfM has not been run.\n *\n * @returns {number} Scale of atomic reconstruction.\n */\n public get scale(): number {\n return this._fill.atomic_scale;\n }\n\n /**\n * Get sequenceKey.\n *\n * @returns {string} Unique key of the sequence to which\n * the node belongs.\n */\n public get sequenceKey(): string {\n return this._core.sequence_key;\n }\n\n /**\n * Get sequenceEdges.\n *\n * @returns {IEdgeStatus} Value describing the status of the\n * sequence edges.\n *\n * @ignore\n */\n public get sequenceEdges(): IEdgeStatus {\n return this._cache.sequenceEdges;\n }\n\n /**\n * Get sequenceEdges$.\n *\n * @description Internal observable, should not be used as an API.\n *\n * @returns {Observable<IEdgeStatus>} Observable emitting\n * values describing the status of the sequence edges.\n *\n * @ignore\n */\n public get sequenceEdges$(): Observable<IEdgeStatus> {\n return this._cache.sequenceEdges$;\n }\n\n /**\n * Get spatialEdges.\n *\n * @returns {IEdgeStatus} Value describing the status of the\n * spatial edges.\n *\n * @ignore\n */\n public get spatialEdges(): IEdgeStatus {\n return this._cache.spatialEdges;\n }\n\n /**\n * Get spatialEdges$.\n *\n * @description Internal observable, should not be used as an API.\n *\n * @returns {Observable<IEdgeStatus>} Observable emitting\n * values describing the status of the spatial edges.\n *\n * @ignore\n */\n public get spatialEdges$(): Observable<IEdgeStatus> {\n return this._cache.spatialEdges$;\n }\n\n /**\n * Get userKey.\n *\n * @returns {string} Unique key of the user who uploaded\n * the image.\n */\n public get userKey(): string {\n return this._fill.user.key;\n }\n\n /**\n * Get username.\n *\n * @returns {string} Username of the user who uploaded\n * the image.\n */\n public get username(): string {\n return this._fill.user.username;\n }\n\n /**\n * Get width.\n *\n * @returns {number} Width of original image, not\n * adjusted for orientation.\n */\n public get width(): number {\n return this._fill.width;\n }\n\n /**\n * Cache the image and mesh assets.\n *\n * @description The assets are always cached internally by the\n * library prior to setting a node as the current node.\n *\n * @returns {Observable<Node>} Observable emitting this node whenever the\n * load status has changed and when the mesh or image has been fully loaded.\n *\n * @ignore\n */\n public cacheAssets$(): Observable<Node> {\n return this._cache.cacheAssets$(this.key, this.pano, this.merged).pipe(\n map(\n (): Node => {\n return this;\n }));\n }\n\n /**\n * Cache the image asset.\n *\n * @description Use for caching a differently sized image than\n * the one currently held by the node.\n *\n * @returns {Observable<Node>} Observable emitting this node whenever the\n * load status has changed and when the mesh or image has been fully loaded.\n *\n * @ignore\n */\n public cacheImage$(imageSize: ImageSize): Observable<Node> {\n return this._cache.cacheImage$(this.key, imageSize).pipe(\n map(\n (): Node => {\n return this;\n }));\n }\n\n /**\n * Cache the sequence edges.\n *\n * @description The sequence edges are cached asynchronously\n * internally by the library.\n *\n * @param {Array<IEdge>} edges - Sequence edges to cache.\n * @ignore\n */\n public cacheSequenceEdges(edges: IEdge[]): void {\n this._cache.cacheSequenceEdges(edges);\n }\n\n /**\n * Cache the spatial edges.\n *\n * @description The spatial edges are cached asynchronously\n * internally by the library.\n *\n * @param {Array<IEdge>} edges - Spatial edges to cache.\n * @ignore\n */\n public cacheSpatialEdges(edges: IEdge[]): void {\n this._cache.cacheSpatialEdges(edges);\n }\n\n /**\n * Dispose the node.\n *\n * @description Disposes all cached assets.\n * @ignore\n */\n public dispose(): void {\n if (this._cache != null) {\n this._cache.dispose();\n this._cache = null;\n }\n\n this._core = null;\n this._fill = null;\n }\n\n /**\n * Initialize the node cache.\n *\n * @description The node cache is initialized internally by\n * the library.\n *\n * @param {NodeCache} cache - The node cache to set as cache.\n * @ignore\n */\n public initializeCache(cache: NodeCache): void {\n if (this._cache != null) {\n throw new Error(`Node cache already initialized (${this.key}).`);\n }\n\n this._cache = cache;\n }\n\n /**\n * Fill the node with all properties.\n *\n * @description The node is filled internally by\n * the library.\n *\n * @param {IFillNode} fill - The fill node struct.\n * @ignore\n */\n public makeFull(fill: IFillNode): void {\n if (fill == null) {\n throw new Error(\"Fill can not be null.\");\n }\n\n this._fill = fill;\n }\n\n /**\n * Reset the sequence edges.\n *\n * @ignore\n */\n public resetSequenceEdges(): void {\n this._cache.resetSequenceEdges();\n }\n\n /**\n * Reset the spatial edges.\n *\n * @ignore\n */\n public resetSpatialEdges(): void {\n this._cache.resetSpatialEdges();\n }\n\n /**\n * Clears the image and mesh assets, aborts\n * any outstanding requests and resets edges.\n *\n * @ignore\n */\n public uncache(): void {\n if (this._cache == null) {\n return;\n }\n\n this._cache.dispose();\n this._cache = null;\n }\n}\n\nexport default Node;\n",
+ "import {of as observableOf, combineLatest as observableCombineLatest, Subject, Observable, Subscriber, Subscription} from \"rxjs\";\n\nimport {map, tap, startWith, publishReplay, refCount, finalize, first} from \"rxjs/operators\";\n\nimport {IEdge} from \"../Edge\";\nimport {\n IEdgeStatus,\n IMesh,\n ILoadStatus,\n ILoadStatusObject,\n MeshReader,\n} from \"../Graph\";\nimport {\n Settings,\n Urls,\n} from \"../Utils\";\nimport {ImageSize} from \"../Viewer\";\n\n/**\n * @class NodeCache\n *\n * @classdesc Represents the cached properties of a node.\n */\nexport class NodeCache {\n private _disposed: boolean;\n\n private _image: HTMLImageElement;\n private _loadStatus: ILoadStatus;\n private _mesh: IMesh;\n private _sequenceEdges: IEdgeStatus;\n private _spatialEdges: IEdgeStatus;\n\n private _imageRequest: XMLHttpRequest;\n private _meshRequest: XMLHttpRequest;\n\n private _imageChanged$: Subject<HTMLImageElement>;\n private _image$: Observable<HTMLImageElement>;\n private _sequenceEdgesChanged$: Subject<IEdgeStatus>;\n private _sequenceEdges$: Observable<IEdgeStatus>;\n private _spatialEdgesChanged$: Subject<IEdgeStatus>;\n private _spatialEdges$: Observable<IEdgeStatus>;\n\n private _cachingAssets$: Observable<NodeCache>;\n\n private _iamgeSubscription: Subscription;\n private _sequenceEdgesSubscription: Subscription;\n private _spatialEdgesSubscription: Subscription;\n\n /**\n * Create a new node cache instance.\n */\n constructor() {\n this._disposed = false;\n\n this._image = null;\n this._loadStatus = { loaded: 0, total: 0 };\n this._mesh = null;\n this._sequenceEdges = { cached: false, edges: [] };\n this._spatialEdges = { cached: false, edges: [] };\n\n this._imageChanged$ = new Subject<HTMLImageElement>();\n this._image$ = this._imageChanged$.pipe(\n startWith(null),\n publishReplay(1),\n refCount());\n\n this._iamgeSubscription = this._image$.subscribe();\n\n this._sequenceEdgesChanged$ = new Subject<IEdgeStatus>();\n this._sequenceEdges$ = this._sequenceEdgesChanged$.pipe(\n startWith(this._sequenceEdges),\n publishReplay(1),\n refCount());\n\n this._sequenceEdgesSubscription = this._sequenceEdges$.subscribe(() => { /*noop*/ });\n\n this._spatialEdgesChanged$ = new Subject<IEdgeStatus>();\n this._spatialEdges$ = this._spatialEdgesChanged$.pipe(\n startWith(this._spatialEdges),\n publishReplay(1),\n refCount());\n\n this._spatialEdgesSubscription = this._spatialEdges$.subscribe(() => { /*noop*/ });\n\n this._cachingAssets$ = null;\n }\n\n /**\n * Get image.\n *\n * @description Will not be set when assets have not been cached\n * or when the object has been disposed.\n *\n * @returns {HTMLImageElement} Cached image element of the node.\n */\n public get image(): HTMLImageElement {\n return this._image;\n }\n\n /**\n * Get image$.\n *\n * @returns {Observable<HTMLImageElement>} Observable emitting\n * the cached image when it is updated.\n */\n public get image$(): Observable<HTMLImageElement> {\n return this._image$;\n }\n\n /**\n * Get loadStatus.\n *\n * @returns {ILoadStatus} Value indicating the load status\n * of the mesh and image.\n */\n public get loadStatus(): ILoadStatus {\n return this._loadStatus;\n }\n\n /**\n * Get mesh.\n *\n * @description Will not be set when assets have not been cached\n * or when the object has been disposed.\n *\n * @returns {IMesh} SfM triangulated mesh of reconstructed\n * atomic 3D points.\n */\n public get mesh(): IMesh {\n return this._mesh;\n }\n\n /**\n * Get sequenceEdges.\n *\n * @returns {IEdgeStatus} Value describing the status of the\n * sequence edges.\n */\n public get sequenceEdges(): IEdgeStatus {\n return this._sequenceEdges;\n }\n\n /**\n * Get sequenceEdges$.\n *\n * @returns {Observable<IEdgeStatus>} Observable emitting\n * values describing the status of the sequence edges.\n */\n public get sequenceEdges$(): Observable<IEdgeStatus> {\n return this._sequenceEdges$;\n }\n\n /**\n * Get spatialEdges.\n *\n * @returns {IEdgeStatus} Value describing the status of the\n * spatial edges.\n */\n public get spatialEdges(): IEdgeStatus {\n return this._spatialEdges;\n }\n\n /**\n * Get spatialEdges$.\n *\n * @returns {Observable<IEdgeStatus>} Observable emitting\n * values describing the status of the spatial edges.\n */\n public get spatialEdges$(): Observable<IEdgeStatus> {\n return this._spatialEdges$;\n }\n\n /**\n * Cache the image and mesh assets.\n *\n * @param {string} key - Key of the node to cache.\n * @param {boolean} pano - Value indicating whether node is a panorama.\n * @param {boolean} merged - Value indicating whether node is merged.\n * @returns {Observable<NodeCache>} Observable emitting this node\n * cache whenever the load status has changed and when the mesh or image\n * has been fully loaded.\n */\n public cacheAssets$(key: string, pano: boolean, merged: boolean): Observable<NodeCache> {\n if (this._cachingAssets$ != null) {\n return this._cachingAssets$;\n }\n\n let imageSize: ImageSize = pano ?\n Settings.basePanoramaSize :\n Settings.baseImageSize;\n\n this._cachingAssets$ = observableCombineLatest(\n this._cacheImage$(key, imageSize),\n this._cacheMesh$(key, merged)).pipe(\n map(\n ([imageStatus, meshStatus]: [ILoadStatusObject<HTMLImageElement>, ILoadStatusObject<IMesh>]): NodeCache => {\n this._loadStatus.loaded = 0;\n this._loadStatus.total = 0;\n\n if (meshStatus) {\n this._mesh = meshStatus.object;\n this._loadStatus.loaded += meshStatus.loaded.loaded;\n this._loadStatus.total += meshStatus.loaded.total;\n }\n\n if (imageStatus) {\n this._image = imageStatus.object;\n this._loadStatus.loaded += imageStatus.loaded.loaded;\n this._loadStatus.total += imageStatus.loaded.total;\n }\n\n return this;\n }),\n finalize(\n (): void => {\n this._cachingAssets$ = null;\n }),\n publishReplay(1),\n refCount());\n\n this._cachingAssets$.pipe(\n first(\n (nodeCache: NodeCache): boolean => {\n return !!nodeCache._image;\n }))\n .subscribe(\n (nodeCache: NodeCache): void => {\n this._imageChanged$.next(this._image);\n },\n (error: Error): void => { /*noop*/ });\n\n return this._cachingAssets$;\n }\n\n /**\n * Cache an image with a higher resolution than the current one.\n *\n * @param {string} key - Key of the node to cache.\n * @param {ImageSize} imageSize - The size to cache.\n * @returns {Observable<NodeCache>} Observable emitting a single item,\n * the node cache, when the image has been cached. If supplied image\n * size is not larger than the current image size the node cache is\n * returned immediately.\n */\n public cacheImage$(key: string, imageSize: ImageSize): Observable<NodeCache> {\n if (this._image != null && imageSize <= Math.max(this._image.width, this._image.height)) {\n return observableOf<NodeCache>(this);\n }\n\n const cacheImage$: Observable<NodeCache> = this._cacheImage$(key, imageSize).pipe(\n first(\n (status: ILoadStatusObject<HTMLImageElement>): boolean => {\n return status.object != null;\n }),\n tap(\n (status: ILoadStatusObject<HTMLImageElement>): void => {\n this._disposeImage();\n this._image = status.object;\n }),\n map(\n (imageStatus: ILoadStatusObject<HTMLImageElement>): NodeCache => {\n return this;\n }),\n publishReplay(1),\n refCount());\n\n cacheImage$\n .subscribe(\n (nodeCache: NodeCache): void => {\n this._imageChanged$.next(this._image);\n },\n (error: Error): void => { /*noop*/ });\n\n return cacheImage$;\n }\n\n /**\n * Cache the sequence edges.\n *\n * @param {Array<IEdge>} edges - Sequence edges to cache.\n */\n public cacheSequenceEdges(edges: IEdge[]): void {\n this._sequenceEdges = { cached: true, edges: edges };\n this._sequenceEdgesChanged$.next(this._sequenceEdges);\n }\n\n /**\n * Cache the spatial edges.\n *\n * @param {Array<IEdge>} edges - Spatial edges to cache.\n */\n public cacheSpatialEdges(edges: IEdge[]): void {\n this._spatialEdges = { cached: true, edges: edges };\n this._spatialEdgesChanged$.next(this._spatialEdges);\n }\n\n /**\n * Dispose the node cache.\n *\n * @description Disposes all cached assets and unsubscribes to\n * all streams.\n */\n public dispose(): void {\n this._iamgeSubscription.unsubscribe();\n this._sequenceEdgesSubscription.unsubscribe();\n this._spatialEdgesSubscription.unsubscribe();\n\n this._disposeImage();\n\n this._mesh = null;\n this._loadStatus.loaded = 0;\n this._loadStatus.total = 0;\n this._sequenceEdges = { cached: false, edges: [] };\n this._spatialEdges = { cached: false, edges: [] };\n\n this._imageChanged$.next(null);\n this._sequenceEdgesChanged$.next(this._sequenceEdges);\n this._spatialEdgesChanged$.next(this._spatialEdges);\n\n this._disposed = true;\n\n if (this._imageRequest != null) {\n this._imageRequest.abort();\n }\n\n if (this._meshRequest != null) {\n this._meshRequest.abort();\n }\n }\n\n /**\n * Reset the sequence edges.\n */\n public resetSequenceEdges(): void {\n this._sequenceEdges = { cached: false, edges: [] };\n this._sequenceEdgesChanged$.next(this._sequenceEdges);\n }\n\n /**\n * Reset the spatial edges.\n */\n public resetSpatialEdges(): void {\n this._spatialEdges = { cached: false, edges: [] };\n this._spatialEdgesChanged$.next(this._spatialEdges);\n }\n\n /**\n * Cache the image.\n *\n * @param {string} key - Key of the node to cache.\n * @param {boolean} pano - Value indicating whether node is a panorama.\n * @returns {Observable<ILoadStatusObject<HTMLImageElement>>} Observable\n * emitting a load status object every time the load status changes\n * and completes when the image is fully loaded.\n */\n private _cacheImage$(key: string, imageSize: ImageSize): Observable<ILoadStatusObject<HTMLImageElement>> {\n return Observable.create(\n (subscriber: Subscriber<ILoadStatusObject<HTMLImageElement>>): void => {\n let xmlHTTP: XMLHttpRequest = new XMLHttpRequest();\n xmlHTTP.open(\"GET\", Urls.thumbnail(key, imageSize, Urls.origin), true);\n xmlHTTP.responseType = \"arraybuffer\";\n xmlHTTP.timeout = 15000;\n\n xmlHTTP.onload = (pe: ProgressEvent) => {\n if (xmlHTTP.status !== 200) {\n this._imageRequest = null;\n\n subscriber.error(\n new Error(`Failed to fetch image (${key}). Status: ${xmlHTTP.status}, ${xmlHTTP.statusText}`));\n\n return;\n }\n\n let image: HTMLImageElement = new Image();\n image.crossOrigin = \"Anonymous\";\n\n image.onload = (e: Event) => {\n this._imageRequest = null;\n\n if (this._disposed) {\n window.URL.revokeObjectURL(image.src);\n subscriber.error(new Error(`Image load was aborted (${key})`));\n\n return;\n }\n\n subscriber.next({ loaded: { loaded: pe.loaded, total: pe.total }, object: image });\n subscriber.complete();\n };\n\n image.onerror = (error: ErrorEvent) => {\n this._imageRequest = null;\n\n subscriber.error(new Error(`Failed to load image (${key})`));\n };\n\n let blob: Blob = new Blob([xmlHTTP.response]);\n image.src = window.URL.createObjectURL(blob);\n };\n\n xmlHTTP.onprogress = (pe: ProgressEvent) => {\n if (this._disposed) {\n return;\n }\n\n subscriber.next({loaded: { loaded: pe.loaded, total: pe.total }, object: null });\n };\n\n xmlHTTP.onerror = (error: Event) => {\n this._imageRequest = null;\n\n subscriber.error(new Error(`Failed to fetch image (${key})`));\n };\n\n xmlHTTP.ontimeout = (e: Event) => {\n this._imageRequest = null;\n\n subscriber.error(new Error(`Image request timed out (${key})`));\n };\n\n xmlHTTP.onabort = (event: Event) => {\n this._imageRequest = null;\n\n subscriber.error(new Error(`Image request was aborted (${key})`));\n };\n\n this._imageRequest = xmlHTTP;\n\n xmlHTTP.send(null);\n });\n }\n\n /**\n * Cache the mesh.\n *\n * @param {string} key - Key of the node to cache.\n * @param {boolean} merged - Value indicating whether node is merged.\n * @returns {Observable<ILoadStatusObject<IMesh>>} Observable emitting\n * a load status object every time the load status changes and completes\n * when the mesh is fully loaded.\n */\n private _cacheMesh$(key: string, merged: boolean): Observable<ILoadStatusObject<IMesh>> {\n return Observable.create(\n (subscriber: Subscriber<ILoadStatusObject<IMesh>>): void => {\n if (!merged) {\n subscriber.next(this._createEmptyMeshLoadStatus());\n subscriber.complete();\n return;\n }\n\n let xmlHTTP: XMLHttpRequest = new XMLHttpRequest();\n xmlHTTP.open(\"GET\", Urls.protoMesh(key), true);\n xmlHTTP.responseType = \"arraybuffer\";\n xmlHTTP.timeout = 15000;\n\n xmlHTTP.onload = (pe: ProgressEvent) => {\n this._meshRequest = null;\n\n if (this._disposed) {\n return;\n }\n\n let mesh: IMesh = xmlHTTP.status === 200 ?\n MeshReader.read(new Buffer(xmlHTTP.response)) :\n { faces: [], vertices: [] };\n\n subscriber.next({ loaded: { loaded: pe.loaded, total: pe.total }, object: mesh });\n subscriber.complete();\n };\n\n xmlHTTP.onprogress = (pe: ProgressEvent) => {\n if (this._disposed) {\n return;\n }\n\n subscriber.next({ loaded: { loaded: pe.loaded, total: pe.total }, object: null });\n };\n\n xmlHTTP.onerror = (e: Event) => {\n this._meshRequest = null;\n\n console.error(`Failed to cache mesh (${key})`);\n\n subscriber.next(this._createEmptyMeshLoadStatus());\n subscriber.complete();\n };\n\n xmlHTTP.ontimeout = (e: Event) => {\n this._meshRequest = null;\n\n console.error(`Mesh request timed out (${key})`);\n\n subscriber.next(this._createEmptyMeshLoadStatus());\n subscriber.complete();\n };\n\n xmlHTTP.onabort = (e: Event) => {\n this._meshRequest = null;\n\n subscriber.error(new Error(`Mesh request was aborted (${key})`));\n };\n\n this._meshRequest = xmlHTTP;\n\n xmlHTTP.send(null);\n });\n }\n\n /**\n * Create a load status object with an empty mesh.\n *\n * @returns {ILoadStatusObject<IMesh>} Load status object\n * with empty mesh.\n */\n private _createEmptyMeshLoadStatus(): ILoadStatusObject<IMesh> {\n return {\n loaded: { loaded: 0, total: 0 },\n object: { faces: [], vertices: [] },\n };\n }\n\n private _disposeImage(): void {\n if (this._image != null) {\n window.URL.revokeObjectURL(this._image.src);\n }\n\n this._image = null;\n }\n}\n\nexport default NodeCache;\n",
+ "import {ISequence} from \"../API\";\n\n/**\n * @class Sequence\n *\n * @classdesc Represents a sequence of ordered nodes.\n */\nexport class Sequence {\n private _key: string;\n private _keys: string[];\n\n /**\n * Create a new sequene instance.\n *\n * @param {ISequence} sequence - Raw sequence data.\n */\n constructor(sequence: ISequence) {\n this._key = sequence.key;\n this._keys = sequence.keys;\n }\n\n /**\n * Get key.\n *\n * @returns {string} Unique sequence key.\n */\n public get key(): string {\n return this._key;\n }\n\n /**\n * Get keys.\n *\n * @returns {Array<string>} Array of ordered node keys in the sequence.\n */\n public get keys(): string[] {\n return this._keys;\n }\n\n /**\n * Dispose the sequence.\n *\n * @description Disposes all cached assets.\n */\n public dispose(): void {\n this._key = null;\n this._keys = null;\n }\n\n /**\n * Find the next node key in the sequence with respect to\n * the provided node key.\n *\n * @param {string} key - Reference node key.\n * @returns {string} Next key in sequence if it exists, null otherwise.\n */\n public findNextKey(key: string): string {\n let i: number = this._keys.indexOf(key);\n\n if ((i + 1) >= this._keys.length || i === -1) {\n return null;\n } else {\n return this._keys[i + 1];\n }\n }\n\n /**\n * Find the previous node key in the sequence with respect to\n * the provided node key.\n *\n * @param {string} key - Reference node key.\n * @returns {string} Previous key in sequence if it exists, null otherwise.\n */\n public findPrevKey(key: string): string {\n let i: number = this._keys.indexOf(key);\n\n if (i === 0 || i === -1) {\n return null;\n } else {\n return this._keys[i - 1];\n }\n }\n}\n\nexport default Sequence;\n",
+ "import * as THREE from \"three\";\n\nimport {\n Node,\n Sequence,\n} from \"../../Graph\";\nimport\n{\n EdgeDirection,\n IStep,\n ITurn,\n IPano,\n IEdge,\n IPotentialEdge,\n EdgeCalculatorSettings,\n EdgeCalculatorDirections,\n EdgeCalculatorCoefficients,\n} from \"../../Edge\";\nimport {ArgumentMapillaryError} from \"../../Error\";\nimport {GeoCoords, Spatial} from \"../../Geo\";\n\n/**\n * @class EdgeCalculator\n *\n * @classdesc Represents a class for calculating node edges.\n */\nexport class EdgeCalculator {\n\n private _spatial: Spatial;\n private _geoCoords: GeoCoords;\n\n private _settings: EdgeCalculatorSettings;\n private _directions: EdgeCalculatorDirections;\n private _coefficients: EdgeCalculatorCoefficients;\n\n /**\n * Create a new edge calculator instance.\n *\n * @param {EdgeCalculatorSettings} settings - Settings struct.\n * @param {EdgeCalculatorDirections} directions - Directions struct.\n * @param {EdgeCalculatorCoefficients} coefficients - Coefficients struct.\n */\n constructor(\n settings?: EdgeCalculatorSettings,\n directions?: EdgeCalculatorDirections,\n coefficients?: EdgeCalculatorCoefficients) {\n\n this._spatial = new Spatial();\n this._geoCoords = new GeoCoords();\n\n this._settings = settings != null ? settings : new EdgeCalculatorSettings();\n this._directions = directions != null ? directions : new EdgeCalculatorDirections();\n this._coefficients = coefficients != null ? coefficients : new EdgeCalculatorCoefficients();\n }\n\n /**\n * Returns the potential edges to destination nodes for a set\n * of nodes with respect to a source node.\n *\n * @param {Node} node - Source node.\n * @param {Array<Node>} nodes - Potential destination nodes.\n * @param {Array<string>} fallbackKeys - Keys for destination nodes that should\n * be returned even if they do not meet the criteria for a potential edge.\n * @throws {ArgumentMapillaryError} If node is not full.\n */\n public getPotentialEdges(node: Node, potentialNodes: Node[], fallbackKeys: string[]): IPotentialEdge[] {\n if (!node.full) {\n throw new ArgumentMapillaryError(\"Node has to be full.\");\n }\n\n if (!node.merged) {\n return [];\n }\n\n let currentDirection: THREE.Vector3 =\n this._spatial.viewingDirection(node.rotation);\n let currentVerticalDirection: number =\n this._spatial.angleToPlane(currentDirection.toArray(), [0, 0, 1]);\n\n let potentialEdges: IPotentialEdge[] = [];\n\n for (let potential of potentialNodes) {\n if (!potential.merged ||\n potential.key === node.key) {\n continue;\n }\n\n let enu: number[] = this._geoCoords.geodeticToEnu(\n potential.latLon.lat,\n potential.latLon.lon,\n potential.alt,\n node.latLon.lat,\n node.latLon.lon,\n node.alt);\n\n let motion: THREE.Vector3 = new THREE.Vector3(enu[0], enu[1], enu[2]);\n let distance: number = motion.length();\n\n if (distance > this._settings.maxDistance &&\n fallbackKeys.indexOf(potential.key) < 0) {\n continue;\n }\n\n let motionChange: number = this._spatial.angleBetweenVector2(\n currentDirection.x,\n currentDirection.y,\n motion.x,\n motion.y);\n\n let verticalMotion: number = this._spatial.angleToPlane(motion.toArray(), [0, 0, 1]);\n\n let direction: THREE.Vector3 =\n this._spatial.viewingDirection(potential.rotation);\n\n let directionChange: number = this._spatial.angleBetweenVector2(\n currentDirection.x,\n currentDirection.y,\n direction.x,\n direction.y);\n\n let verticalDirection: number = this._spatial.angleToPlane(direction.toArray(), [0, 0, 1]);\n let verticalDirectionChange: number = verticalDirection - currentVerticalDirection;\n\n let rotation: number = this._spatial.relativeRotationAngle(\n node.rotation,\n potential.rotation);\n\n let worldMotionAzimuth: number =\n this._spatial.angleBetweenVector2(1, 0, motion.x, motion.y);\n\n let sameSequence: boolean = potential.sequenceKey != null &&\n node.sequenceKey != null &&\n potential.sequenceKey === node.sequenceKey;\n\n let sameMergeCC: boolean =\n (potential.mergeCC == null && node.mergeCC == null) ||\n potential.mergeCC === node.mergeCC;\n\n let sameUser: boolean =\n potential.userKey === node.userKey;\n\n let potentialEdge: IPotentialEdge = {\n capturedAt: potential.capturedAt,\n croppedPano: potential.pano && !potential.fullPano,\n directionChange: directionChange,\n distance: distance,\n fullPano: potential.fullPano,\n key: potential.key,\n motionChange: motionChange,\n rotation: rotation,\n sameMergeCC: sameMergeCC,\n sameSequence: sameSequence,\n sameUser: sameUser,\n sequenceKey: potential.sequenceKey,\n verticalDirectionChange: verticalDirectionChange,\n verticalMotion: verticalMotion,\n worldMotionAzimuth: worldMotionAzimuth,\n };\n\n potentialEdges.push(potentialEdge);\n }\n\n return potentialEdges;\n }\n\n /**\n * Computes the sequence edges for a node.\n *\n * @param {Node} node - Source node.\n * @throws {ArgumentMapillaryError} If node is not full.\n */\n public computeSequenceEdges(node: Node, sequence: Sequence): IEdge[] {\n if (!node.full) {\n throw new ArgumentMapillaryError(\"Node has to be full.\");\n }\n\n if (node.sequenceKey !== sequence.key) {\n throw new ArgumentMapillaryError(\"Node and sequence does not correspond.\");\n }\n\n let edges: IEdge[] = [];\n\n let nextKey: string = sequence.findNextKey(node.key);\n if (nextKey != null) {\n edges.push({\n data: {\n direction: EdgeDirection.Next,\n worldMotionAzimuth: Number.NaN,\n },\n from: node.key,\n to: nextKey,\n });\n }\n\n let prevKey: string = sequence.findPrevKey(node.key);\n if (prevKey != null) {\n edges.push({\n data: {\n direction: EdgeDirection.Prev,\n worldMotionAzimuth: Number.NaN,\n },\n from: node.key,\n to: prevKey,\n });\n }\n\n return edges;\n }\n\n /**\n * Computes the similar edges for a node.\n *\n * @description Similar edges for perspective images and cropped panoramas\n * look roughly in the same direction and are positioned closed to the node.\n * Similar edges for full panoramas only target other full panoramas.\n *\n * @param {Node} node - Source node.\n * @param {Array<IPotentialEdge>} potentialEdges - Potential edges.\n * @throws {ArgumentMapillaryError} If node is not full.\n */\n public computeSimilarEdges(node: Node, potentialEdges: IPotentialEdge[]): IEdge[] {\n if (!node.full) {\n throw new ArgumentMapillaryError(\"Node has to be full.\");\n }\n\n let nodeFullPano: boolean = node.fullPano;\n let sequenceGroups: { [key: string]: IPotentialEdge[] } = {};\n\n for (let potentialEdge of potentialEdges) {\n if (potentialEdge.sequenceKey == null) {\n continue;\n }\n\n if (potentialEdge.sameSequence) {\n continue;\n }\n\n if (nodeFullPano) {\n if (!potentialEdge.fullPano) {\n continue;\n }\n } else {\n if (!potentialEdge.fullPano &&\n Math.abs(potentialEdge.directionChange) > this._settings.similarMaxDirectionChange) {\n continue;\n }\n }\n\n if (potentialEdge.distance > this._settings.similarMaxDistance) {\n continue;\n }\n\n if (potentialEdge.sameUser &&\n Math.abs(potentialEdge.capturedAt - node.capturedAt) <\n this._settings.similarMinTimeDifference) {\n continue;\n }\n\n if (sequenceGroups[potentialEdge.sequenceKey] == null) {\n sequenceGroups[potentialEdge.sequenceKey] = [];\n }\n\n sequenceGroups[potentialEdge.sequenceKey].push(potentialEdge);\n\n }\n\n let similarEdges: IPotentialEdge[] = [];\n\n let calculateScore: (potentialEdge: IPotentialEdge) => number =\n node.fullPano ?\n (potentialEdge: IPotentialEdge): number => {\n return potentialEdge.distance;\n } :\n (potentialEdge: IPotentialEdge): number => {\n return this._coefficients.similarDistance * potentialEdge.distance +\n this._coefficients.similarRotation * potentialEdge.rotation;\n };\n\n for (let sequenceKey in sequenceGroups) {\n if (!sequenceGroups.hasOwnProperty(sequenceKey)) {\n continue;\n }\n\n let lowestScore: number = Number.MAX_VALUE;\n let similarEdge: IPotentialEdge = null;\n\n for (let potentialEdge of sequenceGroups[sequenceKey]) {\n let score: number = calculateScore(potentialEdge);\n\n if (score < lowestScore) {\n lowestScore = score;\n similarEdge = potentialEdge;\n }\n }\n\n if (similarEdge == null) {\n continue;\n }\n\n similarEdges.push(similarEdge);\n }\n\n return similarEdges\n .map<IEdge>(\n (potentialEdge: IPotentialEdge): IEdge => {\n return {\n data: {\n direction: EdgeDirection.Similar,\n worldMotionAzimuth: potentialEdge.worldMotionAzimuth,\n },\n from: node.key,\n to: potentialEdge.key,\n };\n });\n }\n\n /**\n * Computes the step edges for a perspective node.\n *\n * @description Step edge targets can only be other perspective nodes.\n * Returns an empty array for cropped and full panoramas.\n *\n * @param {Node} node - Source node.\n * @param {Array<IPotentialEdge>} potentialEdges - Potential edges.\n * @param {string} prevKey - Key of previous node in sequence.\n * @param {string} prevKey - Key of next node in sequence.\n * @throws {ArgumentMapillaryError} If node is not full.\n */\n public computeStepEdges(\n node: Node,\n potentialEdges: IPotentialEdge[],\n prevKey: string,\n nextKey: string): IEdge[] {\n\n if (!node.full) {\n throw new ArgumentMapillaryError(\"Node has to be full.\");\n }\n\n let edges: IEdge[] = [];\n\n if (node.pano) {\n return edges;\n }\n\n for (let k in this._directions.steps) {\n if (!this._directions.steps.hasOwnProperty(k)) {\n continue;\n }\n\n let step: IStep = this._directions.steps[k];\n\n let lowestScore: number = Number.MAX_VALUE;\n let edge: IPotentialEdge = null;\n let fallback: IPotentialEdge = null;\n\n for (let potential of potentialEdges) {\n if (potential.croppedPano || potential.fullPano) {\n continue;\n }\n\n if (Math.abs(potential.directionChange) > this._settings.stepMaxDirectionChange) {\n continue;\n }\n\n let motionDifference: number =\n this._spatial.angleDifference(step.motionChange, potential.motionChange);\n let directionMotionDifference: number =\n this._spatial.angleDifference(potential.directionChange, motionDifference);\n let drift: number =\n Math.max(Math.abs(motionDifference), Math.abs(directionMotionDifference));\n\n if (Math.abs(drift) > this._settings.stepMaxDrift) {\n continue;\n }\n\n let potentialKey: string = potential.key;\n if (step.useFallback && (potentialKey === prevKey || potentialKey === nextKey)) {\n fallback = potential;\n }\n\n if (potential.distance > this._settings.stepMaxDistance) {\n continue;\n }\n\n motionDifference = Math.sqrt(\n motionDifference * motionDifference +\n potential.verticalMotion * potential.verticalMotion);\n\n let score: number =\n this._coefficients.stepPreferredDistance *\n Math.abs(potential.distance - this._settings.stepPreferredDistance) /\n this._settings.stepMaxDistance +\n this._coefficients.stepMotion * motionDifference / this._settings.stepMaxDrift +\n this._coefficients.stepRotation * potential.rotation / this._settings.stepMaxDirectionChange +\n this._coefficients.stepSequencePenalty * (potential.sameSequence ? 0 : 1) +\n this._coefficients.stepMergeCCPenalty * (potential.sameMergeCC ? 0 : 1);\n\n if (score < lowestScore) {\n lowestScore = score;\n edge = potential;\n }\n }\n\n edge = edge == null ? fallback : edge;\n if (edge != null) {\n edges.push({\n data: {\n direction: step.direction,\n worldMotionAzimuth: edge.worldMotionAzimuth,\n },\n from: node.key,\n to: edge.key,\n });\n }\n }\n\n return edges;\n }\n\n /**\n * Computes the turn edges for a perspective node.\n *\n * @description Turn edge targets can only be other perspective images.\n * Returns an empty array for cropped and full panoramas.\n *\n * @param {Node} node - Source node.\n * @param {Array<IPotentialEdge>} potentialEdges - Potential edges.\n * @throws {ArgumentMapillaryError} If node is not full.\n */\n public computeTurnEdges(node: Node, potentialEdges: IPotentialEdge[]): IEdge[] {\n if (!node.full) {\n throw new ArgumentMapillaryError(\"Node has to be full.\");\n }\n\n let edges: IEdge[] = [];\n\n if (node.pano) {\n return edges;\n }\n\n for (let k in this._directions.turns) {\n if (!this._directions.turns.hasOwnProperty(k)) {\n continue;\n }\n\n let turn: ITurn = this._directions.turns[k];\n\n let lowestScore: number = Number.MAX_VALUE;\n let edge: IPotentialEdge = null;\n\n for (let potential of potentialEdges) {\n if (potential.croppedPano || potential.fullPano) {\n continue;\n }\n\n if (potential.distance > this._settings.turnMaxDistance) {\n continue;\n }\n\n let rig: boolean =\n turn.direction !== EdgeDirection.TurnU &&\n potential.distance < this._settings.turnMaxRigDistance &&\n Math.abs(potential.directionChange) > this._settings.turnMinRigDirectionChange;\n\n let directionDifference: number = this._spatial.angleDifference(\n turn.directionChange, potential.directionChange);\n\n let score: number;\n\n if (\n rig &&\n potential.directionChange * turn.directionChange > 0 &&\n Math.abs(potential.directionChange) < Math.abs(turn.directionChange)) {\n score = -Math.PI / 2 + Math.abs(potential.directionChange);\n } else {\n if (Math.abs(directionDifference) > this._settings.turnMaxDirectionChange) {\n continue;\n }\n\n let motionDifference: number = turn.motionChange ?\n this._spatial.angleDifference(turn.motionChange, potential.motionChange) : 0;\n\n motionDifference = Math.sqrt(\n motionDifference * motionDifference +\n potential.verticalMotion * potential.verticalMotion);\n\n score =\n this._coefficients.turnDistance * potential.distance /\n this._settings.turnMaxDistance +\n this._coefficients.turnMotion * motionDifference / Math.PI +\n this._coefficients.turnSequencePenalty * (potential.sameSequence ? 0 : 1) +\n this._coefficients.turnMergeCCPenalty * (potential.sameMergeCC ? 0 : 1);\n }\n\n if (score < lowestScore) {\n lowestScore = score;\n edge = potential;\n }\n }\n\n if (edge != null) {\n edges.push({\n data: {\n direction: turn.direction,\n worldMotionAzimuth: edge.worldMotionAzimuth,\n },\n from: node.key,\n to: edge.key,\n });\n }\n }\n\n return edges;\n }\n\n /**\n * Computes the pano edges for a perspective node.\n *\n * @description Perspective to pano edge targets can only be\n * full pano nodes. Returns an empty array for cropped and full panoramas.\n *\n * @param {Node} node - Source node.\n * @param {Array<IPotentialEdge>} potentialEdges - Potential edges.\n * @throws {ArgumentMapillaryError} If node is not full.\n */\n public computePerspectiveToPanoEdges(node: Node, potentialEdges: IPotentialEdge[]): IEdge[] {\n if (!node.full) {\n throw new ArgumentMapillaryError(\"Node has to be full.\");\n }\n\n if (node.pano) {\n return [];\n }\n\n let lowestScore: number = Number.MAX_VALUE;\n let edge: IPotentialEdge = null;\n\n for (let potential of potentialEdges) {\n if (!potential.fullPano) {\n continue;\n }\n\n let score: number =\n this._coefficients.panoPreferredDistance *\n Math.abs(potential.distance - this._settings.panoPreferredDistance) /\n this._settings.panoMaxDistance +\n this._coefficients.panoMotion * Math.abs(potential.motionChange) / Math.PI +\n this._coefficients.panoMergeCCPenalty * (potential.sameMergeCC ? 0 : 1);\n\n if (score < lowestScore) {\n lowestScore = score;\n edge = potential;\n }\n }\n\n if (edge == null) {\n return [];\n }\n\n return [\n {\n data: {\n direction: EdgeDirection.Pano,\n worldMotionAzimuth: edge.worldMotionAzimuth,\n },\n from: node.key,\n to: edge.key,\n },\n ];\n }\n\n /**\n * Computes the full pano and step edges for a full pano node.\n *\n * @description Pano to pano edge targets can only be\n * full pano nodes. Pano to step edge targets can only be perspective\n * nodes.\n * Returns an empty array for cropped panoramas and perspective nodes.\n *\n * @param {Node} node - Source node.\n * @param {Array<IPotentialEdge>} potentialEdges - Potential edges.\n * @throws {ArgumentMapillaryError} If node is not full.\n */\n public computePanoEdges(node: Node, potentialEdges: IPotentialEdge[]): IEdge[] {\n if (!node.full) {\n throw new ArgumentMapillaryError(\"Node has to be full.\");\n }\n\n if (!node.fullPano) {\n return [];\n }\n\n let panoEdges: IEdge[] = [];\n let potentialPanos: IPotentialEdge[] = [];\n let potentialSteps: [EdgeDirection, IPotentialEdge][] = [];\n\n for (let potential of potentialEdges) {\n if (potential.distance > this._settings.panoMaxDistance) {\n continue;\n }\n\n if (potential.fullPano) {\n if (potential.distance < this._settings.panoMinDistance) {\n continue;\n }\n\n potentialPanos.push(potential);\n } else {\n if (potential.croppedPano) {\n continue;\n }\n\n for (let k in this._directions.panos) {\n if (!this._directions.panos.hasOwnProperty(k)) {\n continue;\n }\n\n let pano: IPano = this._directions.panos[k];\n\n let turn: number = this._spatial.angleDifference(\n potential.directionChange,\n potential.motionChange);\n\n let turnChange: number = this._spatial.angleDifference(pano.directionChange, turn);\n\n if (Math.abs(turnChange) > this._settings.panoMaxStepTurnChange) {\n continue;\n }\n\n potentialSteps.push([pano.direction, potential]);\n\n // break if step direction found\n break;\n }\n }\n }\n\n let maxRotationDifference: number = Math.PI / this._settings.panoMaxItems;\n let occupiedAngles: number[] = [];\n let stepAngles: number[] = [];\n\n for (let index: number = 0; index < this._settings.panoMaxItems; index++) {\n let rotation: number = index / this._settings.panoMaxItems * 2 * Math.PI;\n\n let lowestScore: number = Number.MAX_VALUE;\n let edge: IPotentialEdge = null;\n\n for (let potential of potentialPanos) {\n let motionDifference: number = this._spatial.angleDifference(rotation, potential.motionChange);\n\n if (Math.abs(motionDifference) > maxRotationDifference) {\n continue;\n }\n\n let occupiedDifference: number = Number.MAX_VALUE;\n for (let occupiedAngle of occupiedAngles) {\n let difference: number = Math.abs(this._spatial.angleDifference(occupiedAngle, potential.motionChange));\n if (difference < occupiedDifference) {\n occupiedDifference = difference;\n }\n }\n\n if (occupiedDifference <= maxRotationDifference) {\n continue;\n }\n\n let score: number =\n this._coefficients.panoPreferredDistance *\n Math.abs(potential.distance - this._settings.panoPreferredDistance) /\n this._settings.panoMaxDistance +\n this._coefficients.panoMotion * Math.abs(motionDifference) / maxRotationDifference +\n this._coefficients.panoSequencePenalty * (potential.sameSequence ? 0 : 1) +\n this._coefficients.panoMergeCCPenalty * (potential.sameMergeCC ? 0 : 1);\n\n if (score < lowestScore) {\n lowestScore = score;\n edge = potential;\n }\n }\n\n if (edge != null) {\n occupiedAngles.push(edge.motionChange);\n panoEdges.push({\n data: {\n direction: EdgeDirection.Pano,\n worldMotionAzimuth: edge.worldMotionAzimuth,\n },\n from: node.key,\n to: edge.key,\n });\n } else {\n stepAngles.push(rotation);\n }\n }\n\n let occupiedStepAngles: {[direction: string]: number[] } = {};\n occupiedStepAngles[EdgeDirection.Pano] = occupiedAngles;\n occupiedStepAngles[EdgeDirection.StepForward] = [];\n occupiedStepAngles[EdgeDirection.StepLeft] = [];\n occupiedStepAngles[EdgeDirection.StepBackward] = [];\n occupiedStepAngles[EdgeDirection.StepRight] = [];\n\n for (let stepAngle of stepAngles) {\n let occupations: [EdgeDirection, IPotentialEdge][] = [];\n\n for (let k in this._directions.panos) {\n if (!this._directions.panos.hasOwnProperty(k)) {\n continue;\n }\n\n let pano: IPano = this._directions.panos[k];\n\n let allOccupiedAngles: number[] = occupiedStepAngles[EdgeDirection.Pano]\n .concat(occupiedStepAngles[pano.direction])\n .concat(occupiedStepAngles[pano.prev])\n .concat(occupiedStepAngles[pano.next]);\n\n let lowestScore: number = Number.MAX_VALUE;\n let edge: [EdgeDirection, IPotentialEdge] = null;\n\n for (let potential of potentialSteps) {\n if (potential[0] !== pano.direction) {\n continue;\n }\n\n let motionChange: number = this._spatial.angleDifference(stepAngle, potential[1].motionChange);\n\n if (Math.abs(motionChange) > maxRotationDifference) {\n continue;\n }\n\n let minOccupiedDifference: number = Number.MAX_VALUE;\n for (let occupiedAngle of allOccupiedAngles) {\n let occupiedDifference: number =\n Math.abs(this._spatial.angleDifference(occupiedAngle, potential[1].motionChange));\n\n if (occupiedDifference < minOccupiedDifference) {\n minOccupiedDifference = occupiedDifference;\n }\n }\n\n if (minOccupiedDifference <= maxRotationDifference) {\n continue;\n }\n\n let score: number = this._coefficients.panoPreferredDistance *\n Math.abs(potential[1].distance - this._settings.panoPreferredDistance) /\n this._settings.panoMaxDistance +\n this._coefficients.panoMotion * Math.abs(motionChange) / maxRotationDifference +\n this._coefficients.panoMergeCCPenalty * (potential[1].sameMergeCC ? 0 : 1);\n\n if (score < lowestScore) {\n lowestScore = score;\n edge = potential;\n }\n }\n\n if (edge != null) {\n occupations.push(edge);\n panoEdges.push({\n data: {\n direction: edge[0],\n worldMotionAzimuth: edge[1].worldMotionAzimuth,\n },\n from: node.key,\n to: edge[1].key,\n });\n }\n }\n\n for (let occupation of occupations) {\n occupiedStepAngles[occupation[0]].push(occupation[1].motionChange);\n }\n }\n\n return panoEdges;\n }\n}\n\nexport default EdgeCalculator;\n",
"export class EdgeCalculatorCoefficients {\n public panoPreferredDistance: number;\n public panoMotion: number;\n public panoSequencePenalty: number;\n public panoMergeCCPenalty: number;\n\n public stepPreferredDistance: number;\n public stepMotion: number;\n public stepRotation: number;\n public stepSequencePenalty: number;\n public stepMergeCCPenalty: number;\n\n public similarDistance: number;\n public similarRotation: number;\n\n public turnDistance: number;\n public turnMotion: number;\n public turnSequencePenalty: number;\n public turnMergeCCPenalty: number;\n\n constructor() {\n this.panoPreferredDistance = 2;\n this.panoMotion = 2;\n this.panoSequencePenalty = 1;\n this.panoMergeCCPenalty = 4;\n\n this.stepPreferredDistance = 4;\n this.stepMotion = 3;\n this.stepRotation = 4;\n this.stepSequencePenalty = 2;\n this.stepMergeCCPenalty = 6;\n\n this.similarDistance = 2;\n this.similarRotation = 3;\n\n this.turnDistance = 4;\n this.turnMotion = 2;\n this.turnSequencePenalty = 1;\n this.turnMergeCCPenalty = 4;\n }\n}\n\nexport default EdgeCalculatorCoefficients;\n",
"import {\n EdgeDirection,\n IPano,\n IStep,\n ITurn,\n} from \"../../Edge\";\n\nexport class EdgeCalculatorDirections {\n\n public steps: { [direction: string]: IStep } = {};\n public turns: { [direction: string]: ITurn } = {};\n public panos: { [direction: string]: IPano } = {};\n\n constructor() {\n this.steps[EdgeDirection.StepForward] = {\n direction: EdgeDirection.StepForward,\n motionChange: 0,\n useFallback: true,\n };\n\n this.steps[EdgeDirection.StepBackward] = {\n direction: EdgeDirection.StepBackward,\n motionChange: Math.PI,\n useFallback: true,\n };\n\n this.steps[EdgeDirection.StepLeft] = {\n direction: EdgeDirection.StepLeft,\n motionChange: Math.PI / 2,\n useFallback: false,\n };\n\n this.steps[EdgeDirection.StepRight] = {\n direction: EdgeDirection.StepRight,\n motionChange: -Math.PI / 2,\n useFallback: false,\n };\n\n this.turns[EdgeDirection.TurnLeft] = {\n direction: EdgeDirection.TurnLeft,\n directionChange: Math.PI / 2,\n motionChange: Math.PI / 4,\n };\n\n this.turns[EdgeDirection.TurnRight] = {\n direction: EdgeDirection.TurnRight,\n directionChange: -Math.PI / 2,\n motionChange: -Math.PI / 4,\n };\n\n this.turns[EdgeDirection.TurnU] = {\n direction: EdgeDirection.TurnU,\n directionChange: Math.PI,\n motionChange: null,\n };\n\n this.panos[EdgeDirection.StepForward] = {\n direction: EdgeDirection.StepForward,\n directionChange: 0,\n next: EdgeDirection.StepLeft,\n prev: EdgeDirection.StepRight,\n };\n\n this.panos[EdgeDirection.StepBackward] = {\n direction: EdgeDirection.StepBackward,\n directionChange: Math.PI,\n next: EdgeDirection.StepRight,\n prev: EdgeDirection.StepLeft,\n };\n\n this.panos[EdgeDirection.StepLeft] = {\n direction: EdgeDirection.StepLeft,\n directionChange: Math.PI / 2,\n next: EdgeDirection.StepBackward,\n prev: EdgeDirection.StepForward,\n };\n\n this.panos[EdgeDirection.StepRight] = {\n direction: EdgeDirection.StepRight,\n directionChange: -Math.PI / 2,\n next: EdgeDirection.StepForward,\n prev: EdgeDirection.StepBackward,\n };\n }\n}\n",
"export class EdgeCalculatorSettings {\n public panoMinDistance: number;\n public panoMaxDistance: number;\n public panoPreferredDistance: number;\n public panoMaxItems: number;\n public panoMaxStepTurnChange: number;\n\n public rotationMaxDistance: number;\n public rotationMaxDirectionChange: number;\n public rotationMaxVerticalDirectionChange: number;\n\n public similarMaxDirectionChange: number;\n public similarMaxDistance: number;\n public similarMinTimeDifference: number;\n\n public stepMaxDistance: number;\n public stepMaxDirectionChange: number;\n public stepMaxDrift: number;\n public stepPreferredDistance: number;\n\n public turnMaxDistance: number;\n public turnMaxDirectionChange: number;\n public turnMaxRigDistance: number;\n public turnMinRigDirectionChange: number;\n\n constructor() {\n this.panoMinDistance = 0.1;\n this.panoMaxDistance = 20;\n this.panoPreferredDistance = 5;\n this.panoMaxItems = 4;\n this.panoMaxStepTurnChange = Math.PI / 8;\n\n this.rotationMaxDistance = this.turnMaxRigDistance;\n this.rotationMaxDirectionChange = Math.PI / 6;\n this.rotationMaxVerticalDirectionChange = Math.PI / 8;\n\n this.similarMaxDirectionChange = Math.PI / 8;\n this.similarMaxDistance = 12;\n this.similarMinTimeDifference = 12 * 3600 * 1000;\n\n this.stepMaxDistance = 20;\n this.stepMaxDirectionChange = Math.PI / 6;\n this.stepMaxDrift = Math.PI / 6;\n this.stepPreferredDistance = 4;\n\n this.turnMaxDistance = 15;\n this.turnMaxDirectionChange = 2 * Math.PI / 9;\n this.turnMaxRigDistance = 0.65;\n this.turnMinRigDirectionChange = Math.PI / 6;\n }\n\n public get maxDistance(): number {\n return Math.max(\n this.panoMaxDistance,\n this.similarMaxDistance,\n this.stepMaxDistance,\n this.turnMaxDistance);\n }\n}\n\nexport default EdgeCalculatorSettings;\n",
"/**\n * Enumeration for edge directions\n * @enum {number}\n * @readonly\n * @description Directions for edges in node graph describing\n * sequence, spatial and node type relations between nodes.\n */\nexport enum EdgeDirection {\n /**\n * Next node in the sequence.\n */\n Next,\n\n /**\n * Previous node in the sequence.\n */\n Prev,\n\n /**\n * Step to the left keeping viewing direction.\n */\n StepLeft,\n\n /**\n * Step to the right keeping viewing direction.\n */\n StepRight,\n\n /**\n * Step forward keeping viewing direction.\n */\n StepForward,\n\n /**\n * Step backward keeping viewing direction.\n */\n StepBackward,\n\n /**\n * Turn 90 degrees counter clockwise.\n */\n TurnLeft,\n\n /**\n * Turn 90 degrees clockwise.\n */\n TurnRight,\n\n /**\n * Turn 180 degrees.\n */\n TurnU,\n\n /**\n * Panorama in general direction.\n */\n Pano,\n\n /**\n * Looking in roughly the same direction at rougly the same position.\n */\n Similar,\n}\n",
- "/// <reference path=\"../../typings/index.d.ts\" />\n\nimport * as _ from \"underscore\";\nimport * as vd from \"virtual-dom\";\n\nimport {Observable} from \"rxjs/Observable\";\nimport {Subject} from \"rxjs/Subject\";\n\nimport \"rxjs/add/operator/combineLatest\";\nimport \"rxjs/add/operator/distinctUntilChanged\";\nimport \"rxjs/add/operator/filter\";\nimport \"rxjs/add/operator/map\";\nimport \"rxjs/add/operator/pluck\";\nimport \"rxjs/add/operator/scan\";\n\nimport {ISize, IVNodeHash, RenderMode, RenderService} from \"../Render\";\nimport {IFrame} from \"../State\";\n\ninterface INodePatch {\n vnode: vd.VNode;\n vpatch: vd.VPatch[];\n}\n\ninterface IVNodeHashes {\n [name: string]: vd.VNode;\n}\n\ninterface IOffset {\n bottom: number;\n left: number;\n right: number;\n top: number;\n}\n\ninterface IAdaptive {\n elementHeight: number;\n elementWidth: number;\n imageAspect: number;\n renderMode: RenderMode;\n}\n\ninterface IAdaptiveOperation {\n (adaptive: IAdaptive): IAdaptive;\n}\n\nexport class DOMRenderer {\n private _renderService: RenderService;\n private _currentFrame$: Observable<IFrame>;\n\n private _adaptiveOperation$: Subject<IAdaptiveOperation> = new Subject<IAdaptiveOperation>();\n private _offset$: Observable<IOffset>;\n\n private _element$: Observable<Element>;\n private _vPatch$: Observable<vd.VPatch[]>;\n private _vNode$: Observable<vd.VNode>;\n private _render$: Subject<IVNodeHash> = new Subject<IVNodeHash>();\n private _renderAdaptive$: Subject<IVNodeHash> = new Subject<IVNodeHash>();\n\n constructor (element: HTMLElement, renderService: RenderService, currentFrame$: Observable<IFrame>) {\n this._renderService = renderService;\n this._currentFrame$ = currentFrame$;\n\n let rootNode: Element = vd.create(vd.h(\"div.domRenderer\", []));\n element.appendChild(rootNode);\n\n this._offset$ = this._adaptiveOperation$\n .scan(\n (adaptive: IAdaptive, operation: IAdaptiveOperation): IAdaptive => {\n return operation(adaptive);\n },\n {\n elementHeight: element.offsetHeight,\n elementWidth: element.offsetWidth,\n imageAspect: 0,\n renderMode: RenderMode.Fill,\n })\n .filter(\n (adaptive: IAdaptive): boolean => {\n return adaptive.imageAspect > 0 && adaptive.elementWidth > 0 && adaptive.elementHeight > 0;\n })\n .map(\n (adaptive: IAdaptive): IOffset => {\n let elementAspect: number = adaptive.elementWidth / adaptive.elementHeight;\n let ratio: number = adaptive.imageAspect / elementAspect;\n\n let verticalOffset: number = 0;\n let horizontalOffset: number = 0;\n\n if (adaptive.renderMode === RenderMode.Letterbox) {\n if (adaptive.imageAspect > elementAspect) {\n verticalOffset = adaptive.elementHeight * (1 - 1 / ratio) / 2;\n } else {\n horizontalOffset = adaptive.elementWidth * (1 - ratio) / 2;\n }\n } else {\n if (adaptive.imageAspect > elementAspect) {\n horizontalOffset = -adaptive.elementWidth * (ratio - 1) / 2;\n } else {\n verticalOffset = -adaptive.elementHeight * (1 / ratio - 1) / 2;\n }\n }\n\n return {\n bottom: verticalOffset,\n left: horizontalOffset,\n right: horizontalOffset,\n top: verticalOffset,\n };\n });\n\n this._currentFrame$\n .filter(\n (frame: IFrame): boolean => {\n return frame.state.currentNode != null;\n })\n .distinctUntilChanged(\n (k1: string, k2: string): boolean => {\n return k1 === k2;\n },\n (frame: IFrame): string => {\n return frame.state.currentNode.key;\n })\n .map(\n (frame: IFrame): number => {\n return frame.state.currentTransform.basicAspect;\n })\n .map(\n (aspect: number): IAdaptiveOperation => {\n return (adaptive: IAdaptive): IAdaptive => {\n adaptive.imageAspect = aspect;\n\n return adaptive;\n };\n })\n .subscribe(this._adaptiveOperation$);\n\n this._renderAdaptive$\n .scan(\n (vNodeHashes: IVNodeHashes, vNodeHash: IVNodeHash): IVNodeHashes => {\n if (vNodeHash.vnode == null) {\n delete vNodeHashes[vNodeHash.name];\n } else {\n vNodeHashes[vNodeHash.name] = vNodeHash.vnode;\n }\n return vNodeHashes;\n },\n {})\n .combineLatest(this._offset$)\n .map(\n (vo: [IVNodeHashes, IOffset]): IVNodeHash => {\n let vNodes: vd.VNode[] = _.values(vo[0]);\n let offset: IOffset = vo[1];\n\n let properties: vd.createProperties = {\n style: {\n bottom: offset.bottom + \"px\",\n left: offset.left + \"px\",\n \"pointer-events\": \"none\",\n position: \"absolute\",\n right: offset.right + \"px\",\n top: offset.top + \"px\",\n },\n };\n\n return {\n name: \"adaptiveDomRenderer\",\n vnode: vd.h(\"div.adaptiveDomRenderer\", properties, vNodes),\n };\n })\n .subscribe(this._render$);\n\n this._vNode$ = this._render$\n .scan(\n (vNodeHashes: IVNodeHashes, vNodeHash: IVNodeHash): IVNodeHashes => {\n if (vNodeHash.vnode == null) {\n delete vNodeHashes[vNodeHash.name];\n } else {\n vNodeHashes[vNodeHash.name] = vNodeHash.vnode;\n }\n\n return vNodeHashes;\n },\n {})\n .map(\n (vNodeHashes: IVNodeHashes): vd.VNode => {\n let vNodes: vd.VNode[] = _.values(vNodeHashes);\n return vd.h(\"div.domRenderer\", vNodes);\n });\n\n this._vPatch$ = this._vNode$\n .scan(\n (nodePatch: INodePatch, vNode: vd.VNode): INodePatch => {\n nodePatch.vpatch = vd.diff(nodePatch.vnode, vNode);\n nodePatch.vnode = vNode;\n return nodePatch;\n },\n {vnode: vd.h(\"div.domRenderer\", []), vpatch: null})\n .pluck<INodePatch, vd.VPatch[]>(\"vpatch\");\n\n this._element$ = this._vPatch$\n .scan(\n (oldElement: Element, vPatch: vd.VPatch[]): Element => {\n return vd.patch(oldElement, vPatch);\n },\n rootNode)\n .publishReplay(1)\n .refCount();\n\n this._element$.subscribe(() => { /*noop*/ });\n\n this._renderService.size$\n .map(\n (size: ISize): IAdaptiveOperation => {\n return (adaptive: IAdaptive): IAdaptive => {\n adaptive.elementWidth = size.width;\n adaptive.elementHeight = size.height;\n\n return adaptive;\n };\n })\n .subscribe(this._adaptiveOperation$);\n\n this._renderService.renderMode$\n .map(\n (renderMode: RenderMode): IAdaptiveOperation => {\n return (adaptive: IAdaptive): IAdaptive => {\n adaptive.renderMode = renderMode;\n\n return adaptive;\n };\n })\n .subscribe(this._adaptiveOperation$);\n }\n\n public get element$(): Observable<Element> {\n return this._element$;\n }\n\n public get render$(): Subject<IVNodeHash> {\n return this._render$;\n }\n\n public get renderAdaptive$(): Subject<IVNodeHash> {\n return this._renderAdaptive$;\n }\n\n public clear(name: string): void {\n this._renderAdaptive$.next({name: name, vnode: null});\n this._render$.next({name: name, vnode: null});\n }\n}\n\nexport default DOMRenderer;\n",
+ "import {combineLatest as observableCombineLatest} from \"rxjs\";\n\nimport {\n scan,\n filter,\n map,\n distinctUntilChanged,\n pluck,\n refCount,\n publishReplay,\n} from \"rxjs/operators\";\n\nimport * as vd from \"virtual-dom\";\n\nimport {Observable, Subject} from \"rxjs\";\n\nimport {ISize, IVNodeHash, RenderMode, RenderService} from \"../Render\";\nimport {IFrame} from \"../State\";\n\ninterface INodePatch {\n vnode: vd.VNode;\n vpatch: vd.VPatch[];\n}\n\ninterface IVNodeHashes {\n [name: string]: vd.VNode;\n}\n\ninterface IOffset {\n bottom: number;\n left: number;\n right: number;\n top: number;\n}\n\ninterface IAdaptive {\n elementHeight: number;\n elementWidth: number;\n imageAspect: number;\n renderMode: RenderMode;\n}\n\ninterface IAdaptiveOperation {\n (adaptive: IAdaptive): IAdaptive;\n}\n\nexport class DOMRenderer {\n private _renderService: RenderService;\n private _currentFrame$: Observable<IFrame>;\n\n private _adaptiveOperation$: Subject<IAdaptiveOperation> = new Subject<IAdaptiveOperation>();\n private _offset$: Observable<IOffset>;\n\n private _element$: Observable<Element>;\n private _vPatch$: Observable<vd.VPatch[]>;\n private _vNode$: Observable<vd.VNode>;\n private _render$: Subject<IVNodeHash> = new Subject<IVNodeHash>();\n private _renderAdaptive$: Subject<IVNodeHash> = new Subject<IVNodeHash>();\n\n constructor (element: HTMLElement, renderService: RenderService, currentFrame$: Observable<IFrame>) {\n this._renderService = renderService;\n this._currentFrame$ = currentFrame$;\n\n let rootNode: Element = vd.create(vd.h(\"div.domRenderer\", []));\n element.appendChild(rootNode);\n\n this._offset$ = this._adaptiveOperation$.pipe(\n scan(\n (adaptive: IAdaptive, operation: IAdaptiveOperation): IAdaptive => {\n return operation(adaptive);\n },\n {\n elementHeight: element.offsetHeight,\n elementWidth: element.offsetWidth,\n imageAspect: 0,\n renderMode: RenderMode.Fill,\n }),\n filter(\n (adaptive: IAdaptive): boolean => {\n return adaptive.imageAspect > 0 && adaptive.elementWidth > 0 && adaptive.elementHeight > 0;\n }),\n map(\n (adaptive: IAdaptive): IOffset => {\n let elementAspect: number = adaptive.elementWidth / adaptive.elementHeight;\n let ratio: number = adaptive.imageAspect / elementAspect;\n\n let verticalOffset: number = 0;\n let horizontalOffset: number = 0;\n\n if (adaptive.renderMode === RenderMode.Letterbox) {\n if (adaptive.imageAspect > elementAspect) {\n verticalOffset = adaptive.elementHeight * (1 - 1 / ratio) / 2;\n } else {\n horizontalOffset = adaptive.elementWidth * (1 - ratio) / 2;\n }\n } else {\n if (adaptive.imageAspect > elementAspect) {\n horizontalOffset = -adaptive.elementWidth * (ratio - 1) / 2;\n } else {\n verticalOffset = -adaptive.elementHeight * (1 / ratio - 1) / 2;\n }\n }\n\n return {\n bottom: verticalOffset,\n left: horizontalOffset,\n right: horizontalOffset,\n top: verticalOffset,\n };\n }));\n\n this._currentFrame$.pipe(\n filter(\n (frame: IFrame): boolean => {\n return frame.state.currentNode != null;\n }),\n distinctUntilChanged(\n (k1: string, k2: string): boolean => {\n return k1 === k2;\n },\n (frame: IFrame): string => {\n return frame.state.currentNode.key;\n }),\n map(\n (frame: IFrame): number => {\n return frame.state.currentTransform.basicAspect;\n }),\n map(\n (aspect: number): IAdaptiveOperation => {\n return (adaptive: IAdaptive): IAdaptive => {\n adaptive.imageAspect = aspect;\n\n return adaptive;\n };\n }))\n .subscribe(this._adaptiveOperation$);\n\n observableCombineLatest(\n this._renderAdaptive$.pipe(\n scan(\n (vNodeHashes: IVNodeHashes, vNodeHash: IVNodeHash): IVNodeHashes => {\n if (vNodeHash.vnode == null) {\n delete vNodeHashes[vNodeHash.name];\n } else {\n vNodeHashes[vNodeHash.name] = vNodeHash.vnode;\n }\n return vNodeHashes;\n },\n {})),\n this._offset$).pipe(\n map(\n (vo: [IVNodeHashes, IOffset]): IVNodeHash => {\n let vNodes: vd.VNode[] = [];\n let hashes: IVNodeHashes = vo[0];\n for (const name in hashes) {\n if (!hashes.hasOwnProperty(name)) {\n continue;\n }\n\n vNodes.push(hashes[name]);\n }\n\n let offset: IOffset = vo[1];\n\n let properties: vd.createProperties = {\n style: {\n bottom: offset.bottom + \"px\",\n left: offset.left + \"px\",\n \"pointer-events\": \"none\",\n position: \"absolute\",\n right: offset.right + \"px\",\n top: offset.top + \"px\",\n },\n };\n\n return {\n name: \"adaptiveDomRenderer\",\n vnode: vd.h(\"div.adaptiveDomRenderer\", properties, vNodes),\n };\n }))\n .subscribe(this._render$);\n\n this._vNode$ = this._render$.pipe(\n scan(\n (vNodeHashes: IVNodeHashes, vNodeHash: IVNodeHash): IVNodeHashes => {\n if (vNodeHash.vnode == null) {\n delete vNodeHashes[vNodeHash.name];\n } else {\n vNodeHashes[vNodeHash.name] = vNodeHash.vnode;\n }\n\n return vNodeHashes;\n },\n {}),\n map(\n (hashes: IVNodeHashes): vd.VNode => {\n let vNodes: vd.VNode[] = [];\n for (const name in hashes) {\n if (!hashes.hasOwnProperty(name)) {\n continue;\n }\n\n vNodes.push(hashes[name]);\n }\n\n return vd.h(\"div.domRenderer\", vNodes);\n }));\n\n this._vPatch$ = this._vNode$.pipe(\n scan(\n (nodePatch: INodePatch, vNode: vd.VNode): INodePatch => {\n nodePatch.vpatch = vd.diff(nodePatch.vnode, vNode);\n nodePatch.vnode = vNode;\n return nodePatch;\n },\n {vnode: vd.h(\"div.domRenderer\", []), vpatch: null}),\n pluck<INodePatch, vd.VPatch[]>(\"vpatch\"));\n\n this._element$ = this._vPatch$.pipe(\n scan(\n (oldElement: Element, vPatch: vd.VPatch[]): Element => {\n return vd.patch(oldElement, vPatch);\n },\n rootNode),\n publishReplay(1),\n refCount());\n\n this._element$.subscribe(() => { /*noop*/ });\n\n this._renderService.size$.pipe(\n map(\n (size: ISize): IAdaptiveOperation => {\n return (adaptive: IAdaptive): IAdaptive => {\n adaptive.elementWidth = size.width;\n adaptive.elementHeight = size.height;\n\n return adaptive;\n };\n }))\n .subscribe(this._adaptiveOperation$);\n\n this._renderService.renderMode$.pipe(\n map(\n (renderMode: RenderMode): IAdaptiveOperation => {\n return (adaptive: IAdaptive): IAdaptive => {\n adaptive.renderMode = renderMode;\n\n return adaptive;\n };\n }))\n .subscribe(this._adaptiveOperation$);\n }\n\n public get element$(): Observable<Element> {\n return this._element$;\n }\n\n public get render$(): Subject<IVNodeHash> {\n return this._render$;\n }\n\n public get renderAdaptive$(): Subject<IVNodeHash> {\n return this._renderAdaptive$;\n }\n\n public clear(name: string): void {\n this._renderAdaptive$.next({name: name, vnode: null});\n this._render$.next({name: name, vnode: null});\n }\n}\n\nexport default DOMRenderer;\n",
"export enum GLRenderStage {\n Background,\n Foreground,\n}\n\nexport default GLRenderStage;\n",
- "/// <reference path=\"../../typings/index.d.ts\" />\n\nimport * as THREE from \"three\";\n\nimport {Observable} from \"rxjs/Observable\";\nimport {Subject} from \"rxjs/Subject\";\nimport {Subscription} from \"rxjs/Subscription\";\n\nimport \"rxjs/add/observable/combineLatest\";\n\nimport \"rxjs/add/operator/distinctUntilChanged\";\nimport \"rxjs/add/operator/filter\";\nimport \"rxjs/add/operator/first\";\nimport \"rxjs/add/operator/map\";\nimport \"rxjs/add/operator/merge\";\nimport \"rxjs/add/operator/mergeMap\";\nimport \"rxjs/add/operator/scan\";\nimport \"rxjs/add/operator/share\";\nimport \"rxjs/add/operator/startWith\";\n\nimport {\n GLRenderStage,\n IGLRenderFunction,\n IGLRender,\n IGLRenderHash,\n RenderCamera,\n RenderService,\n ISize,\n} from \"../Render\";\n\ninterface IGLRenderer {\n needsRender: boolean;\n renderer: THREE.WebGLRenderer;\n}\n\ninterface IRenderCamera {\n frameId: number;\n needsRender: boolean;\n perspective: THREE.PerspectiveCamera;\n}\n\ninterface IGLRenderHashes {\n [name: string]: IGLRender;\n}\n\ninterface IEraser {\n needsRender: boolean;\n}\n\ninterface IGLRendererOperation {\n (renderer: IGLRenderer): IGLRenderer;\n}\n\ninterface IRenderCameraOperation {\n (camera: IRenderCamera): IRenderCamera;\n}\n\ninterface IGLRenderHashesOperation extends Function {\n (hashes: IGLRenderHashes): IGLRenderHashes;\n}\n\ninterface IEraserOperation {\n (eraser: IEraser): IEraser;\n}\n\ninterface ICombination {\n camera: IRenderCamera;\n eraser: IEraser;\n renderer: IGLRenderer;\n renders: IGLRender[];\n}\n\nexport class GLRenderer {\n private _renderService: RenderService;\n\n private _renderFrame$: Subject<RenderCamera> = new Subject<RenderCamera>();\n\n private _renderCameraOperation$: Subject<IRenderCameraOperation> = new Subject<IRenderCameraOperation>();\n private _renderCamera$: Observable<IRenderCamera>;\n\n private _render$: Subject<IGLRenderHash> = new Subject<IGLRenderHash>();\n private _clear$: Subject<string> = new Subject<string>();\n private _renderOperation$: Subject<IGLRenderHashesOperation> = new Subject<IGLRenderHashesOperation>();\n private _renderCollection$: Observable<IGLRenderHashes>;\n\n private _rendererOperation$: Subject<IGLRendererOperation> = new Subject<IGLRendererOperation>();\n private _renderer$: Observable<IGLRenderer>;\n\n private _eraserOperation$: Subject<IEraserOperation> = new Subject<IEraserOperation>();\n private _eraser$: Observable<IEraser>;\n\n private _webGLRenderer$: Observable<THREE.WebGLRenderer>;\n\n private _renderFrameSubscription: Subscription;\n\n constructor (canvasContainer: HTMLElement, renderService: RenderService) {\n this._renderService = renderService;\n\n this._renderer$ = this._rendererOperation$\n .scan(\n (renderer: IGLRenderer, operation: IGLRendererOperation): IGLRenderer => {\n return operation(renderer);\n },\n { needsRender: false, renderer: null });\n\n this._renderCollection$ = this._renderOperation$\n .scan(\n (hashes: IGLRenderHashes, operation: IGLRenderHashesOperation): IGLRenderHashes => {\n return operation(hashes);\n },\n {})\n .share();\n\n this._renderCamera$ = this._renderCameraOperation$\n .scan(\n (rc: IRenderCamera, operation: IRenderCameraOperation): IRenderCamera => {\n return operation(rc);\n },\n { frameId: -1, needsRender: false, perspective: null });\n\n this._eraser$ = this._eraserOperation$\n .startWith(\n (eraser: IEraser): IEraser => {\n return eraser;\n })\n .scan(\n (eraser: IEraser, operation: IEraserOperation): IEraser => {\n return operation(eraser);\n },\n { needsRender: false });\n\n Observable\n .combineLatest<ICombination>(\n [this._renderer$, this._renderCollection$, this._renderCamera$, this._eraser$],\n (renderer: IGLRenderer, hashes: IGLRenderHashes, rc: IRenderCamera, eraser: IEraser): ICombination => {\n let renders: IGLRender[] = Object.keys(hashes)\n .map((key: string): IGLRender => {\n return hashes[key];\n });\n\n return { camera: rc, eraser: eraser, renderer: renderer, renders: renders };\n })\n .filter(\n (co: ICombination): boolean => {\n let needsRender: boolean =\n co.renderer.needsRender ||\n co.camera.needsRender ||\n co.eraser.needsRender;\n\n let frameId: number = co.camera.frameId;\n\n for (let render of co.renders) {\n if (render.frameId !== frameId) {\n return false;\n }\n\n needsRender = needsRender || render.needsRender;\n }\n\n return needsRender;\n })\n .distinctUntilChanged(\n (n1: number, n2: number): boolean => {\n return n1 === n2;\n },\n (co: ICombination): number => {\n return co.eraser.needsRender ? -1 : co.camera.frameId;\n })\n .subscribe(\n (co: ICombination): void => {\n co.renderer.needsRender = false;\n co.camera.needsRender = false;\n co.eraser.needsRender = false;\n\n let perspectiveCamera: THREE.PerspectiveCamera = co.camera.perspective;\n\n let backgroundRenders: IGLRenderFunction[] = [];\n let foregroundRenders: IGLRenderFunction[] = [];\n\n for (let render of co.renders) {\n if (render.stage === GLRenderStage.Background) {\n backgroundRenders.push(render.render);\n } else if (render.stage === GLRenderStage.Foreground) {\n foregroundRenders.push(render.render);\n }\n }\n\n let renderer: THREE.WebGLRenderer = co.renderer.renderer;\n\n renderer.clear();\n\n for (let render of backgroundRenders) {\n render(perspectiveCamera, renderer);\n }\n\n renderer.clearDepth();\n\n for (let render of foregroundRenders) {\n render(perspectiveCamera, renderer);\n }\n });\n\n this._renderFrame$\n .map(\n (rc: RenderCamera): IRenderCameraOperation => {\n return (irc: IRenderCamera): IRenderCamera => {\n irc.frameId = rc.frameId;\n irc.perspective = rc.perspective;\n\n if (rc.changed === true) {\n irc.needsRender = true;\n }\n\n return irc;\n };\n })\n .subscribe(this._renderCameraOperation$);\n\n this._renderFrameSubscribe();\n\n let renderHash$: Observable<IGLRenderHashesOperation> = this._render$\n .map(\n (hash: IGLRenderHash) => {\n return (hashes: IGLRenderHashes): IGLRenderHashes => {\n hashes[hash.name] = hash.render;\n\n return hashes;\n };\n });\n\n let clearHash$: Observable<IGLRenderHashesOperation> = this._clear$\n .map(\n (name: string) => {\n return (hashes: IGLRenderHashes): IGLRenderHashes => {\n delete hashes[name];\n\n return hashes;\n };\n });\n\n Observable\n .merge(renderHash$, clearHash$)\n .subscribe(this._renderOperation$);\n\n this._webGLRenderer$ = this._render$\n .first()\n .map(\n (hash: IGLRenderHash): THREE.WebGLRenderer => {\n let element: HTMLElement = renderService.element;\n\n let webGLRenderer: THREE.WebGLRenderer = new THREE.WebGLRenderer();\n webGLRenderer.setPixelRatio(window.devicePixelRatio);\n webGLRenderer.setSize(element.offsetWidth, element.offsetHeight);\n webGLRenderer.setClearColor(new THREE.Color(0x202020), 1.0);\n webGLRenderer.autoClear = false;\n webGLRenderer.domElement.style.position = \"absolute\";\n\n canvasContainer.appendChild(webGLRenderer.domElement);\n\n return webGLRenderer;\n })\n .publishReplay(1)\n .refCount();\n\n this._webGLRenderer$.subscribe(() => { /*noop*/ });\n\n let createRenderer$: Observable<IGLRendererOperation> = this._webGLRenderer$\n .first()\n .map(\n (webGLRenderer: THREE.WebGLRenderer): IGLRendererOperation => {\n return (renderer: IGLRenderer): IGLRenderer => {\n renderer.needsRender = true;\n renderer.renderer = webGLRenderer;\n\n return renderer;\n };\n });\n\n let resizeRenderer$: Observable<IGLRendererOperation> = this._renderService.size$\n .map(\n (size: ISize): IGLRendererOperation => {\n return (renderer: IGLRenderer): IGLRenderer => {\n if (renderer.renderer == null) {\n return renderer;\n }\n\n renderer.renderer.setSize(size.width, size.height);\n renderer.needsRender = true;\n\n return renderer;\n };\n });\n\n let clearRenderer$: Observable<IGLRendererOperation> = this._clear$\n .map(\n (name: string) => {\n return (renderer: IGLRenderer): IGLRenderer => {\n if (renderer.renderer == null) {\n return renderer;\n }\n\n renderer.needsRender = true;\n\n return renderer;\n };\n });\n\n Observable\n .merge(createRenderer$, resizeRenderer$, clearRenderer$)\n .subscribe(this._rendererOperation$);\n\n let renderCollectionEmpty$: Observable<IGLRenderHashes> = this._renderCollection$\n .filter(\n (hashes: IGLRenderHashes): boolean => {\n return Object.keys(hashes).length === 0;\n })\n .share();\n\n renderCollectionEmpty$\n .subscribe(\n (hashes: IGLRenderHashes): void => {\n if (this._renderFrameSubscription == null) {\n return;\n }\n\n this._renderFrameSubscription.unsubscribe();\n this._renderFrameSubscription = null;\n\n this._renderFrameSubscribe();\n });\n\n renderCollectionEmpty$\n .map(\n (hashes: IGLRenderHashes): IEraserOperation => {\n return (eraser: IEraser): IEraser => {\n eraser.needsRender = true;\n\n return eraser;\n };\n })\n .subscribe(this._eraserOperation$);\n }\n\n public get render$(): Subject<IGLRenderHash> {\n return this._render$;\n }\n\n public get webGLRenderer$(): Observable<THREE.WebGLRenderer> {\n return this._webGLRenderer$;\n }\n\n public clear(name: string): void {\n this._clear$.next(name);\n }\n\n private _renderFrameSubscribe(): void {\n this._render$\n .first()\n .map(\n (renderHash: IGLRenderHash): IRenderCameraOperation => {\n return (irc: IRenderCamera): IRenderCamera => {\n irc.needsRender = true;\n\n return irc;\n };\n })\n .subscribe(\n (operation: IRenderCameraOperation): void => {\n this._renderCameraOperation$.next(operation);\n });\n\n this._renderFrameSubscription = this._render$\n .first()\n .mergeMap(\n (hash: IGLRenderHash): Observable<RenderCamera> => {\n return this._renderService.renderCameraFrame$;\n })\n .subscribe(this._renderFrame$);\n }\n}\n\nexport default GLRenderer;\n",
- "/// <reference path=\"../../typings/index.d.ts\" />\n\nimport * as THREE from \"three\";\n\nimport {\n Camera,\n Spatial,\n} from \"../Geo\";\nimport {RenderMode} from \"../Render\";\nimport {IRotation} from \"../State\";\n\nexport class RenderCamera {\n public alpha: number;\n public zoom: number;\n public currentAspect: number;\n public currentPano: boolean;\n public previousAspect: number;\n public previousPano: boolean;\n public renderMode: RenderMode;\n\n private _spatial: Spatial;\n\n private _camera: Camera;\n private _perspective: THREE.PerspectiveCamera;\n private _rotation: IRotation;\n\n private _frameId: number;\n\n private _changed: boolean;\n private _changedForFrame: number;\n\n constructor(elementWidth: number, elementHeight: number, renderMode: RenderMode) {\n this.alpha = -1;\n this.zoom = 0;\n\n this._frameId = -1;\n\n this._changed = false;\n this._changedForFrame = -1;\n\n this.currentAspect = 1;\n this.currentPano = false;\n this.previousAspect = 1;\n this.previousPano = false;\n\n this.renderMode = renderMode;\n\n this._spatial = new Spatial();\n\n this._camera = new Camera();\n\n const perspectiveCameraAspect: number =\n this._getPerspectiveCameraAspect(elementWidth, elementHeight);\n\n this._perspective = new THREE.PerspectiveCamera(\n 50,\n perspectiveCameraAspect,\n 0.4,\n 10000);\n\n this._perspective.matrixAutoUpdate = false;\n\n this._rotation = { phi: 0, theta: 0 };\n }\n\n public get camera(): Camera {\n return this._camera;\n }\n\n public get changed(): boolean {\n return this.frameId === this._changedForFrame;\n }\n\n public get frameId(): number {\n return this._frameId;\n }\n\n public set frameId(value: number) {\n this._frameId = value;\n\n if (this._changed) {\n this._changed = false;\n this._changedForFrame = value;\n }\n }\n\n public get perspective(): THREE.PerspectiveCamera {\n return this._perspective;\n }\n\n public get rotation(): IRotation {\n return this._rotation;\n }\n\n public updateAspect(elementWidth: number, elementHeight: number): void {\n const perspectiveCameraAspect: number =\n this._getPerspectiveCameraAspect(elementWidth, elementHeight);\n\n this._perspective.aspect = perspectiveCameraAspect;\n\n this._changed = true;\n }\n\n public updateProjection(): void {\n let currentAspect: number = this._getAspect(\n this.currentAspect,\n this.currentPano,\n this.perspective.aspect);\n\n let previousAspect: number = this._getAspect(\n this.previousAspect,\n this.previousPano,\n this.perspective.aspect);\n\n let aspect: number = (1 - this.alpha) * previousAspect + this.alpha * currentAspect;\n\n let verticalFov: number = this._getVerticalFov(aspect, this._camera.focal, this.zoom);\n\n this._perspective.fov = verticalFov;\n this._perspective.updateProjectionMatrix();\n\n this._changed = true;\n }\n\n public updatePerspective(camera: Camera): void {\n this._perspective.up.copy(camera.up);\n this._perspective.position.copy(camera.position);\n this._perspective.lookAt(camera.lookat);\n\n this._perspective.updateMatrix();\n this._perspective.updateMatrixWorld(false);\n\n this._changed = true;\n }\n\n public updateRotation(camera: Camera): void {\n this._rotation = this._getRotation(camera);\n }\n\n private _getVerticalFov(aspect: number, focal: number, zoom: number): number {\n return 2 * Math.atan(0.5 / (Math.pow(2, zoom) * aspect * focal)) * 180 / Math.PI;\n }\n\n private _getAspect(\n nodeAspect: number,\n pano: boolean,\n perspectiveCameraAspect: number): number {\n\n if (pano) {\n return 1;\n }\n\n let coeff: number = Math.max(1, 1 / nodeAspect);\n\n let usePerspective: boolean = this.renderMode === RenderMode.Letterbox ?\n nodeAspect > perspectiveCameraAspect :\n nodeAspect < perspectiveCameraAspect;\n\n let aspect: number = usePerspective ?\n coeff * perspectiveCameraAspect :\n coeff * nodeAspect;\n\n return aspect;\n }\n\n private _getPerspectiveCameraAspect(elementWidth: number, elementHeight: number): number {\n return elementWidth === 0 ? 0 : elementWidth / elementHeight;\n }\n\n private _getRotation(camera: Camera): IRotation {\n let direction: THREE.Vector3 = camera.lookat.clone().sub(camera.position);\n let up: THREE.Vector3 = camera.up.clone();\n\n let upProjection: number = direction.clone().dot(up);\n let planeProjection: THREE.Vector3 = direction.clone().sub(up.clone().multiplyScalar(upProjection));\n\n let phi: number = Math.atan2(planeProjection.y, planeProjection.x);\n let theta: number = Math.PI / 2 - this._spatial.angleToPlane(direction.toArray(), [0, 0, 1]);\n\n return { phi: phi, theta: theta };\n }\n}\n\nexport default RenderCamera;\n",
+ "import {merge as observableMerge, combineLatest as observableCombineLatest, Observable, Subject, Subscription} from \"rxjs\";\n\nimport {mergeMap, scan, filter, share, startWith, distinctUntilChanged, map, first, publishReplay, refCount} from \"rxjs/operators\";\nimport * as THREE from \"three\";\n\nimport {\n GLRenderStage,\n IGLRenderFunction,\n IGLRender,\n IGLRenderHash,\n RenderCamera,\n RenderService,\n ISize,\n} from \"../Render\";\nimport {DOM} from \"../Utils\";\n\ninterface IGLRenderer {\n needsRender: boolean;\n renderer: THREE.WebGLRenderer;\n}\n\ninterface IRenderCamera {\n frameId: number;\n needsRender: boolean;\n perspective: THREE.PerspectiveCamera;\n}\n\ninterface IGLRenderHashes {\n [name: string]: IGLRender;\n}\n\ninterface IEraser {\n needsRender: boolean;\n}\n\ninterface IGLRendererOperation {\n (renderer: IGLRenderer): IGLRenderer;\n}\n\ninterface IRenderCameraOperation {\n (camera: IRenderCamera): IRenderCamera;\n}\n\ninterface IGLRenderHashesOperation extends Function {\n (hashes: IGLRenderHashes): IGLRenderHashes;\n}\n\ninterface IEraserOperation {\n (eraser: IEraser): IEraser;\n}\n\ninterface ICombination {\n camera: IRenderCamera;\n eraser: IEraser;\n renderer: IGLRenderer;\n renders: IGLRender[];\n}\n\nexport class GLRenderer {\n private _renderService: RenderService;\n private _dom: DOM;\n\n private _renderFrame$: Subject<RenderCamera> = new Subject<RenderCamera>();\n\n private _renderCameraOperation$: Subject<IRenderCameraOperation> = new Subject<IRenderCameraOperation>();\n private _renderCamera$: Observable<IRenderCamera>;\n\n private _render$: Subject<IGLRenderHash> = new Subject<IGLRenderHash>();\n private _clear$: Subject<string> = new Subject<string>();\n private _renderOperation$: Subject<IGLRenderHashesOperation> = new Subject<IGLRenderHashesOperation>();\n private _renderCollection$: Observable<IGLRenderHashes>;\n\n private _rendererOperation$: Subject<IGLRendererOperation> = new Subject<IGLRendererOperation>();\n private _renderer$: Observable<IGLRenderer>;\n\n private _eraserOperation$: Subject<IEraserOperation> = new Subject<IEraserOperation>();\n private _eraser$: Observable<IEraser>;\n\n private _webGLRenderer$: Observable<THREE.WebGLRenderer>;\n\n private _renderFrameSubscription: Subscription;\n\n constructor (canvasContainer: HTMLElement, renderService: RenderService, dom?: DOM) {\n this._renderService = renderService;\n this._dom = !!dom ? dom : new DOM();\n\n this._renderer$ = this._rendererOperation$.pipe(\n scan(\n (renderer: IGLRenderer, operation: IGLRendererOperation): IGLRenderer => {\n return operation(renderer);\n },\n { needsRender: false, renderer: null }),\n filter(\n (renderer: IGLRenderer): boolean => {\n return !!renderer.renderer;\n }));\n\n this._renderCollection$ = this._renderOperation$.pipe(\n scan(\n (hashes: IGLRenderHashes, operation: IGLRenderHashesOperation): IGLRenderHashes => {\n return operation(hashes);\n },\n {}),\n share());\n\n this._renderCamera$ = this._renderCameraOperation$.pipe(\n scan(\n (rc: IRenderCamera, operation: IRenderCameraOperation): IRenderCamera => {\n return operation(rc);\n },\n { frameId: -1, needsRender: false, perspective: null }));\n\n this._eraser$ = this._eraserOperation$.pipe(\n startWith(\n (eraser: IEraser): IEraser => {\n return eraser;\n }),\n scan(\n (eraser: IEraser, operation: IEraserOperation): IEraser => {\n return operation(eraser);\n },\n { needsRender: false }));\n\n observableCombineLatest(\n this._renderer$,\n this._renderCollection$,\n this._renderCamera$,\n this._eraser$).pipe(\n map(\n ([renderer, hashes, rc, eraser]: [IGLRenderer, IGLRenderHashes, IRenderCamera, IEraser]): ICombination => {\n let renders: IGLRender[] = Object.keys(hashes)\n .map((key: string): IGLRender => {\n return hashes[key];\n });\n\n return { camera: rc, eraser: eraser, renderer: renderer, renders: renders };\n }),\n filter(\n (co: ICombination): boolean => {\n let needsRender: boolean =\n co.renderer.needsRender ||\n co.camera.needsRender ||\n co.eraser.needsRender;\n\n let frameId: number = co.camera.frameId;\n\n for (let render of co.renders) {\n if (render.frameId !== frameId) {\n return false;\n }\n\n needsRender = needsRender || render.needsRender;\n }\n\n return needsRender;\n }),\n distinctUntilChanged(\n (n1: number, n2: number): boolean => {\n return n1 === n2;\n },\n (co: ICombination): number => {\n return co.eraser.needsRender ? -1 : co.camera.frameId;\n }))\n .subscribe(\n (co: ICombination): void => {\n co.renderer.needsRender = false;\n co.camera.needsRender = false;\n co.eraser.needsRender = false;\n\n let perspectiveCamera: THREE.PerspectiveCamera = co.camera.perspective;\n\n let backgroundRenders: IGLRenderFunction[] = [];\n let foregroundRenders: IGLRenderFunction[] = [];\n\n for (let render of co.renders) {\n if (render.stage === GLRenderStage.Background) {\n backgroundRenders.push(render.render);\n } else if (render.stage === GLRenderStage.Foreground) {\n foregroundRenders.push(render.render);\n }\n }\n\n let renderer: THREE.WebGLRenderer = co.renderer.renderer;\n\n renderer.clear();\n\n for (let render of backgroundRenders) {\n render(perspectiveCamera, renderer);\n }\n\n renderer.clearDepth();\n\n for (let render of foregroundRenders) {\n render(perspectiveCamera, renderer);\n }\n });\n\n this._renderFrame$.pipe(\n map(\n (rc: RenderCamera): IRenderCameraOperation => {\n return (irc: IRenderCamera): IRenderCamera => {\n irc.frameId = rc.frameId;\n irc.perspective = rc.perspective;\n\n if (rc.changed === true) {\n irc.needsRender = true;\n }\n\n return irc;\n };\n }))\n .subscribe(this._renderCameraOperation$);\n\n this._renderFrameSubscribe();\n\n let renderHash$: Observable<IGLRenderHashesOperation> = this._render$.pipe(\n map(\n (hash: IGLRenderHash) => {\n return (hashes: IGLRenderHashes): IGLRenderHashes => {\n hashes[hash.name] = hash.render;\n\n return hashes;\n };\n }));\n\n let clearHash$: Observable<IGLRenderHashesOperation> = this._clear$.pipe(\n map(\n (name: string) => {\n return (hashes: IGLRenderHashes): IGLRenderHashes => {\n delete hashes[name];\n\n return hashes;\n };\n }));\n\n observableMerge(renderHash$, clearHash$)\n .subscribe(this._renderOperation$);\n\n this._webGLRenderer$ = this._render$.pipe(\n first(),\n map(\n (hash: IGLRenderHash): THREE.WebGLRenderer => {\n const canvas: HTMLCanvasElement = this._dom.createElement(\"canvas\", \"mapillary-js-canvas\");\n canvas.style.position = \"absolute\";\n canvas.setAttribute(\"tabindex\", \"0\");\n canvasContainer.appendChild(canvas);\n\n const element: HTMLElement = renderService.element;\n const webGLRenderer: THREE.WebGLRenderer = new THREE.WebGLRenderer({ canvas: canvas });\n webGLRenderer.setPixelRatio(window.devicePixelRatio);\n webGLRenderer.setSize(element.offsetWidth, element.offsetHeight);\n webGLRenderer.setClearColor(new THREE.Color(0x202020), 1.0);\n webGLRenderer.autoClear = false;\n\n return webGLRenderer;\n }),\n publishReplay(1),\n refCount());\n\n this._webGLRenderer$.subscribe(() => { /*noop*/ });\n\n let createRenderer$: Observable<IGLRendererOperation> = this._webGLRenderer$.pipe(\n first(),\n map(\n (webGLRenderer: THREE.WebGLRenderer): IGLRendererOperation => {\n return (renderer: IGLRenderer): IGLRenderer => {\n renderer.needsRender = true;\n renderer.renderer = webGLRenderer;\n\n return renderer;\n };\n }));\n\n let resizeRenderer$: Observable<IGLRendererOperation> = this._renderService.size$.pipe(\n map(\n (size: ISize): IGLRendererOperation => {\n return (renderer: IGLRenderer): IGLRenderer => {\n if (renderer.renderer == null) {\n return renderer;\n }\n\n renderer.renderer.setSize(size.width, size.height);\n renderer.needsRender = true;\n\n return renderer;\n };\n }));\n\n let clearRenderer$: Observable<IGLRendererOperation> = this._clear$.pipe(\n map(\n (name: string) => {\n return (renderer: IGLRenderer): IGLRenderer => {\n if (renderer.renderer == null) {\n return renderer;\n }\n\n renderer.needsRender = true;\n\n return renderer;\n };\n }));\n\n observableMerge(createRenderer$, resizeRenderer$, clearRenderer$)\n .subscribe(this._rendererOperation$);\n\n let renderCollectionEmpty$: Observable<IGLRenderHashes> = this._renderCollection$.pipe(\n filter(\n (hashes: IGLRenderHashes): boolean => {\n return Object.keys(hashes).length === 0;\n }),\n share());\n\n renderCollectionEmpty$\n .subscribe(\n (hashes: IGLRenderHashes): void => {\n if (this._renderFrameSubscription == null) {\n return;\n }\n\n this._renderFrameSubscription.unsubscribe();\n this._renderFrameSubscription = null;\n\n this._renderFrameSubscribe();\n });\n\n renderCollectionEmpty$.pipe(\n map(\n (hashes: IGLRenderHashes): IEraserOperation => {\n return (eraser: IEraser): IEraser => {\n eraser.needsRender = true;\n\n return eraser;\n };\n }))\n .subscribe(this._eraserOperation$);\n }\n\n public get render$(): Subject<IGLRenderHash> {\n return this._render$;\n }\n\n public get webGLRenderer$(): Observable<THREE.WebGLRenderer> {\n return this._webGLRenderer$;\n }\n\n public clear(name: string): void {\n this._clear$.next(name);\n }\n\n private _renderFrameSubscribe(): void {\n this._render$.pipe(\n first(),\n map(\n (renderHash: IGLRenderHash): IRenderCameraOperation => {\n return (irc: IRenderCamera): IRenderCamera => {\n irc.needsRender = true;\n\n return irc;\n };\n }))\n .subscribe(\n (operation: IRenderCameraOperation): void => {\n this._renderCameraOperation$.next(operation);\n });\n\n this._renderFrameSubscription = this._render$.pipe(\n first(),\n mergeMap(\n (hash: IGLRenderHash): Observable<RenderCamera> => {\n return this._renderService.renderCameraFrame$;\n }))\n .subscribe(this._renderFrame$);\n }\n}\n\nexport default GLRenderer;\n",
+ "import * as THREE from \"three\";\n\nimport {\n Camera,\n Spatial,\n Transform,\n ViewportCoords,\n Geo,\n} from \"../Geo\";\nimport {\n RenderMode,\n ISize,\n} from \"../Render\";\nimport {\n IRotation,\n IFrame,\n State,\n} from \"../State\";\nimport { ICurrentState } from \"../state/interfaces/interfaces\";\n\nexport class RenderCamera {\n private _spatial: Spatial;\n private _viewportCoords: ViewportCoords;\n\n private _alpha: number;\n private _renderMode: RenderMode;\n private _zoom: number;\n private _frameId: number;\n\n private _camera: Camera;\n private _perspective: THREE.PerspectiveCamera;\n\n private _rotation: IRotation;\n\n private _changed: boolean;\n private _changedForFrame: number;\n\n private _currentNodeId: string;\n private _previousNodeId: string;\n\n private _currentPano: boolean;\n private _previousPano: boolean;\n\n private _state: State;\n\n private _currentProjectedPoints: number[][];\n private _previousProjectedPoints: number[][];\n\n private _currentFov: number;\n private _previousFov: number;\n\n private _initialFov: number;\n\n constructor(elementWidth: number, elementHeight: number, renderMode: RenderMode) {\n this._spatial = new Spatial();\n this._viewportCoords = new ViewportCoords();\n\n this._initialFov = 50;\n\n this._alpha = -1;\n this._renderMode = renderMode;\n this._zoom = 0;\n\n this._frameId = -1;\n\n this._changed = false;\n this._changedForFrame = -1;\n\n this._currentNodeId = null;\n this._previousNodeId = null;\n\n this._currentPano = false;\n this._previousPano = false;\n\n this._state = null;\n\n this._currentProjectedPoints = [];\n this._previousProjectedPoints = [];\n\n this._currentFov = this._initialFov;\n this._previousFov = this._initialFov;\n\n this._camera = new Camera();\n\n this._perspective = new THREE.PerspectiveCamera(\n this._initialFov,\n this._computeAspect(elementWidth, elementHeight),\n 0.16,\n 10000);\n\n this._perspective.matrixAutoUpdate = false;\n\n this._rotation = { phi: 0, theta: 0 };\n }\n\n public get alpha(): number {\n return this._alpha;\n }\n\n public get camera(): Camera {\n return this._camera;\n }\n\n public get changed(): boolean {\n return this._frameId === this._changedForFrame;\n }\n\n public get frameId(): number {\n return this._frameId;\n }\n\n public get perspective(): THREE.PerspectiveCamera {\n return this._perspective;\n }\n\n public get renderMode(): RenderMode {\n return this._renderMode;\n }\n\n public get rotation(): IRotation {\n return this._rotation;\n }\n\n public get zoom(): number {\n return this._zoom;\n }\n\n public setFrame(frame: IFrame): void {\n const state: ICurrentState = frame.state;\n\n if (state.state !== this._state) {\n this._state = state.state;\n\n this._changed = true;\n }\n\n const currentNodeId: string = state.currentNode.key;\n const previousNodeId: string = !!state.previousNode ? state.previousNode.key : null;\n\n if (currentNodeId !== this._currentNodeId) {\n this._currentNodeId = currentNodeId;\n this._currentPano = !!state.currentTransform.gpano;\n this._currentProjectedPoints = this._computeProjectedPoints(state.currentTransform);\n\n this._changed = true;\n }\n\n if (previousNodeId !== this._previousNodeId) {\n this._previousNodeId = previousNodeId;\n this._previousPano = !!state.previousTransform.gpano;\n this._previousProjectedPoints = this._computeProjectedPoints(state.previousTransform);\n\n this._changed = true;\n }\n\n const zoom: number = state.zoom;\n\n if (zoom !== this._zoom) {\n this._zoom = zoom;\n\n this._changed = true;\n }\n\n if (this._changed) {\n this._currentFov = this._computeCurrentFov();\n this._previousFov = this._computePreviousFov();\n }\n\n const alpha: number = state.alpha;\n\n if (this._changed || alpha !== this._alpha) {\n this._alpha = alpha;\n\n this._perspective.fov = this._state === State.Earth ?\n 60 :\n this._interpolateFov(\n this._currentFov,\n this._previousFov,\n this._alpha);\n\n this._changed = true;\n }\n\n const camera: Camera = state.camera;\n\n if (this._camera.diff(camera) > 1e-9) {\n this._camera.copy(camera);\n\n this._rotation = this._computeRotation(camera);\n\n this._perspective.up.copy(camera.up);\n this._perspective.position.copy(camera.position);\n this._perspective.lookAt(camera.lookat);\n this._perspective.updateMatrix();\n this._perspective.updateMatrixWorld(false);\n\n this._changed = true;\n }\n\n if (this._changed) {\n this._perspective.updateProjectionMatrix();\n }\n\n this._setFrameId(frame.id);\n }\n\n public setRenderMode(renderMode: RenderMode): void {\n this._renderMode = renderMode;\n\n this._perspective.fov = this._computeFov();\n this._perspective.updateProjectionMatrix();\n\n this._changed = true;\n }\n\n public setSize(size: ISize): void {\n this._perspective.aspect = this._computeAspect(size.width, size.height);\n\n this._perspective.fov = this._computeFov();\n this._perspective.updateProjectionMatrix();\n\n this._changed = true;\n }\n\n private _computeAspect(elementWidth: number, elementHeight: number): number {\n return elementWidth === 0 ? 0 : elementWidth / elementHeight;\n }\n\n private _computeCurrentFov(): number {\n if (this._perspective.aspect === 0) {\n return 0;\n }\n\n if (!this._currentNodeId) {\n return this._initialFov;\n }\n\n return this._currentPano ?\n this._yToFov(1, this._zoom) :\n this._computeVerticalFov(this._currentProjectedPoints, this._renderMode, this._zoom, this.perspective.aspect);\n }\n\n private _computeFov(): number {\n this._currentFov = this._computeCurrentFov();\n this._previousFov = this._computePreviousFov();\n\n return this._interpolateFov(this._currentFov, this._previousFov, this._alpha);\n }\n\n private _computePreviousFov(): number {\n if (this._perspective.aspect === 0) {\n return 0;\n }\n\n if (!this._currentNodeId) {\n return this._initialFov;\n }\n\n return !this._previousNodeId ?\n this._currentFov :\n this._previousPano ?\n this._yToFov(1, this._zoom) :\n this._computeVerticalFov(this._previousProjectedPoints, this._renderMode, this._zoom, this.perspective.aspect);\n }\n\n private _computeProjectedPoints(transform: Transform): number[][] {\n const vertices: number[][] = [[0.5, 0], [1, 0]];\n const directions: number[][] = [[0.5, 0], [0, 0.5]];\n const pointsPerLine: number = 100;\n\n return Geo.computeProjectedPoints(transform, vertices, directions, pointsPerLine, this._viewportCoords);\n }\n\n private _computeRequiredVerticalFov(projectedPoint: number[], zoom: number, aspect: number): number {\n const maxY: number = Math.max(projectedPoint[0] / aspect, projectedPoint[1]);\n\n return this._yToFov(maxY, zoom);\n }\n\n private _computeRotation(camera: Camera): IRotation {\n let direction: THREE.Vector3 = camera.lookat.clone().sub(camera.position);\n let up: THREE.Vector3 = camera.up.clone();\n\n let phi: number = this._spatial.azimuthal(direction.toArray(), up.toArray());\n let theta: number = Math.PI / 2 - this._spatial.angleToPlane(direction.toArray(), [0, 0, 1]);\n\n return { phi: phi, theta: theta };\n }\n\n private _computeVerticalFov(projectedPoints: number[][], renderMode: RenderMode, zoom: number, aspect: number): number {\n const fovs: number[] = projectedPoints\n .map(\n (projectedPoint: number[]): number => {\n return this._computeRequiredVerticalFov(projectedPoint, zoom, aspect);\n });\n\n const fov: number = renderMode === RenderMode.Fill ?\n Math.min(...fovs) * 0.995 :\n Math.max(...fovs);\n\n return fov;\n }\n\n private _yToFov(y: number, zoom: number): number {\n return 2 * Math.atan(y / Math.pow(2, zoom)) * 180 / Math.PI;\n }\n\n private _interpolateFov(v1: number, v2: number, alpha: number): number {\n return alpha * v1 + (1 - alpha) * v2;\n }\n\n private _setFrameId(frameId: number): void {\n this._frameId = frameId;\n\n if (this._changed) {\n this._changed = false;\n this._changedForFrame = frameId;\n }\n }\n}\n\nexport default RenderCamera;\n",
"/**\n * Enumeration for render mode\n * @enum {number}\n * @readonly\n * @description Modes for specifying how rendering is done\n * in the viewer. All modes preserves the original aspect\n * ratio of the images.\n */\nexport enum RenderMode {\n\n /**\n * Displays all content within the viewer.\n *\n * @description Black bars shown on both\n * sides of the content. Bars are shown\n * either below and above or to the left\n * and right of the content depending on\n * the aspect ratio relation between the\n * image and the viewer.\n */\n Letterbox,\n\n /**\n * Fills the viewer by cropping content.\n *\n * @description Cropping is done either\n * in horizontal or vertical direction\n * depending on the aspect ratio relation\n * between the image and the viewer.\n */\n Fill,\n}\n\nexport default RenderMode;\n",
- "/// <reference path=\"../../typings/index.d.ts\" />\n\nimport {Observable} from \"rxjs/Observable\";\nimport {Subject} from \"rxjs/Subject\";\nimport {BehaviorSubject} from \"rxjs/BehaviorSubject\";\n\nimport \"rxjs/add/observable/combineLatest\";\n\nimport \"rxjs/add/operator/do\";\nimport \"rxjs/add/operator/filter\";\nimport \"rxjs/add/operator/map\";\nimport \"rxjs/add/operator/publishReplay\";\nimport \"rxjs/add/operator/scan\";\nimport \"rxjs/add/operator/skip\";\nimport \"rxjs/add/operator/startWith\";\nimport \"rxjs/add/operator/withLatestFrom\";\n\nimport {Camera, Spatial, Transform} from \"../Geo\";\nimport {Node} from \"../Graph\";\nimport {RenderCamera, RenderMode, ISize} from \"../Render\";\nimport {IFrame} from \"../State\";\n\ninterface IRenderCameraOperation {\n (rc: RenderCamera): RenderCamera;\n}\n\nexport class RenderService {\n private _bearing$: Observable<number>;\n\n private _element: HTMLElement;\n private _currentFrame$: Observable<IFrame>;\n\n private _renderCameraOperation$: Subject<IRenderCameraOperation>;\n private _renderCameraHolder$: Observable<RenderCamera>;\n private _renderCameraFrame$: Observable<RenderCamera>;\n private _renderCamera$: Observable<RenderCamera>;\n\n private _resize$: Subject<void>;\n private _size$: BehaviorSubject<ISize>;\n\n private _spatial: Spatial;\n\n private _renderMode$: BehaviorSubject<RenderMode>;\n\n constructor(element: HTMLElement, currentFrame$: Observable<IFrame>, renderMode: RenderMode) {\n this._element = element;\n this._currentFrame$ = currentFrame$;\n\n this._spatial = new Spatial();\n\n renderMode = renderMode != null ? renderMode : RenderMode.Fill;\n\n this._resize$ = new Subject<void>();\n this._renderCameraOperation$ = new Subject<IRenderCameraOperation>();\n\n this._size$ =\n new BehaviorSubject<ISize>(\n {\n height: this._element.offsetHeight,\n width: this._element.offsetWidth,\n });\n\n this._resize$\n .map(\n (): ISize => {\n return { height: this._element.offsetHeight, width: this._element.offsetWidth };\n })\n .subscribe(this._size$);\n\n this._renderMode$ = new BehaviorSubject<RenderMode>(renderMode);\n\n this._renderCameraHolder$ = this._renderCameraOperation$\n .startWith(\n (rc: RenderCamera): RenderCamera => {\n return rc;\n })\n .scan(\n (rc: RenderCamera, operation: IRenderCameraOperation): RenderCamera => {\n return operation(rc);\n },\n new RenderCamera(this._element.offsetWidth, this._element.offsetHeight, renderMode))\n .publishReplay(1)\n .refCount();\n\n this._renderCameraFrame$ = this._currentFrame$\n .withLatestFrom(\n this._renderCameraHolder$,\n (frame: IFrame, renderCamera: RenderCamera): [IFrame, RenderCamera] => {\n return [frame, renderCamera];\n })\n .do(\n (args: [IFrame, RenderCamera]): void => {\n let frame: IFrame = args[0];\n let rc: RenderCamera = args[1];\n\n let camera: Camera = frame.state.camera;\n\n if (rc.alpha !== frame.state.alpha ||\n rc.zoom !== frame.state.zoom ||\n rc.camera.diff(camera) > 1e-9) {\n\n let currentTransform: Transform = frame.state.currentTransform;\n let previousTransform: Transform =\n frame.state.previousTransform != null ?\n frame.state.previousTransform :\n frame.state.currentTransform;\n\n let previousNode: Node =\n frame.state.previousNode != null ?\n frame.state.previousNode :\n frame.state.currentNode;\n\n rc.currentAspect = currentTransform.basicAspect;\n rc.currentPano = frame.state.currentNode.pano;\n rc.previousAspect = previousTransform.basicAspect;\n rc.previousPano = previousNode.pano;\n\n rc.alpha = frame.state.alpha;\n rc.zoom = frame.state.zoom;\n\n rc.camera.copy(camera);\n rc.updatePerspective(camera);\n rc.updateRotation(camera);\n\n rc.updateProjection();\n }\n\n rc.frameId = frame.id;\n })\n .map(\n (args: [IFrame, RenderCamera]): RenderCamera => {\n return args[1];\n })\n .publishReplay(1)\n .refCount();\n\n this._renderCamera$ = this._renderCameraFrame$\n .filter(\n (rc: RenderCamera): boolean => {\n return rc.changed;\n })\n .publishReplay(1)\n .refCount();\n\n this._bearing$ = this._renderCamera$\n .map(\n (renderCamera: RenderCamera): number => {\n let bearing: number =\n this._spatial.radToDeg(\n this._spatial.azimuthalToBearing(renderCamera.rotation.phi));\n\n return this._spatial.wrap(bearing, 0, 360);\n })\n .publishReplay(1)\n .refCount();\n\n this._size$\n .skip(1)\n .map(\n (size: ISize) => {\n return (rc: RenderCamera): RenderCamera => {\n rc.updateAspect(size.width, size.height);\n rc.updateProjection();\n\n return rc;\n };\n })\n .subscribe(this._renderCameraOperation$);\n\n this._renderMode$\n .skip(1)\n .map(\n (rm: RenderMode) => {\n return (rc: RenderCamera): RenderCamera => {\n rc.renderMode = rm;\n rc.updateProjection();\n\n return rc;\n };\n })\n .subscribe(this._renderCameraOperation$);\n\n this._bearing$.subscribe(() => { /*noop*/ });\n this._renderCameraHolder$.subscribe(() => { /*noop*/ });\n this._size$.subscribe(() => { /*noop*/ });\n this._renderMode$.subscribe(() => { /*noop*/ });\n this._renderCamera$.subscribe(() => { /*noop*/ });\n this._renderCameraFrame$.subscribe(() => { /*noop*/ });\n }\n\n public get bearing$(): Observable<number> {\n return this._bearing$;\n }\n\n public get element(): HTMLElement {\n return this._element;\n }\n\n public get resize$(): Subject<void> {\n return this._resize$;\n }\n\n public get size$(): Observable<ISize> {\n return this._size$;\n }\n\n public get renderMode$(): Subject<RenderMode> {\n return this._renderMode$;\n }\n\n public get renderCameraFrame$(): Observable<RenderCamera> {\n return this._renderCameraFrame$;\n }\n\n public get renderCamera$(): Observable<RenderCamera> {\n return this._renderCamera$;\n }\n}\n\nexport default RenderService;\n",
- "export enum State {\n Traversing,\n Waiting,\n}\n\nexport default State;\n",
- "import {\n IStateContext,\n StateBase,\n State,\n TraversingState,\n WaitingState,\n IRotation,\n} from \"../State\";\nimport {Node} from \"../Graph\";\nimport {Camera, ILatLonAlt, Transform} from \"../Geo\";\n\nexport class StateContext implements IStateContext {\n private _state: StateBase;\n\n constructor() {\n this._state = new TraversingState({\n alpha: 1,\n camera: new Camera(),\n currentIndex: -1,\n reference: { alt: 0, lat: 0, lon: 0 },\n trajectory: [],\n zoom: 0,\n });\n }\n\n public traverse(): void {\n this._state = this._state.traverse();\n }\n\n public wait(): void {\n this._state = this._state.wait();\n }\n\n public get state(): State {\n if (this._state instanceof TraversingState) {\n return State.Traversing;\n } else if (this._state instanceof WaitingState) {\n return State.Waiting;\n }\n\n throw new Error(\"Invalid state\");\n }\n\n public get reference(): ILatLonAlt {\n return this._state.reference;\n }\n\n public get alpha(): number {\n return this._state.alpha;\n }\n\n public get camera(): Camera {\n return this._state.camera;\n }\n\n public get zoom(): number {\n return this._state.zoom;\n }\n\n public get currentNode(): Node {\n return this._state.currentNode;\n }\n\n public get previousNode(): Node {\n return this._state.previousNode;\n }\n\n public get currentCamera(): Camera {\n return this._state.currentCamera;\n }\n\n public get currentTransform(): Transform {\n return this._state.currentTransform;\n }\n\n public get previousTransform(): Transform {\n return this._state.previousTransform;\n }\n\n public get trajectory(): Node[] {\n return this._state.trajectory;\n }\n\n public get currentIndex(): number {\n return this._state.currentIndex;\n }\n\n public get lastNode(): Node {\n return this._state.trajectory[this._state.trajectory.length - 1];\n }\n\n public get nodesAhead(): number {\n return this._state.trajectory.length - 1 - this._state.currentIndex;\n }\n\n public get motionless(): boolean {\n return this._state.motionless;\n }\n\n public getCenter(): number[] {\n return this._state.getCenter();\n }\n\n public setCenter(center: number[]): void {\n this._state.setCenter(center);\n }\n\n public setZoom(zoom: number): void {\n this._state.setZoom(zoom);\n }\n\n public update(fps: number): void {\n this._state.update(fps);\n }\n\n public append(nodes: Node[]): void {\n this._state.append(nodes);\n }\n\n public prepend(nodes: Node[]): void {\n this._state.prepend(nodes);\n }\n\n public remove(n: number): void {\n this._state.remove(n);\n }\n\n public clear(): void {\n this._state.clear();\n }\n\n public clearPrior(): void {\n this._state.clearPrior();\n }\n\n public cut(): void {\n this._state.cut();\n }\n\n public set(nodes: Node[]): void {\n this._state.set(nodes);\n }\n\n public rotate(delta: IRotation): void {\n this._state.rotate(delta);\n }\n\n public rotateBasic(basicRotation: number[]): void {\n this._state.rotateBasic(basicRotation);\n }\n\n public rotateBasicUnbounded(basicRotation: number[]): void {\n this._state.rotateBasicUnbounded(basicRotation);\n }\n\n public rotateToBasic(basic: number[]): void {\n this._state.rotateToBasic(basic);\n }\n\n public move(delta: number): void {\n this._state.move(delta);\n }\n\n public moveTo(delta: number): void {\n this._state.moveTo(delta);\n }\n\n public zoomIn(delta: number, reference: number[]): void {\n this._state.zoomIn(delta, reference);\n }\n}\n",
- "import {BehaviorSubject} from \"rxjs/BehaviorSubject\";\nimport {Observable} from \"rxjs/Observable\";\nimport {Subject} from \"rxjs/Subject\";\nimport {RequestAnimationFrameDefinition} from \"rxjs/util/AnimationFrame\";\n\nimport \"rxjs/add/operator/bufferCount\";\nimport \"rxjs/add/operator/distinctUntilChanged\";\nimport \"rxjs/add/operator/do\";\nimport \"rxjs/add/operator/filter\";\nimport \"rxjs/add/operator/first\";\nimport \"rxjs/add/operator/map\";\nimport \"rxjs/add/operator/pairwise\";\nimport \"rxjs/add/operator/publishReplay\";\nimport \"rxjs/add/operator/scan\";\nimport \"rxjs/add/operator/startWith\";\nimport \"rxjs/add/operator/switchMap\";\nimport \"rxjs/add/operator/withLatestFrom\";\n\nimport {ILatLon} from \"../API\";\nimport {Node} from \"../Graph\";\nimport {\n Camera,\n ILatLonAlt,\n Transform,\n} from \"../Geo\";\nimport {\n IStateContext,\n IFrame,\n IRotation,\n StateContext,\n State,\n} from \"../State\";\n\ninterface IContextOperation {\n (context: IStateContext): IStateContext;\n}\n\nexport class StateService {\n private _start$: Subject<void>;\n\n private _frame$: Subject<number>;\n\n private _contextOperation$: BehaviorSubject<IContextOperation>;\n private _context$: Observable<IStateContext>;\n private _fps$: Observable<number>;\n private _state$: Observable<State>;\n\n private _currentState$: Observable<IFrame>;\n private _lastState$: Observable<IFrame>;\n private _currentNode$: Observable<Node>;\n private _currentNodeExternal$: Observable<Node>;\n private _currentCamera$: Observable<Camera>;\n private _currentKey$: BehaviorSubject<string>;\n private _currentTransform$: Observable<Transform>;\n private _reference$: Observable<ILatLonAlt>;\n\n private _inMotionOperation$: Subject<boolean>;\n private _inMotion$: Observable<boolean>;\n\n private _inTranslationOperation$: Subject<boolean>;\n private _inTranslation$: Observable<boolean>;\n\n private _appendNode$: Subject<Node> = new Subject<Node>();\n\n private _frameGenerator: RequestAnimationFrameDefinition;\n private _frameId: number;\n\n private _fpsSampleRate: number;\n\n constructor () {\n this._start$ = new Subject<void>();\n this._frame$ = new Subject<number>();\n this._fpsSampleRate = 30;\n\n this._contextOperation$ = new BehaviorSubject<IContextOperation>(\n (context: IStateContext): IStateContext => {\n return context;\n });\n\n this._context$ = this._contextOperation$\n .scan(\n (context: IStateContext, operation: IContextOperation): IStateContext => {\n return operation(context);\n },\n new StateContext())\n .publishReplay(1)\n .refCount();\n\n this._state$ = this._context$\n .map(\n (context: IStateContext): State => {\n return context.state;\n })\n .distinctUntilChanged()\n .publishReplay(1)\n .refCount();\n\n this._fps$ = this._start$\n .switchMap(\n (): Observable<number> => {\n return this._frame$\n .bufferCount(1, this._fpsSampleRate)\n .map(\n (frameIds: number[]): number => {\n return new Date().getTime();\n })\n .pairwise()\n .map(\n (times: [number, number]): number => {\n return Math.max(20, 1000 * this._fpsSampleRate / (times[1] - times[0]));\n })\n .startWith(60);\n })\n .share();\n\n this._currentState$ = this._frame$\n .withLatestFrom(\n this._fps$,\n this._context$,\n (frameId: number, fps: number, context: IStateContext): [number, number, IStateContext] => {\n return [frameId, fps, context];\n })\n .filter(\n (fc: [number, number, IStateContext]): boolean => {\n return fc[2].currentNode != null;\n })\n .do(\n (fc: [number, number, IStateContext]): void => {\n fc[2].update(fc[1]);\n })\n .map(\n (fc: [number, number, IStateContext]): IFrame => {\n return { fps: fc[1], id: fc[0], state: fc[2] };\n })\n .share();\n\n this._lastState$ = this._currentState$\n .publishReplay(1)\n .refCount();\n\n let nodeChanged$: Observable<IFrame> = this._currentState$\n .distinctUntilChanged(\n undefined,\n (f: IFrame): string => {\n return f.state.currentNode.key;\n })\n .publishReplay(1)\n .refCount();\n\n let nodeChangedSubject$: Subject<IFrame> = new Subject<IFrame>();\n\n nodeChanged$\n .subscribe(nodeChangedSubject$);\n\n this._currentKey$ = new BehaviorSubject<string>(null);\n\n nodeChangedSubject$\n .map(\n (f: IFrame): string => {\n return f.state.currentNode.key;\n })\n .subscribe(this._currentKey$);\n\n this._currentNode$ = nodeChangedSubject$\n .map(\n (f: IFrame): Node => {\n return f.state.currentNode;\n })\n .publishReplay(1)\n .refCount();\n\n this._currentCamera$ = nodeChangedSubject$\n .map(\n (f: IFrame): Camera => {\n return f.state.currentCamera;\n })\n .publishReplay(1)\n .refCount();\n\n this._currentTransform$ = nodeChangedSubject$\n .map(\n (f: IFrame): Transform => {\n return f.state.currentTransform;\n })\n .publishReplay(1)\n .refCount();\n\n this._reference$ = nodeChangedSubject$\n .map(\n (f: IFrame): ILatLonAlt => {\n return f.state.reference;\n })\n .distinctUntilChanged(\n (r1: ILatLon, r2: ILatLon): boolean => {\n return r1.lat === r2.lat && r1.lon === r2.lon;\n },\n (reference: ILatLonAlt): ILatLon => {\n return { lat: reference.lat, lon: reference.lon };\n })\n .publishReplay(1)\n .refCount();\n\n this._currentNodeExternal$ = nodeChanged$\n .map(\n (f: IFrame): Node => {\n return f.state.currentNode;\n })\n .publishReplay(1)\n .refCount();\n\n this._appendNode$\n .map(\n (node: Node) => {\n return (context: IStateContext): IStateContext => {\n context.append([node]);\n\n return context;\n };\n })\n .subscribe(this._contextOperation$);\n\n this._inMotionOperation$ = new Subject<boolean>();\n\n nodeChanged$\n .map(\n (frame: IFrame): boolean => {\n return true;\n })\n .subscribe(this._inMotionOperation$);\n\n this._inMotionOperation$\n .distinctUntilChanged()\n .filter(\n (moving: boolean): boolean => {\n return moving;\n })\n .switchMap(\n (moving: boolean): Observable<boolean> => {\n return this._currentState$\n .filter(\n (frame: IFrame): boolean => {\n return frame.state.nodesAhead === 0;\n })\n .map(\n (frame: IFrame): [Camera, number] => {\n return [frame.state.camera.clone(), frame.state.zoom];\n })\n .pairwise()\n .map(\n (pair: [[Camera, number], [Camera, number]]): boolean => {\n let c1: Camera = pair[0][0];\n let c2: Camera = pair[1][0];\n\n let z1: number = pair[0][1];\n let z2: number = pair[1][1];\n\n return c1.diff(c2) > 1e-5 || Math.abs(z1 - z2) > 1e-5;\n })\n .first(\n (changed: boolean): boolean => {\n return !changed;\n });\n })\n .subscribe(this._inMotionOperation$);\n\n this._inMotion$ = this._inMotionOperation$\n .distinctUntilChanged()\n .publishReplay(1)\n .refCount();\n\n this._inTranslationOperation$ = new Subject<boolean>();\n\n nodeChanged$\n .map(\n (frame: IFrame): boolean => {\n return true;\n })\n .subscribe(this._inTranslationOperation$);\n\n this._inTranslationOperation$\n .distinctUntilChanged()\n .filter(\n (inTranslation: boolean): boolean => {\n return inTranslation;\n })\n .switchMap(\n (inTranslation: boolean): Observable<boolean> => {\n return this._currentState$\n .filter(\n (frame: IFrame): boolean => {\n return frame.state.nodesAhead === 0;\n })\n .map(\n (frame: IFrame): THREE.Vector3 => {\n return frame.state.camera.position.clone();\n })\n .pairwise()\n .map(\n (pair: [THREE.Vector3, THREE.Vector3]): boolean => {\n return pair[0].distanceToSquared(pair[1]) !== 0;\n })\n .first(\n (changed: boolean): boolean => {\n return !changed;\n });\n })\n .subscribe(this._inTranslationOperation$);\n\n this._inTranslation$ = this._inTranslationOperation$\n .distinctUntilChanged()\n .publishReplay(1)\n .refCount();\n\n this._state$.subscribe(() => { /*noop*/ });\n this._currentNode$.subscribe(() => { /*noop*/ });\n this._currentCamera$.subscribe(() => { /*noop*/ });\n this._currentTransform$.subscribe(() => { /*noop*/ });\n this._reference$.subscribe(() => { /*noop*/ });\n this._currentNodeExternal$.subscribe(() => { /*noop*/ });\n this._lastState$.subscribe(() => { /*noop*/ });\n this._inMotion$.subscribe(() => { /*noop*/ });\n this._inTranslation$.subscribe(() => { /*noop*/ });\n\n this._frameId = null;\n this._frameGenerator = new RequestAnimationFrameDefinition(window);\n }\n\n public get currentState$(): Observable<IFrame> {\n return this._currentState$;\n }\n\n public get currentNode$(): Observable<Node> {\n return this._currentNode$;\n }\n\n public get currentKey$(): Observable<string> {\n return this._currentKey$;\n }\n\n public get currentNodeExternal$(): Observable<Node> {\n return this._currentNodeExternal$;\n }\n\n public get currentCamera$(): Observable<Camera> {\n return this._currentCamera$;\n }\n\n public get currentTransform$(): Observable<Transform> {\n return this._currentTransform$;\n }\n\n public get state$(): Observable<State> {\n return this._state$;\n }\n\n public get reference$(): Observable<ILatLonAlt> {\n return this._reference$;\n }\n\n public get inMotion$(): Observable<boolean> {\n return this._inMotion$;\n }\n\n public get inTranslation$(): Observable<boolean> {\n return this._inTranslation$;\n }\n\n public get appendNode$(): Subject<Node> {\n return this._appendNode$;\n }\n\n public traverse(): void {\n this._inMotionOperation$.next(true);\n this._invokeContextOperation((context: IStateContext) => { context.traverse(); });\n }\n\n public wait(): void {\n this._invokeContextOperation((context: IStateContext) => { context.wait(); });\n }\n\n public appendNodes(nodes: Node[]): void {\n this._invokeContextOperation((context: IStateContext) => { context.append(nodes); });\n }\n\n public prependNodes(nodes: Node[]): void {\n this._invokeContextOperation((context: IStateContext) => { context.prepend(nodes); });\n }\n\n public removeNodes(n: number): void {\n this._invokeContextOperation((context: IStateContext) => { context.remove(n); });\n }\n\n public clearNodes(): void {\n this._invokeContextOperation((context: IStateContext) => { context.clear(); });\n }\n\n public clearPriorNodes(): void {\n this._invokeContextOperation((context: IStateContext) => { context.clearPrior(); });\n }\n\n public cutNodes(): void {\n this._invokeContextOperation((context: IStateContext) => { context.cut(); });\n }\n\n public setNodes(nodes: Node[]): void {\n this._invokeContextOperation((context: IStateContext) => { context.set(nodes); });\n }\n\n public rotate(delta: IRotation): void {\n this._inMotionOperation$.next(true);\n this._invokeContextOperation((context: IStateContext) => { context.rotate(delta); });\n }\n\n public rotateBasic(basicRotation: number[]): void {\n this._inMotionOperation$.next(true);\n this._invokeContextOperation((context: IStateContext) => { context.rotateBasic(basicRotation); });\n }\n\n public rotateBasicUnbounded(basicRotation: number[]): void {\n this._inMotionOperation$.next(true);\n this._invokeContextOperation((context: IStateContext) => { context.rotateBasicUnbounded(basicRotation); });\n }\n\n public rotateToBasic(basic: number[]): void {\n this._inMotionOperation$.next(true);\n this._invokeContextOperation((context: IStateContext) => { context.rotateToBasic(basic); });\n }\n\n public move(delta: number): void {\n this._inMotionOperation$.next(true);\n this._invokeContextOperation((context: IStateContext) => { context.move(delta); });\n }\n\n public moveTo(position: number): void {\n this._inMotionOperation$.next(true);\n this._invokeContextOperation((context: IStateContext) => { context.moveTo(position); });\n }\n\n /**\n * Change zoom level while keeping the reference point position approximately static.\n *\n * @parameter {number} delta - Change in zoom level.\n * @parameter {Array<number>} reference - Reference point in basic coordinates.\n */\n public zoomIn(delta: number, reference: number[]): void {\n this._inMotionOperation$.next(true);\n this._invokeContextOperation((context: IStateContext) => { context.zoomIn(delta, reference); });\n }\n\n public getCenter(): Observable<number[]> {\n return this._lastState$\n .first()\n .map(\n (frame: IFrame): number[] => {\n return (<IStateContext>frame.state).getCenter();\n });\n }\n\n public getZoom(): Observable<number> {\n return this._lastState$\n .first()\n .map(\n (frame: IFrame): number => {\n return frame.state.zoom;\n });\n }\n\n public setCenter(center: number[]): void {\n this._inMotionOperation$.next(true);\n this._invokeContextOperation((context: IStateContext) => { context.setCenter(center); });\n }\n\n public setZoom(zoom: number): void {\n this._inMotionOperation$.next(true);\n this._invokeContextOperation((context: IStateContext) => { context.setZoom(zoom); });\n }\n\n public start(): void {\n if (this._frameId == null) {\n this._start$.next(null);\n this._frameId = this._frameGenerator.requestAnimationFrame(this._frame.bind(this));\n this._frame$.next(this._frameId);\n }\n }\n\n public stop(): void {\n if (this._frameId != null) {\n this._frameGenerator.cancelAnimationFrame(this._frameId);\n this._frameId = null;\n }\n }\n\n private _invokeContextOperation(action: (context: IStateContext) => void): void {\n this._contextOperation$\n .next(\n (context: IStateContext): IStateContext => {\n action(context);\n\n return context;\n });\n }\n\n private _frame(time: number): void {\n this._frameId = this._frameGenerator.requestAnimationFrame(this._frame.bind(this));\n this._frame$.next(this._frameId);\n }\n}\n",
- "/// <reference path=\"../../../typings/index.d.ts\" />\n\nimport {ArgumentMapillaryError} from \"../../Error\";\nimport {IState} from \"../../State\";\nimport {Node} from \"../../Graph\";\nimport {Camera, GeoCoords, ILatLonAlt, Transform, Spatial} from \"../../Geo\";\nimport {IRotation} from \"../../State\";\n\nexport abstract class StateBase implements IState {\n protected _spatial: Spatial;\n protected _geoCoords: GeoCoords;\n\n protected _reference: ILatLonAlt;\n\n protected _alpha: number;\n protected _camera: Camera;\n protected _zoom: number;\n\n protected _currentIndex: number;\n\n protected _trajectory: Node[];\n protected _currentNode: Node;\n protected _previousNode: Node;\n\n protected _trajectoryTransforms: Transform[];\n\n protected _trajectoryCameras: Camera[];\n protected _currentCamera: Camera;\n protected _previousCamera: Camera;\n\n protected _motionless: boolean;\n\n private _referenceThreshold: number;\n\n constructor(state: IState) {\n this._spatial = new Spatial();\n this._geoCoords = new GeoCoords();\n\n this._referenceThreshold = 0.01;\n\n this._reference = state.reference;\n\n this._alpha = state.alpha;\n this._camera = state.camera.clone();\n this._zoom = state.zoom;\n\n this._currentIndex = state.currentIndex;\n\n this._trajectory = state.trajectory.slice();\n this._trajectoryTransforms = [];\n this._trajectoryCameras = [];\n\n for (let node of this._trajectory) {\n let translation: number[] = this._nodeToTranslation(node);\n let transform: Transform = new Transform(node, node.image, translation);\n\n this._trajectoryTransforms.push(transform);\n this._trajectoryCameras.push(new Camera(transform));\n }\n\n this._currentNode = this._trajectory.length > 0 ?\n this._trajectory[this._currentIndex] :\n null;\n\n this._previousNode = this._trajectory.length > 1 && this.currentIndex > 0 ?\n this._trajectory[this._currentIndex - 1] :\n null;\n\n this._currentCamera = this._trajectoryCameras.length > 0 ?\n this._trajectoryCameras[this._currentIndex].clone() :\n new Camera();\n\n this._previousCamera = this._trajectoryCameras.length > 1 && this.currentIndex > 0 ?\n this._trajectoryCameras[this._currentIndex - 1].clone() :\n this._currentCamera.clone();\n }\n\n public get reference(): ILatLonAlt {\n return this._reference;\n }\n\n public get alpha(): number {\n return this._getAlpha();\n }\n\n public get camera(): Camera {\n return this._camera;\n }\n\n public get zoom(): number {\n return this._zoom;\n }\n\n public get trajectory(): Node[] {\n return this._trajectory;\n }\n\n public get currentIndex(): number {\n return this._currentIndex;\n }\n\n public get currentNode(): Node {\n return this._currentNode;\n }\n\n public get previousNode(): Node {\n return this._previousNode;\n }\n\n public get currentCamera(): Camera {\n return this._currentCamera;\n }\n\n public get currentTransform(): Transform {\n return this._trajectoryTransforms.length > 0 ?\n this._trajectoryTransforms[this.currentIndex] : null;\n }\n\n public get previousTransform(): Transform {\n return this._trajectoryTransforms.length > 1 && this.currentIndex > 0 ?\n this._trajectoryTransforms[this.currentIndex - 1] : null;\n }\n\n public get motionless(): boolean {\n return this._motionless;\n }\n\n public abstract traverse(): StateBase;\n\n public abstract wait(): StateBase;\n\n public abstract move(delta: number): void;\n\n public abstract moveTo(position: number): void;\n\n public abstract rotate(delta: IRotation): void;\n\n public abstract rotateBasic(basicRotation: number[]): void;\n\n public abstract rotateBasicUnbounded(basicRotation: number[]): void;\n\n public abstract rotateToBasic(basic: number[]): void;\n\n public abstract zoomIn(delta: number, reference: number[]): void;\n\n public abstract update(fps: number): void;\n\n public append(nodes: Node[]): void {\n if (nodes.length < 1) {\n throw Error(\"Trajectory can not be empty\");\n }\n\n if (this._currentIndex < 0) {\n this.set(nodes);\n } else {\n this._trajectory = this._trajectory.concat(nodes);\n this._appendToTrajectories(nodes);\n }\n }\n\n public prepend(nodes: Node[]): void {\n if (nodes.length < 1) {\n throw Error(\"Trajectory can not be empty\");\n }\n\n this._trajectory = nodes.slice().concat(this._trajectory);\n this._currentIndex += nodes.length;\n\n this._setCurrentNode();\n\n let referenceReset: boolean = this._setReference(this._currentNode);\n if (referenceReset) {\n this._setTrajectories();\n } else {\n this._prependToTrajectories(nodes);\n }\n\n this._setCurrentCamera();\n }\n\n public remove(n: number): void {\n if (n < 0) {\n throw Error(\"n must be a positive integer\");\n }\n\n if (this._currentIndex - 1 < n) {\n throw Error(\"Current and previous nodes can not be removed\");\n }\n\n for (let i: number = 0; i < n; i++) {\n this._trajectory.shift();\n this._trajectoryTransforms.shift();\n this._trajectoryCameras.shift();\n this._currentIndex--;\n }\n\n this._setCurrentNode();\n }\n\n public clearPrior(): void {\n if (this._currentIndex > 0) {\n this.remove(this._currentIndex - 1);\n }\n }\n\n public clear(): void {\n this.cut();\n\n if (this._currentIndex > 0) {\n this.remove(this._currentIndex - 1);\n }\n }\n\n public cut(): void {\n while (this._trajectory.length - 1 > this._currentIndex) {\n this._trajectory.pop();\n this._trajectoryTransforms.pop();\n this._trajectoryCameras.pop();\n }\n }\n\n public set(nodes: Node[]): void {\n this._setTrajectory(nodes);\n this._setCurrentNode();\n this._setReference(this._currentNode);\n this._setTrajectories();\n this._setCurrentCamera();\n }\n\n public getCenter(): number[] {\n return this._currentNode != null ?\n this.currentTransform.projectBasic(this._camera.lookat.toArray()) :\n [0.5, 0.5];\n }\n\n public abstract setCenter(center: number[]): void;\n\n public abstract setZoom(zoom: number): void;\n\n protected abstract _getAlpha(): number;\n\n protected _setCurrent(): void {\n this._setCurrentNode();\n\n let referenceReset: boolean = this._setReference(this._currentNode);\n if (referenceReset) {\n this._setTrajectories();\n }\n\n this._setCurrentCamera();\n }\n\n protected _setCurrentCamera(): void {\n this._currentCamera = this._trajectoryCameras[this._currentIndex].clone();\n this._previousCamera = this._currentIndex > 0 ?\n this._trajectoryCameras[this._currentIndex - 1].clone() :\n this._currentCamera.clone();\n }\n\n protected _motionlessTransition(): boolean {\n let nodesSet: boolean = this._currentNode != null && this._previousNode != null;\n\n return nodesSet && !(\n this._currentNode.merged &&\n this._previousNode.merged &&\n this._withinOriginalDistance() &&\n this._sameConnectedComponent()\n );\n }\n\n private _setReference(node: Node): boolean {\n // do not reset reference if node is within threshold distance\n if (Math.abs(node.latLon.lat - this.reference.lat) < this._referenceThreshold &&\n Math.abs(node.latLon.lon - this.reference.lon) < this._referenceThreshold) {\n return false;\n }\n\n // do not reset reference if previous node exist and transition is with motion\n if (this._previousNode != null && !this._motionlessTransition()) {\n return false;\n }\n\n this._reference.lat = node.latLon.lat;\n this._reference.lon = node.latLon.lon;\n this._reference.alt = node.alt;\n\n return true;\n }\n\n private _setCurrentNode(): void {\n this._currentNode = this._trajectory.length > 0 ?\n this._trajectory[this._currentIndex] :\n null;\n\n this._previousNode = this._currentIndex > 0 ?\n this._trajectory[this._currentIndex - 1] :\n null;\n }\n\n private _setTrajectory(nodes: Node[]): void {\n if (nodes.length < 1) {\n throw new ArgumentMapillaryError(\"Trajectory can not be empty\");\n }\n\n if (this._currentNode != null) {\n this._trajectory = [this._currentNode].concat(nodes);\n this._currentIndex = 1;\n } else {\n this._trajectory = nodes.slice();\n this._currentIndex = 0;\n }\n }\n\n private _setTrajectories(): void {\n this._trajectoryTransforms.length = 0;\n this._trajectoryCameras.length = 0;\n\n this._appendToTrajectories(this._trajectory);\n }\n\n private _appendToTrajectories(nodes: Node[]): void {\n for (let node of nodes) {\n if (!node.assetsCached) {\n throw new ArgumentMapillaryError(\"Assets must be cached when node is added to trajectory\");\n }\n\n let translation: number[] = this._nodeToTranslation(node);\n let transform: Transform = new Transform(node, node.image, translation);\n\n this._trajectoryTransforms.push(transform);\n this._trajectoryCameras.push(new Camera(transform));\n }\n }\n\n private _prependToTrajectories(nodes: Node[]): void {\n for (let node of nodes.reverse()) {\n if (!node.assetsCached) {\n throw new ArgumentMapillaryError(\"Assets must be cached when added to trajectory\");\n }\n\n let translation: number[] = this._nodeToTranslation(node);\n let transform: Transform = new Transform(node, node.image, translation);\n\n this._trajectoryTransforms.unshift(transform);\n this._trajectoryCameras.unshift(new Camera(transform));\n }\n }\n\n private _nodeToTranslation(node: Node): number[] {\n let C: number[] = this._geoCoords.geodeticToEnu(\n node.latLon.lat,\n node.latLon.lon,\n node.alt,\n this._reference.lat,\n this._reference.lon,\n this._reference.alt);\n\n let RC: THREE.Vector3 = this._spatial.rotate(C, node.rotation);\n\n return [-RC.x, -RC.y, -RC.z];\n }\n\n private _sameConnectedComponent(): boolean {\n let current: Node = this._currentNode;\n let previous: Node = this._previousNode;\n\n if (!current ||\n !current.mergeCC ||\n !previous ||\n !previous.mergeCC) {\n return true;\n }\n\n return current.mergeCC === previous.mergeCC;\n }\n\n private _withinOriginalDistance(): boolean {\n let current: Node = this._currentNode;\n let previous: Node = this._previousNode;\n\n if (!current || !previous) {\n return true;\n }\n\n // 50 km/h moves 28m in 2s\n let distance: number = this._spatial.distanceFromLatLon(\n current.originalLatLon.lat,\n current.originalLatLon.lon,\n previous.originalLatLon.lat,\n previous.originalLatLon.lon);\n\n return distance < 25;\n }\n}\n",
- "/// <reference path=\"../../../typings/index.d.ts\" />\n\nimport * as THREE from \"three\";\nimport * as UnitBezier from \"@mapbox/unitbezier\";\n\nimport {IGPano} from \"../../API\";\nimport {IState, StateBase, IRotation, WaitingState} from \"../../State\";\nimport {Node} from \"../../Graph\";\nimport {Camera, Transform} from \"../../Geo\";\n\nclass RotationDelta implements IRotation {\n private _phi: number;\n private _theta: number;\n\n constructor(phi: number, theta: number) {\n this._phi = phi;\n this._theta = theta;\n }\n\n public get phi(): number {\n return this._phi;\n }\n\n public set phi(value: number) {\n this._phi = value;\n }\n\n public get theta(): number {\n return this._theta;\n }\n\n public set theta(value: number) {\n this._theta = value;\n }\n\n public get isZero(): boolean {\n return this._phi === 0 && this._theta === 0;\n }\n\n public copy(delta: IRotation): void {\n this._phi = delta.phi;\n this._theta = delta.theta;\n }\n\n public lerp(other: IRotation, alpha: number): void {\n this._phi = (1 - alpha) * this._phi + alpha * other.phi;\n this._theta = (1 - alpha) * this._theta + alpha * other.theta;\n }\n\n public multiply(value: number): void {\n this._phi *= value;\n this._theta *= value;\n }\n\n public threshold(value: number): void {\n this._phi = Math.abs(this._phi) > value ? this._phi : 0;\n this._theta = Math.abs(this._theta) > value ? this._theta : 0;\n }\n\n public lengthSquared(): number {\n return this._phi * this._phi + this._theta * this._theta;\n }\n\n public reset(): void {\n this._phi = 0;\n this._theta = 0;\n }\n}\n\nexport class TraversingState extends StateBase {\n private _baseAlpha: number;\n private _animationSpeed: number;\n\n private _unitBezier: UnitBezier;\n private _useBezier: boolean;\n\n private _rotationDelta: RotationDelta;\n private _requestedRotationDelta: RotationDelta;\n\n private _basicRotation: number[];\n private _requestedBasicRotation: number[];\n private _requestedBasicRotationUnbounded: number[];\n\n private _rotationAcceleration: number;\n private _rotationIncreaseAlpha: number;\n private _rotationDecreaseAlpha: number;\n private _rotationThreshold: number;\n private _unboundedRotationAlpha: number;\n\n private _desiredZoom: number;\n private _minZoom: number;\n private _maxZoom: number;\n private _lookatDepth: number;\n private _desiredLookat: THREE.Vector3;\n private _desiredCenter: number[];\n\n constructor (state: IState) {\n super(state);\n\n this._adjustCameras();\n\n this._motionless = this._motionlessTransition();\n\n this._baseAlpha = this._alpha;\n this._animationSpeed = 0.025;\n this._unitBezier = new UnitBezier(0.74, 0.67, 0.38, 0.96);\n this._useBezier = false;\n\n this._rotationDelta = new RotationDelta(0, 0);\n this._requestedRotationDelta = null;\n\n this._basicRotation = [0, 0];\n this._requestedBasicRotation = null;\n this._requestedBasicRotationUnbounded = null;\n\n this._rotationAcceleration = 0.86;\n this._rotationIncreaseAlpha = 0.97;\n this._rotationDecreaseAlpha = 0.9;\n this._rotationThreshold = 1e-3;\n this._unboundedRotationAlpha = 0.8;\n\n this._desiredZoom = state.zoom;\n this._minZoom = 0;\n this._maxZoom = 3;\n this._lookatDepth = 10;\n\n this._desiredLookat = null;\n this._desiredCenter = null;\n }\n\n public traverse(): StateBase {\n throw new Error(\"Not implemented\");\n }\n\n public wait(): StateBase {\n return new WaitingState(this);\n }\n\n public append(nodes: Node[]): void {\n let emptyTrajectory: boolean = this._trajectory.length === 0;\n\n if (emptyTrajectory) {\n this._resetTransition();\n }\n\n super.append(nodes);\n\n if (emptyTrajectory) {\n this._setDesiredCenter();\n this._setDesiredZoom();\n }\n }\n\n public prepend(nodes: Node[]): void {\n let emptyTrajectory: boolean = this._trajectory.length === 0;\n\n if (emptyTrajectory) {\n this._resetTransition();\n }\n\n super.prepend(nodes);\n\n if (emptyTrajectory) {\n this._setDesiredCenter();\n this._setDesiredZoom();\n }\n }\n\n public set(nodes: Node[]): void {\n super.set(nodes);\n\n this._desiredLookat = null;\n\n this._resetTransition();\n this._clearRotation();\n\n this._setDesiredCenter();\n this._setDesiredZoom();\n\n if (this._trajectory.length < 3) {\n this._useBezier = true;\n }\n }\n\n public move(delta: number): void {\n throw new Error(\"Not implemented\");\n }\n\n public moveTo(delta: number): void {\n throw new Error(\"Not implemented\");\n }\n\n public rotate(rotationDelta: IRotation): void {\n if (this._currentNode == null) {\n return;\n }\n\n this._desiredZoom = this._zoom;\n this._desiredLookat = null;\n this._requestedBasicRotation = null;\n\n if (this._requestedRotationDelta != null) {\n this._requestedRotationDelta.phi = this._requestedRotationDelta.phi + rotationDelta.phi;\n this._requestedRotationDelta.theta = this._requestedRotationDelta.theta + rotationDelta.theta;\n } else {\n this._requestedRotationDelta = new RotationDelta(rotationDelta.phi, rotationDelta.theta);\n }\n }\n\n public rotateBasic(basicRotation: number[]): void {\n if (this._currentNode == null) {\n return;\n }\n\n this._desiredZoom = this._zoom;\n this._desiredLookat = null;\n this._requestedRotationDelta = null;\n\n if (this._requestedBasicRotation != null) {\n this._requestedBasicRotation[0] += basicRotation[0];\n this._requestedBasicRotation[1] += basicRotation[1];\n\n let threshold: number = 0.05 / Math.pow(2, this._zoom);\n\n this._requestedBasicRotation[0] =\n this._spatial.clamp(this._requestedBasicRotation[0], -threshold, threshold);\n\n this._requestedBasicRotation[1] =\n this._spatial.clamp(this._requestedBasicRotation[1], -threshold, threshold);\n } else {\n this._requestedBasicRotation = basicRotation.slice();\n }\n }\n\n public rotateBasicUnbounded(basicRotation: number[]): void {\n if (this._currentNode == null) {\n return;\n }\n\n if (this._requestedBasicRotationUnbounded != null) {\n this._requestedBasicRotationUnbounded[0] += basicRotation[0];\n this._requestedBasicRotationUnbounded[1] += basicRotation[1];\n } else {\n this._requestedBasicRotationUnbounded = basicRotation.slice();\n }\n }\n\n public rotateToBasic(basic: number[]): void {\n if (this._currentNode == null) {\n return;\n }\n\n this._desiredZoom = this._zoom;\n this._desiredLookat = null;\n\n basic[0] = this._spatial.clamp(basic[0], 0, 1);\n basic[1] = this._spatial.clamp(basic[1], 0, 1);\n\n let lookat: number[] = this.currentTransform.unprojectBasic(basic, this._lookatDepth);\n this._currentCamera.lookat.fromArray(lookat);\n }\n\n public zoomIn(delta: number, reference: number[]): void {\n if (this._currentNode == null) {\n return;\n }\n\n this._desiredZoom = Math.max(this._minZoom, Math.min(this._maxZoom, this._desiredZoom + delta));\n\n let currentCenter: number[] = this.currentTransform.projectBasic(\n this._currentCamera.lookat.toArray());\n\n let currentCenterX: number = currentCenter[0];\n let currentCenterY: number = currentCenter[1];\n\n let zoom0: number = Math.pow(2, this._zoom);\n let zoom1: number = Math.pow(2, this._desiredZoom);\n\n let refX: number = reference[0];\n let refY: number = reference[1];\n\n if (this.currentTransform.gpano != null &&\n this.currentTransform.gpano.CroppedAreaImageWidthPixels === this.currentTransform.gpano.FullPanoWidthPixels) {\n if (refX - currentCenterX > 0.5) {\n refX = refX - 1;\n } else if (currentCenterX - refX > 0.5) {\n refX = 1 + refX;\n }\n }\n\n let newCenterX: number = refX - zoom0 / zoom1 * (refX - currentCenterX);\n let newCenterY: number = refY - zoom0 / zoom1 * (refY - currentCenterY);\n\n let gpano: IGPano = this.currentTransform.gpano;\n\n if (this._currentNode.fullPano) {\n newCenterX = this._spatial.wrap(newCenterX + this._basicRotation[0], 0, 1);\n newCenterY = this._spatial.clamp(newCenterY + this._basicRotation[1], 0.05, 0.95);\n } else if (gpano != null &&\n this.currentTransform.gpano.CroppedAreaImageWidthPixels === this.currentTransform.gpano.FullPanoWidthPixels) {\n newCenterX = this._spatial.wrap(newCenterX + this._basicRotation[0], 0, 1);\n newCenterY = this._spatial.clamp(newCenterY + this._basicRotation[1], 0, 1);\n } else {\n newCenterX = this._spatial.clamp(newCenterX, 0, 1);\n newCenterY = this._spatial.clamp(newCenterY, 0, 1);\n }\n\n this._desiredLookat = new THREE.Vector3()\n .fromArray(this.currentTransform.unprojectBasic([newCenterX, newCenterY], this._lookatDepth));\n }\n\n public setCenter(center: number[]): void {\n this._desiredLookat = null;\n this._requestedRotationDelta = null;\n this._requestedBasicRotation = null;\n this._desiredZoom = this._zoom;\n\n let clamped: number[] = [\n this._spatial.clamp(center[0], 0, 1),\n this._spatial.clamp(center[1], 0, 1),\n ];\n\n if (this._currentNode == null) {\n this._desiredCenter = clamped;\n return;\n }\n\n this._desiredCenter = null;\n\n let currentLookat: THREE.Vector3 = new THREE.Vector3()\n .fromArray(this.currentTransform.unprojectBasic(clamped, this._lookatDepth));\n\n let previousTransform: Transform = this.previousTransform != null ?\n this.previousTransform :\n this.currentTransform;\n let previousLookat: THREE.Vector3 = new THREE.Vector3()\n .fromArray(previousTransform.unprojectBasic(clamped, this._lookatDepth));\n\n this._currentCamera.lookat.copy(currentLookat);\n this._previousCamera.lookat.copy(previousLookat);\n }\n\n public setZoom(zoom: number): void {\n this._desiredLookat = null;\n this._requestedRotationDelta = null;\n this._requestedBasicRotation = null;\n\n this._zoom = this._spatial.clamp(zoom, this._minZoom, this._maxZoom);\n this._desiredZoom = this._zoom;\n }\n\n public update(fps: number): void {\n if (this._alpha === 1 && this._currentIndex + this._alpha < this._trajectory.length) {\n this._currentIndex += 1;\n\n this._useBezier = this._trajectory.length < 3 &&\n this._currentIndex + 1 === this._trajectory.length;\n\n this._setCurrent();\n this._resetTransition();\n this._clearRotation();\n\n this._desiredZoom = this._currentNode.fullPano ? this._zoom : 0;\n\n this._desiredLookat = null;\n }\n\n let animationSpeed: number = this._animationSpeed * (60 / fps);\n this._baseAlpha = Math.min(1, this._baseAlpha + animationSpeed);\n if (this._useBezier) {\n this._alpha = this._unitBezier.solve(this._baseAlpha);\n } else {\n this._alpha = this._baseAlpha;\n }\n\n this._updateRotation();\n if (!this._rotationDelta.isZero) {\n this._applyRotation(this._previousCamera);\n this._applyRotation(this._currentCamera);\n }\n\n this._updateRotationBasic();\n if (this._basicRotation[0] !== 0 || this._basicRotation[1] !== 0) {\n this._applyRotationBasic();\n }\n\n this._updateZoom(animationSpeed);\n this._updateLookat(animationSpeed);\n\n this._camera.lerpCameras(this._previousCamera, this._currentCamera, this.alpha);\n }\n\n protected _getAlpha(): number {\n return this._motionless ? Math.ceil(this._alpha) : this._alpha;\n }\n\n protected _setCurrentCamera(): void {\n super._setCurrentCamera();\n\n this._adjustCameras();\n }\n\n private _adjustCameras(): void {\n if (this._previousNode == null) {\n return;\n }\n\n let lookat: THREE.Vector3 = this._camera.lookat.clone().sub(this._camera.position);\n this._previousCamera.lookat.copy(lookat.clone().add(this._previousCamera.position));\n\n if (this._currentNode.fullPano) {\n this._currentCamera.lookat.copy(lookat.clone().add(this._currentCamera.position));\n }\n }\n\n private _resetTransition(): void {\n this._alpha = 0;\n this._baseAlpha = 0;\n\n this._motionless = this._motionlessTransition();\n }\n\n private _applyRotation(camera: Camera): void {\n if (camera == null) {\n return;\n }\n\n let q: THREE.Quaternion = new THREE.Quaternion().setFromUnitVectors(camera.up, new THREE.Vector3( 0, 0, 1 ));\n let qInverse: THREE.Quaternion = q.clone().inverse();\n\n let offset: THREE.Vector3 = new THREE.Vector3();\n offset.copy(camera.lookat).sub(camera.position);\n offset.applyQuaternion(q);\n let length: number = offset.length();\n\n let phi: number = Math.atan2(offset.y, offset.x);\n phi += this._rotationDelta.phi;\n\n let theta: number = Math.atan2(Math.sqrt(offset.x * offset.x + offset.y * offset.y), offset.z);\n theta += this._rotationDelta.theta;\n theta = Math.max(0.1, Math.min(Math.PI - 0.1, theta));\n\n offset.x = Math.sin(theta) * Math.cos(phi);\n offset.y = Math.sin(theta) * Math.sin(phi);\n offset.z = Math.cos(theta);\n offset.applyQuaternion(qInverse);\n\n camera.lookat.copy(camera.position).add(offset.multiplyScalar(length));\n }\n\n private _applyRotationBasic(): void {\n let currentNode: Node = this._currentNode;\n let previousNode: Node = this._previousNode != null ?\n this.previousNode :\n this.currentNode;\n\n let currentCamera: Camera = this._currentCamera;\n let previousCamera: Camera = this._previousCamera;\n\n let currentTransform: Transform = this.currentTransform;\n let previousTransform: Transform = this.previousTransform != null ?\n this.previousTransform :\n this.currentTransform;\n\n let currentBasic: number[] = currentTransform.projectBasic(currentCamera.lookat.toArray());\n let previousBasic: number[] = previousTransform.projectBasic(previousCamera.lookat.toArray());\n\n let currentGPano: IGPano = currentTransform.gpano;\n let previousGPano: IGPano = previousTransform.gpano;\n\n if (currentNode.fullPano) {\n currentBasic[0] = this._spatial.wrap(currentBasic[0] + this._basicRotation[0], 0, 1);\n currentBasic[1] = this._spatial.clamp(currentBasic[1] + this._basicRotation[1], 0.05, 0.95);\n } else if (currentGPano != null &&\n currentTransform.gpano.CroppedAreaImageWidthPixels === currentTransform.gpano.FullPanoWidthPixels) {\n currentBasic[0] = this._spatial.wrap(currentBasic[0] + this._basicRotation[0], 0, 1);\n currentBasic[1] = this._spatial.clamp(currentBasic[1] + this._basicRotation[1], 0, 1);\n } else {\n currentBasic[0] = this._spatial.clamp(currentBasic[0] + this._basicRotation[0], 0, 1);\n currentBasic[1] = this._spatial.clamp(currentBasic[1] + this._basicRotation[1], 0, 1);\n }\n\n if (previousNode.fullPano) {\n previousBasic[0] = this._spatial.wrap(previousBasic[0] + this._basicRotation[0], 0, 1);\n previousBasic[1] = this._spatial.clamp(previousBasic[1] + this._basicRotation[1], 0.05, 0.95);\n } else if (previousGPano != null &&\n previousTransform.gpano.CroppedAreaImageWidthPixels === previousTransform.gpano.FullPanoWidthPixels) {\n previousBasic[0] = this._spatial.wrap(previousBasic[0] + this._basicRotation[0], 0, 1);\n previousBasic[1] = this._spatial.clamp(previousBasic[1] + this._basicRotation[1], 0, 1);\n } else {\n previousBasic[0] = this._spatial.clamp(previousBasic[0] + this._basicRotation[0], 0, 1);\n previousBasic[1] = this._spatial.clamp(currentBasic[1] + this._basicRotation[1], 0, 1);\n }\n\n let currentLookat: number[] = currentTransform.unprojectBasic(currentBasic, this._lookatDepth);\n currentCamera.lookat.fromArray(currentLookat);\n\n let previousLookat: number[] = previousTransform.unprojectBasic(previousBasic, this._lookatDepth);\n previousCamera.lookat.fromArray(previousLookat);\n }\n\n private _updateZoom(animationSpeed: number): void {\n let diff: number = this._desiredZoom - this._zoom;\n let sign: number = diff > 0 ? 1 : diff < 0 ? -1 : 0;\n\n if (diff === 0) {\n return;\n } else if (Math.abs(diff) < 2e-3) {\n this._zoom = this._desiredZoom;\n if (this._desiredLookat != null) {\n this._desiredLookat = null;\n }\n } else {\n this._zoom += sign * Math.max(Math.abs(5 * animationSpeed * diff), 2e-3);\n }\n }\n\n private _updateLookat(animationSpeed: number): void {\n if (this._desiredLookat === null) {\n return;\n }\n\n let diff: number = this._desiredLookat.distanceToSquared(this._currentCamera.lookat);\n\n if (Math.abs(diff) < 1e-6) {\n this._currentCamera.lookat.copy(this._desiredLookat);\n this._desiredLookat = null;\n } else {\n this._currentCamera.lookat.lerp(this._desiredLookat, 5 * animationSpeed);\n }\n }\n\n private _updateRotation(): void {\n if (this._requestedRotationDelta != null) {\n let length: number = this._rotationDelta.lengthSquared();\n let requestedLength: number = this._requestedRotationDelta.lengthSquared();\n\n if (requestedLength > length) {\n this._rotationDelta.lerp(this._requestedRotationDelta, this._rotationIncreaseAlpha);\n } else {\n this._rotationDelta.lerp(this._requestedRotationDelta, this._rotationDecreaseAlpha);\n }\n\n this._requestedRotationDelta = null;\n\n return;\n }\n\n if (this._rotationDelta.isZero) {\n return;\n }\n\n this._rotationDelta.multiply(this._rotationAcceleration);\n this._rotationDelta.threshold(this._rotationThreshold);\n }\n\n private _updateRotationBasic(): void {\n if (this._requestedBasicRotation != null) {\n let x: number = this._basicRotation[0];\n let y: number = this._basicRotation[1];\n\n let reqX: number = this._requestedBasicRotation[0];\n let reqY: number = this._requestedBasicRotation[1];\n\n if (Math.abs(reqX) > Math.abs(x)) {\n this._basicRotation[0] = (1 - this._rotationIncreaseAlpha) * x + this._rotationIncreaseAlpha * reqX;\n } else {\n this._basicRotation[0] = (1 - this._rotationDecreaseAlpha) * x + this._rotationDecreaseAlpha * reqX;\n }\n\n if (Math.abs(reqY) > Math.abs(y)) {\n this._basicRotation[1] = (1 - this._rotationIncreaseAlpha) * y + this._rotationIncreaseAlpha * reqY;\n } else {\n this._basicRotation[1] = (1 - this._rotationDecreaseAlpha) * y + this._rotationDecreaseAlpha * reqY;\n }\n\n this._requestedBasicRotation = null;\n\n return;\n }\n\n if (this._requestedBasicRotationUnbounded != null) {\n let reqX: number = this._requestedBasicRotationUnbounded[0];\n let reqY: number = this._requestedBasicRotationUnbounded[1];\n\n if (Math.abs(reqX) > 0) {\n this._basicRotation[0] = (1 - this._unboundedRotationAlpha) * this._basicRotation[0] + this._unboundedRotationAlpha * reqX;\n }\n\n if (Math.abs(reqY) > 0) {\n this._basicRotation[1] = (1 - this._unboundedRotationAlpha) * this._basicRotation[1] + this._unboundedRotationAlpha * reqY;\n }\n\n if (this._desiredLookat != null) {\n let desiredBasicLookat: number[] = this.currentTransform.projectBasic(this._desiredLookat.toArray());\n\n desiredBasicLookat[0] += reqX;\n desiredBasicLookat[1] += reqY;\n\n this._desiredLookat = new THREE.Vector3()\n .fromArray(this.currentTransform.unprojectBasic(desiredBasicLookat, this._lookatDepth));\n }\n\n this._requestedBasicRotationUnbounded = null;\n }\n\n if (this._basicRotation[0] === 0 && this._basicRotation[1] === 0) {\n return;\n }\n\n this._basicRotation[0] = this._rotationAcceleration * this._basicRotation[0];\n this._basicRotation[1] = this._rotationAcceleration * this._basicRotation[1];\n\n if (Math.abs(this._basicRotation[0]) < this._rotationThreshold / Math.pow(2, this._zoom) &&\n Math.abs(this._basicRotation[1]) < this._rotationThreshold / Math.pow(2, this._zoom)) {\n this._basicRotation = [0, 0];\n }\n }\n\n private _clearRotation(): void {\n if (this._currentNode.fullPano) {\n return;\n }\n\n if (this._requestedRotationDelta != null) {\n this._requestedRotationDelta = null;\n }\n\n if (!this._rotationDelta.isZero) {\n this._rotationDelta.reset();\n }\n\n if (this._requestedBasicRotation != null) {\n this._requestedBasicRotation = null;\n }\n\n if (this._basicRotation[0] > 0 || this._basicRotation[1] > 0) {\n this._basicRotation = [0, 0];\n }\n }\n\n private _setDesiredCenter(): void {\n if (this._desiredCenter == null) {\n return;\n }\n\n let lookatDirection: THREE.Vector3 = new THREE.Vector3()\n .fromArray(this.currentTransform.unprojectBasic(this._desiredCenter, this._lookatDepth))\n .sub(this._currentCamera.position);\n\n this._currentCamera.lookat.copy(this._currentCamera.position.clone().add(lookatDirection));\n this._previousCamera.lookat.copy(this._previousCamera.position.clone().add(lookatDirection));\n\n this._desiredCenter = null;\n }\n\n private _setDesiredZoom(): void {\n this._desiredZoom =\n this._currentNode.fullPano || this._previousNode == null ?\n this._zoom : 0;\n }\n}\n",
- "import {Node} from \"../../Graph\";\nimport {IState, StateBase, IRotation, TraversingState} from \"../../State\";\n\nexport class WaitingState extends StateBase {\n constructor(state: IState) {\n super(state);\n\n this._zoom = 0;\n\n this._adjustCameras();\n\n this._motionless = this._motionlessTransition();\n }\n\n public traverse(): StateBase {\n return new TraversingState(this);\n }\n\n public wait(): StateBase {\n throw new Error(\"Not implemented\");\n }\n\n public prepend(nodes: Node[]): void {\n super.prepend(nodes);\n\n this._motionless = this._motionlessTransition();\n }\n\n public set(nodes: Node[]): void {\n super.set(nodes);\n\n this._motionless = this._motionlessTransition();\n }\n\n public rotate(delta: IRotation): void { return; }\n\n public rotateBasic(basicRotation: number[]): void { return; }\n\n public rotateBasicUnbounded(basicRotation: number[]): void { return; }\n\n public rotateToBasic(basic: number[]): void { return; }\n\n public zoomIn(delta: number, reference: number[]): void { return; }\n\n public move(delta: number): void {\n this._alpha = Math.max(0, Math.min(1, this._alpha + delta));\n }\n\n public moveTo(position: number): void {\n this._alpha = Math.max(0, Math.min(1, position));\n }\n\n public update(fps: number): void {\n this._camera.lerpCameras(this._previousCamera, this._currentCamera, this.alpha);\n }\n\n public setCenter(center: number[]): void { return; }\n\n public setZoom(zoom: number): void { return; }\n\n protected _getAlpha(): number {\n return this._motionless ? Math.round(this._alpha) : this._alpha;\n }\n\n protected _setCurrentCamera(): void {\n super._setCurrentCamera();\n\n this._adjustCameras();\n }\n\n private _adjustCameras(): void {\n if (this._previousNode == null) {\n return;\n }\n\n if (this._currentNode.fullPano) {\n let lookat: THREE.Vector3 = this._camera.lookat.clone().sub(this._camera.position);\n this._currentCamera.lookat.copy(lookat.clone().add(this._currentCamera.position));\n }\n\n if (this._previousNode.fullPano) {\n let lookat: THREE.Vector3 = this._currentCamera.lookat.clone().sub(this._currentCamera.position);\n this._previousCamera.lookat.copy(lookat.clone().add(this._previousCamera.position));\n }\n }\n}\n",
- "import {Observable} from \"rxjs/Observable\";\nimport {Subscriber} from \"rxjs/Subscriber\";\n\n/**\n * @class ImageTileLoader\n *\n * @classdesc Represents a loader of image tiles.\n */\nexport class ImageTileLoader {\n private _origin: string;\n private _scheme: string;\n private _host: string;\n\n /**\n * Create a new node image tile loader instance.\n *\n * @param {string} scheme - The URI scheme.\n * @param {string} host - The URI host.\n * @param {string} [origin] - The origin query param.\n */\n constructor(scheme: string, host: string, origin?: string) {\n this._scheme = scheme;\n this._host = host;\n this._origin = origin != null ? `?origin=${origin}` : \"\";\n }\n\n /**\n * Retrieve an image tile.\n *\n * @description Retrieve an image tile by specifying the area\n * as well as the scaled size.\n *\n * @param {string} identifier - The identifier of the image.\n * @param {number} x - The top left x pixel coordinate for the tile\n * in the original image.\n * @param {number} y - The top left y pixel coordinate for the tile\n * in the original image.\n * @param {number} w - The pixel width of the tile in the original image.\n * @param {number} h - The pixel height of the tile in the original image.\n * @param {number} scaledW - The scaled width of the returned tile.\n * @param {number} scaledH - The scaled height of the returned tile.\n */\n public getTile(\n identifier: string,\n x: number,\n y: number,\n w: number,\n h: number,\n scaledW: number,\n scaledH: number): [Observable<HTMLImageElement>, Function] {\n\n let characteristics: string = `/${identifier}/${x},${y},${w},${h}/${scaledW},${scaledH}/0/default.jpg`;\n let url: string =\n this._scheme +\n \"://\" +\n this._host +\n characteristics +\n this._origin;\n\n let xmlHTTP: XMLHttpRequest = null;\n\n return [Observable.create(\n (subscriber: Subscriber<HTMLImageElement>): void => {\n xmlHTTP = new XMLHttpRequest();\n xmlHTTP.open(\"GET\", url, true);\n xmlHTTP.responseType = \"arraybuffer\";\n xmlHTTP.timeout = 15000;\n\n xmlHTTP.onload = (event: Event) => {\n if (xmlHTTP.status !== 200) {\n subscriber.error(\n new Error(\n `Failed to fetch tile (${identifier}: ${x},${y},${w},${h}). ` +\n `Status: ${xmlHTTP.status}, ${xmlHTTP.statusText}`));\n\n return;\n }\n\n let image: HTMLImageElement = new Image();\n image.crossOrigin = \"Anonymous\";\n\n image.onload = (e: Event) => {\n subscriber.next(image);\n subscriber.complete();\n };\n\n image.onerror = (error: ErrorEvent) => {\n subscriber.error(new Error(`Failed to load tile image (${identifier}: ${x},${y},${w},${h})`));\n };\n\n let blob: Blob = new Blob([xmlHTTP.response]);\n image.src = window.URL.createObjectURL(blob);\n };\n\n xmlHTTP.onerror = (error: Event) => {\n subscriber.error(new Error(`Failed to fetch tile (${identifier}: ${x},${y},${w},${h})`));\n };\n\n xmlHTTP.ontimeout = (error: Event) => {\n subscriber.error(new Error(`Tile request timed out (${identifier}: ${x},${y},${w},${h})`));\n };\n\n xmlHTTP.onabort = (event: Event) => {\n subscriber.error(new Error(`Tile request was aborted (${identifier}: ${x},${y},${w},${h})`));\n };\n\n xmlHTTP.send(null);\n }),\n (): void => {\n if (xmlHTTP != null) {\n xmlHTTP.abort();\n }\n },\n ];\n }\n}\n\nexport default ImageTileLoader;\n",
+ "import {withLatestFrom, map, startWith, scan, publishReplay, skip, refCount, tap, filter} from \"rxjs/operators\";\nimport {Observable, Subject, BehaviorSubject} from \"rxjs\";\n\nimport {Spatial} from \"../Geo\";\nimport {RenderCamera, RenderMode, ISize} from \"../Render\";\nimport {IFrame} from \"../State\";\n\ninterface IRenderCameraOperation {\n (rc: RenderCamera): RenderCamera;\n}\n\nexport class RenderService {\n private _bearing$: Observable<number>;\n\n private _element: HTMLElement;\n private _currentFrame$: Observable<IFrame>;\n\n private _renderCameraOperation$: Subject<IRenderCameraOperation>;\n private _renderCameraHolder$: Observable<RenderCamera>;\n private _renderCameraFrame$: Observable<RenderCamera>;\n private _renderCamera$: Observable<RenderCamera>;\n\n private _resize$: Subject<void>;\n private _size$: BehaviorSubject<ISize>;\n\n private _spatial: Spatial;\n\n private _renderMode$: BehaviorSubject<RenderMode>;\n\n constructor(element: HTMLElement, currentFrame$: Observable<IFrame>, renderMode: RenderMode, renderCamera?: RenderCamera) {\n this._element = element;\n this._currentFrame$ = currentFrame$;\n\n this._spatial = new Spatial();\n\n renderMode = renderMode != null ? renderMode : RenderMode.Fill;\n\n this._resize$ = new Subject<void>();\n this._renderCameraOperation$ = new Subject<IRenderCameraOperation>();\n\n this._size$ =\n new BehaviorSubject<ISize>(\n {\n height: this._element.offsetHeight,\n width: this._element.offsetWidth,\n });\n\n this._resize$.pipe(\n map(\n (): ISize => {\n return { height: this._element.offsetHeight, width: this._element.offsetWidth };\n }))\n .subscribe(this._size$);\n\n this._renderMode$ = new BehaviorSubject<RenderMode>(renderMode);\n\n this._renderCameraHolder$ = this._renderCameraOperation$.pipe(\n startWith(\n (rc: RenderCamera): RenderCamera => {\n return rc;\n }),\n scan(\n (rc: RenderCamera, operation: IRenderCameraOperation): RenderCamera => {\n return operation(rc);\n },\n !!renderCamera ? renderCamera : new RenderCamera(this._element.offsetWidth, this._element.offsetHeight, renderMode)),\n publishReplay(1),\n refCount());\n\n this._renderCameraFrame$ = this._currentFrame$.pipe(\n withLatestFrom(this._renderCameraHolder$),\n tap(\n ([frame, rc]: [IFrame, RenderCamera]): void => {\n rc.setFrame(frame);\n }),\n map(\n (args: [IFrame, RenderCamera]): RenderCamera => {\n return args[1];\n }),\n publishReplay(1),\n refCount());\n\n this._renderCamera$ = this._renderCameraFrame$.pipe(\n filter(\n (rc: RenderCamera): boolean => {\n return rc.changed;\n }),\n publishReplay(1),\n refCount());\n\n this._bearing$ = this._renderCamera$.pipe(\n map(\n (rc: RenderCamera): number => {\n let bearing: number =\n this._spatial.radToDeg(\n this._spatial.azimuthalToBearing(rc.rotation.phi));\n\n return this._spatial.wrap(bearing, 0, 360);\n }),\n publishReplay(1),\n refCount());\n\n this._size$.pipe(\n skip(1),\n map(\n (size: ISize) => {\n return (rc: RenderCamera): RenderCamera => {\n rc.setSize(size);\n\n return rc;\n };\n }))\n .subscribe(this._renderCameraOperation$);\n\n this._renderMode$.pipe(\n skip(1),\n map(\n (rm: RenderMode) => {\n return (rc: RenderCamera): RenderCamera => {\n rc.setRenderMode(rm);\n\n return rc;\n };\n }))\n .subscribe(this._renderCameraOperation$);\n\n this._bearing$.subscribe(() => { /*noop*/ });\n this._renderCameraHolder$.subscribe(() => { /*noop*/ });\n this._size$.subscribe(() => { /*noop*/ });\n this._renderMode$.subscribe(() => { /*noop*/ });\n this._renderCamera$.subscribe(() => { /*noop*/ });\n this._renderCameraFrame$.subscribe(() => { /*noop*/ });\n }\n\n public get bearing$(): Observable<number> {\n return this._bearing$;\n }\n\n public get element(): HTMLElement {\n return this._element;\n }\n\n public get resize$(): Subject<void> {\n return this._resize$;\n }\n\n public get size$(): Observable<ISize> {\n return this._size$;\n }\n\n public get renderMode$(): Subject<RenderMode> {\n return this._renderMode$;\n }\n\n public get renderCameraFrame$(): Observable<RenderCamera> {\n return this._renderCameraFrame$;\n }\n\n public get renderCamera$(): Observable<RenderCamera> {\n return this._renderCamera$;\n }\n}\n\nexport default RenderService;\n",
+ "export class FrameGenerator {\n private _cancelAnimationFrame: (handle: number) => void;\n private _requestAnimationFrame: (cb: () => void) => number;\n\n constructor(root: any) {\n if (root.requestAnimationFrame) {\n this._cancelAnimationFrame = root.cancelAnimationFrame.bind(root);\n this._requestAnimationFrame = root.requestAnimationFrame.bind(root);\n } else if (root.mozRequestAnimationFrame) {\n this._cancelAnimationFrame = root.mozCancelAnimationFrame.bind(root);\n this._requestAnimationFrame = root.mozRequestAnimationFrame.bind(root);\n } else if (root.webkitRequestAnimationFrame) {\n this._cancelAnimationFrame = root.webkitCancelAnimationFrame.bind(root);\n this._requestAnimationFrame = root.webkitRequestAnimationFrame.bind(root);\n } else if (root.msRequestAnimationFrame) {\n this._cancelAnimationFrame = root.msCancelAnimationFrame.bind(root);\n this._requestAnimationFrame = root.msRequestAnimationFrame.bind(root);\n } else if (root.oRequestAnimationFrame) {\n this._cancelAnimationFrame = root.oCancelAnimationFrame.bind(root);\n this._requestAnimationFrame = root.oRequestAnimationFrame.bind(root);\n } else {\n this._cancelAnimationFrame = root.clearTimeout.bind(root);\n this._requestAnimationFrame = (cb: () => void): number => { return root.setTimeout(cb, 1000 / 60); };\n }\n }\n\n public get cancelAnimationFrame(): (handle: number) => void {\n return this._cancelAnimationFrame;\n }\n\n public get requestAnimationFrame(): (cb: () => void) => number {\n return this._requestAnimationFrame;\n }\n}\n\nexport default FrameGenerator;\n",
+ "import {\n IRotation,\n} from \"../State\";\n\nexport class RotationDelta implements IRotation {\n private _phi: number;\n private _theta: number;\n\n constructor(phi: number, theta: number) {\n this._phi = phi;\n this._theta = theta;\n }\n\n public get phi(): number {\n return this._phi;\n }\n\n public set phi(value: number) {\n this._phi = value;\n }\n\n public get theta(): number {\n return this._theta;\n }\n\n public set theta(value: number) {\n this._theta = value;\n }\n\n public get isZero(): boolean {\n return this._phi === 0 && this._theta === 0;\n }\n\n public copy(delta: IRotation): void {\n this._phi = delta.phi;\n this._theta = delta.theta;\n }\n\n public lerp(other: IRotation, alpha: number): void {\n this._phi = (1 - alpha) * this._phi + alpha * other.phi;\n this._theta = (1 - alpha) * this._theta + alpha * other.theta;\n }\n\n public multiply(value: number): void {\n this._phi *= value;\n this._theta *= value;\n }\n\n public threshold(value: number): void {\n this._phi = Math.abs(this._phi) > value ? this._phi : 0;\n this._theta = Math.abs(this._theta) > value ? this._theta : 0;\n }\n\n public lengthSquared(): number {\n return this._phi * this._phi + this._theta * this._theta;\n }\n\n public reset(): void {\n this._phi = 0;\n this._theta = 0;\n }\n}\n\nexport default RotationDelta;\n",
+ "export enum State {\n Earth,\n Traversing,\n Waiting,\n WaitingInteractively,\n}\n\nexport default State;\n",
+ "import {\n EarthState,\n InteractiveWaitingState,\n IStateContext,\n StateBase,\n State,\n TransitionMode,\n TraversingState,\n WaitingState,\n IRotation,\n} from \"../State\";\nimport {Node} from \"../Graph\";\nimport {\n Camera,\n ILatLonAlt,\n Transform,\n} from \"../Geo\";\n\nexport class StateContext implements IStateContext {\n private _state: StateBase;\n\n constructor(transitionMode?: TransitionMode) {\n this._state = new TraversingState({\n alpha: 1,\n camera: new Camera(),\n currentIndex: -1,\n reference: { alt: 0, lat: 0, lon: 0 },\n trajectory: [],\n transitionMode: transitionMode == null ? TransitionMode.Default : transitionMode,\n zoom: 0,\n });\n }\n\n public earth(): void {\n this._state = this._state.earth();\n }\n\n public traverse(): void {\n this._state = this._state.traverse();\n }\n\n public wait(): void {\n this._state = this._state.wait();\n }\n\n public waitInteractively(): void {\n this._state = this._state.waitInteractively();\n }\n\n public get state(): State {\n if (this._state instanceof EarthState) {\n return State.Earth;\n } else if (this._state instanceof TraversingState) {\n return State.Traversing;\n } else if (this._state instanceof WaitingState) {\n return State.Waiting;\n } else if (this._state instanceof InteractiveWaitingState) {\n return State.WaitingInteractively;\n }\n\n throw new Error(\"Invalid state\");\n }\n\n public get reference(): ILatLonAlt {\n return this._state.reference;\n }\n\n public get alpha(): number {\n return this._state.alpha;\n }\n\n public get camera(): Camera {\n return this._state.camera;\n }\n\n public get zoom(): number {\n return this._state.zoom;\n }\n\n public get currentNode(): Node {\n return this._state.currentNode;\n }\n\n public get previousNode(): Node {\n return this._state.previousNode;\n }\n\n public get currentCamera(): Camera {\n return this._state.currentCamera;\n }\n\n public get currentTransform(): Transform {\n return this._state.currentTransform;\n }\n\n public get previousTransform(): Transform {\n return this._state.previousTransform;\n }\n\n public get trajectory(): Node[] {\n return this._state.trajectory;\n }\n\n public get currentIndex(): number {\n return this._state.currentIndex;\n }\n\n public get lastNode(): Node {\n return this._state.trajectory[this._state.trajectory.length - 1];\n }\n\n public get nodesAhead(): number {\n return this._state.trajectory.length - 1 - this._state.currentIndex;\n }\n\n public get motionless(): boolean {\n return this._state.motionless;\n }\n\n public getCenter(): number[] {\n return this._state.getCenter();\n }\n\n public setCenter(center: number[]): void {\n this._state.setCenter(center);\n }\n\n public setZoom(zoom: number): void {\n this._state.setZoom(zoom);\n }\n\n public update(fps: number): void {\n this._state.update(fps);\n }\n\n public append(nodes: Node[]): void {\n this._state.append(nodes);\n }\n\n public prepend(nodes: Node[]): void {\n this._state.prepend(nodes);\n }\n\n public remove(n: number): void {\n this._state.remove(n);\n }\n\n public clear(): void {\n this._state.clear();\n }\n\n public clearPrior(): void {\n this._state.clearPrior();\n }\n\n public cut(): void {\n this._state.cut();\n }\n\n public set(nodes: Node[]): void {\n this._state.set(nodes);\n }\n\n public rotate(delta: IRotation): void {\n this._state.rotate(delta);\n }\n\n public rotateUnbounded(delta: IRotation): void {\n this._state.rotateUnbounded(delta);\n }\n\n public rotateWithoutInertia(delta: IRotation): void {\n this._state.rotateWithoutInertia(delta);\n }\n\n public rotateBasic(basicRotation: number[]): void {\n this._state.rotateBasic(basicRotation);\n }\n\n public rotateBasicUnbounded(basicRotation: number[]): void {\n this._state.rotateBasicUnbounded(basicRotation);\n }\n\n public rotateBasicWithoutInertia(basicRotation: number[]): void {\n this._state.rotateBasicWithoutInertia(basicRotation);\n }\n\n public rotateToBasic(basic: number[]): void {\n this._state.rotateToBasic(basic);\n }\n\n public move(delta: number): void {\n this._state.move(delta);\n }\n\n public moveTo(delta: number): void {\n this._state.moveTo(delta);\n }\n\n public zoomIn(delta: number, reference: number[]): void {\n this._state.zoomIn(delta, reference);\n }\n\n public setSpeed(speed: number): void {\n this._state.setSpeed(speed);\n }\n\n public setTransitionMode(mode: TransitionMode): void {\n this._state.setTransitionMode(mode);\n }\n\n public dolly(delta: number): void {\n this._state.dolly(delta);\n }\n\n public orbit(rotation: IRotation): void {\n this._state.orbit(rotation);\n }\n\n public truck(direction: number[]): void {\n this._state.truck(direction);\n }\n}\n",
+ "import {\n BehaviorSubject,\n Observable,\n Subject,\n} from \"rxjs\";\n\nimport {\n first,\n tap,\n filter,\n withLatestFrom,\n startWith,\n pairwise,\n distinctUntilChanged,\n publishReplay,\n refCount,\n bufferCount,\n share,\n switchMap,\n map,\n scan,\n} from \"rxjs/operators\";\n\nimport {ILatLon} from \"../API\";\nimport {Node} from \"../Graph\";\nimport {\n Camera,\n ILatLonAlt,\n Transform,\n} from \"../Geo\";\nimport {\n FrameGenerator,\n IStateContext,\n IFrame,\n IRotation,\n StateContext,\n State,\n TransitionMode,\n} from \"../State\";\n\ninterface IContextOperation {\n (context: IStateContext): IStateContext;\n}\n\nexport class StateService {\n private _start$: Subject<void>;\n\n private _frame$: Subject<number>;\n\n private _contextOperation$: BehaviorSubject<IContextOperation>;\n private _context$: Observable<IStateContext>;\n private _fps$: Observable<number>;\n private _state$: Observable<State>;\n\n private _currentState$: Observable<IFrame>;\n private _lastState$: Observable<IFrame>;\n private _currentNode$: Observable<Node>;\n private _currentNodeExternal$: Observable<Node>;\n private _currentCamera$: Observable<Camera>;\n private _currentKey$: BehaviorSubject<string>;\n private _currentTransform$: Observable<Transform>;\n private _reference$: Observable<ILatLonAlt>;\n\n private _inMotionOperation$: Subject<boolean>;\n private _inMotion$: Observable<boolean>;\n\n private _inTranslationOperation$: Subject<boolean>;\n private _inTranslation$: Observable<boolean>;\n\n private _appendNode$: Subject<Node> = new Subject<Node>();\n\n private _frameGenerator: FrameGenerator;\n private _frameId: number;\n\n private _fpsSampleRate: number;\n\n constructor(transitionMode?: TransitionMode) {\n this._start$ = new Subject<void>();\n this._frame$ = new Subject<number>();\n this._fpsSampleRate = 30;\n\n this._contextOperation$ = new BehaviorSubject<IContextOperation>(\n (context: IStateContext): IStateContext => {\n return context;\n });\n\n this._context$ = this._contextOperation$.pipe(\n scan(\n (context: IStateContext, operation: IContextOperation): IStateContext => {\n return operation(context);\n },\n new StateContext(transitionMode)),\n publishReplay(1),\n refCount());\n\n this._state$ = this._context$.pipe(\n map(\n (context: IStateContext): State => {\n return context.state;\n }),\n distinctUntilChanged(),\n publishReplay(1),\n refCount());\n\n this._fps$ = this._start$.pipe(\n switchMap(\n (): Observable<number> => {\n return this._frame$.pipe(\n bufferCount(1, this._fpsSampleRate),\n map(\n (frameIds: number[]): number => {\n return new Date().getTime();\n }),\n pairwise(),\n map(\n (times: [number, number]): number => {\n return Math.max(20, 1000 * this._fpsSampleRate / (times[1] - times[0]));\n }),\n startWith(60));\n }),\n share());\n\n this._currentState$ = this._frame$.pipe(\n withLatestFrom(\n this._fps$,\n this._context$,\n (frameId: number, fps: number, context: IStateContext): [number, number, IStateContext] => {\n return [frameId, fps, context];\n }),\n filter(\n (fc: [number, number, IStateContext]): boolean => {\n return fc[2].currentNode != null;\n }),\n tap(\n (fc: [number, number, IStateContext]): void => {\n fc[2].update(fc[1]);\n }),\n map(\n (fc: [number, number, IStateContext]): IFrame => {\n return { fps: fc[1], id: fc[0], state: fc[2] };\n }),\n share());\n\n this._lastState$ = this._currentState$.pipe(\n publishReplay(1),\n refCount());\n\n let nodeChanged$: Observable<IFrame> = this._currentState$.pipe(\n distinctUntilChanged(\n undefined,\n (f: IFrame): string => {\n return f.state.currentNode.key;\n }),\n publishReplay(1),\n refCount());\n\n let nodeChangedSubject$: Subject<IFrame> = new Subject<IFrame>();\n\n nodeChanged$\n .subscribe(nodeChangedSubject$);\n\n this._currentKey$ = new BehaviorSubject<string>(null);\n\n nodeChangedSubject$.pipe(\n map(\n (f: IFrame): string => {\n return f.state.currentNode.key;\n }))\n .subscribe(this._currentKey$);\n\n this._currentNode$ = nodeChangedSubject$.pipe(\n map(\n (f: IFrame): Node => {\n return f.state.currentNode;\n }),\n publishReplay(1),\n refCount());\n\n this._currentCamera$ = nodeChangedSubject$.pipe(\n map(\n (f: IFrame): Camera => {\n return f.state.currentCamera;\n }),\n publishReplay(1),\n refCount());\n\n this._currentTransform$ = nodeChangedSubject$.pipe(\n map(\n (f: IFrame): Transform => {\n return f.state.currentTransform;\n }),\n publishReplay(1),\n refCount());\n\n this._reference$ = nodeChangedSubject$.pipe(\n map(\n (f: IFrame): ILatLonAlt => {\n return f.state.reference;\n }),\n distinctUntilChanged(\n (r1: ILatLon, r2: ILatLon): boolean => {\n return r1.lat === r2.lat && r1.lon === r2.lon;\n },\n (reference: ILatLonAlt): ILatLon => {\n return { lat: reference.lat, lon: reference.lon };\n }),\n publishReplay(1),\n refCount());\n\n this._currentNodeExternal$ = nodeChanged$.pipe(\n map(\n (f: IFrame): Node => {\n return f.state.currentNode;\n }),\n publishReplay(1),\n refCount());\n\n this._appendNode$.pipe(\n map(\n (node: Node) => {\n return (context: IStateContext): IStateContext => {\n context.append([node]);\n\n return context;\n };\n }))\n .subscribe(this._contextOperation$);\n\n this._inMotionOperation$ = new Subject<boolean>();\n\n nodeChanged$.pipe(\n map(\n (frame: IFrame): boolean => {\n return true;\n }))\n .subscribe(this._inMotionOperation$);\n\n this._inMotionOperation$.pipe(\n distinctUntilChanged(),\n filter(\n (moving: boolean): boolean => {\n return moving;\n }),\n switchMap(\n (moving: boolean): Observable<boolean> => {\n return this._currentState$.pipe(\n filter(\n (frame: IFrame): boolean => {\n return frame.state.nodesAhead === 0;\n }),\n map(\n (frame: IFrame): [Camera, number] => {\n return [frame.state.camera.clone(), frame.state.zoom];\n }),\n pairwise(),\n map(\n (pair: [[Camera, number], [Camera, number]]): boolean => {\n let c1: Camera = pair[0][0];\n let c2: Camera = pair[1][0];\n\n let z1: number = pair[0][1];\n let z2: number = pair[1][1];\n\n return c1.diff(c2) > 1e-5 || Math.abs(z1 - z2) > 1e-5;\n }),\n first(\n (changed: boolean): boolean => {\n return !changed;\n }));\n }))\n .subscribe(this._inMotionOperation$);\n\n this._inMotion$ = this._inMotionOperation$.pipe(\n distinctUntilChanged(),\n publishReplay(1),\n refCount());\n\n this._inTranslationOperation$ = new Subject<boolean>();\n\n nodeChanged$.pipe(\n map(\n (frame: IFrame): boolean => {\n return true;\n }))\n .subscribe(this._inTranslationOperation$);\n\n this._inTranslationOperation$.pipe(\n distinctUntilChanged(),\n filter(\n (inTranslation: boolean): boolean => {\n return inTranslation;\n }),\n switchMap(\n (inTranslation: boolean): Observable<boolean> => {\n return this._currentState$.pipe(\n filter(\n (frame: IFrame): boolean => {\n return frame.state.nodesAhead === 0;\n }),\n map(\n (frame: IFrame): THREE.Vector3 => {\n return frame.state.camera.position.clone();\n }),\n pairwise(),\n map(\n (pair: [THREE.Vector3, THREE.Vector3]): boolean => {\n return pair[0].distanceToSquared(pair[1]) !== 0;\n }),\n first(\n (changed: boolean): boolean => {\n return !changed;\n }));\n }))\n .subscribe(this._inTranslationOperation$);\n\n this._inTranslation$ = this._inTranslationOperation$.pipe(\n distinctUntilChanged(),\n publishReplay(1),\n refCount());\n\n this._state$.subscribe(() => { /*noop*/ });\n this._currentNode$.subscribe(() => { /*noop*/ });\n this._currentCamera$.subscribe(() => { /*noop*/ });\n this._currentTransform$.subscribe(() => { /*noop*/ });\n this._reference$.subscribe(() => { /*noop*/ });\n this._currentNodeExternal$.subscribe(() => { /*noop*/ });\n this._lastState$.subscribe(() => { /*noop*/ });\n this._inMotion$.subscribe(() => { /*noop*/ });\n this._inTranslation$.subscribe(() => { /*noop*/ });\n\n this._frameId = null;\n this._frameGenerator = new FrameGenerator(window);\n }\n\n public get currentState$(): Observable<IFrame> {\n return this._currentState$;\n }\n\n public get currentNode$(): Observable<Node> {\n return this._currentNode$;\n }\n\n public get currentKey$(): Observable<string> {\n return this._currentKey$;\n }\n\n public get currentNodeExternal$(): Observable<Node> {\n return this._currentNodeExternal$;\n }\n\n public get currentCamera$(): Observable<Camera> {\n return this._currentCamera$;\n }\n\n public get currentTransform$(): Observable<Transform> {\n return this._currentTransform$;\n }\n\n public get state$(): Observable<State> {\n return this._state$;\n }\n\n public get reference$(): Observable<ILatLonAlt> {\n return this._reference$;\n }\n\n public get inMotion$(): Observable<boolean> {\n return this._inMotion$;\n }\n\n public get inTranslation$(): Observable<boolean> {\n return this._inTranslation$;\n }\n\n public get appendNode$(): Subject<Node> {\n return this._appendNode$;\n }\n\n public earth(): void {\n this._inMotionOperation$.next(true);\n this._invokeContextOperation((context: IStateContext) => { context.earth(); });\n }\n\n public traverse(): void {\n this._inMotionOperation$.next(true);\n this._invokeContextOperation((context: IStateContext) => { context.traverse(); });\n }\n\n public wait(): void {\n this._invokeContextOperation((context: IStateContext) => { context.wait(); });\n }\n\n public waitInteractively(): void {\n this._invokeContextOperation((context: IStateContext) => { context.waitInteractively(); });\n }\n\n public appendNodes(nodes: Node[]): void {\n this._invokeContextOperation((context: IStateContext) => { context.append(nodes); });\n }\n\n public prependNodes(nodes: Node[]): void {\n this._invokeContextOperation((context: IStateContext) => { context.prepend(nodes); });\n }\n\n public removeNodes(n: number): void {\n this._invokeContextOperation((context: IStateContext) => { context.remove(n); });\n }\n\n public clearNodes(): void {\n this._invokeContextOperation((context: IStateContext) => { context.clear(); });\n }\n\n public clearPriorNodes(): void {\n this._invokeContextOperation((context: IStateContext) => { context.clearPrior(); });\n }\n\n public cutNodes(): void {\n this._invokeContextOperation((context: IStateContext) => { context.cut(); });\n }\n\n public setNodes(nodes: Node[]): void {\n this._invokeContextOperation((context: IStateContext) => { context.set(nodes); });\n }\n\n public rotate(delta: IRotation): void {\n this._inMotionOperation$.next(true);\n this._invokeContextOperation((context: IStateContext) => { context.rotate(delta); });\n }\n\n public rotateUnbounded(delta: IRotation): void {\n this._inMotionOperation$.next(true);\n this._invokeContextOperation((context: IStateContext) => { context.rotateUnbounded(delta); });\n }\n\n public rotateWithoutInertia(delta: IRotation): void {\n this._inMotionOperation$.next(true);\n this._invokeContextOperation((context: IStateContext) => { context.rotateWithoutInertia(delta); });\n }\n\n public rotateBasic(basicRotation: number[]): void {\n this._inMotionOperation$.next(true);\n this._invokeContextOperation((context: IStateContext) => { context.rotateBasic(basicRotation); });\n }\n\n public rotateBasicUnbounded(basicRotation: number[]): void {\n this._inMotionOperation$.next(true);\n this._invokeContextOperation((context: IStateContext) => { context.rotateBasicUnbounded(basicRotation); });\n }\n\n public rotateBasicWithoutInertia(basicRotation: number[]): void {\n this._inMotionOperation$.next(true);\n this._invokeContextOperation((context: IStateContext) => { context.rotateBasicWithoutInertia(basicRotation); });\n }\n\n public rotateToBasic(basic: number[]): void {\n this._inMotionOperation$.next(true);\n this._invokeContextOperation((context: IStateContext) => { context.rotateToBasic(basic); });\n }\n\n public move(delta: number): void {\n this._inMotionOperation$.next(true);\n this._invokeContextOperation((context: IStateContext) => { context.move(delta); });\n }\n\n public moveTo(position: number): void {\n this._inMotionOperation$.next(true);\n this._invokeContextOperation((context: IStateContext) => { context.moveTo(position); });\n }\n\n public dolly(delta: number): void {\n this._inMotionOperation$.next(true);\n this._invokeContextOperation((context: IStateContext) => { context.dolly(delta); });\n }\n\n public orbit(rotation: IRotation): void {\n this._inMotionOperation$.next(true);\n this._invokeContextOperation((context: IStateContext) => { context.orbit(rotation); });\n }\n\n public truck(direction: number[]): void {\n this._inMotionOperation$.next(true);\n this._invokeContextOperation((context: IStateContext) => { context.truck(direction); });\n }\n\n /**\n * Change zoom level while keeping the reference point position approximately static.\n *\n * @parameter {number} delta - Change in zoom level.\n * @parameter {Array<number>} reference - Reference point in basic coordinates.\n */\n public zoomIn(delta: number, reference: number[]): void {\n this._inMotionOperation$.next(true);\n this._invokeContextOperation((context: IStateContext) => { context.zoomIn(delta, reference); });\n }\n\n public getCenter(): Observable<number[]> {\n return this._lastState$.pipe(\n first(),\n map(\n (frame: IFrame): number[] => {\n return (<IStateContext>frame.state).getCenter();\n }));\n }\n\n public getZoom(): Observable<number> {\n return this._lastState$.pipe(\n first(),\n map(\n (frame: IFrame): number => {\n return frame.state.zoom;\n }));\n }\n\n public setCenter(center: number[]): void {\n this._inMotionOperation$.next(true);\n this._invokeContextOperation((context: IStateContext) => { context.setCenter(center); });\n }\n\n public setSpeed(speed: number): void {\n this._invokeContextOperation((context: IStateContext) => { context.setSpeed(speed); });\n }\n\n public setTransitionMode(mode: TransitionMode): void {\n this._invokeContextOperation((context: IStateContext) => { context.setTransitionMode(mode); });\n }\n\n public setZoom(zoom: number): void {\n this._inMotionOperation$.next(true);\n this._invokeContextOperation((context: IStateContext) => { context.setZoom(zoom); });\n }\n\n public start(): void {\n if (this._frameId == null) {\n this._start$.next(null);\n this._frameId = this._frameGenerator.requestAnimationFrame(this._frame.bind(this));\n this._frame$.next(this._frameId);\n }\n }\n\n public stop(): void {\n if (this._frameId != null) {\n this._frameGenerator.cancelAnimationFrame(this._frameId);\n this._frameId = null;\n }\n }\n\n private _invokeContextOperation(action: (context: IStateContext) => void): void {\n this._contextOperation$\n .next(\n (context: IStateContext): IStateContext => {\n action(context);\n\n return context;\n });\n }\n\n private _frame(time: number): void {\n this._frameId = this._frameGenerator.requestAnimationFrame(this._frame.bind(this));\n this._frame$.next(this._frameId);\n }\n}\n",
+ "/**\n * Enumeration for transition mode\n * @enum {number}\n * @readonly\n * @description Modes for specifying how transitions\n * between nodes are performed.\n */\nexport enum TransitionMode {\n /**\n * Default transitions.\n *\n * @description The viewer dynamically determines\n * whether transitions should be performed with or\n * without motion and blending for each transition\n * based on the underlying data.\n */\n Default,\n\n /**\n * Instantaneous transitions.\n *\n * @description All transitions are performed\n * without motion or blending.\n */\n Instantaneous,\n}\n\nexport default TransitionMode;\n",
+ "import * as THREE from \"three\";\n\nimport {\n InteractiveWaitingState,\n IRotation,\n IState,\n StateBase,\n TraversingState,\n WaitingState,\n} from \"../../State\";\nimport {\n Camera,\n} from \"../../Geo\";\n\nexport class EarthState extends StateBase {\n constructor(state: IState) {\n super(state);\n\n const viewingDirection: THREE.Vector3 = this._camera.lookat\n .clone()\n .sub(this._camera.position)\n .normalize();\n\n this._camera.lookat.copy(this._camera.position);\n this._camera.position.z = state.camera.position.z + 20;\n this._camera.position.x = state.camera.position.x - 16 * viewingDirection.x;\n this._camera.position.y = state.camera.position.y - 16 * viewingDirection.y;\n this._camera.up.set(0, 0, 1);\n }\n\n public traverse(): StateBase {\n return new TraversingState(this);\n }\n\n public wait(): StateBase {\n return new WaitingState(this);\n }\n\n public waitInteractively(): StateBase {\n return new InteractiveWaitingState(this);\n }\n\n public dolly(delta: number): void {\n const camera: Camera = this._camera;\n const offset: THREE.Vector3 = new THREE.Vector3()\n .copy(camera.position)\n .sub(camera.lookat);\n\n const length: number = offset.length();\n const scaled: number = length * Math.pow(2, -delta);\n const clipped: number = Math.max(1, Math.min(scaled, 1000));\n\n offset.normalize();\n offset.multiplyScalar(clipped);\n\n camera.position.copy(camera.lookat).add(offset);\n }\n\n public orbit(rotation: IRotation): void {\n const camera: Camera = this._camera;\n const q: THREE.Quaternion = new THREE.Quaternion().setFromUnitVectors(camera.up, new THREE.Vector3( 0, 0, 1 ));\n const qInverse: THREE.Quaternion = q.clone().inverse();\n\n const offset: THREE.Vector3 = new THREE.Vector3();\n offset.copy(camera.position).sub(camera.lookat);\n offset.applyQuaternion(q);\n const length: number = offset.length();\n\n let phi: number = Math.atan2(offset.y, offset.x);\n phi += rotation.phi;\n\n let theta: number = Math.atan2(Math.sqrt(offset.x * offset.x + offset.y * offset.y), offset.z);\n theta += rotation.theta;\n theta = Math.max(0.1, Math.min(Math.PI - 0.1, theta));\n\n offset.x = Math.sin(theta) * Math.cos(phi);\n offset.y = Math.sin(theta) * Math.sin(phi);\n offset.z = Math.cos(theta);\n offset.applyQuaternion(qInverse);\n\n camera.position.copy(camera.lookat).add(offset.multiplyScalar(length));\n }\n\n public truck(direction: number[]): void {\n this._camera.position.add(new THREE.Vector3().fromArray(direction));\n this._camera.lookat.add(new THREE.Vector3().fromArray(direction));\n }\n\n public update(): void { /*noop*/ }\n}\n\nexport default EarthState;\n",
+ "import * as THREE from \"three\";\n\nimport {\n IGPano,\n} from \"../../API\";\nimport {\n Camera,\n Transform,\n} from \"../../Geo\";\nimport {\n Node,\n} from \"../../Graph\";\nimport {\n IRotation,\n IState,\n RotationDelta,\n StateBase,\n} from \"../../State\";\n\nexport abstract class InteractiveStateBase extends StateBase {\n /**\n * Animation speed in transitions per frame at 60 FPS. Run time\n * animation speed is adjusted to FPS.\n */\n protected _animationSpeed: number;\n\n protected _rotationDelta: RotationDelta;\n protected _requestedRotationDelta: RotationDelta;\n\n protected _basicRotation: number[];\n protected _requestedBasicRotation: number[];\n protected _requestedBasicRotationUnbounded: number[];\n\n protected _rotationAcceleration: number;\n protected _rotationIncreaseAlpha: number;\n protected _rotationDecreaseAlpha: number;\n protected _rotationThreshold: number;\n protected _unboundedRotationAlpha: number;\n\n protected _desiredZoom: number;\n protected _minZoom: number;\n protected _maxZoom: number;\n protected _lookatDepth: number;\n protected _desiredLookat: THREE.Vector3;\n protected _desiredCenter: number[];\n\n constructor(state: IState) {\n super(state);\n\n this._animationSpeed = 1 / 40;\n\n this._rotationDelta = new RotationDelta(0, 0);\n this._requestedRotationDelta = null;\n\n this._basicRotation = [0, 0];\n this._requestedBasicRotation = null;\n this._requestedBasicRotationUnbounded = null;\n\n this._rotationAcceleration = 0.86;\n this._rotationIncreaseAlpha = 0.97;\n this._rotationDecreaseAlpha = 0.9;\n this._rotationThreshold = 1e-3;\n this._unboundedRotationAlpha = 0.8;\n\n this._desiredZoom = state.zoom;\n this._minZoom = 0;\n this._maxZoom = 3;\n this._lookatDepth = 10;\n\n this._desiredLookat = null;\n this._desiredCenter = null;\n }\n\n public rotate(rotationDelta: IRotation): void {\n if (this._currentNode == null) {\n return;\n }\n\n if (rotationDelta.phi === 0 && rotationDelta.theta === 0) {\n return;\n }\n\n this._desiredZoom = this._zoom;\n this._desiredLookat = null;\n this._requestedBasicRotation = null;\n\n if (this._requestedRotationDelta != null) {\n this._requestedRotationDelta.phi = this._requestedRotationDelta.phi + rotationDelta.phi;\n this._requestedRotationDelta.theta = this._requestedRotationDelta.theta + rotationDelta.theta;\n } else {\n this._requestedRotationDelta = new RotationDelta(rotationDelta.phi, rotationDelta.theta);\n }\n }\n\n public rotateUnbounded(delta: IRotation): void {\n if (this._currentNode == null) {\n return;\n }\n\n this._requestedBasicRotation = null;\n this._requestedRotationDelta = null;\n\n this._applyRotation(delta, this._currentCamera);\n this._applyRotation(delta, this._previousCamera);\n\n if (!this._desiredLookat) {\n return;\n }\n\n const q: THREE.Quaternion = new THREE.Quaternion().setFromUnitVectors(this._currentCamera.up, new THREE.Vector3(0, 0, 1));\n const qInverse: THREE.Quaternion = q.clone().inverse();\n\n const offset: THREE.Vector3 = new THREE.Vector3()\n .copy(this._desiredLookat)\n .sub(this._camera.position)\n .applyQuaternion(q);\n\n const length: number = offset.length();\n\n let phi: number = Math.atan2(offset.y, offset.x);\n phi += delta.phi;\n\n let theta: number = Math.atan2(Math.sqrt(offset.x * offset.x + offset.y * offset.y), offset.z);\n theta += delta.theta;\n theta = Math.max(0.1, Math.min(Math.PI - 0.1, theta));\n\n offset.x = Math.sin(theta) * Math.cos(phi);\n offset.y = Math.sin(theta) * Math.sin(phi);\n offset.z = Math.cos(theta);\n\n offset.applyQuaternion(qInverse);\n\n this._desiredLookat\n .copy(this._camera.position)\n .add(offset.multiplyScalar(length));\n }\n\n public rotateWithoutInertia(rotationDelta: IRotation): void {\n if (this._currentNode == null) {\n return;\n }\n\n this._desiredZoom = this._zoom;\n this._desiredLookat = null;\n this._requestedBasicRotation = null;\n this._requestedRotationDelta = null;\n\n const threshold: number = Math.PI / (10 * Math.pow(2, this._zoom));\n const delta: IRotation = {\n phi: this._spatial.clamp(rotationDelta.phi, -threshold, threshold),\n theta: this._spatial.clamp(rotationDelta.theta, -threshold, threshold),\n };\n\n this._applyRotation(delta, this._currentCamera);\n this._applyRotation(delta, this._previousCamera);\n }\n\n public rotateBasic(basicRotation: number[]): void {\n if (this._currentNode == null) {\n return;\n }\n\n this._desiredZoom = this._zoom;\n this._desiredLookat = null;\n this._requestedRotationDelta = null;\n\n if (this._requestedBasicRotation != null) {\n this._requestedBasicRotation[0] += basicRotation[0];\n this._requestedBasicRotation[1] += basicRotation[1];\n\n let threshold: number = 0.05 / Math.pow(2, this._zoom);\n\n this._requestedBasicRotation[0] =\n this._spatial.clamp(this._requestedBasicRotation[0], -threshold, threshold);\n\n this._requestedBasicRotation[1] =\n this._spatial.clamp(this._requestedBasicRotation[1], -threshold, threshold);\n } else {\n this._requestedBasicRotation = basicRotation.slice();\n }\n }\n\n public rotateBasicUnbounded(basicRotation: number[]): void {\n if (this._currentNode == null) {\n return;\n }\n\n if (this._requestedBasicRotationUnbounded != null) {\n this._requestedBasicRotationUnbounded[0] += basicRotation[0];\n this._requestedBasicRotationUnbounded[1] += basicRotation[1];\n } else {\n this._requestedBasicRotationUnbounded = basicRotation.slice();\n }\n }\n\n public rotateBasicWithoutInertia(basic: number[]): void {\n if (this._currentNode == null) {\n return;\n }\n\n this._desiredZoom = this._zoom;\n this._desiredLookat = null;\n this._requestedRotationDelta = null;\n this._requestedBasicRotation = null;\n\n const threshold: number = 0.05 / Math.pow(2, this._zoom);\n\n const basicRotation: number[] = basic.slice();\n basicRotation[0] = this._spatial.clamp(basicRotation[0], -threshold, threshold);\n basicRotation[1] = this._spatial.clamp(basicRotation[1], -threshold, threshold);\n\n this._applyRotationBasic(basicRotation);\n }\n\n public rotateToBasic(basic: number[]): void {\n if (this._currentNode == null) {\n return;\n }\n\n this._desiredZoom = this._zoom;\n this._desiredLookat = null;\n\n basic[0] = this._spatial.clamp(basic[0], 0, 1);\n basic[1] = this._spatial.clamp(basic[1], 0, 1);\n\n let lookat: number[] = this.currentTransform.unprojectBasic(basic, this._lookatDepth);\n this._currentCamera.lookat.fromArray(lookat);\n }\n\n public zoomIn(delta: number, reference: number[]): void {\n if (this._currentNode == null) {\n return;\n }\n\n this._desiredZoom = Math.max(this._minZoom, Math.min(this._maxZoom, this._desiredZoom + delta));\n\n let currentCenter: number[] = this.currentTransform.projectBasic(\n this._currentCamera.lookat.toArray());\n\n let currentCenterX: number = currentCenter[0];\n let currentCenterY: number = currentCenter[1];\n\n let zoom0: number = Math.pow(2, this._zoom);\n let zoom1: number = Math.pow(2, this._desiredZoom);\n\n let refX: number = reference[0];\n let refY: number = reference[1];\n\n if (this.currentTransform.gpano != null &&\n this.currentTransform.gpano.CroppedAreaImageWidthPixels === this.currentTransform.gpano.FullPanoWidthPixels) {\n if (refX - currentCenterX > 0.5) {\n refX = refX - 1;\n } else if (currentCenterX - refX > 0.5) {\n refX = 1 + refX;\n }\n }\n\n let newCenterX: number = refX - zoom0 / zoom1 * (refX - currentCenterX);\n let newCenterY: number = refY - zoom0 / zoom1 * (refY - currentCenterY);\n\n let gpano: IGPano = this.currentTransform.gpano;\n\n if (this._currentNode.fullPano) {\n newCenterX = this._spatial.wrap(newCenterX + this._basicRotation[0], 0, 1);\n newCenterY = this._spatial.clamp(newCenterY + this._basicRotation[1], 0.05, 0.95);\n } else if (gpano != null &&\n this.currentTransform.gpano.CroppedAreaImageWidthPixels === this.currentTransform.gpano.FullPanoWidthPixels) {\n newCenterX = this._spatial.wrap(newCenterX + this._basicRotation[0], 0, 1);\n newCenterY = this._spatial.clamp(newCenterY + this._basicRotation[1], 0, 1);\n } else {\n newCenterX = this._spatial.clamp(newCenterX, 0, 1);\n newCenterY = this._spatial.clamp(newCenterY, 0, 1);\n }\n\n this._desiredLookat = new THREE.Vector3()\n .fromArray(this.currentTransform.unprojectBasic([newCenterX, newCenterY], this._lookatDepth));\n }\n\n public setCenter(center: number[]): void {\n this._desiredLookat = null;\n this._requestedRotationDelta = null;\n this._requestedBasicRotation = null;\n this._desiredZoom = this._zoom;\n\n let clamped: number[] = [\n this._spatial.clamp(center[0], 0, 1),\n this._spatial.clamp(center[1], 0, 1),\n ];\n\n if (this._currentNode == null) {\n this._desiredCenter = clamped;\n return;\n }\n\n this._desiredCenter = null;\n\n let currentLookat: THREE.Vector3 = new THREE.Vector3()\n .fromArray(this.currentTransform.unprojectBasic(clamped, this._lookatDepth));\n\n let previousTransform: Transform = this.previousTransform != null ?\n this.previousTransform :\n this.currentTransform;\n let previousLookat: THREE.Vector3 = new THREE.Vector3()\n .fromArray(previousTransform.unprojectBasic(clamped, this._lookatDepth));\n\n this._currentCamera.lookat.copy(currentLookat);\n this._previousCamera.lookat.copy(previousLookat);\n }\n\n public setZoom(zoom: number): void {\n this._desiredLookat = null;\n this._requestedRotationDelta = null;\n this._requestedBasicRotation = null;\n\n this._zoom = this._spatial.clamp(zoom, this._minZoom, this._maxZoom);\n this._desiredZoom = this._zoom;\n }\n\n protected _applyRotation(delta: IRotation, camera: Camera): void {\n if (camera == null) {\n return;\n }\n\n let q: THREE.Quaternion = new THREE.Quaternion().setFromUnitVectors(camera.up, new THREE.Vector3(0, 0, 1));\n let qInverse: THREE.Quaternion = q.clone().inverse();\n\n let offset: THREE.Vector3 = new THREE.Vector3();\n offset.copy(camera.lookat).sub(camera.position);\n offset.applyQuaternion(q);\n let length: number = offset.length();\n\n let phi: number = Math.atan2(offset.y, offset.x);\n phi += delta.phi;\n\n let theta: number = Math.atan2(Math.sqrt(offset.x * offset.x + offset.y * offset.y), offset.z);\n theta += delta.theta;\n theta = Math.max(0.1, Math.min(Math.PI - 0.1, theta));\n\n offset.x = Math.sin(theta) * Math.cos(phi);\n offset.y = Math.sin(theta) * Math.sin(phi);\n offset.z = Math.cos(theta);\n offset.applyQuaternion(qInverse);\n\n camera.lookat.copy(camera.position).add(offset.multiplyScalar(length));\n }\n\n protected _applyRotationBasic(basicRotation: number[]): void {\n let currentNode: Node = this._currentNode;\n let previousNode: Node = this._previousNode != null ?\n this.previousNode :\n this.currentNode;\n\n let currentCamera: Camera = this._currentCamera;\n let previousCamera: Camera = this._previousCamera;\n\n let currentTransform: Transform = this.currentTransform;\n let previousTransform: Transform = this.previousTransform != null ?\n this.previousTransform :\n this.currentTransform;\n\n let currentBasic: number[] = currentTransform.projectBasic(currentCamera.lookat.toArray());\n let previousBasic: number[] = previousTransform.projectBasic(previousCamera.lookat.toArray());\n\n let currentGPano: IGPano = currentTransform.gpano;\n let previousGPano: IGPano = previousTransform.gpano;\n\n if (currentNode.fullPano) {\n currentBasic[0] = this._spatial.wrap(currentBasic[0] + basicRotation[0], 0, 1);\n currentBasic[1] = this._spatial.clamp(currentBasic[1] + basicRotation[1], 0.05, 0.95);\n } else if (currentGPano != null &&\n currentTransform.gpano.CroppedAreaImageWidthPixels === currentTransform.gpano.FullPanoWidthPixels) {\n currentBasic[0] = this._spatial.wrap(currentBasic[0] + basicRotation[0], 0, 1);\n currentBasic[1] = this._spatial.clamp(currentBasic[1] + basicRotation[1], 0, 1);\n } else {\n currentBasic[0] = this._spatial.clamp(currentBasic[0] + basicRotation[0], 0, 1);\n currentBasic[1] = this._spatial.clamp(currentBasic[1] + basicRotation[1], 0, 1);\n }\n\n if (previousNode.fullPano) {\n previousBasic[0] = this._spatial.wrap(previousBasic[0] + basicRotation[0], 0, 1);\n previousBasic[1] = this._spatial.clamp(previousBasic[1] + basicRotation[1], 0.05, 0.95);\n } else if (previousGPano != null &&\n previousTransform.gpano.CroppedAreaImageWidthPixels === previousTransform.gpano.FullPanoWidthPixels) {\n previousBasic[0] = this._spatial.wrap(previousBasic[0] + basicRotation[0], 0, 1);\n previousBasic[1] = this._spatial.clamp(previousBasic[1] + basicRotation[1], 0, 1);\n } else {\n previousBasic[0] = this._spatial.clamp(previousBasic[0] + basicRotation[0], 0, 1);\n previousBasic[1] = this._spatial.clamp(currentBasic[1] + basicRotation[1], 0, 1);\n }\n\n let currentLookat: number[] = currentTransform.unprojectBasic(currentBasic, this._lookatDepth);\n currentCamera.lookat.fromArray(currentLookat);\n\n let previousLookat: number[] = previousTransform.unprojectBasic(previousBasic, this._lookatDepth);\n previousCamera.lookat.fromArray(previousLookat);\n }\n\n protected _updateZoom(animationSpeed: number): void {\n let diff: number = this._desiredZoom - this._zoom;\n let sign: number = diff > 0 ? 1 : diff < 0 ? -1 : 0;\n\n if (diff === 0) {\n return;\n } else if (Math.abs(diff) < 2e-3) {\n this._zoom = this._desiredZoom;\n if (this._desiredLookat != null) {\n this._desiredLookat = null;\n }\n } else {\n this._zoom += sign * Math.max(Math.abs(5 * animationSpeed * diff), 2e-3);\n }\n }\n\n protected _updateLookat(animationSpeed: number): void {\n if (this._desiredLookat === null) {\n return;\n }\n\n let diff: number = this._desiredLookat.distanceToSquared(this._currentCamera.lookat);\n\n if (Math.abs(diff) < 1e-6) {\n this._currentCamera.lookat.copy(this._desiredLookat);\n this._desiredLookat = null;\n } else {\n this._currentCamera.lookat.lerp(this._desiredLookat, 5 * animationSpeed);\n }\n }\n\n protected _updateRotation(): void {\n if (this._requestedRotationDelta != null) {\n let length: number = this._rotationDelta.lengthSquared();\n let requestedLength: number = this._requestedRotationDelta.lengthSquared();\n\n if (requestedLength > length) {\n this._rotationDelta.lerp(this._requestedRotationDelta, this._rotationIncreaseAlpha);\n } else {\n this._rotationDelta.lerp(this._requestedRotationDelta, this._rotationDecreaseAlpha);\n }\n\n this._requestedRotationDelta = null;\n\n return;\n }\n\n if (this._rotationDelta.isZero) {\n return;\n }\n\n const alpha: number = this.currentNode.fullPano ? 1 : this._alpha;\n\n this._rotationDelta.multiply(this._rotationAcceleration * alpha);\n this._rotationDelta.threshold(this._rotationThreshold);\n }\n\n protected _updateRotationBasic(): void {\n if (this._requestedBasicRotation != null) {\n let x: number = this._basicRotation[0];\n let y: number = this._basicRotation[1];\n\n let reqX: number = this._requestedBasicRotation[0];\n let reqY: number = this._requestedBasicRotation[1];\n\n if (Math.abs(reqX) > Math.abs(x)) {\n this._basicRotation[0] = (1 - this._rotationIncreaseAlpha) * x + this._rotationIncreaseAlpha * reqX;\n } else {\n this._basicRotation[0] = (1 - this._rotationDecreaseAlpha) * x + this._rotationDecreaseAlpha * reqX;\n }\n\n if (Math.abs(reqY) > Math.abs(y)) {\n this._basicRotation[1] = (1 - this._rotationIncreaseAlpha) * y + this._rotationIncreaseAlpha * reqY;\n } else {\n this._basicRotation[1] = (1 - this._rotationDecreaseAlpha) * y + this._rotationDecreaseAlpha * reqY;\n }\n\n this._requestedBasicRotation = null;\n\n return;\n }\n\n if (this._requestedBasicRotationUnbounded != null) {\n let reqX: number = this._requestedBasicRotationUnbounded[0];\n let reqY: number = this._requestedBasicRotationUnbounded[1];\n\n if (Math.abs(reqX) > 0) {\n this._basicRotation[0] = (1 - this._unboundedRotationAlpha) * this._basicRotation[0] + this._unboundedRotationAlpha * reqX;\n }\n\n if (Math.abs(reqY) > 0) {\n this._basicRotation[1] = (1 - this._unboundedRotationAlpha) * this._basicRotation[1] + this._unboundedRotationAlpha * reqY;\n }\n\n if (this._desiredLookat != null) {\n let desiredBasicLookat: number[] = this.currentTransform.projectBasic(this._desiredLookat.toArray());\n\n desiredBasicLookat[0] += reqX;\n desiredBasicLookat[1] += reqY;\n\n this._desiredLookat = new THREE.Vector3()\n .fromArray(this.currentTransform.unprojectBasic(desiredBasicLookat, this._lookatDepth));\n }\n\n this._requestedBasicRotationUnbounded = null;\n }\n\n if (this._basicRotation[0] === 0 && this._basicRotation[1] === 0) {\n return;\n }\n\n this._basicRotation[0] = this._rotationAcceleration * this._basicRotation[0];\n this._basicRotation[1] = this._rotationAcceleration * this._basicRotation[1];\n\n if (Math.abs(this._basicRotation[0]) < this._rotationThreshold / Math.pow(2, this._zoom) &&\n Math.abs(this._basicRotation[1]) < this._rotationThreshold / Math.pow(2, this._zoom)) {\n this._basicRotation = [0, 0];\n }\n }\n\n protected _clearRotation(): void {\n if (this._currentNode.fullPano) {\n return;\n }\n\n if (this._requestedRotationDelta != null) {\n this._requestedRotationDelta = null;\n }\n\n if (!this._rotationDelta.isZero) {\n this._rotationDelta.reset();\n }\n\n if (this._requestedBasicRotation != null) {\n this._requestedBasicRotation = null;\n }\n\n if (this._basicRotation[0] > 0 || this._basicRotation[1] > 0) {\n this._basicRotation = [0, 0];\n }\n }\n\n protected _setDesiredCenter(): void {\n if (this._desiredCenter == null) {\n return;\n }\n\n let lookatDirection: THREE.Vector3 = new THREE.Vector3()\n .fromArray(this.currentTransform.unprojectBasic(this._desiredCenter, this._lookatDepth))\n .sub(this._currentCamera.position);\n\n this._currentCamera.lookat.copy(this._currentCamera.position.clone().add(lookatDirection));\n this._previousCamera.lookat.copy(this._previousCamera.position.clone().add(lookatDirection));\n\n this._desiredCenter = null;\n }\n\n protected _setDesiredZoom(): void {\n this._desiredZoom =\n this._currentNode.fullPano || this._previousNode == null ?\n this._zoom : 0;\n }\n}\n\nexport default InteractiveStateBase;\n",
+ "import {\n Node,\n} from \"../../Graph\";\nimport {\n IState,\n InteractiveStateBase,\n StateBase,\n TraversingState,\n WaitingState,\n} from \"../../State\";\n\nexport class InteractiveWaitingState extends InteractiveStateBase {\n constructor(state: IState) {\n super(state);\n\n this._adjustCameras();\n\n this._motionless = this._motionlessTransition();\n }\n\n public traverse(): StateBase {\n return new TraversingState(this);\n }\n\n public wait(): StateBase {\n return new WaitingState(this);\n }\n\n public prepend(nodes: Node[]): void {\n super.prepend(nodes);\n\n this._motionless = this._motionlessTransition();\n }\n\n public set(nodes: Node[]): void {\n super.set(nodes);\n\n this._motionless = this._motionlessTransition();\n }\n\n public move(delta: number): void {\n this._alpha = Math.max(0, Math.min(1, this._alpha + delta));\n }\n\n public moveTo(position: number): void {\n this._alpha = Math.max(0, Math.min(1, position));\n }\n\n public update(fps: number): void {\n this._updateRotation();\n if (!this._rotationDelta.isZero) {\n this._applyRotation(this._rotationDelta, this._previousCamera);\n this._applyRotation(this._rotationDelta, this._currentCamera);\n }\n\n this._updateRotationBasic();\n if (this._basicRotation[0] !== 0 || this._basicRotation[1] !== 0) {\n this._applyRotationBasic(this._basicRotation);\n }\n\n let animationSpeed: number = this._animationSpeed * (60 / fps);\n this._updateZoom(animationSpeed);\n this._updateLookat(animationSpeed);\n\n this._camera.lerpCameras(this._previousCamera, this._currentCamera, this.alpha);\n }\n\n protected _getAlpha(): number {\n return this._motionless ? Math.round(this._alpha) : this._alpha;\n }\n\n protected _setCurrentCamera(): void {\n super._setCurrentCamera();\n\n this._adjustCameras();\n }\n\n private _adjustCameras(): void {\n if (this._previousNode == null) {\n return;\n }\n\n if (this._currentNode.fullPano) {\n let lookat: THREE.Vector3 = this._camera.lookat.clone().sub(this._camera.position);\n this._currentCamera.lookat.copy(lookat.clone().add(this._currentCamera.position));\n }\n\n if (this._previousNode.fullPano) {\n let lookat: THREE.Vector3 = this._currentCamera.lookat.clone().sub(this._currentCamera.position);\n this._previousCamera.lookat.copy(lookat.clone().add(this._previousCamera.position));\n }\n }\n}\n\nexport default InteractiveWaitingState;\n",
+ "import {ArgumentMapillaryError} from \"../../Error\";\nimport {Node} from \"../../Graph\";\nimport {\n Camera,\n Geo,\n GeoCoords,\n ILatLonAlt,\n Transform,\n Spatial,\n} from \"../../Geo\";\nimport {\n IRotation,\n IState,\n TransitionMode,\n} from \"../../State\";\n\nexport abstract class StateBase implements IState {\n protected _spatial: Spatial;\n protected _geoCoords: GeoCoords;\n\n protected _reference: ILatLonAlt;\n\n protected _alpha: number;\n protected _camera: Camera;\n protected _zoom: number;\n\n protected _currentIndex: number;\n\n protected _trajectory: Node[];\n protected _currentNode: Node;\n protected _previousNode: Node;\n\n protected _trajectoryTransforms: Transform[];\n\n protected _trajectoryCameras: Camera[];\n protected _currentCamera: Camera;\n protected _previousCamera: Camera;\n\n protected _motionless: boolean;\n\n private _referenceThreshold: number;\n private _transitionMode: TransitionMode;\n\n constructor(state: IState) {\n this._spatial = new Spatial();\n this._geoCoords = new GeoCoords();\n\n this._referenceThreshold = 0.01;\n this._transitionMode = state.transitionMode;\n\n this._reference = state.reference;\n\n this._alpha = state.alpha;\n this._camera = state.camera.clone();\n this._zoom = state.zoom;\n\n this._currentIndex = state.currentIndex;\n\n this._trajectory = state.trajectory.slice();\n this._trajectoryTransforms = [];\n this._trajectoryCameras = [];\n\n for (let node of this._trajectory) {\n let translation: number[] = this._nodeToTranslation(node, this._reference);\n let transform: Transform = new Transform(\n node.orientation,\n node.width,\n node.height,\n node.focal,\n node.scale,\n node.gpano,\n node.rotation,\n translation,\n node.image,\n undefined,\n node.ck1,\n node.ck2,\n node.cameraProjection);\n\n this._trajectoryTransforms.push(transform);\n this._trajectoryCameras.push(new Camera(transform));\n }\n\n this._currentNode = this._trajectory.length > 0 ?\n this._trajectory[this._currentIndex] :\n null;\n\n this._previousNode = this._trajectory.length > 1 && this.currentIndex > 0 ?\n this._trajectory[this._currentIndex - 1] :\n null;\n\n this._currentCamera = this._trajectoryCameras.length > 0 ?\n this._trajectoryCameras[this._currentIndex].clone() :\n new Camera();\n\n this._previousCamera = this._trajectoryCameras.length > 1 && this.currentIndex > 0 ?\n this._trajectoryCameras[this._currentIndex - 1].clone() :\n this._currentCamera.clone();\n }\n\n public get reference(): ILatLonAlt {\n return this._reference;\n }\n\n public get alpha(): number {\n return this._getAlpha();\n }\n\n public get camera(): Camera {\n return this._camera;\n }\n\n public get zoom(): number {\n return this._zoom;\n }\n\n public get trajectory(): Node[] {\n return this._trajectory;\n }\n\n public get currentIndex(): number {\n return this._currentIndex;\n }\n\n public get currentNode(): Node {\n return this._currentNode;\n }\n\n public get previousNode(): Node {\n return this._previousNode;\n }\n\n public get currentCamera(): Camera {\n return this._currentCamera;\n }\n\n public get currentTransform(): Transform {\n return this._trajectoryTransforms.length > 0 ?\n this._trajectoryTransforms[this.currentIndex] : null;\n }\n\n public get previousTransform(): Transform {\n return this._trajectoryTransforms.length > 1 && this.currentIndex > 0 ?\n this._trajectoryTransforms[this.currentIndex - 1] : null;\n }\n\n public get motionless(): boolean {\n return this._motionless;\n }\n\n public get transitionMode(): TransitionMode {\n return this._transitionMode;\n }\n\n public earth(): StateBase { throw new Error(\"Not implemented\"); }\n\n public traverse(): StateBase { throw new Error(\"Not implemented\"); }\n\n public wait(): StateBase { throw new Error(\"Not implemented\"); }\n\n public waitInteractively(): StateBase { throw new Error(\"Not implemented\"); }\n\n public move(delta: number): void { /*noop*/ }\n\n public moveTo(position: number): void { /*noop*/ }\n\n public rotate(delta: IRotation): void { /*noop*/ }\n\n public rotateUnbounded(delta: IRotation): void { /*noop*/ }\n\n public rotateWithoutInertia(delta: IRotation): void { /*noop*/ }\n\n public rotateBasic(basicRotation: number[]): void { /*noop*/ }\n\n public rotateBasicUnbounded(basicRotation: number[]): void { /*noop*/ }\n\n public rotateBasicWithoutInertia(basicRotation: number[]): void { /*noop*/ }\n\n public rotateToBasic(basic: number[]): void { /*noop*/ }\n\n public setSpeed(speed: number): void { /*noop*/ }\n\n public zoomIn(delta: number, reference: number[]): void { /*noop*/ }\n\n public update(fps: number): void { /*noop*/ }\n\n public setCenter(center: number[]): void { /*noop*/ }\n\n public setZoom(zoom: number): void { /*noop*/ }\n\n public dolly(delta: number): void { /*noop*/ }\n\n public orbit(rotation: IRotation): void { /*noop*/ }\n\n public truck(direction: number[]): void { /*noop*/ }\n\n public append(nodes: Node[]): void {\n if (nodes.length < 1) {\n throw Error(\"Trajectory can not be empty\");\n }\n\n if (this._currentIndex < 0) {\n this.set(nodes);\n } else {\n this._trajectory = this._trajectory.concat(nodes);\n this._appendToTrajectories(nodes);\n }\n }\n\n public prepend(nodes: Node[]): void {\n if (nodes.length < 1) {\n throw Error(\"Trajectory can not be empty\");\n }\n\n this._trajectory = nodes.slice().concat(this._trajectory);\n this._currentIndex += nodes.length;\n\n this._setCurrentNode();\n\n let referenceReset: boolean = this._setReference(this._currentNode);\n if (referenceReset) {\n this._setTrajectories();\n } else {\n this._prependToTrajectories(nodes);\n }\n\n this._setCurrentCamera();\n }\n\n public remove(n: number): void {\n if (n < 0) {\n throw Error(\"n must be a positive integer\");\n }\n\n if (this._currentIndex - 1 < n) {\n throw Error(\"Current and previous nodes can not be removed\");\n }\n\n for (let i: number = 0; i < n; i++) {\n this._trajectory.shift();\n this._trajectoryTransforms.shift();\n this._trajectoryCameras.shift();\n this._currentIndex--;\n }\n\n this._setCurrentNode();\n }\n\n public clearPrior(): void {\n if (this._currentIndex > 0) {\n this.remove(this._currentIndex - 1);\n }\n }\n\n public clear(): void {\n this.cut();\n\n if (this._currentIndex > 0) {\n this.remove(this._currentIndex - 1);\n }\n }\n\n public cut(): void {\n while (this._trajectory.length - 1 > this._currentIndex) {\n this._trajectory.pop();\n this._trajectoryTransforms.pop();\n this._trajectoryCameras.pop();\n }\n }\n\n public set(nodes: Node[]): void {\n this._setTrajectory(nodes);\n this._setCurrentNode();\n this._setReference(this._currentNode);\n this._setTrajectories();\n this._setCurrentCamera();\n }\n\n public getCenter(): number[] {\n return this._currentNode != null ?\n this.currentTransform.projectBasic(this._camera.lookat.toArray()) :\n [0.5, 0.5];\n }\n\n public setTransitionMode(mode: TransitionMode): void {\n this._transitionMode = mode;\n }\n\n protected _getAlpha(): number { return 1; }\n\n protected _setCurrent(): void {\n this._setCurrentNode();\n\n let referenceReset: boolean = this._setReference(this._currentNode);\n if (referenceReset) {\n this._setTrajectories();\n }\n\n this._setCurrentCamera();\n }\n\n protected _setCurrentCamera(): void {\n this._currentCamera = this._trajectoryCameras[this._currentIndex].clone();\n this._previousCamera = this._currentIndex > 0 ?\n this._trajectoryCameras[this._currentIndex - 1].clone() :\n this._currentCamera.clone();\n }\n\n protected _motionlessTransition(): boolean {\n let nodesSet: boolean = this._currentNode != null && this._previousNode != null;\n\n return nodesSet && (\n this._transitionMode === TransitionMode.Instantaneous || !(\n this._currentNode.merged &&\n this._previousNode.merged &&\n this._withinOriginalDistance() &&\n this._sameConnectedComponent()\n ));\n }\n\n private _setReference(node: Node): boolean {\n // do not reset reference if node is within threshold distance\n if (Math.abs(node.latLon.lat - this.reference.lat) < this._referenceThreshold &&\n Math.abs(node.latLon.lon - this.reference.lon) < this._referenceThreshold) {\n return false;\n }\n\n // do not reset reference if previous node exist and transition is with motion\n if (this._previousNode != null && !this._motionlessTransition()) {\n return false;\n }\n\n this._reference.lat = node.latLon.lat;\n this._reference.lon = node.latLon.lon;\n this._reference.alt = node.alt;\n\n return true;\n }\n\n private _setCurrentNode(): void {\n this._currentNode = this._trajectory.length > 0 ?\n this._trajectory[this._currentIndex] :\n null;\n\n this._previousNode = this._currentIndex > 0 ?\n this._trajectory[this._currentIndex - 1] :\n null;\n }\n\n private _setTrajectory(nodes: Node[]): void {\n if (nodes.length < 1) {\n throw new ArgumentMapillaryError(\"Trajectory can not be empty\");\n }\n\n if (this._currentNode != null) {\n this._trajectory = [this._currentNode].concat(nodes);\n this._currentIndex = 1;\n } else {\n this._trajectory = nodes.slice();\n this._currentIndex = 0;\n }\n }\n\n private _setTrajectories(): void {\n this._trajectoryTransforms.length = 0;\n this._trajectoryCameras.length = 0;\n\n this._appendToTrajectories(this._trajectory);\n }\n\n private _appendToTrajectories(nodes: Node[]): void {\n for (let node of nodes) {\n if (!node.assetsCached) {\n throw new ArgumentMapillaryError(\"Assets must be cached when node is added to trajectory\");\n }\n\n let translation: number[] = this._nodeToTranslation(node, this.reference);\n let transform: Transform = new Transform(\n node.orientation,\n node.width,\n node.height,\n node.focal,\n node.scale,\n node.gpano,\n node.rotation,\n translation,\n node.image,\n undefined,\n node.ck1,\n node.ck2,\n node.cameraProjection);\n\n this._trajectoryTransforms.push(transform);\n this._trajectoryCameras.push(new Camera(transform));\n }\n }\n\n private _prependToTrajectories(nodes: Node[]): void {\n for (let node of nodes.reverse()) {\n if (!node.assetsCached) {\n throw new ArgumentMapillaryError(\"Assets must be cached when added to trajectory\");\n }\n\n let translation: number[] = this._nodeToTranslation(node, this.reference);\n let transform: Transform = new Transform(\n node.orientation,\n node.width,\n node.height,\n node.focal,\n node.scale,\n node.gpano,\n node.rotation,\n translation,\n node.image,\n undefined,\n node.ck1,\n node.ck2,\n node.cameraProjection);\n\n this._trajectoryTransforms.unshift(transform);\n this._trajectoryCameras.unshift(new Camera(transform));\n }\n }\n\n private _nodeToTranslation(node: Node, reference: ILatLonAlt): number[] {\n return Geo.computeTranslation(\n { alt: node.alt, lat: node.latLon.lat, lon: node.latLon.lon },\n node.rotation,\n reference);\n }\n\n private _sameConnectedComponent(): boolean {\n let current: Node = this._currentNode;\n let previous: Node = this._previousNode;\n\n return !!current && !!previous &&\n current.mergeCC === previous.mergeCC;\n }\n\n private _withinOriginalDistance(): boolean {\n let current: Node = this._currentNode;\n let previous: Node = this._previousNode;\n\n if (!current || !previous) {\n return true;\n }\n\n // 50 km/h moves 28m in 2s\n let distance: number = this._spatial.distanceFromLatLon(\n current.originalLatLon.lat,\n current.originalLatLon.lon,\n previous.originalLatLon.lat,\n previous.originalLatLon.lon);\n\n return distance < 25;\n }\n}\n",
+ "import * as THREE from \"three\";\nimport * as UnitBezier from \"@mapbox/unitbezier\";\n\nimport {\n EarthState,\n IState,\n InteractiveStateBase,\n InteractiveWaitingState,\n StateBase,\n WaitingState,\n} from \"../../State\";\nimport {\n Node,\n} from \"../../Graph\";\n\nexport class TraversingState extends InteractiveStateBase {\n private _baseAlpha: number;\n\n private _speedCoefficient: number;\n\n private _unitBezier: UnitBezier;\n private _useBezier: boolean;\n\n constructor (state: IState) {\n super(state);\n\n this._adjustCameras();\n\n this._motionless = this._motionlessTransition();\n\n this._baseAlpha = this._alpha;\n this._speedCoefficient = 1;\n this._unitBezier = new UnitBezier(0.74, 0.67, 0.38, 0.96);\n this._useBezier = false;\n }\n\n public earth(): StateBase {\n return new EarthState(this);\n }\n\n public wait(): StateBase {\n return new WaitingState(this);\n }\n\n public waitInteractively(): StateBase {\n return new InteractiveWaitingState(this);\n }\n\n public append(nodes: Node[]): void {\n let emptyTrajectory: boolean = this._trajectory.length === 0;\n\n if (emptyTrajectory) {\n this._resetTransition();\n }\n\n super.append(nodes);\n\n if (emptyTrajectory) {\n this._setDesiredCenter();\n this._setDesiredZoom();\n }\n }\n\n public prepend(nodes: Node[]): void {\n let emptyTrajectory: boolean = this._trajectory.length === 0;\n\n if (emptyTrajectory) {\n this._resetTransition();\n }\n\n super.prepend(nodes);\n\n if (emptyTrajectory) {\n this._setDesiredCenter();\n this._setDesiredZoom();\n }\n }\n\n public set(nodes: Node[]): void {\n super.set(nodes);\n\n this._desiredLookat = null;\n\n this._resetTransition();\n this._clearRotation();\n\n this._setDesiredCenter();\n this._setDesiredZoom();\n\n if (this._trajectory.length < 3) {\n this._useBezier = true;\n }\n }\n\n public setSpeed(speed: number): void {\n this._speedCoefficient = this._spatial.clamp(speed, 0, 10);\n }\n\n public update(fps: number): void {\n if (this._alpha === 1 && this._currentIndex + this._alpha < this._trajectory.length) {\n this._currentIndex += 1;\n\n this._useBezier = this._trajectory.length < 3 &&\n this._currentIndex + 1 === this._trajectory.length;\n\n this._setCurrent();\n this._resetTransition();\n this._clearRotation();\n\n this._desiredZoom = this._currentNode.fullPano ? this._zoom : 0;\n\n this._desiredLookat = null;\n }\n\n let animationSpeed: number = this._animationSpeed * (60 / fps);\n this._baseAlpha = Math.min(1, this._baseAlpha + this._speedCoefficient * animationSpeed);\n if (this._useBezier) {\n this._alpha = this._unitBezier.solve(this._baseAlpha);\n } else {\n this._alpha = this._baseAlpha;\n }\n\n this._updateRotation();\n if (!this._rotationDelta.isZero) {\n this._applyRotation(this._rotationDelta, this._previousCamera);\n this._applyRotation(this._rotationDelta, this._currentCamera);\n }\n\n this._updateRotationBasic();\n if (this._basicRotation[0] !== 0 || this._basicRotation[1] !== 0) {\n this._applyRotationBasic(this._basicRotation);\n }\n\n this._updateZoom(animationSpeed);\n this._updateLookat(animationSpeed);\n\n this._camera.lerpCameras(this._previousCamera, this._currentCamera, this.alpha);\n }\n\n protected _getAlpha(): number {\n return this._motionless ? Math.ceil(this._alpha) : this._alpha;\n }\n\n protected _setCurrentCamera(): void {\n super._setCurrentCamera();\n\n this._adjustCameras();\n }\n\n private _adjustCameras(): void {\n if (this._previousNode == null) {\n return;\n }\n\n let lookat: THREE.Vector3 = this._camera.lookat.clone().sub(this._camera.position);\n this._previousCamera.lookat.copy(lookat.clone().add(this._previousCamera.position));\n\n if (this._currentNode.fullPano) {\n this._currentCamera.lookat.copy(lookat.clone().add(this._currentCamera.position));\n }\n }\n\n private _resetTransition(): void {\n this._alpha = 0;\n this._baseAlpha = 0;\n\n this._motionless = this._motionlessTransition();\n }\n}\n\nexport default TraversingState;\n",
+ "import {\n Node,\n} from \"../../Graph\";\nimport {\n IState,\n StateBase,\n InteractiveWaitingState,\n TraversingState,\n} from \"../../State\";\n\nexport class WaitingState extends StateBase {\n constructor(state: IState) {\n super(state);\n\n this._zoom = 0;\n\n this._adjustCameras();\n\n this._motionless = this._motionlessTransition();\n }\n\n public traverse(): StateBase {\n return new TraversingState(this);\n }\n\n public waitInteractively(): StateBase {\n return new InteractiveWaitingState(this);\n }\n\n public prepend(nodes: Node[]): void {\n super.prepend(nodes);\n\n this._motionless = this._motionlessTransition();\n }\n\n public set(nodes: Node[]): void {\n super.set(nodes);\n\n this._motionless = this._motionlessTransition();\n }\n\n public move(delta: number): void {\n this._alpha = Math.max(0, Math.min(1, this._alpha + delta));\n }\n\n public moveTo(position: number): void {\n this._alpha = Math.max(0, Math.min(1, position));\n }\n\n public update(fps: number): void {\n this._camera.lerpCameras(this._previousCamera, this._currentCamera, this.alpha);\n }\n\n protected _getAlpha(): number {\n return this._motionless ? Math.round(this._alpha) : this._alpha;\n }\n\n protected _setCurrentCamera(): void {\n super._setCurrentCamera();\n\n this._adjustCameras();\n }\n\n private _adjustCameras(): void {\n if (this._previousNode == null) {\n return;\n }\n\n if (this._currentNode.fullPano) {\n let lookat: THREE.Vector3 = this._camera.lookat.clone().sub(this._camera.position);\n this._currentCamera.lookat.copy(lookat.clone().add(this._currentCamera.position));\n }\n\n if (this._previousNode.fullPano) {\n let lookat: THREE.Vector3 = this._currentCamera.lookat.clone().sub(this._currentCamera.position);\n this._previousCamera.lookat.copy(lookat.clone().add(this._previousCamera.position));\n }\n }\n}\n\nexport default WaitingState;\n",
+ "import {Observable, Subscriber} from \"rxjs\";\n\n/**\n * @class ImageTileLoader\n *\n * @classdesc Represents a loader of image tiles.\n */\nexport class ImageTileLoader {\n private _origin: string;\n private _scheme: string;\n private _host: string;\n\n /**\n * Create a new node image tile loader instance.\n *\n * @param {string} scheme - The URI scheme.\n * @param {string} host - The URI host.\n * @param {string} [origin] - The origin query param.\n */\n constructor(scheme: string, host: string, origin?: string) {\n this._scheme = scheme;\n this._host = host;\n this._origin = origin != null ? `?origin=${origin}` : \"\";\n }\n\n /**\n * Retrieve an image tile.\n *\n * @description Retrieve an image tile by specifying the area\n * as well as the scaled size.\n *\n * @param {string} identifier - The identifier of the image.\n * @param {number} x - The top left x pixel coordinate for the tile\n * in the original image.\n * @param {number} y - The top left y pixel coordinate for the tile\n * in the original image.\n * @param {number} w - The pixel width of the tile in the original image.\n * @param {number} h - The pixel height of the tile in the original image.\n * @param {number} scaledW - The scaled width of the returned tile.\n * @param {number} scaledH - The scaled height of the returned tile.\n */\n public getTile(\n identifier: string,\n x: number,\n y: number,\n w: number,\n h: number,\n scaledW: number,\n scaledH: number): [Observable<HTMLImageElement>, Function] {\n\n let characteristics: string = `/${identifier}/${x},${y},${w},${h}/${scaledW},${scaledH}/0/default.jpg`;\n let url: string =\n this._scheme +\n \"://\" +\n this._host +\n characteristics +\n this._origin;\n\n let xmlHTTP: XMLHttpRequest = null;\n\n return [Observable.create(\n (subscriber: Subscriber<HTMLImageElement>): void => {\n xmlHTTP = new XMLHttpRequest();\n xmlHTTP.open(\"GET\", url, true);\n xmlHTTP.responseType = \"arraybuffer\";\n xmlHTTP.timeout = 15000;\n\n xmlHTTP.onload = (event: Event) => {\n if (xmlHTTP.status !== 200) {\n subscriber.error(\n new Error(\n `Failed to fetch tile (${identifier}: ${x},${y},${w},${h}). ` +\n `Status: ${xmlHTTP.status}, ${xmlHTTP.statusText}`));\n\n return;\n }\n\n let image: HTMLImageElement = new Image();\n image.crossOrigin = \"Anonymous\";\n\n image.onload = (e: Event) => {\n subscriber.next(image);\n subscriber.complete();\n };\n\n image.onerror = (error: ErrorEvent) => {\n subscriber.error(new Error(`Failed to load tile image (${identifier}: ${x},${y},${w},${h})`));\n };\n\n let blob: Blob = new Blob([xmlHTTP.response]);\n image.src = window.URL.createObjectURL(blob);\n };\n\n xmlHTTP.onerror = (error: Event) => {\n subscriber.error(new Error(`Failed to fetch tile (${identifier}: ${x},${y},${w},${h})`));\n };\n\n xmlHTTP.ontimeout = (error: Event) => {\n subscriber.error(new Error(`Tile request timed out (${identifier}: ${x},${y},${w},${h})`));\n };\n\n xmlHTTP.onabort = (event: Event) => {\n subscriber.error(new Error(`Tile request was aborted (${identifier}: ${x},${y},${w},${h})`));\n };\n\n xmlHTTP.send(null);\n }),\n (): void => {\n if (xmlHTTP != null) {\n xmlHTTP.abort();\n }\n },\n ];\n }\n}\n\nexport default ImageTileLoader;\n",
"/**\n * @class ImageTileStore\n *\n * @classdesc Represents a store for image tiles.\n */\nexport class ImageTileStore {\n private _images: { [level: string]: { [key: string]: HTMLImageElement } };\n\n /**\n * Create a new node image tile store instance.\n */\n constructor() {\n this._images = {};\n }\n\n /**\n * Add an image tile to the store.\n *\n * @param {HTMLImageElement} image - The image tile.\n * @param {string} key - The identifier for the tile.\n * @param {number} level - The level of the tile.\n */\n public addImage(image: HTMLImageElement, key: string, level: number): void {\n if (!(level in this._images)) {\n this._images[level] = {};\n }\n\n this._images[level][key] = image;\n }\n\n /**\n * Dispose the store.\n *\n * @description Disposes all cached assets.\n */\n public dispose(): void {\n for (let level of Object.keys(this._images)) {\n let levelImages: { [key: string]: HTMLImageElement } = this._images[level];\n\n for (let key of Object.keys(levelImages)) {\n window.URL.revokeObjectURL(levelImages[key].src);\n delete levelImages[key];\n }\n\n delete this._images[level];\n }\n }\n\n /**\n * Get an image tile from the store.\n *\n * @param {string} key - The identifier for the tile.\n * @param {number} level - The level of the tile.\n */\n public getImage(key: string, level: number): HTMLImageElement {\n return this._images[level][key];\n }\n\n /**\n * Check if an image tile exist in the store.\n *\n * @param {string} key - The identifier for the tile.\n * @param {number} level - The level of the tile.\n */\n public hasImage(key: string, level: number): boolean {\n return level in this._images && key in this._images[level];\n }\n}\n\nexport default ImageTileStore;\n",
- "/// <reference path=\"../../typings/index.d.ts\" />\n\nimport {\n RenderCamera,\n ISize,\n} from \"../Render\";\nimport {\n Transform,\n ViewportCoords,\n} from \"../Geo\";\nimport {\n IBoundingBox,\n IRegionOfInterest,\n} from \"../Tiles\";\n\n/**\n * @class RegionOfInterestCalculator\n *\n * @classdesc Represents a calculator for regions of interest.\n */\nexport class RegionOfInterestCalculator {\n private _viewportCoords: ViewportCoords = new ViewportCoords();\n\n /**\n * Compute a region of interest based on the current render camera\n * and the viewport size.\n *\n * @param {RenderCamera} renderCamera - Render camera used for unprojections.\n * @param {ISize} size - Viewport size in pixels.\n * @param {Transform} transform - Transform used for projections.\n *\n * @returns {IRegionOfInterest} A region of interest.\n */\n public computeRegionOfInterest(renderCamera: RenderCamera, size: ISize, transform: Transform): IRegionOfInterest {\n let viewportBoundaryPoints: number[][] = this._viewportBoundaryPoints(4);\n let bbox: IBoundingBox = this._viewportPointsBoundingBox(viewportBoundaryPoints, renderCamera, transform);\n this._clipBoundingBox(bbox);\n\n const viewportPixelWidth: number = 2 / size.width;\n const viewportPixelHeight: number = 2 / size.height;\n let centralViewportPixel: number[][] = [\n [-0.5 * viewportPixelWidth, 0.5 * viewportPixelHeight],\n [ 0.5 * viewportPixelWidth, 0.5 * viewportPixelHeight],\n [ 0.5 * viewportPixelWidth, -0.5 * viewportPixelHeight],\n [-0.5 * viewportPixelWidth, -0.5 * viewportPixelHeight],\n ];\n\n let cpbox: IBoundingBox = this._viewportPointsBoundingBox(centralViewportPixel, renderCamera, transform);\n\n return {\n bbox: bbox,\n pixelHeight: cpbox.maxY - cpbox.minY,\n pixelWidth: cpbox.maxX - cpbox.minX + (cpbox.minX < cpbox.maxX ? 0 : 1),\n };\n }\n\n private _viewportBoundaryPoints(pointsPerSide: number): number[][] {\n let points: number[][] = [];\n let os: number[][] = [[-1, 1], [1, 1], [1, -1], [-1, -1]];\n let ds: number[][] = [[2, 0], [0, -2], [-2, 0], [0, 2]];\n for (let side: number = 0; side < 4; ++side) {\n let o: number[] = os[side];\n let d: number[] = ds[side];\n for (let i: number = 0; i < pointsPerSide; ++i) {\n points.push([o[0] + d[0] * i / pointsPerSide,\n o[1] + d[1] * i / pointsPerSide]);\n }\n }\n return points;\n }\n\n private _viewportPointsBoundingBox(viewportPoints: number[][], renderCamera: RenderCamera, transform: Transform): IBoundingBox {\n let basicPoints: number[][] = viewportPoints\n .map(\n (point: number []): number[] => {\n return this._viewportCoords\n .viewportToBasic(point[0], point[1], transform, renderCamera.perspective);\n });\n\n if (transform.gpano != null) {\n return this._boundingBoxPano(basicPoints);\n } else {\n return this._boundingBox(basicPoints);\n }\n }\n\n private _boundingBox(points: number[][]): IBoundingBox {\n let bbox: IBoundingBox = {\n maxX: Number.NEGATIVE_INFINITY,\n maxY: Number.NEGATIVE_INFINITY,\n minX: Number.POSITIVE_INFINITY,\n minY: Number.POSITIVE_INFINITY,\n };\n\n for (let i: number = 0; i < points.length; ++i) {\n bbox.minX = Math.min(bbox.minX, points[i][0]);\n bbox.maxX = Math.max(bbox.maxX, points[i][0]);\n bbox.minY = Math.min(bbox.minY, points[i][1]);\n bbox.maxY = Math.max(bbox.maxY, points[i][1]);\n }\n\n return bbox;\n }\n\n private _boundingBoxPano(points: number[][]): IBoundingBox {\n let xs: number[] = [];\n let ys: number[] = [];\n for (let i: number = 0; i < points.length; ++i) {\n xs.push(points[i][0]);\n ys.push(points[i][1]);\n }\n xs.sort((a, b) => { return this._sign(a - b); });\n ys.sort((a, b) => { return this._sign(a - b); });\n\n let intervalX: number[] = this._intervalPano(xs);\n\n return {\n maxX: intervalX[1],\n maxY: ys[ys.length - 1],\n minX: intervalX[0],\n minY: ys[0],\n };\n }\n\n /**\n * Find the max interval between consecutive numbers.\n * Assumes numbers are between 0 and 1, sorted and that\n * x is equivalent to x + 1.\n */\n private _intervalPano(xs: number[]): number[] {\n let maxdx: number = 0;\n let maxi: number = -1;\n for (let i: number = 0; i < xs.length - 1; ++i) {\n let dx: number = xs[i + 1] - xs[i];\n if (dx > maxdx) {\n maxdx = dx;\n maxi = i;\n }\n }\n let loopdx: number = xs[0] + 1 - xs[xs.length - 1];\n if (loopdx > maxdx) {\n return [xs[0], xs[xs.length - 1]];\n } else {\n return [xs[maxi + 1], xs[maxi]];\n }\n }\n\n private _clipBoundingBox(bbox: IBoundingBox): void {\n bbox.minX = Math.max(0, Math.min(1, bbox.minX));\n bbox.maxX = Math.max(0, Math.min(1, bbox.maxX));\n bbox.minY = Math.max(0, Math.min(1, bbox.minY));\n bbox.maxY = Math.max(0, Math.min(1, bbox.maxY));\n }\n\n private _sign(n: number): number {\n return n > 0 ? 1 : n < 0 ? -1 : 0;\n }\n}\n\nexport default RegionOfInterestCalculator;\n",
- "/// <reference path=\"../../typings/index.d.ts\" />\n\nimport * as THREE from \"three\";\n\nimport {Observable} from \"rxjs/Observable\";\nimport {Subject} from \"rxjs/Subject\";\nimport {Subscription} from \"rxjs/Subscription\";\n\nimport {\n ImageTileLoader,\n ImageTileStore,\n IRegionOfInterest,\n} from \"../Tiles\";\n\n/**\n * @class TextureProvider\n *\n * @classdesc Represents a provider of textures.\n */\nexport class TextureProvider {\n private _background: HTMLImageElement;\n private _camera: THREE.OrthographicCamera;\n private _imageTileLoader: ImageTileLoader;\n private _imageTileStore: ImageTileStore;\n private _renderer: THREE.WebGLRenderer;\n private _renderTarget: THREE.WebGLRenderTarget;\n private _roi: IRegionOfInterest;\n\n private _abortFunctions: Function[];\n private _tileSubscriptions: { [key: string]: Subscription };\n\n private _created$: Observable<THREE.Texture>;\n private _createdSubject$: Subject<THREE.Texture>;\n private _createdSubscription: Subscription;\n private _hasSubject$: Subject<boolean>;\n private _has$: Observable<boolean>;\n private _hasSubscription: Subscription;\n private _updated$: Subject<boolean>;\n\n private _disposed: boolean;\n private _height: number;\n private _key: string;\n private _tileSize: number;\n private _maxLevel: number;\n private _currentLevel: number;\n private _renderedCurrentLevelTiles: { [key: string]: boolean };\n private _renderedTiles: { [level: string]: number[][] };\n private _width: number;\n\n /**\n * Create a new node texture provider instance.\n *\n * @param {string} key - The identifier of the image for which to request tiles.\n * @param {number} width - The full width of the original image.\n * @param {number} height - The full height of the original image.\n * @param {number} tileSize - The size used when requesting tiles.\n * @param {HTMLImageElement} background - Image to use as background.\n * @param {ImageTileLoader} imageTileLoader - Loader for retrieving tiles.\n * @param {ImageTileStore} imageTileStore - Store for saving tiles.\n * @param {THREE.WebGLRenderer} renderer - Renderer used for rendering tiles to texture.\n */\n constructor (\n key: string,\n width: number,\n height: number,\n tileSize: number,\n background: HTMLImageElement,\n imageTileLoader: ImageTileLoader,\n imageTileStore: ImageTileStore,\n renderer: THREE.WebGLRenderer) {\n\n this._disposed = false;\n\n this._key = key;\n\n if (width <= 0 || height <= 0) {\n console.warn(`Original image size (${width}, ${height}) is invalid (${key}). Tiles will not be loaded.`);\n }\n\n this._width = width;\n this._height = height;\n this._maxLevel = Math.ceil(Math.log(Math.max(height, width)) / Math.log(2));\n this._currentLevel = -1;\n this._tileSize = tileSize;\n\n this._updated$ = new Subject<boolean>();\n this._createdSubject$ = new Subject<THREE.Texture>();\n this._created$ = this._createdSubject$\n .publishReplay(1)\n .refCount();\n\n this._createdSubscription = this._created$.subscribe(() => { /*noop*/ });\n\n this._hasSubject$ = new Subject<boolean>();\n this._has$ = this._hasSubject$\n .startWith(false)\n .publishReplay(1)\n .refCount();\n\n this._hasSubscription = this._has$.subscribe(() => { /*noop*/ });\n\n this._abortFunctions = [];\n this._tileSubscriptions = {};\n this._renderedCurrentLevelTiles = {};\n this._renderedTiles = {};\n\n this._background = background;\n this._camera = null;\n this._imageTileLoader = imageTileLoader;\n this._imageTileStore = imageTileStore;\n this._renderer = renderer;\n this._renderTarget = null;\n this._roi = null;\n }\n\n /**\n * Get disposed.\n *\n * @returns {boolean} Value indicating whether provider has\n * been disposed.\n */\n public get disposed(): boolean {\n return this._disposed;\n }\n\n /**\n * Get hasTexture$.\n *\n * @returns {Observable<boolean>} Observable emitting\n * values indicating when the existance of a texture\n * changes.\n */\n public get hasTexture$(): Observable<boolean> {\n return this._has$;\n }\n\n /**\n * Get key.\n *\n * @returns {boolean} The identifier of the image for\n * which to render textures.\n */\n public get key(): string {\n return this._key;\n }\n\n /**\n * Get textureUpdated$.\n *\n * @returns {Observable<boolean>} Observable emitting\n * values when an existing texture has been updated.\n */\n public get textureUpdated$(): Observable<boolean> {\n return this._updated$;\n }\n\n /**\n * Get textureCreated$.\n *\n * @returns {Observable<boolean>} Observable emitting\n * values when a new texture has been created.\n */\n public get textureCreated$(): Observable<THREE.Texture> {\n return this._created$;\n }\n\n /**\n * Abort all outstanding image tile requests.\n */\n public abort(): void {\n for (let key in this._tileSubscriptions) {\n if (!this._tileSubscriptions.hasOwnProperty(key)) {\n continue;\n }\n\n this._tileSubscriptions[key].unsubscribe();\n }\n\n this._tileSubscriptions = {};\n\n for (let abort of this._abortFunctions) {\n abort();\n }\n\n this._abortFunctions = [];\n }\n\n /**\n * Dispose the provider.\n *\n * @description Disposes all cached assets and\n * aborts all outstanding image tile requests.\n */\n public dispose(): void {\n if (this._disposed) {\n console.warn(`Texture already disposed (${this._key})`);\n return;\n }\n\n this.abort();\n\n if (this._renderTarget != null) {\n this._renderTarget.dispose();\n this._renderTarget = null;\n }\n\n this._imageTileStore.dispose();\n this._imageTileStore = null;\n\n this._background = null;\n this._camera = null;\n this._imageTileLoader = null;\n this._renderer = null;\n this._roi = null;\n\n this._createdSubscription.unsubscribe();\n this._hasSubscription.unsubscribe();\n\n this._disposed = true;\n }\n\n /**\n * Set the region of interest.\n *\n * @description When the region of interest is set the\n * the tile level is determined and tiles for the region\n * are fetched from the store or the loader and renderedLevel\n * to the texture.\n *\n * @param {IRegionOfInterest} roi - Spatial edges to cache.\n */\n public setRegionOfInterest(roi: IRegionOfInterest): void {\n if (this._width <= 0 || this._height <= 0) {\n return;\n }\n\n this._roi = roi;\n\n let width: number = 1 / this._roi.pixelWidth;\n let height: number = 1 / this._roi.pixelHeight;\n let size: number = Math.max(height, width);\n\n let currentLevel: number = Math.max(0, Math.min(this._maxLevel, Math.round(Math.log(size) / Math.log(2) + 0.25)));\n if (currentLevel !== this._currentLevel) {\n this.abort();\n\n this._currentLevel = currentLevel;\n if (!(this._currentLevel in this._renderedTiles)) {\n this._renderedTiles[this._currentLevel] = [];\n }\n\n this._renderedCurrentLevelTiles = {};\n for (let tile of this._renderedTiles[this._currentLevel]) {\n this._renderedCurrentLevelTiles[this._tileKey(tile)] = true;\n }\n }\n\n let topLeft: number[] = this._getTileCoords([this._roi.bbox.minX, this._roi.bbox.minY]);\n let bottomRight: number[] = this._getTileCoords([this._roi.bbox.maxX, this._roi.bbox.maxY]);\n\n let tiles: number[][] = this._getTiles(topLeft, bottomRight);\n\n if (this._camera == null) {\n this._camera = new THREE.OrthographicCamera(\n -this._width / 2,\n this._width / 2,\n this._height / 2,\n -this._height / 2,\n -1,\n 1);\n\n this._camera.position.z = 1;\n\n let gl: WebGLRenderingContext = this._renderer.getContext();\n let maxTextureSize: number = gl.getParameter(gl.MAX_TEXTURE_SIZE);\n let backgroundSize: number = Math.max(this._width, this._height);\n let scale: number = maxTextureSize > backgroundSize ? 1 : maxTextureSize / backgroundSize;\n\n let targetWidth: number = Math.floor(scale * this._width);\n let targetHeight: number = Math.floor(scale * this._height);\n\n this._renderTarget = new THREE.WebGLRenderTarget(\n targetWidth,\n targetHeight,\n {\n depthBuffer: false,\n format: THREE.RGBFormat,\n magFilter: THREE.LinearFilter,\n minFilter: THREE.LinearFilter,\n stencilBuffer: false,\n });\n\n this._renderToTarget(0, 0, this._width, this._height, this._background);\n\n this._createdSubject$.next((<any>this._renderTarget).texture);\n this._hasSubject$.next(true);\n }\n\n this._fetchTiles(tiles);\n }\n\n /**\n * Update the image used as background for the texture.\n *\n * @param {HTMLImageElement} background - The background image.\n */\n public updateBackground(background: HTMLImageElement): void {\n this._background = background;\n }\n\n /**\n * Retrieve an image tile.\n *\n * @description Retrieve an image tile and render it to the\n * texture. Add the tile to the store and emit to the updated\n * observable.\n *\n * @param {Array<number>} tile - The tile coordinates.\n * @param {number} level - The tile level.\n * @param {number} x - The top left x pixel coordinate of the tile.\n * @param {number} y - The top left y pixel coordinate of the tile.\n * @param {number} w - The pixel width of the tile.\n * @param {number} h - The pixel height of the tile.\n * @param {number} scaledW - The scaled width of the returned tile.\n * @param {number} scaledH - The scaled height of the returned tile.\n */\n private _fetchTile(\n tile: number[],\n level: number,\n x: number,\n y: number,\n w: number,\n h: number,\n scaledX: number,\n scaledY: number): void {\n\n let getTile: [Observable<HTMLImageElement>, Function] =\n this._imageTileLoader.getTile(this._key, x, y, w, h, scaledX, scaledY);\n\n let tile$: Observable<HTMLImageElement> = getTile[0];\n let abort: Function = getTile[1];\n\n this._abortFunctions.push(abort);\n\n let tileKey: string = this._tileKey(tile);\n\n let subscription: Subscription = tile$\n .subscribe(\n (image: HTMLImageElement): void => {\n this._renderToTarget(x, y, w, h, image);\n\n this._removeFromDictionary(tileKey, this._tileSubscriptions);\n this._removeFromArray(abort, this._abortFunctions);\n\n this._setTileRendered(tile, this._currentLevel);\n\n this._imageTileStore.addImage(image, tileKey, level);\n\n this._updated$.next(true);\n },\n (error: Error): void => {\n this._removeFromDictionary(tileKey, this._tileSubscriptions);\n this._removeFromArray(abort, this._abortFunctions);\n\n console.error(error);\n });\n\n if (!subscription.closed) {\n this._tileSubscriptions[tileKey] = subscription;\n }\n }\n\n /**\n * Retrieve image tiles.\n *\n * @description Retrieve a image tiles and render them to the\n * texture. Retrieve from store if it exists, otherwise Retrieve\n * from loader.\n *\n * @param {Array<Array<number>>} tiles - Array of tile coordinates to\n * retrieve.\n */\n private _fetchTiles(tiles: number[][]): void {\n let tileSize: number = this._tileSize * Math.pow(2, this._maxLevel - this._currentLevel);\n\n for (let tile of tiles) {\n let tileKey: string = this._tileKey(tile);\n if (tileKey in this._renderedCurrentLevelTiles ||\n tileKey in this._tileSubscriptions) {\n continue;\n }\n\n let tileX: number = tileSize * tile[0];\n let tileY: number = tileSize * tile[1];\n let tileWidth: number = tileX + tileSize > this._width ? this._width - tileX : tileSize;\n let tileHeight: number = tileY + tileSize > this._height ? this._height - tileY : tileSize;\n\n if (this._imageTileStore.hasImage(tileKey, this._currentLevel)) {\n this._renderToTarget(tileX, tileY, tileWidth, tileHeight, this._imageTileStore.getImage(tileKey, this._currentLevel));\n this._setTileRendered(tile, this._currentLevel);\n\n this._updated$.next(true);\n continue;\n }\n\n let scaledX: number = Math.floor(tileWidth / tileSize * this._tileSize);\n let scaledY: number = Math.floor(tileHeight / tileSize * this._tileSize);\n\n this._fetchTile(tile, this._currentLevel, tileX, tileY, tileWidth, tileHeight, scaledX, scaledY);\n }\n }\n\n /**\n * Get tile coordinates for a point using the current level.\n *\n * @param {Array<number>} point - Point in basic coordinates.\n *\n * @returns {Array<number>} x and y tile coodinates.\n */\n private _getTileCoords(point: number[]): number[] {\n let tileSize: number = this._tileSize * Math.pow(2, this._maxLevel - this._currentLevel);\n\n let maxX: number = Math.ceil(this._width / tileSize) - 1;\n let maxY: number = Math.ceil(this._height / tileSize) - 1;\n\n return [\n Math.min(Math.floor(this._width * point[0] / tileSize), maxX),\n Math.min(Math.floor(this._height * point[1] / tileSize), maxY),\n ];\n }\n\n /**\n * Get tile coordinates for all tiles contained in a bounding\n * box.\n *\n * @param {Array<number>} topLeft - Top left tile coordinate of bounding box.\n * @param {Array<number>} bottomRight - Bottom right tile coordinate of bounding box.\n *\n * @returns {Array<Array<number>>} Array of x, y tile coodinates.\n */\n private _getTiles(topLeft: number[], bottomRight: number[]): number[][] {\n let xs: number[] = [];\n\n if (topLeft[0] > bottomRight[0]) {\n let tileSize: number = this._tileSize * Math.pow(2, this._maxLevel - this._currentLevel);\n let maxX: number = Math.ceil(this._width / tileSize) - 1;\n\n for (let x: number = topLeft[0]; x <= maxX; x++) {\n xs.push(x);\n }\n\n for (let x: number = 0; x <= bottomRight[0]; x++) {\n xs.push(x);\n }\n } else {\n for (let x: number = topLeft[0]; x <= bottomRight[0]; x++) {\n xs.push(x);\n }\n }\n\n let tiles: number[][] = [];\n\n for (let x of xs) {\n for (let y: number = topLeft[1]; y <= bottomRight[1]; y++) {\n tiles.push([x, y]);\n }\n }\n\n return tiles;\n }\n\n /**\n * Remove an item from an array if it exists in array.\n *\n * @param {T} item - Item to remove.\n * @param {Array<T>} array - Array from which item should be removed.\n */\n private _removeFromArray<T>(item: T, array: T[]): void {\n let index: number = array.indexOf(item);\n if (index !== -1) {\n array.splice(index, 1);\n }\n }\n\n /**\n * Remove an item from a dictionary.\n *\n * @param {string} key - Key of the item to remove.\n * @param {Object} dict - Dictionary from which item should be removed.\n */\n private _removeFromDictionary<T>(key: string, dict: { [key: string]: T }): void {\n if (key in dict) {\n delete dict[key];\n }\n }\n\n /**\n * Render an image tile to the target texture.\n *\n * @param {number} x - The top left x pixel coordinate of the tile.\n * @param {number} y - The top left y pixel coordinate of the tile.\n * @param {number} w - The pixel width of the tile.\n * @param {number} h - The pixel height of the tile.\n * @param {HTMLImageElement} background - The image tile to render.\n */\n private _renderToTarget(x: number, y: number, w: number, h: number, image: HTMLImageElement): void {\n let texture: THREE.Texture = new THREE.Texture(image);\n texture.minFilter = THREE.LinearFilter;\n texture.needsUpdate = true;\n\n let geometry: THREE.PlaneGeometry = new THREE.PlaneGeometry(w, h);\n let material: THREE.MeshBasicMaterial = new THREE.MeshBasicMaterial({ map: texture, side: THREE.FrontSide });\n\n let mesh: THREE.Mesh = new THREE.Mesh(geometry, material);\n mesh.position.x = -this._width / 2 + x + w / 2;\n mesh.position.y = this._height / 2 - y - h / 2;\n\n let scene: THREE.Scene = new THREE.Scene();\n scene.add(mesh);\n\n this._renderer.render(scene, this._camera, this._renderTarget);\n this._renderer.setRenderTarget(undefined);\n\n scene.remove(mesh);\n\n geometry.dispose();\n material.dispose();\n texture.dispose();\n }\n\n /**\n * Mark a tile as rendered.\n *\n * @description Clears tiles marked as rendered in other\n * levels of the tile pyramid if they were rendered on\n * top of or below the tile.\n *\n * @param {Arrary<number>} tile - The tile coordinates.\n * @param {number} level - Tile level of the tile coordinates.\n */\n private _setTileRendered(tile: number[], level: number): void {\n let otherLevels: number[] =\n Object.keys(this._renderedTiles)\n .map(\n (key: string): number => {\n return parseInt(key, 10);\n })\n .filter(\n (renderedLevel: number): boolean => {\n return renderedLevel !== level;\n });\n\n for (let otherLevel of otherLevels) {\n let scale: number = Math.pow(2, otherLevel - level);\n\n if (otherLevel < level) {\n let x: number = Math.floor(scale * tile[0]);\n let y: number = Math.floor(scale * tile[1]);\n\n for (let otherTile of this._renderedTiles[otherLevel].slice()) {\n if (otherTile[0] === x && otherTile[1] === y) {\n let index: number = this._renderedTiles[otherLevel].indexOf(otherTile);\n this._renderedTiles[otherLevel].splice(index, 1);\n }\n }\n } else {\n let startX: number = scale * tile[0];\n let endX: number = startX + scale - 1;\n let startY: number = scale * tile[1];\n let endY: number = startY + scale - 1;\n\n for (let otherTile of this._renderedTiles[otherLevel].slice()) {\n if (otherTile[0] >= startX && otherTile[0] <= endX &&\n otherTile[1] >= startY && otherTile[1] <= endY) {\n let index: number = this._renderedTiles[otherLevel].indexOf(otherTile);\n this._renderedTiles[otherLevel].splice(index, 1);\n\n }\n }\n }\n\n if (this._renderedTiles[otherLevel].length === 0) {\n delete this._renderedTiles[otherLevel];\n }\n }\n\n this._renderedTiles[level].push(tile);\n this._renderedCurrentLevelTiles[this._tileKey(tile)] = true;\n }\n\n /**\n * Create a tile key from a tile coordinates.\n *\n * @description Tile keys are used as a hash for\n * storing the tile in a dictionary.\n *\n * @param {Arrary<number>} tile - The tile coordinates.\n */\n private _tileKey(tile: number[]): string {\n return tile[0] + \"-\" + tile[1];\n }\n}\n\nexport default TextureProvider;\n",
+ "import {\n RenderCamera,\n ISize,\n} from \"../Render\";\nimport {\n Transform,\n ViewportCoords,\n} from \"../Geo\";\nimport {\n IBoundingBox,\n IRegionOfInterest,\n} from \"../Tiles\";\n\n/**\n * @class RegionOfInterestCalculator\n *\n * @classdesc Represents a calculator for regions of interest.\n */\nexport class RegionOfInterestCalculator {\n private _viewportCoords: ViewportCoords = new ViewportCoords();\n\n /**\n * Compute a region of interest based on the current render camera\n * and the viewport size.\n *\n * @param {RenderCamera} renderCamera - Render camera used for unprojections.\n * @param {ISize} size - Viewport size in pixels.\n * @param {Transform} transform - Transform used for projections.\n *\n * @returns {IRegionOfInterest} A region of interest.\n */\n public computeRegionOfInterest(renderCamera: RenderCamera, size: ISize, transform: Transform): IRegionOfInterest {\n let viewportBoundaryPoints: number[][] = this._viewportBoundaryPoints(4);\n let bbox: IBoundingBox = this._viewportPointsBoundingBox(viewportBoundaryPoints, renderCamera, transform);\n this._clipBoundingBox(bbox);\n\n const viewportPixelWidth: number = 2 / size.width;\n const viewportPixelHeight: number = 2 / size.height;\n let centralViewportPixel: number[][] = [\n [-0.5 * viewportPixelWidth, 0.5 * viewportPixelHeight],\n [ 0.5 * viewportPixelWidth, 0.5 * viewportPixelHeight],\n [ 0.5 * viewportPixelWidth, -0.5 * viewportPixelHeight],\n [-0.5 * viewportPixelWidth, -0.5 * viewportPixelHeight],\n ];\n\n let cpbox: IBoundingBox = this._viewportPointsBoundingBox(centralViewportPixel, renderCamera, transform);\n\n return {\n bbox: bbox,\n pixelHeight: cpbox.maxY - cpbox.minY,\n pixelWidth: cpbox.maxX - cpbox.minX + (cpbox.minX < cpbox.maxX ? 0 : 1),\n };\n }\n\n private _viewportBoundaryPoints(pointsPerSide: number): number[][] {\n let points: number[][] = [];\n let os: number[][] = [[-1, 1], [1, 1], [1, -1], [-1, -1]];\n let ds: number[][] = [[2, 0], [0, -2], [-2, 0], [0, 2]];\n for (let side: number = 0; side < 4; ++side) {\n let o: number[] = os[side];\n let d: number[] = ds[side];\n for (let i: number = 0; i < pointsPerSide; ++i) {\n points.push([o[0] + d[0] * i / pointsPerSide,\n o[1] + d[1] * i / pointsPerSide]);\n }\n }\n return points;\n }\n\n private _viewportPointsBoundingBox(viewportPoints: number[][], renderCamera: RenderCamera, transform: Transform): IBoundingBox {\n let basicPoints: number[][] = viewportPoints\n .map(\n (point: number []): number[] => {\n return this._viewportCoords\n .viewportToBasic(point[0], point[1], transform, renderCamera.perspective);\n });\n\n if (transform.gpano != null) {\n return this._boundingBoxPano(basicPoints);\n } else {\n return this._boundingBox(basicPoints);\n }\n }\n\n private _boundingBox(points: number[][]): IBoundingBox {\n let bbox: IBoundingBox = {\n maxX: Number.NEGATIVE_INFINITY,\n maxY: Number.NEGATIVE_INFINITY,\n minX: Number.POSITIVE_INFINITY,\n minY: Number.POSITIVE_INFINITY,\n };\n\n for (let i: number = 0; i < points.length; ++i) {\n bbox.minX = Math.min(bbox.minX, points[i][0]);\n bbox.maxX = Math.max(bbox.maxX, points[i][0]);\n bbox.minY = Math.min(bbox.minY, points[i][1]);\n bbox.maxY = Math.max(bbox.maxY, points[i][1]);\n }\n\n return bbox;\n }\n\n private _boundingBoxPano(points: number[][]): IBoundingBox {\n let xs: number[] = [];\n let ys: number[] = [];\n for (let i: number = 0; i < points.length; ++i) {\n xs.push(points[i][0]);\n ys.push(points[i][1]);\n }\n xs.sort((a, b) => { return this._sign(a - b); });\n ys.sort((a, b) => { return this._sign(a - b); });\n\n let intervalX: number[] = this._intervalPano(xs);\n\n return {\n maxX: intervalX[1],\n maxY: ys[ys.length - 1],\n minX: intervalX[0],\n minY: ys[0],\n };\n }\n\n /**\n * Find the max interval between consecutive numbers.\n * Assumes numbers are between 0 and 1, sorted and that\n * x is equivalent to x + 1.\n */\n private _intervalPano(xs: number[]): number[] {\n let maxdx: number = 0;\n let maxi: number = -1;\n for (let i: number = 0; i < xs.length - 1; ++i) {\n let dx: number = xs[i + 1] - xs[i];\n if (dx > maxdx) {\n maxdx = dx;\n maxi = i;\n }\n }\n let loopdx: number = xs[0] + 1 - xs[xs.length - 1];\n if (loopdx > maxdx) {\n return [xs[0], xs[xs.length - 1]];\n } else {\n return [xs[maxi + 1], xs[maxi]];\n }\n }\n\n private _clipBoundingBox(bbox: IBoundingBox): void {\n bbox.minX = Math.max(0, Math.min(1, bbox.minX));\n bbox.maxX = Math.max(0, Math.min(1, bbox.maxX));\n bbox.minY = Math.max(0, Math.min(1, bbox.minY));\n bbox.maxY = Math.max(0, Math.min(1, bbox.maxY));\n }\n\n private _sign(n: number): number {\n return n > 0 ? 1 : n < 0 ? -1 : 0;\n }\n}\n\nexport default RegionOfInterestCalculator;\n",
+ "import {startWith, publishReplay, refCount} from \"rxjs/operators\";\nimport * as THREE from \"three\";\n\nimport {Observable, Subject, Subscription} from \"rxjs\";\n\nimport {\n ImageTileLoader,\n ImageTileStore,\n IRegionOfInterest,\n} from \"../Tiles\";\n\n/**\n * @class TextureProvider\n *\n * @classdesc Represents a provider of textures.\n */\nexport class TextureProvider {\n private _background: HTMLImageElement;\n private _camera: THREE.OrthographicCamera;\n private _imageTileLoader: ImageTileLoader;\n private _imageTileStore: ImageTileStore;\n private _renderer: THREE.WebGLRenderer;\n private _renderTarget: THREE.WebGLRenderTarget;\n private _roi: IRegionOfInterest;\n\n private _abortFunctions: Function[];\n private _tileSubscriptions: { [key: string]: Subscription };\n\n private _created$: Observable<THREE.Texture>;\n private _createdSubject$: Subject<THREE.Texture>;\n private _createdSubscription: Subscription;\n private _hasSubject$: Subject<boolean>;\n private _has$: Observable<boolean>;\n private _hasSubscription: Subscription;\n private _updated$: Subject<boolean>;\n\n private _disposed: boolean;\n private _height: number;\n private _key: string;\n private _tileSize: number;\n private _maxLevel: number;\n private _currentLevel: number;\n private _renderedCurrentLevelTiles: { [key: string]: boolean };\n private _renderedTiles: { [level: string]: number[][] };\n private _width: number;\n\n /**\n * Create a new node texture provider instance.\n *\n * @param {string} key - The identifier of the image for which to request tiles.\n * @param {number} width - The full width of the original image.\n * @param {number} height - The full height of the original image.\n * @param {number} tileSize - The size used when requesting tiles.\n * @param {HTMLImageElement} background - Image to use as background.\n * @param {ImageTileLoader} imageTileLoader - Loader for retrieving tiles.\n * @param {ImageTileStore} imageTileStore - Store for saving tiles.\n * @param {THREE.WebGLRenderer} renderer - Renderer used for rendering tiles to texture.\n */\n constructor (\n key: string,\n width: number,\n height: number,\n tileSize: number,\n background: HTMLImageElement,\n imageTileLoader: ImageTileLoader,\n imageTileStore: ImageTileStore,\n renderer: THREE.WebGLRenderer) {\n\n this._disposed = false;\n\n this._key = key;\n\n if (width <= 0 || height <= 0) {\n console.warn(`Original image size (${width}, ${height}) is invalid (${key}). Tiles will not be loaded.`);\n }\n\n this._width = width;\n this._height = height;\n this._maxLevel = Math.ceil(Math.log(Math.max(height, width)) / Math.log(2));\n this._currentLevel = -1;\n this._tileSize = tileSize;\n\n this._updated$ = new Subject<boolean>();\n this._createdSubject$ = new Subject<THREE.Texture>();\n this._created$ = this._createdSubject$.pipe(\n publishReplay(1),\n refCount());\n\n this._createdSubscription = this._created$.subscribe(() => { /*noop*/ });\n\n this._hasSubject$ = new Subject<boolean>();\n this._has$ = this._hasSubject$.pipe(\n startWith(false),\n publishReplay(1),\n refCount());\n\n this._hasSubscription = this._has$.subscribe(() => { /*noop*/ });\n\n this._abortFunctions = [];\n this._tileSubscriptions = {};\n this._renderedCurrentLevelTiles = {};\n this._renderedTiles = {};\n\n this._background = background;\n this._camera = null;\n this._imageTileLoader = imageTileLoader;\n this._imageTileStore = imageTileStore;\n this._renderer = renderer;\n this._renderTarget = null;\n this._roi = null;\n }\n\n /**\n * Get disposed.\n *\n * @returns {boolean} Value indicating whether provider has\n * been disposed.\n */\n public get disposed(): boolean {\n return this._disposed;\n }\n\n /**\n * Get hasTexture$.\n *\n * @returns {Observable<boolean>} Observable emitting\n * values indicating when the existance of a texture\n * changes.\n */\n public get hasTexture$(): Observable<boolean> {\n return this._has$;\n }\n\n /**\n * Get key.\n *\n * @returns {boolean} The identifier of the image for\n * which to render textures.\n */\n public get key(): string {\n return this._key;\n }\n\n /**\n * Get textureUpdated$.\n *\n * @returns {Observable<boolean>} Observable emitting\n * values when an existing texture has been updated.\n */\n public get textureUpdated$(): Observable<boolean> {\n return this._updated$;\n }\n\n /**\n * Get textureCreated$.\n *\n * @returns {Observable<boolean>} Observable emitting\n * values when a new texture has been created.\n */\n public get textureCreated$(): Observable<THREE.Texture> {\n return this._created$;\n }\n\n /**\n * Abort all outstanding image tile requests.\n */\n public abort(): void {\n for (let key in this._tileSubscriptions) {\n if (!this._tileSubscriptions.hasOwnProperty(key)) {\n continue;\n }\n\n this._tileSubscriptions[key].unsubscribe();\n }\n\n this._tileSubscriptions = {};\n\n for (let abort of this._abortFunctions) {\n abort();\n }\n\n this._abortFunctions = [];\n }\n\n /**\n * Dispose the provider.\n *\n * @description Disposes all cached assets and\n * aborts all outstanding image tile requests.\n */\n public dispose(): void {\n if (this._disposed) {\n console.warn(`Texture already disposed (${this._key})`);\n return;\n }\n\n this.abort();\n\n if (this._renderTarget != null) {\n this._renderTarget.dispose();\n this._renderTarget = null;\n }\n\n this._imageTileStore.dispose();\n this._imageTileStore = null;\n\n this._background = null;\n this._camera = null;\n this._imageTileLoader = null;\n this._renderer = null;\n this._roi = null;\n\n this._createdSubscription.unsubscribe();\n this._hasSubscription.unsubscribe();\n\n this._disposed = true;\n }\n\n /**\n * Set the region of interest.\n *\n * @description When the region of interest is set the\n * the tile level is determined and tiles for the region\n * are fetched from the store or the loader and renderedLevel\n * to the texture.\n *\n * @param {IRegionOfInterest} roi - Spatial edges to cache.\n */\n public setRegionOfInterest(roi: IRegionOfInterest): void {\n if (this._width <= 0 || this._height <= 0) {\n return;\n }\n\n this._roi = roi;\n\n let width: number = 1 / this._roi.pixelWidth;\n let height: number = 1 / this._roi.pixelHeight;\n let size: number = Math.max(height, width);\n\n let currentLevel: number = Math.max(0, Math.min(this._maxLevel, Math.ceil(Math.log(size) / Math.log(2))));\n if (currentLevel !== this._currentLevel) {\n this.abort();\n\n this._currentLevel = currentLevel;\n if (!(this._currentLevel in this._renderedTiles)) {\n this._renderedTiles[this._currentLevel] = [];\n }\n\n this._renderedCurrentLevelTiles = {};\n for (let tile of this._renderedTiles[this._currentLevel]) {\n this._renderedCurrentLevelTiles[this._tileKey(this._tileSize, tile)] = true;\n }\n }\n\n let topLeft: number[] = this._getTileCoords([this._roi.bbox.minX, this._roi.bbox.minY]);\n let bottomRight: number[] = this._getTileCoords([this._roi.bbox.maxX, this._roi.bbox.maxY]);\n\n let tiles: number[][] = this._getTiles(topLeft, bottomRight);\n\n if (this._camera == null) {\n this._camera = new THREE.OrthographicCamera(\n -this._width / 2,\n this._width / 2,\n this._height / 2,\n -this._height / 2,\n -1,\n 1);\n\n this._camera.position.z = 1;\n\n let gl: WebGLRenderingContext = this._renderer.getContext();\n let maxTextureSize: number = gl.getParameter(gl.MAX_TEXTURE_SIZE);\n let backgroundSize: number = Math.max(this._width, this._height);\n let scale: number = maxTextureSize > backgroundSize ? 1 : maxTextureSize / backgroundSize;\n\n let targetWidth: number = Math.floor(scale * this._width);\n let targetHeight: number = Math.floor(scale * this._height);\n\n this._renderTarget = new THREE.WebGLRenderTarget(\n targetWidth,\n targetHeight,\n {\n depthBuffer: false,\n format: THREE.RGBFormat,\n magFilter: THREE.LinearFilter,\n minFilter: THREE.LinearFilter,\n stencilBuffer: false,\n });\n\n this._renderToTarget(0, 0, this._width, this._height, this._background);\n\n this._createdSubject$.next((<any>this._renderTarget).texture);\n this._hasSubject$.next(true);\n }\n\n this._fetchTiles(tiles);\n }\n\n public setTileSize(tileSize: number): void {\n this._tileSize = tileSize;\n }\n\n /**\n * Update the image used as background for the texture.\n *\n * @param {HTMLImageElement} background - The background image.\n */\n public updateBackground(background: HTMLImageElement): void {\n this._background = background;\n }\n\n /**\n * Retrieve an image tile.\n *\n * @description Retrieve an image tile and render it to the\n * texture. Add the tile to the store and emit to the updated\n * observable.\n *\n * @param {Array<number>} tile - The tile coordinates.\n * @param {number} level - The tile level.\n * @param {number} x - The top left x pixel coordinate of the tile.\n * @param {number} y - The top left y pixel coordinate of the tile.\n * @param {number} w - The pixel width of the tile.\n * @param {number} h - The pixel height of the tile.\n * @param {number} scaledW - The scaled width of the returned tile.\n * @param {number} scaledH - The scaled height of the returned tile.\n */\n private _fetchTile(\n tile: number[],\n level: number,\n x: number,\n y: number,\n w: number,\n h: number,\n scaledX: number,\n scaledY: number): void {\n\n let getTile: [Observable<HTMLImageElement>, Function] =\n this._imageTileLoader.getTile(this._key, x, y, w, h, scaledX, scaledY);\n\n let tile$: Observable<HTMLImageElement> = getTile[0];\n let abort: Function = getTile[1];\n\n this._abortFunctions.push(abort);\n\n let tileKey: string = this._tileKey(this._tileSize, tile);\n\n let subscription: Subscription = tile$\n .subscribe(\n (image: HTMLImageElement): void => {\n this._renderToTarget(x, y, w, h, image);\n\n this._removeFromDictionary(tileKey, this._tileSubscriptions);\n this._removeFromArray(abort, this._abortFunctions);\n\n this._setTileRendered(tile, this._currentLevel);\n\n this._imageTileStore.addImage(image, tileKey, level);\n\n this._updated$.next(true);\n },\n (error: Error): void => {\n this._removeFromDictionary(tileKey, this._tileSubscriptions);\n this._removeFromArray(abort, this._abortFunctions);\n\n console.error(error);\n });\n\n if (!subscription.closed) {\n this._tileSubscriptions[tileKey] = subscription;\n }\n }\n\n /**\n * Retrieve image tiles.\n *\n * @description Retrieve a image tiles and render them to the\n * texture. Retrieve from store if it exists, otherwise Retrieve\n * from loader.\n *\n * @param {Array<Array<number>>} tiles - Array of tile coordinates to\n * retrieve.\n */\n private _fetchTiles(tiles: number[][]): void {\n let tileSize: number = this._tileSize * Math.pow(2, this._maxLevel - this._currentLevel);\n\n for (let tile of tiles) {\n let tileKey: string = this._tileKey(this._tileSize, tile);\n if (tileKey in this._renderedCurrentLevelTiles ||\n tileKey in this._tileSubscriptions) {\n continue;\n }\n\n let tileX: number = tileSize * tile[0];\n let tileY: number = tileSize * tile[1];\n let tileWidth: number = tileX + tileSize > this._width ? this._width - tileX : tileSize;\n let tileHeight: number = tileY + tileSize > this._height ? this._height - tileY : tileSize;\n\n if (this._imageTileStore.hasImage(tileKey, this._currentLevel)) {\n this._renderToTarget(tileX, tileY, tileWidth, tileHeight, this._imageTileStore.getImage(tileKey, this._currentLevel));\n this._setTileRendered(tile, this._currentLevel);\n\n this._updated$.next(true);\n continue;\n }\n\n let scaledX: number = Math.floor(tileWidth / tileSize * this._tileSize);\n let scaledY: number = Math.floor(tileHeight / tileSize * this._tileSize);\n\n this._fetchTile(tile, this._currentLevel, tileX, tileY, tileWidth, tileHeight, scaledX, scaledY);\n }\n }\n\n /**\n * Get tile coordinates for a point using the current level.\n *\n * @param {Array<number>} point - Point in basic coordinates.\n *\n * @returns {Array<number>} x and y tile coodinates.\n */\n private _getTileCoords(point: number[]): number[] {\n let tileSize: number = this._tileSize * Math.pow(2, this._maxLevel - this._currentLevel);\n\n let maxX: number = Math.ceil(this._width / tileSize) - 1;\n let maxY: number = Math.ceil(this._height / tileSize) - 1;\n\n return [\n Math.min(Math.floor(this._width * point[0] / tileSize), maxX),\n Math.min(Math.floor(this._height * point[1] / tileSize), maxY),\n ];\n }\n\n /**\n * Get tile coordinates for all tiles contained in a bounding\n * box.\n *\n * @param {Array<number>} topLeft - Top left tile coordinate of bounding box.\n * @param {Array<number>} bottomRight - Bottom right tile coordinate of bounding box.\n *\n * @returns {Array<Array<number>>} Array of x, y tile coodinates.\n */\n private _getTiles(topLeft: number[], bottomRight: number[]): number[][] {\n let xs: number[] = [];\n\n if (topLeft[0] > bottomRight[0]) {\n let tileSize: number = this._tileSize * Math.pow(2, this._maxLevel - this._currentLevel);\n let maxX: number = Math.ceil(this._width / tileSize) - 1;\n\n for (let x: number = topLeft[0]; x <= maxX; x++) {\n xs.push(x);\n }\n\n for (let x: number = 0; x <= bottomRight[0]; x++) {\n xs.push(x);\n }\n } else {\n for (let x: number = topLeft[0]; x <= bottomRight[0]; x++) {\n xs.push(x);\n }\n }\n\n let tiles: number[][] = [];\n\n for (let x of xs) {\n for (let y: number = topLeft[1]; y <= bottomRight[1]; y++) {\n tiles.push([x, y]);\n }\n }\n\n return tiles;\n }\n\n /**\n * Remove an item from an array if it exists in array.\n *\n * @param {T} item - Item to remove.\n * @param {Array<T>} array - Array from which item should be removed.\n */\n private _removeFromArray<T>(item: T, array: T[]): void {\n let index: number = array.indexOf(item);\n if (index !== -1) {\n array.splice(index, 1);\n }\n }\n\n /**\n * Remove an item from a dictionary.\n *\n * @param {string} key - Key of the item to remove.\n * @param {Object} dict - Dictionary from which item should be removed.\n */\n private _removeFromDictionary<T>(key: string, dict: { [key: string]: T }): void {\n if (key in dict) {\n delete dict[key];\n }\n }\n\n /**\n * Render an image tile to the target texture.\n *\n * @param {number} x - The top left x pixel coordinate of the tile.\n * @param {number} y - The top left y pixel coordinate of the tile.\n * @param {number} w - The pixel width of the tile.\n * @param {number} h - The pixel height of the tile.\n * @param {HTMLImageElement} background - The image tile to render.\n */\n private _renderToTarget(x: number, y: number, w: number, h: number, image: HTMLImageElement): void {\n let texture: THREE.Texture = new THREE.Texture(image);\n texture.minFilter = THREE.LinearFilter;\n texture.needsUpdate = true;\n\n let geometry: THREE.PlaneGeometry = new THREE.PlaneGeometry(w, h);\n let material: THREE.MeshBasicMaterial = new THREE.MeshBasicMaterial({ map: texture, side: THREE.FrontSide });\n\n let mesh: THREE.Mesh = new THREE.Mesh(geometry, material);\n mesh.position.x = -this._width / 2 + x + w / 2;\n mesh.position.y = this._height / 2 - y - h / 2;\n\n let scene: THREE.Scene = new THREE.Scene();\n scene.add(mesh);\n\n this._renderer.render(scene, this._camera, this._renderTarget);\n this._renderer.setRenderTarget(undefined);\n\n scene.remove(mesh);\n\n geometry.dispose();\n material.dispose();\n texture.dispose();\n }\n\n /**\n * Mark a tile as rendered.\n *\n * @description Clears tiles marked as rendered in other\n * levels of the tile pyramid if they were rendered on\n * top of or below the tile.\n *\n * @param {Arrary<number>} tile - The tile coordinates.\n * @param {number} level - Tile level of the tile coordinates.\n */\n private _setTileRendered(tile: number[], level: number): void {\n let otherLevels: number[] =\n Object.keys(this._renderedTiles)\n .map(\n (key: string): number => {\n return parseInt(key, 10);\n })\n .filter(\n (renderedLevel: number): boolean => {\n return renderedLevel !== level;\n });\n\n for (let otherLevel of otherLevels) {\n let scale: number = Math.pow(2, otherLevel - level);\n\n if (otherLevel < level) {\n let x: number = Math.floor(scale * tile[0]);\n let y: number = Math.floor(scale * tile[1]);\n\n for (let otherTile of this._renderedTiles[otherLevel].slice()) {\n if (otherTile[0] === x && otherTile[1] === y) {\n let index: number = this._renderedTiles[otherLevel].indexOf(otherTile);\n this._renderedTiles[otherLevel].splice(index, 1);\n }\n }\n } else {\n let startX: number = scale * tile[0];\n let endX: number = startX + scale - 1;\n let startY: number = scale * tile[1];\n let endY: number = startY + scale - 1;\n\n for (let otherTile of this._renderedTiles[otherLevel].slice()) {\n if (otherTile[0] >= startX && otherTile[0] <= endX &&\n otherTile[1] >= startY && otherTile[1] <= endY) {\n let index: number = this._renderedTiles[otherLevel].indexOf(otherTile);\n this._renderedTiles[otherLevel].splice(index, 1);\n\n }\n }\n }\n\n if (this._renderedTiles[otherLevel].length === 0) {\n delete this._renderedTiles[otherLevel];\n }\n }\n\n this._renderedTiles[level].push(tile);\n this._renderedCurrentLevelTiles[this._tileKey(this._tileSize, tile)] = true;\n }\n\n /**\n * Create a tile key from a tile coordinates.\n *\n * @description Tile keys are used as a hash for\n * storing the tile in a dictionary.\n *\n * @param {number} tileSize - The tile size.\n * @param {Arrary<number>} tile - The tile coordinates.\n */\n private _tileKey(tileSize: number, tile: number[]): string {\n return tileSize + \"-\" + tile[0] + \"-\" + tile[1];\n }\n}\n\nexport default TextureProvider;\n",
+ "export class DOM {\n private _document: HTMLDocument;\n\n constructor(doc?: Node) {\n this._document = !!doc ? <HTMLDocument>doc : document;\n }\n\n public get document(): HTMLDocument {\n return this._document;\n }\n\n public createElement<K extends keyof HTMLElementTagNameMap>(\n tagName: K, className?: string, container?: HTMLElement): HTMLElementTagNameMap[K] {\n const element: HTMLElement = this._document.createElement(tagName);\n\n if (!!className) {\n element.className = className;\n }\n\n if (!!container) {\n container.appendChild(element);\n }\n\n return element;\n }\n}\n\nexport default DOM;\n",
"export class EventEmitter {\n private _events: {[eventType: string]: any[]};\n\n constructor () {\n this._events = {};\n }\n\n /**\n * Subscribe to an event by its name.\n * @param {string }eventType - The name of the event to subscribe to.\n * @param {any} fn - The handler called when the event occurs.\n */\n public on(eventType: string, fn: any): void {\n this._events[eventType] = this._events[eventType] || [];\n this._events[eventType].push(fn);\n return;\n }\n\n /**\n * Unsubscribe from an event by its name.\n * @param {string} eventType - The name of the event to subscribe to.\n * @param {any} fn - The handler to remove.\n */\n public off(eventType: string, fn: any): void {\n if (!eventType) {\n this._events = {};\n return;\n }\n\n if (!this._listens(eventType)) {\n let idx: number = this._events[eventType].indexOf(fn);\n if (idx >= 0) {\n this._events[eventType].splice(idx, 1);\n }\n if (this._events[eventType].length) {\n delete this._events[eventType];\n }\n } else {\n delete this._events[eventType];\n }\n\n return;\n }\n\n public fire(eventType: string, data: any): void {\n if (!this._listens(eventType)) {\n return;\n }\n\n for (let fn of this._events[eventType]) {\n fn.call(this, data);\n }\n return;\n }\n\n private _listens(eventType: string): boolean {\n return !!(this._events && this._events[eventType]);\n }\n}\n\nexport default EventEmitter;\n",
- "import {IViewerOptions} from \"../Viewer\";\nimport {ImageSize} from \"../Viewer\";\n\nexport class Settings {\n private static _baseImageSize: number;\n private static _basePanoramaSize: number;\n private static _maxImageSize: number;\n\n public static setOptions(options: IViewerOptions): void {\n Settings._baseImageSize = options.baseImageSize != null ?\n options.baseImageSize :\n ImageSize.Size640;\n\n Settings._basePanoramaSize = options.basePanoramaSize != null ?\n options.basePanoramaSize :\n ImageSize.Size2048;\n\n Settings._maxImageSize = options.maxImageSize != null ?\n options.maxImageSize :\n ImageSize.Size2048;\n }\n\n public static get baseImageSize(): number {\n return Settings._baseImageSize;\n }\n\n public static get basePanoramaSize(): number {\n return Settings._basePanoramaSize;\n }\n\n public static get maxImageSize(): number {\n return Settings._maxImageSize;\n }\n}\n\nexport default Settings;\n",
- "export class Urls {\n public static get tileScheme(): string {\n return \"https\";\n }\n\n public static get tileDomain(): string {\n return \"d2qb1440i7l50o.cloudfront.net\";\n }\n\n public static get origin(): string {\n return \"mapillary.webgl\";\n }\n\n public static thumbnail(key: string, size: number): string {\n return `https://d1cuyjsrcm0gby.cloudfront.net/${key}/thumb-${size}.jpg?origin=${this.origin}`;\n }\n\n public static falcorModel(clientId: string): string {\n return `https://a.mapillary.com/v3/model.json?client_id=${clientId}`;\n }\n\n public static protoMesh(key: string): string {\n return `https://d1brzeo354iq2l.cloudfront.net/v2/mesh/${key}`;\n }\n}\n\nexport default Urls;\n",
+ "import {\n ImageSize,\n IViewerOptions,\n} from \"../Viewer\";\n\nexport class Settings {\n private static _baseImageSize: number;\n private static _basePanoramaSize: number;\n private static _maxImageSize: number;\n\n public static setOptions(options: IViewerOptions): void {\n Settings._baseImageSize = options.baseImageSize != null ?\n options.baseImageSize :\n ImageSize.Size640;\n\n Settings._basePanoramaSize = options.basePanoramaSize != null ?\n options.basePanoramaSize :\n ImageSize.Size2048;\n\n Settings._maxImageSize = options.maxImageSize != null ?\n options.maxImageSize :\n ImageSize.Size2048;\n }\n\n public static get baseImageSize(): number {\n return Settings._baseImageSize;\n }\n\n public static get basePanoramaSize(): number {\n return Settings._basePanoramaSize;\n }\n\n public static get maxImageSize(): number {\n return Settings._maxImageSize;\n }\n}\n\nexport default Settings;\n",
+ "export function isBrowser(): boolean {\n return typeof window !== \"undefined\" && typeof document !== \"undefined\";\n}\n\nexport function isArraySupported(): boolean {\n return !!(\n Array.prototype &&\n Array.prototype.filter &&\n Array.prototype.indexOf &&\n Array.prototype.map &&\n Array.prototype.reverse\n );\n}\n\nexport function isFunctionSupported(): boolean {\n return !!(Function.prototype && Function.prototype.bind);\n}\n\nexport function isJSONSupported(): boolean {\n return \"JSON\" in window && \"parse\" in JSON && \"stringify\" in JSON;\n}\n\nexport function isObjectSupported(): boolean {\n return !!(\n Object.keys &&\n Object.assign\n );\n}\n\nexport function isBlobSupported(): boolean {\n return \"Blob\" in window && \"URL\" in window;\n}\n\nlet isWebGLSupportedCache: boolean = undefined;\nexport function isWebGLSupportedCached(): boolean {\n if (isWebGLSupportedCache === undefined) {\n isWebGLSupportedCache = isWebGLSupported();\n }\n\n return isWebGLSupportedCache;\n}\n\nexport function isWebGLSupported(): boolean {\n const webGLContextAttributes: WebGLContextAttributes = {\n alpha: false,\n antialias: false,\n depth: true,\n failIfMajorPerformanceCaveat: false,\n premultipliedAlpha: true,\n preserveDrawingBuffer: false,\n stencil: true,\n };\n\n const canvas: HTMLCanvasElement = document.createElement(\"canvas\");\n const context: WebGLRenderingContext =\n canvas.getContext(\"webgl\", webGLContextAttributes) ||\n canvas.getContext(\"experimental-webgl\", webGLContextAttributes);\n\n if (!context) {\n return false;\n }\n\n const requiredExtensions: string[] = [\n \"OES_standard_derivatives\",\n ];\n\n const supportedExtensions: string[] = context.getSupportedExtensions();\n for (const requiredExtension of requiredExtensions) {\n if (supportedExtensions.indexOf(requiredExtension) === -1) {\n return false;\n }\n }\n\n return true;\n}\n",
+ "import {IUrlOptions} from \"../Viewer\";\n\nexport class Urls {\n private static _apiHost: string = \"a.mapillary.com\";\n private static _atomicReconstructionHost: string = \"atomic-reconstructions.mapillary.com\";\n private static _exploreHost: string = \"www.mapillary.com\";\n private static _imageHost: string = \"images.mapillary.com\";\n private static _imageTileHost: string = \"loris.mapillary.com\";\n private static _meshHost: string = \"meshes.mapillary.com\";\n private static _origin: string = \"mapillary.webgl\";\n private static _scheme: string = \"https\";\n\n public static get explore(): string {\n return `${Urls._scheme}://${Urls._exploreHost}`;\n }\n\n public static get origin(): string {\n return Urls._origin;\n }\n\n public static get tileScheme(): string {\n return Urls._scheme;\n }\n\n public static get tileDomain(): string {\n return Urls._imageTileHost;\n }\n\n public static atomicReconstruction(key: string): string {\n return `${Urls._scheme}://${Urls._atomicReconstructionHost}/${key}/sfm/v1.0/atomic_reconstruction.json`;\n }\n\n public static exporeImage(key: string): string {\n return `${Urls._scheme}://${Urls._exploreHost}/app/?pKey=${key}&focus=photo`;\n }\n\n public static exporeUser(username: string): string {\n return `${Urls._scheme}://${Urls._exploreHost}/app/user/${username}`;\n }\n\n public static falcorModel(clientId: string): string {\n return `${Urls._scheme}://${Urls._apiHost}/v3/model.json?client_id=${clientId}`;\n }\n\n public static protoMesh(key: string): string {\n return `${Urls._scheme}://${Urls._meshHost}/v2/mesh/${key}`;\n }\n\n public static thumbnail(key: string, size: number, origin?: string): string {\n const query: string = !!origin ? `?origin=${origin}` : \"\";\n\n return `${Urls._scheme}://${Urls._imageHost}/${key}/thumb-${size}.jpg${query}`;\n }\n\n public static setOptions(options: IUrlOptions): void {\n if (!options) {\n return;\n }\n\n if (!!options.apiHost) {\n Urls._apiHost = options.apiHost;\n }\n\n if (!!options.atomicReconstructionHost) {\n Urls._atomicReconstructionHost = options.atomicReconstructionHost;\n }\n\n if (!!options.exploreHost) {\n Urls._exploreHost = options.exploreHost;\n }\n\n if (!!options.imageHost) {\n Urls._imageHost = options.imageHost;\n }\n\n if (!!options.imageTileHost) {\n Urls._imageTileHost = options.imageTileHost;\n }\n\n if (!!options.meshHost) {\n Urls._meshHost = options.meshHost;\n }\n\n if (!!options.scheme) {\n Urls._scheme = options.scheme;\n }\n }\n}\n\nexport default Urls;\n",
"/**\n * Enumeration for alignments\n * @enum {number}\n * @readonly\n */\nexport enum Alignment {\n /**\n * Align to bottom\n */\n Bottom,\n\n /**\n * Align to bottom left\n */\n BottomLeft,\n\n /**\n * Align to bottom right\n */\n BottomRight,\n\n /**\n * Align to center\n */\n Center,\n\n /**\n * Align to left\n */\n Left,\n\n /**\n * Align to right\n */\n Right,\n\n /**\n * Align to top\n */\n Top,\n\n /**\n * Align to top left\n */\n TopLeft,\n\n /**\n * Align to top right\n */\n TopRight,\n}\n\nexport default Alignment;\n",
- "import {Observable} from \"rxjs/Observable\";\nimport {Subscription} from \"rxjs/Subscription\";\n\nimport \"rxjs/add/operator/bufferCount\";\nimport \"rxjs/add/operator/delay\";\nimport \"rxjs/add/operator/distinctUntilChanged\";\nimport \"rxjs/add/operator/map\";\nimport \"rxjs/add/operator/switchMap\";\n\nimport {\n Graph,\n GraphService,\n Node,\n} from \"../Graph\";\nimport {\n IFrame,\n StateService,\n} from \"../State\";\n\nexport class CacheService {\n private _graphService: GraphService;\n private _stateService: StateService;\n\n private _started: boolean;\n\n private _uncacheSubscription: Subscription;\n\n constructor(graphService: GraphService, stateService: StateService) {\n this._graphService = graphService;\n this._stateService = stateService;\n\n this._started = false;\n }\n\n public get started(): boolean {\n return this._started;\n }\n\n public start(): void {\n if (this._started) {\n return;\n }\n\n this._uncacheSubscription = this._stateService.currentState$\n .distinctUntilChanged(\n undefined,\n (frame: IFrame): string => {\n return frame.state.currentNode.key;\n })\n .map(\n (frame: IFrame): string[] => {\n return frame.state.trajectory\n .map(\n (n: Node): string => {\n return n.key;\n });\n })\n .bufferCount(1, 5)\n .switchMap(\n (keepKeysBuffer: string[][]): Observable<Graph> => {\n let keepKeys: string[] = keepKeysBuffer[0];\n\n return this._graphService.uncache$(keepKeys);\n })\n .subscribe(() => { /*noop*/ });\n\n this._started = true;\n }\n\n public stop(): void {\n if (!this._started) {\n return;\n }\n\n this._uncacheSubscription.unsubscribe();\n this._uncacheSubscription = null;\n\n this._started = false;\n }\n}\n\nexport default CacheService;\n",
- "import {Observable} from \"rxjs/Observable\";\n\nimport {Node} from \"../Graph\";\nimport {Container, Navigator} from \"../Viewer\";\nimport {CoverComponent, ComponentService, ICoverConfiguration, Component, IComponentConfiguration} from \"../Component\";\nimport {IComponentOptions, Observer} from \"../Viewer\";\n\nexport class ComponentController {\n private _container: Container;\n private _coverComponent: CoverComponent;\n private _observer: Observer;\n private _navigator: Navigator;\n private _componentService: ComponentService;\n private _options: IComponentOptions;\n private _key: string;\n\n constructor(\n container: Container,\n navigator: Navigator,\n observer: Observer,\n key: string, options:\n IComponentOptions) {\n this._container = container;\n this._observer = observer;\n this._navigator = navigator;\n this._options = options != null ? options : {};\n this._key = key;\n this._componentService = new ComponentService(this._container, this._navigator);\n this._coverComponent = this._componentService.getCover();\n\n this._initializeComponents();\n\n if (key) {\n this._initilizeCoverComponent();\n this._subscribeCoverComponent();\n } else {\n this._navigator.movedToKey$\n .first(\n (k: string): boolean => {\n return k != null;\n })\n .subscribe(\n (k: string): void => {\n this._key = k;\n this._componentService.deactivateCover();\n this._coverComponent.configure({ key: this._key, loading: false, visible: false });\n this._subscribeCoverComponent();\n this._navigator.stateService.start();\n this._observer.startEmit();\n });\n }\n }\n\n public get<TComponent extends Component<IComponentConfiguration>>(name: string): TComponent {\n return this._componentService.get<TComponent>(name);\n }\n\n public activate(name: string): void {\n this._componentService.activate(name);\n }\n\n public activateCover(): void {\n this._coverComponent.configure({ loading: false, visible: true });\n }\n\n public deactivate(name: string): void {\n this._componentService.deactivate(name);\n }\n\n public deactivateCover(): void {\n this._coverComponent.configure({ loading: true, visible: true });\n }\n\n public resize(): void {\n this._componentService.resize();\n }\n\n private _initializeComponents(): void {\n let options: IComponentOptions = this._options;\n\n this._uFalse(options.background, \"background\");\n this._uFalse(options.debug, \"debug\");\n this._uFalse(options.image, \"image\");\n this._uFalse(options.marker, \"marker\");\n this._uFalse(options.navigation, \"navigation\");\n this._uFalse(options.popup, \"popup\");\n this._uFalse(options.route, \"route\");\n this._uFalse(options.slider, \"slider\");\n this._uFalse(options.tag, \"tag\");\n\n this._uTrue(options.attribution, \"attribution\");\n this._uTrue(options.bearing, \"bearing\");\n this._uTrue(options.cache, \"cache\");\n this._uTrue(options.direction, \"direction\");\n this._uTrue(options.imagePlane, \"imagePlane\");\n this._uTrue(options.keyboard, \"keyboard\");\n this._uTrue(options.loading, \"loading\");\n this._uTrue(options.mouse, \"mouse\");\n this._uTrue(options.sequence, \"sequence\");\n this._uTrue(options.stats, \"stats\");\n }\n\n private _initilizeCoverComponent(): void {\n let options: IComponentOptions = this._options;\n\n this._coverComponent.configure({ key: this._key });\n if (options.cover === undefined || options.cover) {\n this.activateCover();\n } else {\n this.deactivateCover();\n }\n }\n\n private _subscribeCoverComponent(): void {\n this._coverComponent.configuration$.subscribe((conf: ICoverConfiguration) => {\n if (conf.loading) {\n this._navigator.stateService.currentKey$\n .first()\n .switchMap(\n (key: string): Observable<Node> => {\n return key == null || key !== conf.key ?\n this._navigator.moveToKey$(conf.key) :\n this._navigator.stateService.currentNode$\n .first();\n })\n .subscribe(\n (node: Node): void => {\n this._navigator.stateService.start();\n this._observer.startEmit();\n this._coverComponent.configure({ loading: false, visible: false });\n this._componentService.deactivateCover();\n },\n (error: Error): void => {\n console.error(\"Failed to deactivate cover.\", error);\n\n this._coverComponent.configure({ loading: false, visible: true });\n });\n } else if (conf.visible) {\n this._observer.stopEmit();\n this._navigator.stateService.stop();\n this._componentService.activateCover();\n }\n });\n }\n\n private _uFalse<TConfiguration extends IComponentConfiguration>(option: boolean | TConfiguration, name: string): void {\n if (option === undefined) {\n this._componentService.deactivate(name);\n return;\n }\n if (typeof option === \"boolean\") {\n if (option) {\n this._componentService.activate(name);\n } else {\n this._componentService.deactivate(name);\n }\n return;\n }\n this._componentService.configure(name, <TConfiguration>option);\n this._componentService.activate(name);\n }\n\n private _uTrue<TConfiguration extends IComponentConfiguration>(option: boolean | TConfiguration, name: string): void {\n if (option === undefined) {\n this._componentService.activate(name);\n return;\n }\n if (typeof option === \"boolean\") {\n if (option) {\n this._componentService.activate(name);\n } else {\n this._componentService.deactivate(name);\n }\n return;\n }\n this._componentService.configure(name, <TConfiguration>option);\n this._componentService.activate(name);\n }\n}\n",
- "import {\n GLRenderer,\n DOMRenderer,\n RenderService,\n} from \"../Render\";\nimport {StateService} from \"../State\";\nimport {\n IViewerOptions,\n MouseService,\n TouchService,\n SpriteService,\n} from \"../Viewer\";\n\nexport class Container {\n public id: string;\n\n public renderService: RenderService;\n\n public glRenderer: GLRenderer;\n public domRenderer: DOMRenderer;\n\n public mouseService: MouseService;\n public touchService: TouchService;\n\n public spriteService: SpriteService;\n\n private _canvasContainer: HTMLElement;\n private _container: HTMLElement;\n private _domContainer: HTMLElement;\n\n constructor (id: string, stateService: StateService, options: IViewerOptions) {\n this.id = id;\n\n this._container = document.getElementById(id);\n\n if (!this._container) {\n throw new Error(`Container '${id}' not found.`);\n }\n\n this._container.classList.add(\"mapillary-js\");\n\n this._canvasContainer = document.createElement(\"div\");\n this._canvasContainer.className = \"mapillary-js-interactive\";\n\n this._domContainer = document.createElement(\"div\");\n this._domContainer.className = \"mapillary-js-dom\";\n\n this._container.appendChild(this._canvasContainer);\n this._container.appendChild(this._domContainer);\n\n this.renderService = new RenderService(this._container, stateService.currentState$, options.renderMode);\n\n this.glRenderer = new GLRenderer(this._canvasContainer, this.renderService);\n this.domRenderer = new DOMRenderer(this._domContainer, this.renderService, stateService.currentState$);\n\n this.mouseService = new MouseService(this._container, this._canvasContainer, this._domContainer);\n this.touchService = new TouchService(this._canvasContainer, this._domContainer);\n\n this.spriteService = new SpriteService(options.sprite);\n }\n\n public get element(): HTMLElement {\n return this._container;\n }\n\n public get canvasContainer(): HTMLElement {\n return this.canvasContainer;\n }\n}\n\nexport default Container;\n",
+ "import {\n empty as observableEmpty,\n from as observableFrom,\n Observable,\n Subscription,\n} from \"rxjs\";\n\nimport {\n catchError,\n timeout,\n first,\n distinctUntilChanged,\n map,\n bufferCount,\n withLatestFrom,\n switchMap,\n skip,\n mergeMap,\n} from \"rxjs/operators\";\n\nimport {\n GraphMode,\n GraphService,\n IEdgeStatus,\n Node,\n} from \"../Graph\";\nimport {\n IFrame,\n StateService,\n} from \"../State\";\n\nexport class CacheService {\n private _graphService: GraphService;\n private _stateService: StateService;\n\n private _started: boolean;\n\n private _uncacheSubscription: Subscription;\n private _cacheNodeSubscription: Subscription;\n\n constructor(graphService: GraphService, stateService: StateService) {\n this._graphService = graphService;\n this._stateService = stateService;\n\n this._started = false;\n }\n\n public get started(): boolean {\n return this._started;\n }\n\n public start(): void {\n if (this._started) {\n return;\n }\n\n this._uncacheSubscription = this._stateService.currentState$.pipe(\n distinctUntilChanged(\n undefined,\n (frame: IFrame): string => {\n return frame.state.currentNode.key;\n }),\n map(\n (frame: IFrame): [string[], string] => {\n const trajectory: Node[] = frame.state.trajectory;\n const trajectoryKeys: string[] = trajectory\n .map(\n (n: Node): string => {\n return n.key;\n });\n\n const sequenceKey: string = trajectory[trajectory.length - 1].sequenceKey;\n\n return [trajectoryKeys, sequenceKey];\n }),\n bufferCount(1, 5),\n withLatestFrom(this._graphService.graphMode$),\n switchMap(\n ([keepBuffer, graphMode]: [[string[], string][], GraphMode]): Observable<void> => {\n let keepKeys: string[] = keepBuffer[0][0];\n let keepSequenceKey: string = graphMode === GraphMode.Sequence ?\n keepBuffer[0][1] : undefined;\n\n return this._graphService.uncache$(keepKeys, keepSequenceKey);\n }))\n .subscribe(() => { /*noop*/ });\n\n this._cacheNodeSubscription = this._graphService.graphMode$.pipe(\n skip(1),\n withLatestFrom(this._stateService.currentState$),\n switchMap(\n ([mode, frame]: [GraphMode, IFrame]): Observable<IEdgeStatus> => {\n return mode === GraphMode.Sequence ?\n this._keyToEdges(\n frame.state.currentNode.key,\n (node: Node): Observable<IEdgeStatus> => {\n return node.sequenceEdges$;\n }) :\n observableFrom(frame.state.trajectory\n .map(\n (node: Node): string => {\n return node.key;\n })\n .slice(frame.state.currentIndex)).pipe(\n mergeMap(\n (key: string): Observable<IEdgeStatus> => {\n return this._keyToEdges(\n key,\n (node: Node): Observable<IEdgeStatus> => {\n return node.spatialEdges$;\n });\n },\n 6));\n }))\n .subscribe(() => { /*noop*/ });\n\n this._started = true;\n }\n\n public stop(): void {\n if (!this._started) {\n return;\n }\n\n this._uncacheSubscription.unsubscribe();\n this._uncacheSubscription = null;\n\n this._cacheNodeSubscription.unsubscribe();\n this._cacheNodeSubscription = null;\n\n this._started = false;\n }\n\n private _keyToEdges(key: string, nodeToEdgeMap: (node: Node) => Observable<IEdgeStatus>): Observable<IEdgeStatus> {\n return this._graphService.cacheNode$(key).pipe(\n switchMap(nodeToEdgeMap),\n first(\n (status: IEdgeStatus): boolean => {\n return status.cached;\n }),\n timeout(15000),\n catchError(\n (error: Error): Observable<IEdgeStatus> => {\n console.error(`Failed to cache edges (${key}).`, error);\n\n return observableEmpty();\n }));\n }\n}\n\nexport default CacheService;\n",
+ "import {first, switchMap, distinctUntilChanged} from \"rxjs/operators\";\nimport {Observable} from \"rxjs\";\n\nimport {Node} from \"../Graph\";\nimport {\n Component,\n ComponentService,\n CoverComponent,\n CoverState,\n IComponentConfiguration,\n ICoverConfiguration,\n} from \"../Component\";\nimport {\n Container,\n IComponentOptions,\n Navigator,\n Observer,\n} from \"../Viewer\";\n\nexport class ComponentController {\n private _container: Container;\n private _coverComponent: CoverComponent;\n private _observer: Observer;\n private _navigator: Navigator;\n private _componentService: ComponentService;\n private _options: IComponentOptions;\n private _key: string;\n private _navigable: boolean;\n\n constructor(\n container: Container,\n navigator: Navigator,\n observer: Observer,\n key: string,\n options: IComponentOptions,\n componentService?: ComponentService) {\n this._container = container;\n this._observer = observer;\n this._navigator = navigator;\n this._options = options != null ? options : {};\n this._key = key;\n this._navigable = key == null;\n this._componentService = !!componentService ?\n componentService :\n new ComponentService(this._container, this._navigator);\n\n this._coverComponent = this._componentService.getCover();\n\n this._initializeComponents();\n\n if (key) {\n this._initilizeCoverComponent();\n this._subscribeCoverComponent();\n } else {\n this._navigator.movedToKey$.pipe(\n first(\n (k: string): boolean => {\n return k != null;\n }))\n .subscribe(\n (k: string): void => {\n this._key = k;\n this._componentService.deactivateCover();\n this._coverComponent.configure({ key: this._key, state: CoverState.Hidden });\n this._subscribeCoverComponent();\n this._navigator.stateService.start();\n this._navigator.cacheService.start();\n this._navigator.panService.start();\n this._observer.startEmit();\n });\n }\n }\n\n public get navigable(): boolean {\n return this._navigable;\n }\n\n public get<TComponent extends Component<IComponentConfiguration>>(name: string): TComponent {\n return this._componentService.get<TComponent>(name);\n }\n\n public activate(name: string): void {\n this._componentService.activate(name);\n }\n\n public activateCover(): void {\n this._coverComponent.configure({ state: CoverState.Visible });\n }\n\n public deactivate(name: string): void {\n this._componentService.deactivate(name);\n }\n\n public deactivateCover(): void {\n this._coverComponent.configure({ state: CoverState.Loading });\n }\n\n private _initializeComponents(): void {\n let options: IComponentOptions = this._options;\n\n this._uFalse(options.background, \"background\");\n this._uFalse(options.debug, \"debug\");\n this._uFalse(options.image, \"image\");\n this._uFalse(options.marker, \"marker\");\n this._uFalse(options.navigation, \"navigation\");\n this._uFalse(options.popup, \"popup\");\n this._uFalse(options.route, \"route\");\n this._uFalse(options.slider, \"slider\");\n this._uFalse(options.spatialData, \"spatialData\");\n this._uFalse(options.tag, \"tag\");\n\n this._uTrue(options.attribution, \"attribution\");\n this._uTrue(options.bearing, \"bearing\");\n this._uTrue(options.cache, \"cache\");\n this._uTrue(options.direction, \"direction\");\n this._uTrue(options.imagePlane, \"imagePlane\");\n this._uTrue(options.keyboard, \"keyboard\");\n this._uTrue(options.loading, \"loading\");\n this._uTrue(options.mouse, \"mouse\");\n this._uTrue(options.sequence, \"sequence\");\n this._uTrue(options.stats, \"stats\");\n this._uTrue(options.zoom, \"zoom\");\n }\n\n private _initilizeCoverComponent(): void {\n let options: IComponentOptions = this._options;\n\n this._coverComponent.configure({ key: this._key });\n if (options.cover === undefined || options.cover) {\n this.activateCover();\n } else {\n this.deactivateCover();\n }\n }\n\n private _setNavigable(navigable: boolean): void {\n if (this._navigable === navigable) {\n return;\n }\n\n this._navigable = navigable;\n this._observer.navigable$.next(navigable);\n }\n\n private _subscribeCoverComponent(): void {\n this._coverComponent.configuration$.pipe(\n distinctUntilChanged(\n undefined,\n (c: ICoverConfiguration): CoverState => {\n return c.state;\n }))\n .subscribe((conf: ICoverConfiguration) => {\n if (conf.state === CoverState.Loading) {\n this._navigator.stateService.currentKey$.pipe(\n first(),\n switchMap(\n (key: string): Observable<Node> => {\n const keyChanged: boolean = key == null || key !== conf.key;\n\n if (keyChanged) {\n this._setNavigable(false);\n }\n\n return keyChanged ?\n this._navigator.moveToKey$(conf.key) :\n this._navigator.stateService.currentNode$.pipe(\n first());\n }))\n .subscribe(\n (): void => {\n this._navigator.stateService.start();\n this._navigator.cacheService.start();\n this._navigator.panService.start();\n this._observer.startEmit();\n this._coverComponent.configure({ state: CoverState.Hidden });\n this._componentService.deactivateCover();\n this._setNavigable(true);\n },\n (error: Error): void => {\n console.error(\"Failed to deactivate cover.\", error);\n\n this._coverComponent.configure({ state: CoverState.Visible });\n });\n } else if (conf.state === CoverState.Visible) {\n this._observer.stopEmit();\n this._navigator.stateService.stop();\n this._navigator.cacheService.stop();\n this._navigator.playService.stop();\n this._navigator.panService.stop();\n this._componentService.activateCover();\n this._setNavigable(conf.key == null);\n }\n });\n }\n\n private _uFalse<TConfiguration extends IComponentConfiguration>(option: boolean | TConfiguration, name: string): void {\n if (option === undefined) {\n this._componentService.deactivate(name);\n return;\n }\n if (typeof option === \"boolean\") {\n if (option) {\n this._componentService.activate(name);\n } else {\n this._componentService.deactivate(name);\n }\n return;\n }\n this._componentService.configure(name, <TConfiguration>option);\n this._componentService.activate(name);\n }\n\n private _uTrue<TConfiguration extends IComponentConfiguration>(option: boolean | TConfiguration, name: string): void {\n if (option === undefined) {\n this._componentService.activate(name);\n return;\n }\n if (typeof option === \"boolean\") {\n if (option) {\n this._componentService.activate(name);\n } else {\n this._componentService.deactivate(name);\n }\n return;\n }\n this._componentService.configure(name, <TConfiguration>option);\n this._componentService.activate(name);\n }\n}\n",
+ "import {\n GLRenderer,\n DOMRenderer,\n RenderService,\n} from \"../Render\";\nimport {StateService} from \"../State\";\nimport {DOM} from \"../Utils\";\nimport {\n IViewerOptions,\n KeyboardService,\n MouseService,\n TouchService,\n SpriteService,\n} from \"../Viewer\";\n\nexport class Container {\n public id: string;\n\n public renderService: RenderService;\n\n public glRenderer: GLRenderer;\n public domRenderer: DOMRenderer;\n\n public keyboardService: KeyboardService;\n public mouseService: MouseService;\n public touchService: TouchService;\n\n public spriteService: SpriteService;\n\n private _canvasContainer: HTMLElement;\n private _container: HTMLElement;\n private _domContainer: HTMLElement;\n\n private _dom: DOM;\n\n constructor (id: string, stateService: StateService, options: IViewerOptions, dom?: DOM) {\n this.id = id;\n this._dom = !!dom ? dom : new DOM();\n\n this._container = this._dom.document.getElementById(id);\n\n if (!this._container) {\n throw new Error(`Container '${id}' not found.`);\n }\n\n this._container.classList.add(\"mapillary-js\");\n\n this._canvasContainer = this._dom.createElement(\"div\", \"mapillary-js-interactive\", this._container);\n this._domContainer = this._dom.createElement(\"div\", \"mapillary-js-dom\", this._container);\n\n this.renderService = new RenderService(this._container, stateService.currentState$, options.renderMode);\n\n this.glRenderer = new GLRenderer(this._canvasContainer, this.renderService, this._dom);\n this.domRenderer = new DOMRenderer(this._domContainer, this.renderService, stateService.currentState$);\n\n this.keyboardService = new KeyboardService(this._canvasContainer);\n this.mouseService = new MouseService(this._container, this._canvasContainer, this._domContainer, document);\n this.touchService = new TouchService(this._canvasContainer, this._domContainer);\n\n this.spriteService = new SpriteService(options.sprite);\n }\n\n public get element(): HTMLElement {\n return this._container;\n }\n\n public get canvasContainer(): HTMLElement {\n return this._canvasContainer;\n }\n\n public get domContainer(): HTMLElement {\n return this._domContainer;\n }\n}\n\nexport default Container;\n",
"/**\n * Enumeration for image sizes\n * @enum {number}\n * @readonly\n * @description Image sizes in pixels for the long side of the image.\n */\nexport enum ImageSize {\n\n /**\n * 320 pixels image size\n */\n Size320 = 320,\n\n /**\n * 640 pixels image size\n */\n Size640 = 640,\n\n /**\n * 1024 pixels image size\n */\n Size1024 = 1024,\n\n /**\n * 2048 pixels image size\n */\n Size2048 = 2048,\n}\n",
- "/// <reference path=\"../../typings/index.d.ts\" />\n\nimport * as _ from \"underscore\";\n\nimport {Observable} from \"rxjs/Observable\";\nimport {Subject} from \"rxjs/Subject\";\n\nimport \"rxjs/add/operator/debounceTime\";\nimport \"rxjs/add/operator/distinctUntilChanged\";\nimport \"rxjs/add/operator/map\";\nimport \"rxjs/add/operator/publishReplay\";\nimport \"rxjs/add/operator/scan\";\nimport \"rxjs/add/operator/startWith\";\n\ninterface ILoader {\n task: string;\n loading: boolean;\n}\n\nexport class LoadingService {\n private _loaders$: Observable<{[key: string]: boolean}>;\n private _loadersSubject$: Subject<any> = new Subject<any>();\n\n constructor () {\n this._loaders$ = this._loadersSubject$\n .scan(\n (loaders: {[key: string]: boolean}, loader: ILoader): {[key: string]: boolean} => {\n if (loader.task !== undefined) {\n loaders[loader.task] = loader.loading;\n }\n return loaders;\n },\n {})\n .startWith({})\n .publishReplay(1)\n .refCount();\n }\n\n public get loading$(): Observable<boolean> {\n return this._loaders$\n .map(\n (loaders: {[key: string]: boolean}): boolean => {\n return _.reduce(\n loaders,\n (loader: boolean, acc: boolean) => {\n return (loader || acc);\n },\n false);\n })\n .debounceTime(100)\n .distinctUntilChanged();\n }\n\n public taskLoading$(task: string): Observable<boolean> {\n return this._loaders$\n .map(\n (loaders: {[key: string]: boolean}): boolean => {\n return !!loaders[task];\n })\n .debounceTime(100)\n .distinctUntilChanged();\n }\n\n public startLoading(task: string): void {\n this._loadersSubject$.next({loading: true, task: task});\n }\n\n public stopLoading(task: string): void {\n this._loadersSubject$.next({loading: false, task: task});\n }\n}\n\nexport default LoadingService;\n",
- "import {BehaviorSubject} from \"rxjs/BehaviorSubject\";\nimport {Observable} from \"rxjs/Observable\";\nimport {Subject} from \"rxjs/Subject\";\n\nimport \"rxjs/add/observable/fromEvent\";\n\nimport \"rxjs/add/operator/distinctUntilChanged\";\nimport \"rxjs/add/operator/filter\";\nimport \"rxjs/add/operator/map\";\nimport \"rxjs/add/operator/merge\";\nimport \"rxjs/add/operator/mergeMap\";\nimport \"rxjs/add/operator/publishReplay\";\nimport \"rxjs/add/operator/scan\";\nimport \"rxjs/add/operator/switchMap\";\nimport \"rxjs/add/operator/withLatestFrom\";\n\nimport {ViewportCoords} from \"../Geo\";\nimport {IMouseClaim} from \"../Viewer\";\n\nexport class MouseService {\n private _domContainer: HTMLElement;\n private _canvasContainer: HTMLElement;\n private _viewportCoords: ViewportCoords;\n\n private _activeSubject$: BehaviorSubject<boolean>;\n private _active$: Observable<boolean>;\n\n private _domMouseDown$: Observable<MouseEvent>;\n private _domMouseMove$: Observable<MouseEvent>;\n\n private _domMouseDragStart$: Observable<MouseEvent>;\n private _domMouseDrag$: Observable<MouseEvent>;\n private _domMouseDragEnd$: Observable<MouseEvent>;\n\n private _documentMouseMove$: Observable<MouseEvent>;\n private _documentMouseUp$: Observable<MouseEvent>;\n\n private _mouseDown$: Observable<MouseEvent>;\n private _mouseMove$: Observable<MouseEvent>;\n private _mouseLeave$: Observable<MouseEvent>;\n private _mouseUp$: Observable<MouseEvent>;\n private _mouseOut$: Observable<MouseEvent>;\n private _mouseOver$: Observable<MouseEvent>;\n\n private _contextMenu$: Observable<MouseEvent>;\n private _consistentContextMenu$: Observable<MouseEvent>;\n private _click$: Observable<MouseEvent>;\n private _dblClick$: Observable<MouseEvent>;\n\n private _mouseWheel$: Observable<WheelEvent>;\n\n private _mouseDragStart$: Observable<MouseEvent>;\n private _mouseDrag$: Observable<MouseEvent>;\n private _mouseDragEnd$: Observable<MouseEvent>;\n\n private _staticClick$: Observable<MouseEvent>;\n\n private _claimMouse$: Subject<IMouseClaim>;\n private _mouseOwner$: Observable<string>;\n\n constructor(container: HTMLElement, canvasContainer: HTMLElement, domContainer: HTMLElement, viewportCoords?: ViewportCoords) {\n this._canvasContainer = canvasContainer;\n this._domContainer = domContainer;\n this._viewportCoords = viewportCoords != null ? viewportCoords : new ViewportCoords();\n\n this._activeSubject$ = new BehaviorSubject<boolean>(false);\n\n this._active$ = this._activeSubject$\n .distinctUntilChanged()\n .publishReplay(1)\n .refCount();\n\n this._claimMouse$ = new Subject<IMouseClaim>();\n\n this._documentMouseMove$ = Observable.fromEvent<MouseEvent>(document, \"mousemove\");\n this._documentMouseUp$ = Observable.fromEvent<MouseEvent>(document, \"mouseup\");\n\n this._mouseDown$ = Observable.fromEvent<MouseEvent>(canvasContainer, \"mousedown\");\n this._mouseLeave$ = Observable.fromEvent<MouseEvent>(canvasContainer, \"mouseleave\");\n this._mouseMove$ = Observable.fromEvent<MouseEvent>(canvasContainer, \"mousemove\");\n this._mouseUp$ = Observable.fromEvent<MouseEvent>(canvasContainer, \"mouseup\");\n this._mouseOut$ = Observable.fromEvent<MouseEvent>(canvasContainer, \"mouseout\");\n this._mouseOver$ = Observable.fromEvent<MouseEvent>(canvasContainer, \"mouseover\");\n\n this._domMouseDown$ = Observable.fromEvent<MouseEvent>(domContainer, \"mousedown\");\n this._domMouseMove$ = Observable.fromEvent<MouseEvent>(domContainer, \"mousemove\");\n\n this._click$ = Observable.fromEvent<MouseEvent>(canvasContainer, \"click\");\n this._contextMenu$ = Observable.fromEvent<MouseEvent>(canvasContainer, \"contextmenu\");\n\n this._dblClick$ = Observable\n .merge(\n Observable.fromEvent<MouseEvent>(container, \"click\"),\n Observable.fromEvent<MouseEvent>(canvasContainer, \"dblclick\"))\n .bufferCount(3, 1)\n .filter(\n (events: MouseEvent[]): boolean => {\n const event1: MouseEvent = events[0];\n const event2: MouseEvent = events[1];\n const event3: MouseEvent = events[2];\n\n return event1.type === \"click\" &&\n event2.type === \"click\" &&\n event3.type === \"dblclick\" &&\n (<HTMLElement>event1.target).parentNode === canvasContainer &&\n (<HTMLElement>event2.target).parentNode === canvasContainer;\n })\n .map(\n (events: MouseEvent[]): MouseEvent => {\n return events[2];\n })\n .share();\n\n Observable\n .merge(\n this._domMouseDown$,\n this._domMouseMove$,\n this._dblClick$,\n this._contextMenu$)\n .subscribe(\n (event: MouseEvent): void => {\n event.preventDefault();\n });\n\n this._mouseWheel$ = Observable\n .merge(\n Observable.fromEvent<WheelEvent>(canvasContainer, \"wheel\"),\n Observable.fromEvent<WheelEvent>(domContainer, \"wheel\"));\n\n this._consistentContextMenu$ = Observable\n .merge(\n this._mouseDown$,\n this._mouseMove$,\n this._mouseOut$,\n this._mouseUp$,\n this._contextMenu$)\n .bufferCount(3, 1)\n .filter(\n (events: MouseEvent[]): boolean => {\n // fire context menu on mouse up both on mac and windows\n return events[0].type === \"mousedown\" &&\n events[1].type === \"contextmenu\" &&\n events[2].type === \"mouseup\";\n })\n .map(\n (events: MouseEvent[]): MouseEvent => {\n return events[1];\n })\n .share();\n\n const dragStop$: Observable<MouseEvent> = Observable\n .merge<MouseEvent>(\n Observable.fromEvent<WheelEvent>(window, \"blur\"),\n this._documentMouseUp$\n .filter(\n (e: MouseEvent): boolean => {\n return e.button === 0;\n }))\n .share();\n\n const leftButtonDown$: Observable<MouseEvent> = this._mouseDown$\n .filter(\n (e: MouseEvent): boolean => {\n return e.button === 0;\n })\n .share();\n\n this._mouseDragStart$ = leftButtonDown$\n .mergeMap(\n (e: MouseEvent): Observable<MouseEvent> => {\n return this._documentMouseMove$\n .takeUntil(dragStop$)\n .take(1);\n });\n\n this._mouseDrag$ = leftButtonDown$\n .mergeMap(\n (e: MouseEvent): Observable<MouseEvent> => {\n return this._documentMouseMove$\n .skip(1)\n .takeUntil(dragStop$);\n });\n\n this._mouseDragEnd$ = this._mouseDragStart$\n .mergeMap(\n (e: MouseEvent): Observable<MouseEvent> => {\n return dragStop$.first();\n });\n\n const containerLeftButtonDown$: Observable<MouseEvent> = this._domMouseDown$\n .filter(\n (e: MouseEvent): boolean => {\n return e.button === 0;\n })\n .share();\n\n this._domMouseDragStart$ = containerLeftButtonDown$\n .mergeMap(\n (e: MouseEvent): Observable<MouseEvent> => {\n return this._documentMouseMove$\n .takeUntil(dragStop$)\n .take(1);\n });\n\n this._domMouseDrag$ = containerLeftButtonDown$\n .mergeMap(\n (e: MouseEvent): Observable<MouseEvent> => {\n return this._documentMouseMove$\n .skip(1)\n .takeUntil(dragStop$);\n });\n\n this._domMouseDragEnd$ = this._domMouseDragStart$\n .mergeMap(\n (e: MouseEvent): Observable<MouseEvent> => {\n return dragStop$.first();\n });\n\n this._staticClick$ = this._mouseDown$\n .switchMap(\n (e: MouseEvent): Observable<MouseEvent> => {\n return this._click$\n .takeUntil(this._mouseMove$)\n .take(1);\n });\n\n this._mouseOwner$ = this._claimMouse$\n .scan(\n (claims: {[key: string]: number}, mouseClaim: IMouseClaim): {[key: string]: number} => {\n if (mouseClaim.zindex == null) {\n delete claims[mouseClaim.name];\n } else {\n claims[mouseClaim.name] = mouseClaim.zindex;\n }\n return claims;\n },\n {})\n .map(\n (claims: {[key: string]: number}): string => {\n let owner: string = null;\n let curZ: number = -1;\n\n for (const name in claims) {\n if (claims.hasOwnProperty(name)) {\n if (claims[name] > curZ) {\n curZ = claims[name];\n owner = name;\n }\n }\n }\n return owner;\n })\n .publishReplay(1)\n .refCount();\n\n this._mouseOwner$.subscribe(() => { /* noop */ });\n }\n\n public get active$(): Observable<boolean> {\n return this._active$;\n }\n\n public get activate$(): Subject<boolean> {\n return this._activeSubject$;\n }\n\n public get documentMouseMove$(): Observable<MouseEvent> {\n return this._documentMouseMove$;\n }\n\n public get documentMouseUp$(): Observable<MouseEvent> {\n return this._documentMouseUp$;\n }\n\n public get domMouseDragStart$(): Observable<MouseEvent> {\n return this._domMouseDragStart$;\n }\n\n public get domMouseDrag$(): Observable<MouseEvent> {\n return this._domMouseDrag$;\n }\n\n public get domMouseDragEnd$(): Observable<MouseEvent> {\n return this._domMouseDragEnd$;\n }\n\n public get domMouseDown$(): Observable<MouseEvent> {\n return this._domMouseDown$;\n }\n\n public get domMouseMove$(): Observable<MouseEvent> {\n return this._domMouseMove$;\n }\n\n public get mouseOwner$(): Observable<string> {\n return this._mouseOwner$;\n }\n\n public get mouseDown$(): Observable<MouseEvent> {\n return this._mouseDown$;\n }\n\n public get mouseMove$(): Observable<MouseEvent> {\n return this._mouseMove$;\n }\n\n public get mouseLeave$(): Observable<MouseEvent> {\n return this._mouseLeave$;\n }\n\n public get mouseOut$(): Observable<MouseEvent> {\n return this._mouseOut$;\n }\n\n public get mouseOver$(): Observable<MouseEvent> {\n return this._mouseOver$;\n }\n\n public get mouseUp$(): Observable<MouseEvent> {\n return this._mouseUp$;\n }\n\n public get click$(): Observable<MouseEvent> {\n return this._click$;\n }\n\n public get dblClick$(): Observable<MouseEvent> {\n return this._dblClick$;\n }\n\n public get contextMenu$(): Observable<MouseEvent> {\n return this._consistentContextMenu$;\n }\n\n public get mouseWheel$(): Observable<WheelEvent> {\n return this._mouseWheel$;\n }\n\n public get mouseDragStart$(): Observable<MouseEvent> {\n return this._mouseDragStart$;\n }\n\n public get mouseDrag$(): Observable<MouseEvent> {\n return this._mouseDrag$;\n }\n\n public get mouseDragEnd$(): Observable<MouseEvent> {\n return this._mouseDragEnd$;\n }\n\n public get staticClick$(): Observable<MouseEvent> {\n return this._staticClick$;\n }\n\n public claimMouse(name: string, zindex: number): void {\n this._claimMouse$.next({name: name, zindex: zindex});\n }\n\n public unclaimMouse(name: string): void {\n this._claimMouse$.next({name: name, zindex: null});\n }\n\n public filtered$<T>(name: string, observable$: Observable<T>): Observable<T> {\n return observable$\n .withLatestFrom(\n this.mouseOwner$,\n (event: T, owner: string): [T, string] => {\n return [event, owner];\n })\n .filter(\n (eo: [T, string]): boolean => {\n return eo[1] === name;\n })\n .map(\n (eo: [T, string]): T => {\n return eo[0];\n });\n }\n}\n\nexport default MouseService;\n",
- "/// <reference path=\"../../typings/index.d.ts\" />\n\nimport {BehaviorSubject} from \"rxjs/BehaviorSubject\";\nimport {Observable} from \"rxjs/Observable\";\nimport {ReplaySubject} from \"rxjs/ReplaySubject\";\nimport {Subscription} from \"rxjs/Subscription\";\n\nimport \"rxjs/add/observable/throw\";\n\nimport \"rxjs/add/operator/do\";\nimport \"rxjs/add/operator/finally\";\nimport \"rxjs/add/operator/first\";\nimport \"rxjs/add/operator/map\";\nimport \"rxjs/add/operator/mergeMap\";\n\nimport {\n APIv3,\n IFullNode,\n} from \"../API\";\nimport {\n FilterExpression,\n Graph,\n GraphService,\n IEdgeStatus,\n ImageLoadingService,\n Node,\n} from \"../Graph\";\nimport {EdgeDirection} from \"../Edge\";\nimport {\n StateService,\n IFrame,\n} from \"../State\";\nimport {\n CacheService,\n LoadingService,\n} from \"../Viewer\";\n\nexport class Navigator {\n private _apiV3: APIv3;\n\n private _cacheService: CacheService;\n private _graphService: GraphService;\n private _imageLoadingService: ImageLoadingService;\n private _loadingService: LoadingService;\n private _loadingName: string;\n private _stateService: StateService;\n\n private _keyRequested$: BehaviorSubject<string>;\n private _movedToKey$: BehaviorSubject<string>;\n\n private _request$: ReplaySubject<Node>;\n private _requestSubscription: Subscription;\n private _nodeRequestSubscription: Subscription;\n\n constructor (\n clientId: string,\n token?: string,\n apiV3?: APIv3,\n graphService?: GraphService,\n imageLoadingService?: ImageLoadingService,\n loadingService?: LoadingService,\n stateService?: StateService,\n cacheService?: CacheService) {\n\n this._apiV3 = apiV3 != null ? apiV3 : new APIv3(clientId, token);\n\n this._imageLoadingService = imageLoadingService != null ? imageLoadingService : new ImageLoadingService();\n\n this._graphService = graphService != null ?\n graphService :\n new GraphService(new Graph(this.apiV3), this._imageLoadingService);\n\n this._loadingService = loadingService != null ? loadingService : new LoadingService();\n this._loadingName = \"navigator\";\n\n this._stateService = stateService != null ? stateService : new StateService();\n\n this._cacheService = cacheService != null ?\n cacheService :\n new CacheService(this._graphService, this._stateService);\n\n this._cacheService.start();\n\n this._keyRequested$ = new BehaviorSubject<string>(null);\n this._movedToKey$ = new BehaviorSubject<string>(null);\n\n this._request$ = null;\n this._requestSubscription = null;\n this._nodeRequestSubscription = null;\n }\n\n public get apiV3(): APIv3 {\n return this._apiV3;\n }\n\n public get graphService(): GraphService {\n return this._graphService;\n }\n\n public get imageLoadingService(): ImageLoadingService {\n return this._imageLoadingService;\n }\n\n public get loadingService(): LoadingService {\n return this._loadingService;\n }\n\n public get movedToKey$(): Observable<string> {\n return this._movedToKey$;\n }\n\n public get stateService(): StateService {\n return this._stateService;\n }\n\n public moveToKey$(key: string): Observable<Node> {\n this._abortRequest(`to key ${key}`);\n\n this._loadingService.startLoading(this._loadingName);\n\n const node$: Observable<Node> = this._moveToKey$(key);\n\n return this._makeRequest$(node$);\n }\n\n public moveDir$(direction: EdgeDirection): Observable<Node> {\n this._abortRequest(`in dir ${EdgeDirection[direction]}`);\n\n this._loadingService.startLoading(this._loadingName);\n\n const node$: Observable<Node> = this.stateService.currentNode$\n .first()\n .mergeMap(\n (node: Node): Observable<string> => {\n return ([EdgeDirection.Next, EdgeDirection.Prev].indexOf(direction) > -1 ?\n node.sequenceEdges$ :\n node.spatialEdges$)\n .first()\n .map(\n (status: IEdgeStatus): string => {\n for (let edge of status.edges) {\n if (edge.data.direction === direction) {\n return edge.to;\n }\n }\n\n return null;\n });\n })\n .mergeMap(\n (directionKey: string) => {\n if (directionKey == null) {\n this._loadingService.stopLoading(this._loadingName);\n\n return Observable\n .throw(new Error(`Direction (${direction}) does not exist for current node.`));\n }\n\n return this._moveToKey$(directionKey);\n });\n\n return this._makeRequest$(node$);\n }\n\n public moveCloseTo$(lat: number, lon: number): Observable<Node> {\n this._abortRequest(`to lat ${lat}, lon ${lon}`);\n\n this._loadingService.startLoading(this._loadingName);\n\n const node$: Observable<Node> = this.apiV3.imageCloseTo$(lat, lon)\n .mergeMap(\n (fullNode: IFullNode): Observable<Node> => {\n if (fullNode == null) {\n this._loadingService.stopLoading(this._loadingName);\n\n return Observable\n .throw(new Error(`No image found close to lat ${lat}, lon ${lon}.`));\n }\n\n return this._moveToKey$(fullNode.key);\n });\n\n return this._makeRequest$(node$);\n }\n\n public setFilter$(filter: FilterExpression): Observable<void> {\n this._stateService.clearNodes();\n\n return this._movedToKey$\n .first()\n .mergeMap(\n (key: string): Observable<Node> => {\n if (key != null) {\n return this._trajectoryKeys$()\n .mergeMap(\n (keys: string[]): Observable<Node> => {\n return this._graphService.setFilter$(filter)\n .mergeMap(\n (graph: Graph): Observable<Node> => {\n return this._cacheKeys$(keys);\n });\n })\n .last();\n }\n\n return this._keyRequested$\n .mergeMap(\n (requestedKey: string): Observable<Node> => {\n if (requestedKey != null) {\n return this._graphService.setFilter$(filter)\n .mergeMap(\n (graph: Graph): Observable<Node> => {\n return this._graphService.cacheNode$(requestedKey);\n });\n }\n\n return this._graphService.setFilter$(filter)\n .map(\n (graph: Graph): Node => {\n return undefined;\n });\n });\n })\n .map(\n (node: Node): void => {\n return undefined;\n });\n }\n\n public setToken$(token?: string): Observable<void> {\n this._abortRequest(\"to set token\");\n\n this._stateService.clearNodes();\n\n return this._movedToKey$\n .first()\n .do(\n (key: string): void => {\n this._apiV3.setToken(token);\n })\n .mergeMap(\n (key: string): Observable<void> => {\n return key == null ?\n this._graphService.reset$([])\n .map(\n (graph: Graph): void => {\n return undefined;\n }) :\n this._trajectoryKeys$()\n .mergeMap(\n (keys: string[]): Observable<Node> => {\n return this._graphService.reset$(keys)\n .mergeMap(\n (graph: Graph): Observable<Node> => {\n return this._cacheKeys$(keys);\n });\n })\n .last()\n .map(\n (node: Node): void => {\n return undefined;\n });\n });\n }\n\n private _cacheKeys$(keys: string[]): Observable<Node> {\n let cacheNodes$: Observable<Node>[] = keys\n .map(\n (key: string): Observable<Node> => {\n return this._graphService.cacheNode$(key);\n });\n\n return Observable\n .from<Observable<Node>>(cacheNodes$)\n .mergeAll();\n }\n\n private _abortRequest(reason: string): void {\n if (this._requestSubscription != null) {\n this._requestSubscription.unsubscribe();\n this._requestSubscription = null;\n }\n\n if (this._nodeRequestSubscription != null) {\n this._nodeRequestSubscription.unsubscribe();\n this._nodeRequestSubscription = null;\n }\n\n if (this._request$ != null) {\n this._request$.error(new Error(`Request aborted by a subsequent request ${reason}.`));\n this._request$ = null;\n }\n }\n\n private _makeRequest$(node$: Observable<Node>): Observable<Node> {\n this._request$ = new ReplaySubject<Node>(1);\n this._requestSubscription = this._request$\n .subscribe(undefined, (e: Error): void => { /*noop*/ });\n\n this._nodeRequestSubscription = node$\n .subscribe(\n (node: Node): void => {\n this._request$.next(node);\n this._request$.complete();\n },\n (error: Error): void => {\n this._request$.error(error);\n });\n\n return this._request$;\n }\n\n private _moveToKey$(key: string): Observable<Node> {\n this._keyRequested$.next(key);\n\n return this._graphService.cacheNode$(key)\n .do(\n (node: Node) => {\n this._stateService.setNodes([node]);\n this._movedToKey$.next(node.key);\n })\n .finally(\n (): void => {\n this._loadingService.stopLoading(this._loadingName);\n });\n }\n\n private _trajectoryKeys$(): Observable<string[]> {\n return this._stateService.currentState$\n .first()\n .map(\n (frame: IFrame): string[] => {\n return frame.state.trajectory\n .map(\n (node: Node): string => {\n return node.key;\n });\n });\n }\n}\n\nexport default Navigator;\n",
- "import {Observable} from \"rxjs/Observable\";\nimport {Subscription} from \"rxjs/Subscription\";\n\nimport \"rxjs/add/observable/combineLatest\";\n\nimport \"rxjs/add/operator/distinctUntilChanged\";\nimport \"rxjs/add/operator/map\";\nimport \"rxjs/add/operator/throttleTime\";\n\nimport {ILatLon} from \"../API\";\nimport {\n ILatLonAlt,\n Transform,\n} from \"../Geo\";\nimport {\n IEdgeStatus,\n Node,\n} from \"../Graph\";\nimport {RenderCamera} from \"../Render\";\nimport {EventEmitter} from \"../Utils\";\nimport {\n Container,\n IUnprojection,\n IViewerMouseEvent,\n Navigator,\n Projection,\n Viewer,\n} from \"../Viewer\";\n\nexport class Observer {\n private _started: boolean;\n\n private _bearingSubscription: Subscription;\n private _currentNodeSubscription: Subscription;\n private _moveSubscription: Subscription;\n private _sequenceEdgesSubscription: Subscription;\n private _spatialEdgesSubscription: Subscription;\n private _viewerMouseEventSubscription: Subscription;\n\n private _container: Container;\n private _eventEmitter: EventEmitter;\n private _navigator: Navigator;\n private _projection: Projection;\n\n constructor(eventEmitter: EventEmitter, navigator: Navigator, container: Container) {\n this._container = container;\n this._eventEmitter = eventEmitter;\n this._navigator = navigator;\n this._projection = new Projection();\n\n this._started = false;\n\n // loading should always emit, also when cover is activated\n this._navigator.loadingService.loading$\n .subscribe((loading: boolean): void => {\n this._eventEmitter.fire(Viewer.loadingchanged, loading);\n });\n }\n\n public get started(): boolean {\n return this._started;\n }\n\n public projectBasic$(basicPoint: number[]): Observable<number[]> {\n return Observable\n .combineLatest(\n this._container.renderService.renderCamera$,\n this._navigator.stateService.currentTransform$)\n .first()\n .map(\n ([render, transform]: [RenderCamera, Transform]): number[] => {\n const canvasPoint: number[] = this._projection.basicToCanvas(\n basicPoint,\n this._container.element,\n render,\n transform);\n\n return [Math.round(canvasPoint[0]), Math.round(canvasPoint[1])];\n });\n }\n\n public startEmit(): void {\n if (this._started) {\n return;\n }\n\n this._started = true;\n\n this._currentNodeSubscription = this._navigator.stateService.currentNodeExternal$\n .subscribe((node: Node): void => {\n this._eventEmitter.fire(Viewer.nodechanged, node);\n });\n\n this._sequenceEdgesSubscription = this._navigator.stateService.currentNodeExternal$\n .switchMap(\n (node: Node): Observable<IEdgeStatus> => {\n return node.sequenceEdges$;\n })\n .subscribe(\n (status: IEdgeStatus): void => {\n this._eventEmitter.fire(Viewer.sequenceedgeschanged, status);\n });\n\n this._spatialEdgesSubscription = this._navigator.stateService.currentNodeExternal$\n .switchMap(\n (node: Node): Observable<IEdgeStatus> => {\n return node.spatialEdges$;\n })\n .subscribe(\n (status: IEdgeStatus): void => {\n this._eventEmitter.fire(Viewer.spatialedgeschanged, status);\n });\n\n this._moveSubscription = Observable\n .combineLatest(\n this._navigator.stateService.inMotion$,\n this._container.mouseService.active$,\n this._container.touchService.active$)\n .map(\n (values: boolean[]): boolean => {\n return values[0] || values[1] || values[2];\n })\n .distinctUntilChanged()\n .subscribe(\n (started: boolean) => {\n if (started) {\n this._eventEmitter.fire(Viewer.movestart, null);\n } else {\n this._eventEmitter.fire(Viewer.moveend, null);\n }\n });\n\n this._bearingSubscription = this._container.renderService.bearing$\n .throttleTime(100)\n .distinctUntilChanged(\n (b1: number, b2: number): boolean => {\n return Math.abs(b2 - b1) < 1;\n })\n .subscribe(\n (bearing): void => {\n this._eventEmitter.fire(Viewer.bearingchanged, bearing);\n });\n\n const mouseMove$: Observable<MouseEvent> = this._container.mouseService.active$\n .switchMap(\n (active: boolean): Observable<MouseEvent> => {\n return active ?\n Observable.empty<MouseEvent>() :\n this._container.mouseService.mouseMove$;\n });\n\n this._viewerMouseEventSubscription = Observable\n .merge(\n this._mapMouseEvent$(Viewer.click, this._container.mouseService.staticClick$),\n this._mapMouseEvent$(Viewer.contextmenu, this._container.mouseService.contextMenu$),\n this._mapMouseEvent$(Viewer.dblclick, this._container.mouseService.dblClick$),\n this._mapMouseEvent$(Viewer.mousedown, this._container.mouseService.mouseDown$),\n this._mapMouseEvent$(Viewer.mousemove, mouseMove$),\n this._mapMouseEvent$(Viewer.mouseout, this._container.mouseService.mouseOut$),\n this._mapMouseEvent$(Viewer.mouseover, this._container.mouseService.mouseOver$),\n this._mapMouseEvent$(Viewer.mouseup, this._container.mouseService.mouseUp$))\n .withLatestFrom(\n this._container.renderService.renderCamera$,\n this._navigator.stateService.reference$,\n this._navigator.stateService.currentTransform$)\n .map(\n ([[type, event], render, reference, transform]:\n [[string, MouseEvent], RenderCamera, ILatLonAlt, Transform]): IViewerMouseEvent => {\n const unprojection: IUnprojection =\n this._projection.eventToUnprojection(\n event,\n this._container.element,\n render,\n reference,\n transform);\n\n return {\n basicPoint: unprojection.basicPoint,\n latLon: unprojection.latLon,\n originalEvent: event,\n pixelPoint: unprojection.pixelPoint,\n target: <Viewer>this._eventEmitter,\n type: type,\n };\n })\n .subscribe(\n (event: IViewerMouseEvent): void => {\n this._eventEmitter.fire(event.type, event);\n });\n }\n\n public stopEmit(): void {\n if (!this.started) {\n return;\n }\n\n this._started = false;\n\n this._bearingSubscription.unsubscribe();\n this._currentNodeSubscription.unsubscribe();\n this._moveSubscription.unsubscribe();\n this._sequenceEdgesSubscription.unsubscribe();\n this._spatialEdgesSubscription.unsubscribe();\n this._viewerMouseEventSubscription.unsubscribe();\n\n this._bearingSubscription = null;\n this._currentNodeSubscription = null;\n this._moveSubscription = null;\n this._sequenceEdgesSubscription = null;\n this._spatialEdgesSubscription = null;\n this._viewerMouseEventSubscription = null;\n }\n\n public unproject$(canvasPoint: number[]): Observable<ILatLon> {\n return Observable\n .combineLatest(\n this._container.renderService.renderCamera$,\n this._navigator.stateService.reference$,\n this._navigator.stateService.currentTransform$)\n .first()\n .map(\n ([render, reference, transform]: [RenderCamera, ILatLonAlt, Transform]): ILatLon => {\n const unprojection: IUnprojection =\n this._projection.canvasToUnprojection(\n canvasPoint,\n this._container.element,\n render,\n reference,\n transform);\n\n return unprojection.latLon;\n });\n }\n\n public unprojectBasic$(canvasPoint: number[]): Observable<number[]> {\n return Observable\n .combineLatest(\n this._container.renderService.renderCamera$,\n this._navigator.stateService.currentTransform$)\n .first()\n .map(\n ([render, transform]: [RenderCamera, Transform]): number[] => {\n return this._projection.canvasToBasic(\n canvasPoint,\n this._container.element,\n render,\n transform);\n });\n }\n\n private _mapMouseEvent$(type: string, mouseEvent$: Observable<MouseEvent>): Observable<[string, MouseEvent]> {\n return mouseEvent$.map(\n (event: MouseEvent): [string, MouseEvent] => {\n return [type, event];\n });\n }\n}\n\nexport default Observer;\n",
- "/// <reference path=\"../../typings/index.d.ts\" />\n\nimport * as THREE from \"three\";\n\nimport {ILatLon} from \"../API\";\nimport {\n GeoCoords,\n ILatLonAlt,\n Transform,\n ViewportCoords,\n} from \"../Geo\";\nimport {RenderCamera} from \"../Render\";\nimport {IUnprojection} from \"../Viewer\";\n\nexport class Projection {\n private _geoCoords: GeoCoords;\n private _viewportCoords: ViewportCoords;\n\n constructor(geoCoords?: GeoCoords, viewportCoords?: ViewportCoords) {\n this._geoCoords = !!geoCoords ? geoCoords : new GeoCoords();\n this._viewportCoords = !!viewportCoords ? viewportCoords : new ViewportCoords();\n }\n\n public basicToCanvas(\n basicPoint: number[],\n container: HTMLElement,\n render: RenderCamera,\n transform: Transform): number[] {\n\n return this._viewportCoords\n .basicToCanvas(basicPoint[0], basicPoint[1], container, transform, render.perspective);\n }\n\n public canvasToBasic(\n canvasPoint: number[],\n container: HTMLElement,\n render: RenderCamera,\n transform: Transform): number[] {\n\n let basicPoint: number[] = this._viewportCoords\n .canvasToBasic(canvasPoint[0], canvasPoint[1], container, transform, render.perspective);\n\n if (basicPoint[0] < 0 || basicPoint[0] > 1 || basicPoint[1] < 0 || basicPoint[1] > 1) {\n basicPoint = null;\n }\n\n return basicPoint;\n }\n\n public eventToUnprojection(\n event: MouseEvent | Touch,\n container: HTMLElement,\n render: RenderCamera,\n reference: ILatLonAlt,\n transform: Transform): IUnprojection {\n\n const pixelPoint: number[] = this._viewportCoords.canvasPosition(event, container);\n\n return this.canvasToUnprojection(pixelPoint, container, render, reference, transform);\n }\n\n public canvasToUnprojection(\n canvasPoint: number[],\n container: HTMLElement,\n render: RenderCamera,\n reference: ILatLonAlt,\n transform: Transform): IUnprojection {\n\n const canvasX: number = canvasPoint[0];\n const canvasY: number = canvasPoint[1];\n\n const [viewportX, viewportY]: number[] =\n this._viewportCoords.canvasToViewport(canvasX, canvasY, container);\n\n const point3d: THREE.Vector3 = new THREE.Vector3(viewportX, viewportY, 1)\n .unproject(render.perspective);\n\n let basicPoint: number[] = transform.projectBasic(point3d.toArray());\n if (basicPoint[0] < 0 || basicPoint[0] > 1 || basicPoint[1] < 0 || basicPoint[1] > 1) {\n basicPoint = null;\n }\n\n const direction3d: THREE.Vector3 = point3d.clone().sub(render.camera.position).normalize();\n const dist: number = -2 / direction3d.z;\n\n let latLon: ILatLon = null;\n if (dist > 0 && dist < 100 && !!basicPoint) {\n const point: THREE.Vector3 = direction3d.clone().multiplyScalar(dist).add(render.camera.position);\n const latLonArray: number[] = this._geoCoords\n .enuToGeodetic(\n point.x,\n point.y,\n point.z,\n reference.lat,\n reference.lon,\n reference.alt)\n .slice(0, 2);\n\n latLon = { lat: latLonArray[0], lon: latLonArray[1] };\n }\n\n const unprojection: IUnprojection = {\n basicPoint: basicPoint,\n latLon: latLon,\n pixelPoint: [canvasX, canvasY],\n };\n\n return unprojection;\n }\n}\n\nexport default Projection;\n",
- "/// <reference path=\"../../typings/index.d.ts\" />\n\nimport * as THREE from \"three\";\nimport * as vd from \"virtual-dom\";\n\nimport {Observable} from \"rxjs/Observable\";\nimport {Subject} from \"rxjs/Subject\";\n\nimport \"rxjs/add/operator/publishReplay\";\nimport \"rxjs/add/operator/scan\";\nimport \"rxjs/add/operator/startWith\";\n\nimport {Alignment, ISpriteAtlas} from \"../Viewer\";\n\nclass SpriteAtlas implements ISpriteAtlas {\n private _image: HTMLImageElement;\n private _texture: THREE.Texture;\n private _json: ISprites;\n\n public set json(value: ISprites) {\n this._json = value;\n }\n\n public set image(value: HTMLImageElement) {\n this._image = value;\n this._texture = new THREE.Texture(this._image);\n this._texture.minFilter = THREE.NearestFilter;\n }\n\n public get loaded(): boolean {\n return !!(this._image && this._json);\n }\n\n public getGLSprite(name: string): THREE.Object3D {\n if (!this.loaded) {\n throw new Error(\"Sprites cannot be retrieved before the atlas is loaded.\");\n }\n\n let definition: ISprite = this._json[name];\n\n if (!definition) {\n console.warn(\"Sprite with key\" + name + \"does not exist in sprite definition.\");\n\n return new THREE.Object3D();\n }\n\n let texture: THREE.Texture = this._texture.clone();\n texture.needsUpdate = true;\n\n let width: number = this._image.width;\n let height: number = this._image.height;\n\n\n texture.offset.x = definition.x / width;\n texture.offset.y = (height - definition.y - definition.height) / height;\n texture.repeat.x = definition.width / width;\n texture.repeat.y = definition.height / height;\n\n let material: THREE.SpriteMaterial = new THREE.SpriteMaterial({ map: texture });\n\n return new THREE.Sprite(material);\n }\n\n public getDOMSprite(\n name: string,\n float?: Alignment): vd.VNode {\n\n if (!this.loaded) {\n throw new Error(\"Sprites cannot be retrieved before the atlas is loaded.\");\n }\n\n if (float == null) {\n float = Alignment.Center;\n }\n\n let definition: ISprite = this._json[name];\n\n if (!definition) {\n console.warn(\"Sprite with key\" + name + \"does not exist in sprite definition.\");\n\n return vd.h(\"div\", {}, []);\n }\n\n let clipTop: number = definition.y;\n let clipRigth: number = definition.x + definition.width;\n let clipBottom: number = definition.y + definition.height;\n let clipLeft: number = definition.x;\n\n let left: number = -definition.x;\n let top: number = -definition.y;\n\n let height: number = this._image.height;\n let width: number = this._image.width;\n\n switch (float) {\n case Alignment.Bottom:\n case Alignment.Center:\n case Alignment.Top:\n left -= definition.width / 2;\n break;\n case Alignment.BottomLeft:\n case Alignment.Left:\n case Alignment.TopLeft:\n left -= definition.width;\n break;\n case Alignment.BottomRight:\n case Alignment.Right:\n case Alignment.BottomRight:\n default:\n break;\n }\n\n switch (float) {\n case Alignment.Center:\n case Alignment.Left:\n case Alignment.Right:\n top -= definition.height / 2;\n break;\n case Alignment.Top:\n case Alignment.TopLeft:\n case Alignment.TopRight:\n top -= definition.height;\n break;\n case Alignment.Bottom:\n case Alignment.BottomLeft:\n case Alignment.BottomRight:\n default:\n break;\n }\n\n let pixelRatioInverse: number = 1 / definition.pixelRatio;\n\n clipTop *= pixelRatioInverse;\n clipRigth *= pixelRatioInverse;\n clipBottom *= pixelRatioInverse;\n clipLeft *= pixelRatioInverse;\n left *= pixelRatioInverse;\n top *= pixelRatioInverse;\n height *= pixelRatioInverse;\n width *= pixelRatioInverse;\n\n let properties: vd.createProperties = {\n src: this._image.src,\n style: {\n clip: `rect(${clipTop}px, ${clipRigth}px, ${clipBottom}px, ${clipLeft}px)`,\n height: `${height}px`,\n left: `${left}px`,\n position: \"absolute\",\n top: `${top}px`,\n width: `${width}px`,\n },\n };\n\n return vd.h(\"img\", properties, []);\n }\n}\n\ninterface ISprite {\n width: number;\n height: number;\n x: number;\n y: number;\n pixelRatio: number;\n}\n\ninterface ISprites {\n [key: string]: ISprite;\n}\n\ninterface ISpriteAtlasOperation {\n (atlas: SpriteAtlas): SpriteAtlas;\n}\n\nexport class SpriteService {\n private _retina: boolean;\n\n private _spriteAtlasOperation$: Subject<ISpriteAtlasOperation>;\n private _spriteAtlas$: Observable<SpriteAtlas>;\n\n constructor(sprite?: string) {\n this._retina = window.devicePixelRatio > 1;\n\n this._spriteAtlasOperation$ = new Subject<ISpriteAtlasOperation>();\n\n this._spriteAtlas$ = this._spriteAtlasOperation$\n .startWith(\n (atlas: SpriteAtlas): SpriteAtlas => {\n return atlas;\n })\n .scan(\n (atlas: SpriteAtlas, operation: ISpriteAtlasOperation): SpriteAtlas => {\n return operation(atlas);\n },\n new SpriteAtlas())\n .publishReplay(1)\n .refCount();\n\n this._spriteAtlas$.subscribe(() => { /*noop*/ });\n\n if (sprite == null) {\n return;\n }\n\n let format: string = this._retina ? \"@2x\" : \"\";\n\n let imageXmlHTTP: XMLHttpRequest = new XMLHttpRequest();\n imageXmlHTTP.open(\"GET\", sprite + format + \".png\", true);\n imageXmlHTTP.responseType = \"arraybuffer\";\n imageXmlHTTP.onload = () => {\n let image: HTMLImageElement = new Image();\n image.onload = () => {\n this._spriteAtlasOperation$.next(\n (atlas: SpriteAtlas): SpriteAtlas => {\n atlas.image = image;\n\n return atlas;\n });\n };\n\n let blob: Blob = new Blob([imageXmlHTTP.response]);\n image.src = window.URL.createObjectURL(blob);\n };\n\n imageXmlHTTP.onerror = (error: Event) => {\n console.error(new Error(`Failed to fetch sprite sheet (${sprite}${format}.png)`));\n };\n\n imageXmlHTTP.send();\n\n let jsonXmlHTTP: XMLHttpRequest = new XMLHttpRequest();\n jsonXmlHTTP.open(\"GET\", sprite + format + \".json\", true);\n jsonXmlHTTP.responseType = \"text\";\n jsonXmlHTTP.onload = () => {\n let json: ISprites = <ISprites>JSON.parse(jsonXmlHTTP.response);\n\n this._spriteAtlasOperation$.next(\n (atlas: SpriteAtlas): SpriteAtlas => {\n atlas.json = json;\n\n return atlas;\n });\n };\n\n jsonXmlHTTP.onerror = (error: Event) => {\n console.error(new Error(`Failed to fetch sheet (${sprite}${format}.json)`));\n };\n\n jsonXmlHTTP.send();\n }\n\n public get spriteAtlas$(): Observable<ISpriteAtlas> {\n return this._spriteAtlas$;\n }\n}\n\nexport default SpriteService;\n",
- "import {BehaviorSubject} from \"rxjs/BehaviorSubject\";\nimport {Observable} from \"rxjs/Observable\";\nimport {Subject} from \"rxjs/Subject\";\n\nimport \"rxjs/add/observable/timer\";\n\nimport \"rxjs/add/operator/bufferWhen\";\nimport \"rxjs/add/operator/filter\";\nimport \"rxjs/add/operator/map\";\nimport \"rxjs/add/operator/merge\";\nimport \"rxjs/add/operator/scan\";\nimport \"rxjs/add/operator/switchMap\";\n\nimport {IPinch} from \"../Viewer\";\n\ninterface IPinchOperation {\n (pinch: IPinch): IPinch;\n}\n\nexport class TouchService {\n private _canvasContainer: HTMLElement;\n private _domContainer: HTMLElement;\n\n private _activeSubject$: BehaviorSubject<boolean>;\n private _active$: Observable<boolean>;\n\n private _touchStart$: Observable<TouchEvent>;\n private _touchMove$: Observable<TouchEvent>;\n private _touchEnd$: Observable<TouchEvent>;\n private _touchCancel$: Observable<TouchEvent>;\n\n private _singleTouchDrag$: Observable<TouchEvent>;\n private _singleTouchDragStart$: Observable<TouchEvent>;\n private _singleTouchDragEnd$: Observable<TouchEvent>;\n private _singleTouchMove$: Observable<TouchEvent>;\n\n private _pinchOperation$: Subject<IPinchOperation>;\n private _pinch$: Observable<IPinch>;\n private _pinchStart$: Observable<TouchEvent>;\n private _pinchEnd$: Observable<TouchEvent>;\n private _pinchChange$: Observable<IPinch>;\n\n private _doubleTap$: Observable<TouchEvent>;\n\n constructor(canvasContainer: HTMLElement, domContainer: HTMLElement) {\n this._canvasContainer = canvasContainer;\n this._domContainer = domContainer;\n\n this._activeSubject$ = new BehaviorSubject<boolean>(false);\n\n this._active$ = this._activeSubject$\n .distinctUntilChanged()\n .publishReplay(1)\n .refCount();\n\n Observable.fromEvent<TouchEvent>(domContainer, \"touchmove\")\n .subscribe(\n (event: TouchEvent): void => {\n event.preventDefault();\n });\n\n this._touchStart$ = Observable.fromEvent<TouchEvent>(canvasContainer, \"touchstart\");\n this._touchMove$ = Observable.fromEvent<TouchEvent>(canvasContainer, \"touchmove\");\n this._touchEnd$ = Observable.fromEvent<TouchEvent>(canvasContainer, \"touchend\");\n this._touchCancel$ = Observable.fromEvent<TouchEvent>(canvasContainer, \"touchcancel\");\n\n const tapStart$: Observable<TouchEvent> = this._touchStart$\n .filter(\n (te: TouchEvent): boolean => {\n return te.touches.length === 1 && te.targetTouches.length === 1;\n })\n .share();\n\n this._doubleTap$ = tapStart$\n .bufferWhen(\n (): Observable<number | TouchEvent> => {\n return tapStart$\n .first()\n .switchMap(\n (event: TouchEvent): Observable<number | TouchEvent> => {\n return Observable\n .timer(300)\n .merge(tapStart$)\n .take(1);\n });\n })\n .filter(\n (events: TouchEvent[]): boolean => {\n return events.length === 2;\n })\n .map(\n (events: TouchEvent[]): TouchEvent => {\n return events[events.length - 1];\n })\n .share();\n\n this._doubleTap$\n .subscribe(\n (event: TouchEvent): void => {\n event.preventDefault();\n });\n\n this._singleTouchMove$ = this._touchMove$\n .filter(\n (te: TouchEvent): boolean => {\n return te.touches.length === 1 && te.targetTouches.length === 1;\n })\n .share();\n\n let singleTouchStart$: Observable<TouchEvent> = Observable\n .merge<TouchEvent>(\n this._touchStart$,\n this._touchEnd$,\n this._touchCancel$)\n .filter(\n (te: TouchEvent): boolean => {\n return te.touches.length === 1 && te.targetTouches.length === 1;\n });\n\n let multipleTouchStart$: Observable<TouchEvent> = Observable\n .merge<TouchEvent>(\n this._touchStart$,\n this._touchEnd$,\n this._touchCancel$)\n .filter(\n (te: TouchEvent): boolean => {\n return te.touches.length >= 1;\n });\n\n let touchStop$: Observable<TouchEvent> = Observable\n .merge<TouchEvent>(\n this._touchEnd$,\n this._touchCancel$)\n .filter(\n (te: TouchEvent): boolean => {\n return te.touches.length === 0;\n });\n\n this._singleTouchDragStart$ = singleTouchStart$\n .mergeMap(\n (e: TouchEvent): Observable<TouchEvent> => {\n return this._singleTouchMove$\n .takeUntil(\n Observable.merge(\n touchStop$,\n multipleTouchStart$))\n .take(1);\n });\n\n this._singleTouchDragEnd$ = singleTouchStart$\n .mergeMap(\n (e: TouchEvent): Observable<TouchEvent> => {\n return Observable\n .merge(\n touchStop$,\n multipleTouchStart$)\n .first();\n });\n\n this._singleTouchDrag$ = singleTouchStart$\n .switchMap(\n (te: TouchEvent): Observable<TouchEvent> => {\n return this._singleTouchMove$\n .skip(1)\n .takeUntil(\n Observable\n .merge(\n multipleTouchStart$,\n touchStop$));\n });\n\n let touchesChanged$: Observable<TouchEvent> = Observable\n .merge<TouchEvent>(\n this._touchStart$,\n this._touchEnd$,\n this._touchCancel$);\n\n this._pinchStart$ = touchesChanged$\n .filter(\n (te: TouchEvent): boolean => {\n return te.touches.length === 2 && te.targetTouches.length === 2;\n });\n\n this._pinchEnd$ = touchesChanged$\n .filter(\n (te: TouchEvent): boolean => {\n return te.touches.length !== 2 || te.targetTouches.length !== 2;\n });\n\n this._pinchOperation$ = new Subject<IPinchOperation>();\n\n this._pinch$ = this._pinchOperation$\n .scan(\n (pinch: IPinch, operation: IPinchOperation): IPinch => {\n return operation(pinch);\n },\n {\n changeX: 0,\n changeY: 0,\n clientX: 0,\n clientY: 0,\n distance: 0,\n distanceChange: 0,\n distanceX: 0,\n distanceY: 0,\n originalEvent: null,\n pageX: 0,\n pageY: 0,\n screenX: 0,\n screenY: 0,\n touch1: null,\n touch2: null,\n });\n\n this._touchMove$\n .filter(\n (te: TouchEvent): boolean => {\n return te.touches.length === 2 && te.targetTouches.length === 2;\n })\n .map(\n (te: TouchEvent): IPinchOperation => {\n return (previous: IPinch): IPinch => {\n let touch1: Touch = te.touches[0];\n let touch2: Touch = te.touches[1];\n\n let minX: number = Math.min(touch1.clientX, touch2.clientX);\n let maxX: number = Math.max(touch1.clientX, touch2.clientX);\n\n let minY: number = Math.min(touch1.clientY, touch2.clientY);\n let maxY: number = Math.max(touch1.clientY, touch2.clientY);\n\n let centerClientX: number = minX + (maxX - minX) / 2;\n let centerClientY: number = minY + (maxY - minY) / 2;\n\n let centerPageX: number = centerClientX + touch1.pageX - touch1.clientX;\n let centerPageY: number = centerClientY + touch1.pageY - touch1.clientY;\n\n let centerScreenX: number = centerClientX + touch1.screenX - touch1.clientX;\n let centerScreenY: number = centerClientY + touch1.screenY - touch1.clientY;\n\n let distanceX: number = Math.abs(touch1.clientX - touch2.clientX);\n let distanceY: number = Math.abs(touch1.clientY - touch2.clientY);\n\n let distance: number = Math.sqrt(distanceX * distanceX + distanceY * distanceY);\n\n let distanceChange: number = distance - previous.distance;\n\n let changeX: number = distanceX - previous.distanceX;\n let changeY: number = distanceY - previous.distanceY;\n\n let current: IPinch = {\n changeX: changeX,\n changeY: changeY,\n clientX: centerClientX,\n clientY: centerClientY,\n distance: distance,\n distanceChange: distanceChange,\n distanceX: distanceX,\n distanceY: distanceY,\n originalEvent: te,\n pageX: centerPageX,\n pageY: centerPageY,\n screenX: centerScreenX,\n screenY: centerScreenY,\n touch1: touch1,\n touch2: touch2,\n };\n\n return current;\n };\n })\n .subscribe(this._pinchOperation$);\n\n this._pinchChange$ = this._pinchStart$\n .switchMap(\n (te: TouchEvent): Observable<IPinch> => {\n return this._pinch$\n .skip(1)\n .takeUntil(this._pinchEnd$);\n });\n }\n\n public get active$(): Observable<boolean> {\n return this._active$;\n }\n\n public get activate$(): Subject<boolean> {\n return this._activeSubject$;\n }\n\n public get doubleTap$(): Observable<TouchEvent> {\n return this._doubleTap$;\n }\n\n public get touchStart$(): Observable<TouchEvent> {\n return this._touchStart$;\n }\n\n public get touchMove$(): Observable<TouchEvent> {\n return this._touchMove$;\n }\n\n public get touchEnd$(): Observable<TouchEvent> {\n return this._touchEnd$;\n }\n\n public get touchCancel$(): Observable<TouchEvent> {\n return this._touchCancel$;\n }\n\n public get singleTouchDragStart$(): Observable<TouchEvent> {\n return this._singleTouchDragStart$;\n }\n\n public get singleTouchDrag$(): Observable<TouchEvent> {\n return this._singleTouchDrag$;\n }\n\n public get singleTouchDragEnd$(): Observable<TouchEvent> {\n return this._singleTouchDragEnd$;\n }\n\n public get pinch$(): Observable<IPinch> {\n return this._pinchChange$;\n }\n\n public get pinchStart$(): Observable<TouchEvent> {\n return this._pinchStart$;\n }\n\n public get pinchEnd$(): Observable<TouchEvent> {\n return this._pinchEnd$;\n }\n}\n",
- "/// <reference path=\"../../typings/index.d.ts\" />\n\nimport * as when from \"when\";\n\nimport {ILatLon} from \"../API\";\nimport {EdgeDirection} from \"../Edge\";\nimport {\n FilterExpression,\n Node,\n} from \"../Graph\";\nimport {\n ComponentController,\n Container,\n IViewerOptions,\n Navigator,\n Observer,\n} from \"../Viewer\";\nimport {\n Component,\n IComponentConfiguration,\n} from \"../Component\";\nimport {\n EventEmitter,\n Settings,\n} from \"../Utils\";\nimport {RenderMode} from \"../Render\";\n\n/**\n * @class Viewer\n *\n * @classdesc The Viewer object represents the navigable photo viewer.\n * Create a Viewer by specifying a container, client ID, photo key and\n * other options. The viewer exposes methods and events for programmatic\n * interaction.\n *\n * The viewer works with a few different coordinate systems.\n *\n * Container pixel coordinates\n *\n * Pixel coordinates are coordinates on the viewer container. The origin is\n * in the top left corner of the container. The axes are\n * directed according to the following for a viewer container with a width\n * of 640 pixels and height of 480 pixels.\n *\n * ```\n * (0,0) (640, 0)\n * +------------------------>\n * |\n * |\n * |\n * v +\n * (0, 480) (640, 480)\n * ```\n *\n * Basic image coordinates\n *\n * Basic image coordinates represents points in the original image adjusted for\n * orientation. They range from 0 to 1 on both axes. The origin is in the top left\n * corner of the image and the axes are directed\n * according to the following for all image types.\n *\n * ```\n * (0,0) (1, 0)\n * +------------------------>\n * |\n * |\n * |\n * v +\n * (0, 1) (1, 1)\n * ```\n *\n * For every camera viewing direction it is possible to convert between these\n * two coordinate systems for the current node. The image can be panned and\n * zoomed independently of the size of the viewer container resulting in\n * different conversion results for different viewing directions.\n */\nexport class Viewer extends EventEmitter {\n /**\n * Fired when the viewing direction of the camera changes.\n * @event\n * @type {number} bearing - Value indicating the current bearing\n * measured in degrees clockwise with respect to north.\n */\n public static bearingchanged: string = \"bearingchanged\";\n\n /**\n * Fired when a pointing device (usually a mouse) is pressed and released at\n * the same point in the viewer.\n * @event\n * @type {IViewerMouseEvent} event - Viewer mouse event data.\n */\n public static click: string = \"click\";\n\n /**\n * Fired when the right button of the mouse is clicked within the viewer.\n * @event\n * @type {IViewerMouseEvent} event - Viewer mouse event data.\n */\n public static contextmenu: string = \"contextmenu\";\n\n /**\n * Fired when a pointing device (usually a mouse) is clicked twice at\n * the same point in the viewer.\n * @event\n * @type {IViewerMouseEvent} event - Viewer mouse event data.\n */\n public static dblclick: string = \"dblclick\";\n\n /**\n * Fired when the viewer is loading more data.\n * @event\n * @type {boolean} loading - Value indicating whether the viewer is loading.\n */\n public static loadingchanged: string = \"loadingchanged\";\n\n /**\n * Fired when a pointing device (usually a mouse) is pressed within the viewer.\n * @event\n * @type {IViewerMouseEvent} event - Viewer mouse event data.\n */\n public static mousedown: string = \"mousedown\";\n\n /**\n * Fired when a pointing device (usually a mouse) is moved within the viewer.\n * @description Will not fire when the mouse is actively used, e.g. for drag pan.\n * @event\n * @type {IViewerMouseEvent} event - Viewer mouse event data.\n */\n public static mousemove: string = \"mousemove\";\n\n /**\n * Fired when a pointing device (usually a mouse) leaves the viewer's canvas.\n * @event\n * @type {IViewerMouseEvent} event - Viewer mouse event data.\n */\n public static mouseout: string = \"mouseout\";\n\n /**\n * Fired when a pointing device (usually a mouse) is moved onto the viewer's canvas.\n * @event\n * @type {IViewerMouseEvent} event - Viewer mouse event data.\n */\n public static mouseover: string = \"mouseover\";\n\n /**\n * Fired when a pointing device (usually a mouse) is released within the viewer.\n * @event\n * @type {IViewerMouseEvent} event - Viewer mouse event data.\n */\n public static mouseup: string = \"mouseup\";\n\n /**\n * Fired when the viewer motion stops and it is in a fixed\n * position with a fixed point of view.\n * @event\n */\n public static moveend: string = \"moveend\";\n\n /**\n * Fired when the motion from one view to another start,\n * either by changing the position (e.g. when changing node) or\n * when changing point of view (e.g. by interaction such as pan and zoom).\n * @event\n */\n public static movestart: string = \"movestart\";\n\n /**\n * Fired every time the viewer navigates to a new node.\n * @event\n * @type {Node} node - Current node.\n */\n public static nodechanged: string = \"nodechanged\";\n\n /**\n * Fired every time the sequence edges of the current node changes.\n * @event\n * @type {IEdgeStatus} status - The edge status object.\n */\n public static sequenceedgeschanged: string = \"sequenceedgeschanged\";\n\n /**\n * Fired every time the spatial edges of the current node changes.\n * @event\n * @type {IEdgeStatus} status - The edge status object.\n */\n public static spatialedgeschanged: string = \"spatialedgeschanged\";\n\n /**\n * @ignore\n * Private component controller object which manages component states.\n */\n private _componentController: ComponentController;\n\n /**\n * @ignore\n * Private container object which maintains the DOM Element,\n * renderers and relevant services.\n */\n private _container: Container;\n\n /**\n * @ignore\n * Private observer object which observes the viewer state and\n * fires events on behalf of the viewer.\n */\n private _observer: Observer;\n\n /**\n * @ignore\n * Private navigator object which controls navigation throught\n * the vast seas of Mapillary.\n */\n private _navigator: Navigator;\n\n /**\n * Create a new viewer instance.\n *\n * @param {string} id - Required `id` of a DOM element which will\n * be transformed into the viewer.\n * @param {string} clientId - Required `Mapillary API ClientID`. Can\n * be obtained from https://www.mapillary.com/app/settings/developers.\n * @param {string} [key] - Optional `photoId` to start from, can be any\n * Mapillary photo, if null no image is loaded.\n * @param {IViewerOptions} [options] - Optional configuration object\n * specifing Viewer's initial setup.\n * @param {string} [token] - Optional bearer token for API requests of\n * protected resources.\n *\n * @example\n * ```\n * var viewer = new Mapillary.Viewer(\"<element-id>\", \"<client-id>\", \"<my key>\");\n * ```\n */\n constructor (id: string, clientId: string, key?: string, options?: IViewerOptions, token?: string) {\n super();\n\n options = options != null ? options : {};\n\n Settings.setOptions(options);\n\n this._navigator = new Navigator(clientId, token);\n this._container = new Container(id, this._navigator.stateService, options);\n this._observer = new Observer(this, this._navigator, this._container);\n this._componentController = new ComponentController(this._container, this._navigator, this._observer, key, options.component);\n }\n\n /**\n * Activate a component.\n *\n * @param {string} name - Name of the component which will become active.\n *\n * @example\n * ```\n * viewer.activateComponent(\"marker\");\n * ```\n */\n public activateComponent(name: string): void {\n this._componentController.activate(name);\n }\n\n /**\n * Activate the cover (deactivates all other components).\n */\n public activateCover(): void {\n this._componentController.activateCover();\n }\n\n /**\n * Deactivate a component.\n *\n * @param {string} name - Name of component which become inactive.\n *\n * @example\n * ```\n * viewer.deactivateComponent(\"mouse\");\n * ```\n */\n public deactivateComponent(name: string): void {\n this._componentController.deactivate(name);\n }\n\n /**\n * Deactivate the cover (activates all components marked as active).\n */\n public deactivateCover(): void {\n this._componentController.deactivateCover();\n }\n\n /**\n * Get the bearing of the current viewer camera.\n *\n * @description The bearing depends on how the camera\n * is currently rotated and does not correspond\n * to the compass angle of the current node if the view\n * has been panned.\n *\n * Bearing is measured in degrees clockwise with respect to\n * north.\n *\n * @returns {Promise<number>} Promise to the bearing\n * of the current viewer camera.\n *\n * @example\n * ```\n * viewer.getBearing().then((b) => { console.log(b); });\n * ```\n */\n public getBearing(): when.Promise<number> {\n return when.promise<number>(\n (resolve: (value: number) => void, reject: (reason: Error) => void): void => {\n this._container.renderService.bearing$\n .first()\n .subscribe(\n (bearing: number): void => {\n resolve(bearing);\n },\n (error: Error): void => {\n reject(error);\n });\n });\n }\n\n /**\n * Get the basic coordinates of the current photo that is\n * at the center of the viewport.\n *\n * @description Basic coordinates are 2D coordinates on the [0, 1] interval\n * and have the origin point, (0, 0), at the top left corner and the\n * maximum value, (1, 1), at the bottom right corner of the original\n * photo.\n *\n * @returns {Promise<number[]>} Promise to the basic coordinates\n * of the current photo at the center for the viewport.\n *\n * @example\n * ```\n * viewer.getCenter().then((c) => { console.log(c); });\n * ```\n */\n public getCenter(): when.Promise<number[]> {\n return when.promise<number[]>(\n (resolve: (value: number[]) => void, reject: (reason: Error) => void): void => {\n this._navigator.stateService.getCenter()\n .subscribe(\n (center: number[]): void => {\n resolve(center);\n },\n (error: Error): void => {\n reject(error);\n });\n });\n }\n\n /**\n * Get a component.\n *\n * @param {string} name - Name of component.\n * @returns {Component} The requested component.\n *\n * @example\n * ```\n * var mouseComponent = viewer.getComponent(\"mouse\");\n * ```\n */\n public getComponent<TComponent extends Component<IComponentConfiguration>>(name: string): TComponent {\n return this._componentController.get<TComponent>(name);\n }\n\n /**\n * Returns the viewer's containing HTML element.\n *\n * @returns {HTMLElement} The viewer's container.\n */\n public getContainer(): HTMLElement {\n return this._container.element;\n }\n\n /**\n * Get the photo's current zoom level.\n *\n * @returns {Promise<number>} Promise to the viewers's current\n * zoom level.\n *\n * @example\n * ```\n * viewer.getZoom().then((z) => { console.log(z); });\n * ```\n */\n public getZoom(): when.Promise<number> {\n return when.promise<number>(\n (resolve: (value: number) => void, reject: (reason: Error) => void): void => {\n this._navigator.stateService.getZoom()\n .subscribe(\n (zoom: number): void => {\n resolve(zoom);\n },\n (error: Error): void => {\n reject(error);\n });\n });\n }\n\n /**\n * Move close to given latitude and longitude.\n *\n * @description Because the method propagates IO errors, these potential errors\n * need to be handled by the method caller (see example).\n *\n * @param {Number} lat - Latitude, in degrees.\n * @param {Number} lon - Longitude, in degrees.\n * @returns {Promise<Node>} Promise to the node that was navigated to.\n * @throws {Error} If no nodes exist close to provided latitude\n * longitude.\n * @throws {Error} Propagates any IO errors to the caller.\n *\n * @example\n * ```\n * viewer.moveCloseTo(0, 0).then(\n * (n) => { console.log(n); },\n * (e) => { console.error(e); });\n * ```\n */\n public moveCloseTo(lat: number, lon: number): when.Promise<Node> {\n return when.promise<Node>(\n (resolve: (value: Node) => void, reject: (reason: Error) => void): void => {\n this._navigator.moveCloseTo$(lat, lon).subscribe(\n (node: Node): void => {\n resolve(node);\n },\n (error: Error): void => {\n reject(error);\n });\n });\n }\n\n /**\n * Navigate in a given direction.\n *\n * @description This method has to be called through EdgeDirection enumeration as in the example.\n *\n * @param {EdgeDirection} dir - Direction in which which to move.\n * @returns {Promise<Node>} Promise to the node that was navigated to.\n * @throws {Error} If the current node does not have the edge direction\n * or the edges has not yet been cached.\n * @throws {Error} Propagates any IO errors to the caller.\n *\n * @example\n * ```\n * viewer.moveDir(Mapillary.EdgeDirection.Next).then(\n * (n) => { console.log(n); },\n * (e) => { console.error(e); });\n * ```\n */\n public moveDir(dir: EdgeDirection): when.Promise<Node> {\n return when.promise<Node>(\n (resolve: (value: Node) => void, reject: (reason: Error) => void): void => {\n this._navigator.moveDir$(dir).subscribe(\n (node: Node): void => {\n resolve(node);\n },\n (error: Error): void => {\n reject(error);\n });\n });\n }\n\n /**\n * Navigate to a given photo key.\n *\n * @param {string} key - A valid Mapillary photo key.\n * @returns {Promise<Node>} Promise to the node that was navigated to.\n * @throws {Error} Propagates any IO errors to the caller.\n *\n * @example\n * ```\n * viewer.moveToKey(\"<my key>\").then(\n * (n) => { console.log(n); },\n * (e) => { console.error(e); });\n * ```\n */\n public moveToKey(key: string): when.Promise<Node> {\n return when.promise<Node>(\n (resolve: (value: Node) => void, reject: (reason: Error) => void): void => {\n this._navigator.moveToKey$(key).subscribe(\n (node: Node): void => {\n resolve(node);\n },\n (error: Error): void => {\n reject(error);\n });\n });\n }\n\n /**\n * Project basic image coordinates for the current node to canvas pixel\n * coordinates.\n *\n * @description The basic image coordinates may not always correspond to a\n * pixel point that lies in the visible area of the viewer container.\n *\n * @param {Array<number>} basicPoint - Basic images coordinates to project.\n * @returns {Promise<ILatLon>} Promise to the pixel coordinates corresponding\n * to the basic image point.\n *\n * @example\n * ```\n * viewer.projectFromBasic([0.3, 0.7])\n * .then((pixelPoint) => { console.log(pixelPoint); });\n * ```\n */\n public projectFromBasic(basicPoint: number[]): when.Promise<number[]> {\n return when.promise<number[]>(\n (resolve: (value: number[]) => void, reject: (reason: Error) => void): void => {\n this._observer.projectBasic$(basicPoint)\n .subscribe(\n (pixelPoint: number[]): void => {\n resolve(pixelPoint);\n },\n (error: Error): void => {\n reject(error);\n });\n });\n }\n\n /**\n * Detect the viewer's new width and height and resize it.\n *\n * @description The components will also detect the viewer's\n * new size and resize their rendered elements if needed.\n *\n * @example\n * ```\n * viewer.resize();\n * ```\n */\n public resize(): void {\n this._container.renderService.resize$.next(null);\n this._componentController.resize();\n }\n\n /**\n * Set a bearer token for authenticated API requests of\n * protected resources.\n *\n * @description When the supplied token is null or undefined,\n * any previously set bearer token will be cleared and the\n * viewer will make unauthenticated requests.\n *\n * Calling setAuthToken aborts all outstanding move requests.\n * The promises of those move requests will be rejected and\n * the rejections need to be caught.\n *\n * @param {string} [token] token - Bearer token.\n * @returns {Promise<void>} Promise that resolves after token\n * is set.\n *\n * @example\n * ```\n * viewer.setAuthToken(\"<my token>\")\n * .then(() => { console.log(\"token set\"); });\n * ```\n */\n public setAuthToken(token?: string): when.Promise<void> {\n return when.promise<void>(\n (resolve: (value: void) => void, reject: (reason: Error) => void): void => {\n this._navigator.setToken$(token)\n .subscribe(\n (): void => {\n resolve(undefined);\n },\n (error: Error): void => {\n reject(error);\n });\n });\n }\n\n /**\n * Set the basic coordinates of the current photo to be in the\n * center of the viewport.\n *\n * @description Basic coordinates are 2D coordinates on the [0, 1] interval\n * and has the origin point, (0, 0), at the top left corner and the\n * maximum value, (1, 1), at the bottom right corner of the original\n * photo.\n *\n * @param {number[]} The basic coordinates of the current\n * photo to be at the center for the viewport.\n *\n * @example\n * ```\n * viewer.setCenter([0.5, 0.5]);\n * ```\n */\n public setCenter(center: number[]): void {\n this._navigator.stateService.setCenter(center);\n }\n\n /**\n * Set the filter selecting nodes to use when calculating\n * the spatial edges.\n *\n * @description The following filter types are supported:\n *\n * Comparison\n *\n * `[\"==\", key, value]` equality: `node[key] = value`\n *\n * `[\"!=\", key, value]` inequality: `node[key] ≠ value`\n *\n * `[\"<\", key, value]` less than: `node[key] < value`\n *\n * `[\"<=\", key, value]` less than or equal: `node[key] ≤ value`\n *\n * `[\">\", key, value]` greater than: `node[key] > value`\n *\n * `[\">=\", key, value]` greater than or equal: `node[key] ≥ value`\n *\n * Set membership\n *\n * `[\"in\", key, v0, ..., vn]` set inclusion: `node[key] ∈ {v0, ..., vn}`\n *\n * `[\"!in\", key, v0, ..., vn]` set exclusion: `node[key] ∉ {v0, ..., vn}`\n *\n * Combining\n *\n * `[\"all\", f0, ..., fn]` logical `AND`: `f0 ∧ ... ∧ fn`\n *\n * A key must be a string that identifies a node property name. A value must be\n * a string, number, or boolean. Strictly-typed comparisons are used. The values\n * `f0, ..., fn` of the combining filter must be filter expressions.\n *\n * Clear the filter by setting it to null or empty array.\n *\n * @param {FilterExpression} filter - The filter expression.\n * @returns {Promise<void>} Promise that resolves after filter is applied.\n *\n * @example\n * ```\n * viewer.setFilter([\"==\", \"sequenceKey\", \"<my sequence key>\"]);\n * ```\n */\n public setFilter(filter: FilterExpression): when.Promise<void> {\n return when.promise<void>(\n (resolve: (value: void) => void, reject: (reason: Error) => void): void => {\n this._navigator.setFilter$(filter)\n .subscribe(\n (): void => {\n resolve(undefined);\n },\n (error: Error): void => {\n reject(error);\n });\n });\n }\n\n /**\n * Set the viewer's render mode.\n *\n * @param {RenderMode} renderMode - Render mode.\n *\n * @example\n * ```\n * viewer.setRenderMode(Mapillary.RenderMode.Letterbox);\n * ```\n */\n public setRenderMode(renderMode: RenderMode): void {\n this._container.renderService.renderMode$.next(renderMode);\n }\n\n /**\n * Set the photo's current zoom level.\n *\n * @description Possible zoom level values are on the [0, 3] interval.\n * Zero means zooming out to fit the photo to the view whereas three\n * shows the highest level of detail.\n *\n * @param {number} The photo's current zoom level.\n *\n * @example\n * ```\n * viewer.setZoom(2);\n * ```\n */\n public setZoom(zoom: number): void {\n this._navigator.stateService.setZoom(zoom);\n }\n\n /**\n * Unproject canvas pixel coordinates to an ILatLon representing geographical\n * coordinates.\n *\n * @description The pixel point may not always correspond to geographical\n * coordinates. In the case of no correspondence the returned value will\n * be `null`.\n *\n * @param {Array<number>} pixelPoint - Pixel coordinates to unproject.\n * @returns {Promise<ILatLon>} Promise to the latLon corresponding to the pixel point.\n *\n * @example\n * ```\n * viewer.unproject([100, 100])\n * .then((latLon) => { console.log(latLon); });\n * ```\n */\n public unproject(pixelPoint: number[]): when.Promise<ILatLon> {\n return when.promise<ILatLon>(\n (resolve: (value: ILatLon) => void, reject: (reason: Error) => void): void => {\n this._observer.unproject$(pixelPoint)\n .subscribe(\n (latLon: ILatLon): void => {\n resolve(latLon);\n },\n (error: Error): void => {\n reject(error);\n });\n });\n }\n\n /**\n * Unproject canvas pixel coordinates to basic image coordinates for the\n * current node.\n *\n * @description The pixel point may not always correspond to basic image\n * coordinates. In the case of no correspondence the returned value will\n * be `null`.\n *\n * @param {Array<number>} pixelPoint - Pixel coordinates to unproject.\n * @returns {Promise<ILatLon>} Promise to the basic coordinates corresponding\n * to the pixel point.\n *\n * @example\n * ```\n * viewer.unprojectToBasic([100, 100])\n * .then((basicPoint) => { console.log(basicPoint); });\n * ```\n */\n public unprojectToBasic(pixelPoint: number[]): when.Promise<number[]> {\n return when.promise<number[]>(\n (resolve: (value: number[]) => void, reject: (reason: Error) => void): void => {\n this._observer.unprojectBasic$(pixelPoint)\n .subscribe(\n (basicPoint: number[]): void => {\n resolve(basicPoint);\n },\n (error: Error): void => {\n reject(error);\n });\n });\n }\n}\n"
+ "import {fromEvent as observableFromEvent, Observable} from \"rxjs\";\n\nexport class KeyboardService {\n private _keyDown$: Observable<KeyboardEvent>;\n private _keyUp$: Observable<KeyboardEvent>;\n\n constructor(canvasContainer: HTMLElement) {\n this._keyDown$ = observableFromEvent<KeyboardEvent>(canvasContainer, \"keydown\");\n this._keyUp$ = observableFromEvent<KeyboardEvent>(canvasContainer, \"keyup\");\n }\n\n public get keyDown$(): Observable<KeyboardEvent> {\n return this._keyDown$;\n }\n\n public get keyUp$(): Observable<KeyboardEvent> {\n return this._keyUp$;\n }\n}\n\nexport default KeyboardService;\n",
+ "import {map, distinctUntilChanged, debounceTime, refCount, publishReplay, scan, startWith} from \"rxjs/operators\";\nimport {Observable, Subject} from \"rxjs\";\n\ninterface ILoader {\n task: string;\n loading: boolean;\n}\n\nexport class LoadingService {\n private _loaders$: Observable<{[key: string]: boolean}>;\n private _loadersSubject$: Subject<any> = new Subject<any>();\n\n constructor () {\n this._loaders$ = this._loadersSubject$.pipe(\n scan(\n (loaders: {[key: string]: boolean}, loader: ILoader): {[key: string]: boolean} => {\n if (loader.task !== undefined) {\n loaders[loader.task] = loader.loading;\n }\n return loaders;\n },\n {}),\n startWith({}),\n publishReplay(1),\n refCount());\n }\n\n public get loading$(): Observable<boolean> {\n return this._loaders$.pipe(\n map(\n (loaders: {[key: string]: boolean}): boolean => {\n for (const key in loaders) {\n if (!loaders.hasOwnProperty(key)) {\n continue;\n }\n\n if (loaders[key]) {\n return true;\n }\n }\n\n return false;\n }),\n debounceTime(100),\n distinctUntilChanged());\n }\n\n public taskLoading$(task: string): Observable<boolean> {\n return this._loaders$.pipe(\n map(\n (loaders: {[key: string]: boolean}): boolean => {\n return !!loaders[task];\n }),\n debounceTime(100),\n distinctUntilChanged());\n }\n\n public startLoading(task: string): void {\n this._loadersSubject$.next({loading: true, task: task});\n }\n\n public stopLoading(task: string): void {\n this._loadersSubject$.next({loading: false, task: task});\n }\n}\n\nexport default LoadingService;\n",
+ "import {\n concat as observableConcat,\n merge as observableMerge,\n combineLatest as observableCombineLatest,\n fromEvent as observableFromEvent,\n of as observableOf,\n BehaviorSubject,\n Observable,\n Subject,\n} from \"rxjs\";\n\nimport {\n switchMap,\n distinctUntilChanged,\n publishReplay,\n refCount,\n scan,\n map,\n startWith,\n filter,\n share,\n takeUntil,\n take,\n withLatestFrom,\n first,\n bufferCount,\n} from \"rxjs/operators\";\n\nimport {\n IMouseClaim,\n IMouseDeferPixels,\n} from \"../Viewer\";\n\nexport class MouseService {\n private _activeSubject$: BehaviorSubject<boolean>;\n private _active$: Observable<boolean>;\n\n private _domMouseDown$: Observable<MouseEvent>;\n private _domMouseMove$: Observable<MouseEvent>;\n\n private _domMouseDragStart$: Observable<MouseEvent>;\n private _domMouseDrag$: Observable<MouseEvent>;\n private _domMouseDragEnd$: Observable<MouseEvent | FocusEvent>;\n\n private _documentMouseMove$: Observable<MouseEvent>;\n private _documentMouseUp$: Observable<MouseEvent>;\n\n private _mouseDown$: Observable<MouseEvent>;\n private _mouseMove$: Observable<MouseEvent>;\n private _mouseLeave$: Observable<MouseEvent>;\n private _mouseUp$: Observable<MouseEvent>;\n private _mouseOut$: Observable<MouseEvent>;\n private _mouseOver$: Observable<MouseEvent>;\n\n private _contextMenu$: Observable<MouseEvent>;\n private _consistentContextMenu$: Observable<MouseEvent>;\n private _click$: Observable<MouseEvent>;\n private _dblClick$: Observable<MouseEvent>;\n\n private _mouseWheel$: Observable<WheelEvent>;\n\n private _mouseDragStart$: Observable<MouseEvent>;\n private _mouseDrag$: Observable<MouseEvent>;\n private _mouseDragEnd$: Observable<MouseEvent | FocusEvent>;\n\n private _deferPixelClaims$: Subject<IMouseDeferPixels>;\n private _deferPixels$: Observable<number>;\n private _proximateClick$: Observable<MouseEvent>;\n private _staticClick$: Observable<MouseEvent>;\n\n private _claimMouse$: Subject<IMouseClaim>;\n private _claimWheel$: Subject<IMouseClaim>;\n\n private _mouseOwner$: Observable<string>;\n private _wheelOwner$: Observable<string>;\n\n constructor(\n container: EventTarget,\n canvasContainer: EventTarget,\n domContainer: EventTarget,\n doc: EventTarget) {\n\n this._activeSubject$ = new BehaviorSubject<boolean>(false);\n\n this._active$ = this._activeSubject$.pipe(\n distinctUntilChanged(),\n publishReplay(1),\n refCount());\n\n this._claimMouse$ = new Subject<IMouseClaim>();\n this._claimWheel$ = new Subject<IMouseClaim>();\n\n this._deferPixelClaims$ = new Subject<IMouseDeferPixels>();\n this._deferPixels$ = this._deferPixelClaims$.pipe(\n scan(\n (claims: { [key: string]: number }, claim: IMouseDeferPixels): { [key: string]: number } => {\n if (claim.deferPixels == null) {\n delete claims[claim.name];\n } else {\n claims[claim.name] = claim.deferPixels;\n }\n\n return claims;\n },\n {}),\n map(\n (claims: { [key: string]: number }): number => {\n let deferPixelMax: number = -1;\n for (const key in claims) {\n if (!claims.hasOwnProperty(key)) {\n continue;\n }\n\n const deferPixels: number = claims[key];\n if (deferPixels > deferPixelMax) {\n deferPixelMax = deferPixels;\n }\n }\n\n return deferPixelMax;\n }),\n startWith(-1),\n publishReplay(1),\n refCount());\n\n this._deferPixels$.subscribe((): void => { /* noop */ });\n\n this._documentMouseMove$ = observableFromEvent<MouseEvent>(doc, \"mousemove\");\n this._documentMouseUp$ = observableFromEvent<MouseEvent>(doc, \"mouseup\");\n\n this._mouseDown$ = observableFromEvent<MouseEvent>(canvasContainer, \"mousedown\");\n this._mouseLeave$ = observableFromEvent<MouseEvent>(canvasContainer, \"mouseleave\");\n this._mouseMove$ = observableFromEvent<MouseEvent>(canvasContainer, \"mousemove\");\n this._mouseUp$ = observableFromEvent<MouseEvent>(canvasContainer, \"mouseup\");\n this._mouseOut$ = observableFromEvent<MouseEvent>(canvasContainer, \"mouseout\");\n this._mouseOver$ = observableFromEvent<MouseEvent>(canvasContainer, \"mouseover\");\n\n this._domMouseDown$ = observableFromEvent<MouseEvent>(domContainer, \"mousedown\");\n this._domMouseMove$ = observableFromEvent<MouseEvent>(domContainer, \"mousemove\");\n\n this._click$ = observableFromEvent<MouseEvent>(canvasContainer, \"click\");\n this._contextMenu$ = observableFromEvent<MouseEvent>(canvasContainer, \"contextmenu\");\n\n this._dblClick$ = observableMerge(\n observableFromEvent<MouseEvent>(container, \"click\"),\n observableFromEvent<MouseEvent>(canvasContainer, \"dblclick\")).pipe(\n bufferCount(3, 1),\n filter(\n (events: MouseEvent[]): boolean => {\n const event1: MouseEvent = events[0];\n const event2: MouseEvent = events[1];\n const event3: MouseEvent = events[2];\n\n return event1.type === \"click\" &&\n event2.type === \"click\" &&\n event3.type === \"dblclick\" &&\n (<HTMLElement>event1.target).parentNode === canvasContainer &&\n (<HTMLElement>event2.target).parentNode === canvasContainer;\n }),\n map(\n (events: MouseEvent[]): MouseEvent => {\n return events[2];\n }),\n share());\n\n observableMerge(\n this._domMouseDown$,\n this._domMouseMove$,\n this._dblClick$,\n this._contextMenu$)\n .subscribe(\n (event: MouseEvent): void => {\n event.preventDefault();\n });\n\n this._mouseWheel$ = observableMerge(\n observableFromEvent<WheelEvent>(canvasContainer, \"wheel\"),\n observableFromEvent<WheelEvent>(domContainer, \"wheel\")).pipe(\n share());\n\n this._consistentContextMenu$ = observableMerge(\n this._mouseDown$,\n this._mouseMove$,\n this._mouseOut$,\n this._mouseUp$,\n this._contextMenu$).pipe(\n bufferCount(3, 1),\n filter(\n (events: MouseEvent[]): boolean => {\n // fire context menu on mouse up both on mac and windows\n return events[0].type === \"mousedown\" &&\n events[1].type === \"contextmenu\" &&\n events[2].type === \"mouseup\";\n }),\n map(\n (events: MouseEvent[]): MouseEvent => {\n return events[1];\n }),\n share());\n\n const dragStop$: Observable<MouseEvent | FocusEvent> = observableMerge(\n observableFromEvent<FocusEvent>(window, \"blur\"),\n this._documentMouseUp$.pipe(\n filter(\n (e: MouseEvent): boolean => {\n return e.button === 0;\n }))).pipe(\n share());\n\n const mouseDragInitiate$: Observable<[MouseEvent, MouseEvent]> =\n this._createMouseDragInitiate$(this._mouseDown$, dragStop$, true).pipe(share());\n\n this._mouseDragStart$ = this._createMouseDragStart$(mouseDragInitiate$).pipe(share());\n this._mouseDrag$ = this._createMouseDrag$(mouseDragInitiate$, dragStop$).pipe(share());\n this._mouseDragEnd$ = this._createMouseDragEnd$(this._mouseDragStart$, dragStop$).pipe(share());\n\n const domMouseDragInitiate$: Observable<[MouseEvent, MouseEvent]> =\n this._createMouseDragInitiate$(this._domMouseDown$, dragStop$, false).pipe(share());\n\n this._domMouseDragStart$ = this._createMouseDragStart$(domMouseDragInitiate$).pipe(share());\n this._domMouseDrag$ = this._createMouseDrag$(domMouseDragInitiate$, dragStop$).pipe(share());\n this._domMouseDragEnd$ = this._createMouseDragEnd$(this._domMouseDragStart$, dragStop$).pipe(share());\n\n this._proximateClick$ = this._mouseDown$.pipe(\n switchMap(\n (mouseDown: MouseEvent): Observable<MouseEvent> => {\n return this._click$.pipe(\n takeUntil(this._createDeferredMouseMove$(mouseDown, this._documentMouseMove$)),\n take(1));\n }),\n share());\n\n this._staticClick$ = this._mouseDown$.pipe(\n switchMap(\n (e: MouseEvent): Observable<MouseEvent> => {\n return this._click$.pipe(\n takeUntil(this._documentMouseMove$),\n take(1));\n }),\n share());\n\n this._mouseDragStart$.subscribe();\n this._mouseDrag$.subscribe();\n this._mouseDragEnd$.subscribe();\n\n this._domMouseDragStart$.subscribe();\n this._domMouseDrag$.subscribe();\n this._domMouseDragEnd$.subscribe();\n\n this._staticClick$.subscribe();\n\n this._mouseOwner$ = this._createOwner$(this._claimMouse$).pipe(\n publishReplay(1),\n refCount());\n\n this._wheelOwner$ = this._createOwner$(this._claimWheel$).pipe(\n publishReplay(1),\n refCount());\n\n this._mouseOwner$.subscribe(() => { /* noop */ });\n this._wheelOwner$.subscribe(() => { /* noop */ });\n }\n\n public get active$(): Observable<boolean> {\n return this._active$;\n }\n\n public get activate$(): Subject<boolean> {\n return this._activeSubject$;\n }\n\n public get documentMouseMove$(): Observable<MouseEvent> {\n return this._documentMouseMove$;\n }\n\n public get documentMouseUp$(): Observable<MouseEvent> {\n return this._documentMouseUp$;\n }\n\n public get domMouseDragStart$(): Observable<MouseEvent> {\n return this._domMouseDragStart$;\n }\n\n public get domMouseDrag$(): Observable<MouseEvent> {\n return this._domMouseDrag$;\n }\n\n public get domMouseDragEnd$(): Observable<MouseEvent | FocusEvent> {\n return this._domMouseDragEnd$;\n }\n\n public get domMouseDown$(): Observable<MouseEvent> {\n return this._domMouseDown$;\n }\n\n public get domMouseMove$(): Observable<MouseEvent> {\n return this._domMouseMove$;\n }\n\n public get mouseOwner$(): Observable<string> {\n return this._mouseOwner$;\n }\n\n public get mouseDown$(): Observable<MouseEvent> {\n return this._mouseDown$;\n }\n\n public get mouseMove$(): Observable<MouseEvent> {\n return this._mouseMove$;\n }\n\n public get mouseLeave$(): Observable<MouseEvent> {\n return this._mouseLeave$;\n }\n\n public get mouseOut$(): Observable<MouseEvent> {\n return this._mouseOut$;\n }\n\n public get mouseOver$(): Observable<MouseEvent> {\n return this._mouseOver$;\n }\n\n public get mouseUp$(): Observable<MouseEvent> {\n return this._mouseUp$;\n }\n\n public get click$(): Observable<MouseEvent> {\n return this._click$;\n }\n\n public get dblClick$(): Observable<MouseEvent> {\n return this._dblClick$;\n }\n\n public get contextMenu$(): Observable<MouseEvent> {\n return this._consistentContextMenu$;\n }\n\n public get mouseWheel$(): Observable<WheelEvent> {\n return this._mouseWheel$;\n }\n\n public get mouseDragStart$(): Observable<MouseEvent> {\n return this._mouseDragStart$;\n }\n\n public get mouseDrag$(): Observable<MouseEvent> {\n return this._mouseDrag$;\n }\n\n public get mouseDragEnd$(): Observable<MouseEvent | FocusEvent> {\n return this._mouseDragEnd$;\n }\n\n public get proximateClick$(): Observable<MouseEvent> {\n return this._proximateClick$;\n }\n\n public get staticClick$(): Observable<MouseEvent> {\n return this._staticClick$;\n }\n\n public claimMouse(name: string, zindex: number): void {\n this._claimMouse$.next({ name: name, zindex: zindex });\n }\n\n public unclaimMouse(name: string): void {\n this._claimMouse$.next({ name: name, zindex: null });\n }\n\n public deferPixels(name: string, deferPixels: number): void {\n this._deferPixelClaims$.next({ name: name, deferPixels: deferPixels });\n }\n\n public undeferPixels(name: string): void {\n this._deferPixelClaims$.next({ name: name, deferPixels: null });\n }\n\n public claimWheel(name: string, zindex: number): void {\n this._claimWheel$.next({name: name, zindex: zindex});\n }\n\n public unclaimWheel(name: string): void {\n this._claimWheel$.next({name: name, zindex: null});\n }\n\n public filtered$<T>(name: string, observable$: Observable<T>): Observable<T> {\n return this._filtered(name, observable$, this._mouseOwner$);\n }\n\n public filteredWheel$<T>(name: string, observable$: Observable<T>): Observable<T> {\n return this._filtered(name, observable$, this._wheelOwner$);\n }\n\n private _createDeferredMouseMove$(\n origin: MouseEvent,\n mouseMove$: Observable<MouseEvent>): Observable<MouseEvent> {\n return mouseMove$.pipe(\n map(\n (mouseMove: MouseEvent): [MouseEvent, number] => {\n const deltaX: number = mouseMove.clientX - origin.clientX;\n const deltaY: number = mouseMove.clientY - origin.clientY;\n\n return [mouseMove, Math.sqrt(deltaX * deltaX + deltaY * deltaY)];\n }),\n withLatestFrom(this._deferPixels$),\n filter(\n ([[mouseMove, delta], deferPixels]: [[MouseEvent, number], number]): boolean => {\n return delta > deferPixels;\n }),\n map(\n ([[mouseMove, delta], deferPixels]: [[MouseEvent, number], number]): MouseEvent => {\n return mouseMove;\n }));\n }\n\n private _createMouseDrag$(\n mouseDragStartInitiate$: Observable<[MouseEvent, MouseEvent]>,\n stop$: Observable<Event>): Observable<MouseEvent> {\n\n return mouseDragStartInitiate$.pipe(\n map(\n ([mouseDown, mouseMove]: [MouseEvent, MouseEvent]): MouseEvent => {\n return mouseMove;\n }),\n switchMap(\n (mouseMove: MouseEvent): Observable<MouseEvent> => {\n return observableConcat(\n observableOf(mouseMove),\n this._documentMouseMove$).pipe(\n takeUntil(stop$));\n }));\n }\n\n private _createMouseDragEnd$<T>(mouseDragStart$: Observable<MouseEvent>, stop$: Observable<T>): Observable<T> {\n return mouseDragStart$.pipe(\n switchMap(\n (event: MouseEvent): Observable<T> => {\n return stop$.pipe(first());\n }));\n }\n\n private _createMouseDragStart$(mouseDragStartInitiate$: Observable<[MouseEvent, MouseEvent]>): Observable<MouseEvent> {\n return mouseDragStartInitiate$.pipe(\n map(\n ([mouseDown, mouseMove]: [MouseEvent, MouseEvent]): MouseEvent => {\n return mouseDown;\n }));\n }\n\n private _createMouseDragInitiate$(\n mouseDown$: Observable<MouseEvent>,\n stop$: Observable<Event>,\n defer: boolean): Observable<[MouseEvent, MouseEvent]> {\n\n return mouseDown$.pipe(\n filter(\n (mouseDown: MouseEvent): boolean => {\n return mouseDown.button === 0;\n }),\n switchMap(\n (mouseDown: MouseEvent): Observable<[MouseEvent, MouseEvent]> => {\n return observableCombineLatest(\n observableOf(mouseDown),\n defer ?\n this._createDeferredMouseMove$(mouseDown, this._documentMouseMove$) :\n this._documentMouseMove$).pipe(\n takeUntil(stop$),\n take(1));\n }));\n }\n\n private _createOwner$(claim$: Observable<IMouseClaim>): Observable<string> {\n return claim$.pipe(\n scan(\n (claims: { [key: string]: number }, claim: IMouseClaim): { [key: string]: number } => {\n if (claim.zindex == null) {\n delete claims[claim.name];\n } else {\n claims[claim.name] = claim.zindex;\n }\n\n return claims;\n },\n {}),\n map(\n (claims: { [key: string]: number }): string => {\n let owner: string = null;\n let zIndexMax: number = -1;\n\n for (const name in claims) {\n if (!claims.hasOwnProperty(name)) {\n continue;\n }\n\n if (claims[name] > zIndexMax) {\n zIndexMax = claims[name];\n owner = name;\n }\n }\n\n return owner;\n }),\n startWith(null));\n }\n\n private _filtered<T>(name: string, observable$: Observable<T>, owner$: Observable<string>): Observable<T> {\n return observable$.pipe(\n withLatestFrom(owner$),\n filter(\n ([item, owner]: [T, string]): boolean => {\n return owner === name;\n }),\n map(\n ([item, owner]: [T, string]): T => {\n return item;\n }));\n }\n}\n\nexport default MouseService;\n",
+ "import {from as observableFrom, throwError as observableThrowError, BehaviorSubject, Observable, ReplaySubject, Subscription} from \"rxjs\";\n\nimport {last, tap, map, mergeAll, finalize, mergeMap, first} from \"rxjs/operators\";\n\nimport {\n APIv3,\n IFullNode,\n} from \"../API\";\nimport {\n FilterExpression,\n Graph,\n GraphService,\n IEdgeStatus,\n ImageLoadingService,\n Node,\n} from \"../Graph\";\nimport {EdgeDirection} from \"../Edge\";\nimport {AbortMapillaryError} from \"../Error\";\nimport {\n StateService,\n IFrame,\n} from \"../State\";\nimport {\n CacheService,\n IViewerOptions,\n LoadingService,\n PlayService,\n} from \"../Viewer\";\nimport { PanService } from \"./PanService\";\n\nexport class Navigator {\n private _apiV3: APIv3;\n\n private _cacheService: CacheService;\n private _graphService: GraphService;\n private _imageLoadingService: ImageLoadingService;\n private _loadingService: LoadingService;\n private _loadingName: string;\n private _panService: PanService;\n private _playService: PlayService;\n private _stateService: StateService;\n\n private _keyRequested$: BehaviorSubject<string>;\n private _movedToKey$: BehaviorSubject<string>;\n\n private _request$: ReplaySubject<Node>;\n private _requestSubscription: Subscription;\n private _nodeRequestSubscription: Subscription;\n\n constructor (\n clientId: string,\n options: IViewerOptions,\n token?: string,\n apiV3?: APIv3,\n graphService?: GraphService,\n imageLoadingService?: ImageLoadingService,\n loadingService?: LoadingService,\n stateService?: StateService,\n cacheService?: CacheService,\n playService?: PlayService,\n panService?: PanService) {\n\n this._apiV3 = apiV3 != null ? apiV3 : new APIv3(clientId, token);\n\n this._imageLoadingService = imageLoadingService != null ? imageLoadingService : new ImageLoadingService();\n\n this._graphService = graphService != null ?\n graphService :\n new GraphService(new Graph(this.apiV3), this._imageLoadingService);\n\n this._loadingService = loadingService != null ? loadingService : new LoadingService();\n this._loadingName = \"navigator\";\n\n this._stateService = stateService != null ? stateService : new StateService(options.transitionMode);\n\n this._cacheService = cacheService != null ?\n cacheService :\n new CacheService(this._graphService, this._stateService);\n\n this._playService = playService != null ?\n playService :\n new PlayService(this._graphService, this._stateService);\n\n this._panService = panService != null ?\n panService :\n new PanService(this._graphService, this._stateService, options.combinedPanning);\n\n this._keyRequested$ = new BehaviorSubject<string>(null);\n this._movedToKey$ = new BehaviorSubject<string>(null);\n\n this._request$ = null;\n this._requestSubscription = null;\n this._nodeRequestSubscription = null;\n }\n\n public get apiV3(): APIv3 {\n return this._apiV3;\n }\n\n public get cacheService(): CacheService {\n return this._cacheService;\n }\n\n public get graphService(): GraphService {\n return this._graphService;\n }\n\n public get imageLoadingService(): ImageLoadingService {\n return this._imageLoadingService;\n }\n\n public get loadingService(): LoadingService {\n return this._loadingService;\n }\n\n public get movedToKey$(): Observable<string> {\n return this._movedToKey$;\n }\n\n public get panService(): PanService {\n return this._panService;\n }\n\n public get playService(): PlayService {\n return this._playService;\n }\n\n public get stateService(): StateService {\n return this._stateService;\n }\n\n public moveToKey$(key: string): Observable<Node> {\n this._abortRequest(`to key ${key}`);\n\n this._loadingService.startLoading(this._loadingName);\n\n const node$: Observable<Node> = this._moveToKey$(key);\n\n return this._makeRequest$(node$);\n }\n\n public moveDir$(direction: EdgeDirection): Observable<Node> {\n this._abortRequest(`in dir ${EdgeDirection[direction]}`);\n\n this._loadingService.startLoading(this._loadingName);\n\n const node$: Observable<Node> = this.stateService.currentNode$.pipe(\n first(),\n mergeMap(\n (node: Node): Observable<string> => {\n return ([EdgeDirection.Next, EdgeDirection.Prev].indexOf(direction) > -1 ?\n node.sequenceEdges$ :\n node.spatialEdges$).pipe(\n first(),\n map(\n (status: IEdgeStatus): string => {\n for (let edge of status.edges) {\n if (edge.data.direction === direction) {\n return edge.to;\n }\n }\n\n return null;\n }));\n }),\n mergeMap(\n (directionKey: string) => {\n if (directionKey == null) {\n this._loadingService.stopLoading(this._loadingName);\n\n return observableThrowError(new Error(`Direction (${direction}) does not exist for current node.`));\n }\n\n return this._moveToKey$(directionKey);\n }));\n\n return this._makeRequest$(node$);\n }\n\n public moveCloseTo$(lat: number, lon: number): Observable<Node> {\n this._abortRequest(`to lat ${lat}, lon ${lon}`);\n\n this._loadingService.startLoading(this._loadingName);\n\n const node$: Observable<Node> = this.apiV3.imageCloseTo$(lat, lon).pipe(\n mergeMap(\n (fullNode: IFullNode): Observable<Node> => {\n if (fullNode == null) {\n this._loadingService.stopLoading(this._loadingName);\n\n return observableThrowError(new Error(`No image found close to lat ${lat}, lon ${lon}.`));\n }\n\n return this._moveToKey$(fullNode.key);\n }));\n\n return this._makeRequest$(node$);\n }\n\n public setFilter$(filter: FilterExpression): Observable<void> {\n this._stateService.clearNodes();\n\n return this._movedToKey$.pipe(\n first(),\n mergeMap(\n (key: string): Observable<Node> => {\n if (key != null) {\n return this._trajectoryKeys$().pipe(\n mergeMap(\n (keys: string[]): Observable<Node> => {\n return this._graphService.setFilter$(filter).pipe(\n mergeMap(\n (): Observable<Node> => {\n return this._cacheKeys$(keys);\n }));\n }),\n last());\n }\n\n return this._keyRequested$.pipe(\n first(),\n mergeMap(\n (requestedKey: string): Observable<Node> => {\n if (requestedKey != null) {\n return this._graphService.setFilter$(filter).pipe(\n mergeMap(\n (): Observable<Node> => {\n return this._graphService.cacheNode$(requestedKey);\n }));\n }\n\n return this._graphService.setFilter$(filter).pipe(\n map(\n (): Node => {\n return undefined;\n }));\n }));\n }),\n map(\n (node: Node): void => {\n return undefined;\n }));\n }\n\n public setToken$(token?: string): Observable<void> {\n this._abortRequest(\"to set token\");\n\n this._stateService.clearNodes();\n\n return this._movedToKey$.pipe(\n first(),\n tap(\n (key: string): void => {\n this._apiV3.setToken(token);\n }),\n mergeMap(\n (key: string): Observable<void> => {\n return key == null ?\n this._graphService.reset$([]) :\n this._trajectoryKeys$().pipe(\n mergeMap(\n (keys: string[]): Observable<Node> => {\n return this._graphService.reset$(keys).pipe(\n mergeMap(\n (): Observable<Node> => {\n return this._cacheKeys$(keys);\n }));\n }),\n last(),\n map(\n (node: Node): void => {\n return undefined;\n }));\n }));\n }\n\n private _cacheKeys$(keys: string[]): Observable<Node> {\n let cacheNodes$: Observable<Node>[] = keys\n .map(\n (key: string): Observable<Node> => {\n return this._graphService.cacheNode$(key);\n });\n\n return observableFrom<Observable<Node>>(cacheNodes$).pipe(\n mergeAll());\n }\n\n private _abortRequest(reason: string): void {\n if (this._requestSubscription != null) {\n this._requestSubscription.unsubscribe();\n this._requestSubscription = null;\n }\n\n if (this._nodeRequestSubscription != null) {\n this._nodeRequestSubscription.unsubscribe();\n this._nodeRequestSubscription = null;\n }\n\n if (this._request$ != null) {\n if (!(this._request$.isStopped || this._request$.hasError)) {\n this._request$.error(new AbortMapillaryError(`Request aborted by a subsequent request ${reason}.`));\n }\n\n this._request$ = null;\n }\n }\n\n private _makeRequest$(node$: Observable<Node>): Observable<Node> {\n const request$: ReplaySubject<Node> = new ReplaySubject<Node>(1);\n this._requestSubscription = request$\n .subscribe(undefined, (): void => { /*noop*/ });\n\n this._request$ = request$;\n\n this._nodeRequestSubscription = node$\n .subscribe(\n (node: Node): void => {\n this._request$ = null;\n\n request$.next(node);\n request$.complete();\n },\n (error: Error): void => {\n this._request$ = null;\n\n request$.error(error);\n });\n\n return request$;\n }\n\n private _moveToKey$(key: string): Observable<Node> {\n this._keyRequested$.next(key);\n\n return this._graphService.cacheNode$(key).pipe(\n tap(\n (node: Node) => {\n this._stateService.setNodes([node]);\n this._movedToKey$.next(node.key);\n }),\n finalize(\n (): void => {\n this._loadingService.stopLoading(this._loadingName);\n }));\n }\n\n private _trajectoryKeys$(): Observable<string[]> {\n return this._stateService.currentState$.pipe(\n first(),\n map(\n (frame: IFrame): string[] => {\n return frame.state.trajectory\n .map(\n (node: Node): string => {\n return node.key;\n });\n }));\n }\n}\n\nexport default Navigator;\n",
+ "import {\n merge as observableMerge,\n empty as observableEmpty,\n combineLatest as observableCombineLatest,\n Observable,\n Subject,\n Subscription,\n} from \"rxjs\";\n\nimport {\n distinctUntilChanged,\n withLatestFrom,\n switchMap,\n auditTime,\n first,\n map,\n} from \"rxjs/operators\";\n\nimport {ILatLon} from \"../API\";\nimport {\n ILatLonAlt,\n Transform,\n} from \"../Geo\";\nimport {\n IEdgeStatus,\n Node,\n} from \"../Graph\";\nimport {RenderCamera} from \"../Render\";\nimport {EventEmitter} from \"../Utils\";\nimport {\n Container,\n IUnprojection,\n IViewerMouseEvent,\n Navigator,\n Projection,\n Viewer,\n} from \"../Viewer\";\n\nexport class Observer {\n private _started: boolean;\n\n private _navigable$: Subject<boolean>;\n\n private _bearingSubscription: Subscription;\n private _currentNodeSubscription: Subscription;\n private _moveSubscription: Subscription;\n private _sequenceEdgesSubscription: Subscription;\n private _spatialEdgesSubscription: Subscription;\n private _viewerMouseEventSubscription: Subscription;\n\n private _container: Container;\n private _eventEmitter: EventEmitter;\n private _navigator: Navigator;\n private _projection: Projection;\n\n constructor(eventEmitter: EventEmitter, navigator: Navigator, container: Container) {\n this._container = container;\n this._eventEmitter = eventEmitter;\n this._navigator = navigator;\n this._projection = new Projection();\n\n this._started = false;\n\n this._navigable$ = new Subject<boolean>();\n\n // navigable and loading should always emit, also when cover is activated.\n this._navigable$\n .subscribe(\n (navigable: boolean): void => {\n this._eventEmitter.fire(Viewer.navigablechanged, navigable);\n });\n\n this._navigator.loadingService.loading$\n .subscribe(\n (loading: boolean): void => {\n this._eventEmitter.fire(Viewer.loadingchanged, loading);\n });\n }\n\n public get started(): boolean {\n return this._started;\n }\n\n public get navigable$(): Subject<boolean> {\n return this._navigable$;\n }\n\n public projectBasic$(basicPoint: number[]): Observable<number[]> {\n return observableCombineLatest(\n this._container.renderService.renderCamera$,\n this._navigator.stateService.currentTransform$).pipe(\n first(),\n map(\n ([render, transform]: [RenderCamera, Transform]): number[] => {\n const canvasPoint: number[] = this._projection.basicToCanvas(\n basicPoint,\n this._container.element,\n render,\n transform);\n\n return [Math.round(canvasPoint[0]), Math.round(canvasPoint[1])];\n }));\n }\n\n public startEmit(): void {\n if (this._started) {\n return;\n }\n\n this._started = true;\n\n this._currentNodeSubscription = this._navigator.stateService.currentNodeExternal$\n .subscribe((node: Node): void => {\n this._eventEmitter.fire(Viewer.nodechanged, node);\n });\n\n this._sequenceEdgesSubscription = this._navigator.stateService.currentNodeExternal$.pipe(\n switchMap(\n (node: Node): Observable<IEdgeStatus> => {\n return node.sequenceEdges$;\n }))\n .subscribe(\n (status: IEdgeStatus): void => {\n this._eventEmitter.fire(Viewer.sequenceedgeschanged, status);\n });\n\n this._spatialEdgesSubscription = this._navigator.stateService.currentNodeExternal$.pipe(\n switchMap(\n (node: Node): Observable<IEdgeStatus> => {\n return node.spatialEdges$;\n }))\n .subscribe(\n (status: IEdgeStatus): void => {\n this._eventEmitter.fire(Viewer.spatialedgeschanged, status);\n });\n\n this._moveSubscription = observableCombineLatest(\n this._navigator.stateService.inMotion$,\n this._container.mouseService.active$,\n this._container.touchService.active$).pipe(\n map(\n (values: boolean[]): boolean => {\n return values[0] || values[1] || values[2];\n }),\n distinctUntilChanged())\n .subscribe(\n (started: boolean) => {\n if (started) {\n this._eventEmitter.fire(Viewer.movestart, null);\n } else {\n this._eventEmitter.fire(Viewer.moveend, null);\n }\n });\n\n this._bearingSubscription = this._container.renderService.bearing$.pipe(\n auditTime(100),\n distinctUntilChanged(\n (b1: number, b2: number): boolean => {\n return Math.abs(b2 - b1) < 1;\n }))\n .subscribe(\n (bearing): void => {\n this._eventEmitter.fire(Viewer.bearingchanged, bearing);\n });\n\n const mouseMove$: Observable<MouseEvent> = this._container.mouseService.active$.pipe(\n switchMap(\n (active: boolean): Observable<MouseEvent> => {\n return active ?\n observableEmpty() :\n this._container.mouseService.mouseMove$;\n }));\n\n this._viewerMouseEventSubscription = observableMerge(\n this._mapMouseEvent$(Viewer.click, this._container.mouseService.staticClick$),\n this._mapMouseEvent$(Viewer.contextmenu, this._container.mouseService.contextMenu$),\n this._mapMouseEvent$(Viewer.dblclick, this._container.mouseService.dblClick$),\n this._mapMouseEvent$(Viewer.mousedown, this._container.mouseService.mouseDown$),\n this._mapMouseEvent$(Viewer.mousemove, mouseMove$),\n this._mapMouseEvent$(Viewer.mouseout, this._container.mouseService.mouseOut$),\n this._mapMouseEvent$(Viewer.mouseover, this._container.mouseService.mouseOver$),\n this._mapMouseEvent$(Viewer.mouseup, this._container.mouseService.mouseUp$)).pipe(\n withLatestFrom(\n this._container.renderService.renderCamera$,\n this._navigator.stateService.reference$,\n this._navigator.stateService.currentTransform$),\n map(\n ([[type, event], render, reference, transform]:\n [[string, MouseEvent], RenderCamera, ILatLonAlt, Transform]): IViewerMouseEvent => {\n const unprojection: IUnprojection =\n this._projection.eventToUnprojection(\n event,\n this._container.element,\n render,\n reference,\n transform);\n\n return {\n basicPoint: unprojection.basicPoint,\n latLon: unprojection.latLon,\n originalEvent: event,\n pixelPoint: unprojection.pixelPoint,\n target: <Viewer>this._eventEmitter,\n type: type,\n };\n }))\n .subscribe(\n (event: IViewerMouseEvent): void => {\n this._eventEmitter.fire(event.type, event);\n });\n }\n\n public stopEmit(): void {\n if (!this.started) {\n return;\n }\n\n this._started = false;\n\n this._bearingSubscription.unsubscribe();\n this._currentNodeSubscription.unsubscribe();\n this._moveSubscription.unsubscribe();\n this._sequenceEdgesSubscription.unsubscribe();\n this._spatialEdgesSubscription.unsubscribe();\n this._viewerMouseEventSubscription.unsubscribe();\n\n this._bearingSubscription = null;\n this._currentNodeSubscription = null;\n this._moveSubscription = null;\n this._sequenceEdgesSubscription = null;\n this._spatialEdgesSubscription = null;\n this._viewerMouseEventSubscription = null;\n }\n\n public unproject$(canvasPoint: number[]): Observable<ILatLon> {\n return observableCombineLatest(\n this._container.renderService.renderCamera$,\n this._navigator.stateService.reference$,\n this._navigator.stateService.currentTransform$).pipe(\n first(),\n map(\n ([render, reference, transform]: [RenderCamera, ILatLonAlt, Transform]): ILatLon => {\n const unprojection: IUnprojection =\n this._projection.canvasToUnprojection(\n canvasPoint,\n this._container.element,\n render,\n reference,\n transform);\n\n return unprojection.latLon;\n }));\n }\n\n public unprojectBasic$(canvasPoint: number[]): Observable<number[]> {\n return observableCombineLatest(\n this._container.renderService.renderCamera$,\n this._navigator.stateService.currentTransform$).pipe(\n first(),\n map(\n ([render, transform]: [RenderCamera, Transform]): number[] => {\n return this._projection.canvasToBasic(\n canvasPoint,\n this._container.element,\n render,\n transform);\n }));\n }\n\n private _mapMouseEvent$(type: string, mouseEvent$: Observable<MouseEvent>): Observable<[string, MouseEvent]> {\n return mouseEvent$.pipe(map(\n (event: MouseEvent): [string, MouseEvent] => {\n return [type, event];\n }));\n }\n}\n\nexport default Observer;\n",
+ "import * as THREE from \"three\";\n\nimport {\n of as observableOf,\n combineLatest as observableCombineLatest,\n empty as observableEmpty,\n Observable,\n Subject,\n Subscription,\n} from \"rxjs\";\n\nimport {\n map,\n switchMap,\n withLatestFrom,\n distinctUntilChanged,\n catchError,\n startWith,\n publishReplay,\n refCount,\n} from \"rxjs/operators\";\n\nimport * as Geo from \"../geo/Geo\";\nimport GeoCoords from \"../geo/GeoCoords\";\nimport GraphService from \"../graph/GraphService\";\nimport GraphCalculator from \"../graph/GraphCalculator\";\nimport ILatLon from \"../api/interfaces/ILatLon\";\nimport ILatLonAlt from \"../geo/interfaces/ILatLonAlt\";\nimport Node from \"../graph/Node\";\nimport Spatial from \"../geo/Spatial\";\nimport { StateService } from \"../state/StateService\";\nimport { Transform } from \"../geo/Transform\";\nimport ViewportCoords from \"../geo/ViewportCoords\";\nimport { IFrame } from \"../State\";\n\nenum PanMode {\n Disabled,\n Enabled,\n Started,\n}\n\nexport class PanService {\n private _graphService: GraphService;\n private _stateService: StateService;\n private _graphCalculator: GraphCalculator;\n private _geoCoords: GeoCoords;\n private _spatial: Spatial;\n private _viewportCoords: ViewportCoords;\n\n private _panNodesSubject$: Subject<[Node, Transform, number][]>;\n private _panNodes$: Observable<[Node, Transform, number][]>;\n private _panNodesSubscription: Subscription;\n\n private _mode: PanMode;\n\n constructor(\n graphService: GraphService,\n stateService: StateService,\n enabled?: boolean,\n geoCoords?: GeoCoords,\n graphCalculator?: GraphCalculator,\n spatial?: Spatial,\n viewportCoords?: ViewportCoords) {\n\n this._graphService = graphService;\n this._stateService = stateService;\n this._geoCoords = !!geoCoords ? geoCoords : new GeoCoords();\n this._graphCalculator = !!graphCalculator ? graphCalculator : new GraphCalculator(this._geoCoords);\n this._spatial = !!spatial ? spatial : new Spatial();\n this._viewportCoords = !!viewportCoords ? viewportCoords : new ViewportCoords();\n\n this._mode = enabled !== false ? PanMode.Enabled : PanMode.Disabled;\n\n this._panNodesSubject$ = new Subject<[Node, Transform, number][]>();\n this._panNodes$ = this._panNodesSubject$.pipe(\n startWith([]),\n publishReplay(1),\n refCount());\n\n this._panNodes$.subscribe();\n }\n\n public get panNodes$(): Observable<[Node, Transform, number][]> {\n return this._panNodes$;\n }\n\n public enable(): void {\n if (this._mode !== PanMode.Disabled) {\n return;\n }\n\n this._mode = PanMode.Enabled;\n this.start();\n }\n\n public disable(): void {\n if (this._mode === PanMode.Disabled) {\n return;\n }\n\n this.stop();\n\n this._mode = PanMode.Disabled;\n }\n\n public start(): void {\n if (this._mode !== PanMode.Enabled) {\n return;\n }\n\n const panNodes$: Observable<[Node, Transform, number][]> = this._stateService.currentNode$.pipe(\n switchMap(\n (current: Node): Observable<[Node, Transform, number][]> => {\n if (!current.merged) {\n return observableOf([]);\n }\n\n const current$: Observable<Node> = observableOf(current);\n\n const bounds: ILatLon[] = this._graphCalculator.boundingBoxCorners(current.latLon, 20);\n\n const adjacent$: Observable<Node[]> = this._graphService\n .cacheBoundingBox$(bounds[0], bounds[1]).pipe(\n catchError(\n (error: Error): Observable<Node> => {\n console.error(`Failed to cache periphery bounding box (${current.key})`, error);\n\n return observableEmpty();\n }),\n map(\n (nodes: Node[]): Node[] => {\n if (current.pano) {\n return [];\n }\n\n const potential: Node[] = [];\n\n for (const node of nodes) {\n if (node.key === current.key) {\n continue;\n }\n\n if (node.mergeCC !== current.mergeCC) {\n continue;\n }\n\n if (node.pano) {\n continue;\n }\n\n if (this._distance(node, current) > 4) {\n continue;\n }\n\n potential.push(node);\n }\n\n return potential;\n }));\n\n return observableCombineLatest(current$, adjacent$).pipe(\n withLatestFrom(this._stateService.reference$),\n map(\n ([[cn, adjacent], reference]: [[Node, Node[]], ILatLonAlt]): [Node, Transform, number][] => {\n const currentDirection: THREE.Vector3 = this._spatial.viewingDirection(cn.rotation);\n const currentTranslation: number[] = Geo.computeTranslation(\n { lat: cn.latLon.lat, lon: cn.latLon.lon, alt: cn.alt },\n cn.rotation,\n reference);\n const currentTransform: Transform = this._createTransform(cn, currentTranslation);\n const currentAzimuthal: number = this._spatial.wrap(\n this._spatial.azimuthal(\n currentDirection.toArray(),\n currentTransform.upVector().toArray()),\n 0,\n 2 * Math.PI);\n\n const currentProjectedPoints: number[][] = this._computeProjectedPoints(currentTransform);\n\n const currentHFov: number = this._computeHorizontalFov(currentProjectedPoints) / 180 * Math.PI;\n\n const preferredOverlap: number = Math.PI / 8;\n let left: [number, Node, Transform, number] = undefined;\n let right: [number, Node, Transform, number] = undefined;\n\n for (const a of adjacent) {\n const translation: number[] = Geo.computeTranslation(\n { lat: a.latLon.lat, lon: a.latLon.lon, alt: a.alt },\n a.rotation,\n reference);\n\n const transform: Transform = this._createTransform(a, translation);\n const projectedPoints: number[][] = this._computeProjectedPoints(transform);\n const hFov: number = this._computeHorizontalFov(projectedPoints) / 180 * Math.PI;\n\n const direction: THREE.Vector3 = this._spatial.viewingDirection(a.rotation);\n const azimuthal: number = this._spatial.wrap(\n this._spatial.azimuthal(\n direction.toArray(),\n transform.upVector().toArray()),\n 0,\n 2 * Math.PI);\n\n const directionChange: number = this._spatial.angleBetweenVector2(\n currentDirection.x,\n currentDirection.y,\n direction.x,\n direction.y);\n\n let overlap: number = Number.NEGATIVE_INFINITY;\n if (directionChange > 0) {\n if (currentAzimuthal > azimuthal) {\n overlap = currentAzimuthal - 2 * Math.PI + currentHFov / 2 - (azimuthal - hFov / 2);\n } else {\n overlap = currentAzimuthal + currentHFov / 2 - (azimuthal - hFov / 2);\n }\n } else {\n if (currentAzimuthal < azimuthal) {\n overlap = azimuthal + hFov / 2 - (currentAzimuthal + 2 * Math.PI - currentHFov / 2);\n } else {\n overlap = azimuthal + hFov / 2 - (currentAzimuthal - currentHFov / 2);\n }\n }\n\n const nonOverlap: number = Math.abs(hFov - overlap);\n\n const distanceCost: number = this._distance(a, cn);\n const timeCost: number = Math.min(this._timeDifference(a, cn), 4);\n const overlapCost: number = 20 * Math.abs(overlap - preferredOverlap);\n const fovCost: number = Math.min(5, 1 / Math.min(hFov / currentHFov, 1));\n const nonOverlapCost: number = overlap > 0 ? -2 * nonOverlap : 0;\n\n const cost: number = distanceCost + timeCost + overlapCost + fovCost + nonOverlapCost;\n\n if (overlap > 0 &&\n overlap < 0.5 * currentHFov &&\n overlap < 0.5 * hFov &&\n nonOverlap > 0.5 * currentHFov) {\n\n if (directionChange > 0) {\n if (!left) {\n left = [cost, a, transform, hFov];\n } else {\n if (cost < left[0]) {\n left = [cost, a, transform, hFov];\n }\n }\n } else {\n if (!right) {\n right = [cost, a, transform, hFov];\n } else {\n if (cost < right[0]) {\n right = [cost, a, transform, hFov];\n }\n }\n }\n }\n }\n\n const panNodes: [Node, Transform, number][] = [];\n\n if (!!left) {\n panNodes.push([left[1], left[2], left[3]]);\n }\n\n if (!!right) {\n panNodes.push([right[1], right[2], right[3]]);\n }\n\n return panNodes;\n }),\n startWith([]));\n }));\n\n this._panNodesSubscription = this._stateService.currentState$.pipe(\n map(\n (frame: IFrame): boolean => {\n return frame.state.nodesAhead > 0;\n }),\n distinctUntilChanged(),\n switchMap(\n (traversing: boolean): Observable<[Node, Transform, number][]> => {\n return traversing ? observableOf([]) : panNodes$;\n }))\n .subscribe(\n (panNodes: [Node, Transform, number][]): void => {\n this._panNodesSubject$.next(panNodes);\n });\n\n this._mode = PanMode.Started;\n }\n\n public stop(): void {\n if (this._mode !== PanMode.Started) {\n return;\n }\n\n this._panNodesSubscription.unsubscribe();\n this._panNodesSubject$.next([]);\n\n this._mode = PanMode.Enabled;\n }\n\n private _distance(node: Node, reference: Node): number {\n const [x, y, z]: number[] = this._geoCoords.geodeticToEnu(\n node.latLon.lat,\n node.latLon.lon,\n node.alt,\n reference.latLon.lat,\n reference.latLon.lon,\n reference.alt);\n\n return Math.sqrt(x * x + y * y + z * z);\n }\n\n private _timeDifference(node: Node, reference: Node): number {\n return Math.abs(node.capturedAt - reference.capturedAt) / (1000 * 60 * 60 * 24 * 30);\n }\n\n private _createTransform(node: Node, translation: number[]): Transform {\n return new Transform(\n node.orientation,\n node.width,\n node.height,\n node.focal,\n node.scale,\n node.gpano,\n node.rotation,\n translation,\n node.assetsCached ? node.image : undefined,\n undefined,\n node.ck1,\n node.ck2,\n node.cameraProjection);\n }\n\n private _computeProjectedPoints(transform: Transform): number[][] {\n const vertices: number[][] = [[1, 0]];\n const directions: number[][] = [[0, 0.5]];\n const pointsPerLine: number = 20;\n\n return Geo.computeProjectedPoints(transform, vertices, directions, pointsPerLine, this._viewportCoords);\n }\n\n private _computeHorizontalFov(projectedPoints: number[][]): number {\n const fovs: number[] = projectedPoints\n .map(\n (projectedPoint: number[]): number => {\n return this._coordToFov(projectedPoint[0]);\n });\n\n const fov: number = Math.min(...fovs);\n\n return fov;\n }\n\n private _coordToFov(x: number): number {\n return 2 * Math.atan(x) * 180 / Math.PI;\n }\n}\n",
+ "import {\n combineLatest as observableCombineLatest,\n empty as observableEmpty,\n from as observableFrom,\n of as observableOf,\n zip as observableZip,\n Observable,\n Subject,\n Subscription,\n} from \"rxjs\";\n\nimport {\n publish,\n finalize,\n startWith,\n publishReplay,\n refCount,\n map,\n distinctUntilChanged,\n switchMap,\n retry,\n catchError,\n scan,\n filter,\n withLatestFrom,\n first,\n timeout,\n bufferCount,\n mergeMap,\n} from \"rxjs/operators\";\n\nimport {ILatLon} from \"../API\";\nimport {EdgeDirection} from \"../Edge\";\nimport {\n Graph,\n GraphCalculator,\n GraphMode,\n GraphService,\n IEdgeStatus,\n Node,\n Sequence,\n} from \"../Graph\";\nimport {\n ICurrentState,\n IFrame,\n StateService,\n} from \"../State\";\n\nexport class PlayService {\n public static readonly sequenceSpeed: number = 0.54;\n\n private _graphService: GraphService;\n private _stateService: StateService;\n private _graphCalculator: GraphCalculator;\n\n private _nodesAhead: number;\n private _playing: boolean;\n private _speed: number;\n\n private _direction$: Observable<EdgeDirection>;\n private _directionSubject$: Subject<EdgeDirection>;\n private _playing$: Observable<boolean>;\n private _playingSubject$: Subject<boolean>;\n private _speed$: Observable<number>;\n private _speedSubject$: Subject<number>;\n\n private _playingSubscription: Subscription;\n private _cacheSubscription: Subscription;\n private _clearSubscription: Subscription;\n private _graphModeSubscription: Subscription;\n private _stopSubscription: Subscription;\n\n private _bridging$: Observable<Node>;\n\n constructor(graphService: GraphService, stateService: StateService, graphCalculator?: GraphCalculator) {\n this._graphService = graphService;\n this._stateService = stateService;\n this._graphCalculator = !!graphCalculator ? graphCalculator : new GraphCalculator();\n\n this._directionSubject$ = new Subject<EdgeDirection>();\n this._direction$ = this._directionSubject$.pipe(\n startWith(EdgeDirection.Next),\n publishReplay(1),\n refCount());\n\n this._direction$.subscribe();\n\n this._playing = false;\n this._playingSubject$ = new Subject<boolean>();\n this._playing$ = this._playingSubject$.pipe(\n startWith(this._playing),\n publishReplay(1),\n refCount());\n\n this._playing$.subscribe();\n\n this._speed = 0.5;\n this._speedSubject$ = new Subject<number>();\n this._speed$ = this._speedSubject$.pipe(\n startWith(this._speed),\n publishReplay(1),\n refCount());\n\n this._speed$.subscribe();\n\n this._nodesAhead = this._mapNodesAhead(this._mapSpeed(this._speed));\n\n this._bridging$ = null;\n }\n\n public get playing(): boolean {\n return this._playing;\n }\n\n public get direction$(): Observable<EdgeDirection> {\n return this._direction$;\n }\n\n public get playing$(): Observable<boolean> {\n return this._playing$;\n }\n\n public get speed$(): Observable<number> {\n return this._speed$;\n }\n\n public play(): void {\n if (this._playing) {\n return;\n }\n\n this._stateService.cutNodes();\n const stateSpeed: number = this._setSpeed(this._speed);\n this._stateService.setSpeed(stateSpeed);\n\n this._graphModeSubscription = this._speed$.pipe(\n map(\n (speed: number): GraphMode => {\n return speed > PlayService.sequenceSpeed ? GraphMode.Sequence : GraphMode.Spatial;\n }),\n distinctUntilChanged())\n .subscribe(\n (mode: GraphMode): void => {\n this._graphService.setGraphMode(mode);\n });\n\n this._cacheSubscription = observableCombineLatest(\n this._stateService.currentNode$.pipe(\n map(\n (node: Node): [string, string] => {\n return [node.sequenceKey, node.key];\n }),\n distinctUntilChanged(\n undefined,\n ([sequenceKey, nodeKey]: [string, string]): string => {\n return sequenceKey;\n })),\n this._graphService.graphMode$,\n this._direction$).pipe(\n switchMap(\n ([[sequenceKey, nodeKey], mode, direction]: [[string, string], GraphMode, EdgeDirection]):\n Observable<[Sequence, EdgeDirection]> => {\n\n if (direction !== EdgeDirection.Next && direction !== EdgeDirection.Prev) {\n return observableOf<[Sequence, EdgeDirection]>([undefined, direction]);\n }\n\n const sequence$: Observable<Sequence> = (mode === GraphMode.Sequence ?\n this._graphService.cacheSequenceNodes$(sequenceKey, nodeKey) :\n this._graphService.cacheSequence$(sequenceKey)).pipe(\n retry(3),\n catchError(\n (error: Error): Observable<Sequence> => {\n console.error(error);\n\n return observableOf(undefined);\n }));\n\n return observableCombineLatest(\n sequence$,\n observableOf(direction));\n }),\n switchMap(\n ([sequence, direction]: [Sequence, EdgeDirection]): Observable<string> => {\n if (sequence === undefined) {\n return observableEmpty();\n }\n\n const sequenceKeys: string[] = sequence.keys.slice();\n if (direction === EdgeDirection.Prev) {\n sequenceKeys.reverse();\n }\n\n return this._stateService.currentState$.pipe(\n map(\n (frame: IFrame): [string, number] => {\n return [frame.state.trajectory[frame.state.trajectory.length - 1].key, frame.state.nodesAhead];\n }),\n scan(\n (\n [lastRequestKey, previousRequestKeys]: [string, string[]],\n [lastTrajectoryKey, nodesAhead]: [string, number]):\n [string, string[]] => {\n\n if (lastRequestKey === undefined) {\n lastRequestKey = lastTrajectoryKey;\n }\n\n const lastIndex: number = sequenceKeys.length - 1;\n if (nodesAhead >= this._nodesAhead || sequenceKeys[lastIndex] === lastRequestKey) {\n return [lastRequestKey, []];\n }\n\n const current: number = sequenceKeys.indexOf(lastTrajectoryKey);\n const start: number = sequenceKeys.indexOf(lastRequestKey) + 1;\n const end: number = Math.min(lastIndex, current + this._nodesAhead - nodesAhead) + 1;\n\n if (end <= start) {\n return [lastRequestKey, []];\n }\n\n return [sequenceKeys[end - 1], sequenceKeys.slice(start, end)];\n },\n [undefined, []]),\n mergeMap(\n ([lastRequestKey, newRequestKeys]: [string, string[]]): Observable<string> => {\n return observableFrom(newRequestKeys);\n }));\n }),\n mergeMap(\n (key: string): Observable<Node> => {\n return this._graphService.cacheNode$(key).pipe(\n catchError(\n (): Observable<Node> => {\n return observableEmpty();\n }));\n },\n 6))\n .subscribe();\n\n this._playingSubscription = this._stateService.currentState$.pipe(\n filter(\n (frame: IFrame): boolean => {\n return frame.state.nodesAhead < this._nodesAhead;\n }),\n distinctUntilChanged(\n undefined,\n (frame: IFrame): string => {\n return frame.state.lastNode.key;\n }),\n map(\n (frame: IFrame): [Node, boolean] => {\n const lastNode: Node = frame.state.lastNode;\n const trajectory: Node[] = frame.state.trajectory;\n let increasingTime: boolean = undefined;\n\n for (let i: number = trajectory.length - 2; i >= 0; i--) {\n const node: Node = trajectory[i];\n if (node.sequenceKey !== lastNode.sequenceKey) {\n break;\n }\n\n if (node.capturedAt !== lastNode.capturedAt) {\n increasingTime = node.capturedAt < lastNode.capturedAt;\n break;\n }\n }\n\n return [frame.state.lastNode, increasingTime];\n }),\n withLatestFrom(this._direction$),\n switchMap(\n ([[node, increasingTime], direction]: [[Node, boolean], EdgeDirection]): Observable<Node> => {\n return observableZip(\n ([EdgeDirection.Next, EdgeDirection.Prev].indexOf(direction) > -1 ?\n node.sequenceEdges$ :\n node.spatialEdges$).pipe(\n first(\n (status: IEdgeStatus): boolean => {\n return status.cached;\n }),\n timeout(15000)),\n observableOf<EdgeDirection>(direction)).pipe(\n map(\n ([s, d]: [IEdgeStatus, EdgeDirection]): string => {\n for (let edge of s.edges) {\n if (edge.data.direction === d) {\n return edge.to;\n }\n }\n\n return null;\n }),\n switchMap(\n (key: string): Observable<Node> => {\n return key != null ?\n this._graphService.cacheNode$(key) :\n this._bridge$(node, increasingTime).pipe(\n filter(\n (n: Node): boolean => {\n return !!n;\n }));\n }));\n }))\n .subscribe(\n (node: Node): void => {\n this._stateService.appendNodes([node]);\n },\n (error: Error): void => {\n console.error(error);\n this.stop();\n });\n\n this._clearSubscription = this._stateService.currentNode$.pipe(\n bufferCount(1, 10))\n .subscribe(\n (nodes: Node[]): void => {\n this._stateService.clearPriorNodes();\n });\n\n this._setPlaying(true);\n\n const currentLastNodes$: Observable<Node> = this._stateService.currentState$.pipe(\n map(\n (frame: IFrame): ICurrentState => {\n return frame.state;\n }),\n distinctUntilChanged(\n ([kc1, kl1]: [string, string], [kc2, kl2]: [string, string]): boolean => {\n return kc1 === kc2 && kl1 === kl2;\n },\n (state: ICurrentState): [string, string] => {\n return [state.currentNode.key, state.lastNode.key];\n }),\n filter(\n (state: ICurrentState): boolean => {\n return state.currentNode.key === state.lastNode.key &&\n state.currentIndex === state.trajectory.length - 1;\n }),\n map(\n (state: ICurrentState): Node => {\n return state.currentNode;\n }));\n\n this._stopSubscription = observableCombineLatest(\n currentLastNodes$,\n this._direction$).pipe(\n switchMap(\n ([node, direction]: [Node, EdgeDirection]): Observable<boolean> => {\n const edgeStatus$: Observable<IEdgeStatus> = (\n [EdgeDirection.Next, EdgeDirection.Prev].indexOf(direction) > -1 ?\n node.sequenceEdges$ :\n node.spatialEdges$).pipe(\n first(\n (status: IEdgeStatus): boolean => {\n return status.cached;\n }),\n timeout(15000),\n catchError(\n (error: Error): Observable<IEdgeStatus> => {\n console.error(error);\n\n return observableOf<IEdgeStatus>({ cached: false, edges: [] });\n }));\n\n return observableCombineLatest(\n observableOf(direction),\n edgeStatus$).pipe(\n map(\n ([d, es]: [EdgeDirection, IEdgeStatus]): boolean => {\n for (const edge of es.edges) {\n if (edge.data.direction === d) {\n return true;\n }\n }\n\n return false;\n }));\n }),\n mergeMap(\n (hasEdge: boolean): Observable<boolean> => {\n if (hasEdge || !this._bridging$) {\n return observableOf(hasEdge);\n }\n\n return this._bridging$.pipe(\n map(\n (node: Node): boolean => {\n return node != null;\n }),\n catchError(\n (error: Error): Observable<boolean> => {\n console.error(error);\n\n return observableOf<boolean>(false);\n }));\n }),\n first(\n (hasEdge: boolean): boolean => {\n return !hasEdge;\n }))\n .subscribe(\n undefined,\n undefined,\n (): void => { this.stop(); });\n\n if (this._stopSubscription.closed) {\n this._stopSubscription = null;\n }\n }\n\n public setDirection(direction: EdgeDirection): void {\n this._directionSubject$.next(direction);\n }\n\n public setSpeed(speed: number): void {\n speed = Math.max(0, Math.min(1, speed));\n if (speed === this._speed) {\n return;\n }\n\n const stateSpeed: number = this._setSpeed(speed);\n\n if (this._playing) {\n this._stateService.setSpeed(stateSpeed);\n }\n\n this._speedSubject$.next(this._speed);\n }\n\n public stop(): void {\n if (!this._playing) {\n return;\n }\n\n if (!!this._stopSubscription) {\n if (!this._stopSubscription.closed) {\n this._stopSubscription.unsubscribe();\n }\n\n this._stopSubscription = null;\n }\n\n this._graphModeSubscription.unsubscribe();\n this._graphModeSubscription = null;\n\n this._cacheSubscription.unsubscribe();\n this._cacheSubscription = null;\n\n this._playingSubscription.unsubscribe();\n this._playingSubscription = null;\n\n this._clearSubscription.unsubscribe();\n this._clearSubscription = null;\n\n this._stateService.setSpeed(1);\n this._stateService.cutNodes();\n this._graphService.setGraphMode(GraphMode.Spatial);\n\n this._setPlaying(false);\n }\n\n private _bridge$(node: Node, increasingTime: boolean): Observable<Node> {\n if (increasingTime === undefined) {\n return observableOf(null);\n }\n\n const boundingBox: ILatLon[] = this._graphCalculator.boundingBoxCorners(node.latLon, 25);\n\n this._bridging$ = this._graphService.cacheBoundingBox$(boundingBox[0], boundingBox[1]).pipe(\n mergeMap(\n (nodes: Node[]): Observable<Node> => {\n let nextNode: Node = null;\n for (const n of nodes) {\n if (n.sequenceKey === node.sequenceKey ||\n !n.cameraUuid ||\n n.cameraUuid !== node.cameraUuid ||\n n.capturedAt === node.capturedAt ||\n n.capturedAt > node.capturedAt !== increasingTime) {\n continue;\n }\n\n const delta: number = Math.abs(n.capturedAt - node.capturedAt);\n\n if (delta > 15000) {\n continue;\n }\n\n if (!nextNode || delta < Math.abs(nextNode.capturedAt - node.capturedAt)) {\n nextNode = n;\n }\n }\n\n return !!nextNode ?\n this._graphService.cacheNode$(nextNode.key) :\n observableOf(null);\n }),\n finalize(\n (): void => {\n this._bridging$ = null;\n }),\n publish(),\n refCount());\n\n return this._bridging$;\n }\n\n private _mapSpeed(speed: number): number {\n const x: number = 2 * speed - 1;\n\n return Math.pow(10, x) - 0.2 * x;\n }\n\n private _mapNodesAhead(stateSpeed: number): number {\n return Math.round(Math.max(10, Math.min(50, 8 + 6 * stateSpeed)));\n }\n\n private _setPlaying(playing: boolean): void {\n this._playing = playing;\n this._playingSubject$.next(playing);\n }\n\n private _setSpeed(speed: number): number {\n this._speed = speed;\n const stateSpeed: number = this._mapSpeed(this._speed);\n this._nodesAhead = this._mapNodesAhead(stateSpeed);\n\n return stateSpeed;\n }\n}\n\nexport default PlayService;\n",
+ "import * as THREE from \"three\";\n\nimport {ILatLon} from \"../API\";\nimport {\n GeoCoords,\n ILatLonAlt,\n Transform,\n ViewportCoords,\n} from \"../Geo\";\nimport {RenderCamera} from \"../Render\";\nimport {IUnprojection} from \"../Viewer\";\n\nexport class Projection {\n private _geoCoords: GeoCoords;\n private _viewportCoords: ViewportCoords;\n\n constructor(geoCoords?: GeoCoords, viewportCoords?: ViewportCoords) {\n this._geoCoords = !!geoCoords ? geoCoords : new GeoCoords();\n this._viewportCoords = !!viewportCoords ? viewportCoords : new ViewportCoords();\n }\n\n public basicToCanvas(\n basicPoint: number[],\n container: HTMLElement,\n render: RenderCamera,\n transform: Transform): number[] {\n\n return this._viewportCoords\n .basicToCanvas(basicPoint[0], basicPoint[1], container, transform, render.perspective);\n }\n\n public canvasToBasic(\n canvasPoint: number[],\n container: HTMLElement,\n render: RenderCamera,\n transform: Transform): number[] {\n\n let basicPoint: number[] = this._viewportCoords\n .canvasToBasic(canvasPoint[0], canvasPoint[1], container, transform, render.perspective);\n\n if (basicPoint[0] < 0 || basicPoint[0] > 1 || basicPoint[1] < 0 || basicPoint[1] > 1) {\n basicPoint = null;\n }\n\n return basicPoint;\n }\n\n public eventToUnprojection(\n event: MouseEvent | Touch,\n container: HTMLElement,\n render: RenderCamera,\n reference: ILatLonAlt,\n transform: Transform): IUnprojection {\n\n const pixelPoint: number[] = this._viewportCoords.canvasPosition(event, container);\n\n return this.canvasToUnprojection(pixelPoint, container, render, reference, transform);\n }\n\n public canvasToUnprojection(\n canvasPoint: number[],\n container: HTMLElement,\n render: RenderCamera,\n reference: ILatLonAlt,\n transform: Transform): IUnprojection {\n\n const canvasX: number = canvasPoint[0];\n const canvasY: number = canvasPoint[1];\n\n const [viewportX, viewportY]: number[] =\n this._viewportCoords.canvasToViewport(canvasX, canvasY, container);\n\n const point3d: THREE.Vector3 = new THREE.Vector3(viewportX, viewportY, 1)\n .unproject(render.perspective);\n\n let basicPoint: number[] = transform.projectBasic(point3d.toArray());\n if (basicPoint[0] < 0 || basicPoint[0] > 1 || basicPoint[1] < 0 || basicPoint[1] > 1) {\n basicPoint = null;\n }\n\n const direction3d: THREE.Vector3 = point3d.clone().sub(render.camera.position).normalize();\n const dist: number = -2 / direction3d.z;\n\n let latLon: ILatLon = null;\n if (dist > 0 && dist < 100 && !!basicPoint) {\n const point: THREE.Vector3 = direction3d.clone().multiplyScalar(dist).add(render.camera.position);\n const latLonArray: number[] = this._geoCoords\n .enuToGeodetic(\n point.x,\n point.y,\n point.z,\n reference.lat,\n reference.lon,\n reference.alt)\n .slice(0, 2);\n\n latLon = { lat: latLonArray[0], lon: latLonArray[1] };\n }\n\n const unprojection: IUnprojection = {\n basicPoint: basicPoint,\n latLon: latLon,\n pixelPoint: [canvasX, canvasY],\n };\n\n return unprojection;\n }\n}\n\nexport default Projection;\n",
+ "import {refCount, publishReplay, scan, startWith} from \"rxjs/operators\";\nimport * as THREE from \"three\";\nimport * as vd from \"virtual-dom\";\n\nimport {Observable, Subject} from \"rxjs\";\n\nimport {Alignment, ISpriteAtlas} from \"../Viewer\";\n\nclass SpriteAtlas implements ISpriteAtlas {\n private _image: HTMLImageElement;\n private _texture: THREE.Texture;\n private _json: ISprites;\n\n public set json(value: ISprites) {\n this._json = value;\n }\n\n public set image(value: HTMLImageElement) {\n this._image = value;\n this._texture = new THREE.Texture(this._image);\n this._texture.minFilter = THREE.NearestFilter;\n }\n\n public get loaded(): boolean {\n return !!(this._image && this._json);\n }\n\n public getGLSprite(name: string): THREE.Object3D {\n if (!this.loaded) {\n throw new Error(\"Sprites cannot be retrieved before the atlas is loaded.\");\n }\n\n let definition: ISprite = this._json[name];\n\n if (!definition) {\n console.warn(\"Sprite with key\" + name + \"does not exist in sprite definition.\");\n\n return new THREE.Object3D();\n }\n\n let texture: THREE.Texture = this._texture.clone();\n texture.needsUpdate = true;\n\n let width: number = this._image.width;\n let height: number = this._image.height;\n\n texture.offset.x = definition.x / width;\n texture.offset.y = (height - definition.y - definition.height) / height;\n texture.repeat.x = definition.width / width;\n texture.repeat.y = definition.height / height;\n\n let material: THREE.SpriteMaterial = new THREE.SpriteMaterial({ map: texture });\n\n return new THREE.Sprite(material);\n }\n\n public getDOMSprite(\n name: string,\n float?: Alignment): vd.VNode {\n\n if (!this.loaded) {\n throw new Error(\"Sprites cannot be retrieved before the atlas is loaded.\");\n }\n\n if (float == null) {\n float = Alignment.Center;\n }\n\n let definition: ISprite = this._json[name];\n\n if (!definition) {\n console.warn(\"Sprite with key\" + name + \"does not exist in sprite definition.\");\n\n return vd.h(\"div\", {}, []);\n }\n\n let clipTop: number = definition.y;\n let clipRigth: number = definition.x + definition.width;\n let clipBottom: number = definition.y + definition.height;\n let clipLeft: number = definition.x;\n\n let left: number = -definition.x;\n let top: number = -definition.y;\n\n let height: number = this._image.height;\n let width: number = this._image.width;\n\n switch (float) {\n case Alignment.Bottom:\n case Alignment.Center:\n case Alignment.Top:\n left -= definition.width / 2;\n break;\n case Alignment.BottomLeft:\n case Alignment.Left:\n case Alignment.TopLeft:\n left -= definition.width;\n break;\n case Alignment.BottomRight:\n case Alignment.Right:\n case Alignment.TopRight:\n default:\n break;\n }\n\n switch (float) {\n case Alignment.Center:\n case Alignment.Left:\n case Alignment.Right:\n top -= definition.height / 2;\n break;\n case Alignment.Top:\n case Alignment.TopLeft:\n case Alignment.TopRight:\n top -= definition.height;\n break;\n case Alignment.Bottom:\n case Alignment.BottomLeft:\n case Alignment.BottomRight:\n default:\n break;\n }\n\n let pixelRatioInverse: number = 1 / definition.pixelRatio;\n\n clipTop *= pixelRatioInverse;\n clipRigth *= pixelRatioInverse;\n clipBottom *= pixelRatioInverse;\n clipLeft *= pixelRatioInverse;\n left *= pixelRatioInverse;\n top *= pixelRatioInverse;\n height *= pixelRatioInverse;\n width *= pixelRatioInverse;\n\n let properties: vd.createProperties = {\n src: this._image.src,\n style: {\n clip: `rect(${clipTop}px, ${clipRigth}px, ${clipBottom}px, ${clipLeft}px)`,\n height: `${height}px`,\n left: `${left}px`,\n position: \"absolute\",\n top: `${top}px`,\n width: `${width}px`,\n },\n };\n\n return vd.h(\"img\", properties, []);\n }\n}\n\ninterface ISprite {\n width: number;\n height: number;\n x: number;\n y: number;\n pixelRatio: number;\n}\n\ninterface ISprites {\n [key: string]: ISprite;\n}\n\ninterface ISpriteAtlasOperation {\n (atlas: SpriteAtlas): SpriteAtlas;\n}\n\nexport class SpriteService {\n private _retina: boolean;\n\n private _spriteAtlasOperation$: Subject<ISpriteAtlasOperation>;\n private _spriteAtlas$: Observable<SpriteAtlas>;\n\n constructor(sprite?: string) {\n this._retina = window.devicePixelRatio > 1;\n\n this._spriteAtlasOperation$ = new Subject<ISpriteAtlasOperation>();\n\n this._spriteAtlas$ = this._spriteAtlasOperation$.pipe(\n startWith(\n (atlas: SpriteAtlas): SpriteAtlas => {\n return atlas;\n }),\n scan(\n (atlas: SpriteAtlas, operation: ISpriteAtlasOperation): SpriteAtlas => {\n return operation(atlas);\n },\n new SpriteAtlas()),\n publishReplay(1),\n refCount());\n\n this._spriteAtlas$.subscribe(() => { /*noop*/ });\n\n if (sprite == null) {\n return;\n }\n\n let format: string = this._retina ? \"@2x\" : \"\";\n\n let imageXmlHTTP: XMLHttpRequest = new XMLHttpRequest();\n imageXmlHTTP.open(\"GET\", sprite + format + \".png\", true);\n imageXmlHTTP.responseType = \"arraybuffer\";\n imageXmlHTTP.onload = () => {\n let image: HTMLImageElement = new Image();\n image.onload = () => {\n this._spriteAtlasOperation$.next(\n (atlas: SpriteAtlas): SpriteAtlas => {\n atlas.image = image;\n\n return atlas;\n });\n };\n\n let blob: Blob = new Blob([imageXmlHTTP.response]);\n image.src = window.URL.createObjectURL(blob);\n };\n\n imageXmlHTTP.onerror = (error: Event) => {\n console.error(new Error(`Failed to fetch sprite sheet (${sprite}${format}.png)`));\n };\n\n imageXmlHTTP.send();\n\n let jsonXmlHTTP: XMLHttpRequest = new XMLHttpRequest();\n jsonXmlHTTP.open(\"GET\", sprite + format + \".json\", true);\n jsonXmlHTTP.responseType = \"text\";\n jsonXmlHTTP.onload = () => {\n let json: ISprites = <ISprites>JSON.parse(jsonXmlHTTP.response);\n\n this._spriteAtlasOperation$.next(\n (atlas: SpriteAtlas): SpriteAtlas => {\n atlas.json = json;\n\n return atlas;\n });\n };\n\n jsonXmlHTTP.onerror = (error: Event) => {\n console.error(new Error(`Failed to fetch sheet (${sprite}${format}.json)`));\n };\n\n jsonXmlHTTP.send();\n }\n\n public get spriteAtlas$(): Observable<ISpriteAtlas> {\n return this._spriteAtlas$;\n }\n}\n\nexport default SpriteService;\n",
+ "import {\n merge as observableMerge,\n fromEvent as observableFromEvent,\n timer as observableTimer,\n BehaviorSubject,\n Observable,\n Subject,\n} from \"rxjs\";\n\nimport {\n bufferWhen,\n mergeMap,\n take,\n takeUntil,\n switchMap,\n distinctUntilChanged,\n scan,\n refCount,\n first,\n map,\n skip,\n share,\n filter,\n publishReplay,\n} from \"rxjs/operators\";\n\nimport {IPinch} from \"../Viewer\";\n\ninterface IPinchOperation {\n (pinch: IPinch): IPinch;\n}\n\nexport class TouchService {\n private _activeSubject$: BehaviorSubject<boolean>;\n private _active$: Observable<boolean>;\n\n private _touchStart$: Observable<TouchEvent>;\n private _touchMove$: Observable<TouchEvent>;\n private _touchEnd$: Observable<TouchEvent>;\n private _touchCancel$: Observable<TouchEvent>;\n\n private _singleTouchDrag$: Observable<TouchEvent>;\n private _singleTouchDragStart$: Observable<TouchEvent>;\n private _singleTouchDragEnd$: Observable<TouchEvent>;\n private _singleTouchMove$: Observable<TouchEvent>;\n\n private _pinchOperation$: Subject<IPinchOperation>;\n private _pinch$: Observable<IPinch>;\n private _pinchStart$: Observable<TouchEvent>;\n private _pinchEnd$: Observable<TouchEvent>;\n private _pinchChange$: Observable<IPinch>;\n\n private _doubleTap$: Observable<TouchEvent>;\n\n constructor(canvasContainer: HTMLElement, domContainer: HTMLElement) {\n this._activeSubject$ = new BehaviorSubject<boolean>(false);\n\n this._active$ = this._activeSubject$.pipe(\n distinctUntilChanged(),\n publishReplay(1),\n refCount());\n\n observableFromEvent<TouchEvent>(domContainer, \"touchmove\")\n .subscribe(\n (event: TouchEvent): void => {\n event.preventDefault();\n });\n\n this._touchStart$ = observableFromEvent<TouchEvent>(canvasContainer, \"touchstart\");\n this._touchMove$ = observableFromEvent<TouchEvent>(canvasContainer, \"touchmove\");\n this._touchEnd$ = observableFromEvent<TouchEvent>(canvasContainer, \"touchend\");\n this._touchCancel$ = observableFromEvent<TouchEvent>(canvasContainer, \"touchcancel\");\n\n const tapStart$: Observable<TouchEvent> = this._touchStart$.pipe(\n filter(\n (te: TouchEvent): boolean => {\n return te.touches.length === 1 && te.targetTouches.length === 1;\n }),\n share());\n\n this._doubleTap$ = tapStart$.pipe(\n bufferWhen(\n (): Observable<number | TouchEvent> => {\n return tapStart$.pipe(\n first(),\n switchMap(\n (event: TouchEvent): Observable<number | TouchEvent> => {\n return observableMerge(\n observableTimer(300),\n tapStart$).pipe(\n take(1));\n }));\n }),\n filter(\n (events: TouchEvent[]): boolean => {\n return events.length === 2;\n }),\n map(\n (events: TouchEvent[]): TouchEvent => {\n return events[events.length - 1];\n }),\n share());\n\n this._doubleTap$\n .subscribe(\n (event: TouchEvent): void => {\n event.preventDefault();\n });\n\n this._singleTouchMove$ = this._touchMove$.pipe(\n filter(\n (te: TouchEvent): boolean => {\n return te.touches.length === 1 && te.targetTouches.length === 1;\n }),\n share());\n\n let singleTouchStart$: Observable<TouchEvent> = observableMerge<TouchEvent>(\n this._touchStart$,\n this._touchEnd$,\n this._touchCancel$).pipe(\n filter(\n (te: TouchEvent): boolean => {\n return te.touches.length === 1 && te.targetTouches.length === 1;\n }));\n\n let multipleTouchStart$: Observable<TouchEvent> = observableMerge<TouchEvent>(\n this._touchStart$,\n this._touchEnd$,\n this._touchCancel$).pipe(\n filter(\n (te: TouchEvent): boolean => {\n return te.touches.length >= 1;\n }));\n\n let touchStop$: Observable<TouchEvent> = observableMerge<TouchEvent>(\n this._touchEnd$,\n this._touchCancel$).pipe(\n filter(\n (te: TouchEvent): boolean => {\n return te.touches.length === 0;\n }));\n\n this._singleTouchDragStart$ = singleTouchStart$.pipe(\n mergeMap(\n (e: TouchEvent): Observable<TouchEvent> => {\n return this._singleTouchMove$.pipe(\n takeUntil(\n observableMerge(\n touchStop$,\n multipleTouchStart$)),\n take(1));\n }));\n\n this._singleTouchDragEnd$ = singleTouchStart$.pipe(\n mergeMap(\n (e: TouchEvent): Observable<TouchEvent> => {\n return observableMerge(\n touchStop$,\n multipleTouchStart$).pipe(\n first());\n }));\n\n this._singleTouchDrag$ = singleTouchStart$.pipe(\n switchMap(\n (te: TouchEvent): Observable<TouchEvent> => {\n return this._singleTouchMove$.pipe(\n skip(1),\n takeUntil(\n observableMerge(\n multipleTouchStart$,\n touchStop$)));\n }));\n\n let touchesChanged$: Observable<TouchEvent> = observableMerge<TouchEvent>(\n this._touchStart$,\n this._touchEnd$,\n this._touchCancel$);\n\n this._pinchStart$ = touchesChanged$.pipe(\n filter(\n (te: TouchEvent): boolean => {\n return te.touches.length === 2 && te.targetTouches.length === 2;\n }));\n\n this._pinchEnd$ = touchesChanged$.pipe(\n filter(\n (te: TouchEvent): boolean => {\n return te.touches.length !== 2 || te.targetTouches.length !== 2;\n }));\n\n this._pinchOperation$ = new Subject<IPinchOperation>();\n\n this._pinch$ = this._pinchOperation$.pipe(\n scan(\n (pinch: IPinch, operation: IPinchOperation): IPinch => {\n return operation(pinch);\n },\n {\n changeX: 0,\n changeY: 0,\n clientX: 0,\n clientY: 0,\n distance: 0,\n distanceChange: 0,\n distanceX: 0,\n distanceY: 0,\n originalEvent: null,\n pageX: 0,\n pageY: 0,\n screenX: 0,\n screenY: 0,\n touch1: null,\n touch2: null,\n }));\n\n this._touchMove$.pipe(\n filter(\n (te: TouchEvent): boolean => {\n return te.touches.length === 2 && te.targetTouches.length === 2;\n }),\n map(\n (te: TouchEvent): IPinchOperation => {\n return (previous: IPinch): IPinch => {\n let touch1: Touch = te.touches[0];\n let touch2: Touch = te.touches[1];\n\n let minX: number = Math.min(touch1.clientX, touch2.clientX);\n let maxX: number = Math.max(touch1.clientX, touch2.clientX);\n\n let minY: number = Math.min(touch1.clientY, touch2.clientY);\n let maxY: number = Math.max(touch1.clientY, touch2.clientY);\n\n let centerClientX: number = minX + (maxX - minX) / 2;\n let centerClientY: number = minY + (maxY - minY) / 2;\n\n let centerPageX: number = centerClientX + touch1.pageX - touch1.clientX;\n let centerPageY: number = centerClientY + touch1.pageY - touch1.clientY;\n\n let centerScreenX: number = centerClientX + touch1.screenX - touch1.clientX;\n let centerScreenY: number = centerClientY + touch1.screenY - touch1.clientY;\n\n let distanceX: number = Math.abs(touch1.clientX - touch2.clientX);\n let distanceY: number = Math.abs(touch1.clientY - touch2.clientY);\n\n let distance: number = Math.sqrt(distanceX * distanceX + distanceY * distanceY);\n\n let distanceChange: number = distance - previous.distance;\n\n let changeX: number = distanceX - previous.distanceX;\n let changeY: number = distanceY - previous.distanceY;\n\n let current: IPinch = {\n changeX: changeX,\n changeY: changeY,\n clientX: centerClientX,\n clientY: centerClientY,\n distance: distance,\n distanceChange: distanceChange,\n distanceX: distanceX,\n distanceY: distanceY,\n originalEvent: te,\n pageX: centerPageX,\n pageY: centerPageY,\n screenX: centerScreenX,\n screenY: centerScreenY,\n touch1: touch1,\n touch2: touch2,\n };\n\n return current;\n };\n }))\n .subscribe(this._pinchOperation$);\n\n this._pinchChange$ = this._pinchStart$.pipe(\n switchMap(\n (te: TouchEvent): Observable<IPinch> => {\n return this._pinch$.pipe(\n skip(1),\n takeUntil(this._pinchEnd$));\n }));\n }\n\n public get active$(): Observable<boolean> {\n return this._active$;\n }\n\n public get activate$(): Subject<boolean> {\n return this._activeSubject$;\n }\n\n public get doubleTap$(): Observable<TouchEvent> {\n return this._doubleTap$;\n }\n\n public get touchStart$(): Observable<TouchEvent> {\n return this._touchStart$;\n }\n\n public get touchMove$(): Observable<TouchEvent> {\n return this._touchMove$;\n }\n\n public get touchEnd$(): Observable<TouchEvent> {\n return this._touchEnd$;\n }\n\n public get touchCancel$(): Observable<TouchEvent> {\n return this._touchCancel$;\n }\n\n public get singleTouchDragStart$(): Observable<TouchEvent> {\n return this._singleTouchDragStart$;\n }\n\n public get singleTouchDrag$(): Observable<TouchEvent> {\n return this._singleTouchDrag$;\n }\n\n public get singleTouchDragEnd$(): Observable<TouchEvent> {\n return this._singleTouchDragEnd$;\n }\n\n public get pinch$(): Observable<IPinch> {\n return this._pinchChange$;\n }\n\n public get pinchStart$(): Observable<TouchEvent> {\n return this._pinchStart$;\n }\n\n public get pinchEnd$(): Observable<TouchEvent> {\n return this._pinchEnd$;\n }\n}\n",
+ "import {throwError as observableThrowError, Observable} from \"rxjs\";\n\nimport {first} from \"rxjs/operators\";\nimport * as when from \"when\";\n\nimport {ILatLon} from \"../API\";\nimport {EdgeDirection} from \"../Edge\";\nimport {\n FilterExpression,\n Node,\n} from \"../Graph\";\nimport {\n ComponentController,\n Container,\n IViewerOptions,\n Navigator,\n Observer,\n} from \"../Viewer\";\nimport {\n Component,\n IComponentConfiguration,\n} from \"../Component\";\nimport {\n EventEmitter,\n Settings,\n Urls,\n} from \"../Utils\";\nimport {RenderMode} from \"../Render\";\nimport {TransitionMode} from \"../State\";\n\n/**\n * @class Viewer\n *\n * @classdesc The Viewer object represents the navigable image viewer.\n * Create a Viewer by specifying a container, client ID, image key and\n * other options. The viewer exposes methods and events for programmatic\n * interaction.\n *\n * In the case of asynchronous methods, MapillaryJS returns promises to\n * the results. Notifications are always emitted through JavaScript events.\n *\n * The viewer works with a few different coordinate systems.\n *\n * Container pixel coordinates\n *\n * Pixel coordinates are coordinates on the viewer container. The origin is\n * in the top left corner of the container. The axes are\n * directed according to the following for a viewer container with a width\n * of 640 pixels and height of 480 pixels.\n *\n * ```\n * (0,0) (640, 0)\n * +------------------------>\n * |\n * |\n * |\n * v +\n * (0, 480) (640, 480)\n * ```\n *\n * Basic image coordinates\n *\n * Basic image coordinates represents points in the original image adjusted for\n * orientation. They range from 0 to 1 on both axes. The origin is in the top left\n * corner of the image and the axes are directed\n * according to the following for all image types.\n *\n * ```\n * (0,0) (1, 0)\n * +------------------------>\n * |\n * |\n * |\n * v +\n * (0, 1) (1, 1)\n * ```\n *\n * For every camera viewing direction it is possible to convert between these\n * two coordinate systems for the current node. The image can be panned and\n * zoomed independently of the size of the viewer container resulting in\n * different conversion results for different viewing directions.\n */\nexport class Viewer extends EventEmitter {\n /**\n * Fired when the viewing direction of the camera changes.\n *\n * @description Related to the computed compass angle\n * ({@link Node.computedCA}) from SfM, not the original EXIF compass\n * angle.\n *\n * @event\n * @type {number} bearing - Value indicating the current bearing\n * measured in degrees clockwise with respect to north.\n */\n public static bearingchanged: string = \"bearingchanged\";\n\n /**\n * Fired when a pointing device (usually a mouse) is pressed and released at\n * the same point in the viewer.\n * @event\n * @type {@link IViewerMouseEvent} event - Viewer mouse event data.\n */\n public static click: string = \"click\";\n\n /**\n * Fired when the right button of the mouse is clicked within the viewer.\n * @event\n * @type {@link IViewerMouseEvent} event - Viewer mouse event data.\n */\n public static contextmenu: string = \"contextmenu\";\n\n /**\n * Fired when a pointing device (usually a mouse) is clicked twice at\n * the same point in the viewer.\n * @event\n * @type {@link IViewerMouseEvent} event - Viewer mouse event data.\n */\n public static dblclick: string = \"dblclick\";\n\n /**\n * Fired when the viewer is loading more data.\n * @event\n * @type {boolean} loading - Boolean indicating whether the viewer is loading.\n */\n public static loadingchanged: string = \"loadingchanged\";\n\n /**\n * Fired when a pointing device (usually a mouse) is pressed within the viewer.\n * @event\n * @type {@link IViewerMouseEvent} event - Viewer mouse event data.\n */\n public static mousedown: string = \"mousedown\";\n\n /**\n * Fired when a pointing device (usually a mouse) is moved within the viewer.\n * @description Will not fire when the mouse is actively used, e.g. for drag pan.\n * @event\n * @type {@link IViewerMouseEvent} event - Viewer mouse event data.\n */\n public static mousemove: string = \"mousemove\";\n\n /**\n * Fired when a pointing device (usually a mouse) leaves the viewer's canvas.\n * @event\n * @type {@link IViewerMouseEvent} event - Viewer mouse event data.\n */\n public static mouseout: string = \"mouseout\";\n\n /**\n * Fired when a pointing device (usually a mouse) is moved onto the viewer's canvas.\n * @event\n * @type {@link IViewerMouseEvent} event - Viewer mouse event data.\n */\n public static mouseover: string = \"mouseover\";\n\n /**\n * Fired when a pointing device (usually a mouse) is released within the viewer.\n * @event\n * @type {@link IViewerMouseEvent} event - Viewer mouse event data.\n */\n public static mouseup: string = \"mouseup\";\n\n /**\n * Fired when the viewer motion stops and it is in a fixed\n * position with a fixed point of view.\n * @event\n */\n public static moveend: string = \"moveend\";\n\n /**\n * Fired when the motion from one view to another start,\n * either by changing the position (e.g. when changing node) or\n * when changing point of view (e.g. by interaction such as pan and zoom).\n * @event\n */\n public static movestart: string = \"movestart\";\n\n /**\n * Fired when the navigable state of the viewer changes.\n *\n * @description The navigable state indicates if the viewer supports\n * moving, i.e. calling the `moveToKey`, `moveDir` and `moveCloseTo`\n * methods. The viewer will not be in a navigable state if the cover\n * is activated and the viewer has been supplied a key. When the cover\n * is deactivated or activated without being supplied a key it will\n * be navigable.\n *\n * @event\n * @type {boolean} navigable - Boolean indicating whether the viewer is navigable.\n */\n public static navigablechanged: string = \"navigablechanged\";\n\n /**\n * Fired every time the viewer navigates to a new node.\n * @event\n * @type {@link Node} node - Current node.\n */\n public static nodechanged: string = \"nodechanged\";\n\n /**\n * Fired every time the sequence edges of the current node changes.\n * @event\n * @type {@link IEdgeStatus} status - The edge status object.\n */\n public static sequenceedgeschanged: string = \"sequenceedgeschanged\";\n\n /**\n * Fired every time the spatial edges of the current node changes.\n * @event\n * @type {@link IEdgeStatus} status - The edge status object.\n */\n public static spatialedgeschanged: string = \"spatialedgeschanged\";\n\n /**\n * Private component controller object which manages component states.\n */\n private _componentController: ComponentController;\n\n /**\n * Private container object which maintains the DOM Element,\n * renderers and relevant services.\n */\n private _container: Container;\n\n /**\n * Private observer object which observes the viewer state and\n * fires events on behalf of the viewer.\n */\n private _observer: Observer;\n\n /**\n * Private navigator object which controls navigation throught\n * the vast seas of Mapillary.\n */\n private _navigator: Navigator;\n\n /**\n * Create a new viewer instance.\n *\n * @description It is possible to initialize the viewer with or\n * without a key.\n *\n * When you want to show a specific image in the viewer from\n * the start you should initialize it with a key.\n *\n * When you do not know the first image key at implementation\n * time, e.g. in a map-viewer application you should initialize\n * the viewer without a key and call `moveToKey` instead.\n *\n * When initializing with a key the viewer is bound to that key\n * until the node for that key has been successfully loaded.\n * Also, a cover with the image of the key will be shown.\n * If the data for that key can not be loaded because the key is\n * faulty or other errors occur it is not possible to navigate\n * to another key because the viewer is not navigable. The viewer\n * becomes navigable when the data for the key has been loaded and\n * the image is shown in the viewer. This way of initializing\n * the viewer is mostly for embedding in blog posts and similar\n * where one wants to show a specific image initially.\n *\n * If the viewer is initialized without a key (with null or\n * undefined) it is not bound to any particular key and it is\n * possible to move to any key with `viewer.moveToKey(\"<my-image-key>\")`.\n * If the first move to a key fails it is possible to move to another\n * key. The viewer will show a black background until a move\n * succeeds. This way of intitializing is suited for a map-viewer\n * application when the initial key is not known at implementation\n * time.\n *\n * @param {string} id - Required `id` of a DOM element which will\n * be transformed into the viewer.\n * @param {string} clientId - Required `Mapillary API ClientID`. Can\n * be obtained from https://www.mapillary.com/app/settings/developers.\n * @param {string} key - Optional `image-key` to start from. The key\n * can be any Mapillary image. If a key is provided the viewer is\n * bound to that key until it has been fully loaded. If null is provided\n * no image is loaded at viewer initialization and the viewer is not\n * bound to any particular key. Any image can then be navigated to\n * with e.g. `viewer.moveToKey(\"<my-image-key>\")`.\n * @param {IViewerOptions} options - Optional configuration object\n * specifing Viewer's and the components' initial setup.\n * @param {string} token - Optional bearer token for API requests of\n * protected resources.\n *\n * @example\n * ```\n * var viewer = new Mapillary.Viewer(\"<element-id>\", \"<client-id>\", \"<image-key>\");\n * ```\n */\n constructor (id: string, clientId: string, key?: string, options?: IViewerOptions, token?: string) {\n super();\n\n options = options != null ? options : {};\n\n Settings.setOptions(options);\n Urls.setOptions(options.url);\n\n this._navigator = new Navigator(clientId, options, token);\n this._container = new Container(id, this._navigator.stateService, options);\n this._observer = new Observer(this, this._navigator, this._container);\n this._componentController = new ComponentController(this._container, this._navigator, this._observer, key, options.component);\n }\n\n /**\n * Return a boolean indicating if the viewer is in a navigable state.\n *\n * @description The navigable state indicates if the viewer supports\n * moving, i.e. calling the {@link moveToKey}, {@link moveDir}\n * and {@link moveCloseTo} methods or changing the authentication state,\n * i.e. calling {@link setAuthToken}. The viewer will not be in a navigable\n * state if the cover is activated and the viewer has been supplied a key.\n * When the cover is deactivated or the viewer is activated without being\n * supplied a key it will be navigable.\n *\n * @returns {boolean} Boolean indicating whether the viewer is navigable.\n */\n public get isNavigable(): boolean {\n return this._componentController.navigable;\n }\n\n /**\n * Activate the combined panning functionality.\n *\n * @description The combined panning functionality is active by default.\n */\n public activateCombinedPanning(): void {\n this._navigator.panService.enable();\n }\n\n /**\n * Activate a component.\n *\n * @param {string} name - Name of the component which will become active.\n *\n * @example\n * ```\n * viewer.activateComponent(\"marker\");\n * ```\n */\n public activateComponent(name: string): void {\n this._componentController.activate(name);\n }\n\n /**\n * Activate the cover (deactivates all other components).\n */\n public activateCover(): void {\n this._componentController.activateCover();\n }\n\n /**\n * Deactivate the combined panning functionality.\n *\n * @description Deactivating the combined panning functionality\n * could be needed in scenarios involving sequence only navigation.\n */\n public deactivateCombinedPanning(): void {\n this._navigator.panService.disable();\n }\n\n /**\n * Deactivate a component.\n *\n * @param {string} name - Name of component which become inactive.\n *\n * @example\n * ```\n * viewer.deactivateComponent(\"mouse\");\n * ```\n */\n public deactivateComponent(name: string): void {\n this._componentController.deactivate(name);\n }\n\n /**\n * Deactivate the cover (activates all components marked as active).\n */\n public deactivateCover(): void {\n this._componentController.deactivateCover();\n }\n\n /**\n * Get the bearing of the current viewer camera.\n *\n * @description The bearing depends on how the camera\n * is currently rotated and does not correspond\n * to the compass angle of the current node if the view\n * has been panned.\n *\n * Bearing is measured in degrees clockwise with respect to\n * north.\n *\n * @returns {Promise<number>} Promise to the bearing\n * of the current viewer camera.\n *\n * @example\n * ```\n * viewer.getBearing().then((b) => { console.log(b); });\n * ```\n */\n public getBearing(): when.Promise<number> {\n return when.promise<number>(\n (resolve: (value: number) => void, reject: (reason: Error) => void): void => {\n this._container.renderService.bearing$.pipe(\n first())\n .subscribe(\n (bearing: number): void => {\n resolve(bearing);\n },\n (error: Error): void => {\n reject(error);\n });\n });\n }\n\n /**\n * Get the basic coordinates of the current image that is\n * at the center of the viewport.\n *\n * @description Basic coordinates are 2D coordinates on the [0, 1] interval\n * and have the origin point, (0, 0), at the top left corner and the\n * maximum value, (1, 1), at the bottom right corner of the original\n * image.\n *\n * @returns {Promise<number[]>} Promise to the basic coordinates\n * of the current image at the center for the viewport.\n *\n * @example\n * ```\n * viewer.getCenter().then((c) => { console.log(c); });\n * ```\n */\n public getCenter(): when.Promise<number[]> {\n return when.promise<number[]>(\n (resolve: (value: number[]) => void, reject: (reason: Error) => void): void => {\n this._navigator.stateService.getCenter()\n .subscribe(\n (center: number[]): void => {\n resolve(center);\n },\n (error: Error): void => {\n reject(error);\n });\n });\n }\n\n /**\n * Get a component.\n *\n * @param {string} name - Name of component.\n * @returns {Component} The requested component.\n *\n * @example\n * ```\n * var mouseComponent = viewer.getComponent(\"mouse\");\n * ```\n */\n public getComponent<TComponent extends Component<IComponentConfiguration>>(name: string): TComponent {\n return this._componentController.get<TComponent>(name);\n }\n\n /**\n * Returns the viewer's containing HTML element.\n *\n * @returns {HTMLElement} The viewer's container.\n */\n public getContainer(): HTMLElement {\n return this._container.element;\n }\n\n /**\n * Get the image's current zoom level.\n *\n * @returns {Promise<number>} Promise to the viewers's current\n * zoom level.\n *\n * @example\n * ```\n * viewer.getZoom().then((z) => { console.log(z); });\n * ```\n */\n public getZoom(): when.Promise<number> {\n return when.promise<number>(\n (resolve: (value: number) => void, reject: (reason: Error) => void): void => {\n this._navigator.stateService.getZoom()\n .subscribe(\n (zoom: number): void => {\n resolve(zoom);\n },\n (error: Error): void => {\n reject(error);\n });\n });\n }\n\n /**\n * Move close to given latitude and longitude.\n *\n * @description Because the method propagates IO errors, these potential errors\n * need to be handled by the method caller (see example).\n *\n * @param {Number} lat - Latitude, in degrees.\n * @param {Number} lon - Longitude, in degrees.\n * @returns {Promise<Node>} Promise to the node that was navigated to.\n * @throws {Error} If no nodes exist close to provided latitude\n * longitude.\n * @throws {Error} Propagates any IO errors to the caller.\n * @throws {Error} When viewer is not navigable.\n * @throws {@link AbortMapillaryError} When a subsequent move request is made\n * before the move close to call has completed.\n *\n * @example\n * ```\n * viewer.moveCloseTo(0, 0).then(\n * (n) => { console.log(n); },\n * (e) => { console.error(e); });\n * ```\n */\n public moveCloseTo(lat: number, lon: number): when.Promise<Node> {\n const moveCloseTo$: Observable<Node> = this.isNavigable ?\n this._navigator.moveCloseTo$(lat, lon) :\n observableThrowError(new Error(\"Calling moveCloseTo is not supported when viewer is not navigable.\"));\n\n return when.promise<Node>(\n (resolve: (value: Node) => void, reject: (reason: Error) => void): void => {\n moveCloseTo$.subscribe(\n (node: Node): void => {\n resolve(node);\n },\n (error: Error): void => {\n reject(error);\n });\n });\n }\n\n /**\n * Navigate in a given direction.\n *\n * @description This method has to be called through EdgeDirection enumeration as in the example.\n *\n * @param {EdgeDirection} dir - Direction in which which to move.\n * @returns {Promise<Node>} Promise to the node that was navigated to.\n * @throws {Error} If the current node does not have the edge direction\n * or the edges has not yet been cached.\n * @throws {Error} Propagates any IO errors to the caller.\n * @throws {Error} When viewer is not navigable.\n * @throws {@link AbortMapillaryError} When a subsequent move request is made\n * before the move dir call has completed.\n *\n * @example\n * ```\n * viewer.moveDir(Mapillary.EdgeDirection.Next).then(\n * (n) => { console.log(n); },\n * (e) => { console.error(e); });\n * ```\n */\n public moveDir(dir: EdgeDirection): when.Promise<Node> {\n const moveDir$: Observable<Node> = this.isNavigable ?\n this._navigator.moveDir$(dir) :\n observableThrowError(new Error(\"Calling moveDir is not supported when viewer is not navigable.\"));\n\n return when.promise<Node>(\n (resolve: (value: Node) => void, reject: (reason: Error) => void): void => {\n moveDir$.subscribe(\n (node: Node): void => {\n resolve(node);\n },\n (error: Error): void => {\n reject(error);\n });\n });\n }\n\n /**\n * Navigate to a given image key.\n *\n * @param {string} key - A valid Mapillary image key.\n * @returns {Promise<Node>} Promise to the node that was navigated to.\n * @throws {Error} Propagates any IO errors to the caller.\n * @throws {Error} When viewer is not navigable.\n * @throws {@link AbortMapillaryError} When a subsequent move request is made\n * before the move to key call has completed.\n *\n * @example\n * ```\n * viewer.moveToKey(\"<my key>\").then(\n * (n) => { console.log(n); },\n * (e) => { console.error(e); });\n * ```\n */\n public moveToKey(key: string): when.Promise<Node> {\n const moveToKey$: Observable<Node> = this.isNavigable ?\n this._navigator.moveToKey$(key) :\n observableThrowError(new Error(\"Calling moveToKey is not supported when viewer is not navigable.\"));\n\n return when.promise<Node>(\n (resolve: (value: Node) => void, reject: (reason: Error) => void): void => {\n moveToKey$.subscribe(\n (node: Node): void => {\n resolve(node);\n },\n (error: Error): void => {\n reject(error);\n });\n });\n }\n\n /**\n * Project basic image coordinates for the current node to canvas pixel\n * coordinates.\n *\n * @description The basic image coordinates may not always correspond to a\n * pixel point that lies in the visible area of the viewer container.\n *\n * @param {Array<number>} basicPoint - Basic images coordinates to project.\n * @returns {Promise<Array<number>>} Promise to the pixel coordinates corresponding\n * to the basic image point.\n *\n * @example\n * ```\n * viewer.projectFromBasic([0.3, 0.7])\n * .then((pixelPoint) => { console.log(pixelPoint); });\n * ```\n */\n public projectFromBasic(basicPoint: number[]): when.Promise<number[]> {\n return when.promise<number[]>(\n (resolve: (value: number[]) => void, reject: (reason: Error) => void): void => {\n this._observer.projectBasic$(basicPoint)\n .subscribe(\n (pixelPoint: number[]): void => {\n resolve(pixelPoint);\n },\n (error: Error): void => {\n reject(error);\n });\n });\n }\n\n /**\n * Detect the viewer's new width and height and resize it.\n *\n * @description The components will also detect the viewer's\n * new size and resize their rendered elements if needed.\n *\n * @example\n * ```\n * viewer.resize();\n * ```\n */\n public resize(): void {\n this._container.renderService.resize$.next(null);\n }\n\n /**\n * Set a bearer token for authenticated API requests of\n * protected resources.\n *\n * @description When the supplied token is null or undefined,\n * any previously set bearer token will be cleared and the\n * viewer will make unauthenticated requests.\n *\n * Calling setAuthToken aborts all outstanding move requests.\n * The promises of those move requests will be rejected with a\n * {@link AbortMapillaryError} the rejections need to be caught.\n *\n * Calling setAuthToken also resets the complete viewer cache\n * so it should not be called repeatedly.\n *\n * @param {string} [token] token - Bearer token.\n * @returns {Promise<void>} Promise that resolves after token\n * is set.\n *\n * @throws {Error} When viewer is not navigable.\n *\n * @example\n * ```\n * viewer.setAuthToken(\"<my token>\")\n * .then(() => { console.log(\"token set\"); });\n * ```\n */\n public setAuthToken(token?: string): when.Promise<void> {\n const setToken$: Observable<void> = this.isNavigable ?\n this._navigator.setToken$(token) :\n observableThrowError(new Error(\"Calling setAuthToken is not supported when viewer is not navigable.\"));\n\n return when.promise<void>(\n (resolve: (value: void) => void, reject: (reason: Error) => void): void => {\n setToken$\n .subscribe(\n (): void => {\n resolve(undefined);\n },\n (error: Error): void => {\n reject(error);\n });\n });\n }\n\n /**\n * Set the basic coordinates of the current image to be in the\n * center of the viewport.\n *\n * @description Basic coordinates are 2D coordinates on the [0, 1] interval\n * and has the origin point, (0, 0), at the top left corner and the\n * maximum value, (1, 1), at the bottom right corner of the original\n * image.\n *\n * @param {number[]} The basic coordinates of the current\n * image to be at the center for the viewport.\n *\n * @example\n * ```\n * viewer.setCenter([0.5, 0.5]);\n * ```\n */\n public setCenter(center: number[]): void {\n this._navigator.stateService.setCenter(center);\n }\n\n /**\n * Set the filter selecting nodes to use when calculating\n * the spatial edges.\n *\n * @description The following filter types are supported:\n *\n * Comparison\n *\n * `[\"==\", key, value]` equality: `node[key] = value`\n *\n * `[\"!=\", key, value]` inequality: `node[key] ≠ value`\n *\n * `[\"<\", key, value]` less than: `node[key] < value`\n *\n * `[\"<=\", key, value]` less than or equal: `node[key] ≤ value`\n *\n * `[\">\", key, value]` greater than: `node[key] > value`\n *\n * `[\">=\", key, value]` greater than or equal: `node[key] ≥ value`\n *\n * Set membership\n *\n * `[\"in\", key, v0, ..., vn]` set inclusion: `node[key] ∈ {v0, ..., vn}`\n *\n * `[\"!in\", key, v0, ..., vn]` set exclusion: `node[key] ∉ {v0, ..., vn}`\n *\n * Combining\n *\n * `[\"all\", f0, ..., fn]` logical `AND`: `f0 ∧ ... ∧ fn`\n *\n * A key must be a string that identifies a property name of a\n * simple {@link Node} property. A value must be a string, number, or\n * boolean. Strictly-typed comparisons are used. The values\n * `f0, ..., fn` of the combining filter must be filter expressions.\n *\n * Clear the filter by setting it to null or empty array.\n *\n * Commonly used filter properties (see the {@link Node} class\n * documentation for a full list of properties that can be used\n * in a filter) and common use cases:\n *\n * ```\n * fullPano // Show only full 360 panoramas or not\n * organizationKey // Show images from one or several organizations\n * sequenceKey // Show images from one or several sequences\n * userKey // Show images from one or several users\n * capturedAt // Show images from a certain time interval\n * ```\n *\n * @param {FilterExpression} filter - The filter expression.\n * @returns {Promise<void>} Promise that resolves after filter is applied.\n *\n * @example\n * ```\n * viewer.setFilter([\"==\", \"sequenceKey\", \"<my sequence key>\"]);\n *\n * // Other examples\n * // viewer.setFilter([\"==\", \"organizationKey\", \"<my organization key>\"]);\n * // viewer.setFilter([\"in\", \"userKey\", \"<my user key #1>\", \"<my user key #2>\"]);\n * // viewer.setFilter([\"==\", \"fullPano\", true]);\n * // viewer.setFilter([\">=\", \"capturedAt\", <my time stamp>]);\n * ```\n */\n public setFilter(filter: FilterExpression): when.Promise<void> {\n return when.promise<void>(\n (resolve: (value: void) => void, reject: (reason: Error) => void): void => {\n this._navigator.setFilter$(filter)\n .subscribe(\n (): void => {\n resolve(undefined);\n },\n (error: Error): void => {\n reject(error);\n });\n });\n }\n\n /**\n * Set the viewer's render mode.\n *\n * @param {RenderMode} renderMode - Render mode.\n *\n * @example\n * ```\n * viewer.setRenderMode(Mapillary.RenderMode.Letterbox);\n * ```\n */\n public setRenderMode(renderMode: RenderMode): void {\n this._container.renderService.renderMode$.next(renderMode);\n }\n\n /**\n * Set the viewer's transition mode.\n *\n * @param {TransitionMode} transitionMode - Transition mode.\n *\n * @example\n * ```\n * viewer.setTransitionMode(Mapillary.TransitionMode.Instantaneous);\n * ```\n */\n public setTransitionMode(transitionMode: TransitionMode): void {\n this._navigator.stateService.setTransitionMode(transitionMode);\n }\n\n /**\n * Set the image's current zoom level.\n *\n * @description Possible zoom level values are on the [0, 3] interval.\n * Zero means zooming out to fit the image to the view whereas three\n * shows the highest level of detail.\n *\n * @param {number} The image's current zoom level.\n *\n * @example\n * ```\n * viewer.setZoom(2);\n * ```\n */\n public setZoom(zoom: number): void {\n this._navigator.stateService.setZoom(zoom);\n }\n\n /**\n * Unproject canvas pixel coordinates to an ILatLon representing geographical\n * coordinates.\n *\n * @description The pixel point may not always correspond to geographical\n * coordinates. In the case of no correspondence the returned value will\n * be `null`.\n *\n * @param {Array<number>} pixelPoint - Pixel coordinates to unproject.\n * @returns {Promise<ILatLon>} Promise to the latLon corresponding to the pixel point.\n *\n * @example\n * ```\n * viewer.unproject([100, 100])\n * .then((latLon) => { console.log(latLon); });\n * ```\n */\n public unproject(pixelPoint: number[]): when.Promise<ILatLon> {\n return when.promise<ILatLon>(\n (resolve: (value: ILatLon) => void, reject: (reason: Error) => void): void => {\n this._observer.unproject$(pixelPoint)\n .subscribe(\n (latLon: ILatLon): void => {\n resolve(latLon);\n },\n (error: Error): void => {\n reject(error);\n });\n });\n }\n\n /**\n * Unproject canvas pixel coordinates to basic image coordinates for the\n * current node.\n *\n * @description The pixel point may not always correspond to basic image\n * coordinates. In the case of no correspondence the returned value will\n * be `null`.\n *\n * @param {Array<number>} pixelPoint - Pixel coordinates to unproject.\n * @returns {Promise<ILatLon>} Promise to the basic coordinates corresponding\n * to the pixel point.\n *\n * @example\n * ```\n * viewer.unprojectToBasic([100, 100])\n * .then((basicPoint) => { console.log(basicPoint); });\n * ```\n */\n public unprojectToBasic(pixelPoint: number[]): when.Promise<number[]> {\n return when.promise<number[]>(\n (resolve: (value: number[]) => void, reject: (reason: Error) => void): void => {\n this._observer.unprojectBasic$(pixelPoint)\n .subscribe(\n (basicPoint: number[]): void => {\n resolve(basicPoint);\n },\n (error: Error): void => {\n reject(error);\n });\n });\n }\n}\n"
]
}
\ No newline at end of file