import * as tsplus_module_1 from "@effect/core/stream/Take/operations/exit";
import * as tsplus_module_2 from "@effect/core/stream/Stream/operations/map";
import * as tsplus_module_3 from "@effect/core/stream/Stream/operations/flattenExitMaybe";
import * as tsplus_module_4 from "@effect/core/stream/Stream/operations/unchunks";
/**
 * Unwraps `Exit` values and flatten chunks that also signify end-of-stream
 * by failing with `None`.
 *
 * @tsplus fluent ets/Stream flattenTake
 */

export function flattenTake(self, __tsplusTrace) {
  return tsplus_module_4.unchunks(tsplus_module_3.flattenExitMaybe(tsplus_module_2.map_(self, take => tsplus_module_1.exit(take), __tsplusTrace), __tsplusTrace), __tsplusTrace);
}
//# sourceMappingURL=flattenTake.mjs.map