next
Version:
The React Framework
1 lines • 596 kB
JavaScript
module.exports = "\"use strict\";\nvar __create = Object.create;\nvar __defProp = Object.defineProperty;\nvar __getOwnPropDesc = Object.getOwnPropertyDescriptor;\nvar __getOwnPropNames = Object.getOwnPropertyNames;\nvar __getProtoOf = Object.getPrototypeOf;\nvar __hasOwnProp = Object.prototype.hasOwnProperty;\nvar __name = (target, value) => __defProp(target, \"name\", { value, configurable: true });\nvar __esm = (fn, res) => function __init() {\n return fn && (res = (0, fn[__getOwnPropNames(fn)[0]])(fn = 0)), res;\n};\nvar __commonJS = (cb, mod) => function __require() {\n return mod || (0, cb[__getOwnPropNames(cb)[0]])((mod = { exports: {} }).exports, mod), mod.exports;\n};\nvar __export = (target, all) => {\n for (var name in all)\n __defProp(target, name, { get: all[name], enumerable: true });\n};\nvar __copyProps = (to, from, except, desc) => {\n if (from && typeof from === \"object\" || typeof from === \"function\") {\n for (let key of __getOwnPropNames(from))\n if (!__hasOwnProp.call(to, key) && key !== except)\n __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });\n }\n return to;\n};\nvar __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(\n // If the importer is in node compatibility mode or this is not an ESM\n // file that has been converted to a CommonJS file using a Babel-\n // compatible transform (i.e. \"__esModule\" has not been set), then set\n // \"default\" to the CommonJS \"module.exports\" for node compatibility.\n isNodeMode || !mod || !mod.__esModule ? __defProp(target, \"default\", { value: mod, enumerable: true }) : target,\n mod\n));\nvar __toCommonJS = (mod) => __copyProps(__defProp({}, \"__esModule\", { value: true }), mod);\n\n// <define:process>\nvar define_process_default;\nvar init_define_process = __esm({\n \"<define:process>\"() {\n define_process_default = { env: {}, versions: { node: \"16.6.0\" } };\n }\n});\n\n// ../../node_modules/.pnpm/undici@5.22.1/node_modules/undici/lib/fetch/symbols.js\nvar require_symbols = __commonJS({\n \"../../node_modules/.pnpm/undici@5.22.1/node_modules/undici/lib/fetch/symbols.js\"(exports, module2) {\n \"use strict\";\n init_define_process();\n module2.exports = {\n kUrl: Symbol(\"url\"),\n kHeaders: Symbol(\"headers\"),\n kSignal: Symbol(\"signal\"),\n kState: Symbol(\"state\"),\n kGuard: Symbol(\"guard\"),\n kRealm: Symbol(\"realm\")\n };\n }\n});\n\n// ../../node_modules/.pnpm/undici@5.22.1/node_modules/undici/lib/core/symbols.js\nvar require_symbols2 = __commonJS({\n \"../../node_modules/.pnpm/undici@5.22.1/node_modules/undici/lib/core/symbols.js\"(exports, module2) {\n init_define_process();\n module2.exports = {\n kClose: Symbol(\"close\"),\n kDestroy: Symbol(\"destroy\"),\n kDispatch: Symbol(\"dispatch\"),\n kUrl: Symbol(\"url\"),\n kWriting: Symbol(\"writing\"),\n kResuming: Symbol(\"resuming\"),\n kQueue: Symbol(\"queue\"),\n kConnect: Symbol(\"connect\"),\n kConnecting: Symbol(\"connecting\"),\n kHeadersList: Symbol(\"headers list\"),\n kKeepAliveDefaultTimeout: Symbol(\"default keep alive timeout\"),\n kKeepAliveMaxTimeout: Symbol(\"max keep alive timeout\"),\n kKeepAliveTimeoutThreshold: Symbol(\"keep alive timeout threshold\"),\n kKeepAliveTimeoutValue: Symbol(\"keep alive timeout\"),\n kKeepAlive: Symbol(\"keep alive\"),\n kHeadersTimeout: Symbol(\"headers timeout\"),\n kBodyTimeout: Symbol(\"body timeout\"),\n kServerName: Symbol(\"server name\"),\n kLocalAddress: Symbol(\"local address\"),\n kHost: Symbol(\"host\"),\n kNoRef: Symbol(\"no ref\"),\n kBodyUsed: Symbol(\"used\"),\n kRunning: Symbol(\"running\"),\n kBlocking: Symbol(\"blocking\"),\n kPending: Symbol(\"pending\"),\n kSize: Symbol(\"size\"),\n kBusy: Symbol(\"busy\"),\n kQueued: Symbol(\"queued\"),\n kFree: Symbol(\"free\"),\n kConnected: Symbol(\"connected\"),\n kClosed: Symbol(\"closed\"),\n kNeedDrain: Symbol(\"need drain\"),\n kReset: Symbol(\"reset\"),\n kDestroyed: Symbol.for(\"nodejs.stream.destroyed\"),\n kMaxHeadersSize: Symbol(\"max headers size\"),\n kRunningIdx: Symbol(\"running index\"),\n kPendingIdx: Symbol(\"pending index\"),\n kError: Symbol(\"error\"),\n kClients: Symbol(\"clients\"),\n kClient: Symbol(\"client\"),\n kParser: Symbol(\"parser\"),\n kOnDestroyed: Symbol(\"destroy callbacks\"),\n kPipelining: Symbol(\"pipelining\"),\n kSocket: Symbol(\"socket\"),\n kHostHeader: Symbol(\"host header\"),\n kConnector: Symbol(\"connector\"),\n kStrictContentLength: Symbol(\"strict content length\"),\n kMaxRedirections: Symbol(\"maxRedirections\"),\n kMaxRequests: Symbol(\"maxRequestsPerClient\"),\n kProxy: Symbol(\"proxy agent options\"),\n kCounter: Symbol(\"socket request counter\"),\n kInterceptors: Symbol(\"dispatch interceptors\"),\n kMaxResponseSize: Symbol(\"max response size\")\n };\n }\n});\n\n// ../../node_modules/.pnpm/undici@5.22.1/node_modules/undici/lib/core/errors.js\nvar require_errors = __commonJS({\n \"../../node_modules/.pnpm/undici@5.22.1/node_modules/undici/lib/core/errors.js\"(exports, module2) {\n \"use strict\";\n init_define_process();\n var UndiciError = class extends Error {\n constructor(message) {\n super(message);\n this.name = \"UndiciError\";\n this.code = \"UND_ERR\";\n }\n };\n __name(UndiciError, \"UndiciError\");\n var ConnectTimeoutError = class extends UndiciError {\n constructor(message) {\n super(message);\n Error.captureStackTrace(this, ConnectTimeoutError);\n this.name = \"ConnectTimeoutError\";\n this.message = message || \"Connect Timeout Error\";\n this.code = \"UND_ERR_CONNECT_TIMEOUT\";\n }\n };\n __name(ConnectTimeoutError, \"ConnectTimeoutError\");\n var HeadersTimeoutError = class extends UndiciError {\n constructor(message) {\n super(message);\n Error.captureStackTrace(this, HeadersTimeoutError);\n this.name = \"HeadersTimeoutError\";\n this.message = message || \"Headers Timeout Error\";\n this.code = \"UND_ERR_HEADERS_TIMEOUT\";\n }\n };\n __name(HeadersTimeoutError, \"HeadersTimeoutError\");\n var HeadersOverflowError = class extends UndiciError {\n constructor(message) {\n super(message);\n Error.captureStackTrace(this, HeadersOverflowError);\n this.name = \"HeadersOverflowError\";\n this.message = message || \"Headers Overflow Error\";\n this.code = \"UND_ERR_HEADERS_OVERFLOW\";\n }\n };\n __name(HeadersOverflowError, \"HeadersOverflowError\");\n var BodyTimeoutError = class extends UndiciError {\n constructor(message) {\n super(message);\n Error.captureStackTrace(this, BodyTimeoutError);\n this.name = \"BodyTimeoutError\";\n this.message = message || \"Body Timeout Error\";\n this.code = \"UND_ERR_BODY_TIMEOUT\";\n }\n };\n __name(BodyTimeoutError, \"BodyTimeoutError\");\n var ResponseStatusCodeError = class extends UndiciError {\n constructor(message, statusCode, headers, body) {\n super(message);\n Error.captureStackTrace(this, ResponseStatusCodeError);\n this.name = \"ResponseStatusCodeError\";\n this.message = message || \"Response Status Code Error\";\n this.code = \"UND_ERR_RESPONSE_STATUS_CODE\";\n this.body = body;\n this.status = statusCode;\n this.statusCode = statusCode;\n this.headers = headers;\n }\n };\n __name(ResponseStatusCodeError, \"ResponseStatusCodeError\");\n var InvalidArgumentError2 = class extends UndiciError {\n constructor(message) {\n super(message);\n Error.captureStackTrace(this, InvalidArgumentError2);\n this.name = \"InvalidArgumentError\";\n this.message = message || \"Invalid Argument Error\";\n this.code = \"UND_ERR_INVALID_ARG\";\n }\n };\n __name(InvalidArgumentError2, \"InvalidArgumentError\");\n var InvalidReturnValueError = class extends UndiciError {\n constructor(message) {\n super(message);\n Error.captureStackTrace(this, InvalidReturnValueError);\n this.name = \"InvalidReturnValueError\";\n this.message = message || \"Invalid Return Value Error\";\n this.code = \"UND_ERR_INVALID_RETURN_VALUE\";\n }\n };\n __name(InvalidReturnValueError, \"InvalidReturnValueError\");\n var RequestAbortedError = class extends UndiciError {\n constructor(message) {\n super(message);\n Error.captureStackTrace(this, RequestAbortedError);\n this.name = \"AbortError\";\n this.message = message || \"Request aborted\";\n this.code = \"UND_ERR_ABORTED\";\n }\n };\n __name(RequestAbortedError, \"RequestAbortedError\");\n var InformationalError = class extends UndiciError {\n constructor(message) {\n super(message);\n Error.captureStackTrace(this, InformationalError);\n this.name = \"InformationalError\";\n this.message = message || \"Request information\";\n this.code = \"UND_ERR_INFO\";\n }\n };\n __name(InformationalError, \"InformationalError\");\n var RequestContentLengthMismatchError = class extends UndiciError {\n constructor(message) {\n super(message);\n Error.captureStackTrace(this, RequestContentLengthMismatchError);\n this.name = \"RequestContentLengthMismatchError\";\n this.message = message || \"Request body length does not match content-length header\";\n this.code = \"UND_ERR_REQ_CONTENT_LENGTH_MISMATCH\";\n }\n };\n __name(RequestContentLengthMismatchError, \"RequestContentLengthMismatchError\");\n var ResponseContentLengthMismatchError = class extends UndiciError {\n constructor(message) {\n super(message);\n Error.captureStackTrace(this, ResponseContentLengthMismatchError);\n this.name = \"ResponseContentLengthMismatchError\";\n this.message = message || \"Response body length does not match content-length header\";\n this.code = \"UND_ERR_RES_CONTENT_LENGTH_MISMATCH\";\n }\n };\n __name(ResponseContentLengthMismatchError, \"ResponseContentLengthMismatchError\");\n var ClientDestroyedError = class extends UndiciError {\n constructor(message) {\n super(message);\n Error.captureStackTrace(this, ClientDestroyedError);\n this.name = \"ClientDestroyedError\";\n this.message = message || \"The client is destroyed\";\n this.code = \"UND_ERR_DESTROYED\";\n }\n };\n __name(ClientDestroyedError, \"ClientDestroyedError\");\n var ClientClosedError = class extends UndiciError {\n constructor(message) {\n super(message);\n Error.captureStackTrace(this, ClientClosedError);\n this.name = \"ClientClosedError\";\n this.message = message || \"The client is closed\";\n this.code = \"UND_ERR_CLOSED\";\n }\n };\n __name(ClientClosedError, \"ClientClosedError\");\n var SocketError = class extends UndiciError {\n constructor(message, socket) {\n super(message);\n Error.captureStackTrace(this, SocketError);\n this.name = \"SocketError\";\n this.message = message || \"Socket error\";\n this.code = \"UND_ERR_SOCKET\";\n this.socket = socket;\n }\n };\n __name(SocketError, \"SocketError\");\n var NotSupportedError = class extends UndiciError {\n constructor(message) {\n super(message);\n Error.captureStackTrace(this, NotSupportedError);\n this.name = \"NotSupportedError\";\n this.message = message || \"Not supported error\";\n this.code = \"UND_ERR_NOT_SUPPORTED\";\n }\n };\n __name(NotSupportedError, \"NotSupportedError\");\n var BalancedPoolMissingUpstreamError = class extends UndiciError {\n constructor(message) {\n super(message);\n Error.captureStackTrace(this, NotSupportedError);\n this.name = \"MissingUpstreamError\";\n this.message = message || \"No upstream has been added to the BalancedPool\";\n this.code = \"UND_ERR_BPL_MISSING_UPSTREAM\";\n }\n };\n __name(BalancedPoolMissingUpstreamError, \"BalancedPoolMissingUpstreamError\");\n var HTTPParserError = class extends Error {\n constructor(message, code, data) {\n super(message);\n Error.captureStackTrace(this, HTTPParserError);\n this.name = \"HTTPParserError\";\n this.code = code ? `HPE_${code}` : void 0;\n this.data = data ? data.toString() : void 0;\n }\n };\n __name(HTTPParserError, \"HTTPParserError\");\n var ResponseExceededMaxSizeError = class extends UndiciError {\n constructor(message) {\n super(message);\n Error.captureStackTrace(this, ResponseExceededMaxSizeError);\n this.name = \"ResponseExceededMaxSizeError\";\n this.message = message || \"Response content exceeded max size\";\n this.code = \"UND_ERR_RES_EXCEEDED_MAX_SIZE\";\n }\n };\n __name(ResponseExceededMaxSizeError, \"ResponseExceededMaxSizeError\");\n module2.exports = {\n HTTPParserError,\n UndiciError,\n HeadersTimeoutError,\n HeadersOverflowError,\n BodyTimeoutError,\n RequestContentLengthMismatchError,\n ConnectTimeoutError,\n ResponseStatusCodeError,\n InvalidArgumentError: InvalidArgumentError2,\n InvalidReturnValueError,\n RequestAbortedError,\n ClientDestroyedError,\n ClientClosedError,\n InformationalError,\n SocketError,\n NotSupportedError,\n ResponseContentLengthMismatchError,\n BalancedPoolMissingUpstreamError,\n ResponseExceededMaxSizeError\n };\n }\n});\n\n// ../../node_modules/.pnpm/undici@5.22.1/node_modules/undici/lib/core/util.js\nvar require_util = __commonJS({\n \"../../node_modules/.pnpm/undici@5.22.1/node_modules/undici/lib/core/util.js\"(exports, module2) {\n \"use strict\";\n init_define_process();\n var assert = require(\"assert\");\n var { kDestroyed, kBodyUsed } = require_symbols2();\n var { IncomingMessage } = require(\"http\");\n var stream = require(\"stream\");\n var net = require(\"net\");\n var { InvalidArgumentError: InvalidArgumentError2 } = require_errors();\n var { Blob: Blob2 } = require(\"buffer\");\n var nodeUtil = require(\"util\");\n var { stringify } = require(\"querystring\");\n var [nodeMajor, nodeMinor] = define_process_default.versions.node.split(\".\").map((v) => Number(v));\n function nop() {\n }\n __name(nop, \"nop\");\n function isStream(obj) {\n return obj && typeof obj === \"object\" && typeof obj.pipe === \"function\" && typeof obj.on === \"function\";\n }\n __name(isStream, \"isStream\");\n function isBlobLike(object) {\n return Blob2 && object instanceof Blob2 || object && typeof object === \"object\" && (typeof object.stream === \"function\" || typeof object.arrayBuffer === \"function\") && /^(Blob|File)$/.test(object[Symbol.toStringTag]);\n }\n __name(isBlobLike, \"isBlobLike\");\n function buildURL(url, queryParams) {\n if (url.includes(\"?\") || url.includes(\"#\")) {\n throw new Error('Query params cannot be passed when url already contains \"?\" or \"#\".');\n }\n const stringified = stringify(queryParams);\n if (stringified) {\n url += \"?\" + stringified;\n }\n return url;\n }\n __name(buildURL, \"buildURL\");\n function parseURL(url) {\n if (typeof url === \"string\") {\n url = new URL(url);\n if (!/^https?:/.test(url.origin || url.protocol)) {\n throw new InvalidArgumentError2(\"Invalid URL protocol: the URL must start with `http:` or `https:`.\");\n }\n return url;\n }\n if (!url || typeof url !== \"object\") {\n throw new InvalidArgumentError2(\"Invalid URL: The URL argument must be a non-null object.\");\n }\n if (url.port != null && url.port !== \"\" && !Number.isFinite(parseInt(url.port))) {\n throw new InvalidArgumentError2(\"Invalid URL: port must be a valid integer or a string representation of an integer.\");\n }\n if (url.path != null && typeof url.path !== \"string\") {\n throw new InvalidArgumentError2(\"Invalid URL path: the path must be a string or null/undefined.\");\n }\n if (url.pathname != null && typeof url.pathname !== \"string\") {\n throw new InvalidArgumentError2(\"Invalid URL pathname: the pathname must be a string or null/undefined.\");\n }\n if (url.hostname != null && typeof url.hostname !== \"string\") {\n throw new InvalidArgumentError2(\"Invalid URL hostname: the hostname must be a string or null/undefined.\");\n }\n if (url.origin != null && typeof url.origin !== \"string\") {\n throw new InvalidArgumentError2(\"Invalid URL origin: the origin must be a string or null/undefined.\");\n }\n if (!/^https?:/.test(url.origin || url.protocol)) {\n throw new InvalidArgumentError2(\"Invalid URL protocol: the URL must start with `http:` or `https:`.\");\n }\n if (!(url instanceof URL)) {\n const port = url.port != null ? url.port : url.protocol === \"https:\" ? 443 : 80;\n let origin = url.origin != null ? url.origin : `${url.protocol}//${url.hostname}:${port}`;\n let path = url.path != null ? url.path : `${url.pathname || \"\"}${url.search || \"\"}`;\n if (origin.endsWith(\"/\")) {\n origin = origin.substring(0, origin.length - 1);\n }\n if (path && !path.startsWith(\"/\")) {\n path = `/${path}`;\n }\n url = new URL(origin + path);\n }\n return url;\n }\n __name(parseURL, \"parseURL\");\n function parseOrigin(url) {\n url = parseURL(url);\n if (url.pathname !== \"/\" || url.search || url.hash) {\n throw new InvalidArgumentError2(\"invalid url\");\n }\n return url;\n }\n __name(parseOrigin, \"parseOrigin\");\n function getHostname(host) {\n if (host[0] === \"[\") {\n const idx2 = host.indexOf(\"]\");\n assert(idx2 !== -1);\n return host.substr(1, idx2 - 1);\n }\n const idx = host.indexOf(\":\");\n if (idx === -1)\n return host;\n return host.substr(0, idx);\n }\n __name(getHostname, \"getHostname\");\n function getServerName(host) {\n if (!host) {\n return null;\n }\n assert.strictEqual(typeof host, \"string\");\n const servername = getHostname(host);\n if (net.isIP(servername)) {\n return \"\";\n }\n return servername;\n }\n __name(getServerName, \"getServerName\");\n function deepClone(obj) {\n return JSON.parse(JSON.stringify(obj));\n }\n __name(deepClone, \"deepClone\");\n function isAsyncIterable(obj) {\n return !!(obj != null && typeof obj[Symbol.asyncIterator] === \"function\");\n }\n __name(isAsyncIterable, \"isAsyncIterable\");\n function isIterable(obj) {\n return !!(obj != null && (typeof obj[Symbol.iterator] === \"function\" || typeof obj[Symbol.asyncIterator] === \"function\"));\n }\n __name(isIterable, \"isIterable\");\n function bodyLength(body) {\n if (body == null) {\n return 0;\n } else if (isStream(body)) {\n const state = body._readableState;\n return state && state.ended === true && Number.isFinite(state.length) ? state.length : null;\n } else if (isBlobLike(body)) {\n return body.size != null ? body.size : null;\n } else if (isBuffer(body)) {\n return body.byteLength;\n }\n return null;\n }\n __name(bodyLength, \"bodyLength\");\n function isDestroyed(stream2) {\n return !stream2 || !!(stream2.destroyed || stream2[kDestroyed]);\n }\n __name(isDestroyed, \"isDestroyed\");\n function isReadableAborted(stream2) {\n const state = stream2 && stream2._readableState;\n return isDestroyed(stream2) && state && !state.endEmitted;\n }\n __name(isReadableAborted, \"isReadableAborted\");\n function destroy(stream2, err) {\n if (!isStream(stream2) || isDestroyed(stream2)) {\n return;\n }\n if (typeof stream2.destroy === \"function\") {\n if (Object.getPrototypeOf(stream2).constructor === IncomingMessage) {\n stream2.socket = null;\n }\n stream2.destroy(err);\n } else if (err) {\n define_process_default.nextTick((stream3, err2) => {\n stream3.emit(\"error\", err2);\n }, stream2, err);\n }\n if (stream2.destroyed !== true) {\n stream2[kDestroyed] = true;\n }\n }\n __name(destroy, \"destroy\");\n var KEEPALIVE_TIMEOUT_EXPR = /timeout=(\\d+)/;\n function parseKeepAliveTimeout(val) {\n const m = val.toString().match(KEEPALIVE_TIMEOUT_EXPR);\n return m ? parseInt(m[1], 10) * 1e3 : null;\n }\n __name(parseKeepAliveTimeout, \"parseKeepAliveTimeout\");\n function parseHeaders(headers, obj = {}) {\n for (let i = 0; i < headers.length; i += 2) {\n const key = headers[i].toString().toLowerCase();\n let val = obj[key];\n if (!val) {\n if (Array.isArray(headers[i + 1])) {\n obj[key] = headers[i + 1];\n } else {\n obj[key] = headers[i + 1].toString(\"utf8\");\n }\n } else {\n if (!Array.isArray(val)) {\n val = [val];\n obj[key] = val;\n }\n val.push(headers[i + 1].toString(\"utf8\"));\n }\n }\n if (\"content-length\" in obj && \"content-disposition\" in obj) {\n obj[\"content-disposition\"] = Buffer.from(obj[\"content-disposition\"]).toString(\"latin1\");\n }\n return obj;\n }\n __name(parseHeaders, \"parseHeaders\");\n function parseRawHeaders(headers) {\n const ret = [];\n let hasContentLength = false;\n let contentDispositionIdx = -1;\n for (let n = 0; n < headers.length; n += 2) {\n const key = headers[n + 0].toString();\n const val = headers[n + 1].toString(\"utf8\");\n if (key.length === 14 && (key === \"content-length\" || key.toLowerCase() === \"content-length\")) {\n ret.push(key, val);\n hasContentLength = true;\n } else if (key.length === 19 && (key === \"content-disposition\" || key.toLowerCase() === \"content-disposition\")) {\n contentDispositionIdx = ret.push(key, val) - 1;\n } else {\n ret.push(key, val);\n }\n }\n if (hasContentLength && contentDispositionIdx !== -1) {\n ret[contentDispositionIdx] = Buffer.from(ret[contentDispositionIdx]).toString(\"latin1\");\n }\n return ret;\n }\n __name(parseRawHeaders, \"parseRawHeaders\");\n function isBuffer(buffer) {\n return buffer instanceof Uint8Array || Buffer.isBuffer(buffer);\n }\n __name(isBuffer, \"isBuffer\");\n function validateHandler(handler, method, upgrade) {\n if (!handler || typeof handler !== \"object\") {\n throw new InvalidArgumentError2(\"handler must be an object\");\n }\n if (typeof handler.onConnect !== \"function\") {\n throw new InvalidArgumentError2(\"invalid onConnect method\");\n }\n if (typeof handler.onError !== \"function\") {\n throw new InvalidArgumentError2(\"invalid onError method\");\n }\n if (typeof handler.onBodySent !== \"function\" && handler.onBodySent !== void 0) {\n throw new InvalidArgumentError2(\"invalid onBodySent method\");\n }\n if (upgrade || method === \"CONNECT\") {\n if (typeof handler.onUpgrade !== \"function\") {\n throw new InvalidArgumentError2(\"invalid onUpgrade method\");\n }\n } else {\n if (typeof handler.onHeaders !== \"function\") {\n throw new InvalidArgumentError2(\"invalid onHeaders method\");\n }\n if (typeof handler.onData !== \"function\") {\n throw new InvalidArgumentError2(\"invalid onData method\");\n }\n if (typeof handler.onComplete !== \"function\") {\n throw new InvalidArgumentError2(\"invalid onComplete method\");\n }\n }\n }\n __name(validateHandler, \"validateHandler\");\n function isDisturbed(body) {\n return !!(body && (stream.isDisturbed ? stream.isDisturbed(body) || body[kBodyUsed] : body[kBodyUsed] || body.readableDidRead || body._readableState && body._readableState.dataEmitted || isReadableAborted(body)));\n }\n __name(isDisturbed, \"isDisturbed\");\n function isErrored(body) {\n return !!(body && (stream.isErrored ? stream.isErrored(body) : /state: 'errored'/.test(\n nodeUtil.inspect(body)\n )));\n }\n __name(isErrored, \"isErrored\");\n function isReadable(body) {\n return !!(body && (stream.isReadable ? stream.isReadable(body) : /state: 'readable'/.test(\n nodeUtil.inspect(body)\n )));\n }\n __name(isReadable, \"isReadable\");\n function getSocketInfo(socket) {\n return {\n localAddress: socket.localAddress,\n localPort: socket.localPort,\n remoteAddress: socket.remoteAddress,\n remotePort: socket.remotePort,\n remoteFamily: socket.remoteFamily,\n timeout: socket.timeout,\n bytesWritten: socket.bytesWritten,\n bytesRead: socket.bytesRead\n };\n }\n __name(getSocketInfo, \"getSocketInfo\");\n var ReadableStream;\n function ReadableStreamFrom(iterable) {\n if (!ReadableStream) {\n ReadableStream = require(\"./streams\").ReadableStream;\n }\n if (ReadableStream.from) {\n return ReadableStream.from(iterable);\n }\n let iterator;\n return new ReadableStream(\n {\n async start() {\n iterator = iterable[Symbol.asyncIterator]();\n },\n async pull(controller) {\n const { done, value } = await iterator.next();\n if (done) {\n queueMicrotask(() => {\n controller.close();\n });\n } else {\n const buf = Buffer.isBuffer(value) ? value : Buffer.from(value);\n controller.enqueue(new Uint8Array(buf));\n }\n return controller.desiredSize > 0;\n },\n async cancel(reason) {\n await iterator.return();\n }\n },\n 0\n );\n }\n __name(ReadableStreamFrom, \"ReadableStreamFrom\");\n function isFormDataLike(object) {\n return object && typeof object === \"object\" && typeof object.append === \"function\" && typeof object.delete === \"function\" && typeof object.get === \"function\" && typeof object.getAll === \"function\" && typeof object.has === \"function\" && typeof object.set === \"function\" && object[Symbol.toStringTag] === \"FormData\";\n }\n __name(isFormDataLike, \"isFormDataLike\");\n function throwIfAborted(signal) {\n if (!signal) {\n return;\n }\n if (typeof signal.throwIfAborted === \"function\") {\n signal.throwIfAborted();\n } else {\n if (signal.aborted) {\n const err = new Error(\"The operation was aborted\");\n err.name = \"AbortError\";\n throw err;\n }\n }\n }\n __name(throwIfAborted, \"throwIfAborted\");\n var hasToWellFormed = !!String.prototype.toWellFormed;\n function toUSVString(val) {\n if (hasToWellFormed) {\n return `${val}`.toWellFormed();\n } else if (nodeUtil.toUSVString) {\n return nodeUtil.toUSVString(val);\n }\n return `${val}`;\n }\n __name(toUSVString, \"toUSVString\");\n var kEnumerableProperty = /* @__PURE__ */ Object.create(null);\n kEnumerableProperty.enumerable = true;\n module2.exports = {\n kEnumerableProperty,\n nop,\n isDisturbed,\n isErrored,\n isReadable,\n toUSVString,\n isReadableAborted,\n isBlobLike,\n parseOrigin,\n parseURL,\n getServerName,\n isStream,\n isIterable,\n isAsyncIterable,\n isDestroyed,\n parseRawHeaders,\n parseHeaders,\n parseKeepAliveTimeout,\n destroy,\n bodyLength,\n deepClone,\n ReadableStreamFrom,\n isBuffer,\n validateHandler,\n getSocketInfo,\n isFormDataLike,\n buildURL,\n throwIfAborted,\n nodeMajor,\n nodeMinor,\n nodeHasAutoSelectFamily: nodeMajor > 18 || nodeMajor === 18 && nodeMinor >= 13\n };\n }\n});\n\n// ../../node_modules/.pnpm/undici@5.22.1/node_modules/undici/lib/fetch/constants.js\nvar require_constants = __commonJS({\n \"../../node_modules/.pnpm/undici@5.22.1/node_modules/undici/lib/fetch/constants.js\"(exports, module2) {\n \"use strict\";\n init_define_process();\n var { MessageChannel, receiveMessageOnPort } = require(\"worker_threads\");\n var corsSafeListedMethods = [\"GET\", \"HEAD\", \"POST\"];\n var nullBodyStatus = [101, 204, 205, 304];\n var redirectStatus = [301, 302, 303, 307, 308];\n var badPorts = [\n \"1\",\n \"7\",\n \"9\",\n \"11\",\n \"13\",\n \"15\",\n \"17\",\n \"19\",\n \"20\",\n \"21\",\n \"22\",\n \"23\",\n \"25\",\n \"37\",\n \"42\",\n \"43\",\n \"53\",\n \"69\",\n \"77\",\n \"79\",\n \"87\",\n \"95\",\n \"101\",\n \"102\",\n \"103\",\n \"104\",\n \"109\",\n \"110\",\n \"111\",\n \"113\",\n \"115\",\n \"117\",\n \"119\",\n \"123\",\n \"135\",\n \"137\",\n \"139\",\n \"143\",\n \"161\",\n \"179\",\n \"389\",\n \"427\",\n \"465\",\n \"512\",\n \"513\",\n \"514\",\n \"515\",\n \"526\",\n \"530\",\n \"531\",\n \"532\",\n \"540\",\n \"548\",\n \"554\",\n \"556\",\n \"563\",\n \"587\",\n \"601\",\n \"636\",\n \"989\",\n \"990\",\n \"993\",\n \"995\",\n \"1719\",\n \"1720\",\n \"1723\",\n \"2049\",\n \"3659\",\n \"4045\",\n \"5060\",\n \"5061\",\n \"6000\",\n \"6566\",\n \"6665\",\n \"6666\",\n \"6667\",\n \"6668\",\n \"6669\",\n \"6697\",\n \"10080\"\n ];\n var referrerPolicy = [\n \"\",\n \"no-referrer\",\n \"no-referrer-when-downgrade\",\n \"same-origin\",\n \"origin\",\n \"strict-origin\",\n \"origin-when-cross-origin\",\n \"strict-origin-when-cross-origin\",\n \"unsafe-url\"\n ];\n var requestRedirect = [\"follow\", \"manual\", \"error\"];\n var safeMethods = [\"GET\", \"HEAD\", \"OPTIONS\", \"TRACE\"];\n var requestMode = [\"navigate\", \"same-origin\", \"no-cors\", \"cors\"];\n var requestCredentials = [\"omit\", \"same-origin\", \"include\"];\n var requestCache = [\n \"default\",\n \"no-store\",\n \"reload\",\n \"no-cache\",\n \"force-cache\",\n \"only-if-cached\"\n ];\n var requestBodyHeader = [\n \"content-encoding\",\n \"content-language\",\n \"content-location\",\n \"content-type\",\n // See https://github.com/nodejs/undici/issues/2021\n // 'Content-Length' is a forbidden header name, which is typically\n // removed in the Headers implementation. However, undici doesn't\n // filter out headers, so we add it here.\n \"content-length\"\n ];\n var requestDuplex = [\n \"half\"\n ];\n var forbiddenMethods = [\"CONNECT\", \"TRACE\", \"TRACK\"];\n var subresource = [\n \"audio\",\n \"audioworklet\",\n \"font\",\n \"image\",\n \"manifest\",\n \"paintworklet\",\n \"script\",\n \"style\",\n \"track\",\n \"video\",\n \"xslt\",\n \"\"\n ];\n var DOMException = globalThis.DOMException ?? (() => {\n try {\n atob(\"~\");\n } catch (err) {\n return Object.getPrototypeOf(err).constructor;\n }\n })();\n var channel;\n var structuredClone = globalThis.structuredClone ?? // https://github.com/nodejs/node/blob/b27ae24dcc4251bad726d9d84baf678d1f707fed/lib/internal/structured_clone.js\n // structuredClone was added in v17.0.0, but fetch supports v16.8\n /* @__PURE__ */ __name(function structuredClone2(value, options = void 0) {\n if (arguments.length === 0) {\n throw new TypeError(\"missing argument\");\n }\n if (!channel) {\n channel = new MessageChannel();\n }\n channel.port1.unref();\n channel.port2.unref();\n channel.port1.postMessage(value, options == null ? void 0 : options.transfer);\n return receiveMessageOnPort(channel.port2).message;\n }, \"structuredClone\");\n module2.exports = {\n DOMException,\n structuredClone,\n subresource,\n forbiddenMethods,\n requestBodyHeader,\n referrerPolicy,\n requestRedirect,\n requestMode,\n requestCredentials,\n requestCache,\n redirectStatus,\n corsSafeListedMethods,\n nullBodyStatus,\n safeMethods,\n badPorts,\n requestDuplex\n };\n }\n});\n\n// ../../node_modules/.pnpm/undici@5.22.1/node_modules/undici/lib/fetch/global.js\nvar require_global = __commonJS({\n \"../../node_modules/.pnpm/undici@5.22.1/node_modules/undici/lib/fetch/global.js\"(exports, module2) {\n \"use strict\";\n init_define_process();\n var globalOrigin = Symbol.for(\"undici.globalOrigin.1\");\n function getGlobalOrigin() {\n return globalThis[globalOrigin];\n }\n __name(getGlobalOrigin, \"getGlobalOrigin\");\n function setGlobalOrigin(newOrigin) {\n if (newOrigin !== void 0 && typeof newOrigin !== \"string\" && !(newOrigin instanceof URL)) {\n throw new Error(\"Invalid base url\");\n }\n if (newOrigin === void 0) {\n Object.defineProperty(globalThis, globalOrigin, {\n value: void 0,\n writable: true,\n enumerable: false,\n configurable: false\n });\n return;\n }\n const parsedURL = new URL(newOrigin);\n if (parsedURL.protocol !== \"http:\" && parsedURL.protocol !== \"https:\") {\n throw new TypeError(`Only http & https urls are allowed, received ${parsedURL.protocol}`);\n }\n Object.defineProperty(globalThis, globalOrigin, {\n value: parsedURL,\n writable: true,\n enumerable: false,\n configurable: false\n });\n }\n __name(setGlobalOrigin, \"setGlobalOrigin\");\n module2.exports = {\n getGlobalOrigin,\n setGlobalOrigin\n };\n }\n});\n\n// src/patches/util-types.js\nvar require_util_types = __commonJS({\n \"src/patches/util-types.js\"(exports, module2) {\n init_define_process();\n module2.exports = require(\"util\").types;\n }\n});\n\n// ../../node_modules/.pnpm/undici@5.22.1/node_modules/undici/lib/fetch/util.js\nvar require_util2 = __commonJS({\n \"../../node_modules/.pnpm/undici@5.22.1/node_modules/undici/lib/fetch/util.js\"(exports, module2) {\n \"use strict\";\n init_define_process();\n var { redirectStatus, badPorts, referrerPolicy: referrerPolicyTokens } = require_constants();\n var { getGlobalOrigin } = require_global();\n var { performance: performance2 } = require(\"perf_hooks\");\n var { isBlobLike, toUSVString, ReadableStreamFrom } = require_util();\n var assert = require(\"assert\");\n var { isUint8Array } = require_util_types();\n var crypto;\n try {\n crypto = require(\"crypto\");\n } catch {\n }\n function responseURL(response) {\n const urlList = response.urlList;\n const length = urlList.length;\n return length === 0 ? null : urlList[length - 1].toString();\n }\n __name(responseURL, \"responseURL\");\n function responseLocationURL(response, requestFragment) {\n if (!redirectStatus.includes(response.status)) {\n return null;\n }\n let location = response.headersList.get(\"location\");\n if (location !== null && isValidHeaderValue2(location)) {\n location = new URL(location, responseURL(response));\n }\n if (location && !location.hash) {\n location.hash = requestFragment;\n }\n return location;\n }\n __name(responseLocationURL, \"responseLocationURL\");\n function requestCurrentURL(request) {\n return request.urlList[request.urlList.length - 1];\n }\n __name(requestCurrentURL, \"requestCurrentURL\");\n function requestBadPort(request) {\n const url = requestCurrentURL(request);\n if (urlIsHttpHttpsScheme(url) && badPorts.includes(url.port)) {\n return \"blocked\";\n }\n return \"allowed\";\n }\n __name(requestBadPort, \"requestBadPort\");\n function isErrorLike(object) {\n var _a, _b;\n return object instanceof Error || (((_a = object == null ? void 0 : object.constructor) == null ? void 0 : _a.name) === \"Error\" || ((_b = object == null ? void 0 : object.constructor) == null ? void 0 : _b.name) === \"DOMException\");\n }\n __name(isErrorLike, \"isErrorLike\");\n function isValidReasonPhrase(statusText) {\n for (let i = 0; i < statusText.length; ++i) {\n const c = statusText.charCodeAt(i);\n if (!(c === 9 || // HTAB\n c >= 32 && c <= 126 || // SP / VCHAR\n c >= 128 && c <= 255)) {\n return false;\n }\n }\n return true;\n }\n __name(isValidReasonPhrase, \"isValidReasonPhrase\");\n function isTokenChar(c) {\n return !(c >= 127 || c <= 32 || c === \"(\" || c === \")\" || c === \"<\" || c === \">\" || c === \"@\" || c === \",\" || c === \";\" || c === \":\" || c === \"\\\\\" || c === '\"' || c === \"/\" || c === \"[\" || c === \"]\" || c === \"?\" || c === \"=\" || c === \"{\" || c === \"}\");\n }\n __name(isTokenChar, \"isTokenChar\");\n function isValidHTTPToken(characters) {\n if (!characters || typeof characters !== \"string\") {\n return false;\n }\n for (let i = 0; i < characters.length; ++i) {\n const c = characters.charCodeAt(i);\n if (c > 127 || !isTokenChar(c)) {\n return false;\n }\n }\n return true;\n }\n __name(isValidHTTPToken, \"isValidHTTPToken\");\n function isValidHeaderName2(potentialValue) {\n if (potentialValue.length === 0) {\n return false;\n }\n return isValidHTTPToken(potentialValue);\n }\n __name(isValidHeaderName2, \"isValidHeaderName\");\n function isValidHeaderValue2(potentialValue) {\n if (potentialValue.startsWith(\"\t\") || potentialValue.startsWith(\" \") || potentialValue.endsWith(\"\t\") || potentialValue.endsWith(\" \")) {\n return false;\n }\n if (potentialValue.includes(\"\\0\") || potentialValue.includes(\"\\r\") || potentialValue.includes(\"\\n\")) {\n return false;\n }\n return true;\n }\n __name(isValidHeaderValue2, \"isValidHeaderValue\");\n function setRequestReferrerPolicyOnRedirect(request, actualResponse) {\n const { headersList } = actualResponse;\n const policyHeader = (headersList.get(\"referrer-policy\") ?? \"\").split(\",\");\n let policy = \"\";\n if (policyHeader.length > 0) {\n for (let i = policyHeader.length; i !== 0; i--) {\n const token = policyHeader[i - 1].trim();\n if (referrerPolicyTokens.includes(token)) {\n policy = token;\n break;\n }\n }\n }\n if (policy !== \"\") {\n request.referrerPolicy = policy;\n }\n }\n __name(setRequestReferrerPolicyOnRedirect, \"setRequestReferrerPolicyOnRedirect\");\n function crossOriginResourcePolicyCheck() {\n return \"allowed\";\n }\n __name(crossOriginResourcePolicyCheck, \"crossOriginResourcePolicyCheck\");\n function corsCheck() {\n return \"success\";\n }\n __name(corsCheck, \"corsCheck\");\n function TAOCheck() {\n return \"success\";\n }\n __name(TAOCheck, \"TAOCheck\");\n function appendFetchMetadata(httpRequest) {\n let header = null;\n header = httpRequest.mode;\n httpRequest.headersList.set(\"sec-fetch-mode\", header);\n }\n __name(appendFetchMetadata, \"appendFetchMetadata\");\n function appendRequestOriginHeader(request) {\n let serializedOrigin = request.origin;\n if (request.responseTainting === \"cors\" || request.mode === \"websocket\") {\n if (serializedOrigin) {\n request.headersList.append(\"origin\", serializedOrigin);\n }\n } else if (request.method !== \"GET\" && request.method !== \"HEAD\") {\n switch (request.referrerPolicy) {\n case \"no-referrer\":\n serializedOrigin = null;\n break;\n case \"no-referrer-when-downgrade\":\n case \"strict-origin\":\n case \"strict-origin-when-cross-origin\":\n if (request.origin && urlHasHttpsScheme(request.origin) && !urlHasHttpsScheme(requestCurrentURL(request))) {\n serializedOrigin = null;\n }\n break;\n case \"same-origin\":\n if (!sameOrigin(request, requestCurrentURL(request))) {\n serializedOrigin = null;\n }\n break;\n default:\n }\n if (serializedOrigin) {\n request.headersList.append(\"origin\", serializedOrigin);\n }\n }\n }\n __name(appendRequestOriginHeader, \"appendRequestOriginHeader\");\n function coarsenedSharedCurrentTime(crossOriginIsolatedCapability) {\n return performance2.now();\n }\n __name(coarsenedSharedCurrentTime, \"coarsenedSharedCurrentTime\");\n function createOpaqueTimingInfo(timingInfo) {\n return {\n startTime: timingInfo.startTime ?? 0,\n redirectStartTime: 0,\n redirectEndTime: 0,\n postRedirectStartTime: timingInfo.startTime ?? 0,\n finalServiceWorkerStartTime: 0,\n finalNetworkResponseStartTime: 0,\n finalNetworkRequestStartTime: 0,\n endTime: 0,\n encodedBodySize: 0,\n decodedBodySize: 0,\n finalConnectionTimingInfo: null\n };\n }\n __name(createOpaqueTimingInfo, \"createOpaqueTimingInfo\");\n function makePolicyContainer() {\n return {\n referrerPolicy: \"strict-origin-when-cross-origin\"\n };\n }\n __name(makePolicyContainer, \"makePolicyContainer\");\n function clonePolicyContainer(policyContainer) {\n return {\n referrerPolicy: policyContainer.referrerPolicy\n };\n }\n __name(clonePolicyContainer, \"clonePolicyContainer\");\n function determineRequestsReferrer(request) {\n const policy = request.referrerPolicy;\n assert(policy);\n let referrerSource = null;\n if (request.referrer === \"client\") {\n const globalOrigin = getGlobalOrigin();\n if (!globalOrigin || globalOrigin.origin === \"null\") {\n return \"no-referrer\";\n }\n referrerSource = new URL(globalOrigin);\n } else if (request.referrer instanceof URL) {\n referrerSource = request.referrer;\n }\n let referrerURL = stripURLForReferrer(referrerSource);\n const referrerOrigin = stripURLForReferrer(referrerSource, true);\n if (referrerURL.toString().length > 4096) {\n referrerURL = referrerOrigin;\n }\n const areSameOrigin = sameOrigin(request, referrerURL);\n const isNonPotentiallyTrustWorthy = isURLPotentiallyTrustworthy(referrerURL) && !isURLPotentiallyTrustworthy(request.url);\n switch (policy) {\n case \"origin\":\n return referrerOrigin != null ? referrerOrigin : stripURLForReferrer(referrerSource, true);\n case \"unsafe-url\":\n return referrerURL;\n case \"same-origin\":\n return areSameOrigin ? referrerOrigin : \"no-referrer\";\n case \"origin-when-cross-origin\":\n return areSameOrigin ? referrerURL : referrerOrigin;\n case \"strict-origin-when-cross-origin\": {\n const currentURL = requestCurrentURL(request);\n if (sameOrigin(referrerURL, currentURL)) {\n return referrerURL;\n }\n if (isURLPotentiallyTrustworthy(referrerURL) && !isURLPotentiallyTrustworthy(currentURL)) {\n return \"no-referrer\";\n }\n return referrerOrigin;\n }\n case \"strict-origin\":\n case \"no-referrer-when-downgrade\":\n default:\n return isNonPotentiallyTrustWorthy ? \"no-referrer\" : referrerOrigin;\n }\n }\n __name(determineRequestsReferrer, \"determineRequestsReferrer\");\n function stripURLForReferrer(url, originOnly) {\n assert(url instanceof URL);\n if (url.protocol === \"file:\" || url.protocol === \"about:\" || url.protocol === \"blank:\") {\n return \"no-referrer\";\n }\n url.username = \"\";\n url.password = \"\";\n url.hash = \"\";\n if (originOnly) {\n url.pathname = \"\";\n url.search = \"\";\n }\n return url;\n }\n __name(stripURLForReferrer, \"stripURLForReferrer\");\n function isURLPotentiallyTrustworthy(url) {\n if (!(url instanceof URL)) {\n return false;\n }\n if (url.href === \"about:blank\" || url.href === \"about:srcdoc\") {\n return true;\n }\n if (url.protocol === \"data:\")\n return true;\n if (url.protocol === \"file:\")\n return true;\n return isOriginPotentiallyTrustworthy(url.origin);\n function isOriginPotentiallyTrustworthy(origin) {\n if (origin == null || origin === \"null\")\n return false;\n const originAsURL = new URL(origin);\n if (originAsURL.protocol === \"https:\" || originAsURL.protocol === \"wss:\") {\n return true;\n }\n if (/^127(?:\\.[0-9]+){0,2}\\.[0-9]+$|^\\[(?:0*:)*?:?0*1\\]$/.test(originAsURL.hostname) || (originAsURL.hostname === \"localhost\" || originAsURL.hostname.includes(\"localhost.\")) || originAsURL.hostname.endsWith(\".localhost\")) {\n return true;\n }\n return false;\n }\n __name(isOriginPotentiallyTrustworthy, \"isOriginPotentiallyTrustworthy\");\n }\n __name(isURLPotentiallyTrustworthy, \"isURLPotentiallyTrustworthy\");\n function bytesMatch(bytes, metadataList) {\n if (crypto === void 0) {\n return true;\n }\n const parsedMetadata = parseMetadata(metadataList);\n if (parsedMetadata === \"no metadata\") {\n return true;\n }\n if (parsedMetadata.length === 0) {\n return true;\n }\n const list = parsedMetadata.sort((c, d) => d.algo.localeCompare(c.algo));\n const strongest = list[0].algo;\n const metadata = list.filter((item) => item.algo === strongest);\n for (const item of metadata) {\n const algorithm = item.algo;\n const expectedValue = item.hash;\n const actualValue = crypto.createHash(algorithm).update(bytes).digest(\"base64\");\n if (actualValue === expectedValue) {\n return true;\n }\n }\n return false;\n }\n __name(bytesMatch, \"bytesMatch\");\n var parseHashWithOptions = /((?<algo>sha256|sha384|sha512)-(?<hash>[A-z0-9+/]{1}.*={0,2}))( +[\\x21-\\x7e]?)?/i;\n function parseMetadata(metadata) {\n const result = [];\n let empty = true;\n const supportedHashes = crypto.getHashes();\n for (const token of metadata.split(\" \")) {\n empty = false;\n const parsedToken = parseHashWithOptions.exec(token);\n if (parsedToken === null || parsedToken.groups === void 0) {\n continue;\n }\n const algorithm = parsedToken.groups.algo;\n if (supportedHashes.includes(algorithm.toLowerCase())) {\n result.push(parsedToken.groups);\n }\n }\n if (empty === true) {\n return \"no metadata\";\n }\n return result;\n }\n __name(parseMetadata, \"parseMetadata\");\n function tryUpgradeRequestToAPotentiallyTrustworthyURL(request) {\n }\n __name(tryUpgradeRequestToAPotentiallyTrustworthyURL, \"tryUpgradeRequestToAPotentiallyTrustworthyURL\");\n function sameOrigin(A, B) {\n if (A.origin === B.origin && A.origin === \"null\") {\n return true;\n }\n if (A.protocol === B.protocol && A.hostname === B.hostname && A.port === B.port) {\n return true;\n }\n return false;\n }\n __name(sameOrigin, \"sameOrigin\");\n function createDeferredPromise() {\n let res;\n let rej;\n const promise = new Promise((resolve, reject) => {\n res = resolve;\n rej = reject;\n });\n return { promise, resolve: res, reject: rej };\n }\n __name(createDeferredPromise, \"createDeferredPromise\");\n function isAborted(fetchParams) {\n return fetchParams.controller.state === \"aborted\";\n }\n __name(isAborted, \"isAborted\");\n function isCancelled(fetchParams) {\n return fetchParams.controller.state === \"aborted\" || fetchParams.controller.state === \"terminated\";\n }\n __name(isCancelled, \"isCancelled\");\n