"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.mergeScan = void 0;
const Observable_js_1 = require("../Observable.js");
const mergeInternals_js_1 = require("./mergeInternals.js");
function mergeScan(accumulator, seed, concurrent = Infinity) {
    return (source) => new Observable_js_1.Observable((subscriber) => {
        let state = seed;
        return (0, mergeInternals_js_1.mergeInternals)(source, subscriber, (value, index) => accumulator(state, value, index), concurrent, (value) => {
            state = value;
        }, false, undefined, () => (state = null));
    });
}
exports.mergeScan = mergeScan;//# sourceMappingURL=http://go/sourcemap/sourcemaps/fc2563ec93d793fc275eef734405a4fdf8b47b20/node_modules/rxjs/dist/cjs/internal/operators/mergeScan.js.map