{"version":3,"file":"bedrock-converse-stream.lazy.d.ts","sourceRoot":"","sources":["../../src/api/bedrock-converse-stream.lazy.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,aAAa,CAAC;AAgBnD;;;;GAIG;AACH,wBAAgB,wBAAwB,CAAC,MAAM,EAAE,eAAe,GAAG,IAAI,CAEtE;AAED,eAAO,MAAM,wBAAwB,uBAInC,CAAC","sourcesContent":["import type { ProviderStreams } from \"../types.ts\";\nimport { lazyApi } from \"./lazy.ts\";\n\n/**\n * Loads the bedrock implementation through a variable specifier so bundlers\n * (browser smoke, Bun compile) cannot follow the import into the Node-only\n * AWS SDK. The `.ts`/`.js` rewrite keeps the trick working from both source\n * and built output.\n */\nconst importNodeOnlyApi = (specifier: string): Promise<unknown> => {\n\tconst runtimeSpecifier = import.meta.url.endsWith(\".js\") ? specifier.replace(/\\.ts$/, \".js\") : specifier;\n\treturn import(runtimeSpecifier);\n};\n\nlet bedrockModuleOverride: ProviderStreams | undefined;\n\n/**\n * Overrides the dynamically imported bedrock implementation. Used by the Bun\n * binary build, where the variable-specifier import cannot be bundled; the\n * build registers a statically imported module instead.\n */\nexport function setBedrockProviderModule(module: ProviderStreams): void {\n\tbedrockModuleOverride = module;\n}\n\nexport const bedrockConverseStreamApi = (): ProviderStreams =>\n\tlazyApi(\n\t\tasync () =>\n\t\t\tbedrockModuleOverride ?? ((await importNodeOnlyApi(\"./bedrock-converse-stream.ts\")) as ProviderStreams),\n\t);\n"]}