{"version":3,"file":"mzdata.esm.min.js","sources":["../node_modules/dynamic-typing/lib-esm/parseString.js","../node_modules/arraybuffer-xml-parser/lib/traversable/defaultOptions.js","../node_modules/arraybuffer-xml-parser/lib/XMLNode.js","../node_modules/arraybuffer-xml-parser/lib/bufferUtils/arrayIndexOf.js","../node_modules/arraybuffer-xml-parser/lib/bufferUtils/arrayTrim.js","../node_modules/arraybuffer-xml-parser/lib/traversable/utils/utf8Decoder.js","../node_modules/arraybuffer-xml-parser/lib/traversable/closingIndexForOpeningTag.js","../node_modules/arraybuffer-xml-parser/lib/traversable/findClosingIndex.js","../node_modules/arraybuffer-xml-parser/lib/util.js","../node_modules/arraybuffer-xml-parser/lib/traversable/parseAttributesString.js","../node_modules/arraybuffer-xml-parser/lib/traversable/utils/removeNameSpaceIfNeeded.js","../node_modules/arraybuffer-xml-parser/lib/traversableToJSON.js","../node_modules/arraybuffer-xml-parser/lib/parse.js","../node_modules/arraybuffer-xml-parser/lib/traversable/getTraversable.js","../node_modules/ml-spectra-processing/lib/utils/recursiveResolve.js","../node_modules/uint8-base64/lib-esm/decode.js","../node_modules/uint8-base64/lib-esm/base64codes.js","../node_modules/uint8-base64/lib-esm/encodeFast.js","../src/util/decodeData.js","../src/util/inflate.js","../src/mzdata/parseCvParam.js","../src/mzdata/parseMzData.js","../src/mzdata/processMetaData.js","../src/mzdata/processSpectrumList.js","../src/mzml/parseCvParam.js","../src/mzml/parseMzML.js","../src/mzml/processSpectrumList.js","../src/mzxml/parseMzXML.js","../src/mzxml/processSpectrumList.js","../src/index.js"],"sourcesContent":["export function parseString(value) {\n    if (value.length === 4 || value.length === 5) {\n        const lowercase = value.toLowerCase();\n        if (lowercase === 'true')\n            return true;\n        if (lowercase === 'false')\n            return false;\n    }\n    const number = Number(value);\n    if (number === 0 && !value.includes('0')) {\n        return value;\n    }\n    if (!Number.isNaN(number))\n        return number;\n    return value;\n}\n//# sourceMappingURL=parseString.js.map","import { parseString } from 'dynamic-typing';\nconst utf8Decoder = new TextDecoder();\nexport const decoder = {\n    decode: (array) => {\n        return utf8Decoder.decode(array);\n    },\n};\nexport const defaultOptions = {\n    trimValues: true,\n    attributesNodeName: '',\n    ignoreAttributes: false,\n    ignoreNameSpace: false,\n    allowBooleanAttributes: false,\n    parseAttributesString: true,\n    textNodeName: '#text',\n    arrayMode: false,\n    cdataTagName: false,\n    tagNameProcessor: (name) => name,\n    attributeNameProcessor: (name) => `$${name}`,\n    tagValueProcessor: (value) => {\n        const string = decoder.decode(value).replaceAll('\\r', '');\n        return parseString(string);\n    },\n    attributeValueProcessor: (value) => parseString(value),\n    stopNodes: [],\n};\nexport const defaultStreamOptions = {\n    ...defaultOptions,\n    maxEntrySize: 1e7,\n    maxBufferSize: 2e8,\n};\n//# sourceMappingURL=defaultOptions.js.map","export class XMLNode {\n    tagName;\n    parent;\n    children;\n    attributes;\n    bytes;\n    startIndex;\n    tagValueProcessor;\n    cachedValue;\n    constructor(tagName, parent, bytes, tagValueProcessor) {\n        this.tagName = tagName;\n        this.parent = parent;\n        this.children = Object.create(null); //child tags\n        this.attributes = Object.create(null); //attributes map\n        this.bytes = bytes; //text only\n        this.tagValueProcessor = tagValueProcessor;\n        this.startIndex = -1;\n    }\n    append(toAppend) {\n        if (this.bytes.length === 0) {\n            this.bytes = toAppend;\n            return;\n        }\n        const arrayConcat = new Uint8Array(this.bytes.length + toAppend.length);\n        arrayConcat.set(this.bytes);\n        arrayConcat.set(toAppend, this.bytes.length);\n        this.bytes = arrayConcat;\n    }\n    get value() {\n        if (this.cachedValue === undefined) {\n            const value = this.tagValueProcessor(this.bytes, this);\n            this.cachedValue = value;\n        }\n        return this.cachedValue;\n    }\n    addChild(child) {\n        if (Array.isArray(this.children[child.tagName])) {\n            //already presents\n            this.children[child.tagName].push(child);\n        }\n        else {\n            this.children[child.tagName] = [child];\n        }\n    }\n}\n//# sourceMappingURL=XMLNode.js.map","export function arrayIndexOf(array, referenceArray, index = 0) {\n    let found = 0;\n    let foundIndex = -1;\n    for (let i = index; i < array.length && found < referenceArray.length; i++) {\n        if (array[i] === referenceArray[found]) {\n            if (!found) {\n                foundIndex = i;\n            }\n            found++;\n        }\n        else if (found > 0) {\n            let j = 0;\n            for (; j <= found && array[foundIndex + j] === array[foundIndex + found]; j++)\n                ;\n            if (j < found + 1) {\n                foundIndex = -1;\n                found = 0;\n            }\n            else {\n                foundIndex++;\n            }\n        }\n        else {\n            found = 0;\n            foundIndex = -1;\n        }\n    }\n    if (found !== referenceArray.length) {\n        foundIndex = -1;\n    }\n    return foundIndex;\n}\n//# sourceMappingURL=arrayIndexOf.js.map","/* eslint-disable @typescript-eslint/no-unused-vars */\nexport function arrayTrim(array, arg) {\n    let i = 0;\n    let j = array.length - 1;\n    for (; i < array.length && array[i] <= 0x20; i++)\n        ;\n    for (; j >= i && array[j] <= 0x20; j--)\n        ;\n    if (i === 0 && j === array.length - 1)\n        return array;\n    return array.subarray(i, j + 1);\n}\n//# sourceMappingURL=arrayTrim.js.map","const utf8Decoder = new TextDecoder();\nexport const decoder = {\n    decode: (array) => {\n        return utf8Decoder.decode(array);\n    },\n};\n//# sourceMappingURL=utf8Decoder.js.map","import { decoder } from './utils/utf8Decoder.js';\n/**\n * Search for the corresponding closing tag '>'\n * @param data\n * @param i\n * @returns\n */\nexport function closingIndexForOpeningTag(data, i) {\n    let attrBoundary;\n    let endIndex = 0;\n    for (let index = i; index < data.length; index++) {\n        let byte = data[index];\n        if (attrBoundary) {\n            if (byte === attrBoundary)\n                attrBoundary = 0; //reset\n        }\n        else if (byte === 0x22 || byte === 0x27) {\n            attrBoundary = byte;\n        }\n        else if (byte === 0x3e) {\n            return {\n                data: decoder.decode(data.subarray(i, i + endIndex)),\n                index,\n            };\n        }\n        else if (byte === 0x09) {\n            byte = 0x20;\n        }\n        endIndex++;\n    }\n    throw new Error('Could not find closing tag');\n}\n//# sourceMappingURL=closingIndexForOpeningTag.js.map","import { arrayIndexOf } from '../bufferUtils/arrayIndexOf.js';\nexport function findClosingIndex(xmlData, str, i, errMsg) {\n    const closingIndex = arrayIndexOf(xmlData, str, i);\n    if (closingIndex === -1) {\n        throw new Error(errMsg);\n    }\n    else {\n        return closingIndex + str.length - 1;\n    }\n}\n//# sourceMappingURL=findClosingIndex.js.map","const nameStartChar = String.raw `:A-Za-z_\\u00C0-\\u00D6\\u00D8-\\u00F6\\u00F8-\\u02FF\\u0370-\\u037D\\u037F-\\u1FFF\\u200C-\\u200D\\u2070-\\u218F\\u2C00-\\u2FEF\\u3001-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFFD`;\nconst nameChar = String.raw `${nameStartChar}\\-.\\d\\u00B7\\u0300-\\u036F\\u203F-\\u2040`;\nconst nameRegexp = `[${nameStartChar}][${nameChar}]*`;\n// eslint-disable-next-line no-misleading-character-class\nconst regexName = new RegExp(`^${nameRegexp}$`);\nexport function getAllMatches(string, regex) {\n    return Array.from(string.matchAll(regex));\n}\nexport function isName(string) {\n    return regexName.exec(string) !== null;\n}\nexport function isEmptySimpleObject(object) {\n    // fastest implementation: https://jsbench.me/qfkqv692c8/1\n    // eslint-disable-next-line no-unreachable-loop\n    for (const key in object) {\n        return false;\n    }\n    return true;\n}\nexport function isEmptyObject(object) {\n    // fastest implementation: https://jsbench.me/qfkqv692c8/1\n    // eslint-disable-next-line no-unreachable-loop\n    for (const key in object) {\n        return false;\n    }\n    return true;\n}\n/**\n * Copy all the properties of a into b.\n * @param target\n * @param source\n * @param arrayMode\n */\nexport function merge(target, source, arrayMode) {\n    if (!source)\n        return;\n    for (const key in source) {\n        if (arrayMode === 'strict') {\n            target[key] = [source[key]];\n        }\n        else {\n            target[key] = source[key];\n        }\n    }\n}\n/**\n * Check if a tag name should be treated as array\n * @param tagName - the node tagName\n * @param arrayMode - the array mode option\n * @param parentTagName - the parent tag name\n * @returns true if node should be parsed as array\n */\nexport function isTagNameInArrayMode(tagName, arrayMode, parentTagName) {\n    if (arrayMode === false) {\n        return false;\n    }\n    else if (arrayMode instanceof RegExp) {\n        return arrayMode.test(tagName);\n    }\n    else if (typeof arrayMode === 'function') {\n        return arrayMode(tagName, parentTagName);\n    }\n    return arrayMode === 'strict';\n}\n//# sourceMappingURL=util.js.map","import { getAllMatches, isEmptySimpleObject } from '../util.js';\nconst newLocal = String.raw `([^\\s=]+)\\s*(=\\s*(['\"])(.*?)\\3)?`;\nconst attrsRegx = new RegExp(newLocal, 'g');\n//Attributes are strings so no point in using arrayBuffers here\nexport function parseAttributesString(string, options) {\n    const { ignoreAttributes } = options;\n    if (ignoreAttributes) {\n        return;\n    }\n    string = string.replaceAll(/\\r?\\n/g, ' ');\n    const matches = getAllMatches(string, attrsRegx);\n    // argument 1 is the key, argument 4 is the value\n    const attributes = {};\n    for (const match of matches) {\n        const attributeName = resolveNameSpace(match[1], options);\n        if (attributeName.length > 0) {\n            if (match[4] !== undefined) {\n                if (options.trimValues) {\n                    match[4] = match[4].trim();\n                }\n                if (options.attributeValueProcessor) {\n                    attributes[attributeName] = options.attributeValueProcessor(match[4], attributeName);\n                }\n            }\n            else if (options.allowBooleanAttributes) {\n                attributes[attributeName] = true;\n            }\n        }\n    }\n    if (isEmptySimpleObject(attributes))\n        return;\n    return attributes;\n}\nfunction resolveNameSpace(tagName, options) {\n    if (options.ignoreNameSpace) {\n        const tags = tagName.split(':');\n        const prefix = tagName.startsWith('/') ? '/' : '';\n        if (tags[0] === 'xmlns') {\n            return '';\n        }\n        if (tags.length === 2) {\n            tagName = prefix + tags[1];\n        }\n    }\n    return tagName;\n}\n//# sourceMappingURL=parseAttributesString.js.map","export function removeNameSpaceIfNeeded(tagName, options) {\n    if (!options.ignoreNameSpace) {\n        return tagName;\n    }\n    const colonIndex = tagName.indexOf(':');\n    if (colonIndex !== -1) {\n        tagName = tagName.slice(colonIndex + 1);\n    }\n    return tagName;\n}\n//# sourceMappingURL=removeNameSpaceIfNeeded.js.map","import { isEmptyObject, isEmptySimpleObject, isTagNameInArrayMode, merge, } from './util.js';\n/**\n *\n * @param node\n * @param options\n * @param parentTagName\n * @returns\n */\nexport function traversableToJSON(node, options, parentTagName) {\n    const { arrayMode, tagNameProcessor, attributeNameProcessor, textNodeName } = options;\n    const result = {};\n    // when no child node or attr is present\n    if ((!node.children || isEmptyObject(node.children)) &&\n        (!node.attributes || isEmptySimpleObject(node.attributes))) {\n        return node.value;\n    }\n    // otherwise create a textnode if node has some text\n    if (node.bytes.length > 0) {\n        const asArray = isTagNameInArrayMode(node.tagName, arrayMode, parentTagName);\n        result[textNodeName] = asArray ? [node.value] : node.value;\n    }\n    if (node.attributes && !isEmptySimpleObject(node.attributes)) {\n        let attributes = options.parseAttributesString ? {} : node.attributes;\n        if (attributeNameProcessor) {\n            // need to rename the attributes\n            const renamedAttributes = {};\n            for (const attributeName in node.attributes) {\n                const newAttributeName = attributeNameProcessor(attributeName);\n                renamedAttributes[newAttributeName] = node.attributes[attributeName];\n            }\n            attributes = renamedAttributes;\n        }\n        if (options.attributesNodeName) {\n            const encapsulatedAttributes = {\n                [options.attributesNodeName]: attributes,\n            };\n            attributes = encapsulatedAttributes;\n        }\n        merge(result, attributes, arrayMode);\n    }\n    for (const tagName in node.children) {\n        const nodes = node.children[tagName];\n        const newTagName = tagNameProcessor\n            ? tagNameProcessor(tagName, nodes)\n            : tagName;\n        if (nodes?.length > 1) {\n            result[tagName] = [];\n            for (const child of nodes) {\n                result[newTagName].push(traversableToJSON(child, options, tagName));\n            }\n        }\n        else {\n            const subResult = traversableToJSON(nodes[0], options, tagName);\n            const asArray = (arrayMode === true && typeof subResult === 'object') ||\n                isTagNameInArrayMode(tagName, arrayMode, parentTagName);\n            result[newTagName] = asArray ? [subResult] : subResult;\n        }\n    }\n    return result;\n}\n//# sourceMappingURL=traversableToJSON.js.map","import { defaultOptions } from './traversable/defaultOptions.js';\nimport { getTraversable } from './traversable/getTraversable.js';\nimport { traversableToJSON } from './traversableToJSON.js';\n/**\n * Parse an ArrayBuffer or Uint8Array representing an XML and return an object\n * @param xmlData\n * @param options\n */\nexport function parse(xmlData, options = {}) {\n    if (typeof xmlData === 'string') {\n        const encoder = new TextEncoder();\n        xmlData = encoder.encode(xmlData);\n    }\n    if (!ArrayBuffer.isView(xmlData)) {\n        xmlData = new Uint8Array(xmlData);\n    }\n    const realOptions = { ...defaultOptions, ...options };\n    const traversable = getTraversable(xmlData, realOptions);\n    return traversableToJSON(traversable, realOptions);\n}\n//# sourceMappingURL=parse.js.map","import { XMLNode } from '../XMLNode.js';\nimport { arrayIndexOf } from '../bufferUtils/arrayIndexOf.js';\nimport { arrayTrim } from '../bufferUtils/arrayTrim.js';\nimport { closingIndexForOpeningTag } from './closingIndexForOpeningTag.js';\nimport { findClosingIndex } from './findClosingIndex.js';\nimport { parseAttributesString } from './parseAttributesString.js';\nimport { removeNameSpaceIfNeeded } from './utils/removeNameSpaceIfNeeded.js';\nimport { decoder } from './utils/utf8Decoder.js';\nexport function getTraversable(xmlData, options) {\n    const { tagValueProcessor } = options;\n    const traversable = new XMLNode('!xml', undefined, new Uint8Array(0), tagValueProcessor);\n    let currentNode = traversable;\n    let dataSize = 0;\n    let dataIndex = 0;\n    for (let i = 0; i < xmlData.length; i++) {\n        if (xmlData[i] === 0x3c) {\n            // <\n            const xmlData1 = xmlData[i + 1];\n            const xmlData2 = xmlData[i + 2];\n            if (xmlData1 === 0x2f) {\n                // </ Closing Tag\n                const closeIndex = findClosingIndex(xmlData, [0x3e], //>\n                i, 'Closing Tag is not closed.');\n                let tagName = decoder.decode(arrayTrim(xmlData.subarray(i + 2, closeIndex), {}));\n                tagName = removeNameSpaceIfNeeded(tagName, options);\n                if (currentNode) {\n                    currentNode.append(options.trimValues\n                        ? arrayTrim(xmlData.subarray(dataIndex, dataIndex + dataSize))\n                        : xmlData.subarray(dataIndex, dataIndex + dataSize));\n                }\n                if (options.stopNodes?.length &&\n                    options.stopNodes.includes(currentNode.tagName)) {\n                    currentNode.children = {};\n                    if (currentNode.attributes === undefined) {\n                        currentNode.attributes = {};\n                    }\n                    currentNode.bytes = xmlData.subarray(currentNode.startIndex + 1, i);\n                }\n                currentNode = currentNode.parent;\n                i = closeIndex;\n                dataSize = 0;\n                dataIndex = i + 1;\n            }\n            else if (xmlData1 === 0x3f) {\n                // <? PI, processing instruction\n                i = findClosingIndex(xmlData, [0x3f, 0x3e], i, 'Pi Tag is not closed.');\n            }\n            else if (\n            //!-- comment\n            xmlData1 === 0x21 &&\n                xmlData2 === 0x2d &&\n                xmlData[i + 3] === 0x2d) {\n                i = findClosingIndex(xmlData, [0x2d, 0x2d, 0x3e], //-->\n                i, 'Comment is not closed.');\n                if (currentNode && dataSize !== 0 && currentNode.tagName !== '!xml') {\n                    currentNode.append(options.trimValues\n                        ? arrayTrim(xmlData.subarray(dataIndex, dataSize + dataIndex))\n                        : xmlData.subarray(dataIndex, dataSize + dataIndex));\n                }\n                dataSize = 0;\n                dataIndex = i + 1;\n                //!D\n            }\n            else if (xmlData1 === 0x21 && xmlData2 === 0x44) {\n                // <!D\n                const closeIndex = findClosingIndex(xmlData, [0x3e], //>\n                i, 'DOCTYPE is not closed.');\n                const tagExp = xmlData.subarray(i, closeIndex);\n                if (arrayIndexOf(tagExp, [0x5b]) >= 0) {\n                    i = arrayIndexOf(xmlData, [0x5d, 0x3e], i) + 1;\n                }\n                else {\n                    i = closeIndex;\n                } //![\n            }\n            else if (xmlData1 === 0x21 && xmlData2 === 0x5b) {\n                // <![CDATA[some stuff]]>\n                const closeIndex = findClosingIndex(xmlData, [0x5d, 0x5d, 0x3e], //]]>\n                i, 'CDATA is not closed.') - 2;\n                const tagExp = xmlData.subarray(i + 9, closeIndex);\n                //considerations\n                //1. CDATA will always have parent node\n                //2. A tag with CDATA is not a leaf node so it's value would be string type.\n                if (dataSize !== 0) {\n                    const value = options.trimValues\n                        ? arrayTrim(xmlData.subarray(dataIndex, dataIndex + dataSize))\n                        : xmlData.subarray(dataIndex, dataIndex + dataSize);\n                    currentNode.append(value);\n                }\n                if (options.cdataTagName) {\n                    //add cdata node\n                    const childNode = new XMLNode(options.cdataTagName, currentNode, tagExp, tagValueProcessor);\n                    currentNode.addChild(childNode);\n                    //add rest value to parent node\n                    if (tagExp) {\n                        childNode.bytes = tagExp;\n                    }\n                }\n                else {\n                    currentNode.append(tagExp);\n                }\n                i = closeIndex + 2;\n                dataSize = 0;\n                dataIndex = i + 1;\n            }\n            else {\n                //Opening a normal tag\n                const parsedOpeningTag = closingIndexForOpeningTag(xmlData, i + 1);\n                const tagData = parsedOpeningTag.data.replaceAll(/\\r?\\n|\\t/g, ' ');\n                const closeIndex = parsedOpeningTag.index;\n                const separatorIndex = tagData.indexOf(' ');\n                let shouldBuildAttributesMap = true;\n                let tagName = separatorIndex !== -1\n                    ? tagData.slice(0, Math.max(0, separatorIndex)).replace(/\\s+$/, '')\n                    : tagData;\n                let tagAttributes = separatorIndex !== -1 ? tagData.slice(separatorIndex + 1) : '';\n                if (options.ignoreNameSpace) {\n                    const colonIndex = tagName.indexOf(':');\n                    if (colonIndex !== -1) {\n                        tagName = tagName.slice(colonIndex + 1);\n                        shouldBuildAttributesMap =\n                            tagName !== parsedOpeningTag.data.slice(colonIndex + 1);\n                    }\n                }\n                //save text to parent node\n                if (currentNode && dataSize !== 0 && currentNode.tagName !== '!xml') {\n                    currentNode.append(options.trimValues\n                        ? arrayTrim(xmlData.subarray(dataIndex, dataIndex + dataSize))\n                        : xmlData.subarray(dataIndex, dataIndex + dataSize));\n                }\n                if (tagData.length > 0 && tagData.endsWith('/')) {\n                    //selfClosing tag\n                    if (tagAttributes) {\n                        // <abc def=\"123\"/>\n                        tagAttributes = tagAttributes.slice(0, Math.max(0, tagAttributes.length - 1));\n                    }\n                    else {\n                        // <abc/>\n                        tagName = tagName.slice(0, Math.max(0, tagName.length - 1));\n                    }\n                    const childNode = new XMLNode(tagName, currentNode, new Uint8Array(0), tagValueProcessor);\n                    if (tagAttributes) {\n                        childNode.attributes = parseAttributesString(tagAttributes, options);\n                    }\n                    currentNode.addChild(childNode);\n                }\n                else {\n                    //opening tag\n                    const childNode = new XMLNode(tagName, currentNode, new Uint8Array(0), tagValueProcessor);\n                    if (options.stopNodes?.length &&\n                        options.stopNodes.includes(childNode.tagName)) {\n                        childNode.startIndex = closeIndex;\n                    }\n                    if (tagAttributes && shouldBuildAttributesMap) {\n                        childNode.attributes = parseAttributesString(tagAttributes, options);\n                    }\n                    currentNode.addChild(childNode);\n                    currentNode = childNode;\n                }\n                i = closeIndex;\n                dataSize = 0;\n                dataIndex = i + 1;\n            }\n        }\n        else {\n            dataSize++;\n        }\n    }\n    return traversable;\n}\n//# sourceMappingURL=getTraversable.js.map","/**\n * Resolves all promises in an object recursively. The promise with be replaced by the resolved value.\n * The changes are therefore done in-place !\n * @param object\n * @returns\n */\nexport async function recursiveResolve(object) {\n    if (typeof object !== 'object')\n        return object;\n    const promises = [];\n    await appendPromises(object, promises);\n    await Promise.all(promises);\n    return object;\n}\nfunction appendPromises(object, promises) {\n    if (typeof object !== 'object')\n        return object;\n    for (const key in object) {\n        if (typeof object[key].then === 'function') {\n            promises.push(object[key].then((value) => (object[key] = value)));\n        }\n        else if (typeof object[key] === 'object') {\n            appendPromises(object[key], promises);\n        }\n    }\n    return object;\n}\n//# sourceMappingURL=recursiveResolve.js.map","const base64codes = Uint8Array.from([\n    255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255,\n    255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255,\n    255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 62, 255, 255,\n    255, 63, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 255, 255, 255, 0, 255, 255,\n    255, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20,\n    21, 22, 23, 24, 25, 255, 255, 255, 255, 255, 255, 26, 27, 28, 29, 30, 31, 32,\n    33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51,\n]);\n/**\n * Convert a Uint8Array containing a base64 encoded bytes to a Uint8Array containing decoded values\n * @param input\n * @returns a Uint8Array containing the decoded bytes\n */\nexport function decode(input) {\n    if (!ArrayBuffer.isView(input)) {\n        input = new Uint8Array(input);\n    }\n    if (input.length % 4 !== 0) {\n        throw new Error('Unable to parse base64 string.');\n    }\n    const output = new Uint8Array(3 * (input.length / 4));\n    if (input.length === 0)\n        return output;\n    const missingOctets = input.at(-2) === 61 ? 2 : input.at(-1) === 61 ? 1 : 0;\n    for (let i = 0, j = 0; i < input.length; i += 4, j += 3) {\n        const buffer = (base64codes[input[i]] << 18) |\n            (base64codes[input[i + 1]] << 12) |\n            (base64codes[input[i + 2]] << 6) |\n            base64codes[input[i + 3]];\n        output[j] = buffer >> 16;\n        output[j + 1] = (buffer >> 8) & 0xff;\n        output[j + 2] = buffer & 0xff;\n    }\n    return output.subarray(0, output.length - missingOctets);\n}\n//# sourceMappingURL=decode.js.map","export const base64codes = Uint8Array.from([\n    65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83,\n    84, 85, 86, 87, 88, 89, 90, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106,\n    107, 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, 119, 120, 121,\n    122, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 43, 47,\n]);\n//# sourceMappingURL=base64codes.js.map","import { base64codes } from './base64codes';\n/*\n3 bytes are encoded in 4 bytes of base64\n11111122 22223333 33444444\nWe want to be the fastest possible, so we will use a lookup table to convert 12 bits to 2 bytes of base64\nBut in order still to avoid one operation we will create 2 of those lookup tables.\n- One for 2222 11111122\n- One for 3333 33444444\n*/\n// 2222 11111122\nconst base64codes1 = new Uint32Array(64 * 64);\nfor (let i = 0; i < 64; i++) {\n    for (let j = 0; j < 64; j++) {\n        const index = (i << 2) | ((j & 0x30) >> 4) | ((j & 0x0f) << 8);\n        base64codes1[index] = base64codes[i] | (base64codes[j] << 8);\n    }\n}\n// 3333 33444444 that we store on the bits 16->31 just to allow to make directly the OR with the previous value\nconst base64codes2 = new Uint32Array(64 * 64);\nfor (let i = 0; i < 64; i++) {\n    for (let j = 0; j < 64; j++) {\n        const index = (i << 6) | j;\n        base64codes2[index] = (base64codes[i] << 16) | (base64codes[j] << 24);\n    }\n}\n/**\n * Convert a Uint8Array containing bytes to a Uint8Array containing the base64 encoded values\n * @param input\n * @returns a Uint8Array containing the encoded bytes\n */\nexport function encodeFast(input) {\n    const output32 = new Uint32Array(Math.ceil(input.length / 3));\n    let i, j;\n    for (i = 2, j = 0; i < input.length; i += 3, j++) {\n        output32[j] =\n            base64codes1[input[i - 2] | ((input[i - 1] & 0xf0) << 4)] |\n                base64codes2[input[i] | ((input[i - 1] & 0x0f) << 8)];\n    }\n    if (i === input.length + 1) {\n        // 1 octet yet to write\n        output32[j] =\n            base64codes[input[i - 2] >> 2] |\n                (base64codes[(input[i - 2] & 0x03) << 4] << 8) |\n                (15677 << 16);\n    }\n    if (i === input.length) {\n        // 2 octets yet to write\n        output32[j] =\n            base64codes[input[i - 2] >> 2] |\n                (base64codes[((input[i - 2] & 0x03) << 4) | (input[i - 1] >> 4)] << 8) |\n                (base64codes[(input[i - 1] & 0x0f) << 2] << 16) |\n                (61 << 24);\n    }\n    const output8 = new Uint8Array(output32.buffer);\n    return output8;\n}\n//# sourceMappingURL=encodeFast.js.map","import { decode } from 'uint8-base64';\n\nimport { inflate } from './inflate.js';\n\nexport async function decodeData(data, options = {}) {\n  if (!(data instanceof Uint8Array)) {\n    throw new TypeError('data should be an Uint8Array');\n  }\n  let {\n    endian = 'little',\n    precision,\n    float = true,\n    compression = '',\n    base64 = true,\n    ontologies = {},\n  } = options;\n\n  if ('MS:1000519' in ontologies) {\n    precision = 32;\n    float = false;\n  }\n  if ('MS:1000520' in ontologies) precision = 16;\n  if ('MS:1000521' in ontologies) precision = 32;\n  if ('MS:1000522' in ontologies) {\n    float = false;\n    precision = 64;\n  }\n  if ('MS:1000523' in ontologies) precision = 64;\n  if ('MS:1000574' in ontologies) compression = 'zlib';\n\n  if (base64) {\n    data = decode(data);\n  }\n\n  switch (compression.toLowerCase()) {\n    case 'zlib':\n      data = await inflate(data);\n      break;\n    case '':\n    case 'none':\n      break;\n    default:\n      throw new Error(`Unknown compression algorithm: ${compression}`);\n  }\n\n  switch (endian.toLowerCase()) {\n    case 'little':\n      break;\n    case 'network':\n    case 'big':\n      {\n        // we will invert in place the data\n        let step;\n        switch (precision) {\n          case 32:\n            step = 4;\n            break;\n          case 64:\n            step = 8;\n            break;\n          default:\n            throw new Error('Can not process bigendian file');\n        }\n        for (let i = 0; i < data.length - (data.length % step); i += step) {\n          for (let j = 0; j < step / 2; j++) {\n            const temp = data[i + j];\n            data[i + j] = data[i + step - 1 - j];\n            data[i + step - 1 - j] = temp;\n          }\n        }\n      }\n      break;\n    default:\n      throw new TypeError(`Attributes endian not correct: ${endian}`);\n  }\n\n  /*\n       We should take care that the length of the Uint8Array is correct but the buffer\n       may be a little bit bigger because when decoding base 64 it may end with = or ==\n       and we plan the size in the buffer.\n      */\n\n  if (float) {\n    switch (precision) {\n      case 32:\n        return new Float32Array(\n          data.buffer,\n          data.byteOffset,\n          data.byteLength / Float32Array.BYTES_PER_ELEMENT,\n        );\n      case 64:\n        return new Float64Array(\n          data.buffer,\n          data.byteOffset,\n          data.byteLength / Float64Array.BYTES_PER_ELEMENT,\n        );\n\n      default:\n        throw new TypeError(`Incorrect precision: ${precision}`);\n    }\n  } else {\n    switch (precision) {\n      case 32:\n        return new Int32Array(\n          data.buffer,\n          data.byteOffset,\n          data.byteLength / Int32Array.BYTES_PER_ELEMENT,\n        );\n      case 64:\n        return new BigInt64Array(\n          data.buffer,\n          data.byteOffset,\n          data.byteLength / BigInt64Array.BYTES_PER_ELEMENT,\n        );\n      default:\n        throw new TypeError(`Incorrect precision: ${precision}`);\n    }\n  }\n}\n","export async function inflate(zlibCompressedData) {\n  const inputStream = new ReadableStream({\n    start(controller) {\n      controller.enqueue(zlibCompressedData);\n      controller.close();\n    },\n  });\n\n  const decompressedStream = inputStream.pipeThrough(\n    new DecompressionStream('deflate'),\n  );\n\n  const reader = decompressedStream.getReader();\n  const chunks = [];\n  let totalLength = 0;\n\n  while (true) {\n    // eslint-disable-next-line no-await-in-loop\n    const { value, done } = await reader.read();\n    if (done) break;\n    chunks.push(value);\n    totalLength += value.length;\n  }\n\n  // Combine chunks into a single Uint8Array\n  const decompressedData = new Uint8Array(totalLength);\n  let offset = 0;\n  for (const chunk of chunks) {\n    decompressedData.set(chunk, offset);\n    offset += chunk.length;\n  }\n\n  return decompressedData;\n}\n","export function parseCvParam(cvParam) {\n  let result = {};\n  if (!cvParam) return result;\n  let cvParams;\n  if (Array.isArray(cvParam)) {\n    cvParams = cvParam;\n  } else {\n    cvParams = [cvParam];\n  }\n  for (let param of cvParams) {\n    let attributes = param.attributes;\n    if (attributes.name) {\n      result[attributes.name.toLowerCase()] = {\n        accession: attributes.accession,\n        cvLabel: attributes.cvLabel,\n        value: attributes.value,\n        name: attributes.name,\n      };\n    }\n  }\n  return result;\n}\n","import { parse } from 'arraybuffer-xml-parser';\nimport { recursiveResolve } from 'ml-spectra-processing';\n\nimport { decodeData } from '../util/decodeData.js';\n\nimport { processMetadata } from './processMetaData.js';\nimport { processSpectrumList } from './processSpectrumList.js';\n\nconst decoder = new TextDecoder();\n\n/**\n *\n * @param {*} arrayBuffer\n * @param {import('../Options.js').Options} [options={}]\n * @returns\n */\nexport async function parseMzData(arrayBuffer, options = {}) {\n  const { logger = console } = options;\n  const result = {\n    metadata: {},\n    times: [],\n    series: {\n      ms: {\n        data: [],\n      },\n    },\n  };\n\n  let parsed = parse(arrayBuffer, {\n    attributesNodeName: 'attributes',\n    attributeNameProcessor: (attributeName) => attributeName,\n    tagValueProcessor: (value, node) => {\n      if (node.tagName !== 'data') return decoder.decode(value);\n      const promise = decodeData(node.bytes, node.attributes);\n      // avoid unhandled promise rejection and swallow the error\n      promise.catch((error) => {\n        logger.error('error decoding base64', error);\n        return [];\n      });\n      return promise;\n    },\n  });\n  await recursiveResolve(parsed);\n  processMetadata(parsed.mzData, result.metadata);\n  processSpectrumList(parsed.mzData, result.times, result.series.ms.data);\n\n  return result;\n}\n","import { parseCvParam } from './parseCvParam.js';\n\nexport function processMetadata(parsed, metadata) {\n  if (!parsed || !parsed.description) return;\n  let description = parsed.description;\n  if (description.dataProcessing) {\n    let dataProcessing = description.dataProcessing;\n    if (dataProcessing.software && dataProcessing.software.name) {\n      metadata.software = dataProcessing.software.name;\n    }\n  }\n  if (description.instrument) {\n    let instrument = description.instrument;\n    if (instrument.analyzerList && instrument.analyzerList.analyzer) {\n      let analyzer = instrument.analyzerList.analyzer;\n      let cvParam = parseCvParam(analyzer.cvParam);\n      if (cvParam.analyzertype) {\n        metadata.analyzer = cvParam.analyzertype.value;\n      }\n    }\n    if (instrument.detector) {\n      let detector = instrument.detector;\n      let cvParam = parseCvParam(detector.cvParam);\n      if (cvParam.detectortype) {\n        metadata.detector = cvParam.detectortype.value;\n      }\n    }\n  }\n}\n","import { parseCvParam } from './parseCvParam.js';\n\nexport function processSpectrumList(parsed, times, msData) {\n  if (!parsed || !parsed.spectrumList || !parsed.spectrumList.spectrum) return;\n  let spectrumList = parsed.spectrumList.spectrum;\n  for (let spectrum of spectrumList) {\n    let info = parseCvParam(\n      spectrum.spectrumDesc.spectrumSettings.spectrumInstrument.cvParam,\n    );\n\n    times.push(info.timeinminutes.value);\n\n    let mzArray = spectrum.mzArrayBinary.data['#text'] || [];\n    let intensity = spectrum.intenArrayBinary.data['#text'] || [];\n    msData.push([mzArray, intensity]);\n  }\n}\n","export function parseCvParam(cvParam) {\n  let result = {};\n  if (!cvParam) return result;\n  let cvParams;\n  if (Array.isArray(cvParam)) {\n    cvParams = cvParam;\n  } else {\n    cvParams = [cvParam];\n  }\n  for (let parameter of cvParams) {\n    let attributes = parameter.attributes;\n    if (attributes.name) {\n      result[attributes.accession] = attributes;\n    }\n  }\n  return result;\n}\n","import { parse } from 'arraybuffer-xml-parser';\nimport { recursiveResolve } from 'ml-spectra-processing';\n\nimport { decodeData } from '../util/decodeData.js';\n\nimport { processSpectrumList } from './processSpectrumList.js';\n\nconst decoder = new TextDecoder();\n\n// https://www.psidev.info/mzml\n// CV = Controlled vocabulary\nexport async function parseMzML(mzmlBuffer, options = {}) {\n  const { logger = console, rawData } = options;\n\n  if (!(mzmlBuffer instanceof ArrayBuffer)) {\n    throw new TypeError('mzmlBuffer should be an ArrayBuffer');\n  }\n\n  if (rawData && !(rawData instanceof ArrayBuffer)) {\n    throw new TypeError('rawData should be an ArrayBuffer');\n  }\n\n  const rawDataUint8Array = rawData && new Uint8Array(rawData);\n\n  const result = {\n    metadata: {},\n    times: [],\n    series: {\n      ms: {\n        data: [],\n      },\n    },\n  };\n\n  const referenceableParamGroups = {};\n\n  let parsed = parse(mzmlBuffer, {\n    attributesNodeName: 'attributes',\n    attributeNameProcessor: (attributeName) => attributeName,\n    tagNameProcessor: (name, nodes) => {\n      switch (name) {\n        case 'referenceableParamGroupList':\n          {\n            const children = nodes[0]?.children?.referenceableParamGroup;\n            for (const group of children) {\n              const id = group.attributes?.id;\n              referenceableParamGroups[id] = group.children;\n            }\n          }\n          break;\n        case 'referenceableParamGroupRef':\n          for (const node of nodes) {\n            // need to append the references children to the parent\n            const ref = node.attributes.ref;\n            if (referenceableParamGroups[ref]) {\n              const parent = node.parent;\n              parent.children = parent.children || {};\n              for (const key in referenceableParamGroups[ref]) {\n                parent.children[key] = parent.children[key] || [];\n                parent.children[key].push(\n                  ...referenceableParamGroups[ref][key],\n                );\n              }\n            }\n          }\n          break;\n        case 'cvParam':\n          break;\n        default:\n      }\n      return name;\n    },\n    tagValueProcessor: (value, node) => {\n      if (node.tagName !== 'binary') return decoder.decode(value);\n      const referenceableParamGroupRefs =\n        node.parent?.children?.referenceableParamGroupRef?.map(\n          (ref) => ref.attributes.ref,\n        ) || [];\n      const ontologies = {};\n      referenceableParamGroupRefs.forEach((ref) => {\n        if (referenceableParamGroups[ref]) {\n          Object.assign(ontologies, referenceableParamGroups[ref]);\n        }\n      });\n      node.parent.children.cvParam.forEach((cv) => {\n        ontologies[cv.attributes.accession] = cv.attributes.value;\n      });\n\n      let promise;\n      if ('IMS:1000102' in ontologies) {\n        // external data offset\n        const offset = parseInt(ontologies['IMS:1000102'], 10);\n        const encodedLength = parseInt(ontologies['IMS:1000104'], 10);\n\n        promise = decodeData(\n          rawDataUint8Array.subarray(offset, offset + encodedLength),\n          {\n            ontologies,\n            base64: false,\n          },\n        );\n      } else {\n        promise = decodeData(node.bytes, { ontologies, base64: true });\n      }\n\n      // avoid unhandled promise rejection and swallow the error\n      promise.catch((error) => {\n        logger.error('error decoding base64', error);\n        return [];\n      });\n      return promise;\n    },\n  });\n  // parsed file still contains promises\n  await recursiveResolve(parsed);\n\n  const mzML = parsed.mzML || parsed.indexedmzML.mzML;\n\n  processSpectrumList(mzML, result.times, result.series.ms.data);\n\n  return result;\n}\n","import { parseCvParam } from './parseCvParam.js';\n\nexport function processSpectrumList(parsed, times, msData) {\n  if (\n    !parsed ||\n    !parsed.run ||\n    !parsed.run.spectrumList ||\n    !parsed.run.spectrumList.spectrum\n  ) {\n    return;\n  }\n  let spectrumList = parsed.run.spectrumList.spectrum;\n\n  for (let spectrum of spectrumList) {\n    if (!spectrum.binaryDataArrayList) continue;\n    let scanList = spectrum.scanList;\n    if (Array.isArray(scanList)) throw new Error('Unsupported scanList');\n\n    let scan = scanList.scan;\n\n    if (typeof scan !== 'object') continue;\n    if (Array.isArray(scan)) {\n      throw new Error('processSpectrumList: scan may not be an array');\n    }\n    const cvParam = parseCvParam(scan.cvParam);\n    times.push(cvParam['MS:1000016'].value);\n\n    const dataArrayList = spectrum.binaryDataArrayList.binaryDataArray;\n    if (dataArrayList.length !== 2) {\n      throw new Error('Can not decodeData because length !== 2');\n    }\n\n    const first = dataArrayList[0];\n    const firstCVParams = parseCvParam(first.cvParam);\n    const second = dataArrayList[1];\n    const secondCVParams = parseCvParam(second.cvParam);\n\n    // MS:1000514 - m/z array\n    // MS:1000515 - intensity array\n    if (firstCVParams['MS:1000514'] && secondCVParams['MS:1000515']) {\n      msData.push([first.binary, second.binary]);\n    }\n    if (firstCVParams['MS:1000515'] && secondCVParams['MS:1000514']) {\n      msData.push([second.binary, first.binary]);\n    }\n  }\n}\n","import { parse } from 'arraybuffer-xml-parser';\nimport { recursiveResolve } from 'ml-spectra-processing';\n\nimport { decodeData } from '../util/decodeData.js';\n\nimport { processSpectrumList } from './processSpectrumList.js';\n\nconst decoder = new TextDecoder();\n\n/**\n *\n * @param {*} arrayBuffer\n * @param {import('../Options.js').Options} [options]\n * @returns\n */\nexport async function parseMzXML(arrayBuffer, options = {}) {\n  const { logger = console } = options;\n  const result = {\n    metadata: {},\n    times: [],\n    series: {\n      ms: {\n        data: [],\n      },\n    },\n  };\n  let parsed = parse(arrayBuffer, {\n    attributesNodeName: 'attributes',\n    attributeNameProcessor: (attributeName) => attributeName,\n    tagValueProcessor: (value, node) => {\n      if (node.tagName !== 'peaks') return decoder.decode(value);\n\n      const promise = decodeData(node.bytes, {\n        precision: node.attributes.precision,\n        endian: node.attributes.byteOrder,\n        compression: node.attributes.compressionType,\n      });\n      // avoid unhandled promise rejection and swallow the error\n      promise.catch((error) => {\n        logger.error('error decoding base64', error);\n        return [];\n      });\n      return promise;\n    },\n  });\n  await recursiveResolve(parsed);\n\n  processSpectrumList(parsed.mzXML, result.times, result.series.ms);\n\n  return result;\n}\n","export function processSpectrumList(parsed, times, msData) {\n  if (!parsed.msRun.scan) return;\n  let scanList = parsed.msRun.scan;\n  if (Array.isArray(scanList) === false) scanList = [scanList];\n  if (scanList[0].attributes) msData.info = [];\n  for (let scan of scanList) {\n    if (typeof scan !== 'object') continue;\n    if (Array.isArray(scan)) {\n      throw new Error('processSpectrumList: scan may not be an array');\n    }\n    const dataArray = scan.peaks['#text'];\n    let length = dataArray.length / 2;\n    let first = new Float64Array(length);\n    let second = new Float64Array(length);\n    for (let i = 0; i < length; i++) {\n      first[i] = dataArray[i * 2];\n      second[i] = dataArray[i * 2 + 1];\n    }\n    msData.data.push([first, second]);\n    msData.info.push(scan.attributes);\n    times.push(\n      parseFloat(\n        scan.attributes.retentionTime.replace(/(?:P*)(?:T*)(?:S*)/gi, ''),\n      ),\n    );\n  }\n}\n","import { parseMzData } from './mzdata/parseMzData.js';\nimport { parseMzML } from './mzml/parseMzML.js';\nimport { parseMzXML } from './mzxml/parseMzXML.js';\n\nconst decoder = new TextDecoder();\n\n/**\n * Reads a mzData v1.05 file\n * @param {ArrayBuffer|string} xml - ArrayBuffer or String or any Typed Array (including Node.js' Buffer from v4) with the data\n * @param {import('./Options.js').Options} [options={}]\n * @return Promise<{{times: Array<number>, series: { ms: { data:Array<Array<number>>}}}}>\n */\nexport async function parseMZ(xml, options = {}) {\n  if (typeof xml === 'string') {\n    const encoder = new TextEncoder();\n    xml = encoder.encode(xml);\n  }\n\n  if (!ArrayBuffer.isView(xml)) {\n    xml = new Uint8Array(xml);\n  }\n\n  const header = xml.subarray\n    ? decoder.decode(xml.subarray(0, 200))\n    : xml.substring(0, 200);\n\n  if (header.includes('mzData')) {\n    return parseMzData(xml, options);\n  } else if (header.includes('mzML')) {\n    return parseMzML(xml, options);\n  } else if (header.includes('mzXML')) {\n    return parseMzXML(xml, options);\n  } else {\n    throw new Error(`MZ parser: unknown format`);\n  }\n}\n"],"names":["parseString","value","length","lowercase","toLowerCase","number","Number","includes","isNaN","utf8Decoder","TextDecoder","decoder","array","decode","defaultOptions","trimValues","attributesNodeName","ignoreAttributes","ignoreNameSpace","allowBooleanAttributes","parseAttributesString","textNodeName","arrayMode","cdataTagName","tagNameProcessor","name","attributeNameProcessor","tagValueProcessor","replaceAll","attributeValueProcessor","stopNodes","XMLNode","tagName","parent","children","attributes","bytes","startIndex","cachedValue","constructor","this","Object","create","append","toAppend","arrayConcat","Uint8Array","set","undefined","addChild","child","Array","isArray","push","arrayIndexOf","referenceArray","index","found","foundIndex","i","j","arrayTrim","arg","subarray","closingIndexForOpeningTag","data","attrBoundary","endIndex","byte","Error","findClosingIndex","xmlData","str","errMsg","closingIndex","isEmptySimpleObject","object","key","isTagNameInArrayMode","parentTagName","RegExp","test","newLocal","String","raw","attrsRegx","string","options","matches","regex","from","matchAll","getAllMatches","match","attributeName","resolveNameSpace","trim","tags","split","prefix","startsWith","removeNameSpaceIfNeeded","colonIndex","indexOf","slice","traversableToJSON","node","result","isEmptyObject","asArray","renamedAttributes","target","source","merge","nodes","newTagName","subResult","parse","TextEncoder","encode","ArrayBuffer","isView","realOptions","traversable","currentNode","dataSize","dataIndex","xmlData1","xmlData2","closeIndex","tagExp","childNode","parsedOpeningTag","tagData","separatorIndex","shouldBuildAttributesMap","Math","max","replace","tagAttributes","endsWith","getTraversable","async","recursiveResolve","promises","appendPromises","Promise","all","then","base64codes","base64codes1","Uint32Array","base64codes2","decodeData","TypeError","endian","precision","float","compression","base64","ontologies","input","output","missingOctets","at","buffer","zlibCompressedData","reader","ReadableStream","start","controller","enqueue","close","pipeThrough","DecompressionStream","getReader","chunks","totalLength","done","read","decompressedData","offset","chunk","inflate","step","temp","Float32Array","byteOffset","byteLength","BYTES_PER_ELEMENT","Float64Array","Int32Array","BigInt64Array","parseCvParam","cvParam","cvParams","param","accession","cvLabel","parseMzData","arrayBuffer","logger","console","metadata","times","series","ms","parsed","promise","catch","error","description","dataProcessing","software","instrument","analyzerList","analyzer","analyzertype","detector","detectortype","processMetadata","mzData","msData","spectrumList","spectrum","info","spectrumDesc","spectrumSettings","spectrumInstrument","timeinminutes","mzArray","mzArrayBinary","intensity","intenArrayBinary","processSpectrumList","parameter","parseMzML","mzmlBuffer","rawData","rawDataUint8Array","referenceableParamGroups","referenceableParamGroup","group","id","ref","referenceableParamGroupRefs","referenceableParamGroupRef","map","forEach","assign","cv","parseInt","encodedLength","run","binaryDataArrayList","scanList","scan","dataArrayList","binaryDataArray","first","firstCVParams","second","secondCVParams","binary","mzML","indexedmzML","parseMzXML","byteOrder","compressionType","msRun","dataArray","peaks","parseFloat","retentionTime","mzXML","parseMZ","xml","header","substring"],"mappings":";AAAM,SAAUA,EAAYC,GAC1B,GAAqB,IAAjBA,EAAMC,QAAiC,IAAjBD,EAAMC,OAAc,CAC5C,MAAMC,EAAYF,EAAMG,cAExB,GAAkB,SAAdD,EAAsB,OAAO,EACjC,GAAkB,UAAdA,EAAuB,OAAO,CACpC,CACA,MAAME,EAASC,OAAOL,GACtB,OAAe,IAAXI,GAAiBJ,EAAMM,SAAS,KAG/BD,OAAOE,MAAMH,GACXJ,EAD2BI,EAFzBJ,CAIX,CCTA,MAAMQ,EAAc,IAAIC,YAEXC,EACFC,GACAH,EAAYI,OAAOD,GA+FjBE,EAAmC,CAC9CC,YAAY,EACZC,mBAAoB,GACpBC,kBAAkB,EAClBC,iBAAiB,EACjBC,wBAAwB,EACxBC,uBAAuB,EAEvBC,aAAc,QAEdC,WAAW,EACXC,cAAc,EACdC,iBAAmBC,GAAiBA,EACpCC,uBAAyBD,GAAiB,IAAIA,IAC9CE,kBAAoB1B,GAEXD,EADQW,EAAeV,GAAO2B,WAAW,KAAM,KAGxDC,wBAA0B5B,GAAkBD,EAAYC,GACxD6B,UAAW,ICrHP,MAAOC,EACJC,QACAC,OACAC,SACAC,WACAC,MACAC,WACCV,kBACAW,YACRC,WAAAA,CACEP,EACAC,EACAG,EACAT,GAEAa,KAAKR,QAAUA,EACfQ,KAAKP,OAASA,EACdO,KAAKN,SAAWO,OAAOC,OAAO,MAC9BF,KAAKL,WAAaM,OAAOC,OAAO,MAChCF,KAAKJ,MAAQA,EACbI,KAAKb,kBAAoBA,EACzBa,KAAKH,YAAa,CACpB,CACOM,MAAAA,CAAOC,GACZ,GAA0B,IAAtBJ,KAAKJ,MAAMlC,OAEb,YADAsC,KAAKJ,MAAQQ,GAGf,MAAMC,EAAc,IAAIC,WAAWN,KAAKJ,MAAMlC,OAAS0C,EAAS1C,QAChE2C,EAAYE,IAAIP,KAAKJ,OACrBS,EAAY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