reactor-core-ts 2.1.6 → 3.2.1
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/README.md +927 -658
- package/dist/_virtual/_@oxc-project_runtime@0.139.0/helpers/esm/defineProperty.js +12 -0
- package/dist/_virtual/_@oxc-project_runtime@0.139.0/helpers/esm/toPrimitive.js +14 -0
- package/dist/_virtual/_@oxc-project_runtime@0.139.0/helpers/esm/toPropertyKey.js +9 -0
- package/dist/_virtual/_@oxc-project_runtime@0.139.0/helpers/esm/typeof.js +11 -0
- package/dist/context/context-view.d.ts +31 -0
- package/dist/context/context-view.d.ts.map +1 -0
- package/dist/context/context-view.js +58 -0
- package/dist/context/context-view.js.map +1 -0
- package/dist/context/context.d.ts +46 -0
- package/dist/context/context.d.ts.map +1 -0
- package/dist/context/context.js +125 -0
- package/dist/context/context.js.map +1 -0
- package/dist/context/types.d.ts +7 -0
- package/dist/context/types.d.ts.map +1 -0
- package/dist/core/boolean-disposable.d.ts +19 -0
- package/dist/core/boolean-disposable.d.ts.map +1 -0
- package/dist/core/boolean-disposable.js +37 -0
- package/dist/core/boolean-disposable.js.map +1 -0
- package/dist/core/composite-disposable.d.ts +21 -0
- package/dist/core/composite-disposable.d.ts.map +1 -0
- package/dist/core/composite-disposable.js +64 -0
- package/dist/core/composite-disposable.js.map +1 -0
- package/dist/core/demand.d.ts +9 -0
- package/dist/core/demand.d.ts.map +1 -0
- package/dist/core/demand.js +21 -0
- package/dist/core/demand.js.map +1 -0
- package/dist/core/disposables.d.ts +12 -0
- package/dist/core/disposables.d.ts.map +1 -0
- package/dist/core/disposables.js +37 -0
- package/dist/core/disposables.js.map +1 -0
- package/dist/core/teardown.d.ts +4 -0
- package/dist/core/teardown.d.ts.map +1 -0
- package/dist/core/types.d.ts +14 -0
- package/dist/core/types.d.ts.map +1 -0
- package/dist/errors/classes.d.ts +37 -0
- package/dist/errors/classes.d.ts.map +1 -0
- package/dist/errors/classes.js +53 -0
- package/dist/errors/classes.js.map +1 -0
- package/dist/errors/exceptions.d.ts +15 -0
- package/dist/errors/exceptions.d.ts.map +1 -0
- package/dist/errors/helpers.d.ts +9 -0
- package/dist/errors/helpers.d.ts.map +1 -0
- package/dist/errors/helpers.js +18 -0
- package/dist/errors/helpers.js.map +1 -0
- package/dist/index.d.ts +17 -2556
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +8 -2
- package/dist/internal/abort.d.ts +5 -0
- package/dist/internal/abort.d.ts.map +1 -0
- package/dist/internal/abort.js +36 -0
- package/dist/internal/abort.js.map +1 -0
- package/dist/internal/async-queue.d.ts +48 -0
- package/dist/internal/async-queue.d.ts.map +1 -0
- package/dist/internal/async-queue.js +187 -0
- package/dist/internal/async-queue.js.map +1 -0
- package/dist/internal/iterable-terminal.d.ts +12 -0
- package/dist/internal/iterable-terminal.d.ts.map +1 -0
- package/dist/internal/iterable-terminal.js +49 -0
- package/dist/internal/iterable-terminal.js.map +1 -0
- package/dist/internal/iterable-transform.d.ts +24 -0
- package/dist/internal/iterable-transform.d.ts.map +1 -0
- package/dist/internal/iterable-transform.js +159 -0
- package/dist/internal/iterable-transform.js.map +1 -0
- package/dist/internal/iterable.d.ts +23 -0
- package/dist/internal/iterable.d.ts.map +1 -0
- package/dist/internal/iterable.js +81 -0
- package/dist/internal/iterable.js.map +1 -0
- package/dist/internal/microtask.d.ts +7 -0
- package/dist/internal/microtask.d.ts.map +1 -0
- package/dist/internal/microtask.js +19 -0
- package/dist/internal/microtask.js.map +1 -0
- package/dist/publisher/browser-sources.d.ts +15 -0
- package/dist/publisher/browser-sources.d.ts.map +1 -0
- package/dist/publisher/browser-sources.js +92 -0
- package/dist/publisher/browser-sources.js.map +1 -0
- package/dist/publisher/flux-entrypoint.d.ts +7 -0
- package/dist/publisher/flux-entrypoint.d.ts.map +1 -0
- package/dist/publisher/flux-entrypoint.js +11 -0
- package/dist/publisher/flux-entrypoint.js.map +1 -0
- package/dist/publisher/flux.d.ts +121 -0
- package/dist/publisher/flux.d.ts.map +1 -0
- package/dist/publisher/flux.js +697 -0
- package/dist/publisher/flux.js.map +1 -0
- package/dist/publisher/helpers.d.ts +19 -0
- package/dist/publisher/helpers.d.ts.map +1 -0
- package/dist/publisher/helpers.js +84 -0
- package/dist/publisher/helpers.js.map +1 -0
- package/dist/publisher/mono-entrypoint.d.ts +7 -0
- package/dist/publisher/mono-entrypoint.d.ts.map +1 -0
- package/dist/publisher/mono-entrypoint.js +11 -0
- package/dist/publisher/mono-entrypoint.js.map +1 -0
- package/dist/publisher/mono.d.ts +72 -0
- package/dist/publisher/mono.d.ts.map +1 -0
- package/dist/publisher/mono.js +373 -0
- package/dist/publisher/mono.js.map +1 -0
- package/dist/publisher/operators/aggregate.d.ts +35 -0
- package/dist/publisher/operators/aggregate.d.ts.map +1 -0
- package/dist/publisher/operators/aggregate.js +217 -0
- package/dist/publisher/operators/aggregate.js.map +1 -0
- package/dist/publisher/operators/compat/flux.d.ts +56 -0
- package/dist/publisher/operators/compat/flux.d.ts.map +1 -0
- package/dist/publisher/operators/compat/flux.js +156 -0
- package/dist/publisher/operators/compat/flux.js.map +1 -0
- package/dist/publisher/operators/compat/mono.d.ts +82 -0
- package/dist/publisher/operators/compat/mono.d.ts.map +1 -0
- package/dist/publisher/operators/compat/mono.js +125 -0
- package/dist/publisher/operators/compat/mono.js.map +1 -0
- package/dist/publisher/operators/coordination.d.ts +82 -0
- package/dist/publisher/operators/coordination.d.ts.map +1 -0
- package/dist/publisher/operators/coordination.js +345 -0
- package/dist/publisher/operators/coordination.js.map +1 -0
- package/dist/publisher/operators/error.d.ts +17 -0
- package/dist/publisher/operators/error.d.ts.map +1 -0
- package/dist/publisher/operators/error.js +48 -0
- package/dist/publisher/operators/error.js.map +1 -0
- package/dist/publisher/operators/flatten.d.ts +19 -0
- package/dist/publisher/operators/flatten.d.ts.map +1 -0
- package/dist/publisher/operators/flatten.js +127 -0
- package/dist/publisher/operators/flatten.js.map +1 -0
- package/dist/publisher/operators/lifecycle.d.ts +103 -0
- package/dist/publisher/operators/lifecycle.d.ts.map +1 -0
- package/dist/publisher/operators/lifecycle.js +237 -0
- package/dist/publisher/operators/lifecycle.js.map +1 -0
- package/dist/publisher/operators/mono-parity.d.ts +109 -0
- package/dist/publisher/operators/mono-parity.d.ts.map +1 -0
- package/dist/publisher/operators/mono-parity.js +144 -0
- package/dist/publisher/operators/mono-parity.js.map +1 -0
- package/dist/publisher/operators/mono.d.ts +30 -0
- package/dist/publisher/operators/mono.d.ts.map +1 -0
- package/dist/publisher/operators/mono.js +37 -0
- package/dist/publisher/operators/mono.js.map +1 -0
- package/dist/publisher/operators/register.d.ts +20 -0
- package/dist/publisher/operators/register.d.ts.map +1 -0
- package/dist/publisher/operators/register.js +23 -0
- package/dist/publisher/operators/register.js.map +1 -0
- package/dist/publisher/operators/selection.d.ts +25 -0
- package/dist/publisher/operators/selection.d.ts.map +1 -0
- package/dist/publisher/operators/selection.js +108 -0
- package/dist/publisher/operators/selection.js.map +1 -0
- package/dist/publisher/operators/side-effect.d.ts +15 -0
- package/dist/publisher/operators/side-effect.d.ts.map +1 -0
- package/dist/publisher/operators/side-effect.js +56 -0
- package/dist/publisher/operators/side-effect.js.map +1 -0
- package/dist/publisher/operators/terminal.d.ts +16 -0
- package/dist/publisher/operators/terminal.d.ts.map +1 -0
- package/dist/publisher/operators/terminal.js +47 -0
- package/dist/publisher/operators/terminal.js.map +1 -0
- package/dist/publisher/operators/time.d.ts +20 -0
- package/dist/publisher/operators/time.d.ts.map +1 -0
- package/dist/publisher/operators/time.js +92 -0
- package/dist/publisher/operators/time.js.map +1 -0
- package/dist/publisher/operators/transform.d.ts +31 -0
- package/dist/publisher/operators/transform.d.ts.map +1 -0
- package/dist/publisher/operators/transform.js +74 -0
- package/dist/publisher/operators/transform.js.map +1 -0
- package/dist/publisher/operators/windowing.d.ts +28 -0
- package/dist/publisher/operators/windowing.d.ts.map +1 -0
- package/dist/publisher/operators/windowing.js +148 -0
- package/dist/publisher/operators/windowing.js.map +1 -0
- package/dist/publisher/publisher.d.ts +11 -0
- package/dist/publisher/publisher.d.ts.map +1 -0
- package/dist/publisher/types.d.ts +51 -0
- package/dist/publisher/types.d.ts.map +1 -0
- package/dist/schedulers/animation-frame-scheduler.d.ts +11 -0
- package/dist/schedulers/animation-frame-scheduler.d.ts.map +1 -0
- package/dist/schedulers/animation-frame-scheduler.js +30 -0
- package/dist/schedulers/animation-frame-scheduler.js.map +1 -0
- package/dist/schedulers/base-scheduler.d.ts +28 -0
- package/dist/schedulers/base-scheduler.d.ts.map +1 -0
- package/dist/schedulers/base-scheduler.js +77 -0
- package/dist/schedulers/base-scheduler.js.map +1 -0
- package/dist/schedulers/basic-worker.d.ts +22 -0
- package/dist/schedulers/basic-worker.d.ts.map +1 -0
- package/dist/schedulers/basic-worker.js +71 -0
- package/dist/schedulers/basic-worker.js.map +1 -0
- package/dist/schedulers/delay-scheduler.d.ts +12 -0
- package/dist/schedulers/delay-scheduler.d.ts.map +1 -0
- package/dist/schedulers/delay-scheduler.js +17 -0
- package/dist/schedulers/delay-scheduler.js.map +1 -0
- package/dist/schedulers/disposed.d.ts +4 -0
- package/dist/schedulers/disposed.d.ts.map +1 -0
- package/dist/schedulers/disposed.js +14 -0
- package/dist/schedulers/disposed.js.map +1 -0
- package/dist/schedulers/duration.d.ts +8 -0
- package/dist/schedulers/duration.d.ts.map +1 -0
- package/dist/schedulers/duration.js +11 -0
- package/dist/schedulers/duration.js.map +1 -0
- package/dist/schedulers/executor-scheduler.d.ts +13 -0
- package/dist/schedulers/executor-scheduler.d.ts.map +1 -0
- package/dist/schedulers/executor-scheduler.js +43 -0
- package/dist/schedulers/executor-scheduler.js.map +1 -0
- package/dist/schedulers/immediate-scheduler.d.ts +15 -0
- package/dist/schedulers/immediate-scheduler.d.ts.map +1 -0
- package/dist/schedulers/immediate-scheduler.js +24 -0
- package/dist/schedulers/immediate-scheduler.js.map +1 -0
- package/dist/schedulers/index.d.ts +7 -0
- package/dist/schedulers/index.d.ts.map +1 -0
- package/dist/schedulers/index.js +2 -0
- package/dist/schedulers/interval-scheduler.d.ts +12 -0
- package/dist/schedulers/interval-scheduler.d.ts.map +1 -0
- package/dist/schedulers/interval-scheduler.js +17 -0
- package/dist/schedulers/interval-scheduler.js.map +1 -0
- package/dist/schedulers/macro-scheduler.d.ts +19 -0
- package/dist/schedulers/macro-scheduler.d.ts.map +1 -0
- package/dist/schedulers/macro-scheduler.js +30 -0
- package/dist/schedulers/macro-scheduler.js.map +1 -0
- package/dist/schedulers/microtask-scheduler.d.ts +11 -0
- package/dist/schedulers/microtask-scheduler.d.ts.map +1 -0
- package/dist/schedulers/microtask-scheduler.js +34 -0
- package/dist/schedulers/microtask-scheduler.js.map +1 -0
- package/dist/schedulers/schedulers.d.ts +39 -0
- package/dist/schedulers/schedulers.d.ts.map +1 -0
- package/dist/schedulers/schedulers.js +83 -0
- package/dist/schedulers/schedulers.js.map +1 -0
- package/dist/schedulers/timeout-scheduler.d.ts +11 -0
- package/dist/schedulers/timeout-scheduler.d.ts.map +1 -0
- package/dist/schedulers/types.d.ts +35 -0
- package/dist/schedulers/types.d.ts.map +1 -0
- package/dist/signal/signal-type.d.ts +26 -0
- package/dist/signal/signal-type.d.ts.map +1 -0
- package/dist/signal/signal-type.js +31 -0
- package/dist/signal/signal-type.js.map +1 -0
- package/dist/signal/signal.d.ts +33 -0
- package/dist/signal/signal.d.ts.map +1 -0
- package/dist/signal/signal.js +70 -0
- package/dist/signal/signal.js.map +1 -0
- package/dist/sinks/index.d.ts +7 -0
- package/dist/sinks/index.d.ts.map +1 -0
- package/dist/sinks/index.js +2 -0
- package/dist/sinks/many.d.ts +66 -0
- package/dist/sinks/many.d.ts.map +1 -0
- package/dist/sinks/many.js +193 -0
- package/dist/sinks/many.js.map +1 -0
- package/dist/sinks/one.d.ts +41 -0
- package/dist/sinks/one.d.ts.map +1 -0
- package/dist/sinks/one.js +144 -0
- package/dist/sinks/one.js.map +1 -0
- package/dist/sinks/specs.d.ts +25 -0
- package/dist/sinks/specs.d.ts.map +1 -0
- package/dist/sinks/specs.js +126 -0
- package/dist/sinks/specs.js.map +1 -0
- package/dist/sinks/subscribers.d.ts +16 -0
- package/dist/sinks/subscribers.d.ts.map +1 -0
- package/dist/sinks/subscribers.js +32 -0
- package/dist/sinks/subscribers.js.map +1 -0
- package/dist/sinks/types.d.ts +137 -0
- package/dist/sinks/types.d.ts.map +1 -0
- package/dist/sinks/types.js +58 -0
- package/dist/sinks/types.js.map +1 -0
- package/dist/subscription/core-subscriber.d.ts +12 -0
- package/dist/subscription/core-subscriber.d.ts.map +1 -0
- package/dist/subscription/iterable-subscription.d.ts +64 -0
- package/dist/subscription/iterable-subscription.d.ts.map +1 -0
- package/dist/subscription/iterable-subscription.js +281 -0
- package/dist/subscription/iterable-subscription.js.map +1 -0
- package/dist/subscription/reactive-streams.d.ts +8 -0
- package/dist/subscription/reactive-streams.d.ts.map +1 -0
- package/dist/subscription/reactive-streams.js +0 -0
- package/dist/subscription/subscriber.d.ts +17 -0
- package/dist/subscription/subscriber.d.ts.map +1 -0
- package/dist/subscription/subscription.d.ts +12 -0
- package/dist/subscription/subscription.d.ts.map +1 -0
- package/package.json +99 -33
- package/LICENSE.md +0 -56
- package/dist/index.d.mts +0 -2557
- package/dist/index.js.map +0 -1
- package/dist/index.mjs +0 -2
- package/dist/index.mjs.map +0 -1
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"mono.d.ts","sourceRoot":"","sources":["../../../src/publisher/operators/mono.ts"],"names":[],"mappings":"AAAA;;;GAGG;AACH,OAAO,EAAC,IAAI,EAAC,MAAM,qBAAqB,CAAC;AAEzC,OAAO,KAAK,EAAC,MAAM,EAAE,cAAc,EAAC,MAAM,sBAAsB,CAAC;AAEjE,OAAO,QAAQ,qBAAqB,CAAC;IACjC,kDAAkD;IAClD,UAAU,IAAI,CAAC,CAAC;QACZ,+CAA+C;QAC/C,GAAG,CAAC,CAAC,EAAE,MAAM,EAAE,MAAM,CAAC,CAAC,EAAE,CAAC,CAAC,GAAG,IAAI,CAAC,CAAC,CAAC,CAAC;QAEtC,sFAAsF;QACtF,OAAO,CAAC,CAAC,EAAE,MAAM,EAAE,CAAC,KAAK,EAAE,CAAC,KAAK,cAAc,CAAC,CAAC,CAAC,GAAG,IAAI,CAAC,CAAC,CAAC,CAAC;QAE7D,mFAAmF;QACnF,WAAW,CAAC,CAAC,EAAE,MAAM,EAAE,CAAC,KAAK,EAAE,CAAC,KAAK,cAAc,CAAC,CAAC,CAAC,GAAG,IAAI,CAAC,CAAC,CAAC,CAAC;QAEjE,+DAA+D;QAC/D,MAAM,CAAC,SAAS,EAAE,CAAC,KAAK,EAAE,CAAC,KAAK,OAAO,GAAG,IAAI,CAAC,CAAC,CAAC,CAAC;QAElD,2DAA2D;QAC3D,cAAc,CAAC,YAAY,EAAE,CAAC,GAAG,IAAI,CAAC,CAAC,CAAC,CAAC;QAEzC,8DAA8D;QAC9D,aAAa,CAAC,SAAS,EAAE,cAAc,CAAC,CAAC,CAAC,GAAG,IAAI,CAAC,CAAC,CAAC,CAAC;QAErD,6EAA6E;QAC7E,IAAI,IAAI,IAAI,CAAC,IAAI,CAAC,CAAC;QAEnB,uEAAuE;QACvE,UAAU,CAAC,CAAC,EAAE,KAAK,EAAE,CAAC,GAAG,IAAI,CAAC,CAAC,CAAC,CAAC;QAEjC,+DAA+D;QAC/D,OAAO,CAAC,CAAC,EAAE,CAAC,GAAG,SAAS,CAAC,CAAC,EAAE,CAAC,CAAC,EAAE,KAAK,EAAE,cAAc,CAAC,CAAC,CAAC,EAAE,UAAU,CAAC,EAAE,CAAC,IAAI,EAAE,CAAC,EAAE,KAAK,EAAE,CAAC,KAAK,CAAC,GAAG,IAAI,CAAC,CAAC,CAAC,CAAC;KAC7G;CACJ"}
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
import { Flux } from "../flux.js";
|
|
2
|
+
import { Mono } from "../mono.js";
|
|
3
|
+
//#region src/publisher/operators/mono.ts
|
|
4
|
+
/**
|
|
5
|
+
* @packageDocumentation
|
|
6
|
+
* Flux, Mono and operator implementation modules.
|
|
7
|
+
*/
|
|
8
|
+
Mono.prototype.map = function map(mapper) {
|
|
9
|
+
return new Mono((signal, context) => Flux.prototype.map.call(this, mapper).iterate(signal, context));
|
|
10
|
+
};
|
|
11
|
+
Mono.prototype.flatMap = function flatMap(mapper) {
|
|
12
|
+
return new Mono((signal, context) => Flux.prototype.flatMap.call(this, mapper, 1).next().iterate(signal, context));
|
|
13
|
+
};
|
|
14
|
+
Mono.prototype.flatMapMany = function flatMapMany(mapper) {
|
|
15
|
+
return Flux.prototype.flatMap.call(this, mapper, 1);
|
|
16
|
+
};
|
|
17
|
+
Mono.prototype.filter = function filter(predicate) {
|
|
18
|
+
return new Mono((signal, context) => Flux.prototype.filter.call(this, predicate).iterate(signal, context));
|
|
19
|
+
};
|
|
20
|
+
Mono.prototype.defaultIfEmpty = function defaultIfEmpty(defaultValue) {
|
|
21
|
+
return new Mono((signal, context) => Flux.prototype.defaultIfEmpty.call(this, defaultValue).iterate(signal, context));
|
|
22
|
+
};
|
|
23
|
+
Mono.prototype.switchIfEmpty = function switchIfEmpty(alternate) {
|
|
24
|
+
return new Mono((signal, context) => Flux.prototype.switchIfEmpty.call(this, alternate).next().iterate(signal, context));
|
|
25
|
+
};
|
|
26
|
+
Mono.prototype.then = function then() {
|
|
27
|
+
return Flux.prototype.then.call(this);
|
|
28
|
+
};
|
|
29
|
+
Mono.prototype.thenReturn = function thenReturn(value) {
|
|
30
|
+
return Flux.prototype.thenReturn.call(this, value);
|
|
31
|
+
};
|
|
32
|
+
Mono.prototype.zipWith = function zipWith(other, combinator) {
|
|
33
|
+
return Mono.zip([this, other], (values) => combinator ? combinator(values[0], values[1]) : [values[0], values[1]]);
|
|
34
|
+
};
|
|
35
|
+
//#endregion
|
|
36
|
+
|
|
37
|
+
//# sourceMappingURL=mono.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"mono.js","names":[],"sources":["../../../src/publisher/operators/mono.ts"],"sourcesContent":["/**\n * @packageDocumentation\n * Flux, Mono and operator implementation modules.\n */\nimport {Flux} from \"@/publisher/flux.js\";\nimport {Mono} from \"@/publisher/mono.js\";\nimport type {Mapper, PublisherInput} from \"@/publisher/types.js\";\n\ndeclare module \"@/publisher/mono.js\" {\n /** Core Mono instance operators added to Mono. */\n interface Mono<T> {\n /** Maps the Mono value when one is present. */\n map<R>(mapper: Mapper<T, R>): Mono<R>;\n\n /** Maps the Mono value to another publisher and keeps at most one resulting value. */\n flatMap<R>(mapper: (value: T) => PublisherInput<R>): Mono<R>;\n\n /** Maps the Mono value to a publisher and exposes all resulting values as Flux. */\n flatMapMany<R>(mapper: (value: T) => PublisherInput<R>): Flux<R>;\n\n /** Keeps the Mono value only when it matches the predicate. */\n filter(predicate: (value: T) => boolean): Mono<T>;\n\n /** Emits `defaultValue` when this Mono completes empty. */\n defaultIfEmpty(defaultValue: T): Mono<T>;\n\n /** Switches to `alternate` when this Mono completes empty. */\n switchIfEmpty(alternate: PublisherInput<T>): Mono<T>;\n\n /** Ignores the value and completes when this Mono completes successfully. */\n then(): Mono<void>;\n\n /** Ignores the value and emits `value` after successful completion. */\n thenReturn<R>(value: R): Mono<R>;\n\n /** Combines this Mono value with another publisher's value. */\n zipWith<U, R = readonly [T, U]>(other: PublisherInput<U>, combinator?: (left: T, right: U) => R): Mono<R>;\n }\n}\n\nMono.prototype.map = function map<T, R>(this: Mono<T>, mapper: Mapper<T, R>): Mono<R> {\n return new Mono((signal, context) => (Flux.prototype.map.call(this, mapper) as Flux<R>).iterate(signal, context));\n};\n\nMono.prototype.flatMap = function flatMap<T, R>(\n this: Mono<T>,\n mapper: (value: T) => PublisherInput<R>\n): Mono<R> {\n return new Mono((signal, context) => (Flux.prototype.flatMap.call(this, mapper, 1) as Flux<R>).next().iterate(signal, context));\n};\n\nMono.prototype.flatMapMany = function flatMapMany<T, R>(\n this: Mono<T>,\n mapper: (value: T) => PublisherInput<R>\n): Flux<R> {\n return Flux.prototype.flatMap.call(this, mapper, 1) as Flux<R>;\n};\n\nMono.prototype.filter = function filter<T>(this: Mono<T>, predicate: (value: T) => boolean): Mono<T> {\n return new Mono((signal, context) => Flux.prototype.filter.call(this, predicate).iterate(signal, context));\n};\n\nMono.prototype.defaultIfEmpty = function defaultIfEmpty<T>(this: Mono<T>, defaultValue: T): Mono<T> {\n return new Mono((signal, context) => Flux.prototype.defaultIfEmpty.call(this, defaultValue).iterate(signal, context));\n};\n\nMono.prototype.switchIfEmpty = function switchIfEmpty<T>(this: Mono<T>, alternate: PublisherInput<T>): Mono<T> {\n return new Mono((signal, context) => Flux.prototype.switchIfEmpty.call(this, alternate).next().iterate(signal, context));\n};\n\nMono.prototype.then = function then<T>(this: Mono<T>): Mono<void> {\n return Flux.prototype.then.call(this);\n};\n\nMono.prototype.thenReturn = function thenReturn<T, R>(this: Mono<T>, value: R): Mono<R> {\n return Flux.prototype.thenReturn.call(this, value) as Mono<R>;\n};\n\nMono.prototype.zipWith = function zipWith<T, U, R = readonly [T, U]>(\n this: Mono<T>,\n other: PublisherInput<U>,\n combinator?: (left: T, right: U) => R\n): Mono<R> {\n return Mono.zip<[T, U], R>([this, other], values =>\n combinator ? combinator(values[0], values[1]) : ([values[0], values[1]] as const as R)\n );\n};\n"],"mappings":";;;;;;;AAwCA,KAAK,UAAU,MAAM,SAAS,IAAyB,QAA+B;CAClF,OAAO,IAAI,MAAM,QAAQ,YAAa,KAAK,UAAU,IAAI,KAAK,MAAM,MAAM,CAAC,CAAa,QAAQ,QAAQ,OAAO,CAAC;AACpH;AAEA,KAAK,UAAU,UAAU,SAAS,QAE9B,QACO;CACP,OAAO,IAAI,MAAM,QAAQ,YAAa,KAAK,UAAU,QAAQ,KAAK,MAAM,QAAQ,CAAC,CAAC,CAAa,KAAK,CAAC,CAAC,QAAQ,QAAQ,OAAO,CAAC;AAClI;AAEA,KAAK,UAAU,cAAc,SAAS,YAElC,QACO;CACP,OAAO,KAAK,UAAU,QAAQ,KAAK,MAAM,QAAQ,CAAC;AACtD;AAEA,KAAK,UAAU,SAAS,SAAS,OAAyB,WAA2C;CACjG,OAAO,IAAI,MAAM,QAAQ,YAAY,KAAK,UAAU,OAAO,KAAK,MAAM,SAAS,CAAC,CAAC,QAAQ,QAAQ,OAAO,CAAC;AAC7G;AAEA,KAAK,UAAU,iBAAiB,SAAS,eAAiC,cAA0B;CAChG,OAAO,IAAI,MAAM,QAAQ,YAAY,KAAK,UAAU,eAAe,KAAK,MAAM,YAAY,CAAC,CAAC,QAAQ,QAAQ,OAAO,CAAC;AACxH;AAEA,KAAK,UAAU,gBAAgB,SAAS,cAAgC,WAAuC;CAC3G,OAAO,IAAI,MAAM,QAAQ,YAAY,KAAK,UAAU,cAAc,KAAK,MAAM,SAAS,CAAC,CAAC,KAAK,CAAC,CAAC,QAAQ,QAAQ,OAAO,CAAC;AAC3H;AAEA,KAAK,UAAU,OAAO,SAAS,OAAmC;CAC9D,OAAO,KAAK,UAAU,KAAK,KAAK,IAAI;AACxC;AAEA,KAAK,UAAU,aAAa,SAAS,WAAgC,OAAmB;CACpF,OAAO,KAAK,UAAU,WAAW,KAAK,MAAM,KAAK;AACrD;AAEA,KAAK,UAAU,UAAU,SAAS,QAE9B,OACA,YACO;CACP,OAAO,KAAK,IAAe,CAAC,MAAM,KAAK,IAAG,WACtC,aAAa,WAAW,OAAO,IAAI,OAAO,EAAE,IAAK,CAAC,OAAO,IAAI,OAAO,EAAE,CAC1E;AACJ"}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @packageDocumentation
|
|
3
|
+
* Registers Flux and Mono prototype operators.
|
|
4
|
+
*/
|
|
5
|
+
import "./transform.js";
|
|
6
|
+
import "./flatten.js";
|
|
7
|
+
import "./selection.js";
|
|
8
|
+
import "./aggregate.js";
|
|
9
|
+
import "./side-effect.js";
|
|
10
|
+
import "./error.js";
|
|
11
|
+
import "./time.js";
|
|
12
|
+
import "./terminal.js";
|
|
13
|
+
import "./mono.js";
|
|
14
|
+
import "./compat/flux.js";
|
|
15
|
+
import "./compat/mono.js";
|
|
16
|
+
import "./windowing.js";
|
|
17
|
+
import "./lifecycle.js";
|
|
18
|
+
import "./coordination.js";
|
|
19
|
+
import "./mono-parity.js";
|
|
20
|
+
//# sourceMappingURL=register.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"register.d.ts","sourceRoot":"","sources":["../../../src/publisher/operators/register.ts"],"names":[],"mappings":"AAAA;;;GAGG;AACH,OAAO,oCAAoC,CAAC;AAC5C,OAAO,kCAAkC,CAAC;AAC1C,OAAO,oCAAoC,CAAC;AAC5C,OAAO,oCAAoC,CAAC;AAC5C,OAAO,sCAAsC,CAAC;AAC9C,OAAO,gCAAgC,CAAC;AACxC,OAAO,+BAA+B,CAAC;AACvC,OAAO,mCAAmC,CAAC;AAC3C,OAAO,+BAA+B,CAAC;AACvC,OAAO,sCAAsC,CAAC;AAC9C,OAAO,sCAAsC,CAAC;AAC9C,OAAO,oCAAoC,CAAC;AAC5C,OAAO,oCAAoC,CAAC;AAC5C,OAAO,uCAAuC,CAAC;AAC/C,OAAO,sCAAsC,CAAC"}
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import "./transform.js";
|
|
2
|
+
import "./flatten.js";
|
|
3
|
+
import "./selection.js";
|
|
4
|
+
import "./aggregate.js";
|
|
5
|
+
import "./side-effect.js";
|
|
6
|
+
import "./error.js";
|
|
7
|
+
import "./time.js";
|
|
8
|
+
import "./terminal.js";
|
|
9
|
+
import "./mono.js";
|
|
10
|
+
import "./compat/flux.js";
|
|
11
|
+
import "./compat/mono.js";
|
|
12
|
+
import "./windowing.js";
|
|
13
|
+
import "./lifecycle.js";
|
|
14
|
+
import "./coordination.js";
|
|
15
|
+
import "./mono-parity.js";
|
|
16
|
+
//#region src/publisher/operators/register.ts
|
|
17
|
+
/**
|
|
18
|
+
* @packageDocumentation
|
|
19
|
+
* Registers Flux and Mono prototype operators.
|
|
20
|
+
*/
|
|
21
|
+
//#endregion
|
|
22
|
+
|
|
23
|
+
//# sourceMappingURL=register.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"register.js","names":[],"sources":["../../../src/publisher/operators/register.ts"],"sourcesContent":["/**\n * @packageDocumentation\n * Registers Flux and Mono prototype operators.\n */\nimport \"@/publisher/operators/transform.js\";\nimport \"@/publisher/operators/flatten.js\";\nimport \"@/publisher/operators/selection.js\";\nimport \"@/publisher/operators/aggregate.js\";\nimport \"@/publisher/operators/side-effect.js\";\nimport \"@/publisher/operators/error.js\";\nimport \"@/publisher/operators/time.js\";\nimport \"@/publisher/operators/terminal.js\";\nimport \"@/publisher/operators/mono.js\";\nimport \"@/publisher/operators/compat/flux.js\";\nimport \"@/publisher/operators/compat/mono.js\";\nimport \"@/publisher/operators/windowing.js\";\nimport \"@/publisher/operators/lifecycle.js\";\nimport \"@/publisher/operators/coordination.js\";\nimport \"@/publisher/operators/mono-parity.js\";\n"],"mappings":""}
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import type { PublisherInput } from "../types.js";
|
|
2
|
+
declare module "../flux.js" {
|
|
3
|
+
/** Selection and filtering operators added to Flux. */
|
|
4
|
+
interface Flux<T> {
|
|
5
|
+
/** Emits at most the first `n` source values. */
|
|
6
|
+
take(n: number): Flux<T>;
|
|
7
|
+
/** Emits values while the predicate returns true, then cancels upstream. */
|
|
8
|
+
takeWhile(predicate: (value: T) => boolean): Flux<T>;
|
|
9
|
+
/** Emits values until the predicate returns true, including the matching value. */
|
|
10
|
+
takeUntil(predicate: (value: T) => boolean): Flux<T>;
|
|
11
|
+
/** Drops the first `n` source values. */
|
|
12
|
+
skip(n: number): Flux<T>;
|
|
13
|
+
/** Drops values while the predicate returns true, then relays the rest. */
|
|
14
|
+
skipWhile(predicate: (value: T) => boolean): Flux<T>;
|
|
15
|
+
/** Emits only the first value for each selected key. */
|
|
16
|
+
distinct<K = T>(keySelector?: (value: T) => K): Flux<T>;
|
|
17
|
+
/** Drops adjacent values whose selected key is equal to the previous key. */
|
|
18
|
+
distinctUntilChanged<K = T>(keySelector?: (value: T) => K): Flux<T>;
|
|
19
|
+
/** Emits `defaultValue` when the source completes without values. */
|
|
20
|
+
defaultIfEmpty(defaultValue: T): Flux<T>;
|
|
21
|
+
/** Switches to `alternate` when the source completes without values. */
|
|
22
|
+
switchIfEmpty(alternate: PublisherInput<T>): Flux<T>;
|
|
23
|
+
}
|
|
24
|
+
}
|
|
25
|
+
//# sourceMappingURL=selection.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"selection.d.ts","sourceRoot":"","sources":["../../../src/publisher/operators/selection.ts"],"names":[],"mappings":"AAoBA,OAAO,KAAK,EAAC,cAAc,EAAC,MAAM,sBAAsB,CAAC;AAEzD,OAAO,QAAQ,qBAAqB,CAAC;IACjC,uDAAuD;IACvD,UAAU,IAAI,CAAC,CAAC;QACZ,iDAAiD;QACjD,IAAI,CAAC,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC,CAAC,CAAC,CAAC;QAEzB,4EAA4E;QAC5E,SAAS,CAAC,SAAS,EAAE,CAAC,KAAK,EAAE,CAAC,KAAK,OAAO,GAAG,IAAI,CAAC,CAAC,CAAC,CAAC;QAErD,mFAAmF;QACnF,SAAS,CAAC,SAAS,EAAE,CAAC,KAAK,EAAE,CAAC,KAAK,OAAO,GAAG,IAAI,CAAC,CAAC,CAAC,CAAC;QAErD,yCAAyC;QACzC,IAAI,CAAC,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC,CAAC,CAAC,CAAC;QAEzB,2EAA2E;QAC3E,SAAS,CAAC,SAAS,EAAE,CAAC,KAAK,EAAE,CAAC,KAAK,OAAO,GAAG,IAAI,CAAC,CAAC,CAAC,CAAC;QAErD,wDAAwD;QACxD,QAAQ,CAAC,CAAC,GAAG,CAAC,EAAE,WAAW,CAAC,EAAE,CAAC,KAAK,EAAE,CAAC,KAAK,CAAC,GAAG,IAAI,CAAC,CAAC,CAAC,CAAC;QAExD,6EAA6E;QAC7E,oBAAoB,CAAC,CAAC,GAAG,CAAC,EAAE,WAAW,CAAC,EAAE,CAAC,KAAK,EAAE,CAAC,KAAK,CAAC,GAAG,IAAI,CAAC,CAAC,CAAC,CAAC;QAEpE,qEAAqE;QACrE,cAAc,CAAC,YAAY,EAAE,CAAC,GAAG,IAAI,CAAC,CAAC,CAAC,CAAC;QAEzC,wEAAwE;QACxE,aAAa,CAAC,SAAS,EAAE,cAAc,CAAC,CAAC,CAAC,GAAG,IAAI,CAAC,CAAC,CAAC,CAAC;KACxD;CACJ"}
|
|
@@ -0,0 +1,108 @@
|
|
|
1
|
+
import { isAsyncIterable, toAsyncIterator } from "../../internal/iterable.js";
|
|
2
|
+
import { defaultIfEmptyIterable, distinctIterable, distinctUntilChangedIterable, skipIterable, skipWhileIterable, takeUntilIterable, takeWhileIterable } from "../../internal/iterable-transform.js";
|
|
3
|
+
import { identity } from "../helpers.js";
|
|
4
|
+
import { Flux } from "../flux.js";
|
|
5
|
+
//#region src/publisher/operators/selection.ts
|
|
6
|
+
/**
|
|
7
|
+
* @packageDocumentation
|
|
8
|
+
* Flux, Mono and operator implementation modules.
|
|
9
|
+
*/
|
|
10
|
+
Flux.prototype.take = function take(n) {
|
|
11
|
+
if (!Number.isInteger(n) || n < 0) throw new RangeError("take expects a non-negative integer");
|
|
12
|
+
if (n === 0) return Flux.empty();
|
|
13
|
+
const source = this;
|
|
14
|
+
return new Flux((signal, context) => {
|
|
15
|
+
const controller = new AbortController();
|
|
16
|
+
const abort = () => controller.abort(signal.reason);
|
|
17
|
+
signal.addEventListener("abort", abort, { once: true });
|
|
18
|
+
let values;
|
|
19
|
+
try {
|
|
20
|
+
values = source.iterate(controller.signal, context);
|
|
21
|
+
} catch (error) {
|
|
22
|
+
signal.removeEventListener("abort", abort);
|
|
23
|
+
throw error;
|
|
24
|
+
}
|
|
25
|
+
if (!isAsyncIterable(values)) return (function* () {
|
|
26
|
+
let remaining = n;
|
|
27
|
+
try {
|
|
28
|
+
for (const value of values) {
|
|
29
|
+
yield value;
|
|
30
|
+
remaining -= 1;
|
|
31
|
+
if (remaining === 0) {
|
|
32
|
+
controller.abort();
|
|
33
|
+
return;
|
|
34
|
+
}
|
|
35
|
+
}
|
|
36
|
+
} finally {
|
|
37
|
+
signal.removeEventListener("abort", abort);
|
|
38
|
+
if (signal.aborted && !controller.signal.aborted) controller.abort(signal.reason);
|
|
39
|
+
}
|
|
40
|
+
})();
|
|
41
|
+
return (async function* () {
|
|
42
|
+
const iterator = toAsyncIterator(values);
|
|
43
|
+
let remaining = n;
|
|
44
|
+
let cancelledSource = false;
|
|
45
|
+
try {
|
|
46
|
+
while (!signal.aborted) {
|
|
47
|
+
const result = await iterator.next();
|
|
48
|
+
if (result.done) return;
|
|
49
|
+
yield result.value;
|
|
50
|
+
remaining -= 1;
|
|
51
|
+
if (remaining === 0) {
|
|
52
|
+
cancelledSource = true;
|
|
53
|
+
controller.abort();
|
|
54
|
+
return;
|
|
55
|
+
}
|
|
56
|
+
}
|
|
57
|
+
} finally {
|
|
58
|
+
signal.removeEventListener("abort", abort);
|
|
59
|
+
if (signal.aborted && !controller.signal.aborted) controller.abort(signal.reason);
|
|
60
|
+
if (cancelledSource || signal.aborted) await iterator.return?.();
|
|
61
|
+
}
|
|
62
|
+
})();
|
|
63
|
+
});
|
|
64
|
+
};
|
|
65
|
+
Flux.prototype.takeWhile = function takeWhile(predicate) {
|
|
66
|
+
const source = this;
|
|
67
|
+
return new Flux((signal, context) => takeWhileIterable(source.iterate(signal, context), predicate));
|
|
68
|
+
};
|
|
69
|
+
Flux.prototype.takeUntil = function takeUntil(predicate) {
|
|
70
|
+
const source = this;
|
|
71
|
+
return new Flux((signal, context) => takeUntilIterable(source.iterate(signal, context), predicate));
|
|
72
|
+
};
|
|
73
|
+
Flux.prototype.skip = function skip(n) {
|
|
74
|
+
if (!Number.isInteger(n) || n < 0) throw new RangeError("skip expects a non-negative integer");
|
|
75
|
+
if (n === 0) return this;
|
|
76
|
+
const source = this;
|
|
77
|
+
return new Flux((signal, context) => skipIterable(source.iterate(signal, context), n));
|
|
78
|
+
};
|
|
79
|
+
Flux.prototype.skipWhile = function skipWhile(predicate) {
|
|
80
|
+
const source = this;
|
|
81
|
+
return new Flux((signal, context) => skipWhileIterable(source.iterate(signal, context), predicate));
|
|
82
|
+
};
|
|
83
|
+
Flux.prototype.distinct = function distinct(keySelector = identity) {
|
|
84
|
+
const source = this;
|
|
85
|
+
return new Flux((signal, context) => distinctIterable(source.iterate(signal, context), keySelector));
|
|
86
|
+
};
|
|
87
|
+
Flux.prototype.distinctUntilChanged = function distinctUntilChanged(keySelector = identity) {
|
|
88
|
+
const source = this;
|
|
89
|
+
return new Flux((signal, context) => distinctUntilChangedIterable(source.iterate(signal, context), keySelector));
|
|
90
|
+
};
|
|
91
|
+
Flux.prototype.defaultIfEmpty = function defaultIfEmpty(defaultValue) {
|
|
92
|
+
const source = this;
|
|
93
|
+
return new Flux((signal, context) => defaultIfEmptyIterable(source.iterate(signal, context), defaultValue));
|
|
94
|
+
};
|
|
95
|
+
Flux.prototype.switchIfEmpty = function switchIfEmpty(alternate) {
|
|
96
|
+
const source = this;
|
|
97
|
+
return new Flux(async function* (signal, context) {
|
|
98
|
+
let empty = true;
|
|
99
|
+
for await (const value of source.iterate(signal, context)) {
|
|
100
|
+
empty = false;
|
|
101
|
+
yield value;
|
|
102
|
+
}
|
|
103
|
+
if (empty) for await (const value of Flux.from(alternate).iterate(signal, context)) yield value;
|
|
104
|
+
});
|
|
105
|
+
};
|
|
106
|
+
//#endregion
|
|
107
|
+
|
|
108
|
+
//# sourceMappingURL=selection.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"selection.js","names":[],"sources":["../../../src/publisher/operators/selection.ts"],"sourcesContent":["/**\n * @packageDocumentation\n * Flux, Mono and operator implementation modules.\n */\nimport {Flux} from \"@/publisher/flux.js\";\nimport {\n type AnyIterable,\n isAsyncIterable,\n toAsyncIterator\n} from \"@/internal/iterable.js\";\nimport {\n defaultIfEmptyIterable,\n distinctIterable,\n distinctUntilChangedIterable,\n skipIterable,\n skipWhileIterable,\n takeUntilIterable,\n takeWhileIterable\n} from \"@/internal/iterable-transform.js\";\nimport {identity} from \"@/publisher/helpers.js\";\nimport type {PublisherInput} from \"@/publisher/types.js\";\n\ndeclare module \"@/publisher/flux.js\" {\n /** Selection and filtering operators added to Flux. */\n interface Flux<T> {\n /** Emits at most the first `n` source values. */\n take(n: number): Flux<T>;\n\n /** Emits values while the predicate returns true, then cancels upstream. */\n takeWhile(predicate: (value: T) => boolean): Flux<T>;\n\n /** Emits values until the predicate returns true, including the matching value. */\n takeUntil(predicate: (value: T) => boolean): Flux<T>;\n\n /** Drops the first `n` source values. */\n skip(n: number): Flux<T>;\n\n /** Drops values while the predicate returns true, then relays the rest. */\n skipWhile(predicate: (value: T) => boolean): Flux<T>;\n\n /** Emits only the first value for each selected key. */\n distinct<K = T>(keySelector?: (value: T) => K): Flux<T>;\n\n /** Drops adjacent values whose selected key is equal to the previous key. */\n distinctUntilChanged<K = T>(keySelector?: (value: T) => K): Flux<T>;\n\n /** Emits `defaultValue` when the source completes without values. */\n defaultIfEmpty(defaultValue: T): Flux<T>;\n\n /** Switches to `alternate` when the source completes without values. */\n switchIfEmpty(alternate: PublisherInput<T>): Flux<T>;\n }\n}\n\nFlux.prototype.take = function take<T>(this: Flux<T>, n: number): Flux<T> {\n if (!Number.isInteger(n) || n < 0) {\n throw new RangeError(\"take expects a non-negative integer\");\n }\n if (n === 0) {\n return Flux.empty<T>();\n }\n const source = this;\n return new Flux((signal, context) => {\n const controller = new AbortController();\n const abort = () => controller.abort(signal.reason);\n signal.addEventListener(\"abort\", abort, {once: true});\n let values: AnyIterable<T>;\n try {\n values = source.iterate(controller.signal, context);\n } catch (error) {\n signal.removeEventListener(\"abort\", abort);\n throw error;\n }\n if (!isAsyncIterable<T>(values)) {\n return (function* () {\n let remaining = n;\n try {\n for (const value of values) {\n yield value;\n remaining -= 1;\n if (remaining === 0) {\n controller.abort();\n return;\n }\n }\n } finally {\n signal.removeEventListener(\"abort\", abort);\n if (signal.aborted && !controller.signal.aborted) {\n controller.abort(signal.reason);\n }\n }\n })();\n }\n return (async function* () {\n const iterator = toAsyncIterator(values);\n let remaining = n;\n let cancelledSource = false;\n try {\n while (!signal.aborted) {\n const result = await iterator.next();\n if (result.done) {\n return;\n }\n yield result.value;\n remaining -= 1;\n if (remaining === 0) {\n cancelledSource = true;\n controller.abort();\n return;\n }\n }\n } finally {\n signal.removeEventListener(\"abort\", abort);\n if (signal.aborted && !controller.signal.aborted) {\n controller.abort(signal.reason);\n }\n if (cancelledSource || signal.aborted) {\n await iterator.return?.();\n }\n }\n })();\n });\n};\n\nFlux.prototype.takeWhile = function takeWhile<T>(this: Flux<T>, predicate: (value: T) => boolean): Flux<T> {\n const source = this;\n return new Flux((signal, context) => takeWhileIterable(source.iterate(signal, context), predicate));\n};\n\nFlux.prototype.takeUntil = function takeUntil<T>(this: Flux<T>, predicate: (value: T) => boolean): Flux<T> {\n const source = this;\n return new Flux((signal, context) => takeUntilIterable(source.iterate(signal, context), predicate));\n};\n\nFlux.prototype.skip = function skip<T>(this: Flux<T>, n: number): Flux<T> {\n if (!Number.isInteger(n) || n < 0) {\n throw new RangeError(\"skip expects a non-negative integer\");\n }\n if (n === 0) {\n return this;\n }\n const source = this;\n return new Flux((signal, context) => skipIterable(source.iterate(signal, context), n));\n};\n\nFlux.prototype.skipWhile = function skipWhile<T>(this: Flux<T>, predicate: (value: T) => boolean): Flux<T> {\n const source = this;\n return new Flux((signal, context) => skipWhileIterable(source.iterate(signal, context), predicate));\n};\n\nFlux.prototype.distinct = function distinct<T, K = T>(\n this: Flux<T>,\n keySelector: (value: T) => K = identity as (value: T) => K\n): Flux<T> {\n const source = this;\n return new Flux((signal, context) => distinctIterable(source.iterate(signal, context), keySelector));\n};\n\nFlux.prototype.distinctUntilChanged = function distinctUntilChanged<T, K = T>(\n this: Flux<T>,\n keySelector: (value: T) => K = identity as (value: T) => K\n): Flux<T> {\n const source = this;\n return new Flux((signal, context) => distinctUntilChangedIterable(source.iterate(signal, context), keySelector));\n};\n\nFlux.prototype.defaultIfEmpty = function defaultIfEmpty<T>(this: Flux<T>, defaultValue: T): Flux<T> {\n const source = this;\n return new Flux((signal, context) => defaultIfEmptyIterable(source.iterate(signal, context), defaultValue));\n};\n\nFlux.prototype.switchIfEmpty = function switchIfEmpty<T>(this: Flux<T>, alternate: PublisherInput<T>): Flux<T> {\n const source = this;\n return new Flux(async function* (signal, context) {\n let empty = true;\n for await (const value of source.iterate(signal, context)) {\n empty = false;\n yield value;\n }\n if (empty) {\n for await (const value of Flux.from(alternate).iterate(signal, context)) {\n yield value;\n }\n }\n });\n};\n"],"mappings":";;;;;;;;;AAsDA,KAAK,UAAU,OAAO,SAAS,KAAuB,GAAoB;CACtE,IAAI,CAAC,OAAO,UAAU,CAAC,KAAK,IAAI,GAC5B,MAAM,IAAI,WAAW,qCAAqC;CAE9D,IAAI,MAAM,GACN,OAAO,KAAK,MAAS;CAEzB,MAAM,SAAS;CACf,OAAO,IAAI,MAAM,QAAQ,YAAY;EACjC,MAAM,aAAa,IAAI,gBAAgB;EACvC,MAAM,cAAc,WAAW,MAAM,OAAO,MAAM;EAClD,OAAO,iBAAiB,SAAS,OAAO,EAAC,MAAM,KAAI,CAAC;EACpD,IAAI;EACJ,IAAI;GACA,SAAS,OAAO,QAAQ,WAAW,QAAQ,OAAO;EACtD,SAAS,OAAO;GACZ,OAAO,oBAAoB,SAAS,KAAK;GACzC,MAAM;EACV;EACA,IAAI,CAAC,gBAAmB,MAAM,GAC1B,QAAQ,aAAa;GACjB,IAAI,YAAY;GAChB,IAAI;IACA,KAAK,MAAM,SAAS,QAAQ;KACxB,MAAM;KACN,aAAa;KACb,IAAI,cAAc,GAAG;MACjB,WAAW,MAAM;MACjB;KACJ;IACJ;GACJ,UAAU;IACN,OAAO,oBAAoB,SAAS,KAAK;IACzC,IAAI,OAAO,WAAW,CAAC,WAAW,OAAO,SACrC,WAAW,MAAM,OAAO,MAAM;GAEtC;EACJ,EAAA,CAAG;EAEP,QAAQ,mBAAmB;GACvB,MAAM,WAAW,gBAAgB,MAAM;GACvC,IAAI,YAAY;GAChB,IAAI,kBAAkB;GACtB,IAAI;IACA,OAAO,CAAC,OAAO,SAAS;KACpB,MAAM,SAAS,MAAM,SAAS,KAAK;KACnC,IAAI,OAAO,MACP;KAEJ,MAAM,OAAO;KACb,aAAa;KACb,IAAI,cAAc,GAAG;MACjB,kBAAkB;MAClB,WAAW,MAAM;MACjB;KACJ;IACJ;GACJ,UAAU;IACN,OAAO,oBAAoB,SAAS,KAAK;IACzC,IAAI,OAAO,WAAW,CAAC,WAAW,OAAO,SACrC,WAAW,MAAM,OAAO,MAAM;IAElC,IAAI,mBAAmB,OAAO,SAC1B,MAAM,SAAS,SAAS;GAEhC;EACJ,EAAA,CAAG;CACP,CAAC;AACL;AAEA,KAAK,UAAU,YAAY,SAAS,UAA4B,WAA2C;CACvG,MAAM,SAAS;CACf,OAAO,IAAI,MAAM,QAAQ,YAAY,kBAAkB,OAAO,QAAQ,QAAQ,OAAO,GAAG,SAAS,CAAC;AACtG;AAEA,KAAK,UAAU,YAAY,SAAS,UAA4B,WAA2C;CACvG,MAAM,SAAS;CACf,OAAO,IAAI,MAAM,QAAQ,YAAY,kBAAkB,OAAO,QAAQ,QAAQ,OAAO,GAAG,SAAS,CAAC;AACtG;AAEA,KAAK,UAAU,OAAO,SAAS,KAAuB,GAAoB;CACtE,IAAI,CAAC,OAAO,UAAU,CAAC,KAAK,IAAI,GAC5B,MAAM,IAAI,WAAW,qCAAqC;CAE9D,IAAI,MAAM,GACN,OAAO;CAEX,MAAM,SAAS;CACf,OAAO,IAAI,MAAM,QAAQ,YAAY,aAAa,OAAO,QAAQ,QAAQ,OAAO,GAAG,CAAC,CAAC;AACzF;AAEA,KAAK,UAAU,YAAY,SAAS,UAA4B,WAA2C;CACvG,MAAM,SAAS;CACf,OAAO,IAAI,MAAM,QAAQ,YAAY,kBAAkB,OAAO,QAAQ,QAAQ,OAAO,GAAG,SAAS,CAAC;AACtG;AAEA,KAAK,UAAU,WAAW,SAAS,SAE/B,cAA+B,UACxB;CACP,MAAM,SAAS;CACf,OAAO,IAAI,MAAM,QAAQ,YAAY,iBAAiB,OAAO,QAAQ,QAAQ,OAAO,GAAG,WAAW,CAAC;AACvG;AAEA,KAAK,UAAU,uBAAuB,SAAS,qBAE3C,cAA+B,UACxB;CACP,MAAM,SAAS;CACf,OAAO,IAAI,MAAM,QAAQ,YAAY,6BAA6B,OAAO,QAAQ,QAAQ,OAAO,GAAG,WAAW,CAAC;AACnH;AAEA,KAAK,UAAU,iBAAiB,SAAS,eAAiC,cAA0B;CAChG,MAAM,SAAS;CACf,OAAO,IAAI,MAAM,QAAQ,YAAY,uBAAuB,OAAO,QAAQ,QAAQ,OAAO,GAAG,YAAY,CAAC;AAC9G;AAEA,KAAK,UAAU,gBAAgB,SAAS,cAAgC,WAAuC;CAC3G,MAAM,SAAS;CACf,OAAO,IAAI,KAAK,iBAAiB,QAAQ,SAAS;EAC9C,IAAI,QAAQ;EACZ,WAAW,MAAM,SAAS,OAAO,QAAQ,QAAQ,OAAO,GAAG;GACvD,QAAQ;GACR,MAAM;EACV;EACA,IAAI,OACA,WAAW,MAAM,SAAS,KAAK,KAAK,SAAS,CAAC,CAAC,QAAQ,QAAQ,OAAO,GAClE,MAAM;CAGlB,CAAC;AACL"}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
declare module "../flux.js" {
|
|
2
|
+
/** Side-effect callback operators added to Flux. */
|
|
3
|
+
interface Flux<T> {
|
|
4
|
+
/** Invokes a callback for each value without changing the sequence. */
|
|
5
|
+
doOnNext(callback: (value: T) => void): Flux<T>;
|
|
6
|
+
/** Invokes a callback when the source fails without recovering the error. */
|
|
7
|
+
doOnError(callback: (error: unknown) => void): Flux<T>;
|
|
8
|
+
/** Invokes a callback after the source completes successfully. */
|
|
9
|
+
doOnComplete(callback: () => void): Flux<T>;
|
|
10
|
+
/** Invokes a callback once after completion, error, or cancellation. */
|
|
11
|
+
doFinally(callback: (signal: "complete" | "error" | "cancel") => void): Flux<T>;
|
|
12
|
+
}
|
|
13
|
+
}
|
|
14
|
+
export {};
|
|
15
|
+
//# sourceMappingURL=side-effect.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"side-effect.d.ts","sourceRoot":"","sources":["../../../src/publisher/operators/side-effect.ts"],"names":[],"mappings":"AAMA,OAAO,QAAQ,qBAAqB,CAAC;IACjC,oDAAoD;IACpD,UAAU,IAAI,CAAC,CAAC;QACZ,uEAAuE;QACvE,QAAQ,CAAC,QAAQ,EAAE,CAAC,KAAK,EAAE,CAAC,KAAK,IAAI,GAAG,IAAI,CAAC,CAAC,CAAC,CAAC;QAEhD,6EAA6E;QAC7E,SAAS,CAAC,QAAQ,EAAE,CAAC,KAAK,EAAE,OAAO,KAAK,IAAI,GAAG,IAAI,CAAC,CAAC,CAAC,CAAC;QAEvD,kEAAkE;QAClE,YAAY,CAAC,QAAQ,EAAE,MAAM,IAAI,GAAG,IAAI,CAAC,CAAC,CAAC,CAAC;QAE5C,wEAAwE;QACxE,SAAS,CAAC,QAAQ,EAAE,CAAC,MAAM,EAAE,UAAU,GAAG,OAAO,GAAG,QAAQ,KAAK,IAAI,GAAG,IAAI,CAAC,CAAC,CAAC,CAAC;KACnF;CACJ"}
|
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
import { Flux } from "../flux.js";
|
|
2
|
+
//#region src/publisher/operators/side-effect.ts
|
|
3
|
+
/**
|
|
4
|
+
* @packageDocumentation
|
|
5
|
+
* Flux, Mono and operator implementation modules.
|
|
6
|
+
*/
|
|
7
|
+
Flux.prototype.doOnNext = function doOnNext(callback) {
|
|
8
|
+
const source = this;
|
|
9
|
+
return new Flux(async function* (signal, context) {
|
|
10
|
+
for await (const value of source.iterate(signal, context)) {
|
|
11
|
+
callback(value);
|
|
12
|
+
yield value;
|
|
13
|
+
}
|
|
14
|
+
});
|
|
15
|
+
};
|
|
16
|
+
Flux.prototype.doOnError = function doOnError(callback) {
|
|
17
|
+
const source = this;
|
|
18
|
+
return new Flux(async function* (signal, context) {
|
|
19
|
+
try {
|
|
20
|
+
for await (const value of source.iterate(signal, context)) yield value;
|
|
21
|
+
} catch (error) {
|
|
22
|
+
callback(error);
|
|
23
|
+
throw error;
|
|
24
|
+
}
|
|
25
|
+
});
|
|
26
|
+
};
|
|
27
|
+
Flux.prototype.doOnComplete = function doOnComplete(callback) {
|
|
28
|
+
const source = this;
|
|
29
|
+
return new Flux(async function* (signal, context) {
|
|
30
|
+
for await (const value of source.iterate(signal, context)) yield value;
|
|
31
|
+
callback();
|
|
32
|
+
});
|
|
33
|
+
};
|
|
34
|
+
Flux.prototype.doFinally = function doFinally(callback) {
|
|
35
|
+
const source = this;
|
|
36
|
+
return new Flux(async function* (signal, context) {
|
|
37
|
+
let terminal = "complete";
|
|
38
|
+
try {
|
|
39
|
+
for await (const value of source.iterate(signal, context)) {
|
|
40
|
+
if (signal.aborted) {
|
|
41
|
+
terminal = "cancel";
|
|
42
|
+
return;
|
|
43
|
+
}
|
|
44
|
+
yield value;
|
|
45
|
+
}
|
|
46
|
+
} catch (error) {
|
|
47
|
+
terminal = signal.aborted ? "cancel" : "error";
|
|
48
|
+
throw error;
|
|
49
|
+
} finally {
|
|
50
|
+
callback(signal.aborted ? "cancel" : terminal);
|
|
51
|
+
}
|
|
52
|
+
});
|
|
53
|
+
};
|
|
54
|
+
//#endregion
|
|
55
|
+
|
|
56
|
+
//# sourceMappingURL=side-effect.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"side-effect.js","names":[],"sources":["../../../src/publisher/operators/side-effect.ts"],"sourcesContent":["/**\n * @packageDocumentation\n * Flux, Mono and operator implementation modules.\n */\nimport {Flux} from \"@/publisher/flux.js\";\n\ndeclare module \"@/publisher/flux.js\" {\n /** Side-effect callback operators added to Flux. */\n interface Flux<T> {\n /** Invokes a callback for each value without changing the sequence. */\n doOnNext(callback: (value: T) => void): Flux<T>;\n\n /** Invokes a callback when the source fails without recovering the error. */\n doOnError(callback: (error: unknown) => void): Flux<T>;\n\n /** Invokes a callback after the source completes successfully. */\n doOnComplete(callback: () => void): Flux<T>;\n\n /** Invokes a callback once after completion, error, or cancellation. */\n doFinally(callback: (signal: \"complete\" | \"error\" | \"cancel\") => void): Flux<T>;\n }\n}\n\nFlux.prototype.doOnNext = function doOnNext<T>(this: Flux<T>, callback: (value: T) => void): Flux<T> {\n const source = this;\n return new Flux(async function* (signal, context) {\n for await (const value of source.iterate(signal, context)) {\n callback(value);\n yield value;\n }\n });\n};\n\nFlux.prototype.doOnError = function doOnError<T>(this: Flux<T>, callback: (error: unknown) => void): Flux<T> {\n const source = this;\n return new Flux(async function* (signal, context) {\n try {\n for await (const value of source.iterate(signal, context)) {\n yield value;\n }\n } catch (error) {\n callback(error);\n throw error;\n }\n });\n};\n\nFlux.prototype.doOnComplete = function doOnComplete<T>(this: Flux<T>, callback: () => void): Flux<T> {\n const source = this;\n return new Flux(async function* (signal, context) {\n for await (const value of source.iterate(signal, context)) {\n yield value;\n }\n callback();\n });\n};\n\nFlux.prototype.doFinally = function doFinally<T>(\n this: Flux<T>,\n callback: (signal: \"complete\" | \"error\" | \"cancel\") => void\n): Flux<T> {\n const source = this;\n return new Flux(async function* (signal, context) {\n let terminal: \"complete\" | \"error\" | \"cancel\" = \"complete\";\n try {\n for await (const value of source.iterate(signal, context)) {\n if (signal.aborted) {\n terminal = \"cancel\";\n return;\n }\n yield value;\n }\n } catch (error) {\n terminal = signal.aborted ? \"cancel\" : \"error\";\n throw error;\n } finally {\n callback(signal.aborted ? \"cancel\" : terminal);\n }\n });\n};\n"],"mappings":";;;;;;AAuBA,KAAK,UAAU,WAAW,SAAS,SAA2B,UAAuC;CACjG,MAAM,SAAS;CACf,OAAO,IAAI,KAAK,iBAAiB,QAAQ,SAAS;EAC9C,WAAW,MAAM,SAAS,OAAO,QAAQ,QAAQ,OAAO,GAAG;GACvD,SAAS,KAAK;GACd,MAAM;EACV;CACJ,CAAC;AACL;AAEA,KAAK,UAAU,YAAY,SAAS,UAA4B,UAA6C;CACzG,MAAM,SAAS;CACf,OAAO,IAAI,KAAK,iBAAiB,QAAQ,SAAS;EAC9C,IAAI;GACA,WAAW,MAAM,SAAS,OAAO,QAAQ,QAAQ,OAAO,GACpD,MAAM;EAEd,SAAS,OAAO;GACZ,SAAS,KAAK;GACd,MAAM;EACV;CACJ,CAAC;AACL;AAEA,KAAK,UAAU,eAAe,SAAS,aAA+B,UAA+B;CACjG,MAAM,SAAS;CACf,OAAO,IAAI,KAAK,iBAAiB,QAAQ,SAAS;EAC9C,WAAW,MAAM,SAAS,OAAO,QAAQ,QAAQ,OAAO,GACpD,MAAM;EAEV,SAAS;CACb,CAAC;AACL;AAEA,KAAK,UAAU,YAAY,SAAS,UAEhC,UACO;CACP,MAAM,SAAS;CACf,OAAO,IAAI,KAAK,iBAAiB,QAAQ,SAAS;EAC9C,IAAI,WAA4C;EAChD,IAAI;GACA,WAAW,MAAM,SAAS,OAAO,QAAQ,QAAQ,OAAO,GAAG;IACvD,IAAI,OAAO,SAAS;KAChB,WAAW;KACX;IACJ;IACA,MAAM;GACV;EACJ,SAAS,OAAO;GACZ,WAAW,OAAO,UAAU,WAAW;GACvC,MAAM;EACV,UAAU;GACN,SAAS,OAAO,UAAU,WAAW,QAAQ;EACjD;CACJ,CAAC;AACL"}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { Mono } from "../mono.js";
|
|
2
|
+
import type { PublisherInput } from "../types.js";
|
|
3
|
+
declare module "../flux.js" {
|
|
4
|
+
/** Terminal continuation and zip operators added to Flux. */
|
|
5
|
+
interface Flux<T> {
|
|
6
|
+
/** Ignores all values and completes when the source completes successfully. */
|
|
7
|
+
then(): Mono<void>;
|
|
8
|
+
/** Waits for this source to complete and then emits values from `other`. */
|
|
9
|
+
thenMany<R>(other: PublisherInput<R>): Flux<R>;
|
|
10
|
+
/** Ignores all values and emits `value` after successful completion. */
|
|
11
|
+
thenReturn<R>(value: R): Mono<R>;
|
|
12
|
+
/** Zips this Flux with another publisher and combines paired values. */
|
|
13
|
+
zipWith<U, R = readonly [T, U]>(other: PublisherInput<U>, combinator?: (left: T, right: U) => R): Flux<R>;
|
|
14
|
+
}
|
|
15
|
+
}
|
|
16
|
+
//# sourceMappingURL=terminal.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"terminal.d.ts","sourceRoot":"","sources":["../../../src/publisher/operators/terminal.ts"],"names":[],"mappings":"AAKA,OAAO,EAAC,IAAI,EAAC,MAAM,qBAAqB,CAAC;AAEzC,OAAO,KAAK,EAAC,cAAc,EAAC,MAAM,sBAAsB,CAAC;AAEzD,OAAO,QAAQ,qBAAqB,CAAC;IACjC,6DAA6D;IAC7D,UAAU,IAAI,CAAC,CAAC;QACZ,+EAA+E;QAC/E,IAAI,IAAI,IAAI,CAAC,IAAI,CAAC,CAAC;QAEnB,4EAA4E;QAC5E,QAAQ,CAAC,CAAC,EAAE,KAAK,EAAE,cAAc,CAAC,CAAC,CAAC,GAAG,IAAI,CAAC,CAAC,CAAC,CAAC;QAE/C,wEAAwE;QACxE,UAAU,CAAC,CAAC,EAAE,KAAK,EAAE,CAAC,GAAG,IAAI,CAAC,CAAC,CAAC,CAAC;QAEjC,wEAAwE;QACxE,OAAO,CAAC,CAAC,EAAE,CAAC,GAAG,SAAS,CAAC,CAAC,EAAE,CAAC,CAAC,EAAE,KAAK,EAAE,cAAc,CAAC,CAAC,CAAC,EAAE,UAAU,CAAC,EAAE,CAAC,IAAI,EAAE,CAAC,EAAE,KAAK,EAAE,CAAC,KAAK,CAAC,GAAG,IAAI,CAAC,CAAC,CAAC,CAAC;KAC7G;CACJ"}
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
import { isAsyncIterable } from "../../internal/iterable.js";
|
|
2
|
+
import { Flux } from "../flux.js";
|
|
3
|
+
import { Mono } from "../mono.js";
|
|
4
|
+
//#region src/publisher/operators/terminal.ts
|
|
5
|
+
/**
|
|
6
|
+
* @packageDocumentation
|
|
7
|
+
* Flux, Mono and operator implementation modules.
|
|
8
|
+
*/
|
|
9
|
+
Flux.prototype.then = function then() {
|
|
10
|
+
const source = this;
|
|
11
|
+
return new Mono((signal, context) => {
|
|
12
|
+
const values = source.iterate(signal, context);
|
|
13
|
+
return isAsyncIterable(values) ? drainThenEmitAsync(values, void 0) : drainThenEmitSync(values, void 0);
|
|
14
|
+
});
|
|
15
|
+
};
|
|
16
|
+
Flux.prototype.thenMany = function thenMany(other) {
|
|
17
|
+
const source = this;
|
|
18
|
+
return new Flux(async function* (signal, context) {
|
|
19
|
+
for await (const _ of source.iterate(signal, context));
|
|
20
|
+
for await (const value of Flux.from(other).iterate(signal, context)) yield value;
|
|
21
|
+
});
|
|
22
|
+
};
|
|
23
|
+
Flux.prototype.thenReturn = function thenReturn(value) {
|
|
24
|
+
const source = this;
|
|
25
|
+
return new Mono((signal, context) => {
|
|
26
|
+
const values = source.iterate(signal, context);
|
|
27
|
+
return isAsyncIterable(values) ? drainThenEmitAsync(values, value) : drainThenEmitSync(values, value);
|
|
28
|
+
});
|
|
29
|
+
};
|
|
30
|
+
/** Drains a synchronous source and then emits one completion value. */
|
|
31
|
+
function drainThenEmitSync(values, value) {
|
|
32
|
+
return (function* () {
|
|
33
|
+
for (const _ of values);
|
|
34
|
+
yield value;
|
|
35
|
+
})();
|
|
36
|
+
}
|
|
37
|
+
/** Drains an asynchronous source and then emits one completion value. */
|
|
38
|
+
async function* drainThenEmitAsync(values, value) {
|
|
39
|
+
for await (const _ of values);
|
|
40
|
+
yield value;
|
|
41
|
+
}
|
|
42
|
+
Flux.prototype.zipWith = function zipWith(other, combinator) {
|
|
43
|
+
return Flux.zip([this, other], (values) => combinator ? combinator(values[0], values[1]) : [values[0], values[1]]);
|
|
44
|
+
};
|
|
45
|
+
//#endregion
|
|
46
|
+
|
|
47
|
+
//# sourceMappingURL=terminal.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"terminal.js","names":[],"sources":["../../../src/publisher/operators/terminal.ts"],"sourcesContent":["/**\n * @packageDocumentation\n * Flux, Mono and operator implementation modules.\n */\nimport {Flux} from \"@/publisher/flux.js\";\nimport {Mono} from \"@/publisher/mono.js\";\nimport {isAsyncIterable} from \"@/internal/iterable.js\";\nimport type {PublisherInput} from \"@/publisher/types.js\";\n\ndeclare module \"@/publisher/flux.js\" {\n /** Terminal continuation and zip operators added to Flux. */\n interface Flux<T> {\n /** Ignores all values and completes when the source completes successfully. */\n then(): Mono<void>;\n\n /** Waits for this source to complete and then emits values from `other`. */\n thenMany<R>(other: PublisherInput<R>): Flux<R>;\n\n /** Ignores all values and emits `value` after successful completion. */\n thenReturn<R>(value: R): Mono<R>;\n\n /** Zips this Flux with another publisher and combines paired values. */\n zipWith<U, R = readonly [T, U]>(other: PublisherInput<U>, combinator?: (left: T, right: U) => R): Flux<R>;\n }\n}\n\nFlux.prototype.then = function then<T>(this: Flux<T>): Mono<void> {\n const source = this;\n return new Mono((signal, context) => {\n const values = source.iterate(signal, context);\n return isAsyncIterable<T>(values) ? drainThenEmitAsync(values, undefined) : drainThenEmitSync(values, undefined);\n });\n};\n\nFlux.prototype.thenMany = function thenMany<T, R>(this: Flux<T>, other: PublisherInput<R>): Flux<R> {\n const source = this;\n return new Flux(async function* (signal, context) {\n for await (const _ of source.iterate(signal, context)) {\n // ignore values\n }\n for await (const value of Flux.from(other).iterate(signal, context)) {\n yield value;\n }\n });\n};\n\nFlux.prototype.thenReturn = function thenReturn<T, R>(this: Flux<T>, value: R): Mono<R> {\n const source = this;\n return new Mono((signal, context) => {\n const values = source.iterate(signal, context);\n return isAsyncIterable<T>(values) ? drainThenEmitAsync(values, value) : drainThenEmitSync(values, value);\n });\n};\n\n/** Drains a synchronous source and then emits one completion value. */\nfunction drainThenEmitSync<T, R>(values: Iterable<T>, value: R): Iterable<R> {\n return (function* () {\n for (const _ of values) {\n // ignore values\n }\n yield value;\n })();\n}\n\n/** Drains an asynchronous source and then emits one completion value. */\nasync function* drainThenEmitAsync<T, R>(values: AsyncIterable<T>, value: R): AsyncIterable<R> {\n for await (const _ of values) {\n // ignore values\n }\n yield value;\n}\n\nFlux.prototype.zipWith = function zipWith<T, U, R = readonly [T, U]>(\n this: Flux<T>,\n other: PublisherInput<U>,\n combinator?: (left: T, right: U) => R\n): Flux<R> {\n return Flux.zip<[T, U], R>([this, other], values =>\n combinator ? combinator(values[0], values[1]) : ([values[0], values[1]] as const as R)\n );\n};\n"],"mappings":";;;;;;;;AA0BA,KAAK,UAAU,OAAO,SAAS,OAAmC;CAC9D,MAAM,SAAS;CACf,OAAO,IAAI,MAAM,QAAQ,YAAY;EACjC,MAAM,SAAS,OAAO,QAAQ,QAAQ,OAAO;EAC7C,OAAO,gBAAmB,MAAM,IAAI,mBAAmB,QAAQ,MAAS,IAAI,kBAAkB,QAAQ,MAAS;CACnH,CAAC;AACL;AAEA,KAAK,UAAU,WAAW,SAAS,SAA8B,OAAmC;CAChG,MAAM,SAAS;CACf,OAAO,IAAI,KAAK,iBAAiB,QAAQ,SAAS;EAC9C,WAAW,MAAM,KAAK,OAAO,QAAQ,QAAQ,OAAO;EAGpD,WAAW,MAAM,SAAS,KAAK,KAAK,KAAK,CAAC,CAAC,QAAQ,QAAQ,OAAO,GAC9D,MAAM;CAEd,CAAC;AACL;AAEA,KAAK,UAAU,aAAa,SAAS,WAAgC,OAAmB;CACpF,MAAM,SAAS;CACf,OAAO,IAAI,MAAM,QAAQ,YAAY;EACjC,MAAM,SAAS,OAAO,QAAQ,QAAQ,OAAO;EAC7C,OAAO,gBAAmB,MAAM,IAAI,mBAAmB,QAAQ,KAAK,IAAI,kBAAkB,QAAQ,KAAK;CAC3G,CAAC;AACL;;AAGA,SAAS,kBAAwB,QAAqB,OAAuB;CACzE,QAAQ,aAAa;EACjB,KAAK,MAAM,KAAK;EAGhB,MAAM;CACV,EAAA,CAAG;AACP;;AAGA,gBAAgB,mBAAyB,QAA0B,OAA4B;CAC3F,WAAW,MAAM,KAAK;CAGtB,MAAM;AACV;AAEA,KAAK,UAAU,UAAU,SAAS,QAE9B,OACA,YACO;CACP,OAAO,KAAK,IAAe,CAAC,MAAM,KAAK,IAAG,WACtC,aAAa,WAAW,OAAO,IAAI,OAAO,EAAE,IAAK,CAAC,OAAO,IAAI,OAAO,EAAE,CAC1E;AACJ"}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import type { PublisherInput } from "../types.js";
|
|
2
|
+
import type { DurationInput, Scheduler } from "../../schedulers/types.js";
|
|
3
|
+
declare module "../flux.js" {
|
|
4
|
+
/** Time, scheduling and timeout operators added to Flux. */
|
|
5
|
+
interface Flux<T> {
|
|
6
|
+
/** Delays each source value on the provided scheduler before emitting it. */
|
|
7
|
+
delayElements(delay: DurationInput, scheduler?: Scheduler): Flux<T>;
|
|
8
|
+
/** Fails or switches to a fallback when the source does not signal in time. */
|
|
9
|
+
timeout(timeout: DurationInput, fallback?: PublisherInput<T>, scheduler?: Scheduler): Flux<T>;
|
|
10
|
+
/** Reschedules value delivery on the provided scheduler. */
|
|
11
|
+
publishOn(scheduler: Scheduler): Flux<T>;
|
|
12
|
+
/** Schedules subscription work on the provided scheduler. */
|
|
13
|
+
subscribeOn(scheduler: Scheduler): Flux<T>;
|
|
14
|
+
/** Emits each value together with the scheduler timestamp. */
|
|
15
|
+
timestamp(scheduler?: Scheduler): Flux<readonly [number, T]>;
|
|
16
|
+
/** Emits each value together with elapsed scheduler time since the previous value. */
|
|
17
|
+
elapsed(scheduler?: Scheduler): Flux<readonly [number, T]>;
|
|
18
|
+
}
|
|
19
|
+
}
|
|
20
|
+
//# sourceMappingURL=time.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"time.d.ts","sourceRoot":"","sources":["../../../src/publisher/operators/time.ts"],"names":[],"mappings":"AASA,OAAO,KAAK,EAAC,cAAc,EAAC,MAAM,sBAAsB,CAAC;AAEzD,OAAO,KAAK,EAAC,aAAa,EAAE,SAAS,EAAC,MAAM,uBAAuB,CAAC;AAEpE,OAAO,QAAQ,qBAAqB,CAAC;IACjC,4DAA4D;IAC5D,UAAU,IAAI,CAAC,CAAC;QACZ,6EAA6E;QAC7E,aAAa,CAAC,KAAK,EAAE,aAAa,EAAE,SAAS,CAAC,EAAE,SAAS,GAAG,IAAI,CAAC,CAAC,CAAC,CAAC;QAEpE,+EAA+E;QAC/E,OAAO,CAAC,OAAO,EAAE,aAAa,EAAE,QAAQ,CAAC,EAAE,cAAc,CAAC,CAAC,CAAC,EAAE,SAAS,CAAC,EAAE,SAAS,GAAG,IAAI,CAAC,CAAC,CAAC,CAAC;QAE9F,4DAA4D;QAC5D,SAAS,CAAC,SAAS,EAAE,SAAS,GAAG,IAAI,CAAC,CAAC,CAAC,CAAC;QAEzC,6DAA6D;QAC7D,WAAW,CAAC,SAAS,EAAE,SAAS,GAAG,IAAI,CAAC,CAAC,CAAC,CAAC;QAE3C,8DAA8D;QAC9D,SAAS,CAAC,SAAS,CAAC,EAAE,SAAS,GAAG,IAAI,CAAC,SAAS,CAAC,MAAM,EAAE,CAAC,CAAC,CAAC,CAAC;QAE7D,sFAAsF;QACtF,OAAO,CAAC,SAAS,CAAC,EAAE,SAAS,GAAG,IAAI,CAAC,SAAS,CAAC,MAAM,EAAE,CAAC,CAAC,CAAC,CAAC;KAC9D;CACJ"}
|
|
@@ -0,0 +1,92 @@
|
|
|
1
|
+
import { toAsyncIterator } from "../../internal/iterable.js";
|
|
2
|
+
import { TimeoutError } from "../../errors/classes.js";
|
|
3
|
+
import { AsyncQueue } from "../../internal/async-queue.js";
|
|
4
|
+
import { Schedulers } from "../../schedulers/schedulers.js";
|
|
5
|
+
import { TIMEOUT, raceIteratorWithTimeout, scheduleDelay } from "../helpers.js";
|
|
6
|
+
import { Flux } from "../flux.js";
|
|
7
|
+
//#region src/publisher/operators/time.ts
|
|
8
|
+
/**
|
|
9
|
+
* @packageDocumentation
|
|
10
|
+
* Flux, Mono and operator implementation modules.
|
|
11
|
+
*/
|
|
12
|
+
Flux.prototype.delayElements = function delayElements(delay, scheduler = Schedulers.timeout()) {
|
|
13
|
+
const source = this;
|
|
14
|
+
return new Flux(async function* (signal, context) {
|
|
15
|
+
for await (const value of source.iterate(signal, context)) {
|
|
16
|
+
await scheduleDelay(scheduler, delay, signal);
|
|
17
|
+
yield value;
|
|
18
|
+
}
|
|
19
|
+
});
|
|
20
|
+
};
|
|
21
|
+
Flux.prototype.timeout = function timeout(timeout, fallback, scheduler = Schedulers.timeout()) {
|
|
22
|
+
const source = this;
|
|
23
|
+
return new Flux(async function* (signal, context) {
|
|
24
|
+
const controller = new AbortController();
|
|
25
|
+
const abort = () => controller.abort();
|
|
26
|
+
signal.addEventListener("abort", abort, { once: true });
|
|
27
|
+
const iterator = toAsyncIterator(source.iterate(controller.signal, context));
|
|
28
|
+
try {
|
|
29
|
+
while (!signal.aborted) {
|
|
30
|
+
const result = await raceIteratorWithTimeout(iterator, timeout, scheduler, signal);
|
|
31
|
+
if (result === TIMEOUT) {
|
|
32
|
+
controller.abort();
|
|
33
|
+
if (fallback) {
|
|
34
|
+
for await (const value of Flux.from(fallback).iterate(signal, context)) yield value;
|
|
35
|
+
return;
|
|
36
|
+
}
|
|
37
|
+
throw new TimeoutError();
|
|
38
|
+
}
|
|
39
|
+
if (result.done) return;
|
|
40
|
+
yield result.value;
|
|
41
|
+
}
|
|
42
|
+
} finally {
|
|
43
|
+
signal.removeEventListener("abort", abort);
|
|
44
|
+
controller.abort();
|
|
45
|
+
iterator.return?.();
|
|
46
|
+
}
|
|
47
|
+
});
|
|
48
|
+
};
|
|
49
|
+
Flux.prototype.publishOn = function publishOn(scheduler) {
|
|
50
|
+
const source = this;
|
|
51
|
+
return new Flux(async function* (signal, context) {
|
|
52
|
+
for await (const value of source.iterate(signal, context)) {
|
|
53
|
+
await scheduleDelay(scheduler, 0, signal);
|
|
54
|
+
yield value;
|
|
55
|
+
}
|
|
56
|
+
});
|
|
57
|
+
};
|
|
58
|
+
Flux.prototype.subscribeOn = function subscribeOn(scheduler) {
|
|
59
|
+
const source = this;
|
|
60
|
+
return new Flux((signal, context) => {
|
|
61
|
+
const queue = new AsyncQueue(signal);
|
|
62
|
+
const disposable = scheduler.schedule(() => {
|
|
63
|
+
(async () => {
|
|
64
|
+
try {
|
|
65
|
+
for await (const value of source.iterate(signal, context)) queue.push(value);
|
|
66
|
+
queue.complete();
|
|
67
|
+
} catch (error) {
|
|
68
|
+
queue.error(error);
|
|
69
|
+
}
|
|
70
|
+
})();
|
|
71
|
+
});
|
|
72
|
+
signal.addEventListener("abort", () => disposable.dispose(), { once: true });
|
|
73
|
+
return queue;
|
|
74
|
+
});
|
|
75
|
+
};
|
|
76
|
+
Flux.prototype.timestamp = function timestamp(scheduler = Schedulers.timeout()) {
|
|
77
|
+
return this.map((value) => [scheduler.now(), value]);
|
|
78
|
+
};
|
|
79
|
+
Flux.prototype.elapsed = function elapsed(scheduler = Schedulers.timeout()) {
|
|
80
|
+
const source = this;
|
|
81
|
+
return new Flux(async function* (signal, context) {
|
|
82
|
+
let last = scheduler.now();
|
|
83
|
+
for await (const value of source.iterate(signal, context)) {
|
|
84
|
+
const now = scheduler.now();
|
|
85
|
+
yield [now - last, value];
|
|
86
|
+
last = now;
|
|
87
|
+
}
|
|
88
|
+
});
|
|
89
|
+
};
|
|
90
|
+
//#endregion
|
|
91
|
+
|
|
92
|
+
//# sourceMappingURL=time.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"time.js","names":[],"sources":["../../../src/publisher/operators/time.ts"],"sourcesContent":["/**\n * @packageDocumentation\n * Flux, Mono and operator implementation modules.\n */\nimport {TimeoutError} from \"@/errors/classes.js\";\nimport {AsyncQueue} from \"@/internal/async-queue.js\";\nimport {toAsyncIterator} from \"@/internal/iterable.js\";\nimport {Flux} from \"@/publisher/flux.js\";\nimport {raceIteratorWithTimeout, scheduleDelay, TIMEOUT} from \"@/publisher/helpers.js\";\nimport type {PublisherInput} from \"@/publisher/types.js\";\nimport {Schedulers} from \"@/schedulers/schedulers.js\";\nimport type {DurationInput, Scheduler} from \"@/schedulers/types.js\";\n\ndeclare module \"@/publisher/flux.js\" {\n /** Time, scheduling and timeout operators added to Flux. */\n interface Flux<T> {\n /** Delays each source value on the provided scheduler before emitting it. */\n delayElements(delay: DurationInput, scheduler?: Scheduler): Flux<T>;\n\n /** Fails or switches to a fallback when the source does not signal in time. */\n timeout(timeout: DurationInput, fallback?: PublisherInput<T>, scheduler?: Scheduler): Flux<T>;\n\n /** Reschedules value delivery on the provided scheduler. */\n publishOn(scheduler: Scheduler): Flux<T>;\n\n /** Schedules subscription work on the provided scheduler. */\n subscribeOn(scheduler: Scheduler): Flux<T>;\n\n /** Emits each value together with the scheduler timestamp. */\n timestamp(scheduler?: Scheduler): Flux<readonly [number, T]>;\n\n /** Emits each value together with elapsed scheduler time since the previous value. */\n elapsed(scheduler?: Scheduler): Flux<readonly [number, T]>;\n }\n}\n\nFlux.prototype.delayElements = function delayElements<T>(\n this: Flux<T>,\n delay: DurationInput,\n scheduler: Scheduler = Schedulers.timeout()\n): Flux<T> {\n const source = this;\n return new Flux(async function* (signal, context) {\n for await (const value of source.iterate(signal, context)) {\n await scheduleDelay(scheduler, delay, signal);\n yield value;\n }\n });\n};\n\nFlux.prototype.timeout = function timeout<T>(\n this: Flux<T>,\n timeout: DurationInput,\n fallback?: PublisherInput<T>,\n scheduler: Scheduler = Schedulers.timeout()\n): Flux<T> {\n const source = this;\n return new Flux(async function* (signal, context) {\n const controller = new AbortController();\n const abort = () => controller.abort();\n signal.addEventListener(\"abort\", abort, {once: true});\n const iterator = toAsyncIterator(source.iterate(controller.signal, context));\n try {\n while (!signal.aborted) {\n const result = await raceIteratorWithTimeout(iterator, timeout, scheduler, signal);\n if (result === TIMEOUT) {\n controller.abort();\n if (fallback) {\n for await (const value of Flux.from(fallback).iterate(signal, context)) {\n yield value;\n }\n return;\n }\n throw new TimeoutError();\n }\n if (result.done) {\n return;\n }\n yield result.value;\n }\n } finally {\n signal.removeEventListener(\"abort\", abort);\n controller.abort();\n void iterator.return?.();\n }\n });\n};\n\nFlux.prototype.publishOn = function publishOn<T>(this: Flux<T>, scheduler: Scheduler): Flux<T> {\n const source = this;\n return new Flux(async function* (signal, context) {\n for await (const value of source.iterate(signal, context)) {\n await scheduleDelay(scheduler, 0, signal);\n yield value;\n }\n });\n};\n\nFlux.prototype.subscribeOn = function subscribeOn<T>(this: Flux<T>, scheduler: Scheduler): Flux<T> {\n const source = this;\n return new Flux((signal, context) => {\n const queue = new AsyncQueue<T>(signal);\n const disposable = scheduler.schedule(() => {\n void (async () => {\n try {\n for await (const value of source.iterate(signal, context)) {\n queue.push(value);\n }\n queue.complete();\n } catch (error) {\n queue.error(error);\n }\n })();\n });\n signal.addEventListener(\"abort\", () => disposable.dispose(), {once: true});\n return queue;\n });\n};\n\nFlux.prototype.timestamp = function timestamp<T>(\n this: Flux<T>,\n scheduler: Scheduler = Schedulers.timeout()\n): Flux<readonly [number, T]> {\n return this.map(value => [scheduler.now(), value] as const);\n};\n\nFlux.prototype.elapsed = function elapsed<T>(\n this: Flux<T>,\n scheduler: Scheduler = Schedulers.timeout()\n): Flux<readonly [number, T]> {\n const source = this;\n return new Flux(async function* (signal, context) {\n let last = scheduler.now();\n for await (const value of source.iterate(signal, context)) {\n const now = scheduler.now();\n yield [now - last, value] as const;\n last = now;\n }\n });\n};\n"],"mappings":";;;;;;;;;;;AAoCA,KAAK,UAAU,gBAAgB,SAAS,cAEpC,OACA,YAAuB,WAAW,QAAQ,GACnC;CACP,MAAM,SAAS;CACf,OAAO,IAAI,KAAK,iBAAiB,QAAQ,SAAS;EAC9C,WAAW,MAAM,SAAS,OAAO,QAAQ,QAAQ,OAAO,GAAG;GACvD,MAAM,cAAc,WAAW,OAAO,MAAM;GAC5C,MAAM;EACV;CACJ,CAAC;AACL;AAEA,KAAK,UAAU,UAAU,SAAS,QAE9B,SACA,UACA,YAAuB,WAAW,QAAQ,GACnC;CACP,MAAM,SAAS;CACf,OAAO,IAAI,KAAK,iBAAiB,QAAQ,SAAS;EAC9C,MAAM,aAAa,IAAI,gBAAgB;EACvC,MAAM,cAAc,WAAW,MAAM;EACrC,OAAO,iBAAiB,SAAS,OAAO,EAAC,MAAM,KAAI,CAAC;EACpD,MAAM,WAAW,gBAAgB,OAAO,QAAQ,WAAW,QAAQ,OAAO,CAAC;EAC3E,IAAI;GACA,OAAO,CAAC,OAAO,SAAS;IACpB,MAAM,SAAS,MAAM,wBAAwB,UAAU,SAAS,WAAW,MAAM;IACjF,IAAI,WAAW,SAAS;KACpB,WAAW,MAAM;KACjB,IAAI,UAAU;MACV,WAAW,MAAM,SAAS,KAAK,KAAK,QAAQ,CAAC,CAAC,QAAQ,QAAQ,OAAO,GACjE,MAAM;MAEV;KACJ;KACA,MAAM,IAAI,aAAa;IAC3B;IACA,IAAI,OAAO,MACP;IAEJ,MAAM,OAAO;GACjB;EACJ,UAAU;GACN,OAAO,oBAAoB,SAAS,KAAK;GACzC,WAAW,MAAM;GACjB,AAAK,SAAS,SAAS;EAC3B;CACJ,CAAC;AACL;AAEA,KAAK,UAAU,YAAY,SAAS,UAA4B,WAA+B;CAC3F,MAAM,SAAS;CACf,OAAO,IAAI,KAAK,iBAAiB,QAAQ,SAAS;EAC9C,WAAW,MAAM,SAAS,OAAO,QAAQ,QAAQ,OAAO,GAAG;GACvD,MAAM,cAAc,WAAW,GAAG,MAAM;GACxC,MAAM;EACV;CACJ,CAAC;AACL;AAEA,KAAK,UAAU,cAAc,SAAS,YAA8B,WAA+B;CAC/F,MAAM,SAAS;CACf,OAAO,IAAI,MAAM,QAAQ,YAAY;EACjC,MAAM,QAAQ,IAAI,WAAc,MAAM;EACtC,MAAM,aAAa,UAAU,eAAe;GACxC,CAAM,YAAY;IACd,IAAI;KACA,WAAW,MAAM,SAAS,OAAO,QAAQ,QAAQ,OAAO,GACpD,MAAM,KAAK,KAAK;KAEpB,MAAM,SAAS;IACnB,SAAS,OAAO;KACZ,MAAM,MAAM,KAAK;IACrB;GACJ,EAAA,CAAG;EACP,CAAC;EACD,OAAO,iBAAiB,eAAe,WAAW,QAAQ,GAAG,EAAC,MAAM,KAAI,CAAC;EACzE,OAAO;CACX,CAAC;AACL;AAEA,KAAK,UAAU,YAAY,SAAS,UAEhC,YAAuB,WAAW,QAAQ,GAChB;CAC1B,OAAO,KAAK,KAAI,UAAS,CAAC,UAAU,IAAI,GAAG,KAAK,CAAU;AAC9D;AAEA,KAAK,UAAU,UAAU,SAAS,QAE9B,YAAuB,WAAW,QAAQ,GAChB;CAC1B,MAAM,SAAS;CACf,OAAO,IAAI,KAAK,iBAAiB,QAAQ,SAAS;EAC9C,IAAI,OAAO,UAAU,IAAI;EACzB,WAAW,MAAM,SAAS,OAAO,QAAQ,QAAQ,OAAO,GAAG;GACvD,MAAM,MAAM,UAAU,IAAI;GAC1B,MAAM,CAAC,MAAM,MAAM,KAAK;GACxB,OAAO;EACX;CACJ,CAAC;AACL"}
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @packageDocumentation
|
|
3
|
+
* Flux, Mono and operator implementation modules.
|
|
4
|
+
*/
|
|
5
|
+
import type { ContextView } from "../../context/context-view.js";
|
|
6
|
+
import type { Mapper, PublisherInput, SynchronousSink } from "../types.js";
|
|
7
|
+
import { Signal } from "../../signal/signal.js";
|
|
8
|
+
declare module "../flux.js" {
|
|
9
|
+
/** Transforming and materialization operators added to Flux. */
|
|
10
|
+
interface Flux<T> {
|
|
11
|
+
/** Maps each source value with the provided function. */
|
|
12
|
+
map<R>(mapper: Mapper<T, R>): Flux<R>;
|
|
13
|
+
/** Treats this Flux as a Flux of another TypeScript type. */
|
|
14
|
+
cast<R>(): Flux<R>;
|
|
15
|
+
/** Keeps only source values accepted by the predicate. */
|
|
16
|
+
filter(predicate: (value: T) => boolean): Flux<T>;
|
|
17
|
+
/** Handles each value with a synchronous sink that may emit, complete, or fail. */
|
|
18
|
+
handle<R>(handler: (value: T, sink: SynchronousSink<R>) => void): Flux<R>;
|
|
19
|
+
/** Converts values and terminal events into `Signal` values. */
|
|
20
|
+
materialize(): Flux<Signal<T>>;
|
|
21
|
+
/** Converts `Signal` values back into normal values and terminal events. */
|
|
22
|
+
dematerialize<R>(this: Flux<Signal<R>>): Flux<R>;
|
|
23
|
+
/** Applies a transformer to this Flux immediately and adapts its result. */
|
|
24
|
+
transform<R>(transformer: (source: Flux<T>) => PublisherInput<R>): Flux<R>;
|
|
25
|
+
/** Applies a transformer separately for each subscription. */
|
|
26
|
+
transformDeferred<R>(transformer: (source: Flux<T>) => PublisherInput<R>): Flux<R>;
|
|
27
|
+
/** Applies a transformer per subscription with access to the subscriber context. */
|
|
28
|
+
transformDeferredContextual<R>(transformer: (source: Flux<T>, context: ContextView) => PublisherInput<R>): Flux<R>;
|
|
29
|
+
}
|
|
30
|
+
}
|
|
31
|
+
//# sourceMappingURL=transform.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"transform.d.ts","sourceRoot":"","sources":["../../../src/publisher/operators/transform.ts"],"names":[],"mappings":"AAAA;;;GAGG;AACH,OAAO,KAAK,EAAC,WAAW,EAAC,MAAM,2BAA2B,CAAC;AAG3D,OAAO,KAAK,EAAC,MAAM,EAAE,cAAc,EAAE,eAAe,EAAC,MAAM,sBAAsB,CAAC;AAClF,OAAO,EAAC,MAAM,EAAC,MAAM,oBAAoB,CAAC;AAE1C,OAAO,QAAQ,qBAAqB,CAAC;IACjC,gEAAgE;IAChE,UAAU,IAAI,CAAC,CAAC;QACZ,yDAAyD;QACzD,GAAG,CAAC,CAAC,EAAE,MAAM,EAAE,MAAM,CAAC,CAAC,EAAE,CAAC,CAAC,GAAG,IAAI,CAAC,CAAC,CAAC,CAAC;QAEtC,6DAA6D;QAC7D,IAAI,CAAC,CAAC,KAAK,IAAI,CAAC,CAAC,CAAC,CAAC;QAEnB,0DAA0D;QAC1D,MAAM,CAAC,SAAS,EAAE,CAAC,KAAK,EAAE,CAAC,KAAK,OAAO,GAAG,IAAI,CAAC,CAAC,CAAC,CAAC;QAElD,mFAAmF;QACnF,MAAM,CAAC,CAAC,EAAE,OAAO,EAAE,CAAC,KAAK,EAAE,CAAC,EAAE,IAAI,EAAE,eAAe,CAAC,CAAC,CAAC,KAAK,IAAI,GAAG,IAAI,CAAC,CAAC,CAAC,CAAC;QAE1E,gEAAgE;QAChE,WAAW,IAAI,IAAI,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC,CAAC;QAE/B,4EAA4E;QAC5E,aAAa,CAAC,CAAC,EAAE,IAAI,EAAE,IAAI,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC,GAAG,IAAI,CAAC,CAAC,CAAC,CAAC;QAEjD,4EAA4E;QAC5E,SAAS,CAAC,CAAC,EAAE,WAAW,EAAE,CAAC,MAAM,EAAE,IAAI,CAAC,CAAC,CAAC,KAAK,cAAc,CAAC,CAAC,CAAC,GAAG,IAAI,CAAC,CAAC,CAAC,CAAC;QAE3E,8DAA8D;QAC9D,iBAAiB,CAAC,CAAC,EAAE,WAAW,EAAE,CAAC,MAAM,EAAE,IAAI,CAAC,CAAC,CAAC,KAAK,cAAc,CAAC,CAAC,CAAC,GAAG,IAAI,CAAC,CAAC,CAAC,CAAC;QAEnF,oFAAoF;QACpF,2BAA2B,CAAC,CAAC,EAAE,WAAW,EAAE,CAAC,MAAM,EAAE,IAAI,CAAC,CAAC,CAAC,EAAE,OAAO,EAAE,WAAW,KAAK,cAAc,CAAC,CAAC,CAAC,GAAG,IAAI,CAAC,CAAC,CAAC,CAAC;KACtH;CACJ"}
|