diff --git a/.gitattributes b/.gitattributes index 5bb907b..2cb7536 100644 --- a/.gitattributes +++ b/.gitattributes @@ -1,2 +1,3 @@ node_modules/* linguist-vendored *.js linguist-vendored +dist/* linguist-generated diff --git a/dist/index.js b/dist/index.js index 5fa8d61..3749212 100644 --- a/dist/index.js +++ b/dist/index.js @@ -5290,10 +5290,13 @@ function parseCommaParts(str) { return parts; } -function expandTop(str) { +function expandTop(str, options) { if (!str) return []; + options = options || {}; + var max = options.max == null ? Infinity : options.max; + // I don't know why Bash 4.3 does this, but it does. // Anything starting with {} will have the first two bytes preserved // but *only* at the top level, so {},a}b will not expand to anything, @@ -5304,7 +5307,7 @@ function expandTop(str) { str = '\\{\\}' + str.substr(2); } - return expand(escapeBraces(str), true).map(unescapeBraces); + return expand(escapeBraces(str), max, true).map(unescapeBraces); } function identity(e) { @@ -5325,7 +5328,7 @@ function gte(i, y) { return i >= y; } -function expand(str, isTop) { +function expand(str, max, isTop) { var expansions = []; var m = balanced('{', '}', str); @@ -5339,7 +5342,7 @@ function expand(str, isTop) { // {a},b} if (m.post.match(/,(?!,).*\}/)) { str = m.pre + '{' + m.body + escClose + m.post; - return expand(str); + return expand(str, max, true); } return [str]; } @@ -5351,10 +5354,10 @@ function expand(str, isTop) { n = parseCommaParts(m.body); if (n.length === 1) { // x{{a,b}}y ==> x{a}y x{b}y - n = expand(n[0], false).map(embrace); + n = expand(n[0], max, false).map(embrace); if (n.length === 1) { var post = m.post.length - ? expand(m.post, false) + ? expand(m.post, max, false) : ['']; return post.map(function(p) { return m.pre + n[0] + p; @@ -5369,7 +5372,7 @@ function expand(str, isTop) { // no need to expand pre, since it is guaranteed to be free of brace-sets var pre = m.pre; var post = m.post.length - ? expand(m.post, false) + ? expand(m.post, max, false) : ['']; var N; @@ -5391,7 +5394,7 @@ function expand(str, isTop) { N = []; - for (var i = x; test(i, y); i += incr) { + for (var i = x; test(i, y) && N.length < max; i += incr) { var c; if (isAlphaSequence) { c = String.fromCharCode(i); @@ -5413,11 +5416,11 @@ function expand(str, isTop) { N.push(c); } } else { - N = concatMap(n, function(el) { return expand(el, false) }); + N = concatMap(n, function(el) { return expand(el, max, false) }); } for (var j = 0; j < N.length; j++) { - for (var k = 0; k < post.length; k++) { + for (var k = 0; k < post.length && expansions.length < max; k++) { var expansion = pre + N[j] + post[k]; if (!isTop || isSequence || expansion) expansions.push(expansion); @@ -8196,6 +8199,9 @@ class Range { } parseRange (range) { + // strip build metadata so it can't bleed into the version + range = range.replace(BUILDSTRIPRE, '') + // memoize range parsing for performance. // this is a very hot path, and fully deterministic. const memoOpts = @@ -8321,6 +8327,7 @@ const debug = __nccwpck_require__(1159) const SemVer = __nccwpck_require__(7163) const { safeRe: re, + src, t, comparatorTrimReplace, tildeTrimReplace, @@ -8328,6 +8335,9 @@ const { } = __nccwpck_require__(5471) const { FLAG_INCLUDE_PRERELEASE, FLAG_LOOSE } = __nccwpck_require__(5101) +// unbounded global build-metadata stripper used by parseRange +const BUILDSTRIPRE = new RegExp(src[t.BUILD], 'g') + const isNullSet = c => c.value === '<0.0.0-0' const isAny = c => c.value === '' @@ -8368,6 +8378,11 @@ const parseComparator = (comp, options) => { const isX = id => !id || id.toLowerCase() === 'x' || id === '*' +const invalidXRangeOrder = (M, m, p) => ( + (isX(M) && !isX(m)) || + (isX(m) && p && !isX(p)) +) + // ~, ~> --> * (any, kinda silly) // ~2, ~2.x, ~2.x.x, ~>2, ~>2.x ~>2.x.x --> >=2.0.0 <3.0.0-0 // ~2.0, ~2.0.x, ~>2.0, ~>2.0.x --> >=2.0.0 <2.1.0-0 @@ -8464,10 +8479,10 @@ const replaceCaret = (comp, options) => { if (M === '0') { if (m === '0') { ret = `>=${M}.${m}.${p - }${z} <${M}.${m}.${+p + 1}-0` + } <${M}.${m}.${+p + 1}-0` } else { ret = `>=${M}.${m}.${p - }${z} <${M}.${+m + 1}.0-0` + } <${M}.${+m + 1}.0-0` } } else { ret = `>=${M}.${m}.${p @@ -8493,6 +8508,10 @@ const replaceXRange = (comp, options) => { const r = options.loose ? re[t.XRANGELOOSE] : re[t.XRANGE] return comp.replace(r, (ret, gtlt, M, m, p, pr) => { debug('xRange', comp, ret, gtlt, M, m, p, pr) + if (invalidXRangeOrder(M, m, p)) { + return comp + } + const xM = isX(M) const xm = xM || isX(m) const xp = xm || isX(p) @@ -8668,6 +8687,22 @@ const { safeRe: re, t } = __nccwpck_require__(5471) const parseOptions = __nccwpck_require__(356) const { compareIdentifiers } = __nccwpck_require__(3348) + +const isPrereleaseIdentifier = (prerelease, identifier) => { + const identifiers = identifier.split('.') + if (identifiers.length > prerelease.length) { + return false + } + + for (let i = 0; i < identifiers.length; i++) { + if (compareIdentifiers(prerelease[i], identifiers[i]) !== 0) { + return false + } + } + + return true +} + class SemVer { constructor (version, options) { options = parseOptions(options) @@ -8971,8 +9006,9 @@ class SemVer { if (identifierBase === false) { prerelease = [identifier] } - if (compareIdentifiers(this.prerelease[0], identifier) === 0) { - if (isNaN(this.prerelease[1])) { + if (isPrereleaseIdentifier(this.prerelease, identifier)) { + const prereleaseBase = this.prerelease[identifier.split('.').length] + if (isNaN(prereleaseBase)) { this.prerelease = prerelease } } else { @@ -9480,6 +9516,61 @@ const sort = (list, loose) => list.sort((a, b) => compareBuild(a, b, loose)) module.exports = sort +/***/ }), + +/***/ 6114: +/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { + + + +const parse = __nccwpck_require__(6353) +const constants = __nccwpck_require__(5101) +const SemVer = __nccwpck_require__(7163) + +const truncate = (version, truncation, options) => { + if (!constants.RELEASE_TYPES.includes(truncation)) { + return null + } + + const clonedVersion = cloneInputVersion(version, options) + return clonedVersion && doTruncation(clonedVersion, truncation) +} + +const cloneInputVersion = (version, options) => { + const versionStringToParse = ( + version instanceof SemVer ? version.version : version + ) + + return parse(versionStringToParse, options) +} + +const doTruncation = (version, truncation) => { + if (isPrerelease(truncation)) { + return version.version + } + + version.prerelease = [] + + switch (truncation) { + case 'major': + version.minor = 0 + version.patch = 0 + break + case 'minor': + version.patch = 0 + break + } + + return version.format() +} + +const isPrerelease = (type) => { + return type.startsWith('pre') +} + +module.exports = truncate + + /***/ }), /***/ 8780: @@ -9530,6 +9621,7 @@ const gte = __nccwpck_require__(1236) const lte = __nccwpck_require__(6717) const cmp = __nccwpck_require__(8646) const coerce = __nccwpck_require__(5385) +const truncate = __nccwpck_require__(6114) const Comparator = __nccwpck_require__(9379) const Range = __nccwpck_require__(6782) const satisfies = __nccwpck_require__(8011) @@ -9568,6 +9660,7 @@ module.exports = { lte, cmp, coerce, + truncate, Comparator, Range, satisfies, @@ -9907,7 +10000,7 @@ createToken('LOOSE', `^${src[t.LOOSEPLAIN]}$`) createToken('GTLT', '((?:<|>)?=?)') // Something like "2.*" or "1.2.x". -// Note that "x.x" is a valid xRange identifer, meaning "any version" +// Note that "x.x" is a valid xRange identifier, meaning "any version" // Only the first item is strictly required. createToken('XRANGEIDENTIFIERLOOSE', `${src[t.NUMERICIDENTIFIERLOOSE]}|x|X|\\*`) createToken('XRANGEIDENTIFIER', `${src[t.NUMERICIDENTIFIER]}|x|X|\\*`) @@ -10499,7 +10592,7 @@ const simpleSubset = (sub, dom, options) => { if (higher === c && higher !== gt) { return false } - } else if (gt.operator === '>=' && !satisfies(gt.semver, String(c), options)) { + } else if (gt.operator === '>=' && !c.test(gt.semver)) { return false } } @@ -10517,7 +10610,7 @@ const simpleSubset = (sub, dom, options) => { if (lower === c && lower !== lt) { return false } - } else if (lt.operator === '<=' && !satisfies(lt.semver, String(c), options)) { + } else if (lt.operator === '<=' && !c.test(lt.semver)) { return false } } @@ -14989,8 +15082,6 @@ function defaultFactory (origin, opts) { class Agent extends DispatcherBase { constructor ({ factory = defaultFactory, maxRedirections = 0, connect, ...options } = {}) { - super() - if (typeof factory !== 'function') { throw new InvalidArgumentError('factory must be a function.') } @@ -15003,6 +15094,8 @@ class Agent extends DispatcherBase { throw new InvalidArgumentError('maxRedirections must be a positive number') } + super(options) + if (connect && typeof connect !== 'function') { connect = { ...connect } } @@ -15596,29 +15689,71 @@ class Parser { const offset = llhttp.llhttp_get_error_pos(this.ptr) - currentBufferPtr - if (ret === constants.ERROR.PAUSED_UPGRADE) { - this.onUpgrade(data.slice(offset)) - } else if (ret === constants.ERROR.PAUSED) { - this.paused = true - socket.unshift(data.slice(offset)) - } else if (ret !== constants.ERROR.OK) { - const ptr = llhttp.llhttp_get_error_reason(this.ptr) - let message = '' - /* istanbul ignore else: difficult to make a test case for */ - if (ptr) { - const len = new Uint8Array(llhttp.memory.buffer, ptr).indexOf(0) - message = - 'Response does not match the HTTP/1.1 protocol (' + - Buffer.from(llhttp.memory.buffer, ptr, len).toString() + - ')' - } - throw new HTTPParserError(message, constants.ERROR[ret], data.slice(offset)) + if (ret !== constants.ERROR.OK) { + const body = data.subarray(offset) + + if (ret === constants.ERROR.PAUSED_UPGRADE) { + this.onUpgrade(body) + } else if (ret === constants.ERROR.PAUSED) { + this.paused = true + socket.unshift(body) + } else { + throw this.createError(ret, body) + } } } catch (err) { util.destroy(socket, err) } } + finish () { + assert(currentParser === null) + assert(this.ptr != null) + assert(!this.paused) + + const { llhttp } = this + + let ret + + try { + currentParser = this + ret = llhttp.llhttp_finish(this.ptr) + } finally { + currentParser = null + } + + if (ret === constants.ERROR.OK) { + return null + } + + if (ret === constants.ERROR.PAUSED || ret === constants.ERROR.PAUSED_UPGRADE) { + this.paused = true + return null + } + + return this.createError(ret, EMPTY_BUF) + } + + createError (ret, data) { + const { llhttp, contentLength, bytesRead } = this + + if (contentLength && bytesRead !== parseInt(contentLength, 10)) { + return new ResponseContentLengthMismatchError() + } + + const ptr = llhttp.llhttp_get_error_reason(this.ptr) + let message = '' + if (ptr) { + const len = new Uint8Array(llhttp.memory.buffer, ptr).indexOf(0) + message = + 'Response does not match the HTTP/1.1 protocol (' + + Buffer.from(llhttp.memory.buffer, ptr, len).toString() + + ')' + } + + return new HTTPParserError(message, constants.ERROR[ret], data) + } + destroy () { assert(this.ptr != null) assert(currentParser == null) @@ -15990,8 +16125,11 @@ async function connectH1 (client, socket) { // On Mac OS, we get an ECONNRESET even if there is a full body to be forwarded // to the user. if (err.code === 'ECONNRESET' && parser.statusCode && !parser.shouldKeepAlive) { - // We treat all incoming data so for as a valid response. - parser.onMessageComplete() + const parserErr = parser.finish() + if (parserErr) { + this[kError] = parserErr + this[kClient][kOnError](parserErr) + } return } @@ -16010,8 +16148,10 @@ async function connectH1 (client, socket) { const parser = this[kParser] if (parser.statusCode && !parser.shouldKeepAlive) { - // We treat all incoming data so far as a valid response. - parser.onMessageComplete() + const parserErr = parser.finish() + if (parserErr) { + util.destroy(this, parserErr) + } return } @@ -16023,8 +16163,7 @@ async function connectH1 (client, socket) { if (parser) { if (!this[kError] && parser.statusCode && !parser.shouldKeepAlive) { - // We treat all incoming data so far as a valid response. - parser.onMessageComplete() + this[kError] = parser.finish() || this[kError] } this[kParser].destroy() @@ -17551,9 +17690,10 @@ class Client extends DispatcherBase { autoSelectFamilyAttemptTimeout, // h2 maxConcurrentStreams, - allowH2 + allowH2, + webSocket } = {}) { - super() + super({ webSocket }) if (keepAlive !== undefined) { throw new InvalidArgumentError('unsupported keepAlive, use pipelining=0 instead') @@ -18085,15 +18225,23 @@ const { kDestroy, kClose, kClosed, kDestroyed, kDispatch, kInterceptors } = __nc const kOnDestroyed = Symbol('onDestroyed') const kOnClosed = Symbol('onClosed') const kInterceptedDispatch = Symbol('Intercepted Dispatch') +const kWebSocketOptions = Symbol('webSocketOptions') class DispatcherBase extends Dispatcher { - constructor () { + constructor (opts) { super() this[kDestroyed] = false this[kOnDestroyed] = null this[kClosed] = false this[kOnClosed] = [] + this[kWebSocketOptions] = opts?.webSocket ?? {} + } + + get webSocketOptions () { + return { + maxPayloadSize: this[kWebSocketOptions].maxPayloadSize ?? 128 * 1024 * 1024 + } } get destroyed () { @@ -18653,8 +18801,8 @@ const kRemoveClient = Symbol('remove client') const kStats = Symbol('stats') class PoolBase extends DispatcherBase { - constructor () { - super() + constructor (opts) { + super(opts) this[kQueue] = new FixedQueue() this[kClients] = [] @@ -18913,8 +19061,6 @@ class Pool extends PoolBase { allowH2, ...options } = {}) { - super() - if (connections != null && (!Number.isFinite(connections) || connections < 0)) { throw new InvalidArgumentError('invalid connections') } @@ -18939,6 +19085,8 @@ class Pool extends PoolBase { }) } + super(options) + this[kInterceptors] = options.interceptors?.Pool && Array.isArray(options.interceptors.Pool) ? options.interceptors.Pool : [] @@ -36693,40 +36841,35 @@ const tail = Buffer.from([0x00, 0x00, 0xff, 0xff]) const kBuffer = Symbol('kBuffer') const kLength = Symbol('kLength') -// Default maximum decompressed message size: 4 MB -const kDefaultMaxDecompressedSize = 4 * 1024 * 1024 - class PerMessageDeflate { /** @type {import('node:zlib').InflateRaw} */ #inflate #options = {} - /** @type {boolean} */ - #aborted = false - - /** @type {Function|null} */ - #currentCallback = null + #maxPayloadSize = 0 /** * @param {Map} extensions */ - constructor (extensions) { + constructor (extensions, options) { this.#options.serverNoContextTakeover = extensions.has('server_no_context_takeover') this.#options.serverMaxWindowBits = extensions.get('server_max_window_bits') + + this.#maxPayloadSize = options.maxPayloadSize } + /** + * Decompress a compressed payload. + * @param {Buffer} chunk Compressed data + * @param {boolean} fin Final fragment flag + * @param {Function} callback Callback function + */ decompress (chunk, fin, callback) { // An endpoint uses the following algorithm to decompress a message. // 1. Append 4 octets of 0x00 0x00 0xff 0xff to the tail end of the // payload of the message. // 2. Decompress the resulting data using DEFLATE. - - if (this.#aborted) { - callback(new MessageSizeExceededError()) - return - } - if (!this.#inflate) { let windowBits = Z_DEFAULT_WINDOWBITS @@ -36749,23 +36892,12 @@ class PerMessageDeflate { this.#inflate[kLength] = 0 this.#inflate.on('data', (data) => { - if (this.#aborted) { - return - } - this.#inflate[kLength] += data.length - if (this.#inflate[kLength] > kDefaultMaxDecompressedSize) { - this.#aborted = true + if (this.#maxPayloadSize > 0 && this.#inflate[kLength] > this.#maxPayloadSize) { + callback(new MessageSizeExceededError()) this.#inflate.removeAllListeners() - this.#inflate.destroy() this.#inflate = null - - if (this.#currentCallback) { - const cb = this.#currentCallback - this.#currentCallback = null - cb(new MessageSizeExceededError()) - } return } @@ -36778,14 +36910,13 @@ class PerMessageDeflate { }) } - this.#currentCallback = callback this.#inflate.write(chunk) if (fin) { this.#inflate.write(tail) } this.#inflate.flush(() => { - if (this.#aborted || !this.#inflate) { + if (!this.#inflate) { return } @@ -36793,7 +36924,6 @@ class PerMessageDeflate { this.#inflate[kBuffer].length = 0 this.#inflate[kLength] = 0 - this.#currentCallback = null callback(null, full) }) @@ -36828,6 +36958,7 @@ const { const { WebsocketFrameSend } = __nccwpck_require__(3264) const { closeWebSocketConnection } = __nccwpck_require__(6897) const { PerMessageDeflate } = __nccwpck_require__(9469) +const { MessageSizeExceededError } = __nccwpck_require__(8707) // This code was influenced by ws released under the MIT license. // Copyright (c) 2011 Einar Otto Stangvik @@ -36836,6 +36967,7 @@ const { PerMessageDeflate } = __nccwpck_require__(9469) class ByteParser extends Writable { #buffers = [] + #fragmentsBytes = 0 #byteOffset = 0 #loop = false @@ -36847,18 +36979,23 @@ class ByteParser extends Writable { /** @type {Map} */ #extensions + /** @type {number} */ + #maxPayloadSize + /** * @param {import('./websocket').WebSocket} ws * @param {Map|null} extensions + * @param {{ maxPayloadSize?: number }} [options] */ - constructor (ws, extensions) { + constructor (ws, extensions, options = {}) { super() this.ws = ws this.#extensions = extensions == null ? new Map() : extensions + this.#maxPayloadSize = options.maxPayloadSize ?? 0 if (this.#extensions.has('permessage-deflate')) { - this.#extensions.set('permessage-deflate', new PerMessageDeflate(extensions)) + this.#extensions.set('permessage-deflate', new PerMessageDeflate(extensions, options)) } } @@ -36874,6 +37011,19 @@ class ByteParser extends Writable { this.run(callback) } + #validatePayloadLength () { + if ( + this.#maxPayloadSize > 0 && + !isControlFrame(this.#info.opcode) && + this.#info.payloadLength > this.#maxPayloadSize + ) { + failWebsocketConnection(this.ws, 'Payload size exceeds maximum allowed size') + return false + } + + return true + } + /** * Runs whenever a new chunk is received. * Callback is called whenever there are no more chunks buffering, @@ -36962,6 +37112,10 @@ class ByteParser extends Writable { if (payloadLength <= 125) { this.#info.payloadLength = payloadLength this.#state = parserStates.READ_DATA + + if (!this.#validatePayloadLength()) { + return + } } else if (payloadLength === 126) { this.#state = parserStates.PAYLOADLENGTH_16 } else if (payloadLength === 127) { @@ -36986,6 +37140,10 @@ class ByteParser extends Writable { this.#info.payloadLength = buffer.readUInt16BE(0) this.#state = parserStates.READ_DATA + + if (!this.#validatePayloadLength()) { + return + } } else if (this.#state === parserStates.PAYLOADLENGTH_64) { if (this.#byteOffset < 8) { return callback() @@ -37008,6 +37166,10 @@ class ByteParser extends Writable { this.#info.payloadLength = lower this.#state = parserStates.READ_DATA + + if (!this.#validatePayloadLength()) { + return + } } else if (this.#state === parserStates.READ_DATA) { if (this.#byteOffset < this.#info.payloadLength) { return callback() @@ -37020,42 +37182,53 @@ class ByteParser extends Writable { this.#state = parserStates.INFO } else { if (!this.#info.compressed) { - this.#fragments.push(body) + this.writeFragments(body) + + if (this.#maxPayloadSize > 0 && this.#fragmentsBytes > this.#maxPayloadSize) { + failWebsocketConnection(this.ws, new MessageSizeExceededError().message) + return + } // If the frame is not fragmented, a message has been received. // If the frame is fragmented, it will terminate with a fin bit set // and an opcode of 0 (continuation), therefore we handle that when // parsing continuation frames, not here. if (!this.#info.fragmented && this.#info.fin) { - const fullMessage = Buffer.concat(this.#fragments) - websocketMessageReceived(this.ws, this.#info.binaryType, fullMessage) - this.#fragments.length = 0 + websocketMessageReceived(this.ws, this.#info.binaryType, this.consumeFragments()) } this.#state = parserStates.INFO } else { - this.#extensions.get('permessage-deflate').decompress(body, this.#info.fin, (error, data) => { - if (error) { - failWebsocketConnection(this.ws, error.message) - return - } + this.#extensions.get('permessage-deflate').decompress( + body, + this.#info.fin, + (error, data) => { + if (error) { + failWebsocketConnection(this.ws, error.message) + return + } - this.#fragments.push(data) + this.writeFragments(data) + + if (this.#maxPayloadSize > 0 && this.#fragmentsBytes > this.#maxPayloadSize) { + failWebsocketConnection(this.ws, new MessageSizeExceededError().message) + return + } + + if (!this.#info.fin) { + this.#state = parserStates.INFO + this.#loop = true + this.run(callback) + return + } + + websocketMessageReceived(this.ws, this.#info.binaryType, this.consumeFragments()) - if (!this.#info.fin) { - this.#state = parserStates.INFO this.#loop = true + this.#state = parserStates.INFO this.run(callback) - return } - - websocketMessageReceived(this.ws, this.#info.binaryType, Buffer.concat(this.#fragments)) - - this.#loop = true - this.#state = parserStates.INFO - this.#fragments.length = 0 - this.run(callback) - }) + ) this.#loop = false break @@ -37107,6 +37280,26 @@ class ByteParser extends Writable { return buffer } + writeFragments (fragment) { + this.#fragmentsBytes += fragment.length + this.#fragments.push(fragment) + } + + consumeFragments () { + const fragments = this.#fragments + + if (fragments.length === 1) { + this.#fragmentsBytes = 0 + return fragments.shift() + } + + const output = Buffer.concat(fragments, this.#fragmentsBytes) + this.#fragments = [] + this.#fragmentsBytes = 0 + + return output + } + parseCloseBody (data) { assert(data.length !== 1) @@ -38138,7 +38331,11 @@ class WebSocket extends EventTarget { // once this happens, the connection is open this[kResponse] = response - const parser = new ByteParser(this, parsedExtensions) + const maxPayloadSize = this[kController]?.dispatcher?.webSocketOptions?.maxPayloadSize + + const parser = new ByteParser(this, parsedExtensions, { + maxPayloadSize + }) parser.on('drain', onParserDrain) parser.on('error', onParserError.bind(this)) @@ -38518,7 +38715,7 @@ module.exports = __WEBPACK_EXTERNAL_createRequire(import.meta.url)("util"); /***/ }), -/***/ 3345: +/***/ 30: /***/ ((__unused_webpack_module, exports) => { var __webpack_unused_export__; @@ -38533,7 +38730,7 @@ exports.w = void 0; exports.w = { operationRequestMap: new WeakMap(), }; -//# sourceMappingURL=state-cjs.cjs.map +//# sourceMappingURL=state-cjs.js.map /***/ }), @@ -38575,7 +38772,7 @@ module.exports = { version: packageJson.version } /***/ 4012: /***/ ((module) => { -module.exports = /*#__PURE__*/JSON.parse('{"name":"@actions/cache","version":"6.0.0","description":"Actions cache lib","keywords":["github","actions","cache"],"homepage":"https://github.com/actions/toolkit/tree/main/packages/cache","license":"MIT","type":"module","main":"lib/cache.js","types":"lib/cache.d.ts","exports":{".":{"types":"./lib/cache.d.ts","import":"./lib/cache.js"}},"directories":{"lib":"lib","test":"__tests__"},"files":["lib","!.DS_Store"],"publishConfig":{"access":"public"},"repository":{"type":"git","url":"git+https://github.com/actions/toolkit.git","directory":"packages/cache"},"scripts":{"audit-moderate":"npm install && npm audit --json --audit-level=moderate > audit.json","test":"echo \\"Error: run tests from root\\" && exit 1","tsc":"tsc && cp src/internal/shared/package-version.cjs lib/internal/shared/"},"bugs":{"url":"https://github.com/actions/toolkit/issues"},"dependencies":{"@actions/core":"^3.0.0","@actions/exec":"^3.0.0","@actions/glob":"^0.6.1","@actions/http-client":"^4.0.0","@actions/io":"^3.0.0","@azure/core-rest-pipeline":"^1.22.0","@azure/storage-blob":"^12.30.0","@protobuf-ts/runtime-rpc":"^2.11.1","semver":"^7.7.3"},"devDependencies":{"@protobuf-ts/plugin":"^2.9.4","@types/node":"^25.1.0","@types/semver":"^7.7.1","typescript":"^5.2.2"},"overrides":{"uri-js":"npm:uri-js-replace@^1.0.1","node-fetch":"^3.3.2"}}'); +module.exports = /*#__PURE__*/JSON.parse('{"name":"@actions/cache","version":"6.0.1","description":"Actions cache lib","keywords":["github","actions","cache"],"homepage":"https://github.com/actions/toolkit/tree/main/packages/cache","license":"MIT","type":"module","main":"lib/cache.js","types":"lib/cache.d.ts","exports":{".":{"types":"./lib/cache.d.ts","import":"./lib/cache.js"}},"directories":{"lib":"lib","test":"__tests__"},"files":["lib","!.DS_Store"],"publishConfig":{"access":"public"},"repository":{"type":"git","url":"git+https://github.com/actions/toolkit.git","directory":"packages/cache"},"scripts":{"audit-moderate":"npm install && npm audit --json --audit-level=moderate > audit.json","test":"echo \\"Error: run tests from root\\" && exit 1","tsc":"tsc && cp src/internal/shared/package-version.cjs lib/internal/shared/"},"bugs":{"url":"https://github.com/actions/toolkit/issues"},"dependencies":{"@actions/core":"^3.0.1","@actions/exec":"^3.0.0","@actions/glob":"^0.6.1","@actions/http-client":"^4.0.1","@actions/io":"^3.0.2","@azure/core-rest-pipeline":"^1.23.0","@azure/storage-blob":"^12.31.0","@protobuf-ts/runtime-rpc":"^2.11.1","semver":"^7.7.4"},"devDependencies":{"@protobuf-ts/plugin":"^2.11.1","@types/node":"^25.6.0","@types/semver":"^7.7.1","typescript":"^5.9.3"},"overrides":{"uri-js":"npm:uri-js-replace@^1.0.1","node-fetch":"^3.3.2"}}'); /***/ }) @@ -43840,11 +44037,61 @@ function log(message, ...args) { external_node_process_namespaceObject.stderr.write(`${external_node_util_.format(message, ...args)}${external_node_os_namespaceObject.EOL}`); } //# sourceMappingURL=log.js.map +;// CONCATENATED MODULE: ./node_modules/@typespec/ts-http-runtime/dist/esm/env.js +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +/** + * Returns the value of the specified environment variable. + * + * @internal + */ +function getEnvironmentVariable(name) { + return external_node_process_namespaceObject.env[name]; +} +/** + * Emits a Node.js process warning. + * + * @internal + */ +function env_emitNodeWarning(warning) { + process.emitWarning(warning); +} +/** + * A constant that indicates whether the environment the code is running is a Web Browser. + */ +const isBrowser = false; +/** + * A constant that indicates whether the environment the code is running is a Web Worker. + */ +const isWebWorker = false; +/** + * A constant that indicates whether the environment the code is running is Deno. + */ +const isDeno = typeof external_node_process_namespaceObject.versions.deno === "string" && external_node_process_namespaceObject.versions.deno.length > 0; +/** + * A constant that indicates whether the environment the code is running is Bun.sh. + */ +const isBun = typeof external_node_process_namespaceObject.versions.bun === "string" && external_node_process_namespaceObject.versions.bun.length > 0; +/** + * A constant that indicates whether the environment the code is running is a Node.js compatible environment. + */ +const env_isNodeLike = true; +/** + * A constant that indicates whether the environment the code is running is Node.JS. + */ +const isNodeRuntime = !isBun && !isDeno; +/** + * A constant that indicates whether the environment the code is running is in React-Native. + */ +const isReactNative = false; +//# sourceMappingURL=env.js.map ;// CONCATENATED MODULE: ./node_modules/@typespec/ts-http-runtime/dist/esm/logger/debug.js // Copyright (c) Microsoft Corporation. // Licensed under the MIT License. -const debugEnvVariable = (typeof process !== "undefined" && process.env && process.env.DEBUG) || undefined; + +const debugEnvVariable = getEnvironmentVariable("DEBUG"); let enabledString; let enabledNamespaces = []; let skippedNamespaces = []; @@ -44030,6 +44277,7 @@ function extend(namespace) { // Copyright (c) Microsoft Corporation. // Licensed under the MIT License. + const TYPESPEC_RUNTIME_LOG_LEVELS = ["verbose", "info", "warning", "error"]; const levelMap = { verbose: 400, @@ -44052,8 +44300,7 @@ function isTypeSpecRuntimeLogLevel(level) { */ function createLoggerContext(options) { const registeredLoggers = new Set(); - const logLevelFromEnv = (typeof process !== "undefined" && process.env && process.env[options.logLevelEnvVarName]) || - undefined; + const logLevelFromEnv = getEnvironmentVariable(options.logLevelEnvVarName); let logLevel; const clientLogger = logger_debug(options.namespace); clientLogger.log = (...args) => { @@ -44158,6 +44405,16 @@ function createClientLogger(namespace) { function normalizeName(name) { return name.toLowerCase(); } +/** + * Removes CR and LF characters from a header value to prevent obs-fold + * (line folding) sequences, as forbidden by RFC 7230 §3.2.4. + * @param value - The header value to sanitize. + */ +function normalizeValue(value) { + return String(value) + .trim() + .replace(/[\r\n]/g, ""); +} function* headerIterator(map) { for (const entry of map.values()) { yield [entry.name, entry.value]; @@ -44180,7 +44437,7 @@ class HttpHeadersImpl { * @param value - The value of the header to set. */ set(name, value) { - this._headersMap.set(normalizeName(name), { name, value: String(value).trim() }); + this._headersMap.set(normalizeName(name), { name, value: normalizeValue(value) }); } /** * Get the header value for the provided header name, or undefined if no header exists in this @@ -44687,13 +44944,13 @@ class Sanitizer { message: value.message, }; } - if (key === "headers") { + if (key === "headers" && isObject(value)) { return this.sanitizeHeaders(value); } - else if (key === "url") { + else if (key === "url" && typeof value === "string") { return this.sanitizeUrl(value); } - else if (key === "query") { + else if (key === "query" && isObject(value)) { return this.sanitizeQuery(value); } else if (key === "body") { @@ -45082,7 +45339,9 @@ class NodeHttpClient { req.end(body); } else if (isArrayBuffer(body)) { - req.end(ArrayBuffer.isView(body) ? Buffer.from(body.buffer) : Buffer.from(body)); + req.end(ArrayBuffer.isView(body) + ? Buffer.from(body.buffer, body.byteOffset, body.byteLength) + : Buffer.from(body)); } else { log_logger.error("Unrecognized body type", body); @@ -45264,68 +45523,6 @@ function logPolicy_logPolicy(options = {}) { }; } //# sourceMappingURL=logPolicy.js.map -;// CONCATENATED MODULE: ./node_modules/@typespec/ts-http-runtime/dist/esm/policies/redirectPolicy.js -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -/** - * The programmatic identifier of the redirectPolicy. - */ -const redirectPolicyName = "redirectPolicy"; -/** - * Methods that are allowed to follow redirects 301 and 302 - */ -const allowedRedirect = ["GET", "HEAD"]; -/** - * A policy to follow Location headers from the server in order - * to support server-side redirection. - * In the browser, this policy is not used. - * @param options - Options to control policy behavior. - */ -function redirectPolicy_redirectPolicy(options = {}) { - const { maxRetries = 20, allowCrossOriginRedirects = false } = options; - return { - name: redirectPolicyName, - async sendRequest(request, next) { - const response = await next(request); - return handleRedirect(next, response, maxRetries, allowCrossOriginRedirects); - }, - }; -} -async function handleRedirect(next, response, maxRetries, allowCrossOriginRedirects, currentRetries = 0) { - const { request, status, headers } = response; - const locationHeader = headers.get("location"); - if (locationHeader && - (status === 300 || - (status === 301 && allowedRedirect.includes(request.method)) || - (status === 302 && allowedRedirect.includes(request.method)) || - (status === 303 && request.method === "POST") || - status === 307) && - currentRetries < maxRetries) { - const url = new URL(locationHeader, request.url); - // Only follow redirects to the same origin by default. - if (!allowCrossOriginRedirects) { - const originalUrl = new URL(request.url); - if (url.origin !== originalUrl.origin) { - log_logger.verbose(`Skipping cross-origin redirect from ${originalUrl.origin} to ${url.origin}.`); - return response; - } - } - request.url = url.toString(); - // POST request with Status code 303 should be converted into a - // redirected GET request if the redirect url is present in the location header - if (status === 303) { - request.method = "GET"; - request.headers.delete("Content-Length"); - delete request.body; - } - request.headers.delete("Authorization"); - const res = await next(request); - return handleRedirect(next, res, maxRetries, allowCrossOriginRedirects, currentRetries + 1); - } - return response; -} -//# sourceMappingURL=redirectPolicy.js.map ;// CONCATENATED MODULE: ./node_modules/@typespec/ts-http-runtime/dist/esm/util/userAgentPlatform.js // Copyright (c) Microsoft Corporation. // Licensed under the MIT License. @@ -45343,15 +45540,14 @@ function getHeaderName() { async function userAgentPlatform_setPlatformSpecificData(map) { if (process && process.versions) { const osInfo = `${os.type()} ${os.release()}; ${os.arch()}`; - const versions = process.versions; - if (versions.bun) { - map.set("Bun", `${versions.bun} (${osInfo})`); + if (process.versions.bun) { + map.set("Bun", `${process.versions.bun} (${osInfo})`); } - else if (versions.deno) { - map.set("Deno", `${versions.deno} (${osInfo})`); + else if (process.versions.deno) { + map.set("Deno", `${process.versions.deno} (${osInfo})`); } - else if (versions.node) { - map.set("Node", `${versions.node} (${osInfo})`); + else if (process.versions.node) { + map.set("Node", `${process.versions.node} (${osInfo})`); } } } @@ -45361,6 +45557,7 @@ async function userAgentPlatform_setPlatformSpecificData(map) { // Licensed under the MIT License. + function getUserAgentString(telemetryInfo) { const parts = []; for (const [key, value] of telemetryInfo) { @@ -45658,7 +45855,7 @@ function isSystemError(err) { ;// CONCATENATED MODULE: ./node_modules/@typespec/ts-http-runtime/dist/esm/constants.js // Copyright (c) Microsoft Corporation. // Licensed under the MIT License. -const constants_SDK_VERSION = "0.3.4"; +const constants_SDK_VERSION = "0.3.6"; const constants_DEFAULT_RETRY_POLICY_COUNT = 3; //# sourceMappingURL=constants.js.map ;// CONCATENATED MODULE: ./node_modules/@typespec/ts-http-runtime/dist/esm/policies/retryPolicy.js @@ -45668,6 +45865,7 @@ const constants_DEFAULT_RETRY_POLICY_COUNT = 3; + const retryPolicyLogger = createClientLogger("ts-http-runtime retryPolicy"); /** * The programmatic identifier of the retryPolicy. @@ -45698,11 +45896,11 @@ function retryPolicy_retryPolicy(strategies, options = { maxRetries: constants_D // RestErrors are valid targets for the retry strategies. // If none of the retry strategies can work with them, they will be thrown later in this policy. // If the received error is not a RestError, it is immediately thrown. - responseError = e; - if (!e || responseError.name !== "RestError") { + if (!restError_isRestError(e)) { throw e; } - response = responseError.response; + responseError = e; + response = e.response; } if (request.abortSignal?.aborted) { logger.error(`Retry ${retryCount}: Request aborted.`); @@ -45814,48 +46012,33 @@ function bytesEncoding_stringToUint8Array(value, format) { return Buffer.from(value, format); } //# sourceMappingURL=bytesEncoding.js.map -;// CONCATENATED MODULE: ./node_modules/@typespec/ts-http-runtime/dist/esm/util/checkEnvironment.js +;// CONCATENATED MODULE: ./node_modules/@typespec/ts-http-runtime/dist/esm/formData.js // Copyright (c) Microsoft Corporation. // Licensed under the MIT License. /** - * A constant that indicates whether the environment the code is running is a Web Browser. - */ -// eslint-disable-next-line @azure/azure-sdk/ts-no-window -const isBrowser = typeof window !== "undefined" && typeof window.document !== "undefined"; -/** - * A constant that indicates whether the environment the code is running is a Web Worker. - */ -const isWebWorker = typeof self === "object" && - typeof self?.importScripts === "function" && - (self.constructor?.name === "DedicatedWorkerGlobalScope" || - self.constructor?.name === "ServiceWorkerGlobalScope" || - self.constructor?.name === "SharedWorkerGlobalScope"); -/** - * A constant that indicates whether the environment the code is running is Deno. - */ -const isDeno = typeof Deno !== "undefined" && - typeof Deno.version !== "undefined" && - typeof Deno.version.deno !== "undefined"; -/** - * A constant that indicates whether the environment the code is running is Bun.sh. - */ -const isBun = typeof Bun !== "undefined" && typeof Bun.version !== "undefined"; -/** - * A constant that indicates whether the environment the code is running is a Node.js compatible environment. - */ -const checkEnvironment_isNodeLike = typeof globalThis.process !== "undefined" && - Boolean(globalThis.process.version) && - Boolean(globalThis.process.versions?.node); -/** - * A constant that indicates whether the environment the code is running is Node.JS. - */ -const isNodeRuntime = checkEnvironment_isNodeLike && !isBun && !isDeno; -/** - * A constant that indicates whether the environment the code is running is in React-Native. + * If the request body is a native FormData, convert it to our FormDataMap + * representation and clear the body. Node.js's HTTP stack doesn't handle + * FormData natively, so the pipeline must serialize it later. + * + * @internal */ -// https://github.com/facebook/react-native/blob/main/packages/react-native/Libraries/Core/setUpNavigator.js -const isReactNative = typeof navigator !== "undefined" && navigator?.product === "ReactNative"; -//# sourceMappingURL=checkEnvironment.js.map +function convertBodyToFormDataMap(body) { + if (typeof FormData !== "undefined" && body instanceof FormData) { + const formDataMap = {}; + for (const [key, value] of body.entries()) { + const existing = formDataMap[key]; + if (Array.isArray(existing)) { + existing.push(value); + } + else { + formDataMap[key] = existing !== undefined ? [existing, value] : [value]; + } + } + return formDataMap; + } + return undefined; +} +//# sourceMappingURL=formData.js.map ;// CONCATENATED MODULE: ./node_modules/@typespec/ts-http-runtime/dist/esm/policies/formDataPolicy.js // Copyright (c) Microsoft Corporation. // Licensed under the MIT License. @@ -45866,14 +46049,6 @@ const isReactNative = typeof navigator !== "undefined" && navigator?.product === * The programmatic identifier of the formDataPolicy. */ const formDataPolicyName = "formDataPolicy"; -function formDataToFormDataMap(formData) { - const formDataMap = {}; - for (const [key, value] of formData.entries()) { - formDataMap[key] ??= []; - formDataMap[key].push(value); - } - return formDataMap; -} /** * A policy that encodes FormData on the request into the body. */ @@ -45881,8 +46056,9 @@ function formDataPolicy_formDataPolicy() { return { name: formDataPolicyName, async sendRequest(request, next) { - if (checkEnvironment_isNodeLike && typeof FormData !== "undefined" && request.body instanceof FormData) { - request.formData = formDataToFormDataMap(request.body); + const converted = convertBodyToFormDataMap(request.body); + if (converted) { + request.formData = converted; request.body = undefined; } if (request.formData) { @@ -46103,16 +46279,15 @@ function setProxyAgentOnRequest(request, cachedAgents, proxyUrl) { if (request.tlsSettings) { log_logger.warning("TLS settings are not supported in combination with custom Proxy, certificates provided to the client will be ignored."); } - const headers = request.headers.toJSON(); if (isInsecure) { if (!cachedAgents.httpProxyAgent) { - cachedAgents.httpProxyAgent = new http_proxy_agent_dist.HttpProxyAgent(proxyUrl, { headers }); + cachedAgents.httpProxyAgent = new http_proxy_agent_dist.HttpProxyAgent(proxyUrl); } request.agent = cachedAgents.httpProxyAgent; } else { if (!cachedAgents.httpsProxyAgent) { - cachedAgents.httpsProxyAgent = new dist.HttpsProxyAgent(proxyUrl, { headers }); + cachedAgents.httpsProxyAgent = new dist.HttpsProxyAgent(proxyUrl); } request.agent = cachedAgents.httpsProxyAgent; } @@ -46148,17 +46323,125 @@ function proxyPolicy_proxyPolicy(proxySettings, options) { }; } //# sourceMappingURL=proxyPolicy.js.map -;// CONCATENATED MODULE: ./node_modules/@typespec/ts-http-runtime/dist/esm/util/typeGuards.js +;// CONCATENATED MODULE: ./node_modules/@typespec/ts-http-runtime/dist/esm/policies/redirectPolicy.js // Copyright (c) Microsoft Corporation. // Licensed under the MIT License. -function isNodeReadableStream(x) { - return Boolean(x && typeof x["pipe"] === "function"); + +/** + * The programmatic identifier of the redirectPolicy. + */ +const redirectPolicyName = "redirectPolicy"; +/** + * Methods that are allowed to follow redirects 301 and 302 + */ +const allowedRedirect = ["GET", "HEAD"]; +/** + * A policy to follow Location headers from the server in order + * to support server-side redirection. + * In the browser, this policy is not used. + * @param options - Options to control policy behavior. + */ +function redirectPolicy_redirectPolicy(options = {}) { + const { maxRetries = 20, allowCrossOriginRedirects = false } = options; + return { + name: redirectPolicyName, + async sendRequest(request, next) { + const response = await next(request); + return handleRedirect(next, response, maxRetries, allowCrossOriginRedirects); + }, + }; } -function isWebReadableStream(x) { - return Boolean(x && - typeof x.getReader === "function" && - typeof x.tee === "function"); +async function handleRedirect(next, response, maxRetries, allowCrossOriginRedirects, currentRetries = 0) { + const { request, status, headers } = response; + const locationHeader = headers.get("location"); + if (locationHeader && + (status === 300 || + (status === 301 && allowedRedirect.includes(request.method)) || + (status === 302 && allowedRedirect.includes(request.method)) || + (status === 303 && request.method === "POST") || + status === 307) && + currentRetries < maxRetries) { + const url = new URL(locationHeader, request.url); + // Only follow redirects to the same origin by default. + if (!allowCrossOriginRedirects) { + const originalUrl = new URL(request.url); + if (url.origin !== originalUrl.origin) { + log_logger.verbose(`Skipping cross-origin redirect from ${originalUrl.origin} to ${url.origin}.`); + return response; + } + } + request.url = url.toString(); + // POST request with Status code 303 should be converted into a + // redirected GET request if the redirect url is present in the location header + if (status === 303) { + request.method = "GET"; + request.headers.delete("Content-Length"); + delete request.body; + } + request.headers.delete("Authorization"); + const res = await next(request); + return handleRedirect(next, res, maxRetries, allowCrossOriginRedirects, currentRetries + 1); + } + return response; +} +//# sourceMappingURL=redirectPolicy.js.map +;// CONCATENATED MODULE: ./node_modules/@typespec/ts-http-runtime/dist/esm/policies/platformPolicies.js +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + + + + + +/** + * Add platform-specific policies to the pipeline. + * + * On Node.js, this adds agent, TLS, proxy, decompression, and redirect + * policies. On browser and React Native these concerns are handled + * natively by the runtime, so this is a no-op. + * + * @internal + */ +function platformPolicies_addPlatformPolicies(pipeline, options) { + if (options.agent) { + pipeline.addPolicy(agentPolicy(options.agent)); + } + if (options.tlsOptions) { + pipeline.addPolicy(tlsPolicy(options.tlsOptions)); + } + pipeline.addPolicy(proxyPolicy(options.proxyOptions)); + pipeline.addPolicy(decompressResponsePolicy()); + // Both XHR and Fetch expect to handle redirects automatically, + // so this only takes effect on Node. + pipeline.addPolicy(redirectPolicy(options.redirectOptions), { afterPhase: "Retry" }); +} +//# sourceMappingURL=platformPolicies.js.map +;// CONCATENATED MODULE: ./node_modules/@typespec/ts-http-runtime/dist/esm/util/typeGuards-node.js +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +/** + * Checks if the given value is a Node.js readable stream. + * + * @internal + */ +function typeGuards_node_isNodeReadableStream(x) { + return x instanceof Readable; +} +/** + * Checks if the given value is a web ReadableStream. + * + * @internal + */ +function typeGuards_node_isWebReadableStream(x) { + return x instanceof ReadableStream; } +//# sourceMappingURL=typeGuards-node.js.map +;// CONCATENATED MODULE: ./node_modules/@typespec/ts-http-runtime/dist/esm/util/typeGuards.js +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + + function typeGuards_isBinaryBody(body) { return (body !== undefined && (body instanceof Uint8Array || @@ -46170,7 +46453,7 @@ function typeGuards_isReadableStream(x) { return isNodeReadableStream(x) || isWebReadableStream(x); } function typeGuards_isBlob(x) { - return typeof x.stream === "function"; + return x instanceof Blob; } //# sourceMappingURL=typeGuards.js.map ;// CONCATENATED MODULE: ./node_modules/@typespec/ts-http-runtime/dist/esm/util/concat.js @@ -46301,6 +46584,10 @@ async function buildRequestBody(request, parts, boundary) { if (contentLength) { request.headers.set("Content-Length", contentLength); } + // The public BodyPart.body type uses Uint8Array (= Uint8Array) for + // backward compatibility. Internally, concat requires Uint8Array to ensure + // SharedArrayBuffer-backed arrays don't flow into Blob construction. In practice, HTTP + // request bodies are always ArrayBuffer-backed, so this narrowing is safe. request.body = await concat(sources); } /** @@ -46365,27 +46652,13 @@ function multipartPolicy_multipartPolicy() { - - - - - /** * Create a new pipeline with a default set of customizable policies. * @param options - Options to configure a custom pipeline. */ function createPipelineFromOptions_createPipelineFromOptions(options) { const pipeline = createEmptyPipeline(); - if (isNodeLike) { - if (options.agent) { - pipeline.addPolicy(agentPolicy(options.agent)); - } - if (options.tlsOptions) { - pipeline.addPolicy(tlsPolicy(options.tlsOptions)); - } - pipeline.addPolicy(proxyPolicy(options.proxyOptions)); - pipeline.addPolicy(decompressResponsePolicy()); - } + addPlatformPolicies(pipeline, options); pipeline.addPolicy(formDataPolicy(), { beforePolicies: [multipartPolicyName] }); pipeline.addPolicy(userAgentPolicy(options.userAgentOptions)); // The multipart policy is added after policies with no phase, so that @@ -46393,11 +46666,6 @@ function createPipelineFromOptions_createPipelineFromOptions(options) { // properties (e.g., making the boundary constant in recorded tests). pipeline.addPolicy(multipartPolicy(), { afterPhase: "Deserialize" }); pipeline.addPolicy(defaultRetryPolicy(options.retryOptions), { phase: "Retry" }); - if (isNodeLike) { - // Both XHR and Fetch expect to handle redirects automatically, - // so only include this policy when we're in Node. - pipeline.addPolicy(redirectPolicy(options.redirectOptions), { afterPhase: "Retry" }); - } pipeline.addPolicy(logPolicy(options.loggingOptions), { afterPhase: "Sign" }); return pipeline; } @@ -46406,6 +46674,7 @@ function createPipelineFromOptions_createPipelineFromOptions(options) { // Copyright (c) Microsoft Corporation. // Licensed under the MIT License. + // Ensure the warining is only emitted once let insecureConnectionWarningEmmitted = false; /** @@ -46433,9 +46702,9 @@ function allowInsecureConnection(request, options) { function emitInsecureConnectionWarning() { const warning = "Sending token over insecure transport. Assume any token issued is compromised."; logger.warning(warning); - if (typeof process?.emitWarning === "function" && !insecureConnectionWarningEmmitted) { + if (!insecureConnectionWarningEmmitted) { insecureConnectionWarningEmmitted = true; - process.emitWarning(warning); + emitNodeWarning(warning); } } /** @@ -46793,9 +47062,14 @@ async function sendRequest_sendRequest(method, url, pipeline, options = {}, cust * @returns returns the content-type */ function getRequestContentType(options = {}) { - return (options.contentType ?? - options.headers?.["content-type"] ?? - getContentType(options.body)); + if (options.contentType) { + return options.contentType; + } + const headerContentType = options.headers?.["content-type"]; + if (typeof headerContentType === "string") { + return headerContentType; + } + return getContentType(options.body); } /** * Function to determine the content-type of a body @@ -46836,22 +47110,23 @@ function buildPipelineRequest(method, url, options = {}) { "content-type": requestContentType, }), }); - return createPipelineRequest({ + const { allowInsecureConnection, abortSignal, onUploadProgress, onDownloadProgress, timeout, responseAsStream, url: _url, method: _method, body: _body, multipartBody: _multiBody, headers: _headers, ...rest } = options; + const request = createPipelineRequest({ url, method, body, multipartBody, headers, - allowInsecureConnection: options.allowInsecureConnection, - abortSignal: options.abortSignal, - onUploadProgress: options.onUploadProgress, - onDownloadProgress: options.onDownloadProgress, - timeout: options.timeout, + allowInsecureConnection, + abortSignal, + onUploadProgress, + onDownloadProgress, + timeout, enableBrowserStreams: true, - streamResponseStatusCodes: options.responseAsStream - ? new Set([Number.POSITIVE_INFINITY]) - : undefined, + streamResponseStatusCodes: responseAsStream ? new Set([Number.POSITIVE_INFINITY]) : undefined, }); + Object.assign(request, rest); + return request; } /** * Prepares the body before sending the request @@ -46866,11 +47141,16 @@ function getRequestBody(body, contentType = "") { if (isBlob(body)) { return { body }; } - if (isReadableStream(body) || typeof body === "function") { + if (isReadableStream(body)) { return { body }; } + if (typeof body === "function") { + return { body: body }; + } if (ArrayBuffer.isView(body)) { - return { body: body instanceof Uint8Array ? body : JSON.stringify(body) }; + return { + body: body instanceof Uint8Array ? body : JSON.stringify(body), + }; } const firstType = contentType.split(";")[0]; switch (firstType) { @@ -47032,11 +47312,12 @@ function createRestError(messageOrResponse, response) { response: toPipelineResponse(resp), }); } -function toPipelineResponse(response) { +function toPipelineResponse(errorResponse) { return { - headers: createHttpHeaders(response.headers), - request: response.request, - status: statusCodeToNumber(response.status) ?? -1, + headers: createHttpHeaders(errorResponse.headers), + request: errorResponse.request, + status: statusCodeToNumber(errorResponse.status) ?? -1, + ...(typeof errorResponse.body === "string" ? { bodyAsText: errorResponse.body } : {}), }; } function statusCodeToNumber(statusCode) { @@ -47350,15 +47631,14 @@ function userAgentPlatform_getHeaderName() { async function util_userAgentPlatform_setPlatformSpecificData(map) { if (external_node_process_namespaceObject && external_node_process_namespaceObject.versions) { const osInfo = `${external_node_os_namespaceObject.type()} ${external_node_os_namespaceObject.release()}; ${external_node_os_namespaceObject.arch()}`; - const versions = external_node_process_namespaceObject.versions; - if (versions.bun) { - map.set("Bun", `${versions.bun} (${osInfo})`); + if (external_node_process_namespaceObject.versions.bun) { + map.set("Bun", `${external_node_process_namespaceObject.versions.bun} (${osInfo})`); } - else if (versions.deno) { - map.set("Deno", `${versions.deno} (${osInfo})`); + else if (external_node_process_namespaceObject.versions.deno) { + map.set("Deno", `${external_node_process_namespaceObject.versions.deno} (${osInfo})`); } - else if (versions.node) { - map.set("Node", `${versions.node} (${osInfo})`); + else if (external_node_process_namespaceObject.versions.node) { + map.set("Node", `${external_node_process_namespaceObject.versions.node} (${osInfo})`); } } } @@ -47366,7 +47646,7 @@ async function util_userAgentPlatform_setPlatformSpecificData(map) { ;// CONCATENATED MODULE: ./node_modules/@azure/core-rest-pipeline/dist/esm/constants.js // Copyright (c) Microsoft Corporation. // Licensed under the MIT License. -const esm_constants_SDK_VERSION = "1.22.3"; +const esm_constants_SDK_VERSION = "1.24.0"; const esm_constants_DEFAULT_RETRY_POLICY_COUNT = 3; //# sourceMappingURL=constants.js.map ;// CONCATENATED MODULE: ./node_modules/@azure/core-rest-pipeline/dist/esm/util/userAgent.js @@ -47427,6 +47707,230 @@ function policies_userAgentPolicy_userAgentPolicy(options = {}) { }; } //# sourceMappingURL=userAgentPolicy.js.map +;// CONCATENATED MODULE: ./node_modules/@azure/core-rest-pipeline/dist/esm/util/createFile.js +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +/** + * Create an object that implements the File interface. This object is intended to be + * passed into RequestBodyType.formData, and is not guaranteed to work as expected in + * other situations. + * + * Use this function to create a File object for use in RequestBodyType.formData in environments + * where the global File object is unavailable. + * + * @param content - the content of the file as a Uint8Array in memory. + * @param name - the name of the file. + * @param options - optional metadata about the file, e.g. file name, file size, MIME type. + */ +function createFile(content, name, options = {}) { + return createRawFile(content, name, options); +} +//# sourceMappingURL=createFile.js.map +;// CONCATENATED MODULE: ./node_modules/@azure/core-rest-pipeline/dist/esm/util/file.js +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. +function file_isNodeReadableStream(x) { + return typeof x === "object" && x !== null && "pipe" in x && typeof x.pipe === "function"; +} +const unimplementedMethods = { + arrayBuffer: () => { + throw new Error("Not implemented"); + }, + bytes: () => { + throw new Error("Not implemented"); + }, + slice: () => { + throw new Error("Not implemented"); + }, + text: () => { + throw new Error("Not implemented"); + }, +}; +/** + * Private symbol used as key on objects created using createFile containing the + * original source of the file object. + * + * This is used in Node to access the original Node stream without using Blob#stream, which + * returns a web stream. This is done to avoid a couple of bugs to do with Blob#stream and + * Readable#to/fromWeb in Node versions we support: + * - https://github.com/nodejs/node/issues/42694 (fixed in Node 18.14) + * - https://github.com/nodejs/node/issues/48916 (fixed in Node 20.6) + * + * Once these versions are no longer supported, we may be able to stop doing this. + * + * @internal + */ +const rawContent = Symbol("rawContent"); +/** + * Type guard to check if a given object is a blob-like object with a raw content property. + */ +function hasRawContent(x) { + return typeof x[rawContent] === "function"; +} +/** + * Extract the raw content from a given blob-like object. If the input was created using createFile + * or createFileFromStream, the exact content passed into createFile/createFileFromStream will be used. + * For true instances of Blob and File, returns the actual blob. + * + * @internal + */ +function getRawContent(blob) { + if (hasRawContent(blob)) { + return blob[rawContent](); + } + else { + return blob; + } +} +/** + * @internal + * + * Creates a File-like object tagged with rawContent for efficient streaming access. + * Used by the Node createFile to avoid Blob#stream() bugs. + */ +function file_createRawFile(content, name, options = {}) { + return { + ...unimplementedMethods, + type: options.type ?? "", + lastModified: options.lastModified ?? new Date().getTime(), + webkitRelativePath: options.webkitRelativePath ?? "", + size: content.byteLength, + name, + arrayBuffer: async () => toArrayBuffer(content).buffer, + stream: () => new Blob([toArrayBuffer(content)]).stream(), + [rawContent]: () => content, + }; +} +/** + * Create an object that implements the File interface. This object is intended to be + * passed into RequestBodyType.formData, and is not guaranteed to work as expected in + * other situations. + * + * Use this function to: + * - Create a File object for use in RequestBodyType.formData in environments where the + * global File object is unavailable. + * - Create a File-like object from a readable stream without reading the stream into memory. + * + * @param stream - the content of the file as a callback returning a stream. When a File object made using createFile is + * passed in a request's form data map, the stream will not be read into memory + * and instead will be streamed when the request is made. In the event of a retry, the + * stream needs to be read again, so this callback SHOULD return a fresh stream if possible. + * @param name - the name of the file. + * @param options - optional metadata about the file, e.g. file name, file size, MIME type. + */ +function createFileFromStream(stream, name, options = {}) { + return { + ...unimplementedMethods, + type: options.type ?? "", + lastModified: options.lastModified ?? new Date().getTime(), + webkitRelativePath: options.webkitRelativePath ?? "", + size: options.size ?? -1, + name, + stream: () => { + const s = stream(); + if (file_isNodeReadableStream(s)) { + throw new Error("Not supported: a Node stream was provided as input to createFileFromStream."); + } + return s; + }, + [rawContent]: stream, + }; +} + +function hasArrayBuffer(source) { + return "resize" in source.buffer; +} +function toArrayBuffer(source) { + if (hasArrayBuffer(source)) { + // ArrayBuffer — return a copy if the view is a subarray of a larger buffer + if (source.byteOffset !== 0 || source.byteLength !== source.buffer.byteLength) { + return new Uint8Array(source); + } + return source; + } + // SharedArrayBuffer + return source.map((x) => x); +} +//# sourceMappingURL=file.js.map +;// CONCATENATED MODULE: ./node_modules/@azure/core-rest-pipeline/dist/esm/policies/multipartPolicy.js +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + + +/** + * Name of multipart policy + */ +const policies_multipartPolicy_multipartPolicyName = multipartPolicy_multipartPolicyName; +/** + * Pipeline policy for multipart requests + */ +function policies_multipartPolicy_multipartPolicy() { + const tspPolicy = multipartPolicy_multipartPolicy(); + return { + name: policies_multipartPolicy_multipartPolicyName, + sendRequest: async (request, next) => { + if (request.multipartBody) { + for (const part of request.multipartBody.parts) { + if (hasRawContent(part.body)) { + part.body = getRawContent(part.body); + } + } + } + return tspPolicy.sendRequest(request, next); + }, + }; +} +//# sourceMappingURL=multipartPolicy.js.map +;// CONCATENATED MODULE: ./node_modules/@azure/core-rest-pipeline/dist/esm/policies/decompressResponsePolicy.js +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +/** + * The programmatic identifier of the decompressResponsePolicy. + */ +const decompressResponsePolicy_decompressResponsePolicyName = decompressResponsePolicyName; +/** + * A policy to enable response decompression according to Accept-Encoding header + * https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Accept-Encoding + */ +function policies_decompressResponsePolicy_decompressResponsePolicy() { + return decompressResponsePolicy_decompressResponsePolicy(); +} +//# sourceMappingURL=decompressResponsePolicy.js.map +;// CONCATENATED MODULE: ./node_modules/@azure/core-rest-pipeline/dist/esm/policies/defaultRetryPolicy.js +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +/** + * Name of the {@link defaultRetryPolicy} + */ +const defaultRetryPolicy_defaultRetryPolicyName = (/* unused pure expression or super */ null && (tspDefaultRetryPolicyName)); +/** + * A policy that retries according to three strategies: + * - When the server sends a 429 response with a Retry-After header. + * - When there are errors in the underlying transport layer (e.g. DNS lookup failures). + * - Or otherwise if the outgoing request fails, it will retry with an exponentially increasing delay. + */ +function policies_defaultRetryPolicy_defaultRetryPolicy(options = {}) { + return defaultRetryPolicy_defaultRetryPolicy(options); +} +//# sourceMappingURL=defaultRetryPolicy.js.map +;// CONCATENATED MODULE: ./node_modules/@azure/core-rest-pipeline/dist/esm/policies/formDataPolicy.js +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +/** + * The programmatic identifier of the formDataPolicy. + */ +const formDataPolicy_formDataPolicyName = (/* unused pure expression or super */ null && (tspFormDataPolicyName)); +/** + * A policy that encodes FormData on the request into the body. + */ +function policies_formDataPolicy_formDataPolicy() { + return formDataPolicy_formDataPolicy(); +} +//# sourceMappingURL=formDataPolicy.js.map // EXTERNAL MODULE: external "node:crypto" var external_node_crypto_ = __nccwpck_require__(7598); ;// CONCATENATED MODULE: ./node_modules/@typespec/ts-http-runtime/dist/esm/util/sha256.js @@ -47708,11 +48212,11 @@ const esm_isDeno = isDeno; * * Use `isNodeLike` instead. */ -const isNode = checkEnvironment_isNodeLike; +const isNode = env_isNodeLike; /** * A constant that indicates whether the environment the code is running is a Node.js compatible environment. */ -const esm_isNodeLike = checkEnvironment_isNodeLike; +const esm_isNodeLike = env_isNodeLike; /** * A constant that indicates whether the environment the code is running is Node.JS. */ @@ -47732,7 +48236,7 @@ const esm_isWebWorker = isWebWorker; * @returns a string of the encoded string */ function esm_uint8ArrayToString(bytes, format) { - return tspRuntime.uint8ArrayToString(bytes, format); + return bytesEncoding_uint8ArrayToString(bytes, format); } /** * The helper that transforms string to specific character encoded bytes array. @@ -47741,217 +48245,9 @@ function esm_uint8ArrayToString(bytes, format) { * @returns a uint8array */ function esm_stringToUint8Array(value, format) { - return tspRuntime.stringToUint8Array(value, format); + return bytesEncoding_stringToUint8Array(value, format); } //# sourceMappingURL=index.js.map -;// CONCATENATED MODULE: ./node_modules/@azure/core-rest-pipeline/dist/esm/util/file.js -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -function file_isNodeReadableStream(x) { - return Boolean(x && typeof x["pipe"] === "function"); -} -const unimplementedMethods = { - arrayBuffer: () => { - throw new Error("Not implemented"); - }, - bytes: () => { - throw new Error("Not implemented"); - }, - slice: () => { - throw new Error("Not implemented"); - }, - text: () => { - throw new Error("Not implemented"); - }, -}; -/** - * Private symbol used as key on objects created using createFile containing the - * original source of the file object. - * - * This is used in Node to access the original Node stream without using Blob#stream, which - * returns a web stream. This is done to avoid a couple of bugs to do with Blob#stream and - * Readable#to/fromWeb in Node versions we support: - * - https://github.com/nodejs/node/issues/42694 (fixed in Node 18.14) - * - https://github.com/nodejs/node/issues/48916 (fixed in Node 20.6) - * - * Once these versions are no longer supported, we may be able to stop doing this. - * - * @internal - */ -const rawContent = Symbol("rawContent"); -/** - * Type guard to check if a given object is a blob-like object with a raw content property. - */ -function hasRawContent(x) { - return typeof x[rawContent] === "function"; -} -/** - * Extract the raw content from a given blob-like object. If the input was created using createFile - * or createFileFromStream, the exact content passed into createFile/createFileFromStream will be used. - * For true instances of Blob and File, returns the actual blob. - * - * @internal - */ -function getRawContent(blob) { - if (hasRawContent(blob)) { - return blob[rawContent](); - } - else { - return blob; - } -} -/** - * Create an object that implements the File interface. This object is intended to be - * passed into RequestBodyType.formData, and is not guaranteed to work as expected in - * other situations. - * - * Use this function to: - * - Create a File object for use in RequestBodyType.formData in environments where the - * global File object is unavailable. - * - Create a File-like object from a readable stream without reading the stream into memory. - * - * @param stream - the content of the file as a callback returning a stream. When a File object made using createFile is - * passed in a request's form data map, the stream will not be read into memory - * and instead will be streamed when the request is made. In the event of a retry, the - * stream needs to be read again, so this callback SHOULD return a fresh stream if possible. - * @param name - the name of the file. - * @param options - optional metadata about the file, e.g. file name, file size, MIME type. - */ -function createFileFromStream(stream, name, options = {}) { - return { - ...unimplementedMethods, - type: options.type ?? "", - lastModified: options.lastModified ?? new Date().getTime(), - webkitRelativePath: options.webkitRelativePath ?? "", - size: options.size ?? -1, - name, - stream: () => { - const s = stream(); - if (file_isNodeReadableStream(s)) { - throw new Error("Not supported: a Node stream was provided as input to createFileFromStream."); - } - return s; - }, - [rawContent]: stream, - }; -} -/** - * Create an object that implements the File interface. This object is intended to be - * passed into RequestBodyType.formData, and is not guaranteed to work as expected in - * other situations. - * - * Use this function create a File object for use in RequestBodyType.formData in environments where the global File object is unavailable. - * - * @param content - the content of the file as a Uint8Array in memory. - * @param name - the name of the file. - * @param options - optional metadata about the file, e.g. file name, file size, MIME type. - */ -function createFile(content, name, options = {}) { - if (isNodeLike) { - return { - ...unimplementedMethods, - type: options.type ?? "", - lastModified: options.lastModified ?? new Date().getTime(), - webkitRelativePath: options.webkitRelativePath ?? "", - size: content.byteLength, - name, - arrayBuffer: async () => content.buffer, - stream: () => new Blob([toArrayBuffer(content)]).stream(), - [rawContent]: () => content, - }; - } - else { - return new File([toArrayBuffer(content)], name, options); - } -} -function toArrayBuffer(source) { - if ("resize" in source.buffer) { - // ArrayBuffer - return source; - } - // SharedArrayBuffer - return source.map((x) => x); -} -//# sourceMappingURL=file.js.map -;// CONCATENATED MODULE: ./node_modules/@azure/core-rest-pipeline/dist/esm/policies/multipartPolicy.js -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - - -/** - * Name of multipart policy - */ -const policies_multipartPolicy_multipartPolicyName = multipartPolicy_multipartPolicyName; -/** - * Pipeline policy for multipart requests - */ -function policies_multipartPolicy_multipartPolicy() { - const tspPolicy = multipartPolicy_multipartPolicy(); - return { - name: policies_multipartPolicy_multipartPolicyName, - sendRequest: async (request, next) => { - if (request.multipartBody) { - for (const part of request.multipartBody.parts) { - if (hasRawContent(part.body)) { - part.body = getRawContent(part.body); - } - } - } - return tspPolicy.sendRequest(request, next); - }, - }; -} -//# sourceMappingURL=multipartPolicy.js.map -;// CONCATENATED MODULE: ./node_modules/@azure/core-rest-pipeline/dist/esm/policies/decompressResponsePolicy.js -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -/** - * The programmatic identifier of the decompressResponsePolicy. - */ -const decompressResponsePolicy_decompressResponsePolicyName = decompressResponsePolicyName; -/** - * A policy to enable response decompression according to Accept-Encoding header - * https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Accept-Encoding - */ -function policies_decompressResponsePolicy_decompressResponsePolicy() { - return decompressResponsePolicy_decompressResponsePolicy(); -} -//# sourceMappingURL=decompressResponsePolicy.js.map -;// CONCATENATED MODULE: ./node_modules/@azure/core-rest-pipeline/dist/esm/policies/defaultRetryPolicy.js -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -/** - * Name of the {@link defaultRetryPolicy} - */ -const defaultRetryPolicy_defaultRetryPolicyName = (/* unused pure expression or super */ null && (tspDefaultRetryPolicyName)); -/** - * A policy that retries according to three strategies: - * - When the server sends a 429 response with a Retry-After header. - * - When there are errors in the underlying transport layer (e.g. DNS lookup failures). - * - Or otherwise if the outgoing request fails, it will retry with an exponentially increasing delay. - */ -function policies_defaultRetryPolicy_defaultRetryPolicy(options = {}) { - return defaultRetryPolicy_defaultRetryPolicy(options); -} -//# sourceMappingURL=defaultRetryPolicy.js.map -;// CONCATENATED MODULE: ./node_modules/@azure/core-rest-pipeline/dist/esm/policies/formDataPolicy.js -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -/** - * The programmatic identifier of the formDataPolicy. - */ -const formDataPolicy_formDataPolicyName = (/* unused pure expression or super */ null && (tspFormDataPolicyName)); -/** - * A policy that encodes FormData on the request into the body. - */ -function policies_formDataPolicy_formDataPolicy() { - return formDataPolicy_formDataPolicy(); -} -//# sourceMappingURL=formDataPolicy.js.map ;// CONCATENATED MODULE: ./node_modules/@azure/core-rest-pipeline/dist/esm/policies/proxyPolicy.js // Copyright (c) Microsoft Corporation. // Licensed under the MIT License. @@ -48410,7 +48706,9 @@ function wrapAbortSignalLike(abortSignalLike) { return { abortSignal: abortSignalLike }; } if (abortSignalLike.aborted) { - return { abortSignal: AbortSignal.abort(abortSignalLike.reason) }; + return { + abortSignal: AbortSignal.abort("reason" in abortSignalLike ? abortSignalLike.reason : undefined), + }; } const controller = new AbortController(); let needsCleanup = true; @@ -48421,7 +48719,7 @@ function wrapAbortSignalLike(abortSignalLike) { } } function listener() { - controller.abort(abortSignalLike.reason); + controller.abort("reason" in abortSignalLike ? abortSignalLike.reason : undefined); cleanup(); } abortSignalLike.addEventListener("abort", listener); @@ -48731,13 +49029,16 @@ function tokenCycler_createTokenCycler(credential, tokenCyclerOptions) { * window and not already refreshing) */ get shouldRefresh() { + if (token === null) { + return true; + } if (cycler.isRefreshing) { return false; } - if (token?.refreshAfterTimestamp && token.refreshAfterTimestamp < Date.now()) { + if (token.refreshAfterTimestamp && token.refreshAfterTimestamp < Date.now()) { return true; } - return (token?.expiresOnTimestamp ?? 0) - options.refreshWindowInMs < Date.now(); + return token.expiresOnTimestamp - options.refreshWindowInMs < Date.now(); }, /** * Produces true if the cycler MUST refresh (null or nearly-expired @@ -48968,7 +49269,7 @@ function bearerTokenAuthenticationPolicy(options) { } // If we get another CAE Claim, we will handle it by default and return whatever value we receive for this if (isChallengeResponse(response)) { - claims = getCaeChallengeClaims(response.headers.get("WWW-Authenticate")); + claims = getCaeChallengeClaims(response.headers.get("WWW-Authenticate") ?? ""); if (claims) { let parsedClaim; try { @@ -49334,22 +49635,22 @@ function pipelineContainsDisableKeepAlivePolicy(pipeline) { ;// CONCATENATED MODULE: ./node_modules/@azure/core-client/dist/esm/base64.js // Copyright (c) Microsoft Corporation. // Licensed under the MIT License. + /** * Encodes a string in base64 format. * @param value - the string to encode * @internal */ function encodeString(value) { - return Buffer.from(value).toString("base64"); + return uint8ArrayToString(stringToUint8Array(value, "utf-8"), "base64"); } /** * Encodes a byte array in base64 format. - * @param value - the Uint8Aray to encode + * @param value - the Uint8Array to encode * @internal */ function encodeByteArray(value) { - const bufferValue = value instanceof Buffer ? value : Buffer.from(value.buffer); - return bufferValue.toString("base64"); + return esm_uint8ArrayToString(value, "base64"); } /** * Decodes a base64 string into a byte array. @@ -49357,7 +49658,7 @@ function encodeByteArray(value) { * @internal */ function decodeString(value) { - return Buffer.from(value, "base64"); + return esm_stringToUint8Array(value, "base64"); } /** * Decodes a base64 string into a string. @@ -49365,7 +49666,7 @@ function decodeString(value) { * @internal */ function base64_decodeStringToString(value) { - return Buffer.from(value, "base64").toString(); + return uint8ArrayToString(stringToUint8Array(value, "base64"), "utf-8"); } //# sourceMappingURL=base64.js.map ;// CONCATENATED MODULE: ./node_modules/@azure/core-client/dist/esm/interfaces.js @@ -49947,8 +50248,8 @@ function serializeSequenceType(serializer, mapper, object, objectName, isXml, op } let elementType = mapper.type.element; if (!elementType || typeof elementType !== "object") { - throw new Error(`element" metadata for an Array must be defined in the ` + - `mapper and it must of type "object" in ${objectName}.`); + throw new Error(`"element" metadata for an Array must be defined in the ` + + `mapper and it must be of type "object" in ${objectName}.`); } // Quirk: Composite mappers referenced by `element` might // not have *all* properties declared (like uberParent), @@ -50127,10 +50428,15 @@ function serializeCompositeType(serializer, mapper, object, objectName, isXml, o const additionalPropertiesMapper = resolveAdditionalProperties(serializer, mapper, objectName); if (additionalPropertiesMapper) { const propNames = Object.keys(modelProps); - for (const clientPropName in object) { + for (const clientPropName of Object.keys(object)) { const isAdditionalProperty = propNames.every((pn) => pn !== clientPropName); if (isAdditionalProperty) { - payload[clientPropName] = serializer.serialize(additionalPropertiesMapper, object[clientPropName], objectName + '["' + clientPropName + '"]', options); + Object.defineProperty(payload, clientPropName, { + value: serializer.serialize(additionalPropertiesMapper, object[clientPropName], objectName + '["' + clientPropName + '"]', options), + enumerable: true, + configurable: true, + writable: true, + }); } } } @@ -50225,7 +50531,12 @@ function deserializeCompositeType(serializer, mapper, responseBody, objectName, */ const wrapped = responseBody[xmlName]; const elementList = wrapped?.[xmlElementName] ?? []; - instance[key] = serializer.deserialize(propertyMapper, elementList, propertyObjectName, options); + Object.defineProperty(instance, key, { + value: serializer.deserialize(propertyMapper, elementList, propertyObjectName, options), + enumerable: true, + configurable: true, + writable: true, + }); handledPropertyNames.push(xmlName); } else { @@ -50290,7 +50601,7 @@ function deserializeCompositeType(serializer, mapper, responseBody, objectName, const additionalPropertiesMapper = mapper.type.additionalProperties; if (additionalPropertiesMapper) { const isAdditionalProperty = (responsePropName) => { - for (const clientPropName in modelProps) { + for (const clientPropName of Object.keys(modelProps)) { const paths = splitSerializeName(modelProps[clientPropName].serializedName); if (paths[0] === responsePropName) { return false; @@ -50298,9 +50609,15 @@ function deserializeCompositeType(serializer, mapper, responseBody, objectName, } return true; }; - for (const responsePropName in responseBody) { + for (const responsePropName of Object.keys(responseBody)) { if (isAdditionalProperty(responsePropName)) { - instance[responsePropName] = serializer.deserialize(additionalPropertiesMapper, responseBody[responsePropName], objectName + '["' + responsePropName + '"]', options); + const deserializedValue = serializer.deserialize(additionalPropertiesMapper, responseBody[responsePropName], objectName + '["' + responsePropName + '"]', options); + Object.defineProperty(instance, responsePropName, { + value: deserializedValue, + enumerable: true, + configurable: true, + writable: true, + }); } } } @@ -50309,7 +50626,12 @@ function deserializeCompositeType(serializer, mapper, responseBody, objectName, if (instance[key] === undefined && !handledPropertyNames.includes(key) && !isSpecialXmlProperty(key, options)) { - instance[key] = responseBody[key]; + Object.defineProperty(instance, key, { + value: responseBody[key], + enumerable: true, + configurable: true, + writable: true, + }); } } } @@ -50334,8 +50656,8 @@ function deserializeDictionaryType(serializer, mapper, responseBody, objectName, function deserializeSequenceType(serializer, mapper, responseBody, objectName, options) { let element = mapper.type.element; if (!element || typeof element !== "object") { - throw new Error(`element" metadata for an Array must be defined in the ` + - `mapper and it must of type "object" in ${objectName}`); + throw new Error(`"element" metadata for an Array must be defined in the ` + + `mapper and it must be of type "object" in ${objectName}`); } if (responseBody) { if (!Array.isArray(responseBody)) { @@ -50431,8 +50753,8 @@ const MapperTypeNames = { UnixTime: "UnixTime", }; //# sourceMappingURL=serializer.js.map -// EXTERNAL MODULE: ./node_modules/@azure/core-client/dist/commonjs/state.js -var dist_commonjs_state = __nccwpck_require__(3345); +// EXTERNAL MODULE: ./node_modules/@azure/core-client/dist/commonjs/state-cjs.js +var state_cjs = __nccwpck_require__(30); ;// CONCATENATED MODULE: ./node_modules/@azure/core-client/dist/esm/state.js // Copyright (c) Microsoft Corporation. // Licensed under the MIT License. @@ -50442,7 +50764,7 @@ var dist_commonjs_state = __nccwpck_require__(3345); /** * Defines the shared state between CJS and ESM by re-exporting the CJS state. */ -const esm_state_state = dist_commonjs_state/* state */.w; +const esm_state_state = state_cjs/* state */.w; //# sourceMappingURL=state.js.map ;// CONCATENATED MODULE: ./node_modules/@azure/core-client/dist/esm/operationHelpers.js // Copyright (c) Microsoft Corporation. @@ -50487,9 +50809,8 @@ function getOperationArgumentValueFromParameter(operationArguments, parameter, f if (parameterMapper.required) { value = {}; } - for (const propertyName in parameterPath) { + for (const [propertyName, propertyPath] of Object.entries(parameterPath)) { const propertyMapper = parameterMapper.type.modelProperties[propertyName]; - const propertyPath = parameterPath[propertyName]; const propertyValue = getOperationArgumentValueFromParameter(operationArguments, { parameterPath: propertyPath, mapper: propertyMapper, @@ -50498,7 +50819,12 @@ function getOperationArgumentValueFromParameter(operationArguments, parameter, f if (!value) { value = {}; } - value[propertyName] = propertyValue; + Object.defineProperty(value, propertyName, { + value: propertyValue, + enumerable: true, + configurable: true, + writable: true, + }); } } } @@ -50780,8 +51106,7 @@ async function parse(jsonContentTypes, xmlContentTypes, operationResponse, opts, */ function getStreamingResponseStatusCodes(operationSpec) { const result = new Set(); - for (const statusCode in operationSpec.responses) { - const operationResponse = operationSpec.responses[statusCode]; + for (const [statusCode, operationResponse] of Object.entries(operationSpec.responses)) { if (operationResponse.bodyMapper && operationResponse.bodyMapper.type.name === MapperTypeNames.Stream) { result.add(Number(statusCode)); @@ -50829,7 +51154,7 @@ function serializationPolicy(options = {}) { const stringifyXML = options.stringifyXML; return { name: serializationPolicyName, - async sendRequest(request, next) { + sendRequest(request, next) { const operationInfo = getOperationRequestInfo(request); const operationSpec = operationInfo?.operationSpec; const operationArguments = operationInfo?.operationArguments; @@ -51095,7 +51420,8 @@ function appendPath(url, pathToAppend) { else { newPath = newPath + pathToAppend; } - parsedUrl.pathname = newPath; + // Use Object.assign to bypass react-native's incorrect readonly URL.pathname declaration + Object.assign(parsedUrl, { pathname: newPath }); return parsedUrl.toString(); } function calculateQueryParameters(operationSpec, operationArguments, fallbackObject) { @@ -51305,7 +51631,7 @@ class ServiceClient { /** * Send the provided httpRequest. */ - async sendRequest(request) { + sendRequest(request) { return this.pipeline.sendRequest(this._httpClient, request); } /** @@ -51408,7 +51734,7 @@ function getCredentialScopes(options) { if (options.baseUri) { return `${options.baseUri}/.default`; } - if (options.credential && !options.credentialScopes) { + if (options.credential) { throw new Error(`When using credentials, the ServiceClientOptions must contain either a endpoint or a credentialScopes. Unable to create a bearerTokenAuthenticationPolicy`); } return undefined; @@ -51559,8 +51885,7 @@ function buildScopes(challengeOptions, challengeInfo) { return challengeOptions.scopes; } const challengeScopes = new URL(challengeInfo.resource_id); - challengeScopes.pathname = Constants.DefaultScope; - let scope = challengeScopes.toString(); + let scope = new URL(Constants.DefaultScope, challengeScopes.origin).toString(); if (scope === "https://disk.azure.com/.default") { // the extra slash is required by the service scope = "https://disk.azure.com//.default"; @@ -52084,6 +52409,7 @@ function convertHttpClient(requestPolicyClient) { + //# sourceMappingURL=index.js.map ;// CONCATENATED MODULE: ./node_modules/path-expression-matcher/src/Expression.js /** @@ -52103,11 +52429,11 @@ class Expression { * @param {Object} options - Configuration options * @param {string} options.separator - Path separator (default: '.') */ - constructor(pattern, options = {}) { + constructor(pattern, options = {}, data) { this.pattern = pattern; this.separator = options.separator || '.'; this.segments = this._parse(pattern); - + this.data = data; // Cache expensive checks for performance (O(1) instead of O(n)) this._hasDeepWildcard = this.segments.some(seg => seg.type === 'deep-wildcard'); this._hasAttributeCondition = this.segments.some(seg => seg.attrName !== undefined); @@ -52319,57 +52645,206 @@ class Expression { } } ;// CONCATENATED MODULE: ./node_modules/path-expression-matcher/src/Matcher.js + + /** - * Matcher - Tracks current path in XML/JSON tree and matches against Expressions - * + * MatcherView - A lightweight read-only view over a Matcher's internal state. + * + * Created once by Matcher and reused across all callbacks. Holds a direct + * reference to the parent Matcher so it always reflects current parser state + * with zero copying or freezing overhead. + * + * Users receive this via {@link Matcher#readOnly} or directly from parser + * callbacks. It exposes all query and matching methods but has no mutation + * methods — misuse is caught at the TypeScript level rather than at runtime. + * + * @example + * const matcher = new Matcher(); + * const view = matcher.readOnly(); + * + * matcher.push("root", {}); + * view.getCurrentTag(); // "root" + * view.getDepth(); // 1 + */ +class MatcherView { + /** + * @param {Matcher} matcher - The parent Matcher instance to read from. + */ + constructor(matcher) { + this._matcher = matcher; + } + + /** + * Get the path separator used by the parent matcher. + * @returns {string} + */ + get separator() { + return this._matcher.separator; + } + + /** + * Get current tag name. + * @returns {string|undefined} + */ + getCurrentTag() { + const path = this._matcher.path; + return path.length > 0 ? path[path.length - 1].tag : undefined; + } + + /** + * Get current namespace. + * @returns {string|undefined} + */ + getCurrentNamespace() { + const path = this._matcher.path; + return path.length > 0 ? path[path.length - 1].namespace : undefined; + } + + /** + * Get current node's attribute value. + * @param {string} attrName + * @returns {*} + */ + getAttrValue(attrName) { + const path = this._matcher.path; + if (path.length === 0) return undefined; + return path[path.length - 1].values?.[attrName]; + } + + /** + * Check if current node has an attribute. + * @param {string} attrName + * @returns {boolean} + */ + hasAttr(attrName) { + const path = this._matcher.path; + if (path.length === 0) return false; + const current = path[path.length - 1]; + return current.values !== undefined && attrName in current.values; + } + + /** + * Get current node's sibling position (child index in parent). + * @returns {number} + */ + getPosition() { + const path = this._matcher.path; + if (path.length === 0) return -1; + return path[path.length - 1].position ?? 0; + } + + /** + * Get current node's repeat counter (occurrence count of this tag name). + * @returns {number} + */ + getCounter() { + const path = this._matcher.path; + if (path.length === 0) return -1; + return path[path.length - 1].counter ?? 0; + } + + /** + * Get current node's sibling index (alias for getPosition). + * @returns {number} + * @deprecated Use getPosition() or getCounter() instead + */ + getIndex() { + return this.getPosition(); + } + + /** + * Get current path depth. + * @returns {number} + */ + getDepth() { + return this._matcher.path.length; + } + + /** + * Get path as string. + * @param {string} [separator] - Optional separator (uses default if not provided) + * @param {boolean} [includeNamespace=true] + * @returns {string} + */ + toString(separator, includeNamespace = true) { + return this._matcher.toString(separator, includeNamespace); + } + + /** + * Get path as array of tag names. + * @returns {string[]} + */ + toArray() { + return this._matcher.path.map(n => n.tag); + } + + /** + * Match current path against an Expression. + * @param {Expression} expression + * @returns {boolean} + */ + matches(expression) { + return this._matcher.matches(expression); + } + + /** + * Match any expression in the given set against the current path. + * @param {ExpressionSet} exprSet + * @returns {boolean} + */ + matchesAny(exprSet) { + return exprSet.matchesAny(this._matcher); + } +} + +/** + * Matcher - Tracks current path in XML/JSON tree and matches against Expressions. + * * The matcher maintains a stack of nodes representing the current path from root to * current tag. It only stores attribute values for the current (top) node to minimize * memory usage. Sibling tracking is used to auto-calculate position and counter. - * + * + * Use {@link Matcher#readOnly} to obtain a {@link MatcherView} safe to pass to + * user callbacks — it always reflects current state with no Proxy overhead. + * * @example * const matcher = new Matcher(); * matcher.push("root", {}); * matcher.push("users", {}); * matcher.push("user", { id: "123", type: "admin" }); - * + * * const expr = new Expression("root.users.user"); * matcher.matches(expr); // true */ - -/** - * Names of methods that mutate Matcher state. - * Any attempt to call these on a read-only view throws a TypeError. - * @type {Set} - */ -const MUTATING_METHODS = new Set(['push', 'pop', 'reset', 'updateCurrent', 'restore']); - class Matcher { /** - * Create a new Matcher - * @param {Object} options - Configuration options - * @param {string} options.separator - Default path separator (default: '.') + * Create a new Matcher. + * @param {Object} [options={}] + * @param {string} [options.separator='.'] - Default path separator */ constructor(options = {}) { this.separator = options.separator || '.'; this.path = []; this.siblingStacks = []; - // Each path node: { tag: string, values: object, position: number, counter: number } + // Each path node: { tag, values, position, counter, namespace? } // values only present for current (last) node // Each siblingStacks entry: Map tracking occurrences at each level + this._pathStringCache = null; + this._view = new MatcherView(this); } /** - * Push a new tag onto the path - * @param {string} tagName - Name of the tag - * @param {Object} attrValues - Attribute key-value pairs for current node (optional) - * @param {string} namespace - Namespace for the tag (optional) + * Push a new tag onto the path. + * @param {string} tagName + * @param {Object|null} [attrValues=null] + * @param {string|null} [namespace=null] */ push(tagName, attrValues = null, namespace = null) { - this._pathStringCache = null; // invalidate + this._pathStringCache = null; + // Remove values from previous current node (now becoming ancestor) if (this.path.length > 0) { - const prev = this.path[this.path.length - 1]; - prev.values = undefined; + this.path[this.path.length - 1].values = undefined; } // Get or create sibling tracking for current level @@ -52402,12 +52877,10 @@ class Matcher { counter: counter }; - // Store namespace if provided if (namespace !== null && namespace !== undefined) { node.namespace = namespace; } - // Store values only for current node if (attrValues !== null && attrValues !== undefined) { node.values = attrValues; } @@ -52416,19 +52889,15 @@ class Matcher { } /** - * Pop the last tag from the path + * Pop the last tag from the path. * @returns {Object|undefined} The popped node */ pop() { - if (this.path.length === 0) { - return undefined; - } - this._pathStringCache = null; // invalidate + if (this.path.length === 0) return undefined; + this._pathStringCache = null; + const node = this.path.pop(); - // Clean up sibling tracking for levels deeper than current - // After pop, path.length is the new depth - // We need to clean up siblingStacks[path.length + 1] and beyond if (this.siblingStacks.length > this.path.length + 1) { this.siblingStacks.length = this.path.length + 1; } @@ -52437,9 +52906,9 @@ class Matcher { } /** - * Update current node's attribute values - * Useful when attributes are parsed after push - * @param {Object} attrValues - Attribute values + * Update current node's attribute values. + * Useful when attributes are parsed after push. + * @param {Object} attrValues */ updateCurrent(attrValues) { if (this.path.length > 0) { @@ -52451,7 +52920,7 @@ class Matcher { } /** - * Get current tag name + * Get current tag name. * @returns {string|undefined} */ getCurrentTag() { @@ -52459,7 +52928,7 @@ class Matcher { } /** - * Get current namespace + * Get current namespace. * @returns {string|undefined} */ getCurrentNamespace() { @@ -52467,19 +52936,18 @@ class Matcher { } /** - * Get current node's attribute value - * @param {string} attrName - Attribute name - * @returns {*} Attribute value or undefined + * Get current node's attribute value. + * @param {string} attrName + * @returns {*} */ getAttrValue(attrName) { if (this.path.length === 0) return undefined; - const current = this.path[this.path.length - 1]; - return current.values?.[attrName]; + return this.path[this.path.length - 1].values?.[attrName]; } /** - * Check if current node has an attribute - * @param {string} attrName - Attribute name + * Check if current node has an attribute. + * @param {string} attrName * @returns {boolean} */ hasAttr(attrName) { @@ -52489,7 +52957,7 @@ class Matcher { } /** - * Get current node's sibling position (child index in parent) + * Get current node's sibling position (child index in parent). * @returns {number} */ getPosition() { @@ -52498,7 +52966,7 @@ class Matcher { } /** - * Get current node's repeat counter (occurrence count of this tag name) + * Get current node's repeat counter (occurrence count of this tag name). * @returns {number} */ getCounter() { @@ -52507,7 +52975,7 @@ class Matcher { } /** - * Get current node's sibling index (alias for getPosition for backward compatibility) + * Get current node's sibling index (alias for getPosition). * @returns {number} * @deprecated Use getPosition() or getCounter() instead */ @@ -52516,7 +52984,7 @@ class Matcher { } /** - * Get current path depth + * Get current path depth. * @returns {number} */ getDepth() { @@ -52524,9 +52992,9 @@ class Matcher { } /** - * Get path as string - * @param {string} separator - Optional separator (uses default if not provided) - * @param {boolean} includeNamespace - Whether to include namespace in output (default: true) + * Get path as string. + * @param {string} [separator] - Optional separator (uses default if not provided) + * @param {boolean} [includeNamespace=true] * @returns {string} */ toString(separator, includeNamespace = true) { @@ -52534,24 +53002,23 @@ class Matcher { const isDefault = (sep === this.separator && includeNamespace === true); if (isDefault) { - if (this._pathStringCache !== null && this._pathStringCache !== undefined) { + if (this._pathStringCache !== null) { return this._pathStringCache; } const result = this.path.map(n => - (includeNamespace && n.namespace) ? `${n.namespace}:${n.tag}` : n.tag + (n.namespace) ? `${n.namespace}:${n.tag}` : n.tag ).join(sep); this._pathStringCache = result; return result; } - // Non-default separator or includeNamespace=false: don't cache (rare case) return this.path.map(n => (includeNamespace && n.namespace) ? `${n.namespace}:${n.tag}` : n.tag ).join(sep); } /** - * Get path as array of tag names + * Get path as array of tag names. * @returns {string[]} */ toArray() { @@ -52559,18 +53026,18 @@ class Matcher { } /** - * Reset the path to empty + * Reset the path to empty. */ reset() { - this._pathStringCache = null; // invalidate + this._pathStringCache = null; this.path = []; this.siblingStacks = []; } /** - * Match current path against an Expression - * @param {Expression} expression - The expression to match against - * @returns {boolean} True if current path matches the expression + * Match current path against an Expression. + * @param {Expression} expression + * @returns {boolean} */ matches(expression) { const segments = expression.segments; @@ -52579,32 +53046,23 @@ class Matcher { return false; } - // Handle deep wildcard patterns if (expression.hasDeepWildcard()) { return this._matchWithDeepWildcard(segments); } - // Simple path matching (no deep wildcards) return this._matchSimple(segments); } /** - * Match simple path (no deep wildcards) * @private */ _matchSimple(segments) { - // Path must be same length as segments if (this.path.length !== segments.length) { return false; } - // Match each segment bottom-to-top for (let i = 0; i < segments.length; i++) { - const segment = segments[i]; - const node = this.path[i]; - const isCurrentNode = (i === this.path.length - 1); - - if (!this._matchSegment(segment, node, isCurrentNode)) { + if (!this._matchSegment(segments[i], this.path[i], i === this.path.length - 1)) { return false; } } @@ -52613,32 +53071,27 @@ class Matcher { } /** - * Match path with deep wildcards * @private */ _matchWithDeepWildcard(segments) { - let pathIdx = this.path.length - 1; // Start from current node (bottom) - let segIdx = segments.length - 1; // Start from last segment + let pathIdx = this.path.length - 1; + let segIdx = segments.length - 1; while (segIdx >= 0 && pathIdx >= 0) { const segment = segments[segIdx]; if (segment.type === 'deep-wildcard') { - // ".." matches zero or more levels segIdx--; if (segIdx < 0) { - // Pattern ends with "..", always matches return true; } - // Find where next segment matches in the path const nextSeg = segments[segIdx]; let found = false; for (let i = pathIdx; i >= 0; i--) { - const isCurrentNode = (i === this.path.length - 1); - if (this._matchSegment(nextSeg, this.path[i], isCurrentNode)) { + if (this._matchSegment(nextSeg, this.path[i], i === this.path.length - 1)) { pathIdx = i - 1; segIdx--; found = true; @@ -52650,9 +53103,7 @@ class Matcher { return false; } } else { - // Regular segment - const isCurrentNode = (pathIdx === this.path.length - 1); - if (!this._matchSegment(segment, this.path[pathIdx], isCurrentNode)) { + if (!this._matchSegment(segment, this.path[pathIdx], pathIdx === this.path.length - 1)) { return false; } pathIdx--; @@ -52660,38 +53111,25 @@ class Matcher { } } - // All segments must be consumed return segIdx < 0; } /** - * Match a single segment against a node * @private - * @param {Object} segment - Segment from Expression - * @param {Object} node - Node from path - * @param {boolean} isCurrentNode - Whether this is the current (last) node - * @returns {boolean} */ _matchSegment(segment, node, isCurrentNode) { - // Match tag name (* is wildcard) if (segment.tag !== '*' && segment.tag !== node.tag) { return false; } - // Match namespace if specified in segment if (segment.namespace !== undefined) { - // Segment has namespace - node must match it if (segment.namespace !== '*' && segment.namespace !== node.namespace) { return false; } } - // If segment has no namespace, it matches nodes with or without namespace - // Match attribute name (check if node has this attribute) - // Can only check for current node since ancestors don't have values if (segment.attrName !== undefined) { if (!isCurrentNode) { - // Can't check attributes for ancestor nodes (values not stored) return false; } @@ -52699,20 +53137,15 @@ class Matcher { return false; } - // Match attribute value (only possible for current node) if (segment.attrValue !== undefined) { - const actualValue = node.values[segment.attrName]; - // Both should be strings - if (String(actualValue) !== String(segment.attrValue)) { + if (String(node.values[segment.attrName]) !== String(segment.attrValue)) { return false; } } } - // Match position (only for current node) if (segment.position !== undefined) { if (!isCurrentNode) { - // Can't check position for ancestor nodes return false; } @@ -52724,10 +53157,8 @@ class Matcher { return false; } else if (segment.position === 'even' && counter % 2 !== 0) { return false; - } else if (segment.position === 'nth') { - if (counter !== segment.positionValue) { - return false; - } + } else if (segment.position === 'nth' && counter !== segment.positionValue) { + return false; } } @@ -52735,8 +53166,17 @@ class Matcher { } /** - * Create a snapshot of current state - * @returns {Object} State snapshot + * Match any expression in the given set against the current path. + * @param {ExpressionSet} exprSet + * @returns {boolean} + */ + matchesAny(exprSet) { + return exprSet.matchesAny(this); + } + + /** + * Create a snapshot of current state. + * @returns {Object} */ snapshot() { return { @@ -52746,105 +53186,378 @@ class Matcher { } /** - * Restore state from snapshot - * @param {Object} snapshot - State snapshot + * Restore state from snapshot. + * @param {Object} snapshot */ restore(snapshot) { - this._pathStringCache = null; // invalidate + this._pathStringCache = null; this.path = snapshot.path.map(node => ({ ...node })); this.siblingStacks = snapshot.siblingStacks.map(map => new Map(map)); } /** - * Return a read-only view of this matcher. + * Return the read-only {@link MatcherView} for this matcher. * - * The returned object exposes all query/inspection methods but throws a - * TypeError if any state-mutating method is called (`push`, `pop`, `reset`, - * `updateCurrent`, `restore`). Property reads (e.g. `.path`, `.separator`) - * are allowed but the returned arrays/objects are frozen so callers cannot - * mutate internal state through them either. + * The same instance is returned on every call — no allocation occurs. + * It always reflects the current parser state and is safe to pass to + * user callbacks without risk of accidental mutation. * - * @returns {ReadOnlyMatcher} A proxy that forwards read operations and blocks writes. + * @returns {MatcherView} * * @example - * const matcher = new Matcher(); - * matcher.push("root", {}); - * - * const ro = matcher.readOnly(); - * ro.matches(expr); // ✓ works - * ro.getCurrentTag(); // ✓ works - * ro.push("child", {}); // ✗ throws TypeError - * ro.reset(); // ✗ throws TypeError + * const view = matcher.readOnly(); + * // pass view to callbacks — it stays in sync automatically + * view.matches(expr); // ✓ + * view.getCurrentTag(); // ✓ + * // view.push(...) // ✗ method does not exist — caught by TypeScript */ readOnly() { - const self = this; - - return new Proxy(self, { - get(target, prop, receiver) { - // Block mutating methods - if (MUTATING_METHODS.has(prop)) { - return () => { - throw new TypeError( - `Cannot call '${prop}' on a read-only Matcher. ` + - `Obtain a writable instance to mutate state.` - ); - }; - } + return this._view; + } +} +;// CONCATENATED MODULE: ./node_modules/fast-xml-builder/src/util.js - const value = Reflect.get(target, prop, receiver); - // Freeze array/object properties so callers can't mutate internal - // state through direct property access (e.g. matcher.path.push(...)) - if (prop === 'path' || prop === 'siblingStacks') { - return Object.freeze( - Array.isArray(value) - ? value.map(item => - item instanceof Map - ? Object.freeze(new Map(item)) // freeze a copy of each Map - : Object.freeze({ ...item }) // freeze a copy of each node - ) - : value - ); - } +function safeComment(val) { + return String(val) + .replace(/--/g, '- -') // -- is illegal anywhere in comment content + .replace(/--/g, '- -') // handle the scenario when 2 consiucative dashes appears + .replace(/-$/, '- '); // trailing - would form -- with the closing --> +} - // Bind methods so `this` inside them still refers to the real Matcher - if (typeof value === 'function') { - return value.bind(target); - } +function safeCdata(val) { + return String(val).replace(/\]\]>/g, ']]]]>') +} - return value; - }, +function escapeAttribute(val) { + return String(val).replace(/"/g, '"').replace(/'/g, ''') +} +;// CONCATENATED MODULE: ./node_modules/xml-naming/src/index.js +/** + * xml-naming + * Validates XML Name productions as defined in the XML 1.0 and 1.1 specifications. + * Covers: Name, NCName, QName, NMToken, NMTokens + * + * XML 1.0 spec: https://www.w3.org/TR/xml/#NT-Name + * XML 1.1 spec: https://www.w3.org/TR/xml11/#NT-NameStartChar + * XML NS spec: https://www.w3.org/TR/xml-names/#NT-NCName + */ - // Prevent any property assignment on the read-only view - set(_target, prop) { - throw new TypeError( - `Cannot set property '${String(prop)}' on a read-only Matcher.` - ); - }, +// --------------------------------------------------------------------------- +// Character class strings — XML 1.0 +// +// NameStartChar ::= ":" | [A-Z] | "_" | [a-z] +// | [#xC0-#xD6] | [#xD8-#xF6] | [#xF8-#x2FF] +// | [#x370-#x37D] | [#x37F-#x1FFF] <- split to exclude #x0487 +// | [#x200C-#x200D] +// | [#x2070-#x218F] | [#x2C00-#x2FEF] +// | [#x3001-#xD7FF] | [#xF900-#xFDCF] | [#xFDF0-#xFFFD] +// +// NameChar ::= NameStartChar | "-" | "." | [0-9] +// | #xB7 | [#x0300-#x036F] | [#x203F-#x2040] +// +// Note: \u0487 (Combining Cyrillic Millions Sign) was added in Unicode 4.0, +// after XML 1.0 was defined against Unicode 2.0. It falls inside the range +// \u037F-\u1FFF but must be excluded. We split that range into +// \u037F-\u0486 and \u0488-\u1FFF to exclude it explicitly. +// --------------------------------------------------------------------------- + +const nameStartChar10 = + ':A-Za-z_' + + '\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF' + + '\u0370-\u037D' + + '\u037F-\u0486\u0488-\u1FFF' + // split to exclude \u0487 + '\u200C-\u200D' + + '\u2070-\u218F' + + '\u2C00-\u2FEF' + + '\u3001-\uD7FF' + + '\uF900-\uFDCF' + + '\uFDF0-\uFFFD'; + +const nameChar10 = + nameStartChar10 + + '\\-\\.\\d' + + '\u00B7' + + '\u0300-\u036F' + + '\u203F-\u2040'; + +// --------------------------------------------------------------------------- +// Character class strings — XML 1.1 +// +// Differences from XML 1.0: +// +// NameStartChar: +// 1.0 has split ranges: \u00C0-\u00D6, \u00D8-\u00F6, \u00F8-\u02FF +// 1.1 merges them into: \u00C0-\u02FF +// (\u00D7 x and \u00F7 / are division symbols, excluded in both versions) +// +// 1.0 tops out at \uFFFD (BMP only) +// 1.1 adds \u{10000}-\u{EFFFF} (supplementary planes) +// These require the /u flag on the RegExp — see buildRegexes below. +// +// NameChar: +// 1.1 adds \u0487 (Combining Cyrillic Millions Sign, added in Unicode 4.0) +// --------------------------------------------------------------------------- + +const nameStartChar11 = + ':A-Za-z_' + + '\u00C0-\u02FF' + // merged — 1.0 had three split ranges here + '\u0370-\u037D' + + '\u037F-\u0486\u0488-\u1FFF' + // split to exclude \u0487 (combining mark, never a NameStartChar) + '\u200C-\u200D' + + '\u2070-\u218F' + + '\u2C00-\u2FEF' + + '\u3001-\uD7FF' + + '\uF900-\uFDCF' + + '\uFDF0-\uFFFD' + + '\u{10000}-\u{EFFFF}'; // supplementary planes — REQUIRES /u flag on RegExp + +const nameChar11 = + nameStartChar11 + + '\\-\\.\\d' + + '\u00B7' + + '\u0300-\u036F' + + '\u0487' + // Combining Cyrillic Millions Sign — valid in 1.1, not 1.0 + '\u203F-\u2040'; + +// --------------------------------------------------------------------------- +// Regex builders +// +// XML 1.0 regexes: no flags — BMP only, standard JS regex behaviour. +// XML 1.1 regexes: /u flag — required for \u{10000}-\u{EFFFF} to match actual +// supplementary code points rather than lone surrogates (which are illegal XML). +// --------------------------------------------------------------------------- - // Prevent property deletion - deleteProperty(_target, prop) { - throw new TypeError( - `Cannot delete property '${String(prop)}' from a read-only Matcher.` - ); +const buildRegexes = (startChar, char, flags = '') => { + const ncStart = startChar.replace(':', ''); + const ncChar = char.replace(':', ''); + const ncNamePat = `[${ncStart}][${ncChar}]*`; + + return { + name: new RegExp(`^[${startChar}][${char}]*$`, flags), + ncName: new RegExp(`^${ncNamePat}$`, flags), + qName: new RegExp(`^${ncNamePat}(?::${ncNamePat})?$`, flags), + nmToken: new RegExp(`^[${char}]+$`, flags), + nmTokens: new RegExp(`^[${char}]+(?:\\s+[${char}]+)*$`, flags), + }; +}; + +const regexes10 = buildRegexes(nameStartChar10, nameChar10); // no /u — BMP only +const regexes11 = buildRegexes(nameStartChar11, nameChar11, 'u'); // /u — enables \u{10000}-\u{EFFFF} + +const getRegexes = (xmlVersion = '1.0') => + xmlVersion === '1.1' ? regexes11 : regexes10; + +// --------------------------------------------------------------------------- +// Boolean validators +// --------------------------------------------------------------------------- + +/** + * Returns true if the string is a valid XML Name. + * Colons are allowed anywhere (Name production). + * Used for: DOCTYPE entity names, notation names, DTD element declarations. + */ +const src_name = (str, { xmlVersion = '1.0' } = {}) => + getRegexes(xmlVersion).name.test(str); + +/** + * Returns true if the string is a valid NCName (Non-Colonized Name). + * Colons are not permitted. + * Used for: namespace prefixes, local names, SVG id attributes. + */ +const ncName = (str, { xmlVersion = '1.0' } = {}) => + getRegexes(xmlVersion).ncName.test(str); + +/** + * Returns true if the string is a valid QName (Qualified Name). + * Allows exactly one colon as a prefix separator: prefix:localName. + * Used for: element and attribute names in namespace-aware XML/SVG. + */ +const qName = (str, { xmlVersion = '1.0' } = {}) => + getRegexes(xmlVersion).qName.test(str); + +/** + * Returns true if the string is a valid NMToken. + * Like Name but no restriction on the first character. + * Used for: DTD NMTOKEN attribute values. + */ +const nmToken = (str, { xmlVersion = '1.0' } = {}) => + getRegexes(xmlVersion).nmToken.test(str); + +/** + * Returns true if the string is a valid NMTokens value. + * A whitespace-separated list of NMToken values. + * Used for: DTD NMTOKENS attribute values. + */ +const nmTokens = (str, { xmlVersion = '1.0' } = {}) => + getRegexes(xmlVersion).nmTokens.test(str); + +// --------------------------------------------------------------------------- +// Diagnostic validator +// --------------------------------------------------------------------------- + +const PRODUCTIONS = (/* unused pure expression or super */ null && (['name', 'ncName', 'qName', 'nmToken', 'nmTokens'])); + +/** + * Validates a string against a named production and returns a detailed result. + * + * @param {string} str + * @param {'name'|'ncName'|'qName'|'nmToken'|'nmTokens'} production + * @param {{ xmlVersion?: '1.0'|'1.1' }} [opts] + * @returns {{ valid: boolean, production: string, input: string, reason?: string, position?: number }} + */ +const validate = (str, production, { xmlVersion = '1.0' } = {}) => { + if (!PRODUCTIONS.includes(production)) { + throw new TypeError( + `Unknown production "${production}". Must be one of: ${PRODUCTIONS.join(', ')}` + ); + } + + const validators = { name: src_name, ncName, qName, nmToken, nmTokens }; + const isValid = validators[production](str, { xmlVersion }); + + if (isValid) return { valid: true, production, input: str }; + + let reason = 'Does not match the production rules'; + let position; + + if (str.length === 0) { + reason = 'Input is empty'; + } else if (production === 'ncName' && str.includes(':')) { + position = str.indexOf(':'); + reason = 'Colon is not allowed in NCName'; + } else if (production === 'qName' && str.startsWith(':')) { + reason = 'QName cannot start with a colon'; + position = 0; + } else if (production === 'qName' && str.endsWith(':')) { + reason = 'QName cannot end with a colon'; + position = str.length - 1; + } else if (production === 'qName' && (str.match(/:/g) || []).length > 1) { + reason = 'QName can have at most one colon'; + position = str.lastIndexOf(':'); + } else if ( + ['name', 'ncName', 'qName'].includes(production) && + !/^[:A-Za-z_\u00C0-\uFFFD]/.test(str[0]) + ) { + reason = `First character "${str[0]}" is not a valid NameStartChar`; + position = 0; + } else { + for (let i = 0; i < str.length; i++) { + if (!/[\w\-\\.:\u00B7\u00C0-\uFFFD]/.test(str[i])) { + reason = `Character "${str[i]}" at position ${i} is not a valid NameChar`; + position = i; + break; } - }); + } } -} + + return { valid: false, production, input: str, reason, position }; +}; + +// --------------------------------------------------------------------------- +// Batch validator +// --------------------------------------------------------------------------- + +/** + * Validates an array of strings against a named production. + * + * @param {string[]} strings + * @param {'name'|'ncName'|'qName'|'nmToken'|'nmTokens'} production + * @param {{ xmlVersion?: '1.0'|'1.1' }} [opts] + * @returns {Array<{ valid: boolean, production: string, input: string, reason?: string, position?: number }>} + */ +const validateAll = (strings, production, opts = {}) => + strings.map(str => validate(str, production, opts)); + +// --------------------------------------------------------------------------- +// Sanitizer +// --------------------------------------------------------------------------- + +/** + * Transforms an invalid string into the nearest valid XML name for the given production. + * + * @param {string} str + * @param {'name'|'ncName'|'qName'|'nmToken'|'nmTokens'} production + * @param {{ replacement?: string }} [opts] + * @returns {string} + */ +const sanitize = (str, production = 'name', { replacement = '_' } = {}) => { + if (!str) return replacement; + + let result = str; + + // Strip colons for NCName + if (production === 'ncName') { + result = result.replace(/:/g, ''); + } + + // Replace illegal characters + result = result.replace(/[^\w\-\.:\u00B7\u00C0-\uFFFD]/g, replacement); + + // Fix invalid start character for Name / NCName / QName + if (production !== 'nmToken' && production !== 'nmTokens') { + if (/^[\-\.\d]/.test(result)) { + result = replacement + result; + } + } + + return result || replacement; +}; ;// CONCATENATED MODULE: ./node_modules/fast-xml-builder/src/orderedJs2Xml.js + + const EOL = "\n"; /** - * - * @param {array} jArray - * @param {any} options - * @returns + * Detect XML version from the first element of the ordered array input. + * The first element must be a ?xml processing instruction with a version attribute. + * Returns '1.0' if not found. + * + * @param {array} jArray + * @param {object} options + */ +function detectXmlVersionFromArray(jArray, options) { + if (!Array.isArray(jArray) || jArray.length === 0) return '1.0'; + const first = jArray[0]; + const firstKey = propName(first); + if (firstKey === '?xml') { + const attrs = first[':@']; + if (attrs) { + const versionKey = options.attributeNamePrefix + 'version'; + if (attrs[versionKey]) return attrs[versionKey]; + } + } + return '1.0'; +} + +/** + * Resolve a tag or attribute name through sanitizeName if configured. + * Validation via xml-naming's qName is performed first; the sanitizeName + * callback is invoked only when the name is invalid. If sanitizeName is + * false (default), no validation occurs and the name is used as-is. + * + * @param {string} name - raw name from the JS object + * @param {boolean} isAttribute - true when resolving an attribute name + * @param {object} options + * @param {Matcher} matcher - current matcher state (readonly from callback perspective) + * @param {string} xmlVersion - '1.0' or '1.1', forwarded to xml-naming + */ +function resolveTagName(name, isAttribute, options, matcher, xmlVersion) { + if (!options.sanitizeName) return name; + if (qName(name, { xmlVersion })) return name; + return options.sanitizeName(name, { isAttribute, matcher: matcher.readOnly() }); +} + +/** + * @param {array} jArray + * @param {any} options + * @returns */ function toXml(jArray, options) { let indentation = ""; - if (options.format && options.indentBy.length > 0) { + if (options.format) { indentation = EOL; } @@ -52861,13 +53574,16 @@ function toXml(jArray, options) { } } + // Detect XML version for use in name validation + const xmlVersion = detectXmlVersionFromArray(jArray, options); + // Initialize matcher for path tracking const matcher = new Matcher(); - return arrToStr(jArray, options, indentation, matcher, stopNodeExpressions); + return arrToStr(jArray, options, indentation, matcher, stopNodeExpressions, xmlVersion); } -function arrToStr(arr, options, indentation, matcher, stopNodeExpressions) { +function arrToStr(arr, options, indentation, matcher, stopNodeExpressions, xmlVersion) { let xmlStr = ""; let isPreviousElementTag = false; @@ -52887,20 +53603,32 @@ function arrToStr(arr, options, indentation, matcher, stopNodeExpressions) { for (let i = 0; i < arr.length; i++) { const tagObj = arr[i]; - const tagName = propName(tagObj); - if (tagName === undefined) continue; + const rawTagName = propName(tagObj); + if (rawTagName === undefined) continue; + + // Special names are exempt from sanitizeName: internal conventions and PI tags + // are not user-supplied XML element names. + const isSpecialName = rawTagName === options.textNodeName + || rawTagName === options.cdataPropName + || rawTagName === options.commentPropName + || rawTagName[0] === '?'; + + // Resolve tag name (may transform it; may throw for invalid names) + const tagName = isSpecialName + ? rawTagName + : resolveTagName(rawTagName, false, options, matcher, xmlVersion); // Extract attributes from ":@" property const attrValues = extractAttributeValues(tagObj[":@"], options); - // Push tag to matcher WITH attributes + // Push resolved tag to matcher WITH attributes matcher.push(tagName, attrValues); // Check if this is a stop node using Expression matching const isStopNode = checkStopNode(matcher, stopNodeExpressions); if (tagName === options.textNodeName) { - let tagText = tagObj[tagName]; + let tagText = tagObj[rawTagName]; if (!isStopNode) { tagText = options.tagValueProcessor(tagName, tagText); tagText = replaceEntitiesValue(tagText, options); @@ -52916,21 +53644,25 @@ function arrToStr(arr, options, indentation, matcher, stopNodeExpressions) { if (isPreviousElementTag) { xmlStr += indentation; } - xmlStr += ``; + const val = tagObj[rawTagName][0][options.textNodeName]; + const safeVal = safeCdata(val); + xmlStr += ``; isPreviousElementTag = false; matcher.pop(); continue; } else if (tagName === options.commentPropName) { - xmlStr += indentation + ``; + const val = tagObj[rawTagName][0][options.textNodeName]; + const safeVal = safeComment(val); + xmlStr += indentation + ``; isPreviousElementTag = true; matcher.pop(); continue; } else if (tagName[0] === "?") { - const attStr = attr_to_str(tagObj[":@"], options, isStopNode); + const attStr = attr_to_str(tagObj[":@"], options, isStopNode, matcher, xmlVersion); const tempInd = tagName === "?xml" ? "" : indentation; - let piTextNodeName = tagObj[tagName][0][options.textNodeName]; - piTextNodeName = piTextNodeName.length !== 0 ? " " + piTextNodeName : ""; //remove extra spacing - xmlStr += tempInd + `<${tagName}${piTextNodeName}${attStr}?>`; + // Text node content on PI/XML declaration tags is intentionally ignored. + // Only attributes are valid on these tags per the XML spec. + xmlStr += tempInd + `<${tagName}${attStr}?>`; isPreviousElementTag = true; matcher.pop(); continue; @@ -52942,16 +53674,15 @@ function arrToStr(arr, options, indentation, matcher, stopNodeExpressions) { } // Pass isStopNode to attr_to_str so attributes are also not processed for stopNodes - const attStr = attr_to_str(tagObj[":@"], options, isStopNode); + const attStr = attr_to_str(tagObj[":@"], options, isStopNode, matcher, xmlVersion); const tagStart = indentation + `<${tagName}${attStr}`; // If this is a stopNode, get raw content without processing let tagValue; if (isStopNode) { - tagValue = orderedJs2Xml_getRawContent(tagObj[tagName], options); + tagValue = orderedJs2Xml_getRawContent(tagObj[rawTagName], options); } else { - - tagValue = arrToStr(tagObj[tagName], options, newIdentation, matcher, stopNodeExpressions); + tagValue = arrToStr(tagObj[rawTagName], options, newIdentation, matcher, stopNodeExpressions, xmlVersion); } if (options.unpairedTags.indexOf(tagName) !== -1) { @@ -52995,7 +53726,7 @@ function extractAttributeValues(attrMap, options) { const cleanAttrName = attr.startsWith(options.attributeNamePrefix) ? attr.substr(options.attributeNamePrefix.length) : attr; - attrValues[cleanAttrName] = attrMap[attr]; + attrValues[cleanAttrName] = escapeAttribute(attrMap[attr]); hasAttrs = true; } @@ -53033,9 +53764,7 @@ function orderedJs2Xml_getRawContent(arr, options) { // Processing instruction - skip for stopNodes continue; } else if (tagName) { - // Nested tags within stopNode - // Recursively get raw content and reconstruct the tag - // For stopNodes, we don't process attributes either + // Nested tags within stopNode — no sanitizeName, content is raw const attStr = attr_to_str_raw(item[":@"], options); const nestedContent = orderedJs2Xml_getRawContent(item[tagName], options); @@ -53062,7 +53791,7 @@ function attr_to_str_raw(attrMap, options) { if (attrVal === true && options.suppressBooleanAttributes) { attrStr += ` ${attr.substr(options.attributeNamePrefix.length)}`; } else { - attrStr += ` ${attr.substr(options.attributeNamePrefix.length)}="${attrVal}"`; + attrStr += ` ${attr.substr(options.attributeNamePrefix.length)}="${escapeAttribute(attrVal)}"`; } } } @@ -53078,13 +53807,23 @@ function propName(obj) { } } -function attr_to_str(attrMap, options, isStopNode) { +/** + * Build attribute string, resolving attribute names through sanitizeName when configured. + * Accepts matcher so the callback has path context. + */ +function attr_to_str(attrMap, options, isStopNode, matcher, xmlVersion) { let attrStr = ""; if (attrMap && !options.ignoreAttributes) { for (let attr in attrMap) { if (!Object.prototype.hasOwnProperty.call(attrMap, attr)) continue; - let attrVal; + // Strip prefix to get the clean XML attribute name, then optionally sanitize it + const cleanAttrName = attr.substr(options.attributeNamePrefix.length); + const resolvedAttrName = isStopNode + ? cleanAttrName // stopNodes are raw — skip sanitizeName for attr names too + : resolveTagName(cleanAttrName, true, options, matcher, xmlVersion); + + let attrVal; if (isStopNode) { // For stopNodes, use raw value without any processing attrVal = attrMap[attr]; @@ -53095,9 +53834,9 @@ function attr_to_str(attrMap, options, isStopNode) { } if (attrVal === true && options.suppressBooleanAttributes) { - attrStr += ` ${attr.substr(options.attributeNamePrefix.length)}`; + attrStr += ` ${resolvedAttrName}`; } else { - attrStr += ` ${attr.substr(options.attributeNamePrefix.length)}="${attrVal}"`; + attrStr += ` ${resolvedAttrName}="${escapeAttribute(attrVal)}"`; } } } @@ -53150,6 +53889,8 @@ function getIgnoreAttributesFn(ignoreAttributes) { + + const defaultOptions = { attributeNamePrefix: '@_', attributesGroupName: false, @@ -53183,7 +53924,11 @@ const defaultOptions = { // transformAttributeName: false, oneListGroup: false, maxNestedTags: 100, - jPath: true // When true, callbacks receive string jPath; when false, receive Matcher instance + jPath: true, // When true, callbacks receive string jPath; when false, receive Matcher instance + sanitizeName: false // false = allow all names as-is (default, backward-compatible). + // Set to a function (name, { isAttribute, matcher }) => string to + // validate/sanitize tag and attribute names. Throw inside the function + // to reject an invalid name. }; function Builder(options) { @@ -53240,6 +53985,44 @@ function Builder(options) { } } +/** + * Detect XML version from the ?xml declaration at the root of a plain-object input. + * Checks both attributesGroupName and flat attribute forms. + * Returns '1.0' if no declaration is found. + */ +function detectXmlVersionFromObj(jObj, options) { + const decl = jObj['?xml']; + if (decl && typeof decl === 'object') { + // attributesGroupName path e.g. { '$$': { '@_version': '1.1' } } + if (options.attributesGroupName && decl[options.attributesGroupName]) { + const v = decl[options.attributesGroupName][options.attributeNamePrefix + 'version']; + if (v) return v; + } + // flat attribute path e.g. { '@_version': '1.1' } + const v = decl[options.attributeNamePrefix + 'version']; + if (v) return v; + } + return '1.0'; +} + +/** + * Resolve a tag or attribute name through sanitizeName if configured. + * Validation via xml-naming's qName is performed first; the sanitizeName + * callback is invoked only when the name is invalid. If sanitizeName is + * false (default), no validation occurs and the name is used as-is. + * + * @param {string} name - raw name from the JS object + * @param {boolean} isAttribute - true when resolving an attribute name + * @param {object} options + * @param {Matcher} matcher - current matcher state (readonly from callback perspective) + * @param {string} xmlVersion - '1.0' or '1.1', forwarded to xml-naming + */ +function fxb_resolveTagName(name, isAttribute, options, matcher, xmlVersion) { + if (!options.sanitizeName) return name; + if (qName(name, { xmlVersion })) return name; + return options.sanitizeName(name, { isAttribute, matcher: matcher.readOnly() }); +} + Builder.prototype.build = function (jObj) { if (this.options.preserveOrder) { return toXml(jObj, this.options); @@ -53251,11 +54034,12 @@ Builder.prototype.build = function (jObj) { } // Initialize matcher for path tracking const matcher = new Matcher(); - return this.j2x(jObj, 0, matcher).val; + const xmlVersion = detectXmlVersionFromObj(jObj, this.options); + return this.j2x(jObj, 0, matcher, xmlVersion).val; } }; -Builder.prototype.j2x = function (jObj, level, matcher) { +Builder.prototype.j2x = function (jObj, level, matcher, xmlVersion) { let attrStr = ''; let val = ''; if (this.options.maxNestedTags && matcher.getDepth() >= this.options.maxNestedTags) { @@ -53269,6 +54053,22 @@ Builder.prototype.j2x = function (jObj, level, matcher) { for (let key in jObj) { if (!Object.prototype.hasOwnProperty.call(jObj, key)) continue; + + // Resolve the key through sanitizeName before any use. + // Special keys (textNodeName, cdataPropName, commentPropName, attributeNamePrefix, + // attributesGroupName, "?" PI tags) are exempt — they are builder-internal conventions, + // not user-supplied XML names. + const isSpecialKey = key === this.options.textNodeName + || key === this.options.cdataPropName + || key === this.options.commentPropName + || (this.options.attributesGroupName && key === this.options.attributesGroupName) + || this.isAttribute(key) + || key[0] === '?'; + + const resolvedKey = isSpecialKey + ? key + : fxb_resolveTagName(key, false, this.options, matcher, xmlVersion); + if (typeof jObj[key] === 'undefined') { // supress undefined node only if it is not an attribute if (this.isAttribute(key)) { @@ -53278,21 +54078,22 @@ Builder.prototype.j2x = function (jObj, level, matcher) { // null attribute should be ignored by the attribute list, but should not cause the tag closing if (this.isAttribute(key)) { val += ''; - } else if (key === this.options.cdataPropName) { + } else if (resolvedKey === this.options.cdataPropName || resolvedKey === this.options.commentPropName) { val += ''; - } else if (key[0] === '?') { - val += this.indentate(level) + '<' + key + '?' + this.tagEndChar; + } else if (resolvedKey[0] === '?') { + val += this.indentate(level) + '<' + resolvedKey + '?' + this.tagEndChar; } else { - val += this.indentate(level) + '<' + key + '/' + this.tagEndChar; + val += this.indentate(level) + '<' + resolvedKey + '/' + this.tagEndChar; } - // val += this.indentate(level) + '<' + key + '/' + this.tagEndChar; } else if (jObj[key] instanceof Date) { - val += this.buildTextValNode(jObj[key], key, '', level, matcher); + val += this.buildTextValNode(jObj[key], resolvedKey, '', level, matcher); } else if (typeof jObj[key] !== 'object') { //premitive type const attr = this.isAttribute(key); if (attr && !this.ignoreAttributesFn(attr, jPath)) { - attrStr += this.buildAttrPairStr(attr, '' + jObj[key], isCurrentStopNode); + // Resolve the attribute name through sanitizeName + const resolvedAttr = fxb_resolveTagName(attr, true, this.options, matcher, xmlVersion); + attrStr += this.buildAttrPairStr(resolvedAttr, '' + jObj[key], isCurrentStopNode); } else if (!attr) { //tag value if (key === this.options.textNodeName) { @@ -53300,7 +54101,7 @@ Builder.prototype.j2x = function (jObj, level, matcher) { val += this.replaceEntitiesValue(newval); } else { // Check if this is a stopNode before building - matcher.push(key); + matcher.push(resolvedKey); const isStopNode = this.checkStopNode(matcher); matcher.pop(); @@ -53308,12 +54109,12 @@ Builder.prototype.j2x = function (jObj, level, matcher) { // Build as raw content without encoding const textValue = '' + jObj[key]; if (textValue === '') { - val += this.indentate(level) + '<' + key + this.closeTag(key) + this.tagEndChar; + val += this.indentate(level) + '<' + resolvedKey + this.closeTag(resolvedKey) + this.tagEndChar; } else { - val += this.indentate(level) + '<' + key + '>' + textValue + '' + textValue + '' + textValue + '' + textValue + '` + this.newLine; + const safeVal = safeCdata(val); + return this.indentate(level) + `` + this.newLine; } else if (this.options.commentPropName !== false && key === this.options.commentPropName) { - return this.indentate(level) + `` + this.newLine; + const safeVal = safeComment(val); + return this.indentate(level) + `` + this.newLine; } else if (key[0] === "?") {//PI tag return this.indentate(level) + '<' + key + attrStr + '?' + this.tagEndChar; } else { @@ -53753,7 +54562,7 @@ const validator_defaultOptions = { }; //const tagsPattern = new RegExp("<\\/?([\\w:\\-_\.]+)\\s*\/?>","g"); -function validate(xmlData, options) { +function validator_validate(xmlData, options) { options = Object.assign({}, validator_defaultOptions, options); //xmlData = xmlData.replace(/(\r\n|\n|\r)/gm,"");//make it single line @@ -54177,12 +54986,13 @@ function getPositionFromMatch(match) { const XMLValidator = { - validate: validate + validate: validator_validate } ;// CONCATENATED MODULE: ./node_modules/fast-xml-parser/src/xmlparser/OptionsBuilder.js + const defaultOnDangerousProperty = (name) => { if (DANGEROUS_PROPERTY_NAMES.includes(name)) { return "__" + name; @@ -54222,6 +55032,7 @@ const OptionsBuilder_defaultOptions = { unpairedTags: [], processEntities: true, htmlEntities: false, + entityDecoder: null, ignoreDeclaration: false, ignorePiTags: false, transformTagName: false, @@ -54268,18 +55079,19 @@ function validatePropertyName(propertyName, optionName) { * @param {boolean|object} value * @returns {object} Always returns normalized object */ -function normalizeProcessEntities(value) { +function normalizeProcessEntities(value, htmlEntities) { // Boolean backward compatibility if (typeof value === 'boolean') { return { enabled: value, // true or false maxEntitySize: 10000, - maxExpansionDepth: 10, - maxTotalExpansions: 1000, + maxExpansionDepth: 10000, + maxTotalExpansions: Infinity, maxExpandedLength: 100000, - maxEntityCount: 100, + maxEntityCount: 1000, allowedTags: null, - tagFilter: null + tagFilter: null, + appliesTo: "all", }; } @@ -54293,7 +55105,8 @@ function normalizeProcessEntities(value) { maxExpandedLength: Math.max(1, value.maxExpandedLength ?? 100000), maxEntityCount: Math.max(1, value.maxEntityCount ?? 1000), allowedTags: value.allowedTags ?? null, - tagFilter: value.tagFilter ?? null + tagFilter: value.tagFilter ?? null, + appliesTo: value.appliesTo ?? "all", }; } @@ -54324,8 +55137,8 @@ const buildOptions = function (options) { } // Always normalize processEntities for backward compatibility and validation - built.processEntities = normalizeProcessEntities(built.processEntities); - + built.processEntities = normalizeProcessEntities(built.processEntities, built.htmlEntities); + built.unpairedTagsSet = new Set(built.unpairedTags); // Convert old-style stopNodes for backward compatibility if (built.stopNodes && Array.isArray(built.stopNodes)) { built.stopNodes = built.stopNodes.map(node => { @@ -54386,11 +55199,15 @@ class XmlNode { class DocTypeReader { - constructor(options) { + constructor(options, xmlVersion) { this.suppressValidationErr = !options; this.options = options; + this.xmlVersion = xmlVersion || 1.0; } + setXmlVersion(xmlVersion = 1.0) { + this.xmlVersion = xmlVersion; + } readDocType(xmlData, i) { const entities = Object.create(null); let entityCount = 0; @@ -54420,11 +55237,8 @@ class DocTypeReader { ); } //const escaped = entityName.replace(/[.\-+*:]/g, '\\.'); - const escaped = entityName.replace(/[.*+?^${}()|[\]\\]/g, '\\$&'); - entities[entityName] = { - regx: RegExp(`&${escaped};`, "g"), - val: val - }; + //const escaped = entityName.replace(/[.*+?^${}()|[\]\\]/g, '\\$&'); + entities[entityName] = val; entityCount++; } } @@ -54491,7 +55305,7 @@ class DocTypeReader { } let entityName = xmlData.substring(startIndex, i); - validateEntityName(entityName); + validateEntityName(entityName, { xmlVersion: this.xmlVersion }); // Skip whitespace after entity name i = skipWhitespace(xmlData, i); @@ -54534,7 +55348,7 @@ class DocTypeReader { } let notationName = xmlData.substring(startIndex, i); - !this.suppressValidationErr && validateEntityName(notationName); + !this.suppressValidationErr && validateEntityName(notationName, { xmlVersion: this.xmlVersion }); // Skip whitespace after notation name i = skipWhitespace(xmlData, i); @@ -54614,7 +55428,7 @@ class DocTypeReader { let elementName = xmlData.substring(startIndex, i); // Validate element name - if (!this.suppressValidationErr && !isName(elementName)) { + if (!this.suppressValidationErr && !qName(elementName, { xmlVersion: this.xmlVersion })) { throw new Error(`Invalid element name: "${elementName}"`); } @@ -54661,7 +55475,7 @@ class DocTypeReader { let elementName = xmlData.substring(startIndex, i); // Validate element name - validateEntityName(elementName) + validateEntityName(elementName, { xmlVersion: this.xmlVersion }) // Skip whitespace after element name i = skipWhitespace(xmlData, i); @@ -54674,7 +55488,7 @@ class DocTypeReader { let attributeName = xmlData.substring(startIndex, i); // Validate attribute name - if (!validateEntityName(attributeName)) { + if (!validateEntityName(attributeName, { xmlVersion: this.xmlVersion })) { throw new Error(`Invalid attribute name: "${attributeName}"`); } @@ -54709,7 +55523,7 @@ class DocTypeReader { // Validate notation name notation = notation.trim(); - if (!validateEntityName(notation)) { + if (!validateEntityName(notation, { xmlVersion: this.xmlVersion })) { throw new Error(`Invalid notation name: "${notation}"`); } @@ -54787,27 +55601,284 @@ function hasSeq(data, seq, i) { return true; } -function validateEntityName(name) { - if (isName(name)) +function validateEntityName(name, xmlVersion) { + if (qName(name, { xmlVersion: xmlVersion })) return name; else throw new Error(`Invalid entity name ${name}`); } +;// CONCATENATED MODULE: ./node_modules/anynum/digitTable.js +/** + * Flat lookup table: maps Unicode code point → ASCII digit (0-9). + * Only decimal digit characters (Unicode category Nd) are included. + * + * Strategy: Int32Array of size (maxCodePoint - minCodePoint + 1). + * Value 0xFF means "not a digit". Value 0-9 is the ASCII digit value. + * This gives O(1) lookup with no branching, no bisect, no loop. + * + * Memory: range is 0x0660 to 0x1FBF0 → ~129,936 entries × 1 byte = ~127 KB. + * Acceptable for a one-time init; lookup is a single array index. + */ + +// All known Unicode Nd (decimal digit) script zero code points. +// Each script has exactly 10 consecutive digits: zero+0 .. zero+9. +const SCRIPT_ZEROS = [ + // Basic Latin (ASCII) — included for completeness / pass-through + 0x0030, // 0-9 + + // Arabic scripts + 0x0660, // Arabic-Indic ٠١٢٣٤٥٦٧٨٩ + 0x06F0, // Extended Arabic-Indic (Urdu/Persian/Sindhi) ۰۱۲۳ + + // Indic scripts + 0x0966, // Devanagari ०१२३४५६७८९ + 0x09E6, // Bengali ০১২৩৪৫৬৭৮৯ + 0x0A66, // Gurmukhi ੦੧੨੩੪੫੬੭੮੯ + 0x0AE6, // Gujarati ૦૧૨૩૪૫૬૭૮૯ + 0x0B66, // Odia ୦୧୨୩୪୫୬୭୮୯ + 0x0BE6, // Tamil ௦௧௨௩௪௫௬௭௮௯ + 0x0C66, // Telugu ౦౧౨౩౪౫౬౭౮౯ + 0x0CE6, // Kannada ೦೧೨೩೪೫೬೭೮೯ + 0x0D66, // Malayalam ൦൧൨൩൪൫൬൭൮൯ + 0x0DE6, // Sinhala Archaic ෦෧෨෩෪෫෬෭෮෯ + + // Southeast Asian scripts + 0x0E50, // Thai ๐๑๒๓๔๕๖๗๘๙ + 0x0ED0, // Lao ໐໑໒໓໔໕໖໗໘໙ + 0x0F20, // Tibetan ༠༡༢༣༤༥༦༧༨༩ + 0x1040, // Myanmar ၀၁၂၃၄၅၆၇၈၉ + 0x1090, // Myanmar Shan ႐႑႒႓႔႕႖႗႘႙ + 0x17E0, // Khmer ០១២៣៤៥៦៧៨៩ + 0x1810, // Mongolian ᠐᠑᠒᠓᠔᠕᠖᠗᠘᠙ + 0x1946, // Limbu ᥆᥇᥈᥉᥊᥋᥌᥍᥎᥏ + 0x19D0, // New Tai Lue ᧐᧑᧒᧓᧔᧕᧖᧗᧘᧙ + 0x1A80, // Tai Tham Hora ᪀᪁᪂᪃᪄᪅᪆᪇᪈᪉ + 0x1A90, // Tai Tham Tham ᪐᪑᪒᪓᪔᪕᪖᪗᪘᪙ + 0x1B50, // Balinese ᭐᭑᭒᭓᭔᭕᭖᭗᭘᭙ + 0x1BB0, // Sundanese ᮰᮱᮲᮳᮴᮵᮶᮷᮸᮹ + 0x1C40, // Lepcha ᱀᱁᱂᱃᱄᱅᱆᱇᱈᱉ + 0x1C50, // Ol Chiki ᱐᱑᱒᱓᱔᱕᱖᱗᱘᱙ + + // Fullwidth (CJK context) + 0xFF10, // Fullwidth 0123456789 + + // Mathematical digit variants (Unicode math block) + 0x1D7CE, // Mathematical Bold + 0x1D7D8, // Mathematical Double-Struck + 0x1D7E2, // Mathematical Sans-Serif + 0x1D7EC, // Mathematical Sans-Serif Bold + 0x1D7F6, // Mathematical Monospace + + // Other scripts + 0x104A0, // Osmanya 𐒠𐒡𐒢𐒣𐒤𐒥𐒦𐒧𐒨𐒩 + 0x10D30, // Hanifi Rohingya 𐴰𐴱𐴲𐴳𐴴𐴵𐴶𐴷𐴸𐴹 + 0x11066, // Brahmi 𑁦𑁧𑁨𑁩𑁪𑁫𑁬𑁭𑁮𑁯 + 0x110F0, // Sora Sompeng 𑃰𑃱𑃲𑃳𑃴𑃵𑃶𑃷𑃸𑃹 + 0x11136, // Chakma 𑄶𑄷𑄸𑄹𑄺𑄻𑄼𑄽𑄾𑄿 + 0x111D0, // Sharada 𑇐𑇑𑇒𑇓𑇔𑇕𑇖𑇗𑇘𑇙 + 0x112F0, // Khudawadi 𑋰𑋱𑋲𑋳𑋴𑋵𑋶𑋷𑋸𑋹 + 0x11450, // Newa 𑑐𑑑𑑒𑑓𑑔𑑕𑑖𑑗𑑘𑑙 + 0x114D0, // Tirhuta 𑓐𑓑𑓒𑓓𑓔𑓕𑓖𑓗𑓘𑓙 + 0x11650, // Modi 𑙐𑙑𑙒𑙓𑙔𑙕𑙖𑙗𑙘𑙙 + 0x116C0, // Takri 𑛀𑛁𑛂𑛃𑛄𑛅𑛆𑛇𑛈𑛉 + 0x11730, // Ahom 𑜰𑜱𑜲𑜳𑜴𑜵𑜶𑜷𑜸𑜹 + 0x118E0, // Warang Citi 𑣠𑣡𑣢𑣣𑣤𑣥𑣦𑣧𑣨𑣩 + 0x11950, // Dives Akuru 𑥐𑥑𑥒𑥓𑥔𑥕𑥖𑥗𑥘𑥙 + 0x11BF0, // Khitan Small Script 𑯰𑯱𑯲𑯳𑯴𑯵𑯶𑯷𑯸𑯹 + 0x11C50, // Bhaiksuki 𑱐𑱑𑱒𑱓𑱔𑱕𑱖𑱗𑱘𑱙 + 0x11D50, // Masaram Gondi 𑵐𑵑𑵒𑵓𑵔𑵕𑵖𑵗𑵘𑵙 + 0x11DA0, // Gunjala Gondi 𑶠𑶡𑶢𑶣𑶤𑶥𑶦𑶧𑶨𑶩 + 0x11F50, // Kawi 𑽐𑽑𑽒𑽓𑽔𑽕𑽖𑽗𑽘𑽙 + 0x16A60, // Mro 𖩠𖩡𖩢𖩣𖩤𖩥𖩦𖩧𖩨𖩩 + 0x16AC0, // Tangsa 𖫀𖫁𖫂𖫃𖫄𖫅𖫆𖫇𖫈𖫉 + 0x16B50, // Pahawh Hmong 𖭐𖭑𖭒𖭓𖭔𖭕𖭖𖭗𖭘𖭙 + 0x1E140, // Nyiakeng Puachue Hmong 𞅀𞅁𞅂𞅃𞅄𞅅𞅆𞅇𞅈𞅉 + 0x1E2F0, // Wancho 𞋰𞋱𞋲𞋳𞋴𞋵𞋶𞋷𞋸𞋹 + 0x1E4F0, // Nag Mundari 𞓰𞓱𞓲𞓳𞓴𞓵𞓶𞓷𞓸𞓹 + 0x1E950, // Adlam 𞥐𞥑𞥒𞥓𞥔𞥕𞥖𞥗𞥘𞥙 + 0x1FBF0, // Segmented digit symbols 🯰🯱🯲🯳🯴🯵🯶🯷🯸🯹 +]; + +// Build a sparse Map for scripts above 0xFFFF (surrogate-pair range). +// These can't go into a flat Uint8Array indexed by code point efficiently. +const NOT_DIGIT = 0xFF; +const HIGH_MAP = new Map(); // codePoint → digit value (0-9) + +const LOW_MAX = 0xFFFF; +const LOW_MIN = 0x0660; // first non-ASCII digit script + +// Flat Uint8Array covering 0x0660 .. 0xFFFF +const TABLE_OFFSET = LOW_MIN; +const TABLE_SIZE = LOW_MAX - LOW_MIN + 1; +const TABLE = new Uint8Array(TABLE_SIZE).fill(NOT_DIGIT); + +for (const zero of SCRIPT_ZEROS) { + for (let d = 0; d < 10; d++) { + const cp = zero + d; + if (cp <= LOW_MAX) { + TABLE[cp - TABLE_OFFSET] = d; + } else { + HIGH_MAP.set(cp, d); + } + } +} + + + +;// CONCATENATED MODULE: ./node_modules/anynum/anynum.js + + + + +const CHAR_0 = 48; // '0'.charCodeAt(0) +const CHAR_9 = 57; // '9'.charCodeAt(0) +const CHAR_MINUS = 45; // '-'.charCodeAt(0) + +// Unicode minus/hyphen variants worth normalizing to ASCII '-' in numeric context: +// U+2212 MINUS SIGN − (mathematically correct minus) +// U+FF0D FULLWIDTH HYPHEN-MINUS - (Japanese fullwidth context) +// U+FE63 SMALL HYPHEN-MINUS ﹣ (small form variant) +// +// NOT normalized (deliberate): +// U+2013 EN DASH – (punctuation, not a numeric sign) +// U+2014 EM DASH — (punctuation) +// U+2010 HYPHEN ‐ (typographic hyphen) +// +// Rationale: only characters a human or locale formatter would plausibly use +// as a numeric minus sign are normalized. Dashes used for punctuation are left +// alone to avoid mangling non-numeric strings. +const MINUS_SET = new Set([0x2212, 0xFF0D, 0xFE63]); + +/** + * Normalize all Unicode decimal digit characters in a string to ASCII (0-9), + * and normalize Unicode minus variants to ASCII '-' (U+002D). + * + * Non-digit, non-minus characters are passed through unchanged. + * + * Performance design: + * - Fast path: if the string has no convertible characters, return it unchanged + * (zero allocation). + * - BMP digits (0x0660..0xFFFF excl. surrogates): flat Uint8Array lookup (O(1)). + * - Supplementary plane digits (> 0xFFFF, encoded as surrogate pairs): Map lookup. + * - Minus variants: checked inline with a small fixed Set. + * + * @param {string} str + * @returns {string} + */ +function anynum(str) { + if (typeof str !== 'string') return str; + + const len = str.length; + if (len === 0) return str; + + // Scan for first character needing conversion. + // If none found, return original string (zero allocation). + let firstHit = -1; + + for (let i = 0; i < len; i++) { + const cc = str.charCodeAt(i); + + // ASCII digit or ASCII minus — already normalized, skip fast + if ((cc >= CHAR_0 && cc <= CHAR_9) || cc === CHAR_MINUS) continue; + + // Below first unicode digit script — check minus variants only + if (cc < TABLE_OFFSET) { + if (MINUS_SET.has(cc)) { firstHit = i; break; } + continue; + } + + // Surrogate pairs live in BMP range 0xD800-0xDFFF — check before TABLE + if (cc >= 0xD800 && cc <= 0xDBFF) { + if (i + 1 < len) { + const low = str.charCodeAt(i + 1); + if (low >= 0xDC00 && low <= 0xDFFF) { + const cp = 0x10000 + ((cc - 0xD800) << 10) + (low - 0xDC00); + if (HIGH_MAP.has(cp)) { firstHit = i; break; } + } + } + continue; + } + + // BMP non-surrogate: flat table lookup; also check minus variants in this range + if (TABLE[cc - TABLE_OFFSET] !== NOT_DIGIT || MINUS_SET.has(cc)) { + firstHit = i; + break; + } + } + + // Nothing to replace — return original, zero allocation + if (firstHit === -1) return str; + + // Build result: copy unchanged prefix, then convert from firstHit onward + const chars = []; + + if (firstHit > 0) chars.push(str.slice(0, firstHit)); + + for (let i = firstHit; i < len; i++) { + const cc = str.charCodeAt(i); + + // ASCII digit or ASCII minus — pass through + if ((cc >= CHAR_0 && cc <= CHAR_9) || cc === CHAR_MINUS) { + chars.push(str[i]); + continue; + } + + // Below TABLE_OFFSET — check minus variants, else pass through + if (cc < TABLE_OFFSET) { + chars.push(MINUS_SET.has(cc) ? '-' : str[i]); + continue; + } + + // Surrogate pairs + if (cc >= 0xD800 && cc <= 0xDBFF) { + if (i + 1 < len) { + const low = str.charCodeAt(i + 1); + if (low >= 0xDC00 && low <= 0xDFFF) { + const cp = 0x10000 + ((cc - 0xD800) << 10) + (low - 0xDC00); + const d = HIGH_MAP.get(cp); + if (d !== undefined) { + chars.push(String.fromCharCode(d + 48)); + i++; // consume low surrogate + continue; + } + } + } + chars.push(str[i]); + continue; + } + + // BMP non-surrogate: flat table lookup + minus variants + if (MINUS_SET.has(cc)) { + chars.push('-'); + continue; + } + const d = TABLE[cc - TABLE_OFFSET]; + chars.push(d !== NOT_DIGIT ? String.fromCharCode(d + 48) : str[i]); + } + + return chars.join(''); +} + + +/* harmony default export */ const anynum_anynum = (anynum); ;// CONCATENATED MODULE: ./node_modules/strnum/strnum.js const hexRegex = /^[-+]?0x[a-fA-F0-9]+$/; +const binRegex = /^0b[01]+$/; +const octRegex = /^0o[0-7]+$/; const numRegex = /^([\-\+])?(0*)([0-9]*(\.[0-9]*)?)$/; -// const octRegex = /^0x[a-z0-9]+/; -// const binRegex = /0x[a-z0-9]+/; + const consider = { hex: true, - // oct: false, + binary: false, + octal: false, leadingZeros: true, decimalPoint: "\.", eNotation: true, //skipLike: /regex/, infinity: "original", // "null", "infinity" (Infinity type), "string" ("Infinity" (the string literal)) + unicode: false, }; function toNumber(str, options = {}) { @@ -54819,16 +55890,21 @@ function toNumber(str, options = {}) { if (trimmedStr.length === 0) return str; else if (options.skipLike !== undefined && options.skipLike.test(trimmedStr)) return str; else if (trimmedStr === "0") return 0; - else if (options.hex && hexRegex.test(trimmedStr)) { + + if (options.unicode) { + trimmedStr = anynum_anynum(trimmedStr); + if (trimmedStr === "0") return 0; // re-check after normalization + } + if (options.hex && hexRegex.test(trimmedStr)) { return parse_int(trimmedStr, 16); - // }else if (options.oct && octRegex.test(str)) { - // return Number.parseInt(val, 8); + } else if (options.binary && binRegex.test(trimmedStr)) { + return parse_int(trimmedStr, 2); + } else if (options.octal && octRegex.test(trimmedStr)) { + return parse_int(trimmedStr, 8); } else if (!isFinite(trimmedStr)) { //Infinity return handleInfinity(str, Number(trimmedStr), options); } else if (trimmedStr.includes('e') || trimmedStr.includes('E')) { //eNotation return resolveEnotation(str, trimmedStr, options); - // }else if (options.parseBin && binRegex.test(str)) { - // return Number.parseInt(val, 2); } else { //separate negative sign, leading zeros, and rest number const match = numRegex.exec(trimmedStr); @@ -54926,11 +56002,13 @@ function trimZeros(numStr) { } function parse_int(numStr, base) { - //polyfill + const str = numStr.trim(); + if (base === 2 || base === 8) numStr = str.substring(2); + if (parseInt) return parseInt(numStr, base); else if (Number.parseInt) return Number.parseInt(numStr, base); else if (window && window.parseInt) return window.parseInt(numStr, base); - else throw new Error("parseInt, Number.parseInt, window.parseInt are not supported") + else throw new Error("parseInt, Number.parseInt, window.parseInt are not supported"); } /** @@ -54974,284 +56052,2283 @@ function ignoreAttributes_getIgnoreAttributesFn(ignoreAttributes) { } return () => false } -;// CONCATENATED MODULE: ./node_modules/fast-xml-parser/src/xmlparser/OrderedObjParser.js +;// CONCATENATED MODULE: ./node_modules/path-expression-matcher/src/ExpressionSet.js +/** + * ExpressionSet - An indexed collection of Expressions for efficient bulk matching + * + * Instead of iterating all expressions on every tag, ExpressionSet pre-indexes + * them at insertion time by depth and terminal tag name. At match time, only + * the relevant bucket is evaluated — typically reducing checks from O(E) to O(1) + * lookup plus O(small bucket) matches. + * + * Three buckets are maintained: + * - `_byDepthAndTag` — exact depth + exact tag name (tightest, used first) + * - `_wildcardByDepth` — exact depth + wildcard tag `*` (depth-matched only) + * - `_deepWildcards` — expressions containing `..` (cannot be depth-indexed) + * + * @example + * import { Expression, ExpressionSet } from 'fast-xml-tagger'; + * + * // Build once at config time + * const stopNodes = new ExpressionSet(); + * stopNodes.add(new Expression('root.users.user')); + * stopNodes.add(new Expression('root.config.setting')); + * stopNodes.add(new Expression('..script')); + * + * // Query on every tag — hot path + * if (stopNodes.matchesAny(matcher)) { ... } + */ +class ExpressionSet { + constructor() { + /** @type {Map} depth:tag → expressions */ + this._byDepthAndTag = new Map(); -///@ts-check + /** @type {Map} depth → wildcard-tag expressions */ + this._wildcardByDepth = new Map(); + /** @type {import('./Expression.js').default[]} expressions containing deep wildcard (..) */ + this._deepWildcards = []; + /** @type {Set} pattern strings already added — used for deduplication */ + this._patterns = new Set(); + /** @type {boolean} whether the set is sealed against further additions */ + this._sealed = false; + } + /** + * Add an Expression to the set. + * Duplicate patterns (same pattern string) are silently ignored. + * + * @param {import('./Expression.js').default} expression - A pre-constructed Expression instance + * @returns {this} for chaining + * @throws {TypeError} if called after seal() + * + * @example + * set.add(new Expression('root.users.user')); + * set.add(new Expression('..script')); + */ + add(expression) { + if (this._sealed) { + throw new TypeError( + 'ExpressionSet is sealed. Create a new ExpressionSet to add more expressions.' + ); + } + // Deduplicate by pattern string + if (this._patterns.has(expression.pattern)) return this; + this._patterns.add(expression.pattern); + if (expression.hasDeepWildcard()) { + this._deepWildcards.push(expression); + return this; + } + const depth = expression.length; + const lastSeg = expression.segments[expression.segments.length - 1]; + const tag = lastSeg?.tag; -// const regx = -// '<((!\\[CDATA\\[([\\s\\S]*?)(]]>))|((NAME:)?(NAME))([^>]*)>|((\\/)(NAME)\\s*>))([^<]*)' -// .replace(/NAME/g, util.nameRegexp); + if (!tag || tag === '*') { + // Can index by depth but not by tag + if (!this._wildcardByDepth.has(depth)) this._wildcardByDepth.set(depth, []); + this._wildcardByDepth.get(depth).push(expression); + } else { + // Tightest bucket: depth + tag + const key = `${depth}:${tag}`; + if (!this._byDepthAndTag.has(key)) this._byDepthAndTag.set(key, []); + this._byDepthAndTag.get(key).push(expression); + } -//const tagsRegx = new RegExp("<(\\/?[\\w:\\-\._]+)([^>]*)>(\\s*"+cdataRegx+")*([^<]+)?","g"); -//const tagsRegx = new RegExp("<(\\/?)((\\w*:)?([\\w:\\-\._]+))([^>]*)>([^<]*)("+cdataRegx+"([^<]*))*([^<]+)?","g"); + return this; + } -// Helper functions for attribute and namespace handling + /** + * Add multiple expressions at once. + * + * @param {import('./Expression.js').default[]} expressions - Array of Expression instances + * @returns {this} for chaining + * + * @example + * set.addAll([ + * new Expression('root.users.user'), + * new Expression('root.config.setting'), + * ]); + */ + addAll(expressions) { + for (const expr of expressions) this.add(expr); + return this; + } -/** - * Extract raw attributes (without prefix) from prefixed attribute map - * @param {object} prefixedAttrs - Attributes with prefix from buildAttributesMap - * @param {object} options - Parser options containing attributeNamePrefix - * @returns {object} Raw attributes for matcher - */ -function extractRawAttributes(prefixedAttrs, options) { - if (!prefixedAttrs) return {}; + /** + * Check whether a pattern string is already present in the set. + * + * @param {import('./Expression.js').default} expression + * @returns {boolean} + */ + has(expression) { + return this._patterns.has(expression.pattern); + } - // Handle attributesGroupName option - const attrs = options.attributesGroupName - ? prefixedAttrs[options.attributesGroupName] - : prefixedAttrs; + /** + * Number of expressions in the set. + * @type {number} + */ + get size() { + return this._patterns.size; + } - if (!attrs) return {}; + /** + * Seal the set against further modifications. + * Useful to prevent accidental mutations after config is built. + * Calling add() or addAll() on a sealed set throws a TypeError. + * + * @returns {this} + */ + seal() { + this._sealed = true; + return this; + } - const rawAttrs = {}; - for (const key in attrs) { - // Remove the attribute prefix to get raw name - if (key.startsWith(options.attributeNamePrefix)) { - const rawName = key.substring(options.attributeNamePrefix.length); - rawAttrs[rawName] = attrs[key]; - } else { - // Attribute without prefix (shouldn't normally happen, but be safe) - rawAttrs[key] = attrs[key]; - } + /** + * Whether the set has been sealed. + * @type {boolean} + */ + get isSealed() { + return this._sealed; } - return rawAttrs; -} -/** - * Extract namespace from raw tag name - * @param {string} rawTagName - Tag name possibly with namespace (e.g., "soap:Envelope") - * @returns {string|undefined} Namespace or undefined + /** + * Test whether the matcher's current path matches any expression in the set. + * + * Evaluation order (cheapest → most expensive): + * 1. Exact depth + tag bucket — O(1) lookup, typically 0–2 expressions + * 2. Depth-only wildcard bucket — O(1) lookup, rare + * 3. Deep-wildcard list — always checked, but usually small + * + * @param {import('./Matcher.js').default} matcher - Matcher instance (or readOnly view) + * @returns {boolean} true if any expression matches the current path + * + * @example + * if (stopNodes.matchesAny(matcher)) { + * // handle stop node + * } + */ + matchesAny(matcher) { + return this.findMatch(matcher) !== null; + } + /** + * Find and return the first Expression that matches the matcher's current path. + * + * Uses the same evaluation order as matchesAny (cheapest → most expensive): + * 1. Exact depth + tag bucket + * 2. Depth-only wildcard bucket + * 3. Deep-wildcard list + * + * @param {import('./Matcher.js').default} matcher - Matcher instance (or readOnly view) + * @returns {import('./Expression.js').default | null} the first matching Expression, or null + * + * @example + * const expr = stopNodes.findMatch(matcher); + * if (expr) { + * // access expr.config, expr.pattern, etc. + * } */ -function extractNamespace(rawTagName) { - if (!rawTagName || typeof rawTagName !== 'string') return undefined; + findMatch(matcher) { + const depth = matcher.getDepth(); + const tag = matcher.getCurrentTag(); - const colonIndex = rawTagName.indexOf(':'); - if (colonIndex !== -1 && colonIndex > 0) { - const ns = rawTagName.substring(0, colonIndex); - // Don't treat xmlns as a namespace - if (ns !== 'xmlns') { - return ns; + // 1. Tightest bucket — most expressions live here + const exactKey = `${depth}:${tag}`; + const exactBucket = this._byDepthAndTag.get(exactKey); + if (exactBucket) { + for (let i = 0; i < exactBucket.length; i++) { + if (matcher.matches(exactBucket[i])) return exactBucket[i]; + } } - } - return undefined; -} -class OrderedObjParser { - constructor(options) { - this.options = options; - this.currentNode = null; - this.tagsNodeStack = []; - this.docTypeEntities = {}; - this.lastEntities = { - "apos": { regex: /&(apos|#39|#x27);/g, val: "'" }, - "gt": { regex: /&(gt|#62|#x3E);/g, val: ">" }, - "lt": { regex: /&(lt|#60|#x3C);/g, val: "<" }, - "quot": { regex: /&(quot|#34|#x22);/g, val: "\"" }, - }; - this.ampEntity = { regex: /&(amp|#38|#x26);/g, val: "&" }; - this.htmlEntities = { - "space": { regex: /&(nbsp|#160);/g, val: " " }, - // "lt" : { regex: /&(lt|#60);/g, val: "<" }, - // "gt" : { regex: /&(gt|#62);/g, val: ">" }, - // "amp" : { regex: /&(amp|#38);/g, val: "&" }, - // "quot" : { regex: /&(quot|#34);/g, val: "\"" }, - // "apos" : { regex: /&(apos|#39);/g, val: "'" }, - "cent": { regex: /&(cent|#162);/g, val: "¢" }, - "pound": { regex: /&(pound|#163);/g, val: "£" }, - "yen": { regex: /&(yen|#165);/g, val: "¥" }, - "euro": { regex: /&(euro|#8364);/g, val: "€" }, - "copyright": { regex: /&(copy|#169);/g, val: "©" }, - "reg": { regex: /&(reg|#174);/g, val: "®" }, - "inr": { regex: /&(inr|#8377);/g, val: "₹" }, - "num_dec": { regex: /&#([0-9]{1,7});/g, val: (_, str) => fromCodePoint(str, 10, "&#") }, - "num_hex": { regex: /&#x([0-9a-fA-F]{1,6});/g, val: (_, str) => fromCodePoint(str, 16, "&#x") }, - }; - this.addExternalEntities = addExternalEntities; - this.parseXml = parseXml; - this.parseTextData = parseTextData; - this.resolveNameSpace = resolveNameSpace; - this.buildAttributesMap = buildAttributesMap; - this.isItStopNode = isItStopNode; - this.replaceEntitiesValue = OrderedObjParser_replaceEntitiesValue; - this.readStopNodeData = readStopNodeData; - this.saveTextToParentTag = saveTextToParentTag; - this.addChild = addChild; - this.ignoreAttributesFn = ignoreAttributes_getIgnoreAttributesFn(this.options.ignoreAttributes) - this.entityExpansionCount = 0; - this.currentExpandedLength = 0; + // 2. Depth-matched wildcard-tag expressions + const wildcardBucket = this._wildcardByDepth.get(depth); + if (wildcardBucket) { + for (let i = 0; i < wildcardBucket.length; i++) { + if (matcher.matches(wildcardBucket[i])) return wildcardBucket[i]; + } + } - // Initialize path matcher for path-expression-matcher - this.matcher = new Matcher(); + // 3. Deep wildcards — cannot be pre-filtered by depth or tag + for (let i = 0; i < this._deepWildcards.length; i++) { + if (matcher.matches(this._deepWildcards[i])) return this._deepWildcards[i]; + } + + return null; + } +} + +;// CONCATENATED MODULE: ./node_modules/@nodable/entities/src/entities.js +// --------------------------------------------------------------------------- +// Complete HTML5 named entity reference +// Organized by logical categories for easy maintenance and selective importing +// --------------------------------------------------------------------------- + +/** + * Basic Latin & Special Characters + * @type {Record} + */ +const BASIC_LATIN = { + amp: '&', + AMP: '&', + lt: '<', + LT: '<', + gt: '>', + GT: '>', + quot: '"', + QUOT: '"', + apos: "'", + lsquo: '‘', + rsquo: '’', + ldquo: '“', + rdquo: '”', + lsquor: '‚', + rsquor: '’', + ldquor: '„', + bdquo: '„', + comma: ',', + period: '.', + colon: ':', + semi: ';', + excl: '!', + quest: '?', + num: '#', + dollar: '$', + percent: '%', + ast: '*', + commat: '@', + lowbar: '_', + verbar: '|', + vert: '|', + sol: '/', + bsol: '\\', + lbrace: '{', + rbrace: '}', + lbrack: '[', + rbrack: ']', + lpar: '(', + rpar: ')', + nbsp: '\u00a0', + iexcl: '¡', + cent: '¢', + pound: '£', + curren: '¤', + yen: '¥', + brvbar: '¦', + sect: '§', + uml: '¨', + copy: '©', + COPY: '©', + ordf: 'ª', + laquo: '«', + not: '¬', + shy: '\u00ad', + reg: '®', + REG: '®', + macr: '¯', + deg: '°', + plusmn: '±', + sup2: '²', + sup3: '³', + acute: '´', + micro: 'µ', + para: '¶', + middot: '·', + cedil: '¸', + sup1: '¹', + ordm: 'º', + raquo: '»', + frac14: '¼', + frac12: '½', + half: '½', + frac34: '¾', + iquest: '¿', + times: '×', + div: '÷', + divide: '÷', +}; - // Live read-only proxy of matcher — PEM creates and caches this internally. - // All user callbacks receive this instead of the mutable matcher. - this.readonlyMatcher = this.matcher.readOnly(); +/** + * Latin Extended & Accented Letters (A-Z) + * @type {Record} + */ +const LATIN_ACCENTS = { + Agrave: 'À', + agrave: 'à', + Aacute: 'Á', + aacute: 'á', + Acirc: 'Â', + acirc: 'â', + Atilde: 'Ã', + atilde: 'ã', + Auml: 'Ä', + auml: 'ä', + Aring: 'Å', + aring: 'å', + AElig: 'Æ', + aelig: 'æ', + Ccedil: 'Ç', + ccedil: 'ç', + Egrave: 'È', + egrave: 'è', + Eacute: 'É', + eacute: 'é', + Ecirc: 'Ê', + ecirc: 'ê', + Euml: 'Ë', + euml: 'ë', + Igrave: 'Ì', + igrave: 'ì', + Iacute: 'Í', + iacute: 'í', + Icirc: 'Î', + icirc: 'î', + Iuml: 'Ï', + iuml: 'ï', + ETH: 'Ð', + eth: 'ð', + Ntilde: 'Ñ', + ntilde: 'ñ', + Ograve: 'Ò', + ograve: 'ò', + Oacute: 'Ó', + oacute: 'ó', + Ocirc: 'Ô', + ocirc: 'ô', + Otilde: 'Õ', + otilde: 'õ', + Ouml: 'Ö', + ouml: 'ö', + Oslash: 'Ø', + oslash: 'ø', + Ugrave: 'Ù', + ugrave: 'ù', + Uacute: 'Ú', + uacute: 'ú', + Ucirc: 'Û', + ucirc: 'û', + Uuml: 'Ü', + uuml: 'ü', + Yacute: 'Ý', + yacute: 'ý', + THORN: 'Þ', + thorn: 'þ', + szlig: 'ß', + yuml: 'ÿ', + Yuml: 'Ÿ', +}; - // Flag to track if current node is a stop node (optimization) - this.isCurrentNodeStopNode = false; +/** + * Latin Extended (Letters with diacritics) + * @type {Record} + */ +const LATIN_EXTENDED = { + Amacr: 'Ā', + amacr: 'ā', + Abreve: 'Ă', + abreve: 'ă', + Aogon: 'Ą', + aogon: 'ą', + Cacute: 'Ć', + cacute: 'ć', + Ccirc: 'Ĉ', + ccirc: 'ĉ', + Cdot: 'Ċ', + cdot: 'ċ', + Ccaron: 'Č', + ccaron: 'č', + Dcaron: 'Ď', + dcaron: 'ď', + Dstrok: 'Đ', + dstrok: 'đ', + Emacr: 'Ē', + emacr: 'ē', + Ecaron: 'Ě', + ecaron: 'ě', + Edot: 'Ė', + edot: 'ė', + Eogon: 'Ę', + eogon: 'ę', + Gcirc: 'Ĝ', + gcirc: 'ĝ', + Gbreve: 'Ğ', + gbreve: 'ğ', + Gdot: 'Ġ', + gdot: 'ġ', + Gcedil: 'Ģ', + Hcirc: 'Ĥ', + hcirc: 'ĥ', + Hstrok: 'Ħ', + hstrok: 'ħ', + Itilde: 'Ĩ', + itilde: 'ĩ', + Imacr: 'Ī', + imacr: 'ī', + Iogon: 'Į', + iogon: 'į', + Idot: 'İ', + IJlig: 'IJ', + ijlig: 'ij', + Jcirc: 'Ĵ', + jcirc: 'ĵ', + Kcedil: 'Ķ', + kcedil: 'ķ', + kgreen: 'ĸ', + Lacute: 'Ĺ', + lacute: 'ĺ', + Lcedil: 'Ļ', + lcedil: 'ļ', + Lcaron: 'Ľ', + lcaron: 'ľ', + Lmidot: 'Ŀ', + lmidot: 'ŀ', + Lstrok: 'Ł', + lstrok: 'ł', + Nacute: 'Ń', + nacute: 'ń', + Ncaron: 'Ň', + ncaron: 'ň', + Ncedil: 'Ņ', + ncedil: 'ņ', + ENG: 'Ŋ', + eng: 'ŋ', + Omacr: 'Ō', + omacr: 'ō', + Odblac: 'Ő', + odblac: 'ő', + OElig: 'Œ', + oelig: 'œ', + Racute: 'Ŕ', + racute: 'ŕ', + Rcaron: 'Ř', + rcaron: 'ř', + Rcedil: 'Ŗ', + rcedil: 'ŗ', + Sacute: 'Ś', + sacute: 'ś', + Scirc: 'Ŝ', + scirc: 'ŝ', + Scedil: 'Ş', + scedil: 'ş', + Scaron: 'Š', + scaron: 'š', + Tcedil: 'Ţ', + tcedil: 'ţ', + Tcaron: 'Ť', + tcaron: 'ť', + Tstrok: 'Ŧ', + tstrok: 'ŧ', + Utilde: 'Ũ', + utilde: 'ũ', + Umacr: 'Ū', + umacr: 'ū', + Ubreve: 'Ŭ', + ubreve: 'ŭ', + Uring: 'Ů', + uring: 'ů', + Udblac: 'Ű', + udblac: 'ű', + Uogon: 'Ų', + uogon: 'ų', + Wcirc: 'Ŵ', + wcirc: 'ŵ', + Ycirc: 'Ŷ', + ycirc: 'ŷ', + Zacute: 'Ź', + zacute: 'ź', + Zdot: 'Ż', + zdot: 'ż', + Zcaron: 'Ž', + zcaron: 'ž', +}; - // Pre-compile stopNodes expressions - if (this.options.stopNodes && this.options.stopNodes.length > 0) { - this.stopNodeExpressions = []; - for (let i = 0; i < this.options.stopNodes.length; i++) { - const stopNodeExp = this.options.stopNodes[i]; - if (typeof stopNodeExp === 'string') { - // Convert string to Expression object - this.stopNodeExpressions.push(new Expression(stopNodeExp)); - } else if (stopNodeExp instanceof Expression) { - // Already an Expression object - this.stopNodeExpressions.push(stopNodeExp); - } - } - } - } +/** + * Greek Letters + * @type {Record} + */ +const GREEK = { + Alpha: 'Α', + alpha: 'α', + Beta: 'Β', + beta: 'β', + Gamma: 'Γ', + gamma: 'γ', + Delta: 'Δ', + delta: 'δ', + Epsilon: 'Ε', + epsilon: 'ε', + epsiv: 'ϵ', + varepsilon: 'ϵ', + Zeta: 'Ζ', + zeta: 'ζ', + Eta: 'Η', + eta: 'η', + Theta: 'Θ', + theta: 'θ', + thetasym: 'ϑ', + vartheta: 'ϑ', + Iota: 'Ι', + iota: 'ι', + Kappa: 'Κ', + kappa: 'κ', + kappav: 'ϰ', + varkappa: 'ϰ', + Lambda: 'Λ', + lambda: 'λ', + Mu: 'Μ', + mu: 'μ', + Nu: 'Ν', + nu: 'ν', + Xi: 'Ξ', + xi: 'ξ', + Omicron: 'Ο', + omicron: 'ο', + Pi: 'Π', + pi: 'π', + piv: 'ϖ', + varpi: 'ϖ', + Rho: 'Ρ', + rho: 'ρ', + rhov: 'ϱ', + varrho: 'ϱ', + Sigma: 'Σ', + sigma: 'σ', + sigmaf: 'ς', + sigmav: 'ς', + varsigma: 'ς', + Tau: 'Τ', + tau: 'τ', + Upsilon: 'Υ', + upsilon: 'υ', + upsi: 'υ', + Upsi: 'ϒ', + upsih: 'ϒ', + Phi: 'Φ', + phi: 'φ', + phiv: 'ϕ', + varphi: 'ϕ', + Chi: 'Χ', + chi: 'χ', + Psi: 'Ψ', + psi: 'ψ', + Omega: 'Ω', + omega: 'ω', + ohm: 'Ω', + Gammad: 'Ϝ', + gammad: 'ϝ', + digamma: 'ϝ', +}; -} +/** + * Cyrillic Letters + * @type {Record} + */ +const CYRILLIC = { + Afr: '𝔄', + afr: '𝔞', + Acy: 'А', + acy: 'а', + Bcy: 'Б', + bcy: 'б', + Vcy: 'В', + vcy: 'в', + Gcy: 'Г', + gcy: 'г', + Dcy: 'Д', + dcy: 'д', + IEcy: 'Е', + iecy: 'е', + IOcy: 'Ё', + iocy: 'ё', + ZHcy: 'Ж', + zhcy: 'ж', + Zcy: 'З', + zcy: 'з', + Icy: 'И', + icy: 'и', + Jcy: 'Й', + jcy: 'й', + Kcy: 'К', + kcy: 'к', + Lcy: 'Л', + lcy: 'л', + Mcy: 'М', + mcy: 'м', + Ncy: 'Н', + ncy: 'н', + Ocy: 'О', + ocy: 'о', + Pcy: 'П', + pcy: 'п', + Rcy: 'Р', + rcy: 'р', + Scy: 'С', + scy: 'с', + Tcy: 'Т', + tcy: 'т', + Ucy: 'У', + ucy: 'у', + Fcy: 'Ф', + fcy: 'ф', + KHcy: 'Х', + khcy: 'х', + TScy: 'Ц', + tscy: 'ц', + CHcy: 'Ч', + chcy: 'ч', + SHcy: 'Ш', + shcy: 'ш', + SHCHcy: 'Щ', + shchcy: 'щ', + HARDcy: 'Ъ', + hardcy: 'ъ', + Ycy: 'Ы', + ycy: 'ы', + SOFTcy: 'Ь', + softcy: 'ь', + Ecy: 'Э', + ecy: 'э', + YUcy: 'Ю', + yucy: 'ю', + YAcy: 'Я', + yacy: 'я', + DJcy: 'Ђ', + djcy: 'ђ', + GJcy: 'Ѓ', + gjcy: 'ѓ', + Jukcy: 'Є', + jukcy: 'є', + DScy: 'Ѕ', + dscy: 'ѕ', + Iukcy: 'І', + iukcy: 'і', + YIcy: 'Ї', + yicy: 'ї', + Jsercy: 'Ј', + jsercy: 'ј', + LJcy: 'Љ', + ljcy: 'љ', + NJcy: 'Њ', + njcy: 'њ', + TSHcy: 'Ћ', + tshcy: 'ћ', + KJcy: 'Ќ', + kjcy: 'ќ', + Ubrcy: 'Ў', + ubrcy: 'ў', + DZcy: 'Џ', + dzcy: 'џ', +}; -function addExternalEntities(externalEntities) { - const entKeys = Object.keys(externalEntities); - for (let i = 0; i < entKeys.length; i++) { - const ent = entKeys[i]; - const escaped = ent.replace(/[.\-+*:]/g, '\\.'); - this.lastEntities[ent] = { - regex: new RegExp("&" + escaped + ";", "g"), - val: externalEntities[ent] - } - } -} +/** + * Mathematical Operators & Relations + * @type {Record} + */ +const MATH = { + plus: '+', + pm: '±', + times: '×', + div: '÷', + divide: '÷', + sdot: '⋅', + star: '☆', + starf: '★', + bigstar: '★', + lowast: '∗', + ast: '*', + midast: '*', + compfn: '∘', + smallcircle: '∘', + bullet: '•', + bull: '•', + nbsp: '\u00a0', + hellip: '…', + mldr: '…', + prime: '′', + Prime: '″', + tprime: '‴', + bprime: '‵', + backprime: '‵', + minus: '−', + minusd: '∸', + dotminus: '∸', + plusdo: '∔', + dotplus: '∔', + plusmn: '±', + minusplus: '∓', + mnplus: '∓', + mp: '∓', + setminus: '∖', + smallsetminus: '∖', + Backslash: '∖', + setmn: '∖', + ssetmn: '∖', + lowbar: '_', + verbar: '|', + vert: '|', + VerticalLine: '|', + colon: ':', + Colon: '∷', + Proportion: '∷', + ratio: '∶', + equals: '=', + ne: '≠', + nequiv: '≢', + equiv: '≡', + Congruent: '≡', + sim: '∼', + thicksim: '∼', + thksim: '∼', + sime: '≃', + simeq: '≃', + TildeEqual: '≃', + asymp: '≈', + approx: '≈', + thickapprox: '≈', + thkap: '≈', + TildeTilde: '≈', + ncong: '≇', + cong: '≅', + TildeFullEqual: '≅', + asympeq: '≍', + CupCap: '≍', + bump: '≎', + Bumpeq: '≎', + HumpDownHump: '≎', + bumpe: '≏', + bumpeq: '≏', + HumpEqual: '≏', + le: '≤', + LessEqual: '≤', + ge: '≥', + GreaterEqual: '≥', + lesseqgtr: '⋚', + lesseqqgtr: '⪋', + greater: '>', + less: '<', +}; /** - * @param {string} val - * @param {string} tagName - * @param {string|Matcher} jPath - jPath string or Matcher instance based on options.jPath - * @param {boolean} dontTrim - * @param {boolean} hasAttributes - * @param {boolean} isLeafNode - * @param {boolean} escapeEntities - */ -function parseTextData(val, tagName, jPath, dontTrim, hasAttributes, isLeafNode, escapeEntities) { - if (val !== undefined) { - if (this.options.trimValues && !dontTrim) { - val = val.trim(); - } - if (val.length > 0) { - if (!escapeEntities) val = this.replaceEntitiesValue(val, tagName, jPath); + * Mathematical Operators (Advanced) + * @type {Record} + */ +const MATH_ADVANCED = { + alefsym: 'ℵ', + aleph: 'ℵ', + beth: 'ℶ', + gimel: 'ℷ', + daleth: 'ℸ', + forall: '∀', + ForAll: '∀', + part: '∂', + PartialD: '∂', + exist: '∃', + Exists: '∃', + nexist: '∄', + nexists: '∄', + empty: '∅', + emptyset: '∅', + emptyv: '∅', + varnothing: '∅', + nabla: '∇', + Del: '∇', + isin: '∈', + isinv: '∈', + in: '∈', + Element: '∈', + notin: '∉', + notinva: '∉', + ni: '∋', + niv: '∋', + SuchThat: '∋', + ReverseElement: '∋', + notni: '∌', + notniva: '∌', + prod: '∏', + Product: '∏', + coprod: '∐', + Coproduct: '∐', + sum: '∑', + Sum: '∑', + minus: '−', + mp: '∓', + plusdo: '∔', + dotplus: '∔', + setminus: '∖', + lowast: '∗', + radic: '√', + Sqrt: '√', + prop: '∝', + propto: '∝', + Proportional: '∝', + varpropto: '∝', + infin: '∞', + infintie: '⧝', + ang: '∠', + angle: '∠', + angmsd: '∡', + measuredangle: '∡', + angsph: '∢', + mid: '∣', + VerticalBar: '∣', + nmid: '∤', + nsmid: '∤', + npar: '∦', + parallel: '∥', + spar: '∥', + nparallel: '∦', + nspar: '∦', + and: '∧', + wedge: '∧', + or: '∨', + vee: '∨', + cap: '∩', + cup: '∪', + int: '∫', + Integral: '∫', + conint: '∮', + ContourIntegral: '∮', + Conint: '∯', + DoubleContourIntegral: '∯', + Cconint: '∰', + there4: '∴', + therefore: '∴', + Therefore: '∴', + becaus: '∵', + because: '∵', + Because: '∵', + ratio: '∶', + Proportion: '∷', + minusd: '∸', + dotminus: '∸', + mDDot: '∺', + homtht: '∻', + sim: '∼', + bsimg: '∽', + backsim: '∽', + ac: '∾', + mstpos: '∾', + acd: '∿', + VerticalTilde: '≀', + wr: '≀', + wreath: '≀', + nsime: '≄', + nsimeq: '≄', + ncong: '≇', + simne: '≆', + ncongdot: '⩭̸', + ngsim: '≵', + nsim: '≁', + napprox: '≉', + nap: '≉', + ngeq: '≱', + nge: '≱', + nleq: '≰', + nle: '≰', + ngtr: '≯', + ngt: '≯', + nless: '≮', + nlt: '≮', + nprec: '⊀', + npr: '⊀', + nsucc: '⊁', + nsc: '⊁', +}; - // Pass jPath string or matcher based on options.jPath setting - const jPathOrMatcher = this.options.jPath ? jPath.toString() : jPath; - const newval = this.options.tagValueProcessor(tagName, val, jPathOrMatcher, hasAttributes, isLeafNode); - if (newval === null || newval === undefined) { - //don't parse - return val; - } else if (typeof newval !== typeof val || newval !== val) { - //overwrite - return newval; - } else if (this.options.trimValues) { - return parseValue(val, this.options.parseTagValue, this.options.numberParseOptions); - } else { - const trimmedVal = val.trim(); - if (trimmedVal === val) { - return parseValue(val, this.options.parseTagValue, this.options.numberParseOptions); - } else { - return val; - } - } - } - } -} +/** + * Arrows + * @type {Record} + */ +const ARROWS = { + larr: '←', + leftarrow: '←', + LeftArrow: '←', + uarr: '↑', + uparrow: '↑', + UpArrow: '↑', + rarr: '→', + rightarrow: '→', + RightArrow: '→', + darr: '↓', + downarrow: '↓', + DownArrow: '↓', + harr: '↔', + leftrightarrow: '↔', + LeftRightArrow: '↔', + varr: '↕', + updownarrow: '↕', + UpDownArrow: '↕', + nwarr: '↖', + nwarrow: '↖', + UpperLeftArrow: '↖', + nearr: '↗', + nearrow: '↗', + UpperRightArrow: '↗', + searr: '↘', + searrow: '↘', + LowerRightArrow: '↘', + swarr: '↙', + swarrow: '↙', + LowerLeftArrow: '↙', + lArr: '⇐', + Leftarrow: '⇐', + uArr: '⇑', + Uparrow: '⇑', + rArr: '⇒', + Rightarrow: '⇒', + dArr: '⇓', + Downarrow: '⇓', + hArr: '⇔', + Leftrightarrow: '⇔', + iff: '⇔', + vArr: '⇕', + Updownarrow: '⇕', + lAarr: '⇚', + Lleftarrow: '⇚', + rAarr: '⇛', + Rrightarrow: '⇛', + lrarr: '⇆', + leftrightarrows: '⇆', + rlarr: '⇄', + rightleftarrows: '⇄', + lrhar: '⇋', + leftrightharpoons: '⇋', + ReverseEquilibrium: '⇋', + rlhar: '⇌', + rightleftharpoons: '⇌', + Equilibrium: '⇌', + udarr: '⇅', + UpArrowDownArrow: '⇅', + duarr: '⇵', + DownArrowUpArrow: '⇵', + llarr: '⇇', + leftleftarrows: '⇇', + rrarr: '⇉', + rightrightarrows: '⇉', + ddarr: '⇊', + downdownarrows: '⇊', + har: '↽', + lhard: '↽', + leftharpoondown: '↽', + lharu: '↼', + leftharpoonup: '↼', + rhard: '⇁', + rightharpoondown: '⇁', + rharu: '⇀', + rightharpoonup: '⇀', + lsh: '↰', + Lsh: '↰', + rsh: '↱', + Rsh: '↱', + ldsh: '↲', + rdsh: '↳', + hookleftarrow: '↩', + hookrightarrow: '↪', + mapstoleft: '↤', + mapstoup: '↥', + map: '↦', + mapsto: '↦', + mapstodown: '↧', + crarr: '↵', + nleftarrow: '↚', + nleftrightarrow: '↮', + nrightarrow: '↛', + nrarr: '↛', + larrtl: '↢', + rarrtl: '↣', + leftarrowtail: '↢', + rightarrowtail: '↣', + twoheadleftarrow: '↞', + twoheadrightarrow: '↠', + Larr: '↞', + Rarr: '↠', + larrhk: '↩', + rarrhk: '↪', + larrlp: '↫', + looparrowleft: '↫', + rarrlp: '↬', + looparrowright: '↬', + harrw: '↭', + leftrightsquigarrow: '↭', + nrarrw: '↝̸', + rarrw: '↝', + rightsquigarrow: '↝', + larrbfs: '⤟', + rarrbfs: '⤠', + nvHarr: '⤄', + nvlArr: '⤂', + nvrArr: '⤃', + larrfs: '⤝', + rarrfs: '⤞', + Map: '⤅', + larrsim: '⥳', + rarrsim: '⥴', + harrcir: '⥈', + Uarrocir: '⥉', + lurdshar: '⥊', + ldrdhar: '⥧', + ldrushar: '⥋', + rdldhar: '⥩', + lrhard: '⥭', + uharr: '↾', + uharl: '↿', + dharr: '⇂', + dharl: '⇃', + Uarr: '↟', + Darr: '↡', + zigrarr: '⇝', + nwArr: '⇖', + neArr: '⇗', + seArr: '⇘', + swArr: '⇙', + nharr: '↮', + nhArr: '⇎', + nlarr: '↚', + nlArr: '⇍', + nrArr: '⇏', + larrb: '⇤', + LeftArrowBar: '⇤', + rarrb: '⇥', + RightArrowBar: '⇥', +}; -function resolveNameSpace(tagname) { - if (this.options.removeNSPrefix) { - const tags = tagname.split(':'); - const prefix = tagname.charAt(0) === '/' ? '/' : ''; - if (tags[0] === 'xmlns') { - return ''; - } - if (tags.length === 2) { - tagname = prefix + tags[1]; - } - } - return tagname; -} +/** + * Geometric Shapes + * @type {Record} + */ +const SHAPES = { + square: '□', + Square: '□', + squ: '□', + squf: '▪', + squarf: '▪', + blacksquar: '▪', + blacksquare: '▪', + FilledVerySmallSquare: '▪', + blk34: '▓', + blk12: '▒', + blk14: '░', + block: '█', + srect: '▭', + rect: '▭', + sdot: '⋅', + sdotb: '⊡', + dotsquare: '⊡', + triangle: '▵', + tri: '▵', + trine: '▵', + utri: '▵', + triangledown: '▿', + dtri: '▿', + tridown: '▿', + triangleleft: '◃', + ltri: '◃', + triangleright: '▹', + rtri: '▹', + blacktriangle: '▴', + utrif: '▴', + blacktriangledown: '▾', + dtrif: '▾', + blacktriangleleft: '◂', + ltrif: '◂', + blacktriangleright: '▸', + rtrif: '▸', + loz: '◊', + lozenge: '◊', + blacklozenge: '⧫', + lozf: '⧫', + bigcirc: '◯', + xcirc: '◯', + circ: 'ˆ', + Circle: '○', + cir: '○', + o: '○', + bullet: '•', + bull: '•', + hellip: '…', + mldr: '…', + nldr: '‥', + boxh: '─', + HorizontalLine: '─', + boxv: '│', + boxdr: '┌', + boxdl: '┐', + boxur: '└', + boxul: '┘', + boxvr: '├', + boxvl: '┤', + boxhd: '┬', + boxhu: '┴', + boxvh: '┼', + boxH: '═', + boxV: '║', + boxdR: '╒', + boxDr: '╓', + boxDR: '╔', + boxDl: '╕', + boxdL: '╖', + boxDL: '╗', + boxuR: '╘', + boxUr: '╙', + boxUR: '╚', + boxUl: '╜', + boxuL: '╛', + boxUL: '╝', + boxvR: '╞', + boxVr: '╟', + boxVR: '╠', + boxVl: '╢', + boxvL: '╡', + boxVL: '╣', + boxHd: '╤', + boxhD: '╥', + boxHD: '╦', + boxHu: '╧', + boxhU: '╨', + boxHU: '╩', + boxvH: '╪', + boxVh: '╫', + boxVH: '╬', +}; -//TODO: change regex to capture NS -//const attrsRegx = new RegExp("([\\w\\-\\.\\:]+)\\s*=\\s*(['\"])((.|\n)*?)\\2","gm"); -const attrsRegx = new RegExp('([^\\s=]+)\\s*(=\\s*([\'"])([\\s\\S]*?)\\3)?', 'gm'); +/** + * Punctuation & Diacritics + * @type {Record} + */ +const PUNCTUATION = { + excl: '!', + iexcl: '¡', + brvbar: '¦', + sect: '§', + uml: '¨', + copy: '©', + ordf: 'ª', + laquo: '«', + not: '¬', + shy: '\u00ad', + reg: '®', + macr: '¯', + deg: '°', + plusmn: '±', + sup2: '²', + sup3: '³', + acute: '´', + micro: 'µ', + para: '¶', + middot: '·', + cedil: '¸', + sup1: '¹', + ordm: 'º', + raquo: '»', + frac14: '¼', + frac12: '½', + frac34: '¾', + iquest: '¿', + nbsp: '\u00a0', + comma: ',', + period: '.', + colon: ':', + semi: ';', + vert: '|', + Verbar: '‖', + verbar: '|', + dblac: '˝', + circ: 'ˆ', + caron: 'ˇ', + breve: '˘', + dot: '˙', + ring: '˚', + ogon: '˛', + tilde: '˜', + DiacriticalGrave: '`', + DiacriticalAcute: '´', + DiacriticalTilde: '˜', + DiacriticalDot: '˙', + DiacriticalDoubleAcute: '˝', + grave: '`', +}; -function buildAttributesMap(attrStr, jPath, tagName) { - if (this.options.ignoreAttributes !== true && typeof attrStr === 'string') { - // attrStr = attrStr.replace(/\r?\n/g, ' '); - //attrStr = attrStr || attrStr.trim(); +/** + * Currency Symbols + * @type {Record} + */ +const CURRENCY = { + cent: '¢', + pound: '£', + curren: '¤', + yen: '¥', + euro: '€', + dollar: '$', + fnof: 'ƒ', + inr: '₹', + af: '؋', + birr: 'ብር', + peso: '₱', + rub: '₽', + won: '₩', + yuan: '¥', + cedil: '¸', +}; - const matches = getAllMatches(attrStr, attrsRegx); - const len = matches.length; //don't make it inline - const attrs = {}; +/** + * Fractions + * @type {Record} + */ +const FRACTIONS = { + frac12: '½', + half: '½', + frac13: '⅓', + frac14: '¼', + frac15: '⅕', + frac16: '⅙', + frac18: '⅛', + frac23: '⅔', + frac25: '⅖', + frac34: '¾', + frac35: '⅗', + frac38: '⅜', + frac45: '⅘', + frac56: '⅚', + frac58: '⅝', + frac78: '⅞', + frasl: '⁄', +}; - // Pre-process values once: trim + entity replacement - // Reused in both matcher update and second pass - const processedVals = new Array(len); - let hasRawAttrs = false; - const rawAttrsForMatcher = {}; +/** + * Miscellaneous Symbols + * @type {Record} + */ +const MISC_SYMBOLS = { + trade: '™', + TRADE: '™', + telrec: '⌕', + target: '⌖', + ulcorn: '⌜', + ulcorner: '⌜', + urcorn: '⌝', + urcorner: '⌝', + dlcorn: '⌞', + llcorner: '⌞', + drcorn: '⌟', + lrcorner: '⌟', + intercal: '⊺', + intcal: '⊺', + oplus: '⊕', + CirclePlus: '⊕', + ominus: '⊖', + CircleMinus: '⊖', + otimes: '⊗', + CircleTimes: '⊗', + osol: '⊘', + odot: '⊙', + CircleDot: '⊙', + oast: '⊛', + circledast: '⊛', + odash: '⊝', + circleddash: '⊝', + ocirc: '⊚', + circledcirc: '⊚', + boxplus: '⊞', + plusb: '⊞', + boxminus: '⊟', + minusb: '⊟', + boxtimes: '⊠', + timesb: '⊠', + boxdot: '⊡', + sdotb: '⊡', + veebar: '⊻', + vee: '∨', + barvee: '⊽', + and: '∧', + wedge: '∧', + Cap: '⋒', + Cup: '⋓', + Fork: '⋔', + pitchfork: '⋔', + epar: '⋕', + ltlarr: '⥶', + nvap: '≍⃒', + nvsim: '∼⃒', + nvge: '≥⃒', + nvle: '≤⃒', + nvlt: '<⃒', + nvgt: '>⃒', + nvltrie: '⊴⃒', + nvrtrie: '⊵⃒', + Vdash: '⊩', + dashv: '⊣', + vDash: '⊨', + Vvdash: '⊪', + nvdash: '⊬', + nvDash: '⊭', + nVdash: '⊮', + nVDash: '⊯', +}; - for (let i = 0; i < len; i++) { - const attrName = this.resolveNameSpace(matches[i][1]); - const oldVal = matches[i][4]; +/** + * All entities combined (if you need everything) + * @type {Record} + */ +const ALL_ENTITIES = { + ...BASIC_LATIN, + ...LATIN_ACCENTS, + ...LATIN_EXTENDED, + ...GREEK, + ...CYRILLIC, + ...MATH, + ...MATH_ADVANCED, + ...ARROWS, + ...SHAPES, + ...PUNCTUATION, + ...CURRENCY, + ...FRACTIONS, + ...MISC_SYMBOLS, +}; - if (attrName.length && oldVal !== undefined) { - let val = oldVal; - if (this.options.trimValues) val = val.trim(); - val = this.replaceEntitiesValue(val, tagName, this.readonlyMatcher); - processedVals[i] = val; +const XML = { + amp: "&", + apos: "'", + gt: ">", + lt: "<", + quot: "\"" +} +const COMMON_HTML = { + nbsp: '\u00a0', + copy: '\u00a9', + reg: '\u00ae', + trade: '\u2122', + mdash: '\u2014', + ndash: '\u2013', + hellip: '\u2026', + laquo: '\u00ab', + raquo: '\u00bb', + lsquo: '\u2018', + rsquo: '\u2019', + ldquo: '\u201c', + rdquo: '\u201d', + bull: '\u2022', + para: '\u00b6', + sect: '\u00a7', + deg: '\u00b0', + frac12: '\u00bd', + frac14: '\u00bc', + frac34: '\u00be', +} +// --------------------------------------------------------------------------- +// Note: NUMERIC_ENTITIES (&#NNN; / &#xHH;) are handled by the scanner directly +// via String.fromCodePoint() without any map lookup. +// --------------------------------------------------------------------------- +;// CONCATENATED MODULE: ./node_modules/@nodable/entities/src/EntityDecoder.js +// --------------------------------------------------------------------------- +// Built-in named entity map (name → replacement string) +// No regex, no {regex,val} objects — just flat key/value pairs. +// --------------------------------------------------------------------------- + + + +// --------------------------------------------------------------------------- +// Entity hook action constants +// --------------------------------------------------------------------------- + +/** + * Action constants for `onExternalEntity` and `onInputEntity` hooks. + * + * Use these instead of raw strings to avoid typos: + * + * @example + * import EntityDecoder, { ENTITY_ACTION } from './EntityDecoder.js'; + * const dec = new EntityDecoder({ + * onInputEntity: (name, value) => ENTITY_ACTION.BLOCK, + * }); + */ +const ENTITY_ACTION = Object.freeze({ + /** Resolve and expand the entity normally. */ + ALLOW: 'allow', + /** Silently skip this entity — it will not be registered. */ + BLOCK: 'block', + /** Throw an error, aborting entity registration entirely. */ + THROW: 'throw', +}); - rawAttrsForMatcher[attrName] = val; - hasRawAttrs = true; - } +// --------------------------------------------------------------------------- +// Helpers +// --------------------------------------------------------------------------- + +const SPECIAL_CHARS = new Set('!?\\\\/[]$%{}^&*()<>|+'); + +/** + * Validate that an entity name contains no dangerous characters. + * @param {string} name + * @returns {string} the name, unchanged + * @throws {Error} on invalid characters + */ +function EntityDecoder_validateEntityName(name) { + if (name[0] === '#') { + throw new Error(`[EntityReplacer] Invalid character '#' in entity name: "${name}"`); + } + for (const ch of name) { + if (SPECIAL_CHARS.has(ch)) { + throw new Error(`[EntityReplacer] Invalid character '${ch}' in entity name: "${name}"`); } + } + return name; +} - // Update matcher ONCE before second pass, if applicable - if (hasRawAttrs && typeof jPath === 'object' && jPath.updateCurrent) { - jPath.updateCurrent(rawAttrsForMatcher); +/** + * Merge one or more entity maps into a flat name→string map. + * Accepts either: + * - plain string values: { amp: '&' } + * - legacy {regex,val} / {regx,val}: { lt: { regex: /.../, val: '<' } } + * + * Values containing '&' are skipped (recursive expansion risk). + * + * @param {...object} maps + * @returns {Record} + */ +function mergeEntityMaps(...maps) { + const out = Object.create(null); + for (const map of maps) { + if (!map) continue; + for (const key of Object.keys(map)) { + const raw = map[key]; + if (typeof raw === 'string') { + out[key] = raw; + } else if (raw && typeof raw === 'object' && raw.val !== undefined) { + // Legacy {regex,val} or {regx,val} — extract the string val only + const val = raw.val; + if (typeof val === 'string') { + out[key] = val; + } + // function vals are not supported in the scanner — skip + } } + } + return out; +} - // Hoist toString() once — path doesn't change during attribute processing - const jPathStr = this.options.jPath ? jPath.toString() : this.readonlyMatcher; +// --------------------------------------------------------------------------- +// applyLimitsTo helpers +// --------------------------------------------------------------------------- - // Second pass: apply processors, build final attrs - let hasAttrs = false; - for (let i = 0; i < len; i++) { - const attrName = this.resolveNameSpace(matches[i][1]); +const LIMIT_TIER_EXTERNAL = 'external'; // input/runtime + persistent external maps +const LIMIT_TIER_BASE = 'base'; // DEFAULT_XML_ENTITIES + namedEntities (system) maps +const LIMIT_TIER_ALL = 'all'; // every entity regardless of tier - if (this.ignoreAttributesFn(attrName, jPathStr)) continue; +/** + * Resolve `applyLimitsTo` option into a normalised Set of tier strings. + * Accepted values: 'external' | 'base' | 'all' | string[] + * Default: 'external' (only untrusted injected entities are counted). + * @param {string|string[]|undefined} raw + * @returns {Set} + */ +function parseLimitTiers(raw) { + if (!raw || raw === LIMIT_TIER_EXTERNAL) return new Set([LIMIT_TIER_EXTERNAL]); + if (raw === LIMIT_TIER_ALL) return new Set([LIMIT_TIER_ALL]); + if (raw === LIMIT_TIER_BASE) return new Set([LIMIT_TIER_BASE]); + if (Array.isArray(raw)) return new Set(raw); + return new Set([LIMIT_TIER_EXTERNAL]); // safe default for unrecognised values +} - let aName = this.options.attributeNamePrefix + attrName; +// --------------------------------------------------------------------------- +// NCR (Numeric Character Reference) classification +// --------------------------------------------------------------------------- - if (attrName.length) { - if (this.options.transformAttributeName) { - aName = this.options.transformAttributeName(aName); - } - aName = sanitizeName(aName, this.options); +// Severity order — higher number = stricter action. +// Used to enforce minimum action levels for specific codepoint ranges. +const NCR_LEVEL = Object.freeze({ allow: 0, leave: 1, remove: 2, throw: 3 }); - if (matches[i][4] !== undefined) { - // Reuse already-processed value — no double entity replacement - const oldVal = processedVals[i]; +// XML 1.0 §2.2: allowed chars are #x9 | #xA | #xD | [#x20-#xD7FF] | [#xE000-#xFFFD] | [#x10000-#x10FFFF] +// Restricted C0: U+0001–U+001F excluding U+0009, U+000A, U+000D +const XML10_ALLOWED_C0 = new Set([0x09, 0x0A, 0x0D]); - const newVal = this.options.attributeValueProcessor(attrName, oldVal, jPathStr); - if (newVal === null || newVal === undefined) { - attrs[aName] = oldVal; - } else if (typeof newVal !== typeof oldVal || newVal !== oldVal) { - attrs[aName] = newVal; - } else { - attrs[aName] = parseValue(oldVal, this.options.parseAttributeValue, this.options.numberParseOptions); +/** + * Parse the `ncr` constructor option into flat, hot-path-friendly fields. + * @param {object|undefined} ncr + * @returns {{ xmlVersion: number, onLevel: number, nullLevel: number }} + */ +function parseNCRConfig(ncr) { + if (!ncr) { + return { xmlVersion: 1.0, onLevel: NCR_LEVEL.allow, nullLevel: NCR_LEVEL.remove }; + } + const xmlVersion = ncr.xmlVersion === 1.1 ? 1.1 : 1.0; + const onLevel = NCR_LEVEL[ncr.onNCR] ?? NCR_LEVEL.allow; + const nullLevel = NCR_LEVEL[ncr.nullNCR] ?? NCR_LEVEL.remove; + // 'allow' is not meaningful for null — clamp to at least 'remove' + const clampedNull = Math.max(nullLevel, NCR_LEVEL.remove); + return { xmlVersion, onLevel, nullLevel: clampedNull }; +} + +// --------------------------------------------------------------------------- +// EntityReplacer +// --------------------------------------------------------------------------- + +/** + * Single-pass, zero-regex entity replacer for XML/HTML content. + * + * Algorithm: scan the string once for '&', read to ';', resolve via map + * or direct codepoint conversion, build output chunks, join once at the end. + * + * Entity lookup priority (highest → lowest): + * 1. input / runtime (DOCTYPE entities for current document) + * 2. persistent external (survive across documents) + * 3. base named map (DEFAULT_XML_ENTITIES + user-supplied namedEntities) + * + * Both input and external resolve as the 'external' tier for limit purposes. + * Base map entities resolve as the 'base' tier. + * + * Numeric / hex references (&#NNN; / &#xHH;) are resolved directly via + * String.fromCodePoint() — no map needed. They count as 'base' tier. + * + * @example + * const replacer = new EntityReplacer({ namedEntities: COMMON_HTML }); + * replacer.setExternalEntities({ brand: 'Acme' }); + * + * const instance = replacer.reset(); + * instance.addInputEntities({ version: '1.0' }); + * instance.encode('&brand; v&version; <'); // 'Acme v1.0 <' + */ +class EntityDecoder { + /** + * @param {object} [options] + * @param {object|null} [options.namedEntities] — extra named entities merged into base map + * @param {object} [options.limit] — security limits + * @param {number} [options.limit.maxTotalExpansions=0] — 0 = unlimited + * @param {number} [options.limit.maxExpandedLength=0] — 0 = unlimited + * @param {'external'|'base'|'all'|string[]} [options.limit.applyLimitsTo='external'] + * Which entity tiers count against the security limits: + * - 'external' (default) — only input/runtime + persistent external entities + * - 'base' — only DEFAULT_XML_ENTITIES + namedEntities + * - 'all' — every entity regardless of tier + * - string[] — explicit combination, e.g. ['external', 'base'] + * @param {((resolved: string, original: string) => string)|null} [options.postCheck=null] + * @param {string[]} [options.remove=[]] — entity names (e.g. ['nbsp', '#13']) to delete (replace with empty string) + * @param {string[]} [options.leave=[]] — entity names to keep as literal (unchanged in output) + * @param {object} [options.ncr] — Numeric Character Reference controls + * @param {1.0|1.1} [options.ncr.xmlVersion=1.0] + * XML version governing which codepoint ranges are restricted: + * - 1.0 — C0 controls U+0001–U+001F (except U+0009/000A/000D) are prohibited + * - 1.1 — C0 controls are allowed when written as NCRs; C1 (U+007F–U+009F) decoded as-is + * @param {'allow'|'leave'|'remove'|'throw'} [options.ncr.onNCR='allow'] + * Base action for numeric references. Severity order: allow < leave < remove < throw. + * For codepoint ranges that carry a minimum level (surrogates → remove, XML 1.0 C0 → remove), + * the effective action is max(onNCR, rangeMinimum). + * @param {'remove'|'throw'} [options.ncr.nullNCR='remove'] + * Action for U+0000 (null). 'allow' and 'leave' are clamped to 'remove' since null is never safe. + * @param {((name: string, value: string) => 'allow'|'block'|'throw')|null} [options.onExternalEntity=null] + * Hook called when an external entity is registered via `setExternalEntities()` or + * `addExternalEntity()`. Return `ENTITY_ACTION.ALLOW` to accept the entity, + * `ENTITY_ACTION.BLOCK` to silently skip it, or `ENTITY_ACTION.THROW` to abort with an error. + * @param {((name: string, value: string) => 'allow'|'block'|'throw')|null} [options.onInputEntity=null] + * Hook called when an input entity is registered via `addInputEntities()`. Return + * `ENTITY_ACTION.ALLOW` to accept, `ENTITY_ACTION.BLOCK` to silently skip, or + * `ENTITY_ACTION.THROW` to abort with an error. + */ + constructor(options = {}) { + this._limit = options.limit || {}; + this._maxTotalExpansions = this._limit.maxTotalExpansions || 0; + this._maxExpandedLength = this._limit.maxExpandedLength || 0; + this._postCheck = typeof options.postCheck === 'function' ? options.postCheck : r => r; + this._limitTiers = parseLimitTiers(this._limit.applyLimitsTo ?? LIMIT_TIER_EXTERNAL); + this._numericAllowed = options.numericAllowed ?? true; + // Base map: DEFAULT_XML_ENTITIES + user-supplied extras. Immutable after construction. + this._baseMap = mergeEntityMaps(XML, options.namedEntities || null); + + // Persistent external entities — survive across documents. + // Stored as a separate map so reset() never touches them. + /** @type {Record} */ + this._externalMap = Object.create(null); + + // Input / runtime entities — current document only, wiped on reset(). + /** @type {Record} */ + this._inputMap = Object.create(null); + + // Per-document counters + this._totalExpansions = 0; + this._expandedLength = 0; + + // --- New: remove / leave sets --- + /** @type {Set} */ + this._removeSet = new Set(options.remove && Array.isArray(options.remove) ? options.remove : []); + /** @type {Set} */ + this._leaveSet = new Set(options.leave && Array.isArray(options.leave) ? options.leave : []); + + // --- NCR config (parsed into flat fields for hot-path speed) --- + const ncrCfg = parseNCRConfig(options.ncr); + this._ncrXmlVersion = ncrCfg.xmlVersion; + this._ncrOnLevel = ncrCfg.onLevel; + this._ncrNullLevel = ncrCfg.nullLevel; + + // --- Registration hooks --- + /** @type {((name: string, value: string) => 'allow'|'block'|'throw')|null} */ + this._onExternalEntity = typeof options.onExternalEntity === 'function' + ? options.onExternalEntity + : null; + /** @type {((name: string, value: string) => 'allow'|'block'|'throw')|null} */ + this._onInputEntity = typeof options.onInputEntity === 'function' + ? options.onInputEntity + : null; + } + + // ------------------------------------------------------------------------- + // Private: registration hook dispatch + // ------------------------------------------------------------------------- + + /** + * Invoke a registration hook for a single entity name/value pair. + * Returns true when the entity should be accepted, false when it should be + * silently skipped (BLOCK), and throws when the hook returns THROW. + * + * @param {((name: string, value: string) => 'allow'|'block'|'throw')|null} hook + * @param {string} name + * @param {string} value + * @param {string} context — used in error messages ('external' | 'input') + * @returns {boolean} true = accept, false = skip + */ + _applyRegistrationHook(hook, name, value, context) { + if (!hook) return true; // no hook → always accept + const action = hook(name, value); + if (action === ENTITY_ACTION.BLOCK) return false; + if (action === ENTITY_ACTION.THROW) { + throw new Error( + `[EntityDecoder] Registration of ${context} entity "&${name};" was rejected by hook` + ); + } + return true; // ALLOW or any unknown return value → accept + } + + // ------------------------------------------------------------------------- + // Persistent external entity registration + // ------------------------------------------------------------------------- + + /** + * Replace the full set of persistent external entities. + * All keys are validated — throws on invalid characters. + * If `onExternalEntity` is set, it is called once per entry; entries that + * return `ENTITY_ACTION.BLOCK` are silently omitted, `ENTITY_ACTION.THROW` + * aborts the whole call. + * @param {Record} map + */ + setExternalEntities(map) { + if (map) { + for (const key of Object.keys(map)) { + EntityDecoder_validateEntityName(key); + } + } + if (!this._onExternalEntity) { + this._externalMap = mergeEntityMaps(map); + return; + } + // Hook present — resolve values first, then filter + const flat = mergeEntityMaps(map); + const filtered = Object.create(null); + for (const [name, value] of Object.entries(flat)) { + if (this._applyRegistrationHook(this._onExternalEntity, name, value, 'external')) { + filtered[name] = value; + } + } + this._externalMap = filtered; + } + + /** + * Add a single persistent external entity. + * If `onExternalEntity` is set it is called before the entity is stored; + * `ENTITY_ACTION.BLOCK` silently skips storage, `ENTITY_ACTION.THROW` raises. + * @param {string} key + * @param {string} value + */ + addExternalEntity(key, value) { + EntityDecoder_validateEntityName(key); + if (typeof value === 'string' && value.indexOf('&') === -1) { + if (this._applyRegistrationHook(this._onExternalEntity, key, value, 'external')) { + this._externalMap[key] = value; + } + } + } + + // ------------------------------------------------------------------------- + // Input / runtime entity registration (per document) + // ------------------------------------------------------------------------- + + /** + * Inject DOCTYPE entities for the current document. + * Also resets per-document expansion counters. + * If `onInputEntity` is set it is called once per entry; entries returning + * `ENTITY_ACTION.BLOCK` are silently omitted, `ENTITY_ACTION.THROW` aborts. + * @param {Record} map + */ + addInputEntities(map) { + this._totalExpansions = 0; + this._expandedLength = 0; + if (!this._onInputEntity) { + this._inputMap = mergeEntityMaps(map); + return; + } + const flat = mergeEntityMaps(map); + const filtered = Object.create(null); + for (const [name, value] of Object.entries(flat)) { + if (this._applyRegistrationHook(this._onInputEntity, name, value, 'input')) { + filtered[name] = value; + } + } + this._inputMap = filtered; + } + + // ------------------------------------------------------------------------- + // Per-document reset + // ------------------------------------------------------------------------- + + /** + * Wipe input/runtime entities and reset counters. + * Call this before processing each new document. + * @returns {this} + */ + reset() { + this._inputMap = Object.create(null); + this._totalExpansions = 0; + this._expandedLength = 0; + return this; + } + + // ------------------------------------------------------------------------- + // XML version (can be set after construction, e.g. once parser reads ) + // ------------------------------------------------------------------------- + + /** + * Update the XML version used for NCR classification. + * Call this as soon as the document's `` declaration is parsed. + * @param {1.0|1.1|number} version + */ + setXmlVersion(version) { + this._ncrXmlVersion = version === 1.1 ? 1.1 : 1.0; + } + + // ------------------------------------------------------------------------- + // Primary API + // ------------------------------------------------------------------------- + + /** + * Replace all entity references in `str` in a single pass. + * + * @param {string} str + * @returns {string} + */ + decode(str) { + if (typeof str !== 'string' || str.length === 0) return str; + //TODO: check if needed + if (str.indexOf('&') === -1) return str; // fast path — no entities at all + + const original = str; + const chunks = []; + const len = str.length; + let last = 0; // start of next unprocessed literal chunk + let i = 0; + + const limitExpansions = this._maxTotalExpansions > 0; + const limitLength = this._maxExpandedLength > 0; + const checkLimits = limitExpansions || limitLength; + + while (i < len) { + // Scan forward to next '&' + if (str.charCodeAt(i) !== 38 /* '&' */) { i++; continue; } + + // --- Found '&' at position i --- + + // Scan forward to ';' + let j = i + 1; + while (j < len && str.charCodeAt(j) !== 59 /* ';' */ && (j - i) <= 32) j++; + + if (j >= len || str.charCodeAt(j) !== 59) { + // No closing ';' within window — treat '&' as literal + i++; + continue; + } + + // Raw token between '&' and ';' (exclusive) + const token = str.slice(i + 1, j); + if (token.length === 0) { i++; continue; } + + let replacement; + let tier; // which limit tier this entity belongs to + + if (this._removeSet.has(token)) { + // Remove entity: replace with empty string + replacement = ''; + // If entity was unknown (replacement undefined), we still need a tier for limits. + // Treat as external tier because it's user-directed removal of an unknown reference. + if (tier === undefined) { + tier = LIMIT_TIER_EXTERNAL; + } + } else if (this._leaveSet.has(token)) { + // Do not replace — keep original &token; as literal + i++; + continue; + } else if (token.charCodeAt(0) === 35 /* '#' */) { + // ---- Numeric / NCR reference ---- + // NCR classification always runs first — prohibited codepoints must be + // caught regardless of numericAllowed. + const ncrResult = this._resolveNCR(token); + if (ncrResult === undefined) { + // 'leave' action — keep original &token; as-is + i++; + continue; + } + replacement = ncrResult; // '' for remove, char string for allow + tier = LIMIT_TIER_BASE; + } else { + // ---- Named reference ---- + const resolved = this._resolveName(token); + replacement = resolved?.value; + tier = resolved?.tier; + } + + if (replacement === undefined) { + // Unknown entity — leave as-is, advance past '&' only + i++; + continue; + } + + // Flush literal chunk before this entity + if (i > last) chunks.push(str.slice(last, i)); + chunks.push(replacement); + last = j + 1; // skip past ';' + i = last; + + // Apply expansion limits only if this tier is being tracked + if (checkLimits && this._tierCounts(tier)) { + if (limitExpansions) { + this._totalExpansions++; + if (this._totalExpansions > this._maxTotalExpansions) { + throw new Error( + `[EntityReplacer] Entity expansion count limit exceeded: ` + + `${this._totalExpansions} > ${this._maxTotalExpansions}` + ); + } + } + if (limitLength) { + // delta: replacement.length minus the raw &token; length (token.length + 2 for '&' and ';') + const delta = replacement.length - (token.length + 2); + if (delta > 0) { + this._expandedLength += delta; + if (this._expandedLength > this._maxExpandedLength) { + throw new Error( + `[EntityReplacer] Expanded content length limit exceeded: ` + + `${this._expandedLength} > ${this._maxExpandedLength}` + ); + } + } + } + } + } + + // Flush trailing literal + if (last < len) chunks.push(str.slice(last)); + + // If nothing was replaced, chunks is empty — return original + const result = chunks.length === 0 ? str : chunks.join(''); + + return this._postCheck(result, original); + } + + // ------------------------------------------------------------------------- + // Private: limit tier check + // ------------------------------------------------------------------------- + + /** + * Returns true if a resolved entity of the given tier should count + * against the expansion/length limits. + * @param {string} tier — LIMIT_TIER_EXTERNAL | LIMIT_TIER_BASE + * @returns {boolean} + */ + _tierCounts(tier) { + if (this._limitTiers.has(LIMIT_TIER_ALL)) return true; + return this._limitTiers.has(tier); + } + + // ------------------------------------------------------------------------- + // Private: entity resolution + // ------------------------------------------------------------------------- + + /** + * Resolve a named entity token (without & and ;). + * Priority: inputMap > externalMap > baseMap + * Returns the resolved value tagged with its limit tier. + * + * @param {string} name + * @returns {{ value: string, tier: string }|undefined} + */ + _resolveName(name) { + // input and external both count as 'external' tier for limit purposes — + // they are injected at runtime and are the untrusted surface. + if (name in this._inputMap) return { value: this._inputMap[name], tier: LIMIT_TIER_EXTERNAL }; + if (name in this._externalMap) return { value: this._externalMap[name], tier: LIMIT_TIER_EXTERNAL }; + if (name in this._baseMap) return { value: this._baseMap[name], tier: LIMIT_TIER_BASE }; + return undefined; + } + + /** + * Classify a codepoint and return the minimum action level that must be applied. + * Returns -1 when no minimum is imposed (normal allow path). + * + * Ranges checked (in priority order): + * 1. U+0000 — null, governed by nullNCR (always ≥ remove) + * 2. U+D800–U+DFFF — surrogates, always prohibited (min: remove) + * 3. U+0001–U+001F \ {0x09,0x0A,0x0D} — XML 1.0 restricted C0 (min: remove) + * (skipped in XML 1.1 — C0 controls are allowed when written as NCRs) + * + * @param {number} cp — codepoint + * @returns {number} — minimum NCR_LEVEL value, or -1 for no restriction + */ + _classifyNCR(cp) { + // 1. Null + if (cp === 0) return this._ncrNullLevel; + + // 2. Surrogates — always prohibited, minimum 'remove' + if (cp >= 0xD800 && cp <= 0xDFFF) return NCR_LEVEL.remove; + + // 3. XML 1.0 restricted C0 controls + if (this._ncrXmlVersion === 1.0) { + if (cp >= 0x01 && cp <= 0x1F && !XML10_ALLOWED_C0.has(cp)) return NCR_LEVEL.remove; + } + + return -1; // no restriction + } + + /** + * Execute a resolved NCR action. + * + * @param {number} action — NCR_LEVEL value + * @param {string} token — raw token (e.g. '#38') for error messages + * @param {number} cp — codepoint, used only for error messages + * @returns {string|undefined} + * - decoded character string → 'allow' + * - '' → 'remove' + * - undefined → 'leave' (caller must skip past '&' only) + * - throws Error → 'throw' + */ + _applyNCRAction(action, token, cp) { + switch (action) { + case NCR_LEVEL.allow: return String.fromCodePoint(cp); + case NCR_LEVEL.remove: return ''; + case NCR_LEVEL.leave: return undefined; // signal: keep literal + case NCR_LEVEL.throw: + throw new Error( + `[EntityDecoder] Prohibited numeric character reference ` + + `&${token}; (U+${cp.toString(16).toUpperCase().padStart(4, '0')})` + ); + default: return String.fromCodePoint(cp); + } + } + + /** + * Full NCR resolution pipeline for a numeric token. + * + * Steps: + * 1. Parse the codepoint (decimal or hex). + * 2. Validate the raw codepoint range (NaN, <0, >0x10FFFF). + * 3. If numericAllowed is false and no minimum restriction applies → leave as-is. + * 4. Classify the codepoint to find the minimum required action level. + * 5. Resolve effective action = max(onNCR, minimum). + * 6. Apply and return. + * + * @param {string} token — e.g. '#38', '#x26', '#X26' + * @returns {string|undefined} + * - string (incl. '') — replacement ('' = remove) + * - undefined — leave original &token; as-is + */ + _resolveNCR(token) { + // Step 1: parse codepoint + const second = token.charCodeAt(1); + let cp; + if (second === 120 /* x */ || second === 88 /* X */) { + cp = parseInt(token.slice(2), 16); + } else { + cp = parseInt(token.slice(1), 10); + } + + // Step 2: out-of-range → leave as-is unconditionally + if (Number.isNaN(cp) || cp < 0 || cp > 0x10FFFF) return undefined; + + // Step 3: classify to get minimum action level + const minimum = this._classifyNCR(cp); + + // Step 4: if numericAllowed is false and no hard minimum → leave + if (!this._numericAllowed && minimum < NCR_LEVEL.remove) return undefined; + + // Step 5: effective action = max(configured onNCR, range minimum) + const effective = minimum === -1 + ? this._ncrOnLevel + : Math.max(this._ncrOnLevel, minimum); + + // Step 6: apply + return this._applyNCRAction(effective, token, cp); + } +} +;// CONCATENATED MODULE: ./node_modules/fast-xml-parser/src/xmlparser/OrderedObjParser.js + +///@ts-check + + + + + + + + + + +// const regx = +// '<((!\\[CDATA\\[([\\s\\S]*?)(]]>))|((NAME:)?(NAME))([^>]*)>|((\\/)(NAME)\\s*>))([^<]*)' +// .replace(/NAME/g, util.nameRegexp); + +//const tagsRegx = new RegExp("<(\\/?[\\w:\\-\._]+)([^>]*)>(\\s*"+cdataRegx+")*([^<]+)?","g"); +//const tagsRegx = new RegExp("<(\\/?)((\\w*:)?([\\w:\\-\._]+))([^>]*)>([^<]*)("+cdataRegx+"([^<]*))*([^<]+)?","g"); + +// Helper functions for attribute and namespace handling + +/** + * Extract raw attributes (without prefix) from prefixed attribute map + * @param {object} prefixedAttrs - Attributes with prefix from buildAttributesMap + * @param {object} options - Parser options containing attributeNamePrefix + * @returns {object} Raw attributes for matcher + */ +function extractRawAttributes(prefixedAttrs, options) { + if (!prefixedAttrs) return {}; + + // Handle attributesGroupName option + const attrs = options.attributesGroupName + ? prefixedAttrs[options.attributesGroupName] + : prefixedAttrs; + + if (!attrs) return {}; + + const rawAttrs = {}; + for (const key in attrs) { + // Remove the attribute prefix to get raw name + if (key.startsWith(options.attributeNamePrefix)) { + const rawName = key.substring(options.attributeNamePrefix.length); + rawAttrs[rawName] = attrs[key]; + } else { + // Attribute without prefix (shouldn't normally happen, but be safe) + rawAttrs[key] = attrs[key]; + } + } + return rawAttrs; +} + +/** + * Extract namespace from raw tag name + * @param {string} rawTagName - Tag name possibly with namespace (e.g., "soap:Envelope") + * @returns {string|undefined} Namespace or undefined + */ +function extractNamespace(rawTagName) { + if (!rawTagName || typeof rawTagName !== 'string') return undefined; + + const colonIndex = rawTagName.indexOf(':'); + if (colonIndex !== -1 && colonIndex > 0) { + const ns = rawTagName.substring(0, colonIndex); + // Don't treat xmlns as a namespace + if (ns !== 'xmlns') { + return ns; + } + } + return undefined; +} + +class OrderedObjParser { + constructor(options, externalEntities) { + this.options = options; + this.currentNode = null; + this.tagsNodeStack = []; + this.parseXml = parseXml; + this.parseTextData = parseTextData; + this.resolveNameSpace = resolveNameSpace; + this.buildAttributesMap = buildAttributesMap; + this.isItStopNode = isItStopNode; + this.replaceEntitiesValue = OrderedObjParser_replaceEntitiesValue; + this.readStopNodeData = readStopNodeData; + this.saveTextToParentTag = saveTextToParentTag; + this.addChild = addChild; + this.ignoreAttributesFn = ignoreAttributes_getIgnoreAttributesFn(this.options.ignoreAttributes) + this.entityExpansionCount = 0; + this.currentExpandedLength = 0; + let namedEntities = { ...XML }; + if (this.options.entityDecoder) { + this.entityDecoder = this.options.entityDecoder + } else { + if (typeof this.options.htmlEntities === "object") namedEntities = this.options.htmlEntities; + else if (this.options.htmlEntities === true) namedEntities = { ...COMMON_HTML, ...CURRENCY }; + this.entityDecoder = new EntityDecoder({ + namedEntities: { ...namedEntities, ...externalEntities }, + numericAllowed: this.options.htmlEntities, + limit: { + maxTotalExpansions: this.options.processEntities.maxTotalExpansions, + maxExpandedLength: this.options.processEntities.maxExpandedLength, + applyLimitsTo: this.options.processEntities.appliesTo, + } + //postCheck: resolved => resolved + }); + } + + // Initialize path matcher for path-expression-matcher + this.matcher = new Matcher(); + this.readonlyMatcher = this.matcher.readOnly(); + + // Flag to track if current node is a stop node (optimization) + this.isCurrentNodeStopNode = false; + + // Pre-compile stopNodes expressions + this.stopNodeExpressionsSet = new ExpressionSet(); + const stopNodesOpts = this.options.stopNodes; + if (stopNodesOpts && stopNodesOpts.length > 0) { + for (let i = 0; i < stopNodesOpts.length; i++) { + const stopNodeExp = stopNodesOpts[i]; + if (typeof stopNodeExp === 'string') { + // Convert string to Expression object + this.stopNodeExpressionsSet.add(new Expression(stopNodeExp)); + } else if (stopNodeExp instanceof Expression) { + // Already an Expression object + this.stopNodeExpressionsSet.add(stopNodeExp); + } + } + this.stopNodeExpressionsSet.seal(); + } + } + +} + + +/** + * @param {string} val + * @param {string} tagName + * @param {string|Matcher} jPath - jPath string or Matcher instance based on options.jPath + * @param {boolean} dontTrim + * @param {boolean} hasAttributes + * @param {boolean} isLeafNode + * @param {boolean} escapeEntities + */ +function parseTextData(val, tagName, jPath, dontTrim, hasAttributes, isLeafNode, escapeEntities) { + const options = this.options; + if (val !== undefined) { + if (options.trimValues && !dontTrim) { + val = val.trim(); + } + if (val.length > 0) { + if (!escapeEntities) val = this.replaceEntitiesValue(val, tagName, jPath); + + // Pass jPath string or matcher based on options.jPath setting + const jPathOrMatcher = options.jPath ? jPath.toString() : jPath; + const newval = options.tagValueProcessor(tagName, val, jPathOrMatcher, hasAttributes, isLeafNode); + if (newval === null || newval === undefined) { + //don't parse + return val; + } else if (typeof newval !== typeof val || newval !== val) { + //overwrite + return newval; + } else if (options.trimValues) { + return parseValue(val, options.parseTagValue, options.numberParseOptions); + } else { + const trimmedVal = val.trim(); + if (trimmedVal === val) { + return parseValue(val, options.parseTagValue, options.numberParseOptions); + } else { + return val; + } + } + } + } +} + +function resolveNameSpace(tagname) { + if (this.options.removeNSPrefix) { + const tags = tagname.split(':'); + const prefix = tagname.charAt(0) === '/' ? '/' : ''; + if (tags[0] === 'xmlns') { + return ''; + } + if (tags.length === 2) { + tagname = prefix + tags[1]; + } + } + return tagname; +} + +//TODO: change regex to capture NS +//const attrsRegx = new RegExp("([\\w\\-\\.\\:]+)\\s*=\\s*(['\"])((.|\n)*?)\\2","gm"); +const attrsRegx = new RegExp('([^\\s=]+)\\s*(=\\s*([\'"])([\\s\\S]*?)\\3)?', 'gm'); + +function buildAttributesMap(attrStr, jPath, tagName, force = false) { + const options = this.options; + if (force === true || (options.ignoreAttributes !== true && typeof attrStr === 'string')) { + // attrStr = attrStr.replace(/\r?\n/g, ' '); + //attrStr = attrStr || attrStr.trim(); + + const matches = getAllMatches(attrStr, attrsRegx); + const len = matches.length; //don't make it inline + const attrs = {}; + + // Pre-process values once: trim + entity replacement + // Reused in both matcher update and second pass + const processedVals = new Array(len); + let hasRawAttrs = false; + const rawAttrsForMatcher = {}; + + for (let i = 0; i < len; i++) { + const attrName = this.resolveNameSpace(matches[i][1]); + const oldVal = matches[i][4]; + + if (attrName.length && oldVal !== undefined) { + let val = oldVal; + if (options.trimValues) val = val.trim(); + val = this.replaceEntitiesValue(val, tagName, this.readonlyMatcher); + processedVals[i] = val; + + rawAttrsForMatcher[attrName] = val; + hasRawAttrs = true; + } + } + + // Update matcher ONCE before second pass, if applicable + if (hasRawAttrs && typeof jPath === 'object' && jPath.updateCurrent) { + jPath.updateCurrent(rawAttrsForMatcher); + } + + // Hoist toString() once — path doesn't change during attribute processing + const jPathStr = options.jPath ? jPath.toString() : this.readonlyMatcher; + + // Second pass: apply processors, build final attrs + let hasAttrs = false; + for (let i = 0; i < len; i++) { + const attrName = this.resolveNameSpace(matches[i][1]); + + if (this.ignoreAttributesFn(attrName, jPathStr)) continue; + + let aName = options.attributeNamePrefix + attrName; + + if (attrName.length) { + if (options.transformAttributeName) { + aName = options.transformAttributeName(aName); + } + aName = sanitizeName(aName, options); + + if (matches[i][4] !== undefined) { + // Reuse already-processed value — no double entity replacement + const oldVal = processedVals[i]; + + const newVal = options.attributeValueProcessor(attrName, oldVal, jPathStr); + if (newVal === null || newVal === undefined) { + attrs[aName] = oldVal; + } else if (typeof newVal !== typeof oldVal || newVal !== oldVal) { + attrs[aName] = newVal; + } else { + attrs[aName] = parseValue(oldVal, options.parseAttributeValue, options.numberParseOptions); } hasAttrs = true; - } else if (this.options.allowBooleanAttributes) { + } else if (options.allowBooleanAttributes) { attrs[aName] = true; hasAttrs = true; } @@ -55260,9 +58337,9 @@ function buildAttributesMap(attrStr, jPath, tagName) { if (!hasAttrs) return; - if (this.options.attributesGroupName) { + if (options.attributesGroupName && !options.preserveOrder) { const attrCollection = {}; - attrCollection[this.options.attributesGroupName] = attrs; + attrCollection[options.attributesGroupName] = attrs; return attrCollection; } return attrs; @@ -55276,29 +58353,32 @@ const parseXml = function (xmlData) { // Reset matcher for new document this.matcher.reset(); + this.entityDecoder.reset(); // Reset entity expansion counters for this document this.entityExpansionCount = 0; this.currentExpandedLength = 0; - - const docTypeReader = new DocTypeReader(this.options.processEntities); - for (let i = 0; i < xmlData.length; i++) {//for each char in XML data + const options = this.options; + const docTypeReader = new DocTypeReader(options.processEntities); + const xmlLen = xmlData.length; + for (let i = 0; i < xmlLen; i++) {//for each char in XML data const ch = xmlData[i]; if (ch === '<') { // const nextIndex = i+1; // const _2ndChar = xmlData[nextIndex]; - if (xmlData[i + 1] === '/') {//Closing Tag + const c1 = xmlData.charCodeAt(i + 1); + if (c1 === 47) {//Closing Tag '/' const closeIndex = findClosingIndex(xmlData, ">", i, "Closing Tag is not closed.") let tagName = xmlData.substring(i + 2, closeIndex).trim(); - if (this.options.removeNSPrefix) { + if (options.removeNSPrefix) { const colonIndex = tagName.indexOf(":"); if (colonIndex !== -1) { tagName = tagName.substr(colonIndex + 1); } } - tagName = transformTagName(this.options.transformTagName, tagName, "", this.options).tagName; + tagName = transformTagName(options.transformTagName, tagName, "", options).tagName; if (currentNode) { textData = this.saveTextToParentTag(textData, currentNode, this.readonlyMatcher); @@ -55306,10 +58386,10 @@ const parseXml = function (xmlData) { //check if last tag of nested tag was unpaired tag const lastTagName = this.matcher.getCurrentTag(); - if (tagName && this.options.unpairedTags.indexOf(tagName) !== -1) { + if (tagName && options.unpairedTagsSet.has(tagName)) { throw new Error(`Unpaired tag can not be used as closing tag: `); } - if (lastTagName && this.options.unpairedTags.indexOf(lastTagName) !== -1) { + if (lastTagName && options.unpairedTagsSet.has(lastTagName)) { // Pop the unpaired tag this.matcher.pop(); this.tagsNodeStack.pop(); @@ -55321,42 +58401,52 @@ const parseXml = function (xmlData) { currentNode = this.tagsNodeStack.pop();//avoid recursion, set the parent tag scope textData = ""; i = closeIndex; - } else if (xmlData[i + 1] === '?') { + } else if (c1 === 63) { //'?' let tagData = readTagExp(xmlData, i, false, "?>"); if (!tagData) throw new Error("Pi Tag is not closed."); textData = this.saveTextToParentTag(textData, currentNode, this.readonlyMatcher); - if ((this.options.ignoreDeclaration && tagData.tagName === "?xml") || this.options.ignorePiTags) { + const attsMap = this.buildAttributesMap(tagData.tagExp, this.matcher, tagData.tagName, true); + if (attsMap) { + const ver = attsMap[this.options.attributeNamePrefix + "version"]; + this.entityDecoder.setXmlVersion(Number(ver) || 1.0); + docTypeReader.setXmlVersion(Number(ver) || 1.0); + } + if ((options.ignoreDeclaration && tagData.tagName === "?xml") || options.ignorePiTags) { //do nothing } else { const childNode = new XmlNode(tagData.tagName); - childNode.add(this.options.textNodeName, ""); + childNode.add(options.textNodeName, ""); - if (tagData.tagName !== tagData.tagExp && tagData.attrExpPresent) { - childNode[":@"] = this.buildAttributesMap(tagData.tagExp, this.matcher, tagData.tagName); + if (tagData.tagName !== tagData.tagExp && tagData.attrExpPresent && options.ignoreAttributes !== true) { + childNode[":@"] = attsMap } this.addChild(currentNode, childNode, this.readonlyMatcher, i); } i = tagData.closeIndex + 1; - } else if (xmlData.substr(i + 1, 3) === '!--') { + } else if (c1 === 33 + && xmlData.charCodeAt(i + 2) === 45 + && xmlData.charCodeAt(i + 3) === 45) { //'!--' const endIndex = findClosingIndex(xmlData, "-->", i + 4, "Comment is not closed.") - if (this.options.commentPropName) { + if (options.commentPropName) { const comment = xmlData.substring(i + 4, endIndex - 2); textData = this.saveTextToParentTag(textData, currentNode, this.readonlyMatcher); - currentNode.add(this.options.commentPropName, [{ [this.options.textNodeName]: comment }]); + currentNode.add(options.commentPropName, [{ [options.textNodeName]: comment }]); } i = endIndex; - } else if (xmlData.substr(i + 1, 2) === '!D') { + } else if (c1 === 33 + && xmlData.charCodeAt(i + 2) === 68) { //'!D' const result = docTypeReader.readDocType(xmlData, i); - this.docTypeEntities = result.entities; + this.entityDecoder.addInputEntities(result.entities); i = result.i; - } else if (xmlData.substr(i + 1, 2) === '![') { + } else if (c1 === 33 + && xmlData.charCodeAt(i + 2) === 91) { // '![' const closeIndex = findClosingIndex(xmlData, "]]>", i, "CDATA is not closed.") - 2; const tagExp = xmlData.substring(i + 9, closeIndex); @@ -55366,20 +58456,20 @@ const parseXml = function (xmlData) { if (val == undefined) val = ""; //cdata should be set even if it is 0 length string - if (this.options.cdataPropName) { - currentNode.add(this.options.cdataPropName, [{ [this.options.textNodeName]: tagExp }]); + if (options.cdataPropName) { + currentNode.add(options.cdataPropName, [{ [options.textNodeName]: tagExp }]); } else { - currentNode.add(this.options.textNodeName, val); + currentNode.add(options.textNodeName, val); } i = closeIndex + 2; } else {//Opening tag - let result = readTagExp(xmlData, i, this.options.removeNSPrefix); + let result = readTagExp(xmlData, i, options.removeNSPrefix); // Safety check: readTagExp can return undefined if (!result) { // Log context for debugging - const context = xmlData.substring(Math.max(0, i - 50), Math.min(xmlData.length, i + 50)); + const context = xmlData.substring(Math.max(0, i - 50), Math.min(xmlLen, i + 50)); throw new Error(`readTagExp returned undefined at position ${i}. Context: "${context}"`); } @@ -55389,13 +58479,13 @@ const parseXml = function (xmlData) { let attrExpPresent = result.attrExpPresent; let closeIndex = result.closeIndex; - ({ tagName, tagExp } = transformTagName(this.options.transformTagName, tagName, tagExp, this.options)); + ({ tagName, tagExp } = transformTagName(options.transformTagName, tagName, tagExp, options)); - if (this.options.strictReservedNames && - (tagName === this.options.commentPropName - || tagName === this.options.cdataPropName - || tagName === this.options.textNodeName - || tagName === this.options.attributesGroupName + if (options.strictReservedNames && + (tagName === options.commentPropName + || tagName === options.cdataPropName + || tagName === options.textNodeName + || tagName === options.attributesGroupName )) { throw new Error(`Invalid tag name: ${tagName}`); } @@ -55410,7 +58500,7 @@ const parseXml = function (xmlData) { //check if last tag was unpaired tag const lastTag = currentNode; - if (lastTag && this.options.unpairedTags.indexOf(lastTag.tagname) !== -1) { + if (lastTag && options.unpairedTagsSet.has(lastTag.tagname)) { currentNode = this.tagsNodeStack.pop(); this.matcher.pop(); } @@ -55452,13 +58542,14 @@ const parseXml = function (xmlData) { if (prefixedAttrs) { // Extract raw attributes (without prefix) for our use - rawAttrs = extractRawAttributes(prefixedAttrs, this.options); + //TODO: seems a performance overhead + rawAttrs = extractRawAttributes(prefixedAttrs, options); } } // Now check if this is a stop node (after attributes are set) if (tagName !== xmlObj.tagname) { - this.isCurrentNodeStopNode = this.isItStopNode(this.stopNodeExpressions, this.matcher); + this.isCurrentNodeStopNode = this.isItStopNode(); } const startIndex = i; @@ -55470,7 +58561,7 @@ const parseXml = function (xmlData) { i = result.closeIndex; } //unpaired tag - else if (this.options.unpairedTags.indexOf(tagName) !== -1) { + else if (options.unpairedTagsSet.has(tagName)) { i = result.closeIndex; } //normal tag @@ -55489,7 +58580,7 @@ const parseXml = function (xmlData) { } // For stop nodes, store raw content as-is without any processing - childNode.add(this.options.textNodeName, tagContent); + childNode.add(options.textNodeName, tagContent); this.matcher.pop(); // Pop the stop node tag this.isCurrentNodeStopNode = false; // Reset flag @@ -55498,7 +58589,7 @@ const parseXml = function (xmlData) { } else { //selfClosing tag if (isSelfClosing) { - ({ tagName, tagExp } = transformTagName(this.options.transformTagName, tagName, tagExp, this.options)); + ({ tagName, tagExp } = transformTagName(options.transformTagName, tagName, tagExp, options)); const childNode = new XmlNode(tagName); if (prefixedAttrs) { @@ -55508,7 +58599,7 @@ const parseXml = function (xmlData) { this.matcher.pop(); // Pop self-closing tag this.isCurrentNodeStopNode = false; // Reset flag } - else if (this.options.unpairedTags.indexOf(tagName) !== -1) {//unpaired tag + else if (options.unpairedTagsSet.has(tagName)) {//unpaired tag const childNode = new XmlNode(tagName); if (prefixedAttrs) { childNode[":@"] = prefixedAttrs; @@ -55523,7 +58614,7 @@ const parseXml = function (xmlData) { //opening tag else { const childNode = new XmlNode(tagName); - if (this.tagsNodeStack.length > this.options.maxNestedTags) { + if (this.tagsNodeStack.length > options.maxNestedTags) { throw new Error("Maximum nested tags exceeded"); } this.tagsNodeStack.push(currentNode); @@ -55594,80 +58685,7 @@ function OrderedObjParser_replaceEntitiesValue(val, tagName, jPath) { } } - // Replace DOCTYPE entities - for (const entityName of Object.keys(this.docTypeEntities)) { - const entity = this.docTypeEntities[entityName]; - const matches = val.match(entity.regx); - - if (matches) { - // Track expansions - this.entityExpansionCount += matches.length; - - // Check expansion limit - if (entityConfig.maxTotalExpansions && - this.entityExpansionCount > entityConfig.maxTotalExpansions) { - throw new Error( - `Entity expansion limit exceeded: ${this.entityExpansionCount} > ${entityConfig.maxTotalExpansions}` - ); - } - - // Store length before replacement - const lengthBefore = val.length; - val = val.replace(entity.regx, entity.val); - - // Check expanded length immediately after replacement - if (entityConfig.maxExpandedLength) { - this.currentExpandedLength += (val.length - lengthBefore); - - if (this.currentExpandedLength > entityConfig.maxExpandedLength) { - throw new Error( - `Total expanded content size exceeded: ${this.currentExpandedLength} > ${entityConfig.maxExpandedLength}` - ); - } - } - } - } - if (val.indexOf('&') === -1) return val; - // Replace standard entities - for (const entityName of Object.keys(this.lastEntities)) { - const entity = this.lastEntities[entityName]; - const matches = val.match(entity.regex); - if (matches) { - this.entityExpansionCount += matches.length; - if (entityConfig.maxTotalExpansions && - this.entityExpansionCount > entityConfig.maxTotalExpansions) { - throw new Error( - `Entity expansion limit exceeded: ${this.entityExpansionCount} > ${entityConfig.maxTotalExpansions}` - ); - } - } - val = val.replace(entity.regex, entity.val); - } - if (val.indexOf('&') === -1) return val; - - // Replace HTML entities if enabled - if (this.options.htmlEntities) { - for (const entityName of Object.keys(this.htmlEntities)) { - const entity = this.htmlEntities[entityName]; - const matches = val.match(entity.regex); - if (matches) { - //console.log(matches); - this.entityExpansionCount += matches.length; - if (entityConfig.maxTotalExpansions && - this.entityExpansionCount > entityConfig.maxTotalExpansions) { - throw new Error( - `Entity expansion limit exceeded: ${this.entityExpansionCount} > ${entityConfig.maxTotalExpansions}` - ); - } - } - val = val.replace(entity.regex, entity.val); - } - } - - // Replace ampersand entity last - val = val.replace(this.ampEntity.regex, this.ampEntity.val); - - return val; + return this.entityDecoder.decode(val); } @@ -55689,20 +58707,14 @@ function saveTextToParentTag(textData, parentNode, matcher, isLeafNode) { return textData; } -//TODO: use jPath to simplify the logic /** * @param {Array} stopNodeExpressions - Array of compiled Expression objects * @param {Matcher} matcher - Current path matcher */ -function isItStopNode(stopNodeExpressions, matcher) { - if (!stopNodeExpressions || stopNodeExpressions.length === 0) return false; +function isItStopNode() { + if (this.stopNodeExpressionsSet.size === 0) return false; - for (let i = 0; i < stopNodeExpressions.length; i++) { - if (matcher.matches(stopNodeExpressions[i])) { - return true; - } - } - return false; + return this.matcher.matchesAny(this.stopNodeExpressionsSet); } /** @@ -55712,32 +58724,38 @@ function isItStopNode(stopNodeExpressions, matcher) { * @returns */ function tagExpWithClosingIndex(xmlData, i, closingChar = ">") { - let attrBoundary; - let tagExp = ""; - for (let index = i; index < xmlData.length; index++) { - let ch = xmlData[index]; + //TODO: ignore boolean attributes in tag expression + //TODO: if ignore attributes, dont read full attribute expression but the end. But read for xml declaration + let attrBoundary = 0; + const len = xmlData.length; + const closeCode0 = closingChar.charCodeAt(0); + const closeCode1 = closingChar.length > 1 ? closingChar.charCodeAt(1) : -1; + + let result = ''; + let segmentStart = i; + + for (let index = i; index < len; index++) { + const code = xmlData.charCodeAt(index); + if (attrBoundary) { - if (ch === attrBoundary) attrBoundary = "";//reset - } else if (ch === '"' || ch === "'") { - attrBoundary = ch; - } else if (ch === closingChar[0]) { - if (closingChar[1]) { - if (xmlData[index + 1] === closingChar[1]) { - return { - data: tagExp, - index: index - } + if (code === attrBoundary) attrBoundary = 0; + } else if (code === 34 || code === 39) { // " or ' + attrBoundary = code; + } else if (code === closeCode0) { + if (closeCode1 !== -1) { + if (xmlData.charCodeAt(index + 1) === closeCode1) { + result += xmlData.substring(segmentStart, index); + return { data: result, index }; } } else { - return { - data: tagExp, - index: index - } + result += xmlData.substring(segmentStart, index); + return { data: result, index }; } - } else if (ch === '\t') { - ch = " " + } else if (code === 9 && !attrBoundary) { // \t - only replace with space outside attribute values + // Flush accumulated segment, add space, start new segment + result += xmlData.substring(segmentStart, index) + ' '; + segmentStart = index + 1; } - tagExp += ch; } } @@ -55750,6 +58768,12 @@ function findClosingIndex(xmlData, str, i, errMsg) { } } +function findClosingChar(xmlData, char, i, errMsg) { + const closingIndex = xmlData.indexOf(char, i); + if (closingIndex === -1) throw new Error(errMsg); + return closingIndex; // no offset needed +} + function readTagExp(xmlData, i, removeNSPrefix, closingChar = ">") { const result = tagExpWithClosingIndex(xmlData, i + 1, closingChar); if (!result) return; @@ -55791,10 +58815,12 @@ function readStopNodeData(xmlData, tagName, i) { // Starting at 1 since we already have an open tag let openTagCount = 1; - for (; i < xmlData.length; i++) { + const xmllen = xmlData.length; + for (; i < xmllen; i++) { if (xmlData[i] === "<") { - if (xmlData[i + 1] === "/") {//close tag - const closeIndex = findClosingIndex(xmlData, ">", i, `${tagName} is not closed`); + const c1 = xmlData.charCodeAt(i + 1); + if (c1 === 47) {//close tag '/' + const closeIndex = findClosingChar(xmlData, ">", i, `${tagName} is not closed`); let closeTagName = xmlData.substring(i + 2, closeIndex).trim(); if (closeTagName === tagName) { openTagCount--; @@ -55806,17 +58832,20 @@ function readStopNodeData(xmlData, tagName, i) { } } i = closeIndex; - } else if (xmlData[i + 1] === '?') { + } else if (c1 === 63) { //? const closeIndex = findClosingIndex(xmlData, "?>", i + 1, "StopNode is not closed.") i = closeIndex; - } else if (xmlData.substr(i + 1, 3) === '!--') { + } else if (c1 === 33 + && xmlData.charCodeAt(i + 2) === 45 + && xmlData.charCodeAt(i + 3) === 45) { // '!--' const closeIndex = findClosingIndex(xmlData, "-->", i + 3, "StopNode is not closed.") i = closeIndex; - } else if (xmlData.substr(i + 1, 2) === '![') { + } else if (c1 === 33 + && xmlData.charCodeAt(i + 2) === 91) { // '![' const closeIndex = findClosingIndex(xmlData, "]]>", i, "StopNode is not closed.") - 2; i = closeIndex; } else { - const tagData = readTagExp(xmlData, i, '>') + const tagData = readTagExp(xmlData, i, false) if (tagData) { const openTagName = tagData && tagData.tagName; @@ -55952,6 +58981,10 @@ function compress(arr, options, matcher, readonlyMatcher) { let val = compress(tagObj[property], options, matcher, readonlyMatcher); const isLeaf = isLeafTag(val, options); + if (Object.keys(val).length === 0 && options.alwaysCreateTextNode) { + val[options.textNodeName] = ""; + } + if (tagObj[":@"]) { assignAttributes(val, tagObj[":@"], readonlyMatcher, options); } else if (Object.keys(val).length === 1 && val[options.textNodeName] !== undefined && !options.alwaysCreateTextNode) { @@ -56081,13 +59114,13 @@ class XMLParser { if (validationOption) { if (validationOption === true) validationOption = {}; //validate with default options - const result = validate(xmlData, validationOption); + const result = validator_validate(xmlData, validationOption); if (result !== true) { throw Error(`${result.err.msg}:${result.err.line}:${result.err.col}`) } } - const orderedObjParser = new OrderedObjParser(this.options); - orderedObjParser.addExternalEntities(this.externalEntities); + const orderedObjParser = new OrderedObjParser(this.options, this.externalEntities); + // orderedObjParser.entityDecoder.setExternalEntities(this.externalEntities); const orderedResult = orderedObjParser.parseXml(xmlData); if (this.options.preserveOrder || orderedResult === undefined) return orderedResult; else return prettify(orderedResult, this.options, orderedObjParser.matcher, orderedObjParser.readonlyMatcher); @@ -56142,20 +59175,34 @@ const xml_common_XML_CHARKEY = "_"; function getCommonOptions(options) { - var _a; return { attributesGroupName: xml_common_XML_ATTRKEY, - textNodeName: (_a = options.xmlCharKey) !== null && _a !== void 0 ? _a : xml_common_XML_CHARKEY, + textNodeName: options.xmlCharKey ?? xml_common_XML_CHARKEY, ignoreAttributes: false, suppressBooleanAttributes: false, }; } function getSerializerOptions(options = {}) { - var _a, _b; - return Object.assign(Object.assign({}, getCommonOptions(options)), { attributeNamePrefix: "@_", format: true, suppressEmptyNode: true, indentBy: "", rootNodeName: (_a = options.rootName) !== null && _a !== void 0 ? _a : "root", cdataPropName: (_b = options.cdataPropName) !== null && _b !== void 0 ? _b : "__cdata" }); + return { + ...getCommonOptions(options), + attributeNamePrefix: "@_", + format: true, + suppressEmptyNode: true, + indentBy: "", + rootNodeName: options.rootName ?? "root", + cdataPropName: options.cdataPropName ?? "__cdata", + }; } function getParserOptions(options = {}) { - return Object.assign(Object.assign({}, getCommonOptions(options)), { parseAttributeValue: false, parseTagValue: false, attributeNamePrefix: "", stopNodes: options.stopNodes, processEntities: true, trimValues: false }); + return { + ...getCommonOptions(options), + parseAttributeValue: false, + parseTagValue: false, + attributeNamePrefix: "", + stopNodes: options.stopNodes, + processEntities: true, + trimValues: false, + }; } /** * Converts given JSON object to XML string @@ -56194,7 +59241,7 @@ async function parseXML(str, opts = {}) { if (!opts.includeRoot) { for (const key of Object.keys(parsedXml)) { const value = parsedXml[key]; - return typeof value === "object" ? Object.assign({}, value) : value; + return typeof value === "object" ? { ...value } : value; } } return parsedXml; @@ -56684,6 +59731,3622 @@ class BufferScheduler { } } //# sourceMappingURL=BufferScheduler.js.map +;// CONCATENATED MODULE: external "node:module" +const external_node_module_namespaceObject = __WEBPACK_EXTERNAL_createRequire(import.meta.url)("node:module"); +;// CONCATENATED MODULE: external "node:path" +const external_node_path_namespaceObject = __WEBPACK_EXTERNAL_createRequire(import.meta.url)("node:path"); +// EXTERNAL MODULE: external "node:url" +var external_node_url_ = __nccwpck_require__(3136); +;// CONCATENATED MODULE: ./node_modules/@azure/storage-common/dist/esm/crc64.js +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +// ESM-COMPAT-START (this block is stripped from dist/commonjs by copyJSFiles.cjs) +// In ESM under Node, `require`, `__filename`, and `__dirname` are not defined. +// Synthesize them from `import.meta.url` so the Emscripten Node branch below works as-is. +// Specifiers are held in variables to prevent web bundlers from statically resolving `node:*`. +// The detection check below MUST stay byte-for-byte identical to the Emscripten-generated +// `ENVIRONMENT_IS_NODE` check later in this file; otherwise the polyfill and the Node branch +// can disagree and the ESM `ReferenceError: require is not defined` bug returns. + + + +const __isNode__ = + typeof process === "object" && + typeof process.versions === "object" && + typeof process.versions.node === "string"; +let crc64_require; +let crc64_filename; +let crc64_dirname; +if (__isNode__) { + crc64_require = (0,external_node_module_namespaceObject.createRequire)(import.meta.url); + crc64_filename = (0,external_node_url_.fileURLToPath)(import.meta.url); + crc64_dirname = (0,external_node_path_namespaceObject.dirname)(crc64_filename); +} +// ESM-COMPAT-END + +var NativeCRC64 = (() => { + var _scriptDir = typeof document !== 'undefined' && document.currentScript ? document.currentScript.src : undefined; + if (typeof crc64_filename !== 'undefined') _scriptDir = _scriptDir || crc64_filename; + return ( +function(NativeCRC64) { + NativeCRC64 = NativeCRC64 || {}; + + + +// The Module object: Our interface to the outside world. We import +// and export values on it. There are various ways Module can be used: +// 1. Not defined. We create it here +// 2. A function parameter, function(Module) { ..generated code.. } +// 3. pre-run appended it, var Module = {}; ..generated code.. +// 4. External script tag defines var Module. +// We need to check if Module already exists (e.g. case 3 above). +// Substitution will be replaced with actual code on later stage of the build, +// this way Closure Compiler will not mangle it (e.g. case 4. above). +// Note that if you want to run closure, and also to use Module +// after the generated code, you will need to define var Module = {}; +// before the code. Then that object will be used in the code, and you +// can continue to use Module afterwards as well. +var Module = typeof NativeCRC64 != 'undefined' ? NativeCRC64 : {}; + +// See https://caniuse.com/mdn-javascript_builtins_object_assign + +// See https://caniuse.com/mdn-javascript_builtins_bigint64array + +// Set up the promise that indicates the Module is initialized +var readyPromiseResolve, readyPromiseReject; +Module['ready'] = new Promise(function(resolve, reject) { + readyPromiseResolve = resolve; + readyPromiseReject = reject; +}); +["_malloc","_free","_emscripten_bind_VoidPtr___destroy___0","_emscripten_bind_Crc64Hash_Crc64Hash_0","_emscripten_bind_Crc64Hash_OnAppend_2","_emscripten_bind_Crc64Hash_OnFinal_3","_emscripten_bind_Crc64Hash___destroy___0","_fflush","onRuntimeInitialized"].forEach((prop) => { + if (!Object.getOwnPropertyDescriptor(Module['ready'], prop)) { + Object.defineProperty(Module['ready'], prop, { + get: () => abort('You are getting ' + prop + ' on the Promise object, instead of the instance. Use .then() to get called back with the instance, see the MODULARIZE docs in src/settings.js'), + set: () => abort('You are setting ' + prop + ' on the Promise object, instead of the instance. Use .then() to get called back with the instance, see the MODULARIZE docs in src/settings.js'), + }); + } +}); + +// --pre-jses are emitted after the Module integration code, so that they can +// refer to Module (if they choose; they can also define Module) + + +// Sometimes an existing Module object exists with properties +// meant to overwrite the default module functionality. Here +// we collect those properties and reapply _after_ we configure +// the current environment's defaults to avoid having to be so +// defensive during initialization. +var moduleOverrides = Object.assign({}, Module); + +var arguments_ = []; +var thisProgram = './this.program'; +var quit_ = (status, toThrow) => { + throw toThrow; +}; + +// Determine the runtime environment we are in. You can customize this by +// setting the ENVIRONMENT setting at compile time (see settings.js). + +// Attempt to auto-detect the environment +var ENVIRONMENT_IS_WEB = typeof window == 'object'; +var ENVIRONMENT_IS_WORKER = typeof importScripts == 'function'; +// N.b. Electron.js environment is simultaneously a NODE-environment, but +// also a web environment. +var ENVIRONMENT_IS_NODE = typeof process == 'object' && typeof process.versions == 'object' && typeof process.versions.node == 'string'; +var ENVIRONMENT_IS_SHELL = !ENVIRONMENT_IS_WEB && !ENVIRONMENT_IS_NODE && !ENVIRONMENT_IS_WORKER; + +if (Module['ENVIRONMENT']) { + throw new Error('Module.ENVIRONMENT has been deprecated. To force the environment, use the ENVIRONMENT compile-time option (for example, -sENVIRONMENT=web or -sENVIRONMENT=node)'); +} + +// `/` should be present at the end if `scriptDirectory` is not empty +var scriptDirectory = ''; +function locateFile(path) { + if (Module['locateFile']) { + return Module['locateFile'](path, scriptDirectory); + } + return scriptDirectory + path; +} + +// Hooks that are implemented differently in different runtime environments. +var read_, + readAsync, + readBinary, + setWindowTitle; + +// Normally we don't log exceptions but instead let them bubble out the top +// level where the embedding environment (e.g. the browser) can handle +// them. +// However under v8 and node we sometimes exit the process direcly in which case +// its up to use us to log the exception before exiting. +// If we fix https://github.com/emscripten-core/emscripten/issues/15080 +// this may no longer be needed under node. +function logExceptionOnExit(e) { + if (e instanceof ExitStatus) return; + let toLog = e; + if (e && typeof e == 'object' && e.stack) { + toLog = [e, e.stack]; + } + err('exiting due to exception: ' + toLog); +} + +if (ENVIRONMENT_IS_NODE) { + if (typeof process == 'undefined' || !process.release || process.release.name !== 'node') throw new Error('not compiled for this environment (did you build to HTML and try to run it not on the web, or set ENVIRONMENT to something - like node - and run it someplace else - like on the web?)'); + // `require()` is no-op in an ESM module, use `createRequire()` to construct + // the require()` function. This is only necessary for multi-environment + // builds, `-sENVIRONMENT=node` emits a static import declaration instead. + // TODO: Swap all `require()`'s with `import()`'s? + // These modules will usually be used on Node.js. Load them eagerly to avoid + // the complexity of lazy-loading. + var fs = crc64_require('fs'); + var nodePath = crc64_require('path'); + + if (ENVIRONMENT_IS_WORKER) { + scriptDirectory = nodePath.dirname(scriptDirectory) + '/'; + } else { + scriptDirectory = crc64_dirname + '/'; + } + +// include: node_shell_read.js + + +read_ = (filename, binary) => { + // We need to re-wrap `file://` strings to URLs. Normalizing isn't + // necessary in that case, the path should already be absolute. + filename = isFileURI(filename) ? new URL(filename) : nodePath.normalize(filename); + return fs.readFileSync(filename, binary ? undefined : 'utf8'); +}; + +readBinary = (filename) => { + var ret = read_(filename, true); + if (!ret.buffer) { + ret = new Uint8Array(ret); + } + assert(ret.buffer); + return ret; +}; + +readAsync = (filename, onload, onerror) => { + // See the comment in the `read_` function. + filename = isFileURI(filename) ? new URL(filename) : nodePath.normalize(filename); + fs.readFile(filename, function(err, data) { + if (err) onerror(err); + else onload(data.buffer); + }); +}; + +// end include: node_shell_read.js + if (process['argv'].length > 1) { + thisProgram = process['argv'][1].replace(/\\/g, '/'); + } + + arguments_ = process['argv'].slice(2); + + // MODULARIZE will export the module in the proper place outside, we don't need to export here + + process['on']('uncaughtException', function(ex) { + // suppress ExitStatus exceptions from showing an error + if (!(ex instanceof ExitStatus)) { + throw ex; + } + }); + + // Without this older versions of node (< v15) will log unhandled rejections + // but return 0, which is not normally the desired behaviour. This is + // not be needed with node v15 and about because it is now the default + // behaviour: + // See https://nodejs.org/api/cli.html#cli_unhandled_rejections_mode + process['on']('unhandledRejection', function(reason) { throw reason; }); + + quit_ = (status, toThrow) => { + if (keepRuntimeAlive()) { + process['exitCode'] = status; + throw toThrow; + } + logExceptionOnExit(toThrow); + process['exit'](status); + }; + + Module['inspect'] = function () { return '[Emscripten Module object]'; }; + +} else +if (ENVIRONMENT_IS_SHELL) { + + if ((typeof process == 'object' && typeof crc64_require === 'function') || typeof window == 'object' || typeof importScripts == 'function') throw new Error('not compiled for this environment (did you build to HTML and try to run it not on the web, or set ENVIRONMENT to something - like node - and run it someplace else - like on the web?)'); + + if (typeof read != 'undefined') { + read_ = function shell_read(f) { + return read(f); + }; + } + + readBinary = function readBinary(f) { + let data; + if (typeof readbuffer == 'function') { + return new Uint8Array(readbuffer(f)); + } + data = read(f, 'binary'); + assert(typeof data == 'object'); + return data; + }; + + readAsync = function readAsync(f, onload, onerror) { + setTimeout(() => onload(readBinary(f)), 0); + }; + + if (typeof scriptArgs != 'undefined') { + arguments_ = scriptArgs; + } else if (typeof arguments != 'undefined') { + arguments_ = arguments; + } + + if (typeof quit == 'function') { + quit_ = (status, toThrow) => { + logExceptionOnExit(toThrow); + quit(status); + }; + } + + if (typeof print != 'undefined') { + // Prefer to use print/printErr where they exist, as they usually work better. + if (typeof console == 'undefined') console = /** @type{!Console} */({}); + console.log = /** @type{!function(this:Console, ...*): undefined} */ (print); + console.warn = console.error = /** @type{!function(this:Console, ...*): undefined} */ (typeof printErr != 'undefined' ? printErr : print); + } + +} else + +// Note that this includes Node.js workers when relevant (pthreads is enabled). +// Node.js workers are detected as a combination of ENVIRONMENT_IS_WORKER and +// ENVIRONMENT_IS_NODE. +if (ENVIRONMENT_IS_WEB || ENVIRONMENT_IS_WORKER) { + if (ENVIRONMENT_IS_WORKER) { // Check worker, not web, since window could be polyfilled + scriptDirectory = self.location.href; + } else if (typeof document != 'undefined' && document.currentScript) { // web + scriptDirectory = document.currentScript.src; + } + // When MODULARIZE, this JS may be executed later, after document.currentScript + // is gone, so we saved it, and we use it here instead of any other info. + if (_scriptDir) { + scriptDirectory = _scriptDir; + } + // blob urls look like blob:http://site.com/etc/etc and we cannot infer anything from them. + // otherwise, slice off the final part of the url to find the script directory. + // if scriptDirectory does not contain a slash, lastIndexOf will return -1, + // and scriptDirectory will correctly be replaced with an empty string. + // If scriptDirectory contains a query (starting with ?) or a fragment (starting with #), + // they are removed because they could contain a slash. + if (scriptDirectory.indexOf('blob:') !== 0) { + scriptDirectory = scriptDirectory.substr(0, scriptDirectory.replace(/[?#].*/, "").lastIndexOf('/')+1); + } else { + scriptDirectory = ''; + } + + if (!(typeof window == 'object' || typeof importScripts == 'function')) throw new Error('not compiled for this environment (did you build to HTML and try to run it not on the web, or set ENVIRONMENT to something - like node - and run it someplace else - like on the web?)'); + + // Differentiate the Web Worker from the Node Worker case, as reading must + // be done differently. + { +// include: web_or_worker_shell_read.js + + + read_ = (url) => { + var xhr = new XMLHttpRequest(); + xhr.open('GET', url, false); + xhr.send(null); + return xhr.responseText; + } + + if (ENVIRONMENT_IS_WORKER) { + readBinary = (url) => { + var xhr = new XMLHttpRequest(); + xhr.open('GET', url, false); + xhr.responseType = 'arraybuffer'; + xhr.send(null); + return new Uint8Array(/** @type{!ArrayBuffer} */(xhr.response)); + }; + } + + readAsync = (url, onload, onerror) => { + var xhr = new XMLHttpRequest(); + xhr.open('GET', url, true); + xhr.responseType = 'arraybuffer'; + xhr.onload = () => { + if (xhr.status == 200 || (xhr.status == 0 && xhr.response)) { // file URLs can return 0 + onload(xhr.response); + return; + } + onerror(); + }; + xhr.onerror = onerror; + xhr.send(null); + } + +// end include: web_or_worker_shell_read.js + } + + setWindowTitle = (title) => document.title = title; +} else +{ + throw new Error('environment detection error'); +} + +var out = Module['print'] || console.log.bind(console); +var err = Module['printErr'] || console.warn.bind(console); + +// Merge back in the overrides +Object.assign(Module, moduleOverrides); +// Free the object hierarchy contained in the overrides, this lets the GC +// reclaim data used e.g. in memoryInitializerRequest, which is a large typed array. +moduleOverrides = null; +checkIncomingModuleAPI(); + +// Emit code to handle expected values on the Module object. This applies Module.x +// to the proper local x. This has two benefits: first, we only emit it if it is +// expected to arrive, and second, by using a local everywhere else that can be +// minified. + +if (Module['arguments']) arguments_ = Module['arguments'];legacyModuleProp('arguments', 'arguments_'); + +if (Module['thisProgram']) thisProgram = Module['thisProgram'];legacyModuleProp('thisProgram', 'thisProgram'); + +if (Module['quit']) quit_ = Module['quit'];legacyModuleProp('quit', 'quit_'); + +// perform assertions in shell.js after we set up out() and err(), as otherwise if an assertion fails it cannot print the message +// Assertions on removed incoming Module JS APIs. +assert(typeof Module['memoryInitializerPrefixURL'] == 'undefined', 'Module.memoryInitializerPrefixURL option was removed, use Module.locateFile instead'); +assert(typeof Module['pthreadMainPrefixURL'] == 'undefined', 'Module.pthreadMainPrefixURL option was removed, use Module.locateFile instead'); +assert(typeof Module['cdInitializerPrefixURL'] == 'undefined', 'Module.cdInitializerPrefixURL option was removed, use Module.locateFile instead'); +assert(typeof Module['filePackagePrefixURL'] == 'undefined', 'Module.filePackagePrefixURL option was removed, use Module.locateFile instead'); +assert(typeof Module['read'] == 'undefined', 'Module.read option was removed (modify read_ in JS)'); +assert(typeof Module['readAsync'] == 'undefined', 'Module.readAsync option was removed (modify readAsync in JS)'); +assert(typeof Module['readBinary'] == 'undefined', 'Module.readBinary option was removed (modify readBinary in JS)'); +assert(typeof Module['setWindowTitle'] == 'undefined', 'Module.setWindowTitle option was removed (modify setWindowTitle in JS)'); +assert(typeof Module['TOTAL_MEMORY'] == 'undefined', 'Module.TOTAL_MEMORY has been renamed Module.INITIAL_MEMORY'); +legacyModuleProp('read', 'read_'); +legacyModuleProp('readAsync', 'readAsync'); +legacyModuleProp('readBinary', 'readBinary'); +legacyModuleProp('setWindowTitle', 'setWindowTitle'); +var IDBFS = 'IDBFS is no longer included by default; build with -lidbfs.js'; +var PROXYFS = 'PROXYFS is no longer included by default; build with -lproxyfs.js'; +var WORKERFS = 'WORKERFS is no longer included by default; build with -lworkerfs.js'; +var NODEFS = 'NODEFS is no longer included by default; build with -lnodefs.js'; + +assert(!ENVIRONMENT_IS_SHELL, "shell environment detected but not enabled at build time. Add 'shell' to `-sENVIRONMENT` to enable."); + + + + +var STACK_ALIGN = 16; +var POINTER_SIZE = 4; + +function getNativeTypeSize(type) { + switch (type) { + case 'i1': case 'i8': case 'u8': return 1; + case 'i16': case 'u16': return 2; + case 'i32': case 'u32': return 4; + case 'i64': case 'u64': return 8; + case 'float': return 4; + case 'double': return 8; + default: { + if (type[type.length - 1] === '*') { + return POINTER_SIZE; + } + if (type[0] === 'i') { + const bits = Number(type.substr(1)); + assert(bits % 8 === 0, 'getNativeTypeSize invalid bits ' + bits + ', type ' + type); + return bits / 8; + } + return 0; + } + } +} + +// include: runtime_debug.js + + +function legacyModuleProp(prop, newName) { + if (!Object.getOwnPropertyDescriptor(Module, prop)) { + Object.defineProperty(Module, prop, { + configurable: true, + get: function() { + abort('Module.' + prop + ' has been replaced with plain ' + newName + ' (the initial value can be provided on Module, but after startup the value is only looked for on a local variable of that name)'); + } + }); + } +} + +function ignoredModuleProp(prop) { + if (Object.getOwnPropertyDescriptor(Module, prop)) { + abort('`Module.' + prop + '` was supplied but `' + prop + '` not included in INCOMING_MODULE_JS_API'); + } +} + +// forcing the filesystem exports a few things by default +function isExportedByForceFilesystem(name) { + return name === 'FS_createPath' || + name === 'FS_createDataFile' || + name === 'FS_createPreloadedFile' || + name === 'FS_unlink' || + name === 'addRunDependency' || + // The old FS has some functionality that WasmFS lacks. + name === 'FS_createLazyFile' || + name === 'FS_createDevice' || + name === 'removeRunDependency'; +} + +function missingLibrarySymbol(sym) { + if (typeof globalThis !== 'undefined' && !Object.getOwnPropertyDescriptor(globalThis, sym)) { + Object.defineProperty(globalThis, sym, { + configurable: true, + get: function() { + // Can't `abort()` here because it would break code that does runtime + // checks. e.g. `if (typeof SDL === 'undefined')`. + var msg = '`' + sym + '` is a library symbol and not included by default; add it to your library.js __deps or to DEFAULT_LIBRARY_FUNCS_TO_INCLUDE on the command line'; + // DEFAULT_LIBRARY_FUNCS_TO_INCLUDE requires the name as it appears in + // library.js, which means $name for a JS name with no prefix, or name + // for a JS name like _name. + var librarySymbol = sym; + if (!librarySymbol.startsWith('_')) { + librarySymbol = '$' + sym; + } + msg += " (e.g. -sDEFAULT_LIBRARY_FUNCS_TO_INCLUDE=" + librarySymbol + ")"; + if (isExportedByForceFilesystem(sym)) { + msg += '. Alternatively, forcing filesystem support (-sFORCE_FILESYSTEM) can export this for you'; + } + warnOnce(msg); + return undefined; + } + }); + } +} + +function unexportedRuntimeSymbol(sym) { + if (!Object.getOwnPropertyDescriptor(Module, sym)) { + Object.defineProperty(Module, sym, { + configurable: true, + get: function() { + var msg = "'" + sym + "' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)"; + if (isExportedByForceFilesystem(sym)) { + msg += '. Alternatively, forcing filesystem support (-sFORCE_FILESYSTEM) can export this for you'; + } + abort(msg); + } + }); + } +} + +// end include: runtime_debug.js + + +// === Preamble library stuff === + +// Documentation for the public APIs defined in this file must be updated in: +// site/source/docs/api_reference/preamble.js.rst +// A prebuilt local version of the documentation is available at: +// site/build/text/docs/api_reference/preamble.js.txt +// You can also build docs locally as HTML or other formats in site/ +// An online HTML version (which may be of a different version of Emscripten) +// is up at http://kripken.github.io/emscripten-site/docs/api_reference/preamble.js.html + +var wasmBinary; +if (Module['wasmBinary']) wasmBinary = Module['wasmBinary'];legacyModuleProp('wasmBinary', 'wasmBinary'); +var noExitRuntime = Module['noExitRuntime'] || true;legacyModuleProp('noExitRuntime', 'noExitRuntime'); + +if (typeof WebAssembly != 'object') { + abort('no native wasm support detected'); +} + +// Wasm globals + +var wasmMemory; + +//======================================== +// Runtime essentials +//======================================== + +// whether we are quitting the application. no code should run after this. +// set in exit() and abort() +var ABORT = false; + +// set by exit() and abort(). Passed to 'onExit' handler. +// NOTE: This is also used as the process return code code in shell environments +// but only when noExitRuntime is false. +var EXITSTATUS; + +/** @type {function(*, string=)} */ +function assert(condition, text) { + if (!condition) { + abort('Assertion failed' + (text ? ': ' + text : '')); + } +} + +// We used to include malloc/free by default in the past. Show a helpful error in +// builds with assertions. + +// include: runtime_strings.js + + +// runtime_strings.js: String related runtime functions that are part of both +// MINIMAL_RUNTIME and regular runtime. + +var UTF8Decoder = typeof TextDecoder != 'undefined' ? new TextDecoder('utf8') : undefined; + +/** + * Given a pointer 'idx' to a null-terminated UTF8-encoded string in the given + * array that contains uint8 values, returns a copy of that string as a + * Javascript String object. + * heapOrArray is either a regular array, or a JavaScript typed array view. + * @param {number} idx + * @param {number=} maxBytesToRead + * @return {string} + */ +function UTF8ArrayToString(heapOrArray, idx, maxBytesToRead) { + var endIdx = idx + maxBytesToRead; + var endPtr = idx; + // TextDecoder needs to know the byte length in advance, it doesn't stop on + // null terminator by itself. Also, use the length info to avoid running tiny + // strings through TextDecoder, since .subarray() allocates garbage. + // (As a tiny code save trick, compare endPtr against endIdx using a negation, + // so that undefined means Infinity) + while (heapOrArray[endPtr] && !(endPtr >= endIdx)) ++endPtr; + + if (endPtr - idx > 16 && heapOrArray.buffer && UTF8Decoder) { + return UTF8Decoder.decode(heapOrArray.subarray(idx, endPtr)); + } + var str = ''; + // If building with TextDecoder, we have already computed the string length + // above, so test loop end condition against that + while (idx < endPtr) { + // For UTF8 byte structure, see: + // http://en.wikipedia.org/wiki/UTF-8#Description + // https://www.ietf.org/rfc/rfc2279.txt + // https://tools.ietf.org/html/rfc3629 + var u0 = heapOrArray[idx++]; + if (!(u0 & 0x80)) { str += String.fromCharCode(u0); continue; } + var u1 = heapOrArray[idx++] & 63; + if ((u0 & 0xE0) == 0xC0) { str += String.fromCharCode(((u0 & 31) << 6) | u1); continue; } + var u2 = heapOrArray[idx++] & 63; + if ((u0 & 0xF0) == 0xE0) { + u0 = ((u0 & 15) << 12) | (u1 << 6) | u2; + } else { + if ((u0 & 0xF8) != 0xF0) warnOnce('Invalid UTF-8 leading byte ' + ptrToString(u0) + ' encountered when deserializing a UTF-8 string in wasm memory to a JS string!'); + u0 = ((u0 & 7) << 18) | (u1 << 12) | (u2 << 6) | (heapOrArray[idx++] & 63); + } + + if (u0 < 0x10000) { + str += String.fromCharCode(u0); + } else { + var ch = u0 - 0x10000; + str += String.fromCharCode(0xD800 | (ch >> 10), 0xDC00 | (ch & 0x3FF)); + } + } + return str; +} + +/** + * Given a pointer 'ptr' to a null-terminated UTF8-encoded string in the + * emscripten HEAP, returns a copy of that string as a Javascript String object. + * + * @param {number} ptr + * @param {number=} maxBytesToRead - An optional length that specifies the + * maximum number of bytes to read. You can omit this parameter to scan the + * string until the first \0 byte. If maxBytesToRead is passed, and the string + * at [ptr, ptr+maxBytesToReadr[ contains a null byte in the middle, then the + * string will cut short at that byte index (i.e. maxBytesToRead will not + * produce a string of exact length [ptr, ptr+maxBytesToRead[) N.B. mixing + * frequent uses of UTF8ToString() with and without maxBytesToRead may throw + * JS JIT optimizations off, so it is worth to consider consistently using one + * @return {string} + */ +function UTF8ToString(ptr, maxBytesToRead) { + return ptr ? UTF8ArrayToString(HEAPU8, ptr, maxBytesToRead) : ''; +} + +/** + * Copies the given Javascript String object 'str' to the given byte array at + * address 'outIdx', encoded in UTF8 form and null-terminated. The copy will + * require at most str.length*4+1 bytes of space in the HEAP. Use the function + * lengthBytesUTF8 to compute the exact number of bytes (excluding null + * terminator) that this function will write. + * + * @param {string} str - The Javascript string to copy. + * @param {ArrayBufferView|Array} heap - The array to copy to. Each + * index in this array is assumed + * to be one 8-byte element. + * @param {number} outIdx - The starting offset in the array to begin the copying. + * @param {number} maxBytesToWrite - The maximum number of bytes this function + * can write to the array. This count should + * include the null terminator, i.e. if + * maxBytesToWrite=1, only the null terminator + * will be written and nothing else. + * maxBytesToWrite=0 does not write any bytes + * to the output, not even the null + * terminator. + * @return {number} The number of bytes written, EXCLUDING the null terminator. + */ +function stringToUTF8Array(str, heap, outIdx, maxBytesToWrite) { + // Parameter maxBytesToWrite is not optional. Negative values, 0, null, + // undefined and false each don't write out any bytes. + if (!(maxBytesToWrite > 0)) + return 0; + + var startIdx = outIdx; + var endIdx = outIdx + maxBytesToWrite - 1; // -1 for string null terminator. + for (var i = 0; i < str.length; ++i) { + // Gotcha: charCodeAt returns a 16-bit word that is a UTF-16 encoded code + // unit, not a Unicode code point of the character! So decode + // UTF16->UTF32->UTF8. + // See http://unicode.org/faq/utf_bom.html#utf16-3 + // For UTF8 byte structure, see http://en.wikipedia.org/wiki/UTF-8#Description + // and https://www.ietf.org/rfc/rfc2279.txt + // and https://tools.ietf.org/html/rfc3629 + var u = str.charCodeAt(i); // possibly a lead surrogate + if (u >= 0xD800 && u <= 0xDFFF) { + var u1 = str.charCodeAt(++i); + u = 0x10000 + ((u & 0x3FF) << 10) | (u1 & 0x3FF); + } + if (u <= 0x7F) { + if (outIdx >= endIdx) break; + heap[outIdx++] = u; + } else if (u <= 0x7FF) { + if (outIdx + 1 >= endIdx) break; + heap[outIdx++] = 0xC0 | (u >> 6); + heap[outIdx++] = 0x80 | (u & 63); + } else if (u <= 0xFFFF) { + if (outIdx + 2 >= endIdx) break; + heap[outIdx++] = 0xE0 | (u >> 12); + heap[outIdx++] = 0x80 | ((u >> 6) & 63); + heap[outIdx++] = 0x80 | (u & 63); + } else { + if (outIdx + 3 >= endIdx) break; + if (u > 0x10FFFF) warnOnce('Invalid Unicode code point ' + ptrToString(u) + ' encountered when serializing a JS string to a UTF-8 string in wasm memory! (Valid unicode code points should be in range 0-0x10FFFF).'); + heap[outIdx++] = 0xF0 | (u >> 18); + heap[outIdx++] = 0x80 | ((u >> 12) & 63); + heap[outIdx++] = 0x80 | ((u >> 6) & 63); + heap[outIdx++] = 0x80 | (u & 63); + } + } + // Null-terminate the pointer to the buffer. + heap[outIdx] = 0; + return outIdx - startIdx; +} + +/** + * Copies the given Javascript String object 'str' to the emscripten HEAP at + * address 'outPtr', null-terminated and encoded in UTF8 form. The copy will + * require at most str.length*4+1 bytes of space in the HEAP. + * Use the function lengthBytesUTF8 to compute the exact number of bytes + * (excluding null terminator) that this function will write. + * + * @return {number} The number of bytes written, EXCLUDING the null terminator. + */ +function stringToUTF8(str, outPtr, maxBytesToWrite) { + assert(typeof maxBytesToWrite == 'number', 'stringToUTF8(str, outPtr, maxBytesToWrite) is missing the third parameter that specifies the length of the output buffer!'); + return stringToUTF8Array(str, HEAPU8,outPtr, maxBytesToWrite); +} + +/** + * Returns the number of bytes the given Javascript string takes if encoded as a + * UTF8 byte array, EXCLUDING the null terminator byte. + * + * @param {string} str - JavaScript string to operator on + * @return {number} Length, in bytes, of the UTF8 encoded string. + */ +function lengthBytesUTF8(str) { + var len = 0; + for (var i = 0; i < str.length; ++i) { + // Gotcha: charCodeAt returns a 16-bit word that is a UTF-16 encoded code + // unit, not a Unicode code point of the character! So decode + // UTF16->UTF32->UTF8. + // See http://unicode.org/faq/utf_bom.html#utf16-3 + var c = str.charCodeAt(i); // possibly a lead surrogate + if (c <= 0x7F) { + len++; + } else if (c <= 0x7FF) { + len += 2; + } else if (c >= 0xD800 && c <= 0xDFFF) { + len += 4; ++i; + } else { + len += 3; + } + } + return len; +} + +// end include: runtime_strings.js +// Memory management + +var HEAP, +/** @type {!ArrayBuffer} */ + buffer, +/** @type {!Int8Array} */ + HEAP8, +/** @type {!Uint8Array} */ + HEAPU8, +/** @type {!Int16Array} */ + HEAP16, +/** @type {!Uint16Array} */ + HEAPU16, +/** @type {!Int32Array} */ + HEAP32, +/** @type {!Uint32Array} */ + HEAPU32, +/** @type {!Float32Array} */ + HEAPF32, +/** @type {!Float64Array} */ + HEAPF64; + +function updateGlobalBufferAndViews(buf) { + buffer = buf; + Module['HEAP8'] = HEAP8 = new Int8Array(buf); + Module['HEAP16'] = HEAP16 = new Int16Array(buf); + Module['HEAP32'] = HEAP32 = new Int32Array(buf); + Module['HEAPU8'] = HEAPU8 = new Uint8Array(buf); + Module['HEAPU16'] = HEAPU16 = new Uint16Array(buf); + Module['HEAPU32'] = HEAPU32 = new Uint32Array(buf); + Module['HEAPF32'] = HEAPF32 = new Float32Array(buf); + Module['HEAPF64'] = HEAPF64 = new Float64Array(buf); +} + +var STACK_SIZE = 5242880; +if (Module['STACK_SIZE']) assert(STACK_SIZE === Module['STACK_SIZE'], 'the stack size can no longer be determined at runtime') + +var INITIAL_MEMORY = Module['INITIAL_MEMORY'] || 16777216;legacyModuleProp('INITIAL_MEMORY', 'INITIAL_MEMORY'); + +assert(INITIAL_MEMORY >= STACK_SIZE, 'INITIAL_MEMORY should be larger than STACK_SIZE, was ' + INITIAL_MEMORY + '! (STACK_SIZE=' + STACK_SIZE + ')'); + +// check for full engine support (use string 'subarray' to avoid closure compiler confusion) +assert(typeof Int32Array != 'undefined' && typeof Float64Array !== 'undefined' && Int32Array.prototype.subarray != undefined && Int32Array.prototype.set != undefined, + 'JS engine does not provide full typed array support'); + +// If memory is defined in wasm, the user can't provide it. +assert(!Module['wasmMemory'], 'Use of `wasmMemory` detected. Use -sIMPORTED_MEMORY to define wasmMemory externally'); +assert(INITIAL_MEMORY == 16777216, 'Detected runtime INITIAL_MEMORY setting. Use -sIMPORTED_MEMORY to define wasmMemory dynamically'); + +// include: runtime_init_table.js +// In regular non-RELOCATABLE mode the table is exported +// from the wasm module and this will be assigned once +// the exports are available. +var wasmTable; + +// end include: runtime_init_table.js +// include: runtime_stack_check.js + + +// Initializes the stack cookie. Called at the startup of main and at the startup of each thread in pthreads mode. +function writeStackCookie() { + var max = _emscripten_stack_get_end(); + assert((max & 3) == 0); + // If the stack ends at address zero we write our cookies 4 bytes into the + // stack. This prevents interference with the (separate) address-zero check + // below. + if (max == 0) { + max += 4; + } + // The stack grow downwards towards _emscripten_stack_get_end. + // We write cookies to the final two words in the stack and detect if they are + // ever overwritten. + HEAPU32[((max)>>2)] = 0x2135467; + HEAPU32[(((max)+(4))>>2)] = 0x89BACDFE; + // Also test the global address 0 for integrity. + HEAPU32[0] = 0x63736d65; /* 'emsc' */ +} + +function checkStackCookie() { + if (ABORT) return; + var max = _emscripten_stack_get_end(); + // See writeStackCookie(). + if (max == 0) { + max += 4; + } + var cookie1 = HEAPU32[((max)>>2)]; + var cookie2 = HEAPU32[(((max)+(4))>>2)]; + if (cookie1 != 0x2135467 || cookie2 != 0x89BACDFE) { + abort('Stack overflow! Stack cookie has been overwritten at ' + ptrToString(max) + ', expected hex dwords 0x89BACDFE and 0x2135467, but received ' + ptrToString(cookie2) + ' ' + ptrToString(cookie1)); + } + // Also test the global address 0 for integrity. + if (HEAPU32[0] !== 0x63736d65 /* 'emsc' */) { + abort('Runtime error: The application has corrupted its heap memory area (address zero)!'); + } +} + +// end include: runtime_stack_check.js +// include: runtime_assertions.js + + +// Endianness check +(function() { + var h16 = new Int16Array(1); + var h8 = new Int8Array(h16.buffer); + h16[0] = 0x6373; + if (h8[0] !== 0x73 || h8[1] !== 0x63) throw 'Runtime error: expected the system to be little-endian! (Run with -sSUPPORT_BIG_ENDIAN to bypass)'; +})(); + +// end include: runtime_assertions.js +var __ATPRERUN__ = []; // functions called before the runtime is initialized +var __ATINIT__ = []; // functions called during startup +var __ATEXIT__ = []; // functions called during shutdown +var __ATPOSTRUN__ = []; // functions called after the main() is called + +var runtimeInitialized = false; + +function keepRuntimeAlive() { + return noExitRuntime; +} + +function preRun() { + + if (Module['preRun']) { + if (typeof Module['preRun'] == 'function') Module['preRun'] = [Module['preRun']]; + while (Module['preRun'].length) { + addOnPreRun(Module['preRun'].shift()); + } + } + + callRuntimeCallbacks(__ATPRERUN__); +} + +function initRuntime() { + assert(!runtimeInitialized); + runtimeInitialized = true; + + checkStackCookie(); + + + callRuntimeCallbacks(__ATINIT__); +} + +function postRun() { + checkStackCookie(); + + if (Module['postRun']) { + if (typeof Module['postRun'] == 'function') Module['postRun'] = [Module['postRun']]; + while (Module['postRun'].length) { + addOnPostRun(Module['postRun'].shift()); + } + } + + callRuntimeCallbacks(__ATPOSTRUN__); +} + +function addOnPreRun(cb) { + __ATPRERUN__.unshift(cb); +} + +function addOnInit(cb) { + __ATINIT__.unshift(cb); +} + +function addOnExit(cb) { +} + +function addOnPostRun(cb) { + __ATPOSTRUN__.unshift(cb); +} + +// include: runtime_math.js + + +// https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Math/imul + +// https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Math/fround + +// https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Math/clz32 + +// https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Math/trunc + +assert(Math.imul, 'This browser does not support Math.imul(), build with LEGACY_VM_SUPPORT or POLYFILL_OLD_MATH_FUNCTIONS to add in a polyfill'); +assert(Math.fround, 'This browser does not support Math.fround(), build with LEGACY_VM_SUPPORT or POLYFILL_OLD_MATH_FUNCTIONS to add in a polyfill'); +assert(Math.clz32, 'This browser does not support Math.clz32(), build with LEGACY_VM_SUPPORT or POLYFILL_OLD_MATH_FUNCTIONS to add in a polyfill'); +assert(Math.trunc, 'This browser does not support Math.trunc(), build with LEGACY_VM_SUPPORT or POLYFILL_OLD_MATH_FUNCTIONS to add in a polyfill'); + +// end include: runtime_math.js +// A counter of dependencies for calling run(). If we need to +// do asynchronous work before running, increment this and +// decrement it. Incrementing must happen in a place like +// Module.preRun (used by emcc to add file preloading). +// Note that you can add dependencies in preRun, even though +// it happens right before run - run will be postponed until +// the dependencies are met. +var runDependencies = 0; +var runDependencyWatcher = null; +var dependenciesFulfilled = null; // overridden to take different actions when all run dependencies are fulfilled +var runDependencyTracking = {}; + +function getUniqueRunDependency(id) { + var orig = id; + while (1) { + if (!runDependencyTracking[id]) return id; + id = orig + Math.random(); + } +} + +function addRunDependency(id) { + runDependencies++; + + if (Module['monitorRunDependencies']) { + Module['monitorRunDependencies'](runDependencies); + } + + if (id) { + assert(!runDependencyTracking[id]); + runDependencyTracking[id] = 1; + if (runDependencyWatcher === null && typeof setInterval != 'undefined') { + // Check for missing dependencies every few seconds + runDependencyWatcher = setInterval(function() { + if (ABORT) { + clearInterval(runDependencyWatcher); + runDependencyWatcher = null; + return; + } + var shown = false; + for (var dep in runDependencyTracking) { + if (!shown) { + shown = true; + err('still waiting on run dependencies:'); + } + err('dependency: ' + dep); + } + if (shown) { + err('(end of list)'); + } + }, 10000); + } + } else { + err('warning: run dependency added without ID'); + } +} + +function removeRunDependency(id) { + runDependencies--; + + if (Module['monitorRunDependencies']) { + Module['monitorRunDependencies'](runDependencies); + } + + if (id) { + assert(runDependencyTracking[id]); + delete runDependencyTracking[id]; + } else { + err('warning: run dependency removed without ID'); + } + if (runDependencies == 0) { + if (runDependencyWatcher !== null) { + clearInterval(runDependencyWatcher); + runDependencyWatcher = null; + } + if (dependenciesFulfilled) { + var callback = dependenciesFulfilled; + dependenciesFulfilled = null; + callback(); // can add another dependenciesFulfilled + } + } +} + +/** @param {string|number=} what */ +function abort(what) { + if (Module['onAbort']) { + Module['onAbort'](what); + } + + what = 'Aborted(' + what + ')'; + // TODO(sbc): Should we remove printing and leave it up to whoever + // catches the exception? + err(what); + + ABORT = true; + EXITSTATUS = 1; + + // Use a wasm runtime error, because a JS error might be seen as a foreign + // exception, which means we'd run destructors on it. We need the error to + // simply make the program stop. + // FIXME This approach does not work in Wasm EH because it currently does not assume + // all RuntimeErrors are from traps; it decides whether a RuntimeError is from + // a trap or not based on a hidden field within the object. So at the moment + // we don't have a way of throwing a wasm trap from JS. TODO Make a JS API that + // allows this in the wasm spec. + + // Suppress closure compiler warning here. Closure compiler's builtin extern + // defintion for WebAssembly.RuntimeError claims it takes no arguments even + // though it can. + // TODO(https://github.com/google/closure-compiler/pull/3913): Remove if/when upstream closure gets fixed. + /** @suppress {checkTypes} */ + var e = new WebAssembly.RuntimeError(what); + + readyPromiseReject(e); + // Throw the error whether or not MODULARIZE is set because abort is used + // in code paths apart from instantiation where an exception is expected + // to be thrown when abort is called. + throw e; +} + +// {{MEM_INITIALIZER}} + +// include: memoryprofiler.js + + +// end include: memoryprofiler.js +// show errors on likely calls to FS when it was not included +var FS = { + error: function() { + abort('Filesystem support (FS) was not included. The problem is that you are using files from JS, but files were not used from C/C++, so filesystem support was not auto-included. You can force-include filesystem support with -sFORCE_FILESYSTEM'); + }, + init: function() { FS.error() }, + createDataFile: function() { FS.error() }, + createPreloadedFile: function() { FS.error() }, + createLazyFile: function() { FS.error() }, + open: function() { FS.error() }, + mkdev: function() { FS.error() }, + registerDevice: function() { FS.error() }, + analyzePath: function() { FS.error() }, + loadFilesFromDB: function() { FS.error() }, + + ErrnoError: function ErrnoError() { FS.error() }, +}; +Module['FS_createDataFile'] = FS.createDataFile; +Module['FS_createPreloadedFile'] = FS.createPreloadedFile; + +// include: URIUtils.js + + +// Prefix of data URIs emitted by SINGLE_FILE and related options. +var dataURIPrefix = 'data:application/octet-stream;base64,'; + +// Indicates whether filename is a base64 data URI. +function isDataURI(filename) { + // Prefix of data URIs emitted by SINGLE_FILE and related options. + return filename.startsWith(dataURIPrefix); +} + +// Indicates whether filename is delivered via file protocol (as opposed to http/https) +function isFileURI(filename) { + return filename.startsWith('file://'); +} + +// end include: URIUtils.js +/** @param {boolean=} fixedasm */ +function createExportWrapper(name, fixedasm) { + return function() { + var displayName = name; + var asm = fixedasm; + if (!fixedasm) { + asm = Module['asm']; + } + assert(runtimeInitialized, 'native function `' + displayName + '` called before runtime initialization'); + if (!asm[name]) { + assert(asm[name], 'exported native function `' + displayName + '` not found'); + } + return asm[name].apply(null, arguments); + }; +} + +var wasmBinaryFile; + wasmBinaryFile = 'crc64.wasm'; + if (!isDataURI(wasmBinaryFile)) { + wasmBinaryFile = locateFile(wasmBinaryFile); + } + +var binaryInString = ["AGFzbQEAAAABzYCAgAAMYAF/AX9gAAF/YAF/AGAAAGADf35/AX5gA39/fwBgBH9/f38AYAN/f38Bf2AFf39", +"/f38Bf2AEf39/fwF/YAR/f35/AX5gBH9+f38BfwKPgYCAAAUDZW52BWFib3J0AAMDZW52FmVtc2NyaXB0ZW", +"5fcmVzaXplX2hlYXAAABZ3YXNpX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IAg2AggLIABBCGohAEEAIAc2AqySwQJBACA", +"FNgKgksECDA8LQQAoApySwQIiCUUNASAJQQAgCWtxaEECdEHIlMECaigCACIHKAIEQXhxIANrIQQgByEFAk", +"ADQAJAIAUoAhAiAA0AIAVBFGooAgAiAEUNAgsgACgCBEF4cSADayIFIAQgBSAESSIFGyEEIAAgByAFGyEHI", +"AAhBQwACwALIAcoAhghCgJAIAcoAgwiCCAHRg0AIAcoAggiAEEAKAKoksECSRogACAINgIMIAggADYCCAwO", +"CwJAIAdBFGoiBSgCACIADQAgBygCECIARQ0DIAdBEGohBQsDQCAFIQsgACIIQRRqIgUoAgAiAA0AIAhBEGo", +"hBSAIKAIQIgANAAsgC0EANgIADA0LQX8hAyAAQb9/Sw0AIABBC2oiAEF4cSEDQQAoApySwQIiBkUNAEEAIQ", +"sCQCADQYACSQ0AQR8hCyADQf///wdLDQAgA0EmIABBCHZnIgBrdkEBcSAAQQF0a0E+aiELC0EAIANrIQQCQ", +"AJAAkACQCALQQJ0QciUwQJqKAIAIgUNAEEAIQBBACEIDAELQQAhACADQQBBGSALQQF2ayALQR9GG3QhB0EA", +"IQgDQAJAIAUoAgRBeHEgA2siAiAETw0AIAIhBCAFIQggAg0AQQAhBCAFIQggBSEADAMLIAAgBUEUaigCACI", +"CIAIgBSAHQR12QQRxakEQaigCACIFRhsgACACGyEAIAdBAXQhByAFDQALCwJAIAAgCHINAEEAIQhBAiALdC", +"IAQQAgAGtyIAZxIgBFDQMgAEEAIABrcWhBAnRByJTBAmooAgAhAAsgAEUNAQsDQCAAKAIEQXhxIANrIgIgB", +"EkhBwJAIAAoAhAiBQ0AIABBFGooAgAhBQsgAiAEIAcbIQQgACAIIAcbIQggBSEAIAUNAAsLIAhFDQAgBEEA", +"KAKgksECIANrTw0AIAgoAhghCwJAIAgoAgwiByAIRg0AIAgoAggiAEEAKAKoksECSRogACAHNgIMIAcgADY", +"CCAwMCwJAIAhBFGoiBSgCACIADQAgCCgCECIARQ0DIAhBEGohBQsDQCAFIQIgACIHQRRqIgUoAgAiAA0AIA", +"dBEGohBSAHKAIQIgANAAsgAkEANgIADAsLAkBBACgCoJLBAiIAIANJDQBBACgCrJLBAiEEAkACQCAAIANrI", +"gVBEEkNAEEAIAU2AqCSwQJBACAEIANqIgc2AqySwQIgByAFQQFyNgIEIAQgAGogBTYCACAEIANBA3I2AgQM", +"AQtBAEEANgKsksECQQBBADYCoJLBAiAEIABBA3I2AgQgBCAAaiIAIAAoAgRBAXI2AgQLIARBCGohAAwNCwJ", +"AQQAoAqSSwQIiByADTQ0AQQAgByADayIENgKkksECQQBBACgCsJLBAiIAIANqIgU2ArCSwQIgBSAEQQFyNg", +"IEIAAgA0EDcjYCBCAAQQhqIQAMDQsCQAJAQQAoAvCVwQJFDQBBACgC+JXBAiEEDAELQQBCfzcC/JXBAkEAQ", +"oCggICAgAQ3AvSVwQJBACABQQxqQXBxQdiq1aoFczYC8JXBAkEAQQA2AoSWwQJBAEEANgLUlcECQYAgIQQL", +"QQAhACAEIANBL2oiBmoiAkEAIARrIgtxIgggA00NDEEAIQACQEEAKALQlcECIgRFDQBBACgCyJXBAiIFIAh", +"qIgkgBU0NDSAJIARLDQ0LAkACQEEALQDUlcECQQRxDQACQAJAAkACQAJAQQAoArCSwQIiBEUNAEHYlcECIQ", +"ADQAJAIAAoAgAiBSAESw0AIAUgACgCBGogBEsNAwsgACgCCCIADQALC0EAEBAiB0F/Rg0DIAghAgJAQQAoA", +"vSVwQIiAEF/aiIEIAdxRQ0AIAggB2sgBCAHakEAIABrcWohAgsgAiADTQ0DAkBBACgC0JXBAiIARQ0AQQAo", +"AsiVwQIiBCACaiIFIARNDQQgBSAASw0ECyACEBAiACAHRw0BDAULIAIgB2sgC3EiAhAQIgcgACgCACAAKAI", +"EakYNASAHIQALIABBf0YNAQJAIANBMGogAksNACAAIQcMBAsgBiACa0EAKAL4lcECIgRqQQAgBGtxIgQQEE", +"F/Rg0BIAQgAmohAiAAIQcMAwsgB0F/Rw0CC0EAQQAoAtSVwQJBBHI2AtSVwQILIAgQECEHQQAQECEAIAdBf", +"0YNBSAAQX9GDQUgByAATw0FIAAgB2siAiADQShqTQ0FC0EAQQAoAsiVwQIgAmoiADYCyJXBAgJAIABBACgC", +"zJXBAk0NAEEAIAA2AsyVwQILAkACQEEAKAKwksECIgRFDQBB2JXBAiEAA0AgByAAKAIAIgUgACgCBCIIakY", +"NAiAAKAIIIgANAAwFCwALAkACQEEAKAKoksECIgBFDQAgByAATw0BC0EAIAc2AqiSwQILQQAhAEEAIAI2At", +"yVwQJBACAHNgLYlcECQQBBfzYCuJLBAkEAQQAoAvCVwQI2ArySwQJBAEEANgLklcECA0AgAEEDdCIEQciSw", +"QJqIARBwJLBAmoiBTYCACAEQcySwQJqIAU2AgAgAEEBaiIAQSBHDQALQQAgAkFYaiIAQXggB2tBB3FBACAH", +"QQhqQQdxGyIEayIFNgKkksECQQAgByAEaiIENgKwksECIAQgBUEBcjYCBCAHIABqQSg2AgRBAEEAKAKAlsE", +"CNgK0ksECDAQLIAAtAAxBCHENAiAEIAVJDQIgBCAHTw0CIAAgCCACajYCBEEAIARBeCAEa0EHcUEAIARBCG", +"pBB3EbIgBqIgU2ArCSwQJBAEEAKAKkksECIAJqIgcgAGsiADYCpJLBAiAFIABBAXI2AgQgBCAHakEoNgIEQ", +"QBBACgCgJbBAjYCtJLBAgwDC0EAIQgMCgtBACEHDAgLAkAgB0EAKAKoksECIghPDQBBACAHNgKoksECIAch", +"CAsgByACaiEFQdiVwQIhAAJAAkACQAJAA0AgACgCACAFRg0BIAAoAggiAA0ADAILAAsgAC0ADEEIcUUNAQt", +"B2JXBAiEAA0ACQCAAKAIAIgUgBEsNACAFIAAoAgRqIgUgBEsNAwsgACgCCCEADAALAAsgACAHNgIAIAAgAC", +"gCBCACajYCBCAHQXggB2tBB3FBACAHQQhqQQdxG2oiCyADQQNyNgIEIAVBeCAFa0EHcUEAIAVBCGpBB3Eba", +"iICIAsgA2oiA2shAAJAIAIgBEcNA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ACAHNgIMIAUgBzYCCCAHQQA2AhggByAFNgIMIAcgADYCCAsgCEEIaiEADAELAkAgCk", +"UNAAJAAkAgByAHKAIcIgVBAnRByJTBAmoiACgCAEcNACAAIAg2AgAgCA0BQQAgCUF+IAV3cTYCnJLBAgwCC", +"yAKQRBBFCAKKAIQIAdGG2ogCDYCACAIRQ0BCyAIIAo2AhgCQCAHKAIQIgBFDQAgCCAANgIQIAAgCDYCGAsg", +"B0EUaigCACIARQ0AIAhBFGogADYCACAAIAg2AhgLAkACQCAEQQ9LDQAgByAEIANqIgBBA3I2AgQgByAAaiI", +"AIAAoAgRBAXI2AgQMAQsgByADQQNyNgIEIAcgA2oiBSAEQQFyNgIEIAUgBGogBDYCAAJAIAZFDQAgBkF4cU", +"HAksECaiEDQQAoAqySwQIhAAJAAkBBASAGQQN2dCIIIAJxDQBBACAIIAJyNgKYksECIAMhCAwBCyADKAIII", +"QgLIAMgADYCCCAIIAA2AgwgACADNgIMIAAgCDYCCAtBACAFNgKsksECQQAgBDYCoJLBAgsgB0EIaiEACyAB", +"QRBqJAAgAAuDDQEHfwJAIABFDQAgAEF4aiIBIABBfGooAgAiAkF4cSIAaiEDAkAgAkEBcQ0AIAJBA3FFDQE", +"gASABKAIAIgJrIgFBACgCqJLBAiIESQ0BIAIgAGohAAJAAkACQCABQQAoAqySwQJGDQACQCACQf8BSw0AIA", +"EoAggiBCACQQN2IgVBA3RBwJLBAmoiBkYaAkAgASgCDCICIARHDQBBAEEAKAKYksECQX4gBXdxNgKYksECD", +"AULIAIgBkYaIAQgAjYCDCACIAQ2AggMBAsgASgCGCEHAkAgASgCDCIGIAFGDQAgASgCCCICIARJGiACIAY2", +"AgwgBiACNgIIDAMLAkAgAUEUaiIEKAIAIgINACABKAIQIgJFDQIgAUEQaiEECwNAIAQhBSACIgZBFGoiBCg", +"CACICDQAgBkEQaiEEIAYoAhAiAg0ACyAFQQA2AgAMAgsgAygCBCICQQNxQQNHDQJBACAANgKgksECIAMgAk", +"F+c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2AhgLIANBF", +"GooAgAiAkUNACAGQRRqIAI2AgAgAiAGNgIYCyABIABBAXI2AgQgASAAaiAANgIAIAFBACgCrJLBAkcNAEEA", +"IAA2AqCSwQIPCwJAIABB/wFLDQAgAEF4cUHAksECaiECAkACQEEAKAKYksECIgRBASAAQQN2dCIAcQ0AQQA", +"gBCAAcjYCmJLBAiACIQAMAQsgAigCCCEACyACIAE2AgggACABNgIMIAEgAjYCDCABIAA2AggPC0EfIQICQC", +"AAQf///wdLDQAgAEEmIABBCHZnIgJrdkEBcSACQQF0a0E+aiECCyABIAI2AhwgAUIANwIQIAJBAnRByJTBA", +"mohBAJAAkACQAJAQQAoApySwQIiBkEBIAJ0IgNxDQBBACAGIANyNgKcksECIAQgATYCACABIAQ2AhgMAQsg", +"AEEAQRkgAkEBdmsgAkEfRht0IQIgBCgCACEGA0AgBiIEKAIEQXhxIABGDQIgAkEddiEGIAJBAXQhAiAEIAZ", +"BBHFqIgNBEGooAgAiBg0ACyADQRBqIAE2AgAgASAENgIYCyABIAE2AgwgASABNgIIDAELIAQoAggiACABNg", +"IMIAQgATYCCCABQQA2AhggASAENgIMIAEgADYCCAtBAEEAKAK4ksECQX9qIgFBfyABGzYCuJLBAgsLMQEBf", +"yAAQQEgABshAQJAA0AgARARIgANAQJAECIiAEUNACAAEQMADAELCxAAAAsgAAsGACAAEBILBAAgAAsLACAA", +"KAI8EBUQAgsVAAJAIAANAEEADwsQDyAANgIAQX8L4wIBB38jAEEgayIDJAAgAyAAKAIcIgQ2AhAgACgCFCE", +"FIAMgAjYCHCADIAE2AhggAyAFIARrIgE2AhQgASACaiEGIANBEGohBEECIQcCQAJAAkACQAJAIAAoAjwgA0", +"EQakECIANBDGoQAxAXRQ0AIAQhBQwBCwNAIAYgAygCDCIBRg0CAkAgAUF/Sg0AIAQhBQwECyAEIAEgBCgCB", +"CIISyIJQQN0aiIFIAUoAgAgASAIQQAgCRtrIghqNgIAIARBDEEEIAkbaiIEIAQoAgAgCGs2AgAgBiABayEG", +"IAUhBCAAKAI8IAUgByAJayIHIANBDGoQAxAXRQ0ACwsgBkF/Rw0BCyAAIAAoAiwiATYCHCAAIAE2AhQgACA", +"BIAAoAjBqNgIQIAIhAQwBC0EAIQEgAEEANgIcIABCADcDECAAIAAoAgBBIHI2AgAgB0ECRg0AIAIgBSgCBG", +"shAQsgA0EgaiQAIAELNwEBfyMAQRBrIgMkACAAIAEgAkH/AXEgA0EIahAwEBchAiADKQMIIQEgA0EQaiQAQ", +"n8gASACGwsNACAAKAI8IAEgAhAZCwIACwIACw4AQZCWwQIQG0GUlsECCwkAQZCWwQIQHAsEAEEBCwIACwcA", +"IAAoAgALCQBBnJbBAhAhCwYAIAAkAQsEACMBCwQAIwALBgAgACQACxIBAn8jACAAa0FwcSIBJAAgAQsEACM", +"ACxMAQYCAwAIkA0EAQQ9qQXBxJAILBwAjACMCawsEACMDCwQAIwILuAIBA38CQCAADQBBACEBAkBBACgCmJ", +"bBAkUNAEEAKAKYlsECEC0hAQsCQEEAKAKYkcECRQ0AQQAoApiRwQIQLSABciEBCwJAEB0oAgAiAEUNAANAQ", +"QAhAgJAIAAoAkxBAEgNACAAEB8hAgsCQCAAKAIUIAAoAhxGDQAgABAtIAFyIQELAkAgAkUNACAAECALIAAo", +"AjgiAA0ACwsQHiABDwtBACECAkAgACgCTEEASA0AIAAQHyECCwJAAkACQCAAKAIUIAAoAhxGDQAgAEEAQQA", +"gACgCJBEHABogACgCFA0AQX8hASACDQEMAgsCQCAAKAIEIgEgACgCCCIDRg0AIAAgASADa6xBASAAKAIoEQ", +"QAGgtBACEBIABBADYCHCAAQgA3AxAgAEIANwIEIAJFDQELIAAQIAsgAQsNACABIAIgAyAAEQQACyMBAX4gA", +"CABIAKtIAOtQiCGhCAEEC4hBSAFQiCIpxAjIAWnCxMAIAAgAacgAUIgiKcgAiADEAQLC7aSgYAABABBgIDA", +"AguAkAEAAAAAAAAAADGyfhfBM8W4CfdqdtFBU0U4RRRhEHKW/RLu1eyig6a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ib3VuZHM6IFswLCcgKyBzaXplICsgJyknOyB9AA==" +].join(""); + +function _base64ToArrayBuffer(base64) { + var binary_string = window.atob(base64); + var len = binary_string.length; + var bytes = new Uint8Array(len); + for (var i = 0; i < len; i++) { + bytes[i] = binary_string.charCodeAt(i); + } + return bytes; +} + +function getBinary(file) { + if (typeof Buffer == "function"){ + return Buffer.from(binaryInString, "base64"); + } + else { + return _base64ToArrayBuffer(binaryInString); + } +} + +function getBinaryPromise() { + // If we don't have the binary yet, try to to load it asynchronously. + // Fetch has some additional restrictions over XHR, like it can't be used on a file:// url. + // See https://github.com/github/fetch/pull/92#issuecomment-140665932 + // Cordova or Electron apps are typically loaded from a file:// url. + // So use fetch if it is available and the url is not a file, otherwise fall back to XHR. + // if (!wasmBinary && (ENVIRONMENT_IS_WEB || ENVIRONMENT_IS_WORKER)) { + // if (typeof fetch == 'function' + // && !isFileURI(wasmBinaryFile) + // ) { + // return fetch(wasmBinaryFile, { credentials: 'same-origin' }).then(function(response) { + // if (!response['ok']) { + // throw "failed to load wasm binary file at '" + wasmBinaryFile + "'"; + // } + // return response['arrayBuffer'](); + // }).catch(function () { + // return getBinary(wasmBinaryFile); + // }); + // } + // else { + // if (readAsync) { + // // fetch is not available or url is file => try XHR (readAsync uses XHR internally) + // return new Promise(function(resolve, reject) { + // readAsync(wasmBinaryFile, function(response) { resolve(new Uint8Array(/** @type{!ArrayBuffer} */(response))) }, reject) + // }); + // } + // } + // } + + // Otherwise, getBinary should be able to get it synchronously + return Promise.resolve().then(function() { return getBinary(wasmBinaryFile); }); +} + +// Create the wasm instance. +// Receives the wasm imports, returns the exports. +function createWasm() { + // prepare imports + var info = { + 'env': asmLibraryArg, + 'wasi_snapshot_preview1': asmLibraryArg, + }; + // Load the wasm module and create an instance of using native support in the JS engine. + // handle a generated wasm instance, receiving its exports and + // performing other necessary setup + /** @param {WebAssembly.Module=} module*/ + function receiveInstance(instance, module) { + var exports = instance.exports; + + Module['asm'] = exports; + + wasmMemory = Module['asm']['memory']; + assert(wasmMemory, "memory not found in wasm exports"); + // This assertion doesn't hold when emscripten is run in --post-link + // mode. + // TODO(sbc): Read INITIAL_MEMORY out of the wasm file in post-link mode. + //assert(wasmMemory.buffer.byteLength === 16777216); + updateGlobalBufferAndViews(wasmMemory.buffer); + + wasmTable = Module['asm']['__indirect_function_table']; + assert(wasmTable, "table not found in wasm exports"); + + addOnInit(Module['asm']['__wasm_call_ctors']); + + removeRunDependency('wasm-instantiate'); + + } + // we can't run yet (except in a pthread, where we have a custom sync instantiator) + addRunDependency('wasm-instantiate'); + + // Prefer streaming instantiation if available. + // Async compilation can be confusing when an error on the page overwrites Module + // (for example, if the order of elements is wrong, and the one defining Module is + // later), so we save Module and check it later. + var trueModule = Module; + function receiveInstantiationResult(result) { + // 'result' is a ResultObject object which has both the module and instance. + // receiveInstance() will swap in the exports (to Module.asm) so they can be called + assert(Module === trueModule, 'the Module object should not be replaced during async compilation - perhaps the order of HTML elements is wrong?'); + trueModule = null; + // TODO: Due to Closure regression https://github.com/google/closure-compiler/issues/3193, the above line no longer optimizes out down to the following line. + // When the regression is fixed, can restore the above USE_PTHREADS-enabled path. + receiveInstance(result['instance']); + } + + function instantiateArrayBuffer(receiver) { + return getBinaryPromise().then(function(binary) { + return WebAssembly.instantiate(binary, info); + }).then(function (instance) { + return instance; + }).then(receiver, function(reason) { + err('failed to asynchronously prepare wasm: ' + reason); + + // Warn on some common problems. + if (isFileURI(wasmBinaryFile)) { + err('warning: Loading from a file URI (' + wasmBinaryFile + ') is not supported in most browsers. See https://emscripten.org/docs/getting_started/FAQ.html#how-do-i-run-a-local-webserver-for-testing-why-does-my-program-stall-in-downloading-or-preparing'); + } + abort(reason); + }); + } + + function instantiateAsync() { + // if (!wasmBinary && + // typeof WebAssembly.instantiateStreaming == 'function' && + // !isDataURI(wasmBinaryFile) && + // // Don't use streaming for file:// delivered objects in a webview, fetch them synchronously. + // !isFileURI(wasmBinaryFile) && + // // Avoid instantiateStreaming() on Node.js environment for now, as while + // // Node.js v18.1.0 implements it, it does not have a full fetch() + // // implementation yet. + // // + // // Reference: + // // https://github.com/emscripten-core/emscripten/pull/16917 + // !ENVIRONMENT_IS_NODE && + // typeof fetch == 'function') { + // return fetch(wasmBinaryFile, { credentials: 'same-origin' }).then(function(response) { + // // Suppress closure warning here since the upstream definition for + // // instantiateStreaming only allows Promise rather than + // // an actual Response. + // // TODO(https://github.com/google/closure-compiler/pull/3913): Remove if/when upstream closure is fixed. + // /** @suppress {checkTypes} */ + // var result = WebAssembly.instantiateStreaming(response, info); + + // return result.then( + // receiveInstantiationResult, + // function(reason) { + // // We expect the most common failure cause to be a bad MIME type for the binary, + // // in which case falling back to ArrayBuffer instantiation should work. + // err('wasm streaming compile failed: ' + reason); + // err('falling back to ArrayBuffer instantiation'); + // return instantiateArrayBuffer(receiveInstantiationResult); + // }); + // }); + // } else { + return instantiateArrayBuffer(receiveInstantiationResult); + //} + } + + // User shell pages can write their own Module.instantiateWasm = function(imports, successCallback) callback + // to manually instantiate the Wasm module themselves. This allows pages to run the instantiation parallel + // to any other async startup actions they are performing. + // Also pthreads and wasm workers initialize the wasm instance through this path. + if (Module['instantiateWasm']) { + try { + var exports = Module['instantiateWasm'](info, receiveInstance); + return exports; + } catch(e) { + err('Module.instantiateWasm callback failed with error: ' + e); + // If instantiation fails, reject the module ready promise. + readyPromiseReject(e); + } + } + + // If instantiation fails, reject the module ready promise. + instantiateAsync().catch(readyPromiseReject); + return {}; // no exports yet; we'll fill them in later +} + +// Globals used by JS i64 conversions (see makeSetValue) +var tempDouble; +var tempI64; + +// === Body === + +var ASM_CONSTS = { + +}; +function array_bounds_check_error(idx,size) { throw 'Array index ' + idx + ' out of bounds: [0,' + size + ')'; } + + + + + /** @constructor */ + function ExitStatus(status) { + this.name = 'ExitStatus'; + this.message = 'Program terminated with exit(' + status + ')'; + this.status = status; + } + + function callRuntimeCallbacks(callbacks) { + while (callbacks.length > 0) { + // Pass the module as the first argument. + callbacks.shift()(Module); + } + } + + + /** + * @param {number} ptr + * @param {string} type + */ + function getValue(ptr, type = 'i8') { + if (type.endsWith('*')) type = '*'; + switch (type) { + case 'i1': return HEAP8[((ptr)>>0)]; + case 'i8': return HEAP8[((ptr)>>0)]; + case 'i16': return HEAP16[((ptr)>>1)]; + case 'i32': return HEAP32[((ptr)>>2)]; + case 'i64': return HEAP32[((ptr)>>2)]; + case 'float': return HEAPF32[((ptr)>>2)]; + case 'double': return HEAPF64[((ptr)>>3)]; + case '*': return HEAPU32[((ptr)>>2)]; + default: abort('invalid type for getValue: ' + type); + } + return null; + } + + function ptrToString(ptr) { + return '0x' + ptr.toString(16).padStart(8, '0'); + } + + + /** + * @param {number} ptr + * @param {number} value + * @param {string} type + */ + function setValue(ptr, value, type = 'i8') { + if (type.endsWith('*')) type = '*'; + switch (type) { + case 'i1': HEAP8[((ptr)>>0)] = value; break; + case 'i8': HEAP8[((ptr)>>0)] = value; break; + case 'i16': HEAP16[((ptr)>>1)] = value; break; + case 'i32': HEAP32[((ptr)>>2)] = value; break; + case 'i64': (tempI64 = [value>>>0,(tempDouble=value,(+(Math.abs(tempDouble))) >= 1.0 ? (tempDouble > 0.0 ? ((Math.min((+(Math.floor((tempDouble)/4294967296.0))), 4294967295.0))|0)>>>0 : (~~((+(Math.ceil((tempDouble - +(((~~(tempDouble)))>>>0))/4294967296.0)))))>>>0) : 0)],HEAP32[((ptr)>>2)] = tempI64[0],HEAP32[(((ptr)+(4))>>2)] = tempI64[1]); break; + case 'float': HEAPF32[((ptr)>>2)] = value; break; + case 'double': HEAPF64[((ptr)>>3)] = value; break; + case '*': HEAPU32[((ptr)>>2)] = value; break; + default: abort('invalid type for setValue: ' + type); + } + } + + function warnOnce(text) { + if (!warnOnce.shown) warnOnce.shown = {}; + if (!warnOnce.shown[text]) { + warnOnce.shown[text] = 1; + if (ENVIRONMENT_IS_NODE) text = 'warning: ' + text; + err(text); + } + } + + function _abort() { + abort('native code called abort()'); + } + + function getHeapMax() { + // Stay one Wasm page short of 4GB: while e.g. Chrome is able to allocate + // full 4GB Wasm memories, the size will wrap back to 0 bytes in Wasm side + // for any code that deals with heap sizes, which would require special + // casing all heap size related code to treat 0 specially. + return 2147483648; + } + + function emscripten_realloc_buffer(size) { + try { + // round size grow request up to wasm page size (fixed 64KB per spec) + wasmMemory.grow((size - buffer.byteLength + 65535) >>> 16); // .grow() takes a delta compared to the previous size + updateGlobalBufferAndViews(wasmMemory.buffer); + return 1 /*success*/; + } catch(e) { + err('emscripten_realloc_buffer: Attempted to grow heap from ' + buffer.byteLength + ' bytes to ' + size + ' bytes, but got error: ' + e); + } + // implicit 0 return to save code size (caller will cast "undefined" into 0 + // anyhow) + } + function _emscripten_resize_heap(requestedSize) { + var oldSize = HEAPU8.length; + requestedSize = requestedSize >>> 0; + // With multithreaded builds, races can happen (another thread might increase the size + // in between), so return a failure, and let the caller retry. + assert(requestedSize > oldSize); + + // Memory resize rules: + // 1. Always increase heap size to at least the requested size, rounded up + // to next page multiple. + // 2a. If MEMORY_GROWTH_LINEAR_STEP == -1, excessively resize the heap + // geometrically: increase the heap size according to + // MEMORY_GROWTH_GEOMETRIC_STEP factor (default +20%), At most + // overreserve by MEMORY_GROWTH_GEOMETRIC_CAP bytes (default 96MB). + // 2b. If MEMORY_GROWTH_LINEAR_STEP != -1, excessively resize the heap + // linearly: increase the heap size by at least + // MEMORY_GROWTH_LINEAR_STEP bytes. + // 3. Max size for the heap is capped at 2048MB-WASM_PAGE_SIZE, or by + // MAXIMUM_MEMORY, or by ASAN limit, depending on which is smallest + // 4. If we were unable to allocate as much memory, it may be due to + // over-eager decision to excessively reserve due to (3) above. + // Hence if an allocation fails, cut down on the amount of excess + // growth, in an attempt to succeed to perform a smaller allocation. + + // A limit is set for how much we can grow. We should not exceed that + // (the wasm binary specifies it, so if we tried, we'd fail anyhow). + var maxHeapSize = getHeapMax(); + if (requestedSize > maxHeapSize) { + err('Cannot enlarge memory, asked to go up to ' + requestedSize + ' bytes, but the limit is ' + maxHeapSize + ' bytes!'); + return false; + } + + let alignUp = (x, multiple) => x + (multiple - x % multiple) % multiple; + + // Loop through potential heap size increases. If we attempt a too eager + // reservation that fails, cut down on the attempted size and reserve a + // smaller bump instead. (max 3 times, chosen somewhat arbitrarily) + for (var cutDown = 1; cutDown <= 4; cutDown *= 2) { + var overGrownHeapSize = oldSize * (1 + 0.2 / cutDown); // ensure geometric growth + // but limit overreserving (default to capping at +96MB overgrowth at most) + overGrownHeapSize = Math.min(overGrownHeapSize, requestedSize + 100663296 ); + + var newSize = Math.min(maxHeapSize, alignUp(Math.max(requestedSize, overGrownHeapSize), 65536)); + + var replacement = emscripten_realloc_buffer(newSize); + if (replacement) { + + return true; + } + } + err('Failed to grow the heap from ' + oldSize + ' bytes to ' + newSize + ' bytes, not enough memory!'); + return false; + } + + var SYSCALLS = {varargs:undefined,get:function() { + assert(SYSCALLS.varargs != undefined); + SYSCALLS.varargs += 4; + var ret = HEAP32[(((SYSCALLS.varargs)-(4))>>2)]; + return ret; + },getStr:function(ptr) { + var ret = UTF8ToString(ptr); + return ret; + }}; + function _fd_close(fd) { + abort('fd_close called without SYSCALLS_REQUIRE_FILESYSTEM'); + } + + function convertI32PairToI53Checked(lo, hi) { + assert(lo == (lo >>> 0) || lo == (lo|0)); // lo should either be a i32 or a u32 + assert(hi === (hi|0)); // hi should be a i32 + return ((hi + 0x200000) >>> 0 < 0x400001 - !!lo) ? (lo >>> 0) + hi * 4294967296 : NaN; + } + function _fd_seek(fd, offset_low, offset_high, whence, newOffset) { + return 70; + } + + var printCharBuffers = [null,[],[]]; + function printChar(stream, curr) { + var buffer = printCharBuffers[stream]; + assert(buffer); + if (curr === 0 || curr === 10) { + (stream === 1 ? out : err)(UTF8ArrayToString(buffer, 0)); + buffer.length = 0; + } else { + buffer.push(curr); + } + } + function flush_NO_FILESYSTEM() { + // flush anything remaining in the buffers during shutdown + _fflush(0); + if (printCharBuffers[1].length) printChar(1, 10); + if (printCharBuffers[2].length) printChar(2, 10); + } + function _fd_write(fd, iov, iovcnt, pnum) { + // hack to support printf in SYSCALLS_REQUIRE_FILESYSTEM=0 + var num = 0; + for (var i = 0; i < iovcnt; i++) { + var ptr = HEAPU32[((iov)>>2)]; + var len = HEAPU32[(((iov)+(4))>>2)]; + iov += 8; + for (var j = 0; j < len; j++) { + printChar(fd, HEAPU8[ptr+j]); + } + num += len; + } + HEAPU32[((pnum)>>2)] = num; + return 0; + } + + /** @type {function(string, boolean=, number=)} */ + function intArrayFromString(stringy, dontAddNull, length) { + var len = length > 0 ? length : lengthBytesUTF8(stringy)+1; + var u8array = new Array(len); + var numBytesWritten = stringToUTF8Array(stringy, u8array, 0, u8array.length); + if (dontAddNull) u8array.length = numBytesWritten; + return u8array; + } +var ASSERTIONS = true; + +function checkIncomingModuleAPI() { + ignoredModuleProp('fetchSettings'); +} +var asmLibraryArg = { + "abort": _abort, + "array_bounds_check_error": array_bounds_check_error, + "emscripten_resize_heap": _emscripten_resize_heap, + "fd_close": _fd_close, + "fd_seek": _fd_seek, + "fd_write": _fd_write +}; +var asm = createWasm(); +/** @type {function(...*):?} */ +var ___wasm_call_ctors = Module["___wasm_call_ctors"] = createExportWrapper("__wasm_call_ctors"); + +/** @type {function(...*):?} */ +var _emscripten_bind_VoidPtr___destroy___0 = Module["_emscripten_bind_VoidPtr___destroy___0"] = createExportWrapper("emscripten_bind_VoidPtr___destroy___0"); + +/** @type {function(...*):?} */ +var _emscripten_bind_Crc64Hash_Crc64Hash_0 = Module["_emscripten_bind_Crc64Hash_Crc64Hash_0"] = createExportWrapper("emscripten_bind_Crc64Hash_Crc64Hash_0"); + +/** @type {function(...*):?} */ +var _emscripten_bind_Crc64Hash_OnAppend_2 = Module["_emscripten_bind_Crc64Hash_OnAppend_2"] = createExportWrapper("emscripten_bind_Crc64Hash_OnAppend_2"); + +/** @type {function(...*):?} */ +var _emscripten_bind_Crc64Hash_OnFinal_3 = Module["_emscripten_bind_Crc64Hash_OnFinal_3"] = createExportWrapper("emscripten_bind_Crc64Hash_OnFinal_3"); + +/** @type {function(...*):?} */ +var _emscripten_bind_Crc64Hash___destroy___0 = Module["_emscripten_bind_Crc64Hash___destroy___0"] = createExportWrapper("emscripten_bind_Crc64Hash___destroy___0"); + +/** @type {function(...*):?} */ +var ___errno_location = Module["___errno_location"] = createExportWrapper("__errno_location"); + +/** @type {function(...*):?} */ +var _fflush = Module["_fflush"] = createExportWrapper("fflush"); + +/** @type {function(...*):?} */ +var _malloc = Module["_malloc"] = createExportWrapper("malloc"); + +/** @type {function(...*):?} */ +var _free = Module["_free"] = createExportWrapper("free"); + +/** @type {function(...*):?} */ +var _emscripten_stack_init = Module["_emscripten_stack_init"] = function() { + return (_emscripten_stack_init = Module["_emscripten_stack_init"] = Module["asm"]["emscripten_stack_init"]).apply(null, arguments); +}; + +/** @type {function(...*):?} */ +var _emscripten_stack_get_free = Module["_emscripten_stack_get_free"] = function() { + return (_emscripten_stack_get_free = Module["_emscripten_stack_get_free"] = Module["asm"]["emscripten_stack_get_free"]).apply(null, arguments); +}; + +/** @type {function(...*):?} */ +var _emscripten_stack_get_base = Module["_emscripten_stack_get_base"] = function() { + return (_emscripten_stack_get_base = Module["_emscripten_stack_get_base"] = Module["asm"]["emscripten_stack_get_base"]).apply(null, arguments); +}; + +/** @type {function(...*):?} */ +var _emscripten_stack_get_end = Module["_emscripten_stack_get_end"] = function() { + return (_emscripten_stack_get_end = Module["_emscripten_stack_get_end"] = Module["asm"]["emscripten_stack_get_end"]).apply(null, arguments); +}; + +/** @type {function(...*):?} */ +var stackSave = Module["stackSave"] = createExportWrapper("stackSave"); + +/** @type {function(...*):?} */ +var stackRestore = Module["stackRestore"] = createExportWrapper("stackRestore"); + +/** @type {function(...*):?} */ +var stackAlloc = Module["stackAlloc"] = createExportWrapper("stackAlloc"); + +/** @type {function(...*):?} */ +var _emscripten_stack_get_current = Module["_emscripten_stack_get_current"] = function() { + return (_emscripten_stack_get_current = Module["_emscripten_stack_get_current"] = Module["asm"]["emscripten_stack_get_current"]).apply(null, arguments); +}; + +/** @type {function(...*):?} */ +var dynCall_jiji = Module["dynCall_jiji"] = createExportWrapper("dynCall_jiji"); + +var ___start_em_js = Module['___start_em_js'] = 5261488; +var ___stop_em_js = Module['___stop_em_js'] = 5261586; + + + +// === Auto-generated postamble setup entry stuff === + + +var unexportedRuntimeSymbols = [ + 'run', + 'UTF8ArrayToString', + 'UTF8ToString', + 'stringToUTF8Array', + 'stringToUTF8', + 'lengthBytesUTF8', + 'addOnPreRun', + 'addOnInit', + 'addOnPreMain', + 'addOnExit', + 'addOnPostRun', + 'addRunDependency', + 'removeRunDependency', + 'FS_createFolder', + 'FS_createPath', + 'FS_createDataFile', + 'FS_createPreloadedFile', + 'FS_createLazyFile', + 'FS_createLink', + 'FS_createDevice', + 'FS_unlink', + 'getLEB', + 'getFunctionTables', + 'alignFunctionTables', + 'registerFunctions', + 'prettyPrint', + 'getCompilerSetting', + 'out', + 'err', + 'callMain', + 'abort', + 'keepRuntimeAlive', + 'wasmMemory', + 'stackAlloc', + 'stackSave', + 'stackRestore', + 'getTempRet0', + 'setTempRet0', + 'writeStackCookie', + 'checkStackCookie', + 'ptrToString', + 'zeroMemory', + 'stringToNewUTF8', + 'exitJS', + 'getHeapMax', + 'emscripten_realloc_buffer', + 'ENV', + 'ERRNO_CODES', + 'ERRNO_MESSAGES', + 'setErrNo', + 'inetPton4', + 'inetNtop4', + 'inetPton6', + 'inetNtop6', + 'readSockaddr', + 'writeSockaddr', + 'DNS', + 'getHostByName', + 'Protocols', + 'Sockets', + 'getRandomDevice', + 'warnOnce', + 'traverseStack', + 'UNWIND_CACHE', + 'convertPCtoSourceLocation', + 'readEmAsmArgsArray', + 'readEmAsmArgs', + 'runEmAsmFunction', + 'runMainThreadEmAsm', + 'jstoi_q', + 'jstoi_s', + 'getExecutableName', + 'listenOnce', + 'autoResumeAudioContext', + 'dynCallLegacy', + 'getDynCaller', + 'dynCall', + 'handleException', + 'runtimeKeepalivePush', + 'runtimeKeepalivePop', + 'callUserCallback', + 'maybeExit', + 'safeSetTimeout', + 'asmjsMangle', + 'asyncLoad', + 'alignMemory', + 'mmapAlloc', + 'writeI53ToI64', + 'writeI53ToI64Clamped', + 'writeI53ToI64Signaling', + 'writeI53ToU64Clamped', + 'writeI53ToU64Signaling', + 'readI53FromI64', + 'readI53FromU64', + 'convertI32PairToI53', + 'convertI32PairToI53Checked', + 'convertU32PairToI53', + 'getCFunc', + 'ccall', + 'cwrap', + 'uleb128Encode', + 'sigToWasmTypes', + 'generateFuncType', + 'convertJsFunctionToWasm', + 'freeTableIndexes', + 'functionsInTableMap', + 'getEmptyTableSlot', + 'updateTableMap', + 'addFunction', + 'removeFunction', + 'reallyNegative', + 'unSign', + 'strLen', + 'reSign', + 'formatString', + 'setValue', + 'getValue', + 'PATH', + 'PATH_FS', + 'intArrayFromString', + 'intArrayToString', + 'AsciiToString', + 'stringToAscii', + 'UTF16Decoder', + 'UTF16ToString', + 'stringToUTF16', + 'lengthBytesUTF16', + 'UTF32ToString', + 'stringToUTF32', + 'lengthBytesUTF32', + 'allocateUTF8', + 'allocateUTF8OnStack', + 'writeStringToMemory', + 'writeArrayToMemory', + 'writeAsciiToMemory', + 'SYSCALLS', + 'getSocketFromFD', + 'getSocketAddress', + 'JSEvents', + 'registerKeyEventCallback', + 'specialHTMLTargets', + 'maybeCStringToJsString', + 'findEventTarget', + 'findCanvasEventTarget', + 'getBoundingClientRect', + 'fillMouseEventData', + 'registerMouseEventCallback', + 'registerWheelEventCallback', + 'registerUiEventCallback', + 'registerFocusEventCallback', + 'fillDeviceOrientationEventData', + 'registerDeviceOrientationEventCallback', + 'fillDeviceMotionEventData', + 'registerDeviceMotionEventCallback', + 'screenOrientation', + 'fillOrientationChangeEventData', + 'registerOrientationChangeEventCallback', + 'fillFullscreenChangeEventData', + 'registerFullscreenChangeEventCallback', + 'JSEvents_requestFullscreen', + 'JSEvents_resizeCanvasForFullscreen', + 'registerRestoreOldStyle', + 'hideEverythingExceptGivenElement', + 'restoreHiddenElements', + 'setLetterbox', + 'currentFullscreenStrategy', + 'restoreOldWindowedStyle', + 'softFullscreenResizeWebGLRenderTarget', + 'doRequestFullscreen', + 'fillPointerlockChangeEventData', + 'registerPointerlockChangeEventCallback', + 'registerPointerlockErrorEventCallback', + 'requestPointerLock', + 'fillVisibilityChangeEventData', + 'registerVisibilityChangeEventCallback', + 'registerTouchEventCallback', + 'fillGamepadEventData', + 'registerGamepadEventCallback', + 'registerBeforeUnloadEventCallback', + 'fillBatteryEventData', + 'battery', + 'registerBatteryEventCallback', + 'setCanvasElementSize', + 'getCanvasElementSize', + 'demangle', + 'demangleAll', + 'jsStackTrace', + 'stackTrace', + 'ExitStatus', + 'getEnvStrings', + 'checkWasiClock', + 'flush_NO_FILESYSTEM', + 'dlopenMissingError', + 'createDyncallWrapper', + 'setImmediateWrapped', + 'clearImmediateWrapped', + 'polyfillSetImmediate', + 'uncaughtExceptionCount', + 'exceptionLast', + 'exceptionCaught', + 'ExceptionInfo', + 'exception_addRef', + 'exception_decRef', + 'Browser', + 'setMainLoop', + 'wget', + 'FS', + 'MEMFS', + 'TTY', + 'PIPEFS', + 'SOCKFS', + '_setNetworkCallback', + 'tempFixedLengthArray', + 'miniTempWebGLFloatBuffers', + 'heapObjectForWebGLType', + 'heapAccessShiftForWebGLHeap', + 'GL', + 'emscriptenWebGLGet', + 'computeUnpackAlignedImageSize', + 'emscriptenWebGLGetTexPixelData', + 'emscriptenWebGLGetUniform', + 'webglGetUniformLocation', + 'webglPrepareUniformLocationsBeforeFirstUse', + 'webglGetLeftBracePos', + 'emscriptenWebGLGetVertexAttrib', + 'writeGLArray', + 'AL', + 'SDL_unicode', + 'SDL_ttfContext', + 'SDL_audio', + 'SDL', + 'SDL_gfx', + 'GLUT', + 'EGL', + 'GLFW_Window', + 'GLFW', + 'GLEW', + 'IDBStore', + 'runAndAbortIfError', + 'ALLOC_NORMAL', + 'ALLOC_STACK', + 'allocate', +]; +unexportedRuntimeSymbols.forEach(unexportedRuntimeSymbol); +var missingLibrarySymbols = [ + 'zeroMemory', + 'stringToNewUTF8', + 'exitJS', + 'setErrNo', + 'inetPton4', + 'inetNtop4', + 'inetPton6', + 'inetNtop6', + 'readSockaddr', + 'writeSockaddr', + 'getHostByName', + 'getRandomDevice', + 'traverseStack', + 'convertPCtoSourceLocation', + 'readEmAsmArgs', + 'runEmAsmFunction', + 'runMainThreadEmAsm', + 'jstoi_q', + 'jstoi_s', + 'getExecutableName', + 'listenOnce', + 'autoResumeAudioContext', + 'dynCallLegacy', + 'getDynCaller', + 'dynCall', + 'handleException', + 'runtimeKeepalivePush', + 'runtimeKeepalivePop', + 'callUserCallback', + 'maybeExit', + 'safeSetTimeout', + 'asmjsMangle', + 'asyncLoad', + 'alignMemory', + 'mmapAlloc', + 'writeI53ToI64', + 'writeI53ToI64Clamped', + 'writeI53ToI64Signaling', + 'writeI53ToU64Clamped', + 'writeI53ToU64Signaling', + 'readI53FromI64', + 'readI53FromU64', + 'convertI32PairToI53', + 'convertU32PairToI53', + 'getCFunc', + 'ccall', + 'cwrap', + 'uleb128Encode', + 'sigToWasmTypes', + 'generateFuncType', + 'convertJsFunctionToWasm', + 'getEmptyTableSlot', + 'updateTableMap', + 'addFunction', + 'removeFunction', + 'reallyNegative', + 'unSign', + 'strLen', + 'reSign', + 'formatString', + 'intArrayToString', + 'AsciiToString', + 'stringToAscii', + 'UTF16ToString', + 'stringToUTF16', + 'lengthBytesUTF16', + 'UTF32ToString', + 'stringToUTF32', + 'lengthBytesUTF32', + 'allocateUTF8', + 'allocateUTF8OnStack', + 'writeStringToMemory', + 'writeArrayToMemory', + 'writeAsciiToMemory', + 'getSocketFromFD', + 'getSocketAddress', + 'registerKeyEventCallback', + 'maybeCStringToJsString', + 'findEventTarget', + 'findCanvasEventTarget', + 'getBoundingClientRect', + 'fillMouseEventData', + 'registerMouseEventCallback', + 'registerWheelEventCallback', + 'registerUiEventCallback', + 'registerFocusEventCallback', + 'fillDeviceOrientationEventData', + 'registerDeviceOrientationEventCallback', + 'fillDeviceMotionEventData', + 'registerDeviceMotionEventCallback', + 'screenOrientation', + 'fillOrientationChangeEventData', + 'registerOrientationChangeEventCallback', + 'fillFullscreenChangeEventData', + 'registerFullscreenChangeEventCallback', + 'JSEvents_requestFullscreen', + 'JSEvents_resizeCanvasForFullscreen', + 'registerRestoreOldStyle', + 'hideEverythingExceptGivenElement', + 'restoreHiddenElements', + 'setLetterbox', + 'softFullscreenResizeWebGLRenderTarget', + 'doRequestFullscreen', + 'fillPointerlockChangeEventData', + 'registerPointerlockChangeEventCallback', + 'registerPointerlockErrorEventCallback', + 'requestPointerLock', + 'fillVisibilityChangeEventData', + 'registerVisibilityChangeEventCallback', + 'registerTouchEventCallback', + 'fillGamepadEventData', + 'registerGamepadEventCallback', + 'registerBeforeUnloadEventCallback', + 'fillBatteryEventData', + 'battery', + 'registerBatteryEventCallback', + 'setCanvasElementSize', + 'getCanvasElementSize', + 'demangle', + 'demangleAll', + 'jsStackTrace', + 'stackTrace', + 'getEnvStrings', + 'checkWasiClock', + 'createDyncallWrapper', + 'setImmediateWrapped', + 'clearImmediateWrapped', + 'polyfillSetImmediate', + 'ExceptionInfo', + 'exception_addRef', + 'exception_decRef', + 'setMainLoop', + '_setNetworkCallback', + 'heapObjectForWebGLType', + 'heapAccessShiftForWebGLHeap', + 'emscriptenWebGLGet', + 'computeUnpackAlignedImageSize', + 'emscriptenWebGLGetTexPixelData', + 'emscriptenWebGLGetUniform', + 'webglGetUniformLocation', + 'webglPrepareUniformLocationsBeforeFirstUse', + 'webglGetLeftBracePos', + 'emscriptenWebGLGetVertexAttrib', + 'writeGLArray', + 'SDL_unicode', + 'SDL_ttfContext', + 'SDL_audio', + 'GLFW_Window', + 'runAndAbortIfError', + 'ALLOC_NORMAL', + 'ALLOC_STACK', + 'allocate', +]; +missingLibrarySymbols.forEach(missingLibrarySymbol) + + +var calledRun; + +dependenciesFulfilled = function runCaller() { + // If run has never been called, and we should call run (INVOKE_RUN is true, and Module.noInitialRun is not false) + if (!calledRun) run(); + if (!calledRun) dependenciesFulfilled = runCaller; // try this again later, after new deps are fulfilled +}; + +function stackCheckInit() { + // This is normally called automatically during __wasm_call_ctors but need to + // get these values before even running any of the ctors so we call it redundantly + // here. + _emscripten_stack_init(); + // TODO(sbc): Move writeStackCookie to native to to avoid this. + writeStackCookie(); +} + +/** @type {function(Array=)} */ +function run(args) { + args = args || arguments_; + + if (runDependencies > 0) { + return; + } + + stackCheckInit(); + + preRun(); + + // a preRun added a dependency, run will be called later + if (runDependencies > 0) { + return; + } + + function doRun() { + // run may have just been called through dependencies being fulfilled just in this very frame, + // or while the async setStatus time below was happening + if (calledRun) return; + calledRun = true; + Module['calledRun'] = true; + + if (ABORT) return; + + initRuntime(); + + readyPromiseResolve(Module); + if (Module['onRuntimeInitialized']) Module['onRuntimeInitialized'](); + + assert(!Module['_main'], 'compiled without a main, but one is present. if you added it from JS, use Module["onRuntimeInitialized"]'); + + postRun(); + } + + if (Module['setStatus']) { + Module['setStatus']('Running...'); + setTimeout(function() { + setTimeout(function() { + Module['setStatus'](''); + }, 1); + doRun(); + }, 1); + } else + { + doRun(); + } + checkStackCookie(); +} + +function checkUnflushedContent() { + // Compiler settings do not allow exiting the runtime, so flushing + // the streams is not possible. but in ASSERTIONS mode we check + // if there was something to flush, and if so tell the user they + // should request that the runtime be exitable. + // Normally we would not even include flush() at all, but in ASSERTIONS + // builds we do so just for this check, and here we see if there is any + // content to flush, that is, we check if there would have been + // something a non-ASSERTIONS build would have not seen. + // How we flush the streams depends on whether we are in SYSCALLS_REQUIRE_FILESYSTEM=0 + // mode (which has its own special function for this; otherwise, all + // the code is inside libc) + var oldOut = out; + var oldErr = err; + var has = false; + out = err = (x) => { + has = true; + } + try { // it doesn't matter if it fails + flush_NO_FILESYSTEM(); + } catch(e) {} + out = oldOut; + err = oldErr; + if (has) { + warnOnce('stdio streams had content in them that was not flushed. you should set EXIT_RUNTIME to 1 (see the FAQ), or make sure to emit a newline when you printf etc.'); + warnOnce('(this may also be due to not including full filesystem support - try building with -sFORCE_FILESYSTEM)'); + } +} + +if (Module['preInit']) { + if (typeof Module['preInit'] == 'function') Module['preInit'] = [Module['preInit']]; + while (Module['preInit'].length > 0) { + Module['preInit'].pop()(); + } +} + +run(); + + + + + + +// Bindings utilities + +/** @suppress {duplicate} (TODO: avoid emitting this multiple times, it is redundant) */ +function WrapperObject() { +} +WrapperObject.prototype = Object.create(WrapperObject.prototype); +WrapperObject.prototype.constructor = WrapperObject; +WrapperObject.prototype.__class__ = WrapperObject; +WrapperObject.__cache__ = {}; +Module['WrapperObject'] = WrapperObject; + +/** @suppress {duplicate} (TODO: avoid emitting this multiple times, it is redundant) + @param {*=} __class__ */ +function getCache(__class__) { + return (__class__ || WrapperObject).__cache__; +} +Module['getCache'] = getCache; + +/** @suppress {duplicate} (TODO: avoid emitting this multiple times, it is redundant) + @param {*=} __class__ */ +function wrapPointer(ptr, __class__) { + var cache = getCache(__class__); + var ret = cache[ptr]; + if (ret) return ret; + ret = Object.create((__class__ || WrapperObject).prototype); + ret.ptr = ptr; + return cache[ptr] = ret; +} +Module['wrapPointer'] = wrapPointer; + +/** @suppress {duplicate} (TODO: avoid emitting this multiple times, it is redundant) */ +function castObject(obj, __class__) { + return wrapPointer(obj.ptr, __class__); +} +Module['castObject'] = castObject; + +Module['NULL'] = wrapPointer(0); + +/** @suppress {duplicate} (TODO: avoid emitting this multiple times, it is redundant) */ +function destroy(obj) { + if (!obj['__destroy__']) throw 'Error: Cannot destroy object. (Did you create it yourself?)'; + obj['__destroy__'](); + // Remove from cache, so the object can be GC'd and refs added onto it released + delete getCache(obj.__class__)[obj.ptr]; +} +Module['destroy'] = destroy; + +/** @suppress {duplicate} (TODO: avoid emitting this multiple times, it is redundant) */ +function compare(obj1, obj2) { + return obj1.ptr === obj2.ptr; +} +Module['compare'] = compare; + +/** @suppress {duplicate} (TODO: avoid emitting this multiple times, it is redundant) */ +function getPointer(obj) { + return obj.ptr; +} +Module['getPointer'] = getPointer; + +/** @suppress {duplicate} (TODO: avoid emitting this multiple times, it is redundant) */ +function getClass(obj) { + return obj.__class__; +} +Module['getClass'] = getClass; + +// Converts big (string or array) values into a C-style storage, in temporary space + +/** @suppress {duplicate} (TODO: avoid emitting this multiple times, it is redundant) */ +var ensureCache = { + buffer: 0, // the main buffer of temporary storage + size: 0, // the size of buffer + pos: 0, // the next free offset in buffer + temps: [], // extra allocations + needed: 0, // the total size we need next time + + prepare: function() { + if (ensureCache.needed) { + // clear the temps + for (var i = 0; i < ensureCache.temps.length; i++) { + Module['_free'](ensureCache.temps[i]); + } + ensureCache.temps.length = 0; + // prepare to allocate a bigger buffer + Module['_free'](ensureCache.buffer); + ensureCache.buffer = 0; + ensureCache.size += ensureCache.needed; + // clean up + ensureCache.needed = 0; + } + if (!ensureCache.buffer) { // happens first time, or when we need to grow + ensureCache.size += 128; // heuristic, avoid many small grow events + ensureCache.buffer = Module['_malloc'](ensureCache.size); + assert(ensureCache.buffer); + } + ensureCache.pos = 0; + }, + alloc: function(array, view) { + assert(ensureCache.buffer); + var bytes = view.BYTES_PER_ELEMENT; + var len = array.length * bytes; + len = (len + 7) & -8; // keep things aligned to 8 byte boundaries + var ret; + if (ensureCache.pos + len >= ensureCache.size) { + // we failed to allocate in the buffer, ensureCache time around :( + assert(len > 0); // null terminator, at least + ensureCache.needed += len; + ret = Module['_malloc'](len); + ensureCache.temps.push(ret); + } else { + // we can allocate in the buffer + ret = ensureCache.buffer + ensureCache.pos; + ensureCache.pos += len; + } + return ret; + }, + copy: function(array, view, offset) { + offset >>>= 0; + var bytes = view.BYTES_PER_ELEMENT; + switch (bytes) { + case 2: offset >>>= 1; break; + case 4: offset >>>= 2; break; + case 8: offset >>>= 3; break; + } + for (var i = 0; i < array.length; i++) { + view[offset + i] = array[i]; + } + }, +}; + +/** @suppress {duplicate} (TODO: avoid emitting this multiple times, it is redundant) */ +function ensureString(value) { + if (typeof value === 'string') { + var intArray = intArrayFromString(value); + var offset = ensureCache.alloc(intArray, HEAP8); + ensureCache.copy(intArray, HEAP8, offset); + return offset; + } + return value; +} +/** @suppress {duplicate} (TODO: avoid emitting this multiple times, it is redundant) */ +function ensureInt8(value) { + if (typeof value === 'object') { + var offset = ensureCache.alloc(value, HEAP8); + ensureCache.copy(value, HEAP8, offset); + return offset; + } + return value; +} +/** @suppress {duplicate} (TODO: avoid emitting this multiple times, it is redundant) */ +function ensureInt16(value) { + if (typeof value === 'object') { + var offset = ensureCache.alloc(value, HEAP16); + ensureCache.copy(value, HEAP16, offset); + return offset; + } + return value; +} +/** @suppress {duplicate} (TODO: avoid emitting this multiple times, it is redundant) */ +function ensureInt32(value) { + if (typeof value === 'object') { + var offset = ensureCache.alloc(value, HEAP32); + ensureCache.copy(value, HEAP32, offset); + return offset; + } + return value; +} +/** @suppress {duplicate} (TODO: avoid emitting this multiple times, it is redundant) */ +function ensureFloat32(value) { + if (typeof value === 'object') { + var offset = ensureCache.alloc(value, HEAPF32); + ensureCache.copy(value, HEAPF32, offset); + return offset; + } + return value; +} +/** @suppress {duplicate} (TODO: avoid emitting this multiple times, it is redundant) */ +function ensureFloat64(value) { + if (typeof value === 'object') { + var offset = ensureCache.alloc(value, HEAPF64); + ensureCache.copy(value, HEAPF64, offset); + return offset; + } + return value; +} + + +// VoidPtr +/** @suppress {undefinedVars, duplicate} @this{Object} */function VoidPtr() { throw "cannot construct a VoidPtr, no constructor in IDL" } +VoidPtr.prototype = Object.create(WrapperObject.prototype); +VoidPtr.prototype.constructor = VoidPtr; +VoidPtr.prototype.__class__ = VoidPtr; +VoidPtr.__cache__ = {}; +Module['VoidPtr'] = VoidPtr; + + VoidPtr.prototype['__destroy__'] = VoidPtr.prototype.__destroy__ = /** @suppress {undefinedVars, duplicate} @this{Object} */function() { + var self = this.ptr; + _emscripten_bind_VoidPtr___destroy___0(self); +}; +// Crc64Hash +/** @suppress {undefinedVars, duplicate} @this{Object} */function Crc64Hash() { + this.ptr = _emscripten_bind_Crc64Hash_Crc64Hash_0(); + getCache(Crc64Hash)[this.ptr] = this; +};; +Crc64Hash.prototype = Object.create(WrapperObject.prototype); +Crc64Hash.prototype.constructor = Crc64Hash; +Crc64Hash.prototype.__class__ = Crc64Hash; +Crc64Hash.__cache__ = {}; +Module['Crc64Hash'] = Crc64Hash; + +Crc64Hash.prototype['OnAppend'] = Crc64Hash.prototype.OnAppend = /** @suppress {undefinedVars, duplicate} @this{Object} */function(data, length) { + var self = this.ptr; + if (data && typeof data === 'object') data = data.ptr; + if (length && typeof length === 'object') length = length.ptr; + _emscripten_bind_Crc64Hash_OnAppend_2(self, data, length); +};; + +Crc64Hash.prototype['OnFinal'] = Crc64Hash.prototype.OnFinal = /** @suppress {undefinedVars, duplicate} @this{Object} */function(data, length, result) { + var self = this.ptr; + if (data && typeof data === 'object') data = data.ptr; + if (length && typeof length === 'object') length = length.ptr; + if (result && typeof result === 'object') result = result.ptr; + _emscripten_bind_Crc64Hash_OnFinal_3(self, data, length, result); +};; + + Crc64Hash.prototype['__destroy__'] = Crc64Hash.prototype.__destroy__ = /** @suppress {undefinedVars, duplicate} @this{Object} */function() { + var self = this.ptr; + _emscripten_bind_Crc64Hash___destroy___0(self); +}; + + return NativeCRC64.ready +} +); +})(); +// if (typeof exports === 'object' && typeof module === 'object') +// module.exports = NativeCRC64; +// else if (typeof define === 'function' && define['amd']) +// define([], function() { return NativeCRC64; }); +// else if (typeof exports === 'object') +// exports["NativeCRC64"] = NativeCRC64; + +// ESM-EXPORT-START (rewritten to `module.exports = NativeCRC64;` in dist/commonjs by copyJSFiles.cjs) +/* harmony default export */ const crc64 = (NativeCRC64); +// ESM-EXPORT-END + +;// CONCATENATED MODULE: ./node_modules/@azure/storage-common/dist/esm/StorageCRC64Calculator.js +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. +// @ts-expect-error the crc64 js file is auto generated + +/** + * Class used to calculator CRC64 checksum + */ +class StorageCRC64Calculator { + nativeCrc64Hash; + static nativeInstance; + constructor() { + this.nativeCrc64Hash = new StorageCRC64Calculator.nativeInstance.Crc64Hash(); + } + static initPromise; + /** + * Initialize environment for CRC64 checksum calculator + */ + static async init() { + if (!this.initPromise) { + this.initPromise = crc64().then((instance) => { + this.nativeInstance = instance; + return; + }); + } + return this.initPromise; + } + /** + * Append data for CRC64 checksum calculator + * @param body - content to be append + * @param length - length of the content + */ + append(body, length) { + const ptr = StorageCRC64Calculator.nativeInstance._malloc(length); + StorageCRC64Calculator.nativeInstance.HEAPU8.set(body, ptr); + this.nativeCrc64Hash.OnAppend(ptr, length); + StorageCRC64Calculator.nativeInstance._free(ptr); + } + /** + * Complete CRC64 checksum calculating and get the final result. + * @param body - + * @param length - + * @returns + */ + final(body, length) { + const ptr = StorageCRC64Calculator.nativeInstance._malloc(length); + StorageCRC64Calculator.nativeInstance.HEAPU8.set(body, ptr); + const result = StorageCRC64Calculator.nativeInstance._malloc(8); + this.nativeCrc64Hash.OnFinal(ptr, length, result); + StorageCRC64Calculator.nativeInstance._free(ptr); + const resultArray = new Uint8Array(8); + resultArray.set(StorageCRC64Calculator.nativeInstance.HEAPU8.subarray(result, result + 8)); + StorageCRC64Calculator.nativeInstance._free(result); + return resultArray; + } +} +//# sourceMappingURL=StorageCRC64Calculator.js.map +;// CONCATENATED MODULE: ./node_modules/@azure/storage-common/dist/esm/streamHelpers.js +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. +/** + * Signals the end of a stream by pushing null. + * In Node.js, this is required to signal the end of a Readable stream. + * @internal + */ +function signalStreamEnd(pushData) { + pushData(null); +} +//# sourceMappingURL=streamHelpers.js.map +;// CONCATENATED MODULE: ./node_modules/@azure/storage-common/dist/esm/StructuredMessageEncoding.js +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + + +const MESSAGE_VERSION = 1; +const MESSAGE_HEADER_LENGTH = 13; +const SEGMENT_HEADER_LENGTH = 10; +const FOOTER_LENGTH = 8; +const MAX_SEGMENT_CONTENT_LENGTH = 4 * 1024 * 1024; +var SMRegion; +(function (SMRegion) { + SMRegion[SMRegion["StreamHeader"] = 0] = "StreamHeader"; + SMRegion[SMRegion["StreamFooter"] = 1] = "StreamFooter"; + SMRegion[SMRegion["SegmentHeader"] = 2] = "SegmentHeader"; + SMRegion[SMRegion["SegmentFooter"] = 3] = "SegmentFooter"; + SMRegion[SMRegion["SegmentContent"] = 4] = "SegmentContent"; + SMRegion[SMRegion["Completed"] = 5] = "Completed"; +})(SMRegion || (SMRegion = {})); +class StructuredMessageEncoding { + pushData; + contentLength; + messageLength; + constructor(pushData, contentLength) { + this.pushData = pushData; + this.contentLength = contentLength; + this.contentOffset = 0; + this.currentDataOffset = 0; + this.segmentsCount = Math.ceil(this.contentLength / MAX_SEGMENT_CONTENT_LENGTH); + this.messageLength = + this.contentLength + + MESSAGE_HEADER_LENGTH + + (SEGMENT_HEADER_LENGTH + FOOTER_LENGTH) * this.segmentsCount + + FOOTER_LENGTH; + this.messageHeaderBuffer = new Uint8Array(MESSAGE_HEADER_LENGTH); + this.segmentNumber = 0; + this.segmentContentLength = 0; + this.segmentContentOffset = 0; + this.state = SMRegion.StreamHeader; + this.segmentCrc64 = new StorageCRC64Calculator(); + this.messageCrc64 = new StorageCRC64Calculator(); + } + currentDataOffset; + contentOffset; + segmentsCount; + messageHeaderBuffer; + segmentNumber; + segmentContentLength; + segmentContentOffset; + segmentCrc64; + messageCrc64; + state; + sourceDataHandler = (data) => { + this.currentDataOffset = 0; + if (this.state === SMRegion.StreamHeader) { + this.handlingMessageHeader(); + } + while (this.segmentNumber < this.segmentsCount) { + this.segmentContentLength = Math.min(MAX_SEGMENT_CONTENT_LENGTH, this.contentLength - this.contentOffset); + if (this.state === SMRegion.SegmentHeader) { + this.handlingSegmentHeader(); + } + if (this.state === SMRegion.SegmentContent) { + this.handlingSegmentContent(data); + } + if (this.state === SMRegion.SegmentFooter) { + this.handlingSegmentFooter(); + this.contentOffset += this.segmentContentLength; + } + if (this.currentDataOffset === data.length) { + break; + } + } + if (this.state === SMRegion.StreamFooter) { + this.handlingMessageFooter(); + } + }; + handlingMessageHeader() { + this.messageHeaderBuffer[0] = MESSAGE_VERSION; + this.fillInt64(this.messageHeaderBuffer, 1, this.messageLength); // content length + this.fillInt16(this.messageHeaderBuffer, 9, 1); + this.fillInt16(this.messageHeaderBuffer, 11, this.segmentsCount); + this.pushData(this.messageHeaderBuffer); + this.state = SMRegion.SegmentHeader; + } + handlingSegmentHeader() { + const segmentHeaderBuffer = new Uint8Array(SEGMENT_HEADER_LENGTH); + this.fillInt16(segmentHeaderBuffer, 0, this.segmentNumber + 1); + this.fillInt64(segmentHeaderBuffer, 2, this.segmentContentLength); + this.segmentContentOffset = 0; + this.pushData(segmentHeaderBuffer); + this.state = SMRegion.SegmentContent; + } + handlingSegmentContent(data) { + const length = Math.min(this.segmentContentLength - this.segmentContentOffset, data.length - this.currentDataOffset); + if (length !== 0) { + const current_content = Uint8Array.prototype.slice.call(data, this.currentDataOffset, this.currentDataOffset + length); + this.messageCrc64.append(current_content, length); + this.segmentCrc64.append(current_content, length); + this.pushData(current_content); + } + this.segmentContentOffset += length; + this.currentDataOffset += length; + if (this.segmentContentOffset === this.segmentContentLength) { + this.state = SMRegion.SegmentFooter; + } + } + handlingSegmentFooter() { + const crc64Result = this.segmentCrc64.final(new Uint8Array([]), 0); + this.pushData(crc64Result); + this.segmentCrc64 = new StorageCRC64Calculator(); + ++this.segmentNumber; + if (this.segmentNumber === this.segmentsCount) { + this.state = SMRegion.StreamFooter; + } + else { + this.state = SMRegion.SegmentHeader; + } + } + handlingMessageFooter() { + const crc64Result = this.messageCrc64.final(new Uint8Array([]), 0); + this.pushData(crc64Result); + signalStreamEnd(this.pushData); + this.state = SMRegion.Completed; + } + fillInt64(buffer, offset, input) { + if (buffer.length < offset + 8) { + throw new Error("Uint8Array length is not expected."); + } + const view = new DataView(buffer.buffer, buffer.byteOffset + offset, 8); + view.setBigUint64(0, BigInt(input), true); + } + fillInt16(buffer, offset, input) { + if (buffer.length < offset + 2) { + throw new Error("Uint8Array length is not expected."); + } + const view = new DataView(buffer.buffer, buffer.byteOffset + offset, 2); + view.setUint16(0, input, true); + } +} +//# sourceMappingURL=StructuredMessageEncoding.js.map +;// CONCATENATED MODULE: ./node_modules/@azure/storage-common/dist/esm/StructuredMessageEncodingStream.js +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + + + +function StructuredMessageEncodingStream_isNodeReadableStream(source) { + return (source !== null && + source instanceof external_node_stream_ && + typeof source._read === "function" && + typeof source._readableState === "object" && + typeof source.pipe === "function"); +} +/** + * + * To encode structured body for CRC64 content validtion in storage uploading. + * @param source - + * @param contentLength - + * @returns + */ +async function structuredMessageEncoding(source, contentLength) { + if (source === null) { + return { + body: source, + encodedContentLength: contentLength, + }; + } + if (StructuredMessageEncodingStream_isNodeReadableStream(source)) { + const encodingMessage = new StructuredMessageEncodingStream(source, contentLength, {}); + return { + body: encodingMessage, + encodedContentLength: encodingMessage.messageLength(), + }; + } + if (typeof source === "function") { + const encodingMessage = new StructuredMessageEncodingStream(source(), contentLength, {}); + return { + body: encodingMessage, + encodedContentLength: encodingMessage.messageLength(), + }; + } + if (source instanceof Blob) { + const encoding = await BrowserStream(source, contentLength); + return { + body: encoding.content, + encodedContentLength: encoding.encodedContentLength, + }; + } + if (typeof source === "string") { + const s = new external_node_stream_.Readable(); + s._read = () => { }; + s.push(source); + s.push(null); + const stringContentLength = Buffer.byteLength(source); + const encodingMessage = await new StructuredMessageEncodingStream(s, stringContentLength, {}); + return { + body: encodingMessage, + encodedContentLength: encodingMessage.messageLength(), + }; + } + if (source instanceof ArrayBuffer) { + const stream = external_node_stream_.Readable.from(Buffer.from(source)); + const encodingMessage = await new StructuredMessageEncodingStream(stream, contentLength, {}); + return { + body: encodingMessage, + encodedContentLength: encodingMessage.messageLength(), + }; + } + if (source instanceof Buffer) { + const stream = external_node_stream_.Readable.from(source); + const encodingMessage = await new StructuredMessageEncodingStream(stream, contentLength, {}); + return { + body: encodingMessage, + encodedContentLength: encodingMessage.messageLength(), + }; + } + if (ArrayBuffer.isView(source)) { + const stream = external_node_stream_.Readable.from(Buffer.from(source.buffer, source.byteOffset, source.byteLength)); + const encodingMessage = await new StructuredMessageEncodingStream(stream, contentLength, {}); + return { + body: encodingMessage, + encodedContentLength: encodingMessage.messageLength(), + }; + } + throw new Error("The specified request body type is not supported for CRC64 checksum"); +} +async function pump(reader, controller, encodingStream) { + const { done, value } = await reader.read(); + // When no more data needs to be consumed, close the stream + if (done) { + controller.close(); + return; + } + // Enqueue the next data chunk into our target stream + encodingStream.sourceDataHandler(Buffer.from(value)); +} +async function BrowserStream(source, contentLength) { + const sourceStream = source instanceof Blob ? source.stream() : source; + const reader = sourceStream.getReader(); + let encodingStream = undefined; + const stream = new ReadableStream({ + start(controller) { + encodingStream = new StructuredMessageEncoding((data) => { + controller.enqueue(data); + }, contentLength); + }, + pull(controller) { + pump(reader, controller, encodingStream) + .then(() => { + return; + }) + .catch(function (error) { + controller.error(error); + }); + }, + }); + const response = new Response(stream); + return { + content: await response.blob(), + encodedContentLength: encodingStream.messageLength, + }; +} +class StructuredMessageEncodingStream extends external_node_stream_.Readable { + source; + encodingMethods; + constructor(source, contentLength, options) { + super({ highWaterMark: options.highWaterMark }); + this.source = source; + this.encodingMethods = new StructuredMessageEncoding((dataToHandle) => { + if (!this.push(dataToHandle)) { + source.pause(); + } + }, contentLength); + this.setSourceEventHandlers(); + } + messageLength() { + return this.encodingMethods.messageLength; + } + setSourceEventHandlers() { + this.source.on("data", this.sourceDataHandler); + this.source.on("end", this.sourceErrorOrEndHandler); + this.source.on("error", this.sourceErrorOrEndHandler); + // needed for Node14 + this.source.on("aborted", this.sourceAbortedHandler); + } + removeSourceEventHandlers() { + this.source.removeListener("data", this.sourceDataHandler); + this.source.removeListener("end", this.sourceErrorOrEndHandler); + this.source.removeListener("error", this.sourceErrorOrEndHandler); + this.source.removeListener("aborted", this.sourceAbortedHandler); + } + sourceDataHandler = (data) => { + this.encodingMethods.sourceDataHandler(data); + }; + sourceAbortedHandler = () => { + const abortError = new AbortError_AbortError("The operation was aborted."); + this.destroy(abortError); + }; + sourceErrorOrEndHandler = (err) => { + if (err && err.name === "AbortError") { + this.destroy(err); + return; + } + // console.log( + // `Source stream emits end or error, offset: ${ + // this.offset + // }, dest end : ${this.end}` + // ); + this.removeSourceEventHandlers(); + }; + _read() { + this.source.resume(); + } + _destroy(error, callback) { + // remove listener from source and release source + this.removeSourceEventHandlers(); + this.source.destroy(); + callback(error === null ? undefined : error); + } +} +//# sourceMappingURL=StructuredMessageEncodingStream.js.map +;// CONCATENATED MODULE: ./node_modules/@azure/storage-common/dist/esm/StructuredMessageDecoding.js +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +const StructuredMessageDecoding_MESSAGE_VERSION = 1; +const StructuredMessageDecoding_MESSAGE_HEADER_LENGTH = 13; +const StructuredMessageDecoding_SEGMENT_HEADER_LENGTH = 10; +const StructuredMessageDecoding_FOOTER_LENGTH = 8; +var StructuredMessageDecoding_SMRegion; +(function (SMRegion) { + SMRegion[SMRegion["StreamHeader"] = 0] = "StreamHeader"; + SMRegion[SMRegion["StreamFooter"] = 1] = "StreamFooter"; + SMRegion[SMRegion["SegmentHeader"] = 2] = "SegmentHeader"; + SMRegion[SMRegion["SegmentFooter"] = 3] = "SegmentFooter"; + SMRegion[SMRegion["SegmentContent"] = 4] = "SegmentContent"; +})(StructuredMessageDecoding_SMRegion || (StructuredMessageDecoding_SMRegion = {})); +class StructuredMessageDecoding { + pushData; + segmentsCount; + // private currentState: SMRegion; + currentOffset; + currentDataOffset; + messageHeaderBuffer; + messageHeaderOffset; + segmentNumber; + segmentHeaderOffset; + segmentHeaderBuffer; + segmentContentOffset; + segmentContentLength; + segmentFooterOffset; + segmentFooterBuffer; + messageFooterOffset; + messageFooterBuffer; + segmentCrc64; + messageCrc64; + state; + constructor(pushData) { + this.pushData = pushData; + this.currentOffset = 0; + this.segmentsCount = 0; + this.messageHeaderOffset = 0; + this.messageHeaderBuffer = new Uint8Array(StructuredMessageDecoding_MESSAGE_HEADER_LENGTH); + this.currentDataOffset = 0; + this.segmentNumber = 0; + this.segmentHeaderOffset = 0; + this.segmentHeaderBuffer = new Uint8Array(StructuredMessageDecoding_SEGMENT_HEADER_LENGTH); + this.segmentContentOffset = 0; + this.segmentContentLength = 0; + this.state = StructuredMessageDecoding_SMRegion.StreamHeader; + this.segmentFooterOffset = 0; + this.segmentFooterBuffer = new Uint8Array(StructuredMessageDecoding_FOOTER_LENGTH); + this.messageFooterOffset = 0; + this.messageFooterBuffer = new Uint8Array(StructuredMessageDecoding_FOOTER_LENGTH); + this.segmentCrc64 = new StorageCRC64Calculator(); + this.messageCrc64 = new StorageCRC64Calculator(); + } + sourceDataHandler = (data) => { + this.currentDataOffset = 0; + if (this.state === StructuredMessageDecoding_SMRegion.StreamHeader) { + this.parseMessageHeader(data); + } + while (this.segmentNumber < this.segmentsCount && this.currentDataOffset < data.length) { + if (this.state === StructuredMessageDecoding_SMRegion.SegmentHeader) { + this.parseSegmentHeader(data); + } + if (this.state === StructuredMessageDecoding_SMRegion.SegmentContent) { + this.parseSegmentContent(data); + } + if (this.state === StructuredMessageDecoding_SMRegion.SegmentFooter) { + this.parseSegmentFooter(data); + } + } + if (this.state === StructuredMessageDecoding_SMRegion.StreamFooter) { + this.parseMessageFooter(data); + } + }; + parseMessageHeader(data) { + const length = Math.min(StructuredMessageDecoding_MESSAGE_HEADER_LENGTH - this.messageHeaderOffset, data.length - this.currentDataOffset); + this.messageHeaderBuffer.set(Uint8Array.prototype.slice.call(data, this.currentDataOffset, this.currentDataOffset + length), this.messageHeaderOffset); + this.currentDataOffset += length; + this.messageHeaderOffset += length; + this.currentOffset += length; + if (this.messageHeaderOffset === StructuredMessageDecoding_MESSAGE_HEADER_LENGTH) { + const currentVersion = this.messageHeaderBuffer[0]; + if (currentVersion !== StructuredMessageDecoding_MESSAGE_VERSION) { + throw new Error("Unexpected message version"); + } + this.segmentsCount = this.toInt16(Uint8Array.prototype.slice.call(this.messageHeaderBuffer, 11, 13)); + this.state = StructuredMessageDecoding_SMRegion.SegmentHeader; + } + } + parseSegmentHeader(data) { + const length = Math.min(StructuredMessageDecoding_SEGMENT_HEADER_LENGTH - this.segmentHeaderOffset, data.length - this.currentDataOffset); + this.segmentHeaderBuffer.set(Uint8Array.prototype.slice.call(data, this.currentDataOffset, this.currentDataOffset + length), this.segmentHeaderOffset); + this.currentDataOffset += length; + this.segmentHeaderOffset += length; + this.currentOffset += length; + if (this.segmentHeaderOffset === StructuredMessageDecoding_SEGMENT_HEADER_LENGTH) { + const currentSegmentNumber = this.toInt16(Uint8Array.prototype.slice.call(this.segmentHeaderBuffer, 0, 2)); + if (currentSegmentNumber !== this.segmentNumber + 1) { + throw new Error("Segment number is unexpected."); + } + this.segmentContentLength = this.toInt64(this.segmentHeaderBuffer, 2); + this.segmentContentOffset = 0; + this.state = StructuredMessageDecoding_SMRegion.SegmentContent; + } + } + parseSegmentContent(data) { + const length = Math.min(this.segmentContentLength - this.segmentContentOffset, data.length - this.currentDataOffset); + const dataToHandle = Uint8Array.prototype.slice.call(data, this.currentDataOffset, this.currentDataOffset + length); + this.segmentCrc64.append(dataToHandle, length); + this.messageCrc64.append(dataToHandle, length); + this.pushData(dataToHandle); + this.currentDataOffset += length; + this.segmentContentOffset += length; + this.currentOffset += length; + if (this.segmentContentOffset === this.segmentContentLength) { + this.state = StructuredMessageDecoding_SMRegion.SegmentFooter; + } + } + parseSegmentFooter(data) { + const length = Math.min(StructuredMessageDecoding_FOOTER_LENGTH - this.segmentFooterOffset, data.length - this.currentDataOffset); + this.segmentFooterBuffer.set(Uint8Array.prototype.slice.call(data, this.currentDataOffset, this.currentDataOffset + length), this.segmentFooterOffset); + this.currentDataOffset += length; + this.segmentFooterOffset += length; + this.currentOffset += length; + if (this.segmentFooterOffset === StructuredMessageDecoding_FOOTER_LENGTH) { + const crc64Result = this.segmentCrc64.final(new Uint8Array([]), 0); + if (!this.checkCrc64CheckSum(crc64Result, this.segmentFooterBuffer)) { + throw new Error(`Segment check sum mismatch, segmentNumber: ${this.segmentNumber}`); + } + ++this.segmentNumber; + if (this.segmentNumber === this.segmentsCount) { + this.state = StructuredMessageDecoding_SMRegion.StreamFooter; + } + else { + this.segmentHeaderOffset = 0; + this.segmentFooterOffset = 0; + this.segmentCrc64 = new StorageCRC64Calculator(); + this.state = StructuredMessageDecoding_SMRegion.SegmentHeader; + } + } + } + parseMessageFooter(data) { + const length = Math.min(StructuredMessageDecoding_FOOTER_LENGTH - this.messageFooterOffset, data.length - this.currentDataOffset); + this.messageFooterBuffer.set(Uint8Array.prototype.slice.call(data, this.currentDataOffset, this.currentDataOffset + length), this.messageFooterOffset); + this.currentDataOffset += length; + this.messageFooterOffset += length; + this.currentOffset += length; + if (this.messageFooterOffset === StructuredMessageDecoding_FOOTER_LENGTH) { + const crc64Result = this.messageCrc64.final(new Uint8Array([]), 0); + if (!this.checkCrc64CheckSum(crc64Result, this.messageFooterBuffer)) { + throw new Error("Check sum mismatch"); + } + this.pushData(null); + } + } + toInt64(input, offset) { + if (input.length < offset + 8) { + throw new Error("CRC64 buffer error, something wrong with crc64 calculator"); + } + const view = new DataView(input.buffer, input.byteOffset + offset, 8); + return Number(view.getBigUint64(0, true)); + } + toInt16(input) { + if (input.length !== 2) { + throw new Error("CRC64 buffer error, something wrong with crc64 calculator"); + } + return input[0] + input[1] * 256; + } + checkCrc64CheckSum(first, second) { + if (first.length !== 8 || second.length !== 8) { + throw new Error("CRC64 buffer error, something wrong with crc64 calculator"); + } + for (let index = 0; index < 8; ++index) { + if (first[index] !== second[index]) { + return false; + } + } + return true; + } +} +//# sourceMappingURL=StructuredMessageDecoding.js.map +;// CONCATENATED MODULE: ./node_modules/@azure/storage-common/dist/esm/StructuredMessageDecodingStream.js +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + + + +/** + * To decode structured body for CRC64 content validtion in storage downloading. + * @param source - + */ +async function structuredMessageDecodingBrowser(source) { + /* eslint-disable no-unused-expressions */ + source; + throw new Error("structuredMessageDecodingBrowser is only for Browser"); +} +/** + * To decode structured body for CRC64 content validtion in storage downloading. + * @param source - + * @param options - + * @returns + */ +function structuredMessageDecodingStream(source, options) { + return new StructuredMessageDecodingStream(source, options); +} +class StructuredMessageDecodingStream extends external_node_stream_.Readable { + source; + decodingMethods; + constructor(source, options) { + super({ highWaterMark: options.highWaterMark }); + this.source = source; + this.decodingMethods = new StructuredMessageDecoding((dataToHandle) => { + if (!this.push(dataToHandle)) { + source.pause(); + } + }); + this.setSourceEventHandlers(); + } + _read() { + this.source.resume(); + } + setSourceEventHandlers() { + this.source.on("data", this.sourceDataHandler); + this.source.on("end", this.sourceErrorOrEndHandler); + this.source.on("error", this.sourceErrorOrEndHandler); + // needed for Node14 + this.source.on("aborted", this.sourceAbortedHandler); + } + removeSourceEventHandlers() { + this.source.removeListener("data", this.sourceDataHandler); + this.source.removeListener("end", this.sourceErrorOrEndHandler); + this.source.removeListener("error", this.sourceErrorOrEndHandler); + this.source.removeListener("aborted", this.sourceAbortedHandler); + } + sourceDataHandler = (data) => { + try { + this.decodingMethods.sourceDataHandler(data); + } + catch (err) { + this.destroy(err); + } + }; + sourceAbortedHandler = () => { + const abortError = new AbortError_AbortError("The operation was aborted."); + this.destroy(abortError); + }; + sourceErrorOrEndHandler = (err) => { + if (err) { + this.destroy(err); + return; + } + this.removeSourceEventHandlers(); + }; + _destroy(error, callback) { + // remove listener from source and release source + this.removeSourceEventHandlers(); + this.source.destroy(); + callback(error === null ? undefined : error); + } +} +//# sourceMappingURL=StructuredMessageDecodingStream.js.map ;// CONCATENATED MODULE: ./node_modules/@azure/storage-common/dist/esm/cache.js // Copyright (c) Microsoft Corporation. // Licensed under the MIT License. @@ -56739,10 +63402,161 @@ class BaseRequestPolicy { } } //# sourceMappingURL=RequestPolicy.js.map +;// CONCATENATED MODULE: ./node_modules/@azure/storage-common/dist/esm/policies/StorageBrowserPolicy.js +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +/** + * StorageBrowserPolicy will handle differences between Node.js and browser runtime, including: + * + * 1. Browsers cache GET/HEAD requests by adding conditional headers such as 'IF_MODIFIED_SINCE'. + * StorageBrowserPolicy is a policy used to add a timestamp query to GET/HEAD request URL + * thus avoid the browser cache. + * + * 2. Remove cookie header for security + * + * 3. Remove content-length header to avoid browsers warning + * + * In Node.js, this policy is a no-op pass-through. + */ +class StorageBrowserPolicy extends BaseRequestPolicy { + /** + * Creates an instance of StorageBrowserPolicy. + * @param nextPolicy - + * @param options - + */ + // The base class has a protected constructor. Adding a public one to enable constructing of this class. + /* eslint-disable-next-line @typescript-eslint/no-useless-constructor*/ + constructor(nextPolicy, options) { + super(nextPolicy, options); + } + /** + * Sends out request. + * + * @param request - + */ + async sendRequest(request) { + return this._nextPolicy.sendRequest(request); + } +} +//# sourceMappingURL=StorageBrowserPolicy.js.map +;// CONCATENATED MODULE: ./node_modules/@azure/storage-common/dist/esm/StorageBrowserPolicyFactory.js +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + + +/** + * StorageBrowserPolicyFactory is a factory class helping generating StorageBrowserPolicy objects. + */ +class StorageBrowserPolicyFactory { + /** + * Creates a StorageBrowserPolicyFactory object. + * + * @param nextPolicy - + * @param options - + */ + create(nextPolicy, options) { + return new StorageBrowserPolicy(nextPolicy, options); + } +} +//# sourceMappingURL=StorageBrowserPolicyFactory.js.map +;// CONCATENATED MODULE: ./node_modules/@azure/storage-common/dist/esm/policies/CredentialPolicy.js +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +/** + * Credential policy used to sign HTTP(S) requests before sending. This is an + * abstract class. + */ +class CredentialPolicy extends BaseRequestPolicy { + /** + * Sends out request. + * + * @param request - + */ + sendRequest(request) { + return this._nextPolicy.sendRequest(this.signRequest(request)); + } + /** + * Child classes must implement this method with request signing. This method + * will be executed in {@link sendRequest}. + * + * @param request - + */ + signRequest(request) { + // Child classes must override this method with request signing. This method + // will be executed in sendRequest(). + return request; + } +} +//# sourceMappingURL=CredentialPolicy.js.map +;// CONCATENATED MODULE: ./node_modules/@azure/storage-common/dist/esm/policies/AnonymousCredentialPolicy.js +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +/** + * AnonymousCredentialPolicy is used with HTTP(S) requests that read public resources + * or for use with Shared Access Signatures (SAS). + */ +class AnonymousCredentialPolicy extends CredentialPolicy { + /** + * Creates an instance of AnonymousCredentialPolicy. + * @param nextPolicy - + * @param options - + */ + // The base class has a protected constructor. Adding a public one to enable constructing of this class. + /* eslint-disable-next-line @typescript-eslint/no-useless-constructor*/ + constructor(nextPolicy, options) { + super(nextPolicy, options); + } +} +//# sourceMappingURL=AnonymousCredentialPolicy.js.map +;// CONCATENATED MODULE: ./node_modules/@azure/storage-common/dist/esm/credentials/Credential.js +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. +/** + * Credential is an abstract class for Azure Storage HTTP requests signing. This + * class will host an credentialPolicyCreator factory which generates CredentialPolicy. + */ +class Credential { + /** + * Creates a RequestPolicy object. + * + * @param _nextPolicy - + * @param _options - + */ + create(_nextPolicy, _options) { + throw new Error("Method should be implemented in children classes."); + } +} +//# sourceMappingURL=Credential.js.map +;// CONCATENATED MODULE: ./node_modules/@azure/storage-common/dist/esm/credentials/AnonymousCredential.js +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + + +/** + * AnonymousCredential provides a credentialPolicyCreator member used to create + * AnonymousCredentialPolicy objects. AnonymousCredentialPolicy is used with + * HTTP(S) requests that read public resources or for use with Shared Access + * Signatures (SAS). + */ +class AnonymousCredential extends Credential { + /** + * Creates an {@link AnonymousCredentialPolicy} object. + * + * @param nextPolicy - + * @param options - + */ + create(nextPolicy, options) { + return new AnonymousCredentialPolicy(nextPolicy, options); + } +} +//# sourceMappingURL=AnonymousCredential.js.map ;// CONCATENATED MODULE: ./node_modules/@azure/storage-common/dist/esm/utils/constants.js // Copyright (c) Microsoft Corporation. // Licensed under the MIT License. -const utils_constants_SDK_VERSION = "1.0.0"; +const utils_constants_SDK_VERSION = "12.4.0"; const constants_URLConstants = { Parameters: { FORCE_BROWSER_NO_CACHE: "_", @@ -56917,11 +63731,11 @@ function extractConnectionStringParts(connectionString) { // Account connection string let defaultEndpointsProtocol = ""; let accountName = ""; - let accountKey = Buffer.from("accountKey", "base64"); + let accountKey = stringToUint8Array("accountKey", "base64"); let endpointSuffix = ""; // Get account name and key accountName = getValueInConnString(connectionString, "AccountName"); - accountKey = Buffer.from(getValueInConnString(connectionString, "AccountKey"), "base64"); + accountKey = stringToUint8Array(getValueInConnString(connectionString, "AccountKey"), "base64"); if (!blobEndpoint) { // BlobEndpoint is not present in the Account connection string // Can be obtained from `${defaultEndpointsProtocol}://${accountName}.blob.${endpointSuffix}` @@ -57157,22 +63971,6 @@ function truncatedISO8061Date(date, withMilliseconds = true) { ? dateString.substring(0, dateString.length - 1) + "0000" + "Z" : dateString.substring(0, dateString.length - 5) + "Z"; } -/** - * Base64 encode. - * - * @param content - - */ -function base64encode(content) { - return !isNodeLike ? btoa(content) : Buffer.from(content).toString("base64"); -} -/** - * Base64 decode. - * - * @param encodedString - - */ -function base64decode(encodedString) { - return !isNodeLike ? atob(encodedString) : Buffer.from(encodedString, "base64").toString(); -} /** * Generate a 64 bytes base64 block ID string. * @@ -57189,7 +63987,7 @@ function generateBlockID(blockIDPrefix, blockIndex) { } const res = blockIDPrefix + padStart(blockIndex.toString(), maxSourceStringLength - blockIDPrefix.length, "0"); - return base64encode(res); + return uint8ArrayToString(stringToUint8Array(res, "utf-8"), "base64"); } /** * Delay specified time interval. @@ -57349,167 +64147,6 @@ function assertResponse(response) { throw new TypeError(`Unexpected response object ${response}`); } //# sourceMappingURL=utils.common.js.map -;// CONCATENATED MODULE: ./node_modules/@azure/storage-common/dist/esm/policies/StorageBrowserPolicy.js -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - - - - -/** - * StorageBrowserPolicy will handle differences between Node.js and browser runtime, including: - * - * 1. Browsers cache GET/HEAD requests by adding conditional headers such as 'IF_MODIFIED_SINCE'. - * StorageBrowserPolicy is a policy used to add a timestamp query to GET/HEAD request URL - * thus avoid the browser cache. - * - * 2. Remove cookie header for security - * - * 3. Remove content-length header to avoid browsers warning - */ -class StorageBrowserPolicy extends BaseRequestPolicy { - /** - * Creates an instance of StorageBrowserPolicy. - * @param nextPolicy - - * @param options - - */ - // The base class has a protected constructor. Adding a public one to enable constructing of this class. - /* eslint-disable-next-line @typescript-eslint/no-useless-constructor*/ - constructor(nextPolicy, options) { - super(nextPolicy, options); - } - /** - * Sends out request. - * - * @param request - - */ - async sendRequest(request) { - if (esm_isNodeLike) { - return this._nextPolicy.sendRequest(request); - } - if (request.method.toUpperCase() === "GET" || request.method.toUpperCase() === "HEAD") { - request.url = setURLParameter(request.url, constants_URLConstants.Parameters.FORCE_BROWSER_NO_CACHE, new Date().getTime().toString()); - } - request.headers.remove(constants_HeaderConstants.COOKIE); - // According to XHR standards, content-length should be fully controlled by browsers - request.headers.remove(constants_HeaderConstants.CONTENT_LENGTH); - return this._nextPolicy.sendRequest(request); - } -} -//# sourceMappingURL=StorageBrowserPolicy.js.map -;// CONCATENATED MODULE: ./node_modules/@azure/storage-common/dist/esm/StorageBrowserPolicyFactory.js -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - - -/** - * StorageBrowserPolicyFactory is a factory class helping generating StorageBrowserPolicy objects. - */ -class StorageBrowserPolicyFactory { - /** - * Creates a StorageBrowserPolicyFactory object. - * - * @param nextPolicy - - * @param options - - */ - create(nextPolicy, options) { - return new StorageBrowserPolicy(nextPolicy, options); - } -} -//# sourceMappingURL=StorageBrowserPolicyFactory.js.map -;// CONCATENATED MODULE: ./node_modules/@azure/storage-common/dist/esm/policies/CredentialPolicy.js -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -/** - * Credential policy used to sign HTTP(S) requests before sending. This is an - * abstract class. - */ -class CredentialPolicy extends BaseRequestPolicy { - /** - * Sends out request. - * - * @param request - - */ - sendRequest(request) { - return this._nextPolicy.sendRequest(this.signRequest(request)); - } - /** - * Child classes must implement this method with request signing. This method - * will be executed in {@link sendRequest}. - * - * @param request - - */ - signRequest(request) { - // Child classes must override this method with request signing. This method - // will be executed in sendRequest(). - return request; - } -} -//# sourceMappingURL=CredentialPolicy.js.map -;// CONCATENATED MODULE: ./node_modules/@azure/storage-common/dist/esm/policies/AnonymousCredentialPolicy.js -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -/** - * AnonymousCredentialPolicy is used with HTTP(S) requests that read public resources - * or for use with Shared Access Signatures (SAS). - */ -class AnonymousCredentialPolicy extends CredentialPolicy { - /** - * Creates an instance of AnonymousCredentialPolicy. - * @param nextPolicy - - * @param options - - */ - // The base class has a protected constructor. Adding a public one to enable constructing of this class. - /* eslint-disable-next-line @typescript-eslint/no-useless-constructor*/ - constructor(nextPolicy, options) { - super(nextPolicy, options); - } -} -//# sourceMappingURL=AnonymousCredentialPolicy.js.map -;// CONCATENATED MODULE: ./node_modules/@azure/storage-common/dist/esm/credentials/Credential.js -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -/** - * Credential is an abstract class for Azure Storage HTTP requests signing. This - * class will host an credentialPolicyCreator factory which generates CredentialPolicy. - */ -class Credential { - /** - * Creates a RequestPolicy object. - * - * @param _nextPolicy - - * @param _options - - */ - create(_nextPolicy, _options) { - throw new Error("Method should be implemented in children classes."); - } -} -//# sourceMappingURL=Credential.js.map -;// CONCATENATED MODULE: ./node_modules/@azure/storage-common/dist/esm/credentials/AnonymousCredential.js -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - - -/** - * AnonymousCredential provides a credentialPolicyCreator member used to create - * AnonymousCredentialPolicy objects. AnonymousCredentialPolicy is used with - * HTTP(S) requests that read public resources or for use with Shared Access - * Signatures (SAS). - */ -class AnonymousCredential extends Credential { - /** - * Creates an {@link AnonymousCredentialPolicy} object. - * - * @param nextPolicy - - * @param options - - */ - create(nextPolicy, options) { - return new AnonymousCredentialPolicy(nextPolicy, options); - } -} -//# sourceMappingURL=AnonymousCredential.js.map ;// CONCATENATED MODULE: ./node_modules/@azure/storage-common/dist/esm/utils/SharedKeyComparator.js // Copyright (c) Microsoft Corporation. // Licensed under the MIT License. @@ -58058,9 +64695,6 @@ class StorageRetryPolicyFactory { ;// CONCATENATED MODULE: ./node_modules/@azure/storage-common/dist/esm/policies/StorageBrowserPolicyV2.js // Copyright (c) Microsoft Corporation. // Licensed under the MIT License. - - - /** * The programmatic identifier of the StorageBrowserPolicy. */ @@ -58068,20 +64702,13 @@ const storageBrowserPolicyName = "storageBrowserPolicy"; /** * storageBrowserPolicy is a policy used to prevent browsers from caching requests * and to remove cookies and explicit content-length headers. + * + * In Node.js, this policy is a no-op pass-through. */ function storageBrowserPolicy() { return { name: storageBrowserPolicyName, async sendRequest(request, next) { - if (esm_isNodeLike) { - return next(request); - } - if (request.method === "GET" || request.method === "HEAD") { - request.url = setURLParameter(request.url, constants_URLConstants.Parameters.FORCE_BROWSER_NO_CACHE, new Date().getTime().toString()); - } - request.headers.delete(constants_HeaderConstants.COOKIE); - // According to XHR standards, content-length should be fully controlled by browsers - request.headers.delete(constants_HeaderConstants.CONTENT_LENGTH); return next(request); }, }; @@ -58487,12 +65114,11 @@ class UserDelegationKeyCredential { * @param stringToSign - */ computeHMACSHA256(stringToSign) { - // console.log(`stringToSign: ${JSON.stringify(stringToSign)}`); return (0,external_node_crypto_.createHmac)("sha256", this.key).update(stringToSign, "utf8").digest("base64"); } } //# sourceMappingURL=UserDelegationKeyCredential.js.map -;// CONCATENATED MODULE: ./node_modules/@azure/storage-common/dist/esm/index.js +;// CONCATENATED MODULE: ./node_modules/@azure/storage-common/dist/esm/indexPlatform.js // Copyright (c) Microsoft Corporation. // Licensed under the MIT License. @@ -58513,12 +65139,21 @@ class UserDelegationKeyCredential { + + + + +//# sourceMappingURL=indexPlatform.js.map +;// CONCATENATED MODULE: ./node_modules/@azure/storage-common/dist/esm/index.js +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + //# sourceMappingURL=index.js.map ;// CONCATENATED MODULE: ./node_modules/@azure/storage-blob/dist/esm/utils/constants.js // Copyright (c) Microsoft Corporation. // Licensed under the MIT License. -const esm_utils_constants_SDK_VERSION = "12.31.0"; -const SERVICE_VERSION = "2026-02-06"; +const esm_utils_constants_SDK_VERSION = "12.32.0"; +const SERVICE_VERSION = "2026-04-06"; const BLOCK_BLOB_MAX_UPLOAD_BLOB_BYTES = 256 * 1024 * 1024; // 256MB const BLOCK_BLOB_MAX_STAGE_BLOCK_BYTES = 4000 * 1024 * 1024; // 4000MB const BLOCK_BLOB_MAX_BLOCKS = 50000; @@ -59172,8 +65807,8 @@ var KnownStorageErrorCode; KnownStorageErrorCode["FeatureVersionMismatch"] = "FeatureVersionMismatch"; /** IncrementalCopyBlobMismatch */ KnownStorageErrorCode["IncrementalCopyBlobMismatch"] = "IncrementalCopyBlobMismatch"; - /** IncrementalCopyOfEarlierVersionSnapshotNotAllowed */ - KnownStorageErrorCode["IncrementalCopyOfEarlierVersionSnapshotNotAllowed"] = "IncrementalCopyOfEarlierVersionSnapshotNotAllowed"; + /** IncrementalCopyOfEarlierSnapshotNotAllowed */ + KnownStorageErrorCode["IncrementalCopyOfEarlierSnapshotNotAllowed"] = "IncrementalCopyOfEarlierSnapshotNotAllowed"; /** IncrementalCopySourceMustBeSnapshot */ KnownStorageErrorCode["IncrementalCopySourceMustBeSnapshot"] = "IncrementalCopySourceMustBeSnapshot"; /** InfiniteLeaseDurationRequired */ @@ -59903,6 +66538,13 @@ const KeyInfo = { name: "String", }, }, + delegatedUserTid: { + serializedName: "DelegatedUserTid", + xmlName: "DelegatedUserTid", + type: { + name: "String", + }, + }, }, }, }; @@ -59960,6 +66602,13 @@ const UserDelegationKey = { name: "String", }, }, + signedDelegatedUserTenantId: { + serializedName: "SignedDelegatedUserTid", + xmlName: "SignedDelegatedUserTid", + type: { + name: "String", + }, + }, value: { serializedName: "Value", required: true, @@ -61587,6 +68236,9 @@ const ServiceGetAccountInfoHeaders = { "Standard_RAGRS", "Standard_ZRS", "Premium_LRS", + "Standard_GZRS", + "Premium_ZRS", + "Standard_RAGZRS", ], }, }, @@ -63038,6 +69690,9 @@ const ContainerGetAccountInfoHeaders = { "Standard_RAGRS", "Standard_ZRS", "Premium_LRS", + "Standard_GZRS", + "Premium_ZRS", + "Standard_RAGZRS", ], }, }, @@ -63404,6 +70059,20 @@ const BlobDownloadHeaders = { name: "Boolean", }, }, + structuredBodyType: { + serializedName: "x-ms-structured-body", + xmlName: "x-ms-structured-body", + type: { + name: "String", + }, + }, + structuredContentLength: { + serializedName: "x-ms-structured-content-length", + xmlName: "x-ms-structured-content-length", + type: { + name: "Number", + }, + }, errorCode: { serializedName: "x-ms-error-code", xmlName: "x-ms-error-code", @@ -65237,6 +71906,9 @@ const BlobGetAccountInfoHeaders = { "Standard_RAGRS", "Standard_ZRS", "Premium_LRS", + "Standard_GZRS", + "Premium_ZRS", + "Standard_RAGZRS", ], }, }, @@ -65875,6 +72547,13 @@ const PageBlobUploadPagesHeaders = { name: "String", }, }, + structuredBodyType: { + serializedName: "x-ms-structured-body", + xmlName: "x-ms-structured-body", + type: { + name: "String", + }, + }, errorCode: { serializedName: "x-ms-error-code", xmlName: "x-ms-error-code", @@ -66738,6 +73417,13 @@ const AppendBlobAppendBlockHeaders = { name: "String", }, }, + structuredBodyType: { + serializedName: "x-ms-structured-body", + xmlName: "x-ms-structured-body", + type: { + name: "String", + }, + }, errorCode: { serializedName: "x-ms-error-code", xmlName: "x-ms-error-code", @@ -67051,6 +73737,13 @@ const BlockBlobUploadHeaders = { name: "String", }, }, + structuredBodyType: { + serializedName: "x-ms-structured-body", + xmlName: "x-ms-structured-body", + type: { + name: "String", + }, + }, errorCode: { serializedName: "x-ms-error-code", xmlName: "x-ms-error-code", @@ -67269,6 +73962,13 @@ const BlockBlobStageBlockHeaders = { name: "String", }, }, + structuredBodyType: { + serializedName: "x-ms-structured-body", + xmlName: "x-ms-structured-body", + type: { + name: "String", + }, + }, errorCode: { serializedName: "x-ms-error-code", xmlName: "x-ms-error-code", @@ -67694,7 +74394,7 @@ const timeoutInSeconds = { const version = { parameterPath: "version", mapper: { - defaultValue: "2026-02-06", + defaultValue: "2026-04-06", isConstant: true, serializedName: "x-ms-version", type: { @@ -68300,6 +75000,16 @@ const rangeGetContentCRC64 = { }, }, }; +const structuredBodyType = { + parameterPath: ["options", "structuredBodyType"], + mapper: { + serializedName: "x-ms-structured-body", + xmlName: "x-ms-structured-body", + type: { + name: "String", + }, + }, +}; const encryptionKey = { parameterPath: ["options", "cpkInfo", "encryptionKey"], mapper: { @@ -68381,6 +75091,26 @@ const blobDeleteType = { }, }, }; +const accessTierIfModifiedSince = { + parameterPath: ["options", "accessTierIfModifiedSince"], + mapper: { + serializedName: "x-ms-access-tier-if-modified-since", + xmlName: "x-ms-access-tier-if-modified-since", + type: { + name: "DateTimeRfc1123", + }, + }, +}; +const accessTierIfUnmodifiedSince = { + parameterPath: ["options", "accessTierIfUnmodifiedSince"], + mapper: { + serializedName: "x-ms-access-tier-if-unmodified-since", + xmlName: "x-ms-access-tier-if-unmodified-since", + type: { + name: "DateTimeRfc1123", + }, + }, +}; const comp11 = { parameterPath: "comp", mapper: { @@ -69037,6 +75767,16 @@ const ifSequenceNumberEqualTo = { }, }, }; +const structuredContentLength = { + parameterPath: ["options", "structuredContentLength"], + mapper: { + serializedName: "x-ms-structured-content-length", + xmlName: "x-ms-structured-content-length", + type: { + name: "Number", + }, + }, +}; const pageWrite1 = { parameterPath: "pageWrite", mapper: { @@ -69091,6 +75831,36 @@ const range1 = { }, }, }; +const sourceEncryptionKey = { + parameterPath: ["options", "sourceCpkInfo", "sourceEncryptionKey"], + mapper: { + serializedName: "x-ms-source-encryption-key", + xmlName: "x-ms-source-encryption-key", + type: { + name: "String", + }, + }, +}; +const sourceEncryptionKeySha256 = { + parameterPath: ["options", "sourceCpkInfo", "sourceEncryptionKeySha256"], + mapper: { + serializedName: "x-ms-source-encryption-key-sha256", + xmlName: "x-ms-source-encryption-key-sha256", + type: { + name: "String", + }, + }, +}; +const sourceEncryptionAlgorithm = { + parameterPath: ["options", "sourceCpkInfo", "sourceEncryptionAlgorithm"], + mapper: { + serializedName: "x-ms-source-encryption-algorithm", + xmlName: "x-ms-source-encryption-algorithm", + type: { + name: "String", + }, + }, +}; const comp20 = { parameterPath: "comp", mapper: { @@ -70602,6 +77372,7 @@ const downloadOperationSpec = { range, rangeGetContentMD5, rangeGetContentCRC64, + structuredBodyType, encryptionKey, encryptionKeySha256, encryptionAlgorithm, @@ -70677,6 +77448,8 @@ const blob_deleteOperationSpec = { ifNoneMatch, ifTags, deleteSnapshots, + accessTierIfModifiedSince, + accessTierIfUnmodifiedSince, ], isXML: true, serializer: blob_xmlSerializer, @@ -71543,6 +78316,7 @@ const uploadPagesOperationSpec = { ifModifiedSince, ifUnmodifiedSince, range, + structuredBodyType, encryptionKey, encryptionKeySha256, encryptionAlgorithm, @@ -71558,6 +78332,7 @@ const uploadPagesOperationSpec = { ifSequenceNumberLessThanOrEqualTo, ifSequenceNumberLessThan, ifSequenceNumberEqualTo, + structuredContentLength, ], isXML: true, contentType: "application/xml; charset=utf-8", @@ -71646,6 +78421,9 @@ const uploadPagesFromURLOperationSpec = { sourceRange, sourceContentCrc64, range1, + sourceEncryptionKey, + sourceEncryptionKeySha256, + sourceEncryptionAlgorithm, ], isXML: true, serializer: pageBlob_xmlSerializer, @@ -71946,6 +78724,7 @@ const appendBlockOperationSpec = { leaseId, ifModifiedSince, ifUnmodifiedSince, + structuredBodyType, encryptionKey, encryptionKeySha256, encryptionAlgorithm, @@ -71957,6 +78736,7 @@ const appendBlockOperationSpec = { transactionalContentCrc64, contentType1, accept2, + structuredContentLength, maxSize, appendPosition, ], @@ -72004,6 +78784,9 @@ const appendBlockFromUrlOperationSpec = { transactionalContentMD5, sourceUrl, sourceContentCrc64, + sourceEncryptionKey, + sourceEncryptionKeySha256, + sourceEncryptionAlgorithm, maxSize, appendPosition, sourceRange1, @@ -72164,6 +78947,7 @@ const uploadOperationSpec = { leaseId, ifModifiedSince, ifUnmodifiedSince, + structuredBodyType, encryptionKey, encryptionKeySha256, encryptionAlgorithm, @@ -72186,6 +78970,7 @@ const uploadOperationSpec = { transactionalContentCrc64, contentType1, accept2, + structuredContentLength, blobType2, ], isXML: true, @@ -72242,6 +79027,9 @@ const putBlobFromUrlOperationSpec = { copySourceTags, fileRequestIntent, transactionalContentMD5, + sourceEncryptionKey, + sourceEncryptionKeySha256, + sourceEncryptionAlgorithm, blobType2, copySourceBlobProperties, ], @@ -72272,6 +79060,7 @@ const stageBlockOperationSpec = { requestId, contentLength, leaseId, + structuredBodyType, encryptionKey, encryptionKeySha256, encryptionAlgorithm, @@ -72280,6 +79069,7 @@ const stageBlockOperationSpec = { transactionalContentCrc64, contentType1, accept2, + structuredContentLength, ], isXML: true, contentType: "application/xml; charset=utf-8", @@ -72323,6 +79113,9 @@ const stageBlockFromURLOperationSpec = { fileRequestIntent, sourceUrl, sourceContentCrc64, + sourceEncryptionKey, + sourceEncryptionKeySha256, + sourceEncryptionAlgorithm, sourceRange1, ], isXML: true, @@ -72454,7 +79247,7 @@ class StorageClient extends ExtendedServiceClient { const defaults = { requestContentType: "application/json; charset=utf-8", }; - const packageDetails = `azsdk-js-azure-storage-blob/12.30.0`; + const packageDetails = `azsdk-js-azure-storage-blob/12.32.0`; const userAgentPrefix = options.userAgentOptions && options.userAgentOptions.userAgentPrefix ? `${options.userAgentOptions.userAgentPrefix} ${packageDetails}` : `${packageDetails}`; @@ -72470,7 +79263,7 @@ class StorageClient extends ExtendedServiceClient { // Parameter assignments this.url = url; // Assigning values to Constant parameters - this.version = options.version || "2026-02-06"; + this.version = options.version || "2026-04-06"; this.service = new ServiceImpl(this); this.container = new ContainerImpl(this); this.blob = new BlobImpl(this); @@ -72522,6 +79315,7 @@ class StorageContextClient extends StorageClient { + /** * Reserved URL characters must be properly escaped for Storage services like Blob or File. * @@ -72874,7 +79668,7 @@ function utils_common_truncatedISO8061Date(date, withMilliseconds = true) { * * @param content - */ -function utils_common_base64encode(content) { +function base64encode(content) { return !esm_isNodeLike ? btoa(content) : Buffer.from(content).toString("base64"); } /** @@ -72882,7 +79676,7 @@ function utils_common_base64encode(content) { * * @param encodedString - */ -function utils_common_base64decode(encodedString) { +function base64decode(encodedString) { return !isNodeLike ? atob(encodedString) : Buffer.from(encodedString, "base64").toString(); } /** @@ -72901,7 +79695,7 @@ function utils_common_generateBlockID(blockIDPrefix, blockIndex) { } const res = blockIDPrefix + utils_common_padStart(blockIndex.toString(), maxSourceStringLength - blockIDPrefix.length, "0"); - return utils_common_base64encode(res); + return base64encode(res); } /** * Delay specified time interval. @@ -73285,6 +80079,31 @@ function utils_common_assertResponse(response) { } throw new TypeError(`Unexpected response object ${response}`); } +async function setUploadChecksumParameters(body, contentLength, parameters, uploadOptions, configContentChecksumAlgorithm) { + let contentChecksumAlgorithm = uploadOptions.contentChecksumAlgorithm ?? configContentChecksumAlgorithm; + if (contentChecksumAlgorithm === undefined) { + contentChecksumAlgorithm = "Customized"; + } + if (contentChecksumAlgorithm === "Auto") { + contentChecksumAlgorithm = "StorageCrc64"; + } + let bodyInfo = undefined; + if (contentChecksumAlgorithm === "Customized") { + parameters.transactionalContentMD5 = uploadOptions.transactionalContentMD5; + parameters.transactionalContentCrc64 = uploadOptions.transactionalContentCrc64; + } + else if (contentChecksumAlgorithm === "StorageCrc64") { + await StorageCRC64Calculator.init(); + bodyInfo = await structuredMessageEncoding(body, contentLength); + parameters.structuredBodyType = "XSM/1.0; properties=crc64"; + parameters.structuredContentLength = contentLength; + } + return { + body: contentChecksumAlgorithm === "StorageCrc64" ? bodyInfo.body : body, + contentLength: contentChecksumAlgorithm === "StorageCrc64" ? bodyInfo.encodedContentLength : contentLength, + contentChecksumAlgorithm: contentChecksumAlgorithm, + }; +} //# sourceMappingURL=utils.common.js.map ;// CONCATENATED MODULE: ./node_modules/@azure/storage-blob/dist/esm/StorageClient.js // Copyright (c) Microsoft Corporation. @@ -73922,6 +80741,11 @@ class SASQueryParameters { * Property of user delegation key. */ signedVersion; + /** + * The delegated user tenant id in Azure AD. + * Property of user delegation key. + */ + signedDelegatedUserTid; /** * Authorized AAD Object ID in GUID format. The AAD Object ID of a user authorized by the owner of the User Delegation Key * to perform the action granted by the SAS. The Azure Storage service will ensure that the owner of the user delegation key @@ -73934,6 +80758,14 @@ class SASQueryParameters { * This is only used for User Delegation SAS. */ correlationId; + /** + * Keys for request headers required in the SAS token + */ + requestHeaderKeys; + /** + * Keys for request query parameters required in the SAS token + */ + requestQueryParameterKeys; /** * Optional. IP range allowed for this SAS. * @@ -73948,7 +80780,7 @@ class SASQueryParameters { } return undefined; } - constructor(version, signature, permissionsOrOptions, services, resourceTypes, protocol, startsOn, expiresOn, ipRange, identifier, resource, cacheControl, contentDisposition, contentEncoding, contentLanguage, contentType, userDelegationKey, preauthorizedAgentObjectId, correlationId, encryptionScope, delegatedUserObjectId) { + constructor(version, signature, permissionsOrOptions, services, resourceTypes, protocol, startsOn, expiresOn, ipRange, identifier, resource, cacheControl, contentDisposition, contentEncoding, contentLanguage, contentType, userDelegationKey, preauthorizedAgentObjectId, correlationId, encryptionScope, delegatedUserObjectId, requestHeaderKeys, requestQueryParameterKeys) { this.version = version; this.signature = signature; if (permissionsOrOptions !== undefined && typeof permissionsOrOptions !== "string") { @@ -73969,6 +80801,8 @@ class SASQueryParameters { this.contentEncoding = permissionsOrOptions.contentEncoding; this.contentLanguage = permissionsOrOptions.contentLanguage; this.contentType = permissionsOrOptions.contentType; + this.requestHeaderKeys = permissionsOrOptions.requestHeaderKeys; + this.requestQueryParameterKeys = permissionsOrOptions.requestQueryParameterKeys; if (permissionsOrOptions.userDelegationKey) { this.signedOid = permissionsOrOptions.userDelegationKey.signedObjectId; this.signedTenantId = permissionsOrOptions.userDelegationKey.signedTenantId; @@ -73976,6 +80810,8 @@ class SASQueryParameters { this.signedExpiresOn = permissionsOrOptions.userDelegationKey.signedExpiresOn; this.signedService = permissionsOrOptions.userDelegationKey.signedService; this.signedVersion = permissionsOrOptions.userDelegationKey.signedVersion; + this.signedDelegatedUserTid = + permissionsOrOptions.userDelegationKey.signedDelegatedUserTenantId; this.preauthorizedAgentObjectId = permissionsOrOptions.preauthorizedAgentObjectId; this.correlationId = permissionsOrOptions.correlationId; } @@ -73997,6 +80833,8 @@ class SASQueryParameters { this.contentEncoding = contentEncoding; this.contentLanguage = contentLanguage; this.contentType = contentType; + this.requestHeaderKeys = requestHeaderKeys; + this.requestQueryParameterKeys = requestQueryParameterKeys; if (userDelegationKey) { this.signedOid = userDelegationKey.signedObjectId; this.signedTenantId = userDelegationKey.signedTenantId; @@ -74004,6 +80842,7 @@ class SASQueryParameters { this.signedExpiresOn = userDelegationKey.signedExpiresOn; this.signedService = userDelegationKey.signedService; this.signedVersion = userDelegationKey.signedVersion; + this.signedDelegatedUserTid = userDelegationKey.signedDelegatedUserTenantId; this.preauthorizedAgentObjectId = preauthorizedAgentObjectId; this.correlationId = correlationId; } @@ -74032,7 +80871,6 @@ class SASQueryParameters { "skv", // Signed key version "sr", "sp", - "sig", "rscc", "rscd", "rsce", @@ -74041,6 +80879,10 @@ class SASQueryParameters { "saoid", "scid", "sduoid", // Signed key user delegation object ID + "skdutid", // Signed key user delegation tenant ID + "srh", // Request Headers + "srq", // Request QueryParameters + "sig", ]; const queries = []; for (const param of params) { @@ -74090,6 +80932,9 @@ class SASQueryParameters { case "skv": // Signed key version this.tryAppendQueryParameter(queries, param, this.signedVersion); break; + case "skdutid": + this.tryAppendQueryParameter(queries, param, this.signedDelegatedUserTid); + break; case "sr": this.tryAppendQueryParameter(queries, param, this.resource); break; @@ -74123,6 +80968,12 @@ class SASQueryParameters { case "sduoid": this.tryAppendQueryParameter(queries, param, this.delegatedUserObjectId); break; + case "srh": // Request headers + this.tryAppendQueryParameter(queries, param, this.requestHeaderKeys); + break; + case "srq": // Request headers + this.tryAppendQueryParameter(queries, param, this.requestQueryParameterKeys); + break; } } return queries.join("&"); @@ -74178,7 +81029,10 @@ function generateBlobSASQueryParametersInternal(blobSASSignatureValues, sharedKe return generateBlobSASQueryParameters20201206(blobSASSignatureValues, sharedKeyCredential); } else { - if (version >= "2025-07-05") { + if (version >= "2026-04-06") { + return generateBlobSASQueryParametersUDK20260406(blobSASSignatureValues, userDelegationKeyCredential); + } + else if (version >= "2025-07-05") { return generateBlobSASQueryParametersUDK20250705(blobSASSignatureValues, userDelegationKeyCredential); } else { @@ -74729,7 +81583,7 @@ function generateBlobSASQueryParametersUDK20250705(blobSASSignatureValues, userD blobSASSignatureValues.preauthorizedAgentObjectId, undefined, // agentObjectId blobSASSignatureValues.correlationId, - undefined, // SignedKeyDelegatedUserTenantId, will be added in a future release. + userDelegationKeyCredential.userDelegationKey.signedDelegatedUserTenantId, // SignedKeyDelegatedUserTenantId, will be added in a future release. blobSASSignatureValues.delegatedUserObjectId, blobSASSignatureValues.ipRange ? ipRangeToString(blobSASSignatureValues.ipRange) : "", blobSASSignatureValues.protocol ? blobSASSignatureValues.protocol : "", @@ -74749,6 +81603,134 @@ function generateBlobSASQueryParametersUDK20250705(blobSASSignatureValues, userD stringToSign: stringToSign, }; } +/** + * ONLY AVAILABLE IN NODE.JS RUNTIME. + * IMPLEMENTATION FOR API VERSION FROM 2020-12-06. + * + * Creates an instance of SASQueryParameters. + * + * Only accepts required settings needed to create a SAS. For optional settings please + * set corresponding properties directly, such as permissions, startsOn. + * + * WARNING: identifier will be ignored, permissions and expiresOn are required. + * + * @param blobSASSignatureValues - + * @param userDelegationKeyCredential - + */ +function generateBlobSASQueryParametersUDK20260406(blobSASSignatureValues, userDelegationKeyCredential) { + blobSASSignatureValues = SASSignatureValuesSanityCheckAndAutofill(blobSASSignatureValues); + // Stored access policies are not supported for a user delegation SAS. + if (!blobSASSignatureValues.permissions || !blobSASSignatureValues.expiresOn) { + throw new RangeError("Must provide 'permissions' and 'expiresOn' for Blob SAS generation when generating user delegation SAS."); + } + let resource = "c"; + let timestamp = blobSASSignatureValues.snapshotTime; + if (blobSASSignatureValues.blobName) { + resource = "b"; + if (blobSASSignatureValues.snapshotTime) { + resource = "bs"; + } + else if (blobSASSignatureValues.versionId) { + resource = "bv"; + timestamp = blobSASSignatureValues.versionId; + } + } + // Calling parse and toString guarantees the proper ordering and throws on invalid characters. + let verifiedPermissions; + if (blobSASSignatureValues.permissions) { + if (blobSASSignatureValues.blobName) { + verifiedPermissions = BlobSASPermissions.parse(blobSASSignatureValues.permissions.toString()).toString(); + } + else { + verifiedPermissions = ContainerSASPermissions.parse(blobSASSignatureValues.permissions.toString()).toString(); + } + } + // Signature is generated on the un-url-encoded values. + const stringToSign = [ + verifiedPermissions ? verifiedPermissions : "", + blobSASSignatureValues.startsOn + ? utils_common_truncatedISO8061Date(blobSASSignatureValues.startsOn, false) + : "", + blobSASSignatureValues.expiresOn + ? utils_common_truncatedISO8061Date(blobSASSignatureValues.expiresOn, false) + : "", + getCanonicalName(userDelegationKeyCredential.accountName, blobSASSignatureValues.containerName, blobSASSignatureValues.blobName), + userDelegationKeyCredential.userDelegationKey.signedObjectId, + userDelegationKeyCredential.userDelegationKey.signedTenantId, + userDelegationKeyCredential.userDelegationKey.signedStartsOn + ? utils_common_truncatedISO8061Date(userDelegationKeyCredential.userDelegationKey.signedStartsOn, false) + : "", + userDelegationKeyCredential.userDelegationKey.signedExpiresOn + ? utils_common_truncatedISO8061Date(userDelegationKeyCredential.userDelegationKey.signedExpiresOn, false) + : "", + userDelegationKeyCredential.userDelegationKey.signedService, + userDelegationKeyCredential.userDelegationKey.signedVersion, + blobSASSignatureValues.preauthorizedAgentObjectId, + undefined, // agentObjectId + blobSASSignatureValues.correlationId, + userDelegationKeyCredential.userDelegationKey.signedDelegatedUserTenantId, // SignedKeyDelegatedUserTenantId, will be added in a future release. + blobSASSignatureValues.delegatedUserObjectId, + blobSASSignatureValues.ipRange ? ipRangeToString(blobSASSignatureValues.ipRange) : "", + blobSASSignatureValues.protocol ? blobSASSignatureValues.protocol : "", + blobSASSignatureValues.version, + resource, + timestamp, + blobSASSignatureValues.encryptionScope, + formatRequestHeadersForSasSigning(blobSASSignatureValues.requestHeaders), + formatRequestQueryParametersForSasSigning(blobSASSignatureValues.requestQueryParameters), + blobSASSignatureValues.cacheControl, + blobSASSignatureValues.contentDisposition, + blobSASSignatureValues.contentEncoding, + blobSASSignatureValues.contentLanguage, + blobSASSignatureValues.contentType, + ].join("\n"); + const signature = userDelegationKeyCredential.computeHMACSHA256(stringToSign); + return { + sasQueryParameters: new SASQueryParameters(blobSASSignatureValues.version, signature, verifiedPermissions, undefined, undefined, blobSASSignatureValues.protocol, blobSASSignatureValues.startsOn, blobSASSignatureValues.expiresOn, blobSASSignatureValues.ipRange, blobSASSignatureValues.identifier, resource, blobSASSignatureValues.cacheControl, blobSASSignatureValues.contentDisposition, blobSASSignatureValues.contentEncoding, blobSASSignatureValues.contentLanguage, blobSASSignatureValues.contentType, userDelegationKeyCredential.userDelegationKey, blobSASSignatureValues.preauthorizedAgentObjectId, blobSASSignatureValues.correlationId, blobSASSignatureValues.encryptionScope, blobSASSignatureValues.delegatedUserObjectId, getKeysOfRequestHeaders(blobSASSignatureValues.requestHeaders), getKeysOfRequestHeaders(blobSASSignatureValues.requestQueryParameters)), + stringToSign: stringToSign, + }; +} +function formatRequestHeadersForSasSigning(requestHeaders) { + if (requestHeaders === undefined) { + return undefined; + } + let canonicalValue = ""; + Object.keys(requestHeaders).forEach(function (key) { + // key: the name of the object key + // index: the ordinal position of the key within the object + canonicalValue = canonicalValue + key + ":" + requestHeaders[key] + "\n"; + }); + return canonicalValue; +} +function formatRequestQueryParametersForSasSigning(queryParameters) { + if (queryParameters === undefined) { + return undefined; + } + let canonicalValue = ""; + Object.keys(queryParameters).forEach(function (key) { + // key: the name of the object key + // index: the ordinal position of the key within the object + canonicalValue = canonicalValue + "\n" + key + ":" + queryParameters[key]; + }); + return canonicalValue; +} +function getKeysOfRequestHeaders(requestHeaders) { + if (requestHeaders === undefined) { + return undefined; + } + let requestKeys = ""; + let index = 0; + Object.keys(requestHeaders).forEach(function (key) { + // key: the name of the object key + // index: the ordinal position of the key within the object + if (index !== 0) { + requestKeys = requestKeys + ","; + } + requestKeys = requestKeys + key; + ++index; + }); + return requestKeys; +} function getCanonicalName(accountName, containerName, blobName) { // Container: "/blob/account/containerName" // Blob: "/blob/account/containerName/blobName" @@ -75112,6 +82094,7 @@ class RetriableReadableStream extends external_node_stream_.Readable { this.push(null); } else if (this.offset <= this.end) { + // TODO if error is CRC64 not match, directly throw out the error. // console.log( // `retries: ${this.retries}, max retries: ${this.maxRetries}` // ); @@ -75148,6 +82131,7 @@ class RetriableReadableStream extends external_node_stream_.Readable { // Licensed under the MIT License. + /** * ONLY AVAILABLE IN NODE.JS RUNTIME. * @@ -75566,6 +82550,9 @@ class BlobDownloadResponse { get legalHold() { return this.originalResponse.legalHold; } + get structuredBodyType() { + return this.originalResponse.structuredBodyType; + } /** * The response body as a browser Blob. * Always undefined in node.js. @@ -75605,7 +82592,10 @@ class BlobDownloadResponse { */ constructor(originalResponse, getter, offset, count, options = {}) { this.originalResponse = originalResponse; - this.blobDownloadStream = new RetriableReadableStream(this.originalResponse.readableStreamBody, getter, offset, count, options); + const streamBody = this.originalResponse.structuredBodyType === undefined + ? this.originalResponse.readableStreamBody + : structuredMessageDecodingStream(this.originalResponse.readableStreamBody, options); + this.blobDownloadStream = new RetriableReadableStream(streamBody, getter, offset, count, options); } } //# sourceMappingURL=BlobDownloadResponse.js.map @@ -78349,22 +85339,30 @@ async function streamToBuffer(stream, buffer, offset, end, encoding) { return new Promise((resolve, reject) => { const timeout = setTimeout(() => reject(new Error(`The operation cannot be completed in timeout.`)), REQUEST_TIMEOUT); stream.on("readable", () => { + // Already filled the requested amount; ignore any further `readable` events. if (pos >= count) { clearTimeout(timeout); resolve(); return; } - let chunk = stream.read(); - if (!chunk) { - return; - } - if (typeof chunk === "string") { - chunk = Buffer.from(chunk, encoding); + // Drain all currently-buffered chunks. Required since Node.js v26, where + // `stream.read()` returns one buffered chunk at a time instead of the + // concatenation of all queued data (see nodejs/node#60441). + let chunk; + while ((chunk = stream.read()) !== null) { + if (typeof chunk === "string") { + chunk = Buffer.from(chunk, encoding); + } + // How much data needed in this chunk + const chunkLength = pos + chunk.length > count ? count - pos : chunk.length; + buffer.fill(chunk.slice(0, chunkLength), offset + pos, offset + pos + chunkLength); + pos += chunkLength; + if (pos >= count) { + clearTimeout(timeout); + resolve(); + return; + } } - // How much data needed in this chunk - const chunkLength = pos + chunk.length > count ? count - pos : chunk.length; - buffer.fill(chunk.slice(0, chunkLength), offset + pos, offset + pos + chunkLength); - pos += chunkLength; }); stream.on("end", () => { clearTimeout(timeout); @@ -78393,19 +85391,21 @@ async function streamToBuffer2(stream, buffer, encoding) { const bufferSize = buffer.length; return new Promise((resolve, reject) => { stream.on("readable", () => { - let chunk = stream.read(); - if (!chunk) { - return; - } - if (typeof chunk === "string") { - chunk = Buffer.from(chunk, encoding); - } - if (pos + chunk.length > bufferSize) { - reject(new Error(`Stream exceeds buffer size. Buffer size: ${bufferSize}`)); - return; + // Drain all currently-buffered chunks. Required since Node.js v26, where + // `stream.read()` returns one buffered chunk at a time instead of the + // concatenation of all queued data (see nodejs/node#60441). + let chunk; + while ((chunk = stream.read()) !== null) { + if (typeof chunk === "string") { + chunk = Buffer.from(chunk, encoding); + } + if (pos + chunk.length > bufferSize) { + reject(new Error(`Stream exceeds buffer size. Buffer size: ${bufferSize}`)); + return; + } + buffer.fill(chunk, pos, pos + chunk.length); + pos += chunk.length; } - buffer.fill(chunk, pos, pos + chunk.length); - pos += chunk.length; }); stream.on("end", () => { resolve(pos); @@ -78498,6 +85498,10 @@ class BlobClient extends StorageClient_StorageClient { _containerName; _versionId; _snapshot; + /** + * Config used in creating blob client instances. + */ + blobClientConfig; /** * The name of the blob. */ @@ -78521,6 +85525,7 @@ class BlobClient extends StorageClient_StorageClient { // (url: string, pipeline: Pipeline) url = urlOrConnectionString; pipeline = credentialOrPipelineOrContainerName; + options = blobNameOrOptions; } else if ((esm_isNodeLike && credentialOrPipelineOrContainerName instanceof StorageSharedKeyCredential) || credentialOrPipelineOrContainerName instanceof AnonymousCredential || @@ -78581,6 +85586,7 @@ class BlobClient extends StorageClient_StorageClient { this.blobContext = this.storageClientContext.blob; this._snapshot = utils_common_getURLParameter(this.url, utils_constants_URLConstants.Parameters.SNAPSHOT); this._versionId = utils_common_getURLParameter(this.url, utils_constants_URLConstants.Parameters.VERSIONID); + this.blobClientConfig = options; } /** * Creates a new BlobClient object identical to the source but with the specified snapshot timestamp. @@ -78590,7 +85596,7 @@ class BlobClient extends StorageClient_StorageClient { * @returns A new BlobClient object identical to the source but with the specified snapshot timestamp */ withSnapshot(snapshot) { - return new BlobClient(utils_common_setURLParameter(this.url, utils_constants_URLConstants.Parameters.SNAPSHOT, snapshot.length === 0 ? undefined : snapshot), this.pipeline); + return new BlobClient(utils_common_setURLParameter(this.url, utils_constants_URLConstants.Parameters.SNAPSHOT, snapshot.length === 0 ? undefined : snapshot), this.pipeline, this.blobClientConfig); } /** * Creates a new BlobClient object pointing to a version of this blob. @@ -78600,28 +85606,28 @@ class BlobClient extends StorageClient_StorageClient { * @returns A new BlobClient object pointing to the version of this blob. */ withVersion(versionId) { - return new BlobClient(utils_common_setURLParameter(this.url, utils_constants_URLConstants.Parameters.VERSIONID, versionId.length === 0 ? undefined : versionId), this.pipeline); + return new BlobClient(utils_common_setURLParameter(this.url, utils_constants_URLConstants.Parameters.VERSIONID, versionId.length === 0 ? undefined : versionId), this.pipeline, this.blobClientConfig); } /** * Creates a AppendBlobClient object. * */ getAppendBlobClient() { - return new AppendBlobClient(this.url, this.pipeline); + return new AppendBlobClient(this.url, this.pipeline, this.blobClientConfig); } /** * Creates a BlockBlobClient object. * */ getBlockBlobClient() { - return new BlockBlobClient(this.url, this.pipeline); + return new BlockBlobClient(this.url, this.pipeline, this.blobClientConfig); } /** * Creates a PageBlobClient object. * */ getPageBlobClient() { - return new PageBlobClient(this.url, this.pipeline); + return new PageBlobClient(this.url, this.pipeline, this.blobClientConfig); } /** * Reads or downloads a blob from the system, including its metadata and properties. @@ -78709,6 +85715,16 @@ class BlobClient extends StorageClient_StorageClient { options.conditions = options.conditions || {}; ensureCpkIfSpecified(options.customerProvidedKey, this.isHttps); return tracingClient.withSpan("BlobClient-download", options, async (updatedOptions) => { + let contentChecksumAlgorithm = options.contentChecksumAlgorithm ?? this.blobClientConfig?.downloadContentChecksumAlgorithm; + if (contentChecksumAlgorithm === undefined) { + contentChecksumAlgorithm = "Customized"; + } + else if (contentChecksumAlgorithm === "Auto") { + contentChecksumAlgorithm = "StorageCrc64"; + } + if (contentChecksumAlgorithm === "StorageCrc64") { + await StorageCRC64Calculator.init(); + } const res = utils_common_assertResponse((await this.blobContext.download({ abortSignal: options.abortSignal, leaseAccessConditions: options.conditions, @@ -78725,6 +85741,7 @@ class BlobClient extends StorageClient_StorageClient { snapshot: options.snapshot, cpkInfo: options.customerProvidedKey, tracingOptions: updatedOptions.tracingOptions, + structuredBodyType: contentChecksumAlgorithm === "StorageCrc64" ? "XSM/1.0; properties=crc64" : undefined, }))); const wrappedRes = { ...res, @@ -78734,6 +85751,9 @@ class BlobClient extends StorageClient_StorageClient { }; // Return browser response immediately if (!esm_isNodeLike) { + if (contentChecksumAlgorithm === "StorageCrc64") { + wrappedRes.blobBody = structuredMessageDecodingBrowser(await wrappedRes.blobBody); + } return wrappedRes; } // We support retrying when download stream unexpected ends in Node.js runtime @@ -78748,9 +85768,16 @@ class BlobClient extends StorageClient_StorageClient { if (res.contentLength === undefined) { throw new RangeError(`File download response doesn't contain valid content length header`); } + if (contentChecksumAlgorithm === "StorageCrc64" && + res.structuredContentLength === undefined) { + throw new RangeError(`Unexpected structured content length`); + } if (!res.etag) { throw new RangeError(`File download response doesn't contain valid etag header`); } + const expectedContentLength = contentChecksumAlgorithm === "StorageCrc64" + ? res.structuredContentLength + : res.contentLength; return new BlobDownloadResponse(wrappedRes, async (start) => { const updatedDownloadOptions = { leaseAccessConditions: options.conditions, @@ -78762,13 +85789,14 @@ class BlobClient extends StorageClient_StorageClient { ifTags: options.conditions?.tagConditions, }, range: rangeToString({ - count: offset + res.contentLength - start, + count: offset + expectedContentLength - start, offset: start, }), rangeGetContentMD5: options.rangeGetContentMD5, rangeGetContentCRC64: options.rangeGetContentCrc64, snapshot: options.snapshot, cpkInfo: options.customerProvidedKey, + structuredBodyType: contentChecksumAlgorithm === "StorageCrc64" ? "XSM/1.0; properties=crc64" : undefined, }; // Debug purpose only // console.log( @@ -78776,11 +85804,17 @@ class BlobClient extends StorageClient_StorageClient { // updatedOptions.range // }, options: ${JSON.stringify(updatedOptions)}` // ); - return (await this.blobContext.download({ + const resBody = (await this.blobContext.download({ abortSignal: options.abortSignal, ...updatedDownloadOptions, })).readableStreamBody; - }, offset, res.contentLength, { + if (contentChecksumAlgorithm === "StorageCrc64") { + return structuredMessageDecodingStream(resBody, {}); + } + else { + return resBody; + } + }, offset, expectedContentLength, { maxRetryRequests: options.maxRetryRequests, onProgress: options.onProgress, }); @@ -78877,6 +85911,8 @@ class BlobClient extends StorageClient_StorageClient { ifTags: options.conditions?.tagConditions, }, tracingOptions: updatedOptions.tracingOptions, + accessTierIfModifiedSince: options.conditions?.accessTierIfModifiedSince, + accessTierIfUnmodifiedSince: options.conditions?.accessTierIfUnmodifiedSince, })); }); } @@ -79313,6 +86349,7 @@ class BlobClient extends StorageClient_StorageClient { conditions: options.conditions, maxRetryRequests: options.maxRetryRequestsPerBlock, customerProvidedKey: options.customerProvidedKey, + contentChecksumAlgorithm: options.contentChecksumAlgorithm, tracingOptions: updatedOptions.tracingOptions, }); const stream = response.readableStreamBody; @@ -79624,6 +86661,7 @@ class AppendBlobClient extends BlobClient { // (url: string, pipeline: Pipeline) url = urlOrConnectionString; pipeline = credentialOrPipelineOrContainerName; + options = blobNameOrOptions; } else if ((esm_isNodeLike && credentialOrPipelineOrContainerName instanceof StorageSharedKeyCredential) || credentialOrPipelineOrContainerName instanceof AnonymousCredential || @@ -79637,6 +86675,7 @@ class AppendBlobClient extends BlobClient { typeof credentialOrPipelineOrContainerName !== "string") { // (url: string, credential?: StorageSharedKeyCredential | AnonymousCredential | TokenCredential, options?: StoragePipelineOptions) url = urlOrConnectionString; + options = blobNameOrOptions; // The second parameter is undefined. Use anonymous credential. pipeline = newPipeline(new AnonymousCredential(), options); } @@ -79677,6 +86716,7 @@ class AppendBlobClient extends BlobClient { } super(url, pipeline); this.appendBlobContext = this.storageClientContext.appendBlob; + this.blobClientConfig = options; } /** * Creates a new AppendBlobClient object identical to the source but with the @@ -79687,7 +86727,7 @@ class AppendBlobClient extends BlobClient { * @returns A new AppendBlobClient object identical to the source but with the specified snapshot timestamp. */ withSnapshot(snapshot) { - return new AppendBlobClient(utils_common_setURLParameter(this.url, utils_constants_URLConstants.Parameters.SNAPSHOT, snapshot.length === 0 ? undefined : snapshot), this.pipeline); + return new AppendBlobClient(utils_common_setURLParameter(this.url, utils_constants_URLConstants.Parameters.SNAPSHOT, snapshot.length === 0 ? undefined : snapshot), this.pipeline, this.blobClientConfig); } /** * Creates a 0-length append blob. Call AppendBlock to append data to an append blob. @@ -79833,7 +86873,7 @@ class AppendBlobClient extends BlobClient { options.conditions = options.conditions || {}; ensureCpkIfSpecified(options.customerProvidedKey, this.isHttps); return tracingClient.withSpan("AppendBlobClient-appendBlock", options, async (updatedOptions) => { - return utils_common_assertResponse(await this.appendBlobContext.appendBlock(contentLength, body, { + const parameters = { abortSignal: options.abortSignal, appendPositionAccessConditions: options.conditions, leaseAccessConditions: options.conditions, @@ -79844,12 +86884,12 @@ class AppendBlobClient extends BlobClient { requestOptions: { onUploadProgress: options.onProgress, }, - transactionalContentMD5: options.transactionalContentMD5, - transactionalContentCrc64: options.transactionalContentCrc64, cpkInfo: options.customerProvidedKey, encryptionScope: options.encryptionScope, tracingOptions: updatedOptions.tracingOptions, - })); + }; + const uploadBodyParameters = await setUploadChecksumParameters(body, contentLength, parameters, options, this.blobClientConfig?.uploadContentChecksumAlgorithm); + return utils_common_assertResponse(await this.appendBlobContext.appendBlock(uploadBodyParameters.contentLength, uploadBodyParameters.body, parameters)); }); } /** @@ -79893,6 +86933,11 @@ class AppendBlobClient extends BlobClient { encryptionScope: options.encryptionScope, fileRequestIntent: options.sourceShareTokenIntent, tracingOptions: updatedOptions.tracingOptions, + sourceCpkInfo: { + sourceEncryptionKey: options.sourceCustomerProvidedKey?.encryptionKey, + sourceEncryptionAlgorithm: options.sourceCustomerProvidedKey?.encryptionAlgorithm, + sourceEncryptionKeySha256: options.sourceCustomerProvidedKey?.encryptionKeySha256, + }, })); }); } @@ -79925,6 +86970,7 @@ class BlockBlobClient extends BlobClient { // (url: string, pipeline: Pipeline) url = urlOrConnectionString; pipeline = credentialOrPipelineOrContainerName; + options = blobNameOrOptions; } else if ((esm_isNodeLike && credentialOrPipelineOrContainerName instanceof StorageSharedKeyCredential) || credentialOrPipelineOrContainerName instanceof AnonymousCredential || @@ -79982,6 +87028,7 @@ class BlockBlobClient extends BlobClient { super(url, pipeline); this.blockBlobContext = this.storageClientContext.blockBlob; this._blobContext = this.storageClientContext.blob; + this.blobClientConfig = options; } /** * Creates a new BlockBlobClient object identical to the source but with the @@ -79992,7 +87039,7 @@ class BlockBlobClient extends BlobClient { * @returns A new BlockBlobClient object identical to the source but with the specified snapshot timestamp. */ withSnapshot(snapshot) { - return new BlockBlobClient(utils_common_setURLParameter(this.url, utils_constants_URLConstants.Parameters.SNAPSHOT, snapshot.length === 0 ? undefined : snapshot), this.pipeline); + return new BlockBlobClient(utils_common_setURLParameter(this.url, utils_constants_URLConstants.Parameters.SNAPSHOT, snapshot.length === 0 ? undefined : snapshot), this.pipeline, this.blobClientConfig); } /** * ONLY AVAILABLE IN NODE.JS RUNTIME. @@ -80115,7 +87162,7 @@ class BlockBlobClient extends BlobClient { options.conditions = options.conditions || {}; ensureCpkIfSpecified(options.customerProvidedKey, this.isHttps); return tracingClient.withSpan("BlockBlobClient-upload", options, async (updatedOptions) => { - return utils_common_assertResponse(await this.blockBlobContext.upload(contentLength, body, { + const parameters = { abortSignal: options.abortSignal, blobHttpHeaders: options.blobHTTPHeaders, leaseAccessConditions: options.conditions, @@ -80135,7 +87182,9 @@ class BlockBlobClient extends BlobClient { tier: toAccessTier(options.tier), blobTagsString: toBlobTagsString(options.tags), tracingOptions: updatedOptions.tracingOptions, - })); + }; + const uploadBodyParameters = await setUploadChecksumParameters(body, contentLength, parameters, options, this.blobClientConfig?.uploadContentChecksumAlgorithm); + return utils_common_assertResponse(await this.blockBlobContext.upload(uploadBodyParameters.contentLength, uploadBodyParameters.body, parameters)); }); } /** @@ -80182,6 +87231,11 @@ class BlockBlobClient extends BlobClient { copySourceTags: options.copySourceTags, fileRequestIntent: options.sourceShareTokenIntent, tracingOptions: updatedOptions.tracingOptions, + sourceCpkInfo: { + sourceEncryptionKey: options.sourceCustomerProvidedKey?.encryptionKey, + sourceEncryptionAlgorithm: options.sourceCustomerProvidedKey?.encryptionAlgorithm, + sourceEncryptionKeySha256: options.sourceCustomerProvidedKey?.encryptionKeySha256, + }, })); }); } @@ -80199,18 +87253,18 @@ class BlockBlobClient extends BlobClient { async stageBlock(blockId, body, contentLength, options = {}) { ensureCpkIfSpecified(options.customerProvidedKey, this.isHttps); return tracingClient.withSpan("BlockBlobClient-stageBlock", options, async (updatedOptions) => { - return utils_common_assertResponse(await this.blockBlobContext.stageBlock(blockId, contentLength, body, { + const parameters = { abortSignal: options.abortSignal, leaseAccessConditions: options.conditions, requestOptions: { onUploadProgress: options.onProgress, }, - transactionalContentMD5: options.transactionalContentMD5, - transactionalContentCrc64: options.transactionalContentCrc64, cpkInfo: options.customerProvidedKey, encryptionScope: options.encryptionScope, tracingOptions: updatedOptions.tracingOptions, - })); + }; + const uploadBodyParameters = await setUploadChecksumParameters(body, contentLength, parameters, options, this.blobClientConfig?.uploadContentChecksumAlgorithm); + return utils_common_assertResponse(await this.blockBlobContext.stageBlock(blockId, uploadBodyParameters.contentLength, uploadBodyParameters.body, parameters)); }); } /** @@ -80248,6 +87302,11 @@ class BlockBlobClient extends BlobClient { copySourceAuthorization: utils_common_httpAuthorizationToString(options.sourceAuthorization), fileRequestIntent: options.sourceShareTokenIntent, tracingOptions: updatedOptions.tracingOptions, + sourceCpkInfo: { + sourceEncryptionKey: options.sourceCustomerProvidedKey?.encryptionKey, + sourceEncryptionAlgorithm: options.sourceCustomerProvidedKey?.encryptionAlgorithm, + sourceEncryptionKeySha256: options.sourceCustomerProvidedKey?.encryptionKeySha256, + }, })); }); } @@ -80446,6 +87505,7 @@ class BlockBlobClient extends BlobClient { conditions: options.conditions, encryptionScope: options.encryptionScope, tracingOptions: updatedOptions.tracingOptions, + contentChecksumAlgorithm: options.contentChecksumAlgorithm, }); // Update progress after block is successfully uploaded to server, in case of block trying // TODO: Hook with convenience layer progress event in finer level @@ -80526,6 +87586,7 @@ class BlockBlobClient extends BlobClient { conditions: options.conditions, encryptionScope: options.encryptionScope, tracingOptions: updatedOptions.tracingOptions, + contentChecksumAlgorithm: options.contentChecksumAlgorithm, }); // Update progress after block is successfully uploaded to server, in case of block trying transferProgress += length; @@ -80567,6 +87628,7 @@ class PageBlobClient extends BlobClient { // (url: string, pipeline: Pipeline) url = urlOrConnectionString; pipeline = credentialOrPipelineOrContainerName; + options = blobNameOrOptions; } else if ((esm_isNodeLike && credentialOrPipelineOrContainerName instanceof StorageSharedKeyCredential) || credentialOrPipelineOrContainerName instanceof AnonymousCredential || @@ -80581,6 +87643,7 @@ class PageBlobClient extends BlobClient { // (url: string, credential?: StorageSharedKeyCredential | AnonymousCredential | TokenCredential, options?: StoragePipelineOptions) // The second parameter is undefined. Use anonymous credential. url = urlOrConnectionString; + options = blobNameOrOptions; pipeline = newPipeline(new AnonymousCredential(), options); } else if (credentialOrPipelineOrContainerName && @@ -80620,6 +87683,7 @@ class PageBlobClient extends BlobClient { } super(url, pipeline); this.pageBlobContext = this.storageClientContext.pageBlob; + this.blobClientConfig = options; } /** * Creates a new PageBlobClient object identical to the source but with the @@ -80630,7 +87694,7 @@ class PageBlobClient extends BlobClient { * @returns A new PageBlobClient object identical to the source but with the specified snapshot timestamp. */ withSnapshot(snapshot) { - return new PageBlobClient(utils_common_setURLParameter(this.url, utils_constants_URLConstants.Parameters.SNAPSHOT, snapshot.length === 0 ? undefined : snapshot), this.pipeline); + return new PageBlobClient(utils_common_setURLParameter(this.url, utils_constants_URLConstants.Parameters.SNAPSHOT, snapshot.length === 0 ? undefined : snapshot), this.pipeline, this.blobClientConfig); } /** * Creates a page blob of the specified length. Call uploadPages to upload data @@ -80716,7 +87780,7 @@ class PageBlobClient extends BlobClient { options.conditions = options.conditions || {}; ensureCpkIfSpecified(options.customerProvidedKey, this.isHttps); return tracingClient.withSpan("PageBlobClient-uploadPages", options, async (updatedOptions) => { - return utils_common_assertResponse(await this.pageBlobContext.uploadPages(count, body, { + const parameters = { abortSignal: options.abortSignal, leaseAccessConditions: options.conditions, modifiedAccessConditions: { @@ -80728,12 +87792,12 @@ class PageBlobClient extends BlobClient { }, range: rangeToString({ offset, count }), sequenceNumberAccessConditions: options.conditions, - transactionalContentMD5: options.transactionalContentMD5, - transactionalContentCrc64: options.transactionalContentCrc64, cpkInfo: options.customerProvidedKey, encryptionScope: options.encryptionScope, tracingOptions: updatedOptions.tracingOptions, - })); + }; + const uploadBodyParameters = await setUploadChecksumParameters(body, count, parameters, options, this.blobClientConfig?.uploadContentChecksumAlgorithm); + return utils_common_assertResponse(await this.pageBlobContext.uploadPages(uploadBodyParameters.contentLength, uploadBodyParameters.body, parameters)); }); } /** @@ -80773,6 +87837,11 @@ class PageBlobClient extends BlobClient { copySourceAuthorization: utils_common_httpAuthorizationToString(options.sourceAuthorization), fileRequestIntent: options.sourceShareTokenIntent, tracingOptions: updatedOptions.tracingOptions, + sourceCpkInfo: { + sourceEncryptionKey: options.sourceCustomerProvidedKey?.encryptionKey, + sourceEncryptionAlgorithm: options.sourceCustomerProvidedKey?.encryptionAlgorithm, + sourceEncryptionKeySha256: options.sourceCustomerProvidedKey?.encryptionKeySha256, + }, })); }); } @@ -82002,6 +89071,7 @@ class ContainerClient extends StorageClient_StorageClient { */ containerContext; _containerName; + blobClientConfig; /** * The name of the container. */ @@ -82016,7 +89086,7 @@ class ContainerClient extends StorageClient_StorageClient { let url; options = options || {}; if (isPipelineLike(credentialOrPipelineOrContainerName)) { - // (url: string, pipeline: Pipeline) + // (url: string, pipeline: Pipeline, options?: BlobClientConfig) url = urlOrConnectionString; pipeline = credentialOrPipelineOrContainerName; } @@ -82069,6 +89139,7 @@ class ContainerClient extends StorageClient_StorageClient { super(url, pipeline); this._containerName = this.getContainerNameFromUrl(); this.containerContext = this.storageClientContext.container; + this.blobClientConfig = options; } /** * Creates a new container under the specified account. If the container with @@ -82167,7 +89238,7 @@ class ContainerClient extends StorageClient_StorageClient { * @returns A new BlobClient object for the given blob name. */ getBlobClient(blobName) { - return new BlobClient(utils_common_appendToURLPath(this.url, utils_common_EscapePath(blobName)), this.pipeline); + return new BlobClient(utils_common_appendToURLPath(this.url, utils_common_EscapePath(blobName)), this.pipeline, this.blobClientConfig); } /** * Creates an {@link AppendBlobClient} @@ -82175,7 +89246,7 @@ class ContainerClient extends StorageClient_StorageClient { * @param blobName - An append blob name */ getAppendBlobClient(blobName) { - return new AppendBlobClient(utils_common_appendToURLPath(this.url, utils_common_EscapePath(blobName)), this.pipeline); + return new AppendBlobClient(utils_common_appendToURLPath(this.url, utils_common_EscapePath(blobName)), this.pipeline, this.blobClientConfig); } /** * Creates a {@link BlockBlobClient} @@ -82205,7 +89276,7 @@ class ContainerClient extends StorageClient_StorageClient { * ``` */ getBlockBlobClient(blobName) { - return new BlockBlobClient(utils_common_appendToURLPath(this.url, utils_common_EscapePath(blobName)), this.pipeline); + return new BlockBlobClient(utils_common_appendToURLPath(this.url, utils_common_EscapePath(blobName)), this.pipeline, this.blobClientConfig); } /** * Creates a {@link PageBlobClient} @@ -82213,7 +89284,7 @@ class ContainerClient extends StorageClient_StorageClient { * @param blobName - A page blob name */ getPageBlobClient(blobName) { - return new PageBlobClient(utils_common_appendToURLPath(this.url, utils_common_EscapePath(blobName)), this.pipeline); + return new PageBlobClient(utils_common_appendToURLPath(this.url, utils_common_EscapePath(blobName)), this.pipeline, this.blobClientConfig); } /** * Returns all user-defined metadata and system properties for the specified @@ -83766,6 +90837,13 @@ function generateAccountSASQueryParametersInternal(accountSASSignatureValues, sh +function isBlobGetUserDelegationKeyParameters(parameter) { + if (!parameter || typeof parameter !== "object") { + return false; + } + const castParameter = parameter; + return castParameter.expiresOn instanceof Date; +} /** * A BlobServiceClient represents a Client to the Azure Storage Blob service allowing you * to manipulate blob containers. @@ -83775,6 +90853,7 @@ class BlobServiceClient extends StorageClient_StorageClient { * serviceContext provided by protocol layer. */ serviceContext; + blobClientConfig; /** * * Creates an instance of BlobServiceClient from connection string. @@ -83808,7 +90887,7 @@ class BlobServiceClient extends StorageClient_StorageClient { } else if (extractedCreds.kind === "SASConnString") { const pipeline = newPipeline(new AnonymousCredential(), options); - return new BlobServiceClient(extractedCreds.url + "?" + extractedCreds.accountSas, pipeline); + return new BlobServiceClient(extractedCreds.url + "?" + extractedCreds.accountSas, pipeline, options); } else { throw new Error("Connection string must be either an Account connection string or a SAS connection string"); @@ -83818,6 +90897,7 @@ class BlobServiceClient extends StorageClient_StorageClient { // Legacy, no fix for eslint error without breaking. Disable it for this interface. /* eslint-disable-next-line @azure/azure-sdk/ts-naming-options*/ options) { + options = options ?? {}; let pipeline; if (isPipelineLike(credentialOrPipeline)) { pipeline = credentialOrPipeline; @@ -83833,6 +90913,7 @@ class BlobServiceClient extends StorageClient_StorageClient { } super(url, pipeline); this.serviceContext = this.storageClientContext.service; + this.blobClientConfig = options; } /** * Creates a {@link ContainerClient} object @@ -83856,7 +90937,7 @@ class BlobServiceClient extends StorageClient_StorageClient { * ``` */ getContainerClient(containerName) { - return new ContainerClient(utils_common_appendToURLPath(this.url, encodeURIComponent(containerName)), this.pipeline); + return new ContainerClient(utils_common_appendToURLPath(this.url, encodeURIComponent(containerName)), this.pipeline, this.blobClientConfig); } /** * Create a Blob container. @see https://learn.microsoft.com/rest/api/storageservices/create-container @@ -84340,24 +91421,25 @@ class BlobServiceClient extends StorageClient_StorageClient { }, }; } - /** - * ONLY AVAILABLE WHEN USING BEARER TOKEN AUTHENTICATION (TokenCredential). - * - * Retrieves a user delegation key for the Blob service. This is only a valid operation when using - * bearer token authentication. - * - * @see https://learn.microsoft.com/rest/api/storageservices/get-user-delegation-key - * - * @param startsOn - The start time for the user delegation SAS. Must be within 7 days of the current time - * @param expiresOn - The end time for the user delegation SAS. Must be within 7 days of the current time - */ - async getUserDelegationKey(startsOn, expiresOn, options = {}) { - return tracingClient.withSpan("BlobServiceClient-getUserDelegationKey", options, async (updatedOptions) => { + async getUserDelegationKey(startsOnOrParam, expiresOnOrOption, options = {}) { + let startsOn = startsOnOrParam; + let expiresOn = expiresOnOrOption; + let userDelegationTid = undefined; + let getUserDelegationKeyOptions = options; + if (isBlobGetUserDelegationKeyParameters(startsOnOrParam)) { + startsOn = startsOnOrParam.startsOn; + expiresOn = startsOnOrParam.expiresOn; + userDelegationTid = startsOnOrParam.delegatedUserTenantId; + getUserDelegationKeyOptions = expiresOnOrOption; + getUserDelegationKeyOptions = getUserDelegationKeyOptions ?? {}; + } + return tracingClient.withSpan("BlobServiceClient-getUserDelegationKey", getUserDelegationKeyOptions, async (updatedOptions) => { const response = utils_common_assertResponse(await this.serviceContext.getUserDelegationKey({ startsOn: utils_common_truncatedISO8061Date(startsOn, false), expiresOn: utils_common_truncatedISO8061Date(expiresOn, false), + delegatedUserTid: userDelegationTid, }, { - abortSignal: options.abortSignal, + abortSignal: getUserDelegationKeyOptions.abortSignal, tracingOptions: updatedOptions.tracingOptions, })); const userDelegationKey = { @@ -84367,6 +91449,7 @@ class BlobServiceClient extends StorageClient_StorageClient { signedExpiresOn: new Date(response.signedExpiresOn), signedService: response.signedService, signedVersion: response.signedVersion, + signedDelegatedUserTenantId: response.signedDelegatedUserTenantId, value: response.value, }; const res = { @@ -84485,7 +91568,6 @@ var generatedModels_KnownEncryptionAlgorithmType; - //# sourceMappingURL=index.js.map @@ -84540,7 +91622,7 @@ NetworkError.isNetworkErrorCode = (code) => { }; class UsageError extends Error { constructor() { - const message = `Cache storage quota has been hit. Unable to upload any new cache entries. Usage is recalculated every 6-12 hours.\nMore info on storage limits: https://docs.github.com/en/billing/managing-billing-for-github-actions/about-billing-for-github-actions#calculating-minute-and-storage-spending`; + const message = `Cache storage quota has been hit. Unable to upload any new cache entries.\nMore info on storage limits: https://docs.github.com/en/billing/managing-billing-for-github-actions/about-billing-for-github-actions#calculating-minute-and-storage-spending`; super(message); this.name = 'UsageError'; } diff --git a/dist/licenses.txt b/dist/licenses.txt index 500514d..a432a58 100644 --- a/dist/licenses.txt +++ b/dist/licenses.txt @@ -394,6 +394,9 @@ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. +@nodable/entities +MIT + @protobuf-ts/runtime (Apache-2.0 AND BSD-3-Clause) Apache License @@ -810,6 +813,31 @@ CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. +anynum +MIT +MIT License + +Copyright (c) 2026 Natural Intelligence + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. + + balanced-match MIT (MIT) @@ -1168,3 +1196,7 @@ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + + +xml-naming +MIT diff --git a/package-lock.json b/package-lock.json index bf1fd6c..19b48c4 100644 --- a/package-lock.json +++ b/package-lock.json @@ -17,34 +17,34 @@ }, "devDependencies": { "@types/node": "^24.0.0", - "@vercel/ncc": "^0.38.4", - "ava": "^7.0.0", + "@vercel/ncc": "^0.44.0", + "ava": "^8.0.1", "ts-node": "^10.9.2", "tsx": "^4.22.4", "typescript": "^6.0.2" } }, "node_modules/@actions/cache": { - "version": "6.0.0", - "resolved": "https://registry.npmjs.org/@actions/cache/-/cache-6.0.0.tgz", - "integrity": "sha512-+tCs634SyGBQJ3KU1rtAVabmN/gYiT9WgzTSJzWwdPCLmM3zWrdbysaErKv8HyI6OozClrxNvDgPjJimbHZZvw==", + "version": "6.0.1", + "resolved": "https://registry.npmjs.org/@actions/cache/-/cache-6.0.1.tgz", + "integrity": "sha512-kcM23yPzDQEME05ZFV/bRzsHS9yDzCe97F7guF9+c/jJwE9ns+gFQt3MmnRXOHh1DsnlNuKcIwXYdnt4kHLGqg==", "license": "MIT", "dependencies": { - "@actions/core": "^3.0.0", + "@actions/core": "^3.0.1", "@actions/exec": "^3.0.0", "@actions/glob": "^0.6.1", - "@actions/http-client": "^4.0.0", - "@actions/io": "^3.0.0", - "@azure/core-rest-pipeline": "^1.22.0", - "@azure/storage-blob": "^12.30.0", + "@actions/http-client": "^4.0.1", + "@actions/io": "^3.0.2", + "@azure/core-rest-pipeline": "^1.23.0", + "@azure/storage-blob": "^12.31.0", "@protobuf-ts/runtime-rpc": "^2.11.1", - "semver": "^7.7.3" + "semver": "^7.7.4" } }, "node_modules/@actions/core": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/@actions/core/-/core-3.0.0.tgz", - "integrity": "sha512-zYt6cz+ivnTmiT/ksRVriMBOiuoUpDCJJlZ5KPl2/FRdvwU3f7MPh9qftvbkXJThragzUZieit2nyHUyw53Seg==", + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/@actions/core/-/core-3.0.1.tgz", + "integrity": "sha512-a6d/Nwahm9fliVGRhdhofo40HjHQasUPusmc7vBfyky+7Z+P2A1J68zyFVaNcEclc/Se+eO595oAr5nwEIoIUA==", "license": "MIT", "dependencies": { "@actions/exec": "^3.0.0", @@ -71,9 +71,9 @@ } }, "node_modules/@actions/http-client": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/@actions/http-client/-/http-client-4.0.0.tgz", - "integrity": "sha512-QuwPsgVMsD6qaPD57GLZi9sqzAZCtiJT8kVBCDpLtxhL5MydQ4gS+DrejtZZPdIYyB1e95uCK9Luyds7ybHI3g==", + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/@actions/http-client/-/http-client-4.0.1.tgz", + "integrity": "sha512-+Nvd1ImaOZBSoPbsUtEhv+1z99H12xzncCkz0a3RuehINE81FZSe2QTj3uvAPTcJX/SCzUQHQ0D1GrPMbrPitg==", "license": "MIT", "dependencies": { "tunnel": "^0.0.6", @@ -126,9 +126,9 @@ } }, "node_modules/@azure/core-client": { - "version": "1.10.1", - "resolved": "https://registry.npmjs.org/@azure/core-client/-/core-client-1.10.1.tgz", - "integrity": "sha512-Nh5PhEOeY6PrnxNPsEHRr9eimxLwgLlpmguQaHKBinFYA/RU9+kOYVOQqOrTsCL+KSxrLLl1gD8Dk5BFW/7l/w==", + "version": "1.10.2", + "resolved": "https://registry.npmjs.org/@azure/core-client/-/core-client-1.10.2.tgz", + "integrity": "sha512-1D2LpsU7y9xrqKjdIbsB7PlrRePw0xsVV8p+AKTlzITrWmscajryfJCdDJB/oGwvDI5HmRo04eMMADB67uwAwQ==", "license": "MIT", "dependencies": { "@azure/abort-controller": "^2.1.2", @@ -144,9 +144,9 @@ } }, "node_modules/@azure/core-http-compat": { - "version": "2.3.2", - "resolved": "https://registry.npmjs.org/@azure/core-http-compat/-/core-http-compat-2.3.2.tgz", - "integrity": "sha512-Tf6ltdKzOJEgxZeWLCjMxrxbodB/ZeCbzzA1A2qHbhzAjzjHoBVSUeSl/baT/oHAxhc4qdqVaDKnc2+iE932gw==", + "version": "2.4.0", + "resolved": "https://registry.npmjs.org/@azure/core-http-compat/-/core-http-compat-2.4.0.tgz", + "integrity": "sha512-f1P96IB399YiN2ARYHP7EpZi3Bf3wH4SN2lGzrw7JVwm7bbsVYtf2iKSBwTywD2P62NOPZGHFSZi+6jjb75JuA==", "license": "MIT", "dependencies": { "@azure/abort-controller": "^2.1.2" @@ -187,9 +187,9 @@ } }, "node_modules/@azure/core-rest-pipeline": { - "version": "1.23.0", - "resolved": "https://registry.npmjs.org/@azure/core-rest-pipeline/-/core-rest-pipeline-1.23.0.tgz", - "integrity": "sha512-Evs1INHo+jUjwHi1T6SG6Ua/LHOQBCLuKEEE6efIpt4ZOoNonaT1kP32GoOcdNDbfqsD2445CPri3MubBy5DEQ==", + "version": "1.24.0", + "resolved": "https://registry.npmjs.org/@azure/core-rest-pipeline/-/core-rest-pipeline-1.24.0.tgz", + "integrity": "sha512-PpLsoDQ3AMmKZ0VU+0GrmqMxgp/sExjlVm4R+nLWngeoEGAzOIPVifaxKGU5gMv+nWELUoHfvrolWD+ZS/nFJg==", "license": "MIT", "dependencies": { "@azure/abort-controller": "^2.1.2", @@ -231,12 +231,12 @@ } }, "node_modules/@azure/core-xml": { - "version": "1.5.0", - "resolved": "https://registry.npmjs.org/@azure/core-xml/-/core-xml-1.5.0.tgz", - "integrity": "sha512-D/sdlJBMJfx7gqoj66PKVmhDDaU6TKA49ptcolxdas29X7AfvLTmfAGLjAcIMBK7UZ2o4lygHIqVckOlQU3xWw==", + "version": "1.5.1", + "resolved": "https://registry.npmjs.org/@azure/core-xml/-/core-xml-1.5.1.tgz", + "integrity": "sha512-xcNRHqCoSp4AunOALEae6A8f3qATb83gSrm31Iqb01OzblvC3/W/bfXozcq78EzIdzZzuH1bZ2NvRR0TdX709w==", "license": "MIT", "dependencies": { - "fast-xml-parser": "^5.0.7", + "fast-xml-parser": "^5.5.9", "tslib": "^2.8.1" }, "engines": { @@ -257,9 +257,9 @@ } }, "node_modules/@azure/storage-blob": { - "version": "12.31.0", - "resolved": "https://registry.npmjs.org/@azure/storage-blob/-/storage-blob-12.31.0.tgz", - "integrity": "sha512-DBgNv10aCSxopt92DkTDD0o9xScXeBqPKGmR50FPZQaEcH4JLQ+GEOGEDv19V5BMkB7kxr+m4h6il/cCDPvmHg==", + "version": "12.32.0", + "resolved": "https://registry.npmjs.org/@azure/storage-blob/-/storage-blob-12.32.0.tgz", + "integrity": "sha512-80LzSNnFQye2LCCBFghAJS6jJQJ7N4bfgZ6qDMgVGRtugZ7TLDKQZ2hczMigmZH3jAcMRdma/IygsC5+0gT7Tw==", "license": "MIT", "dependencies": { "@azure/abort-controller": "^2.1.2", @@ -273,7 +273,7 @@ "@azure/core-util": "^1.11.0", "@azure/core-xml": "^1.4.5", "@azure/logger": "^1.1.4", - "@azure/storage-common": "^12.3.0", + "@azure/storage-common": "^12.4.0", "events": "^3.0.0", "tslib": "^2.8.1" }, @@ -282,9 +282,9 @@ } }, "node_modules/@azure/storage-common": { - "version": "12.3.0", - "resolved": "https://registry.npmjs.org/@azure/storage-common/-/storage-common-12.3.0.tgz", - "integrity": "sha512-/OFHhy86aG5Pe8dP5tsp+BuJ25JOAl9yaMU3WZbkeoiFMHFtJ7tu5ili7qEdBXNW9G5lDB19trwyI6V49F/8iQ==", + "version": "12.4.0", + "resolved": "https://registry.npmjs.org/@azure/storage-common/-/storage-common-12.4.0.tgz", + "integrity": "sha512-kNhJKMxQb374KOVt63CZnGIpDcrKNzJeyANLJymxE9mCJSdRGzb+Iv9oSIiCj6tNMLypr530b9ObOiA/5OvwOg==", "license": "MIT", "dependencies": { "@azure/abort-controller": "^2.1.2", @@ -314,6 +314,16 @@ "node": ">=12" } }, + "node_modules/@cto.af/wtf8": { + "version": "0.0.5", + "resolved": "https://registry.npmjs.org/@cto.af/wtf8/-/wtf8-0.0.5.tgz", + "integrity": "sha512-LfUFi+Vv4eDzj+XAtR89e3wwjXA/NZjUSwU5NhwbBrLecxPaBYFy3exCuc1j+D4UZeOVdqlsl8G7LmOt18V0tg==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=20" + } + }, "node_modules/@esbuild/aix-ppc64": { "version": "0.28.1", "resolved": "https://registry.npmjs.org/@esbuild/aix-ppc64/-/aix-ppc64-0.28.1.tgz", @@ -819,6 +829,18 @@ "node": ">=18" } }, + "node_modules/@nodable/entities": { + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/@nodable/entities/-/entities-2.2.0.tgz", + "integrity": "sha512-9uGyhaQavEUMC8AIddIjau4NsnsXhou+j5sBAGojCM1oxmQpVKTWR/9JxABD6UAv12vpIms55fPZKFQEhG6uBg==", + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/nodable" + } + ], + "license": "MIT" + }, "node_modules/@nodelib/fs.scandir": { "version": "2.1.5", "resolved": "https://registry.npmjs.org/@nodelib/fs.scandir/-/fs.scandir-2.1.5.tgz", @@ -873,9 +895,9 @@ } }, "node_modules/@rollup/pluginutils": { - "version": "5.3.0", - "resolved": "https://registry.npmjs.org/@rollup/pluginutils/-/pluginutils-5.3.0.tgz", - "integrity": "sha512-5EdhGZtnu3V88ces7s53hhfK5KSASnJZv8Lulpc04cWO3REESroJXg73DFsOmgbU2BhwV0E20bu2IDZb3VKW4Q==", + "version": "5.4.0", + "resolved": "https://registry.npmjs.org/@rollup/pluginutils/-/pluginutils-5.4.0.tgz", + "integrity": "sha512-MfPp06CjRLfXQ3wY0R8vJDYBy/MvVcc9OulEfR0B8Iv9ko+GCNaRZ+EpJYFl27LhKsZK0o420sYCRHCjfCgeUg==", "dev": true, "license": "MIT", "dependencies": { @@ -937,26 +959,26 @@ "license": "MIT" }, "node_modules/@types/estree": { - "version": "1.0.8", - "resolved": "https://registry.npmjs.org/@types/estree/-/estree-1.0.8.tgz", - "integrity": "sha512-dWHzHa2WqEXI/O1E9OjrocMTKJl2mSrEolh1Iomrv6U+JuNwaHXsXx9bLu5gG7BUWFIN0skIQJQ/L1rIex4X6w==", + "version": "1.0.9", + "resolved": "https://registry.npmjs.org/@types/estree/-/estree-1.0.9.tgz", + "integrity": "sha512-GhdPgy1el4/ImP05X05Uw4cw2/M93BCUmnEvWZNStlCzEKME4Fkk+YpoA5OiHNQmoS7Cafb8Xa3Pya8m1Qrzeg==", "dev": true, "license": "MIT" }, "node_modules/@types/node": { - "version": "24.12.2", - "resolved": "https://registry.npmjs.org/@types/node/-/node-24.12.2.tgz", - "integrity": "sha512-A1sre26ke7HDIuY/M23nd9gfB+nrmhtYyMINbjI1zHJxYteKR6qSMX56FsmjMcDb3SMcjJg5BiRRgOCC/yBD0g==", + "version": "24.13.2", + "resolved": "https://registry.npmjs.org/@types/node/-/node-24.13.2.tgz", + "integrity": "sha512-fRa09kZTgu8o71KFcDjUFuc7F+dEbZYZmkI0mg5YBTRs0yMKjYHsq/c0urDKeDb+D5qVgXOdFcuu+DZPKOITwA==", "dev": true, "license": "MIT", "dependencies": { - "undici-types": "~7.16.0" + "undici-types": "~7.18.0" } }, "node_modules/@typespec/ts-http-runtime": { - "version": "0.3.4", - "resolved": "https://registry.npmjs.org/@typespec/ts-http-runtime/-/ts-http-runtime-0.3.4.tgz", - "integrity": "sha512-CI0NhTrz4EBaa0U+HaaUZrJhPoso8sG7ZFya8uQoBA57fjzrjRSv87ekCjLZOFExN+gXE/z0xuN2QfH4H2HrLQ==", + "version": "0.3.6", + "resolved": "https://registry.npmjs.org/@typespec/ts-http-runtime/-/ts-http-runtime-0.3.6.tgz", + "integrity": "sha512-jIXhD0eWQ1JA6ln/5Dltyx22UxWNrw0hZmhy2rlv6m6KgF7kplHx3g0fzi09lNmTJQRR91OlemYp3xFnvDK9og==", "license": "MIT", "dependencies": { "http-proxy-agent": "^7.0.0", @@ -968,9 +990,9 @@ } }, "node_modules/@vercel/ncc": { - "version": "0.38.4", - "resolved": "https://registry.npmjs.org/@vercel/ncc/-/ncc-0.38.4.tgz", - "integrity": "sha512-8LwjnlP39s08C08J5NstzriPvW1SP8Zfpp1BvC2sI35kPeZnHfxVkCwu4/+Wodgnd60UtT1n8K8zw+Mp7J9JmQ==", + "version": "0.44.0", + "resolved": "https://registry.npmjs.org/@vercel/ncc/-/ncc-0.44.0.tgz", + "integrity": "sha512-pHyI+bZokSgIscTKFSmpNk5vZzmOrb9RW0Vu4SRyqUvkJ0kgg3PzaZLLDVTFXhbUiCqg0/Eu8L4fKtgViA92kg==", "dev": true, "license": "MIT", "bin": { @@ -978,9 +1000,9 @@ } }, "node_modules/@vercel/nft": { - "version": "1.5.0", - "resolved": "https://registry.npmjs.org/@vercel/nft/-/nft-1.5.0.tgz", - "integrity": "sha512-IWTDeIoWhQ7ZtRO/JRKH+jhmeQvZYhtGPmzw/QGDY+wDCQqfm25P9yIdoAFagu4fWsK4IwZXDFIjrmp5rRm/sA==", + "version": "1.10.2", + "resolved": "https://registry.npmjs.org/@vercel/nft/-/nft-1.10.2.tgz", + "integrity": "sha512-w+WyX5Ulmj4dtTZrxaulqrjaLZHSbnPzx75SJsTNYmotKsqn1JlLnDJa+lz5hn90HJofhl/2MAtw0mCrgM3qYw==", "dev": true, "license": "MIT", "dependencies": { @@ -1015,9 +1037,9 @@ } }, "node_modules/acorn": { - "version": "8.16.0", - "resolved": "https://registry.npmjs.org/acorn/-/acorn-8.16.0.tgz", - "integrity": "sha512-UVJyE9MttOsBQIDKw1skb9nAwQuR5wuGD3+82K6JgJlm/Y+KI92oNsMNGZCYdDsVtRHSak0pcV5Dno5+4jh9sw==", + "version": "8.17.0", + "resolved": "https://registry.npmjs.org/acorn/-/acorn-8.17.0.tgz", + "integrity": "sha512-xRQbDb9BnwDafYNn6Vwl839DYVjqXYb1XVGtWAZ1kcDc6iwAL4hg3B1dZlRiuENFeO2H53gFG3in621AdERVAg==", "dev": true, "license": "MIT", "bin": { @@ -1085,6 +1107,18 @@ "url": "https://github.com/chalk/ansi-styles?sponsor=1" } }, + "node_modules/anynum": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/anynum/-/anynum-1.0.0.tgz", + "integrity": "sha512-xjR9/zBVnUOP6ztMIIgShjsxui80nQUQH+5xJnvrYLs+90bF25/KJqaAi8mk+B4RDtX1Nspi6fmp4YTEts8SfA==", + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/NaturalIntelligence" + } + ], + "license": "MIT" + }, "node_modules/arg": { "version": "4.1.3", "resolved": "https://registry.npmjs.org/arg/-/arg-4.1.3.tgz", @@ -1143,57 +1177,58 @@ "license": "MIT" }, "node_modules/ava": { - "version": "7.0.0", - "resolved": "https://registry.npmjs.org/ava/-/ava-7.0.0.tgz", - "integrity": "sha512-4sRJO/gehlfAgSbuH02mClDDiyymnuFmirE3KqPXl2pic1FaFTZaAACKqr85WT4o08iLjViMR9gmMkxzbZ3AgA==", + "version": "8.0.1", + "resolved": "https://registry.npmjs.org/ava/-/ava-8.0.1.tgz", + "integrity": "sha512-YlwwL5HX2EJRE75e2LR8nio8lKAJ702sFbv0QYnhzngAjyo9wB+Xg4JZh5f432khlWfVD5OQ93rrRopEXJptpg==", "dev": true, "license": "MIT", "dependencies": { - "@vercel/nft": "^1.3.2", + "@vercel/nft": "^1.5.0", "acorn": "^8.16.0", "acorn-walk": "^8.3.5", "ansi-styles": "^6.2.3", "arrgv": "^1.0.2", "arrify": "^3.0.0", "callsites": "^4.2.0", - "cbor": "^10.0.11", + "cbor2": "^2.3.0", "chalk": "^5.6.2", "chunkd": "^2.0.1", "ci-info": "^4.4.0", "ci-parallel-vars": "^1.0.1", - "cli-truncate": "^5.1.1", + "cli-truncate": "^6.0.0", "code-excerpt": "^4.0.0", "common-path-prefix": "^3.0.0", "concordance": "^5.0.4", "currently-unhandled": "^0.4.1", "debug": "^4.4.3", - "emittery": "^1.2.0", + "emittery": "^2.0.0", "figures": "^6.1.0", - "globby": "^16.1.1", + "globby": "^16.2.0", "ignore-by-default": "^2.1.0", "indent-string": "^5.0.0", "is-plain-object": "^5.0.0", "is-promise": "^4.0.0", "matcher": "^6.0.0", - "memoize": "^10.2.0", + "memoize": "^11.0.0", "ms": "^2.1.3", "p-map": "^7.0.4", "package-config": "^5.0.0", - "picomatch": "^4.0.3", + "picomatch": "^4.0.4", "plur": "^6.0.0", "pretty-ms": "^9.3.0", "resolve-cwd": "^3.0.0", + "slash": "^5.1.0", "stack-utils": "^2.0.6", "supertap": "^3.0.1", "temp-dir": "^3.0.0", - "write-file-atomic": "^7.0.0", + "write-file-atomic": "^7.0.1", "yargs": "^18.0.0" }, "bin": { - "ava": "entrypoints/cli.mjs" + "ava": "entrypoints/cli.js" }, "engines": { - "node": "^20.19 || ^22.20 || ^24.12 || >=25" + "node": "^22.20 || ^24.12 || >=26" }, "peerDependencies": { "@ava/typescript": "*" @@ -1228,9 +1263,9 @@ "license": "MIT" }, "node_modules/brace-expansion": { - "version": "1.1.13", - "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.13.tgz", - "integrity": "sha512-9ZLprWS6EENmhEOpjCYW2c8VkmOvckIJZfkr7rBW6dObmfgJ/L1GpSYW5Hpo9lDz4D1+n0Ckz8rU7FwHDQiG/w==", + "version": "1.1.15", + "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.15.tgz", + "integrity": "sha512-EwOCDEex4quD37XhqM3omwtMoJjr//isUZz1JopUNWms+4Z2ViyM/k1YIRePpoVNnQhENnxtFjLaxNHrT7xIUg==", "license": "MIT", "dependencies": { "balanced-match": "^1.0.0", @@ -1263,14 +1298,14 @@ "url": "https://github.com/sponsors/sindresorhus" } }, - "node_modules/cbor": { - "version": "10.0.12", - "resolved": "https://registry.npmjs.org/cbor/-/cbor-10.0.12.tgz", - "integrity": "sha512-exQDevYd7ZQLP4moMQcZkKCVZsXLAtUSflObr3xTh4xzFIv/xBCdvCd6L259kQOUP2kcTC0jvC6PpZIf/WmRXA==", + "node_modules/cbor2": { + "version": "2.3.0", + "resolved": "https://registry.npmjs.org/cbor2/-/cbor2-2.3.0.tgz", + "integrity": "sha512-76WB3hq8BoaGkMkBVJ27fW5LJU+qqDLEpgRNCG/SYKhODWXpVPOTD4UcUto3IEzYLA52nsvbhb0wabhHDn3qXg==", "dev": true, "license": "MIT", "dependencies": { - "nofilter": "^3.0.2" + "@cto.af/wtf8": "0.0.5" }, "engines": { "node": ">=20" @@ -1330,17 +1365,17 @@ "license": "MIT" }, "node_modules/cli-truncate": { - "version": "5.2.0", - "resolved": "https://registry.npmjs.org/cli-truncate/-/cli-truncate-5.2.0.tgz", - "integrity": "sha512-xRwvIOMGrfOAnM1JYtqQImuaNtDEv9v6oIYAs4LIHwTiKee8uwvIi363igssOC0O5U04i4AlENs79LQLu9tEMw==", + "version": "6.0.0", + "resolved": "https://registry.npmjs.org/cli-truncate/-/cli-truncate-6.0.0.tgz", + "integrity": "sha512-3+YKIUFsohD9MIoOFPFBldjAlnfCmCDcqe6aYGFqlDTRKg80p4wg35L+j83QQ63iOlKRccEkbn8IuM++HsgEjA==", "dev": true, "license": "MIT", "dependencies": { - "slice-ansi": "^8.0.0", + "slice-ansi": "^9.0.0", "string-width": "^8.2.0" }, "engines": { - "node": ">=20" + "node": ">=22" }, "funding": { "url": "https://github.com/sponsors/sindresorhus" @@ -1516,13 +1551,13 @@ } }, "node_modules/emittery": { - "version": "1.2.1", - "resolved": "https://registry.npmjs.org/emittery/-/emittery-1.2.1.tgz", - "integrity": "sha512-sFz64DCRjirhwHLxofFqxYQm6DCp6o0Ix7jwKQvuCHPn4GMRZNuBZyLPu9Ccmk/QSCAMZt6FOUqA8JZCQvA9fw==", + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/emittery/-/emittery-2.0.0.tgz", + "integrity": "sha512-FLtgn/CGBXiX3ZtPAm5q4LWWepHChOt55J9u01WFu3dyap2U7IwptlrqoE1COR/kxwdy/DOxIBALSxIW449I1g==", "dev": true, "license": "MIT", "engines": { - "node": ">=14.16" + "node": ">=22" }, "funding": { "url": "https://github.com/sindresorhus/emittery?sponsor=1" @@ -1665,9 +1700,9 @@ } }, "node_modules/fast-xml-builder": { - "version": "1.1.4", - "resolved": "https://registry.npmjs.org/fast-xml-builder/-/fast-xml-builder-1.1.4.tgz", - "integrity": "sha512-f2jhpN4Eccy0/Uz9csxh3Nu6q4ErKxf0XIsasomfOihuSUa3/xw6w8dnOtCDgEItQFJG8KyXPzQXzcODDrrbOg==", + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/fast-xml-builder/-/fast-xml-builder-1.2.0.tgz", + "integrity": "sha512-00aAWieqff+ZJhsXA4g1g7M8k+7AYoMUUHF+/zFb5U6Uv/P0Vl4QZo84/IcufzYalLuEj9928bXN9PbbFzMF0Q==", "funding": [ { "type": "github", @@ -1676,13 +1711,14 @@ ], "license": "MIT", "dependencies": { - "path-expression-matcher": "^1.1.3" + "path-expression-matcher": "^1.5.0", + "xml-naming": "^0.1.0" } }, "node_modules/fast-xml-parser": { - "version": "5.5.10", - "resolved": "https://registry.npmjs.org/fast-xml-parser/-/fast-xml-parser-5.5.10.tgz", - "integrity": "sha512-go2J2xODMc32hT+4Xr/bBGXMaIoiCwrwp2mMtAvKyvEFW6S/v5Gn2pBmE4nvbwNjGhpcAiOwEv7R6/GZ6XRa9w==", + "version": "5.8.0", + "resolved": "https://registry.npmjs.org/fast-xml-parser/-/fast-xml-parser-5.8.0.tgz", + "integrity": "sha512-6bIM7fsJxeo3uXv7OncQYsBAMPJ7V16Slahl/6M98C/i2q+vB1+4a0MtrvYwDFEUrwDSbAmeLDRXsOBwrL7yAg==", "funding": [ { "type": "github", @@ -1691,9 +1727,11 @@ ], "license": "MIT", "dependencies": { - "fast-xml-builder": "^1.1.4", - "path-expression-matcher": "^1.2.1", - "strnum": "^2.2.2" + "@nodable/entities": "^2.1.0", + "fast-xml-builder": "^1.2.0", + "path-expression-matcher": "^1.5.0", + "strnum": "^2.3.0", + "xml-naming": "^0.1.0" }, "bin": { "fxparser": "src/cli/cli.js" @@ -1784,9 +1822,9 @@ } }, "node_modules/get-east-asian-width": { - "version": "1.5.0", - "resolved": "https://registry.npmjs.org/get-east-asian-width/-/get-east-asian-width-1.5.0.tgz", - "integrity": "sha512-CQ+bEO+Tva/qlmw24dCejulK5pMzVnUOFOijVogd3KQs07HnRIgp8TGipvCCRT06xeYEbpbgwaCxglFyiuIcmA==", + "version": "1.6.0", + "resolved": "https://registry.npmjs.org/get-east-asian-width/-/get-east-asian-width-1.6.0.tgz", + "integrity": "sha512-QRbvDIbx6YklUe6RxeTeleMR0yv3cYH6PsPZHcnVn7xv7zO1BHN8r0XETu8n6Ye3Q+ahtSarc3WgtNWmehIBfA==", "dev": true, "license": "MIT", "engines": { @@ -1838,9 +1876,9 @@ } }, "node_modules/glob/node_modules/brace-expansion": { - "version": "5.0.5", - "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-5.0.5.tgz", - "integrity": "sha512-VZznLgtwhn+Mact9tfiwx64fA9erHH/MCXEUfB/0bX/6Fz6ny5EGTXYltMocqg4xFAQZtnO3DHWWXi8RiuN7cQ==", + "version": "5.0.6", + "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-5.0.6.tgz", + "integrity": "sha512-kLpxurY4Z4r9sgMsyG0Z9uzsBlgiU/EFKhj/h91/8yHu0edo7XuixOIH3VcJ8kkxs6/jPzoI6U9Vj3WqbMQ94g==", "dev": true, "license": "MIT", "dependencies": { @@ -2103,9 +2141,9 @@ "license": "MIT" }, "node_modules/lru-cache": { - "version": "11.2.7", - "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-11.2.7.tgz", - "integrity": "sha512-aY/R+aEsRelme17KGQa/1ZSIpLpNYYrhcrepKTZgE+W3WM16YMCaPwOHLHsmopZHELU0Ojin1lPVxKR0MihncA==", + "version": "11.5.1", + "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-11.5.1.tgz", + "integrity": "sha512-RPimw/7aMdv2oqRrxKwvZXcPfwBrn/JZ2xYcY9Hus/6LaS3VOAKVWKWgNLCFSiOm1ESXinjsDlidVU7JlnCN2A==", "dev": true, "license": "BlueOak-1.0.0", "engines": { @@ -2149,16 +2187,16 @@ } }, "node_modules/memoize": { - "version": "10.2.0", - "resolved": "https://registry.npmjs.org/memoize/-/memoize-10.2.0.tgz", - "integrity": "sha512-DeC6b7QBrZsRs3Y02A6A7lQyzFbsQbqgjI6UW0GigGWV+u1s25TycMr0XHZE4cJce7rY/vyw2ctMQqfDkIhUEA==", + "version": "11.0.0", + "resolved": "https://registry.npmjs.org/memoize/-/memoize-11.0.0.tgz", + "integrity": "sha512-cjsfZaC9b1clqPeIVMbb5dLHSXgdgGWGxdAU3oTUUkHiwWTKTBNnSmcqWJncNjYtBi3S8Rp0c5GIiyGztR8TRA==", "dev": true, "license": "MIT", "dependencies": { "mimic-function": "^5.0.1" }, "engines": { - "node": ">=18" + "node": ">=22" }, "funding": { "url": "https://github.com/sindresorhus/memoize?sponsor=1" @@ -2288,16 +2326,6 @@ "node-gyp-build-test": "build-test.js" } }, - "node_modules/nofilter": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/nofilter/-/nofilter-3.1.0.tgz", - "integrity": "sha512-l2NNj07e9afPnhAhvgVrCD/oy2Ai1yfLpuo3EpiO1jFTsB4sFz6oIfAfSZyQzVpkZQ9xS8ZS5g1jCBgq4Hwo0g==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=12.19" - } - }, "node_modules/nopt": { "version": "8.1.0", "resolved": "https://registry.npmjs.org/nopt/-/nopt-8.1.0.tgz", @@ -2358,9 +2386,9 @@ } }, "node_modules/path-expression-matcher": { - "version": "1.2.1", - "resolved": "https://registry.npmjs.org/path-expression-matcher/-/path-expression-matcher-1.2.1.tgz", - "integrity": "sha512-d7gQQmLvAKXKXE2GeP9apIGbMYKz88zWdsn/BN2HRWVQsDFdUY36WSLTY0Jvd4HWi7Fb30gQ62oAOzdgJA6fZw==", + "version": "1.5.0", + "resolved": "https://registry.npmjs.org/path-expression-matcher/-/path-expression-matcher-1.5.0.tgz", + "integrity": "sha512-cbrerZV+6rvdQrrD+iGMcZFEiiSrbv9Tfdkvnusy6y0x0GKBXREFg/Y65GhIfm0tnLntThhzCnfKwp1WRjeCyQ==", "funding": [ { "type": "github", @@ -2514,9 +2542,9 @@ } }, "node_modules/semver": { - "version": "7.7.4", - "resolved": "https://registry.npmjs.org/semver/-/semver-7.7.4.tgz", - "integrity": "sha512-vFKC2IEtQnVhpT78h1Yp8wzwrf8CM+MzKMHGJZfBtzhZNycRFnXsHk6E5TxIkkMsgNS7mdX3AGB7x2QM2di4lA==", + "version": "7.8.4", + "resolved": "https://registry.npmjs.org/semver/-/semver-7.8.4.tgz", + "integrity": "sha512-rUCObTnP32Q08R2uuIrt7r9PlEonuTmtuXYcW6s5kjdlj3xbnwe+21yXptAUYcMAABLkYYTtnmzb3w3EDZfueA==", "license": "ISC", "bin": { "semver": "bin/semver.js" @@ -2568,9 +2596,9 @@ } }, "node_modules/slice-ansi": { - "version": "8.0.0", - "resolved": "https://registry.npmjs.org/slice-ansi/-/slice-ansi-8.0.0.tgz", - "integrity": "sha512-stxByr12oeeOyY2BlviTNQlYV5xOj47GirPr4yA1hE9JCtxfQN0+tVbkxwCtYDQWhEKWFHsEK48ORg5jrouCAg==", + "version": "9.0.0", + "resolved": "https://registry.npmjs.org/slice-ansi/-/slice-ansi-9.0.0.tgz", + "integrity": "sha512-SO/3iYL5S3W57LLEniscOGPZgOqZUPCx6d3dB+52B80yJ0XstzsC/eV8gnA4tM3MHDrKz+OCFSLNjswdSC+/bA==", "dev": true, "license": "MIT", "dependencies": { @@ -2578,7 +2606,7 @@ "is-fullwidth-code-point": "^5.1.0" }, "engines": { - "node": ">=20" + "node": ">=22" }, "funding": { "url": "https://github.com/chalk/slice-ansi?sponsor=1" @@ -2615,9 +2643,9 @@ } }, "node_modules/string-width": { - "version": "8.2.0", - "resolved": "https://registry.npmjs.org/string-width/-/string-width-8.2.0.tgz", - "integrity": "sha512-6hJPQ8N0V0P3SNmP6h2J99RLuzrWz2gvT7VnK5tKvrNqJoyS9W4/Fb8mo31UiPvy00z7DQXkP2hnKBVav76thw==", + "version": "8.2.1", + "resolved": "https://registry.npmjs.org/string-width/-/string-width-8.2.1.tgz", + "integrity": "sha512-IIaP0g3iy9Cyy18w3M9YcaDudujEAVHKt3a3QJg1+sr/oX96TbaGUubG0hJyCjCBThFH+tFpcIyoUHUn1ogaLA==", "dev": true, "license": "MIT", "dependencies": { @@ -2648,16 +2676,19 @@ } }, "node_modules/strnum": { - "version": "2.2.2", - "resolved": "https://registry.npmjs.org/strnum/-/strnum-2.2.2.tgz", - "integrity": "sha512-DnR90I+jtXNSTXWdwrEy9FakW7UX+qUZg28gj5fk2vxxl7uS/3bpI4fjFYVmdK9etptYBPNkpahuQnEwhwECqA==", + "version": "2.4.0", + "resolved": "https://registry.npmjs.org/strnum/-/strnum-2.4.0.tgz", + "integrity": "sha512-sHrVyWWdq28RbhjuJdZsA1SnGRJV6NiXbk6AXBxDOsgAcA+lmpUZCYjOdLBxkXMwis6RRe7dlZt4VlIWFVzkmg==", "funding": [ { "type": "github", "url": "https://github.com/sponsors/NaturalIntelligence" } ], - "license": "MIT" + "license": "MIT", + "dependencies": { + "anynum": "^1.0.0" + } }, "node_modules/supertap": { "version": "3.0.1", @@ -2676,9 +2707,9 @@ } }, "node_modules/tar": { - "version": "7.5.13", - "resolved": "https://registry.npmjs.org/tar/-/tar-7.5.13.tgz", - "integrity": "sha512-tOG/7GyXpFevhXVh8jOPJrmtRpOTsYqUIkVdVooZYJS/z8WhfQUX8RJILmeuJNinGAMSu1veBr4asSHFt5/hng==", + "version": "7.5.16", + "resolved": "https://registry.npmjs.org/tar/-/tar-7.5.16.tgz", + "integrity": "sha512-56adEpPMouktRlBLXiaYFFzZ/3+JXa8P9n7WbR+ibIjtviN55mEaOkiysCnPnWm+7kkui1Dn8J9l+g6zV8731w==", "dev": true, "license": "BlueOak-1.0.0", "dependencies": { @@ -2824,9 +2855,9 @@ } }, "node_modules/typescript": { - "version": "6.0.2", - "resolved": "https://registry.npmjs.org/typescript/-/typescript-6.0.2.tgz", - "integrity": "sha512-bGdAIrZ0wiGDo5l8c++HWtbaNCWTS4UTv7RaTH/ThVIgjkveJt83m74bBHMJkuCbslY8ixgLBVZJIOiQlQTjfQ==", + "version": "6.0.3", + "resolved": "https://registry.npmjs.org/typescript/-/typescript-6.0.3.tgz", + "integrity": "sha512-y2TvuxSZPDyQakkFRPZHKFm+KKVqIisdg9/CZwm9ftvKXLP8NRWj38/ODjNbr43SsoXqNuAisEf1GdCxqWcdBw==", "dev": true, "license": "Apache-2.0", "bin": { @@ -2838,18 +2869,18 @@ } }, "node_modules/undici": { - "version": "6.24.1", - "resolved": "https://registry.npmjs.org/undici/-/undici-6.24.1.tgz", - "integrity": "sha512-sC+b0tB1whOCzbtlx20fx3WgCXwkW627p4EA9uM+/tNNPkSS+eSEld6pAs9nDv7WbY1UUljBMYPtu9BCOrCWKA==", + "version": "6.26.0", + "resolved": "https://registry.npmjs.org/undici/-/undici-6.26.0.tgz", + "integrity": "sha512-4yqz8a3n5HmGTlsbADNtr/dJlhkh/55Rq798G6ibiULcXbDtaLpTl1pvdqcbFfeoj3iSi52lePFM7h9H21cw/A==", "license": "MIT", "engines": { "node": ">=18.17" } }, "node_modules/undici-types": { - "version": "7.16.0", - "resolved": "https://registry.npmjs.org/undici-types/-/undici-types-7.16.0.tgz", - "integrity": "sha512-Zz+aZWSj8LE6zoxD+xrjh4VfkIG8Ya6LvYkZqtUQGJPZjYl53ypCaUwWqo7eI0x66KBGeRo+mlBEkMSeSZ38Nw==", + "version": "7.18.2", + "resolved": "https://registry.npmjs.org/undici-types/-/undici-types-7.18.2.tgz", + "integrity": "sha512-AsuCzffGHJybSaRrmr5eHr81mwJU3kjw6M+uprWvCXiNeN9SOGwQ3Jn8jb8m3Z6izVgknn1R0FTCEAP2QrLY/w==", "dev": true, "license": "MIT" }, @@ -2950,6 +2981,21 @@ "node": "^20.17.0 || >=22.9.0" } }, + "node_modules/xml-naming": { + "version": "0.1.0", + "resolved": "https://registry.npmjs.org/xml-naming/-/xml-naming-0.1.0.tgz", + "integrity": "sha512-k8KO9hrMyNk6tUWqUfkTEZbezRRpONVOzUTnc97VnCvyj6Tf9lyUR9EDAIeiVLv56jsMcoXEwjW8Kv5yPY52lw==", + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/NaturalIntelligence" + } + ], + "license": "MIT", + "engines": { + "node": ">=16.0.0" + } + }, "node_modules/y18n": { "version": "5.0.8", "resolved": "https://registry.npmjs.org/y18n/-/y18n-5.0.8.tgz", diff --git a/package.json b/package.json index 886da76..25818f0 100644 --- a/package.json +++ b/package.json @@ -25,16 +25,16 @@ }, "devDependencies": { "@types/node": "^24.0.0", - "@vercel/ncc": "^0.38.4", - "ava": "^7.0.0", + "@vercel/ncc": "^0.44.0", + "ava": "^8.0.1", "ts-node": "^10.9.2", "tsx": "^4.22.4", "typescript": "^6.0.2" }, "ava": { - "extensions": { - "ts": "module" - }, + "extensions": [ + "ts" + ], "nodeArguments": [ "--import", "tsx"