{
  "version": 3,
  "sources": ["decode.web.js"],
  "sourcesContent": ["// Copyright 2026 will Farrell, and datastream contributors.\n// SPDX-License-Identifier: MIT\n/* global TextDecoderStream */\n\nexport const charsetDecodeStream = ({ charset } = {}, _streamOptions = {}) => {\n\t// Default/null charset means UTF-8, matching the node implementation which\n\t// falls back to UTF-8 for unknown/missing encodings instead of crashing.\n\t// `new TextDecoderStream(undefined)` already defaults to UTF-8, so normalise\n\t// null to undefined.\n\tif (charset === null || charset === undefined) {\n\t\treturn new TextDecoderStream();\n\t}\n\t// Let TextDecoderStream validate the label rather than maintaining a manual\n\t// allowlist that is stricter than the platform (it rejected valid labels such\n\t// as ISO-8859-1 / ISO-8859-9 that TextDecoder accepts). The constructor\n\t// throws a RangeError for genuinely unknown labels; rethrow with the\n\t// package-branded message.\n\ttry {\n\t\treturn new TextDecoderStream(charset);\n\t} catch {\n\t\tthrow new Error(\n\t\t\t`charsetDecodeStream: Unsupported web encoding \"${charset}\"`,\n\t\t);\n\t}\n};\n\nexport default charsetDecodeStream;\n"],
  "mappings": "AAIO,MAAM,sBAAsB,CAAC,EAAE,QAAQ,IAAI,CAAC,GAAG,iBAAiB,CAAC,MAAM;AAK7E,MAAI,YAAY,QAAQ,YAAY,QAAW;AAC9C,WAAO,IAAI,kBAAkB;AAAA,EAC9B;AAMA,MAAI;AACH,WAAO,IAAI,kBAAkB,OAAO;AAAA,EACrC,QAAQ;AACP,UAAM,IAAI;AAAA,MACT,kDAAkD,OAAO;AAAA,IAC1D;AAAA,EACD;AACD;AAEA,IAAO,qBAAQ;",
  "names": []
}
