"use strict"
Object.defineProperty(exports, "__esModule", { value: true })
exports.flattenPar = exports.flattenPar_ = void 0
// tracing: off
const chainPar_1 = require("./chainPar")
/**
 * Flattens a stream of streams into a stream by executing a non-deterministic
 * concurrent merge. Up to `n` streams may be consumed in parallel and up to
 * `outputBuffer` elements may be buffered by this operator.
 */
function flattenPar_(self, n, outputBuffer = 16) {
  return (0, chainPar_1.chainPar)(n, outputBuffer)((x) => x)(self)
}
exports.flattenPar_ = flattenPar_
/**
 * Flattens a stream of streams into a stream by executing a non-deterministic
 * concurrent merge. Up to `n` streams may be consumed in parallel and up to
 * `outputBuffer` elements may be buffered by this operator.
 */
function flattenPar(n, outputBuffer = 16) {
  return (self) => flattenPar_(self, n, outputBuffer)
}
exports.flattenPar = flattenPar
//# sourceMappingURL=flattenPar.js.map
