HEX
Server: Apache/2.4.52 (Ubuntu)
System: Linux ip-172-31-4-197 6.8.0-1036-aws #38~22.04.1-Ubuntu SMP Fri Aug 22 15:44:33 UTC 2025 x86_64
User: ubuntu (1000)
PHP: 7.4.33
Disabled: pcntl_alarm,pcntl_fork,pcntl_waitpid,pcntl_wait,pcntl_wifexited,pcntl_wifstopped,pcntl_wifsignaled,pcntl_wifcontinued,pcntl_wexitstatus,pcntl_wtermsig,pcntl_wstopsig,pcntl_signal,pcntl_signal_get_handler,pcntl_signal_dispatch,pcntl_get_last_error,pcntl_strerror,pcntl_sigprocmask,pcntl_sigwaitinfo,pcntl_sigtimedwait,pcntl_exec,pcntl_getpriority,pcntl_setpriority,pcntl_async_signals,pcntl_unshare,
Upload Files
File: /var/www/web.enelar.com.co/node_modules/rxfire/performance/index.cjs.js
'use strict';

Object.defineProperty(exports, '__esModule', { value: true });

var rxjs = require('rxjs');
var operators = require('rxjs/operators');

function _interopNamespace(e) {
    if (e && e.__esModule) return e;
    var n = Object.create(null);
    if (e) {
        Object.keys(e).forEach(function (k) {
            if (k !== 'default') {
                var d = Object.getOwnPropertyDescriptor(e, k);
                Object.defineProperty(n, k, d.get ? d : {
                    enumerable: true,
                    get: function () { return e[k]; }
                });
            }
        });
    }
    n["default"] = e;
    return Object.freeze(n);
}

/**
 * Lazy loads Firebase Performance monitoring and returns the instance as
 * an observable
 * @param app
 * @returns Observable<FirebasePerformance>
 */
var getPerformance$ = function (app) { return rxjs.from(Promise.resolve().then(function () { return /*#__PURE__*/_interopNamespace(require('firebase/performance')); }).then(function (module) { return module.getPerformance(app); })); };
/**
 * Creates an observable that begins a trace with a given id. The trace is ended
 * when the observable unsubscribes. The measurement is also logged as a performance
 * entry.
 * @param traceId
 * @returns Observable<void>
 */
var trace$ = function (traceId) {
    if (typeof window !== 'undefined' && window.performance) {
        var entries = window.performance.getEntriesByName(traceId, 'measure') || [];
        var startMarkName_1 = "_".concat(traceId, "Start[").concat(entries.length, "]");
        var endMarkName_1 = "_".concat(traceId, "End[").concat(entries.length, "]");
        return new rxjs.Observable(function (emitter) {
            window.performance.mark(startMarkName_1);
            emitter.next();
            return {
                unsubscribe: function () {
                    window.performance.mark(endMarkName_1);
                    window.performance.measure(traceId, startMarkName_1, endMarkName_1);
                },
            };
        });
    }
    else {
        return rxjs.EMPTY;
    }
};
/**
 * Creates a function that creates an observable that begins a trace with a given id. The trace is ended
 * when the observable unsubscribes. The measurement is also logged as a performance
 * entry.
 * @param name
 * @returns (source$: Observable<T>) => Observable<T>
 */
var trace = function (name) { return function (source$) { return new rxjs.Observable(function (subscriber) {
    var traceSubscription = trace$(name).subscribe();
    return source$.pipe(operators.tap(function () { return traceSubscription.unsubscribe(); }, function () {
    }, function () { return traceSubscription.unsubscribe(); })).subscribe(subscriber);
}); }; };
/**
 * Creates a function that creates an observable that begins a trace with a given name. The trace runs until
 * a condition resolves to true and then the observable unsubscribes and ends the trace.
 * @param name
 * @param test
 * @param options
 * @returns (source$: Observable<T>) => Observable<T>
 */
var traceUntil = function (name, test, options) { return function (source$) { return new rxjs.Observable(function (subscriber) {
    var traceSubscription = trace$(name).subscribe();
    return source$.pipe(operators.tap(function (a) { return test(a) && traceSubscription.unsubscribe(); }, function () {
    }, function () { return options && options.orComplete && traceSubscription.unsubscribe(); })).subscribe(subscriber);
}); }; };
/**
 * Creates a function that creates an observable that begins a trace with a given name. The trace runs while
 * a condition resolves to true. Once the condition fails the observable unsubscribes
 * and ends the trace.
 * @param name
 * @param test
 * @param options
 * @returns (source$: Observable<T>) => Observable<T>
 */
var traceWhile = function (name, test, options) { return function (source$) { return new rxjs.Observable(function (subscriber) {
    var traceSubscription;
    return source$.pipe(operators.tap(function (a) {
        if (test(a)) {
            traceSubscription = traceSubscription || trace$(name).subscribe();
        }
        else {
            if (traceSubscription) {
                traceSubscription.unsubscribe();
            }
            traceSubscription = undefined;
        }
    }, function () {
    }, function () { return options && options.orComplete && traceSubscription && traceSubscription.unsubscribe(); })).subscribe(subscriber);
}); }; };
/**
 * Creates a function that creates an observable that begins a trace with a given name. The trace runs until the
 * observable fully completes.
 * @param name
 * @returns (source$: Observable<T>) => Observable<T>
 */
var traceUntilComplete = function (name) { return function (source$) { return new rxjs.Observable(function (subscriber) {
    var traceSubscription = trace$(name).subscribe();
    return source$.pipe(operators.tap(function () {
    }, function () {
    }, function () { return traceSubscription.unsubscribe(); })).subscribe(subscriber);
}); }; };
/**
 * Creates a function that creates an observable that begins a trace with a given name.
 * The trace runs until the first value emits from the provided observable.
 * @param name
 * @returns (source$: Observable<T>) => Observable<T>
 */
var traceUntilFirst = function (name) { return function (source$) { return new rxjs.Observable(function (subscriber) {
    var traceSubscription = trace$(name).subscribe();
    return source$.pipe(operators.tap(function () { return traceSubscription.unsubscribe(); }, function () {
    }, function () {
    })).subscribe(subscriber);
}); }; };

exports.getPerformance$ = getPerformance$;
exports.trace = trace;
exports.traceUntil = traceUntil;
exports.traceUntilComplete = traceUntilComplete;
exports.traceUntilFirst = traceUntilFirst;
exports.traceWhile = traceWhile;
//# sourceMappingURL=index.cjs.js.map