diff --git a/docs/development/core/server/kibana-plugin-core-server.savedobjectscorefieldmapping.fields.md b/docs/development/core/server/kibana-plugin-core-server.savedobjectscorefieldmapping.fields.md
index db774a055e528..4f88b635ca2f7 100644
--- a/docs/development/core/server/kibana-plugin-core-server.savedobjectscorefieldmapping.fields.md
+++ b/docs/development/core/server/kibana-plugin-core-server.savedobjectscorefieldmapping.fields.md
@@ -10,6 +10,7 @@
fields?: {
[subfield: string]: {
type: string;
+ ignore_above?: number;
};
};
```
diff --git a/docs/development/core/server/kibana-plugin-core-server.savedobjectscorefieldmapping.md b/docs/development/core/server/kibana-plugin-core-server.savedobjectscorefieldmapping.md
index dbc7d0ca431ce..9a31d37b3ff30 100644
--- a/docs/development/core/server/kibana-plugin-core-server.savedobjectscorefieldmapping.md
+++ b/docs/development/core/server/kibana-plugin-core-server.savedobjectscorefieldmapping.md
@@ -17,7 +17,7 @@ export interface SavedObjectsCoreFieldMapping
| Property | Type | Description |
| --- | --- | --- |
| [enabled](./kibana-plugin-core-server.savedobjectscorefieldmapping.enabled.md) | boolean
| |
-| [fields](./kibana-plugin-core-server.savedobjectscorefieldmapping.fields.md) | {
[subfield: string]: {
type: string;
};
}
| |
+| [fields](./kibana-plugin-core-server.savedobjectscorefieldmapping.fields.md) | {
[subfield: string]: {
type: string;
ignore_above?: number;
};
}
| |
| [index](./kibana-plugin-core-server.savedobjectscorefieldmapping.index.md) | boolean
| |
| [null\_value](./kibana-plugin-core-server.savedobjectscorefieldmapping.null_value.md) | number | boolean | string
| |
| [type](./kibana-plugin-core-server.savedobjectscorefieldmapping.type.md) | string
| |
diff --git a/docs/development/core/server/kibana-plugin-core-server.savedobjectsmigrationlogger.error.md b/docs/development/core/server/kibana-plugin-core-server.savedobjectsmigrationlogger.error.md
new file mode 100644
index 0000000000000..7536cd2b07ae6
--- /dev/null
+++ b/docs/development/core/server/kibana-plugin-core-server.savedobjectsmigrationlogger.error.md
@@ -0,0 +1,11 @@
+
+
+[Home](./index.md) > [kibana-plugin-core-server](./kibana-plugin-core-server.md) > [SavedObjectsMigrationLogger](./kibana-plugin-core-server.savedobjectsmigrationlogger.md) > [error](./kibana-plugin-core-server.savedobjectsmigrationlogger.error.md)
+
+## SavedObjectsMigrationLogger.error property
+
+Signature:
+
+```typescript
+error: (msg: string, meta: LogMeta) => void;
+```
diff --git a/docs/development/core/server/kibana-plugin-core-server.savedobjectsmigrationlogger.md b/docs/development/core/server/kibana-plugin-core-server.savedobjectsmigrationlogger.md
index 066643516b213..1b691ee8cb16d 100644
--- a/docs/development/core/server/kibana-plugin-core-server.savedobjectsmigrationlogger.md
+++ b/docs/development/core/server/kibana-plugin-core-server.savedobjectsmigrationlogger.md
@@ -16,6 +16,7 @@ export interface SavedObjectsMigrationLogger
| Property | Type | Description |
| --- | --- | --- |
| [debug](./kibana-plugin-core-server.savedobjectsmigrationlogger.debug.md) | (msg: string) => void
| |
+| [error](./kibana-plugin-core-server.savedobjectsmigrationlogger.error.md) | (msg: string, meta: LogMeta) => void
| |
| [info](./kibana-plugin-core-server.savedobjectsmigrationlogger.info.md) | (msg: string) => void
| |
| [warn](./kibana-plugin-core-server.savedobjectsmigrationlogger.warn.md) | (msg: string) => void
| |
| [warning](./kibana-plugin-core-server.savedobjectsmigrationlogger.warning.md) | (msg: string) => void
| |
diff --git a/docs/development/plugins/data/server/kibana-plugin-plugins-data-server.iindexpattern.gettimefield.md b/docs/development/plugins/data/server/kibana-plugin-plugins-data-server.iindexpattern.gettimefield.md
new file mode 100644
index 0000000000000..a4d6abcf86a94
--- /dev/null
+++ b/docs/development/plugins/data/server/kibana-plugin-plugins-data-server.iindexpattern.gettimefield.md
@@ -0,0 +1,15 @@
+
+
+[Home](./index.md) > [kibana-plugin-plugins-data-server](./kibana-plugin-plugins-data-server.md) > [IIndexPattern](./kibana-plugin-plugins-data-server.iindexpattern.md) > [getTimeField](./kibana-plugin-plugins-data-server.iindexpattern.gettimefield.md)
+
+## IIndexPattern.getTimeField() method
+
+Signature:
+
+```typescript
+getTimeField?(): IFieldType | undefined;
+```
+Returns:
+
+`IFieldType | undefined`
+
diff --git a/packages/kbn-dev-utils/src/proc_runner/proc_runner.ts b/packages/kbn-dev-utils/src/proc_runner/proc_runner.ts
index 14c87766213cd..1759ca2840c5b 100644
--- a/packages/kbn-dev-utils/src/proc_runner/proc_runner.ts
+++ b/packages/kbn-dev-utils/src/proc_runner/proc_runner.ts
@@ -18,17 +18,22 @@
*/
import moment from 'moment';
-import { filter, first, catchError } from 'rxjs/operators';
+import * as Rx from 'rxjs';
+import { filter, first, catchError, map } from 'rxjs/operators';
import exitHook from 'exit-hook';
import { ToolingLog } from '../tooling_log';
import { createCliError } from './errors';
import { Proc, ProcOptions, startProc } from './proc';
+const SECOND = 1000;
+const MINUTE = 60 * SECOND;
+
const noop = () => {};
interface RunOptions extends ProcOptions {
wait: true | RegExp;
+ waitTimeout?: number | false;
}
/**
@@ -71,6 +76,7 @@ export class ProcRunner {
cwd = process.cwd(),
stdin = undefined,
wait = false,
+ waitTimeout = 15 * MINUTE,
env = process.env,
} = options;
@@ -97,8 +103,8 @@ export class ProcRunner {
try {
if (wait instanceof RegExp) {
// wait for process to log matching line
- await proc.lines$
- .pipe(
+ await Rx.race(
+ proc.lines$.pipe(
filter(line => wait.test(line)),
first(),
catchError(err => {
@@ -108,8 +114,18 @@ export class ProcRunner {
throw err;
}
})
- )
- .toPromise();
+ ),
+ waitTimeout === false
+ ? Rx.NEVER
+ : Rx.timer(waitTimeout).pipe(
+ map(() => {
+ const sec = waitTimeout / SECOND;
+ throw createCliError(
+ `[${name}] failed to match pattern within ${sec} seconds [pattern=${wait}]`
+ );
+ })
+ )
+ ).toPromise();
}
if (wait === true) {
diff --git a/packages/kbn-pm/dist/index.js b/packages/kbn-pm/dist/index.js
index 1b70cced4a5c9..1b670eb8cd816 100644
--- a/packages/kbn-pm/dist/index.js
+++ b/packages/kbn-pm/dist/index.js
@@ -4838,10 +4838,13 @@ exports.withProcRunner = withProcRunner;
Object.defineProperty(exports, "__esModule", { value: true });
const tslib_1 = __webpack_require__(36);
const moment_1 = tslib_1.__importDefault(__webpack_require__(40));
-const operators_1 = __webpack_require__(169);
-const exit_hook_1 = tslib_1.__importDefault(__webpack_require__(348));
-const errors_1 = __webpack_require__(349);
-const proc_1 = __webpack_require__(350);
+const Rx = tslib_1.__importStar(__webpack_require__(169));
+const operators_1 = __webpack_require__(270);
+const exit_hook_1 = tslib_1.__importDefault(__webpack_require__(368));
+const errors_1 = __webpack_require__(369);
+const proc_1 = __webpack_require__(370);
+const SECOND = 1000;
+const MINUTE = 60 * SECOND;
const noop = () => { };
/**
* Helper for starting and managing processes. In many ways it resembles the
@@ -4875,7 +4878,7 @@ class ProcRunner {
* @return {Promise}
*/
async run(name, options) {
- const { cmd, args = [], cwd = process.cwd(), stdin = undefined, wait = false, env = process.env, } = options;
+ const { cmd, args = [], cwd = process.cwd(), stdin = undefined, wait = false, waitTimeout = 15 * MINUTE, env = process.env, } = options;
if (this.closing) {
throw new Error('ProcRunner is closing');
}
@@ -4895,16 +4898,19 @@ class ProcRunner {
try {
if (wait instanceof RegExp) {
// wait for process to log matching line
- await proc.lines$
- .pipe(operators_1.filter(line => wait.test(line)), operators_1.first(), operators_1.catchError(err => {
+ await Rx.race(proc.lines$.pipe(operators_1.filter(line => wait.test(line)), operators_1.first(), operators_1.catchError(err => {
if (err.name !== 'EmptyError') {
throw errors_1.createCliError(`[${name}] exited without matching pattern: ${wait}`);
}
else {
throw err;
}
- }))
- .toPromise();
+ })), waitTimeout === false
+ ? Rx.NEVER
+ : Rx.timer(waitTimeout).pipe(operators_1.map(() => {
+ const sec = waitTimeout / SECOND;
+ throw errors_1.createCliError(`[${name}] failed to match pattern within ${sec} seconds [pattern=${wait}]`);
+ }))).toPromise();
}
if (wait === true) {
// wait for process to complete
@@ -21959,316 +21965,172 @@ webpackContext.id = 41;
"use strict";
__webpack_require__.r(__webpack_exports__);
-/* harmony import */ var _internal_operators_audit__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(170);
-/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "audit", function() { return _internal_operators_audit__WEBPACK_IMPORTED_MODULE_0__["audit"]; });
-
-/* harmony import */ var _internal_operators_auditTime__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(198);
-/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "auditTime", function() { return _internal_operators_auditTime__WEBPACK_IMPORTED_MODULE_1__["auditTime"]; });
-
-/* harmony import */ var _internal_operators_buffer__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(207);
-/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "buffer", function() { return _internal_operators_buffer__WEBPACK_IMPORTED_MODULE_2__["buffer"]; });
-
-/* harmony import */ var _internal_operators_bufferCount__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(208);
-/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "bufferCount", function() { return _internal_operators_bufferCount__WEBPACK_IMPORTED_MODULE_3__["bufferCount"]; });
-
-/* harmony import */ var _internal_operators_bufferTime__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(209);
-/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "bufferTime", function() { return _internal_operators_bufferTime__WEBPACK_IMPORTED_MODULE_4__["bufferTime"]; });
-
-/* harmony import */ var _internal_operators_bufferToggle__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(210);
-/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "bufferToggle", function() { return _internal_operators_bufferToggle__WEBPACK_IMPORTED_MODULE_5__["bufferToggle"]; });
-
-/* harmony import */ var _internal_operators_bufferWhen__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(211);
-/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "bufferWhen", function() { return _internal_operators_bufferWhen__WEBPACK_IMPORTED_MODULE_6__["bufferWhen"]; });
-
-/* harmony import */ var _internal_operators_catchError__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(212);
-/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "catchError", function() { return _internal_operators_catchError__WEBPACK_IMPORTED_MODULE_7__["catchError"]; });
-
-/* harmony import */ var _internal_operators_combineAll__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(213);
-/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "combineAll", function() { return _internal_operators_combineAll__WEBPACK_IMPORTED_MODULE_8__["combineAll"]; });
-
-/* harmony import */ var _internal_operators_combineLatest__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(217);
-/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "combineLatest", function() { return _internal_operators_combineLatest__WEBPACK_IMPORTED_MODULE_9__["combineLatest"]; });
-
-/* harmony import */ var _internal_operators_concat__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(225);
-/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "concat", function() { return _internal_operators_concat__WEBPACK_IMPORTED_MODULE_10__["concat"]; });
-
-/* harmony import */ var _internal_operators_concatAll__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(228);
-/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "concatAll", function() { return _internal_operators_concatAll__WEBPACK_IMPORTED_MODULE_11__["concatAll"]; });
-
-/* harmony import */ var _internal_operators_concatMap__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(233);
-/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "concatMap", function() { return _internal_operators_concatMap__WEBPACK_IMPORTED_MODULE_12__["concatMap"]; });
-
-/* harmony import */ var _internal_operators_concatMapTo__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(234);
-/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "concatMapTo", function() { return _internal_operators_concatMapTo__WEBPACK_IMPORTED_MODULE_13__["concatMapTo"]; });
-
-/* harmony import */ var _internal_operators_count__WEBPACK_IMPORTED_MODULE_14__ = __webpack_require__(235);
-/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "count", function() { return _internal_operators_count__WEBPACK_IMPORTED_MODULE_14__["count"]; });
-
-/* harmony import */ var _internal_operators_debounce__WEBPACK_IMPORTED_MODULE_15__ = __webpack_require__(236);
-/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "debounce", function() { return _internal_operators_debounce__WEBPACK_IMPORTED_MODULE_15__["debounce"]; });
-
-/* harmony import */ var _internal_operators_debounceTime__WEBPACK_IMPORTED_MODULE_16__ = __webpack_require__(237);
-/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "debounceTime", function() { return _internal_operators_debounceTime__WEBPACK_IMPORTED_MODULE_16__["debounceTime"]; });
-
-/* harmony import */ var _internal_operators_defaultIfEmpty__WEBPACK_IMPORTED_MODULE_17__ = __webpack_require__(238);
-/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "defaultIfEmpty", function() { return _internal_operators_defaultIfEmpty__WEBPACK_IMPORTED_MODULE_17__["defaultIfEmpty"]; });
-
-/* harmony import */ var _internal_operators_delay__WEBPACK_IMPORTED_MODULE_18__ = __webpack_require__(239);
-/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "delay", function() { return _internal_operators_delay__WEBPACK_IMPORTED_MODULE_18__["delay"]; });
-
-/* harmony import */ var _internal_operators_delayWhen__WEBPACK_IMPORTED_MODULE_19__ = __webpack_require__(244);
-/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "delayWhen", function() { return _internal_operators_delayWhen__WEBPACK_IMPORTED_MODULE_19__["delayWhen"]; });
-
-/* harmony import */ var _internal_operators_dematerialize__WEBPACK_IMPORTED_MODULE_20__ = __webpack_require__(245);
-/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "dematerialize", function() { return _internal_operators_dematerialize__WEBPACK_IMPORTED_MODULE_20__["dematerialize"]; });
-
-/* harmony import */ var _internal_operators_distinct__WEBPACK_IMPORTED_MODULE_21__ = __webpack_require__(246);
-/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "distinct", function() { return _internal_operators_distinct__WEBPACK_IMPORTED_MODULE_21__["distinct"]; });
-
-/* harmony import */ var _internal_operators_distinctUntilChanged__WEBPACK_IMPORTED_MODULE_22__ = __webpack_require__(247);
-/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "distinctUntilChanged", function() { return _internal_operators_distinctUntilChanged__WEBPACK_IMPORTED_MODULE_22__["distinctUntilChanged"]; });
-
-/* harmony import */ var _internal_operators_distinctUntilKeyChanged__WEBPACK_IMPORTED_MODULE_23__ = __webpack_require__(248);
-/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "distinctUntilKeyChanged", function() { return _internal_operators_distinctUntilKeyChanged__WEBPACK_IMPORTED_MODULE_23__["distinctUntilKeyChanged"]; });
-
-/* harmony import */ var _internal_operators_elementAt__WEBPACK_IMPORTED_MODULE_24__ = __webpack_require__(249);
-/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "elementAt", function() { return _internal_operators_elementAt__WEBPACK_IMPORTED_MODULE_24__["elementAt"]; });
-
-/* harmony import */ var _internal_operators_endWith__WEBPACK_IMPORTED_MODULE_25__ = __webpack_require__(255);
-/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "endWith", function() { return _internal_operators_endWith__WEBPACK_IMPORTED_MODULE_25__["endWith"]; });
-
-/* harmony import */ var _internal_operators_every__WEBPACK_IMPORTED_MODULE_26__ = __webpack_require__(256);
-/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "every", function() { return _internal_operators_every__WEBPACK_IMPORTED_MODULE_26__["every"]; });
-
-/* harmony import */ var _internal_operators_exhaust__WEBPACK_IMPORTED_MODULE_27__ = __webpack_require__(257);
-/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "exhaust", function() { return _internal_operators_exhaust__WEBPACK_IMPORTED_MODULE_27__["exhaust"]; });
-
-/* harmony import */ var _internal_operators_exhaustMap__WEBPACK_IMPORTED_MODULE_28__ = __webpack_require__(258);
-/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "exhaustMap", function() { return _internal_operators_exhaustMap__WEBPACK_IMPORTED_MODULE_28__["exhaustMap"]; });
-
-/* harmony import */ var _internal_operators_expand__WEBPACK_IMPORTED_MODULE_29__ = __webpack_require__(259);
-/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "expand", function() { return _internal_operators_expand__WEBPACK_IMPORTED_MODULE_29__["expand"]; });
-
-/* harmony import */ var _internal_operators_filter__WEBPACK_IMPORTED_MODULE_30__ = __webpack_require__(251);
-/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "filter", function() { return _internal_operators_filter__WEBPACK_IMPORTED_MODULE_30__["filter"]; });
-
-/* harmony import */ var _internal_operators_finalize__WEBPACK_IMPORTED_MODULE_31__ = __webpack_require__(260);
-/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "finalize", function() { return _internal_operators_finalize__WEBPACK_IMPORTED_MODULE_31__["finalize"]; });
-
-/* harmony import */ var _internal_operators_find__WEBPACK_IMPORTED_MODULE_32__ = __webpack_require__(261);
-/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "find", function() { return _internal_operators_find__WEBPACK_IMPORTED_MODULE_32__["find"]; });
-
-/* harmony import */ var _internal_operators_findIndex__WEBPACK_IMPORTED_MODULE_33__ = __webpack_require__(262);
-/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "findIndex", function() { return _internal_operators_findIndex__WEBPACK_IMPORTED_MODULE_33__["findIndex"]; });
-
-/* harmony import */ var _internal_operators_first__WEBPACK_IMPORTED_MODULE_34__ = __webpack_require__(263);
-/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "first", function() { return _internal_operators_first__WEBPACK_IMPORTED_MODULE_34__["first"]; });
-
-/* harmony import */ var _internal_operators_groupBy__WEBPACK_IMPORTED_MODULE_35__ = __webpack_require__(264);
-/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "groupBy", function() { return _internal_operators_groupBy__WEBPACK_IMPORTED_MODULE_35__["groupBy"]; });
-
-/* harmony import */ var _internal_operators_ignoreElements__WEBPACK_IMPORTED_MODULE_36__ = __webpack_require__(268);
-/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "ignoreElements", function() { return _internal_operators_ignoreElements__WEBPACK_IMPORTED_MODULE_36__["ignoreElements"]; });
-
-/* harmony import */ var _internal_operators_isEmpty__WEBPACK_IMPORTED_MODULE_37__ = __webpack_require__(269);
-/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "isEmpty", function() { return _internal_operators_isEmpty__WEBPACK_IMPORTED_MODULE_37__["isEmpty"]; });
-
-/* harmony import */ var _internal_operators_last__WEBPACK_IMPORTED_MODULE_38__ = __webpack_require__(270);
-/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "last", function() { return _internal_operators_last__WEBPACK_IMPORTED_MODULE_38__["last"]; });
-
-/* harmony import */ var _internal_operators_map__WEBPACK_IMPORTED_MODULE_39__ = __webpack_require__(231);
-/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "map", function() { return _internal_operators_map__WEBPACK_IMPORTED_MODULE_39__["map"]; });
-
-/* harmony import */ var _internal_operators_mapTo__WEBPACK_IMPORTED_MODULE_40__ = __webpack_require__(272);
-/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "mapTo", function() { return _internal_operators_mapTo__WEBPACK_IMPORTED_MODULE_40__["mapTo"]; });
-
-/* harmony import */ var _internal_operators_materialize__WEBPACK_IMPORTED_MODULE_41__ = __webpack_require__(273);
-/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "materialize", function() { return _internal_operators_materialize__WEBPACK_IMPORTED_MODULE_41__["materialize"]; });
-
-/* harmony import */ var _internal_operators_max__WEBPACK_IMPORTED_MODULE_42__ = __webpack_require__(274);
-/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "max", function() { return _internal_operators_max__WEBPACK_IMPORTED_MODULE_42__["max"]; });
-
-/* harmony import */ var _internal_operators_merge__WEBPACK_IMPORTED_MODULE_43__ = __webpack_require__(277);
-/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "merge", function() { return _internal_operators_merge__WEBPACK_IMPORTED_MODULE_43__["merge"]; });
-
-/* harmony import */ var _internal_operators_mergeAll__WEBPACK_IMPORTED_MODULE_44__ = __webpack_require__(229);
-/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "mergeAll", function() { return _internal_operators_mergeAll__WEBPACK_IMPORTED_MODULE_44__["mergeAll"]; });
-
-/* harmony import */ var _internal_operators_mergeMap__WEBPACK_IMPORTED_MODULE_45__ = __webpack_require__(230);
-/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "mergeMap", function() { return _internal_operators_mergeMap__WEBPACK_IMPORTED_MODULE_45__["mergeMap"]; });
-
-/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "flatMap", function() { return _internal_operators_mergeMap__WEBPACK_IMPORTED_MODULE_45__["mergeMap"]; });
-
-/* harmony import */ var _internal_operators_mergeMapTo__WEBPACK_IMPORTED_MODULE_46__ = __webpack_require__(279);
-/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "mergeMapTo", function() { return _internal_operators_mergeMapTo__WEBPACK_IMPORTED_MODULE_46__["mergeMapTo"]; });
+/* harmony import */ var _internal_Observable__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(170);
+/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "Observable", function() { return _internal_Observable__WEBPACK_IMPORTED_MODULE_0__["Observable"]; });
-/* harmony import */ var _internal_operators_mergeScan__WEBPACK_IMPORTED_MODULE_47__ = __webpack_require__(280);
-/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "mergeScan", function() { return _internal_operators_mergeScan__WEBPACK_IMPORTED_MODULE_47__["mergeScan"]; });
+/* harmony import */ var _internal_observable_ConnectableObservable__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(186);
+/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "ConnectableObservable", function() { return _internal_observable_ConnectableObservable__WEBPACK_IMPORTED_MODULE_1__["ConnectableObservable"]; });
-/* harmony import */ var _internal_operators_min__WEBPACK_IMPORTED_MODULE_48__ = __webpack_require__(281);
-/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "min", function() { return _internal_operators_min__WEBPACK_IMPORTED_MODULE_48__["min"]; });
+/* harmony import */ var _internal_operators_groupBy__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(191);
+/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "GroupedObservable", function() { return _internal_operators_groupBy__WEBPACK_IMPORTED_MODULE_2__["GroupedObservable"]; });
-/* harmony import */ var _internal_operators_multicast__WEBPACK_IMPORTED_MODULE_49__ = __webpack_require__(282);
-/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "multicast", function() { return _internal_operators_multicast__WEBPACK_IMPORTED_MODULE_49__["multicast"]; });
+/* harmony import */ var _internal_symbol_observable__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(183);
+/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "observable", function() { return _internal_symbol_observable__WEBPACK_IMPORTED_MODULE_3__["observable"]; });
-/* harmony import */ var _internal_operators_observeOn__WEBPACK_IMPORTED_MODULE_50__ = __webpack_require__(285);
-/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "observeOn", function() { return _internal_operators_observeOn__WEBPACK_IMPORTED_MODULE_50__["observeOn"]; });
+/* harmony import */ var _internal_Subject__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(187);
+/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "Subject", function() { return _internal_Subject__WEBPACK_IMPORTED_MODULE_4__["Subject"]; });
-/* harmony import */ var _internal_operators_onErrorResumeNext__WEBPACK_IMPORTED_MODULE_51__ = __webpack_require__(286);
-/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "onErrorResumeNext", function() { return _internal_operators_onErrorResumeNext__WEBPACK_IMPORTED_MODULE_51__["onErrorResumeNext"]; });
+/* harmony import */ var _internal_BehaviorSubject__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(192);
+/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "BehaviorSubject", function() { return _internal_BehaviorSubject__WEBPACK_IMPORTED_MODULE_5__["BehaviorSubject"]; });
-/* harmony import */ var _internal_operators_pairwise__WEBPACK_IMPORTED_MODULE_52__ = __webpack_require__(287);
-/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "pairwise", function() { return _internal_operators_pairwise__WEBPACK_IMPORTED_MODULE_52__["pairwise"]; });
+/* harmony import */ var _internal_ReplaySubject__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(193);
+/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "ReplaySubject", function() { return _internal_ReplaySubject__WEBPACK_IMPORTED_MODULE_6__["ReplaySubject"]; });
-/* harmony import */ var _internal_operators_partition__WEBPACK_IMPORTED_MODULE_53__ = __webpack_require__(288);
-/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "partition", function() { return _internal_operators_partition__WEBPACK_IMPORTED_MODULE_53__["partition"]; });
+/* harmony import */ var _internal_AsyncSubject__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(210);
+/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "AsyncSubject", function() { return _internal_AsyncSubject__WEBPACK_IMPORTED_MODULE_7__["AsyncSubject"]; });
-/* harmony import */ var _internal_operators_pluck__WEBPACK_IMPORTED_MODULE_54__ = __webpack_require__(290);
-/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "pluck", function() { return _internal_operators_pluck__WEBPACK_IMPORTED_MODULE_54__["pluck"]; });
+/* harmony import */ var _internal_scheduler_asap__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(211);
+/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "asapScheduler", function() { return _internal_scheduler_asap__WEBPACK_IMPORTED_MODULE_8__["asap"]; });
-/* harmony import */ var _internal_operators_publish__WEBPACK_IMPORTED_MODULE_55__ = __webpack_require__(291);
-/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "publish", function() { return _internal_operators_publish__WEBPACK_IMPORTED_MODULE_55__["publish"]; });
+/* harmony import */ var _internal_scheduler_async__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(215);
+/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "asyncScheduler", function() { return _internal_scheduler_async__WEBPACK_IMPORTED_MODULE_9__["async"]; });
-/* harmony import */ var _internal_operators_publishBehavior__WEBPACK_IMPORTED_MODULE_56__ = __webpack_require__(292);
-/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "publishBehavior", function() { return _internal_operators_publishBehavior__WEBPACK_IMPORTED_MODULE_56__["publishBehavior"]; });
+/* harmony import */ var _internal_scheduler_queue__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(194);
+/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "queueScheduler", function() { return _internal_scheduler_queue__WEBPACK_IMPORTED_MODULE_10__["queue"]; });
-/* harmony import */ var _internal_operators_publishLast__WEBPACK_IMPORTED_MODULE_57__ = __webpack_require__(294);
-/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "publishLast", function() { return _internal_operators_publishLast__WEBPACK_IMPORTED_MODULE_57__["publishLast"]; });
+/* harmony import */ var _internal_scheduler_animationFrame__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(216);
+/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "animationFrameScheduler", function() { return _internal_scheduler_animationFrame__WEBPACK_IMPORTED_MODULE_11__["animationFrame"]; });
-/* harmony import */ var _internal_operators_publishReplay__WEBPACK_IMPORTED_MODULE_58__ = __webpack_require__(296);
-/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "publishReplay", function() { return _internal_operators_publishReplay__WEBPACK_IMPORTED_MODULE_58__["publishReplay"]; });
+/* harmony import */ var _internal_scheduler_VirtualTimeScheduler__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(219);
+/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "VirtualTimeScheduler", function() { return _internal_scheduler_VirtualTimeScheduler__WEBPACK_IMPORTED_MODULE_12__["VirtualTimeScheduler"]; });
-/* harmony import */ var _internal_operators_race__WEBPACK_IMPORTED_MODULE_59__ = __webpack_require__(301);
-/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "race", function() { return _internal_operators_race__WEBPACK_IMPORTED_MODULE_59__["race"]; });
+/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "VirtualAction", function() { return _internal_scheduler_VirtualTimeScheduler__WEBPACK_IMPORTED_MODULE_12__["VirtualAction"]; });
-/* harmony import */ var _internal_operators_reduce__WEBPACK_IMPORTED_MODULE_60__ = __webpack_require__(275);
-/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "reduce", function() { return _internal_operators_reduce__WEBPACK_IMPORTED_MODULE_60__["reduce"]; });
+/* harmony import */ var _internal_Scheduler__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(200);
+/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "Scheduler", function() { return _internal_Scheduler__WEBPACK_IMPORTED_MODULE_13__["Scheduler"]; });
-/* harmony import */ var _internal_operators_repeat__WEBPACK_IMPORTED_MODULE_61__ = __webpack_require__(303);
-/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "repeat", function() { return _internal_operators_repeat__WEBPACK_IMPORTED_MODULE_61__["repeat"]; });
+/* harmony import */ var _internal_Subscription__WEBPACK_IMPORTED_MODULE_14__ = __webpack_require__(177);
+/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "Subscription", function() { return _internal_Subscription__WEBPACK_IMPORTED_MODULE_14__["Subscription"]; });
-/* harmony import */ var _internal_operators_repeatWhen__WEBPACK_IMPORTED_MODULE_62__ = __webpack_require__(304);
-/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "repeatWhen", function() { return _internal_operators_repeatWhen__WEBPACK_IMPORTED_MODULE_62__["repeatWhen"]; });
+/* harmony import */ var _internal_Subscriber__WEBPACK_IMPORTED_MODULE_15__ = __webpack_require__(172);
+/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "Subscriber", function() { return _internal_Subscriber__WEBPACK_IMPORTED_MODULE_15__["Subscriber"]; });
-/* harmony import */ var _internal_operators_retry__WEBPACK_IMPORTED_MODULE_63__ = __webpack_require__(305);
-/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "retry", function() { return _internal_operators_retry__WEBPACK_IMPORTED_MODULE_63__["retry"]; });
+/* harmony import */ var _internal_Notification__WEBPACK_IMPORTED_MODULE_16__ = __webpack_require__(202);
+/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "Notification", function() { return _internal_Notification__WEBPACK_IMPORTED_MODULE_16__["Notification"]; });
-/* harmony import */ var _internal_operators_retryWhen__WEBPACK_IMPORTED_MODULE_64__ = __webpack_require__(306);
-/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "retryWhen", function() { return _internal_operators_retryWhen__WEBPACK_IMPORTED_MODULE_64__["retryWhen"]; });
+/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "NotificationKind", function() { return _internal_Notification__WEBPACK_IMPORTED_MODULE_16__["NotificationKind"]; });
-/* harmony import */ var _internal_operators_refCount__WEBPACK_IMPORTED_MODULE_65__ = __webpack_require__(284);
-/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "refCount", function() { return _internal_operators_refCount__WEBPACK_IMPORTED_MODULE_65__["refCount"]; });
+/* harmony import */ var _internal_util_pipe__WEBPACK_IMPORTED_MODULE_17__ = __webpack_require__(184);
+/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "pipe", function() { return _internal_util_pipe__WEBPACK_IMPORTED_MODULE_17__["pipe"]; });
-/* harmony import */ var _internal_operators_sample__WEBPACK_IMPORTED_MODULE_66__ = __webpack_require__(307);
-/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "sample", function() { return _internal_operators_sample__WEBPACK_IMPORTED_MODULE_66__["sample"]; });
+/* harmony import */ var _internal_util_noop__WEBPACK_IMPORTED_MODULE_18__ = __webpack_require__(185);
+/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "noop", function() { return _internal_util_noop__WEBPACK_IMPORTED_MODULE_18__["noop"]; });
-/* harmony import */ var _internal_operators_sampleTime__WEBPACK_IMPORTED_MODULE_67__ = __webpack_require__(308);
-/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "sampleTime", function() { return _internal_operators_sampleTime__WEBPACK_IMPORTED_MODULE_67__["sampleTime"]; });
+/* harmony import */ var _internal_util_identity__WEBPACK_IMPORTED_MODULE_19__ = __webpack_require__(220);
+/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "identity", function() { return _internal_util_identity__WEBPACK_IMPORTED_MODULE_19__["identity"]; });
-/* harmony import */ var _internal_operators_scan__WEBPACK_IMPORTED_MODULE_68__ = __webpack_require__(276);
-/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "scan", function() { return _internal_operators_scan__WEBPACK_IMPORTED_MODULE_68__["scan"]; });
+/* harmony import */ var _internal_util_isObservable__WEBPACK_IMPORTED_MODULE_20__ = __webpack_require__(221);
+/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "isObservable", function() { return _internal_util_isObservable__WEBPACK_IMPORTED_MODULE_20__["isObservable"]; });
-/* harmony import */ var _internal_operators_sequenceEqual__WEBPACK_IMPORTED_MODULE_69__ = __webpack_require__(309);
-/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "sequenceEqual", function() { return _internal_operators_sequenceEqual__WEBPACK_IMPORTED_MODULE_69__["sequenceEqual"]; });
+/* harmony import */ var _internal_util_ArgumentOutOfRangeError__WEBPACK_IMPORTED_MODULE_21__ = __webpack_require__(222);
+/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "ArgumentOutOfRangeError", function() { return _internal_util_ArgumentOutOfRangeError__WEBPACK_IMPORTED_MODULE_21__["ArgumentOutOfRangeError"]; });
-/* harmony import */ var _internal_operators_share__WEBPACK_IMPORTED_MODULE_70__ = __webpack_require__(310);
-/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "share", function() { return _internal_operators_share__WEBPACK_IMPORTED_MODULE_70__["share"]; });
+/* harmony import */ var _internal_util_EmptyError__WEBPACK_IMPORTED_MODULE_22__ = __webpack_require__(223);
+/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "EmptyError", function() { return _internal_util_EmptyError__WEBPACK_IMPORTED_MODULE_22__["EmptyError"]; });
-/* harmony import */ var _internal_operators_shareReplay__WEBPACK_IMPORTED_MODULE_71__ = __webpack_require__(311);
-/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "shareReplay", function() { return _internal_operators_shareReplay__WEBPACK_IMPORTED_MODULE_71__["shareReplay"]; });
+/* harmony import */ var _internal_util_ObjectUnsubscribedError__WEBPACK_IMPORTED_MODULE_23__ = __webpack_require__(188);
+/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "ObjectUnsubscribedError", function() { return _internal_util_ObjectUnsubscribedError__WEBPACK_IMPORTED_MODULE_23__["ObjectUnsubscribedError"]; });
-/* harmony import */ var _internal_operators_single__WEBPACK_IMPORTED_MODULE_72__ = __webpack_require__(312);
-/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "single", function() { return _internal_operators_single__WEBPACK_IMPORTED_MODULE_72__["single"]; });
+/* harmony import */ var _internal_util_UnsubscriptionError__WEBPACK_IMPORTED_MODULE_24__ = __webpack_require__(180);
+/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "UnsubscriptionError", function() { return _internal_util_UnsubscriptionError__WEBPACK_IMPORTED_MODULE_24__["UnsubscriptionError"]; });
-/* harmony import */ var _internal_operators_skip__WEBPACK_IMPORTED_MODULE_73__ = __webpack_require__(313);
-/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "skip", function() { return _internal_operators_skip__WEBPACK_IMPORTED_MODULE_73__["skip"]; });
+/* harmony import */ var _internal_util_TimeoutError__WEBPACK_IMPORTED_MODULE_25__ = __webpack_require__(224);
+/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "TimeoutError", function() { return _internal_util_TimeoutError__WEBPACK_IMPORTED_MODULE_25__["TimeoutError"]; });
-/* harmony import */ var _internal_operators_skipLast__WEBPACK_IMPORTED_MODULE_74__ = __webpack_require__(314);
-/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "skipLast", function() { return _internal_operators_skipLast__WEBPACK_IMPORTED_MODULE_74__["skipLast"]; });
+/* harmony import */ var _internal_observable_bindCallback__WEBPACK_IMPORTED_MODULE_26__ = __webpack_require__(225);
+/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "bindCallback", function() { return _internal_observable_bindCallback__WEBPACK_IMPORTED_MODULE_26__["bindCallback"]; });
-/* harmony import */ var _internal_operators_skipUntil__WEBPACK_IMPORTED_MODULE_75__ = __webpack_require__(315);
-/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "skipUntil", function() { return _internal_operators_skipUntil__WEBPACK_IMPORTED_MODULE_75__["skipUntil"]; });
+/* harmony import */ var _internal_observable_bindNodeCallback__WEBPACK_IMPORTED_MODULE_27__ = __webpack_require__(227);
+/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "bindNodeCallback", function() { return _internal_observable_bindNodeCallback__WEBPACK_IMPORTED_MODULE_27__["bindNodeCallback"]; });
-/* harmony import */ var _internal_operators_skipWhile__WEBPACK_IMPORTED_MODULE_76__ = __webpack_require__(316);
-/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "skipWhile", function() { return _internal_operators_skipWhile__WEBPACK_IMPORTED_MODULE_76__["skipWhile"]; });
+/* harmony import */ var _internal_observable_combineLatest__WEBPACK_IMPORTED_MODULE_28__ = __webpack_require__(228);
+/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "combineLatest", function() { return _internal_observable_combineLatest__WEBPACK_IMPORTED_MODULE_28__["combineLatest"]; });
-/* harmony import */ var _internal_operators_startWith__WEBPACK_IMPORTED_MODULE_77__ = __webpack_require__(317);
-/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "startWith", function() { return _internal_operators_startWith__WEBPACK_IMPORTED_MODULE_77__["startWith"]; });
+/* harmony import */ var _internal_observable_concat__WEBPACK_IMPORTED_MODULE_29__ = __webpack_require__(239);
+/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "concat", function() { return _internal_observable_concat__WEBPACK_IMPORTED_MODULE_29__["concat"]; });
-/* harmony import */ var _internal_operators_subscribeOn__WEBPACK_IMPORTED_MODULE_78__ = __webpack_require__(318);
-/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "subscribeOn", function() { return _internal_operators_subscribeOn__WEBPACK_IMPORTED_MODULE_78__["subscribeOn"]; });
+/* harmony import */ var _internal_observable_defer__WEBPACK_IMPORTED_MODULE_30__ = __webpack_require__(250);
+/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "defer", function() { return _internal_observable_defer__WEBPACK_IMPORTED_MODULE_30__["defer"]; });
-/* harmony import */ var _internal_operators_switchAll__WEBPACK_IMPORTED_MODULE_79__ = __webpack_require__(324);
-/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "switchAll", function() { return _internal_operators_switchAll__WEBPACK_IMPORTED_MODULE_79__["switchAll"]; });
+/* harmony import */ var _internal_observable_empty__WEBPACK_IMPORTED_MODULE_31__ = __webpack_require__(203);
+/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "empty", function() { return _internal_observable_empty__WEBPACK_IMPORTED_MODULE_31__["empty"]; });
-/* harmony import */ var _internal_operators_switchMap__WEBPACK_IMPORTED_MODULE_80__ = __webpack_require__(325);
-/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "switchMap", function() { return _internal_operators_switchMap__WEBPACK_IMPORTED_MODULE_80__["switchMap"]; });
+/* harmony import */ var _internal_observable_forkJoin__WEBPACK_IMPORTED_MODULE_32__ = __webpack_require__(251);
+/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "forkJoin", function() { return _internal_observable_forkJoin__WEBPACK_IMPORTED_MODULE_32__["forkJoin"]; });
-/* harmony import */ var _internal_operators_switchMapTo__WEBPACK_IMPORTED_MODULE_81__ = __webpack_require__(326);
-/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "switchMapTo", function() { return _internal_operators_switchMapTo__WEBPACK_IMPORTED_MODULE_81__["switchMapTo"]; });
+/* harmony import */ var _internal_observable_from__WEBPACK_IMPORTED_MODULE_33__ = __webpack_require__(243);
+/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "from", function() { return _internal_observable_from__WEBPACK_IMPORTED_MODULE_33__["from"]; });
-/* harmony import */ var _internal_operators_take__WEBPACK_IMPORTED_MODULE_82__ = __webpack_require__(254);
-/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "take", function() { return _internal_operators_take__WEBPACK_IMPORTED_MODULE_82__["take"]; });
+/* harmony import */ var _internal_observable_fromEvent__WEBPACK_IMPORTED_MODULE_34__ = __webpack_require__(252);
+/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "fromEvent", function() { return _internal_observable_fromEvent__WEBPACK_IMPORTED_MODULE_34__["fromEvent"]; });
-/* harmony import */ var _internal_operators_takeLast__WEBPACK_IMPORTED_MODULE_83__ = __webpack_require__(271);
-/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "takeLast", function() { return _internal_operators_takeLast__WEBPACK_IMPORTED_MODULE_83__["takeLast"]; });
+/* harmony import */ var _internal_observable_fromEventPattern__WEBPACK_IMPORTED_MODULE_35__ = __webpack_require__(253);
+/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "fromEventPattern", function() { return _internal_observable_fromEventPattern__WEBPACK_IMPORTED_MODULE_35__["fromEventPattern"]; });
-/* harmony import */ var _internal_operators_takeUntil__WEBPACK_IMPORTED_MODULE_84__ = __webpack_require__(327);
-/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "takeUntil", function() { return _internal_operators_takeUntil__WEBPACK_IMPORTED_MODULE_84__["takeUntil"]; });
+/* harmony import */ var _internal_observable_generate__WEBPACK_IMPORTED_MODULE_36__ = __webpack_require__(254);
+/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "generate", function() { return _internal_observable_generate__WEBPACK_IMPORTED_MODULE_36__["generate"]; });
-/* harmony import */ var _internal_operators_takeWhile__WEBPACK_IMPORTED_MODULE_85__ = __webpack_require__(328);
-/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "takeWhile", function() { return _internal_operators_takeWhile__WEBPACK_IMPORTED_MODULE_85__["takeWhile"]; });
+/* harmony import */ var _internal_observable_iif__WEBPACK_IMPORTED_MODULE_37__ = __webpack_require__(255);
+/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "iif", function() { return _internal_observable_iif__WEBPACK_IMPORTED_MODULE_37__["iif"]; });
-/* harmony import */ var _internal_operators_tap__WEBPACK_IMPORTED_MODULE_86__ = __webpack_require__(329);
-/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "tap", function() { return _internal_operators_tap__WEBPACK_IMPORTED_MODULE_86__["tap"]; });
+/* harmony import */ var _internal_observable_interval__WEBPACK_IMPORTED_MODULE_38__ = __webpack_require__(256);
+/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "interval", function() { return _internal_observable_interval__WEBPACK_IMPORTED_MODULE_38__["interval"]; });
-/* harmony import */ var _internal_operators_throttle__WEBPACK_IMPORTED_MODULE_87__ = __webpack_require__(330);
-/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "throttle", function() { return _internal_operators_throttle__WEBPACK_IMPORTED_MODULE_87__["throttle"]; });
+/* harmony import */ var _internal_observable_merge__WEBPACK_IMPORTED_MODULE_39__ = __webpack_require__(258);
+/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "merge", function() { return _internal_observable_merge__WEBPACK_IMPORTED_MODULE_39__["merge"]; });
-/* harmony import */ var _internal_operators_throttleTime__WEBPACK_IMPORTED_MODULE_88__ = __webpack_require__(331);
-/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "throttleTime", function() { return _internal_operators_throttleTime__WEBPACK_IMPORTED_MODULE_88__["throttleTime"]; });
+/* harmony import */ var _internal_observable_never__WEBPACK_IMPORTED_MODULE_40__ = __webpack_require__(259);
+/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "never", function() { return _internal_observable_never__WEBPACK_IMPORTED_MODULE_40__["never"]; });
-/* harmony import */ var _internal_operators_throwIfEmpty__WEBPACK_IMPORTED_MODULE_89__ = __webpack_require__(252);
-/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "throwIfEmpty", function() { return _internal_operators_throwIfEmpty__WEBPACK_IMPORTED_MODULE_89__["throwIfEmpty"]; });
+/* harmony import */ var _internal_observable_of__WEBPACK_IMPORTED_MODULE_41__ = __webpack_require__(204);
+/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "of", function() { return _internal_observable_of__WEBPACK_IMPORTED_MODULE_41__["of"]; });
-/* harmony import */ var _internal_operators_timeInterval__WEBPACK_IMPORTED_MODULE_90__ = __webpack_require__(332);
-/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "timeInterval", function() { return _internal_operators_timeInterval__WEBPACK_IMPORTED_MODULE_90__["timeInterval"]; });
+/* harmony import */ var _internal_observable_onErrorResumeNext__WEBPACK_IMPORTED_MODULE_42__ = __webpack_require__(260);
+/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "onErrorResumeNext", function() { return _internal_observable_onErrorResumeNext__WEBPACK_IMPORTED_MODULE_42__["onErrorResumeNext"]; });
-/* harmony import */ var _internal_operators_timeout__WEBPACK_IMPORTED_MODULE_91__ = __webpack_require__(334);
-/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "timeout", function() { return _internal_operators_timeout__WEBPACK_IMPORTED_MODULE_91__["timeout"]; });
+/* harmony import */ var _internal_observable_pairs__WEBPACK_IMPORTED_MODULE_43__ = __webpack_require__(261);
+/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "pairs", function() { return _internal_observable_pairs__WEBPACK_IMPORTED_MODULE_43__["pairs"]; });
-/* harmony import */ var _internal_operators_timeoutWith__WEBPACK_IMPORTED_MODULE_92__ = __webpack_require__(336);
-/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "timeoutWith", function() { return _internal_operators_timeoutWith__WEBPACK_IMPORTED_MODULE_92__["timeoutWith"]; });
+/* harmony import */ var _internal_observable_partition__WEBPACK_IMPORTED_MODULE_44__ = __webpack_require__(262);
+/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "partition", function() { return _internal_observable_partition__WEBPACK_IMPORTED_MODULE_44__["partition"]; });
-/* harmony import */ var _internal_operators_timestamp__WEBPACK_IMPORTED_MODULE_93__ = __webpack_require__(337);
-/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "timestamp", function() { return _internal_operators_timestamp__WEBPACK_IMPORTED_MODULE_93__["timestamp"]; });
+/* harmony import */ var _internal_observable_race__WEBPACK_IMPORTED_MODULE_45__ = __webpack_require__(265);
+/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "race", function() { return _internal_observable_race__WEBPACK_IMPORTED_MODULE_45__["race"]; });
-/* harmony import */ var _internal_operators_toArray__WEBPACK_IMPORTED_MODULE_94__ = __webpack_require__(338);
-/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "toArray", function() { return _internal_operators_toArray__WEBPACK_IMPORTED_MODULE_94__["toArray"]; });
+/* harmony import */ var _internal_observable_range__WEBPACK_IMPORTED_MODULE_46__ = __webpack_require__(266);
+/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "range", function() { return _internal_observable_range__WEBPACK_IMPORTED_MODULE_46__["range"]; });
-/* harmony import */ var _internal_operators_window__WEBPACK_IMPORTED_MODULE_95__ = __webpack_require__(339);
-/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "window", function() { return _internal_operators_window__WEBPACK_IMPORTED_MODULE_95__["window"]; });
+/* harmony import */ var _internal_observable_throwError__WEBPACK_IMPORTED_MODULE_47__ = __webpack_require__(209);
+/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "throwError", function() { return _internal_observable_throwError__WEBPACK_IMPORTED_MODULE_47__["throwError"]; });
-/* harmony import */ var _internal_operators_windowCount__WEBPACK_IMPORTED_MODULE_96__ = __webpack_require__(340);
-/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "windowCount", function() { return _internal_operators_windowCount__WEBPACK_IMPORTED_MODULE_96__["windowCount"]; });
+/* harmony import */ var _internal_observable_timer__WEBPACK_IMPORTED_MODULE_48__ = __webpack_require__(267);
+/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "timer", function() { return _internal_observable_timer__WEBPACK_IMPORTED_MODULE_48__["timer"]; });
-/* harmony import */ var _internal_operators_windowTime__WEBPACK_IMPORTED_MODULE_97__ = __webpack_require__(341);
-/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "windowTime", function() { return _internal_operators_windowTime__WEBPACK_IMPORTED_MODULE_97__["windowTime"]; });
+/* harmony import */ var _internal_observable_using__WEBPACK_IMPORTED_MODULE_49__ = __webpack_require__(268);
+/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "using", function() { return _internal_observable_using__WEBPACK_IMPORTED_MODULE_49__["using"]; });
-/* harmony import */ var _internal_operators_windowToggle__WEBPACK_IMPORTED_MODULE_98__ = __webpack_require__(342);
-/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "windowToggle", function() { return _internal_operators_windowToggle__WEBPACK_IMPORTED_MODULE_98__["windowToggle"]; });
+/* harmony import */ var _internal_observable_zip__WEBPACK_IMPORTED_MODULE_50__ = __webpack_require__(269);
+/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "zip", function() { return _internal_observable_zip__WEBPACK_IMPORTED_MODULE_50__["zip"]; });
-/* harmony import */ var _internal_operators_windowWhen__WEBPACK_IMPORTED_MODULE_99__ = __webpack_require__(343);
-/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "windowWhen", function() { return _internal_operators_windowWhen__WEBPACK_IMPORTED_MODULE_99__["windowWhen"]; });
+/* harmony import */ var _internal_scheduled_scheduled__WEBPACK_IMPORTED_MODULE_51__ = __webpack_require__(244);
+/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "scheduled", function() { return _internal_scheduled_scheduled__WEBPACK_IMPORTED_MODULE_51__["scheduled"]; });
-/* harmony import */ var _internal_operators_withLatestFrom__WEBPACK_IMPORTED_MODULE_100__ = __webpack_require__(344);
-/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "withLatestFrom", function() { return _internal_operators_withLatestFrom__WEBPACK_IMPORTED_MODULE_100__["withLatestFrom"]; });
+/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "EMPTY", function() { return _internal_observable_empty__WEBPACK_IMPORTED_MODULE_31__["EMPTY"]; });
-/* harmony import */ var _internal_operators_zip__WEBPACK_IMPORTED_MODULE_101__ = __webpack_require__(345);
-/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "zip", function() { return _internal_operators_zip__WEBPACK_IMPORTED_MODULE_101__["zip"]; });
+/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "NEVER", function() { return _internal_observable_never__WEBPACK_IMPORTED_MODULE_40__["NEVER"]; });
-/* harmony import */ var _internal_operators_zipAll__WEBPACK_IMPORTED_MODULE_102__ = __webpack_require__(347);
-/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "zipAll", function() { return _internal_operators_zipAll__WEBPACK_IMPORTED_MODULE_102__["zipAll"]; });
+/* harmony import */ var _internal_config__WEBPACK_IMPORTED_MODULE_52__ = __webpack_require__(175);
+/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "config", function() { return _internal_config__WEBPACK_IMPORTED_MODULE_52__["config"]; });
/** PURE_IMPORTS_START PURE_IMPORTS_END */
@@ -22305,55 +22167,6 @@ __webpack_require__.r(__webpack_exports__);
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
@@ -22384,79 +22197,128 @@ __webpack_require__.r(__webpack_exports__);
"use strict";
__webpack_require__.r(__webpack_exports__);
-/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "audit", function() { return audit; });
-/* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(36);
-/* harmony import */ var _OuterSubscriber__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(171);
-/* harmony import */ var _util_subscribeToResult__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(182);
-/** PURE_IMPORTS_START tslib,_OuterSubscriber,_util_subscribeToResult PURE_IMPORTS_END */
+/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "Observable", function() { return Observable; });
+/* harmony import */ var _util_canReportError__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(171);
+/* harmony import */ var _util_toSubscriber__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(182);
+/* harmony import */ var _symbol_observable__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(183);
+/* harmony import */ var _util_pipe__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(184);
+/* harmony import */ var _config__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(175);
+/** PURE_IMPORTS_START _util_canReportError,_util_toSubscriber,_symbol_observable,_util_pipe,_config PURE_IMPORTS_END */
-function audit(durationSelector) {
- return function auditOperatorFunction(source) {
- return source.lift(new AuditOperator(durationSelector));
- };
-}
-var AuditOperator = /*@__PURE__*/ (function () {
- function AuditOperator(durationSelector) {
- this.durationSelector = durationSelector;
+
+
+var Observable = /*@__PURE__*/ (function () {
+ function Observable(subscribe) {
+ this._isScalar = false;
+ if (subscribe) {
+ this._subscribe = subscribe;
+ }
}
- AuditOperator.prototype.call = function (subscriber, source) {
- return source.subscribe(new AuditSubscriber(subscriber, this.durationSelector));
+ Observable.prototype.lift = function (operator) {
+ var observable = new Observable();
+ observable.source = this;
+ observable.operator = operator;
+ return observable;
};
- return AuditOperator;
-}());
-var AuditSubscriber = /*@__PURE__*/ (function (_super) {
- tslib__WEBPACK_IMPORTED_MODULE_0__["__extends"](AuditSubscriber, _super);
- function AuditSubscriber(destination, durationSelector) {
- var _this = _super.call(this, destination) || this;
- _this.durationSelector = durationSelector;
- _this.hasValue = false;
- return _this;
- }
- AuditSubscriber.prototype._next = function (value) {
- this.value = value;
- this.hasValue = true;
- if (!this.throttled) {
- var duration = void 0;
- try {
- var durationSelector = this.durationSelector;
- duration = durationSelector(value);
+ Observable.prototype.subscribe = function (observerOrNext, error, complete) {
+ var operator = this.operator;
+ var sink = Object(_util_toSubscriber__WEBPACK_IMPORTED_MODULE_1__["toSubscriber"])(observerOrNext, error, complete);
+ if (operator) {
+ sink.add(operator.call(sink, this.source));
+ }
+ else {
+ sink.add(this.source || (_config__WEBPACK_IMPORTED_MODULE_4__["config"].useDeprecatedSynchronousErrorHandling && !sink.syncErrorThrowable) ?
+ this._subscribe(sink) :
+ this._trySubscribe(sink));
+ }
+ if (_config__WEBPACK_IMPORTED_MODULE_4__["config"].useDeprecatedSynchronousErrorHandling) {
+ if (sink.syncErrorThrowable) {
+ sink.syncErrorThrowable = false;
+ if (sink.syncErrorThrown) {
+ throw sink.syncErrorValue;
+ }
}
- catch (err) {
- return this.destination.error(err);
+ }
+ return sink;
+ };
+ Observable.prototype._trySubscribe = function (sink) {
+ try {
+ return this._subscribe(sink);
+ }
+ catch (err) {
+ if (_config__WEBPACK_IMPORTED_MODULE_4__["config"].useDeprecatedSynchronousErrorHandling) {
+ sink.syncErrorThrown = true;
+ sink.syncErrorValue = err;
}
- var innerSubscription = Object(_util_subscribeToResult__WEBPACK_IMPORTED_MODULE_2__["subscribeToResult"])(this, duration);
- if (!innerSubscription || innerSubscription.closed) {
- this.clearThrottle();
+ if (Object(_util_canReportError__WEBPACK_IMPORTED_MODULE_0__["canReportError"])(sink)) {
+ sink.error(err);
}
else {
- this.add(this.throttled = innerSubscription);
+ console.warn(err);
}
}
};
- AuditSubscriber.prototype.clearThrottle = function () {
- var _a = this, value = _a.value, hasValue = _a.hasValue, throttled = _a.throttled;
- if (throttled) {
- this.remove(throttled);
- this.throttled = null;
- throttled.unsubscribe();
+ Observable.prototype.forEach = function (next, promiseCtor) {
+ var _this = this;
+ promiseCtor = getPromiseCtor(promiseCtor);
+ return new promiseCtor(function (resolve, reject) {
+ var subscription;
+ subscription = _this.subscribe(function (value) {
+ try {
+ next(value);
+ }
+ catch (err) {
+ reject(err);
+ if (subscription) {
+ subscription.unsubscribe();
+ }
+ }
+ }, reject, resolve);
+ });
+ };
+ Observable.prototype._subscribe = function (subscriber) {
+ var source = this.source;
+ return source && source.subscribe(subscriber);
+ };
+ Observable.prototype[_symbol_observable__WEBPACK_IMPORTED_MODULE_2__["observable"]] = function () {
+ return this;
+ };
+ Observable.prototype.pipe = function () {
+ var operations = [];
+ for (var _i = 0; _i < arguments.length; _i++) {
+ operations[_i] = arguments[_i];
}
- if (hasValue) {
- this.value = null;
- this.hasValue = false;
- this.destination.next(value);
+ if (operations.length === 0) {
+ return this;
}
+ return Object(_util_pipe__WEBPACK_IMPORTED_MODULE_3__["pipeFromArray"])(operations)(this);
};
- AuditSubscriber.prototype.notifyNext = function (outerValue, innerValue, outerIndex, innerIndex) {
- this.clearThrottle();
+ Observable.prototype.toPromise = function (promiseCtor) {
+ var _this = this;
+ promiseCtor = getPromiseCtor(promiseCtor);
+ return new promiseCtor(function (resolve, reject) {
+ var value;
+ _this.subscribe(function (x) { return value = x; }, function (err) { return reject(err); }, function () { return resolve(value); });
+ });
};
- AuditSubscriber.prototype.notifyComplete = function () {
- this.clearThrottle();
+ Observable.create = function (subscribe) {
+ return new Observable(subscribe);
};
- return AuditSubscriber;
-}(_OuterSubscriber__WEBPACK_IMPORTED_MODULE_1__["OuterSubscriber"]));
-//# sourceMappingURL=audit.js.map
+ return Observable;
+}());
+
+function getPromiseCtor(promiseCtor) {
+ if (!promiseCtor) {
+ promiseCtor = _config__WEBPACK_IMPORTED_MODULE_4__["config"].Promise || Promise;
+ }
+ if (!promiseCtor) {
+ throw new Error('no Promise impl found');
+ }
+ return promiseCtor;
+}
+//# sourceMappingURL=Observable.js.map
/***/ }),
@@ -22465,30 +22327,26 @@ var AuditSubscriber = /*@__PURE__*/ (function (_super) {
"use strict";
__webpack_require__.r(__webpack_exports__);
-/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "OuterSubscriber", function() { return OuterSubscriber; });
-/* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(36);
-/* harmony import */ var _Subscriber__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(172);
-/** PURE_IMPORTS_START tslib,_Subscriber PURE_IMPORTS_END */
-
+/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "canReportError", function() { return canReportError; });
+/* harmony import */ var _Subscriber__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(172);
+/** PURE_IMPORTS_START _Subscriber PURE_IMPORTS_END */
-var OuterSubscriber = /*@__PURE__*/ (function (_super) {
- tslib__WEBPACK_IMPORTED_MODULE_0__["__extends"](OuterSubscriber, _super);
- function OuterSubscriber() {
- return _super !== null && _super.apply(this, arguments) || this;
+function canReportError(observer) {
+ while (observer) {
+ var _a = observer, closed_1 = _a.closed, destination = _a.destination, isStopped = _a.isStopped;
+ if (closed_1 || isStopped) {
+ return false;
+ }
+ else if (destination && destination instanceof _Subscriber__WEBPACK_IMPORTED_MODULE_0__["Subscriber"]) {
+ observer = destination;
+ }
+ else {
+ observer = null;
+ }
}
- OuterSubscriber.prototype.notifyNext = function (outerValue, innerValue, outerIndex, innerIndex, innerSub) {
- this.destination.next(innerValue);
- };
- OuterSubscriber.prototype.notifyError = function (error, innerSub) {
- this.destination.error(error);
- };
- OuterSubscriber.prototype.notifyComplete = function (innerSub) {
- this.destination.complete();
- };
- return OuterSubscriber;
-}(_Subscriber__WEBPACK_IMPORTED_MODULE_1__["Subscriber"]));
-
-//# sourceMappingURL=OuterSubscriber.js.map
+ return true;
+}
+//# sourceMappingURL=canReportError.js.map
/***/ }),
@@ -23048,27 +22906,29 @@ var $$rxSubscriber = rxSubscriber;
"use strict";
__webpack_require__.r(__webpack_exports__);
-/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "subscribeToResult", function() { return subscribeToResult; });
-/* harmony import */ var _InnerSubscriber__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(183);
-/* harmony import */ var _subscribeTo__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(184);
-/* harmony import */ var _Observable__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(193);
-/** PURE_IMPORTS_START _InnerSubscriber,_subscribeTo,_Observable PURE_IMPORTS_END */
+/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "toSubscriber", function() { return toSubscriber; });
+/* harmony import */ var _Subscriber__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(172);
+/* harmony import */ var _symbol_rxSubscriber__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(181);
+/* harmony import */ var _Observer__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(174);
+/** PURE_IMPORTS_START _Subscriber,_symbol_rxSubscriber,_Observer PURE_IMPORTS_END */
-function subscribeToResult(outerSubscriber, result, outerValue, outerIndex, destination) {
- if (destination === void 0) {
- destination = new _InnerSubscriber__WEBPACK_IMPORTED_MODULE_0__["InnerSubscriber"](outerSubscriber, outerValue, outerIndex);
- }
- if (destination.closed) {
- return undefined;
+function toSubscriber(nextOrObserver, error, complete) {
+ if (nextOrObserver) {
+ if (nextOrObserver instanceof _Subscriber__WEBPACK_IMPORTED_MODULE_0__["Subscriber"]) {
+ return nextOrObserver;
+ }
+ if (nextOrObserver[_symbol_rxSubscriber__WEBPACK_IMPORTED_MODULE_1__["rxSubscriber"]]) {
+ return nextOrObserver[_symbol_rxSubscriber__WEBPACK_IMPORTED_MODULE_1__["rxSubscriber"]]();
+ }
}
- if (result instanceof _Observable__WEBPACK_IMPORTED_MODULE_2__["Observable"]) {
- return result.subscribe(destination);
+ if (!nextOrObserver && !error && !complete) {
+ return new _Subscriber__WEBPACK_IMPORTED_MODULE_0__["Subscriber"](_Observer__WEBPACK_IMPORTED_MODULE_2__["empty"]);
}
- return Object(_subscribeTo__WEBPACK_IMPORTED_MODULE_1__["subscribeTo"])(result)(destination);
+ return new _Subscriber__WEBPACK_IMPORTED_MODULE_0__["Subscriber"](nextOrObserver, error, complete);
}
-//# sourceMappingURL=subscribeToResult.js.map
+//# sourceMappingURL=toSubscriber.js.map
/***/ }),
@@ -23077,37 +22937,10 @@ function subscribeToResult(outerSubscriber, result, outerValue, outerIndex, dest
"use strict";
__webpack_require__.r(__webpack_exports__);
-/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "InnerSubscriber", function() { return InnerSubscriber; });
-/* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(36);
-/* harmony import */ var _Subscriber__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(172);
-/** PURE_IMPORTS_START tslib,_Subscriber PURE_IMPORTS_END */
-
-
-var InnerSubscriber = /*@__PURE__*/ (function (_super) {
- tslib__WEBPACK_IMPORTED_MODULE_0__["__extends"](InnerSubscriber, _super);
- function InnerSubscriber(parent, outerValue, outerIndex) {
- var _this = _super.call(this) || this;
- _this.parent = parent;
- _this.outerValue = outerValue;
- _this.outerIndex = outerIndex;
- _this.index = 0;
- return _this;
- }
- InnerSubscriber.prototype._next = function (value) {
- this.parent.notifyNext(this.outerValue, value, this.outerIndex, this.index++, this);
- };
- InnerSubscriber.prototype._error = function (error) {
- this.parent.notifyError(error, this);
- this.unsubscribe();
- };
- InnerSubscriber.prototype._complete = function () {
- this.parent.notifyComplete(this);
- this.unsubscribe();
- };
- return InnerSubscriber;
-}(_Subscriber__WEBPACK_IMPORTED_MODULE_1__["Subscriber"]));
-
-//# sourceMappingURL=InnerSubscriber.js.map
+/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "observable", function() { return observable; });
+/** PURE_IMPORTS_START PURE_IMPORTS_END */
+var observable = /*@__PURE__*/ (function () { return typeof Symbol === 'function' && Symbol.observable || '@@observable'; })();
+//# sourceMappingURL=observable.js.map
/***/ }),
@@ -23116,47 +22949,30 @@ var InnerSubscriber = /*@__PURE__*/ (function (_super) {
"use strict";
__webpack_require__.r(__webpack_exports__);
-/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "subscribeTo", function() { return subscribeTo; });
-/* harmony import */ var _subscribeToArray__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(185);
-/* harmony import */ var _subscribeToPromise__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(186);
-/* harmony import */ var _subscribeToIterable__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(187);
-/* harmony import */ var _subscribeToObservable__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(189);
-/* harmony import */ var _isArrayLike__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(191);
-/* harmony import */ var _isPromise__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(192);
-/* harmony import */ var _isObject__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(179);
-/* harmony import */ var _symbol_iterator__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(188);
-/* harmony import */ var _symbol_observable__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(190);
-/** PURE_IMPORTS_START _subscribeToArray,_subscribeToPromise,_subscribeToIterable,_subscribeToObservable,_isArrayLike,_isPromise,_isObject,_symbol_iterator,_symbol_observable PURE_IMPORTS_END */
-
-
-
-
-
-
-
-
+/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "pipe", function() { return pipe; });
+/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "pipeFromArray", function() { return pipeFromArray; });
+/* harmony import */ var _noop__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(185);
+/** PURE_IMPORTS_START _noop PURE_IMPORTS_END */
-var subscribeTo = function (result) {
- if (!!result && typeof result[_symbol_observable__WEBPACK_IMPORTED_MODULE_8__["observable"]] === 'function') {
- return Object(_subscribeToObservable__WEBPACK_IMPORTED_MODULE_3__["subscribeToObservable"])(result);
- }
- else if (Object(_isArrayLike__WEBPACK_IMPORTED_MODULE_4__["isArrayLike"])(result)) {
- return Object(_subscribeToArray__WEBPACK_IMPORTED_MODULE_0__["subscribeToArray"])(result);
- }
- else if (Object(_isPromise__WEBPACK_IMPORTED_MODULE_5__["isPromise"])(result)) {
- return Object(_subscribeToPromise__WEBPACK_IMPORTED_MODULE_1__["subscribeToPromise"])(result);
+function pipe() {
+ var fns = [];
+ for (var _i = 0; _i < arguments.length; _i++) {
+ fns[_i] = arguments[_i];
}
- else if (!!result && typeof result[_symbol_iterator__WEBPACK_IMPORTED_MODULE_7__["iterator"]] === 'function') {
- return Object(_subscribeToIterable__WEBPACK_IMPORTED_MODULE_2__["subscribeToIterable"])(result);
+ return pipeFromArray(fns);
+}
+function pipeFromArray(fns) {
+ if (!fns) {
+ return _noop__WEBPACK_IMPORTED_MODULE_0__["noop"];
}
- else {
- var value = Object(_isObject__WEBPACK_IMPORTED_MODULE_6__["isObject"])(result) ? 'an invalid object' : "'" + result + "'";
- var msg = "You provided " + value + " where a stream was expected."
- + ' You can provide an Observable, Promise, Array, or Iterable.';
- throw new TypeError(msg);
+ if (fns.length === 1) {
+ return fns[0];
}
-};
-//# sourceMappingURL=subscribeTo.js.map
+ return function piped(input) {
+ return fns.reduce(function (prev, fn) { return fn(prev); }, input);
+ };
+}
+//# sourceMappingURL=pipe.js.map
/***/ }),
@@ -23165,17 +22981,10 @@ var subscribeTo = function (result) {
"use strict";
__webpack_require__.r(__webpack_exports__);
-/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "subscribeToArray", function() { return subscribeToArray; });
+/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "noop", function() { return noop; });
/** PURE_IMPORTS_START PURE_IMPORTS_END */
-var subscribeToArray = function (array) {
- return function (subscriber) {
- for (var i = 0, len = array.length; i < len && !subscriber.closed; i++) {
- subscriber.next(array[i]);
- }
- subscriber.complete();
- };
-};
-//# sourceMappingURL=subscribeToArray.js.map
+function noop() { }
+//# sourceMappingURL=noop.js.map
/***/ }),
@@ -23184,2009 +22993,2195 @@ var subscribeToArray = function (array) {
"use strict";
__webpack_require__.r(__webpack_exports__);
-/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "subscribeToPromise", function() { return subscribeToPromise; });
-/* harmony import */ var _hostReportError__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(176);
-/** PURE_IMPORTS_START _hostReportError PURE_IMPORTS_END */
+/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ConnectableObservable", function() { return ConnectableObservable; });
+/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "connectableObservableDescriptor", function() { return connectableObservableDescriptor; });
+/* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(36);
+/* harmony import */ var _Subject__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(187);
+/* harmony import */ var _Observable__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(170);
+/* harmony import */ var _Subscriber__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(172);
+/* harmony import */ var _Subscription__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(177);
+/* harmony import */ var _operators_refCount__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(190);
+/** PURE_IMPORTS_START tslib,_Subject,_Observable,_Subscriber,_Subscription,_operators_refCount PURE_IMPORTS_END */
-var subscribeToPromise = function (promise) {
- return function (subscriber) {
- promise.then(function (value) {
- if (!subscriber.closed) {
- subscriber.next(value);
- subscriber.complete();
- }
- }, function (err) { return subscriber.error(err); })
- .then(null, _hostReportError__WEBPACK_IMPORTED_MODULE_0__["hostReportError"]);
- return subscriber;
- };
-};
-//# sourceMappingURL=subscribeToPromise.js.map
-/***/ }),
-/* 187 */
-/***/ (function(module, __webpack_exports__, __webpack_require__) {
-"use strict";
-__webpack_require__.r(__webpack_exports__);
-/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "subscribeToIterable", function() { return subscribeToIterable; });
-/* harmony import */ var _symbol_iterator__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(188);
-/** PURE_IMPORTS_START _symbol_iterator PURE_IMPORTS_END */
-var subscribeToIterable = function (iterable) {
- return function (subscriber) {
- var iterator = iterable[_symbol_iterator__WEBPACK_IMPORTED_MODULE_0__["iterator"]]();
- do {
- var item = iterator.next();
- if (item.done) {
- subscriber.complete();
- break;
- }
- subscriber.next(item.value);
- if (subscriber.closed) {
- break;
+
+var ConnectableObservable = /*@__PURE__*/ (function (_super) {
+ tslib__WEBPACK_IMPORTED_MODULE_0__["__extends"](ConnectableObservable, _super);
+ function ConnectableObservable(source, subjectFactory) {
+ var _this = _super.call(this) || this;
+ _this.source = source;
+ _this.subjectFactory = subjectFactory;
+ _this._refCount = 0;
+ _this._isComplete = false;
+ return _this;
+ }
+ ConnectableObservable.prototype._subscribe = function (subscriber) {
+ return this.getSubject().subscribe(subscriber);
+ };
+ ConnectableObservable.prototype.getSubject = function () {
+ var subject = this._subject;
+ if (!subject || subject.isStopped) {
+ this._subject = this.subjectFactory();
+ }
+ return this._subject;
+ };
+ ConnectableObservable.prototype.connect = function () {
+ var connection = this._connection;
+ if (!connection) {
+ this._isComplete = false;
+ connection = this._connection = new _Subscription__WEBPACK_IMPORTED_MODULE_4__["Subscription"]();
+ connection.add(this.source
+ .subscribe(new ConnectableSubscriber(this.getSubject(), this)));
+ if (connection.closed) {
+ this._connection = null;
+ connection = _Subscription__WEBPACK_IMPORTED_MODULE_4__["Subscription"].EMPTY;
}
- } while (true);
- if (typeof iterator.return === 'function') {
- subscriber.add(function () {
- if (iterator.return) {
- iterator.return();
- }
- });
}
- return subscriber;
+ return connection;
};
-};
-//# sourceMappingURL=subscribeToIterable.js.map
-
-
-/***/ }),
-/* 188 */
-/***/ (function(module, __webpack_exports__, __webpack_require__) {
+ ConnectableObservable.prototype.refCount = function () {
+ return Object(_operators_refCount__WEBPACK_IMPORTED_MODULE_5__["refCount"])()(this);
+ };
+ return ConnectableObservable;
+}(_Observable__WEBPACK_IMPORTED_MODULE_2__["Observable"]));
-"use strict";
-__webpack_require__.r(__webpack_exports__);
-/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "getSymbolIterator", function() { return getSymbolIterator; });
-/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "iterator", function() { return iterator; });
-/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "$$iterator", function() { return $$iterator; });
-/** PURE_IMPORTS_START PURE_IMPORTS_END */
-function getSymbolIterator() {
- if (typeof Symbol !== 'function' || !Symbol.iterator) {
- return '@@iterator';
+var connectableObservableDescriptor = /*@__PURE__*/ (function () {
+ var connectableProto = ConnectableObservable.prototype;
+ return {
+ operator: { value: null },
+ _refCount: { value: 0, writable: true },
+ _subject: { value: null, writable: true },
+ _connection: { value: null, writable: true },
+ _subscribe: { value: connectableProto._subscribe },
+ _isComplete: { value: connectableProto._isComplete, writable: true },
+ getSubject: { value: connectableProto.getSubject },
+ connect: { value: connectableProto.connect },
+ refCount: { value: connectableProto.refCount }
+ };
+})();
+var ConnectableSubscriber = /*@__PURE__*/ (function (_super) {
+ tslib__WEBPACK_IMPORTED_MODULE_0__["__extends"](ConnectableSubscriber, _super);
+ function ConnectableSubscriber(destination, connectable) {
+ var _this = _super.call(this, destination) || this;
+ _this.connectable = connectable;
+ return _this;
}
- return Symbol.iterator;
-}
-var iterator = /*@__PURE__*/ getSymbolIterator();
-var $$iterator = iterator;
-//# sourceMappingURL=iterator.js.map
-
-
-/***/ }),
-/* 189 */
-/***/ (function(module, __webpack_exports__, __webpack_require__) {
-
-"use strict";
-__webpack_require__.r(__webpack_exports__);
-/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "subscribeToObservable", function() { return subscribeToObservable; });
-/* harmony import */ var _symbol_observable__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(190);
-/** PURE_IMPORTS_START _symbol_observable PURE_IMPORTS_END */
-
-var subscribeToObservable = function (obj) {
- return function (subscriber) {
- var obs = obj[_symbol_observable__WEBPACK_IMPORTED_MODULE_0__["observable"]]();
- if (typeof obs.subscribe !== 'function') {
- throw new TypeError('Provided object does not correctly implement Symbol.observable');
+ ConnectableSubscriber.prototype._error = function (err) {
+ this._unsubscribe();
+ _super.prototype._error.call(this, err);
+ };
+ ConnectableSubscriber.prototype._complete = function () {
+ this.connectable._isComplete = true;
+ this._unsubscribe();
+ _super.prototype._complete.call(this);
+ };
+ ConnectableSubscriber.prototype._unsubscribe = function () {
+ var connectable = this.connectable;
+ if (connectable) {
+ this.connectable = null;
+ var connection = connectable._connection;
+ connectable._refCount = 0;
+ connectable._subject = null;
+ connectable._connection = null;
+ if (connection) {
+ connection.unsubscribe();
+ }
}
- else {
- return obs.subscribe(subscriber);
+ };
+ return ConnectableSubscriber;
+}(_Subject__WEBPACK_IMPORTED_MODULE_1__["SubjectSubscriber"]));
+var RefCountOperator = /*@__PURE__*/ (function () {
+ function RefCountOperator(connectable) {
+ this.connectable = connectable;
+ }
+ RefCountOperator.prototype.call = function (subscriber, source) {
+ var connectable = this.connectable;
+ connectable._refCount++;
+ var refCounter = new RefCountSubscriber(subscriber, connectable);
+ var subscription = source.subscribe(refCounter);
+ if (!refCounter.closed) {
+ refCounter.connection = connectable.connect();
}
+ return subscription;
};
-};
-//# sourceMappingURL=subscribeToObservable.js.map
-
-
-/***/ }),
-/* 190 */
-/***/ (function(module, __webpack_exports__, __webpack_require__) {
-
-"use strict";
-__webpack_require__.r(__webpack_exports__);
-/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "observable", function() { return observable; });
-/** PURE_IMPORTS_START PURE_IMPORTS_END */
-var observable = /*@__PURE__*/ (function () { return typeof Symbol === 'function' && Symbol.observable || '@@observable'; })();
-//# sourceMappingURL=observable.js.map
-
-
-/***/ }),
-/* 191 */
-/***/ (function(module, __webpack_exports__, __webpack_require__) {
-
-"use strict";
-__webpack_require__.r(__webpack_exports__);
-/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "isArrayLike", function() { return isArrayLike; });
-/** PURE_IMPORTS_START PURE_IMPORTS_END */
-var isArrayLike = (function (x) { return x && typeof x.length === 'number' && typeof x !== 'function'; });
-//# sourceMappingURL=isArrayLike.js.map
+ return RefCountOperator;
+}());
+var RefCountSubscriber = /*@__PURE__*/ (function (_super) {
+ tslib__WEBPACK_IMPORTED_MODULE_0__["__extends"](RefCountSubscriber, _super);
+ function RefCountSubscriber(destination, connectable) {
+ var _this = _super.call(this, destination) || this;
+ _this.connectable = connectable;
+ return _this;
+ }
+ RefCountSubscriber.prototype._unsubscribe = function () {
+ var connectable = this.connectable;
+ if (!connectable) {
+ this.connection = null;
+ return;
+ }
+ this.connectable = null;
+ var refCount = connectable._refCount;
+ if (refCount <= 0) {
+ this.connection = null;
+ return;
+ }
+ connectable._refCount = refCount - 1;
+ if (refCount > 1) {
+ this.connection = null;
+ return;
+ }
+ var connection = this.connection;
+ var sharedConnection = connectable._connection;
+ this.connection = null;
+ if (sharedConnection && (!connection || sharedConnection === connection)) {
+ sharedConnection.unsubscribe();
+ }
+ };
+ return RefCountSubscriber;
+}(_Subscriber__WEBPACK_IMPORTED_MODULE_3__["Subscriber"]));
+//# sourceMappingURL=ConnectableObservable.js.map
/***/ }),
-/* 192 */
+/* 187 */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
"use strict";
__webpack_require__.r(__webpack_exports__);
-/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "isPromise", function() { return isPromise; });
-/** PURE_IMPORTS_START PURE_IMPORTS_END */
-function isPromise(value) {
- return !!value && typeof value.subscribe !== 'function' && typeof value.then === 'function';
-}
-//# sourceMappingURL=isPromise.js.map
+/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "SubjectSubscriber", function() { return SubjectSubscriber; });
+/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "Subject", function() { return Subject; });
+/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "AnonymousSubject", function() { return AnonymousSubject; });
+/* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(36);
+/* harmony import */ var _Observable__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(170);
+/* harmony import */ var _Subscriber__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(172);
+/* harmony import */ var _Subscription__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(177);
+/* harmony import */ var _util_ObjectUnsubscribedError__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(188);
+/* harmony import */ var _SubjectSubscription__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(189);
+/* harmony import */ var _internal_symbol_rxSubscriber__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(181);
+/** PURE_IMPORTS_START tslib,_Observable,_Subscriber,_Subscription,_util_ObjectUnsubscribedError,_SubjectSubscription,_internal_symbol_rxSubscriber PURE_IMPORTS_END */
-/***/ }),
-/* 193 */
-/***/ (function(module, __webpack_exports__, __webpack_require__) {
-"use strict";
-__webpack_require__.r(__webpack_exports__);
-/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "Observable", function() { return Observable; });
-/* harmony import */ var _util_canReportError__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(194);
-/* harmony import */ var _util_toSubscriber__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(195);
-/* harmony import */ var _symbol_observable__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(190);
-/* harmony import */ var _util_pipe__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(196);
-/* harmony import */ var _config__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(175);
-/** PURE_IMPORTS_START _util_canReportError,_util_toSubscriber,_symbol_observable,_util_pipe,_config PURE_IMPORTS_END */
+var SubjectSubscriber = /*@__PURE__*/ (function (_super) {
+ tslib__WEBPACK_IMPORTED_MODULE_0__["__extends"](SubjectSubscriber, _super);
+ function SubjectSubscriber(destination) {
+ var _this = _super.call(this, destination) || this;
+ _this.destination = destination;
+ return _this;
+ }
+ return SubjectSubscriber;
+}(_Subscriber__WEBPACK_IMPORTED_MODULE_2__["Subscriber"]));
-var Observable = /*@__PURE__*/ (function () {
- function Observable(subscribe) {
- this._isScalar = false;
- if (subscribe) {
- this._subscribe = subscribe;
- }
+var Subject = /*@__PURE__*/ (function (_super) {
+ tslib__WEBPACK_IMPORTED_MODULE_0__["__extends"](Subject, _super);
+ function Subject() {
+ var _this = _super.call(this) || this;
+ _this.observers = [];
+ _this.closed = false;
+ _this.isStopped = false;
+ _this.hasError = false;
+ _this.thrownError = null;
+ return _this;
}
- Observable.prototype.lift = function (operator) {
- var observable = new Observable();
- observable.source = this;
- observable.operator = operator;
- return observable;
+ Subject.prototype[_internal_symbol_rxSubscriber__WEBPACK_IMPORTED_MODULE_6__["rxSubscriber"]] = function () {
+ return new SubjectSubscriber(this);
};
- Observable.prototype.subscribe = function (observerOrNext, error, complete) {
- var operator = this.operator;
- var sink = Object(_util_toSubscriber__WEBPACK_IMPORTED_MODULE_1__["toSubscriber"])(observerOrNext, error, complete);
- if (operator) {
- sink.add(operator.call(sink, this.source));
- }
- else {
- sink.add(this.source || (_config__WEBPACK_IMPORTED_MODULE_4__["config"].useDeprecatedSynchronousErrorHandling && !sink.syncErrorThrowable) ?
- this._subscribe(sink) :
- this._trySubscribe(sink));
+ Subject.prototype.lift = function (operator) {
+ var subject = new AnonymousSubject(this, this);
+ subject.operator = operator;
+ return subject;
+ };
+ Subject.prototype.next = function (value) {
+ if (this.closed) {
+ throw new _util_ObjectUnsubscribedError__WEBPACK_IMPORTED_MODULE_4__["ObjectUnsubscribedError"]();
}
- if (_config__WEBPACK_IMPORTED_MODULE_4__["config"].useDeprecatedSynchronousErrorHandling) {
- if (sink.syncErrorThrowable) {
- sink.syncErrorThrowable = false;
- if (sink.syncErrorThrown) {
- throw sink.syncErrorValue;
- }
+ if (!this.isStopped) {
+ var observers = this.observers;
+ var len = observers.length;
+ var copy = observers.slice();
+ for (var i = 0; i < len; i++) {
+ copy[i].next(value);
}
}
- return sink;
};
- Observable.prototype._trySubscribe = function (sink) {
- try {
- return this._subscribe(sink);
+ Subject.prototype.error = function (err) {
+ if (this.closed) {
+ throw new _util_ObjectUnsubscribedError__WEBPACK_IMPORTED_MODULE_4__["ObjectUnsubscribedError"]();
}
- catch (err) {
- if (_config__WEBPACK_IMPORTED_MODULE_4__["config"].useDeprecatedSynchronousErrorHandling) {
- sink.syncErrorThrown = true;
- sink.syncErrorValue = err;
- }
- if (Object(_util_canReportError__WEBPACK_IMPORTED_MODULE_0__["canReportError"])(sink)) {
- sink.error(err);
- }
- else {
- console.warn(err);
- }
+ this.hasError = true;
+ this.thrownError = err;
+ this.isStopped = true;
+ var observers = this.observers;
+ var len = observers.length;
+ var copy = observers.slice();
+ for (var i = 0; i < len; i++) {
+ copy[i].error(err);
}
+ this.observers.length = 0;
};
- Observable.prototype.forEach = function (next, promiseCtor) {
- var _this = this;
- promiseCtor = getPromiseCtor(promiseCtor);
- return new promiseCtor(function (resolve, reject) {
- var subscription;
- subscription = _this.subscribe(function (value) {
- try {
- next(value);
- }
- catch (err) {
- reject(err);
- if (subscription) {
- subscription.unsubscribe();
- }
- }
- }, reject, resolve);
- });
- };
- Observable.prototype._subscribe = function (subscriber) {
- var source = this.source;
- return source && source.subscribe(subscriber);
- };
- Observable.prototype[_symbol_observable__WEBPACK_IMPORTED_MODULE_2__["observable"]] = function () {
- return this;
- };
- Observable.prototype.pipe = function () {
- var operations = [];
- for (var _i = 0; _i < arguments.length; _i++) {
- operations[_i] = arguments[_i];
+ Subject.prototype.complete = function () {
+ if (this.closed) {
+ throw new _util_ObjectUnsubscribedError__WEBPACK_IMPORTED_MODULE_4__["ObjectUnsubscribedError"]();
}
- if (operations.length === 0) {
- return this;
+ this.isStopped = true;
+ var observers = this.observers;
+ var len = observers.length;
+ var copy = observers.slice();
+ for (var i = 0; i < len; i++) {
+ copy[i].complete();
}
- return Object(_util_pipe__WEBPACK_IMPORTED_MODULE_3__["pipeFromArray"])(operations)(this);
+ this.observers.length = 0;
};
- Observable.prototype.toPromise = function (promiseCtor) {
- var _this = this;
- promiseCtor = getPromiseCtor(promiseCtor);
- return new promiseCtor(function (resolve, reject) {
- var value;
- _this.subscribe(function (x) { return value = x; }, function (err) { return reject(err); }, function () { return resolve(value); });
- });
+ Subject.prototype.unsubscribe = function () {
+ this.isStopped = true;
+ this.closed = true;
+ this.observers = null;
};
- Observable.create = function (subscribe) {
- return new Observable(subscribe);
+ Subject.prototype._trySubscribe = function (subscriber) {
+ if (this.closed) {
+ throw new _util_ObjectUnsubscribedError__WEBPACK_IMPORTED_MODULE_4__["ObjectUnsubscribedError"]();
+ }
+ else {
+ return _super.prototype._trySubscribe.call(this, subscriber);
+ }
};
- return Observable;
-}());
-
-function getPromiseCtor(promiseCtor) {
- if (!promiseCtor) {
- promiseCtor = _config__WEBPACK_IMPORTED_MODULE_4__["config"].Promise || Promise;
- }
- if (!promiseCtor) {
- throw new Error('no Promise impl found');
- }
- return promiseCtor;
-}
-//# sourceMappingURL=Observable.js.map
-
-
-/***/ }),
-/* 194 */
-/***/ (function(module, __webpack_exports__, __webpack_require__) {
-
-"use strict";
-__webpack_require__.r(__webpack_exports__);
-/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "canReportError", function() { return canReportError; });
-/* harmony import */ var _Subscriber__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(172);
-/** PURE_IMPORTS_START _Subscriber PURE_IMPORTS_END */
-
-function canReportError(observer) {
- while (observer) {
- var _a = observer, closed_1 = _a.closed, destination = _a.destination, isStopped = _a.isStopped;
- if (closed_1 || isStopped) {
- return false;
+ Subject.prototype._subscribe = function (subscriber) {
+ if (this.closed) {
+ throw new _util_ObjectUnsubscribedError__WEBPACK_IMPORTED_MODULE_4__["ObjectUnsubscribedError"]();
}
- else if (destination && destination instanceof _Subscriber__WEBPACK_IMPORTED_MODULE_0__["Subscriber"]) {
- observer = destination;
+ else if (this.hasError) {
+ subscriber.error(this.thrownError);
+ return _Subscription__WEBPACK_IMPORTED_MODULE_3__["Subscription"].EMPTY;
+ }
+ else if (this.isStopped) {
+ subscriber.complete();
+ return _Subscription__WEBPACK_IMPORTED_MODULE_3__["Subscription"].EMPTY;
}
else {
- observer = null;
+ this.observers.push(subscriber);
+ return new _SubjectSubscription__WEBPACK_IMPORTED_MODULE_5__["SubjectSubscription"](this, subscriber);
}
- }
- return true;
-}
-//# sourceMappingURL=canReportError.js.map
-
-
-/***/ }),
-/* 195 */
-/***/ (function(module, __webpack_exports__, __webpack_require__) {
-
-"use strict";
-__webpack_require__.r(__webpack_exports__);
-/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "toSubscriber", function() { return toSubscriber; });
-/* harmony import */ var _Subscriber__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(172);
-/* harmony import */ var _symbol_rxSubscriber__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(181);
-/* harmony import */ var _Observer__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(174);
-/** PURE_IMPORTS_START _Subscriber,_symbol_rxSubscriber,_Observer PURE_IMPORTS_END */
-
-
+ };
+ Subject.prototype.asObservable = function () {
+ var observable = new _Observable__WEBPACK_IMPORTED_MODULE_1__["Observable"]();
+ observable.source = this;
+ return observable;
+ };
+ Subject.create = function (destination, source) {
+ return new AnonymousSubject(destination, source);
+ };
+ return Subject;
+}(_Observable__WEBPACK_IMPORTED_MODULE_1__["Observable"]));
-function toSubscriber(nextOrObserver, error, complete) {
- if (nextOrObserver) {
- if (nextOrObserver instanceof _Subscriber__WEBPACK_IMPORTED_MODULE_0__["Subscriber"]) {
- return nextOrObserver;
+var AnonymousSubject = /*@__PURE__*/ (function (_super) {
+ tslib__WEBPACK_IMPORTED_MODULE_0__["__extends"](AnonymousSubject, _super);
+ function AnonymousSubject(destination, source) {
+ var _this = _super.call(this) || this;
+ _this.destination = destination;
+ _this.source = source;
+ return _this;
+ }
+ AnonymousSubject.prototype.next = function (value) {
+ var destination = this.destination;
+ if (destination && destination.next) {
+ destination.next(value);
}
- if (nextOrObserver[_symbol_rxSubscriber__WEBPACK_IMPORTED_MODULE_1__["rxSubscriber"]]) {
- return nextOrObserver[_symbol_rxSubscriber__WEBPACK_IMPORTED_MODULE_1__["rxSubscriber"]]();
+ };
+ AnonymousSubject.prototype.error = function (err) {
+ var destination = this.destination;
+ if (destination && destination.error) {
+ this.destination.error(err);
}
- }
- if (!nextOrObserver && !error && !complete) {
- return new _Subscriber__WEBPACK_IMPORTED_MODULE_0__["Subscriber"](_Observer__WEBPACK_IMPORTED_MODULE_2__["empty"]);
- }
- return new _Subscriber__WEBPACK_IMPORTED_MODULE_0__["Subscriber"](nextOrObserver, error, complete);
-}
-//# sourceMappingURL=toSubscriber.js.map
-
-
-/***/ }),
-/* 196 */
-/***/ (function(module, __webpack_exports__, __webpack_require__) {
-
-"use strict";
-__webpack_require__.r(__webpack_exports__);
-/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "pipe", function() { return pipe; });
-/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "pipeFromArray", function() { return pipeFromArray; });
-/* harmony import */ var _noop__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(197);
-/** PURE_IMPORTS_START _noop PURE_IMPORTS_END */
-
-function pipe() {
- var fns = [];
- for (var _i = 0; _i < arguments.length; _i++) {
- fns[_i] = arguments[_i];
- }
- return pipeFromArray(fns);
-}
-function pipeFromArray(fns) {
- if (!fns) {
- return _noop__WEBPACK_IMPORTED_MODULE_0__["noop"];
- }
- if (fns.length === 1) {
- return fns[0];
- }
- return function piped(input) {
- return fns.reduce(function (prev, fn) { return fn(prev); }, input);
};
-}
-//# sourceMappingURL=pipe.js.map
-
-
-/***/ }),
-/* 197 */
-/***/ (function(module, __webpack_exports__, __webpack_require__) {
+ AnonymousSubject.prototype.complete = function () {
+ var destination = this.destination;
+ if (destination && destination.complete) {
+ this.destination.complete();
+ }
+ };
+ AnonymousSubject.prototype._subscribe = function (subscriber) {
+ var source = this.source;
+ if (source) {
+ return this.source.subscribe(subscriber);
+ }
+ else {
+ return _Subscription__WEBPACK_IMPORTED_MODULE_3__["Subscription"].EMPTY;
+ }
+ };
+ return AnonymousSubject;
+}(Subject));
-"use strict";
-__webpack_require__.r(__webpack_exports__);
-/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "noop", function() { return noop; });
-/** PURE_IMPORTS_START PURE_IMPORTS_END */
-function noop() { }
-//# sourceMappingURL=noop.js.map
+//# sourceMappingURL=Subject.js.map
/***/ }),
-/* 198 */
+/* 188 */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
"use strict";
__webpack_require__.r(__webpack_exports__);
-/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "auditTime", function() { return auditTime; });
-/* harmony import */ var _scheduler_async__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(199);
-/* harmony import */ var _audit__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(170);
-/* harmony import */ var _observable_timer__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(204);
-/** PURE_IMPORTS_START _scheduler_async,_audit,_observable_timer PURE_IMPORTS_END */
-
-
-
-function auditTime(duration, scheduler) {
- if (scheduler === void 0) {
- scheduler = _scheduler_async__WEBPACK_IMPORTED_MODULE_0__["async"];
+/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ObjectUnsubscribedError", function() { return ObjectUnsubscribedError; });
+/** PURE_IMPORTS_START PURE_IMPORTS_END */
+var ObjectUnsubscribedErrorImpl = /*@__PURE__*/ (function () {
+ function ObjectUnsubscribedErrorImpl() {
+ Error.call(this);
+ this.message = 'object unsubscribed';
+ this.name = 'ObjectUnsubscribedError';
+ return this;
}
- return Object(_audit__WEBPACK_IMPORTED_MODULE_1__["audit"])(function () { return Object(_observable_timer__WEBPACK_IMPORTED_MODULE_2__["timer"])(duration, scheduler); });
-}
-//# sourceMappingURL=auditTime.js.map
-
-
-/***/ }),
-/* 199 */
-/***/ (function(module, __webpack_exports__, __webpack_require__) {
-
-"use strict";
-__webpack_require__.r(__webpack_exports__);
-/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "async", function() { return async; });
-/* harmony import */ var _AsyncAction__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(200);
-/* harmony import */ var _AsyncScheduler__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(202);
-/** PURE_IMPORTS_START _AsyncAction,_AsyncScheduler PURE_IMPORTS_END */
-
-
-var async = /*@__PURE__*/ new _AsyncScheduler__WEBPACK_IMPORTED_MODULE_1__["AsyncScheduler"](_AsyncAction__WEBPACK_IMPORTED_MODULE_0__["AsyncAction"]);
-//# sourceMappingURL=async.js.map
+ ObjectUnsubscribedErrorImpl.prototype = /*@__PURE__*/ Object.create(Error.prototype);
+ return ObjectUnsubscribedErrorImpl;
+})();
+var ObjectUnsubscribedError = ObjectUnsubscribedErrorImpl;
+//# sourceMappingURL=ObjectUnsubscribedError.js.map
/***/ }),
-/* 200 */
+/* 189 */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
"use strict";
__webpack_require__.r(__webpack_exports__);
-/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "AsyncAction", function() { return AsyncAction; });
+/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "SubjectSubscription", function() { return SubjectSubscription; });
/* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(36);
-/* harmony import */ var _Action__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(201);
-/** PURE_IMPORTS_START tslib,_Action PURE_IMPORTS_END */
+/* harmony import */ var _Subscription__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(177);
+/** PURE_IMPORTS_START tslib,_Subscription PURE_IMPORTS_END */
-var AsyncAction = /*@__PURE__*/ (function (_super) {
- tslib__WEBPACK_IMPORTED_MODULE_0__["__extends"](AsyncAction, _super);
- function AsyncAction(scheduler, work) {
- var _this = _super.call(this, scheduler, work) || this;
- _this.scheduler = scheduler;
- _this.work = work;
- _this.pending = false;
+var SubjectSubscription = /*@__PURE__*/ (function (_super) {
+ tslib__WEBPACK_IMPORTED_MODULE_0__["__extends"](SubjectSubscription, _super);
+ function SubjectSubscription(subject, subscriber) {
+ var _this = _super.call(this) || this;
+ _this.subject = subject;
+ _this.subscriber = subscriber;
+ _this.closed = false;
return _this;
}
- AsyncAction.prototype.schedule = function (state, delay) {
- if (delay === void 0) {
- delay = 0;
- }
- if (this.closed) {
- return this;
- }
- this.state = state;
- var id = this.id;
- var scheduler = this.scheduler;
- if (id != null) {
- this.id = this.recycleAsyncId(scheduler, id, delay);
- }
- this.pending = true;
- this.delay = delay;
- this.id = this.id || this.requestAsyncId(scheduler, this.id, delay);
- return this;
- };
- AsyncAction.prototype.requestAsyncId = function (scheduler, id, delay) {
- if (delay === void 0) {
- delay = 0;
- }
- return setInterval(scheduler.flush.bind(scheduler, this), delay);
- };
- AsyncAction.prototype.recycleAsyncId = function (scheduler, id, delay) {
- if (delay === void 0) {
- delay = 0;
- }
- if (delay !== null && this.delay === delay && this.pending === false) {
- return id;
- }
- clearInterval(id);
- return undefined;
- };
- AsyncAction.prototype.execute = function (state, delay) {
+ SubjectSubscription.prototype.unsubscribe = function () {
if (this.closed) {
- return new Error('executing a cancelled action');
- }
- this.pending = false;
- var error = this._execute(state, delay);
- if (error) {
- return error;
- }
- else if (this.pending === false && this.id != null) {
- this.id = this.recycleAsyncId(this.scheduler, this.id, null);
- }
- };
- AsyncAction.prototype._execute = function (state, delay) {
- var errored = false;
- var errorValue = undefined;
- try {
- this.work(state);
- }
- catch (e) {
- errored = true;
- errorValue = !!e && e || new Error(e);
- }
- if (errored) {
- this.unsubscribe();
- return errorValue;
+ return;
}
- };
- AsyncAction.prototype._unsubscribe = function () {
- var id = this.id;
- var scheduler = this.scheduler;
- var actions = scheduler.actions;
- var index = actions.indexOf(this);
- this.work = null;
- this.state = null;
- this.pending = false;
- this.scheduler = null;
- if (index !== -1) {
- actions.splice(index, 1);
+ this.closed = true;
+ var subject = this.subject;
+ var observers = subject.observers;
+ this.subject = null;
+ if (!observers || observers.length === 0 || subject.isStopped || subject.closed) {
+ return;
}
- if (id != null) {
- this.id = this.recycleAsyncId(scheduler, id, null);
+ var subscriberIndex = observers.indexOf(this.subscriber);
+ if (subscriberIndex !== -1) {
+ observers.splice(subscriberIndex, 1);
}
- this.delay = null;
};
- return AsyncAction;
-}(_Action__WEBPACK_IMPORTED_MODULE_1__["Action"]));
+ return SubjectSubscription;
+}(_Subscription__WEBPACK_IMPORTED_MODULE_1__["Subscription"]));
-//# sourceMappingURL=AsyncAction.js.map
+//# sourceMappingURL=SubjectSubscription.js.map
/***/ }),
-/* 201 */
+/* 190 */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
"use strict";
__webpack_require__.r(__webpack_exports__);
-/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "Action", function() { return Action; });
+/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "refCount", function() { return refCount; });
/* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(36);
-/* harmony import */ var _Subscription__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(177);
-/** PURE_IMPORTS_START tslib,_Subscription PURE_IMPORTS_END */
+/* harmony import */ var _Subscriber__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(172);
+/** PURE_IMPORTS_START tslib,_Subscriber PURE_IMPORTS_END */
-var Action = /*@__PURE__*/ (function (_super) {
- tslib__WEBPACK_IMPORTED_MODULE_0__["__extends"](Action, _super);
- function Action(scheduler, work) {
- return _super.call(this) || this;
+function refCount() {
+ return function refCountOperatorFunction(source) {
+ return source.lift(new RefCountOperator(source));
+ };
+}
+var RefCountOperator = /*@__PURE__*/ (function () {
+ function RefCountOperator(connectable) {
+ this.connectable = connectable;
}
- Action.prototype.schedule = function (state, delay) {
- if (delay === void 0) {
- delay = 0;
+ RefCountOperator.prototype.call = function (subscriber, source) {
+ var connectable = this.connectable;
+ connectable._refCount++;
+ var refCounter = new RefCountSubscriber(subscriber, connectable);
+ var subscription = source.subscribe(refCounter);
+ if (!refCounter.closed) {
+ refCounter.connection = connectable.connect();
}
- return this;
+ return subscription;
};
- return Action;
-}(_Subscription__WEBPACK_IMPORTED_MODULE_1__["Subscription"]));
-
-//# sourceMappingURL=Action.js.map
-
-
-/***/ }),
-/* 202 */
-/***/ (function(module, __webpack_exports__, __webpack_require__) {
-
-"use strict";
-__webpack_require__.r(__webpack_exports__);
-/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "AsyncScheduler", function() { return AsyncScheduler; });
-/* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(36);
-/* harmony import */ var _Scheduler__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(203);
-/** PURE_IMPORTS_START tslib,_Scheduler PURE_IMPORTS_END */
-
-
-var AsyncScheduler = /*@__PURE__*/ (function (_super) {
- tslib__WEBPACK_IMPORTED_MODULE_0__["__extends"](AsyncScheduler, _super);
- function AsyncScheduler(SchedulerAction, now) {
- if (now === void 0) {
- now = _Scheduler__WEBPACK_IMPORTED_MODULE_1__["Scheduler"].now;
- }
- var _this = _super.call(this, SchedulerAction, function () {
- if (AsyncScheduler.delegate && AsyncScheduler.delegate !== _this) {
- return AsyncScheduler.delegate.now();
- }
- else {
- return now();
- }
- }) || this;
- _this.actions = [];
- _this.active = false;
- _this.scheduled = undefined;
+ return RefCountOperator;
+}());
+var RefCountSubscriber = /*@__PURE__*/ (function (_super) {
+ tslib__WEBPACK_IMPORTED_MODULE_0__["__extends"](RefCountSubscriber, _super);
+ function RefCountSubscriber(destination, connectable) {
+ var _this = _super.call(this, destination) || this;
+ _this.connectable = connectable;
return _this;
}
- AsyncScheduler.prototype.schedule = function (work, delay, state) {
- if (delay === void 0) {
- delay = 0;
- }
- if (AsyncScheduler.delegate && AsyncScheduler.delegate !== this) {
- return AsyncScheduler.delegate.schedule(work, delay, state);
+ RefCountSubscriber.prototype._unsubscribe = function () {
+ var connectable = this.connectable;
+ if (!connectable) {
+ this.connection = null;
+ return;
}
- else {
- return _super.prototype.schedule.call(this, work, delay, state);
+ this.connectable = null;
+ var refCount = connectable._refCount;
+ if (refCount <= 0) {
+ this.connection = null;
+ return;
}
- };
- AsyncScheduler.prototype.flush = function (action) {
- var actions = this.actions;
- if (this.active) {
- actions.push(action);
+ connectable._refCount = refCount - 1;
+ if (refCount > 1) {
+ this.connection = null;
return;
}
- var error;
- this.active = true;
- do {
- if (error = action.execute(action.state, action.delay)) {
- break;
- }
- } while (action = actions.shift());
- this.active = false;
- if (error) {
- while (action = actions.shift()) {
- action.unsubscribe();
- }
- throw error;
+ var connection = this.connection;
+ var sharedConnection = connectable._connection;
+ this.connection = null;
+ if (sharedConnection && (!connection || sharedConnection === connection)) {
+ sharedConnection.unsubscribe();
}
};
- return AsyncScheduler;
-}(_Scheduler__WEBPACK_IMPORTED_MODULE_1__["Scheduler"]));
-
-//# sourceMappingURL=AsyncScheduler.js.map
+ return RefCountSubscriber;
+}(_Subscriber__WEBPACK_IMPORTED_MODULE_1__["Subscriber"]));
+//# sourceMappingURL=refCount.js.map
/***/ }),
-/* 203 */
+/* 191 */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
"use strict";
__webpack_require__.r(__webpack_exports__);
-/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "Scheduler", function() { return Scheduler; });
-var Scheduler = /*@__PURE__*/ (function () {
- function Scheduler(SchedulerAction, now) {
- if (now === void 0) {
- now = Scheduler.now;
- }
- this.SchedulerAction = SchedulerAction;
- this.now = now;
- }
- Scheduler.prototype.schedule = function (work, delay, state) {
- if (delay === void 0) {
- delay = 0;
- }
- return new this.SchedulerAction(this, work).schedule(state, delay);
- };
- Scheduler.now = function () { return Date.now(); };
- return Scheduler;
-}());
-
-//# sourceMappingURL=Scheduler.js.map
-
-
-/***/ }),
-/* 204 */
-/***/ (function(module, __webpack_exports__, __webpack_require__) {
+/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "groupBy", function() { return groupBy; });
+/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "GroupedObservable", function() { return GroupedObservable; });
+/* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(36);
+/* harmony import */ var _Subscriber__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(172);
+/* harmony import */ var _Subscription__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(177);
+/* harmony import */ var _Observable__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(170);
+/* harmony import */ var _Subject__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(187);
+/** PURE_IMPORTS_START tslib,_Subscriber,_Subscription,_Observable,_Subject PURE_IMPORTS_END */
-"use strict";
-__webpack_require__.r(__webpack_exports__);
-/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "timer", function() { return timer; });
-/* harmony import */ var _Observable__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(193);
-/* harmony import */ var _scheduler_async__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(199);
-/* harmony import */ var _util_isNumeric__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(205);
-/* harmony import */ var _util_isScheduler__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(206);
-/** PURE_IMPORTS_START _Observable,_scheduler_async,_util_isNumeric,_util_isScheduler PURE_IMPORTS_END */
-function timer(dueTime, periodOrScheduler, scheduler) {
- if (dueTime === void 0) {
- dueTime = 0;
- }
- var period = -1;
- if (Object(_util_isNumeric__WEBPACK_IMPORTED_MODULE_2__["isNumeric"])(periodOrScheduler)) {
- period = Number(periodOrScheduler) < 1 && 1 || Number(periodOrScheduler);
+function groupBy(keySelector, elementSelector, durationSelector, subjectSelector) {
+ return function (source) {
+ return source.lift(new GroupByOperator(keySelector, elementSelector, durationSelector, subjectSelector));
+ };
+}
+var GroupByOperator = /*@__PURE__*/ (function () {
+ function GroupByOperator(keySelector, elementSelector, durationSelector, subjectSelector) {
+ this.keySelector = keySelector;
+ this.elementSelector = elementSelector;
+ this.durationSelector = durationSelector;
+ this.subjectSelector = subjectSelector;
}
- else if (Object(_util_isScheduler__WEBPACK_IMPORTED_MODULE_3__["isScheduler"])(periodOrScheduler)) {
- scheduler = periodOrScheduler;
+ GroupByOperator.prototype.call = function (subscriber, source) {
+ return source.subscribe(new GroupBySubscriber(subscriber, this.keySelector, this.elementSelector, this.durationSelector, this.subjectSelector));
+ };
+ return GroupByOperator;
+}());
+var GroupBySubscriber = /*@__PURE__*/ (function (_super) {
+ tslib__WEBPACK_IMPORTED_MODULE_0__["__extends"](GroupBySubscriber, _super);
+ function GroupBySubscriber(destination, keySelector, elementSelector, durationSelector, subjectSelector) {
+ var _this = _super.call(this, destination) || this;
+ _this.keySelector = keySelector;
+ _this.elementSelector = elementSelector;
+ _this.durationSelector = durationSelector;
+ _this.subjectSelector = subjectSelector;
+ _this.groups = null;
+ _this.attemptedToUnsubscribe = false;
+ _this.count = 0;
+ return _this;
}
- if (!Object(_util_isScheduler__WEBPACK_IMPORTED_MODULE_3__["isScheduler"])(scheduler)) {
- scheduler = _scheduler_async__WEBPACK_IMPORTED_MODULE_1__["async"];
+ GroupBySubscriber.prototype._next = function (value) {
+ var key;
+ try {
+ key = this.keySelector(value);
+ }
+ catch (err) {
+ this.error(err);
+ return;
+ }
+ this._group(value, key);
+ };
+ GroupBySubscriber.prototype._group = function (value, key) {
+ var groups = this.groups;
+ if (!groups) {
+ groups = this.groups = new Map();
+ }
+ var group = groups.get(key);
+ var element;
+ if (this.elementSelector) {
+ try {
+ element = this.elementSelector(value);
+ }
+ catch (err) {
+ this.error(err);
+ }
+ }
+ else {
+ element = value;
+ }
+ if (!group) {
+ group = (this.subjectSelector ? this.subjectSelector() : new _Subject__WEBPACK_IMPORTED_MODULE_4__["Subject"]());
+ groups.set(key, group);
+ var groupedObservable = new GroupedObservable(key, group, this);
+ this.destination.next(groupedObservable);
+ if (this.durationSelector) {
+ var duration = void 0;
+ try {
+ duration = this.durationSelector(new GroupedObservable(key, group));
+ }
+ catch (err) {
+ this.error(err);
+ return;
+ }
+ this.add(duration.subscribe(new GroupDurationSubscriber(key, group, this)));
+ }
+ }
+ if (!group.closed) {
+ group.next(element);
+ }
+ };
+ GroupBySubscriber.prototype._error = function (err) {
+ var groups = this.groups;
+ if (groups) {
+ groups.forEach(function (group, key) {
+ group.error(err);
+ });
+ groups.clear();
+ }
+ this.destination.error(err);
+ };
+ GroupBySubscriber.prototype._complete = function () {
+ var groups = this.groups;
+ if (groups) {
+ groups.forEach(function (group, key) {
+ group.complete();
+ });
+ groups.clear();
+ }
+ this.destination.complete();
+ };
+ GroupBySubscriber.prototype.removeGroup = function (key) {
+ this.groups.delete(key);
+ };
+ GroupBySubscriber.prototype.unsubscribe = function () {
+ if (!this.closed) {
+ this.attemptedToUnsubscribe = true;
+ if (this.count === 0) {
+ _super.prototype.unsubscribe.call(this);
+ }
+ }
+ };
+ return GroupBySubscriber;
+}(_Subscriber__WEBPACK_IMPORTED_MODULE_1__["Subscriber"]));
+var GroupDurationSubscriber = /*@__PURE__*/ (function (_super) {
+ tslib__WEBPACK_IMPORTED_MODULE_0__["__extends"](GroupDurationSubscriber, _super);
+ function GroupDurationSubscriber(key, group, parent) {
+ var _this = _super.call(this, group) || this;
+ _this.key = key;
+ _this.group = group;
+ _this.parent = parent;
+ return _this;
}
- return new _Observable__WEBPACK_IMPORTED_MODULE_0__["Observable"](function (subscriber) {
- var due = Object(_util_isNumeric__WEBPACK_IMPORTED_MODULE_2__["isNumeric"])(dueTime)
- ? dueTime
- : (+dueTime - scheduler.now());
- return scheduler.schedule(dispatch, due, {
- index: 0, period: period, subscriber: subscriber
- });
- });
-}
-function dispatch(state) {
- var index = state.index, period = state.period, subscriber = state.subscriber;
- subscriber.next(index);
- if (subscriber.closed) {
- return;
+ GroupDurationSubscriber.prototype._next = function (value) {
+ this.complete();
+ };
+ GroupDurationSubscriber.prototype._unsubscribe = function () {
+ var _a = this, parent = _a.parent, key = _a.key;
+ this.key = this.parent = null;
+ if (parent) {
+ parent.removeGroup(key);
+ }
+ };
+ return GroupDurationSubscriber;
+}(_Subscriber__WEBPACK_IMPORTED_MODULE_1__["Subscriber"]));
+var GroupedObservable = /*@__PURE__*/ (function (_super) {
+ tslib__WEBPACK_IMPORTED_MODULE_0__["__extends"](GroupedObservable, _super);
+ function GroupedObservable(key, groupSubject, refCountSubscription) {
+ var _this = _super.call(this) || this;
+ _this.key = key;
+ _this.groupSubject = groupSubject;
+ _this.refCountSubscription = refCountSubscription;
+ return _this;
}
- else if (period === -1) {
- return subscriber.complete();
+ GroupedObservable.prototype._subscribe = function (subscriber) {
+ var subscription = new _Subscription__WEBPACK_IMPORTED_MODULE_2__["Subscription"]();
+ var _a = this, refCountSubscription = _a.refCountSubscription, groupSubject = _a.groupSubject;
+ if (refCountSubscription && !refCountSubscription.closed) {
+ subscription.add(new InnerRefCountSubscription(refCountSubscription));
+ }
+ subscription.add(groupSubject.subscribe(subscriber));
+ return subscription;
+ };
+ return GroupedObservable;
+}(_Observable__WEBPACK_IMPORTED_MODULE_3__["Observable"]));
+
+var InnerRefCountSubscription = /*@__PURE__*/ (function (_super) {
+ tslib__WEBPACK_IMPORTED_MODULE_0__["__extends"](InnerRefCountSubscription, _super);
+ function InnerRefCountSubscription(parent) {
+ var _this = _super.call(this) || this;
+ _this.parent = parent;
+ parent.count++;
+ return _this;
}
- state.index = index + 1;
- this.schedule(state, period);
-}
-//# sourceMappingURL=timer.js.map
+ InnerRefCountSubscription.prototype.unsubscribe = function () {
+ var parent = this.parent;
+ if (!parent.closed && !this.closed) {
+ _super.prototype.unsubscribe.call(this);
+ parent.count -= 1;
+ if (parent.count === 0 && parent.attemptedToUnsubscribe) {
+ parent.unsubscribe();
+ }
+ }
+ };
+ return InnerRefCountSubscription;
+}(_Subscription__WEBPACK_IMPORTED_MODULE_2__["Subscription"]));
+//# sourceMappingURL=groupBy.js.map
/***/ }),
-/* 205 */
+/* 192 */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
"use strict";
__webpack_require__.r(__webpack_exports__);
-/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "isNumeric", function() { return isNumeric; });
-/* harmony import */ var _isArray__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(178);
-/** PURE_IMPORTS_START _isArray PURE_IMPORTS_END */
+/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "BehaviorSubject", function() { return BehaviorSubject; });
+/* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(36);
+/* harmony import */ var _Subject__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(187);
+/* harmony import */ var _util_ObjectUnsubscribedError__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(188);
+/** PURE_IMPORTS_START tslib,_Subject,_util_ObjectUnsubscribedError PURE_IMPORTS_END */
-function isNumeric(val) {
- return !Object(_isArray__WEBPACK_IMPORTED_MODULE_0__["isArray"])(val) && (val - parseFloat(val) + 1) >= 0;
-}
-//# sourceMappingURL=isNumeric.js.map
-/***/ }),
-/* 206 */
-/***/ (function(module, __webpack_exports__, __webpack_require__) {
+var BehaviorSubject = /*@__PURE__*/ (function (_super) {
+ tslib__WEBPACK_IMPORTED_MODULE_0__["__extends"](BehaviorSubject, _super);
+ function BehaviorSubject(_value) {
+ var _this = _super.call(this) || this;
+ _this._value = _value;
+ return _this;
+ }
+ Object.defineProperty(BehaviorSubject.prototype, "value", {
+ get: function () {
+ return this.getValue();
+ },
+ enumerable: true,
+ configurable: true
+ });
+ BehaviorSubject.prototype._subscribe = function (subscriber) {
+ var subscription = _super.prototype._subscribe.call(this, subscriber);
+ if (subscription && !subscription.closed) {
+ subscriber.next(this._value);
+ }
+ return subscription;
+ };
+ BehaviorSubject.prototype.getValue = function () {
+ if (this.hasError) {
+ throw this.thrownError;
+ }
+ else if (this.closed) {
+ throw new _util_ObjectUnsubscribedError__WEBPACK_IMPORTED_MODULE_2__["ObjectUnsubscribedError"]();
+ }
+ else {
+ return this._value;
+ }
+ };
+ BehaviorSubject.prototype.next = function (value) {
+ _super.prototype.next.call(this, this._value = value);
+ };
+ return BehaviorSubject;
+}(_Subject__WEBPACK_IMPORTED_MODULE_1__["Subject"]));
-"use strict";
-__webpack_require__.r(__webpack_exports__);
-/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "isScheduler", function() { return isScheduler; });
-/** PURE_IMPORTS_START PURE_IMPORTS_END */
-function isScheduler(value) {
- return value && typeof value.schedule === 'function';
-}
-//# sourceMappingURL=isScheduler.js.map
+//# sourceMappingURL=BehaviorSubject.js.map
/***/ }),
-/* 207 */
+/* 193 */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
"use strict";
__webpack_require__.r(__webpack_exports__);
-/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "buffer", function() { return buffer; });
+/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ReplaySubject", function() { return ReplaySubject; });
/* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(36);
-/* harmony import */ var _OuterSubscriber__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(171);
-/* harmony import */ var _util_subscribeToResult__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(182);
-/** PURE_IMPORTS_START tslib,_OuterSubscriber,_util_subscribeToResult PURE_IMPORTS_END */
-
+/* harmony import */ var _Subject__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(187);
+/* harmony import */ var _scheduler_queue__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(194);
+/* harmony import */ var _Subscription__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(177);
+/* harmony import */ var _operators_observeOn__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(201);
+/* harmony import */ var _util_ObjectUnsubscribedError__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(188);
+/* harmony import */ var _SubjectSubscription__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(189);
+/** PURE_IMPORTS_START tslib,_Subject,_scheduler_queue,_Subscription,_operators_observeOn,_util_ObjectUnsubscribedError,_SubjectSubscription PURE_IMPORTS_END */
-function buffer(closingNotifier) {
- return function bufferOperatorFunction(source) {
- return source.lift(new BufferOperator(closingNotifier));
- };
-}
-var BufferOperator = /*@__PURE__*/ (function () {
- function BufferOperator(closingNotifier) {
- this.closingNotifier = closingNotifier;
- }
- BufferOperator.prototype.call = function (subscriber, source) {
- return source.subscribe(new BufferSubscriber(subscriber, this.closingNotifier));
- };
- return BufferOperator;
-}());
-var BufferSubscriber = /*@__PURE__*/ (function (_super) {
- tslib__WEBPACK_IMPORTED_MODULE_0__["__extends"](BufferSubscriber, _super);
- function BufferSubscriber(destination, closingNotifier) {
- var _this = _super.call(this, destination) || this;
- _this.buffer = [];
- _this.add(Object(_util_subscribeToResult__WEBPACK_IMPORTED_MODULE_2__["subscribeToResult"])(_this, closingNotifier));
- return _this;
- }
- BufferSubscriber.prototype._next = function (value) {
- this.buffer.push(value);
- };
- BufferSubscriber.prototype.notifyNext = function (outerValue, innerValue, outerIndex, innerIndex, innerSub) {
- var buffer = this.buffer;
- this.buffer = [];
- this.destination.next(buffer);
- };
- return BufferSubscriber;
-}(_OuterSubscriber__WEBPACK_IMPORTED_MODULE_1__["OuterSubscriber"]));
-//# sourceMappingURL=buffer.js.map
-/***/ }),
-/* 208 */
-/***/ (function(module, __webpack_exports__, __webpack_require__) {
-"use strict";
-__webpack_require__.r(__webpack_exports__);
-/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "bufferCount", function() { return bufferCount; });
-/* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(36);
-/* harmony import */ var _Subscriber__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(172);
-/** PURE_IMPORTS_START tslib,_Subscriber PURE_IMPORTS_END */
-function bufferCount(bufferSize, startBufferEvery) {
- if (startBufferEvery === void 0) {
- startBufferEvery = null;
- }
- return function bufferCountOperatorFunction(source) {
- return source.lift(new BufferCountOperator(bufferSize, startBufferEvery));
- };
-}
-var BufferCountOperator = /*@__PURE__*/ (function () {
- function BufferCountOperator(bufferSize, startBufferEvery) {
- this.bufferSize = bufferSize;
- this.startBufferEvery = startBufferEvery;
- if (!startBufferEvery || bufferSize === startBufferEvery) {
- this.subscriberClass = BufferCountSubscriber;
+var ReplaySubject = /*@__PURE__*/ (function (_super) {
+ tslib__WEBPACK_IMPORTED_MODULE_0__["__extends"](ReplaySubject, _super);
+ function ReplaySubject(bufferSize, windowTime, scheduler) {
+ if (bufferSize === void 0) {
+ bufferSize = Number.POSITIVE_INFINITY;
+ }
+ if (windowTime === void 0) {
+ windowTime = Number.POSITIVE_INFINITY;
+ }
+ var _this = _super.call(this) || this;
+ _this.scheduler = scheduler;
+ _this._events = [];
+ _this._infiniteTimeWindow = false;
+ _this._bufferSize = bufferSize < 1 ? 1 : bufferSize;
+ _this._windowTime = windowTime < 1 ? 1 : windowTime;
+ if (windowTime === Number.POSITIVE_INFINITY) {
+ _this._infiniteTimeWindow = true;
+ _this.next = _this.nextInfiniteTimeWindow;
}
else {
- this.subscriberClass = BufferSkipCountSubscriber;
+ _this.next = _this.nextTimeWindow;
}
- }
- BufferCountOperator.prototype.call = function (subscriber, source) {
- return source.subscribe(new this.subscriberClass(subscriber, this.bufferSize, this.startBufferEvery));
- };
- return BufferCountOperator;
-}());
-var BufferCountSubscriber = /*@__PURE__*/ (function (_super) {
- tslib__WEBPACK_IMPORTED_MODULE_0__["__extends"](BufferCountSubscriber, _super);
- function BufferCountSubscriber(destination, bufferSize) {
- var _this = _super.call(this, destination) || this;
- _this.bufferSize = bufferSize;
- _this.buffer = [];
return _this;
}
- BufferCountSubscriber.prototype._next = function (value) {
- var buffer = this.buffer;
- buffer.push(value);
- if (buffer.length == this.bufferSize) {
- this.destination.next(buffer);
- this.buffer = [];
+ ReplaySubject.prototype.nextInfiniteTimeWindow = function (value) {
+ var _events = this._events;
+ _events.push(value);
+ if (_events.length > this._bufferSize) {
+ _events.shift();
}
+ _super.prototype.next.call(this, value);
};
- BufferCountSubscriber.prototype._complete = function () {
- var buffer = this.buffer;
- if (buffer.length > 0) {
- this.destination.next(buffer);
- }
- _super.prototype._complete.call(this);
+ ReplaySubject.prototype.nextTimeWindow = function (value) {
+ this._events.push(new ReplayEvent(this._getNow(), value));
+ this._trimBufferThenGetEvents();
+ _super.prototype.next.call(this, value);
};
- return BufferCountSubscriber;
-}(_Subscriber__WEBPACK_IMPORTED_MODULE_1__["Subscriber"]));
-var BufferSkipCountSubscriber = /*@__PURE__*/ (function (_super) {
- tslib__WEBPACK_IMPORTED_MODULE_0__["__extends"](BufferSkipCountSubscriber, _super);
- function BufferSkipCountSubscriber(destination, bufferSize, startBufferEvery) {
- var _this = _super.call(this, destination) || this;
- _this.bufferSize = bufferSize;
- _this.startBufferEvery = startBufferEvery;
- _this.buffers = [];
- _this.count = 0;
- return _this;
- }
- BufferSkipCountSubscriber.prototype._next = function (value) {
- var _a = this, bufferSize = _a.bufferSize, startBufferEvery = _a.startBufferEvery, buffers = _a.buffers, count = _a.count;
- this.count++;
- if (count % startBufferEvery === 0) {
- buffers.push([]);
+ ReplaySubject.prototype._subscribe = function (subscriber) {
+ var _infiniteTimeWindow = this._infiniteTimeWindow;
+ var _events = _infiniteTimeWindow ? this._events : this._trimBufferThenGetEvents();
+ var scheduler = this.scheduler;
+ var len = _events.length;
+ var subscription;
+ if (this.closed) {
+ throw new _util_ObjectUnsubscribedError__WEBPACK_IMPORTED_MODULE_5__["ObjectUnsubscribedError"]();
}
- for (var i = buffers.length; i--;) {
- var buffer = buffers[i];
- buffer.push(value);
- if (buffer.length === bufferSize) {
- buffers.splice(i, 1);
- this.destination.next(buffer);
+ else if (this.isStopped || this.hasError) {
+ subscription = _Subscription__WEBPACK_IMPORTED_MODULE_3__["Subscription"].EMPTY;
+ }
+ else {
+ this.observers.push(subscriber);
+ subscription = new _SubjectSubscription__WEBPACK_IMPORTED_MODULE_6__["SubjectSubscription"](this, subscriber);
+ }
+ if (scheduler) {
+ subscriber.add(subscriber = new _operators_observeOn__WEBPACK_IMPORTED_MODULE_4__["ObserveOnSubscriber"](subscriber, scheduler));
+ }
+ if (_infiniteTimeWindow) {
+ for (var i = 0; i < len && !subscriber.closed; i++) {
+ subscriber.next(_events[i]);
+ }
+ }
+ else {
+ for (var i = 0; i < len && !subscriber.closed; i++) {
+ subscriber.next(_events[i].value);
}
}
+ if (this.hasError) {
+ subscriber.error(this.thrownError);
+ }
+ else if (this.isStopped) {
+ subscriber.complete();
+ }
+ return subscription;
};
- BufferSkipCountSubscriber.prototype._complete = function () {
- var _a = this, buffers = _a.buffers, destination = _a.destination;
- while (buffers.length > 0) {
- var buffer = buffers.shift();
- if (buffer.length > 0) {
- destination.next(buffer);
+ ReplaySubject.prototype._getNow = function () {
+ return (this.scheduler || _scheduler_queue__WEBPACK_IMPORTED_MODULE_2__["queue"]).now();
+ };
+ ReplaySubject.prototype._trimBufferThenGetEvents = function () {
+ var now = this._getNow();
+ var _bufferSize = this._bufferSize;
+ var _windowTime = this._windowTime;
+ var _events = this._events;
+ var eventsCount = _events.length;
+ var spliceCount = 0;
+ while (spliceCount < eventsCount) {
+ if ((now - _events[spliceCount].time) < _windowTime) {
+ break;
}
+ spliceCount++;
}
- _super.prototype._complete.call(this);
+ if (eventsCount > _bufferSize) {
+ spliceCount = Math.max(spliceCount, eventsCount - _bufferSize);
+ }
+ if (spliceCount > 0) {
+ _events.splice(0, spliceCount);
+ }
+ return _events;
};
- return BufferSkipCountSubscriber;
-}(_Subscriber__WEBPACK_IMPORTED_MODULE_1__["Subscriber"]));
-//# sourceMappingURL=bufferCount.js.map
+ return ReplaySubject;
+}(_Subject__WEBPACK_IMPORTED_MODULE_1__["Subject"]));
+
+var ReplayEvent = /*@__PURE__*/ (function () {
+ function ReplayEvent(time, value) {
+ this.time = time;
+ this.value = value;
+ }
+ return ReplayEvent;
+}());
+//# sourceMappingURL=ReplaySubject.js.map
/***/ }),
-/* 209 */
+/* 194 */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
"use strict";
__webpack_require__.r(__webpack_exports__);
-/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "bufferTime", function() { return bufferTime; });
-/* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(36);
-/* harmony import */ var _scheduler_async__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(199);
-/* harmony import */ var _Subscriber__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(172);
-/* harmony import */ var _util_isScheduler__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(206);
-/** PURE_IMPORTS_START tslib,_scheduler_async,_Subscriber,_util_isScheduler PURE_IMPORTS_END */
+/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "queue", function() { return queue; });
+/* harmony import */ var _QueueAction__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(195);
+/* harmony import */ var _QueueScheduler__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(198);
+/** PURE_IMPORTS_START _QueueAction,_QueueScheduler PURE_IMPORTS_END */
+var queue = /*@__PURE__*/ new _QueueScheduler__WEBPACK_IMPORTED_MODULE_1__["QueueScheduler"](_QueueAction__WEBPACK_IMPORTED_MODULE_0__["QueueAction"]);
+//# sourceMappingURL=queue.js.map
-function bufferTime(bufferTimeSpan) {
- var length = arguments.length;
- var scheduler = _scheduler_async__WEBPACK_IMPORTED_MODULE_1__["async"];
- if (Object(_util_isScheduler__WEBPACK_IMPORTED_MODULE_3__["isScheduler"])(arguments[arguments.length - 1])) {
- scheduler = arguments[arguments.length - 1];
- length--;
- }
- var bufferCreationInterval = null;
- if (length >= 2) {
- bufferCreationInterval = arguments[1];
+/***/ }),
+/* 195 */
+/***/ (function(module, __webpack_exports__, __webpack_require__) {
+
+"use strict";
+__webpack_require__.r(__webpack_exports__);
+/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "QueueAction", function() { return QueueAction; });
+/* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(36);
+/* harmony import */ var _AsyncAction__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(196);
+/** PURE_IMPORTS_START tslib,_AsyncAction PURE_IMPORTS_END */
+
+
+var QueueAction = /*@__PURE__*/ (function (_super) {
+ tslib__WEBPACK_IMPORTED_MODULE_0__["__extends"](QueueAction, _super);
+ function QueueAction(scheduler, work) {
+ var _this = _super.call(this, scheduler, work) || this;
+ _this.scheduler = scheduler;
+ _this.work = work;
+ return _this;
}
- var maxBufferSize = Number.POSITIVE_INFINITY;
- if (length >= 3) {
- maxBufferSize = arguments[2];
- }
- return function bufferTimeOperatorFunction(source) {
- return source.lift(new BufferTimeOperator(bufferTimeSpan, bufferCreationInterval, maxBufferSize, scheduler));
- };
-}
-var BufferTimeOperator = /*@__PURE__*/ (function () {
- function BufferTimeOperator(bufferTimeSpan, bufferCreationInterval, maxBufferSize, scheduler) {
- this.bufferTimeSpan = bufferTimeSpan;
- this.bufferCreationInterval = bufferCreationInterval;
- this.maxBufferSize = maxBufferSize;
- this.scheduler = scheduler;
- }
- BufferTimeOperator.prototype.call = function (subscriber, source) {
- return source.subscribe(new BufferTimeSubscriber(subscriber, this.bufferTimeSpan, this.bufferCreationInterval, this.maxBufferSize, this.scheduler));
- };
- return BufferTimeOperator;
-}());
-var Context = /*@__PURE__*/ (function () {
- function Context() {
- this.buffer = [];
- }
- return Context;
-}());
-var BufferTimeSubscriber = /*@__PURE__*/ (function (_super) {
- tslib__WEBPACK_IMPORTED_MODULE_0__["__extends"](BufferTimeSubscriber, _super);
- function BufferTimeSubscriber(destination, bufferTimeSpan, bufferCreationInterval, maxBufferSize, scheduler) {
- var _this = _super.call(this, destination) || this;
- _this.bufferTimeSpan = bufferTimeSpan;
- _this.bufferCreationInterval = bufferCreationInterval;
- _this.maxBufferSize = maxBufferSize;
- _this.scheduler = scheduler;
- _this.contexts = [];
- var context = _this.openContext();
- _this.timespanOnly = bufferCreationInterval == null || bufferCreationInterval < 0;
- if (_this.timespanOnly) {
- var timeSpanOnlyState = { subscriber: _this, context: context, bufferTimeSpan: bufferTimeSpan };
- _this.add(context.closeAction = scheduler.schedule(dispatchBufferTimeSpanOnly, bufferTimeSpan, timeSpanOnlyState));
- }
- else {
- var closeState = { subscriber: _this, context: context };
- var creationState = { bufferTimeSpan: bufferTimeSpan, bufferCreationInterval: bufferCreationInterval, subscriber: _this, scheduler: scheduler };
- _this.add(context.closeAction = scheduler.schedule(dispatchBufferClose, bufferTimeSpan, closeState));
- _this.add(scheduler.schedule(dispatchBufferCreation, bufferCreationInterval, creationState));
- }
- return _this;
- }
- BufferTimeSubscriber.prototype._next = function (value) {
- var contexts = this.contexts;
- var len = contexts.length;
- var filledBufferContext;
- for (var i = 0; i < len; i++) {
- var context_1 = contexts[i];
- var buffer = context_1.buffer;
- buffer.push(value);
- if (buffer.length == this.maxBufferSize) {
- filledBufferContext = context_1;
- }
- }
- if (filledBufferContext) {
- this.onBufferFull(filledBufferContext);
+ QueueAction.prototype.schedule = function (state, delay) {
+ if (delay === void 0) {
+ delay = 0;
}
- };
- BufferTimeSubscriber.prototype._error = function (err) {
- this.contexts.length = 0;
- _super.prototype._error.call(this, err);
- };
- BufferTimeSubscriber.prototype._complete = function () {
- var _a = this, contexts = _a.contexts, destination = _a.destination;
- while (contexts.length > 0) {
- var context_2 = contexts.shift();
- destination.next(context_2.buffer);
+ if (delay > 0) {
+ return _super.prototype.schedule.call(this, state, delay);
}
- _super.prototype._complete.call(this);
+ this.delay = delay;
+ this.state = state;
+ this.scheduler.flush(this);
+ return this;
};
- BufferTimeSubscriber.prototype._unsubscribe = function () {
- this.contexts = null;
+ QueueAction.prototype.execute = function (state, delay) {
+ return (delay > 0 || this.closed) ?
+ _super.prototype.execute.call(this, state, delay) :
+ this._execute(state, delay);
};
- BufferTimeSubscriber.prototype.onBufferFull = function (context) {
- this.closeContext(context);
- var closeAction = context.closeAction;
- closeAction.unsubscribe();
- this.remove(closeAction);
- if (!this.closed && this.timespanOnly) {
- context = this.openContext();
- var bufferTimeSpan = this.bufferTimeSpan;
- var timeSpanOnlyState = { subscriber: this, context: context, bufferTimeSpan: bufferTimeSpan };
- this.add(context.closeAction = this.scheduler.schedule(dispatchBufferTimeSpanOnly, bufferTimeSpan, timeSpanOnlyState));
+ QueueAction.prototype.requestAsyncId = function (scheduler, id, delay) {
+ if (delay === void 0) {
+ delay = 0;
}
- };
- BufferTimeSubscriber.prototype.openContext = function () {
- var context = new Context();
- this.contexts.push(context);
- return context;
- };
- BufferTimeSubscriber.prototype.closeContext = function (context) {
- this.destination.next(context.buffer);
- var contexts = this.contexts;
- var spliceIndex = contexts ? contexts.indexOf(context) : -1;
- if (spliceIndex >= 0) {
- contexts.splice(contexts.indexOf(context), 1);
+ if ((delay !== null && delay > 0) || (delay === null && this.delay > 0)) {
+ return _super.prototype.requestAsyncId.call(this, scheduler, id, delay);
}
+ return scheduler.flush(this);
};
- return BufferTimeSubscriber;
-}(_Subscriber__WEBPACK_IMPORTED_MODULE_2__["Subscriber"]));
-function dispatchBufferTimeSpanOnly(state) {
- var subscriber = state.subscriber;
- var prevContext = state.context;
- if (prevContext) {
- subscriber.closeContext(prevContext);
- }
- if (!subscriber.closed) {
- state.context = subscriber.openContext();
- state.context.closeAction = this.schedule(state, state.bufferTimeSpan);
- }
-}
-function dispatchBufferCreation(state) {
- var bufferCreationInterval = state.bufferCreationInterval, bufferTimeSpan = state.bufferTimeSpan, subscriber = state.subscriber, scheduler = state.scheduler;
- var context = subscriber.openContext();
- var action = this;
- if (!subscriber.closed) {
- subscriber.add(context.closeAction = scheduler.schedule(dispatchBufferClose, bufferTimeSpan, { subscriber: subscriber, context: context }));
- action.schedule(state, bufferCreationInterval);
- }
-}
-function dispatchBufferClose(arg) {
- var subscriber = arg.subscriber, context = arg.context;
- subscriber.closeContext(context);
-}
-//# sourceMappingURL=bufferTime.js.map
+ return QueueAction;
+}(_AsyncAction__WEBPACK_IMPORTED_MODULE_1__["AsyncAction"]));
+
+//# sourceMappingURL=QueueAction.js.map
/***/ }),
-/* 210 */
+/* 196 */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
"use strict";
__webpack_require__.r(__webpack_exports__);
-/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "bufferToggle", function() { return bufferToggle; });
+/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "AsyncAction", function() { return AsyncAction; });
/* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(36);
-/* harmony import */ var _Subscription__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(177);
-/* harmony import */ var _util_subscribeToResult__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(182);
-/* harmony import */ var _OuterSubscriber__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(171);
-/** PURE_IMPORTS_START tslib,_Subscription,_util_subscribeToResult,_OuterSubscriber PURE_IMPORTS_END */
-
-
+/* harmony import */ var _Action__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(197);
+/** PURE_IMPORTS_START tslib,_Action PURE_IMPORTS_END */
-function bufferToggle(openings, closingSelector) {
- return function bufferToggleOperatorFunction(source) {
- return source.lift(new BufferToggleOperator(openings, closingSelector));
- };
-}
-var BufferToggleOperator = /*@__PURE__*/ (function () {
- function BufferToggleOperator(openings, closingSelector) {
- this.openings = openings;
- this.closingSelector = closingSelector;
- }
- BufferToggleOperator.prototype.call = function (subscriber, source) {
- return source.subscribe(new BufferToggleSubscriber(subscriber, this.openings, this.closingSelector));
- };
- return BufferToggleOperator;
-}());
-var BufferToggleSubscriber = /*@__PURE__*/ (function (_super) {
- tslib__WEBPACK_IMPORTED_MODULE_0__["__extends"](BufferToggleSubscriber, _super);
- function BufferToggleSubscriber(destination, openings, closingSelector) {
- var _this = _super.call(this, destination) || this;
- _this.openings = openings;
- _this.closingSelector = closingSelector;
- _this.contexts = [];
- _this.add(Object(_util_subscribeToResult__WEBPACK_IMPORTED_MODULE_2__["subscribeToResult"])(_this, openings));
+var AsyncAction = /*@__PURE__*/ (function (_super) {
+ tslib__WEBPACK_IMPORTED_MODULE_0__["__extends"](AsyncAction, _super);
+ function AsyncAction(scheduler, work) {
+ var _this = _super.call(this, scheduler, work) || this;
+ _this.scheduler = scheduler;
+ _this.work = work;
+ _this.pending = false;
return _this;
}
- BufferToggleSubscriber.prototype._next = function (value) {
- var contexts = this.contexts;
- var len = contexts.length;
- for (var i = 0; i < len; i++) {
- contexts[i].buffer.push(value);
+ AsyncAction.prototype.schedule = function (state, delay) {
+ if (delay === void 0) {
+ delay = 0;
}
- };
- BufferToggleSubscriber.prototype._error = function (err) {
- var contexts = this.contexts;
- while (contexts.length > 0) {
- var context_1 = contexts.shift();
- context_1.subscription.unsubscribe();
- context_1.buffer = null;
- context_1.subscription = null;
+ if (this.closed) {
+ return this;
}
- this.contexts = null;
- _super.prototype._error.call(this, err);
+ this.state = state;
+ var id = this.id;
+ var scheduler = this.scheduler;
+ if (id != null) {
+ this.id = this.recycleAsyncId(scheduler, id, delay);
+ }
+ this.pending = true;
+ this.delay = delay;
+ this.id = this.id || this.requestAsyncId(scheduler, this.id, delay);
+ return this;
};
- BufferToggleSubscriber.prototype._complete = function () {
- var contexts = this.contexts;
- while (contexts.length > 0) {
- var context_2 = contexts.shift();
- this.destination.next(context_2.buffer);
- context_2.subscription.unsubscribe();
- context_2.buffer = null;
- context_2.subscription = null;
+ AsyncAction.prototype.requestAsyncId = function (scheduler, id, delay) {
+ if (delay === void 0) {
+ delay = 0;
}
- this.contexts = null;
- _super.prototype._complete.call(this);
+ return setInterval(scheduler.flush.bind(scheduler, this), delay);
};
- BufferToggleSubscriber.prototype.notifyNext = function (outerValue, innerValue, outerIndex, innerIndex, innerSub) {
- outerValue ? this.closeBuffer(outerValue) : this.openBuffer(innerValue);
+ AsyncAction.prototype.recycleAsyncId = function (scheduler, id, delay) {
+ if (delay === void 0) {
+ delay = 0;
+ }
+ if (delay !== null && this.delay === delay && this.pending === false) {
+ return id;
+ }
+ clearInterval(id);
+ return undefined;
};
- BufferToggleSubscriber.prototype.notifyComplete = function (innerSub) {
- this.closeBuffer(innerSub.context);
+ AsyncAction.prototype.execute = function (state, delay) {
+ if (this.closed) {
+ return new Error('executing a cancelled action');
+ }
+ this.pending = false;
+ var error = this._execute(state, delay);
+ if (error) {
+ return error;
+ }
+ else if (this.pending === false && this.id != null) {
+ this.id = this.recycleAsyncId(this.scheduler, this.id, null);
+ }
};
- BufferToggleSubscriber.prototype.openBuffer = function (value) {
+ AsyncAction.prototype._execute = function (state, delay) {
+ var errored = false;
+ var errorValue = undefined;
try {
- var closingSelector = this.closingSelector;
- var closingNotifier = closingSelector.call(this, value);
- if (closingNotifier) {
- this.trySubscribe(closingNotifier);
- }
+ this.work(state);
}
- catch (err) {
- this._error(err);
+ catch (e) {
+ errored = true;
+ errorValue = !!e && e || new Error(e);
}
- };
- BufferToggleSubscriber.prototype.closeBuffer = function (context) {
- var contexts = this.contexts;
- if (contexts && context) {
- var buffer = context.buffer, subscription = context.subscription;
- this.destination.next(buffer);
- contexts.splice(contexts.indexOf(context), 1);
- this.remove(subscription);
- subscription.unsubscribe();
+ if (errored) {
+ this.unsubscribe();
+ return errorValue;
}
};
- BufferToggleSubscriber.prototype.trySubscribe = function (closingNotifier) {
- var contexts = this.contexts;
- var buffer = [];
- var subscription = new _Subscription__WEBPACK_IMPORTED_MODULE_1__["Subscription"]();
- var context = { buffer: buffer, subscription: subscription };
- contexts.push(context);
- var innerSubscription = Object(_util_subscribeToResult__WEBPACK_IMPORTED_MODULE_2__["subscribeToResult"])(this, closingNotifier, context);
- if (!innerSubscription || innerSubscription.closed) {
- this.closeBuffer(context);
+ AsyncAction.prototype._unsubscribe = function () {
+ var id = this.id;
+ var scheduler = this.scheduler;
+ var actions = scheduler.actions;
+ var index = actions.indexOf(this);
+ this.work = null;
+ this.state = null;
+ this.pending = false;
+ this.scheduler = null;
+ if (index !== -1) {
+ actions.splice(index, 1);
}
- else {
- innerSubscription.context = context;
- this.add(innerSubscription);
- subscription.add(innerSubscription);
+ if (id != null) {
+ this.id = this.recycleAsyncId(scheduler, id, null);
}
+ this.delay = null;
};
- return BufferToggleSubscriber;
-}(_OuterSubscriber__WEBPACK_IMPORTED_MODULE_3__["OuterSubscriber"]));
-//# sourceMappingURL=bufferToggle.js.map
+ return AsyncAction;
+}(_Action__WEBPACK_IMPORTED_MODULE_1__["Action"]));
+
+//# sourceMappingURL=AsyncAction.js.map
/***/ }),
-/* 211 */
+/* 197 */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
"use strict";
__webpack_require__.r(__webpack_exports__);
-/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "bufferWhen", function() { return bufferWhen; });
+/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "Action", function() { return Action; });
/* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(36);
/* harmony import */ var _Subscription__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(177);
-/* harmony import */ var _OuterSubscriber__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(171);
-/* harmony import */ var _util_subscribeToResult__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(182);
-/** PURE_IMPORTS_START tslib,_Subscription,_OuterSubscriber,_util_subscribeToResult PURE_IMPORTS_END */
-
-
+/** PURE_IMPORTS_START tslib,_Subscription PURE_IMPORTS_END */
-function bufferWhen(closingSelector) {
- return function (source) {
- return source.lift(new BufferWhenOperator(closingSelector));
- };
-}
-var BufferWhenOperator = /*@__PURE__*/ (function () {
- function BufferWhenOperator(closingSelector) {
- this.closingSelector = closingSelector;
- }
- BufferWhenOperator.prototype.call = function (subscriber, source) {
- return source.subscribe(new BufferWhenSubscriber(subscriber, this.closingSelector));
- };
- return BufferWhenOperator;
-}());
-var BufferWhenSubscriber = /*@__PURE__*/ (function (_super) {
- tslib__WEBPACK_IMPORTED_MODULE_0__["__extends"](BufferWhenSubscriber, _super);
- function BufferWhenSubscriber(destination, closingSelector) {
- var _this = _super.call(this, destination) || this;
- _this.closingSelector = closingSelector;
- _this.subscribing = false;
- _this.openBuffer();
- return _this;
+var Action = /*@__PURE__*/ (function (_super) {
+ tslib__WEBPACK_IMPORTED_MODULE_0__["__extends"](Action, _super);
+ function Action(scheduler, work) {
+ return _super.call(this) || this;
}
- BufferWhenSubscriber.prototype._next = function (value) {
- this.buffer.push(value);
- };
- BufferWhenSubscriber.prototype._complete = function () {
- var buffer = this.buffer;
- if (buffer) {
- this.destination.next(buffer);
- }
- _super.prototype._complete.call(this);
- };
- BufferWhenSubscriber.prototype._unsubscribe = function () {
- this.buffer = null;
- this.subscribing = false;
- };
- BufferWhenSubscriber.prototype.notifyNext = function (outerValue, innerValue, outerIndex, innerIndex, innerSub) {
- this.openBuffer();
- };
- BufferWhenSubscriber.prototype.notifyComplete = function () {
- if (this.subscribing) {
- this.complete();
- }
- else {
- this.openBuffer();
- }
- };
- BufferWhenSubscriber.prototype.openBuffer = function () {
- var closingSubscription = this.closingSubscription;
- if (closingSubscription) {
- this.remove(closingSubscription);
- closingSubscription.unsubscribe();
- }
- var buffer = this.buffer;
- if (this.buffer) {
- this.destination.next(buffer);
- }
- this.buffer = [];
- var closingNotifier;
- try {
- var closingSelector = this.closingSelector;
- closingNotifier = closingSelector();
- }
- catch (err) {
- return this.error(err);
+ Action.prototype.schedule = function (state, delay) {
+ if (delay === void 0) {
+ delay = 0;
}
- closingSubscription = new _Subscription__WEBPACK_IMPORTED_MODULE_1__["Subscription"]();
- this.closingSubscription = closingSubscription;
- this.add(closingSubscription);
- this.subscribing = true;
- closingSubscription.add(Object(_util_subscribeToResult__WEBPACK_IMPORTED_MODULE_3__["subscribeToResult"])(this, closingNotifier));
- this.subscribing = false;
+ return this;
};
- return BufferWhenSubscriber;
-}(_OuterSubscriber__WEBPACK_IMPORTED_MODULE_2__["OuterSubscriber"]));
-//# sourceMappingURL=bufferWhen.js.map
+ return Action;
+}(_Subscription__WEBPACK_IMPORTED_MODULE_1__["Subscription"]));
+
+//# sourceMappingURL=Action.js.map
/***/ }),
-/* 212 */
+/* 198 */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
"use strict";
__webpack_require__.r(__webpack_exports__);
-/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "catchError", function() { return catchError; });
+/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "QueueScheduler", function() { return QueueScheduler; });
/* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(36);
-/* harmony import */ var _OuterSubscriber__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(171);
-/* harmony import */ var _InnerSubscriber__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(183);
-/* harmony import */ var _util_subscribeToResult__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(182);
-/** PURE_IMPORTS_START tslib,_OuterSubscriber,_InnerSubscriber,_util_subscribeToResult PURE_IMPORTS_END */
-
-
+/* harmony import */ var _AsyncScheduler__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(199);
+/** PURE_IMPORTS_START tslib,_AsyncScheduler PURE_IMPORTS_END */
-function catchError(selector) {
- return function catchErrorOperatorFunction(source) {
- var operator = new CatchOperator(selector);
- var caught = source.lift(operator);
- return (operator.caught = caught);
- };
-}
-var CatchOperator = /*@__PURE__*/ (function () {
- function CatchOperator(selector) {
- this.selector = selector;
- }
- CatchOperator.prototype.call = function (subscriber, source) {
- return source.subscribe(new CatchSubscriber(subscriber, this.selector, this.caught));
- };
- return CatchOperator;
-}());
-var CatchSubscriber = /*@__PURE__*/ (function (_super) {
- tslib__WEBPACK_IMPORTED_MODULE_0__["__extends"](CatchSubscriber, _super);
- function CatchSubscriber(destination, selector, caught) {
- var _this = _super.call(this, destination) || this;
- _this.selector = selector;
- _this.caught = caught;
- return _this;
+var QueueScheduler = /*@__PURE__*/ (function (_super) {
+ tslib__WEBPACK_IMPORTED_MODULE_0__["__extends"](QueueScheduler, _super);
+ function QueueScheduler() {
+ return _super !== null && _super.apply(this, arguments) || this;
}
- CatchSubscriber.prototype.error = function (err) {
- if (!this.isStopped) {
- var result = void 0;
- try {
- result = this.selector(err, this.caught);
- }
- catch (err2) {
- _super.prototype.error.call(this, err2);
- return;
- }
- this._unsubscribeAndRecycle();
- var innerSubscriber = new _InnerSubscriber__WEBPACK_IMPORTED_MODULE_2__["InnerSubscriber"](this, undefined, undefined);
- this.add(innerSubscriber);
- Object(_util_subscribeToResult__WEBPACK_IMPORTED_MODULE_3__["subscribeToResult"])(this, result, undefined, undefined, innerSubscriber);
- }
- };
- return CatchSubscriber;
-}(_OuterSubscriber__WEBPACK_IMPORTED_MODULE_1__["OuterSubscriber"]));
-//# sourceMappingURL=catchError.js.map
-
-
-/***/ }),
-/* 213 */
-/***/ (function(module, __webpack_exports__, __webpack_require__) {
-
-"use strict";
-__webpack_require__.r(__webpack_exports__);
-/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "combineAll", function() { return combineAll; });
-/* harmony import */ var _observable_combineLatest__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(214);
-/** PURE_IMPORTS_START _observable_combineLatest PURE_IMPORTS_END */
+ return QueueScheduler;
+}(_AsyncScheduler__WEBPACK_IMPORTED_MODULE_1__["AsyncScheduler"]));
-function combineAll(project) {
- return function (source) { return source.lift(new _observable_combineLatest__WEBPACK_IMPORTED_MODULE_0__["CombineLatestOperator"](project)); };
-}
-//# sourceMappingURL=combineAll.js.map
+//# sourceMappingURL=QueueScheduler.js.map
/***/ }),
-/* 214 */
+/* 199 */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
"use strict";
__webpack_require__.r(__webpack_exports__);
-/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "combineLatest", function() { return combineLatest; });
-/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "CombineLatestOperator", function() { return CombineLatestOperator; });
-/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "CombineLatestSubscriber", function() { return CombineLatestSubscriber; });
+/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "AsyncScheduler", function() { return AsyncScheduler; });
/* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(36);
-/* harmony import */ var _util_isScheduler__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(206);
-/* harmony import */ var _util_isArray__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(178);
-/* harmony import */ var _OuterSubscriber__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(171);
-/* harmony import */ var _util_subscribeToResult__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(182);
-/* harmony import */ var _fromArray__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(215);
-/** PURE_IMPORTS_START tslib,_util_isScheduler,_util_isArray,_OuterSubscriber,_util_subscribeToResult,_fromArray PURE_IMPORTS_END */
-
-
-
-
+/* harmony import */ var _Scheduler__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(200);
+/** PURE_IMPORTS_START tslib,_Scheduler PURE_IMPORTS_END */
-var NONE = {};
-function combineLatest() {
- var observables = [];
- for (var _i = 0; _i < arguments.length; _i++) {
- observables[_i] = arguments[_i];
- }
- var resultSelector = null;
- var scheduler = null;
- if (Object(_util_isScheduler__WEBPACK_IMPORTED_MODULE_1__["isScheduler"])(observables[observables.length - 1])) {
- scheduler = observables.pop();
- }
- if (typeof observables[observables.length - 1] === 'function') {
- resultSelector = observables.pop();
- }
- if (observables.length === 1 && Object(_util_isArray__WEBPACK_IMPORTED_MODULE_2__["isArray"])(observables[0])) {
- observables = observables[0];
- }
- return Object(_fromArray__WEBPACK_IMPORTED_MODULE_5__["fromArray"])(observables, scheduler).lift(new CombineLatestOperator(resultSelector));
-}
-var CombineLatestOperator = /*@__PURE__*/ (function () {
- function CombineLatestOperator(resultSelector) {
- this.resultSelector = resultSelector;
- }
- CombineLatestOperator.prototype.call = function (subscriber, source) {
- return source.subscribe(new CombineLatestSubscriber(subscriber, this.resultSelector));
- };
- return CombineLatestOperator;
-}());
-
-var CombineLatestSubscriber = /*@__PURE__*/ (function (_super) {
- tslib__WEBPACK_IMPORTED_MODULE_0__["__extends"](CombineLatestSubscriber, _super);
- function CombineLatestSubscriber(destination, resultSelector) {
- var _this = _super.call(this, destination) || this;
- _this.resultSelector = resultSelector;
- _this.active = 0;
- _this.values = [];
- _this.observables = [];
+var AsyncScheduler = /*@__PURE__*/ (function (_super) {
+ tslib__WEBPACK_IMPORTED_MODULE_0__["__extends"](AsyncScheduler, _super);
+ function AsyncScheduler(SchedulerAction, now) {
+ if (now === void 0) {
+ now = _Scheduler__WEBPACK_IMPORTED_MODULE_1__["Scheduler"].now;
+ }
+ var _this = _super.call(this, SchedulerAction, function () {
+ if (AsyncScheduler.delegate && AsyncScheduler.delegate !== _this) {
+ return AsyncScheduler.delegate.now();
+ }
+ else {
+ return now();
+ }
+ }) || this;
+ _this.actions = [];
+ _this.active = false;
+ _this.scheduled = undefined;
return _this;
}
- CombineLatestSubscriber.prototype._next = function (observable) {
- this.values.push(NONE);
- this.observables.push(observable);
- };
- CombineLatestSubscriber.prototype._complete = function () {
- var observables = this.observables;
- var len = observables.length;
- if (len === 0) {
- this.destination.complete();
+ AsyncScheduler.prototype.schedule = function (work, delay, state) {
+ if (delay === void 0) {
+ delay = 0;
+ }
+ if (AsyncScheduler.delegate && AsyncScheduler.delegate !== this) {
+ return AsyncScheduler.delegate.schedule(work, delay, state);
}
else {
- this.active = len;
- this.toRespond = len;
- for (var i = 0; i < len; i++) {
- var observable = observables[i];
- this.add(Object(_util_subscribeToResult__WEBPACK_IMPORTED_MODULE_4__["subscribeToResult"])(this, observable, observable, i));
- }
+ return _super.prototype.schedule.call(this, work, delay, state);
}
};
- CombineLatestSubscriber.prototype.notifyComplete = function (unused) {
- if ((this.active -= 1) === 0) {
- this.destination.complete();
+ AsyncScheduler.prototype.flush = function (action) {
+ var actions = this.actions;
+ if (this.active) {
+ actions.push(action);
+ return;
}
- };
- CombineLatestSubscriber.prototype.notifyNext = function (outerValue, innerValue, outerIndex, innerIndex, innerSub) {
- var values = this.values;
- var oldVal = values[outerIndex];
- var toRespond = !this.toRespond
- ? 0
- : oldVal === NONE ? --this.toRespond : this.toRespond;
- values[outerIndex] = innerValue;
- if (toRespond === 0) {
- if (this.resultSelector) {
- this._tryResultSelector(values);
+ var error;
+ this.active = true;
+ do {
+ if (error = action.execute(action.state, action.delay)) {
+ break;
}
- else {
- this.destination.next(values.slice());
+ } while (action = actions.shift());
+ this.active = false;
+ if (error) {
+ while (action = actions.shift()) {
+ action.unsubscribe();
}
+ throw error;
}
};
- CombineLatestSubscriber.prototype._tryResultSelector = function (values) {
- var result;
- try {
- result = this.resultSelector.apply(this, values);
+ return AsyncScheduler;
+}(_Scheduler__WEBPACK_IMPORTED_MODULE_1__["Scheduler"]));
+
+//# sourceMappingURL=AsyncScheduler.js.map
+
+
+/***/ }),
+/* 200 */
+/***/ (function(module, __webpack_exports__, __webpack_require__) {
+
+"use strict";
+__webpack_require__.r(__webpack_exports__);
+/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "Scheduler", function() { return Scheduler; });
+var Scheduler = /*@__PURE__*/ (function () {
+ function Scheduler(SchedulerAction, now) {
+ if (now === void 0) {
+ now = Scheduler.now;
}
- catch (err) {
- this.destination.error(err);
- return;
+ this.SchedulerAction = SchedulerAction;
+ this.now = now;
+ }
+ Scheduler.prototype.schedule = function (work, delay, state) {
+ if (delay === void 0) {
+ delay = 0;
}
- this.destination.next(result);
+ return new this.SchedulerAction(this, work).schedule(state, delay);
};
- return CombineLatestSubscriber;
-}(_OuterSubscriber__WEBPACK_IMPORTED_MODULE_3__["OuterSubscriber"]));
+ Scheduler.now = function () { return Date.now(); };
+ return Scheduler;
+}());
-//# sourceMappingURL=combineLatest.js.map
+//# sourceMappingURL=Scheduler.js.map
/***/ }),
-/* 215 */
+/* 201 */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
"use strict";
__webpack_require__.r(__webpack_exports__);
-/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "fromArray", function() { return fromArray; });
-/* harmony import */ var _Observable__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(193);
-/* harmony import */ var _util_subscribeToArray__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(185);
-/* harmony import */ var _scheduled_scheduleArray__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(216);
-/** PURE_IMPORTS_START _Observable,_util_subscribeToArray,_scheduled_scheduleArray PURE_IMPORTS_END */
+/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "observeOn", function() { return observeOn; });
+/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ObserveOnOperator", function() { return ObserveOnOperator; });
+/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ObserveOnSubscriber", function() { return ObserveOnSubscriber; });
+/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ObserveOnMessage", function() { return ObserveOnMessage; });
+/* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(36);
+/* harmony import */ var _Subscriber__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(172);
+/* harmony import */ var _Notification__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(202);
+/** PURE_IMPORTS_START tslib,_Subscriber,_Notification PURE_IMPORTS_END */
-function fromArray(input, scheduler) {
- if (!scheduler) {
- return new _Observable__WEBPACK_IMPORTED_MODULE_0__["Observable"](Object(_util_subscribeToArray__WEBPACK_IMPORTED_MODULE_1__["subscribeToArray"])(input));
- }
- else {
- return Object(_scheduled_scheduleArray__WEBPACK_IMPORTED_MODULE_2__["scheduleArray"])(input, scheduler);
+function observeOn(scheduler, delay) {
+ if (delay === void 0) {
+ delay = 0;
}
+ return function observeOnOperatorFunction(source) {
+ return source.lift(new ObserveOnOperator(scheduler, delay));
+ };
}
-//# sourceMappingURL=fromArray.js.map
+var ObserveOnOperator = /*@__PURE__*/ (function () {
+ function ObserveOnOperator(scheduler, delay) {
+ if (delay === void 0) {
+ delay = 0;
+ }
+ this.scheduler = scheduler;
+ this.delay = delay;
+ }
+ ObserveOnOperator.prototype.call = function (subscriber, source) {
+ return source.subscribe(new ObserveOnSubscriber(subscriber, this.scheduler, this.delay));
+ };
+ return ObserveOnOperator;
+}());
+
+var ObserveOnSubscriber = /*@__PURE__*/ (function (_super) {
+ tslib__WEBPACK_IMPORTED_MODULE_0__["__extends"](ObserveOnSubscriber, _super);
+ function ObserveOnSubscriber(destination, scheduler, delay) {
+ if (delay === void 0) {
+ delay = 0;
+ }
+ var _this = _super.call(this, destination) || this;
+ _this.scheduler = scheduler;
+ _this.delay = delay;
+ return _this;
+ }
+ ObserveOnSubscriber.dispatch = function (arg) {
+ var notification = arg.notification, destination = arg.destination;
+ notification.observe(destination);
+ this.unsubscribe();
+ };
+ ObserveOnSubscriber.prototype.scheduleMessage = function (notification) {
+ var destination = this.destination;
+ destination.add(this.scheduler.schedule(ObserveOnSubscriber.dispatch, this.delay, new ObserveOnMessage(notification, this.destination)));
+ };
+ ObserveOnSubscriber.prototype._next = function (value) {
+ this.scheduleMessage(_Notification__WEBPACK_IMPORTED_MODULE_2__["Notification"].createNext(value));
+ };
+ ObserveOnSubscriber.prototype._error = function (err) {
+ this.scheduleMessage(_Notification__WEBPACK_IMPORTED_MODULE_2__["Notification"].createError(err));
+ this.unsubscribe();
+ };
+ ObserveOnSubscriber.prototype._complete = function () {
+ this.scheduleMessage(_Notification__WEBPACK_IMPORTED_MODULE_2__["Notification"].createComplete());
+ this.unsubscribe();
+ };
+ return ObserveOnSubscriber;
+}(_Subscriber__WEBPACK_IMPORTED_MODULE_1__["Subscriber"]));
+
+var ObserveOnMessage = /*@__PURE__*/ (function () {
+ function ObserveOnMessage(notification, destination) {
+ this.notification = notification;
+ this.destination = destination;
+ }
+ return ObserveOnMessage;
+}());
+
+//# sourceMappingURL=observeOn.js.map
/***/ }),
-/* 216 */
+/* 202 */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
"use strict";
__webpack_require__.r(__webpack_exports__);
-/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "scheduleArray", function() { return scheduleArray; });
-/* harmony import */ var _Observable__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(193);
-/* harmony import */ var _Subscription__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(177);
-/** PURE_IMPORTS_START _Observable,_Subscription PURE_IMPORTS_END */
+/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "NotificationKind", function() { return NotificationKind; });
+/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "Notification", function() { return Notification; });
+/* harmony import */ var _observable_empty__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(203);
+/* harmony import */ var _observable_of__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(204);
+/* harmony import */ var _observable_throwError__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(209);
+/** PURE_IMPORTS_START _observable_empty,_observable_of,_observable_throwError PURE_IMPORTS_END */
-function scheduleArray(input, scheduler) {
- return new _Observable__WEBPACK_IMPORTED_MODULE_0__["Observable"](function (subscriber) {
- var sub = new _Subscription__WEBPACK_IMPORTED_MODULE_1__["Subscription"]();
- var i = 0;
- sub.add(scheduler.schedule(function () {
- if (i === input.length) {
- subscriber.complete();
- return;
- }
- subscriber.next(input[i++]);
- if (!subscriber.closed) {
- sub.add(this.schedule());
- }
- }));
- return sub;
- });
-}
-//# sourceMappingURL=scheduleArray.js.map
+
+var NotificationKind;
+/*@__PURE__*/ (function (NotificationKind) {
+ NotificationKind["NEXT"] = "N";
+ NotificationKind["ERROR"] = "E";
+ NotificationKind["COMPLETE"] = "C";
+})(NotificationKind || (NotificationKind = {}));
+var Notification = /*@__PURE__*/ (function () {
+ function Notification(kind, value, error) {
+ this.kind = kind;
+ this.value = value;
+ this.error = error;
+ this.hasValue = kind === 'N';
+ }
+ Notification.prototype.observe = function (observer) {
+ switch (this.kind) {
+ case 'N':
+ return observer.next && observer.next(this.value);
+ case 'E':
+ return observer.error && observer.error(this.error);
+ case 'C':
+ return observer.complete && observer.complete();
+ }
+ };
+ Notification.prototype.do = function (next, error, complete) {
+ var kind = this.kind;
+ switch (kind) {
+ case 'N':
+ return next && next(this.value);
+ case 'E':
+ return error && error(this.error);
+ case 'C':
+ return complete && complete();
+ }
+ };
+ Notification.prototype.accept = function (nextOrObserver, error, complete) {
+ if (nextOrObserver && typeof nextOrObserver.next === 'function') {
+ return this.observe(nextOrObserver);
+ }
+ else {
+ return this.do(nextOrObserver, error, complete);
+ }
+ };
+ Notification.prototype.toObservable = function () {
+ var kind = this.kind;
+ switch (kind) {
+ case 'N':
+ return Object(_observable_of__WEBPACK_IMPORTED_MODULE_1__["of"])(this.value);
+ case 'E':
+ return Object(_observable_throwError__WEBPACK_IMPORTED_MODULE_2__["throwError"])(this.error);
+ case 'C':
+ return Object(_observable_empty__WEBPACK_IMPORTED_MODULE_0__["empty"])();
+ }
+ throw new Error('unexpected notification kind value');
+ };
+ Notification.createNext = function (value) {
+ if (typeof value !== 'undefined') {
+ return new Notification('N', value);
+ }
+ return Notification.undefinedValueNotification;
+ };
+ Notification.createError = function (err) {
+ return new Notification('E', undefined, err);
+ };
+ Notification.createComplete = function () {
+ return Notification.completeNotification;
+ };
+ Notification.completeNotification = new Notification('C');
+ Notification.undefinedValueNotification = new Notification('N', undefined);
+ return Notification;
+}());
+
+//# sourceMappingURL=Notification.js.map
/***/ }),
-/* 217 */
+/* 203 */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
"use strict";
__webpack_require__.r(__webpack_exports__);
-/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "combineLatest", function() { return combineLatest; });
-/* harmony import */ var _util_isArray__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(178);
-/* harmony import */ var _observable_combineLatest__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(214);
-/* harmony import */ var _observable_from__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(218);
-/** PURE_IMPORTS_START _util_isArray,_observable_combineLatest,_observable_from PURE_IMPORTS_END */
-
-
+/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "EMPTY", function() { return EMPTY; });
+/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "empty", function() { return empty; });
+/* harmony import */ var _Observable__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(170);
+/** PURE_IMPORTS_START _Observable PURE_IMPORTS_END */
-var none = {};
-function combineLatest() {
- var observables = [];
- for (var _i = 0; _i < arguments.length; _i++) {
- observables[_i] = arguments[_i];
- }
- var project = null;
- if (typeof observables[observables.length - 1] === 'function') {
- project = observables.pop();
- }
- if (observables.length === 1 && Object(_util_isArray__WEBPACK_IMPORTED_MODULE_0__["isArray"])(observables[0])) {
- observables = observables[0].slice();
- }
- return function (source) { return source.lift.call(Object(_observable_from__WEBPACK_IMPORTED_MODULE_2__["from"])([source].concat(observables)), new _observable_combineLatest__WEBPACK_IMPORTED_MODULE_1__["CombineLatestOperator"](project)); };
+var EMPTY = /*@__PURE__*/ new _Observable__WEBPACK_IMPORTED_MODULE_0__["Observable"](function (subscriber) { return subscriber.complete(); });
+function empty(scheduler) {
+ return scheduler ? emptyScheduled(scheduler) : EMPTY;
}
-//# sourceMappingURL=combineLatest.js.map
+function emptyScheduled(scheduler) {
+ return new _Observable__WEBPACK_IMPORTED_MODULE_0__["Observable"](function (subscriber) { return scheduler.schedule(function () { return subscriber.complete(); }); });
+}
+//# sourceMappingURL=empty.js.map
/***/ }),
-/* 218 */
+/* 204 */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
"use strict";
__webpack_require__.r(__webpack_exports__);
-/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "from", function() { return from; });
-/* harmony import */ var _Observable__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(193);
-/* harmony import */ var _util_subscribeTo__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(184);
-/* harmony import */ var _scheduled_scheduled__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(219);
-/** PURE_IMPORTS_START _Observable,_util_subscribeTo,_scheduled_scheduled PURE_IMPORTS_END */
+/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "of", function() { return of; });
+/* harmony import */ var _util_isScheduler__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(205);
+/* harmony import */ var _fromArray__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(206);
+/* harmony import */ var _scheduled_scheduleArray__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(208);
+/** PURE_IMPORTS_START _util_isScheduler,_fromArray,_scheduled_scheduleArray PURE_IMPORTS_END */
-function from(input, scheduler) {
- if (!scheduler) {
- if (input instanceof _Observable__WEBPACK_IMPORTED_MODULE_0__["Observable"]) {
- return input;
- }
- return new _Observable__WEBPACK_IMPORTED_MODULE_0__["Observable"](Object(_util_subscribeTo__WEBPACK_IMPORTED_MODULE_1__["subscribeTo"])(input));
+function of() {
+ var args = [];
+ for (var _i = 0; _i < arguments.length; _i++) {
+ args[_i] = arguments[_i];
+ }
+ var scheduler = args[args.length - 1];
+ if (Object(_util_isScheduler__WEBPACK_IMPORTED_MODULE_0__["isScheduler"])(scheduler)) {
+ args.pop();
+ return Object(_scheduled_scheduleArray__WEBPACK_IMPORTED_MODULE_2__["scheduleArray"])(args, scheduler);
}
else {
- return Object(_scheduled_scheduled__WEBPACK_IMPORTED_MODULE_2__["scheduled"])(input, scheduler);
+ return Object(_fromArray__WEBPACK_IMPORTED_MODULE_1__["fromArray"])(args);
}
}
-//# sourceMappingURL=from.js.map
+//# sourceMappingURL=of.js.map
/***/ }),
-/* 219 */
+/* 205 */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
"use strict";
__webpack_require__.r(__webpack_exports__);
-/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "scheduled", function() { return scheduled; });
-/* harmony import */ var _scheduleObservable__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(220);
-/* harmony import */ var _schedulePromise__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(221);
-/* harmony import */ var _scheduleArray__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(216);
-/* harmony import */ var _scheduleIterable__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(222);
-/* harmony import */ var _util_isInteropObservable__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(223);
-/* harmony import */ var _util_isPromise__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(192);
-/* harmony import */ var _util_isArrayLike__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(191);
-/* harmony import */ var _util_isIterable__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(224);
-/** PURE_IMPORTS_START _scheduleObservable,_schedulePromise,_scheduleArray,_scheduleIterable,_util_isInteropObservable,_util_isPromise,_util_isArrayLike,_util_isIterable PURE_IMPORTS_END */
+/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "isScheduler", function() { return isScheduler; });
+/** PURE_IMPORTS_START PURE_IMPORTS_END */
+function isScheduler(value) {
+ return value && typeof value.schedule === 'function';
+}
+//# sourceMappingURL=isScheduler.js.map
+
+/***/ }),
+/* 206 */
+/***/ (function(module, __webpack_exports__, __webpack_require__) {
+"use strict";
+__webpack_require__.r(__webpack_exports__);
+/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "fromArray", function() { return fromArray; });
+/* harmony import */ var _Observable__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(170);
+/* harmony import */ var _util_subscribeToArray__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(207);
+/* harmony import */ var _scheduled_scheduleArray__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(208);
+/** PURE_IMPORTS_START _Observable,_util_subscribeToArray,_scheduled_scheduleArray PURE_IMPORTS_END */
+function fromArray(input, scheduler) {
+ if (!scheduler) {
+ return new _Observable__WEBPACK_IMPORTED_MODULE_0__["Observable"](Object(_util_subscribeToArray__WEBPACK_IMPORTED_MODULE_1__["subscribeToArray"])(input));
+ }
+ else {
+ return Object(_scheduled_scheduleArray__WEBPACK_IMPORTED_MODULE_2__["scheduleArray"])(input, scheduler);
+ }
+}
+//# sourceMappingURL=fromArray.js.map
+/***/ }),
+/* 207 */
+/***/ (function(module, __webpack_exports__, __webpack_require__) {
-function scheduled(input, scheduler) {
- if (input != null) {
- if (Object(_util_isInteropObservable__WEBPACK_IMPORTED_MODULE_4__["isInteropObservable"])(input)) {
- return Object(_scheduleObservable__WEBPACK_IMPORTED_MODULE_0__["scheduleObservable"])(input, scheduler);
- }
- else if (Object(_util_isPromise__WEBPACK_IMPORTED_MODULE_5__["isPromise"])(input)) {
- return Object(_schedulePromise__WEBPACK_IMPORTED_MODULE_1__["schedulePromise"])(input, scheduler);
- }
- else if (Object(_util_isArrayLike__WEBPACK_IMPORTED_MODULE_6__["isArrayLike"])(input)) {
- return Object(_scheduleArray__WEBPACK_IMPORTED_MODULE_2__["scheduleArray"])(input, scheduler);
- }
- else if (Object(_util_isIterable__WEBPACK_IMPORTED_MODULE_7__["isIterable"])(input) || typeof input === 'string') {
- return Object(_scheduleIterable__WEBPACK_IMPORTED_MODULE_3__["scheduleIterable"])(input, scheduler);
+"use strict";
+__webpack_require__.r(__webpack_exports__);
+/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "subscribeToArray", function() { return subscribeToArray; });
+/** PURE_IMPORTS_START PURE_IMPORTS_END */
+var subscribeToArray = function (array) {
+ return function (subscriber) {
+ for (var i = 0, len = array.length; i < len && !subscriber.closed; i++) {
+ subscriber.next(array[i]);
}
- }
- throw new TypeError((input !== null && typeof input || input) + ' is not observable');
-}
-//# sourceMappingURL=scheduled.js.map
+ subscriber.complete();
+ };
+};
+//# sourceMappingURL=subscribeToArray.js.map
/***/ }),
-/* 220 */
+/* 208 */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
"use strict";
__webpack_require__.r(__webpack_exports__);
-/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "scheduleObservable", function() { return scheduleObservable; });
-/* harmony import */ var _Observable__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(193);
+/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "scheduleArray", function() { return scheduleArray; });
+/* harmony import */ var _Observable__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(170);
/* harmony import */ var _Subscription__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(177);
-/* harmony import */ var _symbol_observable__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(190);
-/** PURE_IMPORTS_START _Observable,_Subscription,_symbol_observable PURE_IMPORTS_END */
-
+/** PURE_IMPORTS_START _Observable,_Subscription PURE_IMPORTS_END */
-function scheduleObservable(input, scheduler) {
+function scheduleArray(input, scheduler) {
return new _Observable__WEBPACK_IMPORTED_MODULE_0__["Observable"](function (subscriber) {
var sub = new _Subscription__WEBPACK_IMPORTED_MODULE_1__["Subscription"]();
+ var i = 0;
sub.add(scheduler.schedule(function () {
- var observable = input[_symbol_observable__WEBPACK_IMPORTED_MODULE_2__["observable"]]();
- sub.add(observable.subscribe({
- next: function (value) { sub.add(scheduler.schedule(function () { return subscriber.next(value); })); },
- error: function (err) { sub.add(scheduler.schedule(function () { return subscriber.error(err); })); },
- complete: function () { sub.add(scheduler.schedule(function () { return subscriber.complete(); })); },
- }));
+ if (i === input.length) {
+ subscriber.complete();
+ return;
+ }
+ subscriber.next(input[i++]);
+ if (!subscriber.closed) {
+ sub.add(this.schedule());
+ }
}));
return sub;
});
}
-//# sourceMappingURL=scheduleObservable.js.map
+//# sourceMappingURL=scheduleArray.js.map
/***/ }),
-/* 221 */
+/* 209 */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
"use strict";
__webpack_require__.r(__webpack_exports__);
-/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "schedulePromise", function() { return schedulePromise; });
-/* harmony import */ var _Observable__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(193);
-/* harmony import */ var _Subscription__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(177);
-/** PURE_IMPORTS_START _Observable,_Subscription PURE_IMPORTS_END */
-
+/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "throwError", function() { return throwError; });
+/* harmony import */ var _Observable__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(170);
+/** PURE_IMPORTS_START _Observable PURE_IMPORTS_END */
-function schedulePromise(input, scheduler) {
- return new _Observable__WEBPACK_IMPORTED_MODULE_0__["Observable"](function (subscriber) {
- var sub = new _Subscription__WEBPACK_IMPORTED_MODULE_1__["Subscription"]();
- sub.add(scheduler.schedule(function () {
- return input.then(function (value) {
- sub.add(scheduler.schedule(function () {
- subscriber.next(value);
- sub.add(scheduler.schedule(function () { return subscriber.complete(); }));
- }));
- }, function (err) {
- sub.add(scheduler.schedule(function () { return subscriber.error(err); }));
- });
- }));
- return sub;
- });
+function throwError(error, scheduler) {
+ if (!scheduler) {
+ return new _Observable__WEBPACK_IMPORTED_MODULE_0__["Observable"](function (subscriber) { return subscriber.error(error); });
+ }
+ else {
+ return new _Observable__WEBPACK_IMPORTED_MODULE_0__["Observable"](function (subscriber) { return scheduler.schedule(dispatch, 0, { error: error, subscriber: subscriber }); });
+ }
}
-//# sourceMappingURL=schedulePromise.js.map
+function dispatch(_a) {
+ var error = _a.error, subscriber = _a.subscriber;
+ subscriber.error(error);
+}
+//# sourceMappingURL=throwError.js.map
/***/ }),
-/* 222 */
+/* 210 */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
"use strict";
__webpack_require__.r(__webpack_exports__);
-/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "scheduleIterable", function() { return scheduleIterable; });
-/* harmony import */ var _Observable__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(193);
-/* harmony import */ var _Subscription__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(177);
-/* harmony import */ var _symbol_iterator__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(188);
-/** PURE_IMPORTS_START _Observable,_Subscription,_symbol_iterator PURE_IMPORTS_END */
+/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "AsyncSubject", function() { return AsyncSubject; });
+/* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(36);
+/* harmony import */ var _Subject__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(187);
+/* harmony import */ var _Subscription__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(177);
+/** PURE_IMPORTS_START tslib,_Subject,_Subscription PURE_IMPORTS_END */
-function scheduleIterable(input, scheduler) {
- if (!input) {
- throw new Error('Iterable cannot be null');
+var AsyncSubject = /*@__PURE__*/ (function (_super) {
+ tslib__WEBPACK_IMPORTED_MODULE_0__["__extends"](AsyncSubject, _super);
+ function AsyncSubject() {
+ var _this = _super !== null && _super.apply(this, arguments) || this;
+ _this.value = null;
+ _this.hasNext = false;
+ _this.hasCompleted = false;
+ return _this;
}
- return new _Observable__WEBPACK_IMPORTED_MODULE_0__["Observable"](function (subscriber) {
- var sub = new _Subscription__WEBPACK_IMPORTED_MODULE_1__["Subscription"]();
- var iterator;
- sub.add(function () {
- if (iterator && typeof iterator.return === 'function') {
- iterator.return();
- }
- });
- sub.add(scheduler.schedule(function () {
- iterator = input[_symbol_iterator__WEBPACK_IMPORTED_MODULE_2__["iterator"]]();
- sub.add(scheduler.schedule(function () {
- if (subscriber.closed) {
- return;
- }
- var value;
- var done;
- try {
- var result = iterator.next();
- value = result.value;
- done = result.done;
- }
- catch (err) {
- subscriber.error(err);
- return;
- }
- if (done) {
- subscriber.complete();
- }
- else {
- subscriber.next(value);
- this.schedule();
- }
- }));
- }));
- return sub;
- });
-}
-//# sourceMappingURL=scheduleIterable.js.map
+ AsyncSubject.prototype._subscribe = function (subscriber) {
+ if (this.hasError) {
+ subscriber.error(this.thrownError);
+ return _Subscription__WEBPACK_IMPORTED_MODULE_2__["Subscription"].EMPTY;
+ }
+ else if (this.hasCompleted && this.hasNext) {
+ subscriber.next(this.value);
+ subscriber.complete();
+ return _Subscription__WEBPACK_IMPORTED_MODULE_2__["Subscription"].EMPTY;
+ }
+ return _super.prototype._subscribe.call(this, subscriber);
+ };
+ AsyncSubject.prototype.next = function (value) {
+ if (!this.hasCompleted) {
+ this.value = value;
+ this.hasNext = true;
+ }
+ };
+ AsyncSubject.prototype.error = function (error) {
+ if (!this.hasCompleted) {
+ _super.prototype.error.call(this, error);
+ }
+ };
+ AsyncSubject.prototype.complete = function () {
+ this.hasCompleted = true;
+ if (this.hasNext) {
+ _super.prototype.next.call(this, this.value);
+ }
+ _super.prototype.complete.call(this);
+ };
+ return AsyncSubject;
+}(_Subject__WEBPACK_IMPORTED_MODULE_1__["Subject"]));
+
+//# sourceMappingURL=AsyncSubject.js.map
/***/ }),
-/* 223 */
+/* 211 */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
"use strict";
__webpack_require__.r(__webpack_exports__);
-/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "isInteropObservable", function() { return isInteropObservable; });
-/* harmony import */ var _symbol_observable__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(190);
-/** PURE_IMPORTS_START _symbol_observable PURE_IMPORTS_END */
+/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "asap", function() { return asap; });
+/* harmony import */ var _AsapAction__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(212);
+/* harmony import */ var _AsapScheduler__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(214);
+/** PURE_IMPORTS_START _AsapAction,_AsapScheduler PURE_IMPORTS_END */
-function isInteropObservable(input) {
- return input && typeof input[_symbol_observable__WEBPACK_IMPORTED_MODULE_0__["observable"]] === 'function';
-}
-//# sourceMappingURL=isInteropObservable.js.map
+
+var asap = /*@__PURE__*/ new _AsapScheduler__WEBPACK_IMPORTED_MODULE_1__["AsapScheduler"](_AsapAction__WEBPACK_IMPORTED_MODULE_0__["AsapAction"]);
+//# sourceMappingURL=asap.js.map
/***/ }),
-/* 224 */
+/* 212 */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
"use strict";
__webpack_require__.r(__webpack_exports__);
-/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "isIterable", function() { return isIterable; });
-/* harmony import */ var _symbol_iterator__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(188);
-/** PURE_IMPORTS_START _symbol_iterator PURE_IMPORTS_END */
+/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "AsapAction", function() { return AsapAction; });
+/* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(36);
+/* harmony import */ var _util_Immediate__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(213);
+/* harmony import */ var _AsyncAction__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(196);
+/** PURE_IMPORTS_START tslib,_util_Immediate,_AsyncAction PURE_IMPORTS_END */
-function isIterable(input) {
- return input && typeof input[_symbol_iterator__WEBPACK_IMPORTED_MODULE_0__["iterator"]] === 'function';
-}
-//# sourceMappingURL=isIterable.js.map
+
+
+var AsapAction = /*@__PURE__*/ (function (_super) {
+ tslib__WEBPACK_IMPORTED_MODULE_0__["__extends"](AsapAction, _super);
+ function AsapAction(scheduler, work) {
+ var _this = _super.call(this, scheduler, work) || this;
+ _this.scheduler = scheduler;
+ _this.work = work;
+ return _this;
+ }
+ AsapAction.prototype.requestAsyncId = function (scheduler, id, delay) {
+ if (delay === void 0) {
+ delay = 0;
+ }
+ if (delay !== null && delay > 0) {
+ return _super.prototype.requestAsyncId.call(this, scheduler, id, delay);
+ }
+ scheduler.actions.push(this);
+ return scheduler.scheduled || (scheduler.scheduled = _util_Immediate__WEBPACK_IMPORTED_MODULE_1__["Immediate"].setImmediate(scheduler.flush.bind(scheduler, null)));
+ };
+ AsapAction.prototype.recycleAsyncId = function (scheduler, id, delay) {
+ if (delay === void 0) {
+ delay = 0;
+ }
+ if ((delay !== null && delay > 0) || (delay === null && this.delay > 0)) {
+ return _super.prototype.recycleAsyncId.call(this, scheduler, id, delay);
+ }
+ if (scheduler.actions.length === 0) {
+ _util_Immediate__WEBPACK_IMPORTED_MODULE_1__["Immediate"].clearImmediate(id);
+ scheduler.scheduled = undefined;
+ }
+ return undefined;
+ };
+ return AsapAction;
+}(_AsyncAction__WEBPACK_IMPORTED_MODULE_2__["AsyncAction"]));
+
+//# sourceMappingURL=AsapAction.js.map
/***/ }),
-/* 225 */
+/* 213 */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
"use strict";
__webpack_require__.r(__webpack_exports__);
-/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "concat", function() { return concat; });
-/* harmony import */ var _observable_concat__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(226);
-/** PURE_IMPORTS_START _observable_concat PURE_IMPORTS_END */
-
-function concat() {
- var observables = [];
- for (var _i = 0; _i < arguments.length; _i++) {
- observables[_i] = arguments[_i];
+/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "Immediate", function() { return Immediate; });
+/** PURE_IMPORTS_START PURE_IMPORTS_END */
+var nextHandle = 1;
+var tasksByHandle = {};
+function runIfPresent(handle) {
+ var cb = tasksByHandle[handle];
+ if (cb) {
+ cb();
}
- return function (source) { return source.lift.call(_observable_concat__WEBPACK_IMPORTED_MODULE_0__["concat"].apply(void 0, [source].concat(observables))); };
}
-//# sourceMappingURL=concat.js.map
+var Immediate = {
+ setImmediate: function (cb) {
+ var handle = nextHandle++;
+ tasksByHandle[handle] = cb;
+ Promise.resolve().then(function () { return runIfPresent(handle); });
+ return handle;
+ },
+ clearImmediate: function (handle) {
+ delete tasksByHandle[handle];
+ },
+};
+//# sourceMappingURL=Immediate.js.map
/***/ }),
-/* 226 */
+/* 214 */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
"use strict";
__webpack_require__.r(__webpack_exports__);
-/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "concat", function() { return concat; });
-/* harmony import */ var _of__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(227);
-/* harmony import */ var _operators_concatAll__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(228);
-/** PURE_IMPORTS_START _of,_operators_concatAll PURE_IMPORTS_END */
+/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "AsapScheduler", function() { return AsapScheduler; });
+/* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(36);
+/* harmony import */ var _AsyncScheduler__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(199);
+/** PURE_IMPORTS_START tslib,_AsyncScheduler PURE_IMPORTS_END */
-function concat() {
- var observables = [];
- for (var _i = 0; _i < arguments.length; _i++) {
- observables[_i] = arguments[_i];
+var AsapScheduler = /*@__PURE__*/ (function (_super) {
+ tslib__WEBPACK_IMPORTED_MODULE_0__["__extends"](AsapScheduler, _super);
+ function AsapScheduler() {
+ return _super !== null && _super.apply(this, arguments) || this;
}
- return Object(_operators_concatAll__WEBPACK_IMPORTED_MODULE_1__["concatAll"])()(_of__WEBPACK_IMPORTED_MODULE_0__["of"].apply(void 0, observables));
-}
-//# sourceMappingURL=concat.js.map
+ AsapScheduler.prototype.flush = function (action) {
+ this.active = true;
+ this.scheduled = undefined;
+ var actions = this.actions;
+ var error;
+ var index = -1;
+ var count = actions.length;
+ action = action || actions.shift();
+ do {
+ if (error = action.execute(action.state, action.delay)) {
+ break;
+ }
+ } while (++index < count && (action = actions.shift()));
+ this.active = false;
+ if (error) {
+ while (++index < count && (action = actions.shift())) {
+ action.unsubscribe();
+ }
+ throw error;
+ }
+ };
+ return AsapScheduler;
+}(_AsyncScheduler__WEBPACK_IMPORTED_MODULE_1__["AsyncScheduler"]));
+
+//# sourceMappingURL=AsapScheduler.js.map
/***/ }),
-/* 227 */
+/* 215 */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
"use strict";
__webpack_require__.r(__webpack_exports__);
-/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "of", function() { return of; });
-/* harmony import */ var _util_isScheduler__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(206);
-/* harmony import */ var _fromArray__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(215);
-/* harmony import */ var _scheduled_scheduleArray__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(216);
-/** PURE_IMPORTS_START _util_isScheduler,_fromArray,_scheduled_scheduleArray PURE_IMPORTS_END */
-
+/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "async", function() { return async; });
+/* harmony import */ var _AsyncAction__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(196);
+/* harmony import */ var _AsyncScheduler__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(199);
+/** PURE_IMPORTS_START _AsyncAction,_AsyncScheduler PURE_IMPORTS_END */
-function of() {
- var args = [];
- for (var _i = 0; _i < arguments.length; _i++) {
- args[_i] = arguments[_i];
- }
- var scheduler = args[args.length - 1];
- if (Object(_util_isScheduler__WEBPACK_IMPORTED_MODULE_0__["isScheduler"])(scheduler)) {
- args.pop();
- return Object(_scheduled_scheduleArray__WEBPACK_IMPORTED_MODULE_2__["scheduleArray"])(args, scheduler);
- }
- else {
- return Object(_fromArray__WEBPACK_IMPORTED_MODULE_1__["fromArray"])(args);
- }
-}
-//# sourceMappingURL=of.js.map
+var async = /*@__PURE__*/ new _AsyncScheduler__WEBPACK_IMPORTED_MODULE_1__["AsyncScheduler"](_AsyncAction__WEBPACK_IMPORTED_MODULE_0__["AsyncAction"]);
+//# sourceMappingURL=async.js.map
/***/ }),
-/* 228 */
+/* 216 */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
"use strict";
__webpack_require__.r(__webpack_exports__);
-/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "concatAll", function() { return concatAll; });
-/* harmony import */ var _mergeAll__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(229);
-/** PURE_IMPORTS_START _mergeAll PURE_IMPORTS_END */
+/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "animationFrame", function() { return animationFrame; });
+/* harmony import */ var _AnimationFrameAction__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(217);
+/* harmony import */ var _AnimationFrameScheduler__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(218);
+/** PURE_IMPORTS_START _AnimationFrameAction,_AnimationFrameScheduler PURE_IMPORTS_END */
-function concatAll() {
- return Object(_mergeAll__WEBPACK_IMPORTED_MODULE_0__["mergeAll"])(1);
-}
-//# sourceMappingURL=concatAll.js.map
+
+var animationFrame = /*@__PURE__*/ new _AnimationFrameScheduler__WEBPACK_IMPORTED_MODULE_1__["AnimationFrameScheduler"](_AnimationFrameAction__WEBPACK_IMPORTED_MODULE_0__["AnimationFrameAction"]);
+//# sourceMappingURL=animationFrame.js.map
/***/ }),
-/* 229 */
+/* 217 */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
"use strict";
__webpack_require__.r(__webpack_exports__);
-/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "mergeAll", function() { return mergeAll; });
-/* harmony import */ var _mergeMap__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(230);
-/* harmony import */ var _util_identity__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(232);
-/** PURE_IMPORTS_START _mergeMap,_util_identity PURE_IMPORTS_END */
+/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "AnimationFrameAction", function() { return AnimationFrameAction; });
+/* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(36);
+/* harmony import */ var _AsyncAction__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(196);
+/** PURE_IMPORTS_START tslib,_AsyncAction PURE_IMPORTS_END */
-function mergeAll(concurrent) {
- if (concurrent === void 0) {
- concurrent = Number.POSITIVE_INFINITY;
+var AnimationFrameAction = /*@__PURE__*/ (function (_super) {
+ tslib__WEBPACK_IMPORTED_MODULE_0__["__extends"](AnimationFrameAction, _super);
+ function AnimationFrameAction(scheduler, work) {
+ var _this = _super.call(this, scheduler, work) || this;
+ _this.scheduler = scheduler;
+ _this.work = work;
+ return _this;
}
- return Object(_mergeMap__WEBPACK_IMPORTED_MODULE_0__["mergeMap"])(_util_identity__WEBPACK_IMPORTED_MODULE_1__["identity"], concurrent);
-}
-//# sourceMappingURL=mergeAll.js.map
+ AnimationFrameAction.prototype.requestAsyncId = function (scheduler, id, delay) {
+ if (delay === void 0) {
+ delay = 0;
+ }
+ if (delay !== null && delay > 0) {
+ return _super.prototype.requestAsyncId.call(this, scheduler, id, delay);
+ }
+ scheduler.actions.push(this);
+ return scheduler.scheduled || (scheduler.scheduled = requestAnimationFrame(function () { return scheduler.flush(null); }));
+ };
+ AnimationFrameAction.prototype.recycleAsyncId = function (scheduler, id, delay) {
+ if (delay === void 0) {
+ delay = 0;
+ }
+ if ((delay !== null && delay > 0) || (delay === null && this.delay > 0)) {
+ return _super.prototype.recycleAsyncId.call(this, scheduler, id, delay);
+ }
+ if (scheduler.actions.length === 0) {
+ cancelAnimationFrame(id);
+ scheduler.scheduled = undefined;
+ }
+ return undefined;
+ };
+ return AnimationFrameAction;
+}(_AsyncAction__WEBPACK_IMPORTED_MODULE_1__["AsyncAction"]));
+
+//# sourceMappingURL=AnimationFrameAction.js.map
/***/ }),
-/* 230 */
+/* 218 */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
"use strict";
__webpack_require__.r(__webpack_exports__);
-/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "mergeMap", function() { return mergeMap; });
-/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "MergeMapOperator", function() { return MergeMapOperator; });
-/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "MergeMapSubscriber", function() { return MergeMapSubscriber; });
+/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "AnimationFrameScheduler", function() { return AnimationFrameScheduler; });
/* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(36);
-/* harmony import */ var _util_subscribeToResult__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(182);
-/* harmony import */ var _OuterSubscriber__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(171);
-/* harmony import */ var _InnerSubscriber__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(183);
-/* harmony import */ var _map__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(231);
-/* harmony import */ var _observable_from__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(218);
-/** PURE_IMPORTS_START tslib,_util_subscribeToResult,_OuterSubscriber,_InnerSubscriber,_map,_observable_from PURE_IMPORTS_END */
+/* harmony import */ var _AsyncScheduler__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(199);
+/** PURE_IMPORTS_START tslib,_AsyncScheduler PURE_IMPORTS_END */
+
+
+var AnimationFrameScheduler = /*@__PURE__*/ (function (_super) {
+ tslib__WEBPACK_IMPORTED_MODULE_0__["__extends"](AnimationFrameScheduler, _super);
+ function AnimationFrameScheduler() {
+ return _super !== null && _super.apply(this, arguments) || this;
+ }
+ AnimationFrameScheduler.prototype.flush = function (action) {
+ this.active = true;
+ this.scheduled = undefined;
+ var actions = this.actions;
+ var error;
+ var index = -1;
+ var count = actions.length;
+ action = action || actions.shift();
+ do {
+ if (error = action.execute(action.state, action.delay)) {
+ break;
+ }
+ } while (++index < count && (action = actions.shift()));
+ this.active = false;
+ if (error) {
+ while (++index < count && (action = actions.shift())) {
+ action.unsubscribe();
+ }
+ throw error;
+ }
+ };
+ return AnimationFrameScheduler;
+}(_AsyncScheduler__WEBPACK_IMPORTED_MODULE_1__["AsyncScheduler"]));
+//# sourceMappingURL=AnimationFrameScheduler.js.map
+/***/ }),
+/* 219 */
+/***/ (function(module, __webpack_exports__, __webpack_require__) {
+"use strict";
+__webpack_require__.r(__webpack_exports__);
+/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "VirtualTimeScheduler", function() { return VirtualTimeScheduler; });
+/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "VirtualAction", function() { return VirtualAction; });
+/* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(36);
+/* harmony import */ var _AsyncAction__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(196);
+/* harmony import */ var _AsyncScheduler__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(199);
+/** PURE_IMPORTS_START tslib,_AsyncAction,_AsyncScheduler PURE_IMPORTS_END */
-function mergeMap(project, resultSelector, concurrent) {
- if (concurrent === void 0) {
- concurrent = Number.POSITIVE_INFINITY;
- }
- if (typeof resultSelector === 'function') {
- return function (source) { return source.pipe(mergeMap(function (a, i) { return Object(_observable_from__WEBPACK_IMPORTED_MODULE_5__["from"])(project(a, i)).pipe(Object(_map__WEBPACK_IMPORTED_MODULE_4__["map"])(function (b, ii) { return resultSelector(a, b, i, ii); })); }, concurrent)); };
- }
- else if (typeof resultSelector === 'number') {
- concurrent = resultSelector;
- }
- return function (source) { return source.lift(new MergeMapOperator(project, concurrent)); };
-}
-var MergeMapOperator = /*@__PURE__*/ (function () {
- function MergeMapOperator(project, concurrent) {
- if (concurrent === void 0) {
- concurrent = Number.POSITIVE_INFINITY;
+
+var VirtualTimeScheduler = /*@__PURE__*/ (function (_super) {
+ tslib__WEBPACK_IMPORTED_MODULE_0__["__extends"](VirtualTimeScheduler, _super);
+ function VirtualTimeScheduler(SchedulerAction, maxFrames) {
+ if (SchedulerAction === void 0) {
+ SchedulerAction = VirtualAction;
}
- this.project = project;
- this.concurrent = concurrent;
+ if (maxFrames === void 0) {
+ maxFrames = Number.POSITIVE_INFINITY;
+ }
+ var _this = _super.call(this, SchedulerAction, function () { return _this.frame; }) || this;
+ _this.maxFrames = maxFrames;
+ _this.frame = 0;
+ _this.index = -1;
+ return _this;
}
- MergeMapOperator.prototype.call = function (observer, source) {
- return source.subscribe(new MergeMapSubscriber(observer, this.project, this.concurrent));
+ VirtualTimeScheduler.prototype.flush = function () {
+ var _a = this, actions = _a.actions, maxFrames = _a.maxFrames;
+ var error, action;
+ while ((action = actions[0]) && action.delay <= maxFrames) {
+ actions.shift();
+ this.frame = action.delay;
+ if (error = action.execute(action.state, action.delay)) {
+ break;
+ }
+ }
+ if (error) {
+ while (action = actions.shift()) {
+ action.unsubscribe();
+ }
+ throw error;
+ }
};
- return MergeMapOperator;
-}());
+ VirtualTimeScheduler.frameTimeFactor = 10;
+ return VirtualTimeScheduler;
+}(_AsyncScheduler__WEBPACK_IMPORTED_MODULE_2__["AsyncScheduler"]));
-var MergeMapSubscriber = /*@__PURE__*/ (function (_super) {
- tslib__WEBPACK_IMPORTED_MODULE_0__["__extends"](MergeMapSubscriber, _super);
- function MergeMapSubscriber(destination, project, concurrent) {
- if (concurrent === void 0) {
- concurrent = Number.POSITIVE_INFINITY;
+var VirtualAction = /*@__PURE__*/ (function (_super) {
+ tslib__WEBPACK_IMPORTED_MODULE_0__["__extends"](VirtualAction, _super);
+ function VirtualAction(scheduler, work, index) {
+ if (index === void 0) {
+ index = scheduler.index += 1;
}
- var _this = _super.call(this, destination) || this;
- _this.project = project;
- _this.concurrent = concurrent;
- _this.hasCompleted = false;
- _this.buffer = [];
- _this.active = 0;
- _this.index = 0;
+ var _this = _super.call(this, scheduler, work) || this;
+ _this.scheduler = scheduler;
+ _this.work = work;
+ _this.index = index;
+ _this.active = true;
+ _this.index = scheduler.index = index;
return _this;
}
- MergeMapSubscriber.prototype._next = function (value) {
- if (this.active < this.concurrent) {
- this._tryNext(value);
+ VirtualAction.prototype.schedule = function (state, delay) {
+ if (delay === void 0) {
+ delay = 0;
}
- else {
- this.buffer.push(value);
+ if (!this.id) {
+ return _super.prototype.schedule.call(this, state, delay);
}
+ this.active = false;
+ var action = new VirtualAction(this.scheduler, this.work);
+ this.add(action);
+ return action.schedule(state, delay);
};
- MergeMapSubscriber.prototype._tryNext = function (value) {
- var result;
- var index = this.index++;
- try {
- result = this.project(value, index);
- }
- catch (err) {
- this.destination.error(err);
- return;
+ VirtualAction.prototype.requestAsyncId = function (scheduler, id, delay) {
+ if (delay === void 0) {
+ delay = 0;
}
- this.active++;
- this._innerSub(result, value, index);
- };
- MergeMapSubscriber.prototype._innerSub = function (ish, value, index) {
- var innerSubscriber = new _InnerSubscriber__WEBPACK_IMPORTED_MODULE_3__["InnerSubscriber"](this, undefined, undefined);
- var destination = this.destination;
- destination.add(innerSubscriber);
- Object(_util_subscribeToResult__WEBPACK_IMPORTED_MODULE_1__["subscribeToResult"])(this, ish, value, index, innerSubscriber);
+ this.delay = scheduler.frame + delay;
+ var actions = scheduler.actions;
+ actions.push(this);
+ actions.sort(VirtualAction.sortActions);
+ return true;
};
- MergeMapSubscriber.prototype._complete = function () {
- this.hasCompleted = true;
- if (this.active === 0 && this.buffer.length === 0) {
- this.destination.complete();
+ VirtualAction.prototype.recycleAsyncId = function (scheduler, id, delay) {
+ if (delay === void 0) {
+ delay = 0;
}
- this.unsubscribe();
+ return undefined;
};
- MergeMapSubscriber.prototype.notifyNext = function (outerValue, innerValue, outerIndex, innerIndex, innerSub) {
- this.destination.next(innerValue);
+ VirtualAction.prototype._execute = function (state, delay) {
+ if (this.active === true) {
+ return _super.prototype._execute.call(this, state, delay);
+ }
};
- MergeMapSubscriber.prototype.notifyComplete = function (innerSub) {
- var buffer = this.buffer;
- this.remove(innerSub);
- this.active--;
- if (buffer.length > 0) {
- this._next(buffer.shift());
+ VirtualAction.sortActions = function (a, b) {
+ if (a.delay === b.delay) {
+ if (a.index === b.index) {
+ return 0;
+ }
+ else if (a.index > b.index) {
+ return 1;
+ }
+ else {
+ return -1;
+ }
}
- else if (this.active === 0 && this.hasCompleted) {
- this.destination.complete();
+ else if (a.delay > b.delay) {
+ return 1;
+ }
+ else {
+ return -1;
}
};
- return MergeMapSubscriber;
-}(_OuterSubscriber__WEBPACK_IMPORTED_MODULE_2__["OuterSubscriber"]));
+ return VirtualAction;
+}(_AsyncAction__WEBPACK_IMPORTED_MODULE_1__["AsyncAction"]));
-//# sourceMappingURL=mergeMap.js.map
+//# sourceMappingURL=VirtualTimeScheduler.js.map
/***/ }),
-/* 231 */
+/* 220 */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
"use strict";
__webpack_require__.r(__webpack_exports__);
-/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "map", function() { return map; });
-/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "MapOperator", function() { return MapOperator; });
-/* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(36);
-/* harmony import */ var _Subscriber__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(172);
-/** PURE_IMPORTS_START tslib,_Subscriber PURE_IMPORTS_END */
+/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "identity", function() { return identity; });
+/** PURE_IMPORTS_START PURE_IMPORTS_END */
+function identity(x) {
+ return x;
+}
+//# sourceMappingURL=identity.js.map
-function map(project, thisArg) {
- return function mapOperation(source) {
+/***/ }),
+/* 221 */
+/***/ (function(module, __webpack_exports__, __webpack_require__) {
+
+"use strict";
+__webpack_require__.r(__webpack_exports__);
+/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "isObservable", function() { return isObservable; });
+/* harmony import */ var _Observable__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(170);
+/** PURE_IMPORTS_START _Observable PURE_IMPORTS_END */
+
+function isObservable(obj) {
+ return !!obj && (obj instanceof _Observable__WEBPACK_IMPORTED_MODULE_0__["Observable"] || (typeof obj.lift === 'function' && typeof obj.subscribe === 'function'));
+}
+//# sourceMappingURL=isObservable.js.map
+
+
+/***/ }),
+/* 222 */
+/***/ (function(module, __webpack_exports__, __webpack_require__) {
+
+"use strict";
+__webpack_require__.r(__webpack_exports__);
+/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ArgumentOutOfRangeError", function() { return ArgumentOutOfRangeError; });
+/** PURE_IMPORTS_START PURE_IMPORTS_END */
+var ArgumentOutOfRangeErrorImpl = /*@__PURE__*/ (function () {
+ function ArgumentOutOfRangeErrorImpl() {
+ Error.call(this);
+ this.message = 'argument out of range';
+ this.name = 'ArgumentOutOfRangeError';
+ return this;
+ }
+ ArgumentOutOfRangeErrorImpl.prototype = /*@__PURE__*/ Object.create(Error.prototype);
+ return ArgumentOutOfRangeErrorImpl;
+})();
+var ArgumentOutOfRangeError = ArgumentOutOfRangeErrorImpl;
+//# sourceMappingURL=ArgumentOutOfRangeError.js.map
+
+
+/***/ }),
+/* 223 */
+/***/ (function(module, __webpack_exports__, __webpack_require__) {
+
+"use strict";
+__webpack_require__.r(__webpack_exports__);
+/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "EmptyError", function() { return EmptyError; });
+/** PURE_IMPORTS_START PURE_IMPORTS_END */
+var EmptyErrorImpl = /*@__PURE__*/ (function () {
+ function EmptyErrorImpl() {
+ Error.call(this);
+ this.message = 'no elements in sequence';
+ this.name = 'EmptyError';
+ return this;
+ }
+ EmptyErrorImpl.prototype = /*@__PURE__*/ Object.create(Error.prototype);
+ return EmptyErrorImpl;
+})();
+var EmptyError = EmptyErrorImpl;
+//# sourceMappingURL=EmptyError.js.map
+
+
+/***/ }),
+/* 224 */
+/***/ (function(module, __webpack_exports__, __webpack_require__) {
+
+"use strict";
+__webpack_require__.r(__webpack_exports__);
+/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "TimeoutError", function() { return TimeoutError; });
+/** PURE_IMPORTS_START PURE_IMPORTS_END */
+var TimeoutErrorImpl = /*@__PURE__*/ (function () {
+ function TimeoutErrorImpl() {
+ Error.call(this);
+ this.message = 'Timeout has occurred';
+ this.name = 'TimeoutError';
+ return this;
+ }
+ TimeoutErrorImpl.prototype = /*@__PURE__*/ Object.create(Error.prototype);
+ return TimeoutErrorImpl;
+})();
+var TimeoutError = TimeoutErrorImpl;
+//# sourceMappingURL=TimeoutError.js.map
+
+
+/***/ }),
+/* 225 */
+/***/ (function(module, __webpack_exports__, __webpack_require__) {
+
+"use strict";
+__webpack_require__.r(__webpack_exports__);
+/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "bindCallback", function() { return bindCallback; });
+/* harmony import */ var _Observable__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(170);
+/* harmony import */ var _AsyncSubject__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(210);
+/* harmony import */ var _operators_map__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(226);
+/* harmony import */ var _util_canReportError__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(171);
+/* harmony import */ var _util_isArray__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(178);
+/* harmony import */ var _util_isScheduler__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(205);
+/** PURE_IMPORTS_START _Observable,_AsyncSubject,_operators_map,_util_canReportError,_util_isArray,_util_isScheduler PURE_IMPORTS_END */
+
+
+
+
+
+
+function bindCallback(callbackFunc, resultSelector, scheduler) {
+ if (resultSelector) {
+ if (Object(_util_isScheduler__WEBPACK_IMPORTED_MODULE_5__["isScheduler"])(resultSelector)) {
+ scheduler = resultSelector;
+ }
+ else {
+ return function () {
+ var args = [];
+ for (var _i = 0; _i < arguments.length; _i++) {
+ args[_i] = arguments[_i];
+ }
+ return bindCallback(callbackFunc, scheduler).apply(void 0, args).pipe(Object(_operators_map__WEBPACK_IMPORTED_MODULE_2__["map"])(function (args) { return Object(_util_isArray__WEBPACK_IMPORTED_MODULE_4__["isArray"])(args) ? resultSelector.apply(void 0, args) : resultSelector(args); }));
+ };
+ }
+ }
+ return function () {
+ var args = [];
+ for (var _i = 0; _i < arguments.length; _i++) {
+ args[_i] = arguments[_i];
+ }
+ var context = this;
+ var subject;
+ var params = {
+ context: context,
+ subject: subject,
+ callbackFunc: callbackFunc,
+ scheduler: scheduler,
+ };
+ return new _Observable__WEBPACK_IMPORTED_MODULE_0__["Observable"](function (subscriber) {
+ if (!scheduler) {
+ if (!subject) {
+ subject = new _AsyncSubject__WEBPACK_IMPORTED_MODULE_1__["AsyncSubject"]();
+ var handler = function () {
+ var innerArgs = [];
+ for (var _i = 0; _i < arguments.length; _i++) {
+ innerArgs[_i] = arguments[_i];
+ }
+ subject.next(innerArgs.length <= 1 ? innerArgs[0] : innerArgs);
+ subject.complete();
+ };
+ try {
+ callbackFunc.apply(context, args.concat([handler]));
+ }
+ catch (err) {
+ if (Object(_util_canReportError__WEBPACK_IMPORTED_MODULE_3__["canReportError"])(subject)) {
+ subject.error(err);
+ }
+ else {
+ console.warn(err);
+ }
+ }
+ }
+ return subject.subscribe(subscriber);
+ }
+ else {
+ var state = {
+ args: args, subscriber: subscriber, params: params,
+ };
+ return scheduler.schedule(dispatch, 0, state);
+ }
+ });
+ };
+}
+function dispatch(state) {
+ var _this = this;
+ var self = this;
+ var args = state.args, subscriber = state.subscriber, params = state.params;
+ var callbackFunc = params.callbackFunc, context = params.context, scheduler = params.scheduler;
+ var subject = params.subject;
+ if (!subject) {
+ subject = params.subject = new _AsyncSubject__WEBPACK_IMPORTED_MODULE_1__["AsyncSubject"]();
+ var handler = function () {
+ var innerArgs = [];
+ for (var _i = 0; _i < arguments.length; _i++) {
+ innerArgs[_i] = arguments[_i];
+ }
+ var value = innerArgs.length <= 1 ? innerArgs[0] : innerArgs;
+ _this.add(scheduler.schedule(dispatchNext, 0, { value: value, subject: subject }));
+ };
+ try {
+ callbackFunc.apply(context, args.concat([handler]));
+ }
+ catch (err) {
+ subject.error(err);
+ }
+ }
+ this.add(subject.subscribe(subscriber));
+}
+function dispatchNext(state) {
+ var value = state.value, subject = state.subject;
+ subject.next(value);
+ subject.complete();
+}
+function dispatchError(state) {
+ var err = state.err, subject = state.subject;
+ subject.error(err);
+}
+//# sourceMappingURL=bindCallback.js.map
+
+
+/***/ }),
+/* 226 */
+/***/ (function(module, __webpack_exports__, __webpack_require__) {
+
+"use strict";
+__webpack_require__.r(__webpack_exports__);
+/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "map", function() { return map; });
+/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "MapOperator", function() { return MapOperator; });
+/* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(36);
+/* harmony import */ var _Subscriber__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(172);
+/** PURE_IMPORTS_START tslib,_Subscriber PURE_IMPORTS_END */
+
+
+function map(project, thisArg) {
+ return function mapOperation(source) {
if (typeof project !== 'function') {
throw new TypeError('argument is not a function. Are you looking for `mapTo()`?');
}
@@ -25230,1041 +25225,1045 @@ var MapSubscriber = /*@__PURE__*/ (function (_super) {
/***/ }),
-/* 232 */
+/* 227 */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
"use strict";
__webpack_require__.r(__webpack_exports__);
-/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "identity", function() { return identity; });
-/** PURE_IMPORTS_START PURE_IMPORTS_END */
-function identity(x) {
- return x;
-}
-//# sourceMappingURL=identity.js.map
+/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "bindNodeCallback", function() { return bindNodeCallback; });
+/* harmony import */ var _Observable__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(170);
+/* harmony import */ var _AsyncSubject__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(210);
+/* harmony import */ var _operators_map__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(226);
+/* harmony import */ var _util_canReportError__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(171);
+/* harmony import */ var _util_isScheduler__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(205);
+/* harmony import */ var _util_isArray__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(178);
+/** PURE_IMPORTS_START _Observable,_AsyncSubject,_operators_map,_util_canReportError,_util_isScheduler,_util_isArray PURE_IMPORTS_END */
-/***/ }),
-/* 233 */
-/***/ (function(module, __webpack_exports__, __webpack_require__) {
-"use strict";
-__webpack_require__.r(__webpack_exports__);
-/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "concatMap", function() { return concatMap; });
-/* harmony import */ var _mergeMap__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(230);
-/** PURE_IMPORTS_START _mergeMap PURE_IMPORTS_END */
-function concatMap(project, resultSelector) {
- return Object(_mergeMap__WEBPACK_IMPORTED_MODULE_0__["mergeMap"])(project, resultSelector, 1);
+
+
+function bindNodeCallback(callbackFunc, resultSelector, scheduler) {
+ if (resultSelector) {
+ if (Object(_util_isScheduler__WEBPACK_IMPORTED_MODULE_4__["isScheduler"])(resultSelector)) {
+ scheduler = resultSelector;
+ }
+ else {
+ return function () {
+ var args = [];
+ for (var _i = 0; _i < arguments.length; _i++) {
+ args[_i] = arguments[_i];
+ }
+ return bindNodeCallback(callbackFunc, scheduler).apply(void 0, args).pipe(Object(_operators_map__WEBPACK_IMPORTED_MODULE_2__["map"])(function (args) { return Object(_util_isArray__WEBPACK_IMPORTED_MODULE_5__["isArray"])(args) ? resultSelector.apply(void 0, args) : resultSelector(args); }));
+ };
+ }
+ }
+ return function () {
+ var args = [];
+ for (var _i = 0; _i < arguments.length; _i++) {
+ args[_i] = arguments[_i];
+ }
+ var params = {
+ subject: undefined,
+ args: args,
+ callbackFunc: callbackFunc,
+ scheduler: scheduler,
+ context: this,
+ };
+ return new _Observable__WEBPACK_IMPORTED_MODULE_0__["Observable"](function (subscriber) {
+ var context = params.context;
+ var subject = params.subject;
+ if (!scheduler) {
+ if (!subject) {
+ subject = params.subject = new _AsyncSubject__WEBPACK_IMPORTED_MODULE_1__["AsyncSubject"]();
+ var handler = function () {
+ var innerArgs = [];
+ for (var _i = 0; _i < arguments.length; _i++) {
+ innerArgs[_i] = arguments[_i];
+ }
+ var err = innerArgs.shift();
+ if (err) {
+ subject.error(err);
+ return;
+ }
+ subject.next(innerArgs.length <= 1 ? innerArgs[0] : innerArgs);
+ subject.complete();
+ };
+ try {
+ callbackFunc.apply(context, args.concat([handler]));
+ }
+ catch (err) {
+ if (Object(_util_canReportError__WEBPACK_IMPORTED_MODULE_3__["canReportError"])(subject)) {
+ subject.error(err);
+ }
+ else {
+ console.warn(err);
+ }
+ }
+ }
+ return subject.subscribe(subscriber);
+ }
+ else {
+ return scheduler.schedule(dispatch, 0, { params: params, subscriber: subscriber, context: context });
+ }
+ });
+ };
}
-//# sourceMappingURL=concatMap.js.map
+function dispatch(state) {
+ var _this = this;
+ var params = state.params, subscriber = state.subscriber, context = state.context;
+ var callbackFunc = params.callbackFunc, args = params.args, scheduler = params.scheduler;
+ var subject = params.subject;
+ if (!subject) {
+ subject = params.subject = new _AsyncSubject__WEBPACK_IMPORTED_MODULE_1__["AsyncSubject"]();
+ var handler = function () {
+ var innerArgs = [];
+ for (var _i = 0; _i < arguments.length; _i++) {
+ innerArgs[_i] = arguments[_i];
+ }
+ var err = innerArgs.shift();
+ if (err) {
+ _this.add(scheduler.schedule(dispatchError, 0, { err: err, subject: subject }));
+ }
+ else {
+ var value = innerArgs.length <= 1 ? innerArgs[0] : innerArgs;
+ _this.add(scheduler.schedule(dispatchNext, 0, { value: value, subject: subject }));
+ }
+ };
+ try {
+ callbackFunc.apply(context, args.concat([handler]));
+ }
+ catch (err) {
+ this.add(scheduler.schedule(dispatchError, 0, { err: err, subject: subject }));
+ }
+ }
+ this.add(subject.subscribe(subscriber));
+}
+function dispatchNext(arg) {
+ var value = arg.value, subject = arg.subject;
+ subject.next(value);
+ subject.complete();
+}
+function dispatchError(arg) {
+ var err = arg.err, subject = arg.subject;
+ subject.error(err);
+}
+//# sourceMappingURL=bindNodeCallback.js.map
/***/ }),
-/* 234 */
+/* 228 */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
"use strict";
__webpack_require__.r(__webpack_exports__);
-/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "concatMapTo", function() { return concatMapTo; });
-/* harmony import */ var _concatMap__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(233);
-/** PURE_IMPORTS_START _concatMap PURE_IMPORTS_END */
+/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "combineLatest", function() { return combineLatest; });
+/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "CombineLatestOperator", function() { return CombineLatestOperator; });
+/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "CombineLatestSubscriber", function() { return CombineLatestSubscriber; });
+/* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(36);
+/* harmony import */ var _util_isScheduler__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(205);
+/* harmony import */ var _util_isArray__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(178);
+/* harmony import */ var _OuterSubscriber__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(229);
+/* harmony import */ var _util_subscribeToResult__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(230);
+/* harmony import */ var _fromArray__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(206);
+/** PURE_IMPORTS_START tslib,_util_isScheduler,_util_isArray,_OuterSubscriber,_util_subscribeToResult,_fromArray PURE_IMPORTS_END */
-function concatMapTo(innerObservable, resultSelector) {
- return Object(_concatMap__WEBPACK_IMPORTED_MODULE_0__["concatMap"])(function () { return innerObservable; }, resultSelector);
-}
-//# sourceMappingURL=concatMapTo.js.map
-/***/ }),
-/* 235 */
-/***/ (function(module, __webpack_exports__, __webpack_require__) {
-"use strict";
-__webpack_require__.r(__webpack_exports__);
-/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "count", function() { return count; });
-/* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(36);
-/* harmony import */ var _Subscriber__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(172);
-/** PURE_IMPORTS_START tslib,_Subscriber PURE_IMPORTS_END */
-function count(predicate) {
- return function (source) { return source.lift(new CountOperator(predicate, source)); };
+var NONE = {};
+function combineLatest() {
+ var observables = [];
+ for (var _i = 0; _i < arguments.length; _i++) {
+ observables[_i] = arguments[_i];
+ }
+ var resultSelector = null;
+ var scheduler = null;
+ if (Object(_util_isScheduler__WEBPACK_IMPORTED_MODULE_1__["isScheduler"])(observables[observables.length - 1])) {
+ scheduler = observables.pop();
+ }
+ if (typeof observables[observables.length - 1] === 'function') {
+ resultSelector = observables.pop();
+ }
+ if (observables.length === 1 && Object(_util_isArray__WEBPACK_IMPORTED_MODULE_2__["isArray"])(observables[0])) {
+ observables = observables[0];
+ }
+ return Object(_fromArray__WEBPACK_IMPORTED_MODULE_5__["fromArray"])(observables, scheduler).lift(new CombineLatestOperator(resultSelector));
}
-var CountOperator = /*@__PURE__*/ (function () {
- function CountOperator(predicate, source) {
- this.predicate = predicate;
- this.source = source;
+var CombineLatestOperator = /*@__PURE__*/ (function () {
+ function CombineLatestOperator(resultSelector) {
+ this.resultSelector = resultSelector;
}
- CountOperator.prototype.call = function (subscriber, source) {
- return source.subscribe(new CountSubscriber(subscriber, this.predicate, this.source));
+ CombineLatestOperator.prototype.call = function (subscriber, source) {
+ return source.subscribe(new CombineLatestSubscriber(subscriber, this.resultSelector));
};
- return CountOperator;
+ return CombineLatestOperator;
}());
-var CountSubscriber = /*@__PURE__*/ (function (_super) {
- tslib__WEBPACK_IMPORTED_MODULE_0__["__extends"](CountSubscriber, _super);
- function CountSubscriber(destination, predicate, source) {
+
+var CombineLatestSubscriber = /*@__PURE__*/ (function (_super) {
+ tslib__WEBPACK_IMPORTED_MODULE_0__["__extends"](CombineLatestSubscriber, _super);
+ function CombineLatestSubscriber(destination, resultSelector) {
var _this = _super.call(this, destination) || this;
- _this.predicate = predicate;
- _this.source = source;
- _this.count = 0;
- _this.index = 0;
+ _this.resultSelector = resultSelector;
+ _this.active = 0;
+ _this.values = [];
+ _this.observables = [];
return _this;
}
- CountSubscriber.prototype._next = function (value) {
- if (this.predicate) {
- this._tryPredicate(value);
+ CombineLatestSubscriber.prototype._next = function (observable) {
+ this.values.push(NONE);
+ this.observables.push(observable);
+ };
+ CombineLatestSubscriber.prototype._complete = function () {
+ var observables = this.observables;
+ var len = observables.length;
+ if (len === 0) {
+ this.destination.complete();
}
else {
- this.count++;
+ this.active = len;
+ this.toRespond = len;
+ for (var i = 0; i < len; i++) {
+ var observable = observables[i];
+ this.add(Object(_util_subscribeToResult__WEBPACK_IMPORTED_MODULE_4__["subscribeToResult"])(this, observable, observable, i));
+ }
}
};
- CountSubscriber.prototype._tryPredicate = function (value) {
+ CombineLatestSubscriber.prototype.notifyComplete = function (unused) {
+ if ((this.active -= 1) === 0) {
+ this.destination.complete();
+ }
+ };
+ CombineLatestSubscriber.prototype.notifyNext = function (outerValue, innerValue, outerIndex, innerIndex, innerSub) {
+ var values = this.values;
+ var oldVal = values[outerIndex];
+ var toRespond = !this.toRespond
+ ? 0
+ : oldVal === NONE ? --this.toRespond : this.toRespond;
+ values[outerIndex] = innerValue;
+ if (toRespond === 0) {
+ if (this.resultSelector) {
+ this._tryResultSelector(values);
+ }
+ else {
+ this.destination.next(values.slice());
+ }
+ }
+ };
+ CombineLatestSubscriber.prototype._tryResultSelector = function (values) {
var result;
try {
- result = this.predicate(value, this.index++, this.source);
+ result = this.resultSelector.apply(this, values);
}
catch (err) {
this.destination.error(err);
return;
}
- if (result) {
- this.count++;
- }
+ this.destination.next(result);
};
- CountSubscriber.prototype._complete = function () {
- this.destination.next(this.count);
+ return CombineLatestSubscriber;
+}(_OuterSubscriber__WEBPACK_IMPORTED_MODULE_3__["OuterSubscriber"]));
+
+//# sourceMappingURL=combineLatest.js.map
+
+
+/***/ }),
+/* 229 */
+/***/ (function(module, __webpack_exports__, __webpack_require__) {
+
+"use strict";
+__webpack_require__.r(__webpack_exports__);
+/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "OuterSubscriber", function() { return OuterSubscriber; });
+/* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(36);
+/* harmony import */ var _Subscriber__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(172);
+/** PURE_IMPORTS_START tslib,_Subscriber PURE_IMPORTS_END */
+
+
+var OuterSubscriber = /*@__PURE__*/ (function (_super) {
+ tslib__WEBPACK_IMPORTED_MODULE_0__["__extends"](OuterSubscriber, _super);
+ function OuterSubscriber() {
+ return _super !== null && _super.apply(this, arguments) || this;
+ }
+ OuterSubscriber.prototype.notifyNext = function (outerValue, innerValue, outerIndex, innerIndex, innerSub) {
+ this.destination.next(innerValue);
+ };
+ OuterSubscriber.prototype.notifyError = function (error, innerSub) {
+ this.destination.error(error);
+ };
+ OuterSubscriber.prototype.notifyComplete = function (innerSub) {
this.destination.complete();
};
- return CountSubscriber;
+ return OuterSubscriber;
}(_Subscriber__WEBPACK_IMPORTED_MODULE_1__["Subscriber"]));
-//# sourceMappingURL=count.js.map
+
+//# sourceMappingURL=OuterSubscriber.js.map
/***/ }),
-/* 236 */
+/* 230 */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
"use strict";
__webpack_require__.r(__webpack_exports__);
-/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "debounce", function() { return debounce; });
-/* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(36);
-/* harmony import */ var _OuterSubscriber__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(171);
-/* harmony import */ var _util_subscribeToResult__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(182);
-/** PURE_IMPORTS_START tslib,_OuterSubscriber,_util_subscribeToResult PURE_IMPORTS_END */
+/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "subscribeToResult", function() { return subscribeToResult; });
+/* harmony import */ var _InnerSubscriber__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(231);
+/* harmony import */ var _subscribeTo__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(232);
+/* harmony import */ var _Observable__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(170);
+/** PURE_IMPORTS_START _InnerSubscriber,_subscribeTo,_Observable PURE_IMPORTS_END */
-function debounce(durationSelector) {
- return function (source) { return source.lift(new DebounceOperator(durationSelector)); };
-}
-var DebounceOperator = /*@__PURE__*/ (function () {
- function DebounceOperator(durationSelector) {
- this.durationSelector = durationSelector;
+function subscribeToResult(outerSubscriber, result, outerValue, outerIndex, destination) {
+ if (destination === void 0) {
+ destination = new _InnerSubscriber__WEBPACK_IMPORTED_MODULE_0__["InnerSubscriber"](outerSubscriber, outerValue, outerIndex);
}
- DebounceOperator.prototype.call = function (subscriber, source) {
- return source.subscribe(new DebounceSubscriber(subscriber, this.durationSelector));
- };
- return DebounceOperator;
-}());
-var DebounceSubscriber = /*@__PURE__*/ (function (_super) {
- tslib__WEBPACK_IMPORTED_MODULE_0__["__extends"](DebounceSubscriber, _super);
- function DebounceSubscriber(destination, durationSelector) {
- var _this = _super.call(this, destination) || this;
- _this.durationSelector = durationSelector;
- _this.hasValue = false;
- _this.durationSubscription = null;
- return _this;
+ if (destination.closed) {
+ return undefined;
}
- DebounceSubscriber.prototype._next = function (value) {
- try {
- var result = this.durationSelector.call(this, value);
- if (result) {
- this._tryNext(value, result);
- }
- }
- catch (err) {
- this.destination.error(err);
- }
- };
- DebounceSubscriber.prototype._complete = function () {
- this.emitValue();
- this.destination.complete();
- };
- DebounceSubscriber.prototype._tryNext = function (value, duration) {
- var subscription = this.durationSubscription;
- this.value = value;
- this.hasValue = true;
- if (subscription) {
- subscription.unsubscribe();
- this.remove(subscription);
- }
- subscription = Object(_util_subscribeToResult__WEBPACK_IMPORTED_MODULE_2__["subscribeToResult"])(this, duration);
- if (subscription && !subscription.closed) {
- this.add(this.durationSubscription = subscription);
- }
- };
- DebounceSubscriber.prototype.notifyNext = function (outerValue, innerValue, outerIndex, innerIndex, innerSub) {
- this.emitValue();
- };
- DebounceSubscriber.prototype.notifyComplete = function () {
- this.emitValue();
- };
- DebounceSubscriber.prototype.emitValue = function () {
- if (this.hasValue) {
- var value = this.value;
- var subscription = this.durationSubscription;
- if (subscription) {
- this.durationSubscription = null;
- subscription.unsubscribe();
- this.remove(subscription);
- }
- this.value = null;
- this.hasValue = false;
- _super.prototype._next.call(this, value);
- }
- };
- return DebounceSubscriber;
-}(_OuterSubscriber__WEBPACK_IMPORTED_MODULE_1__["OuterSubscriber"]));
-//# sourceMappingURL=debounce.js.map
+ if (result instanceof _Observable__WEBPACK_IMPORTED_MODULE_2__["Observable"]) {
+ return result.subscribe(destination);
+ }
+ return Object(_subscribeTo__WEBPACK_IMPORTED_MODULE_1__["subscribeTo"])(result)(destination);
+}
+//# sourceMappingURL=subscribeToResult.js.map
/***/ }),
-/* 237 */
+/* 231 */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
"use strict";
__webpack_require__.r(__webpack_exports__);
-/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "debounceTime", function() { return debounceTime; });
+/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "InnerSubscriber", function() { return InnerSubscriber; });
/* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(36);
/* harmony import */ var _Subscriber__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(172);
-/* harmony import */ var _scheduler_async__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(199);
-/** PURE_IMPORTS_START tslib,_Subscriber,_scheduler_async PURE_IMPORTS_END */
-
+/** PURE_IMPORTS_START tslib,_Subscriber PURE_IMPORTS_END */
-function debounceTime(dueTime, scheduler) {
- if (scheduler === void 0) {
- scheduler = _scheduler_async__WEBPACK_IMPORTED_MODULE_2__["async"];
- }
- return function (source) { return source.lift(new DebounceTimeOperator(dueTime, scheduler)); };
-}
-var DebounceTimeOperator = /*@__PURE__*/ (function () {
- function DebounceTimeOperator(dueTime, scheduler) {
- this.dueTime = dueTime;
- this.scheduler = scheduler;
- }
- DebounceTimeOperator.prototype.call = function (subscriber, source) {
- return source.subscribe(new DebounceTimeSubscriber(subscriber, this.dueTime, this.scheduler));
- };
- return DebounceTimeOperator;
-}());
-var DebounceTimeSubscriber = /*@__PURE__*/ (function (_super) {
- tslib__WEBPACK_IMPORTED_MODULE_0__["__extends"](DebounceTimeSubscriber, _super);
- function DebounceTimeSubscriber(destination, dueTime, scheduler) {
- var _this = _super.call(this, destination) || this;
- _this.dueTime = dueTime;
- _this.scheduler = scheduler;
- _this.debouncedSubscription = null;
- _this.lastValue = null;
- _this.hasValue = false;
+var InnerSubscriber = /*@__PURE__*/ (function (_super) {
+ tslib__WEBPACK_IMPORTED_MODULE_0__["__extends"](InnerSubscriber, _super);
+ function InnerSubscriber(parent, outerValue, outerIndex) {
+ var _this = _super.call(this) || this;
+ _this.parent = parent;
+ _this.outerValue = outerValue;
+ _this.outerIndex = outerIndex;
+ _this.index = 0;
return _this;
}
- DebounceTimeSubscriber.prototype._next = function (value) {
- this.clearDebounce();
- this.lastValue = value;
- this.hasValue = true;
- this.add(this.debouncedSubscription = this.scheduler.schedule(dispatchNext, this.dueTime, this));
- };
- DebounceTimeSubscriber.prototype._complete = function () {
- this.debouncedNext();
- this.destination.complete();
+ InnerSubscriber.prototype._next = function (value) {
+ this.parent.notifyNext(this.outerValue, value, this.outerIndex, this.index++, this);
};
- DebounceTimeSubscriber.prototype.debouncedNext = function () {
- this.clearDebounce();
- if (this.hasValue) {
- var lastValue = this.lastValue;
- this.lastValue = null;
- this.hasValue = false;
- this.destination.next(lastValue);
- }
+ InnerSubscriber.prototype._error = function (error) {
+ this.parent.notifyError(error, this);
+ this.unsubscribe();
};
- DebounceTimeSubscriber.prototype.clearDebounce = function () {
- var debouncedSubscription = this.debouncedSubscription;
- if (debouncedSubscription !== null) {
- this.remove(debouncedSubscription);
- debouncedSubscription.unsubscribe();
- this.debouncedSubscription = null;
- }
+ InnerSubscriber.prototype._complete = function () {
+ this.parent.notifyComplete(this);
+ this.unsubscribe();
};
- return DebounceTimeSubscriber;
+ return InnerSubscriber;
}(_Subscriber__WEBPACK_IMPORTED_MODULE_1__["Subscriber"]));
-function dispatchNext(subscriber) {
- subscriber.debouncedNext();
-}
-//# sourceMappingURL=debounceTime.js.map
+
+//# sourceMappingURL=InnerSubscriber.js.map
/***/ }),
-/* 238 */
+/* 232 */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
"use strict";
__webpack_require__.r(__webpack_exports__);
-/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "defaultIfEmpty", function() { return defaultIfEmpty; });
-/* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(36);
-/* harmony import */ var _Subscriber__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(172);
-/** PURE_IMPORTS_START tslib,_Subscriber PURE_IMPORTS_END */
+/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "subscribeTo", function() { return subscribeTo; });
+/* harmony import */ var _subscribeToArray__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(207);
+/* harmony import */ var _subscribeToPromise__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(233);
+/* harmony import */ var _subscribeToIterable__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(234);
+/* harmony import */ var _subscribeToObservable__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(236);
+/* harmony import */ var _isArrayLike__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(237);
+/* harmony import */ var _isPromise__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(238);
+/* harmony import */ var _isObject__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(179);
+/* harmony import */ var _symbol_iterator__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(235);
+/* harmony import */ var _symbol_observable__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(183);
+/** PURE_IMPORTS_START _subscribeToArray,_subscribeToPromise,_subscribeToIterable,_subscribeToObservable,_isArrayLike,_isPromise,_isObject,_symbol_iterator,_symbol_observable PURE_IMPORTS_END */
-function defaultIfEmpty(defaultValue) {
- if (defaultValue === void 0) {
- defaultValue = null;
+
+
+
+
+
+
+
+var subscribeTo = function (result) {
+ if (!!result && typeof result[_symbol_observable__WEBPACK_IMPORTED_MODULE_8__["observable"]] === 'function') {
+ return Object(_subscribeToObservable__WEBPACK_IMPORTED_MODULE_3__["subscribeToObservable"])(result);
}
- return function (source) { return source.lift(new DefaultIfEmptyOperator(defaultValue)); };
-}
-var DefaultIfEmptyOperator = /*@__PURE__*/ (function () {
- function DefaultIfEmptyOperator(defaultValue) {
- this.defaultValue = defaultValue;
+ else if (Object(_isArrayLike__WEBPACK_IMPORTED_MODULE_4__["isArrayLike"])(result)) {
+ return Object(_subscribeToArray__WEBPACK_IMPORTED_MODULE_0__["subscribeToArray"])(result);
}
- DefaultIfEmptyOperator.prototype.call = function (subscriber, source) {
- return source.subscribe(new DefaultIfEmptySubscriber(subscriber, this.defaultValue));
- };
- return DefaultIfEmptyOperator;
-}());
-var DefaultIfEmptySubscriber = /*@__PURE__*/ (function (_super) {
- tslib__WEBPACK_IMPORTED_MODULE_0__["__extends"](DefaultIfEmptySubscriber, _super);
- function DefaultIfEmptySubscriber(destination, defaultValue) {
- var _this = _super.call(this, destination) || this;
- _this.defaultValue = defaultValue;
- _this.isEmpty = true;
- return _this;
+ else if (Object(_isPromise__WEBPACK_IMPORTED_MODULE_5__["isPromise"])(result)) {
+ return Object(_subscribeToPromise__WEBPACK_IMPORTED_MODULE_1__["subscribeToPromise"])(result);
}
- DefaultIfEmptySubscriber.prototype._next = function (value) {
- this.isEmpty = false;
- this.destination.next(value);
- };
- DefaultIfEmptySubscriber.prototype._complete = function () {
- if (this.isEmpty) {
- this.destination.next(this.defaultValue);
- }
- this.destination.complete();
- };
- return DefaultIfEmptySubscriber;
-}(_Subscriber__WEBPACK_IMPORTED_MODULE_1__["Subscriber"]));
-//# sourceMappingURL=defaultIfEmpty.js.map
+ else if (!!result && typeof result[_symbol_iterator__WEBPACK_IMPORTED_MODULE_7__["iterator"]] === 'function') {
+ return Object(_subscribeToIterable__WEBPACK_IMPORTED_MODULE_2__["subscribeToIterable"])(result);
+ }
+ else {
+ var value = Object(_isObject__WEBPACK_IMPORTED_MODULE_6__["isObject"])(result) ? 'an invalid object' : "'" + result + "'";
+ var msg = "You provided " + value + " where a stream was expected."
+ + ' You can provide an Observable, Promise, Array, or Iterable.';
+ throw new TypeError(msg);
+ }
+};
+//# sourceMappingURL=subscribeTo.js.map
/***/ }),
-/* 239 */
+/* 233 */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
"use strict";
__webpack_require__.r(__webpack_exports__);
-/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "delay", function() { return delay; });
-/* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(36);
-/* harmony import */ var _scheduler_async__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(199);
-/* harmony import */ var _util_isDate__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(240);
-/* harmony import */ var _Subscriber__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(172);
-/* harmony import */ var _Notification__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(241);
-/** PURE_IMPORTS_START tslib,_scheduler_async,_util_isDate,_Subscriber,_Notification PURE_IMPORTS_END */
+/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "subscribeToPromise", function() { return subscribeToPromise; });
+/* harmony import */ var _hostReportError__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(176);
+/** PURE_IMPORTS_START _hostReportError PURE_IMPORTS_END */
+var subscribeToPromise = function (promise) {
+ return function (subscriber) {
+ promise.then(function (value) {
+ if (!subscriber.closed) {
+ subscriber.next(value);
+ subscriber.complete();
+ }
+ }, function (err) { return subscriber.error(err); })
+ .then(null, _hostReportError__WEBPACK_IMPORTED_MODULE_0__["hostReportError"]);
+ return subscriber;
+ };
+};
+//# sourceMappingURL=subscribeToPromise.js.map
+/***/ }),
+/* 234 */
+/***/ (function(module, __webpack_exports__, __webpack_require__) {
+"use strict";
+__webpack_require__.r(__webpack_exports__);
+/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "subscribeToIterable", function() { return subscribeToIterable; });
+/* harmony import */ var _symbol_iterator__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(235);
+/** PURE_IMPORTS_START _symbol_iterator PURE_IMPORTS_END */
-function delay(delay, scheduler) {
- if (scheduler === void 0) {
- scheduler = _scheduler_async__WEBPACK_IMPORTED_MODULE_1__["async"];
- }
- var absoluteDelay = Object(_util_isDate__WEBPACK_IMPORTED_MODULE_2__["isDate"])(delay);
- var delayFor = absoluteDelay ? (+delay - scheduler.now()) : Math.abs(delay);
- return function (source) { return source.lift(new DelayOperator(delayFor, scheduler)); };
-}
-var DelayOperator = /*@__PURE__*/ (function () {
- function DelayOperator(delay, scheduler) {
- this.delay = delay;
- this.scheduler = scheduler;
- }
- DelayOperator.prototype.call = function (subscriber, source) {
- return source.subscribe(new DelaySubscriber(subscriber, this.delay, this.scheduler));
- };
- return DelayOperator;
-}());
-var DelaySubscriber = /*@__PURE__*/ (function (_super) {
- tslib__WEBPACK_IMPORTED_MODULE_0__["__extends"](DelaySubscriber, _super);
- function DelaySubscriber(destination, delay, scheduler) {
- var _this = _super.call(this, destination) || this;
- _this.delay = delay;
- _this.scheduler = scheduler;
- _this.queue = [];
- _this.active = false;
- _this.errored = false;
- return _this;
- }
- DelaySubscriber.dispatch = function (state) {
- var source = state.source;
- var queue = source.queue;
- var scheduler = state.scheduler;
- var destination = state.destination;
- while (queue.length > 0 && (queue[0].time - scheduler.now()) <= 0) {
- queue.shift().notification.observe(destination);
- }
- if (queue.length > 0) {
- var delay_1 = Math.max(0, queue[0].time - scheduler.now());
- this.schedule(state, delay_1);
- }
- else {
- this.unsubscribe();
- source.active = false;
- }
- };
- DelaySubscriber.prototype._schedule = function (scheduler) {
- this.active = true;
- var destination = this.destination;
- destination.add(scheduler.schedule(DelaySubscriber.dispatch, this.delay, {
- source: this, destination: this.destination, scheduler: scheduler
- }));
- };
- DelaySubscriber.prototype.scheduleNotification = function (notification) {
- if (this.errored === true) {
- return;
- }
- var scheduler = this.scheduler;
- var message = new DelayMessage(scheduler.now() + this.delay, notification);
- this.queue.push(message);
- if (this.active === false) {
- this._schedule(scheduler);
+var subscribeToIterable = function (iterable) {
+ return function (subscriber) {
+ var iterator = iterable[_symbol_iterator__WEBPACK_IMPORTED_MODULE_0__["iterator"]]();
+ do {
+ var item = iterator.next();
+ if (item.done) {
+ subscriber.complete();
+ break;
+ }
+ subscriber.next(item.value);
+ if (subscriber.closed) {
+ break;
+ }
+ } while (true);
+ if (typeof iterator.return === 'function') {
+ subscriber.add(function () {
+ if (iterator.return) {
+ iterator.return();
+ }
+ });
}
+ return subscriber;
};
- DelaySubscriber.prototype._next = function (value) {
- this.scheduleNotification(_Notification__WEBPACK_IMPORTED_MODULE_4__["Notification"].createNext(value));
- };
- DelaySubscriber.prototype._error = function (err) {
- this.errored = true;
- this.queue = [];
- this.destination.error(err);
- this.unsubscribe();
- };
- DelaySubscriber.prototype._complete = function () {
- this.scheduleNotification(_Notification__WEBPACK_IMPORTED_MODULE_4__["Notification"].createComplete());
- this.unsubscribe();
- };
- return DelaySubscriber;
-}(_Subscriber__WEBPACK_IMPORTED_MODULE_3__["Subscriber"]));
-var DelayMessage = /*@__PURE__*/ (function () {
- function DelayMessage(time, notification) {
- this.time = time;
- this.notification = notification;
- }
- return DelayMessage;
-}());
-//# sourceMappingURL=delay.js.map
+};
+//# sourceMappingURL=subscribeToIterable.js.map
/***/ }),
-/* 240 */
+/* 235 */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
"use strict";
__webpack_require__.r(__webpack_exports__);
-/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "isDate", function() { return isDate; });
+/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "getSymbolIterator", function() { return getSymbolIterator; });
+/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "iterator", function() { return iterator; });
+/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "$$iterator", function() { return $$iterator; });
/** PURE_IMPORTS_START PURE_IMPORTS_END */
-function isDate(value) {
- return value instanceof Date && !isNaN(+value);
+function getSymbolIterator() {
+ if (typeof Symbol !== 'function' || !Symbol.iterator) {
+ return '@@iterator';
+ }
+ return Symbol.iterator;
}
-//# sourceMappingURL=isDate.js.map
+var iterator = /*@__PURE__*/ getSymbolIterator();
+var $$iterator = iterator;
+//# sourceMappingURL=iterator.js.map
/***/ }),
-/* 241 */
+/* 236 */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
"use strict";
__webpack_require__.r(__webpack_exports__);
-/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "NotificationKind", function() { return NotificationKind; });
-/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "Notification", function() { return Notification; });
-/* harmony import */ var _observable_empty__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(242);
-/* harmony import */ var _observable_of__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(227);
-/* harmony import */ var _observable_throwError__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(243);
-/** PURE_IMPORTS_START _observable_empty,_observable_of,_observable_throwError PURE_IMPORTS_END */
-
-
+/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "subscribeToObservable", function() { return subscribeToObservable; });
+/* harmony import */ var _symbol_observable__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(183);
+/** PURE_IMPORTS_START _symbol_observable PURE_IMPORTS_END */
-var NotificationKind;
-/*@__PURE__*/ (function (NotificationKind) {
- NotificationKind["NEXT"] = "N";
- NotificationKind["ERROR"] = "E";
- NotificationKind["COMPLETE"] = "C";
-})(NotificationKind || (NotificationKind = {}));
-var Notification = /*@__PURE__*/ (function () {
- function Notification(kind, value, error) {
- this.kind = kind;
- this.value = value;
- this.error = error;
- this.hasValue = kind === 'N';
- }
- Notification.prototype.observe = function (observer) {
- switch (this.kind) {
- case 'N':
- return observer.next && observer.next(this.value);
- case 'E':
- return observer.error && observer.error(this.error);
- case 'C':
- return observer.complete && observer.complete();
- }
- };
- Notification.prototype.do = function (next, error, complete) {
- var kind = this.kind;
- switch (kind) {
- case 'N':
- return next && next(this.value);
- case 'E':
- return error && error(this.error);
- case 'C':
- return complete && complete();
- }
- };
- Notification.prototype.accept = function (nextOrObserver, error, complete) {
- if (nextOrObserver && typeof nextOrObserver.next === 'function') {
- return this.observe(nextOrObserver);
+var subscribeToObservable = function (obj) {
+ return function (subscriber) {
+ var obs = obj[_symbol_observable__WEBPACK_IMPORTED_MODULE_0__["observable"]]();
+ if (typeof obs.subscribe !== 'function') {
+ throw new TypeError('Provided object does not correctly implement Symbol.observable');
}
else {
- return this.do(nextOrObserver, error, complete);
- }
- };
- Notification.prototype.toObservable = function () {
- var kind = this.kind;
- switch (kind) {
- case 'N':
- return Object(_observable_of__WEBPACK_IMPORTED_MODULE_1__["of"])(this.value);
- case 'E':
- return Object(_observable_throwError__WEBPACK_IMPORTED_MODULE_2__["throwError"])(this.error);
- case 'C':
- return Object(_observable_empty__WEBPACK_IMPORTED_MODULE_0__["empty"])();
- }
- throw new Error('unexpected notification kind value');
- };
- Notification.createNext = function (value) {
- if (typeof value !== 'undefined') {
- return new Notification('N', value);
+ return obs.subscribe(subscriber);
}
- return Notification.undefinedValueNotification;
- };
- Notification.createError = function (err) {
- return new Notification('E', undefined, err);
- };
- Notification.createComplete = function () {
- return Notification.completeNotification;
};
- Notification.completeNotification = new Notification('C');
- Notification.undefinedValueNotification = new Notification('N', undefined);
- return Notification;
-}());
-
-//# sourceMappingURL=Notification.js.map
+};
+//# sourceMappingURL=subscribeToObservable.js.map
/***/ }),
-/* 242 */
+/* 237 */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
"use strict";
__webpack_require__.r(__webpack_exports__);
-/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "EMPTY", function() { return EMPTY; });
-/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "empty", function() { return empty; });
-/* harmony import */ var _Observable__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(193);
-/** PURE_IMPORTS_START _Observable PURE_IMPORTS_END */
+/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "isArrayLike", function() { return isArrayLike; });
+/** PURE_IMPORTS_START PURE_IMPORTS_END */
+var isArrayLike = (function (x) { return x && typeof x.length === 'number' && typeof x !== 'function'; });
+//# sourceMappingURL=isArrayLike.js.map
-var EMPTY = /*@__PURE__*/ new _Observable__WEBPACK_IMPORTED_MODULE_0__["Observable"](function (subscriber) { return subscriber.complete(); });
-function empty(scheduler) {
- return scheduler ? emptyScheduled(scheduler) : EMPTY;
-}
-function emptyScheduled(scheduler) {
- return new _Observable__WEBPACK_IMPORTED_MODULE_0__["Observable"](function (subscriber) { return scheduler.schedule(function () { return subscriber.complete(); }); });
+
+/***/ }),
+/* 238 */
+/***/ (function(module, __webpack_exports__, __webpack_require__) {
+
+"use strict";
+__webpack_require__.r(__webpack_exports__);
+/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "isPromise", function() { return isPromise; });
+/** PURE_IMPORTS_START PURE_IMPORTS_END */
+function isPromise(value) {
+ return !!value && typeof value.subscribe !== 'function' && typeof value.then === 'function';
}
-//# sourceMappingURL=empty.js.map
+//# sourceMappingURL=isPromise.js.map
/***/ }),
-/* 243 */
+/* 239 */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
"use strict";
__webpack_require__.r(__webpack_exports__);
-/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "throwError", function() { return throwError; });
-/* harmony import */ var _Observable__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(193);
-/** PURE_IMPORTS_START _Observable PURE_IMPORTS_END */
+/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "concat", function() { return concat; });
+/* harmony import */ var _of__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(204);
+/* harmony import */ var _operators_concatAll__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(240);
+/** PURE_IMPORTS_START _of,_operators_concatAll PURE_IMPORTS_END */
-function throwError(error, scheduler) {
- if (!scheduler) {
- return new _Observable__WEBPACK_IMPORTED_MODULE_0__["Observable"](function (subscriber) { return subscriber.error(error); });
- }
- else {
- return new _Observable__WEBPACK_IMPORTED_MODULE_0__["Observable"](function (subscriber) { return scheduler.schedule(dispatch, 0, { error: error, subscriber: subscriber }); });
+
+function concat() {
+ var observables = [];
+ for (var _i = 0; _i < arguments.length; _i++) {
+ observables[_i] = arguments[_i];
}
+ return Object(_operators_concatAll__WEBPACK_IMPORTED_MODULE_1__["concatAll"])()(_of__WEBPACK_IMPORTED_MODULE_0__["of"].apply(void 0, observables));
}
-function dispatch(_a) {
- var error = _a.error, subscriber = _a.subscriber;
- subscriber.error(error);
-}
-//# sourceMappingURL=throwError.js.map
+//# sourceMappingURL=concat.js.map
/***/ }),
-/* 244 */
+/* 240 */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
"use strict";
__webpack_require__.r(__webpack_exports__);
-/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "delayWhen", function() { return delayWhen; });
+/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "concatAll", function() { return concatAll; });
+/* harmony import */ var _mergeAll__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(241);
+/** PURE_IMPORTS_START _mergeAll PURE_IMPORTS_END */
+
+function concatAll() {
+ return Object(_mergeAll__WEBPACK_IMPORTED_MODULE_0__["mergeAll"])(1);
+}
+//# sourceMappingURL=concatAll.js.map
+
+
+/***/ }),
+/* 241 */
+/***/ (function(module, __webpack_exports__, __webpack_require__) {
+
+"use strict";
+__webpack_require__.r(__webpack_exports__);
+/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "mergeAll", function() { return mergeAll; });
+/* harmony import */ var _mergeMap__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(242);
+/* harmony import */ var _util_identity__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(220);
+/** PURE_IMPORTS_START _mergeMap,_util_identity PURE_IMPORTS_END */
+
+
+function mergeAll(concurrent) {
+ if (concurrent === void 0) {
+ concurrent = Number.POSITIVE_INFINITY;
+ }
+ return Object(_mergeMap__WEBPACK_IMPORTED_MODULE_0__["mergeMap"])(_util_identity__WEBPACK_IMPORTED_MODULE_1__["identity"], concurrent);
+}
+//# sourceMappingURL=mergeAll.js.map
+
+
+/***/ }),
+/* 242 */
+/***/ (function(module, __webpack_exports__, __webpack_require__) {
+
+"use strict";
+__webpack_require__.r(__webpack_exports__);
+/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "mergeMap", function() { return mergeMap; });
+/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "MergeMapOperator", function() { return MergeMapOperator; });
+/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "MergeMapSubscriber", function() { return MergeMapSubscriber; });
/* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(36);
-/* harmony import */ var _Subscriber__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(172);
-/* harmony import */ var _Observable__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(193);
-/* harmony import */ var _OuterSubscriber__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(171);
-/* harmony import */ var _util_subscribeToResult__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(182);
-/** PURE_IMPORTS_START tslib,_Subscriber,_Observable,_OuterSubscriber,_util_subscribeToResult PURE_IMPORTS_END */
+/* harmony import */ var _util_subscribeToResult__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(230);
+/* harmony import */ var _OuterSubscriber__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(229);
+/* harmony import */ var _InnerSubscriber__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(231);
+/* harmony import */ var _map__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(226);
+/* harmony import */ var _observable_from__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(243);
+/** PURE_IMPORTS_START tslib,_util_subscribeToResult,_OuterSubscriber,_InnerSubscriber,_map,_observable_from PURE_IMPORTS_END */
-function delayWhen(delayDurationSelector, subscriptionDelay) {
- if (subscriptionDelay) {
- return function (source) {
- return new SubscriptionDelayObservable(source, subscriptionDelay)
- .lift(new DelayWhenOperator(delayDurationSelector));
- };
+
+function mergeMap(project, resultSelector, concurrent) {
+ if (concurrent === void 0) {
+ concurrent = Number.POSITIVE_INFINITY;
}
- return function (source) { return source.lift(new DelayWhenOperator(delayDurationSelector)); };
+ if (typeof resultSelector === 'function') {
+ return function (source) { return source.pipe(mergeMap(function (a, i) { return Object(_observable_from__WEBPACK_IMPORTED_MODULE_5__["from"])(project(a, i)).pipe(Object(_map__WEBPACK_IMPORTED_MODULE_4__["map"])(function (b, ii) { return resultSelector(a, b, i, ii); })); }, concurrent)); };
+ }
+ else if (typeof resultSelector === 'number') {
+ concurrent = resultSelector;
+ }
+ return function (source) { return source.lift(new MergeMapOperator(project, concurrent)); };
}
-var DelayWhenOperator = /*@__PURE__*/ (function () {
- function DelayWhenOperator(delayDurationSelector) {
- this.delayDurationSelector = delayDurationSelector;
+var MergeMapOperator = /*@__PURE__*/ (function () {
+ function MergeMapOperator(project, concurrent) {
+ if (concurrent === void 0) {
+ concurrent = Number.POSITIVE_INFINITY;
+ }
+ this.project = project;
+ this.concurrent = concurrent;
}
- DelayWhenOperator.prototype.call = function (subscriber, source) {
- return source.subscribe(new DelayWhenSubscriber(subscriber, this.delayDurationSelector));
+ MergeMapOperator.prototype.call = function (observer, source) {
+ return source.subscribe(new MergeMapSubscriber(observer, this.project, this.concurrent));
};
- return DelayWhenOperator;
+ return MergeMapOperator;
}());
-var DelayWhenSubscriber = /*@__PURE__*/ (function (_super) {
- tslib__WEBPACK_IMPORTED_MODULE_0__["__extends"](DelayWhenSubscriber, _super);
- function DelayWhenSubscriber(destination, delayDurationSelector) {
+
+var MergeMapSubscriber = /*@__PURE__*/ (function (_super) {
+ tslib__WEBPACK_IMPORTED_MODULE_0__["__extends"](MergeMapSubscriber, _super);
+ function MergeMapSubscriber(destination, project, concurrent) {
+ if (concurrent === void 0) {
+ concurrent = Number.POSITIVE_INFINITY;
+ }
var _this = _super.call(this, destination) || this;
- _this.delayDurationSelector = delayDurationSelector;
- _this.completed = false;
- _this.delayNotifierSubscriptions = [];
+ _this.project = project;
+ _this.concurrent = concurrent;
+ _this.hasCompleted = false;
+ _this.buffer = [];
+ _this.active = 0;
_this.index = 0;
return _this;
}
- DelayWhenSubscriber.prototype.notifyNext = function (outerValue, innerValue, outerIndex, innerIndex, innerSub) {
- this.destination.next(outerValue);
- this.removeSubscription(innerSub);
- this.tryComplete();
- };
- DelayWhenSubscriber.prototype.notifyError = function (error, innerSub) {
- this._error(error);
- };
- DelayWhenSubscriber.prototype.notifyComplete = function (innerSub) {
- var value = this.removeSubscription(innerSub);
- if (value) {
- this.destination.next(value);
+ MergeMapSubscriber.prototype._next = function (value) {
+ if (this.active < this.concurrent) {
+ this._tryNext(value);
+ }
+ else {
+ this.buffer.push(value);
}
- this.tryComplete();
};
- DelayWhenSubscriber.prototype._next = function (value) {
+ MergeMapSubscriber.prototype._tryNext = function (value) {
+ var result;
var index = this.index++;
try {
- var delayNotifier = this.delayDurationSelector(value, index);
- if (delayNotifier) {
- this.tryDelay(delayNotifier, value);
- }
+ result = this.project(value, index);
}
catch (err) {
this.destination.error(err);
+ return;
}
+ this.active++;
+ this._innerSub(result, value, index);
};
- DelayWhenSubscriber.prototype._complete = function () {
- this.completed = true;
- this.tryComplete();
- this.unsubscribe();
- };
- DelayWhenSubscriber.prototype.removeSubscription = function (subscription) {
- subscription.unsubscribe();
- var subscriptionIdx = this.delayNotifierSubscriptions.indexOf(subscription);
- if (subscriptionIdx !== -1) {
- this.delayNotifierSubscriptions.splice(subscriptionIdx, 1);
- }
- return subscription.outerValue;
- };
- DelayWhenSubscriber.prototype.tryDelay = function (delayNotifier, value) {
- var notifierSubscription = Object(_util_subscribeToResult__WEBPACK_IMPORTED_MODULE_4__["subscribeToResult"])(this, delayNotifier, value);
- if (notifierSubscription && !notifierSubscription.closed) {
- var destination = this.destination;
- destination.add(notifierSubscription);
- this.delayNotifierSubscriptions.push(notifierSubscription);
- }
+ MergeMapSubscriber.prototype._innerSub = function (ish, value, index) {
+ var innerSubscriber = new _InnerSubscriber__WEBPACK_IMPORTED_MODULE_3__["InnerSubscriber"](this, undefined, undefined);
+ var destination = this.destination;
+ destination.add(innerSubscriber);
+ Object(_util_subscribeToResult__WEBPACK_IMPORTED_MODULE_1__["subscribeToResult"])(this, ish, value, index, innerSubscriber);
};
- DelayWhenSubscriber.prototype.tryComplete = function () {
- if (this.completed && this.delayNotifierSubscriptions.length === 0) {
+ MergeMapSubscriber.prototype._complete = function () {
+ this.hasCompleted = true;
+ if (this.active === 0 && this.buffer.length === 0) {
this.destination.complete();
}
- };
- return DelayWhenSubscriber;
-}(_OuterSubscriber__WEBPACK_IMPORTED_MODULE_3__["OuterSubscriber"]));
-var SubscriptionDelayObservable = /*@__PURE__*/ (function (_super) {
- tslib__WEBPACK_IMPORTED_MODULE_0__["__extends"](SubscriptionDelayObservable, _super);
- function SubscriptionDelayObservable(source, subscriptionDelay) {
- var _this = _super.call(this) || this;
- _this.source = source;
- _this.subscriptionDelay = subscriptionDelay;
- return _this;
- }
- SubscriptionDelayObservable.prototype._subscribe = function (subscriber) {
- this.subscriptionDelay.subscribe(new SubscriptionDelaySubscriber(subscriber, this.source));
- };
- return SubscriptionDelayObservable;
-}(_Observable__WEBPACK_IMPORTED_MODULE_2__["Observable"]));
-var SubscriptionDelaySubscriber = /*@__PURE__*/ (function (_super) {
- tslib__WEBPACK_IMPORTED_MODULE_0__["__extends"](SubscriptionDelaySubscriber, _super);
- function SubscriptionDelaySubscriber(parent, source) {
- var _this = _super.call(this) || this;
- _this.parent = parent;
- _this.source = source;
- _this.sourceSubscribed = false;
- return _this;
- }
- SubscriptionDelaySubscriber.prototype._next = function (unused) {
- this.subscribeToSource();
- };
- SubscriptionDelaySubscriber.prototype._error = function (err) {
this.unsubscribe();
- this.parent.error(err);
};
- SubscriptionDelaySubscriber.prototype._complete = function () {
- this.unsubscribe();
- this.subscribeToSource();
+ MergeMapSubscriber.prototype.notifyNext = function (outerValue, innerValue, outerIndex, innerIndex, innerSub) {
+ this.destination.next(innerValue);
};
- SubscriptionDelaySubscriber.prototype.subscribeToSource = function () {
- if (!this.sourceSubscribed) {
- this.sourceSubscribed = true;
- this.unsubscribe();
- this.source.subscribe(this.parent);
+ MergeMapSubscriber.prototype.notifyComplete = function (innerSub) {
+ var buffer = this.buffer;
+ this.remove(innerSub);
+ this.active--;
+ if (buffer.length > 0) {
+ this._next(buffer.shift());
+ }
+ else if (this.active === 0 && this.hasCompleted) {
+ this.destination.complete();
}
};
- return SubscriptionDelaySubscriber;
-}(_Subscriber__WEBPACK_IMPORTED_MODULE_1__["Subscriber"]));
-//# sourceMappingURL=delayWhen.js.map
+ return MergeMapSubscriber;
+}(_OuterSubscriber__WEBPACK_IMPORTED_MODULE_2__["OuterSubscriber"]));
+
+//# sourceMappingURL=mergeMap.js.map
/***/ }),
-/* 245 */
+/* 243 */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
"use strict";
__webpack_require__.r(__webpack_exports__);
-/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "dematerialize", function() { return dematerialize; });
-/* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(36);
-/* harmony import */ var _Subscriber__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(172);
-/** PURE_IMPORTS_START tslib,_Subscriber PURE_IMPORTS_END */
+/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "from", function() { return from; });
+/* harmony import */ var _Observable__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(170);
+/* harmony import */ var _util_subscribeTo__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(232);
+/* harmony import */ var _scheduled_scheduled__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(244);
+/** PURE_IMPORTS_START _Observable,_util_subscribeTo,_scheduled_scheduled PURE_IMPORTS_END */
-function dematerialize() {
- return function dematerializeOperatorFunction(source) {
- return source.lift(new DeMaterializeOperator());
- };
-}
-var DeMaterializeOperator = /*@__PURE__*/ (function () {
- function DeMaterializeOperator() {
+
+function from(input, scheduler) {
+ if (!scheduler) {
+ if (input instanceof _Observable__WEBPACK_IMPORTED_MODULE_0__["Observable"]) {
+ return input;
+ }
+ return new _Observable__WEBPACK_IMPORTED_MODULE_0__["Observable"](Object(_util_subscribeTo__WEBPACK_IMPORTED_MODULE_1__["subscribeTo"])(input));
}
- DeMaterializeOperator.prototype.call = function (subscriber, source) {
- return source.subscribe(new DeMaterializeSubscriber(subscriber));
- };
- return DeMaterializeOperator;
-}());
-var DeMaterializeSubscriber = /*@__PURE__*/ (function (_super) {
- tslib__WEBPACK_IMPORTED_MODULE_0__["__extends"](DeMaterializeSubscriber, _super);
- function DeMaterializeSubscriber(destination) {
- return _super.call(this, destination) || this;
+ else {
+ return Object(_scheduled_scheduled__WEBPACK_IMPORTED_MODULE_2__["scheduled"])(input, scheduler);
}
- DeMaterializeSubscriber.prototype._next = function (value) {
- value.observe(this.destination);
- };
- return DeMaterializeSubscriber;
-}(_Subscriber__WEBPACK_IMPORTED_MODULE_1__["Subscriber"]));
-//# sourceMappingURL=dematerialize.js.map
+}
+//# sourceMappingURL=from.js.map
/***/ }),
-/* 246 */
+/* 244 */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
"use strict";
__webpack_require__.r(__webpack_exports__);
-/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "distinct", function() { return distinct; });
-/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "DistinctSubscriber", function() { return DistinctSubscriber; });
-/* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(36);
-/* harmony import */ var _OuterSubscriber__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(171);
-/* harmony import */ var _util_subscribeToResult__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(182);
-/** PURE_IMPORTS_START tslib,_OuterSubscriber,_util_subscribeToResult PURE_IMPORTS_END */
+/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "scheduled", function() { return scheduled; });
+/* harmony import */ var _scheduleObservable__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(245);
+/* harmony import */ var _schedulePromise__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(246);
+/* harmony import */ var _scheduleArray__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(208);
+/* harmony import */ var _scheduleIterable__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(247);
+/* harmony import */ var _util_isInteropObservable__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(248);
+/* harmony import */ var _util_isPromise__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(238);
+/* harmony import */ var _util_isArrayLike__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(237);
+/* harmony import */ var _util_isIterable__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(249);
+/** PURE_IMPORTS_START _scheduleObservable,_schedulePromise,_scheduleArray,_scheduleIterable,_util_isInteropObservable,_util_isPromise,_util_isArrayLike,_util_isIterable PURE_IMPORTS_END */
-function distinct(keySelector, flushes) {
- return function (source) { return source.lift(new DistinctOperator(keySelector, flushes)); };
-}
-var DistinctOperator = /*@__PURE__*/ (function () {
- function DistinctOperator(keySelector, flushes) {
- this.keySelector = keySelector;
- this.flushes = flushes;
- }
- DistinctOperator.prototype.call = function (subscriber, source) {
- return source.subscribe(new DistinctSubscriber(subscriber, this.keySelector, this.flushes));
- };
- return DistinctOperator;
-}());
-var DistinctSubscriber = /*@__PURE__*/ (function (_super) {
- tslib__WEBPACK_IMPORTED_MODULE_0__["__extends"](DistinctSubscriber, _super);
- function DistinctSubscriber(destination, keySelector, flushes) {
- var _this = _super.call(this, destination) || this;
- _this.keySelector = keySelector;
- _this.values = new Set();
- if (flushes) {
- _this.add(Object(_util_subscribeToResult__WEBPACK_IMPORTED_MODULE_2__["subscribeToResult"])(_this, flushes));
- }
- return _this;
- }
- DistinctSubscriber.prototype.notifyNext = function (outerValue, innerValue, outerIndex, innerIndex, innerSub) {
- this.values.clear();
- };
- DistinctSubscriber.prototype.notifyError = function (error, innerSub) {
- this._error(error);
- };
- DistinctSubscriber.prototype._next = function (value) {
- if (this.keySelector) {
- this._useKeySelector(value);
- }
- else {
- this._finalizeNext(value, value);
+
+
+
+
+
+function scheduled(input, scheduler) {
+ if (input != null) {
+ if (Object(_util_isInteropObservable__WEBPACK_IMPORTED_MODULE_4__["isInteropObservable"])(input)) {
+ return Object(_scheduleObservable__WEBPACK_IMPORTED_MODULE_0__["scheduleObservable"])(input, scheduler);
}
- };
- DistinctSubscriber.prototype._useKeySelector = function (value) {
- var key;
- var destination = this.destination;
- try {
- key = this.keySelector(value);
+ else if (Object(_util_isPromise__WEBPACK_IMPORTED_MODULE_5__["isPromise"])(input)) {
+ return Object(_schedulePromise__WEBPACK_IMPORTED_MODULE_1__["schedulePromise"])(input, scheduler);
}
- catch (err) {
- destination.error(err);
- return;
+ else if (Object(_util_isArrayLike__WEBPACK_IMPORTED_MODULE_6__["isArrayLike"])(input)) {
+ return Object(_scheduleArray__WEBPACK_IMPORTED_MODULE_2__["scheduleArray"])(input, scheduler);
}
- this._finalizeNext(key, value);
- };
- DistinctSubscriber.prototype._finalizeNext = function (key, value) {
- var values = this.values;
- if (!values.has(key)) {
- values.add(key);
- this.destination.next(value);
+ else if (Object(_util_isIterable__WEBPACK_IMPORTED_MODULE_7__["isIterable"])(input) || typeof input === 'string') {
+ return Object(_scheduleIterable__WEBPACK_IMPORTED_MODULE_3__["scheduleIterable"])(input, scheduler);
}
- };
- return DistinctSubscriber;
-}(_OuterSubscriber__WEBPACK_IMPORTED_MODULE_1__["OuterSubscriber"]));
-
-//# sourceMappingURL=distinct.js.map
+ }
+ throw new TypeError((input !== null && typeof input || input) + ' is not observable');
+}
+//# sourceMappingURL=scheduled.js.map
/***/ }),
-/* 247 */
+/* 245 */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
"use strict";
__webpack_require__.r(__webpack_exports__);
-/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "distinctUntilChanged", function() { return distinctUntilChanged; });
-/* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(36);
-/* harmony import */ var _Subscriber__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(172);
-/** PURE_IMPORTS_START tslib,_Subscriber PURE_IMPORTS_END */
+/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "scheduleObservable", function() { return scheduleObservable; });
+/* harmony import */ var _Observable__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(170);
+/* harmony import */ var _Subscription__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(177);
+/* harmony import */ var _symbol_observable__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(183);
+/** PURE_IMPORTS_START _Observable,_Subscription,_symbol_observable PURE_IMPORTS_END */
-function distinctUntilChanged(compare, keySelector) {
- return function (source) { return source.lift(new DistinctUntilChangedOperator(compare, keySelector)); };
+
+function scheduleObservable(input, scheduler) {
+ return new _Observable__WEBPACK_IMPORTED_MODULE_0__["Observable"](function (subscriber) {
+ var sub = new _Subscription__WEBPACK_IMPORTED_MODULE_1__["Subscription"]();
+ sub.add(scheduler.schedule(function () {
+ var observable = input[_symbol_observable__WEBPACK_IMPORTED_MODULE_2__["observable"]]();
+ sub.add(observable.subscribe({
+ next: function (value) { sub.add(scheduler.schedule(function () { return subscriber.next(value); })); },
+ error: function (err) { sub.add(scheduler.schedule(function () { return subscriber.error(err); })); },
+ complete: function () { sub.add(scheduler.schedule(function () { return subscriber.complete(); })); },
+ }));
+ }));
+ return sub;
+ });
}
-var DistinctUntilChangedOperator = /*@__PURE__*/ (function () {
- function DistinctUntilChangedOperator(compare, keySelector) {
- this.compare = compare;
- this.keySelector = keySelector;
- }
- DistinctUntilChangedOperator.prototype.call = function (subscriber, source) {
- return source.subscribe(new DistinctUntilChangedSubscriber(subscriber, this.compare, this.keySelector));
- };
- return DistinctUntilChangedOperator;
-}());
-var DistinctUntilChangedSubscriber = /*@__PURE__*/ (function (_super) {
- tslib__WEBPACK_IMPORTED_MODULE_0__["__extends"](DistinctUntilChangedSubscriber, _super);
- function DistinctUntilChangedSubscriber(destination, compare, keySelector) {
- var _this = _super.call(this, destination) || this;
- _this.keySelector = keySelector;
- _this.hasKey = false;
- if (typeof compare === 'function') {
- _this.compare = compare;
- }
- return _this;
- }
- DistinctUntilChangedSubscriber.prototype.compare = function (x, y) {
- return x === y;
- };
- DistinctUntilChangedSubscriber.prototype._next = function (value) {
- var key;
- try {
- var keySelector = this.keySelector;
- key = keySelector ? keySelector(value) : value;
- }
- catch (err) {
- return this.destination.error(err);
- }
- var result = false;
- if (this.hasKey) {
- try {
- var compare = this.compare;
- result = compare(this.key, key);
- }
- catch (err) {
- return this.destination.error(err);
- }
- }
- else {
- this.hasKey = true;
- }
- if (!result) {
- this.key = key;
- this.destination.next(value);
- }
- };
- return DistinctUntilChangedSubscriber;
-}(_Subscriber__WEBPACK_IMPORTED_MODULE_1__["Subscriber"]));
-//# sourceMappingURL=distinctUntilChanged.js.map
+//# sourceMappingURL=scheduleObservable.js.map
/***/ }),
-/* 248 */
+/* 246 */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
"use strict";
__webpack_require__.r(__webpack_exports__);
-/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "distinctUntilKeyChanged", function() { return distinctUntilKeyChanged; });
-/* harmony import */ var _distinctUntilChanged__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(247);
-/** PURE_IMPORTS_START _distinctUntilChanged PURE_IMPORTS_END */
+/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "schedulePromise", function() { return schedulePromise; });
+/* harmony import */ var _Observable__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(170);
+/* harmony import */ var _Subscription__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(177);
+/** PURE_IMPORTS_START _Observable,_Subscription PURE_IMPORTS_END */
-function distinctUntilKeyChanged(key, compare) {
- return Object(_distinctUntilChanged__WEBPACK_IMPORTED_MODULE_0__["distinctUntilChanged"])(function (x, y) { return compare ? compare(x[key], y[key]) : x[key] === y[key]; });
+
+function schedulePromise(input, scheduler) {
+ return new _Observable__WEBPACK_IMPORTED_MODULE_0__["Observable"](function (subscriber) {
+ var sub = new _Subscription__WEBPACK_IMPORTED_MODULE_1__["Subscription"]();
+ sub.add(scheduler.schedule(function () {
+ return input.then(function (value) {
+ sub.add(scheduler.schedule(function () {
+ subscriber.next(value);
+ sub.add(scheduler.schedule(function () { return subscriber.complete(); }));
+ }));
+ }, function (err) {
+ sub.add(scheduler.schedule(function () { return subscriber.error(err); }));
+ });
+ }));
+ return sub;
+ });
}
-//# sourceMappingURL=distinctUntilKeyChanged.js.map
+//# sourceMappingURL=schedulePromise.js.map
/***/ }),
-/* 249 */
+/* 247 */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
"use strict";
__webpack_require__.r(__webpack_exports__);
-/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "elementAt", function() { return elementAt; });
-/* harmony import */ var _util_ArgumentOutOfRangeError__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(250);
-/* harmony import */ var _filter__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(251);
-/* harmony import */ var _throwIfEmpty__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(252);
-/* harmony import */ var _defaultIfEmpty__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(238);
-/* harmony import */ var _take__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(254);
-/** PURE_IMPORTS_START _util_ArgumentOutOfRangeError,_filter,_throwIfEmpty,_defaultIfEmpty,_take PURE_IMPORTS_END */
-
-
+/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "scheduleIterable", function() { return scheduleIterable; });
+/* harmony import */ var _Observable__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(170);
+/* harmony import */ var _Subscription__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(177);
+/* harmony import */ var _symbol_iterator__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(235);
+/** PURE_IMPORTS_START _Observable,_Subscription,_symbol_iterator PURE_IMPORTS_END */
-function elementAt(index, defaultValue) {
- if (index < 0) {
- throw new _util_ArgumentOutOfRangeError__WEBPACK_IMPORTED_MODULE_0__["ArgumentOutOfRangeError"]();
+function scheduleIterable(input, scheduler) {
+ if (!input) {
+ throw new Error('Iterable cannot be null');
}
- var hasDefaultValue = arguments.length >= 2;
- return function (source) {
- return source.pipe(Object(_filter__WEBPACK_IMPORTED_MODULE_1__["filter"])(function (v, i) { return i === index; }), Object(_take__WEBPACK_IMPORTED_MODULE_4__["take"])(1), hasDefaultValue
- ? Object(_defaultIfEmpty__WEBPACK_IMPORTED_MODULE_3__["defaultIfEmpty"])(defaultValue)
- : Object(_throwIfEmpty__WEBPACK_IMPORTED_MODULE_2__["throwIfEmpty"])(function () { return new _util_ArgumentOutOfRangeError__WEBPACK_IMPORTED_MODULE_0__["ArgumentOutOfRangeError"](); }));
- };
+ return new _Observable__WEBPACK_IMPORTED_MODULE_0__["Observable"](function (subscriber) {
+ var sub = new _Subscription__WEBPACK_IMPORTED_MODULE_1__["Subscription"]();
+ var iterator;
+ sub.add(function () {
+ if (iterator && typeof iterator.return === 'function') {
+ iterator.return();
+ }
+ });
+ sub.add(scheduler.schedule(function () {
+ iterator = input[_symbol_iterator__WEBPACK_IMPORTED_MODULE_2__["iterator"]]();
+ sub.add(scheduler.schedule(function () {
+ if (subscriber.closed) {
+ return;
+ }
+ var value;
+ var done;
+ try {
+ var result = iterator.next();
+ value = result.value;
+ done = result.done;
+ }
+ catch (err) {
+ subscriber.error(err);
+ return;
+ }
+ if (done) {
+ subscriber.complete();
+ }
+ else {
+ subscriber.next(value);
+ this.schedule();
+ }
+ }));
+ }));
+ return sub;
+ });
}
-//# sourceMappingURL=elementAt.js.map
+//# sourceMappingURL=scheduleIterable.js.map
/***/ }),
-/* 250 */
+/* 248 */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
"use strict";
__webpack_require__.r(__webpack_exports__);
-/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ArgumentOutOfRangeError", function() { return ArgumentOutOfRangeError; });
-/** PURE_IMPORTS_START PURE_IMPORTS_END */
-var ArgumentOutOfRangeErrorImpl = /*@__PURE__*/ (function () {
- function ArgumentOutOfRangeErrorImpl() {
- Error.call(this);
- this.message = 'argument out of range';
- this.name = 'ArgumentOutOfRangeError';
- return this;
- }
- ArgumentOutOfRangeErrorImpl.prototype = /*@__PURE__*/ Object.create(Error.prototype);
- return ArgumentOutOfRangeErrorImpl;
-})();
-var ArgumentOutOfRangeError = ArgumentOutOfRangeErrorImpl;
-//# sourceMappingURL=ArgumentOutOfRangeError.js.map
+/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "isInteropObservable", function() { return isInteropObservable; });
+/* harmony import */ var _symbol_observable__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(183);
+/** PURE_IMPORTS_START _symbol_observable PURE_IMPORTS_END */
+
+function isInteropObservable(input) {
+ return input && typeof input[_symbol_observable__WEBPACK_IMPORTED_MODULE_0__["observable"]] === 'function';
+}
+//# sourceMappingURL=isInteropObservable.js.map
/***/ }),
-/* 251 */
+/* 249 */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
"use strict";
__webpack_require__.r(__webpack_exports__);
-/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "filter", function() { return filter; });
-/* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(36);
-/* harmony import */ var _Subscriber__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(172);
-/** PURE_IMPORTS_START tslib,_Subscriber PURE_IMPORTS_END */
-
+/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "isIterable", function() { return isIterable; });
+/* harmony import */ var _symbol_iterator__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(235);
+/** PURE_IMPORTS_START _symbol_iterator PURE_IMPORTS_END */
-function filter(predicate, thisArg) {
- return function filterOperatorFunction(source) {
- return source.lift(new FilterOperator(predicate, thisArg));
- };
+function isIterable(input) {
+ return input && typeof input[_symbol_iterator__WEBPACK_IMPORTED_MODULE_0__["iterator"]] === 'function';
}
-var FilterOperator = /*@__PURE__*/ (function () {
- function FilterOperator(predicate, thisArg) {
- this.predicate = predicate;
- this.thisArg = thisArg;
- }
- FilterOperator.prototype.call = function (subscriber, source) {
- return source.subscribe(new FilterSubscriber(subscriber, this.predicate, this.thisArg));
- };
- return FilterOperator;
-}());
-var FilterSubscriber = /*@__PURE__*/ (function (_super) {
- tslib__WEBPACK_IMPORTED_MODULE_0__["__extends"](FilterSubscriber, _super);
- function FilterSubscriber(destination, predicate, thisArg) {
- var _this = _super.call(this, destination) || this;
- _this.predicate = predicate;
- _this.thisArg = thisArg;
- _this.count = 0;
- return _this;
- }
- FilterSubscriber.prototype._next = function (value) {
- var result;
+//# sourceMappingURL=isIterable.js.map
+
+
+/***/ }),
+/* 250 */
+/***/ (function(module, __webpack_exports__, __webpack_require__) {
+
+"use strict";
+__webpack_require__.r(__webpack_exports__);
+/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "defer", function() { return defer; });
+/* harmony import */ var _Observable__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(170);
+/* harmony import */ var _from__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(243);
+/* harmony import */ var _empty__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(203);
+/** PURE_IMPORTS_START _Observable,_from,_empty PURE_IMPORTS_END */
+
+
+
+function defer(observableFactory) {
+ return new _Observable__WEBPACK_IMPORTED_MODULE_0__["Observable"](function (subscriber) {
+ var input;
try {
- result = this.predicate.call(this.thisArg, value, this.count++);
+ input = observableFactory();
}
catch (err) {
- this.destination.error(err);
+ subscriber.error(err);
+ return undefined;
+ }
+ var source = input ? Object(_from__WEBPACK_IMPORTED_MODULE_1__["from"])(input) : Object(_empty__WEBPACK_IMPORTED_MODULE_2__["empty"])();
+ return source.subscribe(subscriber);
+ });
+}
+//# sourceMappingURL=defer.js.map
+
+
+/***/ }),
+/* 251 */
+/***/ (function(module, __webpack_exports__, __webpack_require__) {
+
+"use strict";
+__webpack_require__.r(__webpack_exports__);
+/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "forkJoin", function() { return forkJoin; });
+/* harmony import */ var _Observable__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(170);
+/* harmony import */ var _util_isArray__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(178);
+/* harmony import */ var _operators_map__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(226);
+/* harmony import */ var _util_isObject__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(179);
+/* harmony import */ var _from__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(243);
+/** PURE_IMPORTS_START _Observable,_util_isArray,_operators_map,_util_isObject,_from PURE_IMPORTS_END */
+
+
+
+
+
+function forkJoin() {
+ var sources = [];
+ for (var _i = 0; _i < arguments.length; _i++) {
+ sources[_i] = arguments[_i];
+ }
+ if (sources.length === 1) {
+ var first_1 = sources[0];
+ if (Object(_util_isArray__WEBPACK_IMPORTED_MODULE_1__["isArray"])(first_1)) {
+ return forkJoinInternal(first_1, null);
+ }
+ if (Object(_util_isObject__WEBPACK_IMPORTED_MODULE_3__["isObject"])(first_1) && Object.getPrototypeOf(first_1) === Object.prototype) {
+ var keys = Object.keys(first_1);
+ return forkJoinInternal(keys.map(function (key) { return first_1[key]; }), keys);
+ }
+ }
+ if (typeof sources[sources.length - 1] === 'function') {
+ var resultSelector_1 = sources.pop();
+ sources = (sources.length === 1 && Object(_util_isArray__WEBPACK_IMPORTED_MODULE_1__["isArray"])(sources[0])) ? sources[0] : sources;
+ return forkJoinInternal(sources, null).pipe(Object(_operators_map__WEBPACK_IMPORTED_MODULE_2__["map"])(function (args) { return resultSelector_1.apply(void 0, args); }));
+ }
+ return forkJoinInternal(sources, null);
+}
+function forkJoinInternal(sources, keys) {
+ return new _Observable__WEBPACK_IMPORTED_MODULE_0__["Observable"](function (subscriber) {
+ var len = sources.length;
+ if (len === 0) {
+ subscriber.complete();
return;
}
- if (result) {
- this.destination.next(value);
+ var values = new Array(len);
+ var completed = 0;
+ var emitted = 0;
+ var _loop_1 = function (i) {
+ var source = Object(_from__WEBPACK_IMPORTED_MODULE_4__["from"])(sources[i]);
+ var hasValue = false;
+ subscriber.add(source.subscribe({
+ next: function (value) {
+ if (!hasValue) {
+ hasValue = true;
+ emitted++;
+ }
+ values[i] = value;
+ },
+ error: function (err) { return subscriber.error(err); },
+ complete: function () {
+ completed++;
+ if (completed === len || !hasValue) {
+ if (emitted === len) {
+ subscriber.next(keys ?
+ keys.reduce(function (result, key, i) { return (result[key] = values[i], result); }, {}) :
+ values);
+ }
+ subscriber.complete();
+ }
+ }
+ }));
+ };
+ for (var i = 0; i < len; i++) {
+ _loop_1(i);
}
- };
- return FilterSubscriber;
-}(_Subscriber__WEBPACK_IMPORTED_MODULE_1__["Subscriber"]));
-//# sourceMappingURL=filter.js.map
+ });
+}
+//# sourceMappingURL=forkJoin.js.map
/***/ }),
@@ -26273,64 +26272,74 @@ var FilterSubscriber = /*@__PURE__*/ (function (_super) {
"use strict";
__webpack_require__.r(__webpack_exports__);
-/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "throwIfEmpty", function() { return throwIfEmpty; });
-/* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(36);
-/* harmony import */ var _util_EmptyError__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(253);
-/* harmony import */ var _Subscriber__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(172);
-/** PURE_IMPORTS_START tslib,_util_EmptyError,_Subscriber PURE_IMPORTS_END */
+/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "fromEvent", function() { return fromEvent; });
+/* harmony import */ var _Observable__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(170);
+/* harmony import */ var _util_isArray__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(178);
+/* harmony import */ var _util_isFunction__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(173);
+/* harmony import */ var _operators_map__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(226);
+/** PURE_IMPORTS_START _Observable,_util_isArray,_util_isFunction,_operators_map PURE_IMPORTS_END */
-function throwIfEmpty(errorFactory) {
- if (errorFactory === void 0) {
- errorFactory = defaultErrorFactory;
- }
- return function (source) {
- return source.lift(new ThrowIfEmptyOperator(errorFactory));
- };
-}
-var ThrowIfEmptyOperator = /*@__PURE__*/ (function () {
- function ThrowIfEmptyOperator(errorFactory) {
- this.errorFactory = errorFactory;
+
+var toString = /*@__PURE__*/ (function () { return Object.prototype.toString; })();
+function fromEvent(target, eventName, options, resultSelector) {
+ if (Object(_util_isFunction__WEBPACK_IMPORTED_MODULE_2__["isFunction"])(options)) {
+ resultSelector = options;
+ options = undefined;
}
- ThrowIfEmptyOperator.prototype.call = function (subscriber, source) {
- return source.subscribe(new ThrowIfEmptySubscriber(subscriber, this.errorFactory));
- };
- return ThrowIfEmptyOperator;
-}());
-var ThrowIfEmptySubscriber = /*@__PURE__*/ (function (_super) {
- tslib__WEBPACK_IMPORTED_MODULE_0__["__extends"](ThrowIfEmptySubscriber, _super);
- function ThrowIfEmptySubscriber(destination, errorFactory) {
- var _this = _super.call(this, destination) || this;
- _this.errorFactory = errorFactory;
- _this.hasValue = false;
- return _this;
+ if (resultSelector) {
+ return fromEvent(target, eventName, options).pipe(Object(_operators_map__WEBPACK_IMPORTED_MODULE_3__["map"])(function (args) { return Object(_util_isArray__WEBPACK_IMPORTED_MODULE_1__["isArray"])(args) ? resultSelector.apply(void 0, args) : resultSelector(args); }));
}
- ThrowIfEmptySubscriber.prototype._next = function (value) {
- this.hasValue = true;
- this.destination.next(value);
- };
- ThrowIfEmptySubscriber.prototype._complete = function () {
- if (!this.hasValue) {
- var err = void 0;
- try {
- err = this.errorFactory();
+ return new _Observable__WEBPACK_IMPORTED_MODULE_0__["Observable"](function (subscriber) {
+ function handler(e) {
+ if (arguments.length > 1) {
+ subscriber.next(Array.prototype.slice.call(arguments));
}
- catch (e) {
- err = e;
+ else {
+ subscriber.next(e);
}
- this.destination.error(err);
}
- else {
- return this.destination.complete();
+ setupSubscription(target, eventName, handler, subscriber, options);
+ });
+}
+function setupSubscription(sourceObj, eventName, handler, subscriber, options) {
+ var unsubscribe;
+ if (isEventTarget(sourceObj)) {
+ var source_1 = sourceObj;
+ sourceObj.addEventListener(eventName, handler, options);
+ unsubscribe = function () { return source_1.removeEventListener(eventName, handler, options); };
+ }
+ else if (isJQueryStyleEventEmitter(sourceObj)) {
+ var source_2 = sourceObj;
+ sourceObj.on(eventName, handler);
+ unsubscribe = function () { return source_2.off(eventName, handler); };
+ }
+ else if (isNodeStyleEventEmitter(sourceObj)) {
+ var source_3 = sourceObj;
+ sourceObj.addListener(eventName, handler);
+ unsubscribe = function () { return source_3.removeListener(eventName, handler); };
+ }
+ else if (sourceObj && sourceObj.length) {
+ for (var i = 0, len = sourceObj.length; i < len; i++) {
+ setupSubscription(sourceObj[i], eventName, handler, subscriber, options);
}
- };
- return ThrowIfEmptySubscriber;
-}(_Subscriber__WEBPACK_IMPORTED_MODULE_2__["Subscriber"]));
-function defaultErrorFactory() {
- return new _util_EmptyError__WEBPACK_IMPORTED_MODULE_1__["EmptyError"]();
+ }
+ else {
+ throw new TypeError('Invalid event target');
+ }
+ subscriber.add(unsubscribe);
}
-//# sourceMappingURL=throwIfEmpty.js.map
+function isNodeStyleEventEmitter(sourceObj) {
+ return sourceObj && typeof sourceObj.addListener === 'function' && typeof sourceObj.removeListener === 'function';
+}
+function isJQueryStyleEventEmitter(sourceObj) {
+ return sourceObj && typeof sourceObj.on === 'function' && typeof sourceObj.off === 'function';
+}
+function isEventTarget(sourceObj) {
+ return sourceObj && typeof sourceObj.addEventListener === 'function' && typeof sourceObj.removeEventListener === 'function';
+}
+//# sourceMappingURL=fromEvent.js.map
/***/ }),
@@ -26339,20 +26348,43 @@ function defaultErrorFactory() {
"use strict";
__webpack_require__.r(__webpack_exports__);
-/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "EmptyError", function() { return EmptyError; });
-/** PURE_IMPORTS_START PURE_IMPORTS_END */
-var EmptyErrorImpl = /*@__PURE__*/ (function () {
- function EmptyErrorImpl() {
- Error.call(this);
- this.message = 'no elements in sequence';
- this.name = 'EmptyError';
- return this;
+/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "fromEventPattern", function() { return fromEventPattern; });
+/* harmony import */ var _Observable__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(170);
+/* harmony import */ var _util_isArray__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(178);
+/* harmony import */ var _util_isFunction__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(173);
+/* harmony import */ var _operators_map__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(226);
+/** PURE_IMPORTS_START _Observable,_util_isArray,_util_isFunction,_operators_map PURE_IMPORTS_END */
+
+
+
+
+function fromEventPattern(addHandler, removeHandler, resultSelector) {
+ if (resultSelector) {
+ return fromEventPattern(addHandler, removeHandler).pipe(Object(_operators_map__WEBPACK_IMPORTED_MODULE_3__["map"])(function (args) { return Object(_util_isArray__WEBPACK_IMPORTED_MODULE_1__["isArray"])(args) ? resultSelector.apply(void 0, args) : resultSelector(args); }));
}
- EmptyErrorImpl.prototype = /*@__PURE__*/ Object.create(Error.prototype);
- return EmptyErrorImpl;
-})();
-var EmptyError = EmptyErrorImpl;
-//# sourceMappingURL=EmptyError.js.map
+ return new _Observable__WEBPACK_IMPORTED_MODULE_0__["Observable"](function (subscriber) {
+ var handler = function () {
+ var e = [];
+ for (var _i = 0; _i < arguments.length; _i++) {
+ e[_i] = arguments[_i];
+ }
+ return subscriber.next(e.length === 1 ? e[0] : e);
+ };
+ var retValue;
+ try {
+ retValue = addHandler(handler);
+ }
+ catch (err) {
+ subscriber.error(err);
+ return undefined;
+ }
+ if (!Object(_util_isFunction__WEBPACK_IMPORTED_MODULE_2__["isFunction"])(removeHandler)) {
+ return undefined;
+ }
+ return function () { return removeHandler(handler, retValue); };
+ });
+}
+//# sourceMappingURL=fromEventPattern.js.map
/***/ }),
@@ -26361,60 +26393,135 @@ var EmptyError = EmptyErrorImpl;
"use strict";
__webpack_require__.r(__webpack_exports__);
-/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "take", function() { return take; });
-/* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(36);
-/* harmony import */ var _Subscriber__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(172);
-/* harmony import */ var _util_ArgumentOutOfRangeError__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(250);
-/* harmony import */ var _observable_empty__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(242);
-/** PURE_IMPORTS_START tslib,_Subscriber,_util_ArgumentOutOfRangeError,_observable_empty PURE_IMPORTS_END */
-
+/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "generate", function() { return generate; });
+/* harmony import */ var _Observable__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(170);
+/* harmony import */ var _util_identity__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(220);
+/* harmony import */ var _util_isScheduler__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(205);
+/** PURE_IMPORTS_START _Observable,_util_identity,_util_isScheduler PURE_IMPORTS_END */
-function take(count) {
- return function (source) {
- if (count === 0) {
- return Object(_observable_empty__WEBPACK_IMPORTED_MODULE_3__["empty"])();
- }
- else {
- return source.lift(new TakeOperator(count));
+function generate(initialStateOrOptions, condition, iterate, resultSelectorOrObservable, scheduler) {
+ var resultSelector;
+ var initialState;
+ if (arguments.length == 1) {
+ var options = initialStateOrOptions;
+ initialState = options.initialState;
+ condition = options.condition;
+ iterate = options.iterate;
+ resultSelector = options.resultSelector || _util_identity__WEBPACK_IMPORTED_MODULE_1__["identity"];
+ scheduler = options.scheduler;
+ }
+ else if (resultSelectorOrObservable === undefined || Object(_util_isScheduler__WEBPACK_IMPORTED_MODULE_2__["isScheduler"])(resultSelectorOrObservable)) {
+ initialState = initialStateOrOptions;
+ resultSelector = _util_identity__WEBPACK_IMPORTED_MODULE_1__["identity"];
+ scheduler = resultSelectorOrObservable;
+ }
+ else {
+ initialState = initialStateOrOptions;
+ resultSelector = resultSelectorOrObservable;
+ }
+ return new _Observable__WEBPACK_IMPORTED_MODULE_0__["Observable"](function (subscriber) {
+ var state = initialState;
+ if (scheduler) {
+ return scheduler.schedule(dispatch, 0, {
+ subscriber: subscriber,
+ iterate: iterate,
+ condition: condition,
+ resultSelector: resultSelector,
+ state: state
+ });
}
- };
+ do {
+ if (condition) {
+ var conditionResult = void 0;
+ try {
+ conditionResult = condition(state);
+ }
+ catch (err) {
+ subscriber.error(err);
+ return undefined;
+ }
+ if (!conditionResult) {
+ subscriber.complete();
+ break;
+ }
+ }
+ var value = void 0;
+ try {
+ value = resultSelector(state);
+ }
+ catch (err) {
+ subscriber.error(err);
+ return undefined;
+ }
+ subscriber.next(value);
+ if (subscriber.closed) {
+ break;
+ }
+ try {
+ state = iterate(state);
+ }
+ catch (err) {
+ subscriber.error(err);
+ return undefined;
+ }
+ } while (true);
+ return undefined;
+ });
}
-var TakeOperator = /*@__PURE__*/ (function () {
- function TakeOperator(total) {
- this.total = total;
- if (this.total < 0) {
- throw new _util_ArgumentOutOfRangeError__WEBPACK_IMPORTED_MODULE_2__["ArgumentOutOfRangeError"];
+function dispatch(state) {
+ var subscriber = state.subscriber, condition = state.condition;
+ if (subscriber.closed) {
+ return undefined;
+ }
+ if (state.needIterate) {
+ try {
+ state.state = state.iterate(state.state);
+ }
+ catch (err) {
+ subscriber.error(err);
+ return undefined;
}
}
- TakeOperator.prototype.call = function (subscriber, source) {
- return source.subscribe(new TakeSubscriber(subscriber, this.total));
- };
- return TakeOperator;
-}());
-var TakeSubscriber = /*@__PURE__*/ (function (_super) {
- tslib__WEBPACK_IMPORTED_MODULE_0__["__extends"](TakeSubscriber, _super);
- function TakeSubscriber(destination, total) {
- var _this = _super.call(this, destination) || this;
- _this.total = total;
- _this.count = 0;
- return _this;
+ else {
+ state.needIterate = true;
}
- TakeSubscriber.prototype._next = function (value) {
- var total = this.total;
- var count = ++this.count;
- if (count <= total) {
- this.destination.next(value);
- if (count === total) {
- this.destination.complete();
- this.unsubscribe();
- }
+ if (condition) {
+ var conditionResult = void 0;
+ try {
+ conditionResult = condition(state.state);
}
- };
- return TakeSubscriber;
-}(_Subscriber__WEBPACK_IMPORTED_MODULE_1__["Subscriber"]));
-//# sourceMappingURL=take.js.map
+ catch (err) {
+ subscriber.error(err);
+ return undefined;
+ }
+ if (!conditionResult) {
+ subscriber.complete();
+ return undefined;
+ }
+ if (subscriber.closed) {
+ return undefined;
+ }
+ }
+ var value;
+ try {
+ value = state.resultSelector(state.state);
+ }
+ catch (err) {
+ subscriber.error(err);
+ return undefined;
+ }
+ if (subscriber.closed) {
+ return undefined;
+ }
+ subscriber.next(value);
+ if (subscriber.closed) {
+ return undefined;
+ }
+ return this.schedule(state);
+}
+//# sourceMappingURL=generate.js.map
/***/ }),
@@ -26423,20 +26530,22 @@ var TakeSubscriber = /*@__PURE__*/ (function (_super) {
"use strict";
__webpack_require__.r(__webpack_exports__);
-/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "endWith", function() { return endWith; });
-/* harmony import */ var _observable_concat__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(226);
-/* harmony import */ var _observable_of__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(227);
-/** PURE_IMPORTS_START _observable_concat,_observable_of PURE_IMPORTS_END */
+/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "iif", function() { return iif; });
+/* harmony import */ var _defer__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(250);
+/* harmony import */ var _empty__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(203);
+/** PURE_IMPORTS_START _defer,_empty PURE_IMPORTS_END */
-function endWith() {
- var array = [];
- for (var _i = 0; _i < arguments.length; _i++) {
- array[_i] = arguments[_i];
+function iif(condition, trueResult, falseResult) {
+ if (trueResult === void 0) {
+ trueResult = _empty__WEBPACK_IMPORTED_MODULE_1__["EMPTY"];
}
- return function (source) { return Object(_observable_concat__WEBPACK_IMPORTED_MODULE_0__["concat"])(source, _observable_of__WEBPACK_IMPORTED_MODULE_1__["of"].apply(void 0, array)); };
+ if (falseResult === void 0) {
+ falseResult = _empty__WEBPACK_IMPORTED_MODULE_1__["EMPTY"];
+ }
+ return Object(_defer__WEBPACK_IMPORTED_MODULE_0__["defer"])(function () { return condition() ? trueResult : falseResult; });
}
-//# sourceMappingURL=endWith.js.map
+//# sourceMappingURL=iif.js.map
/***/ }),
@@ -26445,60 +26554,38 @@ function endWith() {
"use strict";
__webpack_require__.r(__webpack_exports__);
-/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "every", function() { return every; });
-/* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(36);
-/* harmony import */ var _Subscriber__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(172);
-/** PURE_IMPORTS_START tslib,_Subscriber PURE_IMPORTS_END */
+/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "interval", function() { return interval; });
+/* harmony import */ var _Observable__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(170);
+/* harmony import */ var _scheduler_async__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(215);
+/* harmony import */ var _util_isNumeric__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(257);
+/** PURE_IMPORTS_START _Observable,_scheduler_async,_util_isNumeric PURE_IMPORTS_END */
-function every(predicate, thisArg) {
- return function (source) { return source.lift(new EveryOperator(predicate, thisArg, source)); };
-}
-var EveryOperator = /*@__PURE__*/ (function () {
- function EveryOperator(predicate, thisArg, source) {
- this.predicate = predicate;
- this.thisArg = thisArg;
- this.source = source;
+
+function interval(period, scheduler) {
+ if (period === void 0) {
+ period = 0;
}
- EveryOperator.prototype.call = function (observer, source) {
- return source.subscribe(new EverySubscriber(observer, this.predicate, this.thisArg, this.source));
- };
- return EveryOperator;
-}());
-var EverySubscriber = /*@__PURE__*/ (function (_super) {
- tslib__WEBPACK_IMPORTED_MODULE_0__["__extends"](EverySubscriber, _super);
- function EverySubscriber(destination, predicate, thisArg, source) {
- var _this = _super.call(this, destination) || this;
- _this.predicate = predicate;
- _this.thisArg = thisArg;
- _this.source = source;
- _this.index = 0;
- _this.thisArg = thisArg || _this;
- return _this;
+ if (scheduler === void 0) {
+ scheduler = _scheduler_async__WEBPACK_IMPORTED_MODULE_1__["async"];
}
- EverySubscriber.prototype.notifyComplete = function (everyValueMatch) {
- this.destination.next(everyValueMatch);
- this.destination.complete();
- };
- EverySubscriber.prototype._next = function (value) {
- var result = false;
- try {
- result = this.predicate.call(this.thisArg, value, this.index++, this.source);
- }
- catch (err) {
- this.destination.error(err);
- return;
- }
- if (!result) {
- this.notifyComplete(false);
- }
- };
- EverySubscriber.prototype._complete = function () {
- this.notifyComplete(true);
- };
- return EverySubscriber;
-}(_Subscriber__WEBPACK_IMPORTED_MODULE_1__["Subscriber"]));
-//# sourceMappingURL=every.js.map
+ if (!Object(_util_isNumeric__WEBPACK_IMPORTED_MODULE_2__["isNumeric"])(period) || period < 0) {
+ period = 0;
+ }
+ if (!scheduler || typeof scheduler.schedule !== 'function') {
+ scheduler = _scheduler_async__WEBPACK_IMPORTED_MODULE_1__["async"];
+ }
+ return new _Observable__WEBPACK_IMPORTED_MODULE_0__["Observable"](function (subscriber) {
+ subscriber.add(scheduler.schedule(dispatch, period, { subscriber: subscriber, counter: 0, period: period }));
+ return subscriber;
+ });
+}
+function dispatch(state) {
+ var subscriber = state.subscriber, counter = state.counter, period = state.period;
+ subscriber.next(counter);
+ this.schedule({ subscriber: subscriber, counter: counter + 1, period: period }, period);
+}
+//# sourceMappingURL=interval.js.map
/***/ }),
@@ -26507,55 +26594,14 @@ var EverySubscriber = /*@__PURE__*/ (function (_super) {
"use strict";
__webpack_require__.r(__webpack_exports__);
-/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "exhaust", function() { return exhaust; });
-/* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(36);
-/* harmony import */ var _OuterSubscriber__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(171);
-/* harmony import */ var _util_subscribeToResult__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(182);
-/** PURE_IMPORTS_START tslib,_OuterSubscriber,_util_subscribeToResult PURE_IMPORTS_END */
-
-
+/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "isNumeric", function() { return isNumeric; });
+/* harmony import */ var _isArray__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(178);
+/** PURE_IMPORTS_START _isArray PURE_IMPORTS_END */
-function exhaust() {
- return function (source) { return source.lift(new SwitchFirstOperator()); };
+function isNumeric(val) {
+ return !Object(_isArray__WEBPACK_IMPORTED_MODULE_0__["isArray"])(val) && (val - parseFloat(val) + 1) >= 0;
}
-var SwitchFirstOperator = /*@__PURE__*/ (function () {
- function SwitchFirstOperator() {
- }
- SwitchFirstOperator.prototype.call = function (subscriber, source) {
- return source.subscribe(new SwitchFirstSubscriber(subscriber));
- };
- return SwitchFirstOperator;
-}());
-var SwitchFirstSubscriber = /*@__PURE__*/ (function (_super) {
- tslib__WEBPACK_IMPORTED_MODULE_0__["__extends"](SwitchFirstSubscriber, _super);
- function SwitchFirstSubscriber(destination) {
- var _this = _super.call(this, destination) || this;
- _this.hasCompleted = false;
- _this.hasSubscription = false;
- return _this;
- }
- SwitchFirstSubscriber.prototype._next = function (value) {
- if (!this.hasSubscription) {
- this.hasSubscription = true;
- this.add(Object(_util_subscribeToResult__WEBPACK_IMPORTED_MODULE_2__["subscribeToResult"])(this, value));
- }
- };
- SwitchFirstSubscriber.prototype._complete = function () {
- this.hasCompleted = true;
- if (!this.hasSubscription) {
- this.destination.complete();
- }
- };
- SwitchFirstSubscriber.prototype.notifyComplete = function (innerSub) {
- this.remove(innerSub);
- this.hasSubscription = false;
- if (this.hasCompleted) {
- this.destination.complete();
- }
- };
- return SwitchFirstSubscriber;
-}(_OuterSubscriber__WEBPACK_IMPORTED_MODULE_1__["OuterSubscriber"]));
-//# sourceMappingURL=exhaust.js.map
+//# sourceMappingURL=isNumeric.js.map
/***/ }),
@@ -26564,95 +26610,39 @@ var SwitchFirstSubscriber = /*@__PURE__*/ (function (_super) {
"use strict";
__webpack_require__.r(__webpack_exports__);
-/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "exhaustMap", function() { return exhaustMap; });
-/* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(36);
-/* harmony import */ var _OuterSubscriber__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(171);
-/* harmony import */ var _InnerSubscriber__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(183);
-/* harmony import */ var _util_subscribeToResult__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(182);
-/* harmony import */ var _map__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(231);
-/* harmony import */ var _observable_from__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(218);
-/** PURE_IMPORTS_START tslib,_OuterSubscriber,_InnerSubscriber,_util_subscribeToResult,_map,_observable_from PURE_IMPORTS_END */
-
-
+/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "merge", function() { return merge; });
+/* harmony import */ var _Observable__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(170);
+/* harmony import */ var _util_isScheduler__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(205);
+/* harmony import */ var _operators_mergeAll__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(241);
+/* harmony import */ var _fromArray__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(206);
+/** PURE_IMPORTS_START _Observable,_util_isScheduler,_operators_mergeAll,_fromArray PURE_IMPORTS_END */
-function exhaustMap(project, resultSelector) {
- if (resultSelector) {
- return function (source) { return source.pipe(exhaustMap(function (a, i) { return Object(_observable_from__WEBPACK_IMPORTED_MODULE_5__["from"])(project(a, i)).pipe(Object(_map__WEBPACK_IMPORTED_MODULE_4__["map"])(function (b, ii) { return resultSelector(a, b, i, ii); })); })); };
+function merge() {
+ var observables = [];
+ for (var _i = 0; _i < arguments.length; _i++) {
+ observables[_i] = arguments[_i];
}
- return function (source) {
- return source.lift(new ExhaustMapOperator(project));
- };
-}
-var ExhaustMapOperator = /*@__PURE__*/ (function () {
- function ExhaustMapOperator(project) {
- this.project = project;
+ var concurrent = Number.POSITIVE_INFINITY;
+ var scheduler = null;
+ var last = observables[observables.length - 1];
+ if (Object(_util_isScheduler__WEBPACK_IMPORTED_MODULE_1__["isScheduler"])(last)) {
+ scheduler = observables.pop();
+ if (observables.length > 1 && typeof observables[observables.length - 1] === 'number') {
+ concurrent = observables.pop();
+ }
}
- ExhaustMapOperator.prototype.call = function (subscriber, source) {
- return source.subscribe(new ExhaustMapSubscriber(subscriber, this.project));
- };
- return ExhaustMapOperator;
-}());
-var ExhaustMapSubscriber = /*@__PURE__*/ (function (_super) {
- tslib__WEBPACK_IMPORTED_MODULE_0__["__extends"](ExhaustMapSubscriber, _super);
- function ExhaustMapSubscriber(destination, project) {
- var _this = _super.call(this, destination) || this;
- _this.project = project;
- _this.hasSubscription = false;
- _this.hasCompleted = false;
- _this.index = 0;
- return _this;
+ else if (typeof last === 'number') {
+ concurrent = observables.pop();
}
- ExhaustMapSubscriber.prototype._next = function (value) {
- if (!this.hasSubscription) {
- this.tryNext(value);
- }
- };
- ExhaustMapSubscriber.prototype.tryNext = function (value) {
- var result;
- var index = this.index++;
- try {
- result = this.project(value, index);
- }
- catch (err) {
- this.destination.error(err);
- return;
- }
- this.hasSubscription = true;
- this._innerSub(result, value, index);
- };
- ExhaustMapSubscriber.prototype._innerSub = function (result, value, index) {
- var innerSubscriber = new _InnerSubscriber__WEBPACK_IMPORTED_MODULE_2__["InnerSubscriber"](this, undefined, undefined);
- var destination = this.destination;
- destination.add(innerSubscriber);
- Object(_util_subscribeToResult__WEBPACK_IMPORTED_MODULE_3__["subscribeToResult"])(this, result, value, index, innerSubscriber);
- };
- ExhaustMapSubscriber.prototype._complete = function () {
- this.hasCompleted = true;
- if (!this.hasSubscription) {
- this.destination.complete();
- }
- this.unsubscribe();
- };
- ExhaustMapSubscriber.prototype.notifyNext = function (outerValue, innerValue, outerIndex, innerIndex, innerSub) {
- this.destination.next(innerValue);
- };
- ExhaustMapSubscriber.prototype.notifyError = function (err) {
- this.destination.error(err);
- };
- ExhaustMapSubscriber.prototype.notifyComplete = function (innerSub) {
- var destination = this.destination;
- destination.remove(innerSub);
- this.hasSubscription = false;
- if (this.hasCompleted) {
- this.destination.complete();
- }
- };
- return ExhaustMapSubscriber;
-}(_OuterSubscriber__WEBPACK_IMPORTED_MODULE_1__["OuterSubscriber"]));
-//# sourceMappingURL=exhaustMap.js.map
+ if (scheduler === null && observables.length === 1 && observables[0] instanceof _Observable__WEBPACK_IMPORTED_MODULE_0__["Observable"]) {
+ return observables[0];
+ }
+ return Object(_operators_mergeAll__WEBPACK_IMPORTED_MODULE_2__["mergeAll"])(concurrent)(Object(_fromArray__WEBPACK_IMPORTED_MODULE_3__["fromArray"])(observables, scheduler));
+}
+//# sourceMappingURL=merge.js.map
/***/ }),
@@ -26661,117 +26651,18 @@ var ExhaustMapSubscriber = /*@__PURE__*/ (function (_super) {
"use strict";
__webpack_require__.r(__webpack_exports__);
-/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "expand", function() { return expand; });
-/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ExpandOperator", function() { return ExpandOperator; });
-/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ExpandSubscriber", function() { return ExpandSubscriber; });
-/* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(36);
-/* harmony import */ var _OuterSubscriber__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(171);
-/* harmony import */ var _util_subscribeToResult__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(182);
-/** PURE_IMPORTS_START tslib,_OuterSubscriber,_util_subscribeToResult PURE_IMPORTS_END */
-
+/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "NEVER", function() { return NEVER; });
+/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "never", function() { return never; });
+/* harmony import */ var _Observable__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(170);
+/* harmony import */ var _util_noop__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(185);
+/** PURE_IMPORTS_START _Observable,_util_noop PURE_IMPORTS_END */
-function expand(project, concurrent, scheduler) {
- if (concurrent === void 0) {
- concurrent = Number.POSITIVE_INFINITY;
- }
- if (scheduler === void 0) {
- scheduler = undefined;
- }
- concurrent = (concurrent || 0) < 1 ? Number.POSITIVE_INFINITY : concurrent;
- return function (source) { return source.lift(new ExpandOperator(project, concurrent, scheduler)); };
+var NEVER = /*@__PURE__*/ new _Observable__WEBPACK_IMPORTED_MODULE_0__["Observable"](_util_noop__WEBPACK_IMPORTED_MODULE_1__["noop"]);
+function never() {
+ return NEVER;
}
-var ExpandOperator = /*@__PURE__*/ (function () {
- function ExpandOperator(project, concurrent, scheduler) {
- this.project = project;
- this.concurrent = concurrent;
- this.scheduler = scheduler;
- }
- ExpandOperator.prototype.call = function (subscriber, source) {
- return source.subscribe(new ExpandSubscriber(subscriber, this.project, this.concurrent, this.scheduler));
- };
- return ExpandOperator;
-}());
-
-var ExpandSubscriber = /*@__PURE__*/ (function (_super) {
- tslib__WEBPACK_IMPORTED_MODULE_0__["__extends"](ExpandSubscriber, _super);
- function ExpandSubscriber(destination, project, concurrent, scheduler) {
- var _this = _super.call(this, destination) || this;
- _this.project = project;
- _this.concurrent = concurrent;
- _this.scheduler = scheduler;
- _this.index = 0;
- _this.active = 0;
- _this.hasCompleted = false;
- if (concurrent < Number.POSITIVE_INFINITY) {
- _this.buffer = [];
- }
- return _this;
- }
- ExpandSubscriber.dispatch = function (arg) {
- var subscriber = arg.subscriber, result = arg.result, value = arg.value, index = arg.index;
- subscriber.subscribeToProjection(result, value, index);
- };
- ExpandSubscriber.prototype._next = function (value) {
- var destination = this.destination;
- if (destination.closed) {
- this._complete();
- return;
- }
- var index = this.index++;
- if (this.active < this.concurrent) {
- destination.next(value);
- try {
- var project = this.project;
- var result = project(value, index);
- if (!this.scheduler) {
- this.subscribeToProjection(result, value, index);
- }
- else {
- var state = { subscriber: this, result: result, value: value, index: index };
- var destination_1 = this.destination;
- destination_1.add(this.scheduler.schedule(ExpandSubscriber.dispatch, 0, state));
- }
- }
- catch (e) {
- destination.error(e);
- }
- }
- else {
- this.buffer.push(value);
- }
- };
- ExpandSubscriber.prototype.subscribeToProjection = function (result, value, index) {
- this.active++;
- var destination = this.destination;
- destination.add(Object(_util_subscribeToResult__WEBPACK_IMPORTED_MODULE_2__["subscribeToResult"])(this, result, value, index));
- };
- ExpandSubscriber.prototype._complete = function () {
- this.hasCompleted = true;
- if (this.hasCompleted && this.active === 0) {
- this.destination.complete();
- }
- this.unsubscribe();
- };
- ExpandSubscriber.prototype.notifyNext = function (outerValue, innerValue, outerIndex, innerIndex, innerSub) {
- this._next(innerValue);
- };
- ExpandSubscriber.prototype.notifyComplete = function (innerSub) {
- var buffer = this.buffer;
- var destination = this.destination;
- destination.remove(innerSub);
- this.active--;
- if (buffer && buffer.length > 0) {
- this._next(buffer.shift());
- }
- if (this.hasCompleted && this.active === 0) {
- this.destination.complete();
- }
- };
- return ExpandSubscriber;
-}(_OuterSubscriber__WEBPACK_IMPORTED_MODULE_1__["OuterSubscriber"]));
-
-//# sourceMappingURL=expand.js.map
+//# sourceMappingURL=never.js.map
/***/ }),
@@ -26780,36 +26671,38 @@ var ExpandSubscriber = /*@__PURE__*/ (function (_super) {
"use strict";
__webpack_require__.r(__webpack_exports__);
-/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "finalize", function() { return finalize; });
-/* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(36);
-/* harmony import */ var _Subscriber__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(172);
-/* harmony import */ var _Subscription__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(177);
-/** PURE_IMPORTS_START tslib,_Subscriber,_Subscription PURE_IMPORTS_END */
+/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "onErrorResumeNext", function() { return onErrorResumeNext; });
+/* harmony import */ var _Observable__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(170);
+/* harmony import */ var _from__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(243);
+/* harmony import */ var _util_isArray__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(178);
+/* harmony import */ var _empty__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(203);
+/** PURE_IMPORTS_START _Observable,_from,_util_isArray,_empty PURE_IMPORTS_END */
-function finalize(callback) {
- return function (source) { return source.lift(new FinallyOperator(callback)); };
-}
-var FinallyOperator = /*@__PURE__*/ (function () {
- function FinallyOperator(callback) {
- this.callback = callback;
+
+function onErrorResumeNext() {
+ var sources = [];
+ for (var _i = 0; _i < arguments.length; _i++) {
+ sources[_i] = arguments[_i];
}
- FinallyOperator.prototype.call = function (subscriber, source) {
- return source.subscribe(new FinallySubscriber(subscriber, this.callback));
- };
- return FinallyOperator;
-}());
-var FinallySubscriber = /*@__PURE__*/ (function (_super) {
- tslib__WEBPACK_IMPORTED_MODULE_0__["__extends"](FinallySubscriber, _super);
- function FinallySubscriber(destination, callback) {
- var _this = _super.call(this, destination) || this;
- _this.add(new _Subscription__WEBPACK_IMPORTED_MODULE_2__["Subscription"](callback));
- return _this;
+ if (sources.length === 0) {
+ return _empty__WEBPACK_IMPORTED_MODULE_3__["EMPTY"];
}
- return FinallySubscriber;
-}(_Subscriber__WEBPACK_IMPORTED_MODULE_1__["Subscriber"]));
-//# sourceMappingURL=finalize.js.map
+ var first = sources[0], remainder = sources.slice(1);
+ if (sources.length === 1 && Object(_util_isArray__WEBPACK_IMPORTED_MODULE_2__["isArray"])(first)) {
+ return onErrorResumeNext.apply(void 0, first);
+ }
+ return new _Observable__WEBPACK_IMPORTED_MODULE_0__["Observable"](function (subscriber) {
+ var subNext = function () { return subscriber.add(onErrorResumeNext.apply(void 0, remainder).subscribe(subscriber)); };
+ return Object(_from__WEBPACK_IMPORTED_MODULE_1__["from"])(first).subscribe({
+ next: function (value) { subscriber.next(value); },
+ error: subNext,
+ complete: subNext,
+ });
+ });
+}
+//# sourceMappingURL=onErrorResumeNext.js.map
/***/ }),
@@ -26818,70 +26711,49 @@ var FinallySubscriber = /*@__PURE__*/ (function (_super) {
"use strict";
__webpack_require__.r(__webpack_exports__);
-/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "find", function() { return find; });
-/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "FindValueOperator", function() { return FindValueOperator; });
-/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "FindValueSubscriber", function() { return FindValueSubscriber; });
-/* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(36);
-/* harmony import */ var _Subscriber__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(172);
-/** PURE_IMPORTS_START tslib,_Subscriber PURE_IMPORTS_END */
+/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "pairs", function() { return pairs; });
+/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "dispatch", function() { return dispatch; });
+/* harmony import */ var _Observable__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(170);
+/* harmony import */ var _Subscription__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(177);
+/** PURE_IMPORTS_START _Observable,_Subscription PURE_IMPORTS_END */
-function find(predicate, thisArg) {
- if (typeof predicate !== 'function') {
- throw new TypeError('predicate is not a function');
- }
- return function (source) { return source.lift(new FindValueOperator(predicate, source, false, thisArg)); };
-}
-var FindValueOperator = /*@__PURE__*/ (function () {
- function FindValueOperator(predicate, source, yieldIndex, thisArg) {
- this.predicate = predicate;
- this.source = source;
- this.yieldIndex = yieldIndex;
- this.thisArg = thisArg;
+function pairs(obj, scheduler) {
+ if (!scheduler) {
+ return new _Observable__WEBPACK_IMPORTED_MODULE_0__["Observable"](function (subscriber) {
+ var keys = Object.keys(obj);
+ for (var i = 0; i < keys.length && !subscriber.closed; i++) {
+ var key = keys[i];
+ if (obj.hasOwnProperty(key)) {
+ subscriber.next([key, obj[key]]);
+ }
+ }
+ subscriber.complete();
+ });
}
- FindValueOperator.prototype.call = function (observer, source) {
- return source.subscribe(new FindValueSubscriber(observer, this.predicate, this.source, this.yieldIndex, this.thisArg));
- };
- return FindValueOperator;
-}());
-
-var FindValueSubscriber = /*@__PURE__*/ (function (_super) {
- tslib__WEBPACK_IMPORTED_MODULE_0__["__extends"](FindValueSubscriber, _super);
- function FindValueSubscriber(destination, predicate, source, yieldIndex, thisArg) {
- var _this = _super.call(this, destination) || this;
- _this.predicate = predicate;
- _this.source = source;
- _this.yieldIndex = yieldIndex;
- _this.thisArg = thisArg;
- _this.index = 0;
- return _this;
+ else {
+ return new _Observable__WEBPACK_IMPORTED_MODULE_0__["Observable"](function (subscriber) {
+ var keys = Object.keys(obj);
+ var subscription = new _Subscription__WEBPACK_IMPORTED_MODULE_1__["Subscription"]();
+ subscription.add(scheduler.schedule(dispatch, 0, { keys: keys, index: 0, subscriber: subscriber, subscription: subscription, obj: obj }));
+ return subscription;
+ });
}
- FindValueSubscriber.prototype.notifyComplete = function (value) {
- var destination = this.destination;
- destination.next(value);
- destination.complete();
- this.unsubscribe();
- };
- FindValueSubscriber.prototype._next = function (value) {
- var _a = this, predicate = _a.predicate, thisArg = _a.thisArg;
- var index = this.index++;
- try {
- var result = predicate.call(thisArg || this, value, index, this.source);
- if (result) {
- this.notifyComplete(this.yieldIndex ? index : value);
- }
+}
+function dispatch(state) {
+ var keys = state.keys, index = state.index, subscriber = state.subscriber, subscription = state.subscription, obj = state.obj;
+ if (!subscriber.closed) {
+ if (index < keys.length) {
+ var key = keys[index];
+ subscriber.next([key, obj[key]]);
+ subscription.add(this.schedule({ keys: keys, index: index + 1, subscriber: subscriber, subscription: subscription, obj: obj }));
}
- catch (err) {
- this.destination.error(err);
+ else {
+ subscriber.complete();
}
- };
- FindValueSubscriber.prototype._complete = function () {
- this.notifyComplete(this.yieldIndex ? -1 : undefined);
- };
- return FindValueSubscriber;
-}(_Subscriber__WEBPACK_IMPORTED_MODULE_1__["Subscriber"]));
-
-//# sourceMappingURL=find.js.map
+ }
+}
+//# sourceMappingURL=pairs.js.map
/***/ }),
@@ -26890,14 +26762,23 @@ var FindValueSubscriber = /*@__PURE__*/ (function (_super) {
"use strict";
__webpack_require__.r(__webpack_exports__);
-/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "findIndex", function() { return findIndex; });
-/* harmony import */ var _operators_find__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(261);
-/** PURE_IMPORTS_START _operators_find PURE_IMPORTS_END */
+/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "partition", function() { return partition; });
+/* harmony import */ var _util_not__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(263);
+/* harmony import */ var _util_subscribeTo__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(232);
+/* harmony import */ var _operators_filter__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(264);
+/* harmony import */ var _Observable__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(170);
+/** PURE_IMPORTS_START _util_not,_util_subscribeTo,_operators_filter,_Observable PURE_IMPORTS_END */
-function findIndex(predicate, thisArg) {
- return function (source) { return source.lift(new _operators_find__WEBPACK_IMPORTED_MODULE_0__["FindValueOperator"](predicate, source, true, thisArg)); };
+
+
+
+function partition(source, predicate, thisArg) {
+ return [
+ Object(_operators_filter__WEBPACK_IMPORTED_MODULE_2__["filter"])(predicate, thisArg)(new _Observable__WEBPACK_IMPORTED_MODULE_3__["Observable"](Object(_util_subscribeTo__WEBPACK_IMPORTED_MODULE_1__["subscribeTo"])(source))),
+ Object(_operators_filter__WEBPACK_IMPORTED_MODULE_2__["filter"])(Object(_util_not__WEBPACK_IMPORTED_MODULE_0__["not"])(predicate, thisArg))(new _Observable__WEBPACK_IMPORTED_MODULE_3__["Observable"](Object(_util_subscribeTo__WEBPACK_IMPORTED_MODULE_1__["subscribeTo"])(source)))
+ ];
}
-//# sourceMappingURL=findIndex.js.map
+//# sourceMappingURL=partition.js.map
/***/ }),
@@ -26906,25 +26787,17 @@ function findIndex(predicate, thisArg) {
"use strict";
__webpack_require__.r(__webpack_exports__);
-/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "first", function() { return first; });
-/* harmony import */ var _util_EmptyError__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(253);
-/* harmony import */ var _filter__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(251);
-/* harmony import */ var _take__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(254);
-/* harmony import */ var _defaultIfEmpty__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(238);
-/* harmony import */ var _throwIfEmpty__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(252);
-/* harmony import */ var _util_identity__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(232);
-/** PURE_IMPORTS_START _util_EmptyError,_filter,_take,_defaultIfEmpty,_throwIfEmpty,_util_identity PURE_IMPORTS_END */
-
-
-
-
-
-
-function first(predicate, defaultValue) {
- var hasDefaultValue = arguments.length >= 2;
- return function (source) { return source.pipe(predicate ? Object(_filter__WEBPACK_IMPORTED_MODULE_1__["filter"])(function (v, i) { return predicate(v, i, source); }) : _util_identity__WEBPACK_IMPORTED_MODULE_5__["identity"], Object(_take__WEBPACK_IMPORTED_MODULE_2__["take"])(1), hasDefaultValue ? Object(_defaultIfEmpty__WEBPACK_IMPORTED_MODULE_3__["defaultIfEmpty"])(defaultValue) : Object(_throwIfEmpty__WEBPACK_IMPORTED_MODULE_4__["throwIfEmpty"])(function () { return new _util_EmptyError__WEBPACK_IMPORTED_MODULE_0__["EmptyError"](); })); };
+/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "not", function() { return not; });
+/** PURE_IMPORTS_START PURE_IMPORTS_END */
+function not(pred, thisArg) {
+ function notPred() {
+ return !(notPred.pred.apply(notPred.thisArg, arguments));
+ }
+ notPred.pred = pred;
+ notPred.thisArg = thisArg;
+ return notPred;
}
-//# sourceMappingURL=first.js.map
+//# sourceMappingURL=not.js.map
/***/ }),
@@ -26933,195 +26806,52 @@ function first(predicate, defaultValue) {
"use strict";
__webpack_require__.r(__webpack_exports__);
-/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "groupBy", function() { return groupBy; });
-/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "GroupedObservable", function() { return GroupedObservable; });
+/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "filter", function() { return filter; });
/* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(36);
/* harmony import */ var _Subscriber__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(172);
-/* harmony import */ var _Subscription__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(177);
-/* harmony import */ var _Observable__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(193);
-/* harmony import */ var _Subject__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(265);
-/** PURE_IMPORTS_START tslib,_Subscriber,_Subscription,_Observable,_Subject PURE_IMPORTS_END */
-
-
-
+/** PURE_IMPORTS_START tslib,_Subscriber PURE_IMPORTS_END */
-function groupBy(keySelector, elementSelector, durationSelector, subjectSelector) {
- return function (source) {
- return source.lift(new GroupByOperator(keySelector, elementSelector, durationSelector, subjectSelector));
+function filter(predicate, thisArg) {
+ return function filterOperatorFunction(source) {
+ return source.lift(new FilterOperator(predicate, thisArg));
};
}
-var GroupByOperator = /*@__PURE__*/ (function () {
- function GroupByOperator(keySelector, elementSelector, durationSelector, subjectSelector) {
- this.keySelector = keySelector;
- this.elementSelector = elementSelector;
- this.durationSelector = durationSelector;
- this.subjectSelector = subjectSelector;
+var FilterOperator = /*@__PURE__*/ (function () {
+ function FilterOperator(predicate, thisArg) {
+ this.predicate = predicate;
+ this.thisArg = thisArg;
}
- GroupByOperator.prototype.call = function (subscriber, source) {
- return source.subscribe(new GroupBySubscriber(subscriber, this.keySelector, this.elementSelector, this.durationSelector, this.subjectSelector));
+ FilterOperator.prototype.call = function (subscriber, source) {
+ return source.subscribe(new FilterSubscriber(subscriber, this.predicate, this.thisArg));
};
- return GroupByOperator;
+ return FilterOperator;
}());
-var GroupBySubscriber = /*@__PURE__*/ (function (_super) {
- tslib__WEBPACK_IMPORTED_MODULE_0__["__extends"](GroupBySubscriber, _super);
- function GroupBySubscriber(destination, keySelector, elementSelector, durationSelector, subjectSelector) {
+var FilterSubscriber = /*@__PURE__*/ (function (_super) {
+ tslib__WEBPACK_IMPORTED_MODULE_0__["__extends"](FilterSubscriber, _super);
+ function FilterSubscriber(destination, predicate, thisArg) {
var _this = _super.call(this, destination) || this;
- _this.keySelector = keySelector;
- _this.elementSelector = elementSelector;
- _this.durationSelector = durationSelector;
- _this.subjectSelector = subjectSelector;
- _this.groups = null;
- _this.attemptedToUnsubscribe = false;
+ _this.predicate = predicate;
+ _this.thisArg = thisArg;
_this.count = 0;
return _this;
}
- GroupBySubscriber.prototype._next = function (value) {
- var key;
+ FilterSubscriber.prototype._next = function (value) {
+ var result;
try {
- key = this.keySelector(value);
+ result = this.predicate.call(this.thisArg, value, this.count++);
}
catch (err) {
- this.error(err);
+ this.destination.error(err);
return;
}
- this._group(value, key);
- };
- GroupBySubscriber.prototype._group = function (value, key) {
- var groups = this.groups;
- if (!groups) {
- groups = this.groups = new Map();
- }
- var group = groups.get(key);
- var element;
- if (this.elementSelector) {
- try {
- element = this.elementSelector(value);
- }
- catch (err) {
- this.error(err);
- }
- }
- else {
- element = value;
- }
- if (!group) {
- group = (this.subjectSelector ? this.subjectSelector() : new _Subject__WEBPACK_IMPORTED_MODULE_4__["Subject"]());
- groups.set(key, group);
- var groupedObservable = new GroupedObservable(key, group, this);
- this.destination.next(groupedObservable);
- if (this.durationSelector) {
- var duration = void 0;
- try {
- duration = this.durationSelector(new GroupedObservable(key, group));
- }
- catch (err) {
- this.error(err);
- return;
- }
- this.add(duration.subscribe(new GroupDurationSubscriber(key, group, this)));
- }
- }
- if (!group.closed) {
- group.next(element);
- }
- };
- GroupBySubscriber.prototype._error = function (err) {
- var groups = this.groups;
- if (groups) {
- groups.forEach(function (group, key) {
- group.error(err);
- });
- groups.clear();
- }
- this.destination.error(err);
- };
- GroupBySubscriber.prototype._complete = function () {
- var groups = this.groups;
- if (groups) {
- groups.forEach(function (group, key) {
- group.complete();
- });
- groups.clear();
- }
- this.destination.complete();
- };
- GroupBySubscriber.prototype.removeGroup = function (key) {
- this.groups.delete(key);
- };
- GroupBySubscriber.prototype.unsubscribe = function () {
- if (!this.closed) {
- this.attemptedToUnsubscribe = true;
- if (this.count === 0) {
- _super.prototype.unsubscribe.call(this);
- }
- }
- };
- return GroupBySubscriber;
-}(_Subscriber__WEBPACK_IMPORTED_MODULE_1__["Subscriber"]));
-var GroupDurationSubscriber = /*@__PURE__*/ (function (_super) {
- tslib__WEBPACK_IMPORTED_MODULE_0__["__extends"](GroupDurationSubscriber, _super);
- function GroupDurationSubscriber(key, group, parent) {
- var _this = _super.call(this, group) || this;
- _this.key = key;
- _this.group = group;
- _this.parent = parent;
- return _this;
- }
- GroupDurationSubscriber.prototype._next = function (value) {
- this.complete();
- };
- GroupDurationSubscriber.prototype._unsubscribe = function () {
- var _a = this, parent = _a.parent, key = _a.key;
- this.key = this.parent = null;
- if (parent) {
- parent.removeGroup(key);
+ if (result) {
+ this.destination.next(value);
}
};
- return GroupDurationSubscriber;
+ return FilterSubscriber;
}(_Subscriber__WEBPACK_IMPORTED_MODULE_1__["Subscriber"]));
-var GroupedObservable = /*@__PURE__*/ (function (_super) {
- tslib__WEBPACK_IMPORTED_MODULE_0__["__extends"](GroupedObservable, _super);
- function GroupedObservable(key, groupSubject, refCountSubscription) {
- var _this = _super.call(this) || this;
- _this.key = key;
- _this.groupSubject = groupSubject;
- _this.refCountSubscription = refCountSubscription;
- return _this;
- }
- GroupedObservable.prototype._subscribe = function (subscriber) {
- var subscription = new _Subscription__WEBPACK_IMPORTED_MODULE_2__["Subscription"]();
- var _a = this, refCountSubscription = _a.refCountSubscription, groupSubject = _a.groupSubject;
- if (refCountSubscription && !refCountSubscription.closed) {
- subscription.add(new InnerRefCountSubscription(refCountSubscription));
- }
- subscription.add(groupSubject.subscribe(subscriber));
- return subscription;
- };
- return GroupedObservable;
-}(_Observable__WEBPACK_IMPORTED_MODULE_3__["Observable"]));
-
-var InnerRefCountSubscription = /*@__PURE__*/ (function (_super) {
- tslib__WEBPACK_IMPORTED_MODULE_0__["__extends"](InnerRefCountSubscription, _super);
- function InnerRefCountSubscription(parent) {
- var _this = _super.call(this) || this;
- _this.parent = parent;
- parent.count++;
- return _this;
- }
- InnerRefCountSubscription.prototype.unsubscribe = function () {
- var parent = this.parent;
- if (!parent.closed && !this.closed) {
- _super.prototype.unsubscribe.call(this);
- parent.count -= 1;
- if (parent.count === 0 && parent.attemptedToUnsubscribe) {
- parent.unsubscribe();
- }
- }
- };
- return InnerRefCountSubscription;
-}(_Subscription__WEBPACK_IMPORTED_MODULE_2__["Subscription"]));
-//# sourceMappingURL=groupBy.js.map
+//# sourceMappingURL=filter.js.map
/***/ }),
@@ -27130,174 +26860,92 @@ var InnerRefCountSubscription = /*@__PURE__*/ (function (_super) {
"use strict";
__webpack_require__.r(__webpack_exports__);
-/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "SubjectSubscriber", function() { return SubjectSubscriber; });
-/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "Subject", function() { return Subject; });
-/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "AnonymousSubject", function() { return AnonymousSubject; });
+/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "race", function() { return race; });
+/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "RaceOperator", function() { return RaceOperator; });
+/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "RaceSubscriber", function() { return RaceSubscriber; });
/* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(36);
-/* harmony import */ var _Observable__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(193);
-/* harmony import */ var _Subscriber__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(172);
-/* harmony import */ var _Subscription__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(177);
-/* harmony import */ var _util_ObjectUnsubscribedError__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(266);
-/* harmony import */ var _SubjectSubscription__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(267);
-/* harmony import */ var _internal_symbol_rxSubscriber__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(181);
-/** PURE_IMPORTS_START tslib,_Observable,_Subscriber,_Subscription,_util_ObjectUnsubscribedError,_SubjectSubscription,_internal_symbol_rxSubscriber PURE_IMPORTS_END */
-
-
-
+/* harmony import */ var _util_isArray__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(178);
+/* harmony import */ var _fromArray__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(206);
+/* harmony import */ var _OuterSubscriber__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(229);
+/* harmony import */ var _util_subscribeToResult__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(230);
+/** PURE_IMPORTS_START tslib,_util_isArray,_fromArray,_OuterSubscriber,_util_subscribeToResult PURE_IMPORTS_END */
-var SubjectSubscriber = /*@__PURE__*/ (function (_super) {
- tslib__WEBPACK_IMPORTED_MODULE_0__["__extends"](SubjectSubscriber, _super);
- function SubjectSubscriber(destination) {
- var _this = _super.call(this, destination) || this;
- _this.destination = destination;
- return _this;
- }
- return SubjectSubscriber;
-}(_Subscriber__WEBPACK_IMPORTED_MODULE_2__["Subscriber"]));
-var Subject = /*@__PURE__*/ (function (_super) {
- tslib__WEBPACK_IMPORTED_MODULE_0__["__extends"](Subject, _super);
- function Subject() {
- var _this = _super.call(this) || this;
- _this.observers = [];
- _this.closed = false;
- _this.isStopped = false;
- _this.hasError = false;
- _this.thrownError = null;
- return _this;
+function race() {
+ var observables = [];
+ for (var _i = 0; _i < arguments.length; _i++) {
+ observables[_i] = arguments[_i];
}
- Subject.prototype[_internal_symbol_rxSubscriber__WEBPACK_IMPORTED_MODULE_6__["rxSubscriber"]] = function () {
- return new SubjectSubscriber(this);
- };
- Subject.prototype.lift = function (operator) {
- var subject = new AnonymousSubject(this, this);
- subject.operator = operator;
- return subject;
- };
- Subject.prototype.next = function (value) {
- if (this.closed) {
- throw new _util_ObjectUnsubscribedError__WEBPACK_IMPORTED_MODULE_4__["ObjectUnsubscribedError"]();
- }
- if (!this.isStopped) {
- var observers = this.observers;
- var len = observers.length;
- var copy = observers.slice();
- for (var i = 0; i < len; i++) {
- copy[i].next(value);
- }
- }
- };
- Subject.prototype.error = function (err) {
- if (this.closed) {
- throw new _util_ObjectUnsubscribedError__WEBPACK_IMPORTED_MODULE_4__["ObjectUnsubscribedError"]();
- }
- this.hasError = true;
- this.thrownError = err;
- this.isStopped = true;
- var observers = this.observers;
- var len = observers.length;
- var copy = observers.slice();
- for (var i = 0; i < len; i++) {
- copy[i].error(err);
- }
- this.observers.length = 0;
- };
- Subject.prototype.complete = function () {
- if (this.closed) {
- throw new _util_ObjectUnsubscribedError__WEBPACK_IMPORTED_MODULE_4__["ObjectUnsubscribedError"]();
- }
- this.isStopped = true;
- var observers = this.observers;
- var len = observers.length;
- var copy = observers.slice();
- for (var i = 0; i < len; i++) {
- copy[i].complete();
- }
- this.observers.length = 0;
- };
- Subject.prototype.unsubscribe = function () {
- this.isStopped = true;
- this.closed = true;
- this.observers = null;
- };
- Subject.prototype._trySubscribe = function (subscriber) {
- if (this.closed) {
- throw new _util_ObjectUnsubscribedError__WEBPACK_IMPORTED_MODULE_4__["ObjectUnsubscribedError"]();
- }
- else {
- return _super.prototype._trySubscribe.call(this, subscriber);
- }
- };
- Subject.prototype._subscribe = function (subscriber) {
- if (this.closed) {
- throw new _util_ObjectUnsubscribedError__WEBPACK_IMPORTED_MODULE_4__["ObjectUnsubscribedError"]();
- }
- else if (this.hasError) {
- subscriber.error(this.thrownError);
- return _Subscription__WEBPACK_IMPORTED_MODULE_3__["Subscription"].EMPTY;
- }
- else if (this.isStopped) {
- subscriber.complete();
- return _Subscription__WEBPACK_IMPORTED_MODULE_3__["Subscription"].EMPTY;
+ if (observables.length === 1) {
+ if (Object(_util_isArray__WEBPACK_IMPORTED_MODULE_1__["isArray"])(observables[0])) {
+ observables = observables[0];
}
else {
- this.observers.push(subscriber);
- return new _SubjectSubscription__WEBPACK_IMPORTED_MODULE_5__["SubjectSubscription"](this, subscriber);
+ return observables[0];
}
+ }
+ return Object(_fromArray__WEBPACK_IMPORTED_MODULE_2__["fromArray"])(observables, undefined).lift(new RaceOperator());
+}
+var RaceOperator = /*@__PURE__*/ (function () {
+ function RaceOperator() {
+ }
+ RaceOperator.prototype.call = function (subscriber, source) {
+ return source.subscribe(new RaceSubscriber(subscriber));
};
- Subject.prototype.asObservable = function () {
- var observable = new _Observable__WEBPACK_IMPORTED_MODULE_1__["Observable"]();
- observable.source = this;
- return observable;
- };
- Subject.create = function (destination, source) {
- return new AnonymousSubject(destination, source);
- };
- return Subject;
-}(_Observable__WEBPACK_IMPORTED_MODULE_1__["Observable"]));
+ return RaceOperator;
+}());
-var AnonymousSubject = /*@__PURE__*/ (function (_super) {
- tslib__WEBPACK_IMPORTED_MODULE_0__["__extends"](AnonymousSubject, _super);
- function AnonymousSubject(destination, source) {
- var _this = _super.call(this) || this;
- _this.destination = destination;
- _this.source = source;
+var RaceSubscriber = /*@__PURE__*/ (function (_super) {
+ tslib__WEBPACK_IMPORTED_MODULE_0__["__extends"](RaceSubscriber, _super);
+ function RaceSubscriber(destination) {
+ var _this = _super.call(this, destination) || this;
+ _this.hasFirst = false;
+ _this.observables = [];
+ _this.subscriptions = [];
return _this;
}
- AnonymousSubject.prototype.next = function (value) {
- var destination = this.destination;
- if (destination && destination.next) {
- destination.next(value);
- }
- };
- AnonymousSubject.prototype.error = function (err) {
- var destination = this.destination;
- if (destination && destination.error) {
- this.destination.error(err);
- }
+ RaceSubscriber.prototype._next = function (observable) {
+ this.observables.push(observable);
};
- AnonymousSubject.prototype.complete = function () {
- var destination = this.destination;
- if (destination && destination.complete) {
+ RaceSubscriber.prototype._complete = function () {
+ var observables = this.observables;
+ var len = observables.length;
+ if (len === 0) {
this.destination.complete();
}
- };
- AnonymousSubject.prototype._subscribe = function (subscriber) {
- var source = this.source;
- if (source) {
- return this.source.subscribe(subscriber);
- }
else {
- return _Subscription__WEBPACK_IMPORTED_MODULE_3__["Subscription"].EMPTY;
+ for (var i = 0; i < len && !this.hasFirst; i++) {
+ var observable = observables[i];
+ var subscription = Object(_util_subscribeToResult__WEBPACK_IMPORTED_MODULE_4__["subscribeToResult"])(this, observable, observable, i);
+ if (this.subscriptions) {
+ this.subscriptions.push(subscription);
+ }
+ this.add(subscription);
+ }
+ this.observables = null;
}
};
- return AnonymousSubject;
-}(Subject));
+ RaceSubscriber.prototype.notifyNext = function (outerValue, innerValue, outerIndex, innerIndex, innerSub) {
+ if (!this.hasFirst) {
+ this.hasFirst = true;
+ for (var i = 0; i < this.subscriptions.length; i++) {
+ if (i !== outerIndex) {
+ var subscription = this.subscriptions[i];
+ subscription.unsubscribe();
+ this.remove(subscription);
+ }
+ }
+ this.subscriptions = null;
+ }
+ this.destination.next(innerValue);
+ };
+ return RaceSubscriber;
+}(_OuterSubscriber__WEBPACK_IMPORTED_MODULE_3__["OuterSubscriber"]));
-//# sourceMappingURL=Subject.js.map
+//# sourceMappingURL=race.js.map
/***/ }),
@@ -27306,20 +26954,57 @@ var AnonymousSubject = /*@__PURE__*/ (function (_super) {
"use strict";
__webpack_require__.r(__webpack_exports__);
-/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ObjectUnsubscribedError", function() { return ObjectUnsubscribedError; });
-/** PURE_IMPORTS_START PURE_IMPORTS_END */
-var ObjectUnsubscribedErrorImpl = /*@__PURE__*/ (function () {
- function ObjectUnsubscribedErrorImpl() {
- Error.call(this);
- this.message = 'object unsubscribed';
- this.name = 'ObjectUnsubscribedError';
- return this;
+/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "range", function() { return range; });
+/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "dispatch", function() { return dispatch; });
+/* harmony import */ var _Observable__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(170);
+/** PURE_IMPORTS_START _Observable PURE_IMPORTS_END */
+
+function range(start, count, scheduler) {
+ if (start === void 0) {
+ start = 0;
}
- ObjectUnsubscribedErrorImpl.prototype = /*@__PURE__*/ Object.create(Error.prototype);
- return ObjectUnsubscribedErrorImpl;
-})();
-var ObjectUnsubscribedError = ObjectUnsubscribedErrorImpl;
-//# sourceMappingURL=ObjectUnsubscribedError.js.map
+ return new _Observable__WEBPACK_IMPORTED_MODULE_0__["Observable"](function (subscriber) {
+ if (count === undefined) {
+ count = start;
+ start = 0;
+ }
+ var index = 0;
+ var current = start;
+ if (scheduler) {
+ return scheduler.schedule(dispatch, 0, {
+ index: index, count: count, start: start, subscriber: subscriber
+ });
+ }
+ else {
+ do {
+ if (index++ >= count) {
+ subscriber.complete();
+ break;
+ }
+ subscriber.next(current++);
+ if (subscriber.closed) {
+ break;
+ }
+ } while (true);
+ }
+ return undefined;
+ });
+}
+function dispatch(state) {
+ var start = state.start, index = state.index, count = state.count, subscriber = state.subscriber;
+ if (index >= count) {
+ subscriber.complete();
+ return;
+ }
+ subscriber.next(start);
+ if (subscriber.closed) {
+ return;
+ }
+ state.index = index + 1;
+ state.start = start + 1;
+ this.schedule(state);
+}
+//# sourceMappingURL=range.js.map
/***/ }),
@@ -27328,41 +27013,52 @@ var ObjectUnsubscribedError = ObjectUnsubscribedErrorImpl;
"use strict";
__webpack_require__.r(__webpack_exports__);
-/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "SubjectSubscription", function() { return SubjectSubscription; });
-/* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(36);
-/* harmony import */ var _Subscription__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(177);
-/** PURE_IMPORTS_START tslib,_Subscription PURE_IMPORTS_END */
+/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "timer", function() { return timer; });
+/* harmony import */ var _Observable__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(170);
+/* harmony import */ var _scheduler_async__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(215);
+/* harmony import */ var _util_isNumeric__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(257);
+/* harmony import */ var _util_isScheduler__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(205);
+/** PURE_IMPORTS_START _Observable,_scheduler_async,_util_isNumeric,_util_isScheduler PURE_IMPORTS_END */
-var SubjectSubscription = /*@__PURE__*/ (function (_super) {
- tslib__WEBPACK_IMPORTED_MODULE_0__["__extends"](SubjectSubscription, _super);
- function SubjectSubscription(subject, subscriber) {
- var _this = _super.call(this) || this;
- _this.subject = subject;
- _this.subscriber = subscriber;
- _this.closed = false;
- return _this;
- }
- SubjectSubscription.prototype.unsubscribe = function () {
- if (this.closed) {
- return;
- }
- this.closed = true;
- var subject = this.subject;
- var observers = subject.observers;
- this.subject = null;
- if (!observers || observers.length === 0 || subject.isStopped || subject.closed) {
- return;
- }
- var subscriberIndex = observers.indexOf(this.subscriber);
- if (subscriberIndex !== -1) {
- observers.splice(subscriberIndex, 1);
- }
- };
- return SubjectSubscription;
-}(_Subscription__WEBPACK_IMPORTED_MODULE_1__["Subscription"]));
-//# sourceMappingURL=SubjectSubscription.js.map
+
+function timer(dueTime, periodOrScheduler, scheduler) {
+ if (dueTime === void 0) {
+ dueTime = 0;
+ }
+ var period = -1;
+ if (Object(_util_isNumeric__WEBPACK_IMPORTED_MODULE_2__["isNumeric"])(periodOrScheduler)) {
+ period = Number(periodOrScheduler) < 1 && 1 || Number(periodOrScheduler);
+ }
+ else if (Object(_util_isScheduler__WEBPACK_IMPORTED_MODULE_3__["isScheduler"])(periodOrScheduler)) {
+ scheduler = periodOrScheduler;
+ }
+ if (!Object(_util_isScheduler__WEBPACK_IMPORTED_MODULE_3__["isScheduler"])(scheduler)) {
+ scheduler = _scheduler_async__WEBPACK_IMPORTED_MODULE_1__["async"];
+ }
+ return new _Observable__WEBPACK_IMPORTED_MODULE_0__["Observable"](function (subscriber) {
+ var due = Object(_util_isNumeric__WEBPACK_IMPORTED_MODULE_2__["isNumeric"])(dueTime)
+ ? dueTime
+ : (+dueTime - scheduler.now());
+ return scheduler.schedule(dispatch, due, {
+ index: 0, period: period, subscriber: subscriber
+ });
+ });
+}
+function dispatch(state) {
+ var index = state.index, period = state.period, subscriber = state.subscriber;
+ subscriber.next(index);
+ if (subscriber.closed) {
+ return;
+ }
+ else if (period === -1) {
+ return subscriber.complete();
+ }
+ state.index = index + 1;
+ this.schedule(state, period);
+}
+//# sourceMappingURL=timer.js.map
/***/ }),
@@ -27371,35 +27067,43 @@ var SubjectSubscription = /*@__PURE__*/ (function (_super) {
"use strict";
__webpack_require__.r(__webpack_exports__);
-/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ignoreElements", function() { return ignoreElements; });
-/* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(36);
-/* harmony import */ var _Subscriber__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(172);
-/** PURE_IMPORTS_START tslib,_Subscriber PURE_IMPORTS_END */
+/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "using", function() { return using; });
+/* harmony import */ var _Observable__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(170);
+/* harmony import */ var _from__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(243);
+/* harmony import */ var _empty__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(203);
+/** PURE_IMPORTS_START _Observable,_from,_empty PURE_IMPORTS_END */
-function ignoreElements() {
- return function ignoreElementsOperatorFunction(source) {
- return source.lift(new IgnoreElementsOperator());
- };
+
+function using(resourceFactory, observableFactory) {
+ return new _Observable__WEBPACK_IMPORTED_MODULE_0__["Observable"](function (subscriber) {
+ var resource;
+ try {
+ resource = resourceFactory();
+ }
+ catch (err) {
+ subscriber.error(err);
+ return undefined;
+ }
+ var result;
+ try {
+ result = observableFactory(resource);
+ }
+ catch (err) {
+ subscriber.error(err);
+ return undefined;
+ }
+ var source = result ? Object(_from__WEBPACK_IMPORTED_MODULE_1__["from"])(result) : _empty__WEBPACK_IMPORTED_MODULE_2__["EMPTY"];
+ var subscription = source.subscribe(subscriber);
+ return function () {
+ subscription.unsubscribe();
+ if (resource) {
+ resource.unsubscribe();
+ }
+ };
+ });
}
-var IgnoreElementsOperator = /*@__PURE__*/ (function () {
- function IgnoreElementsOperator() {
- }
- IgnoreElementsOperator.prototype.call = function (subscriber, source) {
- return source.subscribe(new IgnoreElementsSubscriber(subscriber));
- };
- return IgnoreElementsOperator;
-}());
-var IgnoreElementsSubscriber = /*@__PURE__*/ (function (_super) {
- tslib__WEBPACK_IMPORTED_MODULE_0__["__extends"](IgnoreElementsSubscriber, _super);
- function IgnoreElementsSubscriber() {
- return _super !== null && _super.apply(this, arguments) || this;
- }
- IgnoreElementsSubscriber.prototype._next = function (unused) {
- };
- return IgnoreElementsSubscriber;
-}(_Subscriber__WEBPACK_IMPORTED_MODULE_1__["Subscriber"]));
-//# sourceMappingURL=ignoreElements.js.map
+//# sourceMappingURL=using.js.map
/***/ }),
@@ -27408,8946 +27112,9248 @@ var IgnoreElementsSubscriber = /*@__PURE__*/ (function (_super) {
"use strict";
__webpack_require__.r(__webpack_exports__);
-/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "isEmpty", function() { return isEmpty; });
+/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "zip", function() { return zip; });
+/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ZipOperator", function() { return ZipOperator; });
+/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ZipSubscriber", function() { return ZipSubscriber; });
/* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(36);
-/* harmony import */ var _Subscriber__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(172);
-/** PURE_IMPORTS_START tslib,_Subscriber PURE_IMPORTS_END */
+/* harmony import */ var _fromArray__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(206);
+/* harmony import */ var _util_isArray__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(178);
+/* harmony import */ var _Subscriber__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(172);
+/* harmony import */ var _OuterSubscriber__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(229);
+/* harmony import */ var _util_subscribeToResult__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(230);
+/* harmony import */ var _internal_symbol_iterator__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(235);
+/** PURE_IMPORTS_START tslib,_fromArray,_util_isArray,_Subscriber,_OuterSubscriber,_util_subscribeToResult,_.._internal_symbol_iterator PURE_IMPORTS_END */
-function isEmpty() {
- return function (source) { return source.lift(new IsEmptyOperator()); };
+
+
+
+
+
+function zip() {
+ var observables = [];
+ for (var _i = 0; _i < arguments.length; _i++) {
+ observables[_i] = arguments[_i];
+ }
+ var resultSelector = observables[observables.length - 1];
+ if (typeof resultSelector === 'function') {
+ observables.pop();
+ }
+ return Object(_fromArray__WEBPACK_IMPORTED_MODULE_1__["fromArray"])(observables, undefined).lift(new ZipOperator(resultSelector));
}
-var IsEmptyOperator = /*@__PURE__*/ (function () {
- function IsEmptyOperator() {
+var ZipOperator = /*@__PURE__*/ (function () {
+ function ZipOperator(resultSelector) {
+ this.resultSelector = resultSelector;
}
- IsEmptyOperator.prototype.call = function (observer, source) {
- return source.subscribe(new IsEmptySubscriber(observer));
+ ZipOperator.prototype.call = function (subscriber, source) {
+ return source.subscribe(new ZipSubscriber(subscriber, this.resultSelector));
};
- return IsEmptyOperator;
+ return ZipOperator;
}());
-var IsEmptySubscriber = /*@__PURE__*/ (function (_super) {
- tslib__WEBPACK_IMPORTED_MODULE_0__["__extends"](IsEmptySubscriber, _super);
- function IsEmptySubscriber(destination) {
- return _super.call(this, destination) || this;
+
+var ZipSubscriber = /*@__PURE__*/ (function (_super) {
+ tslib__WEBPACK_IMPORTED_MODULE_0__["__extends"](ZipSubscriber, _super);
+ function ZipSubscriber(destination, resultSelector, values) {
+ if (values === void 0) {
+ values = Object.create(null);
+ }
+ var _this = _super.call(this, destination) || this;
+ _this.iterators = [];
+ _this.active = 0;
+ _this.resultSelector = (typeof resultSelector === 'function') ? resultSelector : null;
+ _this.values = values;
+ return _this;
}
- IsEmptySubscriber.prototype.notifyComplete = function (isEmpty) {
- var destination = this.destination;
- destination.next(isEmpty);
- destination.complete();
+ ZipSubscriber.prototype._next = function (value) {
+ var iterators = this.iterators;
+ if (Object(_util_isArray__WEBPACK_IMPORTED_MODULE_2__["isArray"])(value)) {
+ iterators.push(new StaticArrayIterator(value));
+ }
+ else if (typeof value[_internal_symbol_iterator__WEBPACK_IMPORTED_MODULE_6__["iterator"]] === 'function') {
+ iterators.push(new StaticIterator(value[_internal_symbol_iterator__WEBPACK_IMPORTED_MODULE_6__["iterator"]]()));
+ }
+ else {
+ iterators.push(new ZipBufferIterator(this.destination, this, value));
+ }
};
- IsEmptySubscriber.prototype._next = function (value) {
- this.notifyComplete(false);
+ ZipSubscriber.prototype._complete = function () {
+ var iterators = this.iterators;
+ var len = iterators.length;
+ this.unsubscribe();
+ if (len === 0) {
+ this.destination.complete();
+ return;
+ }
+ this.active = len;
+ for (var i = 0; i < len; i++) {
+ var iterator = iterators[i];
+ if (iterator.stillUnsubscribed) {
+ var destination = this.destination;
+ destination.add(iterator.subscribe(iterator, i));
+ }
+ else {
+ this.active--;
+ }
+ }
};
- IsEmptySubscriber.prototype._complete = function () {
- this.notifyComplete(true);
+ ZipSubscriber.prototype.notifyInactive = function () {
+ this.active--;
+ if (this.active === 0) {
+ this.destination.complete();
+ }
};
- return IsEmptySubscriber;
-}(_Subscriber__WEBPACK_IMPORTED_MODULE_1__["Subscriber"]));
-//# sourceMappingURL=isEmpty.js.map
-
-
-/***/ }),
-/* 270 */
-/***/ (function(module, __webpack_exports__, __webpack_require__) {
-
-"use strict";
-__webpack_require__.r(__webpack_exports__);
-/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "last", function() { return last; });
-/* harmony import */ var _util_EmptyError__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(253);
-/* harmony import */ var _filter__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(251);
-/* harmony import */ var _takeLast__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(271);
-/* harmony import */ var _throwIfEmpty__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(252);
-/* harmony import */ var _defaultIfEmpty__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(238);
-/* harmony import */ var _util_identity__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(232);
-/** PURE_IMPORTS_START _util_EmptyError,_filter,_takeLast,_throwIfEmpty,_defaultIfEmpty,_util_identity PURE_IMPORTS_END */
-
-
-
-
-
-
-function last(predicate, defaultValue) {
- var hasDefaultValue = arguments.length >= 2;
- return function (source) { return source.pipe(predicate ? Object(_filter__WEBPACK_IMPORTED_MODULE_1__["filter"])(function (v, i) { return predicate(v, i, source); }) : _util_identity__WEBPACK_IMPORTED_MODULE_5__["identity"], Object(_takeLast__WEBPACK_IMPORTED_MODULE_2__["takeLast"])(1), hasDefaultValue ? Object(_defaultIfEmpty__WEBPACK_IMPORTED_MODULE_4__["defaultIfEmpty"])(defaultValue) : Object(_throwIfEmpty__WEBPACK_IMPORTED_MODULE_3__["throwIfEmpty"])(function () { return new _util_EmptyError__WEBPACK_IMPORTED_MODULE_0__["EmptyError"](); })); };
-}
-//# sourceMappingURL=last.js.map
-
-
-/***/ }),
-/* 271 */
-/***/ (function(module, __webpack_exports__, __webpack_require__) {
-
-"use strict";
-__webpack_require__.r(__webpack_exports__);
-/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "takeLast", function() { return takeLast; });
-/* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(36);
-/* harmony import */ var _Subscriber__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(172);
-/* harmony import */ var _util_ArgumentOutOfRangeError__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(250);
-/* harmony import */ var _observable_empty__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(242);
-/** PURE_IMPORTS_START tslib,_Subscriber,_util_ArgumentOutOfRangeError,_observable_empty PURE_IMPORTS_END */
-
-
-
-
-function takeLast(count) {
- return function takeLastOperatorFunction(source) {
- if (count === 0) {
- return Object(_observable_empty__WEBPACK_IMPORTED_MODULE_3__["empty"])();
+ ZipSubscriber.prototype.checkIterators = function () {
+ var iterators = this.iterators;
+ var len = iterators.length;
+ var destination = this.destination;
+ for (var i = 0; i < len; i++) {
+ var iterator = iterators[i];
+ if (typeof iterator.hasValue === 'function' && !iterator.hasValue()) {
+ return;
+ }
+ }
+ var shouldComplete = false;
+ var args = [];
+ for (var i = 0; i < len; i++) {
+ var iterator = iterators[i];
+ var result = iterator.next();
+ if (iterator.hasCompleted()) {
+ shouldComplete = true;
+ }
+ if (result.done) {
+ destination.complete();
+ return;
+ }
+ args.push(result.value);
+ }
+ if (this.resultSelector) {
+ this._tryresultSelector(args);
}
else {
- return source.lift(new TakeLastOperator(count));
+ destination.next(args);
+ }
+ if (shouldComplete) {
+ destination.complete();
}
};
-}
-var TakeLastOperator = /*@__PURE__*/ (function () {
- function TakeLastOperator(total) {
- this.total = total;
- if (this.total < 0) {
- throw new _util_ArgumentOutOfRangeError__WEBPACK_IMPORTED_MODULE_2__["ArgumentOutOfRangeError"];
+ ZipSubscriber.prototype._tryresultSelector = function (args) {
+ var result;
+ try {
+ result = this.resultSelector.apply(this, args);
+ }
+ catch (err) {
+ this.destination.error(err);
+ return;
}
+ this.destination.next(result);
+ };
+ return ZipSubscriber;
+}(_Subscriber__WEBPACK_IMPORTED_MODULE_3__["Subscriber"]));
+
+var StaticIterator = /*@__PURE__*/ (function () {
+ function StaticIterator(iterator) {
+ this.iterator = iterator;
+ this.nextResult = iterator.next();
}
- TakeLastOperator.prototype.call = function (subscriber, source) {
- return source.subscribe(new TakeLastSubscriber(subscriber, this.total));
+ StaticIterator.prototype.hasValue = function () {
+ return true;
};
- return TakeLastOperator;
+ StaticIterator.prototype.next = function () {
+ var result = this.nextResult;
+ this.nextResult = this.iterator.next();
+ return result;
+ };
+ StaticIterator.prototype.hasCompleted = function () {
+ var nextResult = this.nextResult;
+ return nextResult && nextResult.done;
+ };
+ return StaticIterator;
}());
-var TakeLastSubscriber = /*@__PURE__*/ (function (_super) {
- tslib__WEBPACK_IMPORTED_MODULE_0__["__extends"](TakeLastSubscriber, _super);
- function TakeLastSubscriber(destination, total) {
+var StaticArrayIterator = /*@__PURE__*/ (function () {
+ function StaticArrayIterator(array) {
+ this.array = array;
+ this.index = 0;
+ this.length = 0;
+ this.length = array.length;
+ }
+ StaticArrayIterator.prototype[_internal_symbol_iterator__WEBPACK_IMPORTED_MODULE_6__["iterator"]] = function () {
+ return this;
+ };
+ StaticArrayIterator.prototype.next = function (value) {
+ var i = this.index++;
+ var array = this.array;
+ return i < this.length ? { value: array[i], done: false } : { value: null, done: true };
+ };
+ StaticArrayIterator.prototype.hasValue = function () {
+ return this.array.length > this.index;
+ };
+ StaticArrayIterator.prototype.hasCompleted = function () {
+ return this.array.length === this.index;
+ };
+ return StaticArrayIterator;
+}());
+var ZipBufferIterator = /*@__PURE__*/ (function (_super) {
+ tslib__WEBPACK_IMPORTED_MODULE_0__["__extends"](ZipBufferIterator, _super);
+ function ZipBufferIterator(destination, parent, observable) {
var _this = _super.call(this, destination) || this;
- _this.total = total;
- _this.ring = new Array();
- _this.count = 0;
+ _this.parent = parent;
+ _this.observable = observable;
+ _this.stillUnsubscribed = true;
+ _this.buffer = [];
+ _this.isComplete = false;
return _this;
}
- TakeLastSubscriber.prototype._next = function (value) {
- var ring = this.ring;
- var total = this.total;
- var count = this.count++;
- if (ring.length < total) {
- ring.push(value);
+ ZipBufferIterator.prototype[_internal_symbol_iterator__WEBPACK_IMPORTED_MODULE_6__["iterator"]] = function () {
+ return this;
+ };
+ ZipBufferIterator.prototype.next = function () {
+ var buffer = this.buffer;
+ if (buffer.length === 0 && this.isComplete) {
+ return { value: null, done: true };
}
else {
- var index = count % total;
- ring[index] = value;
+ return { value: buffer.shift(), done: false };
}
};
- TakeLastSubscriber.prototype._complete = function () {
- var destination = this.destination;
- var count = this.count;
- if (count > 0) {
- var total = this.count >= this.total ? this.total : this.count;
- var ring = this.ring;
- for (var i = 0; i < total; i++) {
- var idx = (count++) % total;
- destination.next(ring[idx]);
- }
+ ZipBufferIterator.prototype.hasValue = function () {
+ return this.buffer.length > 0;
+ };
+ ZipBufferIterator.prototype.hasCompleted = function () {
+ return this.buffer.length === 0 && this.isComplete;
+ };
+ ZipBufferIterator.prototype.notifyComplete = function () {
+ if (this.buffer.length > 0) {
+ this.isComplete = true;
+ this.parent.notifyInactive();
+ }
+ else {
+ this.destination.complete();
}
- destination.complete();
};
- return TakeLastSubscriber;
-}(_Subscriber__WEBPACK_IMPORTED_MODULE_1__["Subscriber"]));
-//# sourceMappingURL=takeLast.js.map
+ ZipBufferIterator.prototype.notifyNext = function (outerValue, innerValue, outerIndex, innerIndex, innerSub) {
+ this.buffer.push(innerValue);
+ this.parent.checkIterators();
+ };
+ ZipBufferIterator.prototype.subscribe = function (value, index) {
+ return Object(_util_subscribeToResult__WEBPACK_IMPORTED_MODULE_5__["subscribeToResult"])(this, this.observable, this, index);
+ };
+ return ZipBufferIterator;
+}(_OuterSubscriber__WEBPACK_IMPORTED_MODULE_4__["OuterSubscriber"]));
+//# sourceMappingURL=zip.js.map
/***/ }),
-/* 272 */
+/* 270 */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
"use strict";
__webpack_require__.r(__webpack_exports__);
-/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "mapTo", function() { return mapTo; });
-/* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(36);
-/* harmony import */ var _Subscriber__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(172);
-/** PURE_IMPORTS_START tslib,_Subscriber PURE_IMPORTS_END */
+/* harmony import */ var _internal_operators_audit__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(271);
+/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "audit", function() { return _internal_operators_audit__WEBPACK_IMPORTED_MODULE_0__["audit"]; });
+
+/* harmony import */ var _internal_operators_auditTime__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(272);
+/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "auditTime", function() { return _internal_operators_auditTime__WEBPACK_IMPORTED_MODULE_1__["auditTime"]; });
+
+/* harmony import */ var _internal_operators_buffer__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(273);
+/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "buffer", function() { return _internal_operators_buffer__WEBPACK_IMPORTED_MODULE_2__["buffer"]; });
+
+/* harmony import */ var _internal_operators_bufferCount__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(274);
+/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "bufferCount", function() { return _internal_operators_bufferCount__WEBPACK_IMPORTED_MODULE_3__["bufferCount"]; });
+
+/* harmony import */ var _internal_operators_bufferTime__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(275);
+/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "bufferTime", function() { return _internal_operators_bufferTime__WEBPACK_IMPORTED_MODULE_4__["bufferTime"]; });
+
+/* harmony import */ var _internal_operators_bufferToggle__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(276);
+/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "bufferToggle", function() { return _internal_operators_bufferToggle__WEBPACK_IMPORTED_MODULE_5__["bufferToggle"]; });
+
+/* harmony import */ var _internal_operators_bufferWhen__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(277);
+/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "bufferWhen", function() { return _internal_operators_bufferWhen__WEBPACK_IMPORTED_MODULE_6__["bufferWhen"]; });
+
+/* harmony import */ var _internal_operators_catchError__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(278);
+/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "catchError", function() { return _internal_operators_catchError__WEBPACK_IMPORTED_MODULE_7__["catchError"]; });
+
+/* harmony import */ var _internal_operators_combineAll__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(279);
+/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "combineAll", function() { return _internal_operators_combineAll__WEBPACK_IMPORTED_MODULE_8__["combineAll"]; });
+
+/* harmony import */ var _internal_operators_combineLatest__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(280);
+/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "combineLatest", function() { return _internal_operators_combineLatest__WEBPACK_IMPORTED_MODULE_9__["combineLatest"]; });
+
+/* harmony import */ var _internal_operators_concat__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(281);
+/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "concat", function() { return _internal_operators_concat__WEBPACK_IMPORTED_MODULE_10__["concat"]; });
+
+/* harmony import */ var _internal_operators_concatAll__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(240);
+/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "concatAll", function() { return _internal_operators_concatAll__WEBPACK_IMPORTED_MODULE_11__["concatAll"]; });
+
+/* harmony import */ var _internal_operators_concatMap__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(282);
+/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "concatMap", function() { return _internal_operators_concatMap__WEBPACK_IMPORTED_MODULE_12__["concatMap"]; });
+
+/* harmony import */ var _internal_operators_concatMapTo__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(283);
+/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "concatMapTo", function() { return _internal_operators_concatMapTo__WEBPACK_IMPORTED_MODULE_13__["concatMapTo"]; });
+
+/* harmony import */ var _internal_operators_count__WEBPACK_IMPORTED_MODULE_14__ = __webpack_require__(284);
+/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "count", function() { return _internal_operators_count__WEBPACK_IMPORTED_MODULE_14__["count"]; });
+
+/* harmony import */ var _internal_operators_debounce__WEBPACK_IMPORTED_MODULE_15__ = __webpack_require__(285);
+/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "debounce", function() { return _internal_operators_debounce__WEBPACK_IMPORTED_MODULE_15__["debounce"]; });
+
+/* harmony import */ var _internal_operators_debounceTime__WEBPACK_IMPORTED_MODULE_16__ = __webpack_require__(286);
+/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "debounceTime", function() { return _internal_operators_debounceTime__WEBPACK_IMPORTED_MODULE_16__["debounceTime"]; });
+
+/* harmony import */ var _internal_operators_defaultIfEmpty__WEBPACK_IMPORTED_MODULE_17__ = __webpack_require__(287);
+/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "defaultIfEmpty", function() { return _internal_operators_defaultIfEmpty__WEBPACK_IMPORTED_MODULE_17__["defaultIfEmpty"]; });
+
+/* harmony import */ var _internal_operators_delay__WEBPACK_IMPORTED_MODULE_18__ = __webpack_require__(288);
+/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "delay", function() { return _internal_operators_delay__WEBPACK_IMPORTED_MODULE_18__["delay"]; });
+
+/* harmony import */ var _internal_operators_delayWhen__WEBPACK_IMPORTED_MODULE_19__ = __webpack_require__(290);
+/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "delayWhen", function() { return _internal_operators_delayWhen__WEBPACK_IMPORTED_MODULE_19__["delayWhen"]; });
+
+/* harmony import */ var _internal_operators_dematerialize__WEBPACK_IMPORTED_MODULE_20__ = __webpack_require__(291);
+/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "dematerialize", function() { return _internal_operators_dematerialize__WEBPACK_IMPORTED_MODULE_20__["dematerialize"]; });
+
+/* harmony import */ var _internal_operators_distinct__WEBPACK_IMPORTED_MODULE_21__ = __webpack_require__(292);
+/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "distinct", function() { return _internal_operators_distinct__WEBPACK_IMPORTED_MODULE_21__["distinct"]; });
+
+/* harmony import */ var _internal_operators_distinctUntilChanged__WEBPACK_IMPORTED_MODULE_22__ = __webpack_require__(293);
+/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "distinctUntilChanged", function() { return _internal_operators_distinctUntilChanged__WEBPACK_IMPORTED_MODULE_22__["distinctUntilChanged"]; });
+
+/* harmony import */ var _internal_operators_distinctUntilKeyChanged__WEBPACK_IMPORTED_MODULE_23__ = __webpack_require__(294);
+/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "distinctUntilKeyChanged", function() { return _internal_operators_distinctUntilKeyChanged__WEBPACK_IMPORTED_MODULE_23__["distinctUntilKeyChanged"]; });
+
+/* harmony import */ var _internal_operators_elementAt__WEBPACK_IMPORTED_MODULE_24__ = __webpack_require__(295);
+/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "elementAt", function() { return _internal_operators_elementAt__WEBPACK_IMPORTED_MODULE_24__["elementAt"]; });
+
+/* harmony import */ var _internal_operators_endWith__WEBPACK_IMPORTED_MODULE_25__ = __webpack_require__(298);
+/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "endWith", function() { return _internal_operators_endWith__WEBPACK_IMPORTED_MODULE_25__["endWith"]; });
+
+/* harmony import */ var _internal_operators_every__WEBPACK_IMPORTED_MODULE_26__ = __webpack_require__(299);
+/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "every", function() { return _internal_operators_every__WEBPACK_IMPORTED_MODULE_26__["every"]; });
+
+/* harmony import */ var _internal_operators_exhaust__WEBPACK_IMPORTED_MODULE_27__ = __webpack_require__(300);
+/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "exhaust", function() { return _internal_operators_exhaust__WEBPACK_IMPORTED_MODULE_27__["exhaust"]; });
+
+/* harmony import */ var _internal_operators_exhaustMap__WEBPACK_IMPORTED_MODULE_28__ = __webpack_require__(301);
+/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "exhaustMap", function() { return _internal_operators_exhaustMap__WEBPACK_IMPORTED_MODULE_28__["exhaustMap"]; });
+
+/* harmony import */ var _internal_operators_expand__WEBPACK_IMPORTED_MODULE_29__ = __webpack_require__(302);
+/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "expand", function() { return _internal_operators_expand__WEBPACK_IMPORTED_MODULE_29__["expand"]; });
+
+/* harmony import */ var _internal_operators_filter__WEBPACK_IMPORTED_MODULE_30__ = __webpack_require__(264);
+/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "filter", function() { return _internal_operators_filter__WEBPACK_IMPORTED_MODULE_30__["filter"]; });
+
+/* harmony import */ var _internal_operators_finalize__WEBPACK_IMPORTED_MODULE_31__ = __webpack_require__(303);
+/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "finalize", function() { return _internal_operators_finalize__WEBPACK_IMPORTED_MODULE_31__["finalize"]; });
+
+/* harmony import */ var _internal_operators_find__WEBPACK_IMPORTED_MODULE_32__ = __webpack_require__(304);
+/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "find", function() { return _internal_operators_find__WEBPACK_IMPORTED_MODULE_32__["find"]; });
+
+/* harmony import */ var _internal_operators_findIndex__WEBPACK_IMPORTED_MODULE_33__ = __webpack_require__(305);
+/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "findIndex", function() { return _internal_operators_findIndex__WEBPACK_IMPORTED_MODULE_33__["findIndex"]; });
+
+/* harmony import */ var _internal_operators_first__WEBPACK_IMPORTED_MODULE_34__ = __webpack_require__(306);
+/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "first", function() { return _internal_operators_first__WEBPACK_IMPORTED_MODULE_34__["first"]; });
+
+/* harmony import */ var _internal_operators_groupBy__WEBPACK_IMPORTED_MODULE_35__ = __webpack_require__(191);
+/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "groupBy", function() { return _internal_operators_groupBy__WEBPACK_IMPORTED_MODULE_35__["groupBy"]; });
+
+/* harmony import */ var _internal_operators_ignoreElements__WEBPACK_IMPORTED_MODULE_36__ = __webpack_require__(307);
+/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "ignoreElements", function() { return _internal_operators_ignoreElements__WEBPACK_IMPORTED_MODULE_36__["ignoreElements"]; });
+
+/* harmony import */ var _internal_operators_isEmpty__WEBPACK_IMPORTED_MODULE_37__ = __webpack_require__(308);
+/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "isEmpty", function() { return _internal_operators_isEmpty__WEBPACK_IMPORTED_MODULE_37__["isEmpty"]; });
+
+/* harmony import */ var _internal_operators_last__WEBPACK_IMPORTED_MODULE_38__ = __webpack_require__(309);
+/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "last", function() { return _internal_operators_last__WEBPACK_IMPORTED_MODULE_38__["last"]; });
+
+/* harmony import */ var _internal_operators_map__WEBPACK_IMPORTED_MODULE_39__ = __webpack_require__(226);
+/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "map", function() { return _internal_operators_map__WEBPACK_IMPORTED_MODULE_39__["map"]; });
+
+/* harmony import */ var _internal_operators_mapTo__WEBPACK_IMPORTED_MODULE_40__ = __webpack_require__(311);
+/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "mapTo", function() { return _internal_operators_mapTo__WEBPACK_IMPORTED_MODULE_40__["mapTo"]; });
+
+/* harmony import */ var _internal_operators_materialize__WEBPACK_IMPORTED_MODULE_41__ = __webpack_require__(312);
+/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "materialize", function() { return _internal_operators_materialize__WEBPACK_IMPORTED_MODULE_41__["materialize"]; });
+
+/* harmony import */ var _internal_operators_max__WEBPACK_IMPORTED_MODULE_42__ = __webpack_require__(313);
+/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "max", function() { return _internal_operators_max__WEBPACK_IMPORTED_MODULE_42__["max"]; });
+
+/* harmony import */ var _internal_operators_merge__WEBPACK_IMPORTED_MODULE_43__ = __webpack_require__(316);
+/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "merge", function() { return _internal_operators_merge__WEBPACK_IMPORTED_MODULE_43__["merge"]; });
+
+/* harmony import */ var _internal_operators_mergeAll__WEBPACK_IMPORTED_MODULE_44__ = __webpack_require__(241);
+/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "mergeAll", function() { return _internal_operators_mergeAll__WEBPACK_IMPORTED_MODULE_44__["mergeAll"]; });
+
+/* harmony import */ var _internal_operators_mergeMap__WEBPACK_IMPORTED_MODULE_45__ = __webpack_require__(242);
+/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "mergeMap", function() { return _internal_operators_mergeMap__WEBPACK_IMPORTED_MODULE_45__["mergeMap"]; });
+
+/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "flatMap", function() { return _internal_operators_mergeMap__WEBPACK_IMPORTED_MODULE_45__["mergeMap"]; });
+
+/* harmony import */ var _internal_operators_mergeMapTo__WEBPACK_IMPORTED_MODULE_46__ = __webpack_require__(317);
+/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "mergeMapTo", function() { return _internal_operators_mergeMapTo__WEBPACK_IMPORTED_MODULE_46__["mergeMapTo"]; });
+
+/* harmony import */ var _internal_operators_mergeScan__WEBPACK_IMPORTED_MODULE_47__ = __webpack_require__(318);
+/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "mergeScan", function() { return _internal_operators_mergeScan__WEBPACK_IMPORTED_MODULE_47__["mergeScan"]; });
+
+/* harmony import */ var _internal_operators_min__WEBPACK_IMPORTED_MODULE_48__ = __webpack_require__(319);
+/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "min", function() { return _internal_operators_min__WEBPACK_IMPORTED_MODULE_48__["min"]; });
+
+/* harmony import */ var _internal_operators_multicast__WEBPACK_IMPORTED_MODULE_49__ = __webpack_require__(320);
+/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "multicast", function() { return _internal_operators_multicast__WEBPACK_IMPORTED_MODULE_49__["multicast"]; });
+
+/* harmony import */ var _internal_operators_observeOn__WEBPACK_IMPORTED_MODULE_50__ = __webpack_require__(201);
+/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "observeOn", function() { return _internal_operators_observeOn__WEBPACK_IMPORTED_MODULE_50__["observeOn"]; });
+
+/* harmony import */ var _internal_operators_onErrorResumeNext__WEBPACK_IMPORTED_MODULE_51__ = __webpack_require__(321);
+/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "onErrorResumeNext", function() { return _internal_operators_onErrorResumeNext__WEBPACK_IMPORTED_MODULE_51__["onErrorResumeNext"]; });
+
+/* harmony import */ var _internal_operators_pairwise__WEBPACK_IMPORTED_MODULE_52__ = __webpack_require__(322);
+/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "pairwise", function() { return _internal_operators_pairwise__WEBPACK_IMPORTED_MODULE_52__["pairwise"]; });
+
+/* harmony import */ var _internal_operators_partition__WEBPACK_IMPORTED_MODULE_53__ = __webpack_require__(323);
+/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "partition", function() { return _internal_operators_partition__WEBPACK_IMPORTED_MODULE_53__["partition"]; });
+
+/* harmony import */ var _internal_operators_pluck__WEBPACK_IMPORTED_MODULE_54__ = __webpack_require__(324);
+/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "pluck", function() { return _internal_operators_pluck__WEBPACK_IMPORTED_MODULE_54__["pluck"]; });
+
+/* harmony import */ var _internal_operators_publish__WEBPACK_IMPORTED_MODULE_55__ = __webpack_require__(325);
+/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "publish", function() { return _internal_operators_publish__WEBPACK_IMPORTED_MODULE_55__["publish"]; });
+
+/* harmony import */ var _internal_operators_publishBehavior__WEBPACK_IMPORTED_MODULE_56__ = __webpack_require__(326);
+/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "publishBehavior", function() { return _internal_operators_publishBehavior__WEBPACK_IMPORTED_MODULE_56__["publishBehavior"]; });
+
+/* harmony import */ var _internal_operators_publishLast__WEBPACK_IMPORTED_MODULE_57__ = __webpack_require__(327);
+/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "publishLast", function() { return _internal_operators_publishLast__WEBPACK_IMPORTED_MODULE_57__["publishLast"]; });
+
+/* harmony import */ var _internal_operators_publishReplay__WEBPACK_IMPORTED_MODULE_58__ = __webpack_require__(328);
+/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "publishReplay", function() { return _internal_operators_publishReplay__WEBPACK_IMPORTED_MODULE_58__["publishReplay"]; });
+
+/* harmony import */ var _internal_operators_race__WEBPACK_IMPORTED_MODULE_59__ = __webpack_require__(329);
+/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "race", function() { return _internal_operators_race__WEBPACK_IMPORTED_MODULE_59__["race"]; });
+
+/* harmony import */ var _internal_operators_reduce__WEBPACK_IMPORTED_MODULE_60__ = __webpack_require__(314);
+/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "reduce", function() { return _internal_operators_reduce__WEBPACK_IMPORTED_MODULE_60__["reduce"]; });
+
+/* harmony import */ var _internal_operators_repeat__WEBPACK_IMPORTED_MODULE_61__ = __webpack_require__(330);
+/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "repeat", function() { return _internal_operators_repeat__WEBPACK_IMPORTED_MODULE_61__["repeat"]; });
+
+/* harmony import */ var _internal_operators_repeatWhen__WEBPACK_IMPORTED_MODULE_62__ = __webpack_require__(331);
+/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "repeatWhen", function() { return _internal_operators_repeatWhen__WEBPACK_IMPORTED_MODULE_62__["repeatWhen"]; });
+
+/* harmony import */ var _internal_operators_retry__WEBPACK_IMPORTED_MODULE_63__ = __webpack_require__(332);
+/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "retry", function() { return _internal_operators_retry__WEBPACK_IMPORTED_MODULE_63__["retry"]; });
+
+/* harmony import */ var _internal_operators_retryWhen__WEBPACK_IMPORTED_MODULE_64__ = __webpack_require__(333);
+/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "retryWhen", function() { return _internal_operators_retryWhen__WEBPACK_IMPORTED_MODULE_64__["retryWhen"]; });
+
+/* harmony import */ var _internal_operators_refCount__WEBPACK_IMPORTED_MODULE_65__ = __webpack_require__(190);
+/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "refCount", function() { return _internal_operators_refCount__WEBPACK_IMPORTED_MODULE_65__["refCount"]; });
+
+/* harmony import */ var _internal_operators_sample__WEBPACK_IMPORTED_MODULE_66__ = __webpack_require__(334);
+/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "sample", function() { return _internal_operators_sample__WEBPACK_IMPORTED_MODULE_66__["sample"]; });
+
+/* harmony import */ var _internal_operators_sampleTime__WEBPACK_IMPORTED_MODULE_67__ = __webpack_require__(335);
+/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "sampleTime", function() { return _internal_operators_sampleTime__WEBPACK_IMPORTED_MODULE_67__["sampleTime"]; });
+
+/* harmony import */ var _internal_operators_scan__WEBPACK_IMPORTED_MODULE_68__ = __webpack_require__(315);
+/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "scan", function() { return _internal_operators_scan__WEBPACK_IMPORTED_MODULE_68__["scan"]; });
+
+/* harmony import */ var _internal_operators_sequenceEqual__WEBPACK_IMPORTED_MODULE_69__ = __webpack_require__(336);
+/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "sequenceEqual", function() { return _internal_operators_sequenceEqual__WEBPACK_IMPORTED_MODULE_69__["sequenceEqual"]; });
+
+/* harmony import */ var _internal_operators_share__WEBPACK_IMPORTED_MODULE_70__ = __webpack_require__(337);
+/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "share", function() { return _internal_operators_share__WEBPACK_IMPORTED_MODULE_70__["share"]; });
+
+/* harmony import */ var _internal_operators_shareReplay__WEBPACK_IMPORTED_MODULE_71__ = __webpack_require__(338);
+/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "shareReplay", function() { return _internal_operators_shareReplay__WEBPACK_IMPORTED_MODULE_71__["shareReplay"]; });
+
+/* harmony import */ var _internal_operators_single__WEBPACK_IMPORTED_MODULE_72__ = __webpack_require__(339);
+/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "single", function() { return _internal_operators_single__WEBPACK_IMPORTED_MODULE_72__["single"]; });
+
+/* harmony import */ var _internal_operators_skip__WEBPACK_IMPORTED_MODULE_73__ = __webpack_require__(340);
+/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "skip", function() { return _internal_operators_skip__WEBPACK_IMPORTED_MODULE_73__["skip"]; });
+
+/* harmony import */ var _internal_operators_skipLast__WEBPACK_IMPORTED_MODULE_74__ = __webpack_require__(341);
+/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "skipLast", function() { return _internal_operators_skipLast__WEBPACK_IMPORTED_MODULE_74__["skipLast"]; });
+
+/* harmony import */ var _internal_operators_skipUntil__WEBPACK_IMPORTED_MODULE_75__ = __webpack_require__(342);
+/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "skipUntil", function() { return _internal_operators_skipUntil__WEBPACK_IMPORTED_MODULE_75__["skipUntil"]; });
+
+/* harmony import */ var _internal_operators_skipWhile__WEBPACK_IMPORTED_MODULE_76__ = __webpack_require__(343);
+/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "skipWhile", function() { return _internal_operators_skipWhile__WEBPACK_IMPORTED_MODULE_76__["skipWhile"]; });
+
+/* harmony import */ var _internal_operators_startWith__WEBPACK_IMPORTED_MODULE_77__ = __webpack_require__(344);
+/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "startWith", function() { return _internal_operators_startWith__WEBPACK_IMPORTED_MODULE_77__["startWith"]; });
+
+/* harmony import */ var _internal_operators_subscribeOn__WEBPACK_IMPORTED_MODULE_78__ = __webpack_require__(345);
+/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "subscribeOn", function() { return _internal_operators_subscribeOn__WEBPACK_IMPORTED_MODULE_78__["subscribeOn"]; });
+
+/* harmony import */ var _internal_operators_switchAll__WEBPACK_IMPORTED_MODULE_79__ = __webpack_require__(347);
+/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "switchAll", function() { return _internal_operators_switchAll__WEBPACK_IMPORTED_MODULE_79__["switchAll"]; });
+
+/* harmony import */ var _internal_operators_switchMap__WEBPACK_IMPORTED_MODULE_80__ = __webpack_require__(348);
+/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "switchMap", function() { return _internal_operators_switchMap__WEBPACK_IMPORTED_MODULE_80__["switchMap"]; });
+
+/* harmony import */ var _internal_operators_switchMapTo__WEBPACK_IMPORTED_MODULE_81__ = __webpack_require__(349);
+/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "switchMapTo", function() { return _internal_operators_switchMapTo__WEBPACK_IMPORTED_MODULE_81__["switchMapTo"]; });
+
+/* harmony import */ var _internal_operators_take__WEBPACK_IMPORTED_MODULE_82__ = __webpack_require__(297);
+/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "take", function() { return _internal_operators_take__WEBPACK_IMPORTED_MODULE_82__["take"]; });
+
+/* harmony import */ var _internal_operators_takeLast__WEBPACK_IMPORTED_MODULE_83__ = __webpack_require__(310);
+/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "takeLast", function() { return _internal_operators_takeLast__WEBPACK_IMPORTED_MODULE_83__["takeLast"]; });
+
+/* harmony import */ var _internal_operators_takeUntil__WEBPACK_IMPORTED_MODULE_84__ = __webpack_require__(350);
+/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "takeUntil", function() { return _internal_operators_takeUntil__WEBPACK_IMPORTED_MODULE_84__["takeUntil"]; });
+
+/* harmony import */ var _internal_operators_takeWhile__WEBPACK_IMPORTED_MODULE_85__ = __webpack_require__(351);
+/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "takeWhile", function() { return _internal_operators_takeWhile__WEBPACK_IMPORTED_MODULE_85__["takeWhile"]; });
+
+/* harmony import */ var _internal_operators_tap__WEBPACK_IMPORTED_MODULE_86__ = __webpack_require__(352);
+/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "tap", function() { return _internal_operators_tap__WEBPACK_IMPORTED_MODULE_86__["tap"]; });
+
+/* harmony import */ var _internal_operators_throttle__WEBPACK_IMPORTED_MODULE_87__ = __webpack_require__(353);
+/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "throttle", function() { return _internal_operators_throttle__WEBPACK_IMPORTED_MODULE_87__["throttle"]; });
+
+/* harmony import */ var _internal_operators_throttleTime__WEBPACK_IMPORTED_MODULE_88__ = __webpack_require__(354);
+/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "throttleTime", function() { return _internal_operators_throttleTime__WEBPACK_IMPORTED_MODULE_88__["throttleTime"]; });
+
+/* harmony import */ var _internal_operators_throwIfEmpty__WEBPACK_IMPORTED_MODULE_89__ = __webpack_require__(296);
+/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "throwIfEmpty", function() { return _internal_operators_throwIfEmpty__WEBPACK_IMPORTED_MODULE_89__["throwIfEmpty"]; });
+
+/* harmony import */ var _internal_operators_timeInterval__WEBPACK_IMPORTED_MODULE_90__ = __webpack_require__(355);
+/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "timeInterval", function() { return _internal_operators_timeInterval__WEBPACK_IMPORTED_MODULE_90__["timeInterval"]; });
+
+/* harmony import */ var _internal_operators_timeout__WEBPACK_IMPORTED_MODULE_91__ = __webpack_require__(356);
+/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "timeout", function() { return _internal_operators_timeout__WEBPACK_IMPORTED_MODULE_91__["timeout"]; });
+
+/* harmony import */ var _internal_operators_timeoutWith__WEBPACK_IMPORTED_MODULE_92__ = __webpack_require__(357);
+/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "timeoutWith", function() { return _internal_operators_timeoutWith__WEBPACK_IMPORTED_MODULE_92__["timeoutWith"]; });
+
+/* harmony import */ var _internal_operators_timestamp__WEBPACK_IMPORTED_MODULE_93__ = __webpack_require__(358);
+/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "timestamp", function() { return _internal_operators_timestamp__WEBPACK_IMPORTED_MODULE_93__["timestamp"]; });
+
+/* harmony import */ var _internal_operators_toArray__WEBPACK_IMPORTED_MODULE_94__ = __webpack_require__(359);
+/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "toArray", function() { return _internal_operators_toArray__WEBPACK_IMPORTED_MODULE_94__["toArray"]; });
+
+/* harmony import */ var _internal_operators_window__WEBPACK_IMPORTED_MODULE_95__ = __webpack_require__(360);
+/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "window", function() { return _internal_operators_window__WEBPACK_IMPORTED_MODULE_95__["window"]; });
+
+/* harmony import */ var _internal_operators_windowCount__WEBPACK_IMPORTED_MODULE_96__ = __webpack_require__(361);
+/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "windowCount", function() { return _internal_operators_windowCount__WEBPACK_IMPORTED_MODULE_96__["windowCount"]; });
+
+/* harmony import */ var _internal_operators_windowTime__WEBPACK_IMPORTED_MODULE_97__ = __webpack_require__(362);
+/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "windowTime", function() { return _internal_operators_windowTime__WEBPACK_IMPORTED_MODULE_97__["windowTime"]; });
+
+/* harmony import */ var _internal_operators_windowToggle__WEBPACK_IMPORTED_MODULE_98__ = __webpack_require__(363);
+/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "windowToggle", function() { return _internal_operators_windowToggle__WEBPACK_IMPORTED_MODULE_98__["windowToggle"]; });
+
+/* harmony import */ var _internal_operators_windowWhen__WEBPACK_IMPORTED_MODULE_99__ = __webpack_require__(364);
+/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "windowWhen", function() { return _internal_operators_windowWhen__WEBPACK_IMPORTED_MODULE_99__["windowWhen"]; });
+
+/* harmony import */ var _internal_operators_withLatestFrom__WEBPACK_IMPORTED_MODULE_100__ = __webpack_require__(365);
+/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "withLatestFrom", function() { return _internal_operators_withLatestFrom__WEBPACK_IMPORTED_MODULE_100__["withLatestFrom"]; });
+
+/* harmony import */ var _internal_operators_zip__WEBPACK_IMPORTED_MODULE_101__ = __webpack_require__(366);
+/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "zip", function() { return _internal_operators_zip__WEBPACK_IMPORTED_MODULE_101__["zip"]; });
+
+/* harmony import */ var _internal_operators_zipAll__WEBPACK_IMPORTED_MODULE_102__ = __webpack_require__(367);
+/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "zipAll", function() { return _internal_operators_zipAll__WEBPACK_IMPORTED_MODULE_102__["zipAll"]; });
+
+/** PURE_IMPORTS_START PURE_IMPORTS_END */
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
-function mapTo(value) {
- return function (source) { return source.lift(new MapToOperator(value)); };
-}
-var MapToOperator = /*@__PURE__*/ (function () {
- function MapToOperator(value) {
- this.value = value;
- }
- MapToOperator.prototype.call = function (subscriber, source) {
- return source.subscribe(new MapToSubscriber(subscriber, this.value));
- };
- return MapToOperator;
-}());
-var MapToSubscriber = /*@__PURE__*/ (function (_super) {
- tslib__WEBPACK_IMPORTED_MODULE_0__["__extends"](MapToSubscriber, _super);
- function MapToSubscriber(destination, value) {
- var _this = _super.call(this, destination) || this;
- _this.value = value;
- return _this;
- }
- MapToSubscriber.prototype._next = function (x) {
- this.destination.next(this.value);
- };
- return MapToSubscriber;
-}(_Subscriber__WEBPACK_IMPORTED_MODULE_1__["Subscriber"]));
-//# sourceMappingURL=mapTo.js.map
-/***/ }),
-/* 273 */
-/***/ (function(module, __webpack_exports__, __webpack_require__) {
-"use strict";
-__webpack_require__.r(__webpack_exports__);
-/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "materialize", function() { return materialize; });
-/* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(36);
-/* harmony import */ var _Subscriber__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(172);
-/* harmony import */ var _Notification__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(241);
-/** PURE_IMPORTS_START tslib,_Subscriber,_Notification PURE_IMPORTS_END */
-function materialize() {
- return function materializeOperatorFunction(source) {
- return source.lift(new MaterializeOperator());
- };
-}
-var MaterializeOperator = /*@__PURE__*/ (function () {
- function MaterializeOperator() {
- }
- MaterializeOperator.prototype.call = function (subscriber, source) {
- return source.subscribe(new MaterializeSubscriber(subscriber));
- };
- return MaterializeOperator;
-}());
-var MaterializeSubscriber = /*@__PURE__*/ (function (_super) {
- tslib__WEBPACK_IMPORTED_MODULE_0__["__extends"](MaterializeSubscriber, _super);
- function MaterializeSubscriber(destination) {
- return _super.call(this, destination) || this;
- }
- MaterializeSubscriber.prototype._next = function (value) {
- this.destination.next(_Notification__WEBPACK_IMPORTED_MODULE_2__["Notification"].createNext(value));
- };
- MaterializeSubscriber.prototype._error = function (err) {
- var destination = this.destination;
- destination.next(_Notification__WEBPACK_IMPORTED_MODULE_2__["Notification"].createError(err));
- destination.complete();
- };
- MaterializeSubscriber.prototype._complete = function () {
- var destination = this.destination;
- destination.next(_Notification__WEBPACK_IMPORTED_MODULE_2__["Notification"].createComplete());
- destination.complete();
- };
- return MaterializeSubscriber;
-}(_Subscriber__WEBPACK_IMPORTED_MODULE_1__["Subscriber"]));
-//# sourceMappingURL=materialize.js.map
-/***/ }),
-/* 274 */
-/***/ (function(module, __webpack_exports__, __webpack_require__) {
-"use strict";
-__webpack_require__.r(__webpack_exports__);
-/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "max", function() { return max; });
-/* harmony import */ var _reduce__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(275);
-/** PURE_IMPORTS_START _reduce PURE_IMPORTS_END */
-function max(comparer) {
- var max = (typeof comparer === 'function')
- ? function (x, y) { return comparer(x, y) > 0 ? x : y; }
- : function (x, y) { return x > y ? x : y; };
- return Object(_reduce__WEBPACK_IMPORTED_MODULE_0__["reduce"])(max);
-}
-//# sourceMappingURL=max.js.map
-/***/ }),
-/* 275 */
-/***/ (function(module, __webpack_exports__, __webpack_require__) {
-"use strict";
-__webpack_require__.r(__webpack_exports__);
-/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "reduce", function() { return reduce; });
-/* harmony import */ var _scan__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(276);
-/* harmony import */ var _takeLast__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(271);
-/* harmony import */ var _defaultIfEmpty__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(238);
-/* harmony import */ var _util_pipe__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(196);
-/** PURE_IMPORTS_START _scan,_takeLast,_defaultIfEmpty,_util_pipe PURE_IMPORTS_END */
-function reduce(accumulator, seed) {
- if (arguments.length >= 2) {
- return function reduceOperatorFunctionWithSeed(source) {
- return Object(_util_pipe__WEBPACK_IMPORTED_MODULE_3__["pipe"])(Object(_scan__WEBPACK_IMPORTED_MODULE_0__["scan"])(accumulator, seed), Object(_takeLast__WEBPACK_IMPORTED_MODULE_1__["takeLast"])(1), Object(_defaultIfEmpty__WEBPACK_IMPORTED_MODULE_2__["defaultIfEmpty"])(seed))(source);
- };
- }
- return function reduceOperatorFunction(source) {
- return Object(_util_pipe__WEBPACK_IMPORTED_MODULE_3__["pipe"])(Object(_scan__WEBPACK_IMPORTED_MODULE_0__["scan"])(function (acc, value, index) { return accumulator(acc, value, index + 1); }), Object(_takeLast__WEBPACK_IMPORTED_MODULE_1__["takeLast"])(1))(source);
- };
-}
-//# sourceMappingURL=reduce.js.map
-/***/ }),
-/* 276 */
-/***/ (function(module, __webpack_exports__, __webpack_require__) {
-"use strict";
-__webpack_require__.r(__webpack_exports__);
-/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "scan", function() { return scan; });
-/* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(36);
-/* harmony import */ var _Subscriber__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(172);
-/** PURE_IMPORTS_START tslib,_Subscriber PURE_IMPORTS_END */
-function scan(accumulator, seed) {
- var hasSeed = false;
- if (arguments.length >= 2) {
- hasSeed = true;
- }
- return function scanOperatorFunction(source) {
- return source.lift(new ScanOperator(accumulator, seed, hasSeed));
- };
-}
-var ScanOperator = /*@__PURE__*/ (function () {
- function ScanOperator(accumulator, seed, hasSeed) {
- if (hasSeed === void 0) {
- hasSeed = false;
- }
- this.accumulator = accumulator;
- this.seed = seed;
- this.hasSeed = hasSeed;
- }
- ScanOperator.prototype.call = function (subscriber, source) {
- return source.subscribe(new ScanSubscriber(subscriber, this.accumulator, this.seed, this.hasSeed));
- };
- return ScanOperator;
-}());
-var ScanSubscriber = /*@__PURE__*/ (function (_super) {
- tslib__WEBPACK_IMPORTED_MODULE_0__["__extends"](ScanSubscriber, _super);
- function ScanSubscriber(destination, accumulator, _seed, hasSeed) {
- var _this = _super.call(this, destination) || this;
- _this.accumulator = accumulator;
- _this._seed = _seed;
- _this.hasSeed = hasSeed;
- _this.index = 0;
- return _this;
- }
- Object.defineProperty(ScanSubscriber.prototype, "seed", {
- get: function () {
- return this._seed;
- },
- set: function (value) {
- this.hasSeed = true;
- this._seed = value;
- },
- enumerable: true,
- configurable: true
- });
- ScanSubscriber.prototype._next = function (value) {
- if (!this.hasSeed) {
- this.seed = value;
- this.destination.next(value);
- }
- else {
- return this._tryNext(value);
- }
- };
- ScanSubscriber.prototype._tryNext = function (value) {
- var index = this.index++;
- var result;
- try {
- result = this.accumulator(this.seed, value, index);
- }
- catch (err) {
- this.destination.error(err);
- }
- this.seed = result;
- this.destination.next(result);
- };
- return ScanSubscriber;
-}(_Subscriber__WEBPACK_IMPORTED_MODULE_1__["Subscriber"]));
-//# sourceMappingURL=scan.js.map
-/***/ }),
-/* 277 */
-/***/ (function(module, __webpack_exports__, __webpack_require__) {
-"use strict";
-__webpack_require__.r(__webpack_exports__);
-/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "merge", function() { return merge; });
-/* harmony import */ var _observable_merge__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(278);
-/** PURE_IMPORTS_START _observable_merge PURE_IMPORTS_END */
-function merge() {
- var observables = [];
- for (var _i = 0; _i < arguments.length; _i++) {
- observables[_i] = arguments[_i];
- }
- return function (source) { return source.lift.call(_observable_merge__WEBPACK_IMPORTED_MODULE_0__["merge"].apply(void 0, [source].concat(observables))); };
-}
-//# sourceMappingURL=merge.js.map
-/***/ }),
-/* 278 */
-/***/ (function(module, __webpack_exports__, __webpack_require__) {
-"use strict";
-__webpack_require__.r(__webpack_exports__);
-/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "merge", function() { return merge; });
-/* harmony import */ var _Observable__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(193);
-/* harmony import */ var _util_isScheduler__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(206);
-/* harmony import */ var _operators_mergeAll__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(229);
-/* harmony import */ var _fromArray__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(215);
-/** PURE_IMPORTS_START _Observable,_util_isScheduler,_operators_mergeAll,_fromArray PURE_IMPORTS_END */
-function merge() {
- var observables = [];
- for (var _i = 0; _i < arguments.length; _i++) {
- observables[_i] = arguments[_i];
- }
- var concurrent = Number.POSITIVE_INFINITY;
- var scheduler = null;
- var last = observables[observables.length - 1];
- if (Object(_util_isScheduler__WEBPACK_IMPORTED_MODULE_1__["isScheduler"])(last)) {
- scheduler = observables.pop();
- if (observables.length > 1 && typeof observables[observables.length - 1] === 'number') {
- concurrent = observables.pop();
- }
- }
- else if (typeof last === 'number') {
- concurrent = observables.pop();
- }
- if (scheduler === null && observables.length === 1 && observables[0] instanceof _Observable__WEBPACK_IMPORTED_MODULE_0__["Observable"]) {
- return observables[0];
- }
- return Object(_operators_mergeAll__WEBPACK_IMPORTED_MODULE_2__["mergeAll"])(concurrent)(Object(_fromArray__WEBPACK_IMPORTED_MODULE_3__["fromArray"])(observables, scheduler));
-}
-//# sourceMappingURL=merge.js.map
-/***/ }),
-/* 279 */
-/***/ (function(module, __webpack_exports__, __webpack_require__) {
-"use strict";
-__webpack_require__.r(__webpack_exports__);
-/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "mergeMapTo", function() { return mergeMapTo; });
-/* harmony import */ var _mergeMap__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(230);
-/** PURE_IMPORTS_START _mergeMap PURE_IMPORTS_END */
-function mergeMapTo(innerObservable, resultSelector, concurrent) {
- if (concurrent === void 0) {
- concurrent = Number.POSITIVE_INFINITY;
- }
- if (typeof resultSelector === 'function') {
- return Object(_mergeMap__WEBPACK_IMPORTED_MODULE_0__["mergeMap"])(function () { return innerObservable; }, resultSelector, concurrent);
- }
- if (typeof resultSelector === 'number') {
- concurrent = resultSelector;
- }
- return Object(_mergeMap__WEBPACK_IMPORTED_MODULE_0__["mergeMap"])(function () { return innerObservable; }, concurrent);
-}
-//# sourceMappingURL=mergeMapTo.js.map
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+//# sourceMappingURL=index.js.map
/***/ }),
-/* 280 */
+/* 271 */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
"use strict";
__webpack_require__.r(__webpack_exports__);
-/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "mergeScan", function() { return mergeScan; });
-/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "MergeScanOperator", function() { return MergeScanOperator; });
-/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "MergeScanSubscriber", function() { return MergeScanSubscriber; });
+/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "audit", function() { return audit; });
/* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(36);
-/* harmony import */ var _util_subscribeToResult__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(182);
-/* harmony import */ var _OuterSubscriber__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(171);
-/* harmony import */ var _InnerSubscriber__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(183);
-/** PURE_IMPORTS_START tslib,_util_subscribeToResult,_OuterSubscriber,_InnerSubscriber PURE_IMPORTS_END */
-
+/* harmony import */ var _OuterSubscriber__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(229);
+/* harmony import */ var _util_subscribeToResult__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(230);
+/** PURE_IMPORTS_START tslib,_OuterSubscriber,_util_subscribeToResult PURE_IMPORTS_END */
-function mergeScan(accumulator, seed, concurrent) {
- if (concurrent === void 0) {
- concurrent = Number.POSITIVE_INFINITY;
- }
- return function (source) { return source.lift(new MergeScanOperator(accumulator, seed, concurrent)); };
+function audit(durationSelector) {
+ return function auditOperatorFunction(source) {
+ return source.lift(new AuditOperator(durationSelector));
+ };
}
-var MergeScanOperator = /*@__PURE__*/ (function () {
- function MergeScanOperator(accumulator, seed, concurrent) {
- this.accumulator = accumulator;
- this.seed = seed;
- this.concurrent = concurrent;
+var AuditOperator = /*@__PURE__*/ (function () {
+ function AuditOperator(durationSelector) {
+ this.durationSelector = durationSelector;
}
- MergeScanOperator.prototype.call = function (subscriber, source) {
- return source.subscribe(new MergeScanSubscriber(subscriber, this.accumulator, this.seed, this.concurrent));
+ AuditOperator.prototype.call = function (subscriber, source) {
+ return source.subscribe(new AuditSubscriber(subscriber, this.durationSelector));
};
- return MergeScanOperator;
+ return AuditOperator;
}());
-
-var MergeScanSubscriber = /*@__PURE__*/ (function (_super) {
- tslib__WEBPACK_IMPORTED_MODULE_0__["__extends"](MergeScanSubscriber, _super);
- function MergeScanSubscriber(destination, accumulator, acc, concurrent) {
+var AuditSubscriber = /*@__PURE__*/ (function (_super) {
+ tslib__WEBPACK_IMPORTED_MODULE_0__["__extends"](AuditSubscriber, _super);
+ function AuditSubscriber(destination, durationSelector) {
var _this = _super.call(this, destination) || this;
- _this.accumulator = accumulator;
- _this.acc = acc;
- _this.concurrent = concurrent;
+ _this.durationSelector = durationSelector;
_this.hasValue = false;
- _this.hasCompleted = false;
- _this.buffer = [];
- _this.active = 0;
- _this.index = 0;
return _this;
}
- MergeScanSubscriber.prototype._next = function (value) {
- if (this.active < this.concurrent) {
- var index = this.index++;
- var destination = this.destination;
- var ish = void 0;
+ AuditSubscriber.prototype._next = function (value) {
+ this.value = value;
+ this.hasValue = true;
+ if (!this.throttled) {
+ var duration = void 0;
try {
- var accumulator = this.accumulator;
- ish = accumulator(this.acc, value, index);
+ var durationSelector = this.durationSelector;
+ duration = durationSelector(value);
}
- catch (e) {
- return destination.error(e);
+ catch (err) {
+ return this.destination.error(err);
}
- this.active++;
- this._innerSub(ish, value, index);
- }
- else {
- this.buffer.push(value);
- }
- };
- MergeScanSubscriber.prototype._innerSub = function (ish, value, index) {
- var innerSubscriber = new _InnerSubscriber__WEBPACK_IMPORTED_MODULE_3__["InnerSubscriber"](this, undefined, undefined);
- var destination = this.destination;
- destination.add(innerSubscriber);
- Object(_util_subscribeToResult__WEBPACK_IMPORTED_MODULE_1__["subscribeToResult"])(this, ish, value, index, innerSubscriber);
- };
- MergeScanSubscriber.prototype._complete = function () {
- this.hasCompleted = true;
- if (this.active === 0 && this.buffer.length === 0) {
- if (this.hasValue === false) {
- this.destination.next(this.acc);
+ var innerSubscription = Object(_util_subscribeToResult__WEBPACK_IMPORTED_MODULE_2__["subscribeToResult"])(this, duration);
+ if (!innerSubscription || innerSubscription.closed) {
+ this.clearThrottle();
+ }
+ else {
+ this.add(this.throttled = innerSubscription);
}
- this.destination.complete();
}
- this.unsubscribe();
- };
- MergeScanSubscriber.prototype.notifyNext = function (outerValue, innerValue, outerIndex, innerIndex, innerSub) {
- var destination = this.destination;
- this.acc = innerValue;
- this.hasValue = true;
- destination.next(innerValue);
};
- MergeScanSubscriber.prototype.notifyComplete = function (innerSub) {
- var buffer = this.buffer;
- var destination = this.destination;
- destination.remove(innerSub);
- this.active--;
- if (buffer.length > 0) {
- this._next(buffer.shift());
+ AuditSubscriber.prototype.clearThrottle = function () {
+ var _a = this, value = _a.value, hasValue = _a.hasValue, throttled = _a.throttled;
+ if (throttled) {
+ this.remove(throttled);
+ this.throttled = null;
+ throttled.unsubscribe();
}
- else if (this.active === 0 && this.hasCompleted) {
- if (this.hasValue === false) {
- this.destination.next(this.acc);
- }
- this.destination.complete();
+ if (hasValue) {
+ this.value = null;
+ this.hasValue = false;
+ this.destination.next(value);
}
};
- return MergeScanSubscriber;
-}(_OuterSubscriber__WEBPACK_IMPORTED_MODULE_2__["OuterSubscriber"]));
-
-//# sourceMappingURL=mergeScan.js.map
+ AuditSubscriber.prototype.notifyNext = function (outerValue, innerValue, outerIndex, innerIndex) {
+ this.clearThrottle();
+ };
+ AuditSubscriber.prototype.notifyComplete = function () {
+ this.clearThrottle();
+ };
+ return AuditSubscriber;
+}(_OuterSubscriber__WEBPACK_IMPORTED_MODULE_1__["OuterSubscriber"]));
+//# sourceMappingURL=audit.js.map
/***/ }),
-/* 281 */
+/* 272 */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
"use strict";
__webpack_require__.r(__webpack_exports__);
-/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "min", function() { return min; });
-/* harmony import */ var _reduce__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(275);
-/** PURE_IMPORTS_START _reduce PURE_IMPORTS_END */
+/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "auditTime", function() { return auditTime; });
+/* harmony import */ var _scheduler_async__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(215);
+/* harmony import */ var _audit__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(271);
+/* harmony import */ var _observable_timer__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(267);
+/** PURE_IMPORTS_START _scheduler_async,_audit,_observable_timer PURE_IMPORTS_END */
-function min(comparer) {
- var min = (typeof comparer === 'function')
- ? function (x, y) { return comparer(x, y) < 0 ? x : y; }
- : function (x, y) { return x < y ? x : y; };
- return Object(_reduce__WEBPACK_IMPORTED_MODULE_0__["reduce"])(min);
-}
-//# sourceMappingURL=min.js.map
-/***/ }),
-/* 282 */
+function auditTime(duration, scheduler) {
+ if (scheduler === void 0) {
+ scheduler = _scheduler_async__WEBPACK_IMPORTED_MODULE_0__["async"];
+ }
+ return Object(_audit__WEBPACK_IMPORTED_MODULE_1__["audit"])(function () { return Object(_observable_timer__WEBPACK_IMPORTED_MODULE_2__["timer"])(duration, scheduler); });
+}
+//# sourceMappingURL=auditTime.js.map
+
+
+/***/ }),
+/* 273 */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
"use strict";
__webpack_require__.r(__webpack_exports__);
-/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "multicast", function() { return multicast; });
-/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "MulticastOperator", function() { return MulticastOperator; });
-/* harmony import */ var _observable_ConnectableObservable__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(283);
-/** PURE_IMPORTS_START _observable_ConnectableObservable PURE_IMPORTS_END */
+/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "buffer", function() { return buffer; });
+/* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(36);
+/* harmony import */ var _OuterSubscriber__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(229);
+/* harmony import */ var _util_subscribeToResult__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(230);
+/** PURE_IMPORTS_START tslib,_OuterSubscriber,_util_subscribeToResult PURE_IMPORTS_END */
-function multicast(subjectOrSubjectFactory, selector) {
- return function multicastOperatorFunction(source) {
- var subjectFactory;
- if (typeof subjectOrSubjectFactory === 'function') {
- subjectFactory = subjectOrSubjectFactory;
- }
- else {
- subjectFactory = function subjectFactory() {
- return subjectOrSubjectFactory;
- };
- }
- if (typeof selector === 'function') {
- return source.lift(new MulticastOperator(subjectFactory, selector));
- }
- var connectable = Object.create(source, _observable_ConnectableObservable__WEBPACK_IMPORTED_MODULE_0__["connectableObservableDescriptor"]);
- connectable.source = source;
- connectable.subjectFactory = subjectFactory;
- return connectable;
+
+
+function buffer(closingNotifier) {
+ return function bufferOperatorFunction(source) {
+ return source.lift(new BufferOperator(closingNotifier));
};
}
-var MulticastOperator = /*@__PURE__*/ (function () {
- function MulticastOperator(subjectFactory, selector) {
- this.subjectFactory = subjectFactory;
- this.selector = selector;
+var BufferOperator = /*@__PURE__*/ (function () {
+ function BufferOperator(closingNotifier) {
+ this.closingNotifier = closingNotifier;
}
- MulticastOperator.prototype.call = function (subscriber, source) {
- var selector = this.selector;
- var subject = this.subjectFactory();
- var subscription = selector(subject).subscribe(subscriber);
- subscription.add(source.subscribe(subject));
- return subscription;
+ BufferOperator.prototype.call = function (subscriber, source) {
+ return source.subscribe(new BufferSubscriber(subscriber, this.closingNotifier));
};
- return MulticastOperator;
+ return BufferOperator;
}());
-
-//# sourceMappingURL=multicast.js.map
+var BufferSubscriber = /*@__PURE__*/ (function (_super) {
+ tslib__WEBPACK_IMPORTED_MODULE_0__["__extends"](BufferSubscriber, _super);
+ function BufferSubscriber(destination, closingNotifier) {
+ var _this = _super.call(this, destination) || this;
+ _this.buffer = [];
+ _this.add(Object(_util_subscribeToResult__WEBPACK_IMPORTED_MODULE_2__["subscribeToResult"])(_this, closingNotifier));
+ return _this;
+ }
+ BufferSubscriber.prototype._next = function (value) {
+ this.buffer.push(value);
+ };
+ BufferSubscriber.prototype.notifyNext = function (outerValue, innerValue, outerIndex, innerIndex, innerSub) {
+ var buffer = this.buffer;
+ this.buffer = [];
+ this.destination.next(buffer);
+ };
+ return BufferSubscriber;
+}(_OuterSubscriber__WEBPACK_IMPORTED_MODULE_1__["OuterSubscriber"]));
+//# sourceMappingURL=buffer.js.map
/***/ }),
-/* 283 */
+/* 274 */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
"use strict";
__webpack_require__.r(__webpack_exports__);
-/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ConnectableObservable", function() { return ConnectableObservable; });
-/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "connectableObservableDescriptor", function() { return connectableObservableDescriptor; });
+/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "bufferCount", function() { return bufferCount; });
/* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(36);
-/* harmony import */ var _Subject__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(265);
-/* harmony import */ var _Observable__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(193);
-/* harmony import */ var _Subscriber__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(172);
-/* harmony import */ var _Subscription__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(177);
-/* harmony import */ var _operators_refCount__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(284);
-/** PURE_IMPORTS_START tslib,_Subject,_Observable,_Subscriber,_Subscription,_operators_refCount PURE_IMPORTS_END */
-
-
-
-
+/* harmony import */ var _Subscriber__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(172);
+/** PURE_IMPORTS_START tslib,_Subscriber PURE_IMPORTS_END */
-var ConnectableObservable = /*@__PURE__*/ (function (_super) {
- tslib__WEBPACK_IMPORTED_MODULE_0__["__extends"](ConnectableObservable, _super);
- function ConnectableObservable(source, subjectFactory) {
- var _this = _super.call(this) || this;
- _this.source = source;
- _this.subjectFactory = subjectFactory;
- _this._refCount = 0;
- _this._isComplete = false;
- return _this;
+function bufferCount(bufferSize, startBufferEvery) {
+ if (startBufferEvery === void 0) {
+ startBufferEvery = null;
}
- ConnectableObservable.prototype._subscribe = function (subscriber) {
- return this.getSubject().subscribe(subscriber);
+ return function bufferCountOperatorFunction(source) {
+ return source.lift(new BufferCountOperator(bufferSize, startBufferEvery));
};
- ConnectableObservable.prototype.getSubject = function () {
- var subject = this._subject;
- if (!subject || subject.isStopped) {
- this._subject = this.subjectFactory();
+}
+var BufferCountOperator = /*@__PURE__*/ (function () {
+ function BufferCountOperator(bufferSize, startBufferEvery) {
+ this.bufferSize = bufferSize;
+ this.startBufferEvery = startBufferEvery;
+ if (!startBufferEvery || bufferSize === startBufferEvery) {
+ this.subscriberClass = BufferCountSubscriber;
}
- return this._subject;
- };
- ConnectableObservable.prototype.connect = function () {
- var connection = this._connection;
- if (!connection) {
- this._isComplete = false;
- connection = this._connection = new _Subscription__WEBPACK_IMPORTED_MODULE_4__["Subscription"]();
- connection.add(this.source
- .subscribe(new ConnectableSubscriber(this.getSubject(), this)));
- if (connection.closed) {
- this._connection = null;
- connection = _Subscription__WEBPACK_IMPORTED_MODULE_4__["Subscription"].EMPTY;
- }
+ else {
+ this.subscriberClass = BufferSkipCountSubscriber;
}
- return connection;
- };
- ConnectableObservable.prototype.refCount = function () {
- return Object(_operators_refCount__WEBPACK_IMPORTED_MODULE_5__["refCount"])()(this);
- };
- return ConnectableObservable;
-}(_Observable__WEBPACK_IMPORTED_MODULE_2__["Observable"]));
-
-var connectableObservableDescriptor = /*@__PURE__*/ (function () {
- var connectableProto = ConnectableObservable.prototype;
- return {
- operator: { value: null },
- _refCount: { value: 0, writable: true },
- _subject: { value: null, writable: true },
- _connection: { value: null, writable: true },
- _subscribe: { value: connectableProto._subscribe },
- _isComplete: { value: connectableProto._isComplete, writable: true },
- getSubject: { value: connectableProto.getSubject },
- connect: { value: connectableProto.connect },
- refCount: { value: connectableProto.refCount }
+ }
+ BufferCountOperator.prototype.call = function (subscriber, source) {
+ return source.subscribe(new this.subscriberClass(subscriber, this.bufferSize, this.startBufferEvery));
};
-})();
-var ConnectableSubscriber = /*@__PURE__*/ (function (_super) {
- tslib__WEBPACK_IMPORTED_MODULE_0__["__extends"](ConnectableSubscriber, _super);
- function ConnectableSubscriber(destination, connectable) {
+ return BufferCountOperator;
+}());
+var BufferCountSubscriber = /*@__PURE__*/ (function (_super) {
+ tslib__WEBPACK_IMPORTED_MODULE_0__["__extends"](BufferCountSubscriber, _super);
+ function BufferCountSubscriber(destination, bufferSize) {
var _this = _super.call(this, destination) || this;
- _this.connectable = connectable;
+ _this.bufferSize = bufferSize;
+ _this.buffer = [];
return _this;
}
- ConnectableSubscriber.prototype._error = function (err) {
- this._unsubscribe();
- _super.prototype._error.call(this, err);
- };
- ConnectableSubscriber.prototype._complete = function () {
- this.connectable._isComplete = true;
- this._unsubscribe();
- _super.prototype._complete.call(this);
- };
- ConnectableSubscriber.prototype._unsubscribe = function () {
- var connectable = this.connectable;
- if (connectable) {
- this.connectable = null;
- var connection = connectable._connection;
- connectable._refCount = 0;
- connectable._subject = null;
- connectable._connection = null;
- if (connection) {
- connection.unsubscribe();
- }
+ BufferCountSubscriber.prototype._next = function (value) {
+ var buffer = this.buffer;
+ buffer.push(value);
+ if (buffer.length == this.bufferSize) {
+ this.destination.next(buffer);
+ this.buffer = [];
}
};
- return ConnectableSubscriber;
-}(_Subject__WEBPACK_IMPORTED_MODULE_1__["SubjectSubscriber"]));
-var RefCountOperator = /*@__PURE__*/ (function () {
- function RefCountOperator(connectable) {
- this.connectable = connectable;
- }
- RefCountOperator.prototype.call = function (subscriber, source) {
- var connectable = this.connectable;
- connectable._refCount++;
- var refCounter = new RefCountSubscriber(subscriber, connectable);
- var subscription = source.subscribe(refCounter);
- if (!refCounter.closed) {
- refCounter.connection = connectable.connect();
+ BufferCountSubscriber.prototype._complete = function () {
+ var buffer = this.buffer;
+ if (buffer.length > 0) {
+ this.destination.next(buffer);
}
- return subscription;
+ _super.prototype._complete.call(this);
};
- return RefCountOperator;
-}());
-var RefCountSubscriber = /*@__PURE__*/ (function (_super) {
- tslib__WEBPACK_IMPORTED_MODULE_0__["__extends"](RefCountSubscriber, _super);
- function RefCountSubscriber(destination, connectable) {
+ return BufferCountSubscriber;
+}(_Subscriber__WEBPACK_IMPORTED_MODULE_1__["Subscriber"]));
+var BufferSkipCountSubscriber = /*@__PURE__*/ (function (_super) {
+ tslib__WEBPACK_IMPORTED_MODULE_0__["__extends"](BufferSkipCountSubscriber, _super);
+ function BufferSkipCountSubscriber(destination, bufferSize, startBufferEvery) {
var _this = _super.call(this, destination) || this;
- _this.connectable = connectable;
+ _this.bufferSize = bufferSize;
+ _this.startBufferEvery = startBufferEvery;
+ _this.buffers = [];
+ _this.count = 0;
return _this;
}
- RefCountSubscriber.prototype._unsubscribe = function () {
- var connectable = this.connectable;
- if (!connectable) {
- this.connection = null;
- return;
- }
- this.connectable = null;
- var refCount = connectable._refCount;
- if (refCount <= 0) {
- this.connection = null;
- return;
+ BufferSkipCountSubscriber.prototype._next = function (value) {
+ var _a = this, bufferSize = _a.bufferSize, startBufferEvery = _a.startBufferEvery, buffers = _a.buffers, count = _a.count;
+ this.count++;
+ if (count % startBufferEvery === 0) {
+ buffers.push([]);
}
- connectable._refCount = refCount - 1;
- if (refCount > 1) {
- this.connection = null;
- return;
+ for (var i = buffers.length; i--;) {
+ var buffer = buffers[i];
+ buffer.push(value);
+ if (buffer.length === bufferSize) {
+ buffers.splice(i, 1);
+ this.destination.next(buffer);
+ }
}
- var connection = this.connection;
- var sharedConnection = connectable._connection;
- this.connection = null;
- if (sharedConnection && (!connection || sharedConnection === connection)) {
- sharedConnection.unsubscribe();
+ };
+ BufferSkipCountSubscriber.prototype._complete = function () {
+ var _a = this, buffers = _a.buffers, destination = _a.destination;
+ while (buffers.length > 0) {
+ var buffer = buffers.shift();
+ if (buffer.length > 0) {
+ destination.next(buffer);
+ }
}
+ _super.prototype._complete.call(this);
};
- return RefCountSubscriber;
-}(_Subscriber__WEBPACK_IMPORTED_MODULE_3__["Subscriber"]));
-//# sourceMappingURL=ConnectableObservable.js.map
+ return BufferSkipCountSubscriber;
+}(_Subscriber__WEBPACK_IMPORTED_MODULE_1__["Subscriber"]));
+//# sourceMappingURL=bufferCount.js.map
/***/ }),
-/* 284 */
+/* 275 */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
"use strict";
__webpack_require__.r(__webpack_exports__);
-/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "refCount", function() { return refCount; });
+/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "bufferTime", function() { return bufferTime; });
/* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(36);
-/* harmony import */ var _Subscriber__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(172);
-/** PURE_IMPORTS_START tslib,_Subscriber PURE_IMPORTS_END */
+/* harmony import */ var _scheduler_async__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(215);
+/* harmony import */ var _Subscriber__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(172);
+/* harmony import */ var _util_isScheduler__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(205);
+/** PURE_IMPORTS_START tslib,_scheduler_async,_Subscriber,_util_isScheduler PURE_IMPORTS_END */
-function refCount() {
- return function refCountOperatorFunction(source) {
- return source.lift(new RefCountOperator(source));
+
+
+function bufferTime(bufferTimeSpan) {
+ var length = arguments.length;
+ var scheduler = _scheduler_async__WEBPACK_IMPORTED_MODULE_1__["async"];
+ if (Object(_util_isScheduler__WEBPACK_IMPORTED_MODULE_3__["isScheduler"])(arguments[arguments.length - 1])) {
+ scheduler = arguments[arguments.length - 1];
+ length--;
+ }
+ var bufferCreationInterval = null;
+ if (length >= 2) {
+ bufferCreationInterval = arguments[1];
+ }
+ var maxBufferSize = Number.POSITIVE_INFINITY;
+ if (length >= 3) {
+ maxBufferSize = arguments[2];
+ }
+ return function bufferTimeOperatorFunction(source) {
+ return source.lift(new BufferTimeOperator(bufferTimeSpan, bufferCreationInterval, maxBufferSize, scheduler));
};
}
-var RefCountOperator = /*@__PURE__*/ (function () {
- function RefCountOperator(connectable) {
- this.connectable = connectable;
+var BufferTimeOperator = /*@__PURE__*/ (function () {
+ function BufferTimeOperator(bufferTimeSpan, bufferCreationInterval, maxBufferSize, scheduler) {
+ this.bufferTimeSpan = bufferTimeSpan;
+ this.bufferCreationInterval = bufferCreationInterval;
+ this.maxBufferSize = maxBufferSize;
+ this.scheduler = scheduler;
}
- RefCountOperator.prototype.call = function (subscriber, source) {
- var connectable = this.connectable;
- connectable._refCount++;
- var refCounter = new RefCountSubscriber(subscriber, connectable);
- var subscription = source.subscribe(refCounter);
- if (!refCounter.closed) {
- refCounter.connection = connectable.connect();
- }
- return subscription;
+ BufferTimeOperator.prototype.call = function (subscriber, source) {
+ return source.subscribe(new BufferTimeSubscriber(subscriber, this.bufferTimeSpan, this.bufferCreationInterval, this.maxBufferSize, this.scheduler));
};
- return RefCountOperator;
+ return BufferTimeOperator;
}());
-var RefCountSubscriber = /*@__PURE__*/ (function (_super) {
- tslib__WEBPACK_IMPORTED_MODULE_0__["__extends"](RefCountSubscriber, _super);
- function RefCountSubscriber(destination, connectable) {
+var Context = /*@__PURE__*/ (function () {
+ function Context() {
+ this.buffer = [];
+ }
+ return Context;
+}());
+var BufferTimeSubscriber = /*@__PURE__*/ (function (_super) {
+ tslib__WEBPACK_IMPORTED_MODULE_0__["__extends"](BufferTimeSubscriber, _super);
+ function BufferTimeSubscriber(destination, bufferTimeSpan, bufferCreationInterval, maxBufferSize, scheduler) {
var _this = _super.call(this, destination) || this;
- _this.connectable = connectable;
+ _this.bufferTimeSpan = bufferTimeSpan;
+ _this.bufferCreationInterval = bufferCreationInterval;
+ _this.maxBufferSize = maxBufferSize;
+ _this.scheduler = scheduler;
+ _this.contexts = [];
+ var context = _this.openContext();
+ _this.timespanOnly = bufferCreationInterval == null || bufferCreationInterval < 0;
+ if (_this.timespanOnly) {
+ var timeSpanOnlyState = { subscriber: _this, context: context, bufferTimeSpan: bufferTimeSpan };
+ _this.add(context.closeAction = scheduler.schedule(dispatchBufferTimeSpanOnly, bufferTimeSpan, timeSpanOnlyState));
+ }
+ else {
+ var closeState = { subscriber: _this, context: context };
+ var creationState = { bufferTimeSpan: bufferTimeSpan, bufferCreationInterval: bufferCreationInterval, subscriber: _this, scheduler: scheduler };
+ _this.add(context.closeAction = scheduler.schedule(dispatchBufferClose, bufferTimeSpan, closeState));
+ _this.add(scheduler.schedule(dispatchBufferCreation, bufferCreationInterval, creationState));
+ }
return _this;
}
- RefCountSubscriber.prototype._unsubscribe = function () {
- var connectable = this.connectable;
- if (!connectable) {
- this.connection = null;
- return;
+ BufferTimeSubscriber.prototype._next = function (value) {
+ var contexts = this.contexts;
+ var len = contexts.length;
+ var filledBufferContext;
+ for (var i = 0; i < len; i++) {
+ var context_1 = contexts[i];
+ var buffer = context_1.buffer;
+ buffer.push(value);
+ if (buffer.length == this.maxBufferSize) {
+ filledBufferContext = context_1;
+ }
}
- this.connectable = null;
- var refCount = connectable._refCount;
- if (refCount <= 0) {
- this.connection = null;
- return;
+ if (filledBufferContext) {
+ this.onBufferFull(filledBufferContext);
}
- connectable._refCount = refCount - 1;
- if (refCount > 1) {
- this.connection = null;
- return;
+ };
+ BufferTimeSubscriber.prototype._error = function (err) {
+ this.contexts.length = 0;
+ _super.prototype._error.call(this, err);
+ };
+ BufferTimeSubscriber.prototype._complete = function () {
+ var _a = this, contexts = _a.contexts, destination = _a.destination;
+ while (contexts.length > 0) {
+ var context_2 = contexts.shift();
+ destination.next(context_2.buffer);
}
- var connection = this.connection;
- var sharedConnection = connectable._connection;
- this.connection = null;
- if (sharedConnection && (!connection || sharedConnection === connection)) {
- sharedConnection.unsubscribe();
+ _super.prototype._complete.call(this);
+ };
+ BufferTimeSubscriber.prototype._unsubscribe = function () {
+ this.contexts = null;
+ };
+ BufferTimeSubscriber.prototype.onBufferFull = function (context) {
+ this.closeContext(context);
+ var closeAction = context.closeAction;
+ closeAction.unsubscribe();
+ this.remove(closeAction);
+ if (!this.closed && this.timespanOnly) {
+ context = this.openContext();
+ var bufferTimeSpan = this.bufferTimeSpan;
+ var timeSpanOnlyState = { subscriber: this, context: context, bufferTimeSpan: bufferTimeSpan };
+ this.add(context.closeAction = this.scheduler.schedule(dispatchBufferTimeSpanOnly, bufferTimeSpan, timeSpanOnlyState));
}
};
- return RefCountSubscriber;
-}(_Subscriber__WEBPACK_IMPORTED_MODULE_1__["Subscriber"]));
-//# sourceMappingURL=refCount.js.map
+ BufferTimeSubscriber.prototype.openContext = function () {
+ var context = new Context();
+ this.contexts.push(context);
+ return context;
+ };
+ BufferTimeSubscriber.prototype.closeContext = function (context) {
+ this.destination.next(context.buffer);
+ var contexts = this.contexts;
+ var spliceIndex = contexts ? contexts.indexOf(context) : -1;
+ if (spliceIndex >= 0) {
+ contexts.splice(contexts.indexOf(context), 1);
+ }
+ };
+ return BufferTimeSubscriber;
+}(_Subscriber__WEBPACK_IMPORTED_MODULE_2__["Subscriber"]));
+function dispatchBufferTimeSpanOnly(state) {
+ var subscriber = state.subscriber;
+ var prevContext = state.context;
+ if (prevContext) {
+ subscriber.closeContext(prevContext);
+ }
+ if (!subscriber.closed) {
+ state.context = subscriber.openContext();
+ state.context.closeAction = this.schedule(state, state.bufferTimeSpan);
+ }
+}
+function dispatchBufferCreation(state) {
+ var bufferCreationInterval = state.bufferCreationInterval, bufferTimeSpan = state.bufferTimeSpan, subscriber = state.subscriber, scheduler = state.scheduler;
+ var context = subscriber.openContext();
+ var action = this;
+ if (!subscriber.closed) {
+ subscriber.add(context.closeAction = scheduler.schedule(dispatchBufferClose, bufferTimeSpan, { subscriber: subscriber, context: context }));
+ action.schedule(state, bufferCreationInterval);
+ }
+}
+function dispatchBufferClose(arg) {
+ var subscriber = arg.subscriber, context = arg.context;
+ subscriber.closeContext(context);
+}
+//# sourceMappingURL=bufferTime.js.map
/***/ }),
-/* 285 */
+/* 276 */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
"use strict";
__webpack_require__.r(__webpack_exports__);
-/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "observeOn", function() { return observeOn; });
-/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ObserveOnOperator", function() { return ObserveOnOperator; });
-/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ObserveOnSubscriber", function() { return ObserveOnSubscriber; });
-/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ObserveOnMessage", function() { return ObserveOnMessage; });
+/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "bufferToggle", function() { return bufferToggle; });
/* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(36);
-/* harmony import */ var _Subscriber__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(172);
-/* harmony import */ var _Notification__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(241);
-/** PURE_IMPORTS_START tslib,_Subscriber,_Notification PURE_IMPORTS_END */
+/* harmony import */ var _Subscription__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(177);
+/* harmony import */ var _util_subscribeToResult__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(230);
+/* harmony import */ var _OuterSubscriber__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(229);
+/** PURE_IMPORTS_START tslib,_Subscription,_util_subscribeToResult,_OuterSubscriber PURE_IMPORTS_END */
-function observeOn(scheduler, delay) {
- if (delay === void 0) {
- delay = 0;
- }
- return function observeOnOperatorFunction(source) {
- return source.lift(new ObserveOnOperator(scheduler, delay));
+
+function bufferToggle(openings, closingSelector) {
+ return function bufferToggleOperatorFunction(source) {
+ return source.lift(new BufferToggleOperator(openings, closingSelector));
};
}
-var ObserveOnOperator = /*@__PURE__*/ (function () {
- function ObserveOnOperator(scheduler, delay) {
- if (delay === void 0) {
- delay = 0;
- }
- this.scheduler = scheduler;
- this.delay = delay;
+var BufferToggleOperator = /*@__PURE__*/ (function () {
+ function BufferToggleOperator(openings, closingSelector) {
+ this.openings = openings;
+ this.closingSelector = closingSelector;
}
- ObserveOnOperator.prototype.call = function (subscriber, source) {
- return source.subscribe(new ObserveOnSubscriber(subscriber, this.scheduler, this.delay));
+ BufferToggleOperator.prototype.call = function (subscriber, source) {
+ return source.subscribe(new BufferToggleSubscriber(subscriber, this.openings, this.closingSelector));
};
- return ObserveOnOperator;
+ return BufferToggleOperator;
}());
-
-var ObserveOnSubscriber = /*@__PURE__*/ (function (_super) {
- tslib__WEBPACK_IMPORTED_MODULE_0__["__extends"](ObserveOnSubscriber, _super);
- function ObserveOnSubscriber(destination, scheduler, delay) {
- if (delay === void 0) {
- delay = 0;
- }
+var BufferToggleSubscriber = /*@__PURE__*/ (function (_super) {
+ tslib__WEBPACK_IMPORTED_MODULE_0__["__extends"](BufferToggleSubscriber, _super);
+ function BufferToggleSubscriber(destination, openings, closingSelector) {
var _this = _super.call(this, destination) || this;
- _this.scheduler = scheduler;
- _this.delay = delay;
- return _this;
- }
- ObserveOnSubscriber.dispatch = function (arg) {
- var notification = arg.notification, destination = arg.destination;
- notification.observe(destination);
- this.unsubscribe();
+ _this.openings = openings;
+ _this.closingSelector = closingSelector;
+ _this.contexts = [];
+ _this.add(Object(_util_subscribeToResult__WEBPACK_IMPORTED_MODULE_2__["subscribeToResult"])(_this, openings));
+ return _this;
+ }
+ BufferToggleSubscriber.prototype._next = function (value) {
+ var contexts = this.contexts;
+ var len = contexts.length;
+ for (var i = 0; i < len; i++) {
+ contexts[i].buffer.push(value);
+ }
};
- ObserveOnSubscriber.prototype.scheduleMessage = function (notification) {
- var destination = this.destination;
- destination.add(this.scheduler.schedule(ObserveOnSubscriber.dispatch, this.delay, new ObserveOnMessage(notification, this.destination)));
+ BufferToggleSubscriber.prototype._error = function (err) {
+ var contexts = this.contexts;
+ while (contexts.length > 0) {
+ var context_1 = contexts.shift();
+ context_1.subscription.unsubscribe();
+ context_1.buffer = null;
+ context_1.subscription = null;
+ }
+ this.contexts = null;
+ _super.prototype._error.call(this, err);
};
- ObserveOnSubscriber.prototype._next = function (value) {
- this.scheduleMessage(_Notification__WEBPACK_IMPORTED_MODULE_2__["Notification"].createNext(value));
+ BufferToggleSubscriber.prototype._complete = function () {
+ var contexts = this.contexts;
+ while (contexts.length > 0) {
+ var context_2 = contexts.shift();
+ this.destination.next(context_2.buffer);
+ context_2.subscription.unsubscribe();
+ context_2.buffer = null;
+ context_2.subscription = null;
+ }
+ this.contexts = null;
+ _super.prototype._complete.call(this);
};
- ObserveOnSubscriber.prototype._error = function (err) {
- this.scheduleMessage(_Notification__WEBPACK_IMPORTED_MODULE_2__["Notification"].createError(err));
- this.unsubscribe();
+ BufferToggleSubscriber.prototype.notifyNext = function (outerValue, innerValue, outerIndex, innerIndex, innerSub) {
+ outerValue ? this.closeBuffer(outerValue) : this.openBuffer(innerValue);
};
- ObserveOnSubscriber.prototype._complete = function () {
- this.scheduleMessage(_Notification__WEBPACK_IMPORTED_MODULE_2__["Notification"].createComplete());
- this.unsubscribe();
+ BufferToggleSubscriber.prototype.notifyComplete = function (innerSub) {
+ this.closeBuffer(innerSub.context);
};
- return ObserveOnSubscriber;
-}(_Subscriber__WEBPACK_IMPORTED_MODULE_1__["Subscriber"]));
-
-var ObserveOnMessage = /*@__PURE__*/ (function () {
- function ObserveOnMessage(notification, destination) {
- this.notification = notification;
- this.destination = destination;
- }
- return ObserveOnMessage;
-}());
-
-//# sourceMappingURL=observeOn.js.map
+ BufferToggleSubscriber.prototype.openBuffer = function (value) {
+ try {
+ var closingSelector = this.closingSelector;
+ var closingNotifier = closingSelector.call(this, value);
+ if (closingNotifier) {
+ this.trySubscribe(closingNotifier);
+ }
+ }
+ catch (err) {
+ this._error(err);
+ }
+ };
+ BufferToggleSubscriber.prototype.closeBuffer = function (context) {
+ var contexts = this.contexts;
+ if (contexts && context) {
+ var buffer = context.buffer, subscription = context.subscription;
+ this.destination.next(buffer);
+ contexts.splice(contexts.indexOf(context), 1);
+ this.remove(subscription);
+ subscription.unsubscribe();
+ }
+ };
+ BufferToggleSubscriber.prototype.trySubscribe = function (closingNotifier) {
+ var contexts = this.contexts;
+ var buffer = [];
+ var subscription = new _Subscription__WEBPACK_IMPORTED_MODULE_1__["Subscription"]();
+ var context = { buffer: buffer, subscription: subscription };
+ contexts.push(context);
+ var innerSubscription = Object(_util_subscribeToResult__WEBPACK_IMPORTED_MODULE_2__["subscribeToResult"])(this, closingNotifier, context);
+ if (!innerSubscription || innerSubscription.closed) {
+ this.closeBuffer(context);
+ }
+ else {
+ innerSubscription.context = context;
+ this.add(innerSubscription);
+ subscription.add(innerSubscription);
+ }
+ };
+ return BufferToggleSubscriber;
+}(_OuterSubscriber__WEBPACK_IMPORTED_MODULE_3__["OuterSubscriber"]));
+//# sourceMappingURL=bufferToggle.js.map
/***/ }),
-/* 286 */
+/* 277 */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
"use strict";
__webpack_require__.r(__webpack_exports__);
-/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "onErrorResumeNext", function() { return onErrorResumeNext; });
-/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "onErrorResumeNextStatic", function() { return onErrorResumeNextStatic; });
+/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "bufferWhen", function() { return bufferWhen; });
/* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(36);
-/* harmony import */ var _observable_from__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(218);
-/* harmony import */ var _util_isArray__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(178);
-/* harmony import */ var _OuterSubscriber__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(171);
-/* harmony import */ var _InnerSubscriber__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(183);
-/* harmony import */ var _util_subscribeToResult__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(182);
-/** PURE_IMPORTS_START tslib,_observable_from,_util_isArray,_OuterSubscriber,_InnerSubscriber,_util_subscribeToResult PURE_IMPORTS_END */
-
-
+/* harmony import */ var _Subscription__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(177);
+/* harmony import */ var _OuterSubscriber__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(229);
+/* harmony import */ var _util_subscribeToResult__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(230);
+/** PURE_IMPORTS_START tslib,_Subscription,_OuterSubscriber,_util_subscribeToResult PURE_IMPORTS_END */
-function onErrorResumeNext() {
- var nextSources = [];
- for (var _i = 0; _i < arguments.length; _i++) {
- nextSources[_i] = arguments[_i];
- }
- if (nextSources.length === 1 && Object(_util_isArray__WEBPACK_IMPORTED_MODULE_2__["isArray"])(nextSources[0])) {
- nextSources = nextSources[0];
- }
- return function (source) { return source.lift(new OnErrorResumeNextOperator(nextSources)); };
-}
-function onErrorResumeNextStatic() {
- var nextSources = [];
- for (var _i = 0; _i < arguments.length; _i++) {
- nextSources[_i] = arguments[_i];
- }
- var source = null;
- if (nextSources.length === 1 && Object(_util_isArray__WEBPACK_IMPORTED_MODULE_2__["isArray"])(nextSources[0])) {
- nextSources = nextSources[0];
- }
- source = nextSources.shift();
- return Object(_observable_from__WEBPACK_IMPORTED_MODULE_1__["from"])(source, null).lift(new OnErrorResumeNextOperator(nextSources));
+function bufferWhen(closingSelector) {
+ return function (source) {
+ return source.lift(new BufferWhenOperator(closingSelector));
+ };
}
-var OnErrorResumeNextOperator = /*@__PURE__*/ (function () {
- function OnErrorResumeNextOperator(nextSources) {
- this.nextSources = nextSources;
+var BufferWhenOperator = /*@__PURE__*/ (function () {
+ function BufferWhenOperator(closingSelector) {
+ this.closingSelector = closingSelector;
}
- OnErrorResumeNextOperator.prototype.call = function (subscriber, source) {
- return source.subscribe(new OnErrorResumeNextSubscriber(subscriber, this.nextSources));
+ BufferWhenOperator.prototype.call = function (subscriber, source) {
+ return source.subscribe(new BufferWhenSubscriber(subscriber, this.closingSelector));
};
- return OnErrorResumeNextOperator;
+ return BufferWhenOperator;
}());
-var OnErrorResumeNextSubscriber = /*@__PURE__*/ (function (_super) {
- tslib__WEBPACK_IMPORTED_MODULE_0__["__extends"](OnErrorResumeNextSubscriber, _super);
- function OnErrorResumeNextSubscriber(destination, nextSources) {
+var BufferWhenSubscriber = /*@__PURE__*/ (function (_super) {
+ tslib__WEBPACK_IMPORTED_MODULE_0__["__extends"](BufferWhenSubscriber, _super);
+ function BufferWhenSubscriber(destination, closingSelector) {
var _this = _super.call(this, destination) || this;
- _this.destination = destination;
- _this.nextSources = nextSources;
+ _this.closingSelector = closingSelector;
+ _this.subscribing = false;
+ _this.openBuffer();
return _this;
}
- OnErrorResumeNextSubscriber.prototype.notifyError = function (error, innerSub) {
- this.subscribeToNextSource();
+ BufferWhenSubscriber.prototype._next = function (value) {
+ this.buffer.push(value);
};
- OnErrorResumeNextSubscriber.prototype.notifyComplete = function (innerSub) {
- this.subscribeToNextSource();
+ BufferWhenSubscriber.prototype._complete = function () {
+ var buffer = this.buffer;
+ if (buffer) {
+ this.destination.next(buffer);
+ }
+ _super.prototype._complete.call(this);
};
- OnErrorResumeNextSubscriber.prototype._error = function (err) {
- this.subscribeToNextSource();
- this.unsubscribe();
+ BufferWhenSubscriber.prototype._unsubscribe = function () {
+ this.buffer = null;
+ this.subscribing = false;
};
- OnErrorResumeNextSubscriber.prototype._complete = function () {
- this.subscribeToNextSource();
- this.unsubscribe();
+ BufferWhenSubscriber.prototype.notifyNext = function (outerValue, innerValue, outerIndex, innerIndex, innerSub) {
+ this.openBuffer();
};
- OnErrorResumeNextSubscriber.prototype.subscribeToNextSource = function () {
- var next = this.nextSources.shift();
- if (!!next) {
- var innerSubscriber = new _InnerSubscriber__WEBPACK_IMPORTED_MODULE_4__["InnerSubscriber"](this, undefined, undefined);
- var destination = this.destination;
- destination.add(innerSubscriber);
- Object(_util_subscribeToResult__WEBPACK_IMPORTED_MODULE_5__["subscribeToResult"])(this, next, undefined, undefined, innerSubscriber);
+ BufferWhenSubscriber.prototype.notifyComplete = function () {
+ if (this.subscribing) {
+ this.complete();
}
else {
- this.destination.complete();
+ this.openBuffer();
}
};
- return OnErrorResumeNextSubscriber;
-}(_OuterSubscriber__WEBPACK_IMPORTED_MODULE_3__["OuterSubscriber"]));
-//# sourceMappingURL=onErrorResumeNext.js.map
+ BufferWhenSubscriber.prototype.openBuffer = function () {
+ var closingSubscription = this.closingSubscription;
+ if (closingSubscription) {
+ this.remove(closingSubscription);
+ closingSubscription.unsubscribe();
+ }
+ var buffer = this.buffer;
+ if (this.buffer) {
+ this.destination.next(buffer);
+ }
+ this.buffer = [];
+ var closingNotifier;
+ try {
+ var closingSelector = this.closingSelector;
+ closingNotifier = closingSelector();
+ }
+ catch (err) {
+ return this.error(err);
+ }
+ closingSubscription = new _Subscription__WEBPACK_IMPORTED_MODULE_1__["Subscription"]();
+ this.closingSubscription = closingSubscription;
+ this.add(closingSubscription);
+ this.subscribing = true;
+ closingSubscription.add(Object(_util_subscribeToResult__WEBPACK_IMPORTED_MODULE_3__["subscribeToResult"])(this, closingNotifier));
+ this.subscribing = false;
+ };
+ return BufferWhenSubscriber;
+}(_OuterSubscriber__WEBPACK_IMPORTED_MODULE_2__["OuterSubscriber"]));
+//# sourceMappingURL=bufferWhen.js.map
/***/ }),
-/* 287 */
+/* 278 */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
"use strict";
__webpack_require__.r(__webpack_exports__);
-/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "pairwise", function() { return pairwise; });
+/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "catchError", function() { return catchError; });
/* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(36);
-/* harmony import */ var _Subscriber__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(172);
-/** PURE_IMPORTS_START tslib,_Subscriber PURE_IMPORTS_END */
+/* harmony import */ var _OuterSubscriber__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(229);
+/* harmony import */ var _InnerSubscriber__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(231);
+/* harmony import */ var _util_subscribeToResult__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(230);
+/** PURE_IMPORTS_START tslib,_OuterSubscriber,_InnerSubscriber,_util_subscribeToResult PURE_IMPORTS_END */
-function pairwise() {
- return function (source) { return source.lift(new PairwiseOperator()); };
+
+
+function catchError(selector) {
+ return function catchErrorOperatorFunction(source) {
+ var operator = new CatchOperator(selector);
+ var caught = source.lift(operator);
+ return (operator.caught = caught);
+ };
}
-var PairwiseOperator = /*@__PURE__*/ (function () {
- function PairwiseOperator() {
+var CatchOperator = /*@__PURE__*/ (function () {
+ function CatchOperator(selector) {
+ this.selector = selector;
}
- PairwiseOperator.prototype.call = function (subscriber, source) {
- return source.subscribe(new PairwiseSubscriber(subscriber));
+ CatchOperator.prototype.call = function (subscriber, source) {
+ return source.subscribe(new CatchSubscriber(subscriber, this.selector, this.caught));
};
- return PairwiseOperator;
+ return CatchOperator;
}());
-var PairwiseSubscriber = /*@__PURE__*/ (function (_super) {
- tslib__WEBPACK_IMPORTED_MODULE_0__["__extends"](PairwiseSubscriber, _super);
- function PairwiseSubscriber(destination) {
+var CatchSubscriber = /*@__PURE__*/ (function (_super) {
+ tslib__WEBPACK_IMPORTED_MODULE_0__["__extends"](CatchSubscriber, _super);
+ function CatchSubscriber(destination, selector, caught) {
var _this = _super.call(this, destination) || this;
- _this.hasPrev = false;
+ _this.selector = selector;
+ _this.caught = caught;
return _this;
}
- PairwiseSubscriber.prototype._next = function (value) {
- var pair;
- if (this.hasPrev) {
- pair = [this.prev, value];
- }
- else {
- this.hasPrev = true;
- }
- this.prev = value;
- if (pair) {
- this.destination.next(pair);
+ CatchSubscriber.prototype.error = function (err) {
+ if (!this.isStopped) {
+ var result = void 0;
+ try {
+ result = this.selector(err, this.caught);
+ }
+ catch (err2) {
+ _super.prototype.error.call(this, err2);
+ return;
+ }
+ this._unsubscribeAndRecycle();
+ var innerSubscriber = new _InnerSubscriber__WEBPACK_IMPORTED_MODULE_2__["InnerSubscriber"](this, undefined, undefined);
+ this.add(innerSubscriber);
+ Object(_util_subscribeToResult__WEBPACK_IMPORTED_MODULE_3__["subscribeToResult"])(this, result, undefined, undefined, innerSubscriber);
}
};
- return PairwiseSubscriber;
-}(_Subscriber__WEBPACK_IMPORTED_MODULE_1__["Subscriber"]));
-//# sourceMappingURL=pairwise.js.map
+ return CatchSubscriber;
+}(_OuterSubscriber__WEBPACK_IMPORTED_MODULE_1__["OuterSubscriber"]));
+//# sourceMappingURL=catchError.js.map
/***/ }),
-/* 288 */
+/* 279 */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
"use strict";
__webpack_require__.r(__webpack_exports__);
-/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "partition", function() { return partition; });
-/* harmony import */ var _util_not__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(289);
-/* harmony import */ var _filter__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(251);
-/** PURE_IMPORTS_START _util_not,_filter PURE_IMPORTS_END */
-
+/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "combineAll", function() { return combineAll; });
+/* harmony import */ var _observable_combineLatest__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(228);
+/** PURE_IMPORTS_START _observable_combineLatest PURE_IMPORTS_END */
-function partition(predicate, thisArg) {
- return function (source) {
- return [
- Object(_filter__WEBPACK_IMPORTED_MODULE_1__["filter"])(predicate, thisArg)(source),
- Object(_filter__WEBPACK_IMPORTED_MODULE_1__["filter"])(Object(_util_not__WEBPACK_IMPORTED_MODULE_0__["not"])(predicate, thisArg))(source)
- ];
- };
+function combineAll(project) {
+ return function (source) { return source.lift(new _observable_combineLatest__WEBPACK_IMPORTED_MODULE_0__["CombineLatestOperator"](project)); };
}
-//# sourceMappingURL=partition.js.map
+//# sourceMappingURL=combineAll.js.map
/***/ }),
-/* 289 */
+/* 280 */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
"use strict";
__webpack_require__.r(__webpack_exports__);
-/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "not", function() { return not; });
-/** PURE_IMPORTS_START PURE_IMPORTS_END */
-function not(pred, thisArg) {
- function notPred() {
- return !(notPred.pred.apply(notPred.thisArg, arguments));
+/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "combineLatest", function() { return combineLatest; });
+/* harmony import */ var _util_isArray__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(178);
+/* harmony import */ var _observable_combineLatest__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(228);
+/* harmony import */ var _observable_from__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(243);
+/** PURE_IMPORTS_START _util_isArray,_observable_combineLatest,_observable_from PURE_IMPORTS_END */
+
+
+
+var none = {};
+function combineLatest() {
+ var observables = [];
+ for (var _i = 0; _i < arguments.length; _i++) {
+ observables[_i] = arguments[_i];
}
- notPred.pred = pred;
- notPred.thisArg = thisArg;
- return notPred;
+ var project = null;
+ if (typeof observables[observables.length - 1] === 'function') {
+ project = observables.pop();
+ }
+ if (observables.length === 1 && Object(_util_isArray__WEBPACK_IMPORTED_MODULE_0__["isArray"])(observables[0])) {
+ observables = observables[0].slice();
+ }
+ return function (source) { return source.lift.call(Object(_observable_from__WEBPACK_IMPORTED_MODULE_2__["from"])([source].concat(observables)), new _observable_combineLatest__WEBPACK_IMPORTED_MODULE_1__["CombineLatestOperator"](project)); };
}
-//# sourceMappingURL=not.js.map
+//# sourceMappingURL=combineLatest.js.map
/***/ }),
-/* 290 */
+/* 281 */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
"use strict";
__webpack_require__.r(__webpack_exports__);
-/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "pluck", function() { return pluck; });
-/* harmony import */ var _map__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(231);
-/** PURE_IMPORTS_START _map PURE_IMPORTS_END */
+/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "concat", function() { return concat; });
+/* harmony import */ var _observable_concat__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(239);
+/** PURE_IMPORTS_START _observable_concat PURE_IMPORTS_END */
-function pluck() {
- var properties = [];
+function concat() {
+ var observables = [];
for (var _i = 0; _i < arguments.length; _i++) {
- properties[_i] = arguments[_i];
- }
- var length = properties.length;
- if (length === 0) {
- throw new Error('list of properties cannot be empty.');
+ observables[_i] = arguments[_i];
}
- return function (source) { return Object(_map__WEBPACK_IMPORTED_MODULE_0__["map"])(plucker(properties, length))(source); };
-}
-function plucker(props, length) {
- var mapper = function (x) {
- var currentProp = x;
- for (var i = 0; i < length; i++) {
- var p = currentProp[props[i]];
- if (typeof p !== 'undefined') {
- currentProp = p;
- }
- else {
- return undefined;
- }
- }
- return currentProp;
- };
- return mapper;
+ return function (source) { return source.lift.call(_observable_concat__WEBPACK_IMPORTED_MODULE_0__["concat"].apply(void 0, [source].concat(observables))); };
}
-//# sourceMappingURL=pluck.js.map
+//# sourceMappingURL=concat.js.map
/***/ }),
-/* 291 */
+/* 282 */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
"use strict";
__webpack_require__.r(__webpack_exports__);
-/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "publish", function() { return publish; });
-/* harmony import */ var _Subject__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(265);
-/* harmony import */ var _multicast__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(282);
-/** PURE_IMPORTS_START _Subject,_multicast PURE_IMPORTS_END */
-
+/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "concatMap", function() { return concatMap; });
+/* harmony import */ var _mergeMap__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(242);
+/** PURE_IMPORTS_START _mergeMap PURE_IMPORTS_END */
-function publish(selector) {
- return selector ?
- Object(_multicast__WEBPACK_IMPORTED_MODULE_1__["multicast"])(function () { return new _Subject__WEBPACK_IMPORTED_MODULE_0__["Subject"](); }, selector) :
- Object(_multicast__WEBPACK_IMPORTED_MODULE_1__["multicast"])(new _Subject__WEBPACK_IMPORTED_MODULE_0__["Subject"]());
+function concatMap(project, resultSelector) {
+ return Object(_mergeMap__WEBPACK_IMPORTED_MODULE_0__["mergeMap"])(project, resultSelector, 1);
}
-//# sourceMappingURL=publish.js.map
+//# sourceMappingURL=concatMap.js.map
/***/ }),
-/* 292 */
+/* 283 */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
"use strict";
__webpack_require__.r(__webpack_exports__);
-/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "publishBehavior", function() { return publishBehavior; });
-/* harmony import */ var _BehaviorSubject__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(293);
-/* harmony import */ var _multicast__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(282);
-/** PURE_IMPORTS_START _BehaviorSubject,_multicast PURE_IMPORTS_END */
-
+/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "concatMapTo", function() { return concatMapTo; });
+/* harmony import */ var _concatMap__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(282);
+/** PURE_IMPORTS_START _concatMap PURE_IMPORTS_END */
-function publishBehavior(value) {
- return function (source) { return Object(_multicast__WEBPACK_IMPORTED_MODULE_1__["multicast"])(new _BehaviorSubject__WEBPACK_IMPORTED_MODULE_0__["BehaviorSubject"](value))(source); };
+function concatMapTo(innerObservable, resultSelector) {
+ return Object(_concatMap__WEBPACK_IMPORTED_MODULE_0__["concatMap"])(function () { return innerObservable; }, resultSelector);
}
-//# sourceMappingURL=publishBehavior.js.map
+//# sourceMappingURL=concatMapTo.js.map
/***/ }),
-/* 293 */
+/* 284 */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
"use strict";
__webpack_require__.r(__webpack_exports__);
-/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "BehaviorSubject", function() { return BehaviorSubject; });
+/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "count", function() { return count; });
/* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(36);
-/* harmony import */ var _Subject__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(265);
-/* harmony import */ var _util_ObjectUnsubscribedError__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(266);
-/** PURE_IMPORTS_START tslib,_Subject,_util_ObjectUnsubscribedError PURE_IMPORTS_END */
-
+/* harmony import */ var _Subscriber__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(172);
+/** PURE_IMPORTS_START tslib,_Subscriber PURE_IMPORTS_END */
-var BehaviorSubject = /*@__PURE__*/ (function (_super) {
- tslib__WEBPACK_IMPORTED_MODULE_0__["__extends"](BehaviorSubject, _super);
- function BehaviorSubject(_value) {
- var _this = _super.call(this) || this;
- _this._value = _value;
+function count(predicate) {
+ return function (source) { return source.lift(new CountOperator(predicate, source)); };
+}
+var CountOperator = /*@__PURE__*/ (function () {
+ function CountOperator(predicate, source) {
+ this.predicate = predicate;
+ this.source = source;
+ }
+ CountOperator.prototype.call = function (subscriber, source) {
+ return source.subscribe(new CountSubscriber(subscriber, this.predicate, this.source));
+ };
+ return CountOperator;
+}());
+var CountSubscriber = /*@__PURE__*/ (function (_super) {
+ tslib__WEBPACK_IMPORTED_MODULE_0__["__extends"](CountSubscriber, _super);
+ function CountSubscriber(destination, predicate, source) {
+ var _this = _super.call(this, destination) || this;
+ _this.predicate = predicate;
+ _this.source = source;
+ _this.count = 0;
+ _this.index = 0;
return _this;
}
- Object.defineProperty(BehaviorSubject.prototype, "value", {
- get: function () {
- return this.getValue();
- },
- enumerable: true,
- configurable: true
- });
- BehaviorSubject.prototype._subscribe = function (subscriber) {
- var subscription = _super.prototype._subscribe.call(this, subscriber);
- if (subscription && !subscription.closed) {
- subscriber.next(this._value);
+ CountSubscriber.prototype._next = function (value) {
+ if (this.predicate) {
+ this._tryPredicate(value);
+ }
+ else {
+ this.count++;
}
- return subscription;
};
- BehaviorSubject.prototype.getValue = function () {
- if (this.hasError) {
- throw this.thrownError;
+ CountSubscriber.prototype._tryPredicate = function (value) {
+ var result;
+ try {
+ result = this.predicate(value, this.index++, this.source);
}
- else if (this.closed) {
- throw new _util_ObjectUnsubscribedError__WEBPACK_IMPORTED_MODULE_2__["ObjectUnsubscribedError"]();
+ catch (err) {
+ this.destination.error(err);
+ return;
}
- else {
- return this._value;
+ if (result) {
+ this.count++;
}
};
- BehaviorSubject.prototype.next = function (value) {
- _super.prototype.next.call(this, this._value = value);
+ CountSubscriber.prototype._complete = function () {
+ this.destination.next(this.count);
+ this.destination.complete();
};
- return BehaviorSubject;
-}(_Subject__WEBPACK_IMPORTED_MODULE_1__["Subject"]));
-
-//# sourceMappingURL=BehaviorSubject.js.map
+ return CountSubscriber;
+}(_Subscriber__WEBPACK_IMPORTED_MODULE_1__["Subscriber"]));
+//# sourceMappingURL=count.js.map
/***/ }),
-/* 294 */
+/* 285 */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
"use strict";
__webpack_require__.r(__webpack_exports__);
-/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "publishLast", function() { return publishLast; });
-/* harmony import */ var _AsyncSubject__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(295);
-/* harmony import */ var _multicast__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(282);
-/** PURE_IMPORTS_START _AsyncSubject,_multicast PURE_IMPORTS_END */
-
-
-function publishLast() {
- return function (source) { return Object(_multicast__WEBPACK_IMPORTED_MODULE_1__["multicast"])(new _AsyncSubject__WEBPACK_IMPORTED_MODULE_0__["AsyncSubject"]())(source); };
-}
-//# sourceMappingURL=publishLast.js.map
+/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "debounce", function() { return debounce; });
+/* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(36);
+/* harmony import */ var _OuterSubscriber__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(229);
+/* harmony import */ var _util_subscribeToResult__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(230);
+/** PURE_IMPORTS_START tslib,_OuterSubscriber,_util_subscribeToResult PURE_IMPORTS_END */
-/***/ }),
-/* 295 */
-/***/ (function(module, __webpack_exports__, __webpack_require__) {
-"use strict";
-__webpack_require__.r(__webpack_exports__);
-/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "AsyncSubject", function() { return AsyncSubject; });
-/* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(36);
-/* harmony import */ var _Subject__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(265);
-/* harmony import */ var _Subscription__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(177);
-/** PURE_IMPORTS_START tslib,_Subject,_Subscription PURE_IMPORTS_END */
-
-
-
-var AsyncSubject = /*@__PURE__*/ (function (_super) {
- tslib__WEBPACK_IMPORTED_MODULE_0__["__extends"](AsyncSubject, _super);
- function AsyncSubject() {
- var _this = _super !== null && _super.apply(this, arguments) || this;
- _this.value = null;
- _this.hasNext = false;
- _this.hasCompleted = false;
+function debounce(durationSelector) {
+ return function (source) { return source.lift(new DebounceOperator(durationSelector)); };
+}
+var DebounceOperator = /*@__PURE__*/ (function () {
+ function DebounceOperator(durationSelector) {
+ this.durationSelector = durationSelector;
+ }
+ DebounceOperator.prototype.call = function (subscriber, source) {
+ return source.subscribe(new DebounceSubscriber(subscriber, this.durationSelector));
+ };
+ return DebounceOperator;
+}());
+var DebounceSubscriber = /*@__PURE__*/ (function (_super) {
+ tslib__WEBPACK_IMPORTED_MODULE_0__["__extends"](DebounceSubscriber, _super);
+ function DebounceSubscriber(destination, durationSelector) {
+ var _this = _super.call(this, destination) || this;
+ _this.durationSelector = durationSelector;
+ _this.hasValue = false;
+ _this.durationSubscription = null;
return _this;
}
- AsyncSubject.prototype._subscribe = function (subscriber) {
- if (this.hasError) {
- subscriber.error(this.thrownError);
- return _Subscription__WEBPACK_IMPORTED_MODULE_2__["Subscription"].EMPTY;
+ DebounceSubscriber.prototype._next = function (value) {
+ try {
+ var result = this.durationSelector.call(this, value);
+ if (result) {
+ this._tryNext(value, result);
+ }
}
- else if (this.hasCompleted && this.hasNext) {
- subscriber.next(this.value);
- subscriber.complete();
- return _Subscription__WEBPACK_IMPORTED_MODULE_2__["Subscription"].EMPTY;
+ catch (err) {
+ this.destination.error(err);
}
- return _super.prototype._subscribe.call(this, subscriber);
};
- AsyncSubject.prototype.next = function (value) {
- if (!this.hasCompleted) {
- this.value = value;
- this.hasNext = true;
- }
+ DebounceSubscriber.prototype._complete = function () {
+ this.emitValue();
+ this.destination.complete();
};
- AsyncSubject.prototype.error = function (error) {
- if (!this.hasCompleted) {
- _super.prototype.error.call(this, error);
+ DebounceSubscriber.prototype._tryNext = function (value, duration) {
+ var subscription = this.durationSubscription;
+ this.value = value;
+ this.hasValue = true;
+ if (subscription) {
+ subscription.unsubscribe();
+ this.remove(subscription);
+ }
+ subscription = Object(_util_subscribeToResult__WEBPACK_IMPORTED_MODULE_2__["subscribeToResult"])(this, duration);
+ if (subscription && !subscription.closed) {
+ this.add(this.durationSubscription = subscription);
}
};
- AsyncSubject.prototype.complete = function () {
- this.hasCompleted = true;
- if (this.hasNext) {
- _super.prototype.next.call(this, this.value);
+ DebounceSubscriber.prototype.notifyNext = function (outerValue, innerValue, outerIndex, innerIndex, innerSub) {
+ this.emitValue();
+ };
+ DebounceSubscriber.prototype.notifyComplete = function () {
+ this.emitValue();
+ };
+ DebounceSubscriber.prototype.emitValue = function () {
+ if (this.hasValue) {
+ var value = this.value;
+ var subscription = this.durationSubscription;
+ if (subscription) {
+ this.durationSubscription = null;
+ subscription.unsubscribe();
+ this.remove(subscription);
+ }
+ this.value = null;
+ this.hasValue = false;
+ _super.prototype._next.call(this, value);
}
- _super.prototype.complete.call(this);
};
- return AsyncSubject;
-}(_Subject__WEBPACK_IMPORTED_MODULE_1__["Subject"]));
-
-//# sourceMappingURL=AsyncSubject.js.map
-
-
-/***/ }),
-/* 296 */
-/***/ (function(module, __webpack_exports__, __webpack_require__) {
-
-"use strict";
-__webpack_require__.r(__webpack_exports__);
-/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "publishReplay", function() { return publishReplay; });
-/* harmony import */ var _ReplaySubject__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(297);
-/* harmony import */ var _multicast__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(282);
-/** PURE_IMPORTS_START _ReplaySubject,_multicast PURE_IMPORTS_END */
-
-
-function publishReplay(bufferSize, windowTime, selectorOrScheduler, scheduler) {
- if (selectorOrScheduler && typeof selectorOrScheduler !== 'function') {
- scheduler = selectorOrScheduler;
- }
- var selector = typeof selectorOrScheduler === 'function' ? selectorOrScheduler : undefined;
- var subject = new _ReplaySubject__WEBPACK_IMPORTED_MODULE_0__["ReplaySubject"](bufferSize, windowTime, scheduler);
- return function (source) { return Object(_multicast__WEBPACK_IMPORTED_MODULE_1__["multicast"])(function () { return subject; }, selector)(source); };
-}
-//# sourceMappingURL=publishReplay.js.map
+ return DebounceSubscriber;
+}(_OuterSubscriber__WEBPACK_IMPORTED_MODULE_1__["OuterSubscriber"]));
+//# sourceMappingURL=debounce.js.map
/***/ }),
-/* 297 */
+/* 286 */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
"use strict";
__webpack_require__.r(__webpack_exports__);
-/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ReplaySubject", function() { return ReplaySubject; });
+/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "debounceTime", function() { return debounceTime; });
/* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(36);
-/* harmony import */ var _Subject__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(265);
-/* harmony import */ var _scheduler_queue__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(298);
-/* harmony import */ var _Subscription__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(177);
-/* harmony import */ var _operators_observeOn__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(285);
-/* harmony import */ var _util_ObjectUnsubscribedError__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(266);
-/* harmony import */ var _SubjectSubscription__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(267);
-/** PURE_IMPORTS_START tslib,_Subject,_scheduler_queue,_Subscription,_operators_observeOn,_util_ObjectUnsubscribedError,_SubjectSubscription PURE_IMPORTS_END */
-
-
-
-
+/* harmony import */ var _Subscriber__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(172);
+/* harmony import */ var _scheduler_async__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(215);
+/** PURE_IMPORTS_START tslib,_Subscriber,_scheduler_async PURE_IMPORTS_END */
-var ReplaySubject = /*@__PURE__*/ (function (_super) {
- tslib__WEBPACK_IMPORTED_MODULE_0__["__extends"](ReplaySubject, _super);
- function ReplaySubject(bufferSize, windowTime, scheduler) {
- if (bufferSize === void 0) {
- bufferSize = Number.POSITIVE_INFINITY;
- }
- if (windowTime === void 0) {
- windowTime = Number.POSITIVE_INFINITY;
- }
- var _this = _super.call(this) || this;
+function debounceTime(dueTime, scheduler) {
+ if (scheduler === void 0) {
+ scheduler = _scheduler_async__WEBPACK_IMPORTED_MODULE_2__["async"];
+ }
+ return function (source) { return source.lift(new DebounceTimeOperator(dueTime, scheduler)); };
+}
+var DebounceTimeOperator = /*@__PURE__*/ (function () {
+ function DebounceTimeOperator(dueTime, scheduler) {
+ this.dueTime = dueTime;
+ this.scheduler = scheduler;
+ }
+ DebounceTimeOperator.prototype.call = function (subscriber, source) {
+ return source.subscribe(new DebounceTimeSubscriber(subscriber, this.dueTime, this.scheduler));
+ };
+ return DebounceTimeOperator;
+}());
+var DebounceTimeSubscriber = /*@__PURE__*/ (function (_super) {
+ tslib__WEBPACK_IMPORTED_MODULE_0__["__extends"](DebounceTimeSubscriber, _super);
+ function DebounceTimeSubscriber(destination, dueTime, scheduler) {
+ var _this = _super.call(this, destination) || this;
+ _this.dueTime = dueTime;
_this.scheduler = scheduler;
- _this._events = [];
- _this._infiniteTimeWindow = false;
- _this._bufferSize = bufferSize < 1 ? 1 : bufferSize;
- _this._windowTime = windowTime < 1 ? 1 : windowTime;
- if (windowTime === Number.POSITIVE_INFINITY) {
- _this._infiniteTimeWindow = true;
- _this.next = _this.nextInfiniteTimeWindow;
- }
- else {
- _this.next = _this.nextTimeWindow;
- }
+ _this.debouncedSubscription = null;
+ _this.lastValue = null;
+ _this.hasValue = false;
return _this;
}
- ReplaySubject.prototype.nextInfiniteTimeWindow = function (value) {
- var _events = this._events;
- _events.push(value);
- if (_events.length > this._bufferSize) {
- _events.shift();
- }
- _super.prototype.next.call(this, value);
+ DebounceTimeSubscriber.prototype._next = function (value) {
+ this.clearDebounce();
+ this.lastValue = value;
+ this.hasValue = true;
+ this.add(this.debouncedSubscription = this.scheduler.schedule(dispatchNext, this.dueTime, this));
};
- ReplaySubject.prototype.nextTimeWindow = function (value) {
- this._events.push(new ReplayEvent(this._getNow(), value));
- this._trimBufferThenGetEvents();
- _super.prototype.next.call(this, value);
+ DebounceTimeSubscriber.prototype._complete = function () {
+ this.debouncedNext();
+ this.destination.complete();
};
- ReplaySubject.prototype._subscribe = function (subscriber) {
- var _infiniteTimeWindow = this._infiniteTimeWindow;
- var _events = _infiniteTimeWindow ? this._events : this._trimBufferThenGetEvents();
- var scheduler = this.scheduler;
- var len = _events.length;
- var subscription;
- if (this.closed) {
- throw new _util_ObjectUnsubscribedError__WEBPACK_IMPORTED_MODULE_5__["ObjectUnsubscribedError"]();
- }
- else if (this.isStopped || this.hasError) {
- subscription = _Subscription__WEBPACK_IMPORTED_MODULE_3__["Subscription"].EMPTY;
- }
- else {
- this.observers.push(subscriber);
- subscription = new _SubjectSubscription__WEBPACK_IMPORTED_MODULE_6__["SubjectSubscription"](this, subscriber);
- }
- if (scheduler) {
- subscriber.add(subscriber = new _operators_observeOn__WEBPACK_IMPORTED_MODULE_4__["ObserveOnSubscriber"](subscriber, scheduler));
- }
- if (_infiniteTimeWindow) {
- for (var i = 0; i < len && !subscriber.closed; i++) {
- subscriber.next(_events[i]);
- }
- }
- else {
- for (var i = 0; i < len && !subscriber.closed; i++) {
- subscriber.next(_events[i].value);
- }
- }
- if (this.hasError) {
- subscriber.error(this.thrownError);
- }
- else if (this.isStopped) {
- subscriber.complete();
+ DebounceTimeSubscriber.prototype.debouncedNext = function () {
+ this.clearDebounce();
+ if (this.hasValue) {
+ var lastValue = this.lastValue;
+ this.lastValue = null;
+ this.hasValue = false;
+ this.destination.next(lastValue);
}
- return subscription;
- };
- ReplaySubject.prototype._getNow = function () {
- return (this.scheduler || _scheduler_queue__WEBPACK_IMPORTED_MODULE_2__["queue"]).now();
};
- ReplaySubject.prototype._trimBufferThenGetEvents = function () {
- var now = this._getNow();
- var _bufferSize = this._bufferSize;
- var _windowTime = this._windowTime;
- var _events = this._events;
- var eventsCount = _events.length;
- var spliceCount = 0;
- while (spliceCount < eventsCount) {
- if ((now - _events[spliceCount].time) < _windowTime) {
- break;
- }
- spliceCount++;
- }
- if (eventsCount > _bufferSize) {
- spliceCount = Math.max(spliceCount, eventsCount - _bufferSize);
- }
- if (spliceCount > 0) {
- _events.splice(0, spliceCount);
+ DebounceTimeSubscriber.prototype.clearDebounce = function () {
+ var debouncedSubscription = this.debouncedSubscription;
+ if (debouncedSubscription !== null) {
+ this.remove(debouncedSubscription);
+ debouncedSubscription.unsubscribe();
+ this.debouncedSubscription = null;
}
- return _events;
};
- return ReplaySubject;
-}(_Subject__WEBPACK_IMPORTED_MODULE_1__["Subject"]));
-
-var ReplayEvent = /*@__PURE__*/ (function () {
- function ReplayEvent(time, value) {
- this.time = time;
- this.value = value;
- }
- return ReplayEvent;
-}());
-//# sourceMappingURL=ReplaySubject.js.map
+ return DebounceTimeSubscriber;
+}(_Subscriber__WEBPACK_IMPORTED_MODULE_1__["Subscriber"]));
+function dispatchNext(subscriber) {
+ subscriber.debouncedNext();
+}
+//# sourceMappingURL=debounceTime.js.map
/***/ }),
-/* 298 */
+/* 287 */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
"use strict";
__webpack_require__.r(__webpack_exports__);
-/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "queue", function() { return queue; });
-/* harmony import */ var _QueueAction__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(299);
-/* harmony import */ var _QueueScheduler__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(300);
-/** PURE_IMPORTS_START _QueueAction,_QueueScheduler PURE_IMPORTS_END */
+/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "defaultIfEmpty", function() { return defaultIfEmpty; });
+/* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(36);
+/* harmony import */ var _Subscriber__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(172);
+/** PURE_IMPORTS_START tslib,_Subscriber PURE_IMPORTS_END */
-var queue = /*@__PURE__*/ new _QueueScheduler__WEBPACK_IMPORTED_MODULE_1__["QueueScheduler"](_QueueAction__WEBPACK_IMPORTED_MODULE_0__["QueueAction"]);
-//# sourceMappingURL=queue.js.map
+function defaultIfEmpty(defaultValue) {
+ if (defaultValue === void 0) {
+ defaultValue = null;
+ }
+ return function (source) { return source.lift(new DefaultIfEmptyOperator(defaultValue)); };
+}
+var DefaultIfEmptyOperator = /*@__PURE__*/ (function () {
+ function DefaultIfEmptyOperator(defaultValue) {
+ this.defaultValue = defaultValue;
+ }
+ DefaultIfEmptyOperator.prototype.call = function (subscriber, source) {
+ return source.subscribe(new DefaultIfEmptySubscriber(subscriber, this.defaultValue));
+ };
+ return DefaultIfEmptyOperator;
+}());
+var DefaultIfEmptySubscriber = /*@__PURE__*/ (function (_super) {
+ tslib__WEBPACK_IMPORTED_MODULE_0__["__extends"](DefaultIfEmptySubscriber, _super);
+ function DefaultIfEmptySubscriber(destination, defaultValue) {
+ var _this = _super.call(this, destination) || this;
+ _this.defaultValue = defaultValue;
+ _this.isEmpty = true;
+ return _this;
+ }
+ DefaultIfEmptySubscriber.prototype._next = function (value) {
+ this.isEmpty = false;
+ this.destination.next(value);
+ };
+ DefaultIfEmptySubscriber.prototype._complete = function () {
+ if (this.isEmpty) {
+ this.destination.next(this.defaultValue);
+ }
+ this.destination.complete();
+ };
+ return DefaultIfEmptySubscriber;
+}(_Subscriber__WEBPACK_IMPORTED_MODULE_1__["Subscriber"]));
+//# sourceMappingURL=defaultIfEmpty.js.map
/***/ }),
-/* 299 */
+/* 288 */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
"use strict";
__webpack_require__.r(__webpack_exports__);
-/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "QueueAction", function() { return QueueAction; });
+/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "delay", function() { return delay; });
/* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(36);
-/* harmony import */ var _AsyncAction__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(200);
-/** PURE_IMPORTS_START tslib,_AsyncAction PURE_IMPORTS_END */
+/* harmony import */ var _scheduler_async__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(215);
+/* harmony import */ var _util_isDate__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(289);
+/* harmony import */ var _Subscriber__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(172);
+/* harmony import */ var _Notification__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(202);
+/** PURE_IMPORTS_START tslib,_scheduler_async,_util_isDate,_Subscriber,_Notification PURE_IMPORTS_END */
-var QueueAction = /*@__PURE__*/ (function (_super) {
- tslib__WEBPACK_IMPORTED_MODULE_0__["__extends"](QueueAction, _super);
- function QueueAction(scheduler, work) {
- var _this = _super.call(this, scheduler, work) || this;
+
+
+
+function delay(delay, scheduler) {
+ if (scheduler === void 0) {
+ scheduler = _scheduler_async__WEBPACK_IMPORTED_MODULE_1__["async"];
+ }
+ var absoluteDelay = Object(_util_isDate__WEBPACK_IMPORTED_MODULE_2__["isDate"])(delay);
+ var delayFor = absoluteDelay ? (+delay - scheduler.now()) : Math.abs(delay);
+ return function (source) { return source.lift(new DelayOperator(delayFor, scheduler)); };
+}
+var DelayOperator = /*@__PURE__*/ (function () {
+ function DelayOperator(delay, scheduler) {
+ this.delay = delay;
+ this.scheduler = scheduler;
+ }
+ DelayOperator.prototype.call = function (subscriber, source) {
+ return source.subscribe(new DelaySubscriber(subscriber, this.delay, this.scheduler));
+ };
+ return DelayOperator;
+}());
+var DelaySubscriber = /*@__PURE__*/ (function (_super) {
+ tslib__WEBPACK_IMPORTED_MODULE_0__["__extends"](DelaySubscriber, _super);
+ function DelaySubscriber(destination, delay, scheduler) {
+ var _this = _super.call(this, destination) || this;
+ _this.delay = delay;
_this.scheduler = scheduler;
- _this.work = work;
+ _this.queue = [];
+ _this.active = false;
+ _this.errored = false;
return _this;
}
- QueueAction.prototype.schedule = function (state, delay) {
- if (delay === void 0) {
- delay = 0;
+ DelaySubscriber.dispatch = function (state) {
+ var source = state.source;
+ var queue = source.queue;
+ var scheduler = state.scheduler;
+ var destination = state.destination;
+ while (queue.length > 0 && (queue[0].time - scheduler.now()) <= 0) {
+ queue.shift().notification.observe(destination);
}
- if (delay > 0) {
- return _super.prototype.schedule.call(this, state, delay);
+ if (queue.length > 0) {
+ var delay_1 = Math.max(0, queue[0].time - scheduler.now());
+ this.schedule(state, delay_1);
+ }
+ else {
+ this.unsubscribe();
+ source.active = false;
}
- this.delay = delay;
- this.state = state;
- this.scheduler.flush(this);
- return this;
};
- QueueAction.prototype.execute = function (state, delay) {
- return (delay > 0 || this.closed) ?
- _super.prototype.execute.call(this, state, delay) :
- this._execute(state, delay);
+ DelaySubscriber.prototype._schedule = function (scheduler) {
+ this.active = true;
+ var destination = this.destination;
+ destination.add(scheduler.schedule(DelaySubscriber.dispatch, this.delay, {
+ source: this, destination: this.destination, scheduler: scheduler
+ }));
};
- QueueAction.prototype.requestAsyncId = function (scheduler, id, delay) {
- if (delay === void 0) {
- delay = 0;
+ DelaySubscriber.prototype.scheduleNotification = function (notification) {
+ if (this.errored === true) {
+ return;
}
- if ((delay !== null && delay > 0) || (delay === null && this.delay > 0)) {
- return _super.prototype.requestAsyncId.call(this, scheduler, id, delay);
+ var scheduler = this.scheduler;
+ var message = new DelayMessage(scheduler.now() + this.delay, notification);
+ this.queue.push(message);
+ if (this.active === false) {
+ this._schedule(scheduler);
}
- return scheduler.flush(this);
};
- return QueueAction;
-}(_AsyncAction__WEBPACK_IMPORTED_MODULE_1__["AsyncAction"]));
-
-//# sourceMappingURL=QueueAction.js.map
-
-
-/***/ }),
-/* 300 */
-/***/ (function(module, __webpack_exports__, __webpack_require__) {
-
-"use strict";
-__webpack_require__.r(__webpack_exports__);
-/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "QueueScheduler", function() { return QueueScheduler; });
-/* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(36);
-/* harmony import */ var _AsyncScheduler__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(202);
-/** PURE_IMPORTS_START tslib,_AsyncScheduler PURE_IMPORTS_END */
-
-
-var QueueScheduler = /*@__PURE__*/ (function (_super) {
- tslib__WEBPACK_IMPORTED_MODULE_0__["__extends"](QueueScheduler, _super);
- function QueueScheduler() {
- return _super !== null && _super.apply(this, arguments) || this;
+ DelaySubscriber.prototype._next = function (value) {
+ this.scheduleNotification(_Notification__WEBPACK_IMPORTED_MODULE_4__["Notification"].createNext(value));
+ };
+ DelaySubscriber.prototype._error = function (err) {
+ this.errored = true;
+ this.queue = [];
+ this.destination.error(err);
+ this.unsubscribe();
+ };
+ DelaySubscriber.prototype._complete = function () {
+ this.scheduleNotification(_Notification__WEBPACK_IMPORTED_MODULE_4__["Notification"].createComplete());
+ this.unsubscribe();
+ };
+ return DelaySubscriber;
+}(_Subscriber__WEBPACK_IMPORTED_MODULE_3__["Subscriber"]));
+var DelayMessage = /*@__PURE__*/ (function () {
+ function DelayMessage(time, notification) {
+ this.time = time;
+ this.notification = notification;
}
- return QueueScheduler;
-}(_AsyncScheduler__WEBPACK_IMPORTED_MODULE_1__["AsyncScheduler"]));
-
-//# sourceMappingURL=QueueScheduler.js.map
+ return DelayMessage;
+}());
+//# sourceMappingURL=delay.js.map
/***/ }),
-/* 301 */
+/* 289 */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
"use strict";
__webpack_require__.r(__webpack_exports__);
-/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "race", function() { return race; });
-/* harmony import */ var _util_isArray__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(178);
-/* harmony import */ var _observable_race__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(302);
-/** PURE_IMPORTS_START _util_isArray,_observable_race PURE_IMPORTS_END */
-
-
-function race() {
- var observables = [];
- for (var _i = 0; _i < arguments.length; _i++) {
- observables[_i] = arguments[_i];
- }
- return function raceOperatorFunction(source) {
- if (observables.length === 1 && Object(_util_isArray__WEBPACK_IMPORTED_MODULE_0__["isArray"])(observables[0])) {
- observables = observables[0];
- }
- return source.lift.call(_observable_race__WEBPACK_IMPORTED_MODULE_1__["race"].apply(void 0, [source].concat(observables)));
- };
+/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "isDate", function() { return isDate; });
+/** PURE_IMPORTS_START PURE_IMPORTS_END */
+function isDate(value) {
+ return value instanceof Date && !isNaN(+value);
}
-//# sourceMappingURL=race.js.map
+//# sourceMappingURL=isDate.js.map
/***/ }),
-/* 302 */
+/* 290 */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
"use strict";
__webpack_require__.r(__webpack_exports__);
-/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "race", function() { return race; });
-/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "RaceOperator", function() { return RaceOperator; });
-/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "RaceSubscriber", function() { return RaceSubscriber; });
+/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "delayWhen", function() { return delayWhen; });
/* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(36);
-/* harmony import */ var _util_isArray__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(178);
-/* harmony import */ var _fromArray__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(215);
-/* harmony import */ var _OuterSubscriber__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(171);
-/* harmony import */ var _util_subscribeToResult__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(182);
-/** PURE_IMPORTS_START tslib,_util_isArray,_fromArray,_OuterSubscriber,_util_subscribeToResult PURE_IMPORTS_END */
+/* harmony import */ var _Subscriber__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(172);
+/* harmony import */ var _Observable__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(170);
+/* harmony import */ var _OuterSubscriber__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(229);
+/* harmony import */ var _util_subscribeToResult__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(230);
+/** PURE_IMPORTS_START tslib,_Subscriber,_Observable,_OuterSubscriber,_util_subscribeToResult PURE_IMPORTS_END */
-function race() {
- var observables = [];
- for (var _i = 0; _i < arguments.length; _i++) {
- observables[_i] = arguments[_i];
+function delayWhen(delayDurationSelector, subscriptionDelay) {
+ if (subscriptionDelay) {
+ return function (source) {
+ return new SubscriptionDelayObservable(source, subscriptionDelay)
+ .lift(new DelayWhenOperator(delayDurationSelector));
+ };
}
- if (observables.length === 1) {
- if (Object(_util_isArray__WEBPACK_IMPORTED_MODULE_1__["isArray"])(observables[0])) {
- observables = observables[0];
- }
- else {
- return observables[0];
- }
- }
- return Object(_fromArray__WEBPACK_IMPORTED_MODULE_2__["fromArray"])(observables, undefined).lift(new RaceOperator());
+ return function (source) { return source.lift(new DelayWhenOperator(delayDurationSelector)); };
}
-var RaceOperator = /*@__PURE__*/ (function () {
- function RaceOperator() {
+var DelayWhenOperator = /*@__PURE__*/ (function () {
+ function DelayWhenOperator(delayDurationSelector) {
+ this.delayDurationSelector = delayDurationSelector;
}
- RaceOperator.prototype.call = function (subscriber, source) {
- return source.subscribe(new RaceSubscriber(subscriber));
+ DelayWhenOperator.prototype.call = function (subscriber, source) {
+ return source.subscribe(new DelayWhenSubscriber(subscriber, this.delayDurationSelector));
};
- return RaceOperator;
+ return DelayWhenOperator;
}());
-
-var RaceSubscriber = /*@__PURE__*/ (function (_super) {
- tslib__WEBPACK_IMPORTED_MODULE_0__["__extends"](RaceSubscriber, _super);
- function RaceSubscriber(destination) {
+var DelayWhenSubscriber = /*@__PURE__*/ (function (_super) {
+ tslib__WEBPACK_IMPORTED_MODULE_0__["__extends"](DelayWhenSubscriber, _super);
+ function DelayWhenSubscriber(destination, delayDurationSelector) {
var _this = _super.call(this, destination) || this;
- _this.hasFirst = false;
- _this.observables = [];
- _this.subscriptions = [];
+ _this.delayDurationSelector = delayDurationSelector;
+ _this.completed = false;
+ _this.delayNotifierSubscriptions = [];
+ _this.index = 0;
return _this;
}
- RaceSubscriber.prototype._next = function (observable) {
- this.observables.push(observable);
+ DelayWhenSubscriber.prototype.notifyNext = function (outerValue, innerValue, outerIndex, innerIndex, innerSub) {
+ this.destination.next(outerValue);
+ this.removeSubscription(innerSub);
+ this.tryComplete();
};
- RaceSubscriber.prototype._complete = function () {
- var observables = this.observables;
- var len = observables.length;
- if (len === 0) {
- this.destination.complete();
+ DelayWhenSubscriber.prototype.notifyError = function (error, innerSub) {
+ this._error(error);
+ };
+ DelayWhenSubscriber.prototype.notifyComplete = function (innerSub) {
+ var value = this.removeSubscription(innerSub);
+ if (value) {
+ this.destination.next(value);
}
- else {
- for (var i = 0; i < len && !this.hasFirst; i++) {
- var observable = observables[i];
- var subscription = Object(_util_subscribeToResult__WEBPACK_IMPORTED_MODULE_4__["subscribeToResult"])(this, observable, observable, i);
- if (this.subscriptions) {
- this.subscriptions.push(subscription);
- }
- this.add(subscription);
+ this.tryComplete();
+ };
+ DelayWhenSubscriber.prototype._next = function (value) {
+ var index = this.index++;
+ try {
+ var delayNotifier = this.delayDurationSelector(value, index);
+ if (delayNotifier) {
+ this.tryDelay(delayNotifier, value);
}
- this.observables = null;
+ }
+ catch (err) {
+ this.destination.error(err);
}
};
- RaceSubscriber.prototype.notifyNext = function (outerValue, innerValue, outerIndex, innerIndex, innerSub) {
- if (!this.hasFirst) {
- this.hasFirst = true;
- for (var i = 0; i < this.subscriptions.length; i++) {
- if (i !== outerIndex) {
- var subscription = this.subscriptions[i];
- subscription.unsubscribe();
- this.remove(subscription);
- }
- }
- this.subscriptions = null;
+ DelayWhenSubscriber.prototype._complete = function () {
+ this.completed = true;
+ this.tryComplete();
+ this.unsubscribe();
+ };
+ DelayWhenSubscriber.prototype.removeSubscription = function (subscription) {
+ subscription.unsubscribe();
+ var subscriptionIdx = this.delayNotifierSubscriptions.indexOf(subscription);
+ if (subscriptionIdx !== -1) {
+ this.delayNotifierSubscriptions.splice(subscriptionIdx, 1);
}
- this.destination.next(innerValue);
+ return subscription.outerValue;
};
- return RaceSubscriber;
+ DelayWhenSubscriber.prototype.tryDelay = function (delayNotifier, value) {
+ var notifierSubscription = Object(_util_subscribeToResult__WEBPACK_IMPORTED_MODULE_4__["subscribeToResult"])(this, delayNotifier, value);
+ if (notifierSubscription && !notifierSubscription.closed) {
+ var destination = this.destination;
+ destination.add(notifierSubscription);
+ this.delayNotifierSubscriptions.push(notifierSubscription);
+ }
+ };
+ DelayWhenSubscriber.prototype.tryComplete = function () {
+ if (this.completed && this.delayNotifierSubscriptions.length === 0) {
+ this.destination.complete();
+ }
+ };
+ return DelayWhenSubscriber;
}(_OuterSubscriber__WEBPACK_IMPORTED_MODULE_3__["OuterSubscriber"]));
-
-//# sourceMappingURL=race.js.map
+var SubscriptionDelayObservable = /*@__PURE__*/ (function (_super) {
+ tslib__WEBPACK_IMPORTED_MODULE_0__["__extends"](SubscriptionDelayObservable, _super);
+ function SubscriptionDelayObservable(source, subscriptionDelay) {
+ var _this = _super.call(this) || this;
+ _this.source = source;
+ _this.subscriptionDelay = subscriptionDelay;
+ return _this;
+ }
+ SubscriptionDelayObservable.prototype._subscribe = function (subscriber) {
+ this.subscriptionDelay.subscribe(new SubscriptionDelaySubscriber(subscriber, this.source));
+ };
+ return SubscriptionDelayObservable;
+}(_Observable__WEBPACK_IMPORTED_MODULE_2__["Observable"]));
+var SubscriptionDelaySubscriber = /*@__PURE__*/ (function (_super) {
+ tslib__WEBPACK_IMPORTED_MODULE_0__["__extends"](SubscriptionDelaySubscriber, _super);
+ function SubscriptionDelaySubscriber(parent, source) {
+ var _this = _super.call(this) || this;
+ _this.parent = parent;
+ _this.source = source;
+ _this.sourceSubscribed = false;
+ return _this;
+ }
+ SubscriptionDelaySubscriber.prototype._next = function (unused) {
+ this.subscribeToSource();
+ };
+ SubscriptionDelaySubscriber.prototype._error = function (err) {
+ this.unsubscribe();
+ this.parent.error(err);
+ };
+ SubscriptionDelaySubscriber.prototype._complete = function () {
+ this.unsubscribe();
+ this.subscribeToSource();
+ };
+ SubscriptionDelaySubscriber.prototype.subscribeToSource = function () {
+ if (!this.sourceSubscribed) {
+ this.sourceSubscribed = true;
+ this.unsubscribe();
+ this.source.subscribe(this.parent);
+ }
+ };
+ return SubscriptionDelaySubscriber;
+}(_Subscriber__WEBPACK_IMPORTED_MODULE_1__["Subscriber"]));
+//# sourceMappingURL=delayWhen.js.map
/***/ }),
-/* 303 */
+/* 291 */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
"use strict";
__webpack_require__.r(__webpack_exports__);
-/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "repeat", function() { return repeat; });
+/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "dematerialize", function() { return dematerialize; });
/* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(36);
/* harmony import */ var _Subscriber__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(172);
-/* harmony import */ var _observable_empty__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(242);
-/** PURE_IMPORTS_START tslib,_Subscriber,_observable_empty PURE_IMPORTS_END */
-
+/** PURE_IMPORTS_START tslib,_Subscriber PURE_IMPORTS_END */
-function repeat(count) {
- if (count === void 0) {
- count = -1;
- }
- return function (source) {
- if (count === 0) {
- return Object(_observable_empty__WEBPACK_IMPORTED_MODULE_2__["empty"])();
- }
- else if (count < 0) {
- return source.lift(new RepeatOperator(-1, source));
- }
- else {
- return source.lift(new RepeatOperator(count - 1, source));
- }
+function dematerialize() {
+ return function dematerializeOperatorFunction(source) {
+ return source.lift(new DeMaterializeOperator());
};
}
-var RepeatOperator = /*@__PURE__*/ (function () {
- function RepeatOperator(count, source) {
- this.count = count;
- this.source = source;
+var DeMaterializeOperator = /*@__PURE__*/ (function () {
+ function DeMaterializeOperator() {
}
- RepeatOperator.prototype.call = function (subscriber, source) {
- return source.subscribe(new RepeatSubscriber(subscriber, this.count, this.source));
+ DeMaterializeOperator.prototype.call = function (subscriber, source) {
+ return source.subscribe(new DeMaterializeSubscriber(subscriber));
};
- return RepeatOperator;
+ return DeMaterializeOperator;
}());
-var RepeatSubscriber = /*@__PURE__*/ (function (_super) {
- tslib__WEBPACK_IMPORTED_MODULE_0__["__extends"](RepeatSubscriber, _super);
- function RepeatSubscriber(destination, count, source) {
- var _this = _super.call(this, destination) || this;
- _this.count = count;
- _this.source = source;
- return _this;
+var DeMaterializeSubscriber = /*@__PURE__*/ (function (_super) {
+ tslib__WEBPACK_IMPORTED_MODULE_0__["__extends"](DeMaterializeSubscriber, _super);
+ function DeMaterializeSubscriber(destination) {
+ return _super.call(this, destination) || this;
}
- RepeatSubscriber.prototype.complete = function () {
- if (!this.isStopped) {
- var _a = this, source = _a.source, count = _a.count;
- if (count === 0) {
- return _super.prototype.complete.call(this);
- }
- else if (count > -1) {
- this.count = count - 1;
- }
- source.subscribe(this._unsubscribeAndRecycle());
- }
+ DeMaterializeSubscriber.prototype._next = function (value) {
+ value.observe(this.destination);
};
- return RepeatSubscriber;
+ return DeMaterializeSubscriber;
}(_Subscriber__WEBPACK_IMPORTED_MODULE_1__["Subscriber"]));
-//# sourceMappingURL=repeat.js.map
+//# sourceMappingURL=dematerialize.js.map
/***/ }),
-/* 304 */
+/* 292 */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
"use strict";
__webpack_require__.r(__webpack_exports__);
-/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "repeatWhen", function() { return repeatWhen; });
+/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "distinct", function() { return distinct; });
+/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "DistinctSubscriber", function() { return DistinctSubscriber; });
/* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(36);
-/* harmony import */ var _Subject__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(265);
-/* harmony import */ var _OuterSubscriber__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(171);
-/* harmony import */ var _util_subscribeToResult__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(182);
-/** PURE_IMPORTS_START tslib,_Subject,_OuterSubscriber,_util_subscribeToResult PURE_IMPORTS_END */
-
+/* harmony import */ var _OuterSubscriber__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(229);
+/* harmony import */ var _util_subscribeToResult__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(230);
+/** PURE_IMPORTS_START tslib,_OuterSubscriber,_util_subscribeToResult PURE_IMPORTS_END */
-function repeatWhen(notifier) {
- return function (source) { return source.lift(new RepeatWhenOperator(notifier)); };
+function distinct(keySelector, flushes) {
+ return function (source) { return source.lift(new DistinctOperator(keySelector, flushes)); };
}
-var RepeatWhenOperator = /*@__PURE__*/ (function () {
- function RepeatWhenOperator(notifier) {
- this.notifier = notifier;
+var DistinctOperator = /*@__PURE__*/ (function () {
+ function DistinctOperator(keySelector, flushes) {
+ this.keySelector = keySelector;
+ this.flushes = flushes;
}
- RepeatWhenOperator.prototype.call = function (subscriber, source) {
- return source.subscribe(new RepeatWhenSubscriber(subscriber, this.notifier, source));
+ DistinctOperator.prototype.call = function (subscriber, source) {
+ return source.subscribe(new DistinctSubscriber(subscriber, this.keySelector, this.flushes));
};
- return RepeatWhenOperator;
+ return DistinctOperator;
}());
-var RepeatWhenSubscriber = /*@__PURE__*/ (function (_super) {
- tslib__WEBPACK_IMPORTED_MODULE_0__["__extends"](RepeatWhenSubscriber, _super);
- function RepeatWhenSubscriber(destination, notifier, source) {
+var DistinctSubscriber = /*@__PURE__*/ (function (_super) {
+ tslib__WEBPACK_IMPORTED_MODULE_0__["__extends"](DistinctSubscriber, _super);
+ function DistinctSubscriber(destination, keySelector, flushes) {
var _this = _super.call(this, destination) || this;
- _this.notifier = notifier;
- _this.source = source;
- _this.sourceIsBeingSubscribedTo = true;
+ _this.keySelector = keySelector;
+ _this.values = new Set();
+ if (flushes) {
+ _this.add(Object(_util_subscribeToResult__WEBPACK_IMPORTED_MODULE_2__["subscribeToResult"])(_this, flushes));
+ }
return _this;
}
- RepeatWhenSubscriber.prototype.notifyNext = function (outerValue, innerValue, outerIndex, innerIndex, innerSub) {
- this.sourceIsBeingSubscribedTo = true;
- this.source.subscribe(this);
- };
- RepeatWhenSubscriber.prototype.notifyComplete = function (innerSub) {
- if (this.sourceIsBeingSubscribedTo === false) {
- return _super.prototype.complete.call(this);
- }
+ DistinctSubscriber.prototype.notifyNext = function (outerValue, innerValue, outerIndex, innerIndex, innerSub) {
+ this.values.clear();
};
- RepeatWhenSubscriber.prototype.complete = function () {
- this.sourceIsBeingSubscribedTo = false;
- if (!this.isStopped) {
- if (!this.retries) {
- this.subscribeToRetries();
- }
- if (!this.retriesSubscription || this.retriesSubscription.closed) {
- return _super.prototype.complete.call(this);
- }
- this._unsubscribeAndRecycle();
- this.notifications.next();
- }
+ DistinctSubscriber.prototype.notifyError = function (error, innerSub) {
+ this._error(error);
};
- RepeatWhenSubscriber.prototype._unsubscribe = function () {
- var _a = this, notifications = _a.notifications, retriesSubscription = _a.retriesSubscription;
- if (notifications) {
- notifications.unsubscribe();
- this.notifications = null;
+ DistinctSubscriber.prototype._next = function (value) {
+ if (this.keySelector) {
+ this._useKeySelector(value);
}
- if (retriesSubscription) {
- retriesSubscription.unsubscribe();
- this.retriesSubscription = null;
+ else {
+ this._finalizeNext(value, value);
}
- this.retries = null;
- };
- RepeatWhenSubscriber.prototype._unsubscribeAndRecycle = function () {
- var _unsubscribe = this._unsubscribe;
- this._unsubscribe = null;
- _super.prototype._unsubscribeAndRecycle.call(this);
- this._unsubscribe = _unsubscribe;
- return this;
};
- RepeatWhenSubscriber.prototype.subscribeToRetries = function () {
- this.notifications = new _Subject__WEBPACK_IMPORTED_MODULE_1__["Subject"]();
- var retries;
+ DistinctSubscriber.prototype._useKeySelector = function (value) {
+ var key;
+ var destination = this.destination;
try {
- var notifier = this.notifier;
- retries = notifier(this.notifications);
+ key = this.keySelector(value);
}
- catch (e) {
- return _super.prototype.complete.call(this);
+ catch (err) {
+ destination.error(err);
+ return;
}
- this.retries = retries;
- this.retriesSubscription = Object(_util_subscribeToResult__WEBPACK_IMPORTED_MODULE_3__["subscribeToResult"])(this, retries);
+ this._finalizeNext(key, value);
};
- return RepeatWhenSubscriber;
-}(_OuterSubscriber__WEBPACK_IMPORTED_MODULE_2__["OuterSubscriber"]));
-//# sourceMappingURL=repeatWhen.js.map
+ DistinctSubscriber.prototype._finalizeNext = function (key, value) {
+ var values = this.values;
+ if (!values.has(key)) {
+ values.add(key);
+ this.destination.next(value);
+ }
+ };
+ return DistinctSubscriber;
+}(_OuterSubscriber__WEBPACK_IMPORTED_MODULE_1__["OuterSubscriber"]));
+
+//# sourceMappingURL=distinct.js.map
/***/ }),
-/* 305 */
+/* 293 */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
"use strict";
__webpack_require__.r(__webpack_exports__);
-/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "retry", function() { return retry; });
+/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "distinctUntilChanged", function() { return distinctUntilChanged; });
/* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(36);
/* harmony import */ var _Subscriber__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(172);
/** PURE_IMPORTS_START tslib,_Subscriber PURE_IMPORTS_END */
-function retry(count) {
- if (count === void 0) {
- count = -1;
- }
- return function (source) { return source.lift(new RetryOperator(count, source)); };
+function distinctUntilChanged(compare, keySelector) {
+ return function (source) { return source.lift(new DistinctUntilChangedOperator(compare, keySelector)); };
}
-var RetryOperator = /*@__PURE__*/ (function () {
- function RetryOperator(count, source) {
- this.count = count;
- this.source = source;
+var DistinctUntilChangedOperator = /*@__PURE__*/ (function () {
+ function DistinctUntilChangedOperator(compare, keySelector) {
+ this.compare = compare;
+ this.keySelector = keySelector;
}
- RetryOperator.prototype.call = function (subscriber, source) {
- return source.subscribe(new RetrySubscriber(subscriber, this.count, this.source));
+ DistinctUntilChangedOperator.prototype.call = function (subscriber, source) {
+ return source.subscribe(new DistinctUntilChangedSubscriber(subscriber, this.compare, this.keySelector));
};
- return RetryOperator;
+ return DistinctUntilChangedOperator;
}());
-var RetrySubscriber = /*@__PURE__*/ (function (_super) {
- tslib__WEBPACK_IMPORTED_MODULE_0__["__extends"](RetrySubscriber, _super);
- function RetrySubscriber(destination, count, source) {
+var DistinctUntilChangedSubscriber = /*@__PURE__*/ (function (_super) {
+ tslib__WEBPACK_IMPORTED_MODULE_0__["__extends"](DistinctUntilChangedSubscriber, _super);
+ function DistinctUntilChangedSubscriber(destination, compare, keySelector) {
var _this = _super.call(this, destination) || this;
- _this.count = count;
- _this.source = source;
+ _this.keySelector = keySelector;
+ _this.hasKey = false;
+ if (typeof compare === 'function') {
+ _this.compare = compare;
+ }
return _this;
}
- RetrySubscriber.prototype.error = function (err) {
- if (!this.isStopped) {
- var _a = this, source = _a.source, count = _a.count;
- if (count === 0) {
- return _super.prototype.error.call(this, err);
+ DistinctUntilChangedSubscriber.prototype.compare = function (x, y) {
+ return x === y;
+ };
+ DistinctUntilChangedSubscriber.prototype._next = function (value) {
+ var key;
+ try {
+ var keySelector = this.keySelector;
+ key = keySelector ? keySelector(value) : value;
+ }
+ catch (err) {
+ return this.destination.error(err);
+ }
+ var result = false;
+ if (this.hasKey) {
+ try {
+ var compare = this.compare;
+ result = compare(this.key, key);
}
- else if (count > -1) {
- this.count = count - 1;
+ catch (err) {
+ return this.destination.error(err);
}
- source.subscribe(this._unsubscribeAndRecycle());
+ }
+ else {
+ this.hasKey = true;
+ }
+ if (!result) {
+ this.key = key;
+ this.destination.next(value);
}
};
- return RetrySubscriber;
+ return DistinctUntilChangedSubscriber;
}(_Subscriber__WEBPACK_IMPORTED_MODULE_1__["Subscriber"]));
-//# sourceMappingURL=retry.js.map
+//# sourceMappingURL=distinctUntilChanged.js.map
/***/ }),
-/* 306 */
+/* 294 */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
"use strict";
__webpack_require__.r(__webpack_exports__);
-/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "retryWhen", function() { return retryWhen; });
-/* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(36);
-/* harmony import */ var _Subject__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(265);
-/* harmony import */ var _OuterSubscriber__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(171);
-/* harmony import */ var _util_subscribeToResult__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(182);
-/** PURE_IMPORTS_START tslib,_Subject,_OuterSubscriber,_util_subscribeToResult PURE_IMPORTS_END */
+/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "distinctUntilKeyChanged", function() { return distinctUntilKeyChanged; });
+/* harmony import */ var _distinctUntilChanged__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(293);
+/** PURE_IMPORTS_START _distinctUntilChanged PURE_IMPORTS_END */
+
+function distinctUntilKeyChanged(key, compare) {
+ return Object(_distinctUntilChanged__WEBPACK_IMPORTED_MODULE_0__["distinctUntilChanged"])(function (x, y) { return compare ? compare(x[key], y[key]) : x[key] === y[key]; });
+}
+//# sourceMappingURL=distinctUntilKeyChanged.js.map
+/***/ }),
+/* 295 */
+/***/ (function(module, __webpack_exports__, __webpack_require__) {
+"use strict";
+__webpack_require__.r(__webpack_exports__);
+/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "elementAt", function() { return elementAt; });
+/* harmony import */ var _util_ArgumentOutOfRangeError__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(222);
+/* harmony import */ var _filter__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(264);
+/* harmony import */ var _throwIfEmpty__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(296);
+/* harmony import */ var _defaultIfEmpty__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(287);
+/* harmony import */ var _take__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(297);
+/** PURE_IMPORTS_START _util_ArgumentOutOfRangeError,_filter,_throwIfEmpty,_defaultIfEmpty,_take PURE_IMPORTS_END */
-function retryWhen(notifier) {
- return function (source) { return source.lift(new RetryWhenOperator(notifier, source)); };
-}
-var RetryWhenOperator = /*@__PURE__*/ (function () {
- function RetryWhenOperator(notifier, source) {
- this.notifier = notifier;
- this.source = source;
- }
- RetryWhenOperator.prototype.call = function (subscriber, source) {
- return source.subscribe(new RetryWhenSubscriber(subscriber, this.notifier, this.source));
- };
- return RetryWhenOperator;
-}());
-var RetryWhenSubscriber = /*@__PURE__*/ (function (_super) {
- tslib__WEBPACK_IMPORTED_MODULE_0__["__extends"](RetryWhenSubscriber, _super);
- function RetryWhenSubscriber(destination, notifier, source) {
- var _this = _super.call(this, destination) || this;
- _this.notifier = notifier;
- _this.source = source;
- return _this;
+
+
+
+
+function elementAt(index, defaultValue) {
+ if (index < 0) {
+ throw new _util_ArgumentOutOfRangeError__WEBPACK_IMPORTED_MODULE_0__["ArgumentOutOfRangeError"]();
}
- RetryWhenSubscriber.prototype.error = function (err) {
- if (!this.isStopped) {
- var errors = this.errors;
- var retries = this.retries;
- var retriesSubscription = this.retriesSubscription;
- if (!retries) {
- errors = new _Subject__WEBPACK_IMPORTED_MODULE_1__["Subject"]();
- try {
- var notifier = this.notifier;
- retries = notifier(errors);
- }
- catch (e) {
- return _super.prototype.error.call(this, e);
- }
- retriesSubscription = Object(_util_subscribeToResult__WEBPACK_IMPORTED_MODULE_3__["subscribeToResult"])(this, retries);
- }
- else {
- this.errors = null;
- this.retriesSubscription = null;
- }
- this._unsubscribeAndRecycle();
- this.errors = errors;
- this.retries = retries;
- this.retriesSubscription = retriesSubscription;
- errors.next(err);
- }
- };
- RetryWhenSubscriber.prototype._unsubscribe = function () {
- var _a = this, errors = _a.errors, retriesSubscription = _a.retriesSubscription;
- if (errors) {
- errors.unsubscribe();
- this.errors = null;
- }
- if (retriesSubscription) {
- retriesSubscription.unsubscribe();
- this.retriesSubscription = null;
- }
- this.retries = null;
- };
- RetryWhenSubscriber.prototype.notifyNext = function (outerValue, innerValue, outerIndex, innerIndex, innerSub) {
- var _unsubscribe = this._unsubscribe;
- this._unsubscribe = null;
- this._unsubscribeAndRecycle();
- this._unsubscribe = _unsubscribe;
- this.source.subscribe(this);
+ var hasDefaultValue = arguments.length >= 2;
+ return function (source) {
+ return source.pipe(Object(_filter__WEBPACK_IMPORTED_MODULE_1__["filter"])(function (v, i) { return i === index; }), Object(_take__WEBPACK_IMPORTED_MODULE_4__["take"])(1), hasDefaultValue
+ ? Object(_defaultIfEmpty__WEBPACK_IMPORTED_MODULE_3__["defaultIfEmpty"])(defaultValue)
+ : Object(_throwIfEmpty__WEBPACK_IMPORTED_MODULE_2__["throwIfEmpty"])(function () { return new _util_ArgumentOutOfRangeError__WEBPACK_IMPORTED_MODULE_0__["ArgumentOutOfRangeError"](); }));
};
- return RetryWhenSubscriber;
-}(_OuterSubscriber__WEBPACK_IMPORTED_MODULE_2__["OuterSubscriber"]));
-//# sourceMappingURL=retryWhen.js.map
+}
+//# sourceMappingURL=elementAt.js.map
/***/ }),
-/* 307 */
+/* 296 */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
"use strict";
__webpack_require__.r(__webpack_exports__);
-/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "sample", function() { return sample; });
+/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "throwIfEmpty", function() { return throwIfEmpty; });
/* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(36);
-/* harmony import */ var _OuterSubscriber__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(171);
-/* harmony import */ var _util_subscribeToResult__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(182);
-/** PURE_IMPORTS_START tslib,_OuterSubscriber,_util_subscribeToResult PURE_IMPORTS_END */
+/* harmony import */ var _util_EmptyError__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(223);
+/* harmony import */ var _Subscriber__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(172);
+/** PURE_IMPORTS_START tslib,_util_EmptyError,_Subscriber PURE_IMPORTS_END */
-function sample(notifier) {
- return function (source) { return source.lift(new SampleOperator(notifier)); };
-}
-var SampleOperator = /*@__PURE__*/ (function () {
- function SampleOperator(notifier) {
- this.notifier = notifier;
- }
- SampleOperator.prototype.call = function (subscriber, source) {
- var sampleSubscriber = new SampleSubscriber(subscriber);
- var subscription = source.subscribe(sampleSubscriber);
- subscription.add(Object(_util_subscribeToResult__WEBPACK_IMPORTED_MODULE_2__["subscribeToResult"])(sampleSubscriber, this.notifier));
- return subscription;
- };
- return SampleOperator;
-}());
-var SampleSubscriber = /*@__PURE__*/ (function (_super) {
- tslib__WEBPACK_IMPORTED_MODULE_0__["__extends"](SampleSubscriber, _super);
- function SampleSubscriber() {
- var _this = _super !== null && _super.apply(this, arguments) || this;
- _this.hasValue = false;
- return _this;
+function throwIfEmpty(errorFactory) {
+ if (errorFactory === void 0) {
+ errorFactory = defaultErrorFactory;
}
- SampleSubscriber.prototype._next = function (value) {
- this.value = value;
- this.hasValue = true;
- };
- SampleSubscriber.prototype.notifyNext = function (outerValue, innerValue, outerIndex, innerIndex, innerSub) {
- this.emitValue();
- };
- SampleSubscriber.prototype.notifyComplete = function () {
- this.emitValue();
- };
- SampleSubscriber.prototype.emitValue = function () {
- if (this.hasValue) {
- this.hasValue = false;
- this.destination.next(this.value);
- }
+ return function (source) {
+ return source.lift(new ThrowIfEmptyOperator(errorFactory));
};
- return SampleSubscriber;
-}(_OuterSubscriber__WEBPACK_IMPORTED_MODULE_1__["OuterSubscriber"]));
-//# sourceMappingURL=sample.js.map
-
-
-/***/ }),
-/* 308 */
-/***/ (function(module, __webpack_exports__, __webpack_require__) {
-
-"use strict";
-__webpack_require__.r(__webpack_exports__);
-/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "sampleTime", function() { return sampleTime; });
-/* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(36);
-/* harmony import */ var _Subscriber__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(172);
-/* harmony import */ var _scheduler_async__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(199);
-/** PURE_IMPORTS_START tslib,_Subscriber,_scheduler_async PURE_IMPORTS_END */
-
-
-
-function sampleTime(period, scheduler) {
- if (scheduler === void 0) {
- scheduler = _scheduler_async__WEBPACK_IMPORTED_MODULE_2__["async"];
- }
- return function (source) { return source.lift(new SampleTimeOperator(period, scheduler)); };
}
-var SampleTimeOperator = /*@__PURE__*/ (function () {
- function SampleTimeOperator(period, scheduler) {
- this.period = period;
- this.scheduler = scheduler;
+var ThrowIfEmptyOperator = /*@__PURE__*/ (function () {
+ function ThrowIfEmptyOperator(errorFactory) {
+ this.errorFactory = errorFactory;
}
- SampleTimeOperator.prototype.call = function (subscriber, source) {
- return source.subscribe(new SampleTimeSubscriber(subscriber, this.period, this.scheduler));
+ ThrowIfEmptyOperator.prototype.call = function (subscriber, source) {
+ return source.subscribe(new ThrowIfEmptySubscriber(subscriber, this.errorFactory));
};
- return SampleTimeOperator;
+ return ThrowIfEmptyOperator;
}());
-var SampleTimeSubscriber = /*@__PURE__*/ (function (_super) {
- tslib__WEBPACK_IMPORTED_MODULE_0__["__extends"](SampleTimeSubscriber, _super);
- function SampleTimeSubscriber(destination, period, scheduler) {
+var ThrowIfEmptySubscriber = /*@__PURE__*/ (function (_super) {
+ tslib__WEBPACK_IMPORTED_MODULE_0__["__extends"](ThrowIfEmptySubscriber, _super);
+ function ThrowIfEmptySubscriber(destination, errorFactory) {
var _this = _super.call(this, destination) || this;
- _this.period = period;
- _this.scheduler = scheduler;
+ _this.errorFactory = errorFactory;
_this.hasValue = false;
- _this.add(scheduler.schedule(dispatchNotification, period, { subscriber: _this, period: period }));
return _this;
}
- SampleTimeSubscriber.prototype._next = function (value) {
- this.lastValue = value;
+ ThrowIfEmptySubscriber.prototype._next = function (value) {
this.hasValue = true;
+ this.destination.next(value);
};
- SampleTimeSubscriber.prototype.notifyNext = function () {
- if (this.hasValue) {
- this.hasValue = false;
- this.destination.next(this.lastValue);
+ ThrowIfEmptySubscriber.prototype._complete = function () {
+ if (!this.hasValue) {
+ var err = void 0;
+ try {
+ err = this.errorFactory();
+ }
+ catch (e) {
+ err = e;
+ }
+ this.destination.error(err);
+ }
+ else {
+ return this.destination.complete();
}
};
- return SampleTimeSubscriber;
-}(_Subscriber__WEBPACK_IMPORTED_MODULE_1__["Subscriber"]));
-function dispatchNotification(state) {
- var subscriber = state.subscriber, period = state.period;
- subscriber.notifyNext();
- this.schedule(state, period);
+ return ThrowIfEmptySubscriber;
+}(_Subscriber__WEBPACK_IMPORTED_MODULE_2__["Subscriber"]));
+function defaultErrorFactory() {
+ return new _util_EmptyError__WEBPACK_IMPORTED_MODULE_1__["EmptyError"]();
}
-//# sourceMappingURL=sampleTime.js.map
+//# sourceMappingURL=throwIfEmpty.js.map
/***/ }),
-/* 309 */
+/* 297 */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
"use strict";
__webpack_require__.r(__webpack_exports__);
-/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "sequenceEqual", function() { return sequenceEqual; });
-/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "SequenceEqualOperator", function() { return SequenceEqualOperator; });
-/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "SequenceEqualSubscriber", function() { return SequenceEqualSubscriber; });
+/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "take", function() { return take; });
/* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(36);
/* harmony import */ var _Subscriber__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(172);
-/** PURE_IMPORTS_START tslib,_Subscriber PURE_IMPORTS_END */
+/* harmony import */ var _util_ArgumentOutOfRangeError__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(222);
+/* harmony import */ var _observable_empty__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(203);
+/** PURE_IMPORTS_START tslib,_Subscriber,_util_ArgumentOutOfRangeError,_observable_empty PURE_IMPORTS_END */
-function sequenceEqual(compareTo, comparator) {
- return function (source) { return source.lift(new SequenceEqualOperator(compareTo, comparator)); };
-}
-var SequenceEqualOperator = /*@__PURE__*/ (function () {
- function SequenceEqualOperator(compareTo, comparator) {
- this.compareTo = compareTo;
- this.comparator = comparator;
- }
- SequenceEqualOperator.prototype.call = function (subscriber, source) {
- return source.subscribe(new SequenceEqualSubscriber(subscriber, this.compareTo, this.comparator));
- };
- return SequenceEqualOperator;
-}());
-var SequenceEqualSubscriber = /*@__PURE__*/ (function (_super) {
- tslib__WEBPACK_IMPORTED_MODULE_0__["__extends"](SequenceEqualSubscriber, _super);
- function SequenceEqualSubscriber(destination, compareTo, comparator) {
- var _this = _super.call(this, destination) || this;
- _this.compareTo = compareTo;
- _this.comparator = comparator;
- _this._a = [];
- _this._b = [];
- _this._oneComplete = false;
- _this.destination.add(compareTo.subscribe(new SequenceEqualCompareToSubscriber(destination, _this)));
- return _this;
- }
- SequenceEqualSubscriber.prototype._next = function (value) {
- if (this._oneComplete && this._b.length === 0) {
- this.emit(false);
- }
- else {
- this._a.push(value);
- this.checkValues();
- }
- };
- SequenceEqualSubscriber.prototype._complete = function () {
- if (this._oneComplete) {
- this.emit(this._a.length === 0 && this._b.length === 0);
- }
- else {
- this._oneComplete = true;
- }
- this.unsubscribe();
- };
- SequenceEqualSubscriber.prototype.checkValues = function () {
- var _c = this, _a = _c._a, _b = _c._b, comparator = _c.comparator;
- while (_a.length > 0 && _b.length > 0) {
- var a = _a.shift();
- var b = _b.shift();
- var areEqual = false;
- try {
- areEqual = comparator ? comparator(a, b) : a === b;
- }
- catch (e) {
- this.destination.error(e);
- }
- if (!areEqual) {
- this.emit(false);
- }
- }
- };
- SequenceEqualSubscriber.prototype.emit = function (value) {
- var destination = this.destination;
- destination.next(value);
- destination.complete();
- };
- SequenceEqualSubscriber.prototype.nextB = function (value) {
- if (this._oneComplete && this._a.length === 0) {
- this.emit(false);
+
+function take(count) {
+ return function (source) {
+ if (count === 0) {
+ return Object(_observable_empty__WEBPACK_IMPORTED_MODULE_3__["empty"])();
}
else {
- this._b.push(value);
- this.checkValues();
+ return source.lift(new TakeOperator(count));
}
};
- SequenceEqualSubscriber.prototype.completeB = function () {
- if (this._oneComplete) {
- this.emit(this._a.length === 0 && this._b.length === 0);
- }
- else {
- this._oneComplete = true;
+}
+var TakeOperator = /*@__PURE__*/ (function () {
+ function TakeOperator(total) {
+ this.total = total;
+ if (this.total < 0) {
+ throw new _util_ArgumentOutOfRangeError__WEBPACK_IMPORTED_MODULE_2__["ArgumentOutOfRangeError"];
}
+ }
+ TakeOperator.prototype.call = function (subscriber, source) {
+ return source.subscribe(new TakeSubscriber(subscriber, this.total));
};
- return SequenceEqualSubscriber;
-}(_Subscriber__WEBPACK_IMPORTED_MODULE_1__["Subscriber"]));
-
-var SequenceEqualCompareToSubscriber = /*@__PURE__*/ (function (_super) {
- tslib__WEBPACK_IMPORTED_MODULE_0__["__extends"](SequenceEqualCompareToSubscriber, _super);
- function SequenceEqualCompareToSubscriber(destination, parent) {
+ return TakeOperator;
+}());
+var TakeSubscriber = /*@__PURE__*/ (function (_super) {
+ tslib__WEBPACK_IMPORTED_MODULE_0__["__extends"](TakeSubscriber, _super);
+ function TakeSubscriber(destination, total) {
var _this = _super.call(this, destination) || this;
- _this.parent = parent;
+ _this.total = total;
+ _this.count = 0;
return _this;
}
- SequenceEqualCompareToSubscriber.prototype._next = function (value) {
- this.parent.nextB(value);
- };
- SequenceEqualCompareToSubscriber.prototype._error = function (err) {
- this.parent.error(err);
- this.unsubscribe();
- };
- SequenceEqualCompareToSubscriber.prototype._complete = function () {
- this.parent.completeB();
- this.unsubscribe();
+ TakeSubscriber.prototype._next = function (value) {
+ var total = this.total;
+ var count = ++this.count;
+ if (count <= total) {
+ this.destination.next(value);
+ if (count === total) {
+ this.destination.complete();
+ this.unsubscribe();
+ }
+ }
};
- return SequenceEqualCompareToSubscriber;
+ return TakeSubscriber;
}(_Subscriber__WEBPACK_IMPORTED_MODULE_1__["Subscriber"]));
-//# sourceMappingURL=sequenceEqual.js.map
+//# sourceMappingURL=take.js.map
/***/ }),
-/* 310 */
+/* 298 */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
"use strict";
__webpack_require__.r(__webpack_exports__);
-/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "share", function() { return share; });
-/* harmony import */ var _multicast__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(282);
-/* harmony import */ var _refCount__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(284);
-/* harmony import */ var _Subject__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(265);
-/** PURE_IMPORTS_START _multicast,_refCount,_Subject PURE_IMPORTS_END */
-
-
-
-function shareSubjectFactory() {
- return new _Subject__WEBPACK_IMPORTED_MODULE_2__["Subject"]();
-}
-function share() {
- return function (source) { return Object(_refCount__WEBPACK_IMPORTED_MODULE_1__["refCount"])()(Object(_multicast__WEBPACK_IMPORTED_MODULE_0__["multicast"])(shareSubjectFactory)(source)); };
-}
-//# sourceMappingURL=share.js.map
-
-
-/***/ }),
-/* 311 */
-/***/ (function(module, __webpack_exports__, __webpack_require__) {
+/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "endWith", function() { return endWith; });
+/* harmony import */ var _observable_concat__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(239);
+/* harmony import */ var _observable_of__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(204);
+/** PURE_IMPORTS_START _observable_concat,_observable_of PURE_IMPORTS_END */
-"use strict";
-__webpack_require__.r(__webpack_exports__);
-/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "shareReplay", function() { return shareReplay; });
-/* harmony import */ var _ReplaySubject__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(297);
-/** PURE_IMPORTS_START _ReplaySubject PURE_IMPORTS_END */
-function shareReplay(configOrBufferSize, windowTime, scheduler) {
- var config;
- if (configOrBufferSize && typeof configOrBufferSize === 'object') {
- config = configOrBufferSize;
- }
- else {
- config = {
- bufferSize: configOrBufferSize,
- windowTime: windowTime,
- refCount: false,
- scheduler: scheduler
- };
+function endWith() {
+ var array = [];
+ for (var _i = 0; _i < arguments.length; _i++) {
+ array[_i] = arguments[_i];
}
- return function (source) { return source.lift(shareReplayOperator(config)); };
-}
-function shareReplayOperator(_a) {
- var _b = _a.bufferSize, bufferSize = _b === void 0 ? Number.POSITIVE_INFINITY : _b, _c = _a.windowTime, windowTime = _c === void 0 ? Number.POSITIVE_INFINITY : _c, useRefCount = _a.refCount, scheduler = _a.scheduler;
- var subject;
- var refCount = 0;
- var subscription;
- var hasError = false;
- var isComplete = false;
- return function shareReplayOperation(source) {
- refCount++;
- if (!subject || hasError) {
- hasError = false;
- subject = new _ReplaySubject__WEBPACK_IMPORTED_MODULE_0__["ReplaySubject"](bufferSize, windowTime, scheduler);
- subscription = source.subscribe({
- next: function (value) { subject.next(value); },
- error: function (err) {
- hasError = true;
- subject.error(err);
- },
- complete: function () {
- isComplete = true;
- subject.complete();
- },
- });
- }
- var innerSub = subject.subscribe(this);
- this.add(function () {
- refCount--;
- innerSub.unsubscribe();
- if (subscription && !isComplete && useRefCount && refCount === 0) {
- subscription.unsubscribe();
- subscription = undefined;
- subject = undefined;
- }
- });
- };
+ return function (source) { return Object(_observable_concat__WEBPACK_IMPORTED_MODULE_0__["concat"])(source, _observable_of__WEBPACK_IMPORTED_MODULE_1__["of"].apply(void 0, array)); };
}
-//# sourceMappingURL=shareReplay.js.map
+//# sourceMappingURL=endWith.js.map
/***/ }),
-/* 312 */
+/* 299 */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
"use strict";
__webpack_require__.r(__webpack_exports__);
-/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "single", function() { return single; });
+/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "every", function() { return every; });
/* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(36);
/* harmony import */ var _Subscriber__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(172);
-/* harmony import */ var _util_EmptyError__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(253);
-/** PURE_IMPORTS_START tslib,_Subscriber,_util_EmptyError PURE_IMPORTS_END */
-
+/** PURE_IMPORTS_START tslib,_Subscriber PURE_IMPORTS_END */
-function single(predicate) {
- return function (source) { return source.lift(new SingleOperator(predicate, source)); };
+function every(predicate, thisArg) {
+ return function (source) { return source.lift(new EveryOperator(predicate, thisArg, source)); };
}
-var SingleOperator = /*@__PURE__*/ (function () {
- function SingleOperator(predicate, source) {
+var EveryOperator = /*@__PURE__*/ (function () {
+ function EveryOperator(predicate, thisArg, source) {
this.predicate = predicate;
+ this.thisArg = thisArg;
this.source = source;
}
- SingleOperator.prototype.call = function (subscriber, source) {
- return source.subscribe(new SingleSubscriber(subscriber, this.predicate, this.source));
+ EveryOperator.prototype.call = function (observer, source) {
+ return source.subscribe(new EverySubscriber(observer, this.predicate, this.thisArg, this.source));
};
- return SingleOperator;
+ return EveryOperator;
}());
-var SingleSubscriber = /*@__PURE__*/ (function (_super) {
- tslib__WEBPACK_IMPORTED_MODULE_0__["__extends"](SingleSubscriber, _super);
- function SingleSubscriber(destination, predicate, source) {
+var EverySubscriber = /*@__PURE__*/ (function (_super) {
+ tslib__WEBPACK_IMPORTED_MODULE_0__["__extends"](EverySubscriber, _super);
+ function EverySubscriber(destination, predicate, thisArg, source) {
var _this = _super.call(this, destination) || this;
_this.predicate = predicate;
+ _this.thisArg = thisArg;
_this.source = source;
- _this.seenValue = false;
_this.index = 0;
+ _this.thisArg = thisArg || _this;
return _this;
}
- SingleSubscriber.prototype.applySingleValue = function (value) {
- if (this.seenValue) {
- this.destination.error('Sequence contains more than one element');
- }
- else {
- this.seenValue = true;
- this.singleValue = value;
- }
- };
- SingleSubscriber.prototype._next = function (value) {
- var index = this.index++;
- if (this.predicate) {
- this.tryNext(value, index);
- }
- else {
- this.applySingleValue(value);
- }
+ EverySubscriber.prototype.notifyComplete = function (everyValueMatch) {
+ this.destination.next(everyValueMatch);
+ this.destination.complete();
};
- SingleSubscriber.prototype.tryNext = function (value, index) {
+ EverySubscriber.prototype._next = function (value) {
+ var result = false;
try {
- if (this.predicate(value, index, this.source)) {
- this.applySingleValue(value);
- }
+ result = this.predicate.call(this.thisArg, value, this.index++, this.source);
}
catch (err) {
this.destination.error(err);
+ return;
}
- };
- SingleSubscriber.prototype._complete = function () {
- var destination = this.destination;
- if (this.index > 0) {
- destination.next(this.seenValue ? this.singleValue : undefined);
- destination.complete();
- }
- else {
- destination.error(new _util_EmptyError__WEBPACK_IMPORTED_MODULE_2__["EmptyError"]);
+ if (!result) {
+ this.notifyComplete(false);
}
};
- return SingleSubscriber;
+ EverySubscriber.prototype._complete = function () {
+ this.notifyComplete(true);
+ };
+ return EverySubscriber;
}(_Subscriber__WEBPACK_IMPORTED_MODULE_1__["Subscriber"]));
-//# sourceMappingURL=single.js.map
+//# sourceMappingURL=every.js.map
/***/ }),
-/* 313 */
+/* 300 */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
"use strict";
__webpack_require__.r(__webpack_exports__);
-/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "skip", function() { return skip; });
+/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "exhaust", function() { return exhaust; });
/* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(36);
-/* harmony import */ var _Subscriber__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(172);
-/** PURE_IMPORTS_START tslib,_Subscriber PURE_IMPORTS_END */
+/* harmony import */ var _OuterSubscriber__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(229);
+/* harmony import */ var _util_subscribeToResult__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(230);
+/** PURE_IMPORTS_START tslib,_OuterSubscriber,_util_subscribeToResult PURE_IMPORTS_END */
-function skip(count) {
- return function (source) { return source.lift(new SkipOperator(count)); };
+
+function exhaust() {
+ return function (source) { return source.lift(new SwitchFirstOperator()); };
}
-var SkipOperator = /*@__PURE__*/ (function () {
- function SkipOperator(total) {
- this.total = total;
+var SwitchFirstOperator = /*@__PURE__*/ (function () {
+ function SwitchFirstOperator() {
}
- SkipOperator.prototype.call = function (subscriber, source) {
- return source.subscribe(new SkipSubscriber(subscriber, this.total));
+ SwitchFirstOperator.prototype.call = function (subscriber, source) {
+ return source.subscribe(new SwitchFirstSubscriber(subscriber));
};
- return SkipOperator;
+ return SwitchFirstOperator;
}());
-var SkipSubscriber = /*@__PURE__*/ (function (_super) {
- tslib__WEBPACK_IMPORTED_MODULE_0__["__extends"](SkipSubscriber, _super);
- function SkipSubscriber(destination, total) {
+var SwitchFirstSubscriber = /*@__PURE__*/ (function (_super) {
+ tslib__WEBPACK_IMPORTED_MODULE_0__["__extends"](SwitchFirstSubscriber, _super);
+ function SwitchFirstSubscriber(destination) {
var _this = _super.call(this, destination) || this;
- _this.total = total;
- _this.count = 0;
+ _this.hasCompleted = false;
+ _this.hasSubscription = false;
return _this;
}
- SkipSubscriber.prototype._next = function (x) {
- if (++this.count > this.total) {
- this.destination.next(x);
+ SwitchFirstSubscriber.prototype._next = function (value) {
+ if (!this.hasSubscription) {
+ this.hasSubscription = true;
+ this.add(Object(_util_subscribeToResult__WEBPACK_IMPORTED_MODULE_2__["subscribeToResult"])(this, value));
}
};
- return SkipSubscriber;
-}(_Subscriber__WEBPACK_IMPORTED_MODULE_1__["Subscriber"]));
-//# sourceMappingURL=skip.js.map
+ SwitchFirstSubscriber.prototype._complete = function () {
+ this.hasCompleted = true;
+ if (!this.hasSubscription) {
+ this.destination.complete();
+ }
+ };
+ SwitchFirstSubscriber.prototype.notifyComplete = function (innerSub) {
+ this.remove(innerSub);
+ this.hasSubscription = false;
+ if (this.hasCompleted) {
+ this.destination.complete();
+ }
+ };
+ return SwitchFirstSubscriber;
+}(_OuterSubscriber__WEBPACK_IMPORTED_MODULE_1__["OuterSubscriber"]));
+//# sourceMappingURL=exhaust.js.map
/***/ }),
-/* 314 */
+/* 301 */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
"use strict";
__webpack_require__.r(__webpack_exports__);
-/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "skipLast", function() { return skipLast; });
+/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "exhaustMap", function() { return exhaustMap; });
/* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(36);
-/* harmony import */ var _Subscriber__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(172);
-/* harmony import */ var _util_ArgumentOutOfRangeError__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(250);
-/** PURE_IMPORTS_START tslib,_Subscriber,_util_ArgumentOutOfRangeError PURE_IMPORTS_END */
+/* harmony import */ var _OuterSubscriber__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(229);
+/* harmony import */ var _InnerSubscriber__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(231);
+/* harmony import */ var _util_subscribeToResult__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(230);
+/* harmony import */ var _map__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(226);
+/* harmony import */ var _observable_from__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(243);
+/** PURE_IMPORTS_START tslib,_OuterSubscriber,_InnerSubscriber,_util_subscribeToResult,_map,_observable_from PURE_IMPORTS_END */
-function skipLast(count) {
- return function (source) { return source.lift(new SkipLastOperator(count)); };
-}
-var SkipLastOperator = /*@__PURE__*/ (function () {
- function SkipLastOperator(_skipCount) {
- this._skipCount = _skipCount;
- if (this._skipCount < 0) {
- throw new _util_ArgumentOutOfRangeError__WEBPACK_IMPORTED_MODULE_2__["ArgumentOutOfRangeError"];
- }
+
+
+
+function exhaustMap(project, resultSelector) {
+ if (resultSelector) {
+ return function (source) { return source.pipe(exhaustMap(function (a, i) { return Object(_observable_from__WEBPACK_IMPORTED_MODULE_5__["from"])(project(a, i)).pipe(Object(_map__WEBPACK_IMPORTED_MODULE_4__["map"])(function (b, ii) { return resultSelector(a, b, i, ii); })); })); };
}
- SkipLastOperator.prototype.call = function (subscriber, source) {
- if (this._skipCount === 0) {
- return source.subscribe(new _Subscriber__WEBPACK_IMPORTED_MODULE_1__["Subscriber"](subscriber));
- }
- else {
- return source.subscribe(new SkipLastSubscriber(subscriber, this._skipCount));
- }
+ return function (source) {
+ return source.lift(new ExhaustMapOperator(project));
};
- return SkipLastOperator;
-}());
-var SkipLastSubscriber = /*@__PURE__*/ (function (_super) {
- tslib__WEBPACK_IMPORTED_MODULE_0__["__extends"](SkipLastSubscriber, _super);
- function SkipLastSubscriber(destination, _skipCount) {
+}
+var ExhaustMapOperator = /*@__PURE__*/ (function () {
+ function ExhaustMapOperator(project) {
+ this.project = project;
+ }
+ ExhaustMapOperator.prototype.call = function (subscriber, source) {
+ return source.subscribe(new ExhaustMapSubscriber(subscriber, this.project));
+ };
+ return ExhaustMapOperator;
+}());
+var ExhaustMapSubscriber = /*@__PURE__*/ (function (_super) {
+ tslib__WEBPACK_IMPORTED_MODULE_0__["__extends"](ExhaustMapSubscriber, _super);
+ function ExhaustMapSubscriber(destination, project) {
var _this = _super.call(this, destination) || this;
- _this._skipCount = _skipCount;
- _this._count = 0;
- _this._ring = new Array(_skipCount);
+ _this.project = project;
+ _this.hasSubscription = false;
+ _this.hasCompleted = false;
+ _this.index = 0;
return _this;
}
- SkipLastSubscriber.prototype._next = function (value) {
- var skipCount = this._skipCount;
- var count = this._count++;
- if (count < skipCount) {
- this._ring[count] = value;
+ ExhaustMapSubscriber.prototype._next = function (value) {
+ if (!this.hasSubscription) {
+ this.tryNext(value);
}
- else {
- var currentIndex = count % skipCount;
- var ring = this._ring;
- var oldValue = ring[currentIndex];
- ring[currentIndex] = value;
- this.destination.next(oldValue);
+ };
+ ExhaustMapSubscriber.prototype.tryNext = function (value) {
+ var result;
+ var index = this.index++;
+ try {
+ result = this.project(value, index);
+ }
+ catch (err) {
+ this.destination.error(err);
+ return;
}
+ this.hasSubscription = true;
+ this._innerSub(result, value, index);
};
- return SkipLastSubscriber;
-}(_Subscriber__WEBPACK_IMPORTED_MODULE_1__["Subscriber"]));
-//# sourceMappingURL=skipLast.js.map
+ ExhaustMapSubscriber.prototype._innerSub = function (result, value, index) {
+ var innerSubscriber = new _InnerSubscriber__WEBPACK_IMPORTED_MODULE_2__["InnerSubscriber"](this, undefined, undefined);
+ var destination = this.destination;
+ destination.add(innerSubscriber);
+ Object(_util_subscribeToResult__WEBPACK_IMPORTED_MODULE_3__["subscribeToResult"])(this, result, value, index, innerSubscriber);
+ };
+ ExhaustMapSubscriber.prototype._complete = function () {
+ this.hasCompleted = true;
+ if (!this.hasSubscription) {
+ this.destination.complete();
+ }
+ this.unsubscribe();
+ };
+ ExhaustMapSubscriber.prototype.notifyNext = function (outerValue, innerValue, outerIndex, innerIndex, innerSub) {
+ this.destination.next(innerValue);
+ };
+ ExhaustMapSubscriber.prototype.notifyError = function (err) {
+ this.destination.error(err);
+ };
+ ExhaustMapSubscriber.prototype.notifyComplete = function (innerSub) {
+ var destination = this.destination;
+ destination.remove(innerSub);
+ this.hasSubscription = false;
+ if (this.hasCompleted) {
+ this.destination.complete();
+ }
+ };
+ return ExhaustMapSubscriber;
+}(_OuterSubscriber__WEBPACK_IMPORTED_MODULE_1__["OuterSubscriber"]));
+//# sourceMappingURL=exhaustMap.js.map
/***/ }),
-/* 315 */
+/* 302 */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
"use strict";
__webpack_require__.r(__webpack_exports__);
-/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "skipUntil", function() { return skipUntil; });
+/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "expand", function() { return expand; });
+/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ExpandOperator", function() { return ExpandOperator; });
+/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ExpandSubscriber", function() { return ExpandSubscriber; });
/* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(36);
-/* harmony import */ var _OuterSubscriber__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(171);
-/* harmony import */ var _InnerSubscriber__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(183);
-/* harmony import */ var _util_subscribeToResult__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(182);
-/** PURE_IMPORTS_START tslib,_OuterSubscriber,_InnerSubscriber,_util_subscribeToResult PURE_IMPORTS_END */
-
+/* harmony import */ var _OuterSubscriber__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(229);
+/* harmony import */ var _util_subscribeToResult__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(230);
+/** PURE_IMPORTS_START tslib,_OuterSubscriber,_util_subscribeToResult PURE_IMPORTS_END */
-function skipUntil(notifier) {
- return function (source) { return source.lift(new SkipUntilOperator(notifier)); };
+function expand(project, concurrent, scheduler) {
+ if (concurrent === void 0) {
+ concurrent = Number.POSITIVE_INFINITY;
+ }
+ if (scheduler === void 0) {
+ scheduler = undefined;
+ }
+ concurrent = (concurrent || 0) < 1 ? Number.POSITIVE_INFINITY : concurrent;
+ return function (source) { return source.lift(new ExpandOperator(project, concurrent, scheduler)); };
}
-var SkipUntilOperator = /*@__PURE__*/ (function () {
- function SkipUntilOperator(notifier) {
- this.notifier = notifier;
+var ExpandOperator = /*@__PURE__*/ (function () {
+ function ExpandOperator(project, concurrent, scheduler) {
+ this.project = project;
+ this.concurrent = concurrent;
+ this.scheduler = scheduler;
}
- SkipUntilOperator.prototype.call = function (destination, source) {
- return source.subscribe(new SkipUntilSubscriber(destination, this.notifier));
+ ExpandOperator.prototype.call = function (subscriber, source) {
+ return source.subscribe(new ExpandSubscriber(subscriber, this.project, this.concurrent, this.scheduler));
};
- return SkipUntilOperator;
+ return ExpandOperator;
}());
-var SkipUntilSubscriber = /*@__PURE__*/ (function (_super) {
- tslib__WEBPACK_IMPORTED_MODULE_0__["__extends"](SkipUntilSubscriber, _super);
- function SkipUntilSubscriber(destination, notifier) {
+
+var ExpandSubscriber = /*@__PURE__*/ (function (_super) {
+ tslib__WEBPACK_IMPORTED_MODULE_0__["__extends"](ExpandSubscriber, _super);
+ function ExpandSubscriber(destination, project, concurrent, scheduler) {
var _this = _super.call(this, destination) || this;
- _this.hasValue = false;
- var innerSubscriber = new _InnerSubscriber__WEBPACK_IMPORTED_MODULE_2__["InnerSubscriber"](_this, undefined, undefined);
- _this.add(innerSubscriber);
- _this.innerSubscription = innerSubscriber;
- Object(_util_subscribeToResult__WEBPACK_IMPORTED_MODULE_3__["subscribeToResult"])(_this, notifier, undefined, undefined, innerSubscriber);
+ _this.project = project;
+ _this.concurrent = concurrent;
+ _this.scheduler = scheduler;
+ _this.index = 0;
+ _this.active = 0;
+ _this.hasCompleted = false;
+ if (concurrent < Number.POSITIVE_INFINITY) {
+ _this.buffer = [];
+ }
return _this;
}
- SkipUntilSubscriber.prototype._next = function (value) {
- if (this.hasValue) {
- _super.prototype._next.call(this, value);
+ ExpandSubscriber.dispatch = function (arg) {
+ var subscriber = arg.subscriber, result = arg.result, value = arg.value, index = arg.index;
+ subscriber.subscribeToProjection(result, value, index);
+ };
+ ExpandSubscriber.prototype._next = function (value) {
+ var destination = this.destination;
+ if (destination.closed) {
+ this._complete();
+ return;
+ }
+ var index = this.index++;
+ if (this.active < this.concurrent) {
+ destination.next(value);
+ try {
+ var project = this.project;
+ var result = project(value, index);
+ if (!this.scheduler) {
+ this.subscribeToProjection(result, value, index);
+ }
+ else {
+ var state = { subscriber: this, result: result, value: value, index: index };
+ var destination_1 = this.destination;
+ destination_1.add(this.scheduler.schedule(ExpandSubscriber.dispatch, 0, state));
+ }
+ }
+ catch (e) {
+ destination.error(e);
+ }
+ }
+ else {
+ this.buffer.push(value);
}
};
- SkipUntilSubscriber.prototype.notifyNext = function (outerValue, innerValue, outerIndex, innerIndex, innerSub) {
- this.hasValue = true;
- if (this.innerSubscription) {
- this.innerSubscription.unsubscribe();
+ ExpandSubscriber.prototype.subscribeToProjection = function (result, value, index) {
+ this.active++;
+ var destination = this.destination;
+ destination.add(Object(_util_subscribeToResult__WEBPACK_IMPORTED_MODULE_2__["subscribeToResult"])(this, result, value, index));
+ };
+ ExpandSubscriber.prototype._complete = function () {
+ this.hasCompleted = true;
+ if (this.hasCompleted && this.active === 0) {
+ this.destination.complete();
}
+ this.unsubscribe();
};
- SkipUntilSubscriber.prototype.notifyComplete = function () {
+ ExpandSubscriber.prototype.notifyNext = function (outerValue, innerValue, outerIndex, innerIndex, innerSub) {
+ this._next(innerValue);
};
- return SkipUntilSubscriber;
+ ExpandSubscriber.prototype.notifyComplete = function (innerSub) {
+ var buffer = this.buffer;
+ var destination = this.destination;
+ destination.remove(innerSub);
+ this.active--;
+ if (buffer && buffer.length > 0) {
+ this._next(buffer.shift());
+ }
+ if (this.hasCompleted && this.active === 0) {
+ this.destination.complete();
+ }
+ };
+ return ExpandSubscriber;
}(_OuterSubscriber__WEBPACK_IMPORTED_MODULE_1__["OuterSubscriber"]));
-//# sourceMappingURL=skipUntil.js.map
+
+//# sourceMappingURL=expand.js.map
/***/ }),
-/* 316 */
+/* 303 */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
"use strict";
__webpack_require__.r(__webpack_exports__);
-/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "skipWhile", function() { return skipWhile; });
+/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "finalize", function() { return finalize; });
+/* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(36);
+/* harmony import */ var _Subscriber__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(172);
+/* harmony import */ var _Subscription__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(177);
+/** PURE_IMPORTS_START tslib,_Subscriber,_Subscription PURE_IMPORTS_END */
+
+
+
+function finalize(callback) {
+ return function (source) { return source.lift(new FinallyOperator(callback)); };
+}
+var FinallyOperator = /*@__PURE__*/ (function () {
+ function FinallyOperator(callback) {
+ this.callback = callback;
+ }
+ FinallyOperator.prototype.call = function (subscriber, source) {
+ return source.subscribe(new FinallySubscriber(subscriber, this.callback));
+ };
+ return FinallyOperator;
+}());
+var FinallySubscriber = /*@__PURE__*/ (function (_super) {
+ tslib__WEBPACK_IMPORTED_MODULE_0__["__extends"](FinallySubscriber, _super);
+ function FinallySubscriber(destination, callback) {
+ var _this = _super.call(this, destination) || this;
+ _this.add(new _Subscription__WEBPACK_IMPORTED_MODULE_2__["Subscription"](callback));
+ return _this;
+ }
+ return FinallySubscriber;
+}(_Subscriber__WEBPACK_IMPORTED_MODULE_1__["Subscriber"]));
+//# sourceMappingURL=finalize.js.map
+
+
+/***/ }),
+/* 304 */
+/***/ (function(module, __webpack_exports__, __webpack_require__) {
+
+"use strict";
+__webpack_require__.r(__webpack_exports__);
+/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "find", function() { return find; });
+/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "FindValueOperator", function() { return FindValueOperator; });
+/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "FindValueSubscriber", function() { return FindValueSubscriber; });
/* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(36);
/* harmony import */ var _Subscriber__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(172);
/** PURE_IMPORTS_START tslib,_Subscriber PURE_IMPORTS_END */
-function skipWhile(predicate) {
- return function (source) { return source.lift(new SkipWhileOperator(predicate)); };
+function find(predicate, thisArg) {
+ if (typeof predicate !== 'function') {
+ throw new TypeError('predicate is not a function');
+ }
+ return function (source) { return source.lift(new FindValueOperator(predicate, source, false, thisArg)); };
}
-var SkipWhileOperator = /*@__PURE__*/ (function () {
- function SkipWhileOperator(predicate) {
+var FindValueOperator = /*@__PURE__*/ (function () {
+ function FindValueOperator(predicate, source, yieldIndex, thisArg) {
this.predicate = predicate;
+ this.source = source;
+ this.yieldIndex = yieldIndex;
+ this.thisArg = thisArg;
}
- SkipWhileOperator.prototype.call = function (subscriber, source) {
- return source.subscribe(new SkipWhileSubscriber(subscriber, this.predicate));
+ FindValueOperator.prototype.call = function (observer, source) {
+ return source.subscribe(new FindValueSubscriber(observer, this.predicate, this.source, this.yieldIndex, this.thisArg));
};
- return SkipWhileOperator;
+ return FindValueOperator;
}());
-var SkipWhileSubscriber = /*@__PURE__*/ (function (_super) {
- tslib__WEBPACK_IMPORTED_MODULE_0__["__extends"](SkipWhileSubscriber, _super);
- function SkipWhileSubscriber(destination, predicate) {
+
+var FindValueSubscriber = /*@__PURE__*/ (function (_super) {
+ tslib__WEBPACK_IMPORTED_MODULE_0__["__extends"](FindValueSubscriber, _super);
+ function FindValueSubscriber(destination, predicate, source, yieldIndex, thisArg) {
var _this = _super.call(this, destination) || this;
_this.predicate = predicate;
- _this.skipping = true;
+ _this.source = source;
+ _this.yieldIndex = yieldIndex;
+ _this.thisArg = thisArg;
_this.index = 0;
return _this;
}
- SkipWhileSubscriber.prototype._next = function (value) {
+ FindValueSubscriber.prototype.notifyComplete = function (value) {
var destination = this.destination;
- if (this.skipping) {
- this.tryCallPredicate(value);
- }
- if (!this.skipping) {
- destination.next(value);
- }
+ destination.next(value);
+ destination.complete();
+ this.unsubscribe();
};
- SkipWhileSubscriber.prototype.tryCallPredicate = function (value) {
+ FindValueSubscriber.prototype._next = function (value) {
+ var _a = this, predicate = _a.predicate, thisArg = _a.thisArg;
+ var index = this.index++;
try {
- var result = this.predicate(value, this.index++);
- this.skipping = Boolean(result);
+ var result = predicate.call(thisArg || this, value, index, this.source);
+ if (result) {
+ this.notifyComplete(this.yieldIndex ? index : value);
+ }
}
catch (err) {
this.destination.error(err);
}
};
- return SkipWhileSubscriber;
+ FindValueSubscriber.prototype._complete = function () {
+ this.notifyComplete(this.yieldIndex ? -1 : undefined);
+ };
+ return FindValueSubscriber;
}(_Subscriber__WEBPACK_IMPORTED_MODULE_1__["Subscriber"]));
-//# sourceMappingURL=skipWhile.js.map
+
+//# sourceMappingURL=find.js.map
/***/ }),
-/* 317 */
+/* 305 */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
"use strict";
__webpack_require__.r(__webpack_exports__);
-/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "startWith", function() { return startWith; });
-/* harmony import */ var _observable_concat__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(226);
-/* harmony import */ var _util_isScheduler__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(206);
-/** PURE_IMPORTS_START _observable_concat,_util_isScheduler PURE_IMPORTS_END */
+/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "findIndex", function() { return findIndex; });
+/* harmony import */ var _operators_find__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(304);
+/** PURE_IMPORTS_START _operators_find PURE_IMPORTS_END */
+function findIndex(predicate, thisArg) {
+ return function (source) { return source.lift(new _operators_find__WEBPACK_IMPORTED_MODULE_0__["FindValueOperator"](predicate, source, true, thisArg)); };
+}
+//# sourceMappingURL=findIndex.js.map
-function startWith() {
- var array = [];
- for (var _i = 0; _i < arguments.length; _i++) {
- array[_i] = arguments[_i];
- }
- var scheduler = array[array.length - 1];
- if (Object(_util_isScheduler__WEBPACK_IMPORTED_MODULE_1__["isScheduler"])(scheduler)) {
- array.pop();
- return function (source) { return Object(_observable_concat__WEBPACK_IMPORTED_MODULE_0__["concat"])(array, source, scheduler); };
- }
- else {
- return function (source) { return Object(_observable_concat__WEBPACK_IMPORTED_MODULE_0__["concat"])(array, source); };
- }
+
+/***/ }),
+/* 306 */
+/***/ (function(module, __webpack_exports__, __webpack_require__) {
+
+"use strict";
+__webpack_require__.r(__webpack_exports__);
+/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "first", function() { return first; });
+/* harmony import */ var _util_EmptyError__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(223);
+/* harmony import */ var _filter__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(264);
+/* harmony import */ var _take__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(297);
+/* harmony import */ var _defaultIfEmpty__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(287);
+/* harmony import */ var _throwIfEmpty__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(296);
+/* harmony import */ var _util_identity__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(220);
+/** PURE_IMPORTS_START _util_EmptyError,_filter,_take,_defaultIfEmpty,_throwIfEmpty,_util_identity PURE_IMPORTS_END */
+
+
+
+
+
+
+function first(predicate, defaultValue) {
+ var hasDefaultValue = arguments.length >= 2;
+ return function (source) { return source.pipe(predicate ? Object(_filter__WEBPACK_IMPORTED_MODULE_1__["filter"])(function (v, i) { return predicate(v, i, source); }) : _util_identity__WEBPACK_IMPORTED_MODULE_5__["identity"], Object(_take__WEBPACK_IMPORTED_MODULE_2__["take"])(1), hasDefaultValue ? Object(_defaultIfEmpty__WEBPACK_IMPORTED_MODULE_3__["defaultIfEmpty"])(defaultValue) : Object(_throwIfEmpty__WEBPACK_IMPORTED_MODULE_4__["throwIfEmpty"])(function () { return new _util_EmptyError__WEBPACK_IMPORTED_MODULE_0__["EmptyError"](); })); };
}
-//# sourceMappingURL=startWith.js.map
+//# sourceMappingURL=first.js.map
/***/ }),
-/* 318 */
+/* 307 */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
"use strict";
__webpack_require__.r(__webpack_exports__);
-/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "subscribeOn", function() { return subscribeOn; });
-/* harmony import */ var _observable_SubscribeOnObservable__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(319);
-/** PURE_IMPORTS_START _observable_SubscribeOnObservable PURE_IMPORTS_END */
+/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ignoreElements", function() { return ignoreElements; });
+/* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(36);
+/* harmony import */ var _Subscriber__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(172);
+/** PURE_IMPORTS_START tslib,_Subscriber PURE_IMPORTS_END */
-function subscribeOn(scheduler, delay) {
- if (delay === void 0) {
- delay = 0;
- }
- return function subscribeOnOperatorFunction(source) {
- return source.lift(new SubscribeOnOperator(scheduler, delay));
+
+function ignoreElements() {
+ return function ignoreElementsOperatorFunction(source) {
+ return source.lift(new IgnoreElementsOperator());
};
}
-var SubscribeOnOperator = /*@__PURE__*/ (function () {
- function SubscribeOnOperator(scheduler, delay) {
- this.scheduler = scheduler;
- this.delay = delay;
+var IgnoreElementsOperator = /*@__PURE__*/ (function () {
+ function IgnoreElementsOperator() {
}
- SubscribeOnOperator.prototype.call = function (subscriber, source) {
- return new _observable_SubscribeOnObservable__WEBPACK_IMPORTED_MODULE_0__["SubscribeOnObservable"](source, this.delay, this.scheduler).subscribe(subscriber);
+ IgnoreElementsOperator.prototype.call = function (subscriber, source) {
+ return source.subscribe(new IgnoreElementsSubscriber(subscriber));
};
- return SubscribeOnOperator;
+ return IgnoreElementsOperator;
}());
-//# sourceMappingURL=subscribeOn.js.map
+var IgnoreElementsSubscriber = /*@__PURE__*/ (function (_super) {
+ tslib__WEBPACK_IMPORTED_MODULE_0__["__extends"](IgnoreElementsSubscriber, _super);
+ function IgnoreElementsSubscriber() {
+ return _super !== null && _super.apply(this, arguments) || this;
+ }
+ IgnoreElementsSubscriber.prototype._next = function (unused) {
+ };
+ return IgnoreElementsSubscriber;
+}(_Subscriber__WEBPACK_IMPORTED_MODULE_1__["Subscriber"]));
+//# sourceMappingURL=ignoreElements.js.map
/***/ }),
-/* 319 */
+/* 308 */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
"use strict";
__webpack_require__.r(__webpack_exports__);
-/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "SubscribeOnObservable", function() { return SubscribeOnObservable; });
+/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "isEmpty", function() { return isEmpty; });
/* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(36);
-/* harmony import */ var _Observable__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(193);
-/* harmony import */ var _scheduler_asap__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(320);
-/* harmony import */ var _util_isNumeric__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(205);
-/** PURE_IMPORTS_START tslib,_Observable,_scheduler_asap,_util_isNumeric PURE_IMPORTS_END */
-
-
+/* harmony import */ var _Subscriber__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(172);
+/** PURE_IMPORTS_START tslib,_Subscriber PURE_IMPORTS_END */
-var SubscribeOnObservable = /*@__PURE__*/ (function (_super) {
- tslib__WEBPACK_IMPORTED_MODULE_0__["__extends"](SubscribeOnObservable, _super);
- function SubscribeOnObservable(source, delayTime, scheduler) {
- if (delayTime === void 0) {
- delayTime = 0;
- }
- if (scheduler === void 0) {
- scheduler = _scheduler_asap__WEBPACK_IMPORTED_MODULE_2__["asap"];
- }
- var _this = _super.call(this) || this;
- _this.source = source;
- _this.delayTime = delayTime;
- _this.scheduler = scheduler;
- if (!Object(_util_isNumeric__WEBPACK_IMPORTED_MODULE_3__["isNumeric"])(delayTime) || delayTime < 0) {
- _this.delayTime = 0;
- }
- if (!scheduler || typeof scheduler.schedule !== 'function') {
- _this.scheduler = _scheduler_asap__WEBPACK_IMPORTED_MODULE_2__["asap"];
- }
- return _this;
+function isEmpty() {
+ return function (source) { return source.lift(new IsEmptyOperator()); };
+}
+var IsEmptyOperator = /*@__PURE__*/ (function () {
+ function IsEmptyOperator() {
}
- SubscribeOnObservable.create = function (source, delay, scheduler) {
- if (delay === void 0) {
- delay = 0;
- }
- if (scheduler === void 0) {
- scheduler = _scheduler_asap__WEBPACK_IMPORTED_MODULE_2__["asap"];
- }
- return new SubscribeOnObservable(source, delay, scheduler);
+ IsEmptyOperator.prototype.call = function (observer, source) {
+ return source.subscribe(new IsEmptySubscriber(observer));
};
- SubscribeOnObservable.dispatch = function (arg) {
- var source = arg.source, subscriber = arg.subscriber;
- return this.add(source.subscribe(subscriber));
+ return IsEmptyOperator;
+}());
+var IsEmptySubscriber = /*@__PURE__*/ (function (_super) {
+ tslib__WEBPACK_IMPORTED_MODULE_0__["__extends"](IsEmptySubscriber, _super);
+ function IsEmptySubscriber(destination) {
+ return _super.call(this, destination) || this;
+ }
+ IsEmptySubscriber.prototype.notifyComplete = function (isEmpty) {
+ var destination = this.destination;
+ destination.next(isEmpty);
+ destination.complete();
};
- SubscribeOnObservable.prototype._subscribe = function (subscriber) {
- var delay = this.delayTime;
- var source = this.source;
- var scheduler = this.scheduler;
- return scheduler.schedule(SubscribeOnObservable.dispatch, delay, {
- source: source, subscriber: subscriber
- });
+ IsEmptySubscriber.prototype._next = function (value) {
+ this.notifyComplete(false);
};
- return SubscribeOnObservable;
-}(_Observable__WEBPACK_IMPORTED_MODULE_1__["Observable"]));
-
-//# sourceMappingURL=SubscribeOnObservable.js.map
+ IsEmptySubscriber.prototype._complete = function () {
+ this.notifyComplete(true);
+ };
+ return IsEmptySubscriber;
+}(_Subscriber__WEBPACK_IMPORTED_MODULE_1__["Subscriber"]));
+//# sourceMappingURL=isEmpty.js.map
/***/ }),
-/* 320 */
+/* 309 */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
"use strict";
__webpack_require__.r(__webpack_exports__);
-/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "asap", function() { return asap; });
-/* harmony import */ var _AsapAction__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(321);
-/* harmony import */ var _AsapScheduler__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(323);
-/** PURE_IMPORTS_START _AsapAction,_AsapScheduler PURE_IMPORTS_END */
+/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "last", function() { return last; });
+/* harmony import */ var _util_EmptyError__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(223);
+/* harmony import */ var _filter__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(264);
+/* harmony import */ var _takeLast__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(310);
+/* harmony import */ var _throwIfEmpty__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(296);
+/* harmony import */ var _defaultIfEmpty__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(287);
+/* harmony import */ var _util_identity__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(220);
+/** PURE_IMPORTS_START _util_EmptyError,_filter,_takeLast,_throwIfEmpty,_defaultIfEmpty,_util_identity PURE_IMPORTS_END */
-var asap = /*@__PURE__*/ new _AsapScheduler__WEBPACK_IMPORTED_MODULE_1__["AsapScheduler"](_AsapAction__WEBPACK_IMPORTED_MODULE_0__["AsapAction"]);
-//# sourceMappingURL=asap.js.map
+
+
+
+
+function last(predicate, defaultValue) {
+ var hasDefaultValue = arguments.length >= 2;
+ return function (source) { return source.pipe(predicate ? Object(_filter__WEBPACK_IMPORTED_MODULE_1__["filter"])(function (v, i) { return predicate(v, i, source); }) : _util_identity__WEBPACK_IMPORTED_MODULE_5__["identity"], Object(_takeLast__WEBPACK_IMPORTED_MODULE_2__["takeLast"])(1), hasDefaultValue ? Object(_defaultIfEmpty__WEBPACK_IMPORTED_MODULE_4__["defaultIfEmpty"])(defaultValue) : Object(_throwIfEmpty__WEBPACK_IMPORTED_MODULE_3__["throwIfEmpty"])(function () { return new _util_EmptyError__WEBPACK_IMPORTED_MODULE_0__["EmptyError"](); })); };
+}
+//# sourceMappingURL=last.js.map
/***/ }),
-/* 321 */
+/* 310 */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
"use strict";
__webpack_require__.r(__webpack_exports__);
-/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "AsapAction", function() { return AsapAction; });
+/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "takeLast", function() { return takeLast; });
/* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(36);
-/* harmony import */ var _util_Immediate__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(322);
-/* harmony import */ var _AsyncAction__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(200);
-/** PURE_IMPORTS_START tslib,_util_Immediate,_AsyncAction PURE_IMPORTS_END */
+/* harmony import */ var _Subscriber__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(172);
+/* harmony import */ var _util_ArgumentOutOfRangeError__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(222);
+/* harmony import */ var _observable_empty__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(203);
+/** PURE_IMPORTS_START tslib,_Subscriber,_util_ArgumentOutOfRangeError,_observable_empty PURE_IMPORTS_END */
-var AsapAction = /*@__PURE__*/ (function (_super) {
- tslib__WEBPACK_IMPORTED_MODULE_0__["__extends"](AsapAction, _super);
- function AsapAction(scheduler, work) {
- var _this = _super.call(this, scheduler, work) || this;
- _this.scheduler = scheduler;
- _this.work = work;
- return _this;
- }
- AsapAction.prototype.requestAsyncId = function (scheduler, id, delay) {
- if (delay === void 0) {
- delay = 0;
+
+function takeLast(count) {
+ return function takeLastOperatorFunction(source) {
+ if (count === 0) {
+ return Object(_observable_empty__WEBPACK_IMPORTED_MODULE_3__["empty"])();
}
- if (delay !== null && delay > 0) {
- return _super.prototype.requestAsyncId.call(this, scheduler, id, delay);
+ else {
+ return source.lift(new TakeLastOperator(count));
}
- scheduler.actions.push(this);
- return scheduler.scheduled || (scheduler.scheduled = _util_Immediate__WEBPACK_IMPORTED_MODULE_1__["Immediate"].setImmediate(scheduler.flush.bind(scheduler, null)));
};
- AsapAction.prototype.recycleAsyncId = function (scheduler, id, delay) {
- if (delay === void 0) {
- delay = 0;
+}
+var TakeLastOperator = /*@__PURE__*/ (function () {
+ function TakeLastOperator(total) {
+ this.total = total;
+ if (this.total < 0) {
+ throw new _util_ArgumentOutOfRangeError__WEBPACK_IMPORTED_MODULE_2__["ArgumentOutOfRangeError"];
}
- if ((delay !== null && delay > 0) || (delay === null && this.delay > 0)) {
- return _super.prototype.recycleAsyncId.call(this, scheduler, id, delay);
+ }
+ TakeLastOperator.prototype.call = function (subscriber, source) {
+ return source.subscribe(new TakeLastSubscriber(subscriber, this.total));
+ };
+ return TakeLastOperator;
+}());
+var TakeLastSubscriber = /*@__PURE__*/ (function (_super) {
+ tslib__WEBPACK_IMPORTED_MODULE_0__["__extends"](TakeLastSubscriber, _super);
+ function TakeLastSubscriber(destination, total) {
+ var _this = _super.call(this, destination) || this;
+ _this.total = total;
+ _this.ring = new Array();
+ _this.count = 0;
+ return _this;
+ }
+ TakeLastSubscriber.prototype._next = function (value) {
+ var ring = this.ring;
+ var total = this.total;
+ var count = this.count++;
+ if (ring.length < total) {
+ ring.push(value);
}
- if (scheduler.actions.length === 0) {
- _util_Immediate__WEBPACK_IMPORTED_MODULE_1__["Immediate"].clearImmediate(id);
- scheduler.scheduled = undefined;
+ else {
+ var index = count % total;
+ ring[index] = value;
}
- return undefined;
};
- return AsapAction;
-}(_AsyncAction__WEBPACK_IMPORTED_MODULE_2__["AsyncAction"]));
-
-//# sourceMappingURL=AsapAction.js.map
+ TakeLastSubscriber.prototype._complete = function () {
+ var destination = this.destination;
+ var count = this.count;
+ if (count > 0) {
+ var total = this.count >= this.total ? this.total : this.count;
+ var ring = this.ring;
+ for (var i = 0; i < total; i++) {
+ var idx = (count++) % total;
+ destination.next(ring[idx]);
+ }
+ }
+ destination.complete();
+ };
+ return TakeLastSubscriber;
+}(_Subscriber__WEBPACK_IMPORTED_MODULE_1__["Subscriber"]));
+//# sourceMappingURL=takeLast.js.map
/***/ }),
-/* 322 */
+/* 311 */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
"use strict";
__webpack_require__.r(__webpack_exports__);
-/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "Immediate", function() { return Immediate; });
-/** PURE_IMPORTS_START PURE_IMPORTS_END */
-var nextHandle = 1;
-var tasksByHandle = {};
-function runIfPresent(handle) {
- var cb = tasksByHandle[handle];
- if (cb) {
- cb();
- }
+/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "mapTo", function() { return mapTo; });
+/* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(36);
+/* harmony import */ var _Subscriber__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(172);
+/** PURE_IMPORTS_START tslib,_Subscriber PURE_IMPORTS_END */
+
+
+function mapTo(value) {
+ return function (source) { return source.lift(new MapToOperator(value)); };
}
-var Immediate = {
- setImmediate: function (cb) {
- var handle = nextHandle++;
- tasksByHandle[handle] = cb;
- Promise.resolve().then(function () { return runIfPresent(handle); });
- return handle;
- },
- clearImmediate: function (handle) {
- delete tasksByHandle[handle];
- },
-};
-//# sourceMappingURL=Immediate.js.map
+var MapToOperator = /*@__PURE__*/ (function () {
+ function MapToOperator(value) {
+ this.value = value;
+ }
+ MapToOperator.prototype.call = function (subscriber, source) {
+ return source.subscribe(new MapToSubscriber(subscriber, this.value));
+ };
+ return MapToOperator;
+}());
+var MapToSubscriber = /*@__PURE__*/ (function (_super) {
+ tslib__WEBPACK_IMPORTED_MODULE_0__["__extends"](MapToSubscriber, _super);
+ function MapToSubscriber(destination, value) {
+ var _this = _super.call(this, destination) || this;
+ _this.value = value;
+ return _this;
+ }
+ MapToSubscriber.prototype._next = function (x) {
+ this.destination.next(this.value);
+ };
+ return MapToSubscriber;
+}(_Subscriber__WEBPACK_IMPORTED_MODULE_1__["Subscriber"]));
+//# sourceMappingURL=mapTo.js.map
/***/ }),
-/* 323 */
+/* 312 */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
"use strict";
__webpack_require__.r(__webpack_exports__);
-/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "AsapScheduler", function() { return AsapScheduler; });
+/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "materialize", function() { return materialize; });
/* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(36);
-/* harmony import */ var _AsyncScheduler__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(202);
-/** PURE_IMPORTS_START tslib,_AsyncScheduler PURE_IMPORTS_END */
+/* harmony import */ var _Subscriber__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(172);
+/* harmony import */ var _Notification__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(202);
+/** PURE_IMPORTS_START tslib,_Subscriber,_Notification PURE_IMPORTS_END */
-var AsapScheduler = /*@__PURE__*/ (function (_super) {
- tslib__WEBPACK_IMPORTED_MODULE_0__["__extends"](AsapScheduler, _super);
- function AsapScheduler() {
- return _super !== null && _super.apply(this, arguments) || this;
+
+function materialize() {
+ return function materializeOperatorFunction(source) {
+ return source.lift(new MaterializeOperator());
+ };
+}
+var MaterializeOperator = /*@__PURE__*/ (function () {
+ function MaterializeOperator() {
}
- AsapScheduler.prototype.flush = function (action) {
- this.active = true;
- this.scheduled = undefined;
- var actions = this.actions;
- var error;
- var index = -1;
- var count = actions.length;
- action = action || actions.shift();
- do {
- if (error = action.execute(action.state, action.delay)) {
- break;
- }
- } while (++index < count && (action = actions.shift()));
- this.active = false;
- if (error) {
- while (++index < count && (action = actions.shift())) {
- action.unsubscribe();
- }
- throw error;
- }
+ MaterializeOperator.prototype.call = function (subscriber, source) {
+ return source.subscribe(new MaterializeSubscriber(subscriber));
};
- return AsapScheduler;
-}(_AsyncScheduler__WEBPACK_IMPORTED_MODULE_1__["AsyncScheduler"]));
-
-//# sourceMappingURL=AsapScheduler.js.map
+ return MaterializeOperator;
+}());
+var MaterializeSubscriber = /*@__PURE__*/ (function (_super) {
+ tslib__WEBPACK_IMPORTED_MODULE_0__["__extends"](MaterializeSubscriber, _super);
+ function MaterializeSubscriber(destination) {
+ return _super.call(this, destination) || this;
+ }
+ MaterializeSubscriber.prototype._next = function (value) {
+ this.destination.next(_Notification__WEBPACK_IMPORTED_MODULE_2__["Notification"].createNext(value));
+ };
+ MaterializeSubscriber.prototype._error = function (err) {
+ var destination = this.destination;
+ destination.next(_Notification__WEBPACK_IMPORTED_MODULE_2__["Notification"].createError(err));
+ destination.complete();
+ };
+ MaterializeSubscriber.prototype._complete = function () {
+ var destination = this.destination;
+ destination.next(_Notification__WEBPACK_IMPORTED_MODULE_2__["Notification"].createComplete());
+ destination.complete();
+ };
+ return MaterializeSubscriber;
+}(_Subscriber__WEBPACK_IMPORTED_MODULE_1__["Subscriber"]));
+//# sourceMappingURL=materialize.js.map
/***/ }),
-/* 324 */
+/* 313 */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
"use strict";
__webpack_require__.r(__webpack_exports__);
-/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "switchAll", function() { return switchAll; });
-/* harmony import */ var _switchMap__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(325);
-/* harmony import */ var _util_identity__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(232);
-/** PURE_IMPORTS_START _switchMap,_util_identity PURE_IMPORTS_END */
-
+/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "max", function() { return max; });
+/* harmony import */ var _reduce__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(314);
+/** PURE_IMPORTS_START _reduce PURE_IMPORTS_END */
-function switchAll() {
- return Object(_switchMap__WEBPACK_IMPORTED_MODULE_0__["switchMap"])(_util_identity__WEBPACK_IMPORTED_MODULE_1__["identity"]);
+function max(comparer) {
+ var max = (typeof comparer === 'function')
+ ? function (x, y) { return comparer(x, y) > 0 ? x : y; }
+ : function (x, y) { return x > y ? x : y; };
+ return Object(_reduce__WEBPACK_IMPORTED_MODULE_0__["reduce"])(max);
}
-//# sourceMappingURL=switchAll.js.map
+//# sourceMappingURL=max.js.map
/***/ }),
-/* 325 */
+/* 314 */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
"use strict";
__webpack_require__.r(__webpack_exports__);
-/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "switchMap", function() { return switchMap; });
-/* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(36);
-/* harmony import */ var _OuterSubscriber__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(171);
-/* harmony import */ var _InnerSubscriber__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(183);
-/* harmony import */ var _util_subscribeToResult__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(182);
-/* harmony import */ var _map__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(231);
-/* harmony import */ var _observable_from__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(218);
-/** PURE_IMPORTS_START tslib,_OuterSubscriber,_InnerSubscriber,_util_subscribeToResult,_map,_observable_from PURE_IMPORTS_END */
+/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "reduce", function() { return reduce; });
+/* harmony import */ var _scan__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(315);
+/* harmony import */ var _takeLast__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(310);
+/* harmony import */ var _defaultIfEmpty__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(287);
+/* harmony import */ var _util_pipe__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(184);
+/** PURE_IMPORTS_START _scan,_takeLast,_defaultIfEmpty,_util_pipe PURE_IMPORTS_END */
+
+function reduce(accumulator, seed) {
+ if (arguments.length >= 2) {
+ return function reduceOperatorFunctionWithSeed(source) {
+ return Object(_util_pipe__WEBPACK_IMPORTED_MODULE_3__["pipe"])(Object(_scan__WEBPACK_IMPORTED_MODULE_0__["scan"])(accumulator, seed), Object(_takeLast__WEBPACK_IMPORTED_MODULE_1__["takeLast"])(1), Object(_defaultIfEmpty__WEBPACK_IMPORTED_MODULE_2__["defaultIfEmpty"])(seed))(source);
+ };
+ }
+ return function reduceOperatorFunction(source) {
+ return Object(_util_pipe__WEBPACK_IMPORTED_MODULE_3__["pipe"])(Object(_scan__WEBPACK_IMPORTED_MODULE_0__["scan"])(function (acc, value, index) { return accumulator(acc, value, index + 1); }), Object(_takeLast__WEBPACK_IMPORTED_MODULE_1__["takeLast"])(1))(source);
+ };
+}
+//# sourceMappingURL=reduce.js.map
+/***/ }),
+/* 315 */
+/***/ (function(module, __webpack_exports__, __webpack_require__) {
-function switchMap(project, resultSelector) {
- if (typeof resultSelector === 'function') {
- return function (source) { return source.pipe(switchMap(function (a, i) { return Object(_observable_from__WEBPACK_IMPORTED_MODULE_5__["from"])(project(a, i)).pipe(Object(_map__WEBPACK_IMPORTED_MODULE_4__["map"])(function (b, ii) { return resultSelector(a, b, i, ii); })); })); };
+"use strict";
+__webpack_require__.r(__webpack_exports__);
+/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "scan", function() { return scan; });
+/* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(36);
+/* harmony import */ var _Subscriber__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(172);
+/** PURE_IMPORTS_START tslib,_Subscriber PURE_IMPORTS_END */
+
+
+function scan(accumulator, seed) {
+ var hasSeed = false;
+ if (arguments.length >= 2) {
+ hasSeed = true;
}
- return function (source) { return source.lift(new SwitchMapOperator(project)); };
+ return function scanOperatorFunction(source) {
+ return source.lift(new ScanOperator(accumulator, seed, hasSeed));
+ };
}
-var SwitchMapOperator = /*@__PURE__*/ (function () {
- function SwitchMapOperator(project) {
- this.project = project;
+var ScanOperator = /*@__PURE__*/ (function () {
+ function ScanOperator(accumulator, seed, hasSeed) {
+ if (hasSeed === void 0) {
+ hasSeed = false;
+ }
+ this.accumulator = accumulator;
+ this.seed = seed;
+ this.hasSeed = hasSeed;
}
- SwitchMapOperator.prototype.call = function (subscriber, source) {
- return source.subscribe(new SwitchMapSubscriber(subscriber, this.project));
+ ScanOperator.prototype.call = function (subscriber, source) {
+ return source.subscribe(new ScanSubscriber(subscriber, this.accumulator, this.seed, this.hasSeed));
};
- return SwitchMapOperator;
+ return ScanOperator;
}());
-var SwitchMapSubscriber = /*@__PURE__*/ (function (_super) {
- tslib__WEBPACK_IMPORTED_MODULE_0__["__extends"](SwitchMapSubscriber, _super);
- function SwitchMapSubscriber(destination, project) {
+var ScanSubscriber = /*@__PURE__*/ (function (_super) {
+ tslib__WEBPACK_IMPORTED_MODULE_0__["__extends"](ScanSubscriber, _super);
+ function ScanSubscriber(destination, accumulator, _seed, hasSeed) {
var _this = _super.call(this, destination) || this;
- _this.project = project;
+ _this.accumulator = accumulator;
+ _this._seed = _seed;
+ _this.hasSeed = hasSeed;
_this.index = 0;
return _this;
}
- SwitchMapSubscriber.prototype._next = function (value) {
- var result;
- var index = this.index++;
- try {
- result = this.project(value, index);
- }
- catch (error) {
- this.destination.error(error);
- return;
+ Object.defineProperty(ScanSubscriber.prototype, "seed", {
+ get: function () {
+ return this._seed;
+ },
+ set: function (value) {
+ this.hasSeed = true;
+ this._seed = value;
+ },
+ enumerable: true,
+ configurable: true
+ });
+ ScanSubscriber.prototype._next = function (value) {
+ if (!this.hasSeed) {
+ this.seed = value;
+ this.destination.next(value);
}
- this._innerSub(result, value, index);
- };
- SwitchMapSubscriber.prototype._innerSub = function (result, value, index) {
- var innerSubscription = this.innerSubscription;
- if (innerSubscription) {
- innerSubscription.unsubscribe();
+ else {
+ return this._tryNext(value);
}
- var innerSubscriber = new _InnerSubscriber__WEBPACK_IMPORTED_MODULE_2__["InnerSubscriber"](this, undefined, undefined);
- var destination = this.destination;
- destination.add(innerSubscriber);
- this.innerSubscription = Object(_util_subscribeToResult__WEBPACK_IMPORTED_MODULE_3__["subscribeToResult"])(this, result, value, index, innerSubscriber);
};
- SwitchMapSubscriber.prototype._complete = function () {
- var innerSubscription = this.innerSubscription;
- if (!innerSubscription || innerSubscription.closed) {
- _super.prototype._complete.call(this);
+ ScanSubscriber.prototype._tryNext = function (value) {
+ var index = this.index++;
+ var result;
+ try {
+ result = this.accumulator(this.seed, value, index);
}
- this.unsubscribe();
- };
- SwitchMapSubscriber.prototype._unsubscribe = function () {
- this.innerSubscription = null;
- };
- SwitchMapSubscriber.prototype.notifyComplete = function (innerSub) {
- var destination = this.destination;
- destination.remove(innerSub);
- this.innerSubscription = null;
- if (this.isStopped) {
- _super.prototype._complete.call(this);
+ catch (err) {
+ this.destination.error(err);
}
+ this.seed = result;
+ this.destination.next(result);
};
- SwitchMapSubscriber.prototype.notifyNext = function (outerValue, innerValue, outerIndex, innerIndex, innerSub) {
- this.destination.next(innerValue);
- };
- return SwitchMapSubscriber;
-}(_OuterSubscriber__WEBPACK_IMPORTED_MODULE_1__["OuterSubscriber"]));
-//# sourceMappingURL=switchMap.js.map
+ return ScanSubscriber;
+}(_Subscriber__WEBPACK_IMPORTED_MODULE_1__["Subscriber"]));
+//# sourceMappingURL=scan.js.map
/***/ }),
-/* 326 */
+/* 316 */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
"use strict";
__webpack_require__.r(__webpack_exports__);
-/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "switchMapTo", function() { return switchMapTo; });
-/* harmony import */ var _switchMap__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(325);
-/** PURE_IMPORTS_START _switchMap PURE_IMPORTS_END */
+/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "merge", function() { return merge; });
+/* harmony import */ var _observable_merge__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(258);
+/** PURE_IMPORTS_START _observable_merge PURE_IMPORTS_END */
-function switchMapTo(innerObservable, resultSelector) {
- return resultSelector ? Object(_switchMap__WEBPACK_IMPORTED_MODULE_0__["switchMap"])(function () { return innerObservable; }, resultSelector) : Object(_switchMap__WEBPACK_IMPORTED_MODULE_0__["switchMap"])(function () { return innerObservable; });
+function merge() {
+ var observables = [];
+ for (var _i = 0; _i < arguments.length; _i++) {
+ observables[_i] = arguments[_i];
+ }
+ return function (source) { return source.lift.call(_observable_merge__WEBPACK_IMPORTED_MODULE_0__["merge"].apply(void 0, [source].concat(observables))); };
}
-//# sourceMappingURL=switchMapTo.js.map
+//# sourceMappingURL=merge.js.map
/***/ }),
-/* 327 */
+/* 317 */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
"use strict";
__webpack_require__.r(__webpack_exports__);
-/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "takeUntil", function() { return takeUntil; });
-/* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(36);
-/* harmony import */ var _OuterSubscriber__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(171);
-/* harmony import */ var _util_subscribeToResult__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(182);
-/** PURE_IMPORTS_START tslib,_OuterSubscriber,_util_subscribeToResult PURE_IMPORTS_END */
-
-
+/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "mergeMapTo", function() { return mergeMapTo; });
+/* harmony import */ var _mergeMap__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(242);
+/** PURE_IMPORTS_START _mergeMap PURE_IMPORTS_END */
-function takeUntil(notifier) {
- return function (source) { return source.lift(new TakeUntilOperator(notifier)); };
-}
-var TakeUntilOperator = /*@__PURE__*/ (function () {
- function TakeUntilOperator(notifier) {
- this.notifier = notifier;
+function mergeMapTo(innerObservable, resultSelector, concurrent) {
+ if (concurrent === void 0) {
+ concurrent = Number.POSITIVE_INFINITY;
}
- TakeUntilOperator.prototype.call = function (subscriber, source) {
- var takeUntilSubscriber = new TakeUntilSubscriber(subscriber);
- var notifierSubscription = Object(_util_subscribeToResult__WEBPACK_IMPORTED_MODULE_2__["subscribeToResult"])(takeUntilSubscriber, this.notifier);
- if (notifierSubscription && !takeUntilSubscriber.seenValue) {
- takeUntilSubscriber.add(notifierSubscription);
- return source.subscribe(takeUntilSubscriber);
- }
- return takeUntilSubscriber;
- };
- return TakeUntilOperator;
-}());
-var TakeUntilSubscriber = /*@__PURE__*/ (function (_super) {
- tslib__WEBPACK_IMPORTED_MODULE_0__["__extends"](TakeUntilSubscriber, _super);
- function TakeUntilSubscriber(destination) {
- var _this = _super.call(this, destination) || this;
- _this.seenValue = false;
- return _this;
+ if (typeof resultSelector === 'function') {
+ return Object(_mergeMap__WEBPACK_IMPORTED_MODULE_0__["mergeMap"])(function () { return innerObservable; }, resultSelector, concurrent);
}
- TakeUntilSubscriber.prototype.notifyNext = function (outerValue, innerValue, outerIndex, innerIndex, innerSub) {
- this.seenValue = true;
- this.complete();
- };
- TakeUntilSubscriber.prototype.notifyComplete = function () {
- };
- return TakeUntilSubscriber;
-}(_OuterSubscriber__WEBPACK_IMPORTED_MODULE_1__["OuterSubscriber"]));
-//# sourceMappingURL=takeUntil.js.map
+ if (typeof resultSelector === 'number') {
+ concurrent = resultSelector;
+ }
+ return Object(_mergeMap__WEBPACK_IMPORTED_MODULE_0__["mergeMap"])(function () { return innerObservable; }, concurrent);
+}
+//# sourceMappingURL=mergeMapTo.js.map
/***/ }),
-/* 328 */
+/* 318 */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
"use strict";
__webpack_require__.r(__webpack_exports__);
-/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "takeWhile", function() { return takeWhile; });
+/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "mergeScan", function() { return mergeScan; });
+/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "MergeScanOperator", function() { return MergeScanOperator; });
+/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "MergeScanSubscriber", function() { return MergeScanSubscriber; });
/* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(36);
-/* harmony import */ var _Subscriber__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(172);
-/** PURE_IMPORTS_START tslib,_Subscriber PURE_IMPORTS_END */
+/* harmony import */ var _util_subscribeToResult__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(230);
+/* harmony import */ var _OuterSubscriber__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(229);
+/* harmony import */ var _InnerSubscriber__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(231);
+/** PURE_IMPORTS_START tslib,_util_subscribeToResult,_OuterSubscriber,_InnerSubscriber PURE_IMPORTS_END */
-function takeWhile(predicate, inclusive) {
- if (inclusive === void 0) {
- inclusive = false;
+
+
+function mergeScan(accumulator, seed, concurrent) {
+ if (concurrent === void 0) {
+ concurrent = Number.POSITIVE_INFINITY;
}
- return function (source) {
- return source.lift(new TakeWhileOperator(predicate, inclusive));
- };
+ return function (source) { return source.lift(new MergeScanOperator(accumulator, seed, concurrent)); };
}
-var TakeWhileOperator = /*@__PURE__*/ (function () {
- function TakeWhileOperator(predicate, inclusive) {
- this.predicate = predicate;
- this.inclusive = inclusive;
+var MergeScanOperator = /*@__PURE__*/ (function () {
+ function MergeScanOperator(accumulator, seed, concurrent) {
+ this.accumulator = accumulator;
+ this.seed = seed;
+ this.concurrent = concurrent;
}
- TakeWhileOperator.prototype.call = function (subscriber, source) {
- return source.subscribe(new TakeWhileSubscriber(subscriber, this.predicate, this.inclusive));
+ MergeScanOperator.prototype.call = function (subscriber, source) {
+ return source.subscribe(new MergeScanSubscriber(subscriber, this.accumulator, this.seed, this.concurrent));
};
- return TakeWhileOperator;
+ return MergeScanOperator;
}());
-var TakeWhileSubscriber = /*@__PURE__*/ (function (_super) {
- tslib__WEBPACK_IMPORTED_MODULE_0__["__extends"](TakeWhileSubscriber, _super);
- function TakeWhileSubscriber(destination, predicate, inclusive) {
+
+var MergeScanSubscriber = /*@__PURE__*/ (function (_super) {
+ tslib__WEBPACK_IMPORTED_MODULE_0__["__extends"](MergeScanSubscriber, _super);
+ function MergeScanSubscriber(destination, accumulator, acc, concurrent) {
var _this = _super.call(this, destination) || this;
- _this.predicate = predicate;
- _this.inclusive = inclusive;
+ _this.accumulator = accumulator;
+ _this.acc = acc;
+ _this.concurrent = concurrent;
+ _this.hasValue = false;
+ _this.hasCompleted = false;
+ _this.buffer = [];
+ _this.active = 0;
_this.index = 0;
return _this;
}
- TakeWhileSubscriber.prototype._next = function (value) {
- var destination = this.destination;
- var result;
- try {
- result = this.predicate(value, this.index++);
+ MergeScanSubscriber.prototype._next = function (value) {
+ if (this.active < this.concurrent) {
+ var index = this.index++;
+ var destination = this.destination;
+ var ish = void 0;
+ try {
+ var accumulator = this.accumulator;
+ ish = accumulator(this.acc, value, index);
+ }
+ catch (e) {
+ return destination.error(e);
+ }
+ this.active++;
+ this._innerSub(ish, value, index);
}
- catch (err) {
- destination.error(err);
- return;
+ else {
+ this.buffer.push(value);
}
- this.nextOrComplete(value, result);
};
- TakeWhileSubscriber.prototype.nextOrComplete = function (value, predicateResult) {
+ MergeScanSubscriber.prototype._innerSub = function (ish, value, index) {
+ var innerSubscriber = new _InnerSubscriber__WEBPACK_IMPORTED_MODULE_3__["InnerSubscriber"](this, undefined, undefined);
var destination = this.destination;
- if (Boolean(predicateResult)) {
- destination.next(value);
- }
- else {
- if (this.inclusive) {
- destination.next(value);
+ destination.add(innerSubscriber);
+ Object(_util_subscribeToResult__WEBPACK_IMPORTED_MODULE_1__["subscribeToResult"])(this, ish, value, index, innerSubscriber);
+ };
+ MergeScanSubscriber.prototype._complete = function () {
+ this.hasCompleted = true;
+ if (this.active === 0 && this.buffer.length === 0) {
+ if (this.hasValue === false) {
+ this.destination.next(this.acc);
}
- destination.complete();
+ this.destination.complete();
}
+ this.unsubscribe();
};
- return TakeWhileSubscriber;
-}(_Subscriber__WEBPACK_IMPORTED_MODULE_1__["Subscriber"]));
-//# sourceMappingURL=takeWhile.js.map
-
-
-/***/ }),
-/* 329 */
-/***/ (function(module, __webpack_exports__, __webpack_require__) {
-
-"use strict";
-__webpack_require__.r(__webpack_exports__);
-/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "tap", function() { return tap; });
-/* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(36);
-/* harmony import */ var _Subscriber__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(172);
-/* harmony import */ var _util_noop__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(197);
-/* harmony import */ var _util_isFunction__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(173);
-/** PURE_IMPORTS_START tslib,_Subscriber,_util_noop,_util_isFunction PURE_IMPORTS_END */
+ MergeScanSubscriber.prototype.notifyNext = function (outerValue, innerValue, outerIndex, innerIndex, innerSub) {
+ var destination = this.destination;
+ this.acc = innerValue;
+ this.hasValue = true;
+ destination.next(innerValue);
+ };
+ MergeScanSubscriber.prototype.notifyComplete = function (innerSub) {
+ var buffer = this.buffer;
+ var destination = this.destination;
+ destination.remove(innerSub);
+ this.active--;
+ if (buffer.length > 0) {
+ this._next(buffer.shift());
+ }
+ else if (this.active === 0 && this.hasCompleted) {
+ if (this.hasValue === false) {
+ this.destination.next(this.acc);
+ }
+ this.destination.complete();
+ }
+ };
+ return MergeScanSubscriber;
+}(_OuterSubscriber__WEBPACK_IMPORTED_MODULE_2__["OuterSubscriber"]));
+//# sourceMappingURL=mergeScan.js.map
+/***/ }),
+/* 319 */
+/***/ (function(module, __webpack_exports__, __webpack_require__) {
-function tap(nextOrObserver, error, complete) {
- return function tapOperatorFunction(source) {
- return source.lift(new DoOperator(nextOrObserver, error, complete));
- };
+"use strict";
+__webpack_require__.r(__webpack_exports__);
+/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "min", function() { return min; });
+/* harmony import */ var _reduce__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(314);
+/** PURE_IMPORTS_START _reduce PURE_IMPORTS_END */
+
+function min(comparer) {
+ var min = (typeof comparer === 'function')
+ ? function (x, y) { return comparer(x, y) < 0 ? x : y; }
+ : function (x, y) { return x < y ? x : y; };
+ return Object(_reduce__WEBPACK_IMPORTED_MODULE_0__["reduce"])(min);
}
-var DoOperator = /*@__PURE__*/ (function () {
- function DoOperator(nextOrObserver, error, complete) {
- this.nextOrObserver = nextOrObserver;
- this.error = error;
- this.complete = complete;
- }
- DoOperator.prototype.call = function (subscriber, source) {
- return source.subscribe(new TapSubscriber(subscriber, this.nextOrObserver, this.error, this.complete));
- };
- return DoOperator;
-}());
-var TapSubscriber = /*@__PURE__*/ (function (_super) {
- tslib__WEBPACK_IMPORTED_MODULE_0__["__extends"](TapSubscriber, _super);
- function TapSubscriber(destination, observerOrNext, error, complete) {
- var _this = _super.call(this, destination) || this;
- _this._tapNext = _util_noop__WEBPACK_IMPORTED_MODULE_2__["noop"];
- _this._tapError = _util_noop__WEBPACK_IMPORTED_MODULE_2__["noop"];
- _this._tapComplete = _util_noop__WEBPACK_IMPORTED_MODULE_2__["noop"];
- _this._tapError = error || _util_noop__WEBPACK_IMPORTED_MODULE_2__["noop"];
- _this._tapComplete = complete || _util_noop__WEBPACK_IMPORTED_MODULE_2__["noop"];
- if (Object(_util_isFunction__WEBPACK_IMPORTED_MODULE_3__["isFunction"])(observerOrNext)) {
- _this._context = _this;
- _this._tapNext = observerOrNext;
- }
- else if (observerOrNext) {
- _this._context = observerOrNext;
- _this._tapNext = observerOrNext.next || _util_noop__WEBPACK_IMPORTED_MODULE_2__["noop"];
- _this._tapError = observerOrNext.error || _util_noop__WEBPACK_IMPORTED_MODULE_2__["noop"];
- _this._tapComplete = observerOrNext.complete || _util_noop__WEBPACK_IMPORTED_MODULE_2__["noop"];
- }
- return _this;
- }
- TapSubscriber.prototype._next = function (value) {
- try {
- this._tapNext.call(this._context, value);
- }
- catch (err) {
- this.destination.error(err);
- return;
+//# sourceMappingURL=min.js.map
+
+
+/***/ }),
+/* 320 */
+/***/ (function(module, __webpack_exports__, __webpack_require__) {
+
+"use strict";
+__webpack_require__.r(__webpack_exports__);
+/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "multicast", function() { return multicast; });
+/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "MulticastOperator", function() { return MulticastOperator; });
+/* harmony import */ var _observable_ConnectableObservable__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(186);
+/** PURE_IMPORTS_START _observable_ConnectableObservable PURE_IMPORTS_END */
+
+function multicast(subjectOrSubjectFactory, selector) {
+ return function multicastOperatorFunction(source) {
+ var subjectFactory;
+ if (typeof subjectOrSubjectFactory === 'function') {
+ subjectFactory = subjectOrSubjectFactory;
}
- this.destination.next(value);
- };
- TapSubscriber.prototype._error = function (err) {
- try {
- this._tapError.call(this._context, err);
+ else {
+ subjectFactory = function subjectFactory() {
+ return subjectOrSubjectFactory;
+ };
}
- catch (err) {
- this.destination.error(err);
- return;
+ if (typeof selector === 'function') {
+ return source.lift(new MulticastOperator(subjectFactory, selector));
}
- this.destination.error(err);
+ var connectable = Object.create(source, _observable_ConnectableObservable__WEBPACK_IMPORTED_MODULE_0__["connectableObservableDescriptor"]);
+ connectable.source = source;
+ connectable.subjectFactory = subjectFactory;
+ return connectable;
};
- TapSubscriber.prototype._complete = function () {
- try {
- this._tapComplete.call(this._context);
- }
- catch (err) {
- this.destination.error(err);
- return;
- }
- return this.destination.complete();
+}
+var MulticastOperator = /*@__PURE__*/ (function () {
+ function MulticastOperator(subjectFactory, selector) {
+ this.subjectFactory = subjectFactory;
+ this.selector = selector;
+ }
+ MulticastOperator.prototype.call = function (subscriber, source) {
+ var selector = this.selector;
+ var subject = this.subjectFactory();
+ var subscription = selector(subject).subscribe(subscriber);
+ subscription.add(source.subscribe(subject));
+ return subscription;
};
- return TapSubscriber;
-}(_Subscriber__WEBPACK_IMPORTED_MODULE_1__["Subscriber"]));
-//# sourceMappingURL=tap.js.map
+ return MulticastOperator;
+}());
+
+//# sourceMappingURL=multicast.js.map
/***/ }),
-/* 330 */
+/* 321 */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
"use strict";
__webpack_require__.r(__webpack_exports__);
-/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "defaultThrottleConfig", function() { return defaultThrottleConfig; });
-/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "throttle", function() { return throttle; });
+/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "onErrorResumeNext", function() { return onErrorResumeNext; });
+/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "onErrorResumeNextStatic", function() { return onErrorResumeNextStatic; });
/* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(36);
-/* harmony import */ var _OuterSubscriber__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(171);
-/* harmony import */ var _util_subscribeToResult__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(182);
-/** PURE_IMPORTS_START tslib,_OuterSubscriber,_util_subscribeToResult PURE_IMPORTS_END */
+/* harmony import */ var _observable_from__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(243);
+/* harmony import */ var _util_isArray__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(178);
+/* harmony import */ var _OuterSubscriber__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(229);
+/* harmony import */ var _InnerSubscriber__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(231);
+/* harmony import */ var _util_subscribeToResult__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(230);
+/** PURE_IMPORTS_START tslib,_observable_from,_util_isArray,_OuterSubscriber,_InnerSubscriber,_util_subscribeToResult PURE_IMPORTS_END */
-var defaultThrottleConfig = {
- leading: true,
- trailing: false
-};
-function throttle(durationSelector, config) {
- if (config === void 0) {
- config = defaultThrottleConfig;
+
+
+
+function onErrorResumeNext() {
+ var nextSources = [];
+ for (var _i = 0; _i < arguments.length; _i++) {
+ nextSources[_i] = arguments[_i];
}
- return function (source) { return source.lift(new ThrottleOperator(durationSelector, config.leading, config.trailing)); };
+ if (nextSources.length === 1 && Object(_util_isArray__WEBPACK_IMPORTED_MODULE_2__["isArray"])(nextSources[0])) {
+ nextSources = nextSources[0];
+ }
+ return function (source) { return source.lift(new OnErrorResumeNextOperator(nextSources)); };
}
-var ThrottleOperator = /*@__PURE__*/ (function () {
- function ThrottleOperator(durationSelector, leading, trailing) {
- this.durationSelector = durationSelector;
- this.leading = leading;
- this.trailing = trailing;
+function onErrorResumeNextStatic() {
+ var nextSources = [];
+ for (var _i = 0; _i < arguments.length; _i++) {
+ nextSources[_i] = arguments[_i];
}
- ThrottleOperator.prototype.call = function (subscriber, source) {
- return source.subscribe(new ThrottleSubscriber(subscriber, this.durationSelector, this.leading, this.trailing));
+ var source = null;
+ if (nextSources.length === 1 && Object(_util_isArray__WEBPACK_IMPORTED_MODULE_2__["isArray"])(nextSources[0])) {
+ nextSources = nextSources[0];
+ }
+ source = nextSources.shift();
+ return Object(_observable_from__WEBPACK_IMPORTED_MODULE_1__["from"])(source, null).lift(new OnErrorResumeNextOperator(nextSources));
+}
+var OnErrorResumeNextOperator = /*@__PURE__*/ (function () {
+ function OnErrorResumeNextOperator(nextSources) {
+ this.nextSources = nextSources;
+ }
+ OnErrorResumeNextOperator.prototype.call = function (subscriber, source) {
+ return source.subscribe(new OnErrorResumeNextSubscriber(subscriber, this.nextSources));
};
- return ThrottleOperator;
+ return OnErrorResumeNextOperator;
}());
-var ThrottleSubscriber = /*@__PURE__*/ (function (_super) {
- tslib__WEBPACK_IMPORTED_MODULE_0__["__extends"](ThrottleSubscriber, _super);
- function ThrottleSubscriber(destination, durationSelector, _leading, _trailing) {
+var OnErrorResumeNextSubscriber = /*@__PURE__*/ (function (_super) {
+ tslib__WEBPACK_IMPORTED_MODULE_0__["__extends"](OnErrorResumeNextSubscriber, _super);
+ function OnErrorResumeNextSubscriber(destination, nextSources) {
var _this = _super.call(this, destination) || this;
_this.destination = destination;
- _this.durationSelector = durationSelector;
- _this._leading = _leading;
- _this._trailing = _trailing;
- _this._hasValue = false;
+ _this.nextSources = nextSources;
return _this;
}
- ThrottleSubscriber.prototype._next = function (value) {
- this._hasValue = true;
- this._sendValue = value;
- if (!this._throttled) {
- if (this._leading) {
- this.send();
- }
- else {
- this.throttle(value);
- }
- }
+ OnErrorResumeNextSubscriber.prototype.notifyError = function (error, innerSub) {
+ this.subscribeToNextSource();
};
- ThrottleSubscriber.prototype.send = function () {
- var _a = this, _hasValue = _a._hasValue, _sendValue = _a._sendValue;
- if (_hasValue) {
- this.destination.next(_sendValue);
- this.throttle(_sendValue);
- }
- this._hasValue = false;
- this._sendValue = null;
+ OnErrorResumeNextSubscriber.prototype.notifyComplete = function (innerSub) {
+ this.subscribeToNextSource();
};
- ThrottleSubscriber.prototype.throttle = function (value) {
- var duration = this.tryDurationSelector(value);
- if (!!duration) {
- this.add(this._throttled = Object(_util_subscribeToResult__WEBPACK_IMPORTED_MODULE_2__["subscribeToResult"])(this, duration));
- }
+ OnErrorResumeNextSubscriber.prototype._error = function (err) {
+ this.subscribeToNextSource();
+ this.unsubscribe();
};
- ThrottleSubscriber.prototype.tryDurationSelector = function (value) {
- try {
- return this.durationSelector(value);
- }
- catch (err) {
- this.destination.error(err);
- return null;
- }
+ OnErrorResumeNextSubscriber.prototype._complete = function () {
+ this.subscribeToNextSource();
+ this.unsubscribe();
};
- ThrottleSubscriber.prototype.throttlingDone = function () {
- var _a = this, _throttled = _a._throttled, _trailing = _a._trailing;
- if (_throttled) {
- _throttled.unsubscribe();
+ OnErrorResumeNextSubscriber.prototype.subscribeToNextSource = function () {
+ var next = this.nextSources.shift();
+ if (!!next) {
+ var innerSubscriber = new _InnerSubscriber__WEBPACK_IMPORTED_MODULE_4__["InnerSubscriber"](this, undefined, undefined);
+ var destination = this.destination;
+ destination.add(innerSubscriber);
+ Object(_util_subscribeToResult__WEBPACK_IMPORTED_MODULE_5__["subscribeToResult"])(this, next, undefined, undefined, innerSubscriber);
}
- this._throttled = null;
- if (_trailing) {
- this.send();
+ else {
+ this.destination.complete();
}
};
- ThrottleSubscriber.prototype.notifyNext = function (outerValue, innerValue, outerIndex, innerIndex, innerSub) {
- this.throttlingDone();
- };
- ThrottleSubscriber.prototype.notifyComplete = function () {
- this.throttlingDone();
- };
- return ThrottleSubscriber;
-}(_OuterSubscriber__WEBPACK_IMPORTED_MODULE_1__["OuterSubscriber"]));
-//# sourceMappingURL=throttle.js.map
+ return OnErrorResumeNextSubscriber;
+}(_OuterSubscriber__WEBPACK_IMPORTED_MODULE_3__["OuterSubscriber"]));
+//# sourceMappingURL=onErrorResumeNext.js.map
/***/ }),
-/* 331 */
+/* 322 */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
"use strict";
__webpack_require__.r(__webpack_exports__);
-/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "throttleTime", function() { return throttleTime; });
+/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "pairwise", function() { return pairwise; });
/* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(36);
/* harmony import */ var _Subscriber__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(172);
-/* harmony import */ var _scheduler_async__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(199);
-/* harmony import */ var _throttle__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(330);
-/** PURE_IMPORTS_START tslib,_Subscriber,_scheduler_async,_throttle PURE_IMPORTS_END */
-
-
+/** PURE_IMPORTS_START tslib,_Subscriber PURE_IMPORTS_END */
-function throttleTime(duration, scheduler, config) {
- if (scheduler === void 0) {
- scheduler = _scheduler_async__WEBPACK_IMPORTED_MODULE_2__["async"];
- }
- if (config === void 0) {
- config = _throttle__WEBPACK_IMPORTED_MODULE_3__["defaultThrottleConfig"];
- }
- return function (source) { return source.lift(new ThrottleTimeOperator(duration, scheduler, config.leading, config.trailing)); };
+function pairwise() {
+ return function (source) { return source.lift(new PairwiseOperator()); };
}
-var ThrottleTimeOperator = /*@__PURE__*/ (function () {
- function ThrottleTimeOperator(duration, scheduler, leading, trailing) {
- this.duration = duration;
- this.scheduler = scheduler;
- this.leading = leading;
- this.trailing = trailing;
+var PairwiseOperator = /*@__PURE__*/ (function () {
+ function PairwiseOperator() {
}
- ThrottleTimeOperator.prototype.call = function (subscriber, source) {
- return source.subscribe(new ThrottleTimeSubscriber(subscriber, this.duration, this.scheduler, this.leading, this.trailing));
+ PairwiseOperator.prototype.call = function (subscriber, source) {
+ return source.subscribe(new PairwiseSubscriber(subscriber));
};
- return ThrottleTimeOperator;
+ return PairwiseOperator;
}());
-var ThrottleTimeSubscriber = /*@__PURE__*/ (function (_super) {
- tslib__WEBPACK_IMPORTED_MODULE_0__["__extends"](ThrottleTimeSubscriber, _super);
- function ThrottleTimeSubscriber(destination, duration, scheduler, leading, trailing) {
+var PairwiseSubscriber = /*@__PURE__*/ (function (_super) {
+ tslib__WEBPACK_IMPORTED_MODULE_0__["__extends"](PairwiseSubscriber, _super);
+ function PairwiseSubscriber(destination) {
var _this = _super.call(this, destination) || this;
- _this.duration = duration;
- _this.scheduler = scheduler;
- _this.leading = leading;
- _this.trailing = trailing;
- _this._hasTrailingValue = false;
- _this._trailingValue = null;
+ _this.hasPrev = false;
return _this;
}
- ThrottleTimeSubscriber.prototype._next = function (value) {
- if (this.throttled) {
- if (this.trailing) {
- this._trailingValue = value;
- this._hasTrailingValue = true;
- }
- }
- else {
- this.add(this.throttled = this.scheduler.schedule(dispatchNext, this.duration, { subscriber: this }));
- if (this.leading) {
- this.destination.next(value);
- }
- else if (this.trailing) {
- this._trailingValue = value;
- this._hasTrailingValue = true;
- }
- }
- };
- ThrottleTimeSubscriber.prototype._complete = function () {
- if (this._hasTrailingValue) {
- this.destination.next(this._trailingValue);
- this.destination.complete();
+ PairwiseSubscriber.prototype._next = function (value) {
+ var pair;
+ if (this.hasPrev) {
+ pair = [this.prev, value];
}
else {
- this.destination.complete();
+ this.hasPrev = true;
}
- };
- ThrottleTimeSubscriber.prototype.clearThrottle = function () {
- var throttled = this.throttled;
- if (throttled) {
- if (this.trailing && this._hasTrailingValue) {
- this.destination.next(this._trailingValue);
- this._trailingValue = null;
- this._hasTrailingValue = false;
- }
- throttled.unsubscribe();
- this.remove(throttled);
- this.throttled = null;
+ this.prev = value;
+ if (pair) {
+ this.destination.next(pair);
}
};
- return ThrottleTimeSubscriber;
+ return PairwiseSubscriber;
}(_Subscriber__WEBPACK_IMPORTED_MODULE_1__["Subscriber"]));
-function dispatchNext(arg) {
- var subscriber = arg.subscriber;
- subscriber.clearThrottle();
-}
-//# sourceMappingURL=throttleTime.js.map
+//# sourceMappingURL=pairwise.js.map
/***/ }),
-/* 332 */
+/* 323 */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
"use strict";
__webpack_require__.r(__webpack_exports__);
-/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "timeInterval", function() { return timeInterval; });
-/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "TimeInterval", function() { return TimeInterval; });
-/* harmony import */ var _scheduler_async__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(199);
-/* harmony import */ var _scan__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(276);
-/* harmony import */ var _observable_defer__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(333);
-/* harmony import */ var _map__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(231);
-/** PURE_IMPORTS_START _scheduler_async,_scan,_observable_defer,_map PURE_IMPORTS_END */
-
-
+/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "partition", function() { return partition; });
+/* harmony import */ var _util_not__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(263);
+/* harmony import */ var _filter__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(264);
+/** PURE_IMPORTS_START _util_not,_filter PURE_IMPORTS_END */
-function timeInterval(scheduler) {
- if (scheduler === void 0) {
- scheduler = _scheduler_async__WEBPACK_IMPORTED_MODULE_0__["async"];
- }
+function partition(predicate, thisArg) {
return function (source) {
- return Object(_observable_defer__WEBPACK_IMPORTED_MODULE_2__["defer"])(function () {
- return source.pipe(Object(_scan__WEBPACK_IMPORTED_MODULE_1__["scan"])(function (_a, value) {
- var current = _a.current;
- return ({ value: value, current: scheduler.now(), last: current });
- }, { current: scheduler.now(), value: undefined, last: undefined }), Object(_map__WEBPACK_IMPORTED_MODULE_3__["map"])(function (_a) {
- var current = _a.current, last = _a.last, value = _a.value;
- return new TimeInterval(value, current - last);
- }));
- });
+ return [
+ Object(_filter__WEBPACK_IMPORTED_MODULE_1__["filter"])(predicate, thisArg)(source),
+ Object(_filter__WEBPACK_IMPORTED_MODULE_1__["filter"])(Object(_util_not__WEBPACK_IMPORTED_MODULE_0__["not"])(predicate, thisArg))(source)
+ ];
};
}
-var TimeInterval = /*@__PURE__*/ (function () {
- function TimeInterval(value, interval) {
- this.value = value;
- this.interval = interval;
- }
- return TimeInterval;
-}());
-
-//# sourceMappingURL=timeInterval.js.map
+//# sourceMappingURL=partition.js.map
/***/ }),
-/* 333 */
+/* 324 */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
"use strict";
__webpack_require__.r(__webpack_exports__);
-/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "defer", function() { return defer; });
-/* harmony import */ var _Observable__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(193);
-/* harmony import */ var _from__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(218);
-/* harmony import */ var _empty__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(242);
-/** PURE_IMPORTS_START _Observable,_from,_empty PURE_IMPORTS_END */
-
-
+/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "pluck", function() { return pluck; });
+/* harmony import */ var _map__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(226);
+/** PURE_IMPORTS_START _map PURE_IMPORTS_END */
-function defer(observableFactory) {
- return new _Observable__WEBPACK_IMPORTED_MODULE_0__["Observable"](function (subscriber) {
- var input;
- try {
- input = observableFactory();
- }
- catch (err) {
- subscriber.error(err);
- return undefined;
+function pluck() {
+ var properties = [];
+ for (var _i = 0; _i < arguments.length; _i++) {
+ properties[_i] = arguments[_i];
+ }
+ var length = properties.length;
+ if (length === 0) {
+ throw new Error('list of properties cannot be empty.');
+ }
+ return function (source) { return Object(_map__WEBPACK_IMPORTED_MODULE_0__["map"])(plucker(properties, length))(source); };
+}
+function plucker(props, length) {
+ var mapper = function (x) {
+ var currentProp = x;
+ for (var i = 0; i < length; i++) {
+ var p = currentProp[props[i]];
+ if (typeof p !== 'undefined') {
+ currentProp = p;
+ }
+ else {
+ return undefined;
+ }
}
- var source = input ? Object(_from__WEBPACK_IMPORTED_MODULE_1__["from"])(input) : Object(_empty__WEBPACK_IMPORTED_MODULE_2__["empty"])();
- return source.subscribe(subscriber);
- });
+ return currentProp;
+ };
+ return mapper;
}
-//# sourceMappingURL=defer.js.map
+//# sourceMappingURL=pluck.js.map
/***/ }),
-/* 334 */
+/* 325 */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
"use strict";
__webpack_require__.r(__webpack_exports__);
-/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "timeout", function() { return timeout; });
-/* harmony import */ var _scheduler_async__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(199);
-/* harmony import */ var _util_TimeoutError__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(335);
-/* harmony import */ var _timeoutWith__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(336);
-/* harmony import */ var _observable_throwError__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(243);
-/** PURE_IMPORTS_START _scheduler_async,_util_TimeoutError,_timeoutWith,_observable_throwError PURE_IMPORTS_END */
-
-
+/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "publish", function() { return publish; });
+/* harmony import */ var _Subject__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(187);
+/* harmony import */ var _multicast__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(320);
+/** PURE_IMPORTS_START _Subject,_multicast PURE_IMPORTS_END */
-function timeout(due, scheduler) {
- if (scheduler === void 0) {
- scheduler = _scheduler_async__WEBPACK_IMPORTED_MODULE_0__["async"];
- }
- return Object(_timeoutWith__WEBPACK_IMPORTED_MODULE_2__["timeoutWith"])(due, Object(_observable_throwError__WEBPACK_IMPORTED_MODULE_3__["throwError"])(new _util_TimeoutError__WEBPACK_IMPORTED_MODULE_1__["TimeoutError"]()), scheduler);
+function publish(selector) {
+ return selector ?
+ Object(_multicast__WEBPACK_IMPORTED_MODULE_1__["multicast"])(function () { return new _Subject__WEBPACK_IMPORTED_MODULE_0__["Subject"](); }, selector) :
+ Object(_multicast__WEBPACK_IMPORTED_MODULE_1__["multicast"])(new _Subject__WEBPACK_IMPORTED_MODULE_0__["Subject"]());
}
-//# sourceMappingURL=timeout.js.map
+//# sourceMappingURL=publish.js.map
/***/ }),
-/* 335 */
+/* 326 */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
"use strict";
__webpack_require__.r(__webpack_exports__);
-/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "TimeoutError", function() { return TimeoutError; });
-/** PURE_IMPORTS_START PURE_IMPORTS_END */
-var TimeoutErrorImpl = /*@__PURE__*/ (function () {
- function TimeoutErrorImpl() {
- Error.call(this);
- this.message = 'Timeout has occurred';
- this.name = 'TimeoutError';
- return this;
- }
- TimeoutErrorImpl.prototype = /*@__PURE__*/ Object.create(Error.prototype);
- return TimeoutErrorImpl;
-})();
-var TimeoutError = TimeoutErrorImpl;
-//# sourceMappingURL=TimeoutError.js.map
+/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "publishBehavior", function() { return publishBehavior; });
+/* harmony import */ var _BehaviorSubject__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(192);
+/* harmony import */ var _multicast__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(320);
+/** PURE_IMPORTS_START _BehaviorSubject,_multicast PURE_IMPORTS_END */
+
+
+function publishBehavior(value) {
+ return function (source) { return Object(_multicast__WEBPACK_IMPORTED_MODULE_1__["multicast"])(new _BehaviorSubject__WEBPACK_IMPORTED_MODULE_0__["BehaviorSubject"](value))(source); };
+}
+//# sourceMappingURL=publishBehavior.js.map
/***/ }),
-/* 336 */
+/* 327 */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
"use strict";
__webpack_require__.r(__webpack_exports__);
-/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "timeoutWith", function() { return timeoutWith; });
-/* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(36);
-/* harmony import */ var _scheduler_async__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(199);
-/* harmony import */ var _util_isDate__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(240);
-/* harmony import */ var _OuterSubscriber__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(171);
-/* harmony import */ var _util_subscribeToResult__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(182);
-/** PURE_IMPORTS_START tslib,_scheduler_async,_util_isDate,_OuterSubscriber,_util_subscribeToResult PURE_IMPORTS_END */
+/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "publishLast", function() { return publishLast; });
+/* harmony import */ var _AsyncSubject__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(210);
+/* harmony import */ var _multicast__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(320);
+/** PURE_IMPORTS_START _AsyncSubject,_multicast PURE_IMPORTS_END */
+function publishLast() {
+ return function (source) { return Object(_multicast__WEBPACK_IMPORTED_MODULE_1__["multicast"])(new _AsyncSubject__WEBPACK_IMPORTED_MODULE_0__["AsyncSubject"]())(source); };
+}
+//# sourceMappingURL=publishLast.js.map
+/***/ }),
+/* 328 */
+/***/ (function(module, __webpack_exports__, __webpack_require__) {
-function timeoutWith(due, withObservable, scheduler) {
- if (scheduler === void 0) {
- scheduler = _scheduler_async__WEBPACK_IMPORTED_MODULE_1__["async"];
+"use strict";
+__webpack_require__.r(__webpack_exports__);
+/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "publishReplay", function() { return publishReplay; });
+/* harmony import */ var _ReplaySubject__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(193);
+/* harmony import */ var _multicast__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(320);
+/** PURE_IMPORTS_START _ReplaySubject,_multicast PURE_IMPORTS_END */
+
+
+function publishReplay(bufferSize, windowTime, selectorOrScheduler, scheduler) {
+ if (selectorOrScheduler && typeof selectorOrScheduler !== 'function') {
+ scheduler = selectorOrScheduler;
}
- return function (source) {
- var absoluteTimeout = Object(_util_isDate__WEBPACK_IMPORTED_MODULE_2__["isDate"])(due);
- var waitFor = absoluteTimeout ? (+due - scheduler.now()) : Math.abs(due);
- return source.lift(new TimeoutWithOperator(waitFor, absoluteTimeout, withObservable, scheduler));
- };
+ var selector = typeof selectorOrScheduler === 'function' ? selectorOrScheduler : undefined;
+ var subject = new _ReplaySubject__WEBPACK_IMPORTED_MODULE_0__["ReplaySubject"](bufferSize, windowTime, scheduler);
+ return function (source) { return Object(_multicast__WEBPACK_IMPORTED_MODULE_1__["multicast"])(function () { return subject; }, selector)(source); };
}
-var TimeoutWithOperator = /*@__PURE__*/ (function () {
- function TimeoutWithOperator(waitFor, absoluteTimeout, withObservable, scheduler) {
- this.waitFor = waitFor;
- this.absoluteTimeout = absoluteTimeout;
- this.withObservable = withObservable;
- this.scheduler = scheduler;
- }
- TimeoutWithOperator.prototype.call = function (subscriber, source) {
- return source.subscribe(new TimeoutWithSubscriber(subscriber, this.absoluteTimeout, this.waitFor, this.withObservable, this.scheduler));
- };
- return TimeoutWithOperator;
-}());
-var TimeoutWithSubscriber = /*@__PURE__*/ (function (_super) {
- tslib__WEBPACK_IMPORTED_MODULE_0__["__extends"](TimeoutWithSubscriber, _super);
- function TimeoutWithSubscriber(destination, absoluteTimeout, waitFor, withObservable, scheduler) {
- var _this = _super.call(this, destination) || this;
- _this.absoluteTimeout = absoluteTimeout;
- _this.waitFor = waitFor;
- _this.withObservable = withObservable;
- _this.scheduler = scheduler;
- _this.action = null;
- _this.scheduleTimeout();
- return _this;
- }
- TimeoutWithSubscriber.dispatchTimeout = function (subscriber) {
- var withObservable = subscriber.withObservable;
- subscriber._unsubscribeAndRecycle();
- subscriber.add(Object(_util_subscribeToResult__WEBPACK_IMPORTED_MODULE_4__["subscribeToResult"])(subscriber, withObservable));
- };
- TimeoutWithSubscriber.prototype.scheduleTimeout = function () {
- var action = this.action;
- if (action) {
- this.action = action.schedule(this, this.waitFor);
- }
- else {
- this.add(this.action = this.scheduler.schedule(TimeoutWithSubscriber.dispatchTimeout, this.waitFor, this));
- }
- };
- TimeoutWithSubscriber.prototype._next = function (value) {
- if (!this.absoluteTimeout) {
- this.scheduleTimeout();
- }
- _super.prototype._next.call(this, value);
- };
- TimeoutWithSubscriber.prototype._unsubscribe = function () {
- this.action = null;
- this.scheduler = null;
- this.withObservable = null;
- };
- return TimeoutWithSubscriber;
-}(_OuterSubscriber__WEBPACK_IMPORTED_MODULE_3__["OuterSubscriber"]));
-//# sourceMappingURL=timeoutWith.js.map
+//# sourceMappingURL=publishReplay.js.map
/***/ }),
-/* 337 */
+/* 329 */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
"use strict";
__webpack_require__.r(__webpack_exports__);
-/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "timestamp", function() { return timestamp; });
-/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "Timestamp", function() { return Timestamp; });
-/* harmony import */ var _scheduler_async__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(199);
-/* harmony import */ var _map__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(231);
-/** PURE_IMPORTS_START _scheduler_async,_map PURE_IMPORTS_END */
+/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "race", function() { return race; });
+/* harmony import */ var _util_isArray__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(178);
+/* harmony import */ var _observable_race__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(265);
+/** PURE_IMPORTS_START _util_isArray,_observable_race PURE_IMPORTS_END */
-function timestamp(scheduler) {
- if (scheduler === void 0) {
- scheduler = _scheduler_async__WEBPACK_IMPORTED_MODULE_0__["async"];
+function race() {
+ var observables = [];
+ for (var _i = 0; _i < arguments.length; _i++) {
+ observables[_i] = arguments[_i];
}
- return Object(_map__WEBPACK_IMPORTED_MODULE_1__["map"])(function (value) { return new Timestamp(value, scheduler.now()); });
+ return function raceOperatorFunction(source) {
+ if (observables.length === 1 && Object(_util_isArray__WEBPACK_IMPORTED_MODULE_0__["isArray"])(observables[0])) {
+ observables = observables[0];
+ }
+ return source.lift.call(_observable_race__WEBPACK_IMPORTED_MODULE_1__["race"].apply(void 0, [source].concat(observables)));
+ };
}
-var Timestamp = /*@__PURE__*/ (function () {
- function Timestamp(value, timestamp) {
- this.value = value;
- this.timestamp = timestamp;
- }
- return Timestamp;
-}());
-
-//# sourceMappingURL=timestamp.js.map
+//# sourceMappingURL=race.js.map
/***/ }),
-/* 338 */
+/* 330 */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
"use strict";
__webpack_require__.r(__webpack_exports__);
-/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "toArray", function() { return toArray; });
-/* harmony import */ var _reduce__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(275);
-/** PURE_IMPORTS_START _reduce PURE_IMPORTS_END */
+/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "repeat", function() { return repeat; });
+/* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(36);
+/* harmony import */ var _Subscriber__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(172);
+/* harmony import */ var _observable_empty__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(203);
+/** PURE_IMPORTS_START tslib,_Subscriber,_observable_empty PURE_IMPORTS_END */
-function toArrayReducer(arr, item, index) {
- if (index === 0) {
- return [item];
+
+
+function repeat(count) {
+ if (count === void 0) {
+ count = -1;
}
- arr.push(item);
- return arr;
-}
-function toArray() {
- return Object(_reduce__WEBPACK_IMPORTED_MODULE_0__["reduce"])(toArrayReducer, []);
+ return function (source) {
+ if (count === 0) {
+ return Object(_observable_empty__WEBPACK_IMPORTED_MODULE_2__["empty"])();
+ }
+ else if (count < 0) {
+ return source.lift(new RepeatOperator(-1, source));
+ }
+ else {
+ return source.lift(new RepeatOperator(count - 1, source));
+ }
+ };
}
-//# sourceMappingURL=toArray.js.map
+var RepeatOperator = /*@__PURE__*/ (function () {
+ function RepeatOperator(count, source) {
+ this.count = count;
+ this.source = source;
+ }
+ RepeatOperator.prototype.call = function (subscriber, source) {
+ return source.subscribe(new RepeatSubscriber(subscriber, this.count, this.source));
+ };
+ return RepeatOperator;
+}());
+var RepeatSubscriber = /*@__PURE__*/ (function (_super) {
+ tslib__WEBPACK_IMPORTED_MODULE_0__["__extends"](RepeatSubscriber, _super);
+ function RepeatSubscriber(destination, count, source) {
+ var _this = _super.call(this, destination) || this;
+ _this.count = count;
+ _this.source = source;
+ return _this;
+ }
+ RepeatSubscriber.prototype.complete = function () {
+ if (!this.isStopped) {
+ var _a = this, source = _a.source, count = _a.count;
+ if (count === 0) {
+ return _super.prototype.complete.call(this);
+ }
+ else if (count > -1) {
+ this.count = count - 1;
+ }
+ source.subscribe(this._unsubscribeAndRecycle());
+ }
+ };
+ return RepeatSubscriber;
+}(_Subscriber__WEBPACK_IMPORTED_MODULE_1__["Subscriber"]));
+//# sourceMappingURL=repeat.js.map
/***/ }),
-/* 339 */
+/* 331 */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
"use strict";
__webpack_require__.r(__webpack_exports__);
-/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "window", function() { return window; });
+/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "repeatWhen", function() { return repeatWhen; });
/* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(36);
-/* harmony import */ var _Subject__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(265);
-/* harmony import */ var _OuterSubscriber__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(171);
-/* harmony import */ var _util_subscribeToResult__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(182);
+/* harmony import */ var _Subject__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(187);
+/* harmony import */ var _OuterSubscriber__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(229);
+/* harmony import */ var _util_subscribeToResult__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(230);
/** PURE_IMPORTS_START tslib,_Subject,_OuterSubscriber,_util_subscribeToResult PURE_IMPORTS_END */
-function window(windowBoundaries) {
- return function windowOperatorFunction(source) {
- return source.lift(new WindowOperator(windowBoundaries));
- };
+function repeatWhen(notifier) {
+ return function (source) { return source.lift(new RepeatWhenOperator(notifier)); };
}
-var WindowOperator = /*@__PURE__*/ (function () {
- function WindowOperator(windowBoundaries) {
- this.windowBoundaries = windowBoundaries;
+var RepeatWhenOperator = /*@__PURE__*/ (function () {
+ function RepeatWhenOperator(notifier) {
+ this.notifier = notifier;
}
- WindowOperator.prototype.call = function (subscriber, source) {
- var windowSubscriber = new WindowSubscriber(subscriber);
- var sourceSubscription = source.subscribe(windowSubscriber);
- if (!sourceSubscription.closed) {
- windowSubscriber.add(Object(_util_subscribeToResult__WEBPACK_IMPORTED_MODULE_3__["subscribeToResult"])(windowSubscriber, this.windowBoundaries));
- }
- return sourceSubscription;
+ RepeatWhenOperator.prototype.call = function (subscriber, source) {
+ return source.subscribe(new RepeatWhenSubscriber(subscriber, this.notifier, source));
};
- return WindowOperator;
+ return RepeatWhenOperator;
}());
-var WindowSubscriber = /*@__PURE__*/ (function (_super) {
- tslib__WEBPACK_IMPORTED_MODULE_0__["__extends"](WindowSubscriber, _super);
- function WindowSubscriber(destination) {
+var RepeatWhenSubscriber = /*@__PURE__*/ (function (_super) {
+ tslib__WEBPACK_IMPORTED_MODULE_0__["__extends"](RepeatWhenSubscriber, _super);
+ function RepeatWhenSubscriber(destination, notifier, source) {
var _this = _super.call(this, destination) || this;
- _this.window = new _Subject__WEBPACK_IMPORTED_MODULE_1__["Subject"]();
- destination.next(_this.window);
+ _this.notifier = notifier;
+ _this.source = source;
+ _this.sourceIsBeingSubscribedTo = true;
return _this;
}
- WindowSubscriber.prototype.notifyNext = function (outerValue, innerValue, outerIndex, innerIndex, innerSub) {
- this.openWindow();
- };
- WindowSubscriber.prototype.notifyError = function (error, innerSub) {
- this._error(error);
- };
- WindowSubscriber.prototype.notifyComplete = function (innerSub) {
- this._complete();
+ RepeatWhenSubscriber.prototype.notifyNext = function (outerValue, innerValue, outerIndex, innerIndex, innerSub) {
+ this.sourceIsBeingSubscribedTo = true;
+ this.source.subscribe(this);
};
- WindowSubscriber.prototype._next = function (value) {
- this.window.next(value);
+ RepeatWhenSubscriber.prototype.notifyComplete = function (innerSub) {
+ if (this.sourceIsBeingSubscribedTo === false) {
+ return _super.prototype.complete.call(this);
+ }
};
- WindowSubscriber.prototype._error = function (err) {
- this.window.error(err);
- this.destination.error(err);
+ RepeatWhenSubscriber.prototype.complete = function () {
+ this.sourceIsBeingSubscribedTo = false;
+ if (!this.isStopped) {
+ if (!this.retries) {
+ this.subscribeToRetries();
+ }
+ if (!this.retriesSubscription || this.retriesSubscription.closed) {
+ return _super.prototype.complete.call(this);
+ }
+ this._unsubscribeAndRecycle();
+ this.notifications.next();
+ }
};
- WindowSubscriber.prototype._complete = function () {
- this.window.complete();
- this.destination.complete();
+ RepeatWhenSubscriber.prototype._unsubscribe = function () {
+ var _a = this, notifications = _a.notifications, retriesSubscription = _a.retriesSubscription;
+ if (notifications) {
+ notifications.unsubscribe();
+ this.notifications = null;
+ }
+ if (retriesSubscription) {
+ retriesSubscription.unsubscribe();
+ this.retriesSubscription = null;
+ }
+ this.retries = null;
};
- WindowSubscriber.prototype._unsubscribe = function () {
- this.window = null;
+ RepeatWhenSubscriber.prototype._unsubscribeAndRecycle = function () {
+ var _unsubscribe = this._unsubscribe;
+ this._unsubscribe = null;
+ _super.prototype._unsubscribeAndRecycle.call(this);
+ this._unsubscribe = _unsubscribe;
+ return this;
};
- WindowSubscriber.prototype.openWindow = function () {
- var prevWindow = this.window;
- if (prevWindow) {
- prevWindow.complete();
+ RepeatWhenSubscriber.prototype.subscribeToRetries = function () {
+ this.notifications = new _Subject__WEBPACK_IMPORTED_MODULE_1__["Subject"]();
+ var retries;
+ try {
+ var notifier = this.notifier;
+ retries = notifier(this.notifications);
}
- var destination = this.destination;
- var newWindow = this.window = new _Subject__WEBPACK_IMPORTED_MODULE_1__["Subject"]();
- destination.next(newWindow);
+ catch (e) {
+ return _super.prototype.complete.call(this);
+ }
+ this.retries = retries;
+ this.retriesSubscription = Object(_util_subscribeToResult__WEBPACK_IMPORTED_MODULE_3__["subscribeToResult"])(this, retries);
};
- return WindowSubscriber;
+ return RepeatWhenSubscriber;
}(_OuterSubscriber__WEBPACK_IMPORTED_MODULE_2__["OuterSubscriber"]));
-//# sourceMappingURL=window.js.map
+//# sourceMappingURL=repeatWhen.js.map
/***/ }),
-/* 340 */
+/* 332 */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
"use strict";
__webpack_require__.r(__webpack_exports__);
-/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "windowCount", function() { return windowCount; });
+/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "retry", function() { return retry; });
/* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(36);
/* harmony import */ var _Subscriber__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(172);
-/* harmony import */ var _Subject__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(265);
-/** PURE_IMPORTS_START tslib,_Subscriber,_Subject PURE_IMPORTS_END */
-
+/** PURE_IMPORTS_START tslib,_Subscriber PURE_IMPORTS_END */
-function windowCount(windowSize, startWindowEvery) {
- if (startWindowEvery === void 0) {
- startWindowEvery = 0;
+function retry(count) {
+ if (count === void 0) {
+ count = -1;
}
- return function windowCountOperatorFunction(source) {
- return source.lift(new WindowCountOperator(windowSize, startWindowEvery));
- };
+ return function (source) { return source.lift(new RetryOperator(count, source)); };
}
-var WindowCountOperator = /*@__PURE__*/ (function () {
- function WindowCountOperator(windowSize, startWindowEvery) {
- this.windowSize = windowSize;
- this.startWindowEvery = startWindowEvery;
+var RetryOperator = /*@__PURE__*/ (function () {
+ function RetryOperator(count, source) {
+ this.count = count;
+ this.source = source;
}
- WindowCountOperator.prototype.call = function (subscriber, source) {
- return source.subscribe(new WindowCountSubscriber(subscriber, this.windowSize, this.startWindowEvery));
+ RetryOperator.prototype.call = function (subscriber, source) {
+ return source.subscribe(new RetrySubscriber(subscriber, this.count, this.source));
};
- return WindowCountOperator;
+ return RetryOperator;
}());
-var WindowCountSubscriber = /*@__PURE__*/ (function (_super) {
- tslib__WEBPACK_IMPORTED_MODULE_0__["__extends"](WindowCountSubscriber, _super);
- function WindowCountSubscriber(destination, windowSize, startWindowEvery) {
+var RetrySubscriber = /*@__PURE__*/ (function (_super) {
+ tslib__WEBPACK_IMPORTED_MODULE_0__["__extends"](RetrySubscriber, _super);
+ function RetrySubscriber(destination, count, source) {
var _this = _super.call(this, destination) || this;
- _this.destination = destination;
- _this.windowSize = windowSize;
- _this.startWindowEvery = startWindowEvery;
- _this.windows = [new _Subject__WEBPACK_IMPORTED_MODULE_2__["Subject"]()];
- _this.count = 0;
- destination.next(_this.windows[0]);
+ _this.count = count;
+ _this.source = source;
return _this;
}
- WindowCountSubscriber.prototype._next = function (value) {
- var startWindowEvery = (this.startWindowEvery > 0) ? this.startWindowEvery : this.windowSize;
- var destination = this.destination;
- var windowSize = this.windowSize;
- var windows = this.windows;
- var len = windows.length;
- for (var i = 0; i < len && !this.closed; i++) {
- windows[i].next(value);
- }
- var c = this.count - windowSize + 1;
- if (c >= 0 && c % startWindowEvery === 0 && !this.closed) {
- windows.shift().complete();
- }
- if (++this.count % startWindowEvery === 0 && !this.closed) {
- var window_1 = new _Subject__WEBPACK_IMPORTED_MODULE_2__["Subject"]();
- windows.push(window_1);
- destination.next(window_1);
- }
- };
- WindowCountSubscriber.prototype._error = function (err) {
- var windows = this.windows;
- if (windows) {
- while (windows.length > 0 && !this.closed) {
- windows.shift().error(err);
+ RetrySubscriber.prototype.error = function (err) {
+ if (!this.isStopped) {
+ var _a = this, source = _a.source, count = _a.count;
+ if (count === 0) {
+ return _super.prototype.error.call(this, err);
}
- }
- this.destination.error(err);
- };
- WindowCountSubscriber.prototype._complete = function () {
- var windows = this.windows;
- if (windows) {
- while (windows.length > 0 && !this.closed) {
- windows.shift().complete();
+ else if (count > -1) {
+ this.count = count - 1;
}
+ source.subscribe(this._unsubscribeAndRecycle());
}
- this.destination.complete();
- };
- WindowCountSubscriber.prototype._unsubscribe = function () {
- this.count = 0;
- this.windows = null;
};
- return WindowCountSubscriber;
+ return RetrySubscriber;
}(_Subscriber__WEBPACK_IMPORTED_MODULE_1__["Subscriber"]));
-//# sourceMappingURL=windowCount.js.map
+//# sourceMappingURL=retry.js.map
/***/ }),
-/* 341 */
+/* 333 */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
"use strict";
__webpack_require__.r(__webpack_exports__);
-/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "windowTime", function() { return windowTime; });
+/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "retryWhen", function() { return retryWhen; });
/* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(36);
-/* harmony import */ var _Subject__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(265);
-/* harmony import */ var _scheduler_async__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(199);
-/* harmony import */ var _Subscriber__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(172);
-/* harmony import */ var _util_isNumeric__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(205);
-/* harmony import */ var _util_isScheduler__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(206);
-/** PURE_IMPORTS_START tslib,_Subject,_scheduler_async,_Subscriber,_util_isNumeric,_util_isScheduler PURE_IMPORTS_END */
-
-
+/* harmony import */ var _Subject__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(187);
+/* harmony import */ var _OuterSubscriber__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(229);
+/* harmony import */ var _util_subscribeToResult__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(230);
+/** PURE_IMPORTS_START tslib,_Subject,_OuterSubscriber,_util_subscribeToResult PURE_IMPORTS_END */
-function windowTime(windowTimeSpan) {
- var scheduler = _scheduler_async__WEBPACK_IMPORTED_MODULE_2__["async"];
- var windowCreationInterval = null;
- var maxWindowSize = Number.POSITIVE_INFINITY;
- if (Object(_util_isScheduler__WEBPACK_IMPORTED_MODULE_5__["isScheduler"])(arguments[3])) {
- scheduler = arguments[3];
- }
- if (Object(_util_isScheduler__WEBPACK_IMPORTED_MODULE_5__["isScheduler"])(arguments[2])) {
- scheduler = arguments[2];
- }
- else if (Object(_util_isNumeric__WEBPACK_IMPORTED_MODULE_4__["isNumeric"])(arguments[2])) {
- maxWindowSize = arguments[2];
- }
- if (Object(_util_isScheduler__WEBPACK_IMPORTED_MODULE_5__["isScheduler"])(arguments[1])) {
- scheduler = arguments[1];
- }
- else if (Object(_util_isNumeric__WEBPACK_IMPORTED_MODULE_4__["isNumeric"])(arguments[1])) {
- windowCreationInterval = arguments[1];
- }
- return function windowTimeOperatorFunction(source) {
- return source.lift(new WindowTimeOperator(windowTimeSpan, windowCreationInterval, maxWindowSize, scheduler));
- };
+function retryWhen(notifier) {
+ return function (source) { return source.lift(new RetryWhenOperator(notifier, source)); };
}
-var WindowTimeOperator = /*@__PURE__*/ (function () {
- function WindowTimeOperator(windowTimeSpan, windowCreationInterval, maxWindowSize, scheduler) {
- this.windowTimeSpan = windowTimeSpan;
- this.windowCreationInterval = windowCreationInterval;
- this.maxWindowSize = maxWindowSize;
- this.scheduler = scheduler;
+var RetryWhenOperator = /*@__PURE__*/ (function () {
+ function RetryWhenOperator(notifier, source) {
+ this.notifier = notifier;
+ this.source = source;
}
- WindowTimeOperator.prototype.call = function (subscriber, source) {
- return source.subscribe(new WindowTimeSubscriber(subscriber, this.windowTimeSpan, this.windowCreationInterval, this.maxWindowSize, this.scheduler));
+ RetryWhenOperator.prototype.call = function (subscriber, source) {
+ return source.subscribe(new RetryWhenSubscriber(subscriber, this.notifier, this.source));
};
- return WindowTimeOperator;
+ return RetryWhenOperator;
}());
-var CountedSubject = /*@__PURE__*/ (function (_super) {
- tslib__WEBPACK_IMPORTED_MODULE_0__["__extends"](CountedSubject, _super);
- function CountedSubject() {
- var _this = _super !== null && _super.apply(this, arguments) || this;
- _this._numberOfNextedValues = 0;
- return _this;
- }
- CountedSubject.prototype.next = function (value) {
- this._numberOfNextedValues++;
- _super.prototype.next.call(this, value);
- };
- Object.defineProperty(CountedSubject.prototype, "numberOfNextedValues", {
- get: function () {
- return this._numberOfNextedValues;
- },
- enumerable: true,
- configurable: true
- });
- return CountedSubject;
-}(_Subject__WEBPACK_IMPORTED_MODULE_1__["Subject"]));
-var WindowTimeSubscriber = /*@__PURE__*/ (function (_super) {
- tslib__WEBPACK_IMPORTED_MODULE_0__["__extends"](WindowTimeSubscriber, _super);
- function WindowTimeSubscriber(destination, windowTimeSpan, windowCreationInterval, maxWindowSize, scheduler) {
+var RetryWhenSubscriber = /*@__PURE__*/ (function (_super) {
+ tslib__WEBPACK_IMPORTED_MODULE_0__["__extends"](RetryWhenSubscriber, _super);
+ function RetryWhenSubscriber(destination, notifier, source) {
var _this = _super.call(this, destination) || this;
- _this.destination = destination;
- _this.windowTimeSpan = windowTimeSpan;
- _this.windowCreationInterval = windowCreationInterval;
- _this.maxWindowSize = maxWindowSize;
- _this.scheduler = scheduler;
- _this.windows = [];
- var window = _this.openWindow();
- if (windowCreationInterval !== null && windowCreationInterval >= 0) {
- var closeState = { subscriber: _this, window: window, context: null };
- var creationState = { windowTimeSpan: windowTimeSpan, windowCreationInterval: windowCreationInterval, subscriber: _this, scheduler: scheduler };
- _this.add(scheduler.schedule(dispatchWindowClose, windowTimeSpan, closeState));
- _this.add(scheduler.schedule(dispatchWindowCreation, windowCreationInterval, creationState));
- }
- else {
- var timeSpanOnlyState = { subscriber: _this, window: window, windowTimeSpan: windowTimeSpan };
- _this.add(scheduler.schedule(dispatchWindowTimeSpanOnly, windowTimeSpan, timeSpanOnlyState));
- }
+ _this.notifier = notifier;
+ _this.source = source;
return _this;
}
- WindowTimeSubscriber.prototype._next = function (value) {
- var windows = this.windows;
- var len = windows.length;
- for (var i = 0; i < len; i++) {
- var window_1 = windows[i];
- if (!window_1.closed) {
- window_1.next(value);
- if (window_1.numberOfNextedValues >= this.maxWindowSize) {
- this.closeWindow(window_1);
+ RetryWhenSubscriber.prototype.error = function (err) {
+ if (!this.isStopped) {
+ var errors = this.errors;
+ var retries = this.retries;
+ var retriesSubscription = this.retriesSubscription;
+ if (!retries) {
+ errors = new _Subject__WEBPACK_IMPORTED_MODULE_1__["Subject"]();
+ try {
+ var notifier = this.notifier;
+ retries = notifier(errors);
+ }
+ catch (e) {
+ return _super.prototype.error.call(this, e);
}
+ retriesSubscription = Object(_util_subscribeToResult__WEBPACK_IMPORTED_MODULE_3__["subscribeToResult"])(this, retries);
}
- }
- };
- WindowTimeSubscriber.prototype._error = function (err) {
- var windows = this.windows;
- while (windows.length > 0) {
- windows.shift().error(err);
- }
- this.destination.error(err);
- };
- WindowTimeSubscriber.prototype._complete = function () {
- var windows = this.windows;
- while (windows.length > 0) {
- var window_2 = windows.shift();
- if (!window_2.closed) {
- window_2.complete();
+ else {
+ this.errors = null;
+ this.retriesSubscription = null;
}
+ this._unsubscribeAndRecycle();
+ this.errors = errors;
+ this.retries = retries;
+ this.retriesSubscription = retriesSubscription;
+ errors.next(err);
}
- this.destination.complete();
};
- WindowTimeSubscriber.prototype.openWindow = function () {
- var window = new CountedSubject();
- this.windows.push(window);
- var destination = this.destination;
- destination.next(window);
- return window;
+ RetryWhenSubscriber.prototype._unsubscribe = function () {
+ var _a = this, errors = _a.errors, retriesSubscription = _a.retriesSubscription;
+ if (errors) {
+ errors.unsubscribe();
+ this.errors = null;
+ }
+ if (retriesSubscription) {
+ retriesSubscription.unsubscribe();
+ this.retriesSubscription = null;
+ }
+ this.retries = null;
};
- WindowTimeSubscriber.prototype.closeWindow = function (window) {
- window.complete();
- var windows = this.windows;
- windows.splice(windows.indexOf(window), 1);
+ RetryWhenSubscriber.prototype.notifyNext = function (outerValue, innerValue, outerIndex, innerIndex, innerSub) {
+ var _unsubscribe = this._unsubscribe;
+ this._unsubscribe = null;
+ this._unsubscribeAndRecycle();
+ this._unsubscribe = _unsubscribe;
+ this.source.subscribe(this);
};
- return WindowTimeSubscriber;
-}(_Subscriber__WEBPACK_IMPORTED_MODULE_3__["Subscriber"]));
-function dispatchWindowTimeSpanOnly(state) {
- var subscriber = state.subscriber, windowTimeSpan = state.windowTimeSpan, window = state.window;
- if (window) {
- subscriber.closeWindow(window);
- }
- state.window = subscriber.openWindow();
- this.schedule(state, windowTimeSpan);
-}
-function dispatchWindowCreation(state) {
- var windowTimeSpan = state.windowTimeSpan, subscriber = state.subscriber, scheduler = state.scheduler, windowCreationInterval = state.windowCreationInterval;
- var window = subscriber.openWindow();
- var action = this;
- var context = { action: action, subscription: null };
- var timeSpanState = { subscriber: subscriber, window: window, context: context };
- context.subscription = scheduler.schedule(dispatchWindowClose, windowTimeSpan, timeSpanState);
- action.add(context.subscription);
- action.schedule(state, windowCreationInterval);
-}
-function dispatchWindowClose(state) {
- var subscriber = state.subscriber, window = state.window, context = state.context;
- if (context && context.action && context.subscription) {
- context.action.remove(context.subscription);
- }
- subscriber.closeWindow(window);
-}
-//# sourceMappingURL=windowTime.js.map
+ return RetryWhenSubscriber;
+}(_OuterSubscriber__WEBPACK_IMPORTED_MODULE_2__["OuterSubscriber"]));
+//# sourceMappingURL=retryWhen.js.map
/***/ }),
-/* 342 */
+/* 334 */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
"use strict";
__webpack_require__.r(__webpack_exports__);
-/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "windowToggle", function() { return windowToggle; });
+/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "sample", function() { return sample; });
/* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(36);
-/* harmony import */ var _Subject__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(265);
-/* harmony import */ var _Subscription__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(177);
-/* harmony import */ var _OuterSubscriber__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(171);
-/* harmony import */ var _util_subscribeToResult__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(182);
-/** PURE_IMPORTS_START tslib,_Subject,_Subscription,_OuterSubscriber,_util_subscribeToResult PURE_IMPORTS_END */
-
-
+/* harmony import */ var _OuterSubscriber__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(229);
+/* harmony import */ var _util_subscribeToResult__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(230);
+/** PURE_IMPORTS_START tslib,_OuterSubscriber,_util_subscribeToResult PURE_IMPORTS_END */
-function windowToggle(openings, closingSelector) {
- return function (source) { return source.lift(new WindowToggleOperator(openings, closingSelector)); };
+function sample(notifier) {
+ return function (source) { return source.lift(new SampleOperator(notifier)); };
}
-var WindowToggleOperator = /*@__PURE__*/ (function () {
- function WindowToggleOperator(openings, closingSelector) {
- this.openings = openings;
- this.closingSelector = closingSelector;
+var SampleOperator = /*@__PURE__*/ (function () {
+ function SampleOperator(notifier) {
+ this.notifier = notifier;
}
- WindowToggleOperator.prototype.call = function (subscriber, source) {
- return source.subscribe(new WindowToggleSubscriber(subscriber, this.openings, this.closingSelector));
+ SampleOperator.prototype.call = function (subscriber, source) {
+ var sampleSubscriber = new SampleSubscriber(subscriber);
+ var subscription = source.subscribe(sampleSubscriber);
+ subscription.add(Object(_util_subscribeToResult__WEBPACK_IMPORTED_MODULE_2__["subscribeToResult"])(sampleSubscriber, this.notifier));
+ return subscription;
};
- return WindowToggleOperator;
+ return SampleOperator;
}());
-var WindowToggleSubscriber = /*@__PURE__*/ (function (_super) {
- tslib__WEBPACK_IMPORTED_MODULE_0__["__extends"](WindowToggleSubscriber, _super);
- function WindowToggleSubscriber(destination, openings, closingSelector) {
- var _this = _super.call(this, destination) || this;
- _this.openings = openings;
- _this.closingSelector = closingSelector;
- _this.contexts = [];
- _this.add(_this.openSubscription = Object(_util_subscribeToResult__WEBPACK_IMPORTED_MODULE_4__["subscribeToResult"])(_this, openings, openings));
+var SampleSubscriber = /*@__PURE__*/ (function (_super) {
+ tslib__WEBPACK_IMPORTED_MODULE_0__["__extends"](SampleSubscriber, _super);
+ function SampleSubscriber() {
+ var _this = _super !== null && _super.apply(this, arguments) || this;
+ _this.hasValue = false;
return _this;
}
- WindowToggleSubscriber.prototype._next = function (value) {
- var contexts = this.contexts;
- if (contexts) {
- var len = contexts.length;
- for (var i = 0; i < len; i++) {
- contexts[i].window.next(value);
- }
- }
- };
- WindowToggleSubscriber.prototype._error = function (err) {
- var contexts = this.contexts;
- this.contexts = null;
- if (contexts) {
- var len = contexts.length;
- var index = -1;
- while (++index < len) {
- var context_1 = contexts[index];
- context_1.window.error(err);
- context_1.subscription.unsubscribe();
- }
- }
- _super.prototype._error.call(this, err);
- };
- WindowToggleSubscriber.prototype._complete = function () {
- var contexts = this.contexts;
- this.contexts = null;
- if (contexts) {
- var len = contexts.length;
- var index = -1;
- while (++index < len) {
- var context_2 = contexts[index];
- context_2.window.complete();
- context_2.subscription.unsubscribe();
- }
- }
- _super.prototype._complete.call(this);
- };
- WindowToggleSubscriber.prototype._unsubscribe = function () {
- var contexts = this.contexts;
- this.contexts = null;
- if (contexts) {
- var len = contexts.length;
- var index = -1;
- while (++index < len) {
- var context_3 = contexts[index];
- context_3.window.unsubscribe();
- context_3.subscription.unsubscribe();
- }
- }
- };
- WindowToggleSubscriber.prototype.notifyNext = function (outerValue, innerValue, outerIndex, innerIndex, innerSub) {
- if (outerValue === this.openings) {
- var closingNotifier = void 0;
- try {
- var closingSelector = this.closingSelector;
- closingNotifier = closingSelector(innerValue);
- }
- catch (e) {
- return this.error(e);
- }
- var window_1 = new _Subject__WEBPACK_IMPORTED_MODULE_1__["Subject"]();
- var subscription = new _Subscription__WEBPACK_IMPORTED_MODULE_2__["Subscription"]();
- var context_4 = { window: window_1, subscription: subscription };
- this.contexts.push(context_4);
- var innerSubscription = Object(_util_subscribeToResult__WEBPACK_IMPORTED_MODULE_4__["subscribeToResult"])(this, closingNotifier, context_4);
- if (innerSubscription.closed) {
- this.closeWindow(this.contexts.length - 1);
- }
- else {
- innerSubscription.context = context_4;
- subscription.add(innerSubscription);
- }
- this.destination.next(window_1);
- }
- else {
- this.closeWindow(this.contexts.indexOf(outerValue));
- }
+ SampleSubscriber.prototype._next = function (value) {
+ this.value = value;
+ this.hasValue = true;
};
- WindowToggleSubscriber.prototype.notifyError = function (err) {
- this.error(err);
+ SampleSubscriber.prototype.notifyNext = function (outerValue, innerValue, outerIndex, innerIndex, innerSub) {
+ this.emitValue();
};
- WindowToggleSubscriber.prototype.notifyComplete = function (inner) {
- if (inner !== this.openSubscription) {
- this.closeWindow(this.contexts.indexOf(inner.context));
- }
+ SampleSubscriber.prototype.notifyComplete = function () {
+ this.emitValue();
};
- WindowToggleSubscriber.prototype.closeWindow = function (index) {
- if (index === -1) {
- return;
+ SampleSubscriber.prototype.emitValue = function () {
+ if (this.hasValue) {
+ this.hasValue = false;
+ this.destination.next(this.value);
}
- var contexts = this.contexts;
- var context = contexts[index];
- var window = context.window, subscription = context.subscription;
- contexts.splice(index, 1);
- window.complete();
- subscription.unsubscribe();
};
- return WindowToggleSubscriber;
-}(_OuterSubscriber__WEBPACK_IMPORTED_MODULE_3__["OuterSubscriber"]));
-//# sourceMappingURL=windowToggle.js.map
+ return SampleSubscriber;
+}(_OuterSubscriber__WEBPACK_IMPORTED_MODULE_1__["OuterSubscriber"]));
+//# sourceMappingURL=sample.js.map
/***/ }),
-/* 343 */
+/* 335 */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
"use strict";
__webpack_require__.r(__webpack_exports__);
-/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "windowWhen", function() { return windowWhen; });
+/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "sampleTime", function() { return sampleTime; });
/* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(36);
-/* harmony import */ var _Subject__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(265);
-/* harmony import */ var _OuterSubscriber__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(171);
-/* harmony import */ var _util_subscribeToResult__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(182);
-/** PURE_IMPORTS_START tslib,_Subject,_OuterSubscriber,_util_subscribeToResult PURE_IMPORTS_END */
-
+/* harmony import */ var _Subscriber__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(172);
+/* harmony import */ var _scheduler_async__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(215);
+/** PURE_IMPORTS_START tslib,_Subscriber,_scheduler_async PURE_IMPORTS_END */
-function windowWhen(closingSelector) {
- return function windowWhenOperatorFunction(source) {
- return source.lift(new WindowOperator(closingSelector));
- };
+function sampleTime(period, scheduler) {
+ if (scheduler === void 0) {
+ scheduler = _scheduler_async__WEBPACK_IMPORTED_MODULE_2__["async"];
+ }
+ return function (source) { return source.lift(new SampleTimeOperator(period, scheduler)); };
}
-var WindowOperator = /*@__PURE__*/ (function () {
- function WindowOperator(closingSelector) {
- this.closingSelector = closingSelector;
+var SampleTimeOperator = /*@__PURE__*/ (function () {
+ function SampleTimeOperator(period, scheduler) {
+ this.period = period;
+ this.scheduler = scheduler;
}
- WindowOperator.prototype.call = function (subscriber, source) {
- return source.subscribe(new WindowSubscriber(subscriber, this.closingSelector));
+ SampleTimeOperator.prototype.call = function (subscriber, source) {
+ return source.subscribe(new SampleTimeSubscriber(subscriber, this.period, this.scheduler));
};
- return WindowOperator;
+ return SampleTimeOperator;
}());
-var WindowSubscriber = /*@__PURE__*/ (function (_super) {
- tslib__WEBPACK_IMPORTED_MODULE_0__["__extends"](WindowSubscriber, _super);
- function WindowSubscriber(destination, closingSelector) {
+var SampleTimeSubscriber = /*@__PURE__*/ (function (_super) {
+ tslib__WEBPACK_IMPORTED_MODULE_0__["__extends"](SampleTimeSubscriber, _super);
+ function SampleTimeSubscriber(destination, period, scheduler) {
var _this = _super.call(this, destination) || this;
- _this.destination = destination;
- _this.closingSelector = closingSelector;
- _this.openWindow();
+ _this.period = period;
+ _this.scheduler = scheduler;
+ _this.hasValue = false;
+ _this.add(scheduler.schedule(dispatchNotification, period, { subscriber: _this, period: period }));
return _this;
}
- WindowSubscriber.prototype.notifyNext = function (outerValue, innerValue, outerIndex, innerIndex, innerSub) {
- this.openWindow(innerSub);
- };
- WindowSubscriber.prototype.notifyError = function (error, innerSub) {
- this._error(error);
- };
- WindowSubscriber.prototype.notifyComplete = function (innerSub) {
- this.openWindow(innerSub);
- };
- WindowSubscriber.prototype._next = function (value) {
- this.window.next(value);
- };
- WindowSubscriber.prototype._error = function (err) {
- this.window.error(err);
- this.destination.error(err);
- this.unsubscribeClosingNotification();
- };
- WindowSubscriber.prototype._complete = function () {
- this.window.complete();
- this.destination.complete();
- this.unsubscribeClosingNotification();
- };
- WindowSubscriber.prototype.unsubscribeClosingNotification = function () {
- if (this.closingNotification) {
- this.closingNotification.unsubscribe();
- }
+ SampleTimeSubscriber.prototype._next = function (value) {
+ this.lastValue = value;
+ this.hasValue = true;
};
- WindowSubscriber.prototype.openWindow = function (innerSub) {
- if (innerSub === void 0) {
- innerSub = null;
- }
- if (innerSub) {
- this.remove(innerSub);
- innerSub.unsubscribe();
- }
- var prevWindow = this.window;
- if (prevWindow) {
- prevWindow.complete();
- }
- var window = this.window = new _Subject__WEBPACK_IMPORTED_MODULE_1__["Subject"]();
- this.destination.next(window);
- var closingNotifier;
- try {
- var closingSelector = this.closingSelector;
- closingNotifier = closingSelector();
- }
- catch (e) {
- this.destination.error(e);
- this.window.error(e);
- return;
+ SampleTimeSubscriber.prototype.notifyNext = function () {
+ if (this.hasValue) {
+ this.hasValue = false;
+ this.destination.next(this.lastValue);
}
- this.add(this.closingNotification = Object(_util_subscribeToResult__WEBPACK_IMPORTED_MODULE_3__["subscribeToResult"])(this, closingNotifier));
};
- return WindowSubscriber;
-}(_OuterSubscriber__WEBPACK_IMPORTED_MODULE_2__["OuterSubscriber"]));
-//# sourceMappingURL=windowWhen.js.map
+ return SampleTimeSubscriber;
+}(_Subscriber__WEBPACK_IMPORTED_MODULE_1__["Subscriber"]));
+function dispatchNotification(state) {
+ var subscriber = state.subscriber, period = state.period;
+ subscriber.notifyNext();
+ this.schedule(state, period);
+}
+//# sourceMappingURL=sampleTime.js.map
/***/ }),
-/* 344 */
+/* 336 */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
"use strict";
__webpack_require__.r(__webpack_exports__);
-/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "withLatestFrom", function() { return withLatestFrom; });
+/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "sequenceEqual", function() { return sequenceEqual; });
+/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "SequenceEqualOperator", function() { return SequenceEqualOperator; });
+/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "SequenceEqualSubscriber", function() { return SequenceEqualSubscriber; });
/* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(36);
-/* harmony import */ var _OuterSubscriber__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(171);
-/* harmony import */ var _util_subscribeToResult__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(182);
-/** PURE_IMPORTS_START tslib,_OuterSubscriber,_util_subscribeToResult PURE_IMPORTS_END */
-
+/* harmony import */ var _Subscriber__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(172);
+/** PURE_IMPORTS_START tslib,_Subscriber PURE_IMPORTS_END */
-function withLatestFrom() {
- var args = [];
- for (var _i = 0; _i < arguments.length; _i++) {
- args[_i] = arguments[_i];
- }
- return function (source) {
- var project;
- if (typeof args[args.length - 1] === 'function') {
- project = args.pop();
- }
- var observables = args;
- return source.lift(new WithLatestFromOperator(observables, project));
- };
+function sequenceEqual(compareTo, comparator) {
+ return function (source) { return source.lift(new SequenceEqualOperator(compareTo, comparator)); };
}
-var WithLatestFromOperator = /*@__PURE__*/ (function () {
- function WithLatestFromOperator(observables, project) {
- this.observables = observables;
- this.project = project;
+var SequenceEqualOperator = /*@__PURE__*/ (function () {
+ function SequenceEqualOperator(compareTo, comparator) {
+ this.compareTo = compareTo;
+ this.comparator = comparator;
}
- WithLatestFromOperator.prototype.call = function (subscriber, source) {
- return source.subscribe(new WithLatestFromSubscriber(subscriber, this.observables, this.project));
+ SequenceEqualOperator.prototype.call = function (subscriber, source) {
+ return source.subscribe(new SequenceEqualSubscriber(subscriber, this.compareTo, this.comparator));
};
- return WithLatestFromOperator;
+ return SequenceEqualOperator;
}());
-var WithLatestFromSubscriber = /*@__PURE__*/ (function (_super) {
- tslib__WEBPACK_IMPORTED_MODULE_0__["__extends"](WithLatestFromSubscriber, _super);
- function WithLatestFromSubscriber(destination, observables, project) {
+
+var SequenceEqualSubscriber = /*@__PURE__*/ (function (_super) {
+ tslib__WEBPACK_IMPORTED_MODULE_0__["__extends"](SequenceEqualSubscriber, _super);
+ function SequenceEqualSubscriber(destination, compareTo, comparator) {
var _this = _super.call(this, destination) || this;
- _this.observables = observables;
- _this.project = project;
- _this.toRespond = [];
- var len = observables.length;
- _this.values = new Array(len);
- for (var i = 0; i < len; i++) {
- _this.toRespond.push(i);
- }
- for (var i = 0; i < len; i++) {
- var observable = observables[i];
- _this.add(Object(_util_subscribeToResult__WEBPACK_IMPORTED_MODULE_2__["subscribeToResult"])(_this, observable, observable, i));
- }
+ _this.compareTo = compareTo;
+ _this.comparator = comparator;
+ _this._a = [];
+ _this._b = [];
+ _this._oneComplete = false;
+ _this.destination.add(compareTo.subscribe(new SequenceEqualCompareToSubscriber(destination, _this)));
return _this;
}
- WithLatestFromSubscriber.prototype.notifyNext = function (outerValue, innerValue, outerIndex, innerIndex, innerSub) {
- this.values[outerIndex] = innerValue;
- var toRespond = this.toRespond;
- if (toRespond.length > 0) {
- var found = toRespond.indexOf(outerIndex);
- if (found !== -1) {
- toRespond.splice(found, 1);
- }
+ SequenceEqualSubscriber.prototype._next = function (value) {
+ if (this._oneComplete && this._b.length === 0) {
+ this.emit(false);
+ }
+ else {
+ this._a.push(value);
+ this.checkValues();
}
};
- WithLatestFromSubscriber.prototype.notifyComplete = function () {
+ SequenceEqualSubscriber.prototype._complete = function () {
+ if (this._oneComplete) {
+ this.emit(this._a.length === 0 && this._b.length === 0);
+ }
+ else {
+ this._oneComplete = true;
+ }
+ this.unsubscribe();
};
- WithLatestFromSubscriber.prototype._next = function (value) {
- if (this.toRespond.length === 0) {
- var args = [value].concat(this.values);
- if (this.project) {
- this._tryProject(args);
+ SequenceEqualSubscriber.prototype.checkValues = function () {
+ var _c = this, _a = _c._a, _b = _c._b, comparator = _c.comparator;
+ while (_a.length > 0 && _b.length > 0) {
+ var a = _a.shift();
+ var b = _b.shift();
+ var areEqual = false;
+ try {
+ areEqual = comparator ? comparator(a, b) : a === b;
}
- else {
- this.destination.next(args);
+ catch (e) {
+ this.destination.error(e);
+ }
+ if (!areEqual) {
+ this.emit(false);
}
}
};
- WithLatestFromSubscriber.prototype._tryProject = function (args) {
- var result;
- try {
- result = this.project.apply(this, args);
+ SequenceEqualSubscriber.prototype.emit = function (value) {
+ var destination = this.destination;
+ destination.next(value);
+ destination.complete();
+ };
+ SequenceEqualSubscriber.prototype.nextB = function (value) {
+ if (this._oneComplete && this._a.length === 0) {
+ this.emit(false);
}
- catch (err) {
- this.destination.error(err);
- return;
+ else {
+ this._b.push(value);
+ this.checkValues();
}
- this.destination.next(result);
};
- return WithLatestFromSubscriber;
-}(_OuterSubscriber__WEBPACK_IMPORTED_MODULE_1__["OuterSubscriber"]));
-//# sourceMappingURL=withLatestFrom.js.map
+ SequenceEqualSubscriber.prototype.completeB = function () {
+ if (this._oneComplete) {
+ this.emit(this._a.length === 0 && this._b.length === 0);
+ }
+ else {
+ this._oneComplete = true;
+ }
+ };
+ return SequenceEqualSubscriber;
+}(_Subscriber__WEBPACK_IMPORTED_MODULE_1__["Subscriber"]));
+
+var SequenceEqualCompareToSubscriber = /*@__PURE__*/ (function (_super) {
+ tslib__WEBPACK_IMPORTED_MODULE_0__["__extends"](SequenceEqualCompareToSubscriber, _super);
+ function SequenceEqualCompareToSubscriber(destination, parent) {
+ var _this = _super.call(this, destination) || this;
+ _this.parent = parent;
+ return _this;
+ }
+ SequenceEqualCompareToSubscriber.prototype._next = function (value) {
+ this.parent.nextB(value);
+ };
+ SequenceEqualCompareToSubscriber.prototype._error = function (err) {
+ this.parent.error(err);
+ this.unsubscribe();
+ };
+ SequenceEqualCompareToSubscriber.prototype._complete = function () {
+ this.parent.completeB();
+ this.unsubscribe();
+ };
+ return SequenceEqualCompareToSubscriber;
+}(_Subscriber__WEBPACK_IMPORTED_MODULE_1__["Subscriber"]));
+//# sourceMappingURL=sequenceEqual.js.map
/***/ }),
-/* 345 */
+/* 337 */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
"use strict";
__webpack_require__.r(__webpack_exports__);
-/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "zip", function() { return zip; });
-/* harmony import */ var _observable_zip__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(346);
-/** PURE_IMPORTS_START _observable_zip PURE_IMPORTS_END */
+/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "share", function() { return share; });
+/* harmony import */ var _multicast__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(320);
+/* harmony import */ var _refCount__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(190);
+/* harmony import */ var _Subject__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(187);
+/** PURE_IMPORTS_START _multicast,_refCount,_Subject PURE_IMPORTS_END */
-function zip() {
- var observables = [];
- for (var _i = 0; _i < arguments.length; _i++) {
- observables[_i] = arguments[_i];
- }
- return function zipOperatorFunction(source) {
- return source.lift.call(_observable_zip__WEBPACK_IMPORTED_MODULE_0__["zip"].apply(void 0, [source].concat(observables)));
- };
+
+
+function shareSubjectFactory() {
+ return new _Subject__WEBPACK_IMPORTED_MODULE_2__["Subject"]();
}
-//# sourceMappingURL=zip.js.map
+function share() {
+ return function (source) { return Object(_refCount__WEBPACK_IMPORTED_MODULE_1__["refCount"])()(Object(_multicast__WEBPACK_IMPORTED_MODULE_0__["multicast"])(shareSubjectFactory)(source)); };
+}
+//# sourceMappingURL=share.js.map
/***/ }),
-/* 346 */
+/* 338 */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
"use strict";
__webpack_require__.r(__webpack_exports__);
-/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "zip", function() { return zip; });
-/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ZipOperator", function() { return ZipOperator; });
-/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ZipSubscriber", function() { return ZipSubscriber; });
-/* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(36);
-/* harmony import */ var _fromArray__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(215);
-/* harmony import */ var _util_isArray__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(178);
-/* harmony import */ var _Subscriber__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(172);
-/* harmony import */ var _OuterSubscriber__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(171);
-/* harmony import */ var _util_subscribeToResult__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(182);
-/* harmony import */ var _internal_symbol_iterator__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(188);
-/** PURE_IMPORTS_START tslib,_fromArray,_util_isArray,_Subscriber,_OuterSubscriber,_util_subscribeToResult,_.._internal_symbol_iterator PURE_IMPORTS_END */
+/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "shareReplay", function() { return shareReplay; });
+/* harmony import */ var _ReplaySubject__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(193);
+/** PURE_IMPORTS_START _ReplaySubject PURE_IMPORTS_END */
+function shareReplay(configOrBufferSize, windowTime, scheduler) {
+ var config;
+ if (configOrBufferSize && typeof configOrBufferSize === 'object') {
+ config = configOrBufferSize;
+ }
+ else {
+ config = {
+ bufferSize: configOrBufferSize,
+ windowTime: windowTime,
+ refCount: false,
+ scheduler: scheduler
+ };
+ }
+ return function (source) { return source.lift(shareReplayOperator(config)); };
+}
+function shareReplayOperator(_a) {
+ var _b = _a.bufferSize, bufferSize = _b === void 0 ? Number.POSITIVE_INFINITY : _b, _c = _a.windowTime, windowTime = _c === void 0 ? Number.POSITIVE_INFINITY : _c, useRefCount = _a.refCount, scheduler = _a.scheduler;
+ var subject;
+ var refCount = 0;
+ var subscription;
+ var hasError = false;
+ var isComplete = false;
+ return function shareReplayOperation(source) {
+ refCount++;
+ if (!subject || hasError) {
+ hasError = false;
+ subject = new _ReplaySubject__WEBPACK_IMPORTED_MODULE_0__["ReplaySubject"](bufferSize, windowTime, scheduler);
+ subscription = source.subscribe({
+ next: function (value) { subject.next(value); },
+ error: function (err) {
+ hasError = true;
+ subject.error(err);
+ },
+ complete: function () {
+ isComplete = true;
+ subject.complete();
+ },
+ });
+ }
+ var innerSub = subject.subscribe(this);
+ this.add(function () {
+ refCount--;
+ innerSub.unsubscribe();
+ if (subscription && !isComplete && useRefCount && refCount === 0) {
+ subscription.unsubscribe();
+ subscription = undefined;
+ subject = undefined;
+ }
+ });
+ };
+}
+//# sourceMappingURL=shareReplay.js.map
+/***/ }),
+/* 339 */
+/***/ (function(module, __webpack_exports__, __webpack_require__) {
+"use strict";
+__webpack_require__.r(__webpack_exports__);
+/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "single", function() { return single; });
+/* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(36);
+/* harmony import */ var _Subscriber__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(172);
+/* harmony import */ var _util_EmptyError__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(223);
+/** PURE_IMPORTS_START tslib,_Subscriber,_util_EmptyError PURE_IMPORTS_END */
-function zip() {
- var observables = [];
- for (var _i = 0; _i < arguments.length; _i++) {
- observables[_i] = arguments[_i];
- }
- var resultSelector = observables[observables.length - 1];
- if (typeof resultSelector === 'function') {
- observables.pop();
- }
- return Object(_fromArray__WEBPACK_IMPORTED_MODULE_1__["fromArray"])(observables, undefined).lift(new ZipOperator(resultSelector));
+function single(predicate) {
+ return function (source) { return source.lift(new SingleOperator(predicate, source)); };
}
-var ZipOperator = /*@__PURE__*/ (function () {
- function ZipOperator(resultSelector) {
- this.resultSelector = resultSelector;
+var SingleOperator = /*@__PURE__*/ (function () {
+ function SingleOperator(predicate, source) {
+ this.predicate = predicate;
+ this.source = source;
}
- ZipOperator.prototype.call = function (subscriber, source) {
- return source.subscribe(new ZipSubscriber(subscriber, this.resultSelector));
+ SingleOperator.prototype.call = function (subscriber, source) {
+ return source.subscribe(new SingleSubscriber(subscriber, this.predicate, this.source));
};
- return ZipOperator;
+ return SingleOperator;
}());
-
-var ZipSubscriber = /*@__PURE__*/ (function (_super) {
- tslib__WEBPACK_IMPORTED_MODULE_0__["__extends"](ZipSubscriber, _super);
- function ZipSubscriber(destination, resultSelector, values) {
- if (values === void 0) {
- values = Object.create(null);
- }
+var SingleSubscriber = /*@__PURE__*/ (function (_super) {
+ tslib__WEBPACK_IMPORTED_MODULE_0__["__extends"](SingleSubscriber, _super);
+ function SingleSubscriber(destination, predicate, source) {
var _this = _super.call(this, destination) || this;
- _this.iterators = [];
- _this.active = 0;
- _this.resultSelector = (typeof resultSelector === 'function') ? resultSelector : null;
- _this.values = values;
+ _this.predicate = predicate;
+ _this.source = source;
+ _this.seenValue = false;
+ _this.index = 0;
return _this;
}
- ZipSubscriber.prototype._next = function (value) {
- var iterators = this.iterators;
- if (Object(_util_isArray__WEBPACK_IMPORTED_MODULE_2__["isArray"])(value)) {
- iterators.push(new StaticArrayIterator(value));
- }
- else if (typeof value[_internal_symbol_iterator__WEBPACK_IMPORTED_MODULE_6__["iterator"]] === 'function') {
- iterators.push(new StaticIterator(value[_internal_symbol_iterator__WEBPACK_IMPORTED_MODULE_6__["iterator"]]()));
+ SingleSubscriber.prototype.applySingleValue = function (value) {
+ if (this.seenValue) {
+ this.destination.error('Sequence contains more than one element');
}
else {
- iterators.push(new ZipBufferIterator(this.destination, this, value));
+ this.seenValue = true;
+ this.singleValue = value;
}
};
- ZipSubscriber.prototype._complete = function () {
- var iterators = this.iterators;
- var len = iterators.length;
- this.unsubscribe();
- if (len === 0) {
- this.destination.complete();
- return;
+ SingleSubscriber.prototype._next = function (value) {
+ var index = this.index++;
+ if (this.predicate) {
+ this.tryNext(value, index);
}
- this.active = len;
- for (var i = 0; i < len; i++) {
- var iterator = iterators[i];
- if (iterator.stillUnsubscribed) {
- var destination = this.destination;
- destination.add(iterator.subscribe(iterator, i));
- }
- else {
- this.active--;
- }
+ else {
+ this.applySingleValue(value);
}
};
- ZipSubscriber.prototype.notifyInactive = function () {
- this.active--;
- if (this.active === 0) {
- this.destination.complete();
+ SingleSubscriber.prototype.tryNext = function (value, index) {
+ try {
+ if (this.predicate(value, index, this.source)) {
+ this.applySingleValue(value);
+ }
+ }
+ catch (err) {
+ this.destination.error(err);
}
};
- ZipSubscriber.prototype.checkIterators = function () {
- var iterators = this.iterators;
- var len = iterators.length;
+ SingleSubscriber.prototype._complete = function () {
var destination = this.destination;
- for (var i = 0; i < len; i++) {
- var iterator = iterators[i];
- if (typeof iterator.hasValue === 'function' && !iterator.hasValue()) {
- return;
- }
+ if (this.index > 0) {
+ destination.next(this.seenValue ? this.singleValue : undefined);
+ destination.complete();
}
- var shouldComplete = false;
- var args = [];
- for (var i = 0; i < len; i++) {
- var iterator = iterators[i];
- var result = iterator.next();
- if (iterator.hasCompleted()) {
- shouldComplete = true;
- }
- if (result.done) {
- destination.complete();
- return;
- }
- args.push(result.value);
+ else {
+ destination.error(new _util_EmptyError__WEBPACK_IMPORTED_MODULE_2__["EmptyError"]);
}
- if (this.resultSelector) {
- this._tryresultSelector(args);
+ };
+ return SingleSubscriber;
+}(_Subscriber__WEBPACK_IMPORTED_MODULE_1__["Subscriber"]));
+//# sourceMappingURL=single.js.map
+
+
+/***/ }),
+/* 340 */
+/***/ (function(module, __webpack_exports__, __webpack_require__) {
+
+"use strict";
+__webpack_require__.r(__webpack_exports__);
+/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "skip", function() { return skip; });
+/* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(36);
+/* harmony import */ var _Subscriber__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(172);
+/** PURE_IMPORTS_START tslib,_Subscriber PURE_IMPORTS_END */
+
+
+function skip(count) {
+ return function (source) { return source.lift(new SkipOperator(count)); };
+}
+var SkipOperator = /*@__PURE__*/ (function () {
+ function SkipOperator(total) {
+ this.total = total;
+ }
+ SkipOperator.prototype.call = function (subscriber, source) {
+ return source.subscribe(new SkipSubscriber(subscriber, this.total));
+ };
+ return SkipOperator;
+}());
+var SkipSubscriber = /*@__PURE__*/ (function (_super) {
+ tslib__WEBPACK_IMPORTED_MODULE_0__["__extends"](SkipSubscriber, _super);
+ function SkipSubscriber(destination, total) {
+ var _this = _super.call(this, destination) || this;
+ _this.total = total;
+ _this.count = 0;
+ return _this;
+ }
+ SkipSubscriber.prototype._next = function (x) {
+ if (++this.count > this.total) {
+ this.destination.next(x);
}
- else {
- destination.next(args);
+ };
+ return SkipSubscriber;
+}(_Subscriber__WEBPACK_IMPORTED_MODULE_1__["Subscriber"]));
+//# sourceMappingURL=skip.js.map
+
+
+/***/ }),
+/* 341 */
+/***/ (function(module, __webpack_exports__, __webpack_require__) {
+
+"use strict";
+__webpack_require__.r(__webpack_exports__);
+/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "skipLast", function() { return skipLast; });
+/* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(36);
+/* harmony import */ var _Subscriber__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(172);
+/* harmony import */ var _util_ArgumentOutOfRangeError__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(222);
+/** PURE_IMPORTS_START tslib,_Subscriber,_util_ArgumentOutOfRangeError PURE_IMPORTS_END */
+
+
+
+function skipLast(count) {
+ return function (source) { return source.lift(new SkipLastOperator(count)); };
+}
+var SkipLastOperator = /*@__PURE__*/ (function () {
+ function SkipLastOperator(_skipCount) {
+ this._skipCount = _skipCount;
+ if (this._skipCount < 0) {
+ throw new _util_ArgumentOutOfRangeError__WEBPACK_IMPORTED_MODULE_2__["ArgumentOutOfRangeError"];
}
- if (shouldComplete) {
- destination.complete();
+ }
+ SkipLastOperator.prototype.call = function (subscriber, source) {
+ if (this._skipCount === 0) {
+ return source.subscribe(new _Subscriber__WEBPACK_IMPORTED_MODULE_1__["Subscriber"](subscriber));
+ }
+ else {
+ return source.subscribe(new SkipLastSubscriber(subscriber, this._skipCount));
}
};
- ZipSubscriber.prototype._tryresultSelector = function (args) {
- var result;
- try {
- result = this.resultSelector.apply(this, args);
+ return SkipLastOperator;
+}());
+var SkipLastSubscriber = /*@__PURE__*/ (function (_super) {
+ tslib__WEBPACK_IMPORTED_MODULE_0__["__extends"](SkipLastSubscriber, _super);
+ function SkipLastSubscriber(destination, _skipCount) {
+ var _this = _super.call(this, destination) || this;
+ _this._skipCount = _skipCount;
+ _this._count = 0;
+ _this._ring = new Array(_skipCount);
+ return _this;
+ }
+ SkipLastSubscriber.prototype._next = function (value) {
+ var skipCount = this._skipCount;
+ var count = this._count++;
+ if (count < skipCount) {
+ this._ring[count] = value;
}
- catch (err) {
- this.destination.error(err);
- return;
+ else {
+ var currentIndex = count % skipCount;
+ var ring = this._ring;
+ var oldValue = ring[currentIndex];
+ ring[currentIndex] = value;
+ this.destination.next(oldValue);
}
- this.destination.next(result);
};
- return ZipSubscriber;
-}(_Subscriber__WEBPACK_IMPORTED_MODULE_3__["Subscriber"]));
+ return SkipLastSubscriber;
+}(_Subscriber__WEBPACK_IMPORTED_MODULE_1__["Subscriber"]));
+//# sourceMappingURL=skipLast.js.map
-var StaticIterator = /*@__PURE__*/ (function () {
- function StaticIterator(iterator) {
- this.iterator = iterator;
- this.nextResult = iterator.next();
+
+/***/ }),
+/* 342 */
+/***/ (function(module, __webpack_exports__, __webpack_require__) {
+
+"use strict";
+__webpack_require__.r(__webpack_exports__);
+/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "skipUntil", function() { return skipUntil; });
+/* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(36);
+/* harmony import */ var _OuterSubscriber__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(229);
+/* harmony import */ var _InnerSubscriber__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(231);
+/* harmony import */ var _util_subscribeToResult__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(230);
+/** PURE_IMPORTS_START tslib,_OuterSubscriber,_InnerSubscriber,_util_subscribeToResult PURE_IMPORTS_END */
+
+
+
+
+function skipUntil(notifier) {
+ return function (source) { return source.lift(new SkipUntilOperator(notifier)); };
+}
+var SkipUntilOperator = /*@__PURE__*/ (function () {
+ function SkipUntilOperator(notifier) {
+ this.notifier = notifier;
}
- StaticIterator.prototype.hasValue = function () {
- return true;
- };
- StaticIterator.prototype.next = function () {
- var result = this.nextResult;
- this.nextResult = this.iterator.next();
- return result;
- };
- StaticIterator.prototype.hasCompleted = function () {
- var nextResult = this.nextResult;
- return nextResult && nextResult.done;
+ SkipUntilOperator.prototype.call = function (destination, source) {
+ return source.subscribe(new SkipUntilSubscriber(destination, this.notifier));
};
- return StaticIterator;
+ return SkipUntilOperator;
}());
-var StaticArrayIterator = /*@__PURE__*/ (function () {
- function StaticArrayIterator(array) {
- this.array = array;
- this.index = 0;
- this.length = 0;
- this.length = array.length;
+var SkipUntilSubscriber = /*@__PURE__*/ (function (_super) {
+ tslib__WEBPACK_IMPORTED_MODULE_0__["__extends"](SkipUntilSubscriber, _super);
+ function SkipUntilSubscriber(destination, notifier) {
+ var _this = _super.call(this, destination) || this;
+ _this.hasValue = false;
+ var innerSubscriber = new _InnerSubscriber__WEBPACK_IMPORTED_MODULE_2__["InnerSubscriber"](_this, undefined, undefined);
+ _this.add(innerSubscriber);
+ _this.innerSubscription = innerSubscriber;
+ Object(_util_subscribeToResult__WEBPACK_IMPORTED_MODULE_3__["subscribeToResult"])(_this, notifier, undefined, undefined, innerSubscriber);
+ return _this;
}
- StaticArrayIterator.prototype[_internal_symbol_iterator__WEBPACK_IMPORTED_MODULE_6__["iterator"]] = function () {
- return this;
+ SkipUntilSubscriber.prototype._next = function (value) {
+ if (this.hasValue) {
+ _super.prototype._next.call(this, value);
+ }
};
- StaticArrayIterator.prototype.next = function (value) {
- var i = this.index++;
- var array = this.array;
- return i < this.length ? { value: array[i], done: false } : { value: null, done: true };
+ SkipUntilSubscriber.prototype.notifyNext = function (outerValue, innerValue, outerIndex, innerIndex, innerSub) {
+ this.hasValue = true;
+ if (this.innerSubscription) {
+ this.innerSubscription.unsubscribe();
+ }
};
- StaticArrayIterator.prototype.hasValue = function () {
- return this.array.length > this.index;
+ SkipUntilSubscriber.prototype.notifyComplete = function () {
};
- StaticArrayIterator.prototype.hasCompleted = function () {
- return this.array.length === this.index;
+ return SkipUntilSubscriber;
+}(_OuterSubscriber__WEBPACK_IMPORTED_MODULE_1__["OuterSubscriber"]));
+//# sourceMappingURL=skipUntil.js.map
+
+
+/***/ }),
+/* 343 */
+/***/ (function(module, __webpack_exports__, __webpack_require__) {
+
+"use strict";
+__webpack_require__.r(__webpack_exports__);
+/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "skipWhile", function() { return skipWhile; });
+/* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(36);
+/* harmony import */ var _Subscriber__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(172);
+/** PURE_IMPORTS_START tslib,_Subscriber PURE_IMPORTS_END */
+
+
+function skipWhile(predicate) {
+ return function (source) { return source.lift(new SkipWhileOperator(predicate)); };
+}
+var SkipWhileOperator = /*@__PURE__*/ (function () {
+ function SkipWhileOperator(predicate) {
+ this.predicate = predicate;
+ }
+ SkipWhileOperator.prototype.call = function (subscriber, source) {
+ return source.subscribe(new SkipWhileSubscriber(subscriber, this.predicate));
};
- return StaticArrayIterator;
+ return SkipWhileOperator;
}());
-var ZipBufferIterator = /*@__PURE__*/ (function (_super) {
- tslib__WEBPACK_IMPORTED_MODULE_0__["__extends"](ZipBufferIterator, _super);
- function ZipBufferIterator(destination, parent, observable) {
+var SkipWhileSubscriber = /*@__PURE__*/ (function (_super) {
+ tslib__WEBPACK_IMPORTED_MODULE_0__["__extends"](SkipWhileSubscriber, _super);
+ function SkipWhileSubscriber(destination, predicate) {
var _this = _super.call(this, destination) || this;
- _this.parent = parent;
- _this.observable = observable;
- _this.stillUnsubscribed = true;
- _this.buffer = [];
- _this.isComplete = false;
+ _this.predicate = predicate;
+ _this.skipping = true;
+ _this.index = 0;
return _this;
}
- ZipBufferIterator.prototype[_internal_symbol_iterator__WEBPACK_IMPORTED_MODULE_6__["iterator"]] = function () {
- return this;
- };
- ZipBufferIterator.prototype.next = function () {
- var buffer = this.buffer;
- if (buffer.length === 0 && this.isComplete) {
- return { value: null, done: true };
+ SkipWhileSubscriber.prototype._next = function (value) {
+ var destination = this.destination;
+ if (this.skipping) {
+ this.tryCallPredicate(value);
}
- else {
- return { value: buffer.shift(), done: false };
+ if (!this.skipping) {
+ destination.next(value);
}
};
- ZipBufferIterator.prototype.hasValue = function () {
- return this.buffer.length > 0;
- };
- ZipBufferIterator.prototype.hasCompleted = function () {
- return this.buffer.length === 0 && this.isComplete;
- };
- ZipBufferIterator.prototype.notifyComplete = function () {
- if (this.buffer.length > 0) {
- this.isComplete = true;
- this.parent.notifyInactive();
+ SkipWhileSubscriber.prototype.tryCallPredicate = function (value) {
+ try {
+ var result = this.predicate(value, this.index++);
+ this.skipping = Boolean(result);
}
- else {
- this.destination.complete();
+ catch (err) {
+ this.destination.error(err);
}
};
- ZipBufferIterator.prototype.notifyNext = function (outerValue, innerValue, outerIndex, innerIndex, innerSub) {
- this.buffer.push(innerValue);
- this.parent.checkIterators();
- };
- ZipBufferIterator.prototype.subscribe = function (value, index) {
- return Object(_util_subscribeToResult__WEBPACK_IMPORTED_MODULE_5__["subscribeToResult"])(this, this.observable, this, index);
- };
- return ZipBufferIterator;
-}(_OuterSubscriber__WEBPACK_IMPORTED_MODULE_4__["OuterSubscriber"]));
-//# sourceMappingURL=zip.js.map
+ return SkipWhileSubscriber;
+}(_Subscriber__WEBPACK_IMPORTED_MODULE_1__["Subscriber"]));
+//# sourceMappingURL=skipWhile.js.map
/***/ }),
-/* 347 */
+/* 344 */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
"use strict";
__webpack_require__.r(__webpack_exports__);
-/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "zipAll", function() { return zipAll; });
-/* harmony import */ var _observable_zip__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(346);
-/** PURE_IMPORTS_START _observable_zip PURE_IMPORTS_END */
+/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "startWith", function() { return startWith; });
+/* harmony import */ var _observable_concat__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(239);
+/* harmony import */ var _util_isScheduler__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(205);
+/** PURE_IMPORTS_START _observable_concat,_util_isScheduler PURE_IMPORTS_END */
-function zipAll(project) {
- return function (source) { return source.lift(new _observable_zip__WEBPACK_IMPORTED_MODULE_0__["ZipOperator"](project)); };
+
+function startWith() {
+ var array = [];
+ for (var _i = 0; _i < arguments.length; _i++) {
+ array[_i] = arguments[_i];
+ }
+ var scheduler = array[array.length - 1];
+ if (Object(_util_isScheduler__WEBPACK_IMPORTED_MODULE_1__["isScheduler"])(scheduler)) {
+ array.pop();
+ return function (source) { return Object(_observable_concat__WEBPACK_IMPORTED_MODULE_0__["concat"])(array, source, scheduler); };
+ }
+ else {
+ return function (source) { return Object(_observable_concat__WEBPACK_IMPORTED_MODULE_0__["concat"])(array, source); };
+ }
}
-//# sourceMappingURL=zipAll.js.map
+//# sourceMappingURL=startWith.js.map
/***/ }),
-/* 348 */
-/***/ (function(module, exports, __webpack_require__) {
+/* 345 */
+/***/ (function(module, __webpack_exports__, __webpack_require__) {
"use strict";
+__webpack_require__.r(__webpack_exports__);
+/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "subscribeOn", function() { return subscribeOn; });
+/* harmony import */ var _observable_SubscribeOnObservable__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(346);
+/** PURE_IMPORTS_START _observable_SubscribeOnObservable PURE_IMPORTS_END */
+function subscribeOn(scheduler, delay) {
+ if (delay === void 0) {
+ delay = 0;
+ }
+ return function subscribeOnOperatorFunction(source) {
+ return source.lift(new SubscribeOnOperator(scheduler, delay));
+ };
+}
+var SubscribeOnOperator = /*@__PURE__*/ (function () {
+ function SubscribeOnOperator(scheduler, delay) {
+ this.scheduler = scheduler;
+ this.delay = delay;
+ }
+ SubscribeOnOperator.prototype.call = function (subscriber, source) {
+ return new _observable_SubscribeOnObservable__WEBPACK_IMPORTED_MODULE_0__["SubscribeOnObservable"](source, this.delay, this.scheduler).subscribe(subscriber);
+ };
+ return SubscribeOnOperator;
+}());
+//# sourceMappingURL=subscribeOn.js.map
-const callbacks = new Set();
-let called = false;
-
-function exit(exit, signal) {
- if (called) {
- return;
- }
- called = true;
+/***/ }),
+/* 346 */
+/***/ (function(module, __webpack_exports__, __webpack_require__) {
- for (const callback of callbacks) {
- callback();
- }
+"use strict";
+__webpack_require__.r(__webpack_exports__);
+/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "SubscribeOnObservable", function() { return SubscribeOnObservable; });
+/* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(36);
+/* harmony import */ var _Observable__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(170);
+/* harmony import */ var _scheduler_asap__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(211);
+/* harmony import */ var _util_isNumeric__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(257);
+/** PURE_IMPORTS_START tslib,_Observable,_scheduler_asap,_util_isNumeric PURE_IMPORTS_END */
- if (exit === true) {
- process.exit(128 + signal); // eslint-disable-line unicorn/no-process-exit
- }
-}
-module.exports = callback => {
- callbacks.add(callback);
- if (callbacks.size === 1) {
- process.once('exit', exit);
- process.once('SIGINT', exit.bind(null, true, 2));
- process.once('SIGTERM', exit.bind(null, true, 15));
- // PM2 Cluster shutdown message. Caught to support async handlers with pm2, needed because
- // explicitly calling process.exit() doesn't trigger the beforeExit event, and the exit
- // event cannot support async handlers, since the event loop is never called after it.
- process.on('message', message => {
- if (message === 'shutdown') {
- exit(true, -128);
- }
- });
- }
+var SubscribeOnObservable = /*@__PURE__*/ (function (_super) {
+ tslib__WEBPACK_IMPORTED_MODULE_0__["__extends"](SubscribeOnObservable, _super);
+ function SubscribeOnObservable(source, delayTime, scheduler) {
+ if (delayTime === void 0) {
+ delayTime = 0;
+ }
+ if (scheduler === void 0) {
+ scheduler = _scheduler_asap__WEBPACK_IMPORTED_MODULE_2__["asap"];
+ }
+ var _this = _super.call(this) || this;
+ _this.source = source;
+ _this.delayTime = delayTime;
+ _this.scheduler = scheduler;
+ if (!Object(_util_isNumeric__WEBPACK_IMPORTED_MODULE_3__["isNumeric"])(delayTime) || delayTime < 0) {
+ _this.delayTime = 0;
+ }
+ if (!scheduler || typeof scheduler.schedule !== 'function') {
+ _this.scheduler = _scheduler_asap__WEBPACK_IMPORTED_MODULE_2__["asap"];
+ }
+ return _this;
+ }
+ SubscribeOnObservable.create = function (source, delay, scheduler) {
+ if (delay === void 0) {
+ delay = 0;
+ }
+ if (scheduler === void 0) {
+ scheduler = _scheduler_asap__WEBPACK_IMPORTED_MODULE_2__["asap"];
+ }
+ return new SubscribeOnObservable(source, delay, scheduler);
+ };
+ SubscribeOnObservable.dispatch = function (arg) {
+ var source = arg.source, subscriber = arg.subscriber;
+ return this.add(source.subscribe(subscriber));
+ };
+ SubscribeOnObservable.prototype._subscribe = function (subscriber) {
+ var delay = this.delayTime;
+ var source = this.source;
+ var scheduler = this.scheduler;
+ return scheduler.schedule(SubscribeOnObservable.dispatch, delay, {
+ source: source, subscriber: subscriber
+ });
+ };
+ return SubscribeOnObservable;
+}(_Observable__WEBPACK_IMPORTED_MODULE_1__["Observable"]));
- return () => {
- callbacks.delete(callback);
- };
-};
+//# sourceMappingURL=SubscribeOnObservable.js.map
/***/ }),
-/* 349 */
-/***/ (function(module, exports, __webpack_require__) {
+/* 347 */
+/***/ (function(module, __webpack_exports__, __webpack_require__) {
"use strict";
+__webpack_require__.r(__webpack_exports__);
+/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "switchAll", function() { return switchAll; });
+/* harmony import */ var _switchMap__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(348);
+/* harmony import */ var _util_identity__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(220);
+/** PURE_IMPORTS_START _switchMap,_util_identity PURE_IMPORTS_END */
-/*
- * Licensed to Elasticsearch B.V. under one or more contributor
- * license agreements. See the NOTICE file distributed with
- * this work for additional information regarding copyright
- * ownership. Elasticsearch B.V. licenses this file to you under
- * the Apache License, Version 2.0 (the "License"); you may
- * not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-Object.defineProperty(exports, "__esModule", { value: true });
-const $isCliError = Symbol('isCliError');
-function createCliError(message) {
- const error = new Error(message);
- error[$isCliError] = true;
- return error;
-}
-exports.createCliError = createCliError;
-function isCliError(error) {
- return error && !!error[$isCliError];
+
+function switchAll() {
+ return Object(_switchMap__WEBPACK_IMPORTED_MODULE_0__["switchMap"])(_util_identity__WEBPACK_IMPORTED_MODULE_1__["identity"]);
}
-exports.isCliError = isCliError;
+//# sourceMappingURL=switchAll.js.map
/***/ }),
-/* 350 */
-/***/ (function(module, exports, __webpack_require__) {
+/* 348 */
+/***/ (function(module, __webpack_exports__, __webpack_require__) {
"use strict";
+__webpack_require__.r(__webpack_exports__);
+/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "switchMap", function() { return switchMap; });
+/* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(36);
+/* harmony import */ var _OuterSubscriber__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(229);
+/* harmony import */ var _InnerSubscriber__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(231);
+/* harmony import */ var _util_subscribeToResult__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(230);
+/* harmony import */ var _map__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(226);
+/* harmony import */ var _observable_from__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(243);
+/** PURE_IMPORTS_START tslib,_OuterSubscriber,_InnerSubscriber,_util_subscribeToResult,_map,_observable_from PURE_IMPORTS_END */
-/*
- * Licensed to Elasticsearch B.V. under one or more contributor
- * license agreements. See the NOTICE file distributed with
- * this work for additional information regarding copyright
- * ownership. Elasticsearch B.V. licenses this file to you under
- * the Apache License, Version 2.0 (the "License"); you may
- * not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-Object.defineProperty(exports, "__esModule", { value: true });
-const tslib_1 = __webpack_require__(36);
-const execa_1 = tslib_1.__importDefault(__webpack_require__(351));
-const fs_1 = __webpack_require__(23);
-const Rx = tslib_1.__importStar(__webpack_require__(391));
-const operators_1 = __webpack_require__(169);
-const chalk_1 = tslib_1.__importDefault(__webpack_require__(2));
-const tree_kill_1 = tslib_1.__importDefault(__webpack_require__(411));
-const util_1 = __webpack_require__(29);
-const treeKillAsync = util_1.promisify((...args) => tree_kill_1.default(...args));
-const observe_lines_1 = __webpack_require__(412);
-const errors_1 = __webpack_require__(349);
-const SECOND = 1000;
-const STOP_TIMEOUT = 30 * SECOND;
-async function withTimeout(attempt, ms, onTimeout) {
- const TIMEOUT = Symbol('timeout');
- try {
- await Promise.race([
- attempt(),
- new Promise((_, reject) => setTimeout(() => reject(TIMEOUT), ms)),
- ]);
- }
- catch (error) {
- if (error === TIMEOUT) {
- await onTimeout();
- }
- else {
- throw error;
- }
+
+
+
+
+
+function switchMap(project, resultSelector) {
+ if (typeof resultSelector === 'function') {
+ return function (source) { return source.pipe(switchMap(function (a, i) { return Object(_observable_from__WEBPACK_IMPORTED_MODULE_5__["from"])(project(a, i)).pipe(Object(_map__WEBPACK_IMPORTED_MODULE_4__["map"])(function (b, ii) { return resultSelector(a, b, i, ii); })); })); };
}
+ return function (source) { return source.lift(new SwitchMapOperator(project)); };
}
-function startProc(name, options, log) {
- const { cmd, args, cwd, env, stdin } = options;
- log.info('[%s] > %s', name, cmd, args.join(' '));
- // spawn fails with ENOENT when either the
- // cmd or cwd don't exist, so we check for the cwd
- // ahead of time so that the error is less ambiguous
- try {
- if (!fs_1.statSync(cwd).isDirectory()) {
- throw new Error(`cwd "${cwd}" exists but is not a directory`);
- }
- }
- catch (err) {
- if (err.code === 'ENOENT') {
- throw new Error(`cwd "${cwd}" does not exist`);
- }
- }
- const childProcess = execa_1.default(cmd, args, {
- cwd,
- env,
- stdio: ['pipe', 'pipe', 'pipe'],
- preferLocal: true,
- });
- if (stdin) {
- childProcess.stdin.end(stdin, 'utf8');
+var SwitchMapOperator = /*@__PURE__*/ (function () {
+ function SwitchMapOperator(project) {
+ this.project = project;
}
- else {
- childProcess.stdin.end();
+ SwitchMapOperator.prototype.call = function (subscriber, source) {
+ return source.subscribe(new SwitchMapSubscriber(subscriber, this.project));
+ };
+ return SwitchMapOperator;
+}());
+var SwitchMapSubscriber = /*@__PURE__*/ (function (_super) {
+ tslib__WEBPACK_IMPORTED_MODULE_0__["__extends"](SwitchMapSubscriber, _super);
+ function SwitchMapSubscriber(destination, project) {
+ var _this = _super.call(this, destination) || this;
+ _this.project = project;
+ _this.index = 0;
+ return _this;
}
- let stopCalled = false;
- const outcome$ = Rx.race(
- // observe first exit event
- Rx.fromEvent(childProcess, 'exit').pipe(operators_1.take(1), operators_1.map(([code]) => {
- if (stopCalled) {
- return null;
- }
- // JVM exits with 143 on SIGTERM and 130 on SIGINT, dont' treat then as errors
- if (code > 0 && !(code === 143 || code === 130)) {
- throw errors_1.createCliError(`[${name}] exited with code ${code}`);
+ SwitchMapSubscriber.prototype._next = function (value) {
+ var result;
+ var index = this.index++;
+ try {
+ result = this.project(value, index);
}
- return code;
- })),
- // observe first error event
- Rx.fromEvent(childProcess, 'error').pipe(operators_1.take(1), operators_1.mergeMap(err => Rx.throwError(err)))).pipe(operators_1.share());
- const lines$ = Rx.merge(observe_lines_1.observeLines(childProcess.stdout), observe_lines_1.observeLines(childProcess.stderr)).pipe(operators_1.tap(line => log.write(` ${chalk_1.default.gray('proc')} [${chalk_1.default.gray(name)}] ${line}`)), operators_1.share());
- const outcomePromise = Rx.merge(lines$.pipe(operators_1.ignoreElements()), outcome$).toPromise();
- async function stop(signal) {
- if (stopCalled) {
+ catch (error) {
+ this.destination.error(error);
return;
}
- stopCalled = true;
- await withTimeout(async () => {
- log.debug(`Sending "${signal}" to proc "${name}"`);
- await treeKillAsync(childProcess.pid, signal);
- await outcomePromise;
- }, STOP_TIMEOUT, async () => {
- log.warning(`Proc "${name}" was sent "${signal}" didn't emit the "exit" or "error" events after ${STOP_TIMEOUT} ms, sending SIGKILL`);
- await treeKillAsync(childProcess.pid, 'SIGKILL');
- });
- await withTimeout(async () => {
- try {
- await outcomePromise;
- }
- catch (error) {
- // ignore
- }
- }, STOP_TIMEOUT, async () => {
- throw new Error(`Proc "${name}" was stopped but never emitted either the "exit" or "error" event after ${STOP_TIMEOUT} ms`);
- });
- }
- return {
- name,
- lines$,
- outcome$,
- outcomePromise,
- stop,
+ this._innerSub(result, value, index);
};
-}
-exports.startProc = startProc;
+ SwitchMapSubscriber.prototype._innerSub = function (result, value, index) {
+ var innerSubscription = this.innerSubscription;
+ if (innerSubscription) {
+ innerSubscription.unsubscribe();
+ }
+ var innerSubscriber = new _InnerSubscriber__WEBPACK_IMPORTED_MODULE_2__["InnerSubscriber"](this, undefined, undefined);
+ var destination = this.destination;
+ destination.add(innerSubscriber);
+ this.innerSubscription = Object(_util_subscribeToResult__WEBPACK_IMPORTED_MODULE_3__["subscribeToResult"])(this, result, value, index, innerSubscriber);
+ };
+ SwitchMapSubscriber.prototype._complete = function () {
+ var innerSubscription = this.innerSubscription;
+ if (!innerSubscription || innerSubscription.closed) {
+ _super.prototype._complete.call(this);
+ }
+ this.unsubscribe();
+ };
+ SwitchMapSubscriber.prototype._unsubscribe = function () {
+ this.innerSubscription = null;
+ };
+ SwitchMapSubscriber.prototype.notifyComplete = function (innerSub) {
+ var destination = this.destination;
+ destination.remove(innerSub);
+ this.innerSubscription = null;
+ if (this.isStopped) {
+ _super.prototype._complete.call(this);
+ }
+ };
+ SwitchMapSubscriber.prototype.notifyNext = function (outerValue, innerValue, outerIndex, innerIndex, innerSub) {
+ this.destination.next(innerValue);
+ };
+ return SwitchMapSubscriber;
+}(_OuterSubscriber__WEBPACK_IMPORTED_MODULE_1__["OuterSubscriber"]));
+//# sourceMappingURL=switchMap.js.map
/***/ }),
-/* 351 */
-/***/ (function(module, exports, __webpack_require__) {
+/* 349 */
+/***/ (function(module, __webpack_exports__, __webpack_require__) {
"use strict";
+__webpack_require__.r(__webpack_exports__);
+/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "switchMapTo", function() { return switchMapTo; });
+/* harmony import */ var _switchMap__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(348);
+/** PURE_IMPORTS_START _switchMap PURE_IMPORTS_END */
-const path = __webpack_require__(16);
-const childProcess = __webpack_require__(352);
-const crossSpawn = __webpack_require__(353);
-const stripFinalNewline = __webpack_require__(366);
-const npmRunPath = __webpack_require__(367);
-const onetime = __webpack_require__(368);
-const makeError = __webpack_require__(370);
-const normalizeStdio = __webpack_require__(375);
-const {spawnedKill, spawnedCancel, setupTimeout, setExitHandler} = __webpack_require__(376);
-const {handleInput, getSpawnedResult, makeAllStream, validateInputSync} = __webpack_require__(380);
-const {mergePromise, getSpawnedPromise} = __webpack_require__(389);
-const {joinCommand, parseCommand} = __webpack_require__(390);
+function switchMapTo(innerObservable, resultSelector) {
+ return resultSelector ? Object(_switchMap__WEBPACK_IMPORTED_MODULE_0__["switchMap"])(function () { return innerObservable; }, resultSelector) : Object(_switchMap__WEBPACK_IMPORTED_MODULE_0__["switchMap"])(function () { return innerObservable; });
+}
+//# sourceMappingURL=switchMapTo.js.map
-const DEFAULT_MAX_BUFFER = 1000 * 1000 * 100;
-const getEnv = ({env: envOption, extendEnv, preferLocal, localDir, execPath}) => {
- const env = extendEnv ? {...process.env, ...envOption} : envOption;
+/***/ }),
+/* 350 */
+/***/ (function(module, __webpack_exports__, __webpack_require__) {
- if (preferLocal) {
- return npmRunPath.env({env, cwd: localDir, execPath});
- }
+"use strict";
+__webpack_require__.r(__webpack_exports__);
+/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "takeUntil", function() { return takeUntil; });
+/* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(36);
+/* harmony import */ var _OuterSubscriber__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(229);
+/* harmony import */ var _util_subscribeToResult__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(230);
+/** PURE_IMPORTS_START tslib,_OuterSubscriber,_util_subscribeToResult PURE_IMPORTS_END */
- return env;
-};
-const handleArgs = (file, args, options = {}) => {
- const parsed = crossSpawn._parse(file, args, options);
- file = parsed.command;
- args = parsed.args;
- options = parsed.options;
- options = {
- maxBuffer: DEFAULT_MAX_BUFFER,
- buffer: true,
- stripFinalNewline: true,
- extendEnv: true,
- preferLocal: false,
- localDir: options.cwd || process.cwd(),
- execPath: process.execPath,
- encoding: 'utf8',
- reject: true,
- cleanup: true,
- all: false,
- windowsHide: true,
- ...options
- };
+function takeUntil(notifier) {
+ return function (source) { return source.lift(new TakeUntilOperator(notifier)); };
+}
+var TakeUntilOperator = /*@__PURE__*/ (function () {
+ function TakeUntilOperator(notifier) {
+ this.notifier = notifier;
+ }
+ TakeUntilOperator.prototype.call = function (subscriber, source) {
+ var takeUntilSubscriber = new TakeUntilSubscriber(subscriber);
+ var notifierSubscription = Object(_util_subscribeToResult__WEBPACK_IMPORTED_MODULE_2__["subscribeToResult"])(takeUntilSubscriber, this.notifier);
+ if (notifierSubscription && !takeUntilSubscriber.seenValue) {
+ takeUntilSubscriber.add(notifierSubscription);
+ return source.subscribe(takeUntilSubscriber);
+ }
+ return takeUntilSubscriber;
+ };
+ return TakeUntilOperator;
+}());
+var TakeUntilSubscriber = /*@__PURE__*/ (function (_super) {
+ tslib__WEBPACK_IMPORTED_MODULE_0__["__extends"](TakeUntilSubscriber, _super);
+ function TakeUntilSubscriber(destination) {
+ var _this = _super.call(this, destination) || this;
+ _this.seenValue = false;
+ return _this;
+ }
+ TakeUntilSubscriber.prototype.notifyNext = function (outerValue, innerValue, outerIndex, innerIndex, innerSub) {
+ this.seenValue = true;
+ this.complete();
+ };
+ TakeUntilSubscriber.prototype.notifyComplete = function () {
+ };
+ return TakeUntilSubscriber;
+}(_OuterSubscriber__WEBPACK_IMPORTED_MODULE_1__["OuterSubscriber"]));
+//# sourceMappingURL=takeUntil.js.map
- options.env = getEnv(options);
- options.stdio = normalizeStdio(options);
+/***/ }),
+/* 351 */
+/***/ (function(module, __webpack_exports__, __webpack_require__) {
- if (process.platform === 'win32' && path.basename(file, '.exe') === 'cmd') {
- // #116
- args.unshift('/q');
- }
+"use strict";
+__webpack_require__.r(__webpack_exports__);
+/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "takeWhile", function() { return takeWhile; });
+/* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(36);
+/* harmony import */ var _Subscriber__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(172);
+/** PURE_IMPORTS_START tslib,_Subscriber PURE_IMPORTS_END */
- return {file, args, options, parsed};
-};
-const handleOutput = (options, value, error) => {
- if (typeof value !== 'string' && !Buffer.isBuffer(value)) {
- // When `execa.sync()` errors, we normalize it to '' to mimic `execa()`
- return error === undefined ? undefined : '';
- }
+function takeWhile(predicate, inclusive) {
+ if (inclusive === void 0) {
+ inclusive = false;
+ }
+ return function (source) {
+ return source.lift(new TakeWhileOperator(predicate, inclusive));
+ };
+}
+var TakeWhileOperator = /*@__PURE__*/ (function () {
+ function TakeWhileOperator(predicate, inclusive) {
+ this.predicate = predicate;
+ this.inclusive = inclusive;
+ }
+ TakeWhileOperator.prototype.call = function (subscriber, source) {
+ return source.subscribe(new TakeWhileSubscriber(subscriber, this.predicate, this.inclusive));
+ };
+ return TakeWhileOperator;
+}());
+var TakeWhileSubscriber = /*@__PURE__*/ (function (_super) {
+ tslib__WEBPACK_IMPORTED_MODULE_0__["__extends"](TakeWhileSubscriber, _super);
+ function TakeWhileSubscriber(destination, predicate, inclusive) {
+ var _this = _super.call(this, destination) || this;
+ _this.predicate = predicate;
+ _this.inclusive = inclusive;
+ _this.index = 0;
+ return _this;
+ }
+ TakeWhileSubscriber.prototype._next = function (value) {
+ var destination = this.destination;
+ var result;
+ try {
+ result = this.predicate(value, this.index++);
+ }
+ catch (err) {
+ destination.error(err);
+ return;
+ }
+ this.nextOrComplete(value, result);
+ };
+ TakeWhileSubscriber.prototype.nextOrComplete = function (value, predicateResult) {
+ var destination = this.destination;
+ if (Boolean(predicateResult)) {
+ destination.next(value);
+ }
+ else {
+ if (this.inclusive) {
+ destination.next(value);
+ }
+ destination.complete();
+ }
+ };
+ return TakeWhileSubscriber;
+}(_Subscriber__WEBPACK_IMPORTED_MODULE_1__["Subscriber"]));
+//# sourceMappingURL=takeWhile.js.map
- if (options.stripFinalNewline) {
- return stripFinalNewline(value);
- }
- return value;
-};
+/***/ }),
+/* 352 */
+/***/ (function(module, __webpack_exports__, __webpack_require__) {
-const execa = (file, args, options) => {
- const parsed = handleArgs(file, args, options);
- const command = joinCommand(file, args);
+"use strict";
+__webpack_require__.r(__webpack_exports__);
+/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "tap", function() { return tap; });
+/* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(36);
+/* harmony import */ var _Subscriber__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(172);
+/* harmony import */ var _util_noop__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(185);
+/* harmony import */ var _util_isFunction__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(173);
+/** PURE_IMPORTS_START tslib,_Subscriber,_util_noop,_util_isFunction PURE_IMPORTS_END */
- let spawned;
- try {
- spawned = childProcess.spawn(parsed.file, parsed.args, parsed.options);
- } catch (error) {
- // Ensure the returned error is always both a promise and a child process
- const dummySpawned = new childProcess.ChildProcess();
- const errorPromise = Promise.reject(makeError({
- error,
- stdout: '',
- stderr: '',
- all: '',
- command,
- parsed,
- timedOut: false,
- isCanceled: false,
- killed: false
- }));
- return mergePromise(dummySpawned, errorPromise);
- }
- const spawnedPromise = getSpawnedPromise(spawned);
- const timedPromise = setupTimeout(spawned, parsed.options, spawnedPromise);
- const processDone = setExitHandler(spawned, parsed.options, timedPromise);
-
- const context = {isCanceled: false};
-
- spawned.kill = spawnedKill.bind(null, spawned.kill.bind(spawned));
- spawned.cancel = spawnedCancel.bind(null, spawned, context);
-
- const handlePromise = async () => {
- const [{error, exitCode, signal, timedOut}, stdoutResult, stderrResult, allResult] = await getSpawnedResult(spawned, parsed.options, processDone);
- const stdout = handleOutput(parsed.options, stdoutResult);
- const stderr = handleOutput(parsed.options, stderrResult);
- const all = handleOutput(parsed.options, allResult);
-
- if (error || exitCode !== 0 || signal !== null) {
- const returnedError = makeError({
- error,
- exitCode,
- signal,
- stdout,
- stderr,
- all,
- command,
- parsed,
- timedOut,
- isCanceled: context.isCanceled,
- killed: spawned.killed
- });
- if (!parsed.options.reject) {
- return returnedError;
- }
- throw returnedError;
- }
+function tap(nextOrObserver, error, complete) {
+ return function tapOperatorFunction(source) {
+ return source.lift(new DoOperator(nextOrObserver, error, complete));
+ };
+}
+var DoOperator = /*@__PURE__*/ (function () {
+ function DoOperator(nextOrObserver, error, complete) {
+ this.nextOrObserver = nextOrObserver;
+ this.error = error;
+ this.complete = complete;
+ }
+ DoOperator.prototype.call = function (subscriber, source) {
+ return source.subscribe(new TapSubscriber(subscriber, this.nextOrObserver, this.error, this.complete));
+ };
+ return DoOperator;
+}());
+var TapSubscriber = /*@__PURE__*/ (function (_super) {
+ tslib__WEBPACK_IMPORTED_MODULE_0__["__extends"](TapSubscriber, _super);
+ function TapSubscriber(destination, observerOrNext, error, complete) {
+ var _this = _super.call(this, destination) || this;
+ _this._tapNext = _util_noop__WEBPACK_IMPORTED_MODULE_2__["noop"];
+ _this._tapError = _util_noop__WEBPACK_IMPORTED_MODULE_2__["noop"];
+ _this._tapComplete = _util_noop__WEBPACK_IMPORTED_MODULE_2__["noop"];
+ _this._tapError = error || _util_noop__WEBPACK_IMPORTED_MODULE_2__["noop"];
+ _this._tapComplete = complete || _util_noop__WEBPACK_IMPORTED_MODULE_2__["noop"];
+ if (Object(_util_isFunction__WEBPACK_IMPORTED_MODULE_3__["isFunction"])(observerOrNext)) {
+ _this._context = _this;
+ _this._tapNext = observerOrNext;
+ }
+ else if (observerOrNext) {
+ _this._context = observerOrNext;
+ _this._tapNext = observerOrNext.next || _util_noop__WEBPACK_IMPORTED_MODULE_2__["noop"];
+ _this._tapError = observerOrNext.error || _util_noop__WEBPACK_IMPORTED_MODULE_2__["noop"];
+ _this._tapComplete = observerOrNext.complete || _util_noop__WEBPACK_IMPORTED_MODULE_2__["noop"];
+ }
+ return _this;
+ }
+ TapSubscriber.prototype._next = function (value) {
+ try {
+ this._tapNext.call(this._context, value);
+ }
+ catch (err) {
+ this.destination.error(err);
+ return;
+ }
+ this.destination.next(value);
+ };
+ TapSubscriber.prototype._error = function (err) {
+ try {
+ this._tapError.call(this._context, err);
+ }
+ catch (err) {
+ this.destination.error(err);
+ return;
+ }
+ this.destination.error(err);
+ };
+ TapSubscriber.prototype._complete = function () {
+ try {
+ this._tapComplete.call(this._context);
+ }
+ catch (err) {
+ this.destination.error(err);
+ return;
+ }
+ return this.destination.complete();
+ };
+ return TapSubscriber;
+}(_Subscriber__WEBPACK_IMPORTED_MODULE_1__["Subscriber"]));
+//# sourceMappingURL=tap.js.map
- return {
- command,
- exitCode: 0,
- stdout,
- stderr,
- all,
- failed: false,
- timedOut: false,
- isCanceled: false,
- killed: false
- };
- };
- const handlePromiseOnce = onetime(handlePromise);
+/***/ }),
+/* 353 */
+/***/ (function(module, __webpack_exports__, __webpack_require__) {
- crossSpawn._enoent.hookChildProcess(spawned, parsed.parsed);
+"use strict";
+__webpack_require__.r(__webpack_exports__);
+/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "defaultThrottleConfig", function() { return defaultThrottleConfig; });
+/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "throttle", function() { return throttle; });
+/* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(36);
+/* harmony import */ var _OuterSubscriber__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(229);
+/* harmony import */ var _util_subscribeToResult__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(230);
+/** PURE_IMPORTS_START tslib,_OuterSubscriber,_util_subscribeToResult PURE_IMPORTS_END */
- handleInput(spawned, parsed.options.input);
- spawned.all = makeAllStream(spawned, parsed.options);
- return mergePromise(spawned, handlePromiseOnce);
+var defaultThrottleConfig = {
+ leading: true,
+ trailing: false
};
+function throttle(durationSelector, config) {
+ if (config === void 0) {
+ config = defaultThrottleConfig;
+ }
+ return function (source) { return source.lift(new ThrottleOperator(durationSelector, config.leading, config.trailing)); };
+}
+var ThrottleOperator = /*@__PURE__*/ (function () {
+ function ThrottleOperator(durationSelector, leading, trailing) {
+ this.durationSelector = durationSelector;
+ this.leading = leading;
+ this.trailing = trailing;
+ }
+ ThrottleOperator.prototype.call = function (subscriber, source) {
+ return source.subscribe(new ThrottleSubscriber(subscriber, this.durationSelector, this.leading, this.trailing));
+ };
+ return ThrottleOperator;
+}());
+var ThrottleSubscriber = /*@__PURE__*/ (function (_super) {
+ tslib__WEBPACK_IMPORTED_MODULE_0__["__extends"](ThrottleSubscriber, _super);
+ function ThrottleSubscriber(destination, durationSelector, _leading, _trailing) {
+ var _this = _super.call(this, destination) || this;
+ _this.destination = destination;
+ _this.durationSelector = durationSelector;
+ _this._leading = _leading;
+ _this._trailing = _trailing;
+ _this._hasValue = false;
+ return _this;
+ }
+ ThrottleSubscriber.prototype._next = function (value) {
+ this._hasValue = true;
+ this._sendValue = value;
+ if (!this._throttled) {
+ if (this._leading) {
+ this.send();
+ }
+ else {
+ this.throttle(value);
+ }
+ }
+ };
+ ThrottleSubscriber.prototype.send = function () {
+ var _a = this, _hasValue = _a._hasValue, _sendValue = _a._sendValue;
+ if (_hasValue) {
+ this.destination.next(_sendValue);
+ this.throttle(_sendValue);
+ }
+ this._hasValue = false;
+ this._sendValue = null;
+ };
+ ThrottleSubscriber.prototype.throttle = function (value) {
+ var duration = this.tryDurationSelector(value);
+ if (!!duration) {
+ this.add(this._throttled = Object(_util_subscribeToResult__WEBPACK_IMPORTED_MODULE_2__["subscribeToResult"])(this, duration));
+ }
+ };
+ ThrottleSubscriber.prototype.tryDurationSelector = function (value) {
+ try {
+ return this.durationSelector(value);
+ }
+ catch (err) {
+ this.destination.error(err);
+ return null;
+ }
+ };
+ ThrottleSubscriber.prototype.throttlingDone = function () {
+ var _a = this, _throttled = _a._throttled, _trailing = _a._trailing;
+ if (_throttled) {
+ _throttled.unsubscribe();
+ }
+ this._throttled = null;
+ if (_trailing) {
+ this.send();
+ }
+ };
+ ThrottleSubscriber.prototype.notifyNext = function (outerValue, innerValue, outerIndex, innerIndex, innerSub) {
+ this.throttlingDone();
+ };
+ ThrottleSubscriber.prototype.notifyComplete = function () {
+ this.throttlingDone();
+ };
+ return ThrottleSubscriber;
+}(_OuterSubscriber__WEBPACK_IMPORTED_MODULE_1__["OuterSubscriber"]));
+//# sourceMappingURL=throttle.js.map
-module.exports = execa;
-
-module.exports.sync = (file, args, options) => {
- const parsed = handleArgs(file, args, options);
- const command = joinCommand(file, args);
-
- validateInputSync(parsed.options);
- let result;
- try {
- result = childProcess.spawnSync(parsed.file, parsed.args, parsed.options);
- } catch (error) {
- throw makeError({
- error,
- stdout: '',
- stderr: '',
- all: '',
- command,
- parsed,
- timedOut: false,
- isCanceled: false,
- killed: false
- });
- }
+/***/ }),
+/* 354 */
+/***/ (function(module, __webpack_exports__, __webpack_require__) {
- const stdout = handleOutput(parsed.options, result.stdout, result.error);
- const stderr = handleOutput(parsed.options, result.stderr, result.error);
+"use strict";
+__webpack_require__.r(__webpack_exports__);
+/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "throttleTime", function() { return throttleTime; });
+/* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(36);
+/* harmony import */ var _Subscriber__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(172);
+/* harmony import */ var _scheduler_async__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(215);
+/* harmony import */ var _throttle__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(353);
+/** PURE_IMPORTS_START tslib,_Subscriber,_scheduler_async,_throttle PURE_IMPORTS_END */
- if (result.error || result.status !== 0 || result.signal !== null) {
- const error = makeError({
- stdout,
- stderr,
- error: result.error,
- signal: result.signal,
- exitCode: result.status,
- command,
- parsed,
- timedOut: result.error && result.error.code === 'ETIMEDOUT',
- isCanceled: false,
- killed: result.signal !== null
- });
- if (!parsed.options.reject) {
- return error;
- }
- throw error;
- }
- return {
- command,
- exitCode: 0,
- stdout,
- stderr,
- failed: false,
- timedOut: false,
- isCanceled: false,
- killed: false
- };
-};
+function throttleTime(duration, scheduler, config) {
+ if (scheduler === void 0) {
+ scheduler = _scheduler_async__WEBPACK_IMPORTED_MODULE_2__["async"];
+ }
+ if (config === void 0) {
+ config = _throttle__WEBPACK_IMPORTED_MODULE_3__["defaultThrottleConfig"];
+ }
+ return function (source) { return source.lift(new ThrottleTimeOperator(duration, scheduler, config.leading, config.trailing)); };
+}
+var ThrottleTimeOperator = /*@__PURE__*/ (function () {
+ function ThrottleTimeOperator(duration, scheduler, leading, trailing) {
+ this.duration = duration;
+ this.scheduler = scheduler;
+ this.leading = leading;
+ this.trailing = trailing;
+ }
+ ThrottleTimeOperator.prototype.call = function (subscriber, source) {
+ return source.subscribe(new ThrottleTimeSubscriber(subscriber, this.duration, this.scheduler, this.leading, this.trailing));
+ };
+ return ThrottleTimeOperator;
+}());
+var ThrottleTimeSubscriber = /*@__PURE__*/ (function (_super) {
+ tslib__WEBPACK_IMPORTED_MODULE_0__["__extends"](ThrottleTimeSubscriber, _super);
+ function ThrottleTimeSubscriber(destination, duration, scheduler, leading, trailing) {
+ var _this = _super.call(this, destination) || this;
+ _this.duration = duration;
+ _this.scheduler = scheduler;
+ _this.leading = leading;
+ _this.trailing = trailing;
+ _this._hasTrailingValue = false;
+ _this._trailingValue = null;
+ return _this;
+ }
+ ThrottleTimeSubscriber.prototype._next = function (value) {
+ if (this.throttled) {
+ if (this.trailing) {
+ this._trailingValue = value;
+ this._hasTrailingValue = true;
+ }
+ }
+ else {
+ this.add(this.throttled = this.scheduler.schedule(dispatchNext, this.duration, { subscriber: this }));
+ if (this.leading) {
+ this.destination.next(value);
+ }
+ else if (this.trailing) {
+ this._trailingValue = value;
+ this._hasTrailingValue = true;
+ }
+ }
+ };
+ ThrottleTimeSubscriber.prototype._complete = function () {
+ if (this._hasTrailingValue) {
+ this.destination.next(this._trailingValue);
+ this.destination.complete();
+ }
+ else {
+ this.destination.complete();
+ }
+ };
+ ThrottleTimeSubscriber.prototype.clearThrottle = function () {
+ var throttled = this.throttled;
+ if (throttled) {
+ if (this.trailing && this._hasTrailingValue) {
+ this.destination.next(this._trailingValue);
+ this._trailingValue = null;
+ this._hasTrailingValue = false;
+ }
+ throttled.unsubscribe();
+ this.remove(throttled);
+ this.throttled = null;
+ }
+ };
+ return ThrottleTimeSubscriber;
+}(_Subscriber__WEBPACK_IMPORTED_MODULE_1__["Subscriber"]));
+function dispatchNext(arg) {
+ var subscriber = arg.subscriber;
+ subscriber.clearThrottle();
+}
+//# sourceMappingURL=throttleTime.js.map
-module.exports.command = (command, options) => {
- const [file, ...args] = parseCommand(command);
- return execa(file, args, options);
-};
-module.exports.commandSync = (command, options) => {
- const [file, ...args] = parseCommand(command);
- return execa.sync(file, args, options);
-};
+/***/ }),
+/* 355 */
+/***/ (function(module, __webpack_exports__, __webpack_require__) {
-module.exports.node = (scriptPath, args, options = {}) => {
- if (args && !Array.isArray(args) && typeof args === 'object') {
- options = args;
- args = [];
- }
+"use strict";
+__webpack_require__.r(__webpack_exports__);
+/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "timeInterval", function() { return timeInterval; });
+/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "TimeInterval", function() { return TimeInterval; });
+/* harmony import */ var _scheduler_async__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(215);
+/* harmony import */ var _scan__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(315);
+/* harmony import */ var _observable_defer__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(250);
+/* harmony import */ var _map__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(226);
+/** PURE_IMPORTS_START _scheduler_async,_scan,_observable_defer,_map PURE_IMPORTS_END */
- const stdio = normalizeStdio.node(options);
- const {nodePath = process.execPath, nodeOptions = process.execArgv} = options;
- return execa(
- nodePath,
- [
- ...nodeOptions,
- scriptPath,
- ...(Array.isArray(args) ? args : [])
- ],
- {
- ...options,
- stdin: undefined,
- stdout: undefined,
- stderr: undefined,
- stdio,
- shell: false
- }
- );
-};
+function timeInterval(scheduler) {
+ if (scheduler === void 0) {
+ scheduler = _scheduler_async__WEBPACK_IMPORTED_MODULE_0__["async"];
+ }
+ return function (source) {
+ return Object(_observable_defer__WEBPACK_IMPORTED_MODULE_2__["defer"])(function () {
+ return source.pipe(Object(_scan__WEBPACK_IMPORTED_MODULE_1__["scan"])(function (_a, value) {
+ var current = _a.current;
+ return ({ value: value, current: scheduler.now(), last: current });
+ }, { current: scheduler.now(), value: undefined, last: undefined }), Object(_map__WEBPACK_IMPORTED_MODULE_3__["map"])(function (_a) {
+ var current = _a.current, last = _a.last, value = _a.value;
+ return new TimeInterval(value, current - last);
+ }));
+ });
+ };
+}
+var TimeInterval = /*@__PURE__*/ (function () {
+ function TimeInterval(value, interval) {
+ this.value = value;
+ this.interval = interval;
+ }
+ return TimeInterval;
+}());
-/***/ }),
-/* 352 */
-/***/ (function(module, exports) {
+//# sourceMappingURL=timeInterval.js.map
-module.exports = require("child_process");
/***/ }),
-/* 353 */
-/***/ (function(module, exports, __webpack_require__) {
+/* 356 */
+/***/ (function(module, __webpack_exports__, __webpack_require__) {
"use strict";
+__webpack_require__.r(__webpack_exports__);
+/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "timeout", function() { return timeout; });
+/* harmony import */ var _scheduler_async__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(215);
+/* harmony import */ var _util_TimeoutError__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(224);
+/* harmony import */ var _timeoutWith__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(357);
+/* harmony import */ var _observable_throwError__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(209);
+/** PURE_IMPORTS_START _scheduler_async,_util_TimeoutError,_timeoutWith,_observable_throwError PURE_IMPORTS_END */
-const cp = __webpack_require__(352);
-const parse = __webpack_require__(354);
-const enoent = __webpack_require__(365);
-
-function spawn(command, args, options) {
- // Parse the arguments
- const parsed = parse(command, args, options);
-
- // Spawn the child process
- const spawned = cp.spawn(parsed.command, parsed.args, parsed.options);
-
- // Hook into child process "exit" event to emit an error if the command
- // does not exists, see: https://github.com/IndigoUnited/node-cross-spawn/issues/16
- enoent.hookChildProcess(spawned, parsed);
-
- return spawned;
-}
-
-function spawnSync(command, args, options) {
- // Parse the arguments
- const parsed = parse(command, args, options);
-
- // Spawn the child process
- const result = cp.spawnSync(parsed.command, parsed.args, parsed.options);
- // Analyze if the command does not exist, see: https://github.com/IndigoUnited/node-cross-spawn/issues/16
- result.error = result.error || enoent.verifyENOENTSync(result.status, parsed);
- return result;
+function timeout(due, scheduler) {
+ if (scheduler === void 0) {
+ scheduler = _scheduler_async__WEBPACK_IMPORTED_MODULE_0__["async"];
+ }
+ return Object(_timeoutWith__WEBPACK_IMPORTED_MODULE_2__["timeoutWith"])(due, Object(_observable_throwError__WEBPACK_IMPORTED_MODULE_3__["throwError"])(new _util_TimeoutError__WEBPACK_IMPORTED_MODULE_1__["TimeoutError"]()), scheduler);
}
-
-module.exports = spawn;
-module.exports.spawn = spawn;
-module.exports.sync = spawnSync;
-
-module.exports._parse = parse;
-module.exports._enoent = enoent;
+//# sourceMappingURL=timeout.js.map
/***/ }),
-/* 354 */
-/***/ (function(module, exports, __webpack_require__) {
+/* 357 */
+/***/ (function(module, __webpack_exports__, __webpack_require__) {
"use strict";
+__webpack_require__.r(__webpack_exports__);
+/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "timeoutWith", function() { return timeoutWith; });
+/* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(36);
+/* harmony import */ var _scheduler_async__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(215);
+/* harmony import */ var _util_isDate__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(289);
+/* harmony import */ var _OuterSubscriber__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(229);
+/* harmony import */ var _util_subscribeToResult__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(230);
+/** PURE_IMPORTS_START tslib,_scheduler_async,_util_isDate,_OuterSubscriber,_util_subscribeToResult PURE_IMPORTS_END */
-const path = __webpack_require__(16);
-const resolveCommand = __webpack_require__(355);
-const escape = __webpack_require__(361);
-const readShebang = __webpack_require__(362);
-
-const isWin = process.platform === 'win32';
-const isExecutableRegExp = /\.(?:com|exe)$/i;
-const isCmdShimRegExp = /node_modules[\\/].bin[\\/][^\\/]+\.cmd$/i;
-
-function detectShebang(parsed) {
- parsed.file = resolveCommand(parsed);
- const shebang = parsed.file && readShebang(parsed.file);
- if (shebang) {
- parsed.args.unshift(parsed.file);
- parsed.command = shebang;
- return resolveCommand(parsed);
+function timeoutWith(due, withObservable, scheduler) {
+ if (scheduler === void 0) {
+ scheduler = _scheduler_async__WEBPACK_IMPORTED_MODULE_1__["async"];
}
-
- return parsed.file;
+ return function (source) {
+ var absoluteTimeout = Object(_util_isDate__WEBPACK_IMPORTED_MODULE_2__["isDate"])(due);
+ var waitFor = absoluteTimeout ? (+due - scheduler.now()) : Math.abs(due);
+ return source.lift(new TimeoutWithOperator(waitFor, absoluteTimeout, withObservable, scheduler));
+ };
}
-
-function parseNonShell(parsed) {
- if (!isWin) {
- return parsed;
+var TimeoutWithOperator = /*@__PURE__*/ (function () {
+ function TimeoutWithOperator(waitFor, absoluteTimeout, withObservable, scheduler) {
+ this.waitFor = waitFor;
+ this.absoluteTimeout = absoluteTimeout;
+ this.withObservable = withObservable;
+ this.scheduler = scheduler;
}
+ TimeoutWithOperator.prototype.call = function (subscriber, source) {
+ return source.subscribe(new TimeoutWithSubscriber(subscriber, this.absoluteTimeout, this.waitFor, this.withObservable, this.scheduler));
+ };
+ return TimeoutWithOperator;
+}());
+var TimeoutWithSubscriber = /*@__PURE__*/ (function (_super) {
+ tslib__WEBPACK_IMPORTED_MODULE_0__["__extends"](TimeoutWithSubscriber, _super);
+ function TimeoutWithSubscriber(destination, absoluteTimeout, waitFor, withObservable, scheduler) {
+ var _this = _super.call(this, destination) || this;
+ _this.absoluteTimeout = absoluteTimeout;
+ _this.waitFor = waitFor;
+ _this.withObservable = withObservable;
+ _this.scheduler = scheduler;
+ _this.action = null;
+ _this.scheduleTimeout();
+ return _this;
+ }
+ TimeoutWithSubscriber.dispatchTimeout = function (subscriber) {
+ var withObservable = subscriber.withObservable;
+ subscriber._unsubscribeAndRecycle();
+ subscriber.add(Object(_util_subscribeToResult__WEBPACK_IMPORTED_MODULE_4__["subscribeToResult"])(subscriber, withObservable));
+ };
+ TimeoutWithSubscriber.prototype.scheduleTimeout = function () {
+ var action = this.action;
+ if (action) {
+ this.action = action.schedule(this, this.waitFor);
+ }
+ else {
+ this.add(this.action = this.scheduler.schedule(TimeoutWithSubscriber.dispatchTimeout, this.waitFor, this));
+ }
+ };
+ TimeoutWithSubscriber.prototype._next = function (value) {
+ if (!this.absoluteTimeout) {
+ this.scheduleTimeout();
+ }
+ _super.prototype._next.call(this, value);
+ };
+ TimeoutWithSubscriber.prototype._unsubscribe = function () {
+ this.action = null;
+ this.scheduler = null;
+ this.withObservable = null;
+ };
+ return TimeoutWithSubscriber;
+}(_OuterSubscriber__WEBPACK_IMPORTED_MODULE_3__["OuterSubscriber"]));
+//# sourceMappingURL=timeoutWith.js.map
- // Detect & add support for shebangs
- const commandFile = detectShebang(parsed);
-
- // We don't need a shell if the command filename is an executable
- const needsShell = !isExecutableRegExp.test(commandFile);
-
- // If a shell is required, use cmd.exe and take care of escaping everything correctly
- // Note that `forceShell` is an hidden option used only in tests
- if (parsed.options.forceShell || needsShell) {
- // Need to double escape meta chars if the command is a cmd-shim located in `node_modules/.bin/`
- // The cmd-shim simply calls execute the package bin file with NodeJS, proxying any argument
- // Because the escape of metachars with ^ gets interpreted when the cmd.exe is first called,
- // we need to double escape them
- const needsDoubleEscapeMetaChars = isCmdShimRegExp.test(commandFile);
- // Normalize posix paths into OS compatible paths (e.g.: foo/bar -> foo\bar)
- // This is necessary otherwise it will always fail with ENOENT in those cases
- parsed.command = path.normalize(parsed.command);
+/***/ }),
+/* 358 */
+/***/ (function(module, __webpack_exports__, __webpack_require__) {
- // Escape command & arguments
- parsed.command = escape.command(parsed.command);
- parsed.args = parsed.args.map((arg) => escape.argument(arg, needsDoubleEscapeMetaChars));
+"use strict";
+__webpack_require__.r(__webpack_exports__);
+/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "timestamp", function() { return timestamp; });
+/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "Timestamp", function() { return Timestamp; });
+/* harmony import */ var _scheduler_async__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(215);
+/* harmony import */ var _map__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(226);
+/** PURE_IMPORTS_START _scheduler_async,_map PURE_IMPORTS_END */
- const shellCommand = [parsed.command].concat(parsed.args).join(' ');
- parsed.args = ['/d', '/s', '/c', `"${shellCommand}"`];
- parsed.command = process.env.comspec || 'cmd.exe';
- parsed.options.windowsVerbatimArguments = true; // Tell node's spawn that the arguments are already escaped
+function timestamp(scheduler) {
+ if (scheduler === void 0) {
+ scheduler = _scheduler_async__WEBPACK_IMPORTED_MODULE_0__["async"];
}
-
- return parsed;
+ return Object(_map__WEBPACK_IMPORTED_MODULE_1__["map"])(function (value) { return new Timestamp(value, scheduler.now()); });
}
-
-function parse(command, args, options) {
- // Normalize arguments, similar to nodejs
- if (args && !Array.isArray(args)) {
- options = args;
- args = null;
+var Timestamp = /*@__PURE__*/ (function () {
+ function Timestamp(value, timestamp) {
+ this.value = value;
+ this.timestamp = timestamp;
}
+ return Timestamp;
+}());
- args = args ? args.slice(0) : []; // Clone array to avoid changing the original
- options = Object.assign({}, options); // Clone object to avoid changing the original
-
- // Build our parsed object
- const parsed = {
- command,
- args,
- options,
- file: undefined,
- original: {
- command,
- args,
- },
- };
-
- // Delegate further parsing to shell or non-shell
- return options.shell ? parsed : parseNonShell(parsed);
-}
-
-module.exports = parse;
+//# sourceMappingURL=timestamp.js.map
/***/ }),
-/* 355 */
-/***/ (function(module, exports, __webpack_require__) {
+/* 359 */
+/***/ (function(module, __webpack_exports__, __webpack_require__) {
"use strict";
+__webpack_require__.r(__webpack_exports__);
+/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "toArray", function() { return toArray; });
+/* harmony import */ var _reduce__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(314);
+/** PURE_IMPORTS_START _reduce PURE_IMPORTS_END */
-
-const path = __webpack_require__(16);
-const which = __webpack_require__(356);
-const pathKey = __webpack_require__(360)();
-
-function resolveCommandAttempt(parsed, withoutPathExt) {
- const cwd = process.cwd();
- const hasCustomCwd = parsed.options.cwd != null;
- // Worker threads do not have process.chdir()
- const shouldSwitchCwd = hasCustomCwd && process.chdir !== undefined;
-
- // If a custom `cwd` was specified, we need to change the process cwd
- // because `which` will do stat calls but does not support a custom cwd
- if (shouldSwitchCwd) {
- try {
- process.chdir(parsed.options.cwd);
- } catch (err) {
- /* Empty */
- }
- }
-
- let resolved;
-
- try {
- resolved = which.sync(parsed.command, {
- path: (parsed.options.env || process.env)[pathKey],
- pathExt: withoutPathExt ? path.delimiter : undefined,
- });
- } catch (e) {
- /* Empty */
- } finally {
- if (shouldSwitchCwd) {
- process.chdir(cwd);
- }
- }
-
- // If we successfully resolved, ensure that an absolute path is returned
- // Note that when a custom `cwd` was used, we need to resolve to an absolute path based on it
- if (resolved) {
- resolved = path.resolve(hasCustomCwd ? parsed.options.cwd : '', resolved);
+function toArrayReducer(arr, item, index) {
+ if (index === 0) {
+ return [item];
}
-
- return resolved;
+ arr.push(item);
+ return arr;
}
-
-function resolveCommand(parsed) {
- return resolveCommandAttempt(parsed) || resolveCommandAttempt(parsed, true);
+function toArray() {
+ return Object(_reduce__WEBPACK_IMPORTED_MODULE_0__["reduce"])(toArrayReducer, []);
}
-
-module.exports = resolveCommand;
+//# sourceMappingURL=toArray.js.map
/***/ }),
-/* 356 */
-/***/ (function(module, exports, __webpack_require__) {
-
-const isWindows = process.platform === 'win32' ||
- process.env.OSTYPE === 'cygwin' ||
- process.env.OSTYPE === 'msys'
-
-const path = __webpack_require__(16)
-const COLON = isWindows ? ';' : ':'
-const isexe = __webpack_require__(357)
+/* 360 */
+/***/ (function(module, __webpack_exports__, __webpack_require__) {
-const getNotFoundError = (cmd) =>
- Object.assign(new Error(`not found: ${cmd}`), { code: 'ENOENT' })
+"use strict";
+__webpack_require__.r(__webpack_exports__);
+/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "window", function() { return window; });
+/* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(36);
+/* harmony import */ var _Subject__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(187);
+/* harmony import */ var _OuterSubscriber__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(229);
+/* harmony import */ var _util_subscribeToResult__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(230);
+/** PURE_IMPORTS_START tslib,_Subject,_OuterSubscriber,_util_subscribeToResult PURE_IMPORTS_END */
-const getPathInfo = (cmd, opt) => {
- const colon = opt.colon || COLON
- // If it has a slash, then we don't bother searching the pathenv.
- // just check the file itself, and that's it.
- const pathEnv = cmd.match(/\//) || isWindows && cmd.match(/\\/) ? ['']
- : (
- [
- // windows always checks the cwd first
- ...(isWindows ? [process.cwd()] : []),
- ...(opt.path || process.env.PATH ||
- /* istanbul ignore next: very unusual */ '').split(colon),
- ]
- )
- const pathExtExe = isWindows
- ? opt.pathExt || process.env.PATHEXT || '.EXE;.CMD;.BAT;.COM'
- : ''
- const pathExt = isWindows ? pathExtExe.split(colon) : ['']
- if (isWindows) {
- if (cmd.indexOf('.') !== -1 && pathExt[0] !== '')
- pathExt.unshift('')
- }
- return {
- pathEnv,
- pathExt,
- pathExtExe,
- }
+function window(windowBoundaries) {
+ return function windowOperatorFunction(source) {
+ return source.lift(new WindowOperator(windowBoundaries));
+ };
}
+var WindowOperator = /*@__PURE__*/ (function () {
+ function WindowOperator(windowBoundaries) {
+ this.windowBoundaries = windowBoundaries;
+ }
+ WindowOperator.prototype.call = function (subscriber, source) {
+ var windowSubscriber = new WindowSubscriber(subscriber);
+ var sourceSubscription = source.subscribe(windowSubscriber);
+ if (!sourceSubscription.closed) {
+ windowSubscriber.add(Object(_util_subscribeToResult__WEBPACK_IMPORTED_MODULE_3__["subscribeToResult"])(windowSubscriber, this.windowBoundaries));
+ }
+ return sourceSubscription;
+ };
+ return WindowOperator;
+}());
+var WindowSubscriber = /*@__PURE__*/ (function (_super) {
+ tslib__WEBPACK_IMPORTED_MODULE_0__["__extends"](WindowSubscriber, _super);
+ function WindowSubscriber(destination) {
+ var _this = _super.call(this, destination) || this;
+ _this.window = new _Subject__WEBPACK_IMPORTED_MODULE_1__["Subject"]();
+ destination.next(_this.window);
+ return _this;
+ }
+ WindowSubscriber.prototype.notifyNext = function (outerValue, innerValue, outerIndex, innerIndex, innerSub) {
+ this.openWindow();
+ };
+ WindowSubscriber.prototype.notifyError = function (error, innerSub) {
+ this._error(error);
+ };
+ WindowSubscriber.prototype.notifyComplete = function (innerSub) {
+ this._complete();
+ };
+ WindowSubscriber.prototype._next = function (value) {
+ this.window.next(value);
+ };
+ WindowSubscriber.prototype._error = function (err) {
+ this.window.error(err);
+ this.destination.error(err);
+ };
+ WindowSubscriber.prototype._complete = function () {
+ this.window.complete();
+ this.destination.complete();
+ };
+ WindowSubscriber.prototype._unsubscribe = function () {
+ this.window = null;
+ };
+ WindowSubscriber.prototype.openWindow = function () {
+ var prevWindow = this.window;
+ if (prevWindow) {
+ prevWindow.complete();
+ }
+ var destination = this.destination;
+ var newWindow = this.window = new _Subject__WEBPACK_IMPORTED_MODULE_1__["Subject"]();
+ destination.next(newWindow);
+ };
+ return WindowSubscriber;
+}(_OuterSubscriber__WEBPACK_IMPORTED_MODULE_2__["OuterSubscriber"]));
+//# sourceMappingURL=window.js.map
-const which = (cmd, opt, cb) => {
- if (typeof opt === 'function') {
- cb = opt
- opt = {}
- }
- if (!opt)
- opt = {}
-
- const { pathEnv, pathExt, pathExtExe } = getPathInfo(cmd, opt)
- const found = []
-
- const step = i => new Promise((resolve, reject) => {
- if (i === pathEnv.length)
- return opt.all && found.length ? resolve(found)
- : reject(getNotFoundError(cmd))
- const ppRaw = pathEnv[i]
- const pathPart = /^".*"$/.test(ppRaw) ? ppRaw.slice(1, -1) : ppRaw
+/***/ }),
+/* 361 */
+/***/ (function(module, __webpack_exports__, __webpack_require__) {
- const pCmd = path.join(pathPart, cmd)
- const p = !pathPart && /^\.[\\\/]/.test(cmd) ? cmd.slice(0, 2) + pCmd
- : pCmd
+"use strict";
+__webpack_require__.r(__webpack_exports__);
+/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "windowCount", function() { return windowCount; });
+/* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(36);
+/* harmony import */ var _Subscriber__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(172);
+/* harmony import */ var _Subject__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(187);
+/** PURE_IMPORTS_START tslib,_Subscriber,_Subject PURE_IMPORTS_END */
- resolve(subStep(p, i, 0))
- })
- const subStep = (p, i, ii) => new Promise((resolve, reject) => {
- if (ii === pathExt.length)
- return resolve(step(i + 1))
- const ext = pathExt[ii]
- isexe(p + ext, { pathExt: pathExtExe }, (er, is) => {
- if (!er && is) {
- if (opt.all)
- found.push(p + ext)
- else
- return resolve(p + ext)
- }
- return resolve(subStep(p, i, ii + 1))
- })
- })
- return cb ? step(0).then(res => cb(null, res), cb) : step(0)
+function windowCount(windowSize, startWindowEvery) {
+ if (startWindowEvery === void 0) {
+ startWindowEvery = 0;
+ }
+ return function windowCountOperatorFunction(source) {
+ return source.lift(new WindowCountOperator(windowSize, startWindowEvery));
+ };
}
-
-const whichSync = (cmd, opt) => {
- opt = opt || {}
-
- const { pathEnv, pathExt, pathExtExe } = getPathInfo(cmd, opt)
- const found = []
-
- for (let i = 0; i < pathEnv.length; i ++) {
- const ppRaw = pathEnv[i]
- const pathPart = /^".*"$/.test(ppRaw) ? ppRaw.slice(1, -1) : ppRaw
-
- const pCmd = path.join(pathPart, cmd)
- const p = !pathPart && /^\.[\\\/]/.test(cmd) ? cmd.slice(0, 2) + pCmd
- : pCmd
-
- for (let j = 0; j < pathExt.length; j ++) {
- const cur = p + pathExt[j]
- try {
- const is = isexe.sync(cur, { pathExt: pathExtExe })
- if (is) {
- if (opt.all)
- found.push(cur)
- else
- return cur
- }
- } catch (ex) {}
+var WindowCountOperator = /*@__PURE__*/ (function () {
+ function WindowCountOperator(windowSize, startWindowEvery) {
+ this.windowSize = windowSize;
+ this.startWindowEvery = startWindowEvery;
}
- }
-
- if (opt.all && found.length)
- return found
+ WindowCountOperator.prototype.call = function (subscriber, source) {
+ return source.subscribe(new WindowCountSubscriber(subscriber, this.windowSize, this.startWindowEvery));
+ };
+ return WindowCountOperator;
+}());
+var WindowCountSubscriber = /*@__PURE__*/ (function (_super) {
+ tslib__WEBPACK_IMPORTED_MODULE_0__["__extends"](WindowCountSubscriber, _super);
+ function WindowCountSubscriber(destination, windowSize, startWindowEvery) {
+ var _this = _super.call(this, destination) || this;
+ _this.destination = destination;
+ _this.windowSize = windowSize;
+ _this.startWindowEvery = startWindowEvery;
+ _this.windows = [new _Subject__WEBPACK_IMPORTED_MODULE_2__["Subject"]()];
+ _this.count = 0;
+ destination.next(_this.windows[0]);
+ return _this;
+ }
+ WindowCountSubscriber.prototype._next = function (value) {
+ var startWindowEvery = (this.startWindowEvery > 0) ? this.startWindowEvery : this.windowSize;
+ var destination = this.destination;
+ var windowSize = this.windowSize;
+ var windows = this.windows;
+ var len = windows.length;
+ for (var i = 0; i < len && !this.closed; i++) {
+ windows[i].next(value);
+ }
+ var c = this.count - windowSize + 1;
+ if (c >= 0 && c % startWindowEvery === 0 && !this.closed) {
+ windows.shift().complete();
+ }
+ if (++this.count % startWindowEvery === 0 && !this.closed) {
+ var window_1 = new _Subject__WEBPACK_IMPORTED_MODULE_2__["Subject"]();
+ windows.push(window_1);
+ destination.next(window_1);
+ }
+ };
+ WindowCountSubscriber.prototype._error = function (err) {
+ var windows = this.windows;
+ if (windows) {
+ while (windows.length > 0 && !this.closed) {
+ windows.shift().error(err);
+ }
+ }
+ this.destination.error(err);
+ };
+ WindowCountSubscriber.prototype._complete = function () {
+ var windows = this.windows;
+ if (windows) {
+ while (windows.length > 0 && !this.closed) {
+ windows.shift().complete();
+ }
+ }
+ this.destination.complete();
+ };
+ WindowCountSubscriber.prototype._unsubscribe = function () {
+ this.count = 0;
+ this.windows = null;
+ };
+ return WindowCountSubscriber;
+}(_Subscriber__WEBPACK_IMPORTED_MODULE_1__["Subscriber"]));
+//# sourceMappingURL=windowCount.js.map
- if (opt.nothrow)
- return null
- throw getNotFoundError(cmd)
-}
+/***/ }),
+/* 362 */
+/***/ (function(module, __webpack_exports__, __webpack_require__) {
-module.exports = which
-which.sync = whichSync
+"use strict";
+__webpack_require__.r(__webpack_exports__);
+/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "windowTime", function() { return windowTime; });
+/* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(36);
+/* harmony import */ var _Subject__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(187);
+/* harmony import */ var _scheduler_async__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(215);
+/* harmony import */ var _Subscriber__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(172);
+/* harmony import */ var _util_isNumeric__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(257);
+/* harmony import */ var _util_isScheduler__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(205);
+/** PURE_IMPORTS_START tslib,_Subject,_scheduler_async,_Subscriber,_util_isNumeric,_util_isScheduler PURE_IMPORTS_END */
-/***/ }),
-/* 357 */
-/***/ (function(module, exports, __webpack_require__) {
-var fs = __webpack_require__(23)
-var core
-if (process.platform === 'win32' || global.TESTING_WINDOWS) {
- core = __webpack_require__(358)
-} else {
- core = __webpack_require__(359)
-}
-module.exports = isexe
-isexe.sync = sync
-function isexe (path, options, cb) {
- if (typeof options === 'function') {
- cb = options
- options = {}
- }
- if (!cb) {
- if (typeof Promise !== 'function') {
- throw new TypeError('callback not provided')
+function windowTime(windowTimeSpan) {
+ var scheduler = _scheduler_async__WEBPACK_IMPORTED_MODULE_2__["async"];
+ var windowCreationInterval = null;
+ var maxWindowSize = Number.POSITIVE_INFINITY;
+ if (Object(_util_isScheduler__WEBPACK_IMPORTED_MODULE_5__["isScheduler"])(arguments[3])) {
+ scheduler = arguments[3];
}
-
- return new Promise(function (resolve, reject) {
- isexe(path, options || {}, function (er, is) {
- if (er) {
- reject(er)
- } else {
- resolve(is)
- }
- })
- })
- }
-
- core(path, options || {}, function (er, is) {
- // ignore EACCES because that just means we aren't allowed to run it
- if (er) {
- if (er.code === 'EACCES' || options && options.ignoreErrors) {
- er = null
- is = false
- }
+ if (Object(_util_isScheduler__WEBPACK_IMPORTED_MODULE_5__["isScheduler"])(arguments[2])) {
+ scheduler = arguments[2];
}
- cb(er, is)
- })
-}
-
-function sync (path, options) {
- // my kingdom for a filtered catch
- try {
- return core.sync(path, options || {})
- } catch (er) {
- if (options && options.ignoreErrors || er.code === 'EACCES') {
- return false
- } else {
- throw er
+ else if (Object(_util_isNumeric__WEBPACK_IMPORTED_MODULE_4__["isNumeric"])(arguments[2])) {
+ maxWindowSize = arguments[2];
}
- }
-}
-
-
-/***/ }),
-/* 358 */
-/***/ (function(module, exports, __webpack_require__) {
-
-module.exports = isexe
-isexe.sync = sync
-
-var fs = __webpack_require__(23)
-
-function checkPathExt (path, options) {
- var pathext = options.pathExt !== undefined ?
- options.pathExt : process.env.PATHEXT
-
- if (!pathext) {
- return true
- }
-
- pathext = pathext.split(';')
- if (pathext.indexOf('') !== -1) {
- return true
- }
- for (var i = 0; i < pathext.length; i++) {
- var p = pathext[i].toLowerCase()
- if (p && path.substr(-p.length).toLowerCase() === p) {
- return true
+ if (Object(_util_isScheduler__WEBPACK_IMPORTED_MODULE_5__["isScheduler"])(arguments[1])) {
+ scheduler = arguments[1];
}
- }
- return false
-}
-
-function checkStat (stat, path, options) {
- if (!stat.isSymbolicLink() && !stat.isFile()) {
- return false
- }
- return checkPathExt(path, options)
-}
-
-function isexe (path, options, cb) {
- fs.stat(path, function (er, stat) {
- cb(er, er ? false : checkStat(stat, path, options))
- })
-}
-
-function sync (path, options) {
- return checkStat(fs.statSync(path), path, options)
-}
-
-
-/***/ }),
-/* 359 */
-/***/ (function(module, exports, __webpack_require__) {
-
-module.exports = isexe
-isexe.sync = sync
-
-var fs = __webpack_require__(23)
-
-function isexe (path, options, cb) {
- fs.stat(path, function (er, stat) {
- cb(er, er ? false : checkStat(stat, options))
- })
+ else if (Object(_util_isNumeric__WEBPACK_IMPORTED_MODULE_4__["isNumeric"])(arguments[1])) {
+ windowCreationInterval = arguments[1];
+ }
+ return function windowTimeOperatorFunction(source) {
+ return source.lift(new WindowTimeOperator(windowTimeSpan, windowCreationInterval, maxWindowSize, scheduler));
+ };
}
-
-function sync (path, options) {
- return checkStat(fs.statSync(path), options)
+var WindowTimeOperator = /*@__PURE__*/ (function () {
+ function WindowTimeOperator(windowTimeSpan, windowCreationInterval, maxWindowSize, scheduler) {
+ this.windowTimeSpan = windowTimeSpan;
+ this.windowCreationInterval = windowCreationInterval;
+ this.maxWindowSize = maxWindowSize;
+ this.scheduler = scheduler;
+ }
+ WindowTimeOperator.prototype.call = function (subscriber, source) {
+ return source.subscribe(new WindowTimeSubscriber(subscriber, this.windowTimeSpan, this.windowCreationInterval, this.maxWindowSize, this.scheduler));
+ };
+ return WindowTimeOperator;
+}());
+var CountedSubject = /*@__PURE__*/ (function (_super) {
+ tslib__WEBPACK_IMPORTED_MODULE_0__["__extends"](CountedSubject, _super);
+ function CountedSubject() {
+ var _this = _super !== null && _super.apply(this, arguments) || this;
+ _this._numberOfNextedValues = 0;
+ return _this;
+ }
+ CountedSubject.prototype.next = function (value) {
+ this._numberOfNextedValues++;
+ _super.prototype.next.call(this, value);
+ };
+ Object.defineProperty(CountedSubject.prototype, "numberOfNextedValues", {
+ get: function () {
+ return this._numberOfNextedValues;
+ },
+ enumerable: true,
+ configurable: true
+ });
+ return CountedSubject;
+}(_Subject__WEBPACK_IMPORTED_MODULE_1__["Subject"]));
+var WindowTimeSubscriber = /*@__PURE__*/ (function (_super) {
+ tslib__WEBPACK_IMPORTED_MODULE_0__["__extends"](WindowTimeSubscriber, _super);
+ function WindowTimeSubscriber(destination, windowTimeSpan, windowCreationInterval, maxWindowSize, scheduler) {
+ var _this = _super.call(this, destination) || this;
+ _this.destination = destination;
+ _this.windowTimeSpan = windowTimeSpan;
+ _this.windowCreationInterval = windowCreationInterval;
+ _this.maxWindowSize = maxWindowSize;
+ _this.scheduler = scheduler;
+ _this.windows = [];
+ var window = _this.openWindow();
+ if (windowCreationInterval !== null && windowCreationInterval >= 0) {
+ var closeState = { subscriber: _this, window: window, context: null };
+ var creationState = { windowTimeSpan: windowTimeSpan, windowCreationInterval: windowCreationInterval, subscriber: _this, scheduler: scheduler };
+ _this.add(scheduler.schedule(dispatchWindowClose, windowTimeSpan, closeState));
+ _this.add(scheduler.schedule(dispatchWindowCreation, windowCreationInterval, creationState));
+ }
+ else {
+ var timeSpanOnlyState = { subscriber: _this, window: window, windowTimeSpan: windowTimeSpan };
+ _this.add(scheduler.schedule(dispatchWindowTimeSpanOnly, windowTimeSpan, timeSpanOnlyState));
+ }
+ return _this;
+ }
+ WindowTimeSubscriber.prototype._next = function (value) {
+ var windows = this.windows;
+ var len = windows.length;
+ for (var i = 0; i < len; i++) {
+ var window_1 = windows[i];
+ if (!window_1.closed) {
+ window_1.next(value);
+ if (window_1.numberOfNextedValues >= this.maxWindowSize) {
+ this.closeWindow(window_1);
+ }
+ }
+ }
+ };
+ WindowTimeSubscriber.prototype._error = function (err) {
+ var windows = this.windows;
+ while (windows.length > 0) {
+ windows.shift().error(err);
+ }
+ this.destination.error(err);
+ };
+ WindowTimeSubscriber.prototype._complete = function () {
+ var windows = this.windows;
+ while (windows.length > 0) {
+ var window_2 = windows.shift();
+ if (!window_2.closed) {
+ window_2.complete();
+ }
+ }
+ this.destination.complete();
+ };
+ WindowTimeSubscriber.prototype.openWindow = function () {
+ var window = new CountedSubject();
+ this.windows.push(window);
+ var destination = this.destination;
+ destination.next(window);
+ return window;
+ };
+ WindowTimeSubscriber.prototype.closeWindow = function (window) {
+ window.complete();
+ var windows = this.windows;
+ windows.splice(windows.indexOf(window), 1);
+ };
+ return WindowTimeSubscriber;
+}(_Subscriber__WEBPACK_IMPORTED_MODULE_3__["Subscriber"]));
+function dispatchWindowTimeSpanOnly(state) {
+ var subscriber = state.subscriber, windowTimeSpan = state.windowTimeSpan, window = state.window;
+ if (window) {
+ subscriber.closeWindow(window);
+ }
+ state.window = subscriber.openWindow();
+ this.schedule(state, windowTimeSpan);
}
-
-function checkStat (stat, options) {
- return stat.isFile() && checkMode(stat, options)
+function dispatchWindowCreation(state) {
+ var windowTimeSpan = state.windowTimeSpan, subscriber = state.subscriber, scheduler = state.scheduler, windowCreationInterval = state.windowCreationInterval;
+ var window = subscriber.openWindow();
+ var action = this;
+ var context = { action: action, subscription: null };
+ var timeSpanState = { subscriber: subscriber, window: window, context: context };
+ context.subscription = scheduler.schedule(dispatchWindowClose, windowTimeSpan, timeSpanState);
+ action.add(context.subscription);
+ action.schedule(state, windowCreationInterval);
}
-
-function checkMode (stat, options) {
- var mod = stat.mode
- var uid = stat.uid
- var gid = stat.gid
-
- var myUid = options.uid !== undefined ?
- options.uid : process.getuid && process.getuid()
- var myGid = options.gid !== undefined ?
- options.gid : process.getgid && process.getgid()
-
- var u = parseInt('100', 8)
- var g = parseInt('010', 8)
- var o = parseInt('001', 8)
- var ug = u | g
-
- var ret = (mod & o) ||
- (mod & g) && gid === myGid ||
- (mod & u) && uid === myUid ||
- (mod & ug) && myUid === 0
-
- return ret
+function dispatchWindowClose(state) {
+ var subscriber = state.subscriber, window = state.window, context = state.context;
+ if (context && context.action && context.subscription) {
+ context.action.remove(context.subscription);
+ }
+ subscriber.closeWindow(window);
}
+//# sourceMappingURL=windowTime.js.map
/***/ }),
-/* 360 */
-/***/ (function(module, exports, __webpack_require__) {
+/* 363 */
+/***/ (function(module, __webpack_exports__, __webpack_require__) {
"use strict";
+__webpack_require__.r(__webpack_exports__);
+/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "windowToggle", function() { return windowToggle; });
+/* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(36);
+/* harmony import */ var _Subject__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(187);
+/* harmony import */ var _Subscription__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(177);
+/* harmony import */ var _OuterSubscriber__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(229);
+/* harmony import */ var _util_subscribeToResult__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(230);
+/** PURE_IMPORTS_START tslib,_Subject,_Subscription,_OuterSubscriber,_util_subscribeToResult PURE_IMPORTS_END */
-const pathKey = (options = {}) => {
- const environment = options.env || process.env;
- const platform = options.platform || process.platform;
- if (platform !== 'win32') {
- return 'PATH';
- }
- return Object.keys(environment).find(key => key.toUpperCase() === 'PATH') || 'Path';
-};
-module.exports = pathKey;
-// TODO: Remove this for the next major release
-module.exports.default = pathKey;
+function windowToggle(openings, closingSelector) {
+ return function (source) { return source.lift(new WindowToggleOperator(openings, closingSelector)); };
+}
+var WindowToggleOperator = /*@__PURE__*/ (function () {
+ function WindowToggleOperator(openings, closingSelector) {
+ this.openings = openings;
+ this.closingSelector = closingSelector;
+ }
+ WindowToggleOperator.prototype.call = function (subscriber, source) {
+ return source.subscribe(new WindowToggleSubscriber(subscriber, this.openings, this.closingSelector));
+ };
+ return WindowToggleOperator;
+}());
+var WindowToggleSubscriber = /*@__PURE__*/ (function (_super) {
+ tslib__WEBPACK_IMPORTED_MODULE_0__["__extends"](WindowToggleSubscriber, _super);
+ function WindowToggleSubscriber(destination, openings, closingSelector) {
+ var _this = _super.call(this, destination) || this;
+ _this.openings = openings;
+ _this.closingSelector = closingSelector;
+ _this.contexts = [];
+ _this.add(_this.openSubscription = Object(_util_subscribeToResult__WEBPACK_IMPORTED_MODULE_4__["subscribeToResult"])(_this, openings, openings));
+ return _this;
+ }
+ WindowToggleSubscriber.prototype._next = function (value) {
+ var contexts = this.contexts;
+ if (contexts) {
+ var len = contexts.length;
+ for (var i = 0; i < len; i++) {
+ contexts[i].window.next(value);
+ }
+ }
+ };
+ WindowToggleSubscriber.prototype._error = function (err) {
+ var contexts = this.contexts;
+ this.contexts = null;
+ if (contexts) {
+ var len = contexts.length;
+ var index = -1;
+ while (++index < len) {
+ var context_1 = contexts[index];
+ context_1.window.error(err);
+ context_1.subscription.unsubscribe();
+ }
+ }
+ _super.prototype._error.call(this, err);
+ };
+ WindowToggleSubscriber.prototype._complete = function () {
+ var contexts = this.contexts;
+ this.contexts = null;
+ if (contexts) {
+ var len = contexts.length;
+ var index = -1;
+ while (++index < len) {
+ var context_2 = contexts[index];
+ context_2.window.complete();
+ context_2.subscription.unsubscribe();
+ }
+ }
+ _super.prototype._complete.call(this);
+ };
+ WindowToggleSubscriber.prototype._unsubscribe = function () {
+ var contexts = this.contexts;
+ this.contexts = null;
+ if (contexts) {
+ var len = contexts.length;
+ var index = -1;
+ while (++index < len) {
+ var context_3 = contexts[index];
+ context_3.window.unsubscribe();
+ context_3.subscription.unsubscribe();
+ }
+ }
+ };
+ WindowToggleSubscriber.prototype.notifyNext = function (outerValue, innerValue, outerIndex, innerIndex, innerSub) {
+ if (outerValue === this.openings) {
+ var closingNotifier = void 0;
+ try {
+ var closingSelector = this.closingSelector;
+ closingNotifier = closingSelector(innerValue);
+ }
+ catch (e) {
+ return this.error(e);
+ }
+ var window_1 = new _Subject__WEBPACK_IMPORTED_MODULE_1__["Subject"]();
+ var subscription = new _Subscription__WEBPACK_IMPORTED_MODULE_2__["Subscription"]();
+ var context_4 = { window: window_1, subscription: subscription };
+ this.contexts.push(context_4);
+ var innerSubscription = Object(_util_subscribeToResult__WEBPACK_IMPORTED_MODULE_4__["subscribeToResult"])(this, closingNotifier, context_4);
+ if (innerSubscription.closed) {
+ this.closeWindow(this.contexts.length - 1);
+ }
+ else {
+ innerSubscription.context = context_4;
+ subscription.add(innerSubscription);
+ }
+ this.destination.next(window_1);
+ }
+ else {
+ this.closeWindow(this.contexts.indexOf(outerValue));
+ }
+ };
+ WindowToggleSubscriber.prototype.notifyError = function (err) {
+ this.error(err);
+ };
+ WindowToggleSubscriber.prototype.notifyComplete = function (inner) {
+ if (inner !== this.openSubscription) {
+ this.closeWindow(this.contexts.indexOf(inner.context));
+ }
+ };
+ WindowToggleSubscriber.prototype.closeWindow = function (index) {
+ if (index === -1) {
+ return;
+ }
+ var contexts = this.contexts;
+ var context = contexts[index];
+ var window = context.window, subscription = context.subscription;
+ contexts.splice(index, 1);
+ window.complete();
+ subscription.unsubscribe();
+ };
+ return WindowToggleSubscriber;
+}(_OuterSubscriber__WEBPACK_IMPORTED_MODULE_3__["OuterSubscriber"]));
+//# sourceMappingURL=windowToggle.js.map
/***/ }),
-/* 361 */
-/***/ (function(module, exports, __webpack_require__) {
+/* 364 */
+/***/ (function(module, __webpack_exports__, __webpack_require__) {
"use strict";
+__webpack_require__.r(__webpack_exports__);
+/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "windowWhen", function() { return windowWhen; });
+/* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(36);
+/* harmony import */ var _Subject__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(187);
+/* harmony import */ var _OuterSubscriber__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(229);
+/* harmony import */ var _util_subscribeToResult__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(230);
+/** PURE_IMPORTS_START tslib,_Subject,_OuterSubscriber,_util_subscribeToResult PURE_IMPORTS_END */
-// See http://www.robvanderwoude.com/escapechars.php
-const metaCharsRegExp = /([()\][%!^"`<>&|;, *?])/g;
-function escapeCommand(arg) {
- // Escape meta chars
- arg = arg.replace(metaCharsRegExp, '^$1');
- return arg;
+function windowWhen(closingSelector) {
+ return function windowWhenOperatorFunction(source) {
+ return source.lift(new WindowOperator(closingSelector));
+ };
}
-
-function escapeArgument(arg, doubleEscapeMetaChars) {
- // Convert to string
- arg = `${arg}`;
-
- // Algorithm below is based on https://qntm.org/cmd
-
- // Sequence of backslashes followed by a double quote:
- // double up all the backslashes and escape the double quote
- arg = arg.replace(/(\\*)"/g, '$1$1\\"');
-
- // Sequence of backslashes followed by the end of the string
- // (which will become a double quote later):
- // double up all the backslashes
- arg = arg.replace(/(\\*)$/, '$1$1');
-
- // All other backslashes occur literally
-
- // Quote the whole thing:
- arg = `"${arg}"`;
-
- // Escape meta chars
- arg = arg.replace(metaCharsRegExp, '^$1');
-
- // Double escape meta chars if necessary
- if (doubleEscapeMetaChars) {
- arg = arg.replace(metaCharsRegExp, '^$1');
+var WindowOperator = /*@__PURE__*/ (function () {
+ function WindowOperator(closingSelector) {
+ this.closingSelector = closingSelector;
}
-
- return arg;
-}
-
-module.exports.command = escapeCommand;
-module.exports.argument = escapeArgument;
+ WindowOperator.prototype.call = function (subscriber, source) {
+ return source.subscribe(new WindowSubscriber(subscriber, this.closingSelector));
+ };
+ return WindowOperator;
+}());
+var WindowSubscriber = /*@__PURE__*/ (function (_super) {
+ tslib__WEBPACK_IMPORTED_MODULE_0__["__extends"](WindowSubscriber, _super);
+ function WindowSubscriber(destination, closingSelector) {
+ var _this = _super.call(this, destination) || this;
+ _this.destination = destination;
+ _this.closingSelector = closingSelector;
+ _this.openWindow();
+ return _this;
+ }
+ WindowSubscriber.prototype.notifyNext = function (outerValue, innerValue, outerIndex, innerIndex, innerSub) {
+ this.openWindow(innerSub);
+ };
+ WindowSubscriber.prototype.notifyError = function (error, innerSub) {
+ this._error(error);
+ };
+ WindowSubscriber.prototype.notifyComplete = function (innerSub) {
+ this.openWindow(innerSub);
+ };
+ WindowSubscriber.prototype._next = function (value) {
+ this.window.next(value);
+ };
+ WindowSubscriber.prototype._error = function (err) {
+ this.window.error(err);
+ this.destination.error(err);
+ this.unsubscribeClosingNotification();
+ };
+ WindowSubscriber.prototype._complete = function () {
+ this.window.complete();
+ this.destination.complete();
+ this.unsubscribeClosingNotification();
+ };
+ WindowSubscriber.prototype.unsubscribeClosingNotification = function () {
+ if (this.closingNotification) {
+ this.closingNotification.unsubscribe();
+ }
+ };
+ WindowSubscriber.prototype.openWindow = function (innerSub) {
+ if (innerSub === void 0) {
+ innerSub = null;
+ }
+ if (innerSub) {
+ this.remove(innerSub);
+ innerSub.unsubscribe();
+ }
+ var prevWindow = this.window;
+ if (prevWindow) {
+ prevWindow.complete();
+ }
+ var window = this.window = new _Subject__WEBPACK_IMPORTED_MODULE_1__["Subject"]();
+ this.destination.next(window);
+ var closingNotifier;
+ try {
+ var closingSelector = this.closingSelector;
+ closingNotifier = closingSelector();
+ }
+ catch (e) {
+ this.destination.error(e);
+ this.window.error(e);
+ return;
+ }
+ this.add(this.closingNotification = Object(_util_subscribeToResult__WEBPACK_IMPORTED_MODULE_3__["subscribeToResult"])(this, closingNotifier));
+ };
+ return WindowSubscriber;
+}(_OuterSubscriber__WEBPACK_IMPORTED_MODULE_2__["OuterSubscriber"]));
+//# sourceMappingURL=windowWhen.js.map
/***/ }),
-/* 362 */
-/***/ (function(module, exports, __webpack_require__) {
+/* 365 */
+/***/ (function(module, __webpack_exports__, __webpack_require__) {
"use strict";
+__webpack_require__.r(__webpack_exports__);
+/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "withLatestFrom", function() { return withLatestFrom; });
+/* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(36);
+/* harmony import */ var _OuterSubscriber__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(229);
+/* harmony import */ var _util_subscribeToResult__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(230);
+/** PURE_IMPORTS_START tslib,_OuterSubscriber,_util_subscribeToResult PURE_IMPORTS_END */
-const fs = __webpack_require__(23);
-const shebangCommand = __webpack_require__(363);
-
-function readShebang(command) {
- // Read the first 150 bytes from the file
- const size = 150;
- const buffer = Buffer.alloc(size);
- let fd;
-
- try {
- fd = fs.openSync(command, 'r');
- fs.readSync(fd, buffer, 0, size, 0);
- fs.closeSync(fd);
- } catch (e) { /* Empty */ }
-
- // Attempt to extract shebang (null is returned if not a shebang)
- return shebangCommand(buffer.toString());
+function withLatestFrom() {
+ var args = [];
+ for (var _i = 0; _i < arguments.length; _i++) {
+ args[_i] = arguments[_i];
+ }
+ return function (source) {
+ var project;
+ if (typeof args[args.length - 1] === 'function') {
+ project = args.pop();
+ }
+ var observables = args;
+ return source.lift(new WithLatestFromOperator(observables, project));
+ };
}
-
-module.exports = readShebang;
+var WithLatestFromOperator = /*@__PURE__*/ (function () {
+ function WithLatestFromOperator(observables, project) {
+ this.observables = observables;
+ this.project = project;
+ }
+ WithLatestFromOperator.prototype.call = function (subscriber, source) {
+ return source.subscribe(new WithLatestFromSubscriber(subscriber, this.observables, this.project));
+ };
+ return WithLatestFromOperator;
+}());
+var WithLatestFromSubscriber = /*@__PURE__*/ (function (_super) {
+ tslib__WEBPACK_IMPORTED_MODULE_0__["__extends"](WithLatestFromSubscriber, _super);
+ function WithLatestFromSubscriber(destination, observables, project) {
+ var _this = _super.call(this, destination) || this;
+ _this.observables = observables;
+ _this.project = project;
+ _this.toRespond = [];
+ var len = observables.length;
+ _this.values = new Array(len);
+ for (var i = 0; i < len; i++) {
+ _this.toRespond.push(i);
+ }
+ for (var i = 0; i < len; i++) {
+ var observable = observables[i];
+ _this.add(Object(_util_subscribeToResult__WEBPACK_IMPORTED_MODULE_2__["subscribeToResult"])(_this, observable, observable, i));
+ }
+ return _this;
+ }
+ WithLatestFromSubscriber.prototype.notifyNext = function (outerValue, innerValue, outerIndex, innerIndex, innerSub) {
+ this.values[outerIndex] = innerValue;
+ var toRespond = this.toRespond;
+ if (toRespond.length > 0) {
+ var found = toRespond.indexOf(outerIndex);
+ if (found !== -1) {
+ toRespond.splice(found, 1);
+ }
+ }
+ };
+ WithLatestFromSubscriber.prototype.notifyComplete = function () {
+ };
+ WithLatestFromSubscriber.prototype._next = function (value) {
+ if (this.toRespond.length === 0) {
+ var args = [value].concat(this.values);
+ if (this.project) {
+ this._tryProject(args);
+ }
+ else {
+ this.destination.next(args);
+ }
+ }
+ };
+ WithLatestFromSubscriber.prototype._tryProject = function (args) {
+ var result;
+ try {
+ result = this.project.apply(this, args);
+ }
+ catch (err) {
+ this.destination.error(err);
+ return;
+ }
+ this.destination.next(result);
+ };
+ return WithLatestFromSubscriber;
+}(_OuterSubscriber__WEBPACK_IMPORTED_MODULE_1__["OuterSubscriber"]));
+//# sourceMappingURL=withLatestFrom.js.map
/***/ }),
-/* 363 */
-/***/ (function(module, exports, __webpack_require__) {
+/* 366 */
+/***/ (function(module, __webpack_exports__, __webpack_require__) {
"use strict";
+__webpack_require__.r(__webpack_exports__);
+/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "zip", function() { return zip; });
+/* harmony import */ var _observable_zip__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(269);
+/** PURE_IMPORTS_START _observable_zip PURE_IMPORTS_END */
-const shebangRegex = __webpack_require__(364);
-
-module.exports = (string = '') => {
- const match = string.match(shebangRegex);
-
- if (!match) {
- return null;
- }
-
- const [path, argument] = match[0].replace(/#! ?/, '').split(' ');
- const binary = path.split('/').pop();
-
- if (binary === 'env') {
- return argument;
- }
-
- return argument ? `${binary} ${argument}` : binary;
-};
+function zip() {
+ var observables = [];
+ for (var _i = 0; _i < arguments.length; _i++) {
+ observables[_i] = arguments[_i];
+ }
+ return function zipOperatorFunction(source) {
+ return source.lift.call(_observable_zip__WEBPACK_IMPORTED_MODULE_0__["zip"].apply(void 0, [source].concat(observables)));
+ };
+}
+//# sourceMappingURL=zip.js.map
/***/ }),
-/* 364 */
-/***/ (function(module, exports, __webpack_require__) {
+/* 367 */
+/***/ (function(module, __webpack_exports__, __webpack_require__) {
"use strict";
+__webpack_require__.r(__webpack_exports__);
+/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "zipAll", function() { return zipAll; });
+/* harmony import */ var _observable_zip__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(269);
+/** PURE_IMPORTS_START _observable_zip PURE_IMPORTS_END */
-module.exports = /^#!(.*)/;
+function zipAll(project) {
+ return function (source) { return source.lift(new _observable_zip__WEBPACK_IMPORTED_MODULE_0__["ZipOperator"](project)); };
+}
+//# sourceMappingURL=zipAll.js.map
/***/ }),
-/* 365 */
+/* 368 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
-const isWin = process.platform === 'win32';
-
-function notFoundError(original, syscall) {
- return Object.assign(new Error(`${syscall} ${original.command} ENOENT`), {
- code: 'ENOENT',
- errno: 'ENOENT',
- syscall: `${syscall} ${original.command}`,
- path: original.command,
- spawnargs: original.args,
- });
-}
-
-function hookChildProcess(cp, parsed) {
- if (!isWin) {
- return;
- }
+const callbacks = new Set();
+let called = false;
- const originalEmit = cp.emit;
+function exit(exit, signal) {
+ if (called) {
+ return;
+ }
- cp.emit = function (name, arg1) {
- // If emitting "exit" event and exit code is 1, we need to check if
- // the command exists and emit an "error" instead
- // See https://github.com/IndigoUnited/node-cross-spawn/issues/16
- if (name === 'exit') {
- const err = verifyENOENT(arg1, parsed, 'spawn');
+ called = true;
- if (err) {
- return originalEmit.call(cp, 'error', err);
- }
- }
+ for (const callback of callbacks) {
+ callback();
+ }
- return originalEmit.apply(cp, arguments); // eslint-disable-line prefer-rest-params
- };
+ if (exit === true) {
+ process.exit(128 + signal); // eslint-disable-line unicorn/no-process-exit
+ }
}
-function verifyENOENT(status, parsed) {
- if (isWin && status === 1 && !parsed.file) {
- return notFoundError(parsed.original, 'spawn');
- }
-
- return null;
-}
+module.exports = callback => {
+ callbacks.add(callback);
-function verifyENOENTSync(status, parsed) {
- if (isWin && status === 1 && !parsed.file) {
- return notFoundError(parsed.original, 'spawnSync');
- }
+ if (callbacks.size === 1) {
+ process.once('exit', exit);
+ process.once('SIGINT', exit.bind(null, true, 2));
+ process.once('SIGTERM', exit.bind(null, true, 15));
- return null;
-}
+ // PM2 Cluster shutdown message. Caught to support async handlers with pm2, needed because
+ // explicitly calling process.exit() doesn't trigger the beforeExit event, and the exit
+ // event cannot support async handlers, since the event loop is never called after it.
+ process.on('message', message => {
+ if (message === 'shutdown') {
+ exit(true, -128);
+ }
+ });
+ }
-module.exports = {
- hookChildProcess,
- verifyENOENT,
- verifyENOENTSync,
- notFoundError,
+ return () => {
+ callbacks.delete(callback);
+ };
};
/***/ }),
-/* 366 */
+/* 369 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
+/*
+ * Licensed to Elasticsearch B.V. under one or more contributor
+ * license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright
+ * ownership. Elasticsearch B.V. licenses this file to you under
+ * the Apache License, Version 2.0 (the "License"); you may
+ * not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+Object.defineProperty(exports, "__esModule", { value: true });
+const $isCliError = Symbol('isCliError');
+function createCliError(message) {
+ const error = new Error(message);
+ error[$isCliError] = true;
+ return error;
+}
+exports.createCliError = createCliError;
+function isCliError(error) {
+ return error && !!error[$isCliError];
+}
+exports.isCliError = isCliError;
-module.exports = input => {
- const LF = typeof input === 'string' ? '\n' : '\n'.charCodeAt();
- const CR = typeof input === 'string' ? '\r' : '\r'.charCodeAt();
- if (input[input.length - 1] === LF) {
- input = input.slice(0, input.length - 1);
- }
+/***/ }),
+/* 370 */
+/***/ (function(module, exports, __webpack_require__) {
- if (input[input.length - 1] === CR) {
- input = input.slice(0, input.length - 1);
- }
+"use strict";
- return input;
-};
+/*
+ * Licensed to Elasticsearch B.V. under one or more contributor
+ * license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright
+ * ownership. Elasticsearch B.V. licenses this file to you under
+ * the Apache License, Version 2.0 (the "License"); you may
+ * not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+Object.defineProperty(exports, "__esModule", { value: true });
+const tslib_1 = __webpack_require__(36);
+const execa_1 = tslib_1.__importDefault(__webpack_require__(371));
+const fs_1 = __webpack_require__(23);
+const Rx = tslib_1.__importStar(__webpack_require__(169));
+const operators_1 = __webpack_require__(270);
+const chalk_1 = tslib_1.__importDefault(__webpack_require__(2));
+const tree_kill_1 = tslib_1.__importDefault(__webpack_require__(411));
+const util_1 = __webpack_require__(29);
+const treeKillAsync = util_1.promisify((...args) => tree_kill_1.default(...args));
+const observe_lines_1 = __webpack_require__(412);
+const errors_1 = __webpack_require__(369);
+const SECOND = 1000;
+const STOP_TIMEOUT = 30 * SECOND;
+async function withTimeout(attempt, ms, onTimeout) {
+ const TIMEOUT = Symbol('timeout');
+ try {
+ await Promise.race([
+ attempt(),
+ new Promise((_, reject) => setTimeout(() => reject(TIMEOUT), ms)),
+ ]);
+ }
+ catch (error) {
+ if (error === TIMEOUT) {
+ await onTimeout();
+ }
+ else {
+ throw error;
+ }
+ }
+}
+function startProc(name, options, log) {
+ const { cmd, args, cwd, env, stdin } = options;
+ log.info('[%s] > %s', name, cmd, args.join(' '));
+ // spawn fails with ENOENT when either the
+ // cmd or cwd don't exist, so we check for the cwd
+ // ahead of time so that the error is less ambiguous
+ try {
+ if (!fs_1.statSync(cwd).isDirectory()) {
+ throw new Error(`cwd "${cwd}" exists but is not a directory`);
+ }
+ }
+ catch (err) {
+ if (err.code === 'ENOENT') {
+ throw new Error(`cwd "${cwd}" does not exist`);
+ }
+ }
+ const childProcess = execa_1.default(cmd, args, {
+ cwd,
+ env,
+ stdio: ['pipe', 'pipe', 'pipe'],
+ preferLocal: true,
+ });
+ if (stdin) {
+ childProcess.stdin.end(stdin, 'utf8');
+ }
+ else {
+ childProcess.stdin.end();
+ }
+ let stopCalled = false;
+ const outcome$ = Rx.race(
+ // observe first exit event
+ Rx.fromEvent(childProcess, 'exit').pipe(operators_1.take(1), operators_1.map(([code]) => {
+ if (stopCalled) {
+ return null;
+ }
+ // JVM exits with 143 on SIGTERM and 130 on SIGINT, dont' treat then as errors
+ if (code > 0 && !(code === 143 || code === 130)) {
+ throw errors_1.createCliError(`[${name}] exited with code ${code}`);
+ }
+ return code;
+ })),
+ // observe first error event
+ Rx.fromEvent(childProcess, 'error').pipe(operators_1.take(1), operators_1.mergeMap(err => Rx.throwError(err)))).pipe(operators_1.share());
+ const lines$ = Rx.merge(observe_lines_1.observeLines(childProcess.stdout), observe_lines_1.observeLines(childProcess.stderr)).pipe(operators_1.tap(line => log.write(` ${chalk_1.default.gray('proc')} [${chalk_1.default.gray(name)}] ${line}`)), operators_1.share());
+ const outcomePromise = Rx.merge(lines$.pipe(operators_1.ignoreElements()), outcome$).toPromise();
+ async function stop(signal) {
+ if (stopCalled) {
+ return;
+ }
+ stopCalled = true;
+ await withTimeout(async () => {
+ log.debug(`Sending "${signal}" to proc "${name}"`);
+ await treeKillAsync(childProcess.pid, signal);
+ await outcomePromise;
+ }, STOP_TIMEOUT, async () => {
+ log.warning(`Proc "${name}" was sent "${signal}" didn't emit the "exit" or "error" events after ${STOP_TIMEOUT} ms, sending SIGKILL`);
+ await treeKillAsync(childProcess.pid, 'SIGKILL');
+ });
+ await withTimeout(async () => {
+ try {
+ await outcomePromise;
+ }
+ catch (error) {
+ // ignore
+ }
+ }, STOP_TIMEOUT, async () => {
+ throw new Error(`Proc "${name}" was stopped but never emitted either the "exit" or "error" event after ${STOP_TIMEOUT} ms`);
+ });
+ }
+ return {
+ name,
+ lines$,
+ outcome$,
+ outcomePromise,
+ stop,
+ };
+}
+exports.startProc = startProc;
/***/ }),
-/* 367 */
+/* 371 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
const path = __webpack_require__(16);
-const pathKey = __webpack_require__(360);
+const childProcess = __webpack_require__(372);
+const crossSpawn = __webpack_require__(373);
+const stripFinalNewline = __webpack_require__(386);
+const npmRunPath = __webpack_require__(387);
+const onetime = __webpack_require__(388);
+const makeError = __webpack_require__(390);
+const normalizeStdio = __webpack_require__(395);
+const {spawnedKill, spawnedCancel, setupTimeout, setExitHandler} = __webpack_require__(396);
+const {handleInput, getSpawnedResult, makeAllStream, validateInputSync} = __webpack_require__(400);
+const {mergePromise, getSpawnedPromise} = __webpack_require__(409);
+const {joinCommand, parseCommand} = __webpack_require__(410);
-const npmRunPath = options => {
- options = {
- cwd: process.cwd(),
- path: process.env[pathKey()],
- execPath: process.execPath,
- ...options
- };
+const DEFAULT_MAX_BUFFER = 1000 * 1000 * 100;
- let previous;
- let cwdPath = path.resolve(options.cwd);
- const result = [];
+const getEnv = ({env: envOption, extendEnv, preferLocal, localDir, execPath}) => {
+ const env = extendEnv ? {...process.env, ...envOption} : envOption;
- while (previous !== cwdPath) {
- result.push(path.join(cwdPath, 'node_modules/.bin'));
- previous = cwdPath;
- cwdPath = path.resolve(cwdPath, '..');
+ if (preferLocal) {
+ return npmRunPath.env({env, cwd: localDir, execPath});
}
- // Ensure the running `node` binary is used
- const execPathDir = path.resolve(options.cwd, options.execPath, '..');
- result.unshift(execPathDir);
-
- return result.concat(options.path).join(path.delimiter);
+ return env;
};
-module.exports = npmRunPath;
-// TODO: Remove this for the next major release
-module.exports.default = npmRunPath;
+const handleArgs = (file, args, options = {}) => {
+ const parsed = crossSpawn._parse(file, args, options);
+ file = parsed.command;
+ args = parsed.args;
+ options = parsed.options;
-module.exports.env = options => {
options = {
- env: process.env,
+ maxBuffer: DEFAULT_MAX_BUFFER,
+ buffer: true,
+ stripFinalNewline: true,
+ extendEnv: true,
+ preferLocal: false,
+ localDir: options.cwd || process.cwd(),
+ execPath: process.execPath,
+ encoding: 'utf8',
+ reject: true,
+ cleanup: true,
+ all: false,
+ windowsHide: true,
...options
};
- const env = {...options.env};
- const path = pathKey({env});
+ options.env = getEnv(options);
- options.path = env[path];
- env[path] = module.exports(options);
+ options.stdio = normalizeStdio(options);
- return env;
-};
+ if (process.platform === 'win32' && path.basename(file, '.exe') === 'cmd') {
+ // #116
+ args.unshift('/q');
+ }
+ return {file, args, options, parsed};
+};
-/***/ }),
-/* 368 */
-/***/ (function(module, exports, __webpack_require__) {
+const handleOutput = (options, value, error) => {
+ if (typeof value !== 'string' && !Buffer.isBuffer(value)) {
+ // When `execa.sync()` errors, we normalize it to '' to mimic `execa()`
+ return error === undefined ? undefined : '';
+ }
-"use strict";
+ if (options.stripFinalNewline) {
+ return stripFinalNewline(value);
+ }
-const mimicFn = __webpack_require__(369);
+ return value;
+};
-const calledFunctions = new WeakMap();
+const execa = (file, args, options) => {
+ const parsed = handleArgs(file, args, options);
+ const command = joinCommand(file, args);
-const oneTime = (fn, options = {}) => {
- if (typeof fn !== 'function') {
- throw new TypeError('Expected a function');
+ let spawned;
+ try {
+ spawned = childProcess.spawn(parsed.file, parsed.args, parsed.options);
+ } catch (error) {
+ // Ensure the returned error is always both a promise and a child process
+ const dummySpawned = new childProcess.ChildProcess();
+ const errorPromise = Promise.reject(makeError({
+ error,
+ stdout: '',
+ stderr: '',
+ all: '',
+ command,
+ parsed,
+ timedOut: false,
+ isCanceled: false,
+ killed: false
+ }));
+ return mergePromise(dummySpawned, errorPromise);
}
- let ret;
- let isCalled = false;
- let callCount = 0;
- const functionName = fn.displayName || fn.name || '';
+ const spawnedPromise = getSpawnedPromise(spawned);
+ const timedPromise = setupTimeout(spawned, parsed.options, spawnedPromise);
+ const processDone = setExitHandler(spawned, parsed.options, timedPromise);
- const onetime = function (...args) {
- calledFunctions.set(onetime, ++callCount);
+ const context = {isCanceled: false};
- if (isCalled) {
- if (options.throw === true) {
- throw new Error(`Function \`${functionName}\` can only be called once`);
- }
+ spawned.kill = spawnedKill.bind(null, spawned.kill.bind(spawned));
+ spawned.cancel = spawnedCancel.bind(null, spawned, context);
- return ret;
- }
+ const handlePromise = async () => {
+ const [{error, exitCode, signal, timedOut}, stdoutResult, stderrResult, allResult] = await getSpawnedResult(spawned, parsed.options, processDone);
+ const stdout = handleOutput(parsed.options, stdoutResult);
+ const stderr = handleOutput(parsed.options, stderrResult);
+ const all = handleOutput(parsed.options, allResult);
- isCalled = true;
- ret = fn.apply(this, args);
- fn = null;
+ if (error || exitCode !== 0 || signal !== null) {
+ const returnedError = makeError({
+ error,
+ exitCode,
+ signal,
+ stdout,
+ stderr,
+ all,
+ command,
+ parsed,
+ timedOut,
+ isCanceled: context.isCanceled,
+ killed: spawned.killed
+ });
- return ret;
+ if (!parsed.options.reject) {
+ return returnedError;
+ }
+
+ throw returnedError;
+ }
+
+ return {
+ command,
+ exitCode: 0,
+ stdout,
+ stderr,
+ all,
+ failed: false,
+ timedOut: false,
+ isCanceled: false,
+ killed: false
+ };
};
- mimicFn(onetime, fn);
- calledFunctions.set(onetime, callCount);
+ const handlePromiseOnce = onetime(handlePromise);
- return onetime;
-};
+ crossSpawn._enoent.hookChildProcess(spawned, parsed.parsed);
-module.exports = oneTime;
-// TODO: Remove this for the next major release
-module.exports.default = oneTime;
+ handleInput(spawned, parsed.options.input);
-module.exports.callCount = fn => {
- if (!calledFunctions.has(fn)) {
- throw new Error(`The given function \`${fn.name}\` is not wrapped by the \`onetime\` package`);
- }
+ spawned.all = makeAllStream(spawned, parsed.options);
- return calledFunctions.get(fn);
+ return mergePromise(spawned, handlePromiseOnce);
};
+module.exports = execa;
-/***/ }),
-/* 369 */
-/***/ (function(module, exports, __webpack_require__) {
+module.exports.sync = (file, args, options) => {
+ const parsed = handleArgs(file, args, options);
+ const command = joinCommand(file, args);
-"use strict";
+ validateInputSync(parsed.options);
+
+ let result;
+ try {
+ result = childProcess.spawnSync(parsed.file, parsed.args, parsed.options);
+ } catch (error) {
+ throw makeError({
+ error,
+ stdout: '',
+ stderr: '',
+ all: '',
+ command,
+ parsed,
+ timedOut: false,
+ isCanceled: false,
+ killed: false
+ });
+ }
+ const stdout = handleOutput(parsed.options, result.stdout, result.error);
+ const stderr = handleOutput(parsed.options, result.stderr, result.error);
-const mimicFn = (to, from) => {
- for (const prop of Reflect.ownKeys(from)) {
- Object.defineProperty(to, prop, Object.getOwnPropertyDescriptor(from, prop));
+ if (result.error || result.status !== 0 || result.signal !== null) {
+ const error = makeError({
+ stdout,
+ stderr,
+ error: result.error,
+ signal: result.signal,
+ exitCode: result.status,
+ command,
+ parsed,
+ timedOut: result.error && result.error.code === 'ETIMEDOUT',
+ isCanceled: false,
+ killed: result.signal !== null
+ });
+
+ if (!parsed.options.reject) {
+ return error;
+ }
+
+ throw error;
}
- return to;
+ return {
+ command,
+ exitCode: 0,
+ stdout,
+ stderr,
+ failed: false,
+ timedOut: false,
+ isCanceled: false,
+ killed: false
+ };
};
-module.exports = mimicFn;
-// TODO: Remove this for the next major release
-module.exports.default = mimicFn;
+module.exports.command = (command, options) => {
+ const [file, ...args] = parseCommand(command);
+ return execa(file, args, options);
+};
+module.exports.commandSync = (command, options) => {
+ const [file, ...args] = parseCommand(command);
+ return execa.sync(file, args, options);
+};
-/***/ }),
-/* 370 */
-/***/ (function(module, exports, __webpack_require__) {
+module.exports.node = (scriptPath, args, options = {}) => {
+ if (args && !Array.isArray(args) && typeof args === 'object') {
+ options = args;
+ args = [];
+ }
-"use strict";
+ const stdio = normalizeStdio.node(options);
-const {signalsByName} = __webpack_require__(371);
+ const {nodePath = process.execPath, nodeOptions = process.execArgv} = options;
-const getErrorPrefix = ({timedOut, timeout, errorCode, signal, signalDescription, exitCode, isCanceled}) => {
- if (timedOut) {
- return `timed out after ${timeout} milliseconds`;
- }
+ return execa(
+ nodePath,
+ [
+ ...nodeOptions,
+ scriptPath,
+ ...(Array.isArray(args) ? args : [])
+ ],
+ {
+ ...options,
+ stdin: undefined,
+ stdout: undefined,
+ stderr: undefined,
+ stdio,
+ shell: false
+ }
+ );
+};
- if (isCanceled) {
- return 'was canceled';
- }
- if (errorCode !== undefined) {
- return `failed with ${errorCode}`;
- }
+/***/ }),
+/* 372 */
+/***/ (function(module, exports) {
- if (signal !== undefined) {
- return `was killed with ${signal} (${signalDescription})`;
- }
+module.exports = require("child_process");
- if (exitCode !== undefined) {
- return `failed with exit code ${exitCode}`;
- }
+/***/ }),
+/* 373 */
+/***/ (function(module, exports, __webpack_require__) {
- return 'failed';
-};
+"use strict";
-const makeError = ({
- stdout,
- stderr,
- all,
- error,
- signal,
- exitCode,
- command,
- timedOut,
- isCanceled,
- killed,
- parsed: {options: {timeout}}
-}) => {
- // `signal` and `exitCode` emitted on `spawned.on('exit')` event can be `null`.
- // We normalize them to `undefined`
- exitCode = exitCode === null ? undefined : exitCode;
- signal = signal === null ? undefined : signal;
- const signalDescription = signal === undefined ? undefined : signalsByName[signal].description;
- const errorCode = error && error.code;
+const cp = __webpack_require__(372);
+const parse = __webpack_require__(374);
+const enoent = __webpack_require__(385);
- const prefix = getErrorPrefix({timedOut, timeout, errorCode, signal, signalDescription, exitCode, isCanceled});
- const execaMessage = `Command ${prefix}: ${command}`;
- const shortMessage = error instanceof Error ? `${execaMessage}\n${error.message}` : execaMessage;
- const message = [shortMessage, stderr, stdout].filter(Boolean).join('\n');
+function spawn(command, args, options) {
+ // Parse the arguments
+ const parsed = parse(command, args, options);
- if (error instanceof Error) {
- error.originalMessage = error.message;
- error.message = message;
- } else {
- error = new Error(message);
- }
+ // Spawn the child process
+ const spawned = cp.spawn(parsed.command, parsed.args, parsed.options);
- error.shortMessage = shortMessage;
- error.command = command;
- error.exitCode = exitCode;
- error.signal = signal;
- error.signalDescription = signalDescription;
- error.stdout = stdout;
- error.stderr = stderr;
+ // Hook into child process "exit" event to emit an error if the command
+ // does not exists, see: https://github.com/IndigoUnited/node-cross-spawn/issues/16
+ enoent.hookChildProcess(spawned, parsed);
- if (all !== undefined) {
- error.all = all;
- }
+ return spawned;
+}
- if ('bufferedData' in error) {
- delete error.bufferedData;
- }
+function spawnSync(command, args, options) {
+ // Parse the arguments
+ const parsed = parse(command, args, options);
- error.failed = true;
- error.timedOut = Boolean(timedOut);
- error.isCanceled = isCanceled;
- error.killed = killed && !timedOut;
+ // Spawn the child process
+ const result = cp.spawnSync(parsed.command, parsed.args, parsed.options);
- return error;
-};
+ // Analyze if the command does not exist, see: https://github.com/IndigoUnited/node-cross-spawn/issues/16
+ result.error = result.error || enoent.verifyENOENTSync(result.status, parsed);
-module.exports = makeError;
+ return result;
+}
+
+module.exports = spawn;
+module.exports.spawn = spawn;
+module.exports.sync = spawnSync;
+
+module.exports._parse = parse;
+module.exports._enoent = enoent;
/***/ }),
-/* 371 */
+/* 374 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
-Object.defineProperty(exports,"__esModule",{value:true});exports.signalsByNumber=exports.signalsByName=void 0;var _os=__webpack_require__(11);
-var _signals=__webpack_require__(372);
-var _realtime=__webpack_require__(374);
+const path = __webpack_require__(16);
+const resolveCommand = __webpack_require__(375);
+const escape = __webpack_require__(381);
+const readShebang = __webpack_require__(382);
+const isWin = process.platform === 'win32';
+const isExecutableRegExp = /\.(?:com|exe)$/i;
+const isCmdShimRegExp = /node_modules[\\/].bin[\\/][^\\/]+\.cmd$/i;
-const getSignalsByName=function(){
-const signals=(0,_signals.getSignals)();
-return signals.reduce(getSignalByName,{});
-};
+function detectShebang(parsed) {
+ parsed.file = resolveCommand(parsed);
-const getSignalByName=function(
-signalByNameMemo,
-{name,number,description,supported,action,forced,standard})
-{
-return{
-...signalByNameMemo,
-[name]:{name,number,description,supported,action,forced,standard}};
+ const shebang = parsed.file && readShebang(parsed.file);
-};
+ if (shebang) {
+ parsed.args.unshift(parsed.file);
+ parsed.command = shebang;
-const signalsByName=getSignalsByName();exports.signalsByName=signalsByName;
+ return resolveCommand(parsed);
+ }
+ return parsed.file;
+}
+function parseNonShell(parsed) {
+ if (!isWin) {
+ return parsed;
+ }
+ // Detect & add support for shebangs
+ const commandFile = detectShebang(parsed);
-const getSignalsByNumber=function(){
-const signals=(0,_signals.getSignals)();
-const length=_realtime.SIGRTMAX+1;
-const signalsA=Array.from({length},(value,number)=>
-getSignalByNumber(number,signals));
+ // We don't need a shell if the command filename is an executable
+ const needsShell = !isExecutableRegExp.test(commandFile);
-return Object.assign({},...signalsA);
-};
+ // If a shell is required, use cmd.exe and take care of escaping everything correctly
+ // Note that `forceShell` is an hidden option used only in tests
+ if (parsed.options.forceShell || needsShell) {
+ // Need to double escape meta chars if the command is a cmd-shim located in `node_modules/.bin/`
+ // The cmd-shim simply calls execute the package bin file with NodeJS, proxying any argument
+ // Because the escape of metachars with ^ gets interpreted when the cmd.exe is first called,
+ // we need to double escape them
+ const needsDoubleEscapeMetaChars = isCmdShimRegExp.test(commandFile);
-const getSignalByNumber=function(number,signals){
-const signal=findSignalByNumber(number,signals);
+ // Normalize posix paths into OS compatible paths (e.g.: foo/bar -> foo\bar)
+ // This is necessary otherwise it will always fail with ENOENT in those cases
+ parsed.command = path.normalize(parsed.command);
-if(signal===undefined){
-return{};
-}
+ // Escape command & arguments
+ parsed.command = escape.command(parsed.command);
+ parsed.args = parsed.args.map((arg) => escape.argument(arg, needsDoubleEscapeMetaChars));
-const{name,description,supported,action,forced,standard}=signal;
-return{
-[number]:{
-name,
-number,
-description,
-supported,
-action,
-forced,
-standard}};
+ const shellCommand = [parsed.command].concat(parsed.args).join(' ');
+ parsed.args = ['/d', '/s', '/c', `"${shellCommand}"`];
+ parsed.command = process.env.comspec || 'cmd.exe';
+ parsed.options.windowsVerbatimArguments = true; // Tell node's spawn that the arguments are already escaped
+ }
-};
+ return parsed;
+}
+function parse(command, args, options) {
+ // Normalize arguments, similar to nodejs
+ if (args && !Array.isArray(args)) {
+ options = args;
+ args = null;
+ }
+ args = args ? args.slice(0) : []; // Clone array to avoid changing the original
+ options = Object.assign({}, options); // Clone object to avoid changing the original
-const findSignalByNumber=function(number,signals){
-const signal=signals.find(({name})=>_os.constants.signals[name]===number);
+ // Build our parsed object
+ const parsed = {
+ command,
+ args,
+ options,
+ file: undefined,
+ original: {
+ command,
+ args,
+ },
+ };
-if(signal!==undefined){
-return signal;
+ // Delegate further parsing to shell or non-shell
+ return options.shell ? parsed : parseNonShell(parsed);
}
-return signals.find(signalA=>signalA.number===number);
-};
+module.exports = parse;
-const signalsByNumber=getSignalsByNumber();exports.signalsByNumber=signalsByNumber;
-//# sourceMappingURL=main.js.map
/***/ }),
-/* 372 */
+/* 375 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
-Object.defineProperty(exports,"__esModule",{value:true});exports.getSignals=void 0;var _os=__webpack_require__(11);
-var _core=__webpack_require__(373);
-var _realtime=__webpack_require__(374);
+const path = __webpack_require__(16);
+const which = __webpack_require__(376);
+const pathKey = __webpack_require__(380)();
+function resolveCommandAttempt(parsed, withoutPathExt) {
+ const cwd = process.cwd();
+ const hasCustomCwd = parsed.options.cwd != null;
+ // Worker threads do not have process.chdir()
+ const shouldSwitchCwd = hasCustomCwd && process.chdir !== undefined;
-const getSignals=function(){
-const realtimeSignals=(0,_realtime.getRealtimeSignals)();
-const signals=[..._core.SIGNALS,...realtimeSignals].map(normalizeSignal);
-return signals;
-};exports.getSignals=getSignals;
+ // If a custom `cwd` was specified, we need to change the process cwd
+ // because `which` will do stat calls but does not support a custom cwd
+ if (shouldSwitchCwd) {
+ try {
+ process.chdir(parsed.options.cwd);
+ } catch (err) {
+ /* Empty */
+ }
+ }
+ let resolved;
+ try {
+ resolved = which.sync(parsed.command, {
+ path: (parsed.options.env || process.env)[pathKey],
+ pathExt: withoutPathExt ? path.delimiter : undefined,
+ });
+ } catch (e) {
+ /* Empty */
+ } finally {
+ if (shouldSwitchCwd) {
+ process.chdir(cwd);
+ }
+ }
+ // If we successfully resolved, ensure that an absolute path is returned
+ // Note that when a custom `cwd` was used, we need to resolve to an absolute path based on it
+ if (resolved) {
+ resolved = path.resolve(hasCustomCwd ? parsed.options.cwd : '', resolved);
+ }
+ return resolved;
+}
+function resolveCommand(parsed) {
+ return resolveCommandAttempt(parsed) || resolveCommandAttempt(parsed, true);
+}
+module.exports = resolveCommand;
-const normalizeSignal=function({
-name,
-number:defaultNumber,
-description,
-action,
-forced=false,
-standard})
-{
-const{
-signals:{[name]:constantSignal}}=
-_os.constants;
-const supported=constantSignal!==undefined;
-const number=supported?constantSignal:defaultNumber;
-return{name,number,description,supported,action,forced,standard};
-};
-//# sourceMappingURL=signals.js.map
/***/ }),
-/* 373 */
+/* 376 */
/***/ (function(module, exports, __webpack_require__) {
-"use strict";
-Object.defineProperty(exports,"__esModule",{value:true});exports.SIGNALS=void 0;
-
-const SIGNALS=[
-{
-name:"SIGHUP",
-number:1,
-action:"terminate",
-description:"Terminal closed",
-standard:"posix"},
+const isWindows = process.platform === 'win32' ||
+ process.env.OSTYPE === 'cygwin' ||
+ process.env.OSTYPE === 'msys'
-{
-name:"SIGINT",
-number:2,
-action:"terminate",
-description:"User interruption with CTRL-C",
-standard:"ansi"},
+const path = __webpack_require__(16)
+const COLON = isWindows ? ';' : ':'
+const isexe = __webpack_require__(377)
-{
-name:"SIGQUIT",
-number:3,
-action:"core",
-description:"User interruption with CTRL-\\",
-standard:"posix"},
+const getNotFoundError = (cmd) =>
+ Object.assign(new Error(`not found: ${cmd}`), { code: 'ENOENT' })
-{
-name:"SIGILL",
-number:4,
-action:"core",
-description:"Invalid machine instruction",
-standard:"ansi"},
+const getPathInfo = (cmd, opt) => {
+ const colon = opt.colon || COLON
-{
-name:"SIGTRAP",
-number:5,
-action:"core",
-description:"Debugger breakpoint",
-standard:"posix"},
+ // If it has a slash, then we don't bother searching the pathenv.
+ // just check the file itself, and that's it.
+ const pathEnv = cmd.match(/\//) || isWindows && cmd.match(/\\/) ? ['']
+ : (
+ [
+ // windows always checks the cwd first
+ ...(isWindows ? [process.cwd()] : []),
+ ...(opt.path || process.env.PATH ||
+ /* istanbul ignore next: very unusual */ '').split(colon),
+ ]
+ )
+ const pathExtExe = isWindows
+ ? opt.pathExt || process.env.PATHEXT || '.EXE;.CMD;.BAT;.COM'
+ : ''
+ const pathExt = isWindows ? pathExtExe.split(colon) : ['']
-{
-name:"SIGABRT",
-number:6,
-action:"core",
-description:"Aborted",
-standard:"ansi"},
+ if (isWindows) {
+ if (cmd.indexOf('.') !== -1 && pathExt[0] !== '')
+ pathExt.unshift('')
+ }
-{
-name:"SIGIOT",
-number:6,
-action:"core",
-description:"Aborted",
-standard:"bsd"},
+ return {
+ pathEnv,
+ pathExt,
+ pathExtExe,
+ }
+}
-{
-name:"SIGBUS",
-number:7,
-action:"core",
-description:
-"Bus error due to misaligned, non-existing address or paging error",
-standard:"bsd"},
+const which = (cmd, opt, cb) => {
+ if (typeof opt === 'function') {
+ cb = opt
+ opt = {}
+ }
+ if (!opt)
+ opt = {}
-{
-name:"SIGEMT",
-number:7,
-action:"terminate",
-description:"Command should be emulated but is not implemented",
-standard:"other"},
+ const { pathEnv, pathExt, pathExtExe } = getPathInfo(cmd, opt)
+ const found = []
-{
-name:"SIGFPE",
-number:8,
-action:"core",
-description:"Floating point arithmetic error",
-standard:"ansi"},
+ const step = i => new Promise((resolve, reject) => {
+ if (i === pathEnv.length)
+ return opt.all && found.length ? resolve(found)
+ : reject(getNotFoundError(cmd))
-{
-name:"SIGKILL",
-number:9,
-action:"terminate",
-description:"Forced termination",
-standard:"posix",
-forced:true},
+ const ppRaw = pathEnv[i]
+ const pathPart = /^".*"$/.test(ppRaw) ? ppRaw.slice(1, -1) : ppRaw
-{
-name:"SIGUSR1",
-number:10,
-action:"terminate",
-description:"Application-specific signal",
-standard:"posix"},
+ const pCmd = path.join(pathPart, cmd)
+ const p = !pathPart && /^\.[\\\/]/.test(cmd) ? cmd.slice(0, 2) + pCmd
+ : pCmd
-{
-name:"SIGSEGV",
-number:11,
-action:"core",
-description:"Segmentation fault",
-standard:"ansi"},
+ resolve(subStep(p, i, 0))
+ })
-{
-name:"SIGUSR2",
-number:12,
-action:"terminate",
-description:"Application-specific signal",
-standard:"posix"},
+ const subStep = (p, i, ii) => new Promise((resolve, reject) => {
+ if (ii === pathExt.length)
+ return resolve(step(i + 1))
+ const ext = pathExt[ii]
+ isexe(p + ext, { pathExt: pathExtExe }, (er, is) => {
+ if (!er && is) {
+ if (opt.all)
+ found.push(p + ext)
+ else
+ return resolve(p + ext)
+ }
+ return resolve(subStep(p, i, ii + 1))
+ })
+ })
-{
-name:"SIGPIPE",
-number:13,
-action:"terminate",
-description:"Broken pipe or socket",
-standard:"posix"},
+ return cb ? step(0).then(res => cb(null, res), cb) : step(0)
+}
-{
-name:"SIGALRM",
-number:14,
-action:"terminate",
-description:"Timeout or timer",
-standard:"posix"},
+const whichSync = (cmd, opt) => {
+ opt = opt || {}
-{
-name:"SIGTERM",
-number:15,
-action:"terminate",
-description:"Termination",
-standard:"ansi"},
+ const { pathEnv, pathExt, pathExtExe } = getPathInfo(cmd, opt)
+ const found = []
-{
-name:"SIGSTKFLT",
-number:16,
-action:"terminate",
-description:"Stack is empty or overflowed",
-standard:"other"},
+ for (let i = 0; i < pathEnv.length; i ++) {
+ const ppRaw = pathEnv[i]
+ const pathPart = /^".*"$/.test(ppRaw) ? ppRaw.slice(1, -1) : ppRaw
-{
-name:"SIGCHLD",
-number:17,
-action:"ignore",
-description:"Child process terminated, paused or unpaused",
-standard:"posix"},
+ const pCmd = path.join(pathPart, cmd)
+ const p = !pathPart && /^\.[\\\/]/.test(cmd) ? cmd.slice(0, 2) + pCmd
+ : pCmd
-{
-name:"SIGCLD",
-number:17,
-action:"ignore",
-description:"Child process terminated, paused or unpaused",
-standard:"other"},
+ for (let j = 0; j < pathExt.length; j ++) {
+ const cur = p + pathExt[j]
+ try {
+ const is = isexe.sync(cur, { pathExt: pathExtExe })
+ if (is) {
+ if (opt.all)
+ found.push(cur)
+ else
+ return cur
+ }
+ } catch (ex) {}
+ }
+ }
-{
-name:"SIGCONT",
-number:18,
-action:"unpause",
-description:"Unpaused",
-standard:"posix",
-forced:true},
+ if (opt.all && found.length)
+ return found
-{
-name:"SIGSTOP",
-number:19,
-action:"pause",
-description:"Paused",
-standard:"posix",
-forced:true},
+ if (opt.nothrow)
+ return null
-{
-name:"SIGTSTP",
-number:20,
-action:"pause",
-description:"Paused using CTRL-Z or \"suspend\"",
-standard:"posix"},
+ throw getNotFoundError(cmd)
+}
-{
-name:"SIGTTIN",
-number:21,
-action:"pause",
-description:"Background process cannot read terminal input",
-standard:"posix"},
+module.exports = which
+which.sync = whichSync
-{
-name:"SIGBREAK",
-number:21,
-action:"terminate",
-description:"User interruption with CTRL-BREAK",
-standard:"other"},
-{
-name:"SIGTTOU",
-number:22,
-action:"pause",
-description:"Background process cannot write to terminal output",
-standard:"posix"},
+/***/ }),
+/* 377 */
+/***/ (function(module, exports, __webpack_require__) {
-{
-name:"SIGURG",
-number:23,
-action:"ignore",
-description:"Socket received out-of-band data",
-standard:"bsd"},
+var fs = __webpack_require__(23)
+var core
+if (process.platform === 'win32' || global.TESTING_WINDOWS) {
+ core = __webpack_require__(378)
+} else {
+ core = __webpack_require__(379)
+}
-{
-name:"SIGXCPU",
-number:24,
-action:"core",
-description:"Process timed out",
-standard:"bsd"},
+module.exports = isexe
+isexe.sync = sync
-{
-name:"SIGXFSZ",
-number:25,
-action:"core",
-description:"File too big",
-standard:"bsd"},
+function isexe (path, options, cb) {
+ if (typeof options === 'function') {
+ cb = options
+ options = {}
+ }
-{
-name:"SIGVTALRM",
-number:26,
-action:"terminate",
-description:"Timeout or timer",
-standard:"bsd"},
+ if (!cb) {
+ if (typeof Promise !== 'function') {
+ throw new TypeError('callback not provided')
+ }
-{
-name:"SIGPROF",
-number:27,
-action:"terminate",
-description:"Timeout or timer",
-standard:"bsd"},
+ return new Promise(function (resolve, reject) {
+ isexe(path, options || {}, function (er, is) {
+ if (er) {
+ reject(er)
+ } else {
+ resolve(is)
+ }
+ })
+ })
+ }
-{
-name:"SIGWINCH",
-number:28,
-action:"ignore",
-description:"Terminal window size changed",
-standard:"bsd"},
+ core(path, options || {}, function (er, is) {
+ // ignore EACCES because that just means we aren't allowed to run it
+ if (er) {
+ if (er.code === 'EACCES' || options && options.ignoreErrors) {
+ er = null
+ is = false
+ }
+ }
+ cb(er, is)
+ })
+}
-{
-name:"SIGIO",
-number:29,
-action:"terminate",
-description:"I/O is available",
-standard:"other"},
+function sync (path, options) {
+ // my kingdom for a filtered catch
+ try {
+ return core.sync(path, options || {})
+ } catch (er) {
+ if (options && options.ignoreErrors || er.code === 'EACCES') {
+ return false
+ } else {
+ throw er
+ }
+ }
+}
-{
-name:"SIGPOLL",
-number:29,
-action:"terminate",
-description:"Watched event",
-standard:"other"},
-{
-name:"SIGINFO",
-number:29,
-action:"ignore",
-description:"Request for process information",
-standard:"other"},
+/***/ }),
+/* 378 */
+/***/ (function(module, exports, __webpack_require__) {
-{
-name:"SIGPWR",
-number:30,
-action:"terminate",
-description:"Device running out of power",
-standard:"systemv"},
+module.exports = isexe
+isexe.sync = sync
-{
-name:"SIGSYS",
-number:31,
-action:"core",
-description:"Invalid system call",
-standard:"other"},
+var fs = __webpack_require__(23)
-{
-name:"SIGUNUSED",
-number:31,
-action:"terminate",
-description:"Invalid system call",
-standard:"other"}];exports.SIGNALS=SIGNALS;
-//# sourceMappingURL=core.js.map
+function checkPathExt (path, options) {
+ var pathext = options.pathExt !== undefined ?
+ options.pathExt : process.env.PATHEXT
-/***/ }),
-/* 374 */
-/***/ (function(module, exports, __webpack_require__) {
+ if (!pathext) {
+ return true
+ }
-"use strict";
-Object.defineProperty(exports,"__esModule",{value:true});exports.SIGRTMAX=exports.getRealtimeSignals=void 0;
-const getRealtimeSignals=function(){
-const length=SIGRTMAX-SIGRTMIN+1;
-return Array.from({length},getRealtimeSignal);
-};exports.getRealtimeSignals=getRealtimeSignals;
+ pathext = pathext.split(';')
+ if (pathext.indexOf('') !== -1) {
+ return true
+ }
+ for (var i = 0; i < pathext.length; i++) {
+ var p = pathext[i].toLowerCase()
+ if (p && path.substr(-p.length).toLowerCase() === p) {
+ return true
+ }
+ }
+ return false
+}
-const getRealtimeSignal=function(value,index){
-return{
-name:`SIGRT${index+1}`,
-number:SIGRTMIN+index,
-action:"terminate",
-description:"Application-specific signal (realtime)",
-standard:"posix"};
+function checkStat (stat, path, options) {
+ if (!stat.isSymbolicLink() && !stat.isFile()) {
+ return false
+ }
+ return checkPathExt(path, options)
+}
-};
+function isexe (path, options, cb) {
+ fs.stat(path, function (er, stat) {
+ cb(er, er ? false : checkStat(stat, path, options))
+ })
+}
+
+function sync (path, options) {
+ return checkStat(fs.statSync(path), path, options)
+}
-const SIGRTMIN=34;
-const SIGRTMAX=64;exports.SIGRTMAX=SIGRTMAX;
-//# sourceMappingURL=realtime.js.map
/***/ }),
-/* 375 */
+/* 379 */
/***/ (function(module, exports, __webpack_require__) {
-"use strict";
+module.exports = isexe
+isexe.sync = sync
-const aliases = ['stdin', 'stdout', 'stderr'];
+var fs = __webpack_require__(23)
-const hasAlias = opts => aliases.some(alias => opts[alias] !== undefined);
+function isexe (path, options, cb) {
+ fs.stat(path, function (er, stat) {
+ cb(er, er ? false : checkStat(stat, options))
+ })
+}
-const normalizeStdio = opts => {
- if (!opts) {
- return;
- }
+function sync (path, options) {
+ return checkStat(fs.statSync(path), options)
+}
- const {stdio} = opts;
+function checkStat (stat, options) {
+ return stat.isFile() && checkMode(stat, options)
+}
- if (stdio === undefined) {
- return aliases.map(alias => opts[alias]);
- }
+function checkMode (stat, options) {
+ var mod = stat.mode
+ var uid = stat.uid
+ var gid = stat.gid
- if (hasAlias(opts)) {
- throw new Error(`It's not possible to provide \`stdio\` in combination with one of ${aliases.map(alias => `\`${alias}\``).join(', ')}`);
- }
+ var myUid = options.uid !== undefined ?
+ options.uid : process.getuid && process.getuid()
+ var myGid = options.gid !== undefined ?
+ options.gid : process.getgid && process.getgid()
- if (typeof stdio === 'string') {
- return stdio;
- }
+ var u = parseInt('100', 8)
+ var g = parseInt('010', 8)
+ var o = parseInt('001', 8)
+ var ug = u | g
- if (!Array.isArray(stdio)) {
- throw new TypeError(`Expected \`stdio\` to be of type \`string\` or \`Array\`, got \`${typeof stdio}\``);
- }
+ var ret = (mod & o) ||
+ (mod & g) && gid === myGid ||
+ (mod & u) && uid === myUid ||
+ (mod & ug) && myUid === 0
- const length = Math.max(stdio.length, aliases.length);
- return Array.from({length}, (value, index) => stdio[index]);
-};
+ return ret
+}
-module.exports = normalizeStdio;
-// `ipc` is pushed unless it is already present
-module.exports.node = opts => {
- const stdio = normalizeStdio(opts);
+/***/ }),
+/* 380 */
+/***/ (function(module, exports, __webpack_require__) {
- if (stdio === 'ipc') {
- return 'ipc';
- }
+"use strict";
- if (stdio === undefined || typeof stdio === 'string') {
- return [stdio, stdio, stdio, 'ipc'];
- }
- if (stdio.includes('ipc')) {
- return stdio;
+const pathKey = (options = {}) => {
+ const environment = options.env || process.env;
+ const platform = options.platform || process.platform;
+
+ if (platform !== 'win32') {
+ return 'PATH';
}
- return [...stdio, 'ipc'];
+ return Object.keys(environment).find(key => key.toUpperCase() === 'PATH') || 'Path';
};
+module.exports = pathKey;
+// TODO: Remove this for the next major release
+module.exports.default = pathKey;
+
/***/ }),
-/* 376 */
+/* 381 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
-const os = __webpack_require__(11);
-const onExit = __webpack_require__(377);
-const DEFAULT_FORCE_KILL_TIMEOUT = 1000 * 5;
+// See http://www.robvanderwoude.com/escapechars.php
+const metaCharsRegExp = /([()\][%!^"`<>&|;, *?])/g;
-// Monkey-patches `childProcess.kill()` to add `forceKillAfterTimeout` behavior
-const spawnedKill = (kill, signal = 'SIGTERM', options = {}) => {
- const killResult = kill(signal);
- setKillTimeout(kill, signal, options, killResult);
- return killResult;
-};
+function escapeCommand(arg) {
+ // Escape meta chars
+ arg = arg.replace(metaCharsRegExp, '^$1');
-const setKillTimeout = (kill, signal, options, killResult) => {
- if (!shouldForceKill(signal, options, killResult)) {
- return;
- }
+ return arg;
+}
- const timeout = getForceKillAfterTimeout(options);
- const t = setTimeout(() => {
- kill('SIGKILL');
- }, timeout);
+function escapeArgument(arg, doubleEscapeMetaChars) {
+ // Convert to string
+ arg = `${arg}`;
- // Guarded because there's no `.unref()` when `execa` is used in the renderer
- // process in Electron. This cannot be tested since we don't run tests in
- // Electron.
- // istanbul ignore else
- if (t.unref) {
- t.unref();
- }
-};
+ // Algorithm below is based on https://qntm.org/cmd
-const shouldForceKill = (signal, {forceKillAfterTimeout}, killResult) => {
- return isSigterm(signal) && forceKillAfterTimeout !== false && killResult;
-};
+ // Sequence of backslashes followed by a double quote:
+ // double up all the backslashes and escape the double quote
+ arg = arg.replace(/(\\*)"/g, '$1$1\\"');
-const isSigterm = signal => {
- return signal === os.constants.signals.SIGTERM ||
- (typeof signal === 'string' && signal.toUpperCase() === 'SIGTERM');
-};
+ // Sequence of backslashes followed by the end of the string
+ // (which will become a double quote later):
+ // double up all the backslashes
+ arg = arg.replace(/(\\*)$/, '$1$1');
-const getForceKillAfterTimeout = ({forceKillAfterTimeout = true}) => {
- if (forceKillAfterTimeout === true) {
- return DEFAULT_FORCE_KILL_TIMEOUT;
- }
+ // All other backslashes occur literally
- if (!Number.isInteger(forceKillAfterTimeout) || forceKillAfterTimeout < 0) {
- throw new TypeError(`Expected the \`forceKillAfterTimeout\` option to be a non-negative integer, got \`${forceKillAfterTimeout}\` (${typeof forceKillAfterTimeout})`);
- }
+ // Quote the whole thing:
+ arg = `"${arg}"`;
- return forceKillAfterTimeout;
-};
+ // Escape meta chars
+ arg = arg.replace(metaCharsRegExp, '^$1');
-// `childProcess.cancel()`
-const spawnedCancel = (spawned, context) => {
- const killResult = spawned.kill();
+ // Double escape meta chars if necessary
+ if (doubleEscapeMetaChars) {
+ arg = arg.replace(metaCharsRegExp, '^$1');
+ }
- if (killResult) {
- context.isCanceled = true;
- }
-};
+ return arg;
+}
-const timeoutKill = (spawned, signal, reject) => {
- spawned.kill(signal);
- reject(Object.assign(new Error('Timed out'), {timedOut: true, signal}));
-};
+module.exports.command = escapeCommand;
+module.exports.argument = escapeArgument;
-// `timeout` option handling
-const setupTimeout = (spawned, {timeout, killSignal = 'SIGTERM'}, spawnedPromise) => {
- if (timeout === 0 || timeout === undefined) {
- return spawnedPromise;
- }
- if (!Number.isInteger(timeout) || timeout < 0) {
- throw new TypeError(`Expected the \`timeout\` option to be a non-negative integer, got \`${timeout}\` (${typeof timeout})`);
- }
+/***/ }),
+/* 382 */
+/***/ (function(module, exports, __webpack_require__) {
- let timeoutId;
- const timeoutPromise = new Promise((resolve, reject) => {
- timeoutId = setTimeout(() => {
- timeoutKill(spawned, killSignal, reject);
- }, timeout);
- });
+"use strict";
- const safeSpawnedPromise = spawnedPromise.finally(() => {
- clearTimeout(timeoutId);
- });
- return Promise.race([timeoutPromise, safeSpawnedPromise]);
-};
+const fs = __webpack_require__(23);
+const shebangCommand = __webpack_require__(383);
-// `cleanup` option handling
-const setExitHandler = async (spawned, {cleanup, detached}, timedPromise) => {
- if (!cleanup || detached) {
- return timedPromise;
- }
+function readShebang(command) {
+ // Read the first 150 bytes from the file
+ const size = 150;
+ const buffer = Buffer.alloc(size);
- const removeExitHandler = onExit(() => {
- spawned.kill();
- });
+ let fd;
- return timedPromise.finally(() => {
- removeExitHandler();
- });
-};
+ try {
+ fd = fs.openSync(command, 'r');
+ fs.readSync(fd, buffer, 0, size, 0);
+ fs.closeSync(fd);
+ } catch (e) { /* Empty */ }
-module.exports = {
- spawnedKill,
- spawnedCancel,
- setupTimeout,
- setExitHandler
-};
+ // Attempt to extract shebang (null is returned if not a shebang)
+ return shebangCommand(buffer.toString());
+}
+
+module.exports = readShebang;
/***/ }),
-/* 377 */
+/* 383 */
/***/ (function(module, exports, __webpack_require__) {
-// Note: since nyc uses this module to output coverage, any lines
-// that are in the direct sync flow of nyc's outputCoverage are
-// ignored, since we can never get coverage for them.
-var assert = __webpack_require__(30)
-var signals = __webpack_require__(378)
-
-var EE = __webpack_require__(379)
-/* istanbul ignore if */
-if (typeof EE !== 'function') {
- EE = EE.EventEmitter
-}
-
-var emitter
-if (process.__signal_exit_emitter__) {
- emitter = process.__signal_exit_emitter__
-} else {
- emitter = process.__signal_exit_emitter__ = new EE()
- emitter.count = 0
- emitter.emitted = {}
-}
-
-// Because this emitter is a global, we have to check to see if a
-// previous version of this library failed to enable infinite listeners.
-// I know what you're about to say. But literally everything about
-// signal-exit is a compromise with evil. Get used to it.
-if (!emitter.infinite) {
- emitter.setMaxListeners(Infinity)
- emitter.infinite = true
-}
-
-module.exports = function (cb, opts) {
- assert.equal(typeof cb, 'function', 'a callback must be provided for exit handler')
+"use strict";
- if (loaded === false) {
- load()
- }
+const shebangRegex = __webpack_require__(384);
- var ev = 'exit'
- if (opts && opts.alwaysLast) {
- ev = 'afterexit'
- }
+module.exports = (string = '') => {
+ const match = string.match(shebangRegex);
- var remove = function () {
- emitter.removeListener(ev, cb)
- if (emitter.listeners('exit').length === 0 &&
- emitter.listeners('afterexit').length === 0) {
- unload()
- }
- }
- emitter.on(ev, cb)
+ if (!match) {
+ return null;
+ }
- return remove
-}
+ const [path, argument] = match[0].replace(/#! ?/, '').split(' ');
+ const binary = path.split('/').pop();
-module.exports.unload = unload
-function unload () {
- if (!loaded) {
- return
- }
- loaded = false
+ if (binary === 'env') {
+ return argument;
+ }
- signals.forEach(function (sig) {
- try {
- process.removeListener(sig, sigListeners[sig])
- } catch (er) {}
- })
- process.emit = originalProcessEmit
- process.reallyExit = originalProcessReallyExit
- emitter.count -= 1
-}
+ return argument ? `${binary} ${argument}` : binary;
+};
-function emit (event, code, signal) {
- if (emitter.emitted[event]) {
- return
- }
- emitter.emitted[event] = true
- emitter.emit(event, code, signal)
-}
-// { : , ... }
-var sigListeners = {}
-signals.forEach(function (sig) {
- sigListeners[sig] = function listener () {
- // If there are no other listeners, an exit is coming!
- // Simplest way: remove us and then re-send the signal.
- // We know that this will kill the process, so we can
- // safely emit now.
- var listeners = process.listeners(sig)
- if (listeners.length === emitter.count) {
- unload()
- emit('exit', null, sig)
- /* istanbul ignore next */
- emit('afterexit', null, sig)
- /* istanbul ignore next */
- process.kill(process.pid, sig)
- }
- }
-})
+/***/ }),
+/* 384 */
+/***/ (function(module, exports, __webpack_require__) {
-module.exports.signals = function () {
- return signals
-}
+"use strict";
-module.exports.load = load
+module.exports = /^#!(.*)/;
-var loaded = false
-function load () {
- if (loaded) {
- return
- }
- loaded = true
+/***/ }),
+/* 385 */
+/***/ (function(module, exports, __webpack_require__) {
- // This is the number of onSignalExit's that are in play.
- // It's important so that we can count the correct number of
- // listeners on signals, and don't wait for the other one to
- // handle it instead of us.
- emitter.count += 1
+"use strict";
- signals = signals.filter(function (sig) {
- try {
- process.on(sig, sigListeners[sig])
- return true
- } catch (er) {
- return false
- }
- })
- process.emit = processEmit
- process.reallyExit = processReallyExit
-}
+const isWin = process.platform === 'win32';
-var originalProcessReallyExit = process.reallyExit
-function processReallyExit (code) {
- process.exitCode = code || 0
- emit('exit', process.exitCode, null)
- /* istanbul ignore next */
- emit('afterexit', process.exitCode, null)
- /* istanbul ignore next */
- originalProcessReallyExit.call(process, process.exitCode)
+function notFoundError(original, syscall) {
+ return Object.assign(new Error(`${syscall} ${original.command} ENOENT`), {
+ code: 'ENOENT',
+ errno: 'ENOENT',
+ syscall: `${syscall} ${original.command}`,
+ path: original.command,
+ spawnargs: original.args,
+ });
}
-var originalProcessEmit = process.emit
-function processEmit (ev, arg) {
- if (ev === 'exit') {
- if (arg !== undefined) {
- process.exitCode = arg
+function hookChildProcess(cp, parsed) {
+ if (!isWin) {
+ return;
}
- var ret = originalProcessEmit.apply(this, arguments)
- emit('exit', process.exitCode, null)
- /* istanbul ignore next */
- emit('afterexit', process.exitCode, null)
- return ret
- } else {
- return originalProcessEmit.apply(this, arguments)
- }
-}
+ const originalEmit = cp.emit;
-/***/ }),
-/* 378 */
-/***/ (function(module, exports) {
+ cp.emit = function (name, arg1) {
+ // If emitting "exit" event and exit code is 1, we need to check if
+ // the command exists and emit an "error" instead
+ // See https://github.com/IndigoUnited/node-cross-spawn/issues/16
+ if (name === 'exit') {
+ const err = verifyENOENT(arg1, parsed, 'spawn');
-// This is not the set of all possible signals.
-//
-// It IS, however, the set of all signals that trigger
-// an exit on either Linux or BSD systems. Linux is a
-// superset of the signal names supported on BSD, and
-// the unknown signals just fail to register, so we can
-// catch that easily enough.
-//
-// Don't bother with SIGKILL. It's uncatchable, which
-// means that we can't fire any callbacks anyway.
-//
-// If a user does happen to register a handler on a non-
-// fatal signal like SIGWINCH or something, and then
-// exit, it'll end up firing `process.emit('exit')`, so
-// the handler will be fired anyway.
-//
-// SIGBUS, SIGFPE, SIGSEGV and SIGILL, when not raised
-// artificially, inherently leave the process in a
-// state from which it is not safe to try and enter JS
-// listeners.
-module.exports = [
- 'SIGABRT',
- 'SIGALRM',
- 'SIGHUP',
- 'SIGINT',
- 'SIGTERM'
-]
+ if (err) {
+ return originalEmit.call(cp, 'error', err);
+ }
+ }
-if (process.platform !== 'win32') {
- module.exports.push(
- 'SIGVTALRM',
- 'SIGXCPU',
- 'SIGXFSZ',
- 'SIGUSR2',
- 'SIGTRAP',
- 'SIGSYS',
- 'SIGQUIT',
- 'SIGIOT'
- // should detect profiler and enable/disable accordingly.
- // see #21
- // 'SIGPROF'
- )
+ return originalEmit.apply(cp, arguments); // eslint-disable-line prefer-rest-params
+ };
}
-if (process.platform === 'linux') {
- module.exports.push(
- 'SIGIO',
- 'SIGPOLL',
- 'SIGPWR',
- 'SIGSTKFLT',
- 'SIGUNUSED'
- )
+function verifyENOENT(status, parsed) {
+ if (isWin && status === 1 && !parsed.file) {
+ return notFoundError(parsed.original, 'spawn');
+ }
+
+ return null;
}
+function verifyENOENTSync(status, parsed) {
+ if (isWin && status === 1 && !parsed.file) {
+ return notFoundError(parsed.original, 'spawnSync');
+ }
-/***/ }),
-/* 379 */
-/***/ (function(module, exports) {
+ return null;
+}
+
+module.exports = {
+ hookChildProcess,
+ verifyENOENT,
+ verifyENOENTSync,
+ notFoundError,
+};
-module.exports = require("events");
/***/ }),
-/* 380 */
+/* 386 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
-const isStream = __webpack_require__(381);
-const getStream = __webpack_require__(382);
-const mergeStream = __webpack_require__(388);
-// `input` option
-const handleInput = (spawned, input) => {
- // Checking for stdin is workaround for https://github.com/nodejs/node/issues/26852
- // TODO: Remove `|| spawned.stdin === undefined` once we drop support for Node.js <=12.2.0
- if (input === undefined || spawned.stdin === undefined) {
- return;
- }
+module.exports = input => {
+ const LF = typeof input === 'string' ? '\n' : '\n'.charCodeAt();
+ const CR = typeof input === 'string' ? '\r' : '\r'.charCodeAt();
- if (isStream(input)) {
- input.pipe(spawned.stdin);
- } else {
- spawned.stdin.end(input);
+ if (input[input.length - 1] === LF) {
+ input = input.slice(0, input.length - 1);
}
-};
-// `all` interleaves `stdout` and `stderr`
-const makeAllStream = (spawned, {all}) => {
- if (!all || (!spawned.stdout && !spawned.stderr)) {
- return;
+ if (input[input.length - 1] === CR) {
+ input = input.slice(0, input.length - 1);
}
- const mixed = mergeStream();
+ return input;
+};
- if (spawned.stdout) {
- mixed.add(spawned.stdout);
- }
- if (spawned.stderr) {
- mixed.add(spawned.stderr);
- }
+/***/ }),
+/* 387 */
+/***/ (function(module, exports, __webpack_require__) {
- return mixed;
-};
+"use strict";
-// On failure, `result.stdout|stderr|all` should contain the currently buffered stream
-const getBufferedData = async (stream, streamPromise) => {
- if (!stream) {
- return;
- }
+const path = __webpack_require__(16);
+const pathKey = __webpack_require__(380);
- stream.destroy();
+const npmRunPath = options => {
+ options = {
+ cwd: process.cwd(),
+ path: process.env[pathKey()],
+ execPath: process.execPath,
+ ...options
+ };
- try {
- return await streamPromise;
- } catch (error) {
- return error.bufferedData;
- }
-};
+ let previous;
+ let cwdPath = path.resolve(options.cwd);
+ const result = [];
-const getStreamPromise = (stream, {encoding, buffer, maxBuffer}) => {
- if (!stream || !buffer) {
- return;
+ while (previous !== cwdPath) {
+ result.push(path.join(cwdPath, 'node_modules/.bin'));
+ previous = cwdPath;
+ cwdPath = path.resolve(cwdPath, '..');
}
- if (encoding) {
- return getStream(stream, {encoding, maxBuffer});
- }
+ // Ensure the running `node` binary is used
+ const execPathDir = path.resolve(options.cwd, options.execPath, '..');
+ result.unshift(execPathDir);
- return getStream.buffer(stream, {maxBuffer});
+ return result.concat(options.path).join(path.delimiter);
};
-// Retrieve result of child process: exit code, signal, error, streams (stdout/stderr/all)
-const getSpawnedResult = async ({stdout, stderr, all}, {encoding, buffer, maxBuffer}, processDone) => {
- const stdoutPromise = getStreamPromise(stdout, {encoding, buffer, maxBuffer});
- const stderrPromise = getStreamPromise(stderr, {encoding, buffer, maxBuffer});
- const allPromise = getStreamPromise(all, {encoding, buffer, maxBuffer: maxBuffer * 2});
+module.exports = npmRunPath;
+// TODO: Remove this for the next major release
+module.exports.default = npmRunPath;
- try {
- return await Promise.all([processDone, stdoutPromise, stderrPromise, allPromise]);
- } catch (error) {
- return Promise.all([
- {error, signal: error.signal, timedOut: error.timedOut},
- getBufferedData(stdout, stdoutPromise),
- getBufferedData(stderr, stderrPromise),
- getBufferedData(all, allPromise)
- ]);
- }
-};
+module.exports.env = options => {
+ options = {
+ env: process.env,
+ ...options
+ };
-const validateInputSync = ({input}) => {
- if (isStream(input)) {
- throw new TypeError('The `input` option cannot be a stream in sync mode');
- }
-};
+ const env = {...options.env};
+ const path = pathKey({env});
-module.exports = {
- handleInput,
- makeAllStream,
- getSpawnedResult,
- validateInputSync
-};
+ options.path = env[path];
+ env[path] = module.exports(options);
+ return env;
+};
/***/ }),
-/* 381 */
+/* 388 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
+const mimicFn = __webpack_require__(389);
-const isStream = stream =>
- stream !== null &&
- typeof stream === 'object' &&
- typeof stream.pipe === 'function';
-
-isStream.writable = stream =>
- isStream(stream) &&
- stream.writable !== false &&
- typeof stream._write === 'function' &&
- typeof stream._writableState === 'object';
+const calledFunctions = new WeakMap();
-isStream.readable = stream =>
- isStream(stream) &&
- stream.readable !== false &&
- typeof stream._read === 'function' &&
- typeof stream._readableState === 'object';
+const oneTime = (fn, options = {}) => {
+ if (typeof fn !== 'function') {
+ throw new TypeError('Expected a function');
+ }
-isStream.duplex = stream =>
- isStream.writable(stream) &&
- isStream.readable(stream);
+ let ret;
+ let isCalled = false;
+ let callCount = 0;
+ const functionName = fn.displayName || fn.name || '';
-isStream.transform = stream =>
- isStream.duplex(stream) &&
- typeof stream._transform === 'function' &&
- typeof stream._transformState === 'object';
+ const onetime = function (...args) {
+ calledFunctions.set(onetime, ++callCount);
-module.exports = isStream;
+ if (isCalled) {
+ if (options.throw === true) {
+ throw new Error(`Function \`${functionName}\` can only be called once`);
+ }
+ return ret;
+ }
-/***/ }),
-/* 382 */
-/***/ (function(module, exports, __webpack_require__) {
+ isCalled = true;
+ ret = fn.apply(this, args);
+ fn = null;
-"use strict";
+ return ret;
+ };
-const pump = __webpack_require__(383);
-const bufferStream = __webpack_require__(387);
+ mimicFn(onetime, fn);
+ calledFunctions.set(onetime, callCount);
-class MaxBufferError extends Error {
- constructor() {
- super('maxBuffer exceeded');
- this.name = 'MaxBufferError';
- }
-}
+ return onetime;
+};
-async function getStream(inputStream, options) {
- if (!inputStream) {
- return Promise.reject(new Error('Expected a stream'));
- }
+module.exports = oneTime;
+// TODO: Remove this for the next major release
+module.exports.default = oneTime;
- options = {
- maxBuffer: Infinity,
- ...options
- };
+module.exports.callCount = fn => {
+ if (!calledFunctions.has(fn)) {
+ throw new Error(`The given function \`${fn.name}\` is not wrapped by the \`onetime\` package`);
+ }
- const {maxBuffer} = options;
+ return calledFunctions.get(fn);
+};
- let stream;
- await new Promise((resolve, reject) => {
- const rejectPromise = error => {
- if (error) { // A null check
- error.bufferedData = stream.getBufferedValue();
- }
- reject(error);
- };
+/***/ }),
+/* 389 */
+/***/ (function(module, exports, __webpack_require__) {
- stream = pump(inputStream, bufferStream(options), error => {
- if (error) {
- rejectPromise(error);
- return;
- }
+"use strict";
- resolve();
- });
- stream.on('data', () => {
- if (stream.getBufferedLength() > maxBuffer) {
- rejectPromise(new MaxBufferError());
- }
- });
- });
+const mimicFn = (to, from) => {
+ for (const prop of Reflect.ownKeys(from)) {
+ Object.defineProperty(to, prop, Object.getOwnPropertyDescriptor(from, prop));
+ }
- return stream.getBufferedValue();
-}
+ return to;
+};
-module.exports = getStream;
+module.exports = mimicFn;
// TODO: Remove this for the next major release
-module.exports.default = getStream;
-module.exports.buffer = (stream, options) => getStream(stream, {...options, encoding: 'buffer'});
-module.exports.array = (stream, options) => getStream(stream, {...options, array: true});
-module.exports.MaxBufferError = MaxBufferError;
+module.exports.default = mimicFn;
/***/ }),
-/* 383 */
+/* 390 */
/***/ (function(module, exports, __webpack_require__) {
-var once = __webpack_require__(384)
-var eos = __webpack_require__(386)
-var fs = __webpack_require__(23) // we only need fs to get the ReadStream and WriteStream prototypes
-
-var noop = function () {}
-var ancient = /^v?\.0/.test(process.version)
+"use strict";
-var isFn = function (fn) {
- return typeof fn === 'function'
-}
+const {signalsByName} = __webpack_require__(391);
-var isFS = function (stream) {
- if (!ancient) return false // newer node version do not need to care about fs is a special way
- if (!fs) return false // browser
- return (stream instanceof (fs.ReadStream || noop) || stream instanceof (fs.WriteStream || noop)) && isFn(stream.close)
-}
+const getErrorPrefix = ({timedOut, timeout, errorCode, signal, signalDescription, exitCode, isCanceled}) => {
+ if (timedOut) {
+ return `timed out after ${timeout} milliseconds`;
+ }
-var isRequest = function (stream) {
- return stream.setHeader && isFn(stream.abort)
-}
+ if (isCanceled) {
+ return 'was canceled';
+ }
-var destroyer = function (stream, reading, writing, callback) {
- callback = once(callback)
+ if (errorCode !== undefined) {
+ return `failed with ${errorCode}`;
+ }
- var closed = false
- stream.on('close', function () {
- closed = true
- })
+ if (signal !== undefined) {
+ return `was killed with ${signal} (${signalDescription})`;
+ }
- eos(stream, {readable: reading, writable: writing}, function (err) {
- if (err) return callback(err)
- closed = true
- callback()
- })
+ if (exitCode !== undefined) {
+ return `failed with exit code ${exitCode}`;
+ }
- var destroyed = false
- return function (err) {
- if (closed) return
- if (destroyed) return
- destroyed = true
+ return 'failed';
+};
- if (isFS(stream)) return stream.close(noop) // use close for fs streams to avoid fd leaks
- if (isRequest(stream)) return stream.abort() // request.destroy just do .end - .abort is what we want
+const makeError = ({
+ stdout,
+ stderr,
+ all,
+ error,
+ signal,
+ exitCode,
+ command,
+ timedOut,
+ isCanceled,
+ killed,
+ parsed: {options: {timeout}}
+}) => {
+ // `signal` and `exitCode` emitted on `spawned.on('exit')` event can be `null`.
+ // We normalize them to `undefined`
+ exitCode = exitCode === null ? undefined : exitCode;
+ signal = signal === null ? undefined : signal;
+ const signalDescription = signal === undefined ? undefined : signalsByName[signal].description;
- if (isFn(stream.destroy)) return stream.destroy()
+ const errorCode = error && error.code;
- callback(err || new Error('stream was destroyed'))
- }
-}
+ const prefix = getErrorPrefix({timedOut, timeout, errorCode, signal, signalDescription, exitCode, isCanceled});
+ const execaMessage = `Command ${prefix}: ${command}`;
+ const shortMessage = error instanceof Error ? `${execaMessage}\n${error.message}` : execaMessage;
+ const message = [shortMessage, stderr, stdout].filter(Boolean).join('\n');
-var call = function (fn) {
- fn()
-}
+ if (error instanceof Error) {
+ error.originalMessage = error.message;
+ error.message = message;
+ } else {
+ error = new Error(message);
+ }
-var pipe = function (from, to) {
- return from.pipe(to)
-}
+ error.shortMessage = shortMessage;
+ error.command = command;
+ error.exitCode = exitCode;
+ error.signal = signal;
+ error.signalDescription = signalDescription;
+ error.stdout = stdout;
+ error.stderr = stderr;
-var pump = function () {
- var streams = Array.prototype.slice.call(arguments)
- var callback = isFn(streams[streams.length - 1] || noop) && streams.pop() || noop
+ if (all !== undefined) {
+ error.all = all;
+ }
- if (Array.isArray(streams[0])) streams = streams[0]
- if (streams.length < 2) throw new Error('pump requires two streams per minimum')
+ if ('bufferedData' in error) {
+ delete error.bufferedData;
+ }
- var error
- var destroys = streams.map(function (stream, i) {
- var reading = i < streams.length - 1
- var writing = i > 0
- return destroyer(stream, reading, writing, function (err) {
- if (!error) error = err
- if (err) destroys.forEach(call)
- if (reading) return
- destroys.forEach(call)
- callback(error)
- })
- })
+ error.failed = true;
+ error.timedOut = Boolean(timedOut);
+ error.isCanceled = isCanceled;
+ error.killed = killed && !timedOut;
- return streams.reduce(pipe)
-}
+ return error;
+};
-module.exports = pump
+module.exports = makeError;
/***/ }),
-/* 384 */
+/* 391 */
/***/ (function(module, exports, __webpack_require__) {
-var wrappy = __webpack_require__(385)
-module.exports = wrappy(once)
-module.exports.strict = wrappy(onceStrict)
-
-once.proto = once(function () {
- Object.defineProperty(Function.prototype, 'once', {
- value: function () {
- return once(this)
- },
- configurable: true
- })
-
- Object.defineProperty(Function.prototype, 'onceStrict', {
- value: function () {
- return onceStrict(this)
- },
- configurable: true
- })
-})
-
-function once (fn) {
- var f = function () {
- if (f.called) return f.value
- f.called = true
- return f.value = fn.apply(this, arguments)
- }
- f.called = false
- return f
-}
-
-function onceStrict (fn) {
- var f = function () {
- if (f.called)
- throw new Error(f.onceError)
- f.called = true
- return f.value = fn.apply(this, arguments)
- }
- var name = fn.name || 'Function wrapped with `once`'
- f.onceError = name + " shouldn't be called more than once"
- f.called = false
- return f
-}
-
+"use strict";
+Object.defineProperty(exports,"__esModule",{value:true});exports.signalsByNumber=exports.signalsByName=void 0;var _os=__webpack_require__(11);
-/***/ }),
-/* 385 */
-/***/ (function(module, exports) {
+var _signals=__webpack_require__(392);
+var _realtime=__webpack_require__(394);
-// Returns a wrapper function that returns a wrapped callback
-// The wrapper function should do some stuff, and return a
-// presumably different callback function.
-// This makes sure that own properties are retained, so that
-// decorations and such are not lost along the way.
-module.exports = wrappy
-function wrappy (fn, cb) {
- if (fn && cb) return wrappy(fn)(cb)
- if (typeof fn !== 'function')
- throw new TypeError('need wrapper function')
- Object.keys(fn).forEach(function (k) {
- wrapper[k] = fn[k]
- })
+const getSignalsByName=function(){
+const signals=(0,_signals.getSignals)();
+return signals.reduce(getSignalByName,{});
+};
- return wrapper
+const getSignalByName=function(
+signalByNameMemo,
+{name,number,description,supported,action,forced,standard})
+{
+return{
+...signalByNameMemo,
+[name]:{name,number,description,supported,action,forced,standard}};
- function wrapper() {
- var args = new Array(arguments.length)
- for (var i = 0; i < args.length; i++) {
- args[i] = arguments[i]
- }
- var ret = fn.apply(this, args)
- var cb = args[args.length-1]
- if (typeof ret === 'function' && ret !== cb) {
- Object.keys(cb).forEach(function (k) {
- ret[k] = cb[k]
- })
- }
- return ret
- }
-}
+};
+const signalsByName=getSignalsByName();exports.signalsByName=signalsByName;
-/***/ }),
-/* 386 */
-/***/ (function(module, exports, __webpack_require__) {
-var once = __webpack_require__(384);
-var noop = function() {};
-var isRequest = function(stream) {
- return stream.setHeader && typeof stream.abort === 'function';
-};
+const getSignalsByNumber=function(){
+const signals=(0,_signals.getSignals)();
+const length=_realtime.SIGRTMAX+1;
+const signalsA=Array.from({length},(value,number)=>
+getSignalByNumber(number,signals));
-var isChildProcess = function(stream) {
- return stream.stdio && Array.isArray(stream.stdio) && stream.stdio.length === 3
+return Object.assign({},...signalsA);
};
-var eos = function(stream, opts, callback) {
- if (typeof opts === 'function') return eos(stream, null, opts);
- if (!opts) opts = {};
-
- callback = once(callback || noop);
-
- var ws = stream._writableState;
- var rs = stream._readableState;
- var readable = opts.readable || (opts.readable !== false && stream.readable);
- var writable = opts.writable || (opts.writable !== false && stream.writable);
-
- var onlegacyfinish = function() {
- if (!stream.writable) onfinish();
- };
-
- var onfinish = function() {
- writable = false;
- if (!readable) callback.call(stream);
- };
+const getSignalByNumber=function(number,signals){
+const signal=findSignalByNumber(number,signals);
- var onend = function() {
- readable = false;
- if (!writable) callback.call(stream);
- };
+if(signal===undefined){
+return{};
+}
- var onexit = function(exitCode) {
- callback.call(stream, exitCode ? new Error('exited with error code: ' + exitCode) : null);
- };
+const{name,description,supported,action,forced,standard}=signal;
+return{
+[number]:{
+name,
+number,
+description,
+supported,
+action,
+forced,
+standard}};
- var onerror = function(err) {
- callback.call(stream, err);
- };
- var onclose = function() {
- if (readable && !(rs && rs.ended)) return callback.call(stream, new Error('premature close'));
- if (writable && !(ws && ws.ended)) return callback.call(stream, new Error('premature close'));
- };
+};
- var onrequest = function() {
- stream.req.on('finish', onfinish);
- };
- if (isRequest(stream)) {
- stream.on('complete', onfinish);
- stream.on('abort', onclose);
- if (stream.req) onrequest();
- else stream.on('request', onrequest);
- } else if (writable && !ws) { // legacy streams
- stream.on('end', onlegacyfinish);
- stream.on('close', onlegacyfinish);
- }
- if (isChildProcess(stream)) stream.on('exit', onexit);
+const findSignalByNumber=function(number,signals){
+const signal=signals.find(({name})=>_os.constants.signals[name]===number);
- stream.on('end', onend);
- stream.on('finish', onfinish);
- if (opts.error !== false) stream.on('error', onerror);
- stream.on('close', onclose);
+if(signal!==undefined){
+return signal;
+}
- return function() {
- stream.removeListener('complete', onfinish);
- stream.removeListener('abort', onclose);
- stream.removeListener('request', onrequest);
- if (stream.req) stream.req.removeListener('finish', onfinish);
- stream.removeListener('end', onlegacyfinish);
- stream.removeListener('close', onlegacyfinish);
- stream.removeListener('finish', onfinish);
- stream.removeListener('exit', onexit);
- stream.removeListener('end', onend);
- stream.removeListener('error', onerror);
- stream.removeListener('close', onclose);
- };
+return signals.find(signalA=>signalA.number===number);
};
-module.exports = eos;
-
+const signalsByNumber=getSignalsByNumber();exports.signalsByNumber=signalsByNumber;
+//# sourceMappingURL=main.js.map
/***/ }),
-/* 387 */
+/* 392 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
+Object.defineProperty(exports,"__esModule",{value:true});exports.getSignals=void 0;var _os=__webpack_require__(11);
-const {PassThrough: PassThroughStream} = __webpack_require__(27);
-
-module.exports = options => {
- options = {...options};
-
- const {array} = options;
- let {encoding} = options;
- const isBuffer = encoding === 'buffer';
- let objectMode = false;
-
- if (array) {
- objectMode = !(encoding || isBuffer);
- } else {
- encoding = encoding || 'utf8';
- }
+var _core=__webpack_require__(393);
+var _realtime=__webpack_require__(394);
- if (isBuffer) {
- encoding = null;
- }
- const stream = new PassThroughStream({objectMode});
- if (encoding) {
- stream.setEncoding(encoding);
- }
+const getSignals=function(){
+const realtimeSignals=(0,_realtime.getRealtimeSignals)();
+const signals=[..._core.SIGNALS,...realtimeSignals].map(normalizeSignal);
+return signals;
+};exports.getSignals=getSignals;
- let length = 0;
- const chunks = [];
- stream.on('data', chunk => {
- chunks.push(chunk);
- if (objectMode) {
- length = chunks.length;
- } else {
- length += chunk.length;
- }
- });
- stream.getBufferedValue = () => {
- if (array) {
- return chunks;
- }
- return isBuffer ? Buffer.concat(chunks, length) : chunks.join('');
- };
- stream.getBufferedLength = () => length;
- return stream;
+const normalizeSignal=function({
+name,
+number:defaultNumber,
+description,
+action,
+forced=false,
+standard})
+{
+const{
+signals:{[name]:constantSignal}}=
+_os.constants;
+const supported=constantSignal!==undefined;
+const number=supported?constantSignal:defaultNumber;
+return{name,number,description,supported,action,forced,standard};
};
-
+//# sourceMappingURL=signals.js.map
/***/ }),
-/* 388 */
+/* 393 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
+Object.defineProperty(exports,"__esModule",{value:true});exports.SIGNALS=void 0;
+const SIGNALS=[
+{
+name:"SIGHUP",
+number:1,
+action:"terminate",
+description:"Terminal closed",
+standard:"posix"},
-const { PassThrough } = __webpack_require__(27);
-
-module.exports = function (/*streams...*/) {
- var sources = []
- var output = new PassThrough({objectMode: true})
-
- output.setMaxListeners(0)
+{
+name:"SIGINT",
+number:2,
+action:"terminate",
+description:"User interruption with CTRL-C",
+standard:"ansi"},
- output.add = add
- output.isEmpty = isEmpty
+{
+name:"SIGQUIT",
+number:3,
+action:"core",
+description:"User interruption with CTRL-\\",
+standard:"posix"},
- output.on('unpipe', remove)
+{
+name:"SIGILL",
+number:4,
+action:"core",
+description:"Invalid machine instruction",
+standard:"ansi"},
- Array.prototype.slice.call(arguments).forEach(add)
+{
+name:"SIGTRAP",
+number:5,
+action:"core",
+description:"Debugger breakpoint",
+standard:"posix"},
- return output
+{
+name:"SIGABRT",
+number:6,
+action:"core",
+description:"Aborted",
+standard:"ansi"},
- function add (source) {
- if (Array.isArray(source)) {
- source.forEach(add)
- return this
- }
+{
+name:"SIGIOT",
+number:6,
+action:"core",
+description:"Aborted",
+standard:"bsd"},
- sources.push(source);
- source.once('end', remove.bind(null, source))
- source.once('error', output.emit.bind(output, 'error'))
- source.pipe(output, {end: false})
- return this
- }
+{
+name:"SIGBUS",
+number:7,
+action:"core",
+description:
+"Bus error due to misaligned, non-existing address or paging error",
+standard:"bsd"},
- function isEmpty () {
- return sources.length == 0;
- }
+{
+name:"SIGEMT",
+number:7,
+action:"terminate",
+description:"Command should be emulated but is not implemented",
+standard:"other"},
- function remove (source) {
- sources = sources.filter(function (it) { return it !== source })
- if (!sources.length && output.readable) { output.end() }
- }
-}
+{
+name:"SIGFPE",
+number:8,
+action:"core",
+description:"Floating point arithmetic error",
+standard:"ansi"},
+{
+name:"SIGKILL",
+number:9,
+action:"terminate",
+description:"Forced termination",
+standard:"posix",
+forced:true},
-/***/ }),
-/* 389 */
-/***/ (function(module, exports, __webpack_require__) {
+{
+name:"SIGUSR1",
+number:10,
+action:"terminate",
+description:"Application-specific signal",
+standard:"posix"},
-"use strict";
+{
+name:"SIGSEGV",
+number:11,
+action:"core",
+description:"Segmentation fault",
+standard:"ansi"},
-const mergePromiseProperty = (spawned, promise, property) => {
- // Starting the main `promise` is deferred to avoid consuming streams
- const value = typeof promise === 'function' ?
- (...args) => promise()[property](...args) :
- promise[property].bind(promise);
+{
+name:"SIGUSR2",
+number:12,
+action:"terminate",
+description:"Application-specific signal",
+standard:"posix"},
- Object.defineProperty(spawned, property, {
- value,
- writable: true,
- enumerable: false,
- configurable: true
- });
-};
+{
+name:"SIGPIPE",
+number:13,
+action:"terminate",
+description:"Broken pipe or socket",
+standard:"posix"},
-// The return value is a mixin of `childProcess` and `Promise`
-const mergePromise = (spawned, promise) => {
- mergePromiseProperty(spawned, promise, 'then');
- mergePromiseProperty(spawned, promise, 'catch');
- mergePromiseProperty(spawned, promise, 'finally');
- return spawned;
-};
+{
+name:"SIGALRM",
+number:14,
+action:"terminate",
+description:"Timeout or timer",
+standard:"posix"},
-// Use promises instead of `child_process` events
-const getSpawnedPromise = spawned => {
- return new Promise((resolve, reject) => {
- spawned.on('exit', (exitCode, signal) => {
- resolve({exitCode, signal});
- });
+{
+name:"SIGTERM",
+number:15,
+action:"terminate",
+description:"Termination",
+standard:"ansi"},
- spawned.on('error', error => {
- reject(error);
- });
+{
+name:"SIGSTKFLT",
+number:16,
+action:"terminate",
+description:"Stack is empty or overflowed",
+standard:"other"},
- if (spawned.stdin) {
- spawned.stdin.on('error', error => {
- reject(error);
- });
- }
- });
-};
+{
+name:"SIGCHLD",
+number:17,
+action:"ignore",
+description:"Child process terminated, paused or unpaused",
+standard:"posix"},
-module.exports = {
- mergePromise,
- getSpawnedPromise
-};
+{
+name:"SIGCLD",
+number:17,
+action:"ignore",
+description:"Child process terminated, paused or unpaused",
+standard:"other"},
+{
+name:"SIGCONT",
+number:18,
+action:"unpause",
+description:"Unpaused",
+standard:"posix",
+forced:true},
+{
+name:"SIGSTOP",
+number:19,
+action:"pause",
+description:"Paused",
+standard:"posix",
+forced:true},
-/***/ }),
-/* 390 */
-/***/ (function(module, exports, __webpack_require__) {
+{
+name:"SIGTSTP",
+number:20,
+action:"pause",
+description:"Paused using CTRL-Z or \"suspend\"",
+standard:"posix"},
-"use strict";
+{
+name:"SIGTTIN",
+number:21,
+action:"pause",
+description:"Background process cannot read terminal input",
+standard:"posix"},
-const SPACES_REGEXP = / +/g;
+{
+name:"SIGBREAK",
+number:21,
+action:"terminate",
+description:"User interruption with CTRL-BREAK",
+standard:"other"},
-const joinCommand = (file, args = []) => {
- if (!Array.isArray(args)) {
- return file;
- }
+{
+name:"SIGTTOU",
+number:22,
+action:"pause",
+description:"Background process cannot write to terminal output",
+standard:"posix"},
- return [file, ...args].join(' ');
-};
+{
+name:"SIGURG",
+number:23,
+action:"ignore",
+description:"Socket received out-of-band data",
+standard:"bsd"},
-// Allow spaces to be escaped by a backslash if not meant as a delimiter
-const handleEscaping = (tokens, token, index) => {
- if (index === 0) {
- return [token];
- }
+{
+name:"SIGXCPU",
+number:24,
+action:"core",
+description:"Process timed out",
+standard:"bsd"},
- const previousToken = tokens[tokens.length - 1];
+{
+name:"SIGXFSZ",
+number:25,
+action:"core",
+description:"File too big",
+standard:"bsd"},
- if (previousToken.endsWith('\\')) {
- return [...tokens.slice(0, -1), `${previousToken.slice(0, -1)} ${token}`];
- }
+{
+name:"SIGVTALRM",
+number:26,
+action:"terminate",
+description:"Timeout or timer",
+standard:"bsd"},
- return [...tokens, token];
-};
+{
+name:"SIGPROF",
+number:27,
+action:"terminate",
+description:"Timeout or timer",
+standard:"bsd"},
-// Handle `execa.command()`
-const parseCommand = command => {
- return command
- .trim()
- .split(SPACES_REGEXP)
- .reduce(handleEscaping, []);
-};
+{
+name:"SIGWINCH",
+number:28,
+action:"ignore",
+description:"Terminal window size changed",
+standard:"bsd"},
-module.exports = {
- joinCommand,
- parseCommand
-};
+{
+name:"SIGIO",
+number:29,
+action:"terminate",
+description:"I/O is available",
+standard:"other"},
+{
+name:"SIGPOLL",
+number:29,
+action:"terminate",
+description:"Watched event",
+standard:"other"},
-/***/ }),
-/* 391 */
-/***/ (function(module, __webpack_exports__, __webpack_require__) {
+{
+name:"SIGINFO",
+number:29,
+action:"ignore",
+description:"Request for process information",
+standard:"other"},
-"use strict";
-__webpack_require__.r(__webpack_exports__);
-/* harmony import */ var _internal_Observable__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(193);
-/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "Observable", function() { return _internal_Observable__WEBPACK_IMPORTED_MODULE_0__["Observable"]; });
+{
+name:"SIGPWR",
+number:30,
+action:"terminate",
+description:"Device running out of power",
+standard:"systemv"},
-/* harmony import */ var _internal_observable_ConnectableObservable__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(283);
-/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "ConnectableObservable", function() { return _internal_observable_ConnectableObservable__WEBPACK_IMPORTED_MODULE_1__["ConnectableObservable"]; });
+{
+name:"SIGSYS",
+number:31,
+action:"core",
+description:"Invalid system call",
+standard:"other"},
-/* harmony import */ var _internal_operators_groupBy__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(264);
-/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "GroupedObservable", function() { return _internal_operators_groupBy__WEBPACK_IMPORTED_MODULE_2__["GroupedObservable"]; });
+{
+name:"SIGUNUSED",
+number:31,
+action:"terminate",
+description:"Invalid system call",
+standard:"other"}];exports.SIGNALS=SIGNALS;
+//# sourceMappingURL=core.js.map
-/* harmony import */ var _internal_symbol_observable__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(190);
-/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "observable", function() { return _internal_symbol_observable__WEBPACK_IMPORTED_MODULE_3__["observable"]; });
+/***/ }),
+/* 394 */
+/***/ (function(module, exports, __webpack_require__) {
-/* harmony import */ var _internal_Subject__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(265);
-/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "Subject", function() { return _internal_Subject__WEBPACK_IMPORTED_MODULE_4__["Subject"]; });
+"use strict";
+Object.defineProperty(exports,"__esModule",{value:true});exports.SIGRTMAX=exports.getRealtimeSignals=void 0;
+const getRealtimeSignals=function(){
+const length=SIGRTMAX-SIGRTMIN+1;
+return Array.from({length},getRealtimeSignal);
+};exports.getRealtimeSignals=getRealtimeSignals;
-/* harmony import */ var _internal_BehaviorSubject__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(293);
-/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "BehaviorSubject", function() { return _internal_BehaviorSubject__WEBPACK_IMPORTED_MODULE_5__["BehaviorSubject"]; });
+const getRealtimeSignal=function(value,index){
+return{
+name:`SIGRT${index+1}`,
+number:SIGRTMIN+index,
+action:"terminate",
+description:"Application-specific signal (realtime)",
+standard:"posix"};
-/* harmony import */ var _internal_ReplaySubject__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(297);
-/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "ReplaySubject", function() { return _internal_ReplaySubject__WEBPACK_IMPORTED_MODULE_6__["ReplaySubject"]; });
-
-/* harmony import */ var _internal_AsyncSubject__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(295);
-/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "AsyncSubject", function() { return _internal_AsyncSubject__WEBPACK_IMPORTED_MODULE_7__["AsyncSubject"]; });
-
-/* harmony import */ var _internal_scheduler_asap__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(320);
-/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "asapScheduler", function() { return _internal_scheduler_asap__WEBPACK_IMPORTED_MODULE_8__["asap"]; });
-
-/* harmony import */ var _internal_scheduler_async__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(199);
-/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "asyncScheduler", function() { return _internal_scheduler_async__WEBPACK_IMPORTED_MODULE_9__["async"]; });
-
-/* harmony import */ var _internal_scheduler_queue__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(298);
-/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "queueScheduler", function() { return _internal_scheduler_queue__WEBPACK_IMPORTED_MODULE_10__["queue"]; });
-
-/* harmony import */ var _internal_scheduler_animationFrame__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(392);
-/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "animationFrameScheduler", function() { return _internal_scheduler_animationFrame__WEBPACK_IMPORTED_MODULE_11__["animationFrame"]; });
-
-/* harmony import */ var _internal_scheduler_VirtualTimeScheduler__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(395);
-/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "VirtualTimeScheduler", function() { return _internal_scheduler_VirtualTimeScheduler__WEBPACK_IMPORTED_MODULE_12__["VirtualTimeScheduler"]; });
-
-/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "VirtualAction", function() { return _internal_scheduler_VirtualTimeScheduler__WEBPACK_IMPORTED_MODULE_12__["VirtualAction"]; });
-
-/* harmony import */ var _internal_Scheduler__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(203);
-/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "Scheduler", function() { return _internal_Scheduler__WEBPACK_IMPORTED_MODULE_13__["Scheduler"]; });
-
-/* harmony import */ var _internal_Subscription__WEBPACK_IMPORTED_MODULE_14__ = __webpack_require__(177);
-/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "Subscription", function() { return _internal_Subscription__WEBPACK_IMPORTED_MODULE_14__["Subscription"]; });
-
-/* harmony import */ var _internal_Subscriber__WEBPACK_IMPORTED_MODULE_15__ = __webpack_require__(172);
-/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "Subscriber", function() { return _internal_Subscriber__WEBPACK_IMPORTED_MODULE_15__["Subscriber"]; });
-
-/* harmony import */ var _internal_Notification__WEBPACK_IMPORTED_MODULE_16__ = __webpack_require__(241);
-/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "Notification", function() { return _internal_Notification__WEBPACK_IMPORTED_MODULE_16__["Notification"]; });
-
-/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "NotificationKind", function() { return _internal_Notification__WEBPACK_IMPORTED_MODULE_16__["NotificationKind"]; });
-
-/* harmony import */ var _internal_util_pipe__WEBPACK_IMPORTED_MODULE_17__ = __webpack_require__(196);
-/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "pipe", function() { return _internal_util_pipe__WEBPACK_IMPORTED_MODULE_17__["pipe"]; });
-
-/* harmony import */ var _internal_util_noop__WEBPACK_IMPORTED_MODULE_18__ = __webpack_require__(197);
-/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "noop", function() { return _internal_util_noop__WEBPACK_IMPORTED_MODULE_18__["noop"]; });
-
-/* harmony import */ var _internal_util_identity__WEBPACK_IMPORTED_MODULE_19__ = __webpack_require__(232);
-/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "identity", function() { return _internal_util_identity__WEBPACK_IMPORTED_MODULE_19__["identity"]; });
-
-/* harmony import */ var _internal_util_isObservable__WEBPACK_IMPORTED_MODULE_20__ = __webpack_require__(396);
-/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "isObservable", function() { return _internal_util_isObservable__WEBPACK_IMPORTED_MODULE_20__["isObservable"]; });
-
-/* harmony import */ var _internal_util_ArgumentOutOfRangeError__WEBPACK_IMPORTED_MODULE_21__ = __webpack_require__(250);
-/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "ArgumentOutOfRangeError", function() { return _internal_util_ArgumentOutOfRangeError__WEBPACK_IMPORTED_MODULE_21__["ArgumentOutOfRangeError"]; });
-
-/* harmony import */ var _internal_util_EmptyError__WEBPACK_IMPORTED_MODULE_22__ = __webpack_require__(253);
-/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "EmptyError", function() { return _internal_util_EmptyError__WEBPACK_IMPORTED_MODULE_22__["EmptyError"]; });
-
-/* harmony import */ var _internal_util_ObjectUnsubscribedError__WEBPACK_IMPORTED_MODULE_23__ = __webpack_require__(266);
-/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "ObjectUnsubscribedError", function() { return _internal_util_ObjectUnsubscribedError__WEBPACK_IMPORTED_MODULE_23__["ObjectUnsubscribedError"]; });
-
-/* harmony import */ var _internal_util_UnsubscriptionError__WEBPACK_IMPORTED_MODULE_24__ = __webpack_require__(180);
-/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "UnsubscriptionError", function() { return _internal_util_UnsubscriptionError__WEBPACK_IMPORTED_MODULE_24__["UnsubscriptionError"]; });
-
-/* harmony import */ var _internal_util_TimeoutError__WEBPACK_IMPORTED_MODULE_25__ = __webpack_require__(335);
-/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "TimeoutError", function() { return _internal_util_TimeoutError__WEBPACK_IMPORTED_MODULE_25__["TimeoutError"]; });
-
-/* harmony import */ var _internal_observable_bindCallback__WEBPACK_IMPORTED_MODULE_26__ = __webpack_require__(397);
-/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "bindCallback", function() { return _internal_observable_bindCallback__WEBPACK_IMPORTED_MODULE_26__["bindCallback"]; });
-
-/* harmony import */ var _internal_observable_bindNodeCallback__WEBPACK_IMPORTED_MODULE_27__ = __webpack_require__(398);
-/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "bindNodeCallback", function() { return _internal_observable_bindNodeCallback__WEBPACK_IMPORTED_MODULE_27__["bindNodeCallback"]; });
-
-/* harmony import */ var _internal_observable_combineLatest__WEBPACK_IMPORTED_MODULE_28__ = __webpack_require__(214);
-/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "combineLatest", function() { return _internal_observable_combineLatest__WEBPACK_IMPORTED_MODULE_28__["combineLatest"]; });
-
-/* harmony import */ var _internal_observable_concat__WEBPACK_IMPORTED_MODULE_29__ = __webpack_require__(226);
-/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "concat", function() { return _internal_observable_concat__WEBPACK_IMPORTED_MODULE_29__["concat"]; });
-
-/* harmony import */ var _internal_observable_defer__WEBPACK_IMPORTED_MODULE_30__ = __webpack_require__(333);
-/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "defer", function() { return _internal_observable_defer__WEBPACK_IMPORTED_MODULE_30__["defer"]; });
-
-/* harmony import */ var _internal_observable_empty__WEBPACK_IMPORTED_MODULE_31__ = __webpack_require__(242);
-/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "empty", function() { return _internal_observable_empty__WEBPACK_IMPORTED_MODULE_31__["empty"]; });
-
-/* harmony import */ var _internal_observable_forkJoin__WEBPACK_IMPORTED_MODULE_32__ = __webpack_require__(399);
-/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "forkJoin", function() { return _internal_observable_forkJoin__WEBPACK_IMPORTED_MODULE_32__["forkJoin"]; });
-
-/* harmony import */ var _internal_observable_from__WEBPACK_IMPORTED_MODULE_33__ = __webpack_require__(218);
-/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "from", function() { return _internal_observable_from__WEBPACK_IMPORTED_MODULE_33__["from"]; });
-
-/* harmony import */ var _internal_observable_fromEvent__WEBPACK_IMPORTED_MODULE_34__ = __webpack_require__(400);
-/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "fromEvent", function() { return _internal_observable_fromEvent__WEBPACK_IMPORTED_MODULE_34__["fromEvent"]; });
-
-/* harmony import */ var _internal_observable_fromEventPattern__WEBPACK_IMPORTED_MODULE_35__ = __webpack_require__(401);
-/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "fromEventPattern", function() { return _internal_observable_fromEventPattern__WEBPACK_IMPORTED_MODULE_35__["fromEventPattern"]; });
-
-/* harmony import */ var _internal_observable_generate__WEBPACK_IMPORTED_MODULE_36__ = __webpack_require__(402);
-/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "generate", function() { return _internal_observable_generate__WEBPACK_IMPORTED_MODULE_36__["generate"]; });
-
-/* harmony import */ var _internal_observable_iif__WEBPACK_IMPORTED_MODULE_37__ = __webpack_require__(403);
-/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "iif", function() { return _internal_observable_iif__WEBPACK_IMPORTED_MODULE_37__["iif"]; });
-
-/* harmony import */ var _internal_observable_interval__WEBPACK_IMPORTED_MODULE_38__ = __webpack_require__(404);
-/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "interval", function() { return _internal_observable_interval__WEBPACK_IMPORTED_MODULE_38__["interval"]; });
-
-/* harmony import */ var _internal_observable_merge__WEBPACK_IMPORTED_MODULE_39__ = __webpack_require__(278);
-/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "merge", function() { return _internal_observable_merge__WEBPACK_IMPORTED_MODULE_39__["merge"]; });
-
-/* harmony import */ var _internal_observable_never__WEBPACK_IMPORTED_MODULE_40__ = __webpack_require__(405);
-/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "never", function() { return _internal_observable_never__WEBPACK_IMPORTED_MODULE_40__["never"]; });
-
-/* harmony import */ var _internal_observable_of__WEBPACK_IMPORTED_MODULE_41__ = __webpack_require__(227);
-/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "of", function() { return _internal_observable_of__WEBPACK_IMPORTED_MODULE_41__["of"]; });
-
-/* harmony import */ var _internal_observable_onErrorResumeNext__WEBPACK_IMPORTED_MODULE_42__ = __webpack_require__(406);
-/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "onErrorResumeNext", function() { return _internal_observable_onErrorResumeNext__WEBPACK_IMPORTED_MODULE_42__["onErrorResumeNext"]; });
-
-/* harmony import */ var _internal_observable_pairs__WEBPACK_IMPORTED_MODULE_43__ = __webpack_require__(407);
-/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "pairs", function() { return _internal_observable_pairs__WEBPACK_IMPORTED_MODULE_43__["pairs"]; });
-
-/* harmony import */ var _internal_observable_partition__WEBPACK_IMPORTED_MODULE_44__ = __webpack_require__(408);
-/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "partition", function() { return _internal_observable_partition__WEBPACK_IMPORTED_MODULE_44__["partition"]; });
-
-/* harmony import */ var _internal_observable_race__WEBPACK_IMPORTED_MODULE_45__ = __webpack_require__(302);
-/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "race", function() { return _internal_observable_race__WEBPACK_IMPORTED_MODULE_45__["race"]; });
-
-/* harmony import */ var _internal_observable_range__WEBPACK_IMPORTED_MODULE_46__ = __webpack_require__(409);
-/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "range", function() { return _internal_observable_range__WEBPACK_IMPORTED_MODULE_46__["range"]; });
-
-/* harmony import */ var _internal_observable_throwError__WEBPACK_IMPORTED_MODULE_47__ = __webpack_require__(243);
-/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "throwError", function() { return _internal_observable_throwError__WEBPACK_IMPORTED_MODULE_47__["throwError"]; });
-
-/* harmony import */ var _internal_observable_timer__WEBPACK_IMPORTED_MODULE_48__ = __webpack_require__(204);
-/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "timer", function() { return _internal_observable_timer__WEBPACK_IMPORTED_MODULE_48__["timer"]; });
-
-/* harmony import */ var _internal_observable_using__WEBPACK_IMPORTED_MODULE_49__ = __webpack_require__(410);
-/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "using", function() { return _internal_observable_using__WEBPACK_IMPORTED_MODULE_49__["using"]; });
-
-/* harmony import */ var _internal_observable_zip__WEBPACK_IMPORTED_MODULE_50__ = __webpack_require__(346);
-/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "zip", function() { return _internal_observable_zip__WEBPACK_IMPORTED_MODULE_50__["zip"]; });
-
-/* harmony import */ var _internal_scheduled_scheduled__WEBPACK_IMPORTED_MODULE_51__ = __webpack_require__(219);
-/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "scheduled", function() { return _internal_scheduled_scheduled__WEBPACK_IMPORTED_MODULE_51__["scheduled"]; });
-
-/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "EMPTY", function() { return _internal_observable_empty__WEBPACK_IMPORTED_MODULE_31__["EMPTY"]; });
-
-/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "NEVER", function() { return _internal_observable_never__WEBPACK_IMPORTED_MODULE_40__["NEVER"]; });
-
-/* harmony import */ var _internal_config__WEBPACK_IMPORTED_MODULE_52__ = __webpack_require__(175);
-/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "config", function() { return _internal_config__WEBPACK_IMPORTED_MODULE_52__["config"]; });
-
-/** PURE_IMPORTS_START PURE_IMPORTS_END */
+};
+const SIGRTMIN=34;
+const SIGRTMAX=64;exports.SIGRTMAX=SIGRTMAX;
+//# sourceMappingURL=realtime.js.map
+/***/ }),
+/* 395 */
+/***/ (function(module, exports, __webpack_require__) {
+"use strict";
+const aliases = ['stdin', 'stdout', 'stderr'];
+const hasAlias = opts => aliases.some(alias => opts[alias] !== undefined);
+const normalizeStdio = opts => {
+ if (!opts) {
+ return;
+ }
+ const {stdio} = opts;
+ if (stdio === undefined) {
+ return aliases.map(alias => opts[alias]);
+ }
+ if (hasAlias(opts)) {
+ throw new Error(`It's not possible to provide \`stdio\` in combination with one of ${aliases.map(alias => `\`${alias}\``).join(', ')}`);
+ }
+ if (typeof stdio === 'string') {
+ return stdio;
+ }
+ if (!Array.isArray(stdio)) {
+ throw new TypeError(`Expected \`stdio\` to be of type \`string\` or \`Array\`, got \`${typeof stdio}\``);
+ }
+ const length = Math.max(stdio.length, aliases.length);
+ return Array.from({length}, (value, index) => stdio[index]);
+};
+module.exports = normalizeStdio;
+// `ipc` is pushed unless it is already present
+module.exports.node = opts => {
+ const stdio = normalizeStdio(opts);
+ if (stdio === 'ipc') {
+ return 'ipc';
+ }
+ if (stdio === undefined || typeof stdio === 'string') {
+ return [stdio, stdio, stdio, 'ipc'];
+ }
+ if (stdio.includes('ipc')) {
+ return stdio;
+ }
+ return [...stdio, 'ipc'];
+};
+/***/ }),
+/* 396 */
+/***/ (function(module, exports, __webpack_require__) {
+"use strict";
+const os = __webpack_require__(11);
+const onExit = __webpack_require__(397);
+const DEFAULT_FORCE_KILL_TIMEOUT = 1000 * 5;
+// Monkey-patches `childProcess.kill()` to add `forceKillAfterTimeout` behavior
+const spawnedKill = (kill, signal = 'SIGTERM', options = {}) => {
+ const killResult = kill(signal);
+ setKillTimeout(kill, signal, options, killResult);
+ return killResult;
+};
+const setKillTimeout = (kill, signal, options, killResult) => {
+ if (!shouldForceKill(signal, options, killResult)) {
+ return;
+ }
+ const timeout = getForceKillAfterTimeout(options);
+ const t = setTimeout(() => {
+ kill('SIGKILL');
+ }, timeout);
+ // Guarded because there's no `.unref()` when `execa` is used in the renderer
+ // process in Electron. This cannot be tested since we don't run tests in
+ // Electron.
+ // istanbul ignore else
+ if (t.unref) {
+ t.unref();
+ }
+};
+const shouldForceKill = (signal, {forceKillAfterTimeout}, killResult) => {
+ return isSigterm(signal) && forceKillAfterTimeout !== false && killResult;
+};
+const isSigterm = signal => {
+ return signal === os.constants.signals.SIGTERM ||
+ (typeof signal === 'string' && signal.toUpperCase() === 'SIGTERM');
+};
+const getForceKillAfterTimeout = ({forceKillAfterTimeout = true}) => {
+ if (forceKillAfterTimeout === true) {
+ return DEFAULT_FORCE_KILL_TIMEOUT;
+ }
+ if (!Number.isInteger(forceKillAfterTimeout) || forceKillAfterTimeout < 0) {
+ throw new TypeError(`Expected the \`forceKillAfterTimeout\` option to be a non-negative integer, got \`${forceKillAfterTimeout}\` (${typeof forceKillAfterTimeout})`);
+ }
+ return forceKillAfterTimeout;
+};
+// `childProcess.cancel()`
+const spawnedCancel = (spawned, context) => {
+ const killResult = spawned.kill();
+ if (killResult) {
+ context.isCanceled = true;
+ }
+};
+const timeoutKill = (spawned, signal, reject) => {
+ spawned.kill(signal);
+ reject(Object.assign(new Error('Timed out'), {timedOut: true, signal}));
+};
+// `timeout` option handling
+const setupTimeout = (spawned, {timeout, killSignal = 'SIGTERM'}, spawnedPromise) => {
+ if (timeout === 0 || timeout === undefined) {
+ return spawnedPromise;
+ }
+ if (!Number.isInteger(timeout) || timeout < 0) {
+ throw new TypeError(`Expected the \`timeout\` option to be a non-negative integer, got \`${timeout}\` (${typeof timeout})`);
+ }
+ let timeoutId;
+ const timeoutPromise = new Promise((resolve, reject) => {
+ timeoutId = setTimeout(() => {
+ timeoutKill(spawned, killSignal, reject);
+ }, timeout);
+ });
+ const safeSpawnedPromise = spawnedPromise.finally(() => {
+ clearTimeout(timeoutId);
+ });
+ return Promise.race([timeoutPromise, safeSpawnedPromise]);
+};
+// `cleanup` option handling
+const setExitHandler = async (spawned, {cleanup, detached}, timedPromise) => {
+ if (!cleanup || detached) {
+ return timedPromise;
+ }
+ const removeExitHandler = onExit(() => {
+ spawned.kill();
+ });
+ return timedPromise.finally(() => {
+ removeExitHandler();
+ });
+};
+module.exports = {
+ spawnedKill,
+ spawnedCancel,
+ setupTimeout,
+ setExitHandler
+};
+/***/ }),
+/* 397 */
+/***/ (function(module, exports, __webpack_require__) {
+// Note: since nyc uses this module to output coverage, any lines
+// that are in the direct sync flow of nyc's outputCoverage are
+// ignored, since we can never get coverage for them.
+var assert = __webpack_require__(30)
+var signals = __webpack_require__(398)
+var EE = __webpack_require__(399)
+/* istanbul ignore if */
+if (typeof EE !== 'function') {
+ EE = EE.EventEmitter
+}
+var emitter
+if (process.__signal_exit_emitter__) {
+ emitter = process.__signal_exit_emitter__
+} else {
+ emitter = process.__signal_exit_emitter__ = new EE()
+ emitter.count = 0
+ emitter.emitted = {}
+}
+// Because this emitter is a global, we have to check to see if a
+// previous version of this library failed to enable infinite listeners.
+// I know what you're about to say. But literally everything about
+// signal-exit is a compromise with evil. Get used to it.
+if (!emitter.infinite) {
+ emitter.setMaxListeners(Infinity)
+ emitter.infinite = true
+}
+module.exports = function (cb, opts) {
+ assert.equal(typeof cb, 'function', 'a callback must be provided for exit handler')
+ if (loaded === false) {
+ load()
+ }
+ var ev = 'exit'
+ if (opts && opts.alwaysLast) {
+ ev = 'afterexit'
+ }
+ var remove = function () {
+ emitter.removeListener(ev, cb)
+ if (emitter.listeners('exit').length === 0 &&
+ emitter.listeners('afterexit').length === 0) {
+ unload()
+ }
+ }
+ emitter.on(ev, cb)
-//# sourceMappingURL=index.js.map
+ return remove
+}
+module.exports.unload = unload
+function unload () {
+ if (!loaded) {
+ return
+ }
+ loaded = false
-/***/ }),
-/* 392 */
-/***/ (function(module, __webpack_exports__, __webpack_require__) {
+ signals.forEach(function (sig) {
+ try {
+ process.removeListener(sig, sigListeners[sig])
+ } catch (er) {}
+ })
+ process.emit = originalProcessEmit
+ process.reallyExit = originalProcessReallyExit
+ emitter.count -= 1
+}
-"use strict";
-__webpack_require__.r(__webpack_exports__);
-/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "animationFrame", function() { return animationFrame; });
-/* harmony import */ var _AnimationFrameAction__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(393);
-/* harmony import */ var _AnimationFrameScheduler__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(394);
-/** PURE_IMPORTS_START _AnimationFrameAction,_AnimationFrameScheduler PURE_IMPORTS_END */
+function emit (event, code, signal) {
+ if (emitter.emitted[event]) {
+ return
+ }
+ emitter.emitted[event] = true
+ emitter.emit(event, code, signal)
+}
+// { : , ... }
+var sigListeners = {}
+signals.forEach(function (sig) {
+ sigListeners[sig] = function listener () {
+ // If there are no other listeners, an exit is coming!
+ // Simplest way: remove us and then re-send the signal.
+ // We know that this will kill the process, so we can
+ // safely emit now.
+ var listeners = process.listeners(sig)
+ if (listeners.length === emitter.count) {
+ unload()
+ emit('exit', null, sig)
+ /* istanbul ignore next */
+ emit('afterexit', null, sig)
+ /* istanbul ignore next */
+ process.kill(process.pid, sig)
+ }
+ }
+})
-var animationFrame = /*@__PURE__*/ new _AnimationFrameScheduler__WEBPACK_IMPORTED_MODULE_1__["AnimationFrameScheduler"](_AnimationFrameAction__WEBPACK_IMPORTED_MODULE_0__["AnimationFrameAction"]);
-//# sourceMappingURL=animationFrame.js.map
+module.exports.signals = function () {
+ return signals
+}
+module.exports.load = load
-/***/ }),
-/* 393 */
-/***/ (function(module, __webpack_exports__, __webpack_require__) {
+var loaded = false
-"use strict";
-__webpack_require__.r(__webpack_exports__);
-/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "AnimationFrameAction", function() { return AnimationFrameAction; });
-/* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(36);
-/* harmony import */ var _AsyncAction__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(200);
-/** PURE_IMPORTS_START tslib,_AsyncAction PURE_IMPORTS_END */
+function load () {
+ if (loaded) {
+ return
+ }
+ loaded = true
+ // This is the number of onSignalExit's that are in play.
+ // It's important so that we can count the correct number of
+ // listeners on signals, and don't wait for the other one to
+ // handle it instead of us.
+ emitter.count += 1
-var AnimationFrameAction = /*@__PURE__*/ (function (_super) {
- tslib__WEBPACK_IMPORTED_MODULE_0__["__extends"](AnimationFrameAction, _super);
- function AnimationFrameAction(scheduler, work) {
- var _this = _super.call(this, scheduler, work) || this;
- _this.scheduler = scheduler;
- _this.work = work;
- return _this;
+ signals = signals.filter(function (sig) {
+ try {
+ process.on(sig, sigListeners[sig])
+ return true
+ } catch (er) {
+ return false
}
- AnimationFrameAction.prototype.requestAsyncId = function (scheduler, id, delay) {
- if (delay === void 0) {
- delay = 0;
- }
- if (delay !== null && delay > 0) {
- return _super.prototype.requestAsyncId.call(this, scheduler, id, delay);
- }
- scheduler.actions.push(this);
- return scheduler.scheduled || (scheduler.scheduled = requestAnimationFrame(function () { return scheduler.flush(null); }));
- };
- AnimationFrameAction.prototype.recycleAsyncId = function (scheduler, id, delay) {
- if (delay === void 0) {
- delay = 0;
- }
- if ((delay !== null && delay > 0) || (delay === null && this.delay > 0)) {
- return _super.prototype.recycleAsyncId.call(this, scheduler, id, delay);
- }
- if (scheduler.actions.length === 0) {
- cancelAnimationFrame(id);
- scheduler.scheduled = undefined;
- }
- return undefined;
- };
- return AnimationFrameAction;
-}(_AsyncAction__WEBPACK_IMPORTED_MODULE_1__["AsyncAction"]));
-
-//# sourceMappingURL=AnimationFrameAction.js.map
-
-
-/***/ }),
-/* 394 */
-/***/ (function(module, __webpack_exports__, __webpack_require__) {
+ })
-"use strict";
-__webpack_require__.r(__webpack_exports__);
-/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "AnimationFrameScheduler", function() { return AnimationFrameScheduler; });
-/* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(36);
-/* harmony import */ var _AsyncScheduler__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(202);
-/** PURE_IMPORTS_START tslib,_AsyncScheduler PURE_IMPORTS_END */
+ process.emit = processEmit
+ process.reallyExit = processReallyExit
+}
+var originalProcessReallyExit = process.reallyExit
+function processReallyExit (code) {
+ process.exitCode = code || 0
+ emit('exit', process.exitCode, null)
+ /* istanbul ignore next */
+ emit('afterexit', process.exitCode, null)
+ /* istanbul ignore next */
+ originalProcessReallyExit.call(process, process.exitCode)
+}
-var AnimationFrameScheduler = /*@__PURE__*/ (function (_super) {
- tslib__WEBPACK_IMPORTED_MODULE_0__["__extends"](AnimationFrameScheduler, _super);
- function AnimationFrameScheduler() {
- return _super !== null && _super.apply(this, arguments) || this;
+var originalProcessEmit = process.emit
+function processEmit (ev, arg) {
+ if (ev === 'exit') {
+ if (arg !== undefined) {
+ process.exitCode = arg
}
- AnimationFrameScheduler.prototype.flush = function (action) {
- this.active = true;
- this.scheduled = undefined;
- var actions = this.actions;
- var error;
- var index = -1;
- var count = actions.length;
- action = action || actions.shift();
- do {
- if (error = action.execute(action.state, action.delay)) {
- break;
- }
- } while (++index < count && (action = actions.shift()));
- this.active = false;
- if (error) {
- while (++index < count && (action = actions.shift())) {
- action.unsubscribe();
- }
- throw error;
- }
- };
- return AnimationFrameScheduler;
-}(_AsyncScheduler__WEBPACK_IMPORTED_MODULE_1__["AsyncScheduler"]));
-
-//# sourceMappingURL=AnimationFrameScheduler.js.map
+ var ret = originalProcessEmit.apply(this, arguments)
+ emit('exit', process.exitCode, null)
+ /* istanbul ignore next */
+ emit('afterexit', process.exitCode, null)
+ return ret
+ } else {
+ return originalProcessEmit.apply(this, arguments)
+ }
+}
/***/ }),
-/* 395 */
-/***/ (function(module, __webpack_exports__, __webpack_require__) {
-
-"use strict";
-__webpack_require__.r(__webpack_exports__);
-/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "VirtualTimeScheduler", function() { return VirtualTimeScheduler; });
-/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "VirtualAction", function() { return VirtualAction; });
-/* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(36);
-/* harmony import */ var _AsyncAction__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(200);
-/* harmony import */ var _AsyncScheduler__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(202);
-/** PURE_IMPORTS_START tslib,_AsyncAction,_AsyncScheduler PURE_IMPORTS_END */
-
-
+/* 398 */
+/***/ (function(module, exports) {
-var VirtualTimeScheduler = /*@__PURE__*/ (function (_super) {
- tslib__WEBPACK_IMPORTED_MODULE_0__["__extends"](VirtualTimeScheduler, _super);
- function VirtualTimeScheduler(SchedulerAction, maxFrames) {
- if (SchedulerAction === void 0) {
- SchedulerAction = VirtualAction;
- }
- if (maxFrames === void 0) {
- maxFrames = Number.POSITIVE_INFINITY;
- }
- var _this = _super.call(this, SchedulerAction, function () { return _this.frame; }) || this;
- _this.maxFrames = maxFrames;
- _this.frame = 0;
- _this.index = -1;
- return _this;
- }
- VirtualTimeScheduler.prototype.flush = function () {
- var _a = this, actions = _a.actions, maxFrames = _a.maxFrames;
- var error, action;
- while ((action = actions[0]) && action.delay <= maxFrames) {
- actions.shift();
- this.frame = action.delay;
- if (error = action.execute(action.state, action.delay)) {
- break;
- }
- }
- if (error) {
- while (action = actions.shift()) {
- action.unsubscribe();
- }
- throw error;
- }
- };
- VirtualTimeScheduler.frameTimeFactor = 10;
- return VirtualTimeScheduler;
-}(_AsyncScheduler__WEBPACK_IMPORTED_MODULE_2__["AsyncScheduler"]));
+// This is not the set of all possible signals.
+//
+// It IS, however, the set of all signals that trigger
+// an exit on either Linux or BSD systems. Linux is a
+// superset of the signal names supported on BSD, and
+// the unknown signals just fail to register, so we can
+// catch that easily enough.
+//
+// Don't bother with SIGKILL. It's uncatchable, which
+// means that we can't fire any callbacks anyway.
+//
+// If a user does happen to register a handler on a non-
+// fatal signal like SIGWINCH or something, and then
+// exit, it'll end up firing `process.emit('exit')`, so
+// the handler will be fired anyway.
+//
+// SIGBUS, SIGFPE, SIGSEGV and SIGILL, when not raised
+// artificially, inherently leave the process in a
+// state from which it is not safe to try and enter JS
+// listeners.
+module.exports = [
+ 'SIGABRT',
+ 'SIGALRM',
+ 'SIGHUP',
+ 'SIGINT',
+ 'SIGTERM'
+]
-var VirtualAction = /*@__PURE__*/ (function (_super) {
- tslib__WEBPACK_IMPORTED_MODULE_0__["__extends"](VirtualAction, _super);
- function VirtualAction(scheduler, work, index) {
- if (index === void 0) {
- index = scheduler.index += 1;
- }
- var _this = _super.call(this, scheduler, work) || this;
- _this.scheduler = scheduler;
- _this.work = work;
- _this.index = index;
- _this.active = true;
- _this.index = scheduler.index = index;
- return _this;
- }
- VirtualAction.prototype.schedule = function (state, delay) {
- if (delay === void 0) {
- delay = 0;
- }
- if (!this.id) {
- return _super.prototype.schedule.call(this, state, delay);
- }
- this.active = false;
- var action = new VirtualAction(this.scheduler, this.work);
- this.add(action);
- return action.schedule(state, delay);
- };
- VirtualAction.prototype.requestAsyncId = function (scheduler, id, delay) {
- if (delay === void 0) {
- delay = 0;
- }
- this.delay = scheduler.frame + delay;
- var actions = scheduler.actions;
- actions.push(this);
- actions.sort(VirtualAction.sortActions);
- return true;
- };
- VirtualAction.prototype.recycleAsyncId = function (scheduler, id, delay) {
- if (delay === void 0) {
- delay = 0;
- }
- return undefined;
- };
- VirtualAction.prototype._execute = function (state, delay) {
- if (this.active === true) {
- return _super.prototype._execute.call(this, state, delay);
- }
- };
- VirtualAction.sortActions = function (a, b) {
- if (a.delay === b.delay) {
- if (a.index === b.index) {
- return 0;
- }
- else if (a.index > b.index) {
- return 1;
- }
- else {
- return -1;
- }
- }
- else if (a.delay > b.delay) {
- return 1;
- }
- else {
- return -1;
- }
- };
- return VirtualAction;
-}(_AsyncAction__WEBPACK_IMPORTED_MODULE_1__["AsyncAction"]));
+if (process.platform !== 'win32') {
+ module.exports.push(
+ 'SIGVTALRM',
+ 'SIGXCPU',
+ 'SIGXFSZ',
+ 'SIGUSR2',
+ 'SIGTRAP',
+ 'SIGSYS',
+ 'SIGQUIT',
+ 'SIGIOT'
+ // should detect profiler and enable/disable accordingly.
+ // see #21
+ // 'SIGPROF'
+ )
+}
-//# sourceMappingURL=VirtualTimeScheduler.js.map
+if (process.platform === 'linux') {
+ module.exports.push(
+ 'SIGIO',
+ 'SIGPOLL',
+ 'SIGPWR',
+ 'SIGSTKFLT',
+ 'SIGUNUSED'
+ )
+}
/***/ }),
-/* 396 */
-/***/ (function(module, __webpack_exports__, __webpack_require__) {
-
-"use strict";
-__webpack_require__.r(__webpack_exports__);
-/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "isObservable", function() { return isObservable; });
-/* harmony import */ var _Observable__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(193);
-/** PURE_IMPORTS_START _Observable PURE_IMPORTS_END */
-
-function isObservable(obj) {
- return !!obj && (obj instanceof _Observable__WEBPACK_IMPORTED_MODULE_0__["Observable"] || (typeof obj.lift === 'function' && typeof obj.subscribe === 'function'));
-}
-//# sourceMappingURL=isObservable.js.map
+/* 399 */
+/***/ (function(module, exports) {
+module.exports = require("events");
/***/ }),
-/* 397 */
-/***/ (function(module, __webpack_exports__, __webpack_require__) {
+/* 400 */
+/***/ (function(module, exports, __webpack_require__) {
"use strict";
-__webpack_require__.r(__webpack_exports__);
-/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "bindCallback", function() { return bindCallback; });
-/* harmony import */ var _Observable__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(193);
-/* harmony import */ var _AsyncSubject__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(295);
-/* harmony import */ var _operators_map__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(231);
-/* harmony import */ var _util_canReportError__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(194);
-/* harmony import */ var _util_isArray__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(178);
-/* harmony import */ var _util_isScheduler__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(206);
-/** PURE_IMPORTS_START _Observable,_AsyncSubject,_operators_map,_util_canReportError,_util_isArray,_util_isScheduler PURE_IMPORTS_END */
-
-
-
+const isStream = __webpack_require__(401);
+const getStream = __webpack_require__(402);
+const mergeStream = __webpack_require__(408);
+// `input` option
+const handleInput = (spawned, input) => {
+ // Checking for stdin is workaround for https://github.com/nodejs/node/issues/26852
+ // TODO: Remove `|| spawned.stdin === undefined` once we drop support for Node.js <=12.2.0
+ if (input === undefined || spawned.stdin === undefined) {
+ return;
+ }
-function bindCallback(callbackFunc, resultSelector, scheduler) {
- if (resultSelector) {
- if (Object(_util_isScheduler__WEBPACK_IMPORTED_MODULE_5__["isScheduler"])(resultSelector)) {
- scheduler = resultSelector;
- }
- else {
- return function () {
- var args = [];
- for (var _i = 0; _i < arguments.length; _i++) {
- args[_i] = arguments[_i];
- }
- return bindCallback(callbackFunc, scheduler).apply(void 0, args).pipe(Object(_operators_map__WEBPACK_IMPORTED_MODULE_2__["map"])(function (args) { return Object(_util_isArray__WEBPACK_IMPORTED_MODULE_4__["isArray"])(args) ? resultSelector.apply(void 0, args) : resultSelector(args); }));
- };
- }
- }
- return function () {
- var args = [];
- for (var _i = 0; _i < arguments.length; _i++) {
- args[_i] = arguments[_i];
- }
- var context = this;
- var subject;
- var params = {
- context: context,
- subject: subject,
- callbackFunc: callbackFunc,
- scheduler: scheduler,
- };
- return new _Observable__WEBPACK_IMPORTED_MODULE_0__["Observable"](function (subscriber) {
- if (!scheduler) {
- if (!subject) {
- subject = new _AsyncSubject__WEBPACK_IMPORTED_MODULE_1__["AsyncSubject"]();
- var handler = function () {
- var innerArgs = [];
- for (var _i = 0; _i < arguments.length; _i++) {
- innerArgs[_i] = arguments[_i];
- }
- subject.next(innerArgs.length <= 1 ? innerArgs[0] : innerArgs);
- subject.complete();
- };
- try {
- callbackFunc.apply(context, args.concat([handler]));
- }
- catch (err) {
- if (Object(_util_canReportError__WEBPACK_IMPORTED_MODULE_3__["canReportError"])(subject)) {
- subject.error(err);
- }
- else {
- console.warn(err);
- }
- }
- }
- return subject.subscribe(subscriber);
- }
- else {
- var state = {
- args: args, subscriber: subscriber, params: params,
- };
- return scheduler.schedule(dispatch, 0, state);
- }
- });
- };
-}
-function dispatch(state) {
- var _this = this;
- var self = this;
- var args = state.args, subscriber = state.subscriber, params = state.params;
- var callbackFunc = params.callbackFunc, context = params.context, scheduler = params.scheduler;
- var subject = params.subject;
- if (!subject) {
- subject = params.subject = new _AsyncSubject__WEBPACK_IMPORTED_MODULE_1__["AsyncSubject"]();
- var handler = function () {
- var innerArgs = [];
- for (var _i = 0; _i < arguments.length; _i++) {
- innerArgs[_i] = arguments[_i];
- }
- var value = innerArgs.length <= 1 ? innerArgs[0] : innerArgs;
- _this.add(scheduler.schedule(dispatchNext, 0, { value: value, subject: subject }));
- };
- try {
- callbackFunc.apply(context, args.concat([handler]));
- }
- catch (err) {
- subject.error(err);
- }
- }
- this.add(subject.subscribe(subscriber));
-}
-function dispatchNext(state) {
- var value = state.value, subject = state.subject;
- subject.next(value);
- subject.complete();
-}
-function dispatchError(state) {
- var err = state.err, subject = state.subject;
- subject.error(err);
-}
-//# sourceMappingURL=bindCallback.js.map
+ if (isStream(input)) {
+ input.pipe(spawned.stdin);
+ } else {
+ spawned.stdin.end(input);
+ }
+};
+// `all` interleaves `stdout` and `stderr`
+const makeAllStream = (spawned, {all}) => {
+ if (!all || (!spawned.stdout && !spawned.stderr)) {
+ return;
+ }
-/***/ }),
-/* 398 */
-/***/ (function(module, __webpack_exports__, __webpack_require__) {
+ const mixed = mergeStream();
-"use strict";
-__webpack_require__.r(__webpack_exports__);
-/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "bindNodeCallback", function() { return bindNodeCallback; });
-/* harmony import */ var _Observable__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(193);
-/* harmony import */ var _AsyncSubject__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(295);
-/* harmony import */ var _operators_map__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(231);
-/* harmony import */ var _util_canReportError__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(194);
-/* harmony import */ var _util_isScheduler__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(206);
-/* harmony import */ var _util_isArray__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(178);
-/** PURE_IMPORTS_START _Observable,_AsyncSubject,_operators_map,_util_canReportError,_util_isScheduler,_util_isArray PURE_IMPORTS_END */
+ if (spawned.stdout) {
+ mixed.add(spawned.stdout);
+ }
+ if (spawned.stderr) {
+ mixed.add(spawned.stderr);
+ }
+ return mixed;
+};
+// On failure, `result.stdout|stderr|all` should contain the currently buffered stream
+const getBufferedData = async (stream, streamPromise) => {
+ if (!stream) {
+ return;
+ }
+ stream.destroy();
+ try {
+ return await streamPromise;
+ } catch (error) {
+ return error.bufferedData;
+ }
+};
+
+const getStreamPromise = (stream, {encoding, buffer, maxBuffer}) => {
+ if (!stream || !buffer) {
+ return;
+ }
+
+ if (encoding) {
+ return getStream(stream, {encoding, maxBuffer});
+ }
+
+ return getStream.buffer(stream, {maxBuffer});
+};
+
+// Retrieve result of child process: exit code, signal, error, streams (stdout/stderr/all)
+const getSpawnedResult = async ({stdout, stderr, all}, {encoding, buffer, maxBuffer}, processDone) => {
+ const stdoutPromise = getStreamPromise(stdout, {encoding, buffer, maxBuffer});
+ const stderrPromise = getStreamPromise(stderr, {encoding, buffer, maxBuffer});
+ const allPromise = getStreamPromise(all, {encoding, buffer, maxBuffer: maxBuffer * 2});
+
+ try {
+ return await Promise.all([processDone, stdoutPromise, stderrPromise, allPromise]);
+ } catch (error) {
+ return Promise.all([
+ {error, signal: error.signal, timedOut: error.timedOut},
+ getBufferedData(stdout, stdoutPromise),
+ getBufferedData(stderr, stderrPromise),
+ getBufferedData(all, allPromise)
+ ]);
+ }
+};
+
+const validateInputSync = ({input}) => {
+ if (isStream(input)) {
+ throw new TypeError('The `input` option cannot be a stream in sync mode');
+ }
+};
+
+module.exports = {
+ handleInput,
+ makeAllStream,
+ getSpawnedResult,
+ validateInputSync
+};
-function bindNodeCallback(callbackFunc, resultSelector, scheduler) {
- if (resultSelector) {
- if (Object(_util_isScheduler__WEBPACK_IMPORTED_MODULE_4__["isScheduler"])(resultSelector)) {
- scheduler = resultSelector;
- }
- else {
- return function () {
- var args = [];
- for (var _i = 0; _i < arguments.length; _i++) {
- args[_i] = arguments[_i];
- }
- return bindNodeCallback(callbackFunc, scheduler).apply(void 0, args).pipe(Object(_operators_map__WEBPACK_IMPORTED_MODULE_2__["map"])(function (args) { return Object(_util_isArray__WEBPACK_IMPORTED_MODULE_5__["isArray"])(args) ? resultSelector.apply(void 0, args) : resultSelector(args); }));
- };
- }
- }
- return function () {
- var args = [];
- for (var _i = 0; _i < arguments.length; _i++) {
- args[_i] = arguments[_i];
- }
- var params = {
- subject: undefined,
- args: args,
- callbackFunc: callbackFunc,
- scheduler: scheduler,
- context: this,
- };
- return new _Observable__WEBPACK_IMPORTED_MODULE_0__["Observable"](function (subscriber) {
- var context = params.context;
- var subject = params.subject;
- if (!scheduler) {
- if (!subject) {
- subject = params.subject = new _AsyncSubject__WEBPACK_IMPORTED_MODULE_1__["AsyncSubject"]();
- var handler = function () {
- var innerArgs = [];
- for (var _i = 0; _i < arguments.length; _i++) {
- innerArgs[_i] = arguments[_i];
- }
- var err = innerArgs.shift();
- if (err) {
- subject.error(err);
- return;
- }
- subject.next(innerArgs.length <= 1 ? innerArgs[0] : innerArgs);
- subject.complete();
- };
- try {
- callbackFunc.apply(context, args.concat([handler]));
- }
- catch (err) {
- if (Object(_util_canReportError__WEBPACK_IMPORTED_MODULE_3__["canReportError"])(subject)) {
- subject.error(err);
- }
- else {
- console.warn(err);
- }
- }
- }
- return subject.subscribe(subscriber);
- }
- else {
- return scheduler.schedule(dispatch, 0, { params: params, subscriber: subscriber, context: context });
- }
- });
- };
-}
-function dispatch(state) {
- var _this = this;
- var params = state.params, subscriber = state.subscriber, context = state.context;
- var callbackFunc = params.callbackFunc, args = params.args, scheduler = params.scheduler;
- var subject = params.subject;
- if (!subject) {
- subject = params.subject = new _AsyncSubject__WEBPACK_IMPORTED_MODULE_1__["AsyncSubject"]();
- var handler = function () {
- var innerArgs = [];
- for (var _i = 0; _i < arguments.length; _i++) {
- innerArgs[_i] = arguments[_i];
- }
- var err = innerArgs.shift();
- if (err) {
- _this.add(scheduler.schedule(dispatchError, 0, { err: err, subject: subject }));
- }
- else {
- var value = innerArgs.length <= 1 ? innerArgs[0] : innerArgs;
- _this.add(scheduler.schedule(dispatchNext, 0, { value: value, subject: subject }));
- }
- };
- try {
- callbackFunc.apply(context, args.concat([handler]));
- }
- catch (err) {
- this.add(scheduler.schedule(dispatchError, 0, { err: err, subject: subject }));
- }
- }
- this.add(subject.subscribe(subscriber));
-}
-function dispatchNext(arg) {
- var value = arg.value, subject = arg.subject;
- subject.next(value);
- subject.complete();
-}
-function dispatchError(arg) {
- var err = arg.err, subject = arg.subject;
- subject.error(err);
-}
-//# sourceMappingURL=bindNodeCallback.js.map
/***/ }),
-/* 399 */
-/***/ (function(module, __webpack_exports__, __webpack_require__) {
+/* 401 */
+/***/ (function(module, exports, __webpack_require__) {
"use strict";
-__webpack_require__.r(__webpack_exports__);
-/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "forkJoin", function() { return forkJoin; });
-/* harmony import */ var _Observable__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(193);
-/* harmony import */ var _util_isArray__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(178);
-/* harmony import */ var _operators_map__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(231);
-/* harmony import */ var _util_isObject__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(179);
-/* harmony import */ var _from__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(218);
-/** PURE_IMPORTS_START _Observable,_util_isArray,_operators_map,_util_isObject,_from PURE_IMPORTS_END */
+const isStream = stream =>
+ stream !== null &&
+ typeof stream === 'object' &&
+ typeof stream.pipe === 'function';
+isStream.writable = stream =>
+ isStream(stream) &&
+ stream.writable !== false &&
+ typeof stream._write === 'function' &&
+ typeof stream._writableState === 'object';
+isStream.readable = stream =>
+ isStream(stream) &&
+ stream.readable !== false &&
+ typeof stream._read === 'function' &&
+ typeof stream._readableState === 'object';
-function forkJoin() {
- var sources = [];
- for (var _i = 0; _i < arguments.length; _i++) {
- sources[_i] = arguments[_i];
- }
- if (sources.length === 1) {
- var first_1 = sources[0];
- if (Object(_util_isArray__WEBPACK_IMPORTED_MODULE_1__["isArray"])(first_1)) {
- return forkJoinInternal(first_1, null);
- }
- if (Object(_util_isObject__WEBPACK_IMPORTED_MODULE_3__["isObject"])(first_1) && Object.getPrototypeOf(first_1) === Object.prototype) {
- var keys = Object.keys(first_1);
- return forkJoinInternal(keys.map(function (key) { return first_1[key]; }), keys);
- }
- }
- if (typeof sources[sources.length - 1] === 'function') {
- var resultSelector_1 = sources.pop();
- sources = (sources.length === 1 && Object(_util_isArray__WEBPACK_IMPORTED_MODULE_1__["isArray"])(sources[0])) ? sources[0] : sources;
- return forkJoinInternal(sources, null).pipe(Object(_operators_map__WEBPACK_IMPORTED_MODULE_2__["map"])(function (args) { return resultSelector_1.apply(void 0, args); }));
- }
- return forkJoinInternal(sources, null);
-}
-function forkJoinInternal(sources, keys) {
- return new _Observable__WEBPACK_IMPORTED_MODULE_0__["Observable"](function (subscriber) {
- var len = sources.length;
- if (len === 0) {
- subscriber.complete();
- return;
- }
- var values = new Array(len);
- var completed = 0;
- var emitted = 0;
- var _loop_1 = function (i) {
- var source = Object(_from__WEBPACK_IMPORTED_MODULE_4__["from"])(sources[i]);
- var hasValue = false;
- subscriber.add(source.subscribe({
- next: function (value) {
- if (!hasValue) {
- hasValue = true;
- emitted++;
- }
- values[i] = value;
- },
- error: function (err) { return subscriber.error(err); },
- complete: function () {
- completed++;
- if (completed === len || !hasValue) {
- if (emitted === len) {
- subscriber.next(keys ?
- keys.reduce(function (result, key, i) { return (result[key] = values[i], result); }, {}) :
- values);
- }
- subscriber.complete();
- }
- }
- }));
- };
- for (var i = 0; i < len; i++) {
- _loop_1(i);
- }
- });
-}
-//# sourceMappingURL=forkJoin.js.map
+isStream.duplex = stream =>
+ isStream.writable(stream) &&
+ isStream.readable(stream);
+
+isStream.transform = stream =>
+ isStream.duplex(stream) &&
+ typeof stream._transform === 'function' &&
+ typeof stream._transformState === 'object';
+
+module.exports = isStream;
/***/ }),
-/* 400 */
-/***/ (function(module, __webpack_exports__, __webpack_require__) {
+/* 402 */
+/***/ (function(module, exports, __webpack_require__) {
"use strict";
-__webpack_require__.r(__webpack_exports__);
-/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "fromEvent", function() { return fromEvent; });
-/* harmony import */ var _Observable__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(193);
-/* harmony import */ var _util_isArray__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(178);
-/* harmony import */ var _util_isFunction__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(173);
-/* harmony import */ var _operators_map__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(231);
-/** PURE_IMPORTS_START _Observable,_util_isArray,_util_isFunction,_operators_map PURE_IMPORTS_END */
+const pump = __webpack_require__(403);
+const bufferStream = __webpack_require__(407);
+class MaxBufferError extends Error {
+ constructor() {
+ super('maxBuffer exceeded');
+ this.name = 'MaxBufferError';
+ }
+}
+async function getStream(inputStream, options) {
+ if (!inputStream) {
+ return Promise.reject(new Error('Expected a stream'));
+ }
-var toString = /*@__PURE__*/ (function () { return Object.prototype.toString; })();
-function fromEvent(target, eventName, options, resultSelector) {
- if (Object(_util_isFunction__WEBPACK_IMPORTED_MODULE_2__["isFunction"])(options)) {
- resultSelector = options;
- options = undefined;
- }
- if (resultSelector) {
- return fromEvent(target, eventName, options).pipe(Object(_operators_map__WEBPACK_IMPORTED_MODULE_3__["map"])(function (args) { return Object(_util_isArray__WEBPACK_IMPORTED_MODULE_1__["isArray"])(args) ? resultSelector.apply(void 0, args) : resultSelector(args); }));
- }
- return new _Observable__WEBPACK_IMPORTED_MODULE_0__["Observable"](function (subscriber) {
- function handler(e) {
- if (arguments.length > 1) {
- subscriber.next(Array.prototype.slice.call(arguments));
- }
- else {
- subscriber.next(e);
- }
- }
- setupSubscription(target, eventName, handler, subscriber, options);
- });
-}
-function setupSubscription(sourceObj, eventName, handler, subscriber, options) {
- var unsubscribe;
- if (isEventTarget(sourceObj)) {
- var source_1 = sourceObj;
- sourceObj.addEventListener(eventName, handler, options);
- unsubscribe = function () { return source_1.removeEventListener(eventName, handler, options); };
- }
- else if (isJQueryStyleEventEmitter(sourceObj)) {
- var source_2 = sourceObj;
- sourceObj.on(eventName, handler);
- unsubscribe = function () { return source_2.off(eventName, handler); };
- }
- else if (isNodeStyleEventEmitter(sourceObj)) {
- var source_3 = sourceObj;
- sourceObj.addListener(eventName, handler);
- unsubscribe = function () { return source_3.removeListener(eventName, handler); };
- }
- else if (sourceObj && sourceObj.length) {
- for (var i = 0, len = sourceObj.length; i < len; i++) {
- setupSubscription(sourceObj[i], eventName, handler, subscriber, options);
- }
- }
- else {
- throw new TypeError('Invalid event target');
- }
- subscriber.add(unsubscribe);
+ options = {
+ maxBuffer: Infinity,
+ ...options
+ };
+
+ const {maxBuffer} = options;
+
+ let stream;
+ await new Promise((resolve, reject) => {
+ const rejectPromise = error => {
+ if (error) { // A null check
+ error.bufferedData = stream.getBufferedValue();
+ }
+
+ reject(error);
+ };
+
+ stream = pump(inputStream, bufferStream(options), error => {
+ if (error) {
+ rejectPromise(error);
+ return;
+ }
+
+ resolve();
+ });
+
+ stream.on('data', () => {
+ if (stream.getBufferedLength() > maxBuffer) {
+ rejectPromise(new MaxBufferError());
+ }
+ });
+ });
+
+ return stream.getBufferedValue();
}
-function isNodeStyleEventEmitter(sourceObj) {
- return sourceObj && typeof sourceObj.addListener === 'function' && typeof sourceObj.removeListener === 'function';
+
+module.exports = getStream;
+// TODO: Remove this for the next major release
+module.exports.default = getStream;
+module.exports.buffer = (stream, options) => getStream(stream, {...options, encoding: 'buffer'});
+module.exports.array = (stream, options) => getStream(stream, {...options, array: true});
+module.exports.MaxBufferError = MaxBufferError;
+
+
+/***/ }),
+/* 403 */
+/***/ (function(module, exports, __webpack_require__) {
+
+var once = __webpack_require__(404)
+var eos = __webpack_require__(406)
+var fs = __webpack_require__(23) // we only need fs to get the ReadStream and WriteStream prototypes
+
+var noop = function () {}
+var ancient = /^v?\.0/.test(process.version)
+
+var isFn = function (fn) {
+ return typeof fn === 'function'
}
-function isJQueryStyleEventEmitter(sourceObj) {
- return sourceObj && typeof sourceObj.on === 'function' && typeof sourceObj.off === 'function';
+
+var isFS = function (stream) {
+ if (!ancient) return false // newer node version do not need to care about fs is a special way
+ if (!fs) return false // browser
+ return (stream instanceof (fs.ReadStream || noop) || stream instanceof (fs.WriteStream || noop)) && isFn(stream.close)
}
-function isEventTarget(sourceObj) {
- return sourceObj && typeof sourceObj.addEventListener === 'function' && typeof sourceObj.removeEventListener === 'function';
+
+var isRequest = function (stream) {
+ return stream.setHeader && isFn(stream.abort)
}
-//# sourceMappingURL=fromEvent.js.map
+var destroyer = function (stream, reading, writing, callback) {
+ callback = once(callback)
-/***/ }),
-/* 401 */
-/***/ (function(module, __webpack_exports__, __webpack_require__) {
+ var closed = false
+ stream.on('close', function () {
+ closed = true
+ })
-"use strict";
-__webpack_require__.r(__webpack_exports__);
-/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "fromEventPattern", function() { return fromEventPattern; });
-/* harmony import */ var _Observable__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(193);
-/* harmony import */ var _util_isArray__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(178);
-/* harmony import */ var _util_isFunction__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(173);
-/* harmony import */ var _operators_map__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(231);
-/** PURE_IMPORTS_START _Observable,_util_isArray,_util_isFunction,_operators_map PURE_IMPORTS_END */
+ eos(stream, {readable: reading, writable: writing}, function (err) {
+ if (err) return callback(err)
+ closed = true
+ callback()
+ })
+ var destroyed = false
+ return function (err) {
+ if (closed) return
+ if (destroyed) return
+ destroyed = true
+ if (isFS(stream)) return stream.close(noop) // use close for fs streams to avoid fd leaks
+ if (isRequest(stream)) return stream.abort() // request.destroy just do .end - .abort is what we want
+ if (isFn(stream.destroy)) return stream.destroy()
-function fromEventPattern(addHandler, removeHandler, resultSelector) {
- if (resultSelector) {
- return fromEventPattern(addHandler, removeHandler).pipe(Object(_operators_map__WEBPACK_IMPORTED_MODULE_3__["map"])(function (args) { return Object(_util_isArray__WEBPACK_IMPORTED_MODULE_1__["isArray"])(args) ? resultSelector.apply(void 0, args) : resultSelector(args); }));
- }
- return new _Observable__WEBPACK_IMPORTED_MODULE_0__["Observable"](function (subscriber) {
- var handler = function () {
- var e = [];
- for (var _i = 0; _i < arguments.length; _i++) {
- e[_i] = arguments[_i];
- }
- return subscriber.next(e.length === 1 ? e[0] : e);
- };
- var retValue;
- try {
- retValue = addHandler(handler);
- }
- catch (err) {
- subscriber.error(err);
- return undefined;
- }
- if (!Object(_util_isFunction__WEBPACK_IMPORTED_MODULE_2__["isFunction"])(removeHandler)) {
- return undefined;
- }
- return function () { return removeHandler(handler, retValue); };
- });
+ callback(err || new Error('stream was destroyed'))
+ }
}
-//# sourceMappingURL=fromEventPattern.js.map
+var call = function (fn) {
+ fn()
+}
-/***/ }),
-/* 402 */
-/***/ (function(module, __webpack_exports__, __webpack_require__) {
+var pipe = function (from, to) {
+ return from.pipe(to)
+}
-"use strict";
-__webpack_require__.r(__webpack_exports__);
-/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "generate", function() { return generate; });
-/* harmony import */ var _Observable__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(193);
-/* harmony import */ var _util_identity__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(232);
-/* harmony import */ var _util_isScheduler__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(206);
-/** PURE_IMPORTS_START _Observable,_util_identity,_util_isScheduler PURE_IMPORTS_END */
+var pump = function () {
+ var streams = Array.prototype.slice.call(arguments)
+ var callback = isFn(streams[streams.length - 1] || noop) && streams.pop() || noop
+ if (Array.isArray(streams[0])) streams = streams[0]
+ if (streams.length < 2) throw new Error('pump requires two streams per minimum')
+ var error
+ var destroys = streams.map(function (stream, i) {
+ var reading = i < streams.length - 1
+ var writing = i > 0
+ return destroyer(stream, reading, writing, function (err) {
+ if (!error) error = err
+ if (err) destroys.forEach(call)
+ if (reading) return
+ destroys.forEach(call)
+ callback(error)
+ })
+ })
-function generate(initialStateOrOptions, condition, iterate, resultSelectorOrObservable, scheduler) {
- var resultSelector;
- var initialState;
- if (arguments.length == 1) {
- var options = initialStateOrOptions;
- initialState = options.initialState;
- condition = options.condition;
- iterate = options.iterate;
- resultSelector = options.resultSelector || _util_identity__WEBPACK_IMPORTED_MODULE_1__["identity"];
- scheduler = options.scheduler;
- }
- else if (resultSelectorOrObservable === undefined || Object(_util_isScheduler__WEBPACK_IMPORTED_MODULE_2__["isScheduler"])(resultSelectorOrObservable)) {
- initialState = initialStateOrOptions;
- resultSelector = _util_identity__WEBPACK_IMPORTED_MODULE_1__["identity"];
- scheduler = resultSelectorOrObservable;
- }
- else {
- initialState = initialStateOrOptions;
- resultSelector = resultSelectorOrObservable;
- }
- return new _Observable__WEBPACK_IMPORTED_MODULE_0__["Observable"](function (subscriber) {
- var state = initialState;
- if (scheduler) {
- return scheduler.schedule(dispatch, 0, {
- subscriber: subscriber,
- iterate: iterate,
- condition: condition,
- resultSelector: resultSelector,
- state: state
- });
- }
- do {
- if (condition) {
- var conditionResult = void 0;
- try {
- conditionResult = condition(state);
- }
- catch (err) {
- subscriber.error(err);
- return undefined;
- }
- if (!conditionResult) {
- subscriber.complete();
- break;
- }
- }
- var value = void 0;
- try {
- value = resultSelector(state);
- }
- catch (err) {
- subscriber.error(err);
- return undefined;
- }
- subscriber.next(value);
- if (subscriber.closed) {
- break;
- }
- try {
- state = iterate(state);
- }
- catch (err) {
- subscriber.error(err);
- return undefined;
- }
- } while (true);
- return undefined;
- });
+ return streams.reduce(pipe)
}
-function dispatch(state) {
- var subscriber = state.subscriber, condition = state.condition;
- if (subscriber.closed) {
- return undefined;
- }
- if (state.needIterate) {
- try {
- state.state = state.iterate(state.state);
- }
- catch (err) {
- subscriber.error(err);
- return undefined;
- }
- }
- else {
- state.needIterate = true;
- }
- if (condition) {
- var conditionResult = void 0;
- try {
- conditionResult = condition(state.state);
- }
- catch (err) {
- subscriber.error(err);
- return undefined;
- }
- if (!conditionResult) {
- subscriber.complete();
- return undefined;
- }
- if (subscriber.closed) {
- return undefined;
- }
- }
- var value;
- try {
- value = state.resultSelector(state.state);
- }
- catch (err) {
- subscriber.error(err);
- return undefined;
- }
- if (subscriber.closed) {
- return undefined;
- }
- subscriber.next(value);
- if (subscriber.closed) {
- return undefined;
- }
- return this.schedule(state);
+
+module.exports = pump
+
+
+/***/ }),
+/* 404 */
+/***/ (function(module, exports, __webpack_require__) {
+
+var wrappy = __webpack_require__(405)
+module.exports = wrappy(once)
+module.exports.strict = wrappy(onceStrict)
+
+once.proto = once(function () {
+ Object.defineProperty(Function.prototype, 'once', {
+ value: function () {
+ return once(this)
+ },
+ configurable: true
+ })
+
+ Object.defineProperty(Function.prototype, 'onceStrict', {
+ value: function () {
+ return onceStrict(this)
+ },
+ configurable: true
+ })
+})
+
+function once (fn) {
+ var f = function () {
+ if (f.called) return f.value
+ f.called = true
+ return f.value = fn.apply(this, arguments)
+ }
+ f.called = false
+ return f
+}
+
+function onceStrict (fn) {
+ var f = function () {
+ if (f.called)
+ throw new Error(f.onceError)
+ f.called = true
+ return f.value = fn.apply(this, arguments)
+ }
+ var name = fn.name || 'Function wrapped with `once`'
+ f.onceError = name + " shouldn't be called more than once"
+ f.called = false
+ return f
}
-//# sourceMappingURL=generate.js.map
/***/ }),
-/* 403 */
-/***/ (function(module, __webpack_exports__, __webpack_require__) {
+/* 405 */
+/***/ (function(module, exports) {
-"use strict";
-__webpack_require__.r(__webpack_exports__);
-/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "iif", function() { return iif; });
-/* harmony import */ var _defer__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(333);
-/* harmony import */ var _empty__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(242);
-/** PURE_IMPORTS_START _defer,_empty PURE_IMPORTS_END */
+// Returns a wrapper function that returns a wrapped callback
+// The wrapper function should do some stuff, and return a
+// presumably different callback function.
+// This makes sure that own properties are retained, so that
+// decorations and such are not lost along the way.
+module.exports = wrappy
+function wrappy (fn, cb) {
+ if (fn && cb) return wrappy(fn)(cb)
+ if (typeof fn !== 'function')
+ throw new TypeError('need wrapper function')
-function iif(condition, trueResult, falseResult) {
- if (trueResult === void 0) {
- trueResult = _empty__WEBPACK_IMPORTED_MODULE_1__["EMPTY"];
+ Object.keys(fn).forEach(function (k) {
+ wrapper[k] = fn[k]
+ })
+
+ return wrapper
+
+ function wrapper() {
+ var args = new Array(arguments.length)
+ for (var i = 0; i < args.length; i++) {
+ args[i] = arguments[i]
}
- if (falseResult === void 0) {
- falseResult = _empty__WEBPACK_IMPORTED_MODULE_1__["EMPTY"];
+ var ret = fn.apply(this, args)
+ var cb = args[args.length-1]
+ if (typeof ret === 'function' && ret !== cb) {
+ Object.keys(cb).forEach(function (k) {
+ ret[k] = cb[k]
+ })
}
- return Object(_defer__WEBPACK_IMPORTED_MODULE_0__["defer"])(function () { return condition() ? trueResult : falseResult; });
+ return ret
+ }
}
-//# sourceMappingURL=iif.js.map
/***/ }),
-/* 404 */
-/***/ (function(module, __webpack_exports__, __webpack_require__) {
+/* 406 */
+/***/ (function(module, exports, __webpack_require__) {
-"use strict";
-__webpack_require__.r(__webpack_exports__);
-/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "interval", function() { return interval; });
-/* harmony import */ var _Observable__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(193);
-/* harmony import */ var _scheduler_async__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(199);
-/* harmony import */ var _util_isNumeric__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(205);
-/** PURE_IMPORTS_START _Observable,_scheduler_async,_util_isNumeric PURE_IMPORTS_END */
+var once = __webpack_require__(404);
+var noop = function() {};
+var isRequest = function(stream) {
+ return stream.setHeader && typeof stream.abort === 'function';
+};
-function interval(period, scheduler) {
- if (period === void 0) {
- period = 0;
- }
- if (scheduler === void 0) {
- scheduler = _scheduler_async__WEBPACK_IMPORTED_MODULE_1__["async"];
- }
- if (!Object(_util_isNumeric__WEBPACK_IMPORTED_MODULE_2__["isNumeric"])(period) || period < 0) {
- period = 0;
- }
- if (!scheduler || typeof scheduler.schedule !== 'function') {
- scheduler = _scheduler_async__WEBPACK_IMPORTED_MODULE_1__["async"];
- }
- return new _Observable__WEBPACK_IMPORTED_MODULE_0__["Observable"](function (subscriber) {
- subscriber.add(scheduler.schedule(dispatch, period, { subscriber: subscriber, counter: 0, period: period }));
- return subscriber;
- });
-}
-function dispatch(state) {
- var subscriber = state.subscriber, counter = state.counter, period = state.period;
- subscriber.next(counter);
- this.schedule({ subscriber: subscriber, counter: counter + 1, period: period }, period);
-}
-//# sourceMappingURL=interval.js.map
+var isChildProcess = function(stream) {
+ return stream.stdio && Array.isArray(stream.stdio) && stream.stdio.length === 3
+};
+var eos = function(stream, opts, callback) {
+ if (typeof opts === 'function') return eos(stream, null, opts);
+ if (!opts) opts = {};
-/***/ }),
-/* 405 */
-/***/ (function(module, __webpack_exports__, __webpack_require__) {
+ callback = once(callback || noop);
-"use strict";
-__webpack_require__.r(__webpack_exports__);
-/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "NEVER", function() { return NEVER; });
-/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "never", function() { return never; });
-/* harmony import */ var _Observable__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(193);
-/* harmony import */ var _util_noop__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(197);
-/** PURE_IMPORTS_START _Observable,_util_noop PURE_IMPORTS_END */
+ var ws = stream._writableState;
+ var rs = stream._readableState;
+ var readable = opts.readable || (opts.readable !== false && stream.readable);
+ var writable = opts.writable || (opts.writable !== false && stream.writable);
+ var onlegacyfinish = function() {
+ if (!stream.writable) onfinish();
+ };
-var NEVER = /*@__PURE__*/ new _Observable__WEBPACK_IMPORTED_MODULE_0__["Observable"](_util_noop__WEBPACK_IMPORTED_MODULE_1__["noop"]);
-function never() {
- return NEVER;
-}
-//# sourceMappingURL=never.js.map
+ var onfinish = function() {
+ writable = false;
+ if (!readable) callback.call(stream);
+ };
+
+ var onend = function() {
+ readable = false;
+ if (!writable) callback.call(stream);
+ };
+ var onexit = function(exitCode) {
+ callback.call(stream, exitCode ? new Error('exited with error code: ' + exitCode) : null);
+ };
-/***/ }),
-/* 406 */
-/***/ (function(module, __webpack_exports__, __webpack_require__) {
+ var onerror = function(err) {
+ callback.call(stream, err);
+ };
-"use strict";
-__webpack_require__.r(__webpack_exports__);
-/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "onErrorResumeNext", function() { return onErrorResumeNext; });
-/* harmony import */ var _Observable__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(193);
-/* harmony import */ var _from__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(218);
-/* harmony import */ var _util_isArray__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(178);
-/* harmony import */ var _empty__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(242);
-/** PURE_IMPORTS_START _Observable,_from,_util_isArray,_empty PURE_IMPORTS_END */
+ var onclose = function() {
+ if (readable && !(rs && rs.ended)) return callback.call(stream, new Error('premature close'));
+ if (writable && !(ws && ws.ended)) return callback.call(stream, new Error('premature close'));
+ };
+
+ var onrequest = function() {
+ stream.req.on('finish', onfinish);
+ };
+ if (isRequest(stream)) {
+ stream.on('complete', onfinish);
+ stream.on('abort', onclose);
+ if (stream.req) onrequest();
+ else stream.on('request', onrequest);
+ } else if (writable && !ws) { // legacy streams
+ stream.on('end', onlegacyfinish);
+ stream.on('close', onlegacyfinish);
+ }
+ if (isChildProcess(stream)) stream.on('exit', onexit);
+ stream.on('end', onend);
+ stream.on('finish', onfinish);
+ if (opts.error !== false) stream.on('error', onerror);
+ stream.on('close', onclose);
-function onErrorResumeNext() {
- var sources = [];
- for (var _i = 0; _i < arguments.length; _i++) {
- sources[_i] = arguments[_i];
- }
- if (sources.length === 0) {
- return _empty__WEBPACK_IMPORTED_MODULE_3__["EMPTY"];
- }
- var first = sources[0], remainder = sources.slice(1);
- if (sources.length === 1 && Object(_util_isArray__WEBPACK_IMPORTED_MODULE_2__["isArray"])(first)) {
- return onErrorResumeNext.apply(void 0, first);
- }
- return new _Observable__WEBPACK_IMPORTED_MODULE_0__["Observable"](function (subscriber) {
- var subNext = function () { return subscriber.add(onErrorResumeNext.apply(void 0, remainder).subscribe(subscriber)); };
- return Object(_from__WEBPACK_IMPORTED_MODULE_1__["from"])(first).subscribe({
- next: function (value) { subscriber.next(value); },
- error: subNext,
- complete: subNext,
- });
- });
-}
-//# sourceMappingURL=onErrorResumeNext.js.map
+ return function() {
+ stream.removeListener('complete', onfinish);
+ stream.removeListener('abort', onclose);
+ stream.removeListener('request', onrequest);
+ if (stream.req) stream.req.removeListener('finish', onfinish);
+ stream.removeListener('end', onlegacyfinish);
+ stream.removeListener('close', onlegacyfinish);
+ stream.removeListener('finish', onfinish);
+ stream.removeListener('exit', onexit);
+ stream.removeListener('end', onend);
+ stream.removeListener('error', onerror);
+ stream.removeListener('close', onclose);
+ };
+};
+
+module.exports = eos;
/***/ }),
/* 407 */
-/***/ (function(module, __webpack_exports__, __webpack_require__) {
+/***/ (function(module, exports, __webpack_require__) {
"use strict";
-__webpack_require__.r(__webpack_exports__);
-/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "pairs", function() { return pairs; });
-/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "dispatch", function() { return dispatch; });
-/* harmony import */ var _Observable__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(193);
-/* harmony import */ var _Subscription__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(177);
-/** PURE_IMPORTS_START _Observable,_Subscription PURE_IMPORTS_END */
+const {PassThrough: PassThroughStream} = __webpack_require__(27);
-function pairs(obj, scheduler) {
- if (!scheduler) {
- return new _Observable__WEBPACK_IMPORTED_MODULE_0__["Observable"](function (subscriber) {
- var keys = Object.keys(obj);
- for (var i = 0; i < keys.length && !subscriber.closed; i++) {
- var key = keys[i];
- if (obj.hasOwnProperty(key)) {
- subscriber.next([key, obj[key]]);
- }
- }
- subscriber.complete();
- });
- }
- else {
- return new _Observable__WEBPACK_IMPORTED_MODULE_0__["Observable"](function (subscriber) {
- var keys = Object.keys(obj);
- var subscription = new _Subscription__WEBPACK_IMPORTED_MODULE_1__["Subscription"]();
- subscription.add(scheduler.schedule(dispatch, 0, { keys: keys, index: 0, subscriber: subscriber, subscription: subscription, obj: obj }));
- return subscription;
- });
- }
-}
-function dispatch(state) {
- var keys = state.keys, index = state.index, subscriber = state.subscriber, subscription = state.subscription, obj = state.obj;
- if (!subscriber.closed) {
- if (index < keys.length) {
- var key = keys[index];
- subscriber.next([key, obj[key]]);
- subscription.add(this.schedule({ keys: keys, index: index + 1, subscriber: subscriber, subscription: subscription, obj: obj }));
- }
- else {
- subscriber.complete();
- }
- }
-}
-//# sourceMappingURL=pairs.js.map
+module.exports = options => {
+ options = {...options};
+
+ const {array} = options;
+ let {encoding} = options;
+ const isBuffer = encoding === 'buffer';
+ let objectMode = false;
+
+ if (array) {
+ objectMode = !(encoding || isBuffer);
+ } else {
+ encoding = encoding || 'utf8';
+ }
+
+ if (isBuffer) {
+ encoding = null;
+ }
+
+ const stream = new PassThroughStream({objectMode});
+
+ if (encoding) {
+ stream.setEncoding(encoding);
+ }
+
+ let length = 0;
+ const chunks = [];
+
+ stream.on('data', chunk => {
+ chunks.push(chunk);
+
+ if (objectMode) {
+ length = chunks.length;
+ } else {
+ length += chunk.length;
+ }
+ });
+
+ stream.getBufferedValue = () => {
+ if (array) {
+ return chunks;
+ }
+
+ return isBuffer ? Buffer.concat(chunks, length) : chunks.join('');
+ };
+
+ stream.getBufferedLength = () => length;
+
+ return stream;
+};
/***/ }),
/* 408 */
-/***/ (function(module, __webpack_exports__, __webpack_require__) {
+/***/ (function(module, exports, __webpack_require__) {
"use strict";
-__webpack_require__.r(__webpack_exports__);
-/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "partition", function() { return partition; });
-/* harmony import */ var _util_not__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(289);
-/* harmony import */ var _util_subscribeTo__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(184);
-/* harmony import */ var _operators_filter__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(251);
-/* harmony import */ var _Observable__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(193);
-/** PURE_IMPORTS_START _util_not,_util_subscribeTo,_operators_filter,_Observable PURE_IMPORTS_END */
+const { PassThrough } = __webpack_require__(27);
+
+module.exports = function (/*streams...*/) {
+ var sources = []
+ var output = new PassThrough({objectMode: true})
+ output.setMaxListeners(0)
-function partition(source, predicate, thisArg) {
- return [
- Object(_operators_filter__WEBPACK_IMPORTED_MODULE_2__["filter"])(predicate, thisArg)(new _Observable__WEBPACK_IMPORTED_MODULE_3__["Observable"](Object(_util_subscribeTo__WEBPACK_IMPORTED_MODULE_1__["subscribeTo"])(source))),
- Object(_operators_filter__WEBPACK_IMPORTED_MODULE_2__["filter"])(Object(_util_not__WEBPACK_IMPORTED_MODULE_0__["not"])(predicate, thisArg))(new _Observable__WEBPACK_IMPORTED_MODULE_3__["Observable"](Object(_util_subscribeTo__WEBPACK_IMPORTED_MODULE_1__["subscribeTo"])(source)))
- ];
+ output.add = add
+ output.isEmpty = isEmpty
+
+ output.on('unpipe', remove)
+
+ Array.prototype.slice.call(arguments).forEach(add)
+
+ return output
+
+ function add (source) {
+ if (Array.isArray(source)) {
+ source.forEach(add)
+ return this
+ }
+
+ sources.push(source);
+ source.once('end', remove.bind(null, source))
+ source.once('error', output.emit.bind(output, 'error'))
+ source.pipe(output, {end: false})
+ return this
+ }
+
+ function isEmpty () {
+ return sources.length == 0;
+ }
+
+ function remove (source) {
+ sources = sources.filter(function (it) { return it !== source })
+ if (!sources.length && output.readable) { output.end() }
+ }
}
-//# sourceMappingURL=partition.js.map
/***/ }),
/* 409 */
-/***/ (function(module, __webpack_exports__, __webpack_require__) {
+/***/ (function(module, exports, __webpack_require__) {
"use strict";
-__webpack_require__.r(__webpack_exports__);
-/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "range", function() { return range; });
-/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "dispatch", function() { return dispatch; });
-/* harmony import */ var _Observable__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(193);
-/** PURE_IMPORTS_START _Observable PURE_IMPORTS_END */
-function range(start, count, scheduler) {
- if (start === void 0) {
- start = 0;
- }
- return new _Observable__WEBPACK_IMPORTED_MODULE_0__["Observable"](function (subscriber) {
- if (count === undefined) {
- count = start;
- start = 0;
- }
- var index = 0;
- var current = start;
- if (scheduler) {
- return scheduler.schedule(dispatch, 0, {
- index: index, count: count, start: start, subscriber: subscriber
- });
- }
- else {
- do {
- if (index++ >= count) {
- subscriber.complete();
- break;
- }
- subscriber.next(current++);
- if (subscriber.closed) {
- break;
- }
- } while (true);
- }
- return undefined;
- });
-}
-function dispatch(state) {
- var start = state.start, index = state.index, count = state.count, subscriber = state.subscriber;
- if (index >= count) {
- subscriber.complete();
- return;
- }
- subscriber.next(start);
- if (subscriber.closed) {
- return;
- }
- state.index = index + 1;
- state.start = start + 1;
- this.schedule(state);
-}
-//# sourceMappingURL=range.js.map
+const mergePromiseProperty = (spawned, promise, property) => {
+ // Starting the main `promise` is deferred to avoid consuming streams
+ const value = typeof promise === 'function' ?
+ (...args) => promise()[property](...args) :
+ promise[property].bind(promise);
+
+ Object.defineProperty(spawned, property, {
+ value,
+ writable: true,
+ enumerable: false,
+ configurable: true
+ });
+};
+
+// The return value is a mixin of `childProcess` and `Promise`
+const mergePromise = (spawned, promise) => {
+ mergePromiseProperty(spawned, promise, 'then');
+ mergePromiseProperty(spawned, promise, 'catch');
+ mergePromiseProperty(spawned, promise, 'finally');
+ return spawned;
+};
+
+// Use promises instead of `child_process` events
+const getSpawnedPromise = spawned => {
+ return new Promise((resolve, reject) => {
+ spawned.on('exit', (exitCode, signal) => {
+ resolve({exitCode, signal});
+ });
+
+ spawned.on('error', error => {
+ reject(error);
+ });
+
+ if (spawned.stdin) {
+ spawned.stdin.on('error', error => {
+ reject(error);
+ });
+ }
+ });
+};
+
+module.exports = {
+ mergePromise,
+ getSpawnedPromise
+};
+
/***/ }),
/* 410 */
-/***/ (function(module, __webpack_exports__, __webpack_require__) {
+/***/ (function(module, exports, __webpack_require__) {
"use strict";
-__webpack_require__.r(__webpack_exports__);
-/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "using", function() { return using; });
-/* harmony import */ var _Observable__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(193);
-/* harmony import */ var _from__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(218);
-/* harmony import */ var _empty__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(242);
-/** PURE_IMPORTS_START _Observable,_from,_empty PURE_IMPORTS_END */
+const SPACES_REGEXP = / +/g;
+const joinCommand = (file, args = []) => {
+ if (!Array.isArray(args)) {
+ return file;
+ }
-function using(resourceFactory, observableFactory) {
- return new _Observable__WEBPACK_IMPORTED_MODULE_0__["Observable"](function (subscriber) {
- var resource;
- try {
- resource = resourceFactory();
- }
- catch (err) {
- subscriber.error(err);
- return undefined;
- }
- var result;
- try {
- result = observableFactory(resource);
- }
- catch (err) {
- subscriber.error(err);
- return undefined;
- }
- var source = result ? Object(_from__WEBPACK_IMPORTED_MODULE_1__["from"])(result) : _empty__WEBPACK_IMPORTED_MODULE_2__["EMPTY"];
- var subscription = source.subscribe(subscriber);
- return function () {
- subscription.unsubscribe();
- if (resource) {
- resource.unsubscribe();
- }
- };
- });
-}
-//# sourceMappingURL=using.js.map
+ return [file, ...args].join(' ');
+};
+
+// Allow spaces to be escaped by a backslash if not meant as a delimiter
+const handleEscaping = (tokens, token, index) => {
+ if (index === 0) {
+ return [token];
+ }
+
+ const previousToken = tokens[tokens.length - 1];
+
+ if (previousToken.endsWith('\\')) {
+ return [...tokens.slice(0, -1), `${previousToken.slice(0, -1)} ${token}`];
+ }
+
+ return [...tokens, token];
+};
+
+// Handle `execa.command()`
+const parseCommand = command => {
+ return command
+ .trim()
+ .split(SPACES_REGEXP)
+ .reduce(handleEscaping, []);
+};
+
+module.exports = {
+ joinCommand,
+ parseCommand
+};
/***/ }),
@@ -36357,7 +36363,7 @@ function using(resourceFactory, observableFactory) {
"use strict";
-var childProcess = __webpack_require__(352);
+var childProcess = __webpack_require__(372);
var spawn = childProcess.spawn;
var exec = childProcess.exec;
@@ -36501,8 +36507,8 @@ function buildProcessTree (parentPid, tree, pidsToProcess, spawnChildProcessesLi
*/
Object.defineProperty(exports, "__esModule", { value: true });
const tslib_1 = __webpack_require__(36);
-const Rx = tslib_1.__importStar(__webpack_require__(391));
-const operators_1 = __webpack_require__(169);
+const Rx = tslib_1.__importStar(__webpack_require__(169));
+const operators_1 = __webpack_require__(270);
const SEP = /\r?\n/;
const observe_readable_1 = __webpack_require__(413);
/**
@@ -36570,8 +36576,8 @@ exports.observeLines = observeLines;
*/
Object.defineProperty(exports, "__esModule", { value: true });
const tslib_1 = __webpack_require__(36);
-const Rx = tslib_1.__importStar(__webpack_require__(391));
-const operators_1 = __webpack_require__(169);
+const Rx = tslib_1.__importStar(__webpack_require__(169));
+const operators_1 = __webpack_require__(270);
/**
* Produces an Observable from a ReadableSteam that:
* - completes on the first "end" event
@@ -36645,7 +36651,7 @@ exports.ToolingLogCollectingWriter = tooling_log_collecting_writer_1.ToolingLogC
*/
Object.defineProperty(exports, "__esModule", { value: true });
const tslib_1 = __webpack_require__(36);
-const Rx = tslib_1.__importStar(__webpack_require__(391));
+const Rx = tslib_1.__importStar(__webpack_require__(169));
const tooling_log_text_writer_1 = __webpack_require__(416);
class ToolingLog {
constructor(writerConfig) {
@@ -39453,7 +39459,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
const tslib_1 = __webpack_require__(36);
const util_1 = __webpack_require__(29);
// @ts-ignore @types are outdated and module is super simple
-const exit_hook_1 = tslib_1.__importDefault(__webpack_require__(348));
+const exit_hook_1 = tslib_1.__importDefault(__webpack_require__(368));
const tooling_log_1 = __webpack_require__(414);
const fail_1 = __webpack_require__(446);
const flags_1 = __webpack_require__(447);
@@ -44319,7 +44325,7 @@ var rp = __webpack_require__(504)
var minimatch = __webpack_require__(506)
var Minimatch = minimatch.Minimatch
var inherits = __webpack_require__(510)
-var EE = __webpack_require__(379).EventEmitter
+var EE = __webpack_require__(399).EventEmitter
var path = __webpack_require__(16)
var assert = __webpack_require__(30)
var isAbsolute = __webpack_require__(512)
@@ -44334,7 +44340,7 @@ var util = __webpack_require__(29)
var childrenIgnored = common.childrenIgnored
var isIgnored = common.isIgnored
-var once = __webpack_require__(384)
+var once = __webpack_require__(404)
function glob (pattern, options, cb) {
if (typeof options === 'function') cb = options, options = {}
@@ -47483,9 +47489,9 @@ function childrenIgnored (self, path) {
/* 515 */
/***/ (function(module, exports, __webpack_require__) {
-var wrappy = __webpack_require__(385)
+var wrappy = __webpack_require__(405)
var reqs = Object.create(null)
-var once = __webpack_require__(384)
+var once = __webpack_require__(404)
module.exports = wrappy(inflight)
@@ -53616,7 +53622,7 @@ module.exports._cleanupOnExit = cleanupOnExit
var fs = __webpack_require__(552)
var MurmurHash3 = __webpack_require__(556)
-var onExit = __webpack_require__(377)
+var onExit = __webpack_require__(397)
var path = __webpack_require__(16)
var activeFiles = {}
@@ -55267,7 +55273,7 @@ __webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "spawnStreaming", function() { return spawnStreaming; });
/* harmony import */ var chalk__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(2);
/* harmony import */ var chalk__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(chalk__WEBPACK_IMPORTED_MODULE_0__);
-/* harmony import */ var execa__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(351);
+/* harmony import */ var execa__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(371);
/* harmony import */ var execa__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(execa__WEBPACK_IMPORTED_MODULE_1__);
/* harmony import */ var log_symbols__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(565);
/* harmony import */ var log_symbols__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(log_symbols__WEBPACK_IMPORTED_MODULE_2__);
@@ -56988,7 +56994,7 @@ __webpack_require__.r(__webpack_exports__);
/* harmony import */ var crypto__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(crypto__WEBPACK_IMPORTED_MODULE_1__);
/* harmony import */ var util__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(29);
/* harmony import */ var util__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(util__WEBPACK_IMPORTED_MODULE_2__);
-/* harmony import */ var execa__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(351);
+/* harmony import */ var execa__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(371);
/* harmony import */ var execa__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(execa__WEBPACK_IMPORTED_MODULE_3__);
/* harmony import */ var _yarn_lock__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(582);
/*
@@ -59784,7 +59790,7 @@ exports.f = __webpack_require__(33) ? Object.defineProperty : function definePro
/* 54 */
/***/ (function(module, exports) {
-module.exports = __webpack_require__(379);
+module.exports = __webpack_require__(399);
/***/ }),
/* 55 */
@@ -68254,7 +68260,7 @@ var rp = __webpack_require__(504)
var minimatch = __webpack_require__(506)
var Minimatch = minimatch.Minimatch
var inherits = __webpack_require__(592)
-var EE = __webpack_require__(379).EventEmitter
+var EE = __webpack_require__(399).EventEmitter
var path = __webpack_require__(16)
var assert = __webpack_require__(30)
var isAbsolute = __webpack_require__(512)
@@ -68269,7 +68275,7 @@ var util = __webpack_require__(29)
var childrenIgnored = common.childrenIgnored
var isIgnored = common.isIgnored
-var once = __webpack_require__(384)
+var once = __webpack_require__(404)
function glob (pattern, options, cb) {
if (typeof options === 'function') cb = options, options = {}
@@ -74366,7 +74372,7 @@ function callSuccessCallback(callback, entries) {
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
-const events_1 = __webpack_require__(379);
+const events_1 = __webpack_require__(399);
const fsScandir = __webpack_require__(635);
const fastq = __webpack_require__(644);
const common = __webpack_require__(646);
@@ -78154,7 +78160,7 @@ exports.toggle = (force, stream) => {
"use strict";
const onetime = __webpack_require__(682);
-const signalExit = __webpack_require__(377);
+const signalExit = __webpack_require__(397);
module.exports = onetime(() => {
signalExit(() => {
@@ -78402,8 +78408,8 @@ const WatchCommand = {
"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "waitUntilWatchIsReady", function() { return waitUntilWatchIsReady; });
-/* harmony import */ var rxjs__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(391);
-/* harmony import */ var rxjs_operators__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(169);
+/* harmony import */ var rxjs__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(169);
+/* harmony import */ var rxjs_operators__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(270);
/*
* Licensed to Elasticsearch B.V. under one or more contributor
* license agreements. See the NOTICE file distributed with
@@ -79570,7 +79576,7 @@ async function copyToBuild(project, kibanaRoot, buildRoot) {
"use strict";
-const EventEmitter = __webpack_require__(379);
+const EventEmitter = __webpack_require__(399);
const path = __webpack_require__(16);
const os = __webpack_require__(11);
const pAll = __webpack_require__(708);
@@ -80107,7 +80113,7 @@ var rp = __webpack_require__(504)
var minimatch = __webpack_require__(506)
var Minimatch = minimatch.Minimatch
var inherits = __webpack_require__(715)
-var EE = __webpack_require__(379).EventEmitter
+var EE = __webpack_require__(399).EventEmitter
var path = __webpack_require__(16)
var assert = __webpack_require__(30)
var isAbsolute = __webpack_require__(512)
@@ -80122,7 +80128,7 @@ var util = __webpack_require__(29)
var childrenIgnored = common.childrenIgnored
var isIgnored = common.isIgnored
-var once = __webpack_require__(384)
+var once = __webpack_require__(404)
function glob (pattern, options, cb) {
if (typeof options === 'function') cb = options, options = {}
@@ -104781,7 +104787,7 @@ function readdirSync (dir, options, internalOptions) {
const Readable = __webpack_require__(27).Readable;
-const EventEmitter = __webpack_require__(379).EventEmitter;
+const EventEmitter = __webpack_require__(399).EventEmitter;
const path = __webpack_require__(16);
const normalizeOptions = __webpack_require__(894);
const stat = __webpack_require__(896);
@@ -110030,7 +110036,7 @@ function coerce (version, options) {
"use strict";
-const EventEmitter = __webpack_require__(379);
+const EventEmitter = __webpack_require__(399);
const written = new WeakMap();
diff --git a/src/core/server/saved_objects/mappings/types.ts b/src/core/server/saved_objects/mappings/types.ts
index c1b65763949bb..8362d1f16bd2a 100644
--- a/src/core/server/saved_objects/mappings/types.ts
+++ b/src/core/server/saved_objects/mappings/types.ts
@@ -137,6 +137,7 @@ export interface SavedObjectsCoreFieldMapping {
fields?: {
[subfield: string]: {
type: string;
+ ignore_above?: number;
};
};
}
diff --git a/src/core/server/saved_objects/migrations/core/document_migrator.test.ts b/src/core/server/saved_objects/migrations/core/document_migrator.test.ts
index 3ec478e3ca28d..bd10520ca1c57 100644
--- a/src/core/server/saved_objects/migrations/core/document_migrator.test.ts
+++ b/src/core/server/saved_objects/migrations/core/document_migrator.test.ts
@@ -293,7 +293,7 @@ describe('DocumentMigrator', () => {
migrationVersion: { dog: '10.2.0' },
})
).toThrow(
- /Document "smelly" has property "dog" which belongs to a more recent version of Kibana \(10\.2\.0\)/i
+ /Document "smelly" has property "dog" which belongs to a more recent version of Kibana \[10\.2\.0\]\. The last known version is \[undefined\]/i
);
});
@@ -315,7 +315,7 @@ describe('DocumentMigrator', () => {
migrationVersion: { dawg: '1.2.4' },
})
).toThrow(
- /Document "fleabag" has property "dawg" which belongs to a more recent version of Kibana \(1\.2\.4\)/i
+ /Document "fleabag" has property "dawg" which belongs to a more recent version of Kibana \[1\.2\.4\]\. The last known version is \[1\.2\.3\]/i
);
});
diff --git a/src/core/server/saved_objects/migrations/core/document_migrator.ts b/src/core/server/saved_objects/migrations/core/document_migrator.ts
index 4ddb2b070d3ac..07c1da5586107 100644
--- a/src/core/server/saved_objects/migrations/core/document_migrator.ts
+++ b/src/core/server/saved_objects/migrations/core/document_migrator.ts
@@ -350,7 +350,7 @@ function nextUnmigratedProp(doc: SavedObjectUnsanitizedDoc, migrations: ActiveMi
if (docVersion && (!latestVersion || Semver.gt(docVersion, latestVersion))) {
throw Boom.badData(
`Document "${doc.id}" has property "${p}" which belongs to a more recent` +
- ` version of Kibana (${docVersion}).`,
+ ` version of Kibana [${docVersion}]. The last known version is [${latestVersion}]`,
doc
);
}
diff --git a/src/core/server/saved_objects/migrations/core/index_migrator.ts b/src/core/server/saved_objects/migrations/core/index_migrator.ts
index c75fa68572c71..ef2a8870d78d0 100644
--- a/src/core/server/saved_objects/migrations/core/index_migrator.ts
+++ b/src/core/server/saved_objects/migrations/core/index_migrator.ts
@@ -195,7 +195,7 @@ async function migrateSourceToDest(context: Context) {
await Index.write(
callCluster,
dest.indexName,
- migrateRawDocs(serializer, documentMigrator.migrate, docs)
+ migrateRawDocs(serializer, documentMigrator.migrate, docs, log)
);
}
}
diff --git a/src/core/server/saved_objects/migrations/core/migrate_raw_docs.test.ts b/src/core/server/saved_objects/migrations/core/migrate_raw_docs.test.ts
index 89f3fde384848..e55b72be2436d 100644
--- a/src/core/server/saved_objects/migrations/core/migrate_raw_docs.test.ts
+++ b/src/core/server/saved_objects/migrations/core/migrate_raw_docs.test.ts
@@ -21,6 +21,7 @@ import _ from 'lodash';
import { SavedObjectTypeRegistry } from '../../saved_objects_type_registry';
import { SavedObjectsSerializer } from '../../serialization';
import { migrateRawDocs } from './migrate_raw_docs';
+import { createSavedObjectsMigrationLoggerMock } from '../../migrations/mocks';
describe('migrateRawDocs', () => {
test('converts raw docs to saved objects', async () => {
@@ -31,7 +32,8 @@ describe('migrateRawDocs', () => {
[
{ _id: 'a:b', _source: { type: 'a', a: { name: 'AAA' } } },
{ _id: 'c:d', _source: { type: 'c', c: { name: 'DDD' } } },
- ]
+ ],
+ createSavedObjectsMigrationLoggerMock()
);
expect(result).toEqual([
@@ -48,7 +50,8 @@ describe('migrateRawDocs', () => {
expect(transform).toHaveBeenCalled();
});
- test('passes invalid docs through untouched', async () => {
+ test('passes invalid docs through untouched and logs error', async () => {
+ const logger = createSavedObjectsMigrationLoggerMock();
const transform = jest.fn((doc: any) =>
_.set(_.cloneDeep(doc), 'attributes.name', 'TADA')
);
@@ -58,7 +61,8 @@ describe('migrateRawDocs', () => {
[
{ _id: 'foo:b', _source: { type: 'a', a: { name: 'AAA' } } },
{ _id: 'c:d', _source: { type: 'c', c: { name: 'DDD' } } },
- ]
+ ],
+ logger
);
expect(result).toEqual([
@@ -82,5 +86,7 @@ describe('migrateRawDocs', () => {
},
],
]);
+
+ expect(logger.error).toBeCalledTimes(1);
});
});
diff --git a/src/core/server/saved_objects/migrations/core/migrate_raw_docs.ts b/src/core/server/saved_objects/migrations/core/migrate_raw_docs.ts
index 5fe15f40db8ec..49acea82e1c8a 100644
--- a/src/core/server/saved_objects/migrations/core/migrate_raw_docs.ts
+++ b/src/core/server/saved_objects/migrations/core/migrate_raw_docs.ts
@@ -23,6 +23,7 @@
import { SavedObjectsRawDoc, SavedObjectsSerializer } from '../../serialization';
import { TransformFn } from './document_migrator';
+import { SavedObjectsMigrationLogger } from '.';
/**
* Applies the specified migration function to every saved object document in the list
@@ -35,7 +36,8 @@ import { TransformFn } from './document_migrator';
export function migrateRawDocs(
serializer: SavedObjectsSerializer,
migrateDoc: TransformFn,
- rawDocs: SavedObjectsRawDoc[]
+ rawDocs: SavedObjectsRawDoc[],
+ log: SavedObjectsMigrationLogger
): SavedObjectsRawDoc[] {
return rawDocs.map(raw => {
if (serializer.isRawSavedObject(raw)) {
@@ -47,6 +49,10 @@ export function migrateRawDocs(
});
}
+ log.error(
+ `Error: Unable to migrate the corrupt Saved Object document ${raw._id}. To prevent Kibana from performing a migration on every restart, please delete or fix this document by ensuring that the namespace and type in the document's id matches the values in the namespace and type fields.`,
+ { rawDocument: raw }
+ );
return raw;
});
}
diff --git a/src/core/server/saved_objects/migrations/core/migration_coordinator.test.ts b/src/core/server/saved_objects/migrations/core/migration_coordinator.test.ts
index 800edaeaa5885..3f2c31a7c0e5c 100644
--- a/src/core/server/saved_objects/migrations/core/migration_coordinator.test.ts
+++ b/src/core/server/saved_objects/migrations/core/migration_coordinator.test.ts
@@ -19,14 +19,10 @@
import _ from 'lodash';
import { coordinateMigration } from './migration_coordinator';
+import { createSavedObjectsMigrationLoggerMock } from '../mocks';
describe('coordinateMigration', () => {
- const log = {
- debug: jest.fn(),
- warning: jest.fn(),
- warn: jest.fn(),
- info: jest.fn(),
- };
+ const log = createSavedObjectsMigrationLoggerMock();
test('waits for isMigrated, if there is an index conflict', async () => {
const pollInterval = 1;
diff --git a/src/core/server/saved_objects/migrations/core/migration_logger.ts b/src/core/server/saved_objects/migrations/core/migration_logger.ts
index 9dfb3abc8e72d..00ed8bf0b73fc 100644
--- a/src/core/server/saved_objects/migrations/core/migration_logger.ts
+++ b/src/core/server/saved_objects/migrations/core/migration_logger.ts
@@ -17,7 +17,7 @@
* under the License.
*/
-import { Logger } from 'src/core/server/logging';
+import { Logger, LogMeta } from '../../../logging';
/*
* This file provides a helper class for ensuring that all logging
@@ -35,6 +35,7 @@ export interface SavedObjectsMigrationLogger {
*/
warning: (msg: string) => void;
warn: (msg: string) => void;
+ error: (msg: string, meta: LogMeta) => void;
}
export class MigrationLogger implements SavedObjectsMigrationLogger {
@@ -48,4 +49,5 @@ export class MigrationLogger implements SavedObjectsMigrationLogger {
public debug = (msg: string) => this.logger.debug(msg);
public warning = (msg: string) => this.logger.warn(msg);
public warn = (msg: string) => this.logger.warn(msg);
+ public error = (msg: string, meta: LogMeta) => this.logger.error(msg, meta);
}
diff --git a/src/core/server/saved_objects/migrations/kibana/kibana_migrator.ts b/src/core/server/saved_objects/migrations/kibana/kibana_migrator.ts
index dafd6c5341196..7d9ff9bed6d72 100644
--- a/src/core/server/saved_objects/migrations/kibana/kibana_migrator.ts
+++ b/src/core/server/saved_objects/migrations/kibana/kibana_migrator.ts
@@ -22,9 +22,9 @@
* (the shape of the mappings and documents in the index).
*/
-import { Logger } from 'src/core/server/logging';
import { KibanaConfigType } from 'src/core/server/kibana_config';
import { BehaviorSubject } from 'rxjs';
+import { Logger } from '../../../logging';
import { IndexMapping, SavedObjectsTypeMappingDefinitions } from '../../mappings';
import { SavedObjectUnsanitizedDoc, SavedObjectsSerializer } from '../../serialization';
import { docValidator, PropertyValidators } from '../../validation';
diff --git a/src/core/server/saved_objects/migrations/mocks.ts b/src/core/server/saved_objects/migrations/mocks.ts
index 76a890d26bfa0..50a7191393472 100644
--- a/src/core/server/saved_objects/migrations/mocks.ts
+++ b/src/core/server/saved_objects/migrations/mocks.ts
@@ -20,12 +20,13 @@
import { SavedObjectMigrationContext } from './types';
import { SavedObjectsMigrationLogger } from './core';
-const createLoggerMock = (): jest.Mocked => {
+export const createSavedObjectsMigrationLoggerMock = (): jest.Mocked => {
const mock = {
debug: jest.fn(),
info: jest.fn(),
warning: jest.fn(),
warn: jest.fn(),
+ error: jest.fn(),
};
return mock;
@@ -33,7 +34,7 @@ const createLoggerMock = (): jest.Mocked => {
const createContextMock = (): jest.Mocked => {
const mock = {
- log: createLoggerMock(),
+ log: createSavedObjectsMigrationLoggerMock(),
};
return mock;
};
diff --git a/src/core/server/server.api.md b/src/core/server/server.api.md
index bd6046b5ec281..bb8ee1d8e7a31 100644
--- a/src/core/server/server.api.md
+++ b/src/core/server/server.api.md
@@ -91,7 +91,6 @@ import { IngestGetPipelineParams } from 'elasticsearch';
import { IngestPutPipelineParams } from 'elasticsearch';
import { IngestSimulateParams } from 'elasticsearch';
import { KibanaConfigType } from 'src/core/server/kibana_config';
-import { Logger as Logger_2 } from 'src/core/server/logging';
import { MGetParams } from 'elasticsearch';
import { MGetResponse } from 'elasticsearch';
import { MSearchParams } from 'elasticsearch';
@@ -1885,6 +1884,7 @@ export interface SavedObjectsCoreFieldMapping {
fields?: {
[subfield: string]: {
type: string;
+ ignore_above?: number;
};
};
// (undocumented)
@@ -2169,6 +2169,8 @@ export interface SavedObjectsMigrationLogger {
// (undocumented)
debug: (msg: string) => void;
// (undocumented)
+ error: (msg: string, meta: LogMeta) => void;
+ // (undocumented)
info: (msg: string) => void;
// (undocumented)
warn: (msg: string) => void;
diff --git a/src/legacy/core_plugins/kibana/public/management/sections/index_patterns/edit_index_pattern/tabs/tabs.tsx b/src/legacy/core_plugins/kibana/public/management/sections/index_patterns/edit_index_pattern/tabs/tabs.tsx
index bfd507876a9d6..247af7e20d581 100644
--- a/src/legacy/core_plugins/kibana/public/management/sections/index_patterns/edit_index_pattern/tabs/tabs.tsx
+++ b/src/legacy/core_plugins/kibana/public/management/sections/index_patterns/edit_index_pattern/tabs/tabs.tsx
@@ -49,14 +49,18 @@ interface TabsProps extends Pick {
};
}
+const searchAriaLabel = i18n.translate('kbn.management.editIndexPattern.fields.searchAria', {
+ defaultMessage: 'Search fields',
+});
+
const filterAriaLabel = i18n.translate('kbn.management.editIndexPattern.fields.filterAria', {
- defaultMessage: 'Filter',
+ defaultMessage: 'Filter field types',
});
const filterPlaceholder = i18n.translate(
'kbn.management.editIndexPattern.fields.filterPlaceholder',
{
- defaultMessage: 'Filter',
+ defaultMessage: 'Search',
}
);
@@ -108,7 +112,7 @@ export function Tabs({ config, indexPattern, fields, services, history, location
value={fieldFilter}
onChange={e => setFieldFilter(e.target.value)}
data-test-subj="indexPatternFieldFilter"
- aria-label={filterAriaLabel}
+ aria-label={searchAriaLabel}
/>
{type === TAB_INDEXED_FIELDS && indexedFieldTypes.length > 0 && (
@@ -118,6 +122,7 @@ export function Tabs({ config, indexPattern, fields, services, history, location
value={indexedFieldTypeFilter}
onChange={e => setIndexedFieldTypeFilter(e.target.value)}
data-test-subj="indexedFieldTypeFilterDropdown"
+ aria-label={filterAriaLabel}
/>
)}
diff --git a/src/legacy/core_plugins/ui_metric/package.json b/src/legacy/core_plugins/ui_metric/package.json
deleted file mode 100644
index 3ddcac4eec47f..0000000000000
--- a/src/legacy/core_plugins/ui_metric/package.json
+++ /dev/null
@@ -1,4 +0,0 @@
-{
- "name": "ui_metric",
- "version": "kibana"
-}
diff --git a/src/legacy/core_plugins/ui_metric/public/index.ts b/src/legacy/core_plugins/ui_metric/public/index.ts
deleted file mode 100644
index 19246b571cb84..0000000000000
--- a/src/legacy/core_plugins/ui_metric/public/index.ts
+++ /dev/null
@@ -1,21 +0,0 @@
-/*
- * Licensed to Elasticsearch B.V. under one or more contributor
- * license agreements. See the NOTICE file distributed with
- * this work for additional information regarding copyright
- * ownership. Elasticsearch B.V. licenses this file to you under
- * the Apache License, Version 2.0 (the "License"); you may
- * not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-
-export { createUiStatsReporter } from './services/telemetry_analytics';
-export { METRIC_TYPE, UiStatsMetricType } from '@kbn/analytics';
diff --git a/src/legacy/core_plugins/ui_metric/public/services/telemetry_analytics.ts b/src/legacy/core_plugins/ui_metric/public/services/telemetry_analytics.ts
deleted file mode 100644
index 0e517e6ff2244..0000000000000
--- a/src/legacy/core_plugins/ui_metric/public/services/telemetry_analytics.ts
+++ /dev/null
@@ -1,24 +0,0 @@
-/*
- * Licensed to Elasticsearch B.V. under one or more contributor
- * license agreements. See the NOTICE file distributed with
- * this work for additional information regarding copyright
- * ownership. Elasticsearch B.V. licenses this file to you under
- * the Apache License, Version 2.0 (the "License"); you may
- * not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-import { npSetup } from 'ui/new_platform';
-
-export const createUiStatsReporter = (appName: string) => {
- const { usageCollection } = npSetup.plugins;
- return usageCollection.reportUiStats.bind(usageCollection, appName);
-};
diff --git a/src/plugins/dashboard/public/index.ts b/src/plugins/dashboard/public/index.ts
index 44733499cdcba..e093342f95735 100644
--- a/src/plugins/dashboard/public/index.ts
+++ b/src/plugins/dashboard/public/index.ts
@@ -31,7 +31,7 @@ export {
} from './application';
export { DashboardConstants, createDashboardEditUrl } from './dashboard_constants';
-export { DashboardStart } from './plugin';
+export { DashboardStart, DashboardUrlGenerator } from './plugin';
export { DASHBOARD_APP_URL_GENERATOR } from './url_generator';
export function plugin(initializerContext: PluginInitializerContext) {
diff --git a/src/plugins/dashboard/public/plugin.tsx b/src/plugins/dashboard/public/plugin.tsx
index b28822120b31e..894440cfa9cbb 100644
--- a/src/plugins/dashboard/public/plugin.tsx
+++ b/src/plugins/dashboard/public/plugin.tsx
@@ -42,7 +42,11 @@ import {
DataPublicPluginSetup,
esFilters,
} from '../../../plugins/data/public';
-import { SharePluginSetup, SharePluginStart } from '../../../plugins/share/public';
+import {
+ SharePluginSetup,
+ SharePluginStart,
+ UrlGeneratorContract,
+} from '../../../plugins/share/public';
import { UiActionsSetup, UiActionsStart } from '../../../plugins/ui_actions/public';
import { Start as InspectorStartContract } from '../../../plugins/inspector/public';
@@ -77,7 +81,7 @@ import {
import {
DashboardAppLinkGeneratorState,
DASHBOARD_APP_URL_GENERATOR,
- createDirectAccessDashboardLinkGenerator,
+ createDashboardUrlGenerator,
} from './url_generator';
import { createSavedDashboardLoader } from './saved_dashboards';
import { DashboardConstants } from './dashboard_constants';
@@ -89,6 +93,8 @@ declare module '../../share/public' {
}
}
+export type DashboardUrlGenerator = UrlGeneratorContract;
+
interface SetupDependencies {
data: DataPublicPluginSetup;
embeddable: EmbeddableSetup;
@@ -111,8 +117,10 @@ interface StartDependencies {
}
export type Setup = void;
+
export interface DashboardStart {
getSavedDashboardLoader: () => SavedObjectLoader;
+ dashboardUrlGenerator?: DashboardUrlGenerator;
}
declare module '../../../plugins/ui_actions/public' {
@@ -130,6 +138,8 @@ export class DashboardPlugin
private appStateUpdater = new BehaviorSubject(() => ({}));
private stopUrlTracking: (() => void) | undefined = undefined;
+ private dashboardUrlGenerator?: DashboardUrlGenerator;
+
public setup(
core: CoreSetup,
{ share, uiActions, embeddable, home, kibanaLegacy, data, usageCollection }: SetupDependencies
@@ -140,8 +150,8 @@ export class DashboardPlugin
const startServices = core.getStartServices();
if (share) {
- share.urlGenerators.registerUrlGenerator(
- createDirectAccessDashboardLinkGenerator(async () => {
+ this.dashboardUrlGenerator = share.urlGenerators.registerUrlGenerator(
+ createDashboardUrlGenerator(async () => {
const [coreStart, , selfStart] = await startServices;
return {
appBasePath: coreStart.application.getUrlForApp('dashboard'),
@@ -325,6 +335,7 @@ export class DashboardPlugin
});
return {
getSavedDashboardLoader: () => savedDashboardLoader,
+ dashboardUrlGenerator: this.dashboardUrlGenerator,
};
}
diff --git a/src/plugins/dashboard/public/url_generator.test.ts b/src/plugins/dashboard/public/url_generator.test.ts
index 248a3f991d6cb..68d447c4a1336 100644
--- a/src/plugins/dashboard/public/url_generator.test.ts
+++ b/src/plugins/dashboard/public/url_generator.test.ts
@@ -17,7 +17,7 @@
* under the License.
*/
-import { createDirectAccessDashboardLinkGenerator } from './url_generator';
+import { createDashboardUrlGenerator } from './url_generator';
import { hashedItemStore } from '../../kibana_utils/public';
// eslint-disable-next-line
import { mockStorage } from '../../kibana_utils/public/storage/hashed_item_store/mock';
@@ -55,7 +55,7 @@ describe('dashboard url generator', () => {
});
test('creates a link to a saved dashboard', async () => {
- const generator = createDirectAccessDashboardLinkGenerator(() =>
+ const generator = createDashboardUrlGenerator(() =>
Promise.resolve({
appBasePath: APP_BASE_PATH,
useHashedUrl: false,
@@ -67,7 +67,7 @@ describe('dashboard url generator', () => {
});
test('creates a link with global time range set up', async () => {
- const generator = createDirectAccessDashboardLinkGenerator(() =>
+ const generator = createDashboardUrlGenerator(() =>
Promise.resolve({
appBasePath: APP_BASE_PATH,
useHashedUrl: false,
@@ -83,7 +83,7 @@ describe('dashboard url generator', () => {
});
test('creates a link with filters, time range, refresh interval and query to a saved object', async () => {
- const generator = createDirectAccessDashboardLinkGenerator(() =>
+ const generator = createDashboardUrlGenerator(() =>
Promise.resolve({
appBasePath: APP_BASE_PATH,
useHashedUrl: false,
@@ -123,7 +123,7 @@ describe('dashboard url generator', () => {
});
test('if no useHash setting is given, uses the one was start services', async () => {
- const generator = createDirectAccessDashboardLinkGenerator(() =>
+ const generator = createDashboardUrlGenerator(() =>
Promise.resolve({
appBasePath: APP_BASE_PATH,
useHashedUrl: true,
@@ -137,7 +137,7 @@ describe('dashboard url generator', () => {
});
test('can override a false useHash ui setting', async () => {
- const generator = createDirectAccessDashboardLinkGenerator(() =>
+ const generator = createDashboardUrlGenerator(() =>
Promise.resolve({
appBasePath: APP_BASE_PATH,
useHashedUrl: false,
@@ -152,7 +152,7 @@ describe('dashboard url generator', () => {
});
test('can override a true useHash ui setting', async () => {
- const generator = createDirectAccessDashboardLinkGenerator(() =>
+ const generator = createDashboardUrlGenerator(() =>
Promise.resolve({
appBasePath: APP_BASE_PATH,
useHashedUrl: true,
@@ -195,7 +195,7 @@ describe('dashboard url generator', () => {
};
test('attaches filters from destination dashboard', async () => {
- const generator = createDirectAccessDashboardLinkGenerator(() =>
+ const generator = createDashboardUrlGenerator(() =>
Promise.resolve({
appBasePath: APP_BASE_PATH,
useHashedUrl: false,
@@ -224,7 +224,7 @@ describe('dashboard url generator', () => {
});
test("doesn't fail if can't retrieve filters from destination dashboard", async () => {
- const generator = createDirectAccessDashboardLinkGenerator(() =>
+ const generator = createDashboardUrlGenerator(() =>
Promise.resolve({
appBasePath: APP_BASE_PATH,
useHashedUrl: false,
@@ -246,7 +246,7 @@ describe('dashboard url generator', () => {
});
test('can enforce empty filters', async () => {
- const generator = createDirectAccessDashboardLinkGenerator(() =>
+ const generator = createDashboardUrlGenerator(() =>
Promise.resolve({
appBasePath: APP_BASE_PATH,
useHashedUrl: false,
@@ -270,7 +270,7 @@ describe('dashboard url generator', () => {
});
test('no filters in result url if no filters applied', async () => {
- const generator = createDirectAccessDashboardLinkGenerator(() =>
+ const generator = createDashboardUrlGenerator(() =>
Promise.resolve({
appBasePath: APP_BASE_PATH,
useHashedUrl: false,
@@ -288,7 +288,7 @@ describe('dashboard url generator', () => {
});
test('can turn off preserving filters', async () => {
- const generator = createDirectAccessDashboardLinkGenerator(() =>
+ const generator = createDashboardUrlGenerator(() =>
Promise.resolve({
appBasePath: APP_BASE_PATH,
useHashedUrl: false,
diff --git a/src/plugins/dashboard/public/url_generator.ts b/src/plugins/dashboard/public/url_generator.ts
index 6f121ceb2d373..9d66f2df65777 100644
--- a/src/plugins/dashboard/public/url_generator.ts
+++ b/src/plugins/dashboard/public/url_generator.ts
@@ -75,7 +75,7 @@ export type DashboardAppLinkGeneratorState = UrlGeneratorState<{
preserveSavedFilters?: boolean;
}>;
-export const createDirectAccessDashboardLinkGenerator = (
+export const createDashboardUrlGenerator = (
getStartServices: () => Promise<{
appBasePath: string;
useHashedUrl: boolean;
diff --git a/src/plugins/data/server/server.api.md b/src/plugins/data/server/server.api.md
index df4ba23244b4d..1f4076aa12bde 100644
--- a/src/plugins/data/server/server.api.md
+++ b/src/plugins/data/server/server.api.md
@@ -93,8 +93,7 @@ import { IngestGetPipelineParams } from 'elasticsearch';
import { IngestPutPipelineParams } from 'elasticsearch';
import { IngestSimulateParams } from 'elasticsearch';
import { KibanaConfigType as KibanaConfigType_2 } from 'src/core/server/kibana_config';
-import { Logger as Logger_2 } from 'src/core/server/logging';
-import { Logger as Logger_3 } from 'kibana/server';
+import { Logger as Logger_2 } from 'kibana/server';
import { MGetParams } from 'elasticsearch';
import { MGetResponse } from 'elasticsearch';
import moment from 'moment';
diff --git a/src/plugins/embeddable/public/lib/panel/panel_header/panel_actions/add_panel/add_panel_flyout.test.tsx b/src/plugins/embeddable/public/lib/panel/panel_header/panel_actions/add_panel/add_panel_flyout.test.tsx
index 282b0f05891e0..3894d6fbed382 100644
--- a/src/plugins/embeddable/public/lib/panel/panel_header/panel_actions/add_panel/add_panel_flyout.test.tsx
+++ b/src/plugins/embeddable/public/lib/panel/panel_header/panel_actions/add_panel/add_panel_flyout.test.tsx
@@ -18,6 +18,7 @@
*/
import * as React from 'react';
+import { EuiFlyout } from '@elastic/eui';
import { AddPanelFlyout } from './add_panel_flyout';
import {
ContactCardEmbeddableFactory,
@@ -75,6 +76,9 @@ test('createNewEmbeddable() add embeddable to container', async () => {
/>
) as ReactWrapper;
+ // https://github.com/elastic/kibana/issues/64789
+ expect(component.exists(EuiFlyout)).toBe(false);
+
expect(Object.values(container.getInput().panels).length).toBe(0);
component.instance().createNewEmbeddable(CONTACT_CARD_EMBEDDABLE);
await new Promise(r => setTimeout(r, 1));
diff --git a/src/plugins/embeddable/public/lib/panel/panel_header/panel_actions/add_panel/add_panel_flyout.tsx b/src/plugins/embeddable/public/lib/panel/panel_header/panel_actions/add_panel/add_panel_flyout.tsx
index 5bf3f69a95c30..4c23916675e8f 100644
--- a/src/plugins/embeddable/public/lib/panel/panel_header/panel_actions/add_panel/add_panel_flyout.tsx
+++ b/src/plugins/embeddable/public/lib/panel/panel_header/panel_actions/add_panel/add_panel_flyout.tsx
@@ -21,13 +21,7 @@ import { FormattedMessage } from '@kbn/i18n/react';
import React, { ReactElement } from 'react';
import { CoreSetup } from 'src/core/public';
-import {
- EuiContextMenuItem,
- EuiFlyout,
- EuiFlyoutBody,
- EuiFlyoutHeader,
- EuiTitle,
-} from '@elastic/eui';
+import { EuiContextMenuItem, EuiFlyoutBody, EuiFlyoutHeader, EuiTitle } from '@elastic/eui';
import { EmbeddableStart } from 'src/plugins/embeddable/public';
import { IContainer } from '../../../../containers';
@@ -152,7 +146,7 @@ export class AddPanelFlyout extends React.Component {
);
return (
-
+ <>
@@ -161,7 +155,7 @@ export class AddPanelFlyout extends React.Component {
{savedObjectsFinder}
-
+ >
);
}
}
diff --git a/src/plugins/embeddable/public/lib/panel/panel_header/panel_actions/add_panel/open_add_panel_flyout.tsx b/src/plugins/embeddable/public/lib/panel/panel_header/panel_actions/add_panel/open_add_panel_flyout.tsx
index a452e07b51577..867092b78ef7a 100644
--- a/src/plugins/embeddable/public/lib/panel/panel_header/panel_actions/add_panel/open_add_panel_flyout.tsx
+++ b/src/plugins/embeddable/public/lib/panel/panel_header/panel_actions/add_panel/open_add_panel_flyout.tsx
@@ -55,7 +55,8 @@ export async function openAddPanelFlyout(options: {
/>
),
{
- 'data-test-subj': 'addPanelFlyout',
+ 'data-test-subj': 'dashboardAddPanel',
+ ownFocus: true,
}
);
}
diff --git a/src/plugins/share/public/url_generators/url_generator_service.test.ts b/src/plugins/share/public/url_generators/url_generator_service.test.ts
index 4a377db033762..d256dcf5f7aa0 100644
--- a/src/plugins/share/public/url_generators/url_generator_service.test.ts
+++ b/src/plugins/share/public/url_generators/url_generator_service.test.ts
@@ -30,11 +30,11 @@ test('Asking for a generator that does not exist throws an error', () => {
});
test('Registering and retrieving a generator', async () => {
- setup.registerUrlGenerator({
+ const generator = setup.registerUrlGenerator({
id: 'TEST_GENERATOR',
createUrl: () => Promise.resolve('myurl'),
});
- const generator = start.getUrlGenerator('TEST_GENERATOR');
+
expect(generator).toMatchInlineSnapshot(`
Object {
"createUrl": [Function],
@@ -47,6 +47,20 @@ test('Registering and retrieving a generator', async () => {
new Error('You cannot call migrate on a non-deprecated generator.')
);
expect(await generator.createUrl({})).toBe('myurl');
+
+ const retrievedGenerator = start.getUrlGenerator('TEST_GENERATOR');
+ expect(retrievedGenerator).toMatchInlineSnapshot(`
+ Object {
+ "createUrl": [Function],
+ "id": "TEST_GENERATOR",
+ "isDeprecated": false,
+ "migrate": [Function],
+ }
+ `);
+ await expect(generator.migrate({})).rejects.toEqual(
+ new Error('You cannot call migrate on a non-deprecated generator.')
+ );
+ expect(await generator.createUrl({})).toBe('myurl');
});
test('Registering a generator with a createUrl function that is deprecated throws an error', () => {
diff --git a/src/plugins/share/public/url_generators/url_generator_service.ts b/src/plugins/share/public/url_generators/url_generator_service.ts
index 332750671cee3..13c1b94acdd07 100644
--- a/src/plugins/share/public/url_generators/url_generator_service.ts
+++ b/src/plugins/share/public/url_generators/url_generator_service.ts
@@ -28,7 +28,9 @@ export interface UrlGeneratorsStart {
}
export interface UrlGeneratorsSetup {
- registerUrlGenerator: (generator: UrlGeneratorsDefinition) => void;
+ registerUrlGenerator: (
+ generator: UrlGeneratorsDefinition
+ ) => UrlGeneratorContract;
}
export class UrlGeneratorsService implements Plugin {
@@ -43,10 +45,9 @@ export class UrlGeneratorsService implements Plugin(
generatorOptions: UrlGeneratorsDefinition
) => {
- this.urlGenerators.set(
- generatorOptions.id,
- new UrlGeneratorInternal(generatorOptions, this.getUrlGenerator)
- );
+ const generator = new UrlGeneratorInternal(generatorOptions, this.getUrlGenerator);
+ this.urlGenerators.set(generatorOptions.id, generator);
+ return generator.getPublicContract();
},
};
return setup;
diff --git a/src/plugins/usage_collection/README.md b/src/plugins/usage_collection/README.md
index e32dfae35832b..99075d5d48f59 100644
--- a/src/plugins/usage_collection/README.md
+++ b/src/plugins/usage_collection/README.md
@@ -126,41 +126,6 @@ export function registerMyPluginUsageCollector(
}
```
-### Migrating to NP from Legacy Plugins
-
-Pass `usageCollection` to the setup NP plugin setup function under plugins. Inside the `setup` function call the `registerCollector` like what you'd do in the NP example above.
-
-```js
-// index.js
-export const myPlugin = (kibana: any) => {
- return new kibana.Plugin({
- init: async function (server) {
- const { usageCollection } = server.newPlatform.setup.plugins;
- const plugins = {
- usageCollection,
- };
- plugin(initializerContext).setup(core, plugins);
- }
- });
-}
-```
-
-### Legacy Plugins
-
-Typically, a plugin will create the collector object and register it with the Telemetry service from the `init` method of the plugin definition, or a helper module called from `init`.
-
-```js
-// index.js
-export const myPlugin = (kibana: any) => {
- return new kibana.Plugin({
- init: async function (server) {
- const { usageCollection } = server.newPlatform.setup.plugins;
- registerMyPluginUsageCollector(usageCollection);
- }
- });
-}
-```
-
## Update the telemetry payload and telemetry cluster field mappings
There is a module in the telemetry service that creates the payload of data that gets sent up to the telemetry cluster.
@@ -239,15 +204,6 @@ To track a user interaction, use the `reportUiStats` method exposed by the plugi
}
```
-Alternatively, in the Legacy world you can still import the `createUiStatsReporter` helper function from UI Metric app:
-
-```js
-import { createUiStatsReporter, METRIC_TYPE } from 'relative/path/to/src/legacy/core_plugins/ui_metric/public';
-const trackMetric = createUiStatsReporter(``);
-trackMetric(METRIC_TYPE.CLICK, ``);
-trackMetric('click', ``);
-```
-
Metric Types:
- `METRIC_TYPE.CLICK` for tracking clicks `trackMetric(METRIC_TYPE.CLICK, 'my_button_clicked');`
diff --git a/src/plugins/vis_type_table/public/components/table_vis_options.tsx b/src/plugins/vis_type_table/public/components/table_vis_options.tsx
index 68348d5ef1060..837d478535936 100644
--- a/src/plugins/vis_type_table/public/components/table_vis_options.tsx
+++ b/src/plugins/vis_type_table/public/components/table_vis_options.tsx
@@ -147,5 +147,6 @@ function TableOptions({
);
}
-
-export { TableOptions };
+// default export required for React.Lazy
+// eslint-disable-next-line import/no-default-export
+export { TableOptions as default };
diff --git a/src/legacy/core_plugins/ui_metric/index.ts b/src/plugins/vis_type_table/public/components/table_vis_options_lazy.tsx
similarity index 63%
rename from src/legacy/core_plugins/ui_metric/index.ts
rename to src/plugins/vis_type_table/public/components/table_vis_options_lazy.tsx
index 2e5be3d7b0a39..ca273aa771ef1 100644
--- a/src/legacy/core_plugins/ui_metric/index.ts
+++ b/src/plugins/vis_type_table/public/components/table_vis_options_lazy.tsx
@@ -16,15 +16,15 @@
* specific language governing permissions and limitations
* under the License.
*/
+import React, { lazy, Suspense } from 'react';
+import { EuiLoadingSpinner } from '@elastic/eui';
+import { VisOptionsProps } from 'src/plugins/vis_default_editor/public';
+import { TableVisParams } from '../types';
-import { resolve } from 'path';
+const TableOptionsComponent = lazy(() => import('./table_vis_options'));
-// eslint-disable-next-line import/no-default-export
-export default function(kibana: any) {
- return new kibana.Plugin({
- id: 'ui_metric',
- require: ['kibana', 'elasticsearch'],
- publicDir: resolve(__dirname, 'public'),
- init() {},
- });
-}
+export const TableOptions = (props: VisOptionsProps) => (
+ }>
+
+
+);
diff --git a/src/plugins/vis_type_table/public/table_vis_type.ts b/src/plugins/vis_type_table/public/table_vis_type.ts
index 26e5ac8cfd71a..c3bc72497007e 100644
--- a/src/plugins/vis_type_table/public/table_vis_type.ts
+++ b/src/plugins/vis_type_table/public/table_vis_type.ts
@@ -24,7 +24,7 @@ import { Vis } from '../../visualizations/public';
import { tableVisResponseHandler } from './table_vis_response_handler';
// @ts-ignore
import tableVisTemplate from './table_vis.html';
-import { TableOptions } from './components/table_vis_options';
+import { TableOptions } from './components/table_vis_options_lazy';
import { getTableVisualizationControllerClass } from './vis_controller';
export function getTableVisTypeDefinition(core: CoreSetup, context: PluginInitializerContext) {
diff --git a/test/accessibility/apps/management.ts b/test/accessibility/apps/management.ts
index 9e75250403d6b..cc60e672fe880 100644
--- a/test/accessibility/apps/management.ts
+++ b/test/accessibility/apps/management.ts
@@ -20,23 +20,12 @@
import { FtrProviderContext } from '../ftr_provider_context';
export default function({ getService, getPageObjects }: FtrProviderContext) {
- const PageObjects = getPageObjects(['common', 'settings']);
+ const PageObjects = getPageObjects(['common', 'settings', 'header']);
const esArchiver = getService('esArchiver');
const kibanaServer = getService('kibanaServer');
- const testSubjects = getService('testSubjects');
const a11y = getService('a11y');
- // describe('Management', () => {
- // before(async () => {
- // await esArchiver.loadIfNeeded('logstash_functional');
- // await kibanaServer.uiSettings.update({
- // defaultIndex: 'logstash-*',
- // });
- // await PageObjects.common.navigateToApp('settings');
- // });
-
- // FLAKY: https://github.com/elastic/kibana/issues/60470
- describe.skip('Management', () => {
+ describe('Management', () => {
before(async () => {
await esArchiver.load('discover');
await esArchiver.loadIfNeeded('logstash_functional');
@@ -57,23 +46,25 @@ export default function({ getService, getPageObjects }: FtrProviderContext) {
it('Single indexpattern view', async () => {
await PageObjects.settings.clickIndexPatternLogstash();
+ await PageObjects.header.waitUntilLoadingHasFinished();
await a11y.testAppSnapshot();
});
- it('Create Index pattern wizard', async () => {
+ it('Open create index pattern wizard', async () => {
await PageObjects.settings.clickKibanaIndexPatterns();
- await (await testSubjects.find('createIndexPatternButton')).click();
+ await PageObjects.settings.clickAddNewIndexPatternButton();
+ await PageObjects.header.waitUntilLoadingHasFinished();
await a11y.testAppSnapshot();
});
- // index patterns page
+ // We are navigating back to index pattern page to test field formatters
it('Navigate back to logstash index page', async () => {
await PageObjects.settings.clickKibanaIndexPatterns();
await PageObjects.settings.clickIndexPatternLogstash();
await a11y.testAppSnapshot();
});
- // Issue: https://github.com/elastic/kibana/issues/60030
+ // Will be enabling this and field formatters after this issue is addressed: https://github.com/elastic/kibana/issues/60030
it.skip('Edit field type', async () => {
await PageObjects.settings.clickEditFieldFormat();
await a11y.testAppSnapshot();
diff --git a/x-pack/legacy/plugins/maps/server/plugin.js b/x-pack/legacy/plugins/maps/server/plugin.js
index d2d5309606cde..6a542dff2eb1b 100644
--- a/x-pack/legacy/plugins/maps/server/plugin.js
+++ b/x-pack/legacy/plugins/maps/server/plugin.js
@@ -19,42 +19,10 @@ import { emsBoundariesSpecProvider } from './tutorials/ems';
export class MapPlugin {
setup(core, plugins, __LEGACY) {
- const { featuresPlugin, home, licensing, usageCollection, mapsLegacy } = plugins;
+ const { home, licensing, usageCollection, mapsLegacy } = plugins;
let routesInitialized = false;
const mapConfig = mapsLegacy.config;
- featuresPlugin.registerFeature({
- id: APP_ID,
- name: i18n.translate('xpack.maps.featureRegistry.mapsFeatureName', {
- defaultMessage: 'Maps',
- }),
- order: 600,
- icon: APP_ICON,
- navLinkId: APP_ID,
- app: [APP_ID, 'kibana'],
- catalogue: [APP_ID],
- privileges: {
- all: {
- app: [APP_ID, 'kibana'],
- catalogue: [APP_ID],
- savedObject: {
- all: [MAP_SAVED_OBJECT_TYPE, 'query'],
- read: ['index-pattern'],
- },
- ui: ['save', 'show', 'saveQuery'],
- },
- read: {
- app: [APP_ID, 'kibana'],
- catalogue: [APP_ID],
- savedObject: {
- all: [],
- read: [MAP_SAVED_OBJECT_TYPE, 'index-pattern', 'query'],
- },
- ui: ['show'],
- },
- },
- });
-
licensing.license$.subscribe(license => {
const { state } = license.check('maps', 'basic');
if (state === 'valid' && !routesInitialized) {
diff --git a/x-pack/legacy/plugins/xpack_main/server/lib/setup_xpack_main.js b/x-pack/legacy/plugins/xpack_main/server/lib/setup_xpack_main.js
index 2707858a5fec8..9196b210bba20 100644
--- a/x-pack/legacy/plugins/xpack_main/server/lib/setup_xpack_main.js
+++ b/x-pack/legacy/plugins/xpack_main/server/lib/setup_xpack_main.js
@@ -22,8 +22,7 @@ export function setupXPackMain(server) {
server.ext('onPreResponse', (request, h) => injectXPackInfoSignature(info, request, h));
- const { registerFeature, getFeatures } = server.newPlatform.setup.plugins.features;
- server.expose('registerFeature', registerFeature);
+ const { getFeatures } = server.newPlatform.setup.plugins.features;
server.expose('getFeatures', getFeatures);
const setPluginStatus = () => {
diff --git a/x-pack/legacy/plugins/xpack_main/server/xpack_main.d.ts b/x-pack/legacy/plugins/xpack_main/server/xpack_main.d.ts
index 7b5dc19760627..2a59c2f1366d4 100644
--- a/x-pack/legacy/plugins/xpack_main/server/xpack_main.d.ts
+++ b/x-pack/legacy/plugins/xpack_main/server/xpack_main.d.ts
@@ -12,5 +12,4 @@ export { XPackFeature } from './lib/xpack_info';
export interface XPackMainPlugin {
info: XPackInfo;
getFeatures(): Feature[];
- registerFeature(feature: FeatureConfig): void;
}
diff --git a/x-pack/plugins/apm/public/components/app/TransactionDetails/WaterfallWithSummmary/WaterfallContainer/Waterfall/waterfall_helpers/waterfall_helpers.ts b/x-pack/plugins/apm/public/components/app/TransactionDetails/WaterfallWithSummmary/WaterfallContainer/Waterfall/waterfall_helpers/waterfall_helpers.ts
index 8ddce66f0b853..e15cf2df38c5f 100644
--- a/x-pack/plugins/apm/public/components/app/TransactionDetails/WaterfallWithSummmary/WaterfallContainer/Waterfall/waterfall_helpers/waterfall_helpers.ts
+++ b/x-pack/plugins/apm/public/components/app/TransactionDetails/WaterfallWithSummmary/WaterfallContainer/Waterfall/waterfall_helpers/waterfall_helpers.ts
@@ -236,28 +236,33 @@ const getWaterfallItems = (items: TraceAPIResponse['trace']['items']) =>
}
});
-/**
- * Changes the parent_id of items based on the child.id property.
- * Solves the problem of Inferred spans that are created as child of trace spans
- * when it actually should be its parent.
- * @param waterfallItems
- */
-const reparentSpans = (waterfallItems: IWaterfallItem[]) => {
+function reparentSpans(waterfallItems: IWaterfallItem[]) {
+ // find children that needs to be re-parented and map them to their correct parent id
+ const childIdToParentIdMapping = Object.fromEntries(
+ flatten(
+ waterfallItems.map(waterfallItem => {
+ if (waterfallItem.docType === 'span') {
+ const childIds = waterfallItem.doc.child?.id ?? [];
+ return childIds.map(id => [id, waterfallItem.id]);
+ }
+ return [];
+ })
+ )
+ );
+
+ // update parent id for children that needs it or return unchanged
return waterfallItems.map(waterfallItem => {
- if (waterfallItem.docType === 'span') {
- const childId = waterfallItem.doc.child?.id;
- if (childId) {
- childId.forEach(id => {
- const item = waterfallItems.find(_item => _item.id === id);
- if (item) {
- item.parentId = waterfallItem.id;
- }
- });
- }
+ const newParentId = childIdToParentIdMapping[waterfallItem.id];
+ if (newParentId) {
+ return {
+ ...waterfallItem,
+ parentId: newParentId
+ };
}
+
return waterfallItem;
});
-};
+}
const getChildrenGroupedByParentId = (waterfallItems: IWaterfallItem[]) =>
groupBy(waterfallItems, item => (item.parentId ? item.parentId : ROOT_ID));
diff --git a/x-pack/plugins/apm/public/components/app/TransactionDetails/WaterfallWithSummmary/WaterfallContainer/waterfallContainer.stories.data.ts b/x-pack/plugins/apm/public/components/app/TransactionDetails/WaterfallWithSummmary/WaterfallContainer/waterfallContainer.stories.data.ts
index 2f28e37f73f62..6f4a0629c7bc5 100644
--- a/x-pack/plugins/apm/public/components/app/TransactionDetails/WaterfallWithSummmary/WaterfallContainer/waterfallContainer.stories.data.ts
+++ b/x-pack/plugins/apm/public/components/app/TransactionDetails/WaterfallWithSummmary/WaterfallContainer/waterfallContainer.stories.data.ts
@@ -2027,7 +2027,7 @@ export const inferredSpans = {
id: '41226ae63af4f235',
type: 'unknown'
},
- child: { ids: ['8d80de06aa11a6fc'] }
+ child: { id: ['8d80de06aa11a6fc'] }
},
{
container: {
diff --git a/x-pack/plugins/dashboard_enhanced/public/plugin.ts b/x-pack/plugins/dashboard_enhanced/public/plugin.ts
index 772e032289bce..c258a4148f84a 100644
--- a/x-pack/plugins/dashboard_enhanced/public/plugin.ts
+++ b/x-pack/plugins/dashboard_enhanced/public/plugin.ts
@@ -11,6 +11,7 @@ import { DashboardDrilldownsService } from './services';
import { DataPublicPluginStart } from '../../../../src/plugins/data/public';
import { AdvancedUiActionsSetup, AdvancedUiActionsStart } from '../../advanced_ui_actions/public';
import { DrilldownsSetup, DrilldownsStart } from '../../drilldowns/public';
+import { DashboardStart } from '../../../../src/plugins/dashboard/public';
export interface SetupDependencies {
advancedUiActions: AdvancedUiActionsSetup;
@@ -25,6 +26,7 @@ export interface StartDependencies {
drilldowns: DrilldownsStart;
embeddable: EmbeddableStart;
share: SharePluginStart;
+ dashboard: DashboardStart;
}
// eslint-disable-next-line
diff --git a/x-pack/plugins/dashboard_enhanced/public/services/drilldowns/dashboard_drilldowns_services.ts b/x-pack/plugins/dashboard_enhanced/public/services/drilldowns/dashboard_drilldowns_services.ts
index 0161836b2c5b9..f5926cd6961c2 100644
--- a/x-pack/plugins/dashboard_enhanced/public/services/drilldowns/dashboard_drilldowns_services.ts
+++ b/x-pack/plugins/dashboard_enhanced/public/services/drilldowns/dashboard_drilldowns_services.ts
@@ -44,6 +44,12 @@ export class DashboardDrilldownsService {
{ advancedUiActions: uiActions }: SetupDependencies
) {
const start = createStartServicesGetter(core.getStartServices);
+ const getDashboardUrlGenerator = () => {
+ const urlGenerator = start().plugins.dashboard.dashboardUrlGenerator;
+ if (!urlGenerator)
+ throw new Error('dashboardUrlGenerator is required for dashboard to dashboard drilldown');
+ return urlGenerator;
+ };
const actionFlyoutCreateDrilldown = new FlyoutCreateDrilldownAction({ start });
uiActions.addTriggerAction(CONTEXT_MENU_TRIGGER, actionFlyoutCreateDrilldown);
@@ -51,7 +57,10 @@ export class DashboardDrilldownsService {
const actionFlyoutEditDrilldown = new FlyoutEditDrilldownAction({ start });
uiActions.addTriggerAction(CONTEXT_MENU_TRIGGER, actionFlyoutEditDrilldown);
- const dashboardToDashboardDrilldown = new DashboardToDashboardDrilldown({ start });
+ const dashboardToDashboardDrilldown = new DashboardToDashboardDrilldown({
+ start,
+ getDashboardUrlGenerator,
+ });
uiActions.registerDrilldown(dashboardToDashboardDrilldown);
}
}
diff --git a/x-pack/plugins/dashboard_enhanced/public/services/drilldowns/dashboard_to_dashboard_drilldown/drilldown.test.tsx b/x-pack/plugins/dashboard_enhanced/public/services/drilldowns/dashboard_to_dashboard_drilldown/drilldown.test.tsx
index 18ee95cb57b3b..d8465562f9302 100644
--- a/x-pack/plugins/dashboard_enhanced/public/services/drilldowns/dashboard_to_dashboard_drilldown/drilldown.test.tsx
+++ b/x-pack/plugins/dashboard_enhanced/public/services/drilldowns/dashboard_to_dashboard_drilldown/drilldown.test.tsx
@@ -5,8 +5,7 @@
*/
import { DashboardToDashboardDrilldown } from './drilldown';
-import { UrlGeneratorContract } from '../../../../../../../src/plugins/share/public';
-import { savedObjectsServiceMock } from '../../../../../../../src/core/public/mocks';
+import { savedObjectsServiceMock, coreMock } from '../../../../../../../src/core/public/mocks';
import { dataPluginMock } from '../../../../../../../src/plugins/data/public/mocks';
import { ActionContext, Config } from './types';
import {
@@ -19,15 +18,16 @@ import {
import { esFilters } from '../../../../../../../src/plugins/data/public';
// convenient to use real implementation here.
-import { createDirectAccessDashboardLinkGenerator } from '../../../../../../../src/plugins/dashboard/public/url_generator';
+import { createDashboardUrlGenerator } from '../../../../../../../src/plugins/dashboard/public/url_generator';
+import { UrlGeneratorsService } from '../../../../../../../src/plugins/share/public/url_generators';
import { VisualizeEmbeddableContract } from '../../../../../../../src/plugins/visualizations/public';
import {
RangeSelectTriggerContext,
ValueClickTriggerContext,
} from '../../../../../../../src/plugins/embeddable/public';
+import { StartDependencies } from '../../../plugin';
import { SavedObjectLoader } from '../../../../../../../src/plugins/saved_objects/public';
import { StartServicesGetter } from '../../../../../../../src/plugins/kibana_utils/public/core';
-import { StartDependencies } from '../../../plugin';
describe('.isConfigValid()', () => {
const drilldown = new DashboardToDashboardDrilldown({} as any);
@@ -105,23 +105,19 @@ describe('.execute() & getHref', () => {
data: {
actions: dataPluginActions,
},
- share: {
- urlGenerators: {
- getUrlGenerator: () =>
- createDirectAccessDashboardLinkGenerator(() =>
- Promise.resolve({
- appBasePath: 'test',
- useHashedUrl: false,
- savedDashboardLoader: ({} as unknown) as SavedObjectLoader,
- })
- ) as UrlGeneratorContract,
- },
- },
},
self: {},
- })) as unknown) as StartServicesGetter<
- Pick
- >,
+ })) as unknown) as StartServicesGetter>,
+ getDashboardUrlGenerator: () =>
+ new UrlGeneratorsService().setup(coreMock.createSetup()).registerUrlGenerator(
+ createDashboardUrlGenerator(() =>
+ Promise.resolve({
+ appBasePath: 'test',
+ useHashedUrl: false,
+ savedDashboardLoader: ({} as unknown) as SavedObjectLoader,
+ })
+ )
+ ),
});
const selectRangeFiltersSpy = jest
.spyOn(dataPluginActions, 'createFiltersFromRangeSelectAction')
diff --git a/x-pack/plugins/dashboard_enhanced/public/services/drilldowns/dashboard_to_dashboard_drilldown/drilldown.tsx b/x-pack/plugins/dashboard_enhanced/public/services/drilldowns/dashboard_to_dashboard_drilldown/drilldown.tsx
index 848e77384f7f0..6d83b8443a828 100644
--- a/x-pack/plugins/dashboard_enhanced/public/services/drilldowns/dashboard_to_dashboard_drilldown/drilldown.tsx
+++ b/x-pack/plugins/dashboard_enhanced/public/services/drilldowns/dashboard_to_dashboard_drilldown/drilldown.tsx
@@ -6,7 +6,7 @@
import React from 'react';
import { reactToUiComponent } from '../../../../../../../src/plugins/kibana_react/public';
-import { DASHBOARD_APP_URL_GENERATOR } from '../../../../../../../src/plugins/dashboard/public';
+import { DashboardUrlGenerator } from '../../../../../../../src/plugins/dashboard/public';
import { ActionContext, Config } from './types';
import { CollectConfigContainer } from './components';
import { DASHBOARD_TO_DASHBOARD_DRILLDOWN } from './constants';
@@ -22,7 +22,8 @@ import { StartServicesGetter } from '../../../../../../../src/plugins/kibana_uti
import { StartDependencies } from '../../../plugin';
export interface Params {
- start: StartServicesGetter>;
+ start: StartServicesGetter>;
+ getDashboardUrlGenerator: () => DashboardUrlGenerator;
}
export class DashboardToDashboardDrilldown
@@ -142,9 +143,7 @@ export class DashboardToDashboardDrilldown
}
}
- const { plugins } = this.params.start();
-
- return plugins.share.urlGenerators.getUrlGenerator(DASHBOARD_APP_URL_GENERATOR).createUrl({
+ return this.params.getDashboardUrlGenerator().createUrl({
dashboardId: config.dashboardId,
query: config.useCurrentFilters ? query : undefined,
timeRange,
diff --git a/x-pack/plugins/drilldowns/public/components/connected_flyout_manage_drilldowns/connected_flyout_manage_drilldowns.tsx b/x-pack/plugins/drilldowns/public/components/connected_flyout_manage_drilldowns/connected_flyout_manage_drilldowns.tsx
index 0d4a67e325e4d..5ebda079a15bf 100644
--- a/x-pack/plugins/drilldowns/public/components/connected_flyout_manage_drilldowns/connected_flyout_manage_drilldowns.tsx
+++ b/x-pack/plugins/drilldowns/public/components/connected_flyout_manage_drilldowns/connected_flyout_manage_drilldowns.tsx
@@ -289,8 +289,8 @@ function useDrilldownsStateManager(
await run(async () => {
await actionManager.createEvent(action, selectedTriggers);
notifications.toasts.addSuccess({
- title: toastDrilldownCreated.title,
- text: toastDrilldownCreated.text(action.name),
+ title: toastDrilldownCreated.title(action.name),
+ text: toastDrilldownCreated.text,
});
});
}
@@ -303,8 +303,8 @@ function useDrilldownsStateManager(
await run(async () => {
await actionManager.updateEvent(drilldownId, action, selectedTriggers);
notifications.toasts.addSuccess({
- title: toastDrilldownEdited.title,
- text: toastDrilldownEdited.text(action.name),
+ title: toastDrilldownEdited.title(action.name),
+ text: toastDrilldownEdited.text,
});
});
}
@@ -320,8 +320,8 @@ function useDrilldownsStateManager(
text: toastDrilldownDeleted.text,
}
: {
- title: toastDrilldownsDeleted.title,
- text: toastDrilldownsDeleted.text(drilldownIds.length),
+ title: toastDrilldownsDeleted.title(drilldownIds.length),
+ text: toastDrilldownsDeleted.text,
}
);
});
diff --git a/x-pack/plugins/drilldowns/public/components/connected_flyout_manage_drilldowns/i18n.ts b/x-pack/plugins/drilldowns/public/components/connected_flyout_manage_drilldowns/i18n.ts
index 31384860786ef..851439eccbe7e 100644
--- a/x-pack/plugins/drilldowns/public/components/connected_flyout_manage_drilldowns/i18n.ts
+++ b/x-pack/plugins/drilldowns/public/components/connected_flyout_manage_drilldowns/i18n.ts
@@ -7,35 +7,41 @@
import { i18n } from '@kbn/i18n';
export const toastDrilldownCreated = {
- title: i18n.translate(
- 'xpack.drilldowns.components.flyoutDrilldownWizard.toast.drilldownCreatedTitle',
+ title: (drilldownName: string) =>
+ i18n.translate(
+ 'xpack.drilldowns.components.flyoutDrilldownWizard.toast.drilldownCreatedTitle',
+ {
+ defaultMessage: 'Drilldown "{drilldownName}" created',
+ values: {
+ drilldownName,
+ },
+ }
+ ),
+ text: i18n.translate(
+ 'xpack.drilldowns.components.flyoutDrilldownWizard.toast.drilldownCreatedText',
{
- defaultMessage: 'Drilldown created',
+ // TODO: remove `Save your dashboard before testing.` part
+ // when drilldowns are used not only in dashboard
+ // or after https://github.com/elastic/kibana/issues/65179 implemented
+ defaultMessage: 'Save your dashboard before testing.',
}
),
- text: (drilldownName: string) =>
- i18n.translate('xpack.drilldowns.components.flyoutDrilldownWizard.toast.drilldownCreatedText', {
- defaultMessage: 'You created "{drilldownName}". Save dashboard before testing.',
- values: {
- drilldownName,
- },
- }),
};
export const toastDrilldownEdited = {
- title: i18n.translate(
- 'xpack.drilldowns.components.flyoutDrilldownWizard.toast.drilldownEditedTitle',
- {
- defaultMessage: 'Drilldown edited',
- }
- ),
- text: (drilldownName: string) =>
- i18n.translate('xpack.drilldowns.components.flyoutDrilldownWizard.toast.drilldownEditedText', {
- defaultMessage: 'You edited "{drilldownName}". Save dashboard before testing.',
+ title: (drilldownName: string) =>
+ i18n.translate('xpack.drilldowns.components.flyoutDrilldownWizard.toast.drilldownEditedTitle', {
+ defaultMessage: 'Drilldown "{drilldownName}" updated',
values: {
drilldownName,
},
}),
+ text: i18n.translate(
+ 'xpack.drilldowns.components.flyoutDrilldownWizard.toast.drilldownEditedText',
+ {
+ defaultMessage: 'Save your dashboard before testing.',
+ }
+ ),
};
export const toastDrilldownDeleted = {
@@ -48,28 +54,26 @@ export const toastDrilldownDeleted = {
text: i18n.translate(
'xpack.drilldowns.components.flyoutDrilldownWizard.toast.drilldownDeletedText',
{
- defaultMessage: 'You deleted a drilldown.',
+ defaultMessage: 'Save your dashboard before testing.',
}
),
};
export const toastDrilldownsDeleted = {
- title: i18n.translate(
- 'xpack.drilldowns.components.flyoutDrilldownWizard.toast.drilldownsDeletedTitle',
- {
- defaultMessage: 'Drilldowns deleted',
- }
- ),
- text: (n: number) =>
+ title: (n: number) =>
i18n.translate(
- 'xpack.drilldowns.components.flyoutDrilldownWizard.toast.drilldownsDeletedText',
+ 'xpack.drilldowns.components.flyoutDrilldownWizard.toast.drilldownsDeletedTitle',
{
- defaultMessage: 'You deleted {n} drilldowns',
- values: {
- n,
- },
+ defaultMessage: '{n} drilldowns deleted',
+ values: { n },
}
),
+ text: i18n.translate(
+ 'xpack.drilldowns.components.flyoutDrilldownWizard.toast.drilldownsDeletedText',
+ {
+ defaultMessage: 'Save your dashboard before testing.',
+ }
+ ),
};
export const toastDrilldownsCRUDError = i18n.translate(
@@ -79,10 +83,3 @@ export const toastDrilldownsCRUDError = i18n.translate(
description: 'Title for generic error toast when persisting drilldown updates failed',
}
);
-
-export const toastDrilldownsFetchError = i18n.translate(
- 'xpack.drilldowns.components.flyoutDrilldownWizard.toast.drilldownsFetchErrorTitle',
- {
- defaultMessage: 'Error fetching drilldowns',
- }
-);
diff --git a/x-pack/plugins/drilldowns/public/components/drilldown_hello_bar/i18n.ts b/x-pack/plugins/drilldowns/public/components/drilldown_hello_bar/i18n.ts
index 63dc95dabc0fb..622376c5b40ad 100644
--- a/x-pack/plugins/drilldowns/public/components/drilldown_hello_bar/i18n.ts
+++ b/x-pack/plugins/drilldowns/public/components/drilldown_hello_bar/i18n.ts
@@ -10,7 +10,7 @@ export const txtHelpText = i18n.translate(
'xpack.drilldowns.components.DrilldownHelloBar.helpText',
{
defaultMessage:
- 'Drilldowns provide the ability to define a new behavior when interacting with a panel. You can add multiple options or simply override the default filtering behavior.',
+ 'Drilldowns enable you to define new behaviors for interacting with panels. You can add multiple actions and override the default filter.',
}
);
diff --git a/x-pack/plugins/index_management/public/application/components/mappings_editor/__jest__/client_integration/datatypes/shape_datatype.test.tsx b/x-pack/plugins/index_management/public/application/components/mappings_editor/__jest__/client_integration/datatypes/shape_datatype.test.tsx
index 19bf6973472ff..0816770aab3a8 100644
--- a/x-pack/plugins/index_management/public/application/components/mappings_editor/__jest__/client_integration/datatypes/shape_datatype.test.tsx
+++ b/x-pack/plugins/index_management/public/application/components/mappings_editor/__jest__/client_integration/datatypes/shape_datatype.test.tsx
@@ -20,7 +20,9 @@ export const defaultShapeParameters = {
ignore_z_value: true,
};
-describe('Mappings editor: shape datatype', () => {
+// That test is being flaky and is under work to be fixed
+// Skipping it for now.
+describe.skip('Mappings editor: shape datatype', () => {
let testBed: MappingsEditorTestBed;
/**
diff --git a/x-pack/plugins/infra/public/components/alerting/logs/expression_editor/editor.tsx b/x-pack/plugins/infra/public/components/alerting/logs/expression_editor/editor.tsx
index 8bdffbeb36f3a..06855cc7e765d 100644
--- a/x-pack/plugins/infra/public/components/alerting/logs/expression_editor/editor.tsx
+++ b/x-pack/plugins/infra/public/components/alerting/logs/expression_editor/editor.tsx
@@ -129,7 +129,7 @@ export const Editor: React.FC = props => {
const { sourceStatus } = useLogSourceContext();
useMount(() => {
- for (const [key, value] of Object.entries(DEFAULT_EXPRESSION)) {
+ for (const [key, value] of Object.entries({ ...DEFAULT_EXPRESSION, ...alertParams })) {
setAlertParams(key, value);
setHasSetDefaults(true);
}
diff --git a/x-pack/plugins/ingest_manager/public/applications/ingest_manager/sections/epm/components/package_list_grid.tsx b/x-pack/plugins/ingest_manager/public/applications/ingest_manager/sections/epm/components/package_list_grid.tsx
index 818b365d5be12..2f06d1d8703c2 100644
--- a/x-pack/plugins/ingest_manager/public/applications/ingest_manager/sections/epm/components/package_list_grid.tsx
+++ b/x-pack/plugins/ingest_manager/public/applications/ingest_manager/sections/epm/components/package_list_grid.tsx
@@ -13,6 +13,7 @@ import {
// @ts-ignore
EuiSearchBar,
EuiText,
+ Query,
} from '@elastic/eui';
import { i18n } from '@kbn/i18n';
import { FormattedMessage } from '@kbn/i18n/react';
@@ -35,9 +36,28 @@ export function PackageListGrid({
list,
showInstalledBadge,
}: ListProps) {
+ const initialQuery = EuiSearchBar.Query.MATCH_ALL;
+
+ const [query, setQuery] = useState(initialQuery);
const [searchTerm, setSearchTerm] = useState('');
const localSearchRef = useLocalSearch(list);
+ const onQueryChange = ({
+ // eslint-disable-next-line no-shadow
+ query,
+ queryText: userInput,
+ error,
+ }: {
+ query: Query | null;
+ queryText: string;
+ error: { message: string } | null;
+ }) => {
+ if (!error) {
+ setQuery(query);
+ setSearchTerm(userInput);
+ }
+ };
+
const controlsContent = ;
let gridContent: JSX.Element;
@@ -59,16 +79,14 @@ export function PackageListGrid({
{controlsContent}
{
- setSearchTerm(userInput);
- }}
+ onChange={onQueryChange}
/>
{gridContent}
diff --git a/x-pack/plugins/ingest_manager/server/plugin.ts b/x-pack/plugins/ingest_manager/server/plugin.ts
index 24f3a11789dc7..cd44b61974b03 100644
--- a/x-pack/plugins/ingest_manager/server/plugin.ts
+++ b/x-pack/plugins/ingest_manager/server/plugin.ts
@@ -8,6 +8,7 @@ import { first } from 'rxjs/operators';
import {
CoreSetup,
CoreStart,
+ Logger,
Plugin,
PluginInitializerContext,
SavedObjectsServiceStart,
@@ -73,6 +74,7 @@ export interface IngestManagerAppContext {
isProductionMode: boolean;
kibanaVersion: string;
cloud?: CloudSetup;
+ logger?: Logger;
httpSetup?: HttpServiceSetup;
}
@@ -108,6 +110,7 @@ export class IngestManagerPlugin
private config$: Observable;
private security: SecurityPluginSetup | undefined;
private cloud: CloudSetup | undefined;
+ private logger: Logger | undefined;
private isProductionMode: boolean;
private kibanaVersion: string;
@@ -117,6 +120,7 @@ export class IngestManagerPlugin
this.config$ = this.initializerContext.config.create();
this.isProductionMode = this.initializerContext.env.mode.prod;
this.kibanaVersion = this.initializerContext.env.packageInfo.version;
+ this.logger = this.initializerContext.logger.get();
}
public async setup(core: CoreSetup, deps: IngestManagerSetupDeps) {
@@ -208,6 +212,7 @@ export class IngestManagerPlugin
kibanaVersion: this.kibanaVersion,
httpSetup: this.httpSetup,
cloud: this.cloud,
+ logger: this.logger,
});
licenseService.start(this.licensing$);
return {
diff --git a/x-pack/plugins/ingest_manager/server/routes/enrollment_api_key/handler.ts b/x-pack/plugins/ingest_manager/server/routes/enrollment_api_key/handler.ts
index 9d3eb5360dbe3..94fc6de609613 100644
--- a/x-pack/plugins/ingest_manager/server/routes/enrollment_api_key/handler.ts
+++ b/x-pack/plugins/ingest_manager/server/routes/enrollment_api_key/handler.ts
@@ -58,6 +58,12 @@ export const postEnrollmentApiKeyHandler: RequestHandler<
return response.ok({ body });
} catch (e) {
+ if (e.isBoom) {
+ return response.customError({
+ statusCode: e.output.statusCode,
+ body: { message: e.message },
+ });
+ }
return response.customError({
statusCode: 500,
body: { message: e.message },
diff --git a/x-pack/plugins/ingest_manager/server/services/api_keys/enrollment_api_key.ts b/x-pack/plugins/ingest_manager/server/services/api_keys/enrollment_api_key.ts
index 1ac812c3380cd..3b003f47eb6f9 100644
--- a/x-pack/plugins/ingest_manager/server/services/api_keys/enrollment_api_key.ts
+++ b/x-pack/plugins/ingest_manager/server/services/api_keys/enrollment_api_key.ts
@@ -5,6 +5,7 @@
*/
import uuid from 'uuid';
+import Boom from 'boom';
import { SavedObjectsClientContract, SavedObject } from 'src/core/server';
import { EnrollmentAPIKey, EnrollmentAPIKeySOAttributes } from '../../types';
import { ENROLLMENT_API_KEYS_SAVED_OBJECT_TYPE } from '../../constants';
@@ -106,6 +107,9 @@ export async function generateEnrollmentAPIKey(
) {
const id = uuid.v4();
const { name: providedKeyName } = data;
+ if (data.configId) {
+ await validateConfigId(soClient, data.configId);
+ }
const configId = data.configId ?? (await agentConfigService.getDefaultAgentConfigId(soClient));
const name = providedKeyName ? `${providedKeyName} (${id})` : id;
const key = await createAPIKey(soClient, name, {
@@ -143,6 +147,17 @@ export async function generateEnrollmentAPIKey(
return getEnrollmentAPIKey(soClient, so.id);
}
+async function validateConfigId(soClient: SavedObjectsClientContract, configId: string) {
+ try {
+ await agentConfigService.get(soClient, configId);
+ } catch (e) {
+ if (e.isBoom && e.output.statusCode === 404) {
+ throw Boom.badRequest(`Agent config ${configId} does not exist`);
+ }
+ throw e;
+ }
+}
+
function savedObjectToEnrollmentApiKey({
error,
attributes,
diff --git a/x-pack/plugins/ingest_manager/server/services/app_context.ts b/x-pack/plugins/ingest_manager/server/services/app_context.ts
index 6da0a137fa087..e5bc082f6f0fc 100644
--- a/x-pack/plugins/ingest_manager/server/services/app_context.ts
+++ b/x-pack/plugins/ingest_manager/server/services/app_context.ts
@@ -5,7 +5,7 @@
*/
import { BehaviorSubject, Observable } from 'rxjs';
import { first } from 'rxjs/operators';
-import { SavedObjectsServiceStart, HttpServiceSetup } from 'src/core/server';
+import { SavedObjectsServiceStart, HttpServiceSetup, Logger } from 'src/core/server';
import { EncryptedSavedObjectsPluginStart } from '../../../encrypted_saved_objects/server';
import { SecurityPluginSetup } from '../../../security/server';
import { IngestManagerConfigType } from '../../common';
@@ -21,6 +21,7 @@ class AppContextService {
private isProductionMode: boolean = false;
private kibanaVersion: string | undefined;
private cloud?: CloudSetup;
+ private logger?: Logger;
private httpSetup?: HttpServiceSetup;
public async start(appContext: IngestManagerAppContext) {
@@ -29,6 +30,7 @@ class AppContextService {
this.savedObjects = appContext.savedObjects;
this.isProductionMode = appContext.isProductionMode;
this.cloud = appContext.cloud;
+ this.logger = appContext.logger;
this.kibanaVersion = appContext.kibanaVersion;
this.httpSetup = appContext.httpSetup;
@@ -60,6 +62,10 @@ class AppContextService {
return this.cloud;
}
+ public getLogger() {
+ return this.logger;
+ }
+
public getConfig() {
return this.configSubject$?.value;
}
diff --git a/x-pack/plugins/ingest_pipelines/__jest__/client_integration/ingest_pipelines_create.test.tsx b/x-pack/plugins/ingest_pipelines/__jest__/client_integration/ingest_pipelines_create.test.tsx
index e0be8d2937729..6acb6369e2e90 100644
--- a/x-pack/plugins/ingest_pipelines/__jest__/client_integration/ingest_pipelines_create.test.tsx
+++ b/x-pack/plugins/ingest_pipelines/__jest__/client_integration/ingest_pipelines_create.test.tsx
@@ -107,15 +107,11 @@ describe('', () => {
component.update();
});
- expect(form.getErrorsMessages()).toEqual([
- 'Name is required.',
- 'A description is required.',
- ]);
+ expect(form.getErrorsMessages()).toEqual(['Name is required.']);
expect(find('submitButton').props().disabled).toEqual(true);
// Add required fields and verify button is enabled again
form.setInputValue('nameField.input', 'my_pipeline');
- form.setInputValue('descriptionField.input', 'pipeline description');
await act(async () => {
await nextTick();
diff --git a/x-pack/plugins/ingest_pipelines/public/application/components/pipeline_form/schema.tsx b/x-pack/plugins/ingest_pipelines/public/application/components/pipeline_form/schema.tsx
index f222d48c11af0..e122307ca9485 100644
--- a/x-pack/plugins/ingest_pipelines/public/application/components/pipeline_form/schema.tsx
+++ b/x-pack/plugins/ingest_pipelines/public/application/components/pipeline_form/schema.tsx
@@ -34,17 +34,8 @@ export const pipelineFormSchema: FormSchema = {
description: {
type: FIELD_TYPES.TEXTAREA,
label: i18n.translate('xpack.ingestPipelines.form.descriptionFieldLabel', {
- defaultMessage: 'Description',
+ defaultMessage: 'Description (optional)',
}),
- validations: [
- {
- validator: emptyField(
- i18n.translate('xpack.ingestPipelines.form.pipelineDescriptionRequiredError', {
- defaultMessage: 'A description is required.',
- })
- ),
- },
- ],
},
processors: {
label: i18n.translate('xpack.ingestPipelines.form.processorsFieldLabel', {
diff --git a/x-pack/plugins/ingest_pipelines/public/application/sections/pipelines_list/details_flyout.tsx b/x-pack/plugins/ingest_pipelines/public/application/sections/pipelines_list/details_flyout.tsx
index a6eff63b5e725..39789bb38ed41 100644
--- a/x-pack/plugins/ingest_pipelines/public/application/sections/pipelines_list/details_flyout.tsx
+++ b/x-pack/plugins/ingest_pipelines/public/application/sections/pipelines_list/details_flyout.tsx
@@ -117,14 +117,16 @@ export const PipelineDetailsFlyout: FunctionComponent = ({
{/* Pipeline description */}
-
- {i18n.translate('xpack.ingestPipelines.list.pipelineDetails.descriptionTitle', {
- defaultMessage: 'Description',
- })}
-
-
- {pipeline.description ?? ''}
-
+ {pipeline.description && (
+ <>
+
+ {i18n.translate('xpack.ingestPipelines.list.pipelineDetails.descriptionTitle', {
+ defaultMessage: 'Description',
+ })}
+
+ {pipeline.description}
+ >
+ )}
{/* Pipeline version */}
{pipeline.version && (
diff --git a/x-pack/plugins/ingest_pipelines/server/routes/api/create.ts b/x-pack/plugins/ingest_pipelines/server/routes/api/create.ts
index 63637eaac765d..803d34bf0042b 100644
--- a/x-pack/plugins/ingest_pipelines/server/routes/api/create.ts
+++ b/x-pack/plugins/ingest_pipelines/server/routes/api/create.ts
@@ -12,7 +12,7 @@ import { RouteDependencies } from '../../types';
const bodySchema = schema.object({
name: schema.string(),
- description: schema.string(),
+ description: schema.maybe(schema.string()),
processors: schema.arrayOf(schema.recordOf(schema.string(), schema.any())),
version: schema.maybe(schema.number()),
on_failure: schema.maybe(schema.arrayOf(schema.recordOf(schema.string(), schema.any()))),
diff --git a/x-pack/plugins/maps/kibana.json b/x-pack/plugins/maps/kibana.json
index 077601204e3ee..efbac56a817be 100644
--- a/x-pack/plugins/maps/kibana.json
+++ b/x-pack/plugins/maps/kibana.json
@@ -4,8 +4,9 @@
"kibanaVersion": "kibana",
"configPath": ["xpack", "maps"],
"requiredPlugins": [
- "inspector",
"licensing",
+ "features",
+ "inspector",
"home",
"data",
"fileUpload",
@@ -15,5 +16,6 @@
"embeddable",
"mapsLegacy"
],
- "ui": true
+ "ui": true,
+ "server": true
}
diff --git a/x-pack/plugins/maps/public/angular/services/saved_gis_map.js b/x-pack/plugins/maps/public/angular/services/saved_gis_map.js
index 1a58b0cefaed9..2de4432871347 100644
--- a/x-pack/plugins/maps/public/angular/services/saved_gis_map.js
+++ b/x-pack/plugins/maps/public/angular/services/saved_gis_map.js
@@ -19,7 +19,7 @@ import {
} from '../../selectors/map_selectors';
import { getIsLayerTOCOpen, getOpenTOCDetails } from '../../selectors/ui_selectors';
-import { convertMapExtentToPolygon } from '../../elasticsearch_geo_utils';
+import { formatEnvelopeAsPolygon } from '../../elasticsearch_geo_utils';
import { copyPersistentState } from '../../reducers/util';
import { extractReferences, injectReferences } from '../../../common/migrations/references';
@@ -107,7 +107,7 @@ export function createSavedGisMapClass(services) {
openTOCDetails: getOpenTOCDetails(state),
});
- this.bounds = convertMapExtentToPolygon(getMapExtent(state));
+ this.bounds = formatEnvelopeAsPolygon(getMapExtent(state));
}
}
return SavedGisMap;
diff --git a/x-pack/plugins/maps/public/elasticsearch_geo_utils.js b/x-pack/plugins/maps/public/elasticsearch_geo_utils.js
index 888fce7e7afe0..419b169138ef1 100644
--- a/x-pack/plugins/maps/public/elasticsearch_geo_utils.js
+++ b/x-pack/plugins/maps/public/elasticsearch_geo_utils.js
@@ -225,41 +225,62 @@ export function geoShapeToGeometry(value, accumulator) {
accumulator.push(geoJson);
}
-function createGeoBoundBoxFilter(geometry, geoFieldName, filterProps = {}) {
- ensureGeometryType(geometry.type, [GEO_JSON_TYPE.POLYGON]);
+function createGeoBoundBoxFilter({ maxLat, maxLon, minLat, minLon }, geoFieldName) {
+ const top = clampToLatBounds(maxLat);
+ const bottom = clampToLatBounds(minLat);
+
+ // geo_bounding_box does not support ranges outside of -180 and 180
+ // When the area crosses the 180° meridian,
+ // the value of the lower left longitude will be greater than the value of the upper right longitude.
+ // http://docs.opengeospatial.org/is/12-063r5/12-063r5.html#30
+ let boundingBox;
+ if (maxLon - minLon >= 360) {
+ boundingBox = {
+ top_left: [-180, top],
+ bottom_right: [180, bottom],
+ };
+ } else if (maxLon > 180) {
+ const overflow = maxLon - 180;
+ boundingBox = {
+ top_left: [minLon, top],
+ bottom_right: [-180 + overflow, bottom],
+ };
+ } else if (minLon < -180) {
+ const overflow = Math.abs(minLon) - 180;
+ boundingBox = {
+ top_left: [180 - overflow, top],
+ bottom_right: [maxLon, bottom],
+ };
+ } else {
+ boundingBox = {
+ top_left: [minLon, top],
+ bottom_right: [maxLon, bottom],
+ };
+ }
- const TOP_LEFT_INDEX = 0;
- const BOTTOM_RIGHT_INDEX = 2;
- const verticies = geometry.coordinates[POLYGON_COORDINATES_EXTERIOR_INDEX];
return {
geo_bounding_box: {
- [geoFieldName]: {
- top_left: verticies[TOP_LEFT_INDEX],
- bottom_right: verticies[BOTTOM_RIGHT_INDEX],
- },
+ [geoFieldName]: boundingBox,
},
- ...filterProps,
};
}
export function createExtentFilter(mapExtent, geoFieldName, geoFieldType) {
ensureGeoField(geoFieldType);
- const safePolygon = convertMapExtentToPolygon(mapExtent);
-
// Extent filters are used to dynamically filter data for the current map view port.
// Continue to use geo_bounding_box queries for extent filters
// 1) geo_bounding_box queries are faster than polygon queries
// 2) geo_shape benefits of pre-indexed shapes and
// compatability across multi-indices with geo_point and geo_shape do not apply to this use case.
if (geoFieldType === ES_GEO_FIELD_TYPE.GEO_POINT) {
- return createGeoBoundBoxFilter(safePolygon, geoFieldName);
+ return createGeoBoundBoxFilter(mapExtent, geoFieldName);
}
return {
geo_shape: {
[geoFieldName]: {
- shape: safePolygon,
+ shape: formatEnvelopeAsPolygon(mapExtent),
relation: ES_SPATIAL_RELATIONS.INTERSECTS,
},
},
@@ -376,16 +397,16 @@ export function getBoundingBoxGeometry(geometry) {
extent.maxLat = Math.max(exterior[i][LAT_INDEX], extent.maxLat);
}
- return convertMapExtentToPolygon(extent);
+ return formatEnvelopeAsPolygon(extent);
}
-function formatEnvelopeAsPolygon({ maxLat, maxLon, minLat, minLon }) {
+export function formatEnvelopeAsPolygon({ maxLat, maxLon, minLat, minLon }) {
// GeoJSON mandates that the outer polygon must be counterclockwise to avoid ambiguous polygons
// when the shape crosses the dateline
const left = minLon;
const right = maxLon;
- const top = maxLat > 90 ? 90 : maxLat;
- const bottom = minLat < -90 ? -90 : minLat;
+ const top = clampToLatBounds(maxLat);
+ const bottom = clampToLatBounds(minLat);
const topLeft = [left, top];
const bottomLeft = [left, bottom];
const bottomRight = [right, bottom];
@@ -396,45 +417,6 @@ function formatEnvelopeAsPolygon({ maxLat, maxLon, minLat, minLon }) {
};
}
-/*
- * Convert map bounds to polygon
- */
-export function convertMapExtentToPolygon({ maxLat, maxLon, minLat, minLon }) {
- const lonDelta = maxLon - minLon;
- if (lonDelta >= 360) {
- return formatEnvelopeAsPolygon({
- maxLat,
- maxLon: 180,
- minLat,
- minLon: -180,
- });
- }
-
- if (maxLon > 180) {
- // bounds cross dateline east to west
- const overlapWestOfDateLine = maxLon - 180;
- return formatEnvelopeAsPolygon({
- maxLat,
- maxLon: -180 + overlapWestOfDateLine,
- minLat,
- minLon,
- });
- }
-
- if (minLon < -180) {
- // bounds cross dateline west to east
- const overlapEastOfDateLine = Math.abs(minLon) - 180;
- return formatEnvelopeAsPolygon({
- maxLat,
- maxLon,
- minLat,
- minLon: 180 - overlapEastOfDateLine,
- });
- }
-
- return formatEnvelopeAsPolygon({ maxLat, maxLon, minLat, minLon });
-}
-
export function clampToLatBounds(lat) {
return clamp(lat, -89, 89);
}
diff --git a/x-pack/plugins/maps/public/elasticsearch_geo_utils.test.js b/x-pack/plugins/maps/public/elasticsearch_geo_utils.test.js
index d13291a8e2ba5..c0baf5e4bcb6e 100644
--- a/x-pack/plugins/maps/public/elasticsearch_geo_utils.test.js
+++ b/x-pack/plugins/maps/public/elasticsearch_geo_utils.test.js
@@ -17,19 +17,12 @@ import {
geoPointToGeometry,
geoShapeToGeometry,
createExtentFilter,
- convertMapExtentToPolygon,
roundCoordinates,
extractFeaturesFromFilters,
} from './elasticsearch_geo_utils';
import { indexPatterns } from '../../../../src/plugins/data/public';
const geoFieldName = 'location';
-const mapExtent = {
- maxLat: 39,
- maxLon: -83,
- minLat: 35,
- minLon: -89,
-};
const flattenHitMock = hit => {
const properties = {};
@@ -317,174 +310,143 @@ describe('geoShapeToGeometry', () => {
});
describe('createExtentFilter', () => {
- it('should return elasticsearch geo_bounding_box filter for geo_point field', () => {
- const filter = createExtentFilter(mapExtent, geoFieldName, 'geo_point');
- expect(filter).toEqual({
- geo_bounding_box: {
- location: {
- bottom_right: [-83, 35],
- top_left: [-89, 39],
+ describe('geo_point field', () => {
+ it('should return elasticsearch geo_bounding_box filter for geo_point field', () => {
+ const mapExtent = {
+ maxLat: 39,
+ maxLon: -83,
+ minLat: 35,
+ minLon: -89,
+ };
+ const filter = createExtentFilter(mapExtent, geoFieldName, 'geo_point');
+ expect(filter).toEqual({
+ geo_bounding_box: {
+ location: {
+ top_left: [-89, 39],
+ bottom_right: [-83, 35],
+ },
},
- },
+ });
});
- });
- it('should return elasticsearch geo_shape filter for geo_shape field', () => {
- const filter = createExtentFilter(mapExtent, geoFieldName, 'geo_shape');
- expect(filter).toEqual({
- geo_shape: {
- location: {
- relation: 'INTERSECTS',
- shape: {
- coordinates: [
- [
- [-89, 39],
- [-89, 35],
- [-83, 35],
- [-83, 39],
- [-89, 39],
- ],
- ],
- type: 'Polygon',
+ it('should clamp longitudes to -180 to 180 and latitudes to -90 to 90', () => {
+ const mapExtent = {
+ maxLat: 120,
+ maxLon: 200,
+ minLat: -100,
+ minLon: -190,
+ };
+ const filter = createExtentFilter(mapExtent, geoFieldName, 'geo_point');
+ expect(filter).toEqual({
+ geo_bounding_box: {
+ location: {
+ top_left: [-180, 89],
+ bottom_right: [180, -89],
},
},
- },
+ });
});
- });
- it('should clamp longitudes to -180 to 180', () => {
- const mapExtent = {
- maxLat: 39,
- maxLon: 209,
- minLat: 35,
- minLon: -191,
- };
- const filter = createExtentFilter(mapExtent, geoFieldName, 'geo_shape');
- expect(filter).toEqual({
- geo_shape: {
- location: {
- relation: 'INTERSECTS',
- shape: {
- coordinates: [
- [
- [-180, 39],
- [-180, 35],
- [180, 35],
- [180, 39],
- [-180, 39],
- ],
- ],
- type: 'Polygon',
+ it('should make left longitude greater then right longitude when area crosses 180 meridian east to west', () => {
+ const mapExtent = {
+ maxLat: 39,
+ maxLon: 200,
+ minLat: 35,
+ minLon: 100,
+ };
+ const filter = createExtentFilter(mapExtent, geoFieldName, 'geo_point');
+ const leftLon = filter.geo_bounding_box.location.top_left[0];
+ const rightLon = filter.geo_bounding_box.location.bottom_right[0];
+ expect(leftLon).toBeGreaterThan(rightLon);
+ expect(filter).toEqual({
+ geo_bounding_box: {
+ location: {
+ top_left: [100, 39],
+ bottom_right: [-160, 35],
},
},
- },
- });
- });
-});
-
-describe('convertMapExtentToPolygon', () => {
- it('should convert bounds to envelope', () => {
- const bounds = {
- maxLat: 10,
- maxLon: 100,
- minLat: -10,
- minLon: 90,
- };
- expect(convertMapExtentToPolygon(bounds)).toEqual({
- type: 'Polygon',
- coordinates: [
- [
- [90, 10],
- [90, -10],
- [100, -10],
- [100, 10],
- [90, 10],
- ],
- ],
- });
- });
-
- it('should clamp longitudes to -180 to 180', () => {
- const bounds = {
- maxLat: 10,
- maxLon: 200,
- minLat: -10,
- minLon: -400,
- };
- expect(convertMapExtentToPolygon(bounds)).toEqual({
- type: 'Polygon',
- coordinates: [
- [
- [-180, 10],
- [-180, -10],
- [180, -10],
- [180, 10],
- [-180, 10],
- ],
- ],
+ });
});
- });
- it('should clamp longitudes to -180 to 180 when bounds span entire globe (360)', () => {
- const bounds = {
- maxLat: 10,
- maxLon: 170,
- minLat: -10,
- minLon: -400,
- };
- expect(convertMapExtentToPolygon(bounds)).toEqual({
- type: 'Polygon',
- coordinates: [
- [
- [-180, 10],
- [-180, -10],
- [180, -10],
- [180, 10],
- [-180, 10],
- ],
- ],
+ it('should make left longitude greater then right longitude when area crosses 180 meridian west to east', () => {
+ const mapExtent = {
+ maxLat: 39,
+ maxLon: -100,
+ minLat: 35,
+ minLon: -200,
+ };
+ const filter = createExtentFilter(mapExtent, geoFieldName, 'geo_point');
+ const leftLon = filter.geo_bounding_box.location.top_left[0];
+ const rightLon = filter.geo_bounding_box.location.bottom_right[0];
+ expect(leftLon).toBeGreaterThan(rightLon);
+ expect(filter).toEqual({
+ geo_bounding_box: {
+ location: {
+ top_left: [160, 39],
+ bottom_right: [-100, 35],
+ },
+ },
+ });
});
});
- it('should handle bounds that cross dateline(east to west)', () => {
- const bounds = {
- maxLat: 10,
- maxLon: 190,
- minLat: -10,
- minLon: 170,
- };
- expect(convertMapExtentToPolygon(bounds)).toEqual({
- type: 'Polygon',
- coordinates: [
- [
- [170, 10],
- [170, -10],
- [-170, -10],
- [-170, 10],
- [170, 10],
- ],
- ],
+ describe('geo_shape field', () => {
+ it('should return elasticsearch geo_shape filter', () => {
+ const mapExtent = {
+ maxLat: 39,
+ maxLon: -83,
+ minLat: 35,
+ minLon: -89,
+ };
+ const filter = createExtentFilter(mapExtent, geoFieldName, 'geo_shape');
+ expect(filter).toEqual({
+ geo_shape: {
+ location: {
+ relation: 'INTERSECTS',
+ shape: {
+ coordinates: [
+ [
+ [-89, 39],
+ [-89, 35],
+ [-83, 35],
+ [-83, 39],
+ [-89, 39],
+ ],
+ ],
+ type: 'Polygon',
+ },
+ },
+ },
+ });
});
- });
- it('should handle bounds that cross dateline(west to east)', () => {
- const bounds = {
- maxLat: 10,
- maxLon: -170,
- minLat: -10,
- minLon: -190,
- };
- expect(convertMapExtentToPolygon(bounds)).toEqual({
- type: 'Polygon',
- coordinates: [
- [
- [170, 10],
- [170, -10],
- [-170, -10],
- [-170, 10],
- [170, 10],
- ],
- ],
+ it('should not clamp longitudes to -180 to 180', () => {
+ const mapExtent = {
+ maxLat: 39,
+ maxLon: 209,
+ minLat: 35,
+ minLon: -191,
+ };
+ const filter = createExtentFilter(mapExtent, geoFieldName, 'geo_shape');
+ expect(filter).toEqual({
+ geo_shape: {
+ location: {
+ relation: 'INTERSECTS',
+ shape: {
+ coordinates: [
+ [
+ [-191, 39],
+ [-191, 35],
+ [209, 35],
+ [209, 39],
+ [-191, 39],
+ ],
+ ],
+ type: 'Polygon',
+ },
+ },
+ },
+ });
});
});
});
diff --git a/x-pack/test/ui_capabilities/common/fixtures/plugins/foo_plugin/public/app.js b/x-pack/plugins/maps/server/index.ts
similarity index 53%
rename from x-pack/test/ui_capabilities/common/fixtures/plugins/foo_plugin/public/app.js
rename to x-pack/plugins/maps/server/index.ts
index 41bc2aa258807..1b714a3555b34 100644
--- a/x-pack/test/ui_capabilities/common/fixtures/plugins/foo_plugin/public/app.js
+++ b/x-pack/plugins/maps/server/index.ts
@@ -3,3 +3,8 @@
* or more contributor license agreements. Licensed under the Elastic License;
* you may not use this file except in compliance with the Elastic License.
*/
+import { PluginInitializerContext } from 'src/core/server';
+import { MapsPlugin } from './plugin';
+
+export const plugin = (initializerContext: PluginInitializerContext) =>
+ new MapsPlugin(initializerContext);
diff --git a/x-pack/plugins/maps/server/plugin.ts b/x-pack/plugins/maps/server/plugin.ts
new file mode 100644
index 0000000000000..7de0a69fb0079
--- /dev/null
+++ b/x-pack/plugins/maps/server/plugin.ts
@@ -0,0 +1,52 @@
+/*
+ * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
+ * or more contributor license agreements. Licensed under the Elastic License;
+ * you may not use this file except in compliance with the Elastic License.
+ */
+import { i18n } from '@kbn/i18n';
+import { CoreSetup, CoreStart, Plugin, PluginInitializerContext } from 'src/core/server';
+import { PluginSetupContract as FeaturesPluginSetupContract } from '../../features/server';
+
+import { APP_ID, APP_ICON, MAP_SAVED_OBJECT_TYPE } from '../common/constants';
+
+interface SetupDeps {
+ features: FeaturesPluginSetupContract;
+}
+
+export class MapsPlugin implements Plugin {
+ constructor(initializerContext: PluginInitializerContext) {}
+ setup(core: CoreSetup, plugins: SetupDeps) {
+ plugins.features.registerFeature({
+ id: APP_ID,
+ name: i18n.translate('xpack.maps.featureRegistry.mapsFeatureName', {
+ defaultMessage: 'Maps',
+ }),
+ order: 600,
+ icon: APP_ICON,
+ navLinkId: APP_ID,
+ app: [APP_ID, 'kibana'],
+ catalogue: [APP_ID],
+ privileges: {
+ all: {
+ app: [APP_ID, 'kibana'],
+ catalogue: [APP_ID],
+ savedObject: {
+ all: [MAP_SAVED_OBJECT_TYPE, 'query'],
+ read: ['index-pattern'],
+ },
+ ui: ['save', 'show', 'saveQuery'],
+ },
+ read: {
+ app: [APP_ID, 'kibana'],
+ catalogue: [APP_ID],
+ savedObject: {
+ all: [],
+ read: [MAP_SAVED_OBJECT_TYPE, 'index-pattern', 'query'],
+ },
+ ui: ['show'],
+ },
+ },
+ });
+ }
+ start(core: CoreStart) {}
+}
diff --git a/x-pack/plugins/ml/public/application/explorer/__mocks__/mock_viewby_swimlane.json b/x-pack/plugins/ml/public/application/explorer/__mocks__/mock_viewby_swimlane.json
new file mode 100644
index 0000000000000..05095c90ac1d6
--- /dev/null
+++ b/x-pack/plugins/ml/public/application/explorer/__mocks__/mock_viewby_swimlane.json
@@ -0,0 +1,33 @@
+{
+ "laneLabels": [
+ "View by"
+ ],
+ "points": [
+ {
+ "laneLabel": "test-1",
+ "time": 1486425600,
+ "value": 0
+ },
+ {
+ "laneLabel": "test-2",
+ "time": 1486440000,
+ "value": 0.01107053
+ },
+ {
+ "laneLabel": "other-3",
+ "time": 1486454400,
+ "value": 0.1870243
+ },
+ {
+ "laneLabel": "other-4",
+ "time": 1486468800,
+ "value": 0.5947769
+ },
+ {
+ "laneLabel": "other-5",
+ "time": 1486483200,
+ "value": 0
+ }
+ ],
+ "interval": 14400
+}
diff --git a/x-pack/plugins/ml/public/application/explorer/explorer.js b/x-pack/plugins/ml/public/application/explorer/explorer.js
index 8fd2479817807..9c9c82a212472 100644
--- a/x-pack/plugins/ml/public/application/explorer/explorer.js
+++ b/x-pack/plugins/ml/public/application/explorer/explorer.js
@@ -81,6 +81,7 @@ import { AnomaliesTable } from '../components/anomalies_table/anomalies_table';
import { ResizeChecker } from '../../../../../../src/plugins/kibana_utils/public';
import { getTimefilter, getToastNotifications } from '../util/dependency_cache';
import { MlTooltipComponent } from '../components/chart_tooltip';
+import { hasMatchingPoints } from './has_matching_points';
function mapSwimlaneOptionsToEuiOptions(options) {
return options.map(option => ({
@@ -284,6 +285,7 @@ export class Explorer extends React.Component {
annotationsData,
chartsData,
filterActive,
+ filteredFields,
filterPlaceHolder,
indexPattern,
influencers,
@@ -418,6 +420,7 @@ export class Explorer extends React.Component {
{
if (selectedCellTimes.length > 0) {
this.highlightOverall(selectedCellTimes);
}
- this.maskIrrelevantSwimlanes(!!maskAll);
+ this.maskIrrelevantSwimlanes(Boolean(maskAll));
} else {
this.clearSelection();
}
diff --git a/x-pack/plugins/ml/public/application/explorer/has_matching_points.test.ts b/x-pack/plugins/ml/public/application/explorer/has_matching_points.test.ts
new file mode 100644
index 0000000000000..8d6f71bb7720d
--- /dev/null
+++ b/x-pack/plugins/ml/public/application/explorer/has_matching_points.test.ts
@@ -0,0 +1,31 @@
+/*
+ * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
+ * or more contributor license agreements. Licensed under the Elastic License;
+ * you may not use this file except in compliance with the Elastic License.
+ */
+
+import mockViewBySwimlaneData from './__mocks__/mock_viewby_swimlane.json';
+import { hasMatchingPoints } from './has_matching_points';
+
+const filteredFieldsMatch = ['test@kuery-wildcard@'];
+const filteredFieldsNoMatch = ['no-match@kuery-wildcard@', 'nonexistant'];
+
+describe('hasMatchingPoints', () => {
+ test('is true', () => {
+ expect(
+ hasMatchingPoints({
+ filteredFields: filteredFieldsMatch,
+ swimlaneData: mockViewBySwimlaneData,
+ })
+ ).toBe(true);
+ });
+
+ test('is false', () => {
+ expect(
+ hasMatchingPoints({
+ filteredFields: filteredFieldsNoMatch,
+ swimlaneData: mockViewBySwimlaneData,
+ })
+ ).toBe(false);
+ });
+});
diff --git a/x-pack/plugins/ml/public/application/explorer/has_matching_points.ts b/x-pack/plugins/ml/public/application/explorer/has_matching_points.ts
new file mode 100644
index 0000000000000..397615d68f189
--- /dev/null
+++ b/x-pack/plugins/ml/public/application/explorer/has_matching_points.ts
@@ -0,0 +1,30 @@
+/*
+ * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
+ * or more contributor license agreements. Licensed under the Elastic License;
+ * you may not use this file except in compliance with the Elastic License.
+ */
+
+import { ExplorerState } from './reducers';
+import { OverallSwimlaneData, SwimlaneData } from './explorer_utils';
+
+interface HasMatchingPointsParams {
+ filteredFields?: ExplorerState['filteredFields'];
+ swimlaneData: SwimlaneData | OverallSwimlaneData;
+}
+
+export const hasMatchingPoints = ({
+ filteredFields = [],
+ swimlaneData,
+}: HasMatchingPointsParams): boolean => {
+ // If filtered fields includes a wildcard search maskAll only if there are no points matching the pattern
+ const wildCardField = filteredFields.find(field => /\@kuery-wildcard\@$/.test(field));
+ const substring =
+ wildCardField !== undefined ? wildCardField.replace(/\@kuery-wildcard\@$/, '') : null;
+
+ return (
+ substring !== null &&
+ swimlaneData.points.some(point => {
+ return point.laneLabel.includes(substring);
+ })
+ );
+};
diff --git a/x-pack/plugins/ml/public/application/jobs/jobs_list/components/create_watch_flyout/create_watch_service.js b/x-pack/plugins/ml/public/application/jobs/jobs_list/components/create_watch_flyout/create_watch_service.js
index 29e89022a5502..2a65ee06f2c2c 100644
--- a/x-pack/plugins/ml/public/application/jobs/jobs_list/components/create_watch_flyout/create_watch_service.js
+++ b/x-pack/plugins/ml/public/application/jobs/jobs_list/components/create_watch_flyout/create_watch_service.js
@@ -157,6 +157,7 @@ class CreateWatchService {
id,
type: 'json',
isNew: false, // Set to false, as we want to allow watches to be overwritten.
+ isActive: true,
watch,
},
};
diff --git a/x-pack/plugins/ml/server/models/data_visualizer/data_visualizer.ts b/x-pack/plugins/ml/server/models/data_visualizer/data_visualizer.ts
index 645625f92df29..8ccd359137b67 100644
--- a/x-pack/plugins/ml/server/models/data_visualizer/data_visualizer.ts
+++ b/x-pack/plugins/ml/server/models/data_visualizer/data_visualizer.ts
@@ -342,8 +342,8 @@ export class DataVisualizer {
aggregatableFields: string[],
samplerShardSize: number,
timeFieldName: string,
- earliestMs: number,
- latestMs: number
+ earliestMs?: number,
+ latestMs?: number
) {
const index = indexPatternTitle;
const size = 0;
diff --git a/x-pack/plugins/ml/server/models/job_validation/job_validation.test.ts b/x-pack/plugins/ml/server/models/job_validation/job_validation.test.ts
index ca127f43d08af..d907677855c12 100644
--- a/x-pack/plugins/ml/server/models/job_validation/job_validation.test.ts
+++ b/x-pack/plugins/ml/server/models/job_validation/job_validation.test.ts
@@ -14,6 +14,13 @@ const callWithRequest: APICaller = (method: string) => {
if (method === 'fieldCaps') {
resolve({ fields: [] });
return;
+ } else if (method === 'ml.info') {
+ resolve({
+ limits: {
+ effective_max_model_memory_limit: '100MB',
+ max_model_memory_limit: '1GB',
+ },
+ });
}
resolve({});
}) as Promise;
@@ -291,7 +298,7 @@ describe('ML - validateJob', () => {
});
// Failing https://github.com/elastic/kibana/issues/65865
- it.skip('basic validation passes, extended checks return some messages', () => {
+ it('basic validation passes, extended checks return some messages', () => {
const payload = getBasicPayload();
return validateJob(callWithRequest, payload).then(messages => {
const ids = messages.map(m => m.id);
@@ -305,7 +312,7 @@ describe('ML - validateJob', () => {
});
// Failing https://github.com/elastic/kibana/issues/65866
- it.skip('categorization job using mlcategory passes aggregatable field check', () => {
+ it('categorization job using mlcategory passes aggregatable field check', () => {
const payload: any = {
job: {
job_id: 'categorization_test',
@@ -372,7 +379,7 @@ describe('ML - validateJob', () => {
});
// Failing https://github.com/elastic/kibana/issues/65867
- it.skip('script field not reported as non aggregatable', () => {
+ it('script field not reported as non aggregatable', () => {
const payload: any = {
job: {
job_id: 'categorization_test',
diff --git a/x-pack/plugins/ml/server/models/job_validation/validate_cardinality.js b/x-pack/plugins/ml/server/models/job_validation/validate_cardinality.ts
similarity index 76%
rename from x-pack/plugins/ml/server/models/job_validation/validate_cardinality.js
rename to x-pack/plugins/ml/server/models/job_validation/validate_cardinality.ts
index 22e0510782e11..cf3d6d004c37e 100644
--- a/x-pack/plugins/ml/server/models/job_validation/validate_cardinality.js
+++ b/x-pack/plugins/ml/server/models/job_validation/validate_cardinality.ts
@@ -4,21 +4,22 @@
* you may not use this file except in compliance with the Elastic License.
*/
-import _ from 'lodash';
-
+import { APICaller } from 'kibana/server';
import { DataVisualizer } from '../data_visualizer';
import { validateJobObject } from './validate_job_object';
+import { CombinedJob } from '../../../common/types/anomaly_detection_jobs';
+import { Detector } from '../../../common/types/anomaly_detection_jobs';
-function isValidCategorizationConfig(job, fieldName) {
+function isValidCategorizationConfig(job: CombinedJob, fieldName: string): boolean {
return (
typeof job.analysis_config.categorization_field_name !== 'undefined' &&
fieldName === 'mlcategory'
);
}
-function isScriptField(job, fieldName) {
- const scriptFields = Object.keys(_.get(job, 'datafeed_config.script_fields', {}));
+function isScriptField(job: CombinedJob, fieldName: string): boolean {
+ const scriptFields = Object.keys(job.datafeed_config.script_fields ?? {});
return scriptFields.includes(fieldName);
}
@@ -30,10 +31,21 @@ const PARTITION_FIELD_CARDINALITY_THRESHOLD = 1000;
const BY_FIELD_CARDINALITY_THRESHOLD = 1000;
const MODEL_PLOT_THRESHOLD_HIGH = 100;
-const validateFactory = (callWithRequest, job) => {
+type Messages = Array<{ id: string; fieldName?: string }>;
+
+type Validator = (obj: {
+ type: string;
+ isInvalid: (cardinality: number) => boolean;
+ messageId?: string;
+}) => Promise<{
+ modelPlotCardinality: number;
+ messages: Messages;
+}>;
+
+const validateFactory = (callWithRequest: APICaller, job: CombinedJob): Validator => {
const dv = new DataVisualizer(callWithRequest);
- const modelPlotConfigTerms = _.get(job, ['model_plot_config', 'terms'], '');
+ const modelPlotConfigTerms = job?.model_plot_config?.terms ?? '';
const modelPlotConfigFieldCount =
modelPlotConfigTerms.length > 0 ? modelPlotConfigTerms.split(',').length : 0;
@@ -42,8 +54,11 @@ const validateFactory = (callWithRequest, job) => {
// if model_plot_config.terms is used, it doesn't count the real cardinality of the field
// but adds only the count of fields used in model_plot_config.terms
let modelPlotCardinality = 0;
- const messages = [];
- const fieldName = `${type}_field_name`;
+ const messages: Messages = [];
+ const fieldName = `${type}_field_name` as keyof Pick<
+ Detector,
+ 'by_field_name' | 'over_field_name' | 'partition_field_name'
+ >;
const detectors = job.analysis_config.detectors;
const relevantDetectors = detectors.filter(detector => {
@@ -52,7 +67,7 @@ const validateFactory = (callWithRequest, job) => {
if (relevantDetectors.length > 0) {
try {
- const uniqueFieldNames = _.uniq(relevantDetectors.map(f => f[fieldName]));
+ const uniqueFieldNames = [...new Set(relevantDetectors.map(f => f[fieldName]))] as string[];
// use fieldCaps endpoint to get data about whether fields are aggregatable
const fieldCaps = await callWithRequest('fieldCaps', {
@@ -60,7 +75,7 @@ const validateFactory = (callWithRequest, job) => {
fields: uniqueFieldNames,
});
- let aggregatableFieldNames = [];
+ let aggregatableFieldNames: string[] = [];
// parse fieldCaps to return an array of just the fields which are aggregatable
if (typeof fieldCaps === 'object' && typeof fieldCaps.fields === 'object') {
aggregatableFieldNames = uniqueFieldNames.filter(field => {
@@ -81,12 +96,14 @@ const validateFactory = (callWithRequest, job) => {
);
uniqueFieldNames.forEach(uniqueFieldName => {
- const field = _.find(stats.aggregatableExistsFields, { fieldName: uniqueFieldName });
- if (typeof field === 'object') {
+ const field = stats.aggregatableExistsFields.find(
+ fieldData => fieldData.fieldName === uniqueFieldName
+ );
+ if (field !== undefined && typeof field === 'object' && field.stats) {
modelPlotCardinality +=
- modelPlotConfigFieldCount > 0 ? modelPlotConfigFieldCount : field.stats.cardinality;
+ modelPlotConfigFieldCount > 0 ? modelPlotConfigFieldCount : field.stats.cardinality!;
- if (isInvalid(field.stats.cardinality)) {
+ if (isInvalid(field.stats.cardinality!)) {
messages.push({
id: messageId || `cardinality_${type}_field`,
fieldName: uniqueFieldName,
@@ -115,7 +132,7 @@ const validateFactory = (callWithRequest, job) => {
if (relevantDetectors.length === 1) {
messages.push({
id: 'field_not_aggregatable',
- fieldName: relevantDetectors[0][fieldName],
+ fieldName: relevantDetectors[0][fieldName]!,
});
} else {
messages.push({ id: 'fields_not_aggregatable' });
@@ -129,10 +146,16 @@ const validateFactory = (callWithRequest, job) => {
};
};
-export async function validateCardinality(callWithRequest, job) {
+export async function validateCardinality(
+ callWithRequest: APICaller,
+ job?: CombinedJob
+): Promise> | never {
const messages = [];
- validateJobObject(job);
+ if (!validateJobObject(job)) {
+ // required for TS type casting, validateJobObject throws an error internally.
+ throw new Error();
+ }
// find out if there are any relevant detector field names
// where cardinality checks could be run against.
@@ -140,14 +163,13 @@ export async function validateCardinality(callWithRequest, job) {
return d.by_field_name || d.over_field_name || d.partition_field_name;
});
if (numDetectorsWithFieldNames.length === 0) {
- return Promise.resolve([]);
+ return [];
}
// validate({ type, isInvalid }) asynchronously returns an array of validation messages
const validate = validateFactory(callWithRequest, job);
- const modelPlotEnabled =
- (job.model_plot_config && job.model_plot_config.enabled === true) || false;
+ const modelPlotEnabled = job.model_plot_config?.enabled ?? false;
// check over fields (population analysis)
const validateOverFieldsLow = validate({
diff --git a/x-pack/plugins/ml/server/models/job_validation/validate_job_object.ts b/x-pack/plugins/ml/server/models/job_validation/validate_job_object.ts
index b0271fb5b4f45..0d89656e05117 100644
--- a/x-pack/plugins/ml/server/models/job_validation/validate_job_object.ts
+++ b/x-pack/plugins/ml/server/models/job_validation/validate_job_object.ts
@@ -7,7 +7,7 @@
import { i18n } from '@kbn/i18n';
import { CombinedJob } from '../../../common/types/anomaly_detection_jobs';
-export function validateJobObject(job: CombinedJob | null) {
+export function validateJobObject(job: CombinedJob | null | undefined): job is CombinedJob | never {
if (job === null || typeof job !== 'object') {
throw new Error(
i18n.translate('xpack.ml.models.jobValidation.validateJobObject.jobIsNotObjectErrorMessage', {
@@ -93,4 +93,5 @@ export function validateJobObject(job: CombinedJob | null) {
)
);
}
+ return true;
}
diff --git a/x-pack/plugins/task_manager/server/saved_objects/index.ts b/x-pack/plugins/task_manager/server/saved_objects/index.ts
index 0ad9021cd7f39..fbb54b566ece0 100644
--- a/x-pack/plugins/task_manager/server/saved_objects/index.ts
+++ b/x-pack/plugins/task_manager/server/saved_objects/index.ts
@@ -6,6 +6,7 @@
import { SavedObjectsServiceSetup } from 'kibana/server';
import mappings from './mappings.json';
+import { migrations } from './migrations';
import { TaskManagerConfig } from '../config.js';
export function setupSavedObjects(
@@ -18,6 +19,7 @@ export function setupSavedObjects(
hidden: true,
convertToAliasScript: `ctx._id = ctx._source.type + ':' + ctx._id`,
mappings: mappings.task,
+ migrations,
indexPattern: config.index,
});
}
diff --git a/x-pack/plugins/task_manager/server/saved_objects/migrations.ts b/x-pack/plugins/task_manager/server/saved_objects/migrations.ts
index 1c2cf73d0fe13..617ef80749d6a 100644
--- a/x-pack/plugins/task_manager/server/saved_objects/migrations.ts
+++ b/x-pack/plugins/task_manager/server/saved_objects/migrations.ts
@@ -3,22 +3,23 @@
* or more contributor license agreements. Licensed under the Elastic License;
* you may not use this file except in compliance with the Elastic License.
*/
-import { SavedObject } from '../../../../../src/core/server';
+import { SavedObjectMigrationMap, SavedObjectUnsanitizedDoc } from '../../../../../src/core/server';
+import { TaskInstance, TaskInstanceWithDeprecatedFields } from '../task';
-export const migrations = {
- task: {
- '7.4.0': (doc: SavedObject>) => ({
- ...doc,
- updated_at: new Date().toISOString(),
- }),
- '7.6.0': moveIntervalIntoSchedule,
- },
+export const migrations: SavedObjectMigrationMap = {
+ '7.4.0': doc => ({
+ ...doc,
+ updated_at: new Date().toISOString(),
+ }),
+ '7.6.0': moveIntervalIntoSchedule,
};
function moveIntervalIntoSchedule({
attributes: { interval, ...attributes },
...doc
-}: SavedObject>) {
+}: SavedObjectUnsanitizedDoc): SavedObjectUnsanitizedDoc<
+ TaskInstance
+> {
return {
...doc,
attributes: {
diff --git a/x-pack/test/api_integration/apis/fleet/enrollment_api_keys/crud.ts b/x-pack/test/api_integration/apis/fleet/enrollment_api_keys/crud.ts
index 602ec6ca9d9e4..9d0629a7b32e2 100644
--- a/x-pack/test/api_integration/apis/fleet/enrollment_api_keys/crud.ts
+++ b/x-pack/test/api_integration/apis/fleet/enrollment_api_keys/crud.ts
@@ -25,6 +25,7 @@ export default function(providerContext: FtrProviderContext) {
after(async () => {
await esArchiver.unload('fleet/agents');
});
+
describe('GET /fleet/enrollment-api-keys', async () => {
it('should list existing api keys', async () => {
const { body: apiResponse } = await supertest
@@ -54,7 +55,7 @@ export default function(providerContext: FtrProviderContext) {
.post(`/api/ingest_manager/fleet/enrollment-api-keys`)
.set('kbn-xsrf', 'xxx')
.send({
- config_id: 'policy1',
+ config_id: 'config1',
})
.expect(200);
keyId = apiResponse.item.id;
@@ -89,12 +90,22 @@ export default function(providerContext: FtrProviderContext) {
.expect(400);
});
- it('should allow to create an enrollment api key with a policy', async () => {
+ it('should not allow to create an enrollment api key for a non existing agent config', async () => {
+ await supertest
+ .post(`/api/ingest_manager/fleet/enrollment-api-keys`)
+ .set('kbn-xsrf', 'xxx')
+ .send({
+ config_id: 'idonotexistsconfig',
+ })
+ .expect(400);
+ });
+
+ it('should allow to create an enrollment api key with an agent config', async () => {
const { body: apiResponse } = await supertest
.post(`/api/ingest_manager/fleet/enrollment-api-keys`)
.set('kbn-xsrf', 'xxx')
.send({
- config_id: 'policy1',
+ config_id: 'config1',
})
.expect(200);
@@ -107,7 +118,7 @@ export default function(providerContext: FtrProviderContext) {
.post(`/api/ingest_manager/fleet/enrollment-api-keys`)
.set('kbn-xsrf', 'xxx')
.send({
- config_id: 'policy1',
+ config_id: 'config1',
})
.expect(200);
expect(apiResponse.success).to.eql(true);
diff --git a/x-pack/test/api_integration/apis/management/ingest_pipelines/ingest_pipelines.ts b/x-pack/test/api_integration/apis/management/ingest_pipelines/ingest_pipelines.ts
index 88a78d048a3b6..f2f749a58dac3 100644
--- a/x-pack/test/api_integration/apis/management/ingest_pipelines/ingest_pipelines.ts
+++ b/x-pack/test/api_integration/apis/management/ingest_pipelines/ingest_pipelines.ts
@@ -19,7 +19,12 @@ export default function({ getService }: FtrProviderContext) {
describe('Pipelines', function() {
describe('Create', () => {
const PIPELINE_ID = 'test_create_pipeline';
- after(() => deletePipeline(PIPELINE_ID));
+ const REQUIRED_FIELDS_PIPELINE_ID = 'test_create_required_fields_pipeline';
+
+ after(() => {
+ deletePipeline(PIPELINE_ID);
+ deletePipeline(REQUIRED_FIELDS_PIPELINE_ID);
+ });
it('should create a pipeline', async () => {
const { body } = await supertest
@@ -52,6 +57,28 @@ export default function({ getService }: FtrProviderContext) {
});
});
+ it('should create a pipeline with only required fields', async () => {
+ const { body } = await supertest
+ .post(API_BASE_PATH)
+ .set('kbn-xsrf', 'xxx')
+ // Excludes description, version and on_failure processors
+ .send({
+ name: REQUIRED_FIELDS_PIPELINE_ID,
+ processors: [
+ {
+ script: {
+ source: 'ctx._type = null',
+ },
+ },
+ ],
+ })
+ .expect(200);
+
+ expect(body).to.eql({
+ acknowledged: true,
+ });
+ });
+
it('should not allow creation of an existing pipeline', async () => {
const { body } = await supertest
.post(API_BASE_PATH)
diff --git a/x-pack/test/api_integration/apis/ml/anomaly_detectors/get.ts b/x-pack/test/api_integration/apis/ml/anomaly_detectors/get.ts
new file mode 100644
index 0000000000000..255afecde74cb
--- /dev/null
+++ b/x-pack/test/api_integration/apis/ml/anomaly_detectors/get.ts
@@ -0,0 +1,222 @@
+/*
+ * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
+ * or more contributor license agreements. Licensed under the Elastic License;
+ * you may not use this file except in compliance with the Elastic License.
+ */
+
+import expect from '@kbn/expect';
+import { FtrProviderContext } from '../../../ftr_provider_context';
+import { USER } from '../../../../functional/services/machine_learning/security_common';
+
+const COMMON_HEADERS = {
+ 'kbn-xsrf': 'some-xsrf-token',
+};
+
+export default ({ getService }: FtrProviderContext) => {
+ const esArchiver = getService('esArchiver');
+ const supertest = getService('supertestWithoutAuth');
+ const ml = getService('ml');
+
+ const jobId = `fq_single_${Date.now()}`;
+
+ async function createJobs() {
+ const mockJobConfigs = [
+ {
+ job_id: `${jobId}_1`,
+ description:
+ 'Single metric job based on the farequote dataset with 30m bucketspan and mean(responsetime)',
+ groups: ['automated', 'farequote', 'single-metric'],
+ analysis_config: {
+ bucket_span: '30m',
+ detectors: [{ function: 'mean', field_name: 'responsetime' }],
+ influencers: [],
+ summary_count_field_name: 'doc_count',
+ },
+ data_description: { time_field: '@timestamp' },
+ analysis_limits: { model_memory_limit: '11MB' },
+ model_plot_config: { enabled: true },
+ },
+ {
+ job_id: `${jobId}_2`,
+ description:
+ 'Another single metric job based on the farequote dataset with 30m bucketspan and mean(responsetime)',
+ groups: ['automated', 'farequote', 'single-metric'],
+ analysis_config: {
+ bucket_span: '30m',
+ detectors: [{ function: 'mean', field_name: 'responsetime' }],
+ influencers: [],
+ summary_count_field_name: 'doc_count',
+ },
+ data_description: { time_field: '@timestamp' },
+ analysis_limits: { model_memory_limit: '11MB' },
+ model_plot_config: { enabled: false },
+ },
+ ];
+
+ for (const jobConfig of mockJobConfigs) {
+ await ml.api.createAnomalyDetectionJob(jobConfig);
+ }
+ }
+
+ describe('GET anomaly_detectors', () => {
+ before(async () => {
+ await esArchiver.loadIfNeeded('ml/farequote');
+ await ml.testResources.setKibanaTimeZoneToUTC();
+
+ await createJobs();
+ });
+
+ after(async () => {
+ await ml.api.cleanMlIndices();
+ });
+
+ describe('GetAnomalyDetectors', () => {
+ it('should fetch all anomaly detector jobs', async () => {
+ const { body } = await supertest
+ .get(`/api/ml/anomaly_detectors`)
+ .auth(USER.ML_VIEWER, ml.securityCommon.getPasswordForUser(USER.ML_VIEWER))
+ .set(COMMON_HEADERS)
+ .expect(200);
+
+ expect(body.count).to.eql(2);
+ expect(body.jobs.length).to.eql(2);
+ expect(body.jobs[0].job_id).to.eql(`${jobId}_1`);
+ expect(body.jobs[1].job_id).to.eql(`${jobId}_2`);
+ });
+
+ it('should not allow to retrieve jobs for the user without required permissions', async () => {
+ const { body } = await supertest
+ .get(`/api/ml/anomaly_detectors`)
+ .auth(USER.ML_UNAUTHORIZED, ml.securityCommon.getPasswordForUser(USER.ML_UNAUTHORIZED))
+ .set(COMMON_HEADERS)
+ .expect(404);
+
+ expect(body.error).to.eql('Not Found');
+ expect(body.message).to.eql('Not Found');
+ });
+ });
+
+ describe('GetAnomalyDetectorsById', () => {
+ it('should fetch single anomaly detector job by id', async () => {
+ const { body } = await supertest
+ .get(`/api/ml/anomaly_detectors/${jobId}_1`)
+ .auth(USER.ML_VIEWER, ml.securityCommon.getPasswordForUser(USER.ML_VIEWER))
+ .set(COMMON_HEADERS)
+ .expect(200);
+
+ expect(body.count).to.eql(1);
+ expect(body.jobs.length).to.eql(1);
+ expect(body.jobs[0].job_id).to.eql(`${jobId}_1`);
+ });
+
+ it('should fetch anomaly detector jobs based on provided ids', async () => {
+ const { body } = await supertest
+ .get(`/api/ml/anomaly_detectors/${jobId}_1,${jobId}_2`)
+ .auth(USER.ML_VIEWER, ml.securityCommon.getPasswordForUser(USER.ML_VIEWER))
+ .set(COMMON_HEADERS)
+ .expect(200);
+
+ expect(body.count).to.eql(2);
+ expect(body.jobs.length).to.eql(2);
+ expect(body.jobs[0].job_id).to.eql(`${jobId}_1`);
+ expect(body.jobs[1].job_id).to.eql(`${jobId}_2`);
+ });
+
+ it('should not allow to retrieve a job for the user without required permissions', async () => {
+ const { body } = await supertest
+ .get(`/api/ml/anomaly_detectors/${jobId}_1`)
+ .auth(USER.ML_UNAUTHORIZED, ml.securityCommon.getPasswordForUser(USER.ML_UNAUTHORIZED))
+ .set(COMMON_HEADERS)
+ .expect(404);
+
+ expect(body.error).to.eql('Not Found');
+ expect(body.message).to.eql('Not Found');
+ });
+ });
+
+ describe('GetAnomalyDetectorsStats', () => {
+ it('should fetch jobs stats', async () => {
+ const { body } = await supertest
+ .get(`/api/ml/anomaly_detectors/_stats`)
+ .auth(USER.ML_VIEWER, ml.securityCommon.getPasswordForUser(USER.ML_VIEWER))
+ .set(COMMON_HEADERS)
+ .expect(200);
+
+ expect(body.count).to.eql(2);
+ expect(body.jobs.length).to.eql(2);
+ expect(body.jobs[0].job_id).to.eql(`${jobId}_1`);
+ expect(body.jobs[0]).to.keys(
+ 'timing_stats',
+ 'state',
+ 'forecasts_stats',
+ 'model_size_stats',
+ 'data_counts'
+ );
+ expect(body.jobs[1].job_id).to.eql(`${jobId}_2`);
+ });
+
+ it('should not allow to retrieve jobs stats for the user without required permissions', async () => {
+ const { body } = await supertest
+ .get(`/api/ml/anomaly_detectors/_stats`)
+ .auth(USER.ML_UNAUTHORIZED, ml.securityCommon.getPasswordForUser(USER.ML_UNAUTHORIZED))
+ .set(COMMON_HEADERS)
+ .expect(404);
+
+ expect(body.error).to.eql('Not Found');
+ expect(body.message).to.eql('Not Found');
+ });
+ });
+
+ describe('GetAnomalyDetectorsStatsById', () => {
+ it('should fetch single job stats', async () => {
+ const { body } = await supertest
+ .get(`/api/ml/anomaly_detectors/${jobId}_1/_stats`)
+ .auth(USER.ML_VIEWER, ml.securityCommon.getPasswordForUser(USER.ML_VIEWER))
+ .set(COMMON_HEADERS)
+ .expect(200);
+
+ expect(body.count).to.eql(1);
+ expect(body.jobs.length).to.eql(1);
+ expect(body.jobs[0].job_id).to.eql(`${jobId}_1`);
+ expect(body.jobs[0]).to.keys(
+ 'timing_stats',
+ 'state',
+ 'forecasts_stats',
+ 'model_size_stats',
+ 'data_counts'
+ );
+ });
+
+ it('should fetch multiple jobs stats based on provided ids', async () => {
+ const { body } = await supertest
+ .get(`/api/ml/anomaly_detectors/${jobId}_1,${jobId}_2/_stats`)
+ .auth(USER.ML_VIEWER, ml.securityCommon.getPasswordForUser(USER.ML_VIEWER))
+ .set(COMMON_HEADERS)
+ .expect(200);
+
+ expect(body.count).to.eql(2);
+ expect(body.jobs.length).to.eql(2);
+ expect(body.jobs[0].job_id).to.eql(`${jobId}_1`);
+ expect(body.jobs[0]).to.keys(
+ 'timing_stats',
+ 'state',
+ 'forecasts_stats',
+ 'model_size_stats',
+ 'data_counts'
+ );
+ expect(body.jobs[1].job_id).to.eql(`${jobId}_2`);
+ });
+
+ it('should not allow to retrieve a job stats for the user without required permissions', async () => {
+ const { body } = await supertest
+ .get(`/api/ml/anomaly_detectors/${jobId}_1/_stats`)
+ .auth(USER.ML_UNAUTHORIZED, ml.securityCommon.getPasswordForUser(USER.ML_UNAUTHORIZED))
+ .set(COMMON_HEADERS)
+ .expect(404);
+
+ expect(body.error).to.eql('Not Found');
+ expect(body.message).to.eql('Not Found');
+ });
+ });
+ });
+};
diff --git a/x-pack/test/api_integration/apis/ml/anomaly_detectors/index.ts b/x-pack/test/api_integration/apis/ml/anomaly_detectors/index.ts
index fb8acaf5c3ae9..3985cd39e4d1c 100644
--- a/x-pack/test/api_integration/apis/ml/anomaly_detectors/index.ts
+++ b/x-pack/test/api_integration/apis/ml/anomaly_detectors/index.ts
@@ -8,5 +8,6 @@ import { FtrProviderContext } from '../../../ftr_provider_context';
export default function({ loadTestFile }: FtrProviderContext) {
describe('anomaly detectors', function() {
loadTestFile(require.resolve('./create'));
+ loadTestFile(require.resolve('./get'));
});
}
diff --git a/x-pack/test/api_integration/apis/ml/index.ts b/x-pack/test/api_integration/apis/ml/index.ts
index 58356637c63ac..df99b125e6adb 100644
--- a/x-pack/test/api_integration/apis/ml/index.ts
+++ b/x-pack/test/api_integration/apis/ml/index.ts
@@ -37,5 +37,6 @@ export default function({ getService, loadTestFile }: FtrProviderContext) {
loadTestFile(require.resolve('./fields_service'));
loadTestFile(require.resolve('./job_validation'));
loadTestFile(require.resolve('./jobs'));
+ loadTestFile(require.resolve('./results'));
});
}
diff --git a/x-pack/test/api_integration/apis/ml/job_validation/cardinality.ts b/x-pack/test/api_integration/apis/ml/job_validation/cardinality.ts
new file mode 100644
index 0000000000000..e51a3b3c1772c
--- /dev/null
+++ b/x-pack/test/api_integration/apis/ml/job_validation/cardinality.ts
@@ -0,0 +1,175 @@
+/*
+ * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
+ * or more contributor license agreements. Licensed under the Elastic License;
+ * you may not use this file except in compliance with the Elastic License.
+ */
+import expect from '@kbn/expect';
+import { FtrProviderContext } from '../../../ftr_provider_context';
+import { USER } from '../../../../functional/services/machine_learning/security_common';
+
+const COMMON_HEADERS = {
+ 'kbn-xsrf': 'some-xsrf-token',
+};
+
+// eslint-disable-next-line import/no-default-export
+export default ({ getService }: FtrProviderContext) => {
+ const esArchiver = getService('esArchiver');
+ const supertest = getService('supertestWithoutAuth');
+ const ml = getService('ml');
+
+ describe('ValidateCardinality', function() {
+ before(async () => {
+ await esArchiver.loadIfNeeded('ml/ecommerce');
+ await ml.testResources.setKibanaTimeZoneToUTC();
+ });
+
+ after(async () => {
+ await ml.api.cleanMlIndices();
+ });
+
+ it(`should recognize a valid cardinality`, async () => {
+ const requestBody = {
+ job_id: '',
+ description: '',
+ groups: [],
+ analysis_config: {
+ bucket_span: '10m',
+ detectors: [
+ {
+ function: 'mean',
+ field_name: 'products.base_price',
+ partition_field_name: 'geoip.city_name',
+ },
+ ],
+ influencers: ['geoip.city_name'],
+ },
+ data_description: { time_field: 'order_date' },
+ analysis_limits: { model_memory_limit: '12MB' },
+ model_plot_config: { enabled: true },
+ datafeed_config: {
+ datafeed_id: 'datafeed-',
+ job_id: '',
+ indices: ['ft_ecommerce'],
+ query: { bool: { must: [{ match_all: {} }], filter: [], must_not: [] } },
+ },
+ };
+
+ const { body } = await supertest
+ .post('/api/ml/validate/cardinality')
+ .auth(USER.ML_POWERUSER, ml.securityCommon.getPasswordForUser(USER.ML_POWERUSER))
+ .set(COMMON_HEADERS)
+ .send(requestBody)
+ .expect(200);
+
+ expect(body).to.eql([{ id: 'success_cardinality' }]);
+ });
+
+ it(`should recognize a high model plot cardinality`, async () => {
+ const requestBody = {
+ job_id: '',
+ description: '',
+ groups: [],
+ analysis_config: {
+ bucket_span: '10m',
+ detectors: [
+ {
+ function: 'mean',
+ field_name: 'products.base_price',
+ // some high cardinality field
+ partition_field_name: 'order_id',
+ },
+ ],
+ influencers: ['geoip.city_name'],
+ },
+ data_description: { time_field: 'order_date' },
+ analysis_limits: { model_memory_limit: '11MB' },
+ model_plot_config: { enabled: true },
+ datafeed_config: {
+ datafeed_id: 'datafeed-',
+ job_id: '',
+ indices: ['ft_ecommerce'],
+ query: { bool: { must: [{ match_all: {} }], filter: [], must_not: [] } },
+ },
+ };
+ const { body } = await supertest
+ .post('/api/ml/validate/cardinality')
+ .auth(USER.ML_POWERUSER, ml.securityCommon.getPasswordForUser(USER.ML_POWERUSER))
+ .set(COMMON_HEADERS)
+ .send(requestBody)
+ .expect(200);
+
+ expect(body).to.eql([
+ { id: 'cardinality_model_plot_high', modelPlotCardinality: 4711 },
+ { id: 'cardinality_partition_field', fieldName: 'order_id' },
+ ]);
+ });
+
+ it('should not validate cardinality in case request payload is invalid', async () => {
+ const requestBody = {
+ job_id: '',
+ description: '',
+ groups: [],
+ // missing analysis_config
+ data_description: { time_field: 'order_date' },
+ analysis_limits: { model_memory_limit: '12MB' },
+ model_plot_config: { enabled: true },
+ datafeed_config: {
+ datafeed_id: 'datafeed-',
+ job_id: '',
+ indices: ['ft_ecommerce'],
+ query: { bool: { must: [{ match_all: {} }], filter: [], must_not: [] } },
+ },
+ };
+
+ const { body } = await supertest
+ .post('/api/ml/validate/cardinality')
+ .auth(USER.ML_POWERUSER, ml.securityCommon.getPasswordForUser(USER.ML_POWERUSER))
+ .set(COMMON_HEADERS)
+ .send(requestBody)
+ .expect(400);
+
+ expect(body.error).to.eql('Bad Request');
+ expect(body.message).to.eql(
+ '[request body.analysis_config.detectors]: expected value of type [array] but got [undefined]'
+ );
+ });
+
+ it('should not validate cardinality if the user does not have required permissions', async () => {
+ const requestBody = {
+ job_id: '',
+ description: '',
+ groups: [],
+ analysis_config: {
+ bucket_span: '10m',
+ detectors: [
+ {
+ function: 'mean',
+ field_name: 'products.base_price',
+ partition_field_name: 'geoip.city_name',
+ },
+ ],
+ influencers: ['geoip.city_name'],
+ },
+ data_description: { time_field: 'order_date' },
+ analysis_limits: { model_memory_limit: '12MB' },
+ model_plot_config: { enabled: true },
+ datafeed_config: {
+ datafeed_id: 'datafeed-',
+ job_id: '',
+ indices: ['ft_ecommerce'],
+ query: { bool: { must: [{ match_all: {} }], filter: [], must_not: [] } },
+ },
+ };
+
+ const { body } = await supertest
+ .post('/api/ml/validate/cardinality')
+ .auth(USER.ML_VIEWER, ml.securityCommon.getPasswordForUser(USER.ML_VIEWER))
+ .set(COMMON_HEADERS)
+ .send(requestBody)
+ .expect(404);
+
+ expect(body.error).to.eql('Not Found');
+ expect(body.message).to.eql('Not Found');
+ });
+ });
+};
diff --git a/x-pack/test/api_integration/apis/ml/job_validation/index.ts b/x-pack/test/api_integration/apis/ml/job_validation/index.ts
index 6ca9dcbbe9e5b..fa894de839cd2 100644
--- a/x-pack/test/api_integration/apis/ml/job_validation/index.ts
+++ b/x-pack/test/api_integration/apis/ml/job_validation/index.ts
@@ -9,5 +9,6 @@ export default function({ loadTestFile }: FtrProviderContext) {
describe('job validation', function() {
loadTestFile(require.resolve('./bucket_span_estimator'));
loadTestFile(require.resolve('./calculate_model_memory_limit'));
+ loadTestFile(require.resolve('./cardinality'));
});
}
diff --git a/x-pack/test/api_integration/apis/ml/results/get_anomalies_table_data.ts b/x-pack/test/api_integration/apis/ml/results/get_anomalies_table_data.ts
new file mode 100644
index 0000000000000..9f34a3c639562
--- /dev/null
+++ b/x-pack/test/api_integration/apis/ml/results/get_anomalies_table_data.ts
@@ -0,0 +1,136 @@
+/*
+ * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
+ * or more contributor license agreements. Licensed under the Elastic License;
+ * you may not use this file except in compliance with the Elastic License.
+ */
+import expect from '@kbn/expect';
+import { USER } from '../../../../functional/services/machine_learning/security_common';
+import { FtrProviderContext } from '../../../ftr_provider_context';
+import { Datafeed, Job } from '../../../../../plugins/ml/common/types/anomaly_detection_jobs';
+
+// eslint-disable-next-line import/no-default-export
+export default ({ getService }: FtrProviderContext) => {
+ const esArchiver = getService('esArchiver');
+ const supertest = getService('supertestWithoutAuth');
+ const ml = getService('ml');
+
+ const COMMON_HEADERS = {
+ 'kbn-xsrf': 'some-xsrf-token',
+ };
+
+ const JOB_CONFIG: Job = {
+ job_id: `fq_multi_1_ae`,
+ description:
+ 'mean/min/max(responsetime) partition=airline on farequote dataset with 1h bucket span',
+ groups: ['farequote', 'automated', 'multi-metric'],
+ analysis_config: {
+ bucket_span: '1h',
+ influencers: ['airline'],
+ detectors: [
+ { function: 'mean', field_name: 'responsetime', partition_field_name: 'airline' },
+ { function: 'min', field_name: 'responsetime', partition_field_name: 'airline' },
+ { function: 'max', field_name: 'responsetime', partition_field_name: 'airline' },
+ ],
+ },
+ data_description: { time_field: '@timestamp' },
+ analysis_limits: { model_memory_limit: '20mb' },
+ model_plot_config: { enabled: true },
+ };
+
+ const DATAFEED_CONFIG: Datafeed = {
+ datafeed_id: 'datafeed-fq_multi_1_se',
+ indices: ['ft_farequote'],
+ job_id: 'fq_multi_1_ae',
+ query: { bool: { must: [{ match_all: {} }] } },
+ };
+
+ async function createMockJobs() {
+ await ml.api.createAndRunAnomalyDetectionLookbackJob(JOB_CONFIG, DATAFEED_CONFIG);
+ }
+
+ describe('GetAnomaliesTableData', () => {
+ before(async () => {
+ await esArchiver.loadIfNeeded('ml/farequote');
+ await ml.testResources.setKibanaTimeZoneToUTC();
+ await createMockJobs();
+ });
+
+ after(async () => {
+ await ml.api.cleanMlIndices();
+ });
+
+ it('should fetch anomalies table data', async () => {
+ const requestBody = {
+ jobIds: [JOB_CONFIG.job_id],
+ criteriaFields: [{ fieldName: 'detector_index', fieldValue: 0 }],
+ influencers: [],
+ aggregationInterval: 'auto',
+ threshold: 0,
+ earliestMs: 1454889600000, // February 8, 2016 12:00:00 AM GMT
+ latestMs: 1454976000000, // February 9, 2016 12:00:00 AM GMT
+ dateFormatTz: 'UTC',
+ maxRecords: 500,
+ };
+
+ const { body } = await supertest
+ .post(`/api/ml/results/anomalies_table_data`)
+ .auth(USER.ML_VIEWER, ml.securityCommon.getPasswordForUser(USER.ML_VIEWER))
+ .set(COMMON_HEADERS)
+ .send(requestBody)
+ .expect(200);
+
+ expect(body.interval).to.eql('hour');
+ expect(body.anomalies.length).to.eql(12);
+ });
+
+ it('should validate request body', async () => {
+ const requestBody = {
+ // missing jobIds
+ criteriaFields: [{ fieldName: 'detector_index', fieldValue: 0 }],
+ influencers: [],
+ aggregationInterval: 'auto',
+ threshold: 0,
+ // invalid earliest and latest instead of earliestMs and latestMs
+ earliest: 1454889600000, // February 8, 2016 12:00:00 AM GMT
+ latest: 1454976000000, // February 9, 2016 12:00:00 AM GMT
+ dateFormatTz: 'UTC',
+ maxRecords: 500,
+ };
+
+ const { body } = await supertest
+ .post(`/api/ml/results/anomalies_table_data`)
+ .auth(USER.ML_VIEWER, ml.securityCommon.getPasswordForUser(USER.ML_VIEWER))
+ .set(COMMON_HEADERS)
+ .send(requestBody)
+ .expect(400);
+
+ expect(body.error).to.eql('Bad Request');
+ expect(body.message).to.eql(
+ '[request body.jobIds]: expected value of type [array] but got [undefined]'
+ );
+ });
+
+ it('should not allow fetching of anomalies table data without required permissions', async () => {
+ const requestBody = {
+ jobIds: [JOB_CONFIG.job_id],
+ criteriaFields: [{ fieldName: 'detector_index', fieldValue: 0 }],
+ influencers: [],
+ aggregationInterval: 'auto',
+ threshold: 0,
+ earliestMs: 1454889600000, // February 8, 2016 12:00:00 AM GMT
+ latestMs: 1454976000000, // February 9, 2016 12:00:00 AM GMT
+ dateFormatTz: 'UTC',
+ maxRecords: 500,
+ };
+ const { body } = await supertest
+ .post(`/api/ml/results/anomalies_table_data`)
+ .auth(USER.ML_UNAUTHORIZED, ml.securityCommon.getPasswordForUser(USER.ML_UNAUTHORIZED))
+ .set(COMMON_HEADERS)
+ .send(requestBody)
+ .expect(404);
+
+ expect(body.error).to.eql('Not Found');
+ expect(body.message).to.eql('Not Found');
+ });
+ });
+};
diff --git a/x-pack/plugins/ml/server/models/job_validation/validate_cardinality.d.ts b/x-pack/test/api_integration/apis/ml/results/index.ts
similarity index 50%
rename from x-pack/plugins/ml/server/models/job_validation/validate_cardinality.d.ts
rename to x-pack/test/api_integration/apis/ml/results/index.ts
index 2fad1252e6446..80197e6a32ad9 100644
--- a/x-pack/plugins/ml/server/models/job_validation/validate_cardinality.d.ts
+++ b/x-pack/test/api_integration/apis/ml/results/index.ts
@@ -3,11 +3,10 @@
* or more contributor license agreements. Licensed under the Elastic License;
* you may not use this file except in compliance with the Elastic License.
*/
+import { FtrProviderContext } from '../../../ftr_provider_context';
-import { APICaller } from 'kibana/server';
-import { CombinedJob } from '../../../common/types/anomaly_detection_jobs';
-
-export function validateCardinality(
- callAsCurrentUser: APICaller,
- job?: CombinedJob
-): Promise;
+export default function({ loadTestFile }: FtrProviderContext) {
+ describe('ResultsService', () => {
+ loadTestFile(require.resolve('./get_anomalies_table_data'));
+ });
+}
diff --git a/x-pack/test/functional/apps/dashboard/_async_dashboard.ts b/x-pack/test/functional/apps/dashboard/_async_dashboard.ts
index 2c8abda999ddd..82641db457aea 100644
--- a/x-pack/test/functional/apps/dashboard/_async_dashboard.ts
+++ b/x-pack/test/functional/apps/dashboard/_async_dashboard.ts
@@ -9,6 +9,7 @@ import { FtrProviderContext } from '../../ftr_provider_context';
export default function({ getService, getPageObjects }: FtrProviderContext) {
const retry = getService('retry');
+ const browser = getService('browser');
const kibanaServer = getService('kibanaServer');
const log = getService('log');
const pieChart = getService('pieChart');
@@ -93,6 +94,9 @@ export default function({ getService, getPageObjects }: FtrProviderContext) {
]`;
await kibanaServer.uiSettings.update({ 'timepicker:quickRanges': SAMPLE_DATA_RANGE });
+ // refresh page to make sure ui settings update is picked up
+ await browser.refresh();
+ await PageObjects.header.waitUntilLoadingHasFinished();
await appMenu.clickLink('Discover');
await PageObjects.discover.selectIndexPattern('kibana_sample_data_flights');
await PageObjects.timePicker.setCommonlyUsedTime('sample_data range');
@@ -104,6 +108,7 @@ export default function({ getService, getPageObjects }: FtrProviderContext) {
after(async () => {
await PageObjects.common.navigateToUrl('home', 'tutorial_directory/sampleData');
+ await PageObjects.header.waitUntilLoadingHasFinished();
await PageObjects.home.removeSampleDataSet('flights');
const isInstalled = await PageObjects.home.isSampleDataSetInstalled('flights');
expect(isInstalled).to.be(false);
diff --git a/x-pack/test/functional/es_archives/fleet/agents/data.json b/x-pack/test/functional/es_archives/fleet/agents/data.json
index d22e3cd3fecdd..1739f583b2e87 100644
--- a/x-pack/test/functional/es_archives/fleet/agents/data.json
+++ b/x-pack/test/functional/es_archives/fleet/agents/data.json
@@ -199,3 +199,30 @@
}
}
}
+
+{
+ "type": "doc",
+ "value": {
+ "id": "ingest-agent-configs:config1",
+ "index": ".kibana",
+ "source": {
+ "type": "ingest-agent-configs",
+ "ingest-agent-configs": {
+ "name": "Test config",
+ "namespace": "default",
+ "description": "Config 1",
+ "status": "active",
+ "datasources": [],
+ "is_default": true,
+ "monitoring_enabled": [
+ "logs",
+ "metrics"
+ ],
+ "revision": 2,
+ "updated_on": "2020-05-07T19:34:42.533Z",
+ "updated_by": "system",
+ "id": "config1"
+ }
+ }
+ }
+}
diff --git a/x-pack/test/functional/es_archives/fleet/agents/mappings.json b/x-pack/test/functional/es_archives/fleet/agents/mappings.json
index 409cc3c689eaf..15e5a5524107b 100644
--- a/x-pack/test/functional/es_archives/fleet/agents/mappings.json
+++ b/x-pack/test/functional/es_archives/fleet/agents/mappings.json
@@ -9,39 +9,42 @@
"dynamic": "strict",
"_meta": {
"migrationMappingPropertyHashes": {
- "ingest-outputs": "aee9782e0d500b867859650a36280165",
"ml-telemetry": "257fd1d4b4fdbb9cb4b8a3b27da201e9",
"visualization": "52d7a13ad68a150c4525b292d23e12cc",
"references": "7997cf5a56cc02bdc9c93361bde732b0",
"graph-workspace": "cd7ba1330e6682e9cc00b78850874be1",
+ "epm-packages": "92b4b1899b887b090d01c033f3118a85",
"type": "2f4316de49999235636386fe51dc06c1",
- "infrastructure-ui-source": "ddc0ecb18383f6b26101a2fadb2dab0c",
"space": "c5ca8acafa0beaa4d08d014a97b6bc6b",
+ "infrastructure-ui-source": "ddc0ecb18383f6b26101a2fadb2dab0c",
+ "ingest_manager_settings": "c5b0749b4ab03c582efd4c14cb8f132c",
"application_usage_totals": "c897e4310c5f24b07caaff3db53ae2c1",
"action": "6e96ac5e648f57523879661ea72525b7",
- "agent_configs": "38abaf89513877745c359e7700c0c66a",
"dashboard": "d00f614b29a80360e1190193fd333bab",
- "metrics-explorer-view": "53c5365793677328df0ccb6138bf3cdd",
- "siem-detection-engine-rule-actions": "90eee2e4635260f4be0a1da8f5bc0aa0",
- "fleet-agent-events": "3231653fafe4ef3196fe3b32ab774bf2",
+ "metrics-explorer-view": "428e319af3e822c80a84cf87123ca35c",
+ "siem-detection-engine-rule-actions": "6569b288c169539db10cb262bf79de18",
"query": "11aaeb7f5f7fa5bb43f25e18ce26e7d9",
"file-upload-telemetry": "0ed4d3e1983d1217a30982630897092e",
"application_usage_transactional": "965839e75f809fefe04f92dc4d99722a",
"action_task_params": "a9d49f184ee89641044be0ca2950fa3a",
+ "fleet-agent-events": "3231653fafe4ef3196fe3b32ab774bf2",
+ "ingest-datasources": "2346514df03316001d56ed4c8d46fa94",
"apm-indices": "9bb9b2bf1fa636ed8619cbab5ce6a1dd",
- "inventory-view": "9ecce5b58867403613d82fe496470b34",
- "fleet-enrollment-api-keys": "28b91e20b105b6f928e2012600085d8f",
- "upgrade-assistant-reindex-operation": "a53a20fe086b72c9a86da3cc12dad8a6",
+ "inventory-view": "5299b67717e96502c77babf1c16fd4d3",
+ "upgrade-assistant-reindex-operation": "296a89039fc4260292be36b1b005d8f2",
"cases-comments": "c2061fb929f585df57425102fa928b4b",
+ "fleet-enrollment-api-keys": "28b91e20b105b6f928e2012600085d8f",
"canvas-element": "7390014e1091044523666d97247392fc",
- "datasources": "d4bc0c252b2b5683ff21ea32d00acffc",
+ "ingest-outputs": "0e57221778a7153c8292edf154099036",
"telemetry": "36a616f7026dfa617d6655df850fe16d",
"upgrade-assistant-telemetry": "56702cec857e0a9dacfb696655b4ff7b",
"lens-ui-telemetry": "509bfa5978586998e05f9e303c07a327",
+ "namespaces": "2f4316de49999235636386fe51dc06c1",
"server": "ec97f1c5da1a19609a60874e5af1100c",
"siem-ui-timeline-note": "8874706eedc49059d4cf0f5094559084",
"lens": "21c3ea0763beb1ecb0162529706b88c5",
"sample-data-telemetry": "7d3cfeb915303c9641c59681967ffeb4",
+ "fleet-agent-actions": "e520c855577170c24481be05c3ae14ec",
"search": "181661168bbadd1eff5902361e2a0d5c",
"updated_at": "00da57df13e94e9d98437d13ace4bfe0",
"cases-configure": "42711cbb311976c0687853f4c1354572",
@@ -49,23 +52,22 @@
"alert": "7b44fba6773e37c806ce290ea9b7024e",
"siem-detection-engine-rule-status": "ae783f41c6937db6b7a2ef5c93a9e9b0",
"map": "23d7aa4a720d4938ccde3983f87bd58d",
- "uptime-dynamic-settings": "b6289473c8985c79b6c47eebc19a0ca5",
- "epm-packages": "75d12cd13c867fd713d7dfb27366bc20",
+ "uptime-dynamic-settings": "fcdb453a30092f022f2642db29523d80",
+ "cases": "32aa96a6d3855ddda53010ae2048ac22",
"apm-telemetry": "3525d7c22c42bc80f5e6e9cb3f2b26a2",
- "cases": "08b8b110dbca273d37e8aef131ecab61",
- "siem-ui-timeline": "ac8020190f5950dd3250b6499144e7fb",
+ "siem-ui-timeline": "f2d929253ecd06ffbac78b4047f45a86",
"kql-telemetry": "d12a98a6f19a2d273696597547e064ee",
"ui-metric": "0d409297dc5ebe1e3a1da691c6ee32e3",
- "url": "c7f66a0df8b1b52f17c28c4adb111105",
- "fleet-agents": "c3eeb7b9d97176f15f6d126370ab23c7",
+ "ingest-agent-configs": "f4bdc17427437537ca1754d5d5057ad5",
+ "url": "b675c3be8d76ecf029294d51dc7ec65d",
"migrationVersion": "4a1746014a75ade3a714e1db5763276f",
"index-pattern": "66eccb05066c5a89924f48a9e9736499",
- "maps-telemetry": "268da3a48066123fc5baf35abaa55014",
+ "fleet-agents": "864760267df6c970f629bd4458506c53",
+ "maps-telemetry": "bfd39d88aadadb4be597ea984d433dbe",
"namespace": "2f4316de49999235636386fe51dc06c1",
"cases-user-actions": "32277330ec6b721abe3b846cfd939a71",
- "fleet-agent-actions": "ed270b46812f0fa1439366c428a2cf17",
- "siem-ui-timeline-pinned-event": "20638091112f0e14f0e443d512301c29",
"timelion-sheet": "9a2a2748877c7a7b582fef201ab1d4cf",
+ "siem-ui-timeline-pinned-event": "20638091112f0e14f0e443d512301c29",
"config": "ae24d22d5986d04124cc6568f771066f",
"tsvb-validation-telemetry": "3a37ef6c8700ae6fc97d5c7da00e9215"
}
@@ -107,145 +109,6 @@
}
}
},
- "fleet-agent-actions": {
- "properties": {
- "agent_id": {
- "type": "keyword"
- },
- "created_at": {
- "type": "date"
- },
- "data": {
- "type": "flattened"
- },
- "sent_at": {
- "type": "date"
- },
- "type": {
- "type": "keyword"
- }
- }
- },
- "agent_configs": {
- "properties": {
- "datasources": {
- "type": "keyword"
- },
- "description": {
- "type": "text"
- },
- "id": {
- "type": "keyword"
- },
- "is_default": {
- "type": "boolean"
- },
- "name": {
- "type": "text"
- },
- "namespace": {
- "type": "keyword"
- },
- "revision": {
- "type": "integer"
- },
- "status": {
- "type": "keyword"
- },
- "updated_by": {
- "type": "keyword"
- },
- "updated_on": {
- "type": "keyword"
- }
- }
- },
- "fleet-agent-events": {
- "properties": {
- "action_id": {
- "type": "keyword"
- },
- "agent_id": {
- "type": "keyword"
- },
- "config_id": {
- "type": "keyword"
- },
- "data": {
- "type": "text"
- },
- "message": {
- "type": "text"
- },
- "payload": {
- "type": "text"
- },
- "stream_id": {
- "type": "keyword"
- },
- "subtype": {
- "type": "keyword"
- },
- "timestamp": {
- "type": "date"
- },
- "type": {
- "type": "keyword"
- }
- }
- },
- "fleet-agents": {
- "properties": {
- "access_api_key_id": {
- "type": "keyword"
- },
- "active": {
- "type": "boolean"
- },
- "config_id": {
- "type": "keyword"
- },
- "config_newest_revision": {
- "type": "integer"
- },
- "config_revision": {
- "type": "integer"
- },
- "current_error_events": {
- "type": "text"
- },
- "default_api_key": {
- "type": "keyword"
- },
- "enrolled_at": {
- "type": "date"
- },
- "last_checkin": {
- "type": "date"
- },
- "last_updated": {
- "type": "date"
- },
- "local_metadata": {
- "type": "flattened"
- },
- "shared_id": {
- "type": "keyword"
- },
- "type": {
- "type": "keyword"
- },
- "updated_at": {
- "type": "date"
- },
- "user_provided_metadata": {
- "type": "flattened"
- },
- "version": {
- "type": "keyword"
- }
- }
- },
"alert": {
"properties": {
"actions": {
@@ -1355,6 +1218,9 @@
}
}
},
+ "connector_id": {
+ "type": "keyword"
+ },
"created_at": {
"type": "date"
},
@@ -1630,137 +1496,180 @@
}
}
},
- "datasources": {
+ "epm-packages": {
"properties": {
- "config_id": {
- "type": "keyword"
- },
- "description": {
- "type": "text"
- },
- "enabled": {
- "type": "boolean"
+ "es_index_patterns": {
+ "type": "object",
+ "dynamic": "false"
},
- "inputs": {
+ "installed": {
"type": "nested",
"properties": {
- "config": {
- "type": "flattened"
- },
- "enabled": {
- "type": "boolean"
- },
- "processors": {
+ "id": {
"type": "keyword"
},
- "streams": {
- "type": "nested",
- "properties": {
- "config": {
- "type": "flattened"
- },
- "dataset": {
- "type": "keyword"
- },
- "enabled": {
- "type": "boolean"
- },
- "id": {
- "type": "keyword"
- },
- "processors": {
- "type": "keyword"
- }
- }
- },
"type": {
"type": "keyword"
}
}
},
+ "internal": {
+ "type": "boolean"
+ },
"name": {
"type": "keyword"
},
- "namespace": {
- "type": "keyword"
+ "removable": {
+ "type": "boolean"
},
- "output_id": {
+ "version": {
"type": "keyword"
- },
- "package": {
- "properties": {
- "name": {
- "type": "keyword"
- },
- "title": {
- "type": "keyword"
- },
- "version": {
- "type": "keyword"
- }
- }
- },
- "revision": {
- "type": "integer"
}
}
},
- "fleet-enrollment-api-keys": {
+ "file-upload-telemetry": {
"properties": {
- "active": {
- "type": "boolean"
- },
- "api_key": {
- "type": "binary"
- },
- "api_key_id": {
- "type": "keyword"
- },
- "config_id": {
+ "filesUploadedTotalCount": {
+ "type": "long"
+ }
+ }
+ },
+ "fleet-agent-actions": {
+ "properties": {
+ "agent_id": {
"type": "keyword"
},
"created_at": {
"type": "date"
},
- "expire_at": {
- "type": "date"
+ "data": {
+ "type": "binary"
},
- "name": {
- "type": "keyword"
+ "sent_at": {
+ "type": "date"
},
"type": {
"type": "keyword"
- },
- "updated_at": {
- "type": "date"
}
}
},
- "epm-packages": {
+ "fleet-agent-events": {
"properties": {
- "installed": {
- "type": "nested",
- "properties": {
- "id": {
- "type": "keyword"
- },
- "type": {
- "type": "keyword"
- }
- }
- },
- "name": {
+ "action_id": {
+ "type": "keyword"
+ },
+ "agent_id": {
+ "type": "keyword"
+ },
+ "config_id": {
+ "type": "keyword"
+ },
+ "data": {
+ "type": "text"
+ },
+ "message": {
+ "type": "text"
+ },
+ "payload": {
+ "type": "text"
+ },
+ "stream_id": {
+ "type": "keyword"
+ },
+ "subtype": {
+ "type": "keyword"
+ },
+ "timestamp": {
+ "type": "date"
+ },
+ "type": {
+ "type": "keyword"
+ }
+ }
+ },
+ "fleet-agents": {
+ "properties": {
+ "access_api_key_id": {
+ "type": "keyword"
+ },
+ "active": {
+ "type": "boolean"
+ },
+ "config_id": {
+ "type": "keyword"
+ },
+ "config_newest_revision": {
+ "type": "integer"
+ },
+ "config_revision": {
+ "type": "integer"
+ },
+ "current_error_events": {
+ "type": "text"
+ },
+ "default_api_key": {
+ "type": "keyword"
+ },
+ "default_api_key_id": {
+ "type": "keyword"
+ },
+ "enrolled_at": {
+ "type": "date"
+ },
+ "last_checkin": {
+ "type": "date"
+ },
+ "last_updated": {
+ "type": "date"
+ },
+ "local_metadata": {
+ "type": "flattened"
+ },
+ "shared_id": {
"type": "keyword"
},
+ "type": {
+ "type": "keyword"
+ },
+ "updated_at": {
+ "type": "date"
+ },
+ "user_provided_metadata": {
+ "type": "flattened"
+ },
"version": {
"type": "keyword"
}
}
},
- "file-upload-telemetry": {
+ "fleet-enrollment-api-keys": {
"properties": {
- "filesUploadedTotalCount": {
- "type": "long"
+ "active": {
+ "type": "boolean"
+ },
+ "api_key": {
+ "type": "binary"
+ },
+ "api_key_id": {
+ "type": "keyword"
+ },
+ "config_id": {
+ "type": "keyword"
+ },
+ "created_at": {
+ "type": "date"
+ },
+ "expire_at": {
+ "type": "date"
+ },
+ "name": {
+ "type": "keyword"
+ },
+ "type": {
+ "type": "keyword"
+ },
+ "updated_at": {
+ "type": "date"
}
}
},
@@ -1888,8 +1797,176 @@
}
}
},
+ "ingest-agent-configs": {
+ "properties": {
+ "datasources": {
+ "type": "keyword"
+ },
+ "description": {
+ "type": "text"
+ },
+ "id": {
+ "type": "keyword"
+ },
+ "is_default": {
+ "type": "boolean"
+ },
+ "monitoring_enabled": {
+ "type": "keyword"
+ },
+ "name": {
+ "type": "text"
+ },
+ "namespace": {
+ "type": "keyword"
+ },
+ "revision": {
+ "type": "integer"
+ },
+ "status": {
+ "type": "keyword"
+ },
+ "updated_by": {
+ "type": "keyword"
+ },
+ "updated_on": {
+ "type": "keyword"
+ }
+ }
+ },
+ "ingest-datasources": {
+ "properties": {
+ "config_id": {
+ "type": "keyword"
+ },
+ "description": {
+ "type": "text"
+ },
+ "enabled": {
+ "type": "boolean"
+ },
+ "inputs": {
+ "type": "nested",
+ "properties": {
+ "config": {
+ "type": "flattened"
+ },
+ "enabled": {
+ "type": "boolean"
+ },
+ "processors": {
+ "type": "keyword"
+ },
+ "streams": {
+ "type": "nested",
+ "properties": {
+ "agent_stream": {
+ "type": "flattened"
+ },
+ "config": {
+ "type": "flattened"
+ },
+ "dataset": {
+ "type": "keyword"
+ },
+ "enabled": {
+ "type": "boolean"
+ },
+ "id": {
+ "type": "keyword"
+ },
+ "processors": {
+ "type": "keyword"
+ },
+ "vars": {
+ "type": "flattened"
+ }
+ }
+ },
+ "type": {
+ "type": "keyword"
+ },
+ "vars": {
+ "type": "flattened"
+ }
+ }
+ },
+ "name": {
+ "type": "keyword"
+ },
+ "namespace": {
+ "type": "keyword"
+ },
+ "output_id": {
+ "type": "keyword"
+ },
+ "package": {
+ "properties": {
+ "name": {
+ "type": "keyword"
+ },
+ "title": {
+ "type": "keyword"
+ },
+ "version": {
+ "type": "keyword"
+ }
+ }
+ },
+ "revision": {
+ "type": "integer"
+ }
+ }
+ },
+ "ingest-outputs": {
+ "properties": {
+ "ca_sha256": {
+ "type": "keyword"
+ },
+ "config": {
+ "type": "flattened"
+ },
+ "fleet_enroll_password": {
+ "type": "binary"
+ },
+ "fleet_enroll_username": {
+ "type": "binary"
+ },
+ "hosts": {
+ "type": "keyword"
+ },
+ "is_default": {
+ "type": "boolean"
+ },
+ "name": {
+ "type": "keyword"
+ },
+ "type": {
+ "type": "keyword"
+ }
+ }
+ },
+ "ingest_manager_settings": {
+ "properties": {
+ "agent_auto_upgrade": {
+ "type": "keyword"
+ },
+ "kibana_ca_sha256": {
+ "type": "keyword"
+ },
+ "kibana_url": {
+ "type": "keyword"
+ },
+ "package_auto_upgrade": {
+ "type": "keyword"
+ }
+ }
+ },
"inventory-view": {
"properties": {
+ "accountId": {
+ "type": "keyword"
+ },
"autoBounds": {
"type": "boolean"
},
@@ -1983,8 +2060,11 @@
"nodeType": {
"type": "keyword"
},
+ "region": {
+ "type": "keyword"
+ },
"time": {
- "type": "integer"
+ "type": "long"
},
"view": {
"type": "keyword"
@@ -2102,6 +2182,12 @@
"indexPatternsWithGeoFieldCount": {
"type": "long"
},
+ "indexPatternsWithGeoPointFieldCount": {
+ "type": "long"
+ },
+ "indexPatternsWithGeoShapeFieldCount": {
+ "type": "long"
+ },
"mapsTotalCount": {
"type": "long"
},
@@ -2156,6 +2242,9 @@
"filterQuery": {
"type": "keyword"
},
+ "forceInterval": {
+ "type": "boolean"
+ },
"groupBy": {
"type": "keyword"
},
@@ -2211,36 +2300,8 @@
"namespace": {
"type": "keyword"
},
- "ingest-outputs": {
- "properties": {
- "api_key": {
- "type": "keyword"
- },
- "ca_sha256": {
- "type": "keyword"
- },
- "config": {
- "type": "flattened"
- },
- "fleet_enroll_password": {
- "type": "binary"
- },
- "fleet_enroll_username": {
- "type": "binary"
- },
- "hosts": {
- "type": "keyword"
- },
- "is_default": {
- "type": "boolean"
- },
- "name": {
- "type": "keyword"
- },
- "type": {
- "type": "keyword"
- }
- }
+ "namespaces": {
+ "type": "keyword"
},
"query": {
"properties": {
@@ -2346,7 +2407,7 @@
},
"params": {
"type": "object",
- "dynamic": "true"
+ "enabled": false
}
}
},
@@ -2647,6 +2708,15 @@
}
}
},
+ "templateTimelineId": {
+ "type": "text"
+ },
+ "templateTimelineVersion": {
+ "type": "integer"
+ },
+ "timelineType": {
+ "type": "keyword"
+ },
"title": {
"type": "text"
},
@@ -2827,11 +2897,48 @@
"type": "date"
},
"upgrade-assistant-reindex-operation": {
- "dynamic": "true",
"properties": {
+ "errorMessage": {
+ "type": "keyword"
+ },
"indexName": {
"type": "keyword"
},
+ "lastCompletedStep": {
+ "type": "integer"
+ },
+ "locked": {
+ "type": "date"
+ },
+ "newIndexName": {
+ "type": "keyword"
+ },
+ "reindexOptions": {
+ "properties": {
+ "openAndClose": {
+ "type": "boolean"
+ },
+ "queueSettings": {
+ "properties": {
+ "queuedAt": {
+ "type": "long"
+ },
+ "startedAt": {
+ "type": "long"
+ }
+ }
+ }
+ }
+ },
+ "reindexTaskId": {
+ "type": "keyword"
+ },
+ "reindexTaskPercComplete": {
+ "type": "float"
+ },
+ "runningReindexCount": {
+ "type": "integer"
+ },
"status": {
"type": "integer"
}
@@ -2891,6 +2998,12 @@
},
"uptime-dynamic-settings": {
"properties": {
+ "certAgeThreshold": {
+ "type": "long"
+ },
+ "certExpirationThreshold": {
+ "type": "long"
+ },
"heartbeatIndices": {
"type": "keyword"
}
@@ -2911,8 +3024,7 @@
"type": "text",
"fields": {
"keyword": {
- "type": "keyword",
- "ignore_above": 2048
+ "type": "keyword"
}
}
}
diff --git a/x-pack/test/saved_object_api_integration/common/fixtures/namespace_agnostic_type_plugin/index.js b/x-pack/test/saved_object_api_integration/common/fixtures/namespace_agnostic_type_plugin/index.js
deleted file mode 100644
index b8dbdeb07d7fe..0000000000000
--- a/x-pack/test/saved_object_api_integration/common/fixtures/namespace_agnostic_type_plugin/index.js
+++ /dev/null
@@ -1,55 +0,0 @@
-/*
- * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
- * or more contributor license agreements. Licensed under the Elastic License;
- * you may not use this file except in compliance with the Elastic License.
- */
-
-import mappings from './mappings.json';
-
-export default function(kibana) {
- return new kibana.Plugin({
- require: ['kibana', 'elasticsearch', 'xpack_main'],
- name: 'namespace_agnostic_type_plugin',
- uiExports: {
- savedObjectsManagement: {
- globaltype: {
- isImportableAndExportable: true,
- },
- },
- savedObjectSchemas: {
- globaltype: {
- isNamespaceAgnostic: true,
- },
- },
- mappings,
- },
-
- config() {},
-
- init(server) {
- server.plugins.xpack_main.registerFeature({
- id: 'namespace_agnostic_type_plugin',
- name: 'namespace_agnostic_type_plugin',
- icon: 'upArrow',
- navLinkId: 'namespace_agnostic_type_plugin',
- app: [],
- privileges: {
- all: {
- savedObject: {
- all: ['globaltype'],
- read: [],
- },
- ui: [],
- },
- read: {
- savedObject: {
- all: [],
- read: ['globaltype'],
- },
- ui: [],
- },
- },
- });
- },
- });
-}
diff --git a/x-pack/test/saved_object_api_integration/common/fixtures/namespace_agnostic_type_plugin/kibana.json b/x-pack/test/saved_object_api_integration/common/fixtures/namespace_agnostic_type_plugin/kibana.json
new file mode 100644
index 0000000000000..ec3077999d8bd
--- /dev/null
+++ b/x-pack/test/saved_object_api_integration/common/fixtures/namespace_agnostic_type_plugin/kibana.json
@@ -0,0 +1,8 @@
+{
+ "id": "namespace_agnostic_type_plugin",
+ "version": "1.0.0",
+ "kibanaVersion": "kibana",
+ "requiredPlugins": ["features"],
+ "server": true,
+ "ui": false
+}
diff --git a/x-pack/test/saved_object_api_integration/common/fixtures/namespace_agnostic_type_plugin/mappings.json b/x-pack/test/saved_object_api_integration/common/fixtures/namespace_agnostic_type_plugin/mappings.json
deleted file mode 100644
index 64d309b4209a2..0000000000000
--- a/x-pack/test/saved_object_api_integration/common/fixtures/namespace_agnostic_type_plugin/mappings.json
+++ /dev/null
@@ -1,15 +0,0 @@
-{
- "globaltype": {
- "properties": {
- "title": {
- "type": "text",
- "fields": {
- "keyword": {
- "type": "keyword",
- "ignore_above": 2048
- }
- }
- }
- }
- }
-}
diff --git a/x-pack/test/saved_object_api_integration/common/fixtures/namespace_agnostic_type_plugin/package.json b/x-pack/test/saved_object_api_integration/common/fixtures/namespace_agnostic_type_plugin/package.json
deleted file mode 100644
index 1a0afbc6bfcb3..0000000000000
--- a/x-pack/test/saved_object_api_integration/common/fixtures/namespace_agnostic_type_plugin/package.json
+++ /dev/null
@@ -1,7 +0,0 @@
-{
- "name": "namespace_agnostic_type_plugin",
- "version": "0.0.0",
- "kibana": {
- "version": "kibana"
- }
-}
diff --git a/x-pack/test/saved_object_api_integration/common/fixtures/namespace_agnostic_type_plugin/server/index.ts b/x-pack/test/saved_object_api_integration/common/fixtures/namespace_agnostic_type_plugin/server/index.ts
new file mode 100644
index 0000000000000..d8940c96e676a
--- /dev/null
+++ b/x-pack/test/saved_object_api_integration/common/fixtures/namespace_agnostic_type_plugin/server/index.ts
@@ -0,0 +1,64 @@
+/*
+ * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
+ * or more contributor license agreements. Licensed under the Elastic License;
+ * you may not use this file except in compliance with the Elastic License.
+ */
+import { CoreSetup, Plugin } from 'src/core/server';
+import { PluginSetupContract as FeaturesPluginSetupContract } from '../../../../../../plugins/features/server';
+
+export const plugin = () => new NamespaceAgnosticTypePlugin();
+
+interface SetupDeps {
+ features: FeaturesPluginSetupContract;
+}
+
+class NamespaceAgnosticTypePlugin implements Plugin {
+ setup(core: CoreSetup, plugins: SetupDeps) {
+ core.savedObjects.registerType({
+ name: 'globaltype',
+ hidden: false,
+ namespaceType: 'agnostic',
+ management: {
+ importableAndExportable: true,
+ },
+ mappings: {
+ properties: {
+ title: {
+ type: 'text',
+ fields: {
+ keyword: {
+ type: 'keyword',
+ ignore_above: 2048,
+ },
+ },
+ },
+ },
+ },
+ });
+
+ plugins.features.registerFeature({
+ id: 'namespace_agnostic_type_plugin',
+ name: 'namespace_agnostic_type_plugin',
+ icon: 'upArrow',
+ navLinkId: 'namespace_agnostic_type_plugin',
+ app: [],
+ privileges: {
+ all: {
+ savedObject: {
+ all: ['globaltype'],
+ read: [],
+ },
+ ui: [],
+ },
+ read: {
+ savedObject: {
+ all: [],
+ read: ['globaltype'],
+ },
+ ui: [],
+ },
+ },
+ });
+ }
+ start() {}
+}
diff --git a/x-pack/test/ui_capabilities/common/fixtures/plugins/foo_plugin/index.js b/x-pack/test/ui_capabilities/common/fixtures/plugins/foo_plugin/index.js
deleted file mode 100644
index 89ae0125614b6..0000000000000
--- a/x-pack/test/ui_capabilities/common/fixtures/plugins/foo_plugin/index.js
+++ /dev/null
@@ -1,52 +0,0 @@
-/*
- * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
- * or more contributor license agreements. Licensed under the Elastic License;
- * you may not use this file except in compliance with the Elastic License.
- */
-
-export default function(kibana) {
- return new kibana.Plugin({
- require: ['kibana', 'elasticsearch', 'xpack_main'],
- name: 'foo',
- uiExports: {
- app: {
- title: 'Foo',
- order: 1000,
- euiIconType: 'uiArray',
- description: 'Foo app',
- main: 'plugins/foo_plugin/app',
- },
- },
-
- init(server) {
- server.plugins.xpack_main.registerFeature({
- id: 'foo',
- name: 'Foo',
- icon: 'upArrow',
- navLinkId: 'foo_plugin',
- app: ['kibana'],
- catalogue: ['foo'],
- privileges: {
- all: {
- app: ['kibana'],
- catalogue: ['foo'],
- savedObject: {
- all: ['foo'],
- read: ['index-pattern'],
- },
- ui: ['create', 'edit', 'delete', 'show'],
- },
- read: {
- app: ['kibana'],
- catalogue: ['foo'],
- savedObject: {
- all: [],
- read: ['foo', 'index-pattern'],
- },
- ui: ['show'],
- },
- },
- });
- },
- });
-}
diff --git a/x-pack/test/ui_capabilities/common/fixtures/plugins/foo_plugin/kibana.json b/x-pack/test/ui_capabilities/common/fixtures/plugins/foo_plugin/kibana.json
new file mode 100644
index 0000000000000..cec1640fbb047
--- /dev/null
+++ b/x-pack/test/ui_capabilities/common/fixtures/plugins/foo_plugin/kibana.json
@@ -0,0 +1,8 @@
+{
+ "id": "foo_plugin",
+ "version": "1.0.0",
+ "kibanaVersion": "kibana",
+ "requiredPlugins": ["features"],
+ "server": true,
+ "ui": true
+}
diff --git a/x-pack/test/ui_capabilities/common/fixtures/plugins/foo_plugin/package.json b/x-pack/test/ui_capabilities/common/fixtures/plugins/foo_plugin/package.json
deleted file mode 100644
index 45228b47c0a31..0000000000000
--- a/x-pack/test/ui_capabilities/common/fixtures/plugins/foo_plugin/package.json
+++ /dev/null
@@ -1,7 +0,0 @@
-{
- "name": "foo_plugin",
- "version": "0.0.0",
- "kibana": {
- "version": "kibana"
- }
-}
diff --git a/x-pack/test/ui_capabilities/common/fixtures/plugins/foo_plugin/public/index.ts b/x-pack/test/ui_capabilities/common/fixtures/plugins/foo_plugin/public/index.ts
new file mode 100644
index 0000000000000..357cbba334928
--- /dev/null
+++ b/x-pack/test/ui_capabilities/common/fixtures/plugins/foo_plugin/public/index.ts
@@ -0,0 +1,21 @@
+/*
+ * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
+ * or more contributor license agreements. Licensed under the Elastic License;
+ * you may not use this file except in compliance with the Elastic License.
+ */
+import { CoreSetup, Plugin } from 'src/core/public';
+export const plugin = () => new FooPlugin();
+
+class FooPlugin implements Plugin {
+ setup(core: CoreSetup) {
+ core.application.register({
+ id: 'foo',
+ title: 'Foo app',
+ euiIconType: 'uiArray',
+ mount() {
+ return () => null;
+ },
+ });
+ }
+ start() {}
+}
diff --git a/x-pack/test/ui_capabilities/common/fixtures/plugins/foo_plugin/server/index.ts b/x-pack/test/ui_capabilities/common/fixtures/plugins/foo_plugin/server/index.ts
new file mode 100644
index 0000000000000..bff794801119a
--- /dev/null
+++ b/x-pack/test/ui_capabilities/common/fixtures/plugins/foo_plugin/server/index.ts
@@ -0,0 +1,47 @@
+/*
+ * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
+ * or more contributor license agreements. Licensed under the Elastic License;
+ * you may not use this file except in compliance with the Elastic License.
+ */
+import { CoreSetup, Plugin } from 'src/core/server';
+import { PluginSetupContract as FeaturesPluginSetupContract } from '../../../../../../../plugins/features/server';
+
+export const plugin = () => new FooPlugin();
+
+interface SetupDeps {
+ features: FeaturesPluginSetupContract;
+}
+
+class FooPlugin implements Plugin {
+ setup(core: CoreSetup, plugins: SetupDeps) {
+ plugins.features.registerFeature({
+ id: 'foo',
+ name: 'Foo',
+ icon: 'upArrow',
+ navLinkId: 'foo_plugin',
+ app: ['kibana'],
+ catalogue: ['foo'],
+ privileges: {
+ all: {
+ app: ['kibana'],
+ catalogue: ['foo'],
+ savedObject: {
+ all: ['foo'],
+ read: ['index-pattern'],
+ },
+ ui: ['create', 'edit', 'delete', 'show'],
+ },
+ read: {
+ app: ['kibana'],
+ catalogue: ['foo'],
+ savedObject: {
+ all: [],
+ read: ['foo', 'index-pattern'],
+ },
+ ui: ['show'],
+ },
+ },
+ });
+ }
+ start() {}
+}