@twick/core 0.11.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +21 -0
- package/lib/app/Logger.d.ts +105 -0
- package/lib/app/Logger.d.ts.map +1 -0
- package/lib/app/Logger.js +77 -0
- package/lib/app/PlaybackManager.d.ts +55 -0
- package/lib/app/PlaybackManager.d.ts.map +1 -0
- package/lib/app/PlaybackManager.js +179 -0
- package/lib/app/PlaybackStatus.d.ts +30 -0
- package/lib/app/PlaybackStatus.d.ts.map +1 -0
- package/lib/app/PlaybackStatus.js +46 -0
- package/lib/app/Player.d.ts +130 -0
- package/lib/app/Player.d.ts.map +1 -0
- package/lib/app/Player.js +375 -0
- package/lib/app/Project.d.ts +145 -0
- package/lib/app/Project.d.ts.map +1 -0
- package/lib/app/Project.js +10 -0
- package/lib/app/Renderer.d.ts +90 -0
- package/lib/app/Renderer.d.ts.map +1 -0
- package/lib/app/Renderer.js +318 -0
- package/lib/app/SharedWebGLContext.d.ts +24 -0
- package/lib/app/SharedWebGLContext.d.ts.map +1 -0
- package/lib/app/SharedWebGLContext.js +200 -0
- package/lib/app/Stage.d.ts +30 -0
- package/lib/app/Stage.d.ts.map +1 -0
- package/lib/app/Stage.js +75 -0
- package/lib/app/TimeEstimator.d.ts +53 -0
- package/lib/app/TimeEstimator.d.ts.map +1 -0
- package/lib/app/TimeEstimator.js +70 -0
- package/lib/app/index.d.ts +16 -0
- package/lib/app/index.d.ts.map +1 -0
- package/lib/app/index.js +16 -0
- package/lib/app/makeProject.d.ts +15 -0
- package/lib/app/makeProject.d.ts.map +1 -0
- package/lib/app/makeProject.js +72 -0
- package/lib/app/project-settings.d.ts +8 -0
- package/lib/app/project-settings.d.ts.map +1 -0
- package/lib/app/project-settings.js +13 -0
- package/lib/decorators/decorate.d.ts +2 -0
- package/lib/decorators/decorate.d.ts.map +1 -0
- package/lib/decorators/decorate.js +10 -0
- package/lib/decorators/deprecated.d.ts +5 -0
- package/lib/decorators/deprecated.d.ts.map +1 -0
- package/lib/decorators/deprecated.js +23 -0
- package/lib/decorators/index.d.ts +9 -0
- package/lib/decorators/index.d.ts.map +1 -0
- package/lib/decorators/index.js +9 -0
- package/lib/decorators/lazy.d.ts +14 -0
- package/lib/decorators/lazy.d.ts.map +1 -0
- package/lib/decorators/lazy.js +27 -0
- package/lib/decorators/threadable.d.ts +2 -0
- package/lib/decorators/threadable.d.ts.map +1 -0
- package/lib/decorators/threadable.js +7 -0
- package/lib/events/AsyncEventDispatcher.d.ts +45 -0
- package/lib/events/AsyncEventDispatcher.d.ts.map +1 -0
- package/lib/events/AsyncEventDispatcher.js +33 -0
- package/lib/events/EventDispatcher.d.ts +38 -0
- package/lib/events/EventDispatcher.d.ts.map +1 -0
- package/lib/events/EventDispatcher.js +29 -0
- package/lib/events/EventDispatcherBase.d.ts +55 -0
- package/lib/events/EventDispatcherBase.d.ts.map +1 -0
- package/lib/events/EventDispatcherBase.js +68 -0
- package/lib/events/FlagDispatcher.d.ts +54 -0
- package/lib/events/FlagDispatcher.d.ts.map +1 -0
- package/lib/events/FlagDispatcher.js +63 -0
- package/lib/events/ValueDispatcher.d.ts +81 -0
- package/lib/events/ValueDispatcher.d.ts.map +1 -0
- package/lib/events/ValueDispatcher.js +97 -0
- package/lib/events/index.d.ts +11 -0
- package/lib/events/index.d.ts.map +1 -0
- package/lib/events/index.js +11 -0
- package/lib/exporter/Exporter.d.ts +101 -0
- package/lib/exporter/Exporter.d.ts.map +1 -0
- package/lib/exporter/Exporter.js +2 -0
- package/lib/exporter/FFmpegExporter.d.ts +50 -0
- package/lib/exporter/FFmpegExporter.d.ts.map +1 -0
- package/lib/exporter/FFmpegExporter.js +140 -0
- package/lib/exporter/ImageExporter.d.ts +34 -0
- package/lib/exporter/ImageExporter.d.ts.map +1 -0
- package/lib/exporter/ImageExporter.js +80 -0
- package/lib/exporter/WasmExporter.d.ts +19 -0
- package/lib/exporter/WasmExporter.d.ts.map +1 -0
- package/lib/exporter/WasmExporter.js +78 -0
- package/lib/exporter/download-videos.d.ts +3 -0
- package/lib/exporter/download-videos.d.ts.map +1 -0
- package/lib/exporter/download-videos.js +45 -0
- package/lib/exporter/index.d.ts +5 -0
- package/lib/exporter/index.d.ts.map +1 -0
- package/lib/exporter/index.js +5 -0
- package/lib/flow/all.d.ts +18 -0
- package/lib/flow/all.d.ts.map +1 -0
- package/lib/flow/all.js +25 -0
- package/lib/flow/any.d.ts +18 -0
- package/lib/flow/any.d.ts.map +1 -0
- package/lib/flow/any.js +25 -0
- package/lib/flow/chain.d.ts +36 -0
- package/lib/flow/chain.d.ts.map +1 -0
- package/lib/flow/chain.js +46 -0
- package/lib/flow/delay.d.ts +29 -0
- package/lib/flow/delay.d.ts.map +1 -0
- package/lib/flow/delay.js +39 -0
- package/lib/flow/every.d.ts +41 -0
- package/lib/flow/every.d.ts.map +1 -0
- package/lib/flow/every.js +61 -0
- package/lib/flow/index.d.ts +17 -0
- package/lib/flow/index.d.ts.map +1 -0
- package/lib/flow/index.js +17 -0
- package/lib/flow/join.d.ts +35 -0
- package/lib/flow/join.d.ts.map +1 -0
- package/lib/flow/join.js +33 -0
- package/lib/flow/loop.d.ts +58 -0
- package/lib/flow/loop.d.ts.map +1 -0
- package/lib/flow/loop.js +51 -0
- package/lib/flow/loopFor.d.ts +25 -0
- package/lib/flow/loopFor.d.ts.map +1 -0
- package/lib/flow/loopFor.js +42 -0
- package/lib/flow/names.d.ts +3 -0
- package/lib/flow/names.d.ts.map +1 -0
- package/lib/flow/names.js +11 -0
- package/lib/flow/run.d.ts +45 -0
- package/lib/flow/run.d.ts.map +1 -0
- package/lib/flow/run.js +14 -0
- package/lib/flow/scheduling.d.ts +18 -0
- package/lib/flow/scheduling.d.ts.map +1 -0
- package/lib/flow/scheduling.js +33 -0
- package/lib/flow/sequence.d.ts +22 -0
- package/lib/flow/sequence.d.ts.map +1 -0
- package/lib/flow/sequence.js +31 -0
- package/lib/index.d.ts +16 -0
- package/lib/index.d.ts.map +1 -0
- package/lib/index.js +16 -0
- package/lib/media/index.d.ts +7 -0
- package/lib/media/index.d.ts.map +1 -0
- package/lib/media/index.js +7 -0
- package/lib/media/loadImage.d.ts +8 -0
- package/lib/media/loadImage.d.ts.map +1 -0
- package/lib/media/loadImage.js +29 -0
- package/lib/plugin/DefaultPlugin.d.ts +10 -0
- package/lib/plugin/DefaultPlugin.d.ts.map +1 -0
- package/lib/plugin/DefaultPlugin.js +17 -0
- package/lib/plugin/Plugin.d.ts +53 -0
- package/lib/plugin/Plugin.d.ts.map +1 -0
- package/lib/plugin/Plugin.js +2 -0
- package/lib/plugin/index.d.ts +3 -0
- package/lib/plugin/index.d.ts.map +1 -0
- package/lib/plugin/index.js +3 -0
- package/lib/plugin/makePlugin.d.ts +15 -0
- package/lib/plugin/makePlugin.d.ts.map +1 -0
- package/lib/plugin/makePlugin.js +16 -0
- package/lib/scenes/GeneratorScene.d.ts +95 -0
- package/lib/scenes/GeneratorScene.d.ts.map +1 -0
- package/lib/scenes/GeneratorScene.js +273 -0
- package/lib/scenes/Inspectable.d.ts +71 -0
- package/lib/scenes/Inspectable.d.ts.map +1 -0
- package/lib/scenes/Inspectable.js +4 -0
- package/lib/scenes/LifecycleEvents.d.ts +18 -0
- package/lib/scenes/LifecycleEvents.d.ts.map +1 -0
- package/lib/scenes/LifecycleEvents.js +45 -0
- package/lib/scenes/Random.d.ts +66 -0
- package/lib/scenes/Random.d.ts.map +1 -0
- package/lib/scenes/Random.js +101 -0
- package/lib/scenes/Scene.d.ts +298 -0
- package/lib/scenes/Scene.d.ts.map +1 -0
- package/lib/scenes/Scene.js +25 -0
- package/lib/scenes/SceneState.d.ts +34 -0
- package/lib/scenes/SceneState.d.ts.map +1 -0
- package/lib/scenes/SceneState.js +35 -0
- package/lib/scenes/Shaders.d.ts +63 -0
- package/lib/scenes/Shaders.d.ts.map +1 -0
- package/lib/scenes/Shaders.js +158 -0
- package/lib/scenes/Slides.d.ts +33 -0
- package/lib/scenes/Slides.d.ts.map +1 -0
- package/lib/scenes/Slides.js +115 -0
- package/lib/scenes/Threadable.d.ts +19 -0
- package/lib/scenes/Threadable.d.ts.map +1 -0
- package/lib/scenes/Threadable.js +4 -0
- package/lib/scenes/Variables.d.ts +24 -0
- package/lib/scenes/Variables.d.ts.map +1 -0
- package/lib/scenes/Variables.js +39 -0
- package/lib/scenes/index.d.ts +16 -0
- package/lib/scenes/index.d.ts.map +1 -0
- package/lib/scenes/index.js +16 -0
- package/lib/signals/CompoundSignalContext.d.ts +21 -0
- package/lib/signals/CompoundSignalContext.d.ts.map +1 -0
- package/lib/signals/CompoundSignalContext.js +73 -0
- package/lib/signals/ComputedContext.d.ts +14 -0
- package/lib/signals/ComputedContext.d.ts.map +1 -0
- package/lib/signals/ComputedContext.js +36 -0
- package/lib/signals/DependencyContext.d.ts +32 -0
- package/lib/signals/DependencyContext.d.ts.map +1 -0
- package/lib/signals/DependencyContext.js +87 -0
- package/lib/signals/SignalContext.d.ts +120 -0
- package/lib/signals/SignalContext.d.ts.map +1 -0
- package/lib/signals/SignalContext.js +245 -0
- package/lib/signals/createComputed.d.ts +3 -0
- package/lib/signals/createComputed.d.ts.map +1 -0
- package/lib/signals/createComputed.js +5 -0
- package/lib/signals/createComputedAsync.d.ts +4 -0
- package/lib/signals/createComputedAsync.d.ts.map +1 -0
- package/lib/signals/createComputedAsync.js +15 -0
- package/lib/signals/createSignal.d.ts +5 -0
- package/lib/signals/createSignal.d.ts.map +1 -0
- package/lib/signals/createSignal.js +6 -0
- package/lib/signals/index.d.ts +16 -0
- package/lib/signals/index.d.ts.map +1 -0
- package/lib/signals/index.js +16 -0
- package/lib/signals/symbols.d.ts +2 -0
- package/lib/signals/symbols.d.ts.map +1 -0
- package/lib/signals/symbols.js +2 -0
- package/lib/signals/types.d.ts +51 -0
- package/lib/signals/types.d.ts.map +1 -0
- package/lib/signals/types.js +2 -0
- package/lib/signals/utils.d.ts +5 -0
- package/lib/signals/utils.d.ts.map +1 -0
- package/lib/signals/utils.js +10 -0
- package/lib/threading/Thread.d.ts +77 -0
- package/lib/threading/Thread.d.ts.map +1 -0
- package/lib/threading/Thread.js +169 -0
- package/lib/threading/ThreadGenerator.d.ts +39 -0
- package/lib/threading/ThreadGenerator.d.ts.map +1 -0
- package/lib/threading/ThreadGenerator.js +17 -0
- package/lib/threading/cancel.d.ts +17 -0
- package/lib/threading/cancel.d.ts.map +1 -0
- package/lib/threading/cancel.js +26 -0
- package/lib/threading/index.d.ts +11 -0
- package/lib/threading/index.d.ts.map +1 -0
- package/lib/threading/index.js +11 -0
- package/lib/threading/spawn.d.ts +28 -0
- package/lib/threading/spawn.d.ts.map +1 -0
- package/lib/threading/spawn.js +30 -0
- package/lib/threading/threads.d.ts +46 -0
- package/lib/threading/threads.d.ts.map +1 -0
- package/lib/threading/threads.js +89 -0
- package/lib/transitions/fadeTransition.d.ts +8 -0
- package/lib/transitions/fadeTransition.d.ts.map +1 -0
- package/lib/transitions/fadeTransition.js +16 -0
- package/lib/transitions/index.d.ts +11 -0
- package/lib/transitions/index.d.ts.map +1 -0
- package/lib/transitions/index.js +11 -0
- package/lib/transitions/slideTransition.d.ts +18 -0
- package/lib/transitions/slideTransition.d.ts.map +1 -0
- package/lib/transitions/slideTransition.js +14 -0
- package/lib/transitions/useTransition.d.ts +10 -0
- package/lib/transitions/useTransition.d.ts.map +1 -0
- package/lib/transitions/useTransition.js +27 -0
- package/lib/transitions/zoomInTransition.d.ts +10 -0
- package/lib/transitions/zoomInTransition.d.ts.map +1 -0
- package/lib/transitions/zoomInTransition.js +33 -0
- package/lib/transitions/zoomOutTransition.d.ts +10 -0
- package/lib/transitions/zoomOutTransition.d.ts.map +1 -0
- package/lib/transitions/zoomOutTransition.js +33 -0
- package/lib/tsconfig.build.tsbuildinfo +1 -0
- package/lib/tweening/helpers.d.ts +5 -0
- package/lib/tweening/helpers.d.ts.map +1 -0
- package/lib/tweening/helpers.js +16 -0
- package/lib/tweening/index.d.ts +11 -0
- package/lib/tweening/index.d.ts.map +1 -0
- package/lib/tweening/index.js +11 -0
- package/lib/tweening/interpolationFunctions.d.ts +38 -0
- package/lib/tweening/interpolationFunctions.d.ts.map +1 -0
- package/lib/tweening/interpolationFunctions.js +107 -0
- package/lib/tweening/spring.d.ts +20 -0
- package/lib/tweening/spring.d.ts.map +1 -0
- package/lib/tweening/spring.js +103 -0
- package/lib/tweening/timingFunctions.d.ts +46 -0
- package/lib/tweening/timingFunctions.d.ts.map +1 -0
- package/lib/tweening/timingFunctions.js +233 -0
- package/lib/tweening/tween.d.ts +3 -0
- package/lib/tweening/tween.d.ts.map +1 -0
- package/lib/tweening/tween.js +21 -0
- package/lib/types/BBox.d.ts +73 -0
- package/lib/types/BBox.d.ts.map +1 -0
- package/lib/types/BBox.js +249 -0
- package/lib/types/Canvas.d.ts +3 -0
- package/lib/types/Canvas.d.ts.map +1 -0
- package/lib/types/Canvas.js +2 -0
- package/lib/types/Color.d.ts +65 -0
- package/lib/types/Color.d.ts.map +1 -0
- package/lib/types/Color.js +185 -0
- package/lib/types/Matrix.d.ts +3 -0
- package/lib/types/Matrix.d.ts.map +1 -0
- package/lib/types/Matrix.js +10 -0
- package/lib/types/Matrix2D.d.ts +363 -0
- package/lib/types/Matrix2D.d.ts.map +1 -0
- package/lib/types/Matrix2D.js +554 -0
- package/lib/types/Origin.d.ts +17 -0
- package/lib/types/Origin.d.ts.map +1 -0
- package/lib/types/Origin.js +53 -0
- package/lib/types/Spacing.d.ts +36 -0
- package/lib/types/Spacing.d.ts.map +1 -0
- package/lib/types/Spacing.js +70 -0
- package/lib/types/Type.d.ts +9 -0
- package/lib/types/Type.d.ts.map +1 -0
- package/lib/types/Type.js +5 -0
- package/lib/types/Vector.d.ts +203 -0
- package/lib/types/Vector.d.ts.map +1 -0
- package/lib/types/Vector.js +355 -0
- package/lib/types/alignment-enums.d.ts +22 -0
- package/lib/types/alignment-enums.d.ts.map +1 -0
- package/lib/types/alignment-enums.js +25 -0
- package/lib/types/index.d.ts +17 -0
- package/lib/types/index.d.ts.map +1 -0
- package/lib/types/index.js +17 -0
- package/lib/types/vector-transformations.d.ts +20 -0
- package/lib/types/vector-transformations.d.ts.map +1 -0
- package/lib/types/vector-transformations.js +31 -0
- package/lib/utils/DetailedError.d.ts +24 -0
- package/lib/utils/DetailedError.d.ts.map +1 -0
- package/lib/utils/DetailedError.js +16 -0
- package/lib/utils/ExperimentalError.d.ts +10 -0
- package/lib/utils/ExperimentalError.d.ts.map +1 -0
- package/lib/utils/ExperimentalError.js +32 -0
- package/lib/utils/Semaphore.d.ts +12 -0
- package/lib/utils/Semaphore.d.ts.map +1 -0
- package/lib/utils/Semaphore.js +25 -0
- package/lib/utils/beginSlide.d.ts +3 -0
- package/lib/utils/beginSlide.d.ts.map +1 -0
- package/lib/utils/beginSlide.js +12 -0
- package/lib/utils/capitalize.d.ts +2 -0
- package/lib/utils/capitalize.d.ts.map +1 -0
- package/lib/utils/capitalize.js +4 -0
- package/lib/utils/createRef.d.ts +15 -0
- package/lib/utils/createRef.d.ts.map +1 -0
- package/lib/utils/createRef.js +21 -0
- package/lib/utils/createRefArray.d.ts +27 -0
- package/lib/utils/createRefArray.d.ts.map +1 -0
- package/lib/utils/createRefArray.js +49 -0
- package/lib/utils/createRefMap.d.ts +50 -0
- package/lib/utils/createRefMap.d.ts.map +1 -0
- package/lib/utils/createRefMap.js +77 -0
- package/lib/utils/debug.d.ts +24 -0
- package/lib/utils/debug.d.ts.map +1 -0
- package/lib/utils/debug.js +47 -0
- package/lib/utils/deprecate.d.ts +9 -0
- package/lib/utils/deprecate.d.ts.map +1 -0
- package/lib/utils/deprecate.js +15 -0
- package/lib/utils/errorToLog.d.ts +3 -0
- package/lib/utils/errorToLog.d.ts.map +1 -0
- package/lib/utils/errorToLog.js +8 -0
- package/lib/utils/experimentalLog.d.ts +3 -0
- package/lib/utils/experimentalLog.d.ts.map +1 -0
- package/lib/utils/experimentalLog.js +10 -0
- package/lib/utils/getContext.d.ts +2 -0
- package/lib/utils/getContext.d.ts.map +1 -0
- package/lib/utils/getContext.js +8 -0
- package/lib/utils/index.d.ts +26 -0
- package/lib/utils/index.d.ts.map +1 -0
- package/lib/utils/index.js +26 -0
- package/lib/utils/math.d.ts +15 -0
- package/lib/utils/math.d.ts.map +1 -0
- package/lib/utils/math.js +15 -0
- package/lib/utils/range.d.ts +40 -0
- package/lib/utils/range.d.ts.map +1 -0
- package/lib/utils/range.js +18 -0
- package/lib/utils/useContext.d.ts +13 -0
- package/lib/utils/useContext.d.ts.map +1 -0
- package/lib/utils/useContext.js +18 -0
- package/lib/utils/usePlayback.d.ts +8 -0
- package/lib/utils/usePlayback.d.ts.map +1 -0
- package/lib/utils/usePlayback.js +20 -0
- package/lib/utils/useScene.d.ts +17 -0
- package/lib/utils/useScene.d.ts.map +1 -0
- package/lib/utils/useScene.js +33 -0
- package/lib/utils/useThread.d.ts +8 -0
- package/lib/utils/useThread.d.ts.map +1 -0
- package/lib/utils/useThread.js +24 -0
- package/lib/utils/useTime.d.ts +19 -0
- package/lib/utils/useTime.d.ts.map +1 -0
- package/lib/utils/useTime.js +22 -0
- package/package.json +36 -0
- package/project.d.ts +24 -0
- package/shaders/common.glsl +15 -0
- package/shaders/fragment.glsl +8 -0
- package/tsconfig.project.json +14 -0
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"EventDispatcher.d.ts","sourceRoot":"","sources":["../../src/events/EventDispatcher.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAC,YAAY,EAAC,MAAM,uBAAuB,CAAC;AACxD,OAAO,EAAC,mBAAmB,EAAC,MAAM,uBAAuB,CAAC;AAE1D;;;;;;;;;;;;;;;;;;;;;GAqBG;AACH,qBAAa,eAAe,CAAC,CAAC,CAAE,SAAQ,mBAAmB,CAAC,CAAC,CAAC;IACrD,QAAQ,CAAC,KAAK,EAAE,CAAC;CAGzB;AAED;;;;;;;;GAQG;AACH,MAAM,MAAM,iBAAiB,CAAC,CAAC,IAAI,YAAY,CAAC,CAAC,CAAC,CAAC"}
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
import { EventDispatcherBase } from './EventDispatcherBase';
|
|
2
|
+
/**
|
|
3
|
+
* Dispatches a {@link SubscribableEvent}.
|
|
4
|
+
*
|
|
5
|
+
* @example
|
|
6
|
+
* ```ts
|
|
7
|
+
* class Example {
|
|
8
|
+
* // expose the event to external classes
|
|
9
|
+
* public get onValueChanged {
|
|
10
|
+
* return this.value.subscribable;
|
|
11
|
+
* }
|
|
12
|
+
* // create a private dispatcher
|
|
13
|
+
* private value = new EventDispatcher<number>();
|
|
14
|
+
*
|
|
15
|
+
* private dispatchExample() {
|
|
16
|
+
* // dispatching will notify all subscribers.
|
|
17
|
+
* this.value.dispatch(0);
|
|
18
|
+
* }
|
|
19
|
+
* }
|
|
20
|
+
* ```
|
|
21
|
+
*
|
|
22
|
+
* @typeParam T - The type of the value argument to subscribers.
|
|
23
|
+
*/
|
|
24
|
+
export class EventDispatcher extends EventDispatcherBase {
|
|
25
|
+
dispatch(value) {
|
|
26
|
+
this.notifySubscribers(value);
|
|
27
|
+
}
|
|
28
|
+
}
|
|
29
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiRXZlbnREaXNwYXRjaGVyLmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi4vLi4vc3JjL2V2ZW50cy9FdmVudERpc3BhdGNoZXIudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBQ0EsT0FBTyxFQUFDLG1CQUFtQixFQUFDLE1BQU0sdUJBQXVCLENBQUM7QUFFMUQ7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7OztHQXFCRztBQUNILE1BQU0sT0FBTyxlQUFtQixTQUFRLG1CQUFzQjtJQUNyRCxRQUFRLENBQUMsS0FBUTtRQUN0QixJQUFJLENBQUMsaUJBQWlCLENBQUMsS0FBSyxDQUFDLENBQUM7SUFDaEMsQ0FBQztDQUNGIn0=
|
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
export interface EventHandler<T> {
|
|
2
|
+
(value: T): any;
|
|
3
|
+
}
|
|
4
|
+
/**
|
|
5
|
+
* A base for dispatching {@link Subscribable}s.
|
|
6
|
+
*
|
|
7
|
+
* @typeParam TValue - The type of the argument passed to subscribers.
|
|
8
|
+
* @typeParam THandler - The type of the callback function.
|
|
9
|
+
*/
|
|
10
|
+
export declare abstract class EventDispatcherBase<TValue, THandler extends EventHandler<TValue> = EventHandler<TValue>> {
|
|
11
|
+
readonly subscribable: Subscribable<TValue, THandler>;
|
|
12
|
+
private subscribers;
|
|
13
|
+
/**
|
|
14
|
+
* {@inheritDoc Subscribable.subscribe}
|
|
15
|
+
*/
|
|
16
|
+
subscribe(handler: THandler): () => void;
|
|
17
|
+
/**
|
|
18
|
+
* {@inheritDoc Subscribable.unsubscribe}
|
|
19
|
+
*/
|
|
20
|
+
unsubscribe(handler: THandler): void;
|
|
21
|
+
/**
|
|
22
|
+
* Unsubscribe all subscribers from the event.
|
|
23
|
+
*/
|
|
24
|
+
clear(): void;
|
|
25
|
+
protected notifySubscribers(value: TValue): ReturnType<THandler>[];
|
|
26
|
+
}
|
|
27
|
+
/**
|
|
28
|
+
* Provides safe access to the public interface of {@link EventDispatcherBase}.
|
|
29
|
+
*
|
|
30
|
+
* @remarks
|
|
31
|
+
* External classes can use it to subscribe to an event without being able to
|
|
32
|
+
* dispatch it.
|
|
33
|
+
*
|
|
34
|
+
* @typeParam TValue - The type of the argument passed to subscribers.
|
|
35
|
+
* @typeParam THandler - The type of the callback function.
|
|
36
|
+
*/
|
|
37
|
+
export declare class Subscribable<TValue, THandler extends EventHandler<TValue> = EventHandler<TValue>> {
|
|
38
|
+
protected dispatcher: EventDispatcherBase<TValue, THandler>;
|
|
39
|
+
constructor(dispatcher: EventDispatcherBase<TValue, THandler>);
|
|
40
|
+
/**
|
|
41
|
+
* Subscribe to the event.
|
|
42
|
+
*
|
|
43
|
+
* @param handler - The handler to invoke when the event occurs.
|
|
44
|
+
*
|
|
45
|
+
* @returns A callback function that cancels the subscription.
|
|
46
|
+
*/
|
|
47
|
+
subscribe(handler: THandler): () => void;
|
|
48
|
+
/**
|
|
49
|
+
* Unsubscribe from the event.
|
|
50
|
+
*
|
|
51
|
+
* @param handler - The handler to unsubscribe.
|
|
52
|
+
*/
|
|
53
|
+
unsubscribe(handler: THandler): void;
|
|
54
|
+
}
|
|
55
|
+
//# sourceMappingURL=EventDispatcherBase.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"EventDispatcherBase.d.ts","sourceRoot":"","sources":["../../src/events/EventDispatcherBase.ts"],"names":[],"mappings":"AAAA,MAAM,WAAW,YAAY,CAAC,CAAC;IAC7B,CAAC,KAAK,EAAE,CAAC,GAAG,GAAG,CAAC;CACjB;AAED;;;;;GAKG;AACH,8BAAsB,mBAAmB,CACvC,MAAM,EACN,QAAQ,SAAS,YAAY,CAAC,MAAM,CAAC,GAAG,YAAY,CAAC,MAAM,CAAC;IAE5D,SAAgB,YAAY,EAAE,YAAY,CAAC,MAAM,EAAE,QAAQ,CAAC,CACnC;IAEzB,OAAO,CAAC,WAAW,CAAuB;IAE1C;;OAEG;IACI,SAAS,CAAC,OAAO,EAAE,QAAQ;IAKlC;;OAEG;IACI,WAAW,CAAC,OAAO,EAAE,QAAQ;IAIpC;;OAEG;IACI,KAAK;IAIZ,SAAS,CAAC,iBAAiB,CAAC,KAAK,EAAE,MAAM,GAAG,UAAU,CAAC,QAAQ,CAAC,EAAE;CAGnE;AAED;;;;;;;;;GASG;AACH,qBAAa,YAAY,CACvB,MAAM,EACN,QAAQ,SAAS,YAAY,CAAC,MAAM,CAAC,GAAG,YAAY,CAAC,MAAM,CAAC;IAG1D,SAAS,CAAC,UAAU,EAAE,mBAAmB,CAAC,MAAM,EAAE,QAAQ,CAAC;gBAAjD,UAAU,EAAE,mBAAmB,CAAC,MAAM,EAAE,QAAQ,CAAC;IAG7D;;;;;;OAMG;IACI,SAAS,CAAC,OAAO,EAAE,QAAQ;IAIlC;;;;OAIG;IACI,WAAW,CAAC,OAAO,EAAE,QAAQ;CAGrC"}
|
|
@@ -0,0 +1,68 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* A base for dispatching {@link Subscribable}s.
|
|
3
|
+
*
|
|
4
|
+
* @typeParam TValue - The type of the argument passed to subscribers.
|
|
5
|
+
* @typeParam THandler - The type of the callback function.
|
|
6
|
+
*/
|
|
7
|
+
export class EventDispatcherBase {
|
|
8
|
+
constructor() {
|
|
9
|
+
this.subscribable = new Subscribable(this);
|
|
10
|
+
this.subscribers = new Set();
|
|
11
|
+
}
|
|
12
|
+
/**
|
|
13
|
+
* {@inheritDoc Subscribable.subscribe}
|
|
14
|
+
*/
|
|
15
|
+
subscribe(handler) {
|
|
16
|
+
this.subscribers.add(handler);
|
|
17
|
+
return () => this.unsubscribe(handler);
|
|
18
|
+
}
|
|
19
|
+
/**
|
|
20
|
+
* {@inheritDoc Subscribable.unsubscribe}
|
|
21
|
+
*/
|
|
22
|
+
unsubscribe(handler) {
|
|
23
|
+
this.subscribers.delete(handler);
|
|
24
|
+
}
|
|
25
|
+
/**
|
|
26
|
+
* Unsubscribe all subscribers from the event.
|
|
27
|
+
*/
|
|
28
|
+
clear() {
|
|
29
|
+
this.subscribers.clear();
|
|
30
|
+
}
|
|
31
|
+
notifySubscribers(value) {
|
|
32
|
+
return [...this.subscribers].map(handler => handler(value));
|
|
33
|
+
}
|
|
34
|
+
}
|
|
35
|
+
/**
|
|
36
|
+
* Provides safe access to the public interface of {@link EventDispatcherBase}.
|
|
37
|
+
*
|
|
38
|
+
* @remarks
|
|
39
|
+
* External classes can use it to subscribe to an event without being able to
|
|
40
|
+
* dispatch it.
|
|
41
|
+
*
|
|
42
|
+
* @typeParam TValue - The type of the argument passed to subscribers.
|
|
43
|
+
* @typeParam THandler - The type of the callback function.
|
|
44
|
+
*/
|
|
45
|
+
export class Subscribable {
|
|
46
|
+
constructor(dispatcher) {
|
|
47
|
+
this.dispatcher = dispatcher;
|
|
48
|
+
}
|
|
49
|
+
/**
|
|
50
|
+
* Subscribe to the event.
|
|
51
|
+
*
|
|
52
|
+
* @param handler - The handler to invoke when the event occurs.
|
|
53
|
+
*
|
|
54
|
+
* @returns A callback function that cancels the subscription.
|
|
55
|
+
*/
|
|
56
|
+
subscribe(handler) {
|
|
57
|
+
return this.dispatcher.subscribe(handler);
|
|
58
|
+
}
|
|
59
|
+
/**
|
|
60
|
+
* Unsubscribe from the event.
|
|
61
|
+
*
|
|
62
|
+
* @param handler - The handler to unsubscribe.
|
|
63
|
+
*/
|
|
64
|
+
unsubscribe(handler) {
|
|
65
|
+
this.dispatcher.unsubscribe(handler);
|
|
66
|
+
}
|
|
67
|
+
}
|
|
68
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiRXZlbnREaXNwYXRjaGVyQmFzZS5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uLy4uL3NyYy9ldmVudHMvRXZlbnREaXNwYXRjaGVyQmFzZS50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFJQTs7Ozs7R0FLRztBQUNILE1BQU0sT0FBZ0IsbUJBQW1CO0lBQXpDO1FBSWtCLGlCQUFZLEdBQzFCLElBQUksWUFBWSxDQUFDLElBQUksQ0FBQyxDQUFDO1FBRWpCLGdCQUFXLEdBQUcsSUFBSSxHQUFHLEVBQVksQ0FBQztJQTJCNUMsQ0FBQztJQXpCQzs7T0FFRztJQUNJLFNBQVMsQ0FBQyxPQUFpQjtRQUNoQyxJQUFJLENBQUMsV0FBVyxDQUFDLEdBQUcsQ0FBQyxPQUFPLENBQUMsQ0FBQztRQUM5QixPQUFPLEdBQUcsRUFBRSxDQUFDLElBQUksQ0FBQyxXQUFXLENBQUMsT0FBTyxDQUFDLENBQUM7SUFDekMsQ0FBQztJQUVEOztPQUVHO0lBQ0ksV0FBVyxDQUFDLE9BQWlCO1FBQ2xDLElBQUksQ0FBQyxXQUFXLENBQUMsTUFBTSxDQUFDLE9BQU8sQ0FBQyxDQUFDO0lBQ25DLENBQUM7SUFFRDs7T0FFRztJQUNJLEtBQUs7UUFDVixJQUFJLENBQUMsV0FBVyxDQUFDLEtBQUssRUFBRSxDQUFDO0lBQzNCLENBQUM7SUFFUyxpQkFBaUIsQ0FBQyxLQUFhO1FBQ3ZDLE9BQU8sQ0FBQyxHQUFHLElBQUksQ0FBQyxXQUFXLENBQUMsQ0FBQyxHQUFHLENBQUMsT0FBTyxDQUFDLEVBQUUsQ0FBQyxPQUFPLENBQUMsS0FBSyxDQUFDLENBQUMsQ0FBQztJQUM5RCxDQUFDO0NBQ0Y7QUFFRDs7Ozs7Ozs7O0dBU0c7QUFDSCxNQUFNLE9BQU8sWUFBWTtJQUl2QixZQUNZLFVBQWlEO1FBQWpELGVBQVUsR0FBVixVQUFVLENBQXVDO0lBQzFELENBQUM7SUFFSjs7Ozs7O09BTUc7SUFDSSxTQUFTLENBQUMsT0FBaUI7UUFDaEMsT0FBTyxJQUFJLENBQUMsVUFBVSxDQUFDLFNBQVMsQ0FBQyxPQUFPLENBQUMsQ0FBQztJQUM1QyxDQUFDO0lBRUQ7Ozs7T0FJRztJQUNJLFdBQVcsQ0FBQyxPQUFpQjtRQUNsQyxJQUFJLENBQUMsVUFBVSxDQUFDLFdBQVcsQ0FBQyxPQUFPLENBQUMsQ0FBQztJQUN2QyxDQUFDO0NBQ0YifQ==
|
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
import type { EventHandler, Subscribable } from './EventDispatcherBase';
|
|
2
|
+
import { EventDispatcherBase } from './EventDispatcherBase';
|
|
3
|
+
/**
|
|
4
|
+
* Dispatches a {@link SubscribableFlagEvent}.
|
|
5
|
+
*
|
|
6
|
+
* @remarks
|
|
7
|
+
* Subscribers are notified only when the flag is set.
|
|
8
|
+
* Subsequent calls to {@link raise} don't trigger anything.
|
|
9
|
+
* Any handlers added while the flag is raised are immediately invoked.
|
|
10
|
+
*
|
|
11
|
+
* Resetting the flag doesn't notify the subscribers, but raising it again does.
|
|
12
|
+
*
|
|
13
|
+
* @example
|
|
14
|
+
* ```ts
|
|
15
|
+
* class Example {
|
|
16
|
+
* // expose the event to external classes
|
|
17
|
+
* public get onChanged {
|
|
18
|
+
* return this.flag.subscribable;
|
|
19
|
+
* }
|
|
20
|
+
* // create a private dispatcher
|
|
21
|
+
* private flag = new FlagDispatcher();
|
|
22
|
+
*
|
|
23
|
+
* private dispatchExample() {
|
|
24
|
+
* // setting the flag will notify all subscribers
|
|
25
|
+
* this.flag.raise();
|
|
26
|
+
* }
|
|
27
|
+
* }
|
|
28
|
+
* ```
|
|
29
|
+
*/
|
|
30
|
+
export declare class FlagDispatcher extends EventDispatcherBase<void> {
|
|
31
|
+
private value;
|
|
32
|
+
/**
|
|
33
|
+
* Notify all current and future subscribers.
|
|
34
|
+
*/
|
|
35
|
+
raise(): void;
|
|
36
|
+
/**
|
|
37
|
+
* Stop notifying future subscribers.
|
|
38
|
+
*/
|
|
39
|
+
reset(): void;
|
|
40
|
+
/**
|
|
41
|
+
* Are subscribers being notified?
|
|
42
|
+
*/
|
|
43
|
+
isRaised(): boolean;
|
|
44
|
+
subscribe(handler: EventHandler<void>): () => void;
|
|
45
|
+
}
|
|
46
|
+
/**
|
|
47
|
+
* Provides safe access to the public interface of {@link FlagDispatcher}.
|
|
48
|
+
*
|
|
49
|
+
* @remarks
|
|
50
|
+
* External classes can use it to subscribe to an event without being able to
|
|
51
|
+
* dispatch it.
|
|
52
|
+
*/
|
|
53
|
+
export type SubscribableFlagEvent = Subscribable<void>;
|
|
54
|
+
//# sourceMappingURL=FlagDispatcher.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"FlagDispatcher.d.ts","sourceRoot":"","sources":["../../src/events/FlagDispatcher.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAC,YAAY,EAAE,YAAY,EAAC,MAAM,uBAAuB,CAAC;AACtE,OAAO,EAAC,mBAAmB,EAAC,MAAM,uBAAuB,CAAC;AAE1D;;;;;;;;;;;;;;;;;;;;;;;;;;GA0BG;AACH,qBAAa,cAAe,SAAQ,mBAAmB,CAAC,IAAI,CAAC;IAC3D,OAAO,CAAC,KAAK,CAAS;IAEtB;;OAEG;IACI,KAAK;IAOZ;;OAEG;IACI,KAAK;IAIZ;;OAEG;IACI,QAAQ;IAIR,SAAS,CAAC,OAAO,EAAE,YAAY,CAAC,IAAI,CAAC;CAO7C;AAED;;;;;;GAMG;AACH,MAAM,MAAM,qBAAqB,GAAG,YAAY,CAAC,IAAI,CAAC,CAAC"}
|
|
@@ -0,0 +1,63 @@
|
|
|
1
|
+
import { EventDispatcherBase } from './EventDispatcherBase';
|
|
2
|
+
/**
|
|
3
|
+
* Dispatches a {@link SubscribableFlagEvent}.
|
|
4
|
+
*
|
|
5
|
+
* @remarks
|
|
6
|
+
* Subscribers are notified only when the flag is set.
|
|
7
|
+
* Subsequent calls to {@link raise} don't trigger anything.
|
|
8
|
+
* Any handlers added while the flag is raised are immediately invoked.
|
|
9
|
+
*
|
|
10
|
+
* Resetting the flag doesn't notify the subscribers, but raising it again does.
|
|
11
|
+
*
|
|
12
|
+
* @example
|
|
13
|
+
* ```ts
|
|
14
|
+
* class Example {
|
|
15
|
+
* // expose the event to external classes
|
|
16
|
+
* public get onChanged {
|
|
17
|
+
* return this.flag.subscribable;
|
|
18
|
+
* }
|
|
19
|
+
* // create a private dispatcher
|
|
20
|
+
* private flag = new FlagDispatcher();
|
|
21
|
+
*
|
|
22
|
+
* private dispatchExample() {
|
|
23
|
+
* // setting the flag will notify all subscribers
|
|
24
|
+
* this.flag.raise();
|
|
25
|
+
* }
|
|
26
|
+
* }
|
|
27
|
+
* ```
|
|
28
|
+
*/
|
|
29
|
+
export class FlagDispatcher extends EventDispatcherBase {
|
|
30
|
+
constructor() {
|
|
31
|
+
super(...arguments);
|
|
32
|
+
this.value = false;
|
|
33
|
+
}
|
|
34
|
+
/**
|
|
35
|
+
* Notify all current and future subscribers.
|
|
36
|
+
*/
|
|
37
|
+
raise() {
|
|
38
|
+
if (!this.value) {
|
|
39
|
+
this.value = true;
|
|
40
|
+
this.notifySubscribers();
|
|
41
|
+
}
|
|
42
|
+
}
|
|
43
|
+
/**
|
|
44
|
+
* Stop notifying future subscribers.
|
|
45
|
+
*/
|
|
46
|
+
reset() {
|
|
47
|
+
this.value = false;
|
|
48
|
+
}
|
|
49
|
+
/**
|
|
50
|
+
* Are subscribers being notified?
|
|
51
|
+
*/
|
|
52
|
+
isRaised() {
|
|
53
|
+
return this.value;
|
|
54
|
+
}
|
|
55
|
+
subscribe(handler) {
|
|
56
|
+
const unsubscribe = super.subscribe(handler);
|
|
57
|
+
if (this.value) {
|
|
58
|
+
handler();
|
|
59
|
+
}
|
|
60
|
+
return unsubscribe;
|
|
61
|
+
}
|
|
62
|
+
}
|
|
63
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiRmxhZ0Rpc3BhdGNoZXIuanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi9zcmMvZXZlbnRzL0ZsYWdEaXNwYXRjaGVyLnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQUNBLE9BQU8sRUFBQyxtQkFBbUIsRUFBQyxNQUFNLHVCQUF1QixDQUFDO0FBRTFEOzs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7OztHQTBCRztBQUNILE1BQU0sT0FBTyxjQUFlLFNBQVEsbUJBQXlCO0lBQTdEOztRQUNVLFVBQUssR0FBRyxLQUFLLENBQUM7SUFpQ3hCLENBQUM7SUEvQkM7O09BRUc7SUFDSSxLQUFLO1FBQ1YsSUFBSSxDQUFDLElBQUksQ0FBQyxLQUFLLEVBQUUsQ0FBQztZQUNoQixJQUFJLENBQUMsS0FBSyxHQUFHLElBQUksQ0FBQztZQUNsQixJQUFJLENBQUMsaUJBQWlCLEVBQUUsQ0FBQztRQUMzQixDQUFDO0lBQ0gsQ0FBQztJQUVEOztPQUVHO0lBQ0ksS0FBSztRQUNWLElBQUksQ0FBQyxLQUFLLEdBQUcsS0FBSyxDQUFDO0lBQ3JCLENBQUM7SUFFRDs7T0FFRztJQUNJLFFBQVE7UUFDYixPQUFPLElBQUksQ0FBQyxLQUFLLENBQUM7SUFDcEIsQ0FBQztJQUVNLFNBQVMsQ0FBQyxPQUEyQjtRQUMxQyxNQUFNLFdBQVcsR0FBRyxLQUFLLENBQUMsU0FBUyxDQUFDLE9BQU8sQ0FBQyxDQUFDO1FBQzdDLElBQUksSUFBSSxDQUFDLEtBQUssRUFBRSxDQUFDO1lBQ2YsT0FBTyxFQUFFLENBQUM7UUFDWixDQUFDO1FBQ0QsT0FBTyxXQUFXLENBQUM7SUFDckIsQ0FBQztDQUNGIn0=
|
|
@@ -0,0 +1,81 @@
|
|
|
1
|
+
import type { EventHandler } from './EventDispatcherBase';
|
|
2
|
+
import { EventDispatcherBase, Subscribable } from './EventDispatcherBase';
|
|
3
|
+
/**
|
|
4
|
+
* Dispatches a {@link SubscribableValueEvent}
|
|
5
|
+
*
|
|
6
|
+
* @remarks
|
|
7
|
+
* Changing the value stored by a value dispatcher will immediately notify all
|
|
8
|
+
* its subscribers.
|
|
9
|
+
*
|
|
10
|
+
* @example
|
|
11
|
+
* ```ts
|
|
12
|
+
* class Example {
|
|
13
|
+
* // expose the event to external classes
|
|
14
|
+
* public get onValueChanged {
|
|
15
|
+
* return this.value.subscribable;
|
|
16
|
+
* }
|
|
17
|
+
* // create a private dispatcher
|
|
18
|
+
* private value = new ValueDispatcher(0);
|
|
19
|
+
*
|
|
20
|
+
* private changingValueExample() {
|
|
21
|
+
* // changing the value will notify all subscribers.
|
|
22
|
+
* this.value.current = 7;
|
|
23
|
+
* }
|
|
24
|
+
* }
|
|
25
|
+
* ```
|
|
26
|
+
*
|
|
27
|
+
* @typeParam T - The type of the value passed to subscribers.
|
|
28
|
+
*/
|
|
29
|
+
export declare class ValueDispatcher<T> extends EventDispatcherBase<T> {
|
|
30
|
+
private value;
|
|
31
|
+
readonly subscribable: SubscribableValueEvent<T>;
|
|
32
|
+
/**
|
|
33
|
+
* {@inheritDoc SubscribableValueEvent.current}
|
|
34
|
+
*/
|
|
35
|
+
get current(): T;
|
|
36
|
+
/**
|
|
37
|
+
* Set the current value of this dispatcher.
|
|
38
|
+
*
|
|
39
|
+
* @remarks
|
|
40
|
+
* Setting the value will immediately notify all subscribers.
|
|
41
|
+
*
|
|
42
|
+
* @param value - The new value.
|
|
43
|
+
*/
|
|
44
|
+
set current(value: T);
|
|
45
|
+
/**
|
|
46
|
+
* @param value - The initial value.
|
|
47
|
+
*/
|
|
48
|
+
constructor(value: T);
|
|
49
|
+
/**
|
|
50
|
+
* {@inheritDoc SubscribableValueEvent.subscribe}
|
|
51
|
+
*/
|
|
52
|
+
subscribe(handler: EventHandler<T>, dispatchImmediately?: boolean): () => void;
|
|
53
|
+
}
|
|
54
|
+
/**
|
|
55
|
+
* Provides safe access to the public interface of {@link ValueDispatcher}.
|
|
56
|
+
*
|
|
57
|
+
* @remarks
|
|
58
|
+
* External classes can use it to subscribe to an event without being able to
|
|
59
|
+
* dispatch it.
|
|
60
|
+
*
|
|
61
|
+
* @typeParam T - The type of the value passed to subscribers.
|
|
62
|
+
*/
|
|
63
|
+
export declare class SubscribableValueEvent<T> extends Subscribable<T, EventHandler<T>> {
|
|
64
|
+
/**
|
|
65
|
+
* Get the most recent value of this dispatcher.
|
|
66
|
+
*/
|
|
67
|
+
get current(): T;
|
|
68
|
+
/**
|
|
69
|
+
* Subscribe to the event.
|
|
70
|
+
*
|
|
71
|
+
* Subscribing will immediately invoke the handler with the most recent value.
|
|
72
|
+
*
|
|
73
|
+
* @param handler - The handler to invoke when the event occurs.
|
|
74
|
+
* @param dispatchImmediately - Whether the handler should be immediately
|
|
75
|
+
* invoked with the most recent value.
|
|
76
|
+
*
|
|
77
|
+
* @returns Callback function that cancels the subscription.
|
|
78
|
+
*/
|
|
79
|
+
subscribe(handler: EventHandler<T>, dispatchImmediately?: boolean): () => void;
|
|
80
|
+
}
|
|
81
|
+
//# sourceMappingURL=ValueDispatcher.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ValueDispatcher.d.ts","sourceRoot":"","sources":["../../src/events/ValueDispatcher.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAC,YAAY,EAAC,MAAM,uBAAuB,CAAC;AACxD,OAAO,EAAC,mBAAmB,EAAE,YAAY,EAAC,MAAM,uBAAuB,CAAC;AAExE;;;;;;;;;;;;;;;;;;;;;;;;;GAyBG;AACH,qBAAa,eAAe,CAAC,CAAC,CAAE,SAAQ,mBAAmB,CAAC,CAAC,CAAC;IA2BzC,OAAO,CAAC,KAAK;IA1BhC,SAAgB,YAAY,EAAE,sBAAsB,CAAC,CAAC,CAAC,CACpB;IAEnC;;OAEG;IACH,IAAW,OAAO,IAYQ,CAAC,CAV1B;IAED;;;;;;;OAOG;IACH,IAAW,OAAO,CAAC,KAAK,EAAE,CAAC,EAG1B;IAED;;OAEG;gBACwB,KAAK,EAAE,CAAC;IAInC;;OAEG;IACI,SAAS,CAAC,OAAO,EAAE,YAAY,CAAC,CAAC,CAAC,EAAE,mBAAmB,UAAO;CAOtE;AAED;;;;;;;;GAQG;AACH,qBAAa,sBAAsB,CAAC,CAAC,CAAE,SAAQ,YAAY,CACzD,CAAC,EACD,YAAY,CAAC,CAAC,CAAC,CAChB;IACC;;OAEG;IACH,IAAW,OAAO,MAEjB;IAED;;;;;;;;;;OAUG;IACI,SAAS,CACd,OAAO,EAAE,YAAY,CAAC,CAAC,CAAC,EACxB,mBAAmB,UAAO,GACzB,MAAM,IAAI;CAMd"}
|
|
@@ -0,0 +1,97 @@
|
|
|
1
|
+
import { EventDispatcherBase, Subscribable } from './EventDispatcherBase';
|
|
2
|
+
/**
|
|
3
|
+
* Dispatches a {@link SubscribableValueEvent}
|
|
4
|
+
*
|
|
5
|
+
* @remarks
|
|
6
|
+
* Changing the value stored by a value dispatcher will immediately notify all
|
|
7
|
+
* its subscribers.
|
|
8
|
+
*
|
|
9
|
+
* @example
|
|
10
|
+
* ```ts
|
|
11
|
+
* class Example {
|
|
12
|
+
* // expose the event to external classes
|
|
13
|
+
* public get onValueChanged {
|
|
14
|
+
* return this.value.subscribable;
|
|
15
|
+
* }
|
|
16
|
+
* // create a private dispatcher
|
|
17
|
+
* private value = new ValueDispatcher(0);
|
|
18
|
+
*
|
|
19
|
+
* private changingValueExample() {
|
|
20
|
+
* // changing the value will notify all subscribers.
|
|
21
|
+
* this.value.current = 7;
|
|
22
|
+
* }
|
|
23
|
+
* }
|
|
24
|
+
* ```
|
|
25
|
+
*
|
|
26
|
+
* @typeParam T - The type of the value passed to subscribers.
|
|
27
|
+
*/
|
|
28
|
+
export class ValueDispatcher extends EventDispatcherBase {
|
|
29
|
+
/**
|
|
30
|
+
* {@inheritDoc SubscribableValueEvent.current}
|
|
31
|
+
*/
|
|
32
|
+
get current() {
|
|
33
|
+
return this.value;
|
|
34
|
+
}
|
|
35
|
+
/**
|
|
36
|
+
* Set the current value of this dispatcher.
|
|
37
|
+
*
|
|
38
|
+
* @remarks
|
|
39
|
+
* Setting the value will immediately notify all subscribers.
|
|
40
|
+
*
|
|
41
|
+
* @param value - The new value.
|
|
42
|
+
*/
|
|
43
|
+
set current(value) {
|
|
44
|
+
this.value = value;
|
|
45
|
+
this.notifySubscribers(value);
|
|
46
|
+
}
|
|
47
|
+
/**
|
|
48
|
+
* @param value - The initial value.
|
|
49
|
+
*/
|
|
50
|
+
constructor(value) {
|
|
51
|
+
super();
|
|
52
|
+
this.value = value;
|
|
53
|
+
this.subscribable = new SubscribableValueEvent(this);
|
|
54
|
+
}
|
|
55
|
+
/**
|
|
56
|
+
* {@inheritDoc SubscribableValueEvent.subscribe}
|
|
57
|
+
*/
|
|
58
|
+
subscribe(handler, dispatchImmediately = true) {
|
|
59
|
+
const unsubscribe = super.subscribe(handler);
|
|
60
|
+
if (dispatchImmediately) {
|
|
61
|
+
handler(this.value);
|
|
62
|
+
}
|
|
63
|
+
return unsubscribe;
|
|
64
|
+
}
|
|
65
|
+
}
|
|
66
|
+
/**
|
|
67
|
+
* Provides safe access to the public interface of {@link ValueDispatcher}.
|
|
68
|
+
*
|
|
69
|
+
* @remarks
|
|
70
|
+
* External classes can use it to subscribe to an event without being able to
|
|
71
|
+
* dispatch it.
|
|
72
|
+
*
|
|
73
|
+
* @typeParam T - The type of the value passed to subscribers.
|
|
74
|
+
*/
|
|
75
|
+
export class SubscribableValueEvent extends Subscribable {
|
|
76
|
+
/**
|
|
77
|
+
* Get the most recent value of this dispatcher.
|
|
78
|
+
*/
|
|
79
|
+
get current() {
|
|
80
|
+
return this.dispatcher.current;
|
|
81
|
+
}
|
|
82
|
+
/**
|
|
83
|
+
* Subscribe to the event.
|
|
84
|
+
*
|
|
85
|
+
* Subscribing will immediately invoke the handler with the most recent value.
|
|
86
|
+
*
|
|
87
|
+
* @param handler - The handler to invoke when the event occurs.
|
|
88
|
+
* @param dispatchImmediately - Whether the handler should be immediately
|
|
89
|
+
* invoked with the most recent value.
|
|
90
|
+
*
|
|
91
|
+
* @returns Callback function that cancels the subscription.
|
|
92
|
+
*/
|
|
93
|
+
subscribe(handler, dispatchImmediately = true) {
|
|
94
|
+
return this.dispatcher.subscribe(handler, dispatchImmediately);
|
|
95
|
+
}
|
|
96
|
+
}
|
|
97
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiVmFsdWVEaXNwYXRjaGVyLmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi4vLi4vc3JjL2V2ZW50cy9WYWx1ZURpc3BhdGNoZXIudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBQ0EsT0FBTyxFQUFDLG1CQUFtQixFQUFFLFlBQVksRUFBQyxNQUFNLHVCQUF1QixDQUFDO0FBRXhFOzs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7O0dBeUJHO0FBQ0gsTUFBTSxPQUFPLGVBQW1CLFNBQVEsbUJBQXNCO0lBSTVEOztPQUVHO0lBQ0gsSUFBVyxPQUFPO1FBQ2hCLE9BQU8sSUFBSSxDQUFDLEtBQUssQ0FBQztJQUNwQixDQUFDO0lBRUQ7Ozs7Ozs7T0FPRztJQUNILElBQVcsT0FBTyxDQUFDLEtBQVE7UUFDekIsSUFBSSxDQUFDLEtBQUssR0FBRyxLQUFLLENBQUM7UUFDbkIsSUFBSSxDQUFDLGlCQUFpQixDQUFDLEtBQUssQ0FBQyxDQUFDO0lBQ2hDLENBQUM7SUFFRDs7T0FFRztJQUNILFlBQTJCLEtBQVE7UUFDakMsS0FBSyxFQUFFLENBQUM7UUFEaUIsVUFBSyxHQUFMLEtBQUssQ0FBRztRQTFCbkIsaUJBQVksR0FDMUIsSUFBSSxzQkFBc0IsQ0FBQyxJQUFJLENBQUMsQ0FBQztJQTJCbkMsQ0FBQztJQUVEOztPQUVHO0lBQ0ksU0FBUyxDQUFDLE9BQXdCLEVBQUUsbUJBQW1CLEdBQUcsSUFBSTtRQUNuRSxNQUFNLFdBQVcsR0FBRyxLQUFLLENBQUMsU0FBUyxDQUFDLE9BQU8sQ0FBQyxDQUFDO1FBQzdDLElBQUksbUJBQW1CLEVBQUUsQ0FBQztZQUN4QixPQUFPLENBQUMsSUFBSSxDQUFDLEtBQUssQ0FBQyxDQUFDO1FBQ3RCLENBQUM7UUFDRCxPQUFPLFdBQVcsQ0FBQztJQUNyQixDQUFDO0NBQ0Y7QUFFRDs7Ozs7Ozs7R0FRRztBQUNILE1BQU0sT0FBTyxzQkFBMEIsU0FBUSxZQUc5QztJQUNDOztPQUVHO0lBQ0gsSUFBVyxPQUFPO1FBQ2hCLE9BQTRCLElBQUksQ0FBQyxVQUFXLENBQUMsT0FBTyxDQUFDO0lBQ3ZELENBQUM7SUFFRDs7Ozs7Ozs7OztPQVVHO0lBQ0ksU0FBUyxDQUNkLE9BQXdCLEVBQ3hCLG1CQUFtQixHQUFHLElBQUk7UUFFMUIsT0FBNEIsSUFBSSxDQUFDLFVBQVcsQ0FBQyxTQUFTLENBQ3BELE9BQU8sRUFDUCxtQkFBbUIsQ0FDcEIsQ0FBQztJQUNKLENBQUM7Q0FDRiJ9
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Subscriptions and triggering of events.
|
|
3
|
+
*
|
|
4
|
+
* @packageDocumentation
|
|
5
|
+
*/
|
|
6
|
+
export * from './AsyncEventDispatcher';
|
|
7
|
+
export * from './EventDispatcher';
|
|
8
|
+
export * from './EventDispatcherBase';
|
|
9
|
+
export * from './FlagDispatcher';
|
|
10
|
+
export * from './ValueDispatcher';
|
|
11
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/events/index.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,cAAc,wBAAwB,CAAC;AACvC,cAAc,mBAAmB,CAAC;AAClC,cAAc,uBAAuB,CAAC;AACtC,cAAc,kBAAkB,CAAC;AACjC,cAAc,mBAAmB,CAAC"}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Subscriptions and triggering of events.
|
|
3
|
+
*
|
|
4
|
+
* @packageDocumentation
|
|
5
|
+
*/
|
|
6
|
+
export * from './AsyncEventDispatcher';
|
|
7
|
+
export * from './EventDispatcher';
|
|
8
|
+
export * from './EventDispatcherBase';
|
|
9
|
+
export * from './FlagDispatcher';
|
|
10
|
+
export * from './ValueDispatcher';
|
|
11
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiaW5kZXguanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi9zcmMvZXZlbnRzL2luZGV4LnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQUFBOzs7O0dBSUc7QUFFSCxjQUFjLHdCQUF3QixDQUFDO0FBQ3ZDLGNBQWMsbUJBQW1CLENBQUM7QUFDbEMsY0FBYyx1QkFBdUIsQ0FBQztBQUN0QyxjQUFjLGtCQUFrQixDQUFDO0FBQ2pDLGNBQWMsbUJBQW1CLENBQUMifQ==
|
|
@@ -0,0 +1,101 @@
|
|
|
1
|
+
import type { Project } from '../app/Project';
|
|
2
|
+
import type { AssetInfo, RendererResult, RendererSettings } from '../app/Renderer';
|
|
3
|
+
/**
|
|
4
|
+
* The static interface for exporters.
|
|
5
|
+
*/
|
|
6
|
+
export interface ExporterClass {
|
|
7
|
+
/**
|
|
8
|
+
* The unique identifier of this exporter.
|
|
9
|
+
*
|
|
10
|
+
* @remarks
|
|
11
|
+
* This identifier will be used to store the settings of this exporter.
|
|
12
|
+
* It's recommended to prepend it with the name of the package to avoid
|
|
13
|
+
* collisions.
|
|
14
|
+
*/
|
|
15
|
+
readonly id: string;
|
|
16
|
+
/**
|
|
17
|
+
* The name of this exporter.
|
|
18
|
+
*
|
|
19
|
+
* @remarks
|
|
20
|
+
* This name will be displayed in the editor.
|
|
21
|
+
*/
|
|
22
|
+
readonly displayName: string;
|
|
23
|
+
/**
|
|
24
|
+
* Create an instance of this exporter.
|
|
25
|
+
*
|
|
26
|
+
* @remarks
|
|
27
|
+
* A new exporter is created whenever the user starts a new rendering process.
|
|
28
|
+
*
|
|
29
|
+
* @param project - The current project.
|
|
30
|
+
* @param settings - The rendering settings.
|
|
31
|
+
*/
|
|
32
|
+
create(project: Project, settings: RendererSettings): Promise<Exporter>;
|
|
33
|
+
}
|
|
34
|
+
/**
|
|
35
|
+
* The main interface for implementing custom exporters.
|
|
36
|
+
*/
|
|
37
|
+
export interface Exporter {
|
|
38
|
+
/**
|
|
39
|
+
* Prepare the rendering configuration.
|
|
40
|
+
*
|
|
41
|
+
* @remarks
|
|
42
|
+
* Called at the beginning of the rendering process, before anything else has
|
|
43
|
+
* been set up. The returned value can be used to override the rendering
|
|
44
|
+
* settings provided by the user.
|
|
45
|
+
*/
|
|
46
|
+
configuration?(): Promise<RendererSettings | void>;
|
|
47
|
+
/**
|
|
48
|
+
* Begin the rendering process.
|
|
49
|
+
*
|
|
50
|
+
* @remarks
|
|
51
|
+
* Called after the rendering has been set up, right before the first frame
|
|
52
|
+
* is rendered. Once `start()` is called, it is guaranteed that the `stop()`
|
|
53
|
+
* method will be called as well. Can be used to initialize any resources that
|
|
54
|
+
* require a clean-up.
|
|
55
|
+
*/
|
|
56
|
+
start?(): Promise<void>;
|
|
57
|
+
/**
|
|
58
|
+
* Export a frame.
|
|
59
|
+
*
|
|
60
|
+
* @remarks
|
|
61
|
+
* Called each time after a frame is rendered.
|
|
62
|
+
*
|
|
63
|
+
* @param canvas - A canvas containing the rendered frame.
|
|
64
|
+
* @param frame - The frame number.
|
|
65
|
+
* @param sceneFrame - The frame number within the scene.
|
|
66
|
+
* @param sceneName - The name of the scene with which the frame is associated.
|
|
67
|
+
* @param signal - An abort signal triggered if the user aborts the rendering.
|
|
68
|
+
*/
|
|
69
|
+
handleFrame(canvas: HTMLCanvasElement, frame: number, sceneFrame: number, sceneName: string, signal: AbortSignal): Promise<void>;
|
|
70
|
+
/**
|
|
71
|
+
* after processing the image stream and generating an audio file, merge the video and audio stream as the final video
|
|
72
|
+
*/
|
|
73
|
+
mergeMedia?(): Promise<void>;
|
|
74
|
+
/**
|
|
75
|
+
* Take in media assets per frame and generate audio track for the video.
|
|
76
|
+
*/
|
|
77
|
+
generateAudio?(assetsInfo: AssetInfo[][], startFrame: number, endFrame: number): Promise<void>;
|
|
78
|
+
/**
|
|
79
|
+
* Download all assets necessary for the export process
|
|
80
|
+
*/
|
|
81
|
+
downloadVideos?(assetsInfo: AssetInfo[][]): Promise<void>;
|
|
82
|
+
/**
|
|
83
|
+
* Finish the rendering process.
|
|
84
|
+
*
|
|
85
|
+
* @remarks
|
|
86
|
+
* Called after rendering the visual elements has finished and audio so that audio track can be merged.
|
|
87
|
+
*
|
|
88
|
+
* @param result - The result of the rendering.
|
|
89
|
+
*/
|
|
90
|
+
stop?(result: RendererResult): Promise<void>;
|
|
91
|
+
/**
|
|
92
|
+
* Finish the rendering process.
|
|
93
|
+
*
|
|
94
|
+
* @remarks
|
|
95
|
+
* Guaranteed to be called after the rendering has finished - no matter the
|
|
96
|
+
* result. Performs clean-up.
|
|
97
|
+
*
|
|
98
|
+
*/
|
|
99
|
+
kill?(): Promise<void>;
|
|
100
|
+
}
|
|
101
|
+
//# sourceMappingURL=Exporter.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Exporter.d.ts","sourceRoot":"","sources":["../../src/exporter/Exporter.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAC,OAAO,EAAC,MAAM,gBAAgB,CAAC;AAC5C,OAAO,KAAK,EACV,SAAS,EACT,cAAc,EACd,gBAAgB,EACjB,MAAM,iBAAiB,CAAC;AAEzB;;GAEG;AACH,MAAM,WAAW,aAAa;IAC5B;;;;;;;OAOG;IACH,QAAQ,CAAC,EAAE,EAAE,MAAM,CAAC;IAEpB;;;;;OAKG;IACH,QAAQ,CAAC,WAAW,EAAE,MAAM,CAAC;IAE7B;;;;;;;;OAQG;IACH,MAAM,CAAC,OAAO,EAAE,OAAO,EAAE,QAAQ,EAAE,gBAAgB,GAAG,OAAO,CAAC,QAAQ,CAAC,CAAC;CACzE;AAED;;GAEG;AACH,MAAM,WAAW,QAAQ;IACvB;;;;;;;OAOG;IACH,aAAa,CAAC,IAAI,OAAO,CAAC,gBAAgB,GAAG,IAAI,CAAC,CAAC;IAEnD;;;;;;;;OAQG;IACH,KAAK,CAAC,IAAI,OAAO,CAAC,IAAI,CAAC,CAAC;IAExB;;;;;;;;;;;OAWG;IACH,WAAW,CACT,MAAM,EAAE,iBAAiB,EACzB,KAAK,EAAE,MAAM,EACb,UAAU,EAAE,MAAM,EAClB,SAAS,EAAE,MAAM,EACjB,MAAM,EAAE,WAAW,GAClB,OAAO,CAAC,IAAI,CAAC,CAAC;IAEjB;;OAEG;IACH,UAAU,CAAC,IAAI,OAAO,CAAC,IAAI,CAAC,CAAC;IAE7B;;OAEG;IACH,aAAa,CAAC,CACZ,UAAU,EAAE,SAAS,EAAE,EAAE,EACzB,UAAU,EAAE,MAAM,EAClB,QAAQ,EAAE,MAAM,GACf,OAAO,CAAC,IAAI,CAAC,CAAC;IAEjB;;OAEG;IACH,cAAc,CAAC,CAAC,UAAU,EAAE,SAAS,EAAE,EAAE,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC;IAE1D;;;;;;;OAOG;IACH,IAAI,CAAC,CAAC,MAAM,EAAE,cAAc,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC;IAE7C;;;;;;;OAOG;IACH,IAAI,CAAC,IAAI,OAAO,CAAC,IAAI,CAAC,CAAC;CACxB"}
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
import type { Project } from '../app/Project';
|
|
2
|
+
import type { AssetInfo, RendererResult, RendererSettings } from '../app/Renderer';
|
|
3
|
+
import type { Exporter } from './Exporter';
|
|
4
|
+
export interface FfmpegExporterOptions {
|
|
5
|
+
format: 'mp4' | 'webm' | 'proRes';
|
|
6
|
+
}
|
|
7
|
+
/**
|
|
8
|
+
* FFmpeg video exporter.
|
|
9
|
+
*
|
|
10
|
+
* @remarks
|
|
11
|
+
* Most of the export logic is handled on the server. This class communicates
|
|
12
|
+
* with the FFmpegBridge through a WebSocket connection which lets it invoke
|
|
13
|
+
* methods on the FFmpegExporterServer class.
|
|
14
|
+
*
|
|
15
|
+
* For example, calling the following method:
|
|
16
|
+
* ```ts
|
|
17
|
+
* async this.invoke('process', 7);
|
|
18
|
+
* ```
|
|
19
|
+
* Will invoke the `process` method on the FFmpegExporterServer class with `7`
|
|
20
|
+
* as the argument. The result of the method will be returned as a Promise.
|
|
21
|
+
*
|
|
22
|
+
* Before any methods can be invoked, the FFmpegExporterServer class must be
|
|
23
|
+
* initialized by invoking `start`.
|
|
24
|
+
*/
|
|
25
|
+
export declare class FFmpegExporterClient implements Exporter {
|
|
26
|
+
static readonly id = "@twick/core/ffmpeg";
|
|
27
|
+
static readonly displayName = "Video (FFmpeg)";
|
|
28
|
+
private readonly settings;
|
|
29
|
+
private readonly exporterOptions;
|
|
30
|
+
static create(_: Project, settings: RendererSettings): Promise<FFmpegExporterClient>;
|
|
31
|
+
private static readonly response;
|
|
32
|
+
constructor(settings: RendererSettings);
|
|
33
|
+
start(): Promise<void>;
|
|
34
|
+
handleFrame(canvas: HTMLCanvasElement): Promise<void>;
|
|
35
|
+
private blobToDataUrl;
|
|
36
|
+
stop(result: RendererResult): Promise<void>;
|
|
37
|
+
kill(): Promise<void>;
|
|
38
|
+
downloadVideos(assets: AssetInfo[][]): Promise<void>;
|
|
39
|
+
generateAudio(assets: AssetInfo[][], startFrame: number, endFrame: number): Promise<void>;
|
|
40
|
+
mergeMedia(): Promise<void>;
|
|
41
|
+
/**
|
|
42
|
+
* Remotely invoke a method on the server and wait for a response.
|
|
43
|
+
*
|
|
44
|
+
* @param method - The method name to execute on the server.
|
|
45
|
+
* @param data - The data that will be passed as an argument to the method.
|
|
46
|
+
* Should be serializable.
|
|
47
|
+
*/
|
|
48
|
+
private invoke;
|
|
49
|
+
}
|
|
50
|
+
//# sourceMappingURL=FFmpegExporter.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"FFmpegExporter.d.ts","sourceRoot":"","sources":["../../src/exporter/FFmpegExporter.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAC,OAAO,EAAC,MAAM,gBAAgB,CAAC;AAC5C,OAAO,KAAK,EACV,SAAS,EACT,cAAc,EACd,gBAAgB,EACjB,MAAM,iBAAiB,CAAC;AAEzB,OAAO,KAAK,EAAC,QAAQ,EAAC,MAAM,YAAY,CAAC;AAezC,MAAM,WAAW,qBAAqB;IACpC,MAAM,EAAE,KAAK,GAAG,MAAM,GAAG,QAAQ,CAAC;CACnC;AAED;;;;;;;;;;;;;;;;;GAiBG;AACH,qBAAa,oBAAqB,YAAW,QAAQ;IACnD,gBAAuB,EAAE,wBAAwB;IACjD,gBAAuB,WAAW,oBAAoB;IAEtD,OAAO,CAAC,QAAQ,CAAC,QAAQ,CAAmB;IAC5C,OAAO,CAAC,QAAQ,CAAC,eAAe,CAAwB;WAEpC,MAAM,CAAC,CAAC,EAAE,OAAO,EAAE,QAAQ,EAAE,gBAAgB;IAIjE,OAAO,CAAC,MAAM,CAAC,QAAQ,CAAC,QAAQ,CAAyC;gBAWtD,QAAQ,EAAE,gBAAgB;IAQhC,KAAK,IAAI,OAAO,CAAC,IAAI,CAAC;IAItB,WAAW,CAAC,MAAM,EAAE,iBAAiB,GAAG,OAAO,CAAC,IAAI,CAAC;YAepD,aAAa;IASd,IAAI,CAAC,MAAM,EAAE,cAAc,GAAG,OAAO,CAAC,IAAI,CAAC;IAY3C,IAAI,IAAI,OAAO,CAAC,IAAI,CAAC;IAIrB,cAAc,CAAC,MAAM,EAAE,SAAS,EAAE,EAAE,GAAG,OAAO,CAAC,IAAI,CAAC;IAIpD,aAAa,CACxB,MAAM,EAAE,SAAS,EAAE,EAAE,EACrB,UAAU,EAAE,MAAM,EAClB,QAAQ,EAAE,MAAM,GACf,OAAO,CAAC,IAAI,CAAC;IAaH,UAAU,IAAI,OAAO,CAAC,IAAI,CAAC;IAexC;;;;;;OAMG;IACH,OAAO,CAAC,MAAM;CA6Bf"}
|