{"version":3,"file":"encoding.mjs","names":[],"sources":["../../src/polyfills/encoding.ts"],"sourcesContent":["/**\n * Polyfill: TextEncoder, TextDecoder\n *\n * Required for stream chunk processing in CopilotKit.\n * Skipped if the globals are already defined.\n *\n * Usage:\n *   import \"@copilotkit/react-native/polyfills/encoding\";\n */\n\nimport { TextEncoder, TextDecoder } from \"text-encoding\";\n\nconst g = globalThis as Record<string, unknown>;\n\nif (typeof g.TextEncoder === \"undefined\") {\n  g.TextEncoder = TextEncoder;\n}\nif (typeof g.TextDecoder === \"undefined\") {\n  g.TextDecoder = TextDecoder;\n}\n"],"mappings":";;;;;;;;;;;;AAYA,MAAM,IAAI;AAEV,IAAI,OAAO,EAAE,gBAAgB,YAC3B,GAAE,cAAc;AAElB,IAAI,OAAO,EAAE,gBAAgB,YAC3B,GAAE,cAAc"}