{"version":3,"sources":["../../../src/internals/helpers/stream.ts"],"names":["transformAsyncIterable","generator","transformer","next","done","value"],"mappings":";;;;AAgBA,gBAAuBA,sBAAAA,CACrBC,WACAC,WAA2B,EAAA;AAE3B,EAAIC,IAAAA,IAAAA;AACJ,EAAA,OAAO,EAAEA,IAAO,GAAA,MAAMF,SAAUE,CAAAA,IAAAA,IAAQC,IAAM,EAAA;AAC5C,IAAMF,MAAAA,WAAAA,CAAYC,KAAKE,KAAK,CAAA;AAC9B;AACA,EAAA,OAAOF,IAAKE,CAAAA,KAAAA;AACd;AATuBL,MAAAA,CAAAA,sBAAAA,EAAAA,wBAAAA,CAAAA","file":"stream.cjs","sourcesContent":["/**\n * Copyright 2025 IBM Corp.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n *     http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nexport async function* transformAsyncIterable<A, B, A2>(\n  generator: AsyncGenerator<A, B> | AsyncIterableIterator<A>,\n  transformer: (old: A) => A2,\n): AsyncGenerator<A2, B> {\n  let next: IteratorResult<A, B>;\n  while (!(next = await generator.next()).done) {\n    yield transformer(next.value);\n  }\n  return next.value;\n}\n"]}