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/_esm2015/internal/operators/ drwxr-xr-x | |
| Viewing file: Select action/file-type: import { Subscriber } from '../Subscriber';
import { async } from '../scheduler/async';
export function debounceTime(dueTime, scheduler = async) {
return (source) => source.lift(new DebounceTimeOperator(dueTime, scheduler));
}
class DebounceTimeOperator {
constructor(dueTime, scheduler) {
this.dueTime = dueTime;
this.scheduler = scheduler;
}
call(subscriber, source) {
return source.subscribe(new DebounceTimeSubscriber(subscriber, this.dueTime, this.scheduler));
}
}
class DebounceTimeSubscriber extends Subscriber {
constructor(destination, dueTime, scheduler) {
super(destination);
this.dueTime = dueTime;
this.scheduler = scheduler;
this.debouncedSubscription = null;
this.lastValue = null;
this.hasValue = false;
}
_next(value) {
this.clearDebounce();
this.lastValue = value;
this.hasValue = true;
this.add(this.debouncedSubscription = this.scheduler.schedule(dispatchNext, this.dueTime, this));
}
_complete() {
this.debouncedNext();
this.destination.complete();
}
debouncedNext() {
this.clearDebounce();
if (this.hasValue) {
const { lastValue } = this;
this.lastValue = null;
this.hasValue = false;
this.destination.next(lastValue);
}
}
clearDebounce() {
const debouncedSubscription = this.debouncedSubscription;
if (debouncedSubscription !== null) {
this.remove(debouncedSubscription);
debouncedSubscription.unsubscribe();
this.debouncedSubscription = null;
}
}
}
function dispatchNext(subscriber) {
subscriber.debouncedNext();
}
//# sourceMappingURL=debounceTime.js.map |
:: Command execute :: | |
--[ c99shell v. 2.5 [PHP 8 Update] [24.05.2025] | Generation time: 0.0048 ]-- |