{"version":3,"file":"testMode-IeD__Z59.mjs","names":["fs","DATA_DESCRIPTOR","defineData","DATA_DESCRIPTOR","isContainer","defineData","resolve","toError","contained","isObject","parse","parse"],"sources":["../../../../../node_modules/.pnpm/@earendil-works+chord@1.3.0/node_modules/@earendil-works/chord/dist/context/index.js","../../../../core/po-core/dist/src/services/nodeHost/index.mjs","../../../../core/po-core/dist/src/services/serialRunner/index.mjs","../../../../../node_modules/.pnpm/@earendil-works+chord@1.3.0/node_modules/@earendil-works/chord/dist/json.js","../../../../../node_modules/.pnpm/@earendil-works+chord@1.3.0/node_modules/@earendil-works/chord/dist/delta/apply-immutable-trusted.js","../../../../../node_modules/.pnpm/@earendil-works+chord@1.3.0/node_modules/@earendil-works/chord/dist/delta/tracker.js","../../../../../node_modules/.pnpm/@earendil-works+chord@1.3.0/node_modules/@earendil-works/chord/dist/delta/index.js","../../../../../node_modules/.pnpm/@earendil-works+chord@1.3.0/node_modules/@earendil-works/chord/dist/state.js","../../../../../node_modules/.pnpm/@earendil-works+pi-durable@1.3.0_@aws-sdk+credential-provider-node@3.972.86_@modelconte_ead33b53ae4efd7ac6c054138533add9/node_modules/@earendil-works/pi-durable/dist/ids.js","../../../../../node_modules/.pnpm/@earendil-works+pi-durable@1.3.0_@aws-sdk+credential-provider-node@3.972.86_@modelconte_ead33b53ae4efd7ac6c054138533add9/node_modules/@earendil-works/pi-durable/dist/documents.js","../../../../../node_modules/.pnpm/@earendil-works+pi-durable@1.3.0_@aws-sdk+credential-provider-node@3.972.86_@modelconte_ead33b53ae4efd7ac6c054138533add9/node_modules/@earendil-works/pi-durable/dist/errors.js","../../../../../node_modules/.pnpm/@earendil-works+pi-durable@1.3.0_@aws-sdk+credential-provider-node@3.972.86_@modelconte_ead33b53ae4efd7ac6c054138533add9/node_modules/@earendil-works/pi-durable/dist/session/observation.js","../../../../../node_modules/.pnpm/@earendil-works+pi-durable@1.3.0_@aws-sdk+credential-provider-node@3.972.86_@modelconte_ead33b53ae4efd7ac6c054138533add9/node_modules/@earendil-works/pi-durable/dist/session/forks.js","../../../../../node_modules/.pnpm/@earendil-works+pi-durable@1.3.0_@aws-sdk+credential-provider-node@3.972.86_@modelconte_ead33b53ae4efd7ac6c054138533add9/node_modules/@earendil-works/pi-durable/dist/session/transaction.js","../../../../../node_modules/.pnpm/@earendil-works+pi-durable@1.3.0_@aws-sdk+credential-provider-node@3.972.86_@modelconte_ead33b53ae4efd7ac6c054138533add9/node_modules/@earendil-works/pi-durable/dist/session/session.js","../../../../core/po-core/dist/src/services/durableSession/docs.mjs","../../../../core/po-core/dist/src/services/durableSession/index.mjs","../../../../core/po-core/dist/src/services/json/core.mjs","../../../../core/po-core/dist/src/services/json/sync.mjs","../../../../core/po-core/dist/src/services/poPackage/core.mjs","../../../../core/po-core/dist/src/services/piSettings/core.mjs","../../../../core/po-core/dist/src/services/sessionFiles/sessionDirectory.mjs","../../../../core/po-core/dist/src/services/sessionFiles/index.mjs","../../../../../node_modules/.pnpm/@deepseek-ai+cosmokit@1.8.6/node_modules/@deepseek-ai/cosmokit/lib/index.js","../../../../../node_modules/.pnpm/@deepseek-ai+cordis@4.0.5/node_modules/@deepseek-ai/cordis/lib/index.js","../../../../../node_modules/.pnpm/yaml@2.9.1/node_modules/yaml/dist/nodes/identity.js","../../../../../node_modules/.pnpm/yaml@2.9.1/node_modules/yaml/dist/visit.js","../../../../../node_modules/.pnpm/yaml@2.9.1/node_modules/yaml/dist/doc/directives.js","../../../../../node_modules/.pnpm/yaml@2.9.1/node_modules/yaml/dist/doc/anchors.js","../../../../../node_modules/.pnpm/yaml@2.9.1/node_modules/yaml/dist/doc/applyReviver.js","../../../../../node_modules/.pnpm/yaml@2.9.1/node_modules/yaml/dist/nodes/toJS.js","../../../../../node_modules/.pnpm/yaml@2.9.1/node_modules/yaml/dist/nodes/Node.js","../../../../../node_modules/.pnpm/yaml@2.9.1/node_modules/yaml/dist/nodes/Alias.js","../../../../../node_modules/.pnpm/yaml@2.9.1/node_modules/yaml/dist/nodes/Scalar.js","../../../../../node_modules/.pnpm/yaml@2.9.1/node_modules/yaml/dist/doc/createNode.js","../../../../../node_modules/.pnpm/yaml@2.9.1/node_modules/yaml/dist/nodes/Collection.js","../../../../../node_modules/.pnpm/yaml@2.9.1/node_modules/yaml/dist/stringify/stringifyComment.js","../../../../../node_modules/.pnpm/yaml@2.9.1/node_modules/yaml/dist/stringify/foldFlowLines.js","../../../../../node_modules/.pnpm/yaml@2.9.1/node_modules/yaml/dist/stringify/stringifyString.js","../../../../../node_modules/.pnpm/yaml@2.9.1/node_modules/yaml/dist/stringify/stringify.js","../../../../../node_modules/.pnpm/yaml@2.9.1/node_modules/yaml/dist/stringify/stringifyPair.js","../../../../../node_modules/.pnpm/yaml@2.9.1/node_modules/yaml/dist/log.js","../../../../../node_modules/.pnpm/yaml@2.9.1/node_modules/yaml/dist/schema/yaml-1.1/merge.js","../../../../../node_modules/.pnpm/yaml@2.9.1/node_modules/yaml/dist/nodes/addPairToJSMap.js","../../../../../node_modules/.pnpm/yaml@2.9.1/node_modules/yaml/dist/nodes/Pair.js","../../../../../node_modules/.pnpm/yaml@2.9.1/node_modules/yaml/dist/stringify/stringifyCollection.js","../../../../../node_modules/.pnpm/yaml@2.9.1/node_modules/yaml/dist/nodes/YAMLMap.js","../../../../../node_modules/.pnpm/yaml@2.9.1/node_modules/yaml/dist/schema/common/map.js","../../../../../node_modules/.pnpm/yaml@2.9.1/node_modules/yaml/dist/nodes/YAMLSeq.js","../../../../../node_modules/.pnpm/yaml@2.9.1/node_modules/yaml/dist/schema/common/seq.js","../../../../../node_modules/.pnpm/yaml@2.9.1/node_modules/yaml/dist/schema/common/string.js","../../../../../node_modules/.pnpm/yaml@2.9.1/node_modules/yaml/dist/schema/common/null.js","../../../../../node_modules/.pnpm/yaml@2.9.1/node_modules/yaml/dist/schema/core/bool.js","../../../../../node_modules/.pnpm/yaml@2.9.1/node_modules/yaml/dist/stringify/stringifyNumber.js","../../../../../node_modules/.pnpm/yaml@2.9.1/node_modules/yaml/dist/schema/core/float.js","../../../../../node_modules/.pnpm/yaml@2.9.1/node_modules/yaml/dist/schema/core/int.js","../../../../../node_modules/.pnpm/yaml@2.9.1/node_modules/yaml/dist/schema/core/schema.js","../../../../../node_modules/.pnpm/yaml@2.9.1/node_modules/yaml/dist/schema/json/schema.js","../../../../../node_modules/.pnpm/yaml@2.9.1/node_modules/yaml/dist/schema/yaml-1.1/binary.js","../../../../../node_modules/.pnpm/yaml@2.9.1/node_modules/yaml/dist/schema/yaml-1.1/pairs.js","../../../../../node_modules/.pnpm/yaml@2.9.1/node_modules/yaml/dist/schema/yaml-1.1/omap.js","../../../../../node_modules/.pnpm/yaml@2.9.1/node_modules/yaml/dist/schema/yaml-1.1/bool.js","../../../../../node_modules/.pnpm/yaml@2.9.1/node_modules/yaml/dist/schema/yaml-1.1/float.js","../../../../../node_modules/.pnpm/yaml@2.9.1/node_modules/yaml/dist/schema/yaml-1.1/int.js","../../../../../node_modules/.pnpm/yaml@2.9.1/node_modules/yaml/dist/schema/yaml-1.1/set.js","../../../../../node_modules/.pnpm/yaml@2.9.1/node_modules/yaml/dist/schema/yaml-1.1/timestamp.js","../../../../../node_modules/.pnpm/yaml@2.9.1/node_modules/yaml/dist/schema/yaml-1.1/schema.js","../../../../../node_modules/.pnpm/yaml@2.9.1/node_modules/yaml/dist/schema/tags.js","../../../../../node_modules/.pnpm/yaml@2.9.1/node_modules/yaml/dist/schema/Schema.js","../../../../../node_modules/.pnpm/yaml@2.9.1/node_modules/yaml/dist/stringify/stringifyDocument.js","../../../../../node_modules/.pnpm/yaml@2.9.1/node_modules/yaml/dist/doc/Document.js","../../../../../node_modules/.pnpm/yaml@2.9.1/node_modules/yaml/dist/errors.js","../../../../../node_modules/.pnpm/yaml@2.9.1/node_modules/yaml/dist/compose/resolve-props.js","../../../../../node_modules/.pnpm/yaml@2.9.1/node_modules/yaml/dist/compose/util-contains-newline.js","../../../../../node_modules/.pnpm/yaml@2.9.1/node_modules/yaml/dist/compose/util-flow-indent-check.js","../../../../../node_modules/.pnpm/yaml@2.9.1/node_modules/yaml/dist/compose/util-map-includes.js","../../../../../node_modules/.pnpm/yaml@2.9.1/node_modules/yaml/dist/compose/resolve-block-map.js","../../../../../node_modules/.pnpm/yaml@2.9.1/node_modules/yaml/dist/compose/resolve-block-seq.js","../../../../../node_modules/.pnpm/yaml@2.9.1/node_modules/yaml/dist/compose/resolve-end.js","../../../../../node_modules/.pnpm/yaml@2.9.1/node_modules/yaml/dist/compose/resolve-flow-collection.js","../../../../../node_modules/.pnpm/yaml@2.9.1/node_modules/yaml/dist/compose/compose-collection.js","../../../../../node_modules/.pnpm/yaml@2.9.1/node_modules/yaml/dist/compose/resolve-block-scalar.js","../../../../../node_modules/.pnpm/yaml@2.9.1/node_modules/yaml/dist/compose/resolve-flow-scalar.js","../../../../../node_modules/.pnpm/yaml@2.9.1/node_modules/yaml/dist/compose/compose-scalar.js","../../../../../node_modules/.pnpm/yaml@2.9.1/node_modules/yaml/dist/compose/util-empty-scalar-position.js","../../../../../node_modules/.pnpm/yaml@2.9.1/node_modules/yaml/dist/compose/compose-node.js","../../../../../node_modules/.pnpm/yaml@2.9.1/node_modules/yaml/dist/compose/compose-doc.js","../../../../../node_modules/.pnpm/yaml@2.9.1/node_modules/yaml/dist/compose/composer.js","../../../../../node_modules/.pnpm/yaml@2.9.1/node_modules/yaml/dist/parse/cst-scalar.js","../../../../../node_modules/.pnpm/yaml@2.9.1/node_modules/yaml/dist/parse/cst-stringify.js","../../../../../node_modules/.pnpm/yaml@2.9.1/node_modules/yaml/dist/parse/cst-visit.js","../../../../../node_modules/.pnpm/yaml@2.9.1/node_modules/yaml/dist/parse/cst.js","../../../../../node_modules/.pnpm/yaml@2.9.1/node_modules/yaml/dist/parse/lexer.js","../../../../../node_modules/.pnpm/yaml@2.9.1/node_modules/yaml/dist/parse/line-counter.js","../../../../../node_modules/.pnpm/yaml@2.9.1/node_modules/yaml/dist/parse/parser.js","../../../../../node_modules/.pnpm/yaml@2.9.1/node_modules/yaml/dist/public-api.js","../../../../../node_modules/.pnpm/yaml@2.9.1/node_modules/yaml/dist/index.js","../../../../foundations/po-config/dist/configPolicy-BIQmQv2-.mjs","../../../../core/po-core/dist/src/services/piSettings/sync.mjs","../../../../foundations/po-config/dist/core-Cd_sGFB4.mjs","../../../../core/po-core/dist/src/services/testMode/index.mjs"],"sourcesContent":["const ABORT_SIGNAL_CONTEXT_KEY = Object.freeze({\n    token: Symbol(\"chord.abortSignal\"),\n});\nclass BaseContext {\n    get abortSignal() {\n        return this.value(ABORT_SIGNAL_CONTEXT_KEY);\n    }\n}\nclass EmptyContext extends BaseContext {\n    #name;\n    constructor(name) {\n        super();\n        this.#name = name;\n    }\n    value(_key) {\n        return undefined;\n    }\n    toString() {\n        return this.#name;\n    }\n}\nclass ContextValue extends BaseContext {\n    #parent;\n    #key;\n    #value;\n    constructor(parent, key, value) {\n        super();\n        this.#parent = parent;\n        this.#key = key;\n        this.#value = value;\n    }\n    value(key) {\n        if (key.token === this.#key.token)\n            return this.#value;\n        return this.#parent.value(key);\n    }\n    toString() {\n        return `${this.#parent}.WithValue(${this.#key.token.description ?? \"anonymous\"})`;\n    }\n}\nexport const BACKGROUND_CONTEXT = new EmptyContext(\"[Context BACKGROUND_CONTEXT]\");\nexport const TODO_CONTEXT = new EmptyContext(\"[Context TODO_CONTEXT]\");\nexport function createContextKey(description) {\n    return Object.freeze({ token: Symbol(description) });\n}\n/** Derive a context containing one additional or replaced value. */\nexport function withContextValue(key, value, parent) {\n    return new ContextValue(parent, key, value);\n}\n/**\n * Derive a context cancelled by either the parent signal or the supplied signal.\n * The parent context remains unchanged.\n */\nexport function withAbortSignal(signal, context) {\n    const parentSignal = context.abortSignal;\n    const combined = parentSignal === undefined ? signal : AbortSignal.any([parentSignal, signal]);\n    return withContextValue(ABORT_SIGNAL_CONTEXT_KEY, combined, context);\n}\n/** Derive a context retaining all values except caller cancellation. Intended for mandatory cleanup only. */\nexport function withoutAbortSignal(context) {\n    return withContextValue(ABORT_SIGNAL_CONTEXT_KEY, undefined, context);\n}\n/** Derive an independently cancellable child context. */\nexport function withCancel(context) {\n    const controller = new AbortController();\n    return {\n        context: withAbortSignal(controller.signal, context),\n        cancel: (reason) => controller.abort(reason),\n    };\n}\n/**\n * Observe a promise until it settles or the invocation is cancelled.\n * Cancellation rejects only this waiter; it does not cancel the underlying promise.\n */\nexport function awaitWithContext(promise, context) {\n    const signal = context.abortSignal;\n    if (signal === undefined)\n        return promise;\n    if (signal.aborted)\n        return Promise.reject(abortError(signal));\n    return new Promise((resolve, reject) => {\n        const onAbort = () => reject(abortError(signal));\n        signal.addEventListener(\"abort\", onAbort, { once: true });\n        void promise.then((value) => {\n            signal.removeEventListener(\"abort\", onAbort);\n            resolve(value);\n        }, (error) => {\n            signal.removeEventListener(\"abort\", onAbort);\n            reject(error);\n        });\n    });\n}\nfunction abortError(signal) {\n    const reason = signal.reason;\n    return reason instanceof Error ? reason : new DOMException(\"The operation was aborted\", \"AbortError\");\n}\n//# sourceMappingURL=index.js.map","import os from \"node:os\";\nimport fs from \"node:fs/promises\";\n//#region src/services/nodeHost/index.ts\n/**\n* Host details that only a Node process has. Portable modules reach them through\n* this seam; the edge build swaps in `index.edge.ts`.\n*/\nconst nodeHost = {\n\thomeDirectory: () => os.homedir(),\n\ttemporaryDirectory: () => os.tmpdir(),\n\tprocessId: () => process.pid,\n\t/** POSIX permission bits; the edge has no owner to protect against, so it skips this. */\n\tsetMode: (filePath, mode) => fs.chmod(filePath, mode),\n\t/** POSIX permission bits of an existing file, or `undefined` when it is missing. */\n\tfileMode: async (filePath) => {\n\t\ttry {\n\t\t\treturn (await fs.stat(filePath)).mode & 4095;\n\t\t} catch (error) {\n\t\t\tif (error.code === \"ENOENT\") return void 0;\n\t\t\tthrow error;\n\t\t}\n\t}\n};\n//#endregion\nexport { nodeHost };\n\n//# sourceMappingURL=index.mjs.map","//#region src/services/serialRunner/index.ts\n/** Runs operations one at a time in call order; a rejection reaches its caller and never stalls the queue. */\nfunction createSerialRunner() {\n\tlet tail = Promise.resolve();\n\tconst tails = /* @__PURE__ */ new Map();\n\tconst run = (operation) => {\n\t\tconst result = tail.then(operation);\n\t\ttail = result.catch(() => void 0);\n\t\treturn result;\n\t};\n\tconst forKey = (key) => (operation) => {\n\t\tconst result = (tails.get(key) ?? Promise.resolve()).then(operation);\n\t\tconst settled = result.catch(() => void 0);\n\t\ttails.set(key, settled);\n\t\tsettled.then(() => {\n\t\t\tif (tails.get(key) === settled) tails.delete(key);\n\t\t});\n\t\treturn result;\n\t};\n\treturn Object.assign(run, { forKey });\n}\n/** Cooperating API writers share this queue, keyed by the canonical target path. Not an OS file lock. */\nconst fileMutationRunner = createSerialRunner();\n//#endregion\nexport { createSerialRunner, fileMutationRunner };\n\n//# sourceMappingURL=index.mjs.map","const DATA_DESCRIPTOR = {\n    value: undefined,\n    writable: true,\n    enumerable: true,\n    configurable: true,\n};\n/** Copy a value into an alias-free strict-JSON tree owned by the caller. */\nexport function copyJson(value, options) {\n    return copy(value, undefined, options?.omitUndefinedProperties === true);\n}\nfunction copy(value, ancestors, omitUndefinedProperties) {\n    if (value === null || typeof value === \"string\" || typeof value === \"boolean\")\n        return value;\n    if (typeof value === \"number\") {\n        if (Number.isFinite(value))\n            return value;\n        throw new TypeError(\"Value contains a non-finite number and is not strict JSON\");\n    }\n    if (typeof value !== \"object\")\n        throw new TypeError(`Value contains a non-JSON ${typeof value}; expected strict JSON`);\n    const active = ancestors ?? new Set();\n    if (active.has(value))\n        throw new TypeError(\"Value contains cycles and is not strict JSON\");\n    active.add(value);\n    try {\n        if (Array.isArray(value)) {\n            // Indices plus `length` only: extra, symbol, and missing keys all change the count.\n            if (Object.getPrototypeOf(value) !== Array.prototype || Reflect.ownKeys(value).length !== value.length + 1) {\n                throw new TypeError(\"Value must contain strict JSON dense plain arrays\");\n            }\n            const result = new Array(value.length);\n            for (let index = 0; index < value.length; index++) {\n                const descriptor = Object.getOwnPropertyDescriptor(value, index);\n                if (descriptor === undefined || !descriptor.enumerable || !(\"value\" in descriptor)) {\n                    throw new TypeError(\"Value must contain strict JSON enumerable indexed data properties\");\n                }\n                defineData(result, String(index), copy(descriptor.value, active, omitUndefinedProperties));\n            }\n            return result;\n        }\n        const prototype = Object.getPrototypeOf(value);\n        if (prototype !== Object.prototype && prototype !== null) {\n            throw new TypeError(\"Value must contain strict JSON plain objects or arrays\");\n        }\n        const result = Object.create(prototype);\n        for (const key of Reflect.ownKeys(value)) {\n            if (typeof key === \"symbol\")\n                throw new TypeError(\"Value contains a symbol key and is not strict JSON\");\n            const descriptor = Object.getOwnPropertyDescriptor(value, key);\n            if (!descriptor.enumerable || !(\"value\" in descriptor)) {\n                throw new TypeError(\"Value must contain strict JSON enumerable data properties\");\n            }\n            if (descriptor.value === undefined && omitUndefinedProperties)\n                continue;\n            defineData(result, key, copy(descriptor.value, active, omitUndefinedProperties));\n        }\n        return result;\n    }\n    finally {\n        active.delete(value);\n    }\n}\nfunction defineData(target, key, value) {\n    DATA_DESCRIPTOR.value = value;\n    Object.defineProperty(target, key, DATA_DESCRIPTOR);\n    DATA_DESCRIPTOR.value = undefined;\n}\n/** Return whether a value is finite strict JSON with plain objects and no cycles. */\nexport function isJsonValue(value) {\n    return check(value, new Set());\n}\nfunction check(value, ancestors) {\n    if (value === null || typeof value === \"string\" || typeof value === \"boolean\")\n        return true;\n    if (typeof value === \"number\")\n        return Number.isFinite(value);\n    if (Array.isArray(value)) {\n        if (Object.getPrototypeOf(value) !== Array.prototype)\n            return false;\n        const keys = Reflect.ownKeys(value);\n        if (keys.length !== value.length + 1 || keys.some((key) => typeof key !== \"string\"))\n            return false;\n        if (ancestors.has(value))\n            return false;\n        ancestors.add(value);\n        try {\n            for (let index = 0; index < value.length; index++) {\n                const descriptor = Object.getOwnPropertyDescriptor(value, String(index));\n                if (descriptor === undefined ||\n                    !descriptor.enumerable ||\n                    !(\"value\" in descriptor) ||\n                    !check(descriptor.value, ancestors)) {\n                    return false;\n                }\n            }\n            return true;\n        }\n        finally {\n            ancestors.delete(value);\n        }\n    }\n    if (typeof value !== \"object\" || value === null)\n        return false;\n    const prototype = Object.getPrototypeOf(value);\n    if (prototype !== Object.prototype && prototype !== null)\n        return false;\n    if (Reflect.ownKeys(value).some((key) => typeof key !== \"string\"))\n        return false;\n    if (ancestors.has(value))\n        return false;\n    ancestors.add(value);\n    try {\n        for (const descriptor of Object.values(Object.getOwnPropertyDescriptors(value))) {\n            if (!descriptor.enumerable || !(\"value\" in descriptor) || !check(descriptor.value, ancestors)) {\n                return false;\n            }\n        }\n        return true;\n    }\n    finally {\n        ancestors.delete(value);\n    }\n}\n//# sourceMappingURL=json.js.map","const DATA_DESCRIPTOR = {\n    value: undefined,\n    writable: true,\n    enumerable: true,\n    configurable: true,\n};\n/** Apply self-produced trusted operations while copying each touched container once. */\nexport function applyImmutableTrusted(target, operations) {\n    let root = target;\n    const owned = new WeakSet();\n    for (const operation of operations) {\n        if (operation[0] === \"r\") {\n            root = operation[1];\n            continue;\n        }\n        if (operation[0] === \"p\" || operation[0] === \"m\") {\n            const copied = copyPath(root, operation[1], operation[1].length, owned);\n            root = copied.root;\n            if (!Array.isArray(copied.target))\n                throw new TypeError(\"Trusted array operation target is not an array\");\n            if (operation[0] === \"p\")\n                spliceTrusted(copied.target, operation[2], operation[3], operation[4]);\n            else\n                permuteTrusted(copied.target, operation[2]);\n            continue;\n        }\n        const path = operation[1];\n        const copied = copyPath(root, path, path.length - 1, owned);\n        root = copied.root;\n        const key = path[path.length - 1];\n        switch (operation[0]) {\n            case \"s\":\n                defineData(copied.target, key, operation[2]);\n                break;\n            case \"d\":\n                if (Array.isArray(copied.target)) {\n                    if (typeof key !== \"number\")\n                        throw new TypeError(\"Trusted array deletion key is not numeric\");\n                    spliceTrusted(copied.target, key, 1, []);\n                }\n                else\n                    Reflect.deleteProperty(copied.target, key);\n                break;\n            case \"a\": {\n                const current = read(copied.target, key);\n                if (typeof current !== \"string\")\n                    throw new TypeError(\"Trusted append target is not a string\");\n                defineData(copied.target, key, `${current}${operation[2]}`);\n                break;\n            }\n            case \"t\": {\n                const current = read(copied.target, key);\n                if (typeof current !== \"string\")\n                    throw new TypeError(\"Trusted truncate target is not a string\");\n                defineData(copied.target, key, current.slice(operation[2]));\n                break;\n            }\n        }\n    }\n    return root;\n}\nfunction copyPath(root, path, length, owned) {\n    if (!isContainer(root))\n        throw new TypeError(\"Trusted operation root is not a container\");\n    let copiedRoot = root;\n    if (!owned.has(root)) {\n        copiedRoot = shallowCopy(root);\n        owned.add(copiedRoot);\n    }\n    let destination = copiedRoot;\n    for (let index = 0; index < length; index++) {\n        const segment = path[index];\n        const child = read(destination, segment);\n        if (!isContainer(child))\n            throw new TypeError(\"Trusted operation path is not a container\");\n        if (owned.has(child)) {\n            destination = child;\n            continue;\n        }\n        const copy = shallowCopy(child);\n        defineData(destination, segment, copy);\n        owned.add(copy);\n        destination = copy;\n    }\n    return { root: copiedRoot, target: destination };\n}\nfunction shallowCopy(value) {\n    if (Array.isArray(value))\n        return Array.from(value);\n    const result = Object.create(Object.getPrototypeOf(value) === null ? null : Object.prototype);\n    for (const key of Object.keys(value))\n        defineData(result, key, value[key]);\n    return result;\n}\nfunction read(target, key) {\n    return target[key];\n}\nfunction defineData(target, key, value) {\n    DATA_DESCRIPTOR.value = value;\n    Object.defineProperty(target, key, DATA_DESCRIPTOR);\n    DATA_DESCRIPTOR.value = undefined;\n}\nfunction spliceTrusted(target, start, remove, items) {\n    const oldLength = target.length;\n    const delta = items.length - remove;\n    if (delta > 0) {\n        target.length = oldLength + delta;\n        target.copyWithin(start + items.length, start + remove, oldLength);\n    }\n    else if (delta < 0) {\n        target.copyWithin(start + items.length, start + remove, oldLength);\n        target.length = oldLength + delta;\n    }\n    for (let index = 0; index < items.length; index++)\n        defineData(target, start + index, items[index]);\n}\nfunction permuteTrusted(target, permutation) {\n    if (target.length !== permutation.length)\n        throw new TypeError(\"Trusted permutation length mismatch\");\n    const previous = target.slice();\n    for (let index = 0; index < permutation.length; index++)\n        target[index] = previous[permutation[index]];\n}\nfunction isContainer(value) {\n    return value !== null && typeof value === \"object\";\n}\n//# sourceMappingURL=apply-immutable-trusted.js.map","import { copyJson } from \"../json.js\";\nimport { applyImmutableTrusted } from \"./apply-immutable-trusted.js\";\nimport { applyImmutable, overlap, RESERVED_SEGMENTS } from \"./index.js\";\nconst NODE = Symbol(\"chord.delta.overlay.node\");\nconst PREPARED = new WeakMap();\nconst RELEASED = {};\nconst ARRAY_MUTATORS = new Set([\n    \"push\",\n    \"pop\",\n    \"shift\",\n    \"unshift\",\n    \"splice\",\n    \"reverse\",\n    \"sort\",\n    \"fill\",\n    \"copyWithin\",\n]);\nconst MAX_DELTA_OPERATIONS = 4_096;\nconst MAX_SIMPLE_OBJECT_NODES = 128;\nconst DATA_DESCRIPTOR = {\n    value: undefined,\n    writable: true,\n    enumerable: true,\n    configurable: true,\n};\nclass PreparedImpl {\n    #context;\n    value;\n    base;\n    ops;\n    constructor(context, value, operations) {\n        this.#context = context;\n        this.value = value;\n        this.base = context.baseValue;\n        this.ops = operations;\n        PREPARED.set(this, context);\n    }\n    get baseRevision() {\n        return this.#context.baseRevision;\n    }\n    abort() {\n        abortContext(this.#context);\n    }\n}\nclass ChangeImpl {\n    #context;\n    #preparedStatus;\n    #settled = false;\n    constructor(context) {\n        this.#context = context;\n    }\n    get state() {\n        const state = this.#context?.root?.proxy;\n        if (state === undefined)\n            throw new TypeError(\"Cannot use a settled overlay\");\n        return state;\n    }\n    prepare() {\n        if (this.#settled)\n            throw new Error(\"Change has already been settled\");\n        const context = this.#context;\n        assertWritable(context);\n        context.status.value = \"prepared\";\n        try {\n            if (!context.replacement)\n                context.ops = context.dirty.length === 0 ? [] : emitOperations(context);\n            const prepared = materializePrepared(context);\n            this.#preparedStatus = context.status;\n            this.#settled = true;\n            return prepared;\n        }\n        catch (error) {\n            context.status.value = \"aborted\";\n            clearContext(context);\n            this.#settled = true;\n            throw error;\n        }\n        finally {\n            this.#context = undefined;\n        }\n    }\n    abort() {\n        if (this.#settled) {\n            if (this.#preparedStatus?.value === \"prepared\")\n                this.#preparedStatus.value = \"aborted\";\n            this.#preparedStatus = undefined;\n            return;\n        }\n        this.#settled = true;\n        abortContext(this.#context);\n        this.#context = undefined;\n    }\n}\nclass TrackerImpl {\n    #owner = {};\n    #contexts = new Set();\n    #selfRef;\n    #value;\n    #revision = 0;\n    #pruneBudget = 256;\n    constructor(initial) {\n        this.#value = initial;\n        this.#selfRef = new WeakRef(this);\n    }\n    get value() {\n        return this.#value;\n    }\n    get revision() {\n        return this.#revision;\n    }\n    beginChange() {\n        const context = createContext(this.#selfRef, this.#owner, this.#revision, this.#value, false, this.#value);\n        this.#register(context);\n        return new ChangeImpl(context);\n    }\n    prepareReplace(value) {\n        const context = createContext(this.#selfRef, this.#owner, this.#revision, value, true, this.#value);\n        context.status.value = \"prepared\";\n        this.#register(context);\n        try {\n            return materializePrepared(context);\n        }\n        catch (error) {\n            context.status.value = \"aborted\";\n            clearContext(context);\n            throw error;\n        }\n    }\n    adopt(prepared) {\n        const context = PREPARED.get(prepared);\n        if (context?.owner !== this.#owner)\n            throw new Error(\"Prepared change belongs to a different tracker\");\n        if (context.status.value === \"consumed\")\n            throw new Error(\"Prepared change has already been used\");\n        if (context.status.value === \"aborted\")\n            throw new Error(\"Prepared change has been aborted\");\n        if (context.status.value === \"stale\")\n            throw new Error(\"Prepared change is stale\");\n        if (context.status.value !== \"prepared\")\n            throw new Error(\"Prepared change is not ready\");\n        if (context.baseRevision !== this.#revision) {\n            context.status.value = \"stale\";\n            clearContext(context);\n            throw new Error(\"Prepared change is stale\");\n        }\n        if (this.#value !== prepared.base) {\n            context.status.value = \"stale\";\n            throw new Error(\"Prepared change is stale\");\n        }\n        // Materialization happened during prepare. Adoption is an infallible pointer\n        // swap so storage failure can discard the candidate without touching authority.\n        this.#value = prepared.value;\n        context.status.value = \"consumed\";\n        this.#revision += 1;\n        this.#invalidate(context);\n    }\n    releaseContext(context) {\n        if (context.registryRef !== undefined)\n            this.#contexts.delete(context.registryRef);\n        context.registryRef = undefined;\n    }\n    #register(context) {\n        const reference = new WeakRef(context);\n        context.registryRef = reference;\n        this.#contexts.add(reference);\n        this.#pruneBudget -= 1;\n        if (this.#pruneBudget === 0) {\n            this.#prune();\n            this.#pruneBudget = Math.max(256, this.#contexts.size);\n        }\n    }\n    #prune() {\n        for (const reference of this.#contexts) {\n            if (reference.deref() === undefined)\n                this.#contexts.delete(reference);\n        }\n    }\n    #invalidate(winner) {\n        for (const reference of this.#contexts) {\n            const context = reference.deref();\n            if (context === undefined || context === winner)\n                continue;\n            if (context.status.value === \"open\" || context.status.value === \"prepared\")\n                context.status.value = \"stale\";\n            // Adoption must not walk every node touched by a competing draft. Drop the\n            // context's strong overlay references in O(1); externally retained proxies\n            // still see the stale status and are reclaimed with their holders.\n            releaseOverlayReferences(context);\n        }\n        this.#contexts.clear();\n        this.#pruneBudget = 256;\n    }\n    replacementBase(context) {\n        return context.baseRevision === this.#revision ? this.#value : undefined;\n    }\n}\n/** Take immutable ownership of an alias-free strict-JSON root in O(1). */\nexport function track(initial) {\n    return new TrackerImpl(initial);\n}\nfunction materializePrepared(context) {\n    const operations = ensureOperations(context);\n    const base = context.baseValue;\n    // Operation payloads are already detached from the mutable overlay. The\n    // resulting revision and public batch intentionally share those payloads under\n    // the trusted immutable-transfer contract.\n    const value = operations.length === 0\n        ? base\n        : context.simpleObjectMaterialization\n            ? cloneNode(context.root)\n            : materializeOperations(base, operations);\n    const prepared = new PreparedImpl(context, value, operations);\n    if (context.nodes.length > 4_096)\n        releaseOverlayReferences(context);\n    else\n        clearContext(context);\n    return prepared;\n}\nfunction materializeOperations(base, operations) {\n    for (const operation of operations) {\n        // Native splice/permutation remains faster for large structural batches.\n        if (operation[0] === \"p\" || operation[0] === \"m\")\n            return applyImmutable(base, operations);\n    }\n    return applyImmutableTrusted(base, operations);\n}\nfunction createContext(tracker, owner, baseRevision, root, replacement, base) {\n    const context = {\n        owner,\n        tracker,\n        baseRevision,\n        status: { value: \"open\" },\n        root: undefined,\n        bases: [],\n        stored: [],\n        dirty: [],\n        nodes: [],\n        rawNodes: new WeakMap(),\n        ops: undefined,\n        replacement,\n        replacementNoop: false,\n        baseValue: base,\n        overlayReleased: false,\n        simpleObjectMaterialization: false,\n        registryRef: undefined,\n    };\n    context.root = createNode(context, root, undefined);\n    return context;\n}\nconst sharedObjectHandler = {\n    deleteProperty(target, property) {\n        return deleteProperty(nodeForTarget(target), property);\n    },\n    defineProperty(target) {\n        assertWritable(nodeForTarget(target).context);\n        throw new TypeError(\"Defining overlay properties is not supported\");\n    },\n    get(target, property) {\n        if (property === \"then\") {\n            const node = target[NODE];\n            if (node === undefined || isSettledContext(node.context))\n                return undefined;\n        }\n        const node = nodeForTarget(target);\n        if (property === NODE)\n            return node;\n        return getProperty(node, property);\n    },\n    getOwnPropertyDescriptor(target, property) {\n        return getDescriptor(nodeForTarget(target), property);\n    },\n    getPrototypeOf(target) {\n        const node = nodeForTarget(target);\n        assertReadable(node.context);\n        return Object.getPrototypeOf(nodeBase(node));\n    },\n    has(target, property) {\n        return hasProperty(nodeForTarget(target), property);\n    },\n    isExtensible(target) {\n        assertReadable(nodeForTarget(target).context);\n        return true;\n    },\n    ownKeys(target) {\n        return ownKeys(nodeForTarget(target));\n    },\n    preventExtensions(target) {\n        assertWritable(nodeForTarget(target).context);\n        throw new TypeError(\"Overlays cannot be made non-extensible\");\n    },\n    set(target, property, value) {\n        return setProperty(nodeForTarget(target), property, value);\n    },\n    setPrototypeOf(target) {\n        assertWritable(nodeForTarget(target).context);\n        throw new TypeError(\"Changing an overlay prototype is not supported\");\n    },\n};\nconst sharedArrayHandler = sharedObjectHandler;\nfunction createNode(context, base, parent, parentKind = 0, parentKey = \"\", parentSource = undefined, parentPlacement = false) {\n    const existing = context.rawNodes.get(base);\n    if (existing !== undefined)\n        return existing;\n    const target = Array.isArray(base) ? [] : {};\n    const baseIndex = context.bases.length;\n    const parentIndex = parent?.baseIndex ?? -1;\n    context.bases.push(base);\n    const node = {\n        context,\n        baseIndex,\n        parentIndex,\n        parentKind,\n        parentKey,\n        parentPlacement,\n        target,\n        proxy: target,\n    };\n    if (parentSource !== undefined)\n        node.parentSource = parentSource;\n    target[NODE] = node;\n    node.proxy = new Proxy(target, Array.isArray(base) ? sharedArrayHandler : sharedObjectHandler);\n    context.rawNodes.set(base, node);\n    context.nodes.push(node);\n    return node;\n}\nfunction nodeBase(node) {\n    return node.context.bases[node.baseIndex];\n}\nfunction nodeParent(node) {\n    return node.parentIndex < 0 ? undefined : node.context.nodes[node.parentIndex];\n}\nfunction storeValue(context, value) {\n    if (!isContainer(value))\n        return value;\n    const index = context.stored.length;\n    context.stored.push(value);\n    return { index };\n}\nfunction storedValue(context, reference) {\n    return typeof reference === \"object\" && reference !== null ? context.stored[reference.index] : reference;\n}\nfunction replaceStoredValue(context, reference, value) {\n    if (isContainer(value)) {\n        if (typeof reference === \"object\" && reference !== null) {\n            context.stored[reference.index] = value;\n            return reference;\n        }\n        return storeValue(context, value);\n    }\n    if (typeof reference === \"object\" && reference !== null)\n        context.stored[reference.index] = RELEASED;\n    return value;\n}\nfunction releaseStoredValue(context, reference) {\n    if (typeof reference === \"object\" && reference !== null)\n        context.stored[reference.index] = RELEASED;\n}\nfunction nodeForTarget(target) {\n    const node = target[NODE];\n    if (node === undefined)\n        throw new TypeError(\"Cannot use a settled overlay\");\n    return node;\n}\nfunction isSettledContext(context) {\n    return (context.overlayReleased ||\n        context.status.value === \"consumed\" ||\n        context.status.value === \"aborted\" ||\n        context.status.value === \"stale\");\n}\nfunction assertReadable(context) {\n    if (isSettledContext(context))\n        throw new TypeError(\"Cannot use a settled overlay\");\n}\nfunction assertWritable(context) {\n    assertReadable(context);\n    if (context.status.value !== \"open\")\n        throw new TypeError(\"Prepared overlays are read-only\");\n}\nfunction getProperty(node, property) {\n    assertReadable(node.context);\n    if (Array.isArray(nodeBase(node))) {\n        const overlay = arrayOverlay(node);\n        if (property === \"length\")\n            return arrayLength(overlay);\n        if (ARRAY_MUTATORS.has(property))\n            return arrayMutators[property];\n        const index = arrayIndex(property);\n        if (index !== undefined)\n            return getArrayIndex(node, index);\n        return Reflect.get(Array.prototype, property, node.proxy);\n    }\n    if (typeof property === \"symbol\")\n        return Reflect.get(nodeBase(node), property, node.proxy);\n    const key = String(property);\n    if (!objectHas(node, key)) {\n        if (isObjectDeleted(node, key) || Object.hasOwn(nodeBase(node), key))\n            return undefined;\n        return Reflect.get(nodeBase(node), property, node.proxy);\n    }\n    const value = objectValue(node, key);\n    if (!isContainer(value))\n        return value;\n    return createNode(node.context, value, node, 0, key, undefined, hasObjectWrite(node, key)).proxy;\n}\nfunction getArrayIndex(node, index) {\n    const overlay = arrayOverlay(node);\n    if (index >= arrayLength(overlay))\n        return undefined;\n    const piece = locatePiece(overlay, index);\n    const sourceIndex = piece.start + piece.step * overlay.locatedOffset;\n    const value = entryValueAt(node, piece, sourceIndex);\n    if (!isContainer(value))\n        return value;\n    return createNode(node.context, value, node, piece.kind === \"base\" ? 1 : 2, sourceIndex, piece.kind === \"insert\" ? piece.source : undefined, piece.kind === \"insert\" || hasEntryOverrideAt(overlay, piece, sourceIndex)).proxy;\n}\nfunction setProperty(node, property, supplied) {\n    assertWritable(node.context);\n    if (typeof property === \"symbol\")\n        throw new TypeError(\"Symbol writes are not supported\");\n    if (Array.isArray(nodeBase(node))) {\n        if (property === \"length\") {\n            setArrayLength(node, toArrayLength(supplied));\n            return true;\n        }\n        const index = arrayIndex(property);\n        if (index === undefined)\n            throw new TypeError(\"Only array indices and length can be written\");\n        if (index > arrayLength(arrayOverlay(node)))\n            throw new TypeError(\"Overlay arrays cannot contain holes\");\n        setArrayIndex(node, index, clonePlacement(supplied));\n        return true;\n    }\n    const key = String(property);\n    if (supplied === undefined)\n        return deleteProperty(node, key);\n    const stored = clonePlacement(supplied);\n    const current = objectValue(node, key);\n    const wasDeleted = isObjectDeleted(node, key);\n    if (!wasDeleted && !isContainer(stored) && current === stored)\n        return true;\n    setObjectWrite(node, key, stored);\n    if (wasDeleted && Object.hasOwn(nodeBase(node), key)) {\n        if (node.readded === undefined)\n            node.readded = new Set();\n        node.readded.add(key);\n    }\n    deleteObjectDeletion(node, key);\n    markDirty(node);\n    return true;\n}\nfunction deleteProperty(node, property) {\n    assertWritable(node.context);\n    if (typeof property === \"symbol\")\n        throw new TypeError(\"Symbol writes are not supported\");\n    if (Array.isArray(nodeBase(node)))\n        throw new TypeError(\"Overlay arrays cannot contain holes\");\n    const key = String(property);\n    if (!objectHas(node, key))\n        return true;\n    deleteObjectWrite(node, key);\n    node.readded?.delete(key);\n    setObjectDeletion(node, key);\n    markDirty(node);\n    return true;\n}\nfunction hasProperty(node, property) {\n    assertReadable(node.context);\n    if (Array.isArray(nodeBase(node))) {\n        if (property === \"length\")\n            return true;\n        const index = arrayIndex(property);\n        if (index !== undefined)\n            return index < arrayLength(arrayOverlay(node));\n        return property in Array.prototype;\n    }\n    return typeof property === \"symbol\" ? property in nodeBase(node) : objectHas(node, String(property));\n}\nfunction ownKeys(node) {\n    assertReadable(node.context);\n    if (Array.isArray(nodeBase(node))) {\n        const length = arrayLength(arrayOverlay(node));\n        const keys = new Array(length + 1);\n        for (let index = 0; index < length; index++)\n            keys[index] = String(index);\n        keys[length] = \"length\";\n        return keys;\n    }\n    let existingKeysOnly = node.deleteKey === undefined &&\n        node.deletes === undefined &&\n        node.readded === undefined &&\n        (node.writeKey === undefined || Object.hasOwn(nodeBase(node), node.writeKey));\n    if (existingKeysOnly && node.writes !== undefined) {\n        for (const key of node.writes.keys()) {\n            if (!Object.hasOwn(nodeBase(node), key)) {\n                existingKeysOnly = false;\n                break;\n            }\n        }\n    }\n    if (existingKeysOnly)\n        return Object.keys(nodeBase(node));\n    const keys = Object.keys(nodeBase(node)).filter((key) => !isObjectDeleted(node, key) && !node.readded?.has(key));\n    const seen = new Set(keys);\n    if (node.writeKey !== undefined && !seen.has(node.writeKey)) {\n        keys.push(node.writeKey);\n        seen.add(node.writeKey);\n    }\n    if (node.writes !== undefined) {\n        for (const key of node.writes.keys()) {\n            if (seen.has(key))\n                continue;\n            keys.push(key);\n            seen.add(key);\n        }\n    }\n    const indices = [];\n    const strings = [];\n    for (const key of keys) {\n        const index = arrayIndex(key);\n        if (index === undefined)\n            strings.push(key);\n        else\n            indices.push(index);\n    }\n    indices.sort((left, right) => left - right);\n    return [...indices.map(String), ...strings];\n}\nfunction getDescriptor(node, property) {\n    assertReadable(node.context);\n    if (Array.isArray(nodeBase(node))) {\n        if (property === \"length\") {\n            const length = arrayLength(arrayOverlay(node));\n            node.target.length = length;\n            return Reflect.getOwnPropertyDescriptor(node.target, \"length\");\n        }\n        const index = arrayIndex(property);\n        if (index === undefined || index >= arrayLength(arrayOverlay(node)))\n            return undefined;\n    }\n    else {\n        if (typeof property === \"symbol\" || !objectHas(node, String(property)))\n            return undefined;\n    }\n    return {\n        configurable: true,\n        enumerable: true,\n        writable: node.context.status.value === \"open\",\n        value: getProperty(node, property),\n    };\n}\nfunction hasObjectWrite(node, key) {\n    return node.writeKey === key || (node.writes?.has(key) ?? false);\n}\nfunction setObjectWrite(node, key, value) {\n    if (node.writes !== undefined) {\n        const reference = node.writes.get(key);\n        node.writes.set(key, reference === undefined ? storeValue(node.context, value) : replaceStoredValue(node.context, reference, value));\n        return;\n    }\n    if (node.writeKey === undefined || node.writeKey === key) {\n        node.writeKey = key;\n        node.writeValue =\n            node.writeValue === undefined\n                ? storeValue(node.context, value)\n                : replaceStoredValue(node.context, node.writeValue, value);\n        return;\n    }\n    node.writes = new Map();\n    node.writes.set(node.writeKey, node.writeValue);\n    node.writes.set(key, storeValue(node.context, value));\n    node.writeKey = undefined;\n    node.writeValue = undefined;\n}\nfunction deleteObjectWrite(node, key) {\n    if (node.writeKey === key) {\n        node.writeKey = undefined;\n        releaseStoredValue(node.context, node.writeValue);\n        node.writeValue = undefined;\n    }\n    else {\n        const reference = node.writes?.get(key);\n        if (reference !== undefined)\n            releaseStoredValue(node.context, reference);\n        node.writes?.delete(key);\n    }\n}\nfunction isObjectDeleted(node, key) {\n    return node.deleteKey === key || (node.deletes?.has(key) ?? false);\n}\nfunction setObjectDeletion(node, key) {\n    if (node.deletes !== undefined) {\n        node.deletes.add(key);\n        return;\n    }\n    if (node.deleteKey === undefined || node.deleteKey === key) {\n        node.deleteKey = key;\n        return;\n    }\n    node.deletes = new Set();\n    node.deletes.add(node.deleteKey);\n    node.deletes.add(key);\n    node.deleteKey = undefined;\n}\nfunction deleteObjectDeletion(node, key) {\n    if (node.deleteKey === key)\n        node.deleteKey = undefined;\n    else\n        node.deletes?.delete(key);\n}\nfunction objectHas(node, key) {\n    if (isObjectDeleted(node, key))\n        return false;\n    return hasObjectWrite(node, key) || Object.hasOwn(nodeBase(node), key);\n}\nfunction objectValue(node, key) {\n    if (node.writeKey === key)\n        return storedValue(node.context, node.writeValue);\n    const reference = node.writes?.get(key);\n    if (reference !== undefined)\n        return storedValue(node.context, reference);\n    return nodeBase(node)[key];\n}\nfunction markDirty(node) {\n    if (node.dirty)\n        return;\n    node.dirty = true;\n    node.context.dirty.push(node);\n    for (let parent = nodeParent(node); parent !== undefined; parent = nodeParent(parent))\n        parent.subtreeDirty = true;\n}\nfunction arrayOverlay(node) {\n    if (node.array !== undefined)\n        return node.array;\n    const base = nodeBase(node);\n    const overlay = {\n        root: undefined,\n        pieces: undefined,\n        baseOverrides: undefined,\n        insertOverrides: undefined,\n        structural: false,\n        generation: 0,\n        plan: undefined,\n        seed: 0x9e3779b9,\n        locatedOffset: 0,\n        baseLocations: undefined,\n        insertLocations: undefined,\n    };\n    if (base.length > 0)\n        overlay.root = createPieceNode(overlay, { kind: \"base\", start: 0, length: base.length, step: 1 });\n    node.array = overlay;\n    return overlay;\n}\nfunction baseOverridesForWrite(overlay) {\n    if (overlay.baseOverrides === undefined)\n        overlay.baseOverrides = new Map();\n    return overlay.baseOverrides;\n}\nfunction insertOverridesForWrite(overlay) {\n    if (overlay.insertOverrides === undefined)\n        overlay.insertOverrides = new Map();\n    return overlay.insertOverrides;\n}\nfunction nextPiecePriority(overlay) {\n    let value = overlay.seed;\n    value ^= value << 13;\n    value ^= value >>> 17;\n    value ^= value << 5;\n    overlay.seed = value >>> 0;\n    return overlay.seed;\n}\nfunction treeElements(node) {\n    return node?.elements ?? 0;\n}\nfunction updatePieceNode(node) {\n    node.elements = treeElements(node.left) + node.piece.length + treeElements(node.right);\n}\nfunction createPieceNode(overlay, piece) {\n    return { piece, left: undefined, right: undefined, priority: nextPiecePriority(overlay), elements: piece.length };\n}\nfunction mergePieceTrees(left, right) {\n    if (left === undefined)\n        return right;\n    if (right === undefined)\n        return left;\n    if (left.priority >= right.priority) {\n        left.right = mergePieceTrees(left.right, right);\n        updatePieceNode(left);\n        return left;\n    }\n    right.left = mergePieceTrees(left, right.left);\n    updatePieceNode(right);\n    return right;\n}\nfunction splitPieceTree(overlay, root, index) {\n    if (root === undefined)\n        return [undefined, undefined];\n    const leftLength = treeElements(root.left);\n    if (index < leftLength) {\n        const [left, right] = splitPieceTree(overlay, root.left, index);\n        root.left = right;\n        updatePieceNode(root);\n        return [left, root];\n    }\n    const pieceEnd = leftLength + root.piece.length;\n    if (index > pieceEnd) {\n        const [left, right] = splitPieceTree(overlay, root.right, index - pieceEnd);\n        root.right = left;\n        updatePieceNode(root);\n        return [root, right];\n    }\n    if (index === leftLength) {\n        const left = root.left;\n        root.left = undefined;\n        updatePieceNode(root);\n        return [left, root];\n    }\n    if (index === pieceEnd) {\n        const right = root.right;\n        root.right = undefined;\n        updatePieceNode(root);\n        return [root, right];\n    }\n    const offset = index - leftLength;\n    const first = { ...root.piece, length: offset };\n    const second = {\n        ...root.piece,\n        start: root.piece.start + root.piece.step * offset,\n        length: root.piece.length - offset,\n    };\n    return [\n        mergePieceTrees(root.left, createPieceNode(overlay, first)),\n        mergePieceTrees(createPieceNode(overlay, second), root.right),\n    ];\n}\nfunction leftmostPieceNode(node) {\n    while (node.left !== undefined)\n        node = node.left;\n    return node;\n}\nfunction rightmostPieceNode(node) {\n    while (node.right !== undefined)\n        node = node.right;\n    return node;\n}\nfunction mergeablePieces(left, right) {\n    if (left.kind !== right.kind)\n        return false;\n    if (left.kind === \"insert\" && left.source !== right.source)\n        return false;\n    if (left.length === 1 && right.length === 1)\n        return Math.abs(right.start - left.start) === 1;\n    return left.step === right.step && left.start + left.step * left.length === right.start;\n}\nfunction joinNormalized(overlay, left, right) {\n    if (left === undefined)\n        return right;\n    if (right === undefined)\n        return left;\n    const leftPiece = rightmostPieceNode(left).piece;\n    const rightPiece = leftmostPieceNode(right).piece;\n    if (!mergeablePieces(leftPiece, rightPiece))\n        return mergePieceTrees(left, right);\n    const [leftRest] = splitPieceTree(overlay, left, treeElements(left) - leftPiece.length);\n    const [, rightRest] = splitPieceTree(overlay, right, rightPiece.length);\n    const step = leftPiece.length === 1 ? (rightPiece.start - leftPiece.start) : leftPiece.step;\n    const combined = leftPiece.kind === \"base\"\n        ? { kind: \"base\", start: leftPiece.start, length: leftPiece.length + rightPiece.length, step }\n        : {\n            kind: \"insert\",\n            source: leftPiece.source,\n            start: leftPiece.start,\n            length: leftPiece.length + rightPiece.length,\n            step,\n        };\n    return joinNormalized(overlay, joinNormalized(overlay, leftRest, createPieceNode(overlay, combined)), rightRest);\n}\nfunction flattenPieceTree(node, output) {\n    if (node === undefined)\n        return;\n    flattenPieceTree(node.left, output);\n    output.push(node.piece);\n    flattenPieceTree(node.right, output);\n}\nfunction piecesOf(overlay) {\n    if (overlay.pieces === undefined) {\n        overlay.pieces = [];\n        flattenPieceTree(overlay.root, overlay.pieces);\n    }\n    return overlay.pieces;\n}\nfunction treeFromPieces(overlay, pieces) {\n    mergePieces(pieces);\n    let root;\n    for (const piece of pieces)\n        root = mergePieceTrees(root, createPieceNode(overlay, piece));\n    return root;\n}\nfunction replaceAllPieces(overlay, pieces) {\n    overlay.root = treeFromPieces(overlay, pieces);\n    overlay.pieces = undefined;\n    overlay.baseLocations = undefined;\n    overlay.insertLocations = undefined;\n}\nfunction arrayLength(overlay) {\n    return treeElements(overlay.root);\n}\nfunction locatePiece(overlay, index) {\n    let node = overlay.root;\n    while (node !== undefined) {\n        const leftLength = treeElements(node.left);\n        if (index < leftLength)\n            node = node.left;\n        else if (index >= leftLength + node.piece.length) {\n            index -= leftLength + node.piece.length;\n            node = node.right;\n        }\n        else {\n            overlay.locatedOffset = index - leftLength;\n            return node.piece;\n        }\n    }\n    throw new RangeError(\"Array overlay index is out of range\");\n}\nfunction arrayIndex(property) {\n    if (typeof property !== \"string\" || property.length === 0 || property.length > 10)\n        return undefined;\n    if (property === \"0\")\n        return 0;\n    const first = property.charCodeAt(0);\n    if (first < 49 || first > 57)\n        return undefined;\n    let index = first - 48;\n    for (let offset = 1; offset < property.length; offset++) {\n        const digit = property.charCodeAt(offset) - 48;\n        if (digit < 0 || digit > 9)\n            return undefined;\n        index = index * 10 + digit;\n        if (index >= 4_294_967_295)\n            return undefined;\n    }\n    return index;\n}\nfunction entryValueAt(node, piece, sourceIndex) {\n    const overlay = arrayOverlay(node);\n    if (piece.kind === \"base\") {\n        const valueIndex = overlay.baseOverrides?.get(sourceIndex);\n        return valueIndex === undefined\n            ? nodeBase(node)[sourceIndex]\n            : storedValue(node.context, valueIndex);\n    }\n    const overrides = overlay.insertOverrides?.get(piece.source);\n    const reference = overrides?.has(sourceIndex) ? overrides.get(sourceIndex) : piece.source.refs[sourceIndex];\n    return storedValue(node.context, reference);\n}\nfunction hasEntryOverrideAt(overlay, piece, sourceIndex) {\n    return piece.kind === \"base\"\n        ? (overlay.baseOverrides?.has(sourceIndex) ?? false)\n        : (overlay.insertOverrides?.get(piece.source)?.has(sourceIndex) ?? false);\n}\nfunction extendRightmostPiece(node, amount) {\n    if (node.right !== undefined)\n        extendRightmostPiece(node.right, amount);\n    else\n        node.piece.length += amount;\n    updatePieceNode(node);\n}\nfunction invalidatePieceCaches(overlay) {\n    overlay.pieces = undefined;\n    overlay.baseLocations = undefined;\n    overlay.insertLocations = undefined;\n    overlay.plan = undefined;\n}\nfunction replacePieceRange(node, index, remove, inserted) {\n    if (remove === 0 && inserted.length === 0)\n        return;\n    const overlay = arrayOverlay(node);\n    if (remove === 0 && index === arrayLength(overlay) && inserted.length === 1 && overlay.root !== undefined) {\n        const addition = inserted[0];\n        const tail = rightmostPieceNode(overlay.root).piece;\n        if (addition.kind === \"insert\" &&\n            tail.kind === \"insert\" &&\n            tail.step === 1 &&\n            tail.start + tail.length === tail.source.refs.length) {\n            for (let offset = 0; offset < addition.length; offset++) {\n                tail.source.refs.push(addition.source.refs[addition.start + offset]);\n            }\n            extendRightmostPiece(overlay.root, addition.length);\n            invalidatePieceCaches(overlay);\n            overlay.structural = true;\n            overlay.generation += 1;\n            markDirty(node);\n            return;\n        }\n    }\n    const [left, rest] = splitPieceTree(overlay, overlay.root, index);\n    const [, right] = splitPieceTree(overlay, rest, remove);\n    const middle = treeFromPieces(overlay, inserted);\n    overlay.root = joinNormalized(overlay, joinNormalized(overlay, left, middle), right);\n    invalidatePieceCaches(overlay);\n    overlay.structural = true;\n    overlay.generation += 1;\n    markDirty(node);\n}\nfunction mergePieces(pieces) {\n    for (let index = 1; index < pieces.length;) {\n        const left = pieces[index - 1];\n        const right = pieces[index];\n        const sameSource = left.kind === right.kind && (left.kind === \"base\" || left.source === right.source);\n        if (sameSource && left.length === 1 && right.length === 1 && Math.abs(right.start - left.start) === 1) {\n            left.step = (right.start - left.start);\n            left.length = 2;\n            pieces.splice(index, 1);\n        }\n        else if (sameSource && left.step === right.step && left.start + left.step * left.length === right.start) {\n            left.length += right.length;\n            pieces.splice(index, 1);\n        }\n        else\n            index += 1;\n    }\n}\nfunction insertPiece(node, items, start = 0) {\n    if (items.length === start)\n        return [];\n    const refs = [];\n    for (let index = start; index < items.length; index++)\n        refs.push(storeValue(node.context, items[index]));\n    return [{ kind: \"insert\", source: { refs }, start: 0, length: refs.length, step: 1 }];\n}\nfunction insertPlacementPiece(node, values, start = 0) {\n    if (values.length === start)\n        return [];\n    const storedLength = node.context.stored.length;\n    try {\n        for (let index = start; index < values.length; index++)\n            values[index] = storeValue(node.context, clonePlacement(values[index]));\n    }\n    catch (error) {\n        node.context.stored.length = storedLength;\n        throw error;\n    }\n    return [\n        {\n            kind: \"insert\",\n            source: { refs: values },\n            start,\n            length: values.length - start,\n            step: 1,\n        },\n    ];\n}\nfunction setArrayIndex(node, index, stored) {\n    const overlay = arrayOverlay(node);\n    const length = arrayLength(overlay);\n    if (index === length) {\n        replacePieceRange(node, length, 0, insertPiece(node, [stored]));\n        return;\n    }\n    const piece = locatePiece(overlay, index);\n    const sourceIndex = piece.start + piece.step * overlay.locatedOffset;\n    const current = entryValueAt(node, piece, sourceIndex);\n    if (!isContainer(stored) && current === stored)\n        return;\n    if (piece.kind === \"base\") {\n        const existingIndex = overlay.baseOverrides?.get(sourceIndex);\n        if (!isContainer(stored) && stored === nodeBase(node)[sourceIndex]) {\n            if (existingIndex !== undefined)\n                releaseStoredValue(node.context, existingIndex);\n            overlay.baseOverrides?.delete(sourceIndex);\n        }\n        else if (existingIndex === undefined) {\n            baseOverridesForWrite(overlay).set(sourceIndex, storeValue(node.context, stored));\n        }\n        else\n            overlay.baseOverrides.set(sourceIndex, replaceStoredValue(node.context, existingIndex, stored));\n    }\n    else {\n        let overrides = overlay.insertOverrides?.get(piece.source);\n        const existingIndex = overrides?.get(sourceIndex);\n        if (!isContainer(stored) && stored === storedValue(node.context, piece.source.refs[sourceIndex])) {\n            if (existingIndex !== undefined)\n                releaseStoredValue(node.context, existingIndex);\n            overrides?.delete(sourceIndex);\n            if (overrides?.size === 0)\n                overlay.insertOverrides?.delete(piece.source);\n        }\n        else {\n            if (overrides === undefined) {\n                overrides = new Map();\n                insertOverridesForWrite(overlay).set(piece.source, overrides);\n            }\n            if (existingIndex === undefined)\n                overrides.set(sourceIndex, storeValue(node.context, stored));\n            else\n                overrides.set(sourceIndex, replaceStoredValue(node.context, existingIndex, stored));\n        }\n    }\n    markDirty(node);\n}\nfunction setArrayLength(node, next) {\n    const current = arrayLength(arrayOverlay(node));\n    if (next === current)\n        return;\n    if (next < current)\n        replacePieceRange(node, next, current - next, []);\n    else\n        replacePieceRange(node, current, 0, insertPiece(node, Array.from({ length: next - current }, () => null)));\n}\nfunction toArrayLength(value) {\n    const number = Number(value);\n    if (!Number.isInteger(number) || number < 0 || number >= 4_294_967_296)\n        throw new RangeError(\"Invalid array length\");\n    return number;\n}\nfunction toIntegerOrInfinity(value) {\n    const number = Number(value);\n    if (Number.isNaN(number) || number === 0)\n        return 0;\n    return Number.isFinite(number) ? Math.trunc(number) : number;\n}\nfunction clampIndex(value, length) {\n    if (value === Number.NEGATIVE_INFINITY)\n        return 0;\n    if (value < 0)\n        return Math.max(length + value, 0);\n    return Math.min(value, length);\n}\nfunction mutatorNode(receiver) {\n    if (!isContainer(receiver))\n        return undefined;\n    const node = Reflect.get(receiver, NODE);\n    if (node === undefined)\n        return undefined;\n    if (!Array.isArray(nodeBase(node)))\n        throw new TypeError(\"Array mutator called on incompatible receiver\");\n    assertWritable(node.context);\n    return node;\n}\nconst arrayMutators = {\n    push(...items) {\n        const node = mutatorNode(this);\n        if (node === undefined)\n            return Reflect.apply(Array.prototype.push, this, items);\n        const length = arrayLength(arrayOverlay(node));\n        replacePieceRange(node, length, 0, insertPlacementPiece(node, items));\n        return length + items.length;\n    },\n    pop() {\n        const node = mutatorNode(this);\n        if (node === undefined)\n            return Reflect.apply(Array.prototype.pop, this, []);\n        const length = arrayLength(arrayOverlay(node));\n        if (length === 0)\n            return undefined;\n        const value = getArrayIndex(node, length - 1);\n        replacePieceRange(node, length - 1, 1, []);\n        return value;\n    },\n    shift() {\n        const node = mutatorNode(this);\n        if (node === undefined)\n            return Reflect.apply(Array.prototype.shift, this, []);\n        const length = arrayLength(arrayOverlay(node));\n        if (length === 0)\n            return undefined;\n        const value = getArrayIndex(node, 0);\n        replacePieceRange(node, 0, 1, []);\n        return value;\n    },\n    unshift(...items) {\n        const node = mutatorNode(this);\n        if (node === undefined)\n            return Reflect.apply(Array.prototype.unshift, this, items);\n        replacePieceRange(node, 0, 0, insertPlacementPiece(node, items));\n        return arrayLength(arrayOverlay(node));\n    },\n    splice(...args) {\n        const node = mutatorNode(this);\n        if (node === undefined)\n            return Reflect.apply(Array.prototype.splice, this, args);\n        const length = arrayLength(arrayOverlay(node));\n        const start = args.length === 0 ? 0 : clampIndex(toIntegerOrInfinity(args[0]), length);\n        const remove = args.length === 0\n            ? 0\n            : args.length === 1\n                ? length - start\n                : Math.min(Math.max(toIntegerOrInfinity(args[1]), 0), length - start);\n        const removed = Array.from({ length: remove }, (_, offset) => getArrayIndex(node, start + offset));\n        const itemStart = Math.min(2, args.length);\n        const itemCount = Math.max(args.length - 2, 0);\n        replacePieceRange(node, start, remove, insertPlacementPiece(node, args, itemStart));\n        setArrayLength(node, length - remove + itemCount);\n        return removed;\n    },\n    reverse() {\n        const node = mutatorNode(this);\n        if (node === undefined)\n            return Reflect.apply(Array.prototype.reverse, this, []);\n        const overlay = arrayOverlay(node);\n        if (arrayLength(overlay) < 2)\n            return node.proxy;\n        const pieces = [...piecesOf(overlay)].reverse();\n        for (const piece of pieces) {\n            piece.start += piece.step * (piece.length - 1);\n            piece.step = piece.step === 1 ? -1 : 1;\n        }\n        replaceAllPieces(overlay, pieces);\n        overlay.structural = true;\n        overlay.generation += 1;\n        overlay.plan = undefined;\n        markDirty(node);\n        return node.proxy;\n    },\n    sort(comparator) {\n        const node = mutatorNode(this);\n        if (node === undefined)\n            return Reflect.apply(Array.prototype.sort, this, [comparator]);\n        if (comparator !== undefined && typeof comparator !== \"function\")\n            throw new TypeError(\"Comparator must be a function\");\n        const overlay = arrayOverlay(node);\n        const insertedSources = [];\n        const insertedIndices = [];\n        const insertedValues = [];\n        const baseValues = new Array(nodeBase(node).length);\n        const order = [];\n        for (const piece of piecesOf(overlay)) {\n            for (let offset = 0; offset < piece.length; offset++) {\n                const sourceIndex = piece.start + piece.step * offset;\n                if (piece.kind === \"base\") {\n                    order.push(sourceIndex);\n                    baseValues[sourceIndex] = publicSortValue(node, sourceIndex, insertedSources, insertedIndices);\n                }\n                else {\n                    insertedSources.push(piece.source);\n                    insertedIndices.push(sourceIndex);\n                    const token = -insertedSources.length;\n                    order.push(token);\n                    insertedValues.push(publicSortValue(node, token, insertedSources, insertedIndices));\n                }\n            }\n        }\n        const baseSnapshot = new Map();\n        for (const [index, valueIndex] of overlay.baseOverrides ?? [])\n            baseSnapshot.set(index, storedValue(node.context, valueIndex));\n        const insertSnapshots = new Map();\n        for (const [source, overrides] of overlay.insertOverrides ?? []) {\n            const snapshot = new Map();\n            for (const [index, valueIndex] of overrides)\n                snapshot.set(index, storedValue(node.context, valueIndex));\n            insertSnapshots.set(source, snapshot);\n        }\n        const generation = overlay.generation;\n        order.sort((left, right) => {\n            const leftValue = left < 0 ? insertedValues[-left - 1] : baseValues[left];\n            const rightValue = right < 0 ? insertedValues[-right - 1] : baseValues[right];\n            if (typeof comparator === \"function\")\n                return Number(comparator(leftValue, rightValue));\n            const a = String(leftValue);\n            const b = String(rightValue);\n            return a < b ? -1 : a > b ? 1 : 0;\n        });\n        if (baseSnapshot.size > 0 ||\n            insertSnapshots.size > 0 ||\n            (overlay.baseOverrides?.size ?? 0) > 0 ||\n            (overlay.insertOverrides?.size ?? 0) > 0) {\n            for (const token of order) {\n                restoreSortOverride(node, token, insertedSources, insertedIndices, baseSnapshot, insertSnapshots);\n            }\n        }\n        const comparatorWasStructural = overlay.generation !== generation;\n        const currentLength = arrayLength(overlay);\n        const samePrefix = currentLength >= order.length &&\n            order.every((token, index) => sameSortTokenAt(overlay, index, token, insertedSources, insertedIndices));\n        if (!samePrefix) {\n            replacePieceRange(node, 0, Math.min(order.length, currentLength), piecesFromSortOrder(order, insertedSources, insertedIndices));\n        }\n        if (comparatorWasStructural)\n            deduplicateArrayEntries(node);\n        return node.proxy;\n    },\n    fill(supplied, startArg, endArg) {\n        const node = mutatorNode(this);\n        if (node === undefined)\n            return Reflect.apply(Array.prototype.fill, this, [supplied, startArg, endArg]);\n        const length = arrayLength(arrayOverlay(node));\n        const start = startArg === undefined ? 0 : clampIndex(toIntegerOrInfinity(startArg), length);\n        const end = endArg === undefined ? length : clampIndex(toIntegerOrInfinity(endArg), length);\n        if (end <= start)\n            return node.proxy;\n        const items = Array.from({ length: end - start }, () => clonePlacement(supplied));\n        replacePieceRange(node, start, end - start, insertPiece(node, items));\n        return node.proxy;\n    },\n    copyWithin(targetArg, startArg, endArg) {\n        const node = mutatorNode(this);\n        if (node === undefined)\n            return Reflect.apply(Array.prototype.copyWithin, this, [targetArg, startArg, endArg]);\n        const length = arrayLength(arrayOverlay(node));\n        const target = clampIndex(toIntegerOrInfinity(targetArg), length);\n        const start = clampIndex(toIntegerOrInfinity(startArg), length);\n        const end = endArg === undefined ? length : clampIndex(toIntegerOrInfinity(endArg), length);\n        const count = Math.min(Math.max(end - start, 0), length - target);\n        const values = Array.from({ length: count }, (_, offset) => clonePlacement(getArrayIndex(node, start + offset)));\n        replacePieceRange(node, target, count, insertPiece(node, values));\n        return node.proxy;\n    },\n};\nfunction sortTokenSource(token, sources) {\n    return token < 0 ? sources[-token - 1] : undefined;\n}\nfunction sortTokenIndex(token, indices) {\n    return token < 0 ? indices[-token - 1] : token;\n}\nfunction publicSortValue(node, token, sources, indices) {\n    const overlay = arrayOverlay(node);\n    const source = sortTokenSource(token, sources);\n    const sourceIndex = sortTokenIndex(token, indices);\n    const overrideIndex = source === undefined\n        ? overlay.baseOverrides?.get(sourceIndex)\n        : overlay.insertOverrides?.get(source)?.get(sourceIndex);\n    const value = overrideIndex !== undefined\n        ? storedValue(node.context, overrideIndex)\n        : source === undefined\n            ? nodeBase(node)[sourceIndex]\n            : storedValue(node.context, source.refs[sourceIndex]);\n    if (!isContainer(value))\n        return value;\n    return createNode(node.context, value, node, source === undefined ? 1 : 2, sourceIndex, source, source !== undefined || (overlay.baseOverrides?.has(sourceIndex) ?? false)).proxy;\n}\nfunction restoreSortOverride(node, token, sources, indices, baseSnapshot, insertSnapshots) {\n    const overlay = arrayOverlay(node);\n    const source = sortTokenSource(token, sources);\n    const sourceIndex = sortTokenIndex(token, indices);\n    if (source === undefined) {\n        const existingIndex = overlay.baseOverrides?.get(sourceIndex);\n        const snapshotValue = baseSnapshot.get(sourceIndex);\n        if (snapshotValue !== undefined) {\n            if (existingIndex === undefined)\n                baseOverridesForWrite(overlay).set(sourceIndex, storeValue(node.context, snapshotValue));\n            else\n                overlay.baseOverrides.set(sourceIndex, replaceStoredValue(node.context, existingIndex, snapshotValue));\n        }\n        else {\n            if (existingIndex !== undefined)\n                releaseStoredValue(node.context, existingIndex);\n            overlay.baseOverrides?.delete(sourceIndex);\n        }\n        return;\n    }\n    let overrides = overlay.insertOverrides?.get(source);\n    const existingIndex = overrides?.get(sourceIndex);\n    const snapshotValue = insertSnapshots.get(source)?.get(sourceIndex);\n    if (snapshotValue !== undefined) {\n        if (overrides === undefined) {\n            overrides = new Map();\n            insertOverridesForWrite(overlay).set(source, overrides);\n        }\n        if (existingIndex === undefined)\n            overrides.set(sourceIndex, storeValue(node.context, snapshotValue));\n        else\n            overrides.set(sourceIndex, replaceStoredValue(node.context, existingIndex, snapshotValue));\n    }\n    else {\n        if (existingIndex !== undefined)\n            releaseStoredValue(node.context, existingIndex);\n        overrides?.delete(sourceIndex);\n        if (overrides?.size === 0)\n            overlay.insertOverrides?.delete(source);\n    }\n}\nfunction sameSortTokenAt(overlay, logicalIndex, token, sources, indices) {\n    const piece = locatePiece(overlay, logicalIndex);\n    const sourceIndex = piece.start + piece.step * overlay.locatedOffset;\n    const tokenSource = sortTokenSource(token, sources);\n    return (sourceIndex === sortTokenIndex(token, indices) &&\n        ((piece.kind === \"base\" && tokenSource === undefined) ||\n            (piece.kind === \"insert\" && piece.source === tokenSource)));\n}\nfunction deduplicateArrayEntries(node) {\n    const overlay = arrayOverlay(node);\n    const seenBase = new Set();\n    const seenInsert = new Map();\n    const next = [];\n    let duplicated = false;\n    for (const piece of piecesOf(overlay)) {\n        for (let offset = 0; offset < piece.length; offset++) {\n            const sourceIndex = piece.start + piece.step * offset;\n            let seen;\n            if (piece.kind === \"base\") {\n                seen = seenBase.has(sourceIndex);\n                seenBase.add(sourceIndex);\n            }\n            else {\n                let indices = seenInsert.get(piece.source);\n                if (indices === undefined) {\n                    indices = new Set();\n                    seenInsert.set(piece.source, indices);\n                }\n                seen = indices.has(sourceIndex);\n                indices.add(sourceIndex);\n            }\n            if (seen) {\n                duplicated = true;\n                appendMergedPiece(next, insertPiece(node, [clonePlacementStored(entryValueAt(node, piece, sourceIndex), node.context)])[0]);\n            }\n            else\n                appendMergedPiece(next, singletonPiece(piece, sourceIndex));\n        }\n    }\n    if (!duplicated)\n        return;\n    replaceAllPieces(overlay, next);\n    overlay.structural = true;\n    overlay.generation += 1;\n    overlay.plan = undefined;\n    markDirty(node);\n}\nfunction piecesFromSortOrder(order, sources, indices) {\n    const pieces = [];\n    for (const token of order) {\n        const source = token < 0 ? sources[-token - 1] : undefined;\n        const sourceIndex = token < 0 ? indices[-token - 1] : token;\n        const previous = pieces.at(-1);\n        const sameSource = previous !== undefined &&\n            ((source === undefined && previous.kind === \"base\") ||\n                (source !== undefined && previous.kind === \"insert\" && previous.source === source));\n        if (previous !== undefined && sameSource) {\n            if (previous.length === 1) {\n                const step = sourceIndex - previous.start;\n                if (step === 1 || step === -1) {\n                    previous.step = step;\n                    previous.length = 2;\n                    continue;\n                }\n            }\n            else if (previous.start + previous.step * previous.length === sourceIndex) {\n                previous.length += 1;\n                continue;\n            }\n        }\n        pieces.push(source === undefined\n            ? { kind: \"base\", start: sourceIndex, length: 1, step: 1 }\n            : { kind: \"insert\", source, start: sourceIndex, length: 1, step: 1 });\n    }\n    return pieces;\n}\nfunction appendMergedPiece(pieces, piece) {\n    const previous = pieces.at(-1);\n    const sameSource = previous !== undefined &&\n        previous.kind === piece.kind &&\n        (previous.kind === \"base\" || previous.source === piece.source);\n    if (previous !== undefined && sameSource && previous.length === 1 && piece.length === 1) {\n        const step = piece.start - previous.start;\n        if (step === 1 || step === -1) {\n            previous.step = step;\n            previous.length = 2;\n            return;\n        }\n    }\n    if (previous !== undefined &&\n        sameSource &&\n        previous.step === piece.step &&\n        previous.start + previous.step * previous.length === piece.start) {\n        previous.length += piece.length;\n    }\n    else\n        pieces.push(piece);\n}\nfunction singletonPiece(piece, sourceIndex) {\n    return piece.kind === \"base\"\n        ? { kind: \"base\", start: sourceIndex, length: 1, step: 1 }\n        : { kind: \"insert\", source: piece.source, start: sourceIndex, length: 1, step: 1 };\n}\nfunction clonePlacement(value) {\n    const proxyNode = isContainer(value) ? Reflect.get(value, NODE) : undefined;\n    return proxyNode === undefined ? copyJson(value) : clonePlacementNode(proxyNode);\n}\nfunction cloneNode(node) {\n    assertReadable(node.context);\n    if (Array.isArray(nodeBase(node))) {\n        const overlay = arrayOverlay(node);\n        const result = [];\n        for (const piece of piecesOf(overlay)) {\n            for (let offset = 0; offset < piece.length; offset++) {\n                const sourceIndex = piece.start + piece.step * offset;\n                result.push(cloneStored(entryValueAt(node, piece, sourceIndex), node.context));\n            }\n        }\n        return result;\n    }\n    const result = Object.create(Object.getPrototypeOf(nodeBase(node)));\n    for (const key of ownKeys(node))\n        defineData(result, key, cloneStored(objectValue(node, key), node.context));\n    return result;\n}\nfunction cloneStored(value, context) {\n    if (!isContainer(value))\n        return value;\n    const node = context.rawNodes.get(value);\n    return node === undefined || (!node.dirty && !node.subtreeDirty) ? value : cloneNode(node);\n}\nfunction clonePlacementNode(node) {\n    assertReadable(node.context);\n    if (Array.isArray(nodeBase(node))) {\n        const overlay = arrayOverlay(node);\n        const result = [];\n        for (const piece of piecesOf(overlay)) {\n            for (let offset = 0; offset < piece.length; offset++) {\n                const sourceIndex = piece.start + piece.step * offset;\n                result.push(clonePlacementStored(entryValueAt(node, piece, sourceIndex), node.context));\n            }\n        }\n        return result;\n    }\n    const result = Object.create(Object.getPrototypeOf(nodeBase(node)));\n    for (const key of ownKeys(node))\n        defineData(result, key, clonePlacementStored(objectValue(node, key), node.context));\n    return result;\n}\nfunction clonePlacementStored(value, context) {\n    if (!isContainer(value))\n        return copyJson(value);\n    const node = context.rawNodes.get(value);\n    return node === undefined ? copyJson(value) : clonePlacementNode(node);\n}\nfunction defineData(target, key, value) {\n    DATA_DESCRIPTOR.value = value;\n    Object.defineProperty(target, key, DATA_DESCRIPTOR);\n    DATA_DESCRIPTOR.value = undefined;\n}\nfunction emitOperations(context) {\n    const simple = emitSimpleObjectOperations(context);\n    if (simple !== undefined)\n        return simple;\n    const operations = [];\n    const forcedFolds = new Map();\n    const emissionPaths = new Map();\n    const denseIndices = new Map();\n    for (const node of context.dirty) {\n        recordDenseArrayPosition(node, denseIndices);\n        if (Array.isArray(nodeBase(node))) {\n            const overlay = arrayOverlay(node);\n            if (!overlay.structural && (overlay.baseOverrides?.size ?? 0) > 0) {\n                let candidates = denseIndices.get(node);\n                if (candidates === undefined) {\n                    candidates = { indices: [], bits: undefined, length: nodeBase(node).length };\n                    denseIndices.set(node, candidates);\n                }\n                for (const index of overlay.baseOverrides.keys())\n                    addDenseCandidate(candidates, index);\n            }\n        }\n    }\n    const denseRegions = new Map();\n    for (const [array, candidates] of denseIndices) {\n        const path = resolvePath(array);\n        if (path === undefined || path.some((segment) => typeof segment === \"string\" && RESERVED_SEGMENTS.has(segment))) {\n            continue;\n        }\n        const regions = buildDenseRegions(candidates);\n        if (regions.length > 0)\n            denseRegions.set(array, regions);\n    }\n    for (const node of context.dirty) {\n        const path = resolvePath(node);\n        if (path === undefined)\n            continue;\n        if (hasCoveringDenseRegion(node, path, denseRegions))\n            continue;\n        emissionPaths.set(node, path);\n        if (!Array.isArray(nodeBase(node)) && hasReservedMutation(node))\n            forcedFolds.set(node, path);\n        const reservedAt = path.findIndex((segment) => typeof segment === \"string\" && RESERVED_SEGMENTS.has(segment));\n        if (reservedAt >= 0) {\n            let ancestor = node;\n            for (let depth = path.length; depth > reservedAt; depth--)\n                ancestor = nodeParent(ancestor);\n            forcedFolds.set(ancestor, path.slice(0, reservedAt));\n        }\n    }\n    for (const [node, path] of forcedFolds)\n        emissionPaths.set(node, path);\n    for (const node of denseRegions.keys()) {\n        const path = resolvePath(node);\n        if (path !== undefined && !hasCoveringDenseRegion(node, path, denseRegions))\n            emissionPaths.set(node, path);\n    }\n    let maxDepth = 0;\n    for (const path of emissionPaths.values())\n        maxDepth = Math.max(maxDepth, path.length);\n    const buckets = Array.from({ length: maxDepth + 1 }, () => []);\n    for (const [node, path] of emissionPaths)\n        buckets[path.length].push(node);\n    const folded = new Set();\n    for (const bucket of buckets) {\n        for (const node of bucket) {\n            const path = emissionPaths.get(node);\n            if (hasPlacementAncestor(node) || hasFoldedAncestor(node, folded))\n                continue;\n            if (forcedFolds.has(node)) {\n                emitSet(operations, path, cloneNode(node));\n                folded.add(node);\n                continue;\n            }\n            if (Array.isArray(nodeBase(node)))\n                emitArrayOperations(node, path, operations, denseRegions.get(node));\n            else\n                emitObjectOperations(node, path, operations);\n            if (operations.length > MAX_DELTA_OPERATIONS) {\n                locatedDenseArray = undefined;\n                return [[\"r\", cloneNode(context.root)]];\n            }\n        }\n    }\n    locatedDenseArray = undefined;\n    return operations;\n}\nfunction emitSimpleObjectOperations(context) {\n    const nodes = [];\n    for (const node of context.dirty) {\n        if (Array.isArray(nodeBase(node)) || hasReservedMutation(node) || hasPlacementAncestor(node))\n            return undefined;\n        for (let parent = nodeParent(node); parent !== undefined; parent = nodeParent(parent)) {\n            if (Array.isArray(nodeBase(parent)))\n                return undefined;\n        }\n        const path = resolvePath(node);\n        if (path === undefined)\n            continue;\n        for (const segment of path) {\n            if (typeof segment === \"string\" && RESERVED_SEGMENTS.has(segment))\n                return undefined;\n        }\n        nodes.push(node);\n        if (nodes.length > MAX_SIMPLE_OBJECT_NODES)\n            return undefined;\n    }\n    // Stable insertion sort avoids comparator/bucket allocations for the usual\n    // handful of dirty object nodes.\n    for (let index = 1; index < nodes.length; index++) {\n        const node = nodes[index];\n        const depth = node.preparedPath.length;\n        let at = index;\n        while (at > 0 && nodes[at - 1].preparedPath.length > depth) {\n            nodes[at] = nodes[at - 1];\n            at -= 1;\n        }\n        nodes[at] = node;\n    }\n    const operations = [];\n    let canMaterializeDirectly = true;\n    for (const node of nodes) {\n        if (emitObjectOperations(node, node.preparedPath, operations))\n            canMaterializeDirectly = false;\n        if (operations.length > MAX_DELTA_OPERATIONS)\n            return [[\"r\", cloneNode(context.root)]];\n    }\n    context.simpleObjectMaterialization = canMaterializeDirectly;\n    return operations;\n}\nlet locatedDenseArray;\nlet locatedDenseIndex = 0;\nfunction locateDenseArrayPosition(node) {\n    let child = node;\n    for (let parent = nodeParent(child); parent !== undefined; parent = nodeParent(child)) {\n        if (Array.isArray(nodeBase(parent))) {\n            const overlay = arrayOverlay(parent);\n            if (child.parentKind !== 1 || overlay.structural)\n                return false;\n            const sourceIndex = child.parentKey;\n            const valueIndex = overlay.baseOverrides?.get(sourceIndex);\n            const current = valueIndex === undefined\n                ? nodeBase(parent)[sourceIndex]\n                : storedValue(parent.context, valueIndex);\n            if (current !== nodeBase(child))\n                return false;\n            locatedDenseArray = parent;\n            locatedDenseIndex = sourceIndex;\n            return true;\n        }\n        child = parent;\n    }\n    return false;\n}\nfunction hasCoveringDenseRegion(node, path, denseRegions) {\n    for (let parent = nodeParent(node); parent !== undefined; parent = nodeParent(parent)) {\n        const regions = denseRegions.get(parent);\n        if (regions === undefined)\n            continue;\n        const parentPath = resolvePath(parent);\n        if (parentPath === undefined || path.length <= parentPath.length)\n            continue;\n        let matches = true;\n        for (let index = 0; index < parentPath.length; index++) {\n            if (path[index] !== parentPath[index]) {\n                matches = false;\n                break;\n            }\n        }\n        if (!matches)\n            continue;\n        const index = path[parentPath.length];\n        if (typeof index === \"number\" && regionContaining(regions, index))\n            return true;\n    }\n    return false;\n}\nfunction addDenseCandidate(candidates, index) {\n    if (candidates.bits !== undefined) {\n        candidates.bits[index] = 1;\n        return;\n    }\n    candidates.indices.push(index);\n    if (candidates.indices.length < 256)\n        return;\n    candidates.bits = new Uint8Array(candidates.length);\n    for (const existing of candidates.indices)\n        candidates.bits[existing] = 1;\n    candidates.indices.length = 0;\n}\nfunction recordDenseArrayPosition(node, groups) {\n    if (!locateDenseArrayPosition(node))\n        return;\n    let candidates = groups.get(locatedDenseArray);\n    if (candidates === undefined) {\n        candidates = { indices: [], bits: undefined, length: nodeBase(locatedDenseArray).length };\n        groups.set(locatedDenseArray, candidates);\n    }\n    addDenseCandidate(candidates, locatedDenseIndex);\n}\nfunction buildDenseRegions(candidates) {\n    if (candidates.bits === undefined)\n        return [];\n    const regions = [];\n    const bits = candidates.bits;\n    for (let at = 0; at < bits.length;) {\n        while (at < bits.length && bits[at] === 0)\n            at += 1;\n        if (at === bits.length)\n            break;\n        const start = at;\n        let end = at;\n        let count = 0;\n        let gap = 0;\n        while (at < bits.length) {\n            if (bits[at] !== 0) {\n                count += 1;\n                end = at;\n                gap = 0;\n            }\n            else if (++gap > 1)\n                break;\n            at += 1;\n        }\n        const length = end - start + 1;\n        if (count >= 256 && count * 2 >= length)\n            regions.push({ start, length });\n    }\n    return regions;\n}\nfunction regionContaining(regions, index) {\n    for (const region of regions)\n        if (index >= region.start && index < region.start + region.length)\n            return true;\n    return false;\n}\nfunction hasReservedMutation(node) {\n    if (node.writeKey !== undefined && RESERVED_SEGMENTS.has(node.writeKey))\n        return true;\n    if (node.deleteKey !== undefined && RESERVED_SEGMENTS.has(node.deleteKey))\n        return true;\n    if (node.writes !== undefined) {\n        for (const key of node.writes.keys())\n            if (RESERVED_SEGMENTS.has(key))\n                return true;\n    }\n    if (node.deletes !== undefined) {\n        for (const key of node.deletes)\n            if (RESERVED_SEGMENTS.has(key))\n                return true;\n    }\n    return false;\n}\nfunction hasFoldedAncestor(node, folded) {\n    for (let parent = nodeParent(node); parent !== undefined; parent = nodeParent(parent))\n        if (folded.has(parent))\n            return true;\n    return false;\n}\nfunction hasPlacementAncestor(node) {\n    for (let current = node; current !== undefined; current = nodeParent(current)) {\n        if (nodeParent(current) !== undefined && current.parentPlacement)\n            return true;\n    }\n    return false;\n}\nfunction emitObjectWrite(node, path, operations, key, value) {\n    const nextPath = [...path, key];\n    const before = node.readded?.has(key) || !Object.hasOwn(nodeBase(node), key)\n        ? undefined\n        : nodeBase(node)[key];\n    const after = cloneStored(value, node.context);\n    const emitted = emitChangedValue(operations, nextPath, before, after);\n    return isContainer(before) && isContainer(after) && !emitted;\n}\nfunction emitObjectOperations(node, path, operations) {\n    // Immutable replay must encode delete-and-readd explicitly so string-key\n    // insertion order matches the draft.\n    if (node.readded !== undefined) {\n        for (const key of node.readded) {\n            if (Object.hasOwn(nodeBase(node), key))\n                operations.push([\"d\", [...path, key]]);\n        }\n    }\n    let normalizedContainerWrite = false;\n    if (node.writeKey !== undefined)\n        normalizedContainerWrite = emitObjectWrite(node, path, operations, node.writeKey, objectValue(node, node.writeKey));\n    if (node.writes !== undefined) {\n        for (const [key, valueIndex] of node.writes) {\n            if (operations.length > MAX_DELTA_OPERATIONS)\n                return normalizedContainerWrite;\n            if (emitObjectWrite(node, path, operations, key, storedValue(node.context, valueIndex)))\n                normalizedContainerWrite = true;\n        }\n    }\n    if (node.deleteKey !== undefined && Object.hasOwn(nodeBase(node), node.deleteKey)) {\n        operations.push([\"d\", [...path, node.deleteKey]]);\n    }\n    if (node.deletes !== undefined) {\n        for (const key of node.deletes) {\n            if (operations.length > MAX_DELTA_OPERATIONS)\n                return normalizedContainerWrite;\n            if (Object.hasOwn(nodeBase(node), key))\n                operations.push([\"d\", [...path, key]]);\n        }\n    }\n    return normalizedContainerWrite;\n}\nfunction buildArrayPlan(node) {\n    const overlay = arrayOverlay(node);\n    if (overlay.plan !== undefined)\n        return overlay.plan;\n    const base = nodeBase(node);\n    const pieces = piecesOf(overlay);\n    overlay.plan = orderedArrayPlan(base.length, pieces) ?? elementArrayPlan(base.length, pieces);\n    return overlay.plan;\n}\n/**\n * The plan when the retained base elements keep their order, the common case of inserts and removals: computed from the\n * pieces alone, so appending to a long array costs no walk over its elements. `undefined` when base elements moved.\n */\nfunction orderedArrayPlan(baseLength, pieces) {\n    // Retained base ranges in piece order, `[first, last]` each; ordered means strictly ascending without overlap.\n    const ranges = [];\n    for (const piece of pieces) {\n        if (piece.kind !== \"base\" || piece.length === 0)\n            continue;\n        if (piece.step !== 1 && piece.length > 1)\n            return undefined;\n        if (ranges.length > 0 && piece.start <= ranges[ranges.length - 1])\n            return undefined;\n        ranges.push(piece.start, piece.start + piece.length - 1);\n    }\n    // Unretained runs from the end backwards, as `start, length` pairs: after the last range, between ranges, before the first.\n    const removeRuns = [];\n    let end = baseLength;\n    for (let index = ranges.length - 2; index >= -2; index -= 2) {\n        const start = index >= 0 ? ranges[index + 1] + 1 : 0;\n        if (end > start)\n            removeRuns.push(start, end - start);\n        if (index >= 0)\n            end = ranges[index];\n    }\n    return { removeRuns, permutation: undefined, insertRuns: insertRunsOf(pieces) };\n}\n/** The plan from a walk over every base element, for pieces that moved base elements. */\nfunction elementArrayPlan(baseLength, pieces) {\n    const retained = new Uint8Array(baseLength);\n    const targetBase = [];\n    for (const piece of pieces) {\n        if (piece.kind !== \"base\")\n            continue;\n        for (let offset = 0; offset < piece.length; offset++) {\n            const index = piece.start + piece.step * offset;\n            retained[index] = 1;\n            targetBase.push(index);\n        }\n    }\n    const removeRuns = [];\n    for (let end = baseLength; end > 0;) {\n        if (retained[end - 1] !== 0) {\n            end -= 1;\n            continue;\n        }\n        let start = end - 1;\n        while (start > 0 && retained[start - 1] === 0)\n            start -= 1;\n        removeRuns.push(start, end - start);\n        end = start;\n    }\n    const retainedBase = [];\n    for (let index = 0; index < retained.length; index++)\n        if (retained[index] !== 0)\n            retainedBase.push(index);\n    let permutation;\n    if (targetBase.some((value, index) => value !== retainedBase[index])) {\n        const positions = new Map(retainedBase.map((value, index) => [value, index]));\n        permutation = targetBase.map((value) => positions.get(value));\n    }\n    return { removeRuns, permutation, insertRuns: insertRunsOf(pieces) };\n}\n/** Runs of consecutive insert pieces as `logical index, first piece, end piece` triples. */\nfunction insertRunsOf(pieces) {\n    const insertRuns = [];\n    let logicalIndex = 0;\n    for (let pieceIndex = 0; pieceIndex < pieces.length;) {\n        const piece = pieces[pieceIndex];\n        if (piece.kind === \"base\") {\n            logicalIndex += piece.length;\n            pieceIndex += 1;\n            continue;\n        }\n        const startPiece = pieceIndex;\n        while (pieceIndex < pieces.length && pieces[pieceIndex].kind === \"insert\") {\n            logicalIndex += pieces[pieceIndex].length;\n            pieceIndex += 1;\n        }\n        insertRuns.push(logicalIndex - rangeLength(pieces, startPiece, pieceIndex), startPiece, pieceIndex);\n    }\n    return insertRuns;\n}\nfunction rangeLength(pieces, start, end) {\n    let length = 0;\n    for (let index = start; index < end; index++)\n        length += pieces[index].length;\n    return length;\n}\nfunction emitArrayOperations(node, path, operations, denseRegions) {\n    const overlay = arrayOverlay(node);\n    const base = nodeBase(node);\n    if (denseRegions !== undefined) {\n        for (const region of denseRegions) {\n            if (operations.length > MAX_DELTA_OPERATIONS)\n                return;\n            operations.push([\"p\", path, region.start, region.length, cloneArrayRegion(node, region)]);\n        }\n    }\n    if (overlay.structural) {\n        const plan = buildArrayPlan(node);\n        for (let index = 0; index < plan.removeRuns.length; index += 2) {\n            if (operations.length > MAX_DELTA_OPERATIONS)\n                return;\n            operations.push([\"p\", path, plan.removeRuns[index], plan.removeRuns[index + 1], []]);\n        }\n        if (plan.permutation !== undefined)\n            operations.push([\"m\", path, plan.permutation]);\n        const pieces = piecesOf(overlay);\n        for (let run = 0; run < plan.insertRuns.length; run += 3) {\n            if (operations.length > MAX_DELTA_OPERATIONS)\n                return;\n            const logicalIndex = plan.insertRuns[run];\n            const items = [];\n            for (let pieceIndex = plan.insertRuns[run + 1]; pieceIndex < plan.insertRuns[run + 2]; pieceIndex++) {\n                const piece = pieces[pieceIndex];\n                for (let offset = 0; offset < piece.length; offset++) {\n                    const sourceIndex = piece.start + piece.step * offset;\n                    items.push(cloneStored(entryValueAt(node, piece, sourceIndex), node.context));\n                }\n            }\n            operations.push([\"p\", path, logicalIndex, 0, items]);\n        }\n    }\n    for (const [baseIndex, valueIndex] of overlay.baseOverrides ?? []) {\n        if (operations.length > MAX_DELTA_OPERATIONS)\n            return;\n        const index = findEntryIndex(overlay, 1, baseIndex, undefined);\n        if (index === undefined || (denseRegions !== undefined && regionContaining(denseRegions, index)))\n            continue;\n        emitChangedValue(operations, [...path, index], base[baseIndex], cloneStored(storedValue(node.context, valueIndex), node.context));\n    }\n}\nfunction cloneArrayRegion(node, region) {\n    const overlay = arrayOverlay(node);\n    const result = [];\n    for (let index = region.start; index < region.start + region.length; index++) {\n        const piece = locatePiece(overlay, index);\n        const sourceIndex = piece.start + piece.step * overlay.locatedOffset;\n        result.push(cloneStored(entryValueAt(node, piece, sourceIndex), node.context));\n    }\n    return result;\n}\nfunction emitChangedValue(operations, path, before, after) {\n    if (!isContainer(after) && before === after)\n        return false;\n    if (isContainer(before) && isContainer(after) && equalTrustedJson(before, after))\n        return false;\n    if (typeof before === \"string\" && typeof after === \"string\") {\n        // Slice/equality stays on V8's rope fast path; startsWith scans the entire\n        // accumulated prefix on every append.\n        if (after.length > before.length && after.slice(0, before.length) === before) {\n            operations.push([\"a\", path, after.slice(before.length)]);\n            return true;\n        }\n        const shared = overlap(before, after, 65_536);\n        if (shared > 0) {\n            operations.push([\"t\", path, before.length - shared]);\n            if (after.length > shared)\n                operations.push([\"a\", path, after.slice(shared)]);\n            return true;\n        }\n    }\n    operations.push([\"s\", path, after]);\n    return true;\n}\nfunction emitSet(operations, path, value) {\n    if (path.length === 0)\n        operations.push([\"r\", value]);\n    else\n        operations.push([\"s\", path, value]);\n}\nfunction resolvePath(node) {\n    if (node.preparedPath !== undefined)\n        return node.preparedPath;\n    const parent = nodeParent(node);\n    if (parent === undefined) {\n        node.preparedPath = [];\n        return node.preparedPath;\n    }\n    const parentPath = resolvePath(parent);\n    if (parentPath === undefined)\n        return undefined;\n    if (node.parentKind === 0) {\n        const key = node.parentKey;\n        if (!objectHas(parent, key) || objectValue(parent, key) !== nodeBase(node))\n            return undefined;\n        node.preparedPath = [...parentPath, key];\n        return node.preparedPath;\n    }\n    const overlay = arrayOverlay(parent);\n    const index = findEntryIndex(overlay, node.parentKind, node.parentKey, node.parentSource);\n    if (index === undefined)\n        return undefined;\n    const piece = locatePiece(overlay, index);\n    if (entryValueAt(parent, piece, node.parentKey) !== nodeBase(node))\n        return undefined;\n    node.preparedPath = [...parentPath, index];\n    return node.preparedPath;\n}\nfunction ensurePieceLocations(overlay) {\n    if (overlay.baseLocations !== undefined)\n        return;\n    overlay.baseLocations = [];\n    overlay.insertLocations = new Map();\n    let logicalStart = 0;\n    for (const piece of piecesOf(overlay)) {\n        const last = piece.start + piece.step * (piece.length - 1);\n        const location = {\n            piece,\n            logicalStart,\n            minimum: Math.min(piece.start, last),\n            maximum: Math.max(piece.start, last),\n        };\n        if (piece.kind === \"base\")\n            overlay.baseLocations.push(location);\n        else {\n            let locations = overlay.insertLocations.get(piece.source);\n            if (locations === undefined) {\n                locations = [];\n                overlay.insertLocations.set(piece.source, locations);\n            }\n            locations.push(location);\n        }\n        logicalStart += piece.length;\n    }\n    const byMinimum = (left, right) => left.minimum - right.minimum;\n    overlay.baseLocations.sort(byMinimum);\n    for (const locations of overlay.insertLocations.values())\n        locations.sort(byMinimum);\n}\nfunction findEntryIndex(overlay, kind, sourceIndex, source) {\n    if (kind === 1 && !overlay.structural)\n        return sourceIndex;\n    ensurePieceLocations(overlay);\n    const locations = kind === 1 ? overlay.baseLocations : overlay.insertLocations.get(source);\n    if (locations === undefined)\n        return undefined;\n    let low = 0;\n    let high = locations.length;\n    while (low < high) {\n        const middle = (low + high) >>> 1;\n        if (locations[middle].minimum <= sourceIndex)\n            low = middle + 1;\n        else\n            high = middle;\n    }\n    const location = locations[low - 1];\n    if (location === undefined || sourceIndex > location.maximum)\n        return undefined;\n    const offset = (sourceIndex - location.piece.start) / location.piece.step;\n    return offset >= 0 && offset < location.piece.length ? location.logicalStart + offset : undefined;\n}\nfunction ensureOperations(context) {\n    if (context.ops !== undefined)\n        return context.ops;\n    assertReadable(context);\n    if (context.replacement) {\n        const base = context.tracker.deref()?.replacementBase(context);\n        context.replacementNoop =\n            base !== undefined && equalTrustedJson(base, nodeBase(context.root));\n        context.ops = context.replacementNoop ? [] : [[\"r\", nodeBase(context.root)]];\n    }\n    else\n        context.ops = emitOperations(context);\n    return context.ops;\n}\nfunction equalTrustedJson(left, right) {\n    if (left === right)\n        return true;\n    if (!isContainer(left) || !isContainer(right) || Array.isArray(left) !== Array.isArray(right))\n        return false;\n    if (Array.isArray(left)) {\n        const other = right;\n        if (left.length !== other.length)\n            return false;\n        for (let index = 0; index < left.length; index++)\n            if (!equalTrustedJson(left[index], other[index]))\n                return false;\n        return true;\n    }\n    const other = right;\n    const keys = Object.keys(left);\n    if (keys.length !== Object.keys(other).length)\n        return false;\n    for (const key of keys)\n        if (!Object.hasOwn(other, key) || !equalTrustedJson(left[key], other[key]))\n            return false;\n    return true;\n}\nfunction abortContext(context) {\n    if (context.status.value === \"aborted\" || context.status.value === \"consumed\" || context.status.value === \"stale\")\n        return;\n    context.status.value = \"aborted\";\n    clearContext(context);\n}\nfunction releaseOverlayReferences(context) {\n    context.tracker.deref()?.releaseContext(context);\n    if (locatedDenseArray?.context === context)\n        locatedDenseArray = undefined;\n    context.overlayReleased = true;\n    context.dirty.length = 0;\n    context.nodes.length = 0;\n    context.rawNodes = undefined;\n    context.ops = undefined;\n    context.root = undefined;\n    context.bases = undefined;\n    context.stored = undefined;\n    context.baseValue = undefined;\n}\nfunction clearContext(context) {\n    context.tracker.deref()?.releaseContext(context);\n    if (locatedDenseArray?.context === context)\n        locatedDenseArray = undefined;\n    for (const node of context.nodes) {\n        if (Array.isArray(node.target))\n            node.target.length = 0;\n        Reflect.deleteProperty(node.target, NODE);\n        node.writes?.clear();\n        node.deletes?.clear();\n        node.readded?.clear();\n        if (node.array?.pieces !== undefined)\n            node.array.pieces.length = 0;\n        if (node.array !== undefined) {\n            node.array.root = undefined;\n            node.array.baseLocations = undefined;\n            node.array.insertLocations = undefined;\n        }\n        node.array?.baseOverrides?.clear();\n        node.array?.insertOverrides?.clear();\n        node.parentSource = undefined;\n        node.target = RELEASED;\n        node.proxy = RELEASED;\n        node.writeKey = undefined;\n        node.writeValue = undefined;\n        node.writes = undefined;\n        node.deleteKey = undefined;\n        node.deletes = undefined;\n        node.readded = undefined;\n        node.array = undefined;\n        node.subtreeDirty = undefined;\n        node.preparedPath = undefined;\n    }\n    context.dirty.length = 0;\n    context.nodes.length = 0;\n    context.rawNodes = undefined;\n    context.ops = undefined;\n    context.root = undefined;\n    context.bases = undefined;\n    context.stored = undefined;\n    context.baseValue = undefined;\n    context.overlayReleased = true;\n}\nfunction isContainer(value) {\n    return value !== null && typeof value === \"object\";\n}\n//# sourceMappingURL=tracker.js.map","const isObj = (value) => value !== null && typeof value === \"object\";\n// ─── Classification ──────────────────────────────────────────────────────────\nexport const isReplace = (op) => op[0] === \"r\";\n/**\n * A batch begins with a replacement. Flush guarantees `r` is at index 0 or absent,\n * so this is exact rather than a heuristic.\n */\nexport const isBase = (ops) => ops.length > 0 && ops[0][0] === \"r\";\n// ─── Overlap ─────────────────────────────────────────────────────────────────\n/**\n * Longest suffix of `a` that is a prefix of `b`. Probes with indexOf and verifies\n * exact substring equality, so the hot loops are native. A hand-written KMP is\n * asymptotically equivalent and much slower in practice.\n *\n * Always correct: the returned n satisfies a.slice(a.length - n) === b.slice(0, n).\n */\nexport function overlap(a, b, scan, probe = 64, maxCandidates = 8) {\n    if (a.length === 0 || b.length === 0 || scan === 0)\n        return 0;\n    const tail = a.length > scan ? a.slice(a.length - scan) : a;\n    // A probe of length h can only find overlaps of at least h — the head must\n    // actually occur in `a`. So try a long head first (few candidates, and it\n    // catches the large overlaps a rolling window produces), then fall back to one\n    // character, which finds any overlap at the cost of more candidates.\n    //\n    // Candidates are bounded because repetitive output — a build log, or any run of\n    // one character — makes a long head match at thousands of positions. Giving up\n    // returns 0, which emits a set: larger, never wrong.\n    for (const h of [Math.min(probe, b.length), 1]) {\n        const head = b.slice(0, h);\n        let tried = 0;\n        for (let k = tail.indexOf(head); k !== -1; k = tail.indexOf(head, k + 1)) {\n            if (++tried > maxCandidates)\n                break;\n            const n = tail.length - k;\n            if (n <= b.length && tail.slice(k) === b.slice(0, n))\n                return n;\n        }\n        if (h === 1)\n            break;\n    }\n    return 0;\n}\n// ─── Immutable revision tracking ─────────────────────────────────────────────\nexport { diffRevisions } from \"./diff.js\";\nexport { track } from \"./tracker.js\";\n// ─── Path safety ─────────────────────────────────────────────────────────────\n/**\n * Segments that reach the prototype chain.\n *\n * `JSON.parse` is safe on its own — it makes `__proto__` an own property. What is\n * not safe is `parent[key] = value`, which is exactly what an applier does, and\n * paths are data: `[\"s\", [\"__proto__\", \"isAdmin\"], true]` pollutes\n * `Object.prototype` for the whole process.\n *\n * Ops arrive from a facet, a plugin compartment, or a tool whose details may echo\n * model output, so none of it is trusted input.\n */\nexport const RESERVED_SEGMENTS = new Set([\"__proto__\", \"constructor\", \"prototype\"]);\nexport class UnsafePathError extends Error {\n    // Not a parameter property: Node's --experimental-strip-types rejects those,\n    // and these files are meant to run under it directly.\n    segment;\n    constructor(segment) {\n        super(`unsafe path segment: ${String(segment)}`);\n        this.segment = segment;\n        this.name = \"UnsafePathError\";\n    }\n}\n/**\n * Verb, arity and payload shape for a **decoded** op: paths inline, no `#`, no\n * short forms. `apply` uses this.\n *\n * Validating `Op` against the wire grammar would be laxer than the type: a\n * two-element `[\"s\", value]` would pass, and `apply` would then read the value as\n * a path. Each vocabulary gets the validator that matches it.\n */\nexport function assertValidOp(op) {\n    if (!Array.isArray(op) || op.length === 0)\n        throw new TypeError(\"op is not a tuple\");\n    switch (op[0]) {\n        case \"r\":\n            if (op.length !== 2)\n                throw new TypeError(\"r arity\");\n            return;\n        case \"s\":\n            if (op.length !== 3)\n                throw new TypeError(\"s arity\");\n            assertPathArg(op[1], true);\n            return;\n        case \"d\":\n            if (op.length !== 2)\n                throw new TypeError(\"d arity\");\n            assertPathArg(op[1], true);\n            return;\n        case \"a\":\n            if (op.length !== 3 || typeof op[2] !== \"string\")\n                throw new TypeError(\"a shape\");\n            assertPathArg(op[1], true);\n            return;\n        case \"t\":\n            if (op.length !== 3 || !Number.isInteger(op[2]) || op[2] < 0)\n                throw new TypeError(\"t shape\");\n            assertPathArg(op[1], true);\n            return;\n        case \"p\": {\n            if (op.length !== 5)\n                throw new TypeError(\"p arity\");\n            assertPathArg(op[1]);\n            if (!Number.isInteger(op[2]) || op[2] < 0)\n                throw new TypeError(\"p index\");\n            if (!Number.isInteger(op[3]) || op[3] < 0)\n                throw new TypeError(\"p remove\");\n            if (!Array.isArray(op[4]))\n                throw new TypeError(\"p items\");\n            return;\n        }\n        case \"m\":\n            if (op.length !== 3)\n                throw new TypeError(\"m arity\");\n            assertPathArg(op[1]);\n            assertPermutation(op[2]);\n            return;\n        // Silently skipping an unknown verb is how a newer producer's op vanishes.\n        default:\n            throw new TypeError(`unknown op verb: ${String(op[0])}`);\n    }\n}\nfunction assertPathArg(p, nonEmpty = false) {\n    if (!Array.isArray(p))\n        throw new TypeError(\"path is not an array\");\n    if (nonEmpty && p.length === 0)\n        throw new TypeError(\"path is empty\");\n    assertSafePath(p);\n}\nfunction assertPermutation(value) {\n    if (!Array.isArray(value))\n        throw new TypeError(\"m permutation is not an array\");\n    const seen = new Uint8Array(value.length);\n    for (const index of value) {\n        if (!Number.isInteger(index) || index < 0 || index >= value.length || seen[index] !== 0) {\n            throw new TypeError(\"m permutation is not a bijection\");\n        }\n        seen[index] = 1;\n    }\n}\n/** The same, for the wire grammar: ids and short forms are legal here. */\nexport function assertValidWireOp(op) {\n    if (!Array.isArray(op) || op.length === 0)\n        throw new TypeError(\"op is not a tuple\");\n    const [verb] = op;\n    const okRef = (r) => {\n        if (typeof r === \"number\") {\n            if (!Number.isInteger(r) || r < 0)\n                throw new TypeError(\"bad path id\");\n            return;\n        }\n        // A string is not a path. Unchecked, `\"a\".slice(0, -1)` is `\"\"`, so it\n        // resolves to the ROOT and writes there — a path that is not a path, accepted.\n        if (!Array.isArray(r))\n            throw new TypeError(\"path is not an array\");\n        assertSafePath(r);\n    };\n    switch (verb) {\n        case \"r\":\n            if (op.length !== 2)\n                throw new TypeError(\"r arity\");\n            return;\n        case \"s\":\n            if (op.length === 3)\n                okRef(op[1]);\n            else if (op.length !== 2)\n                throw new TypeError(\"s arity\");\n            return;\n        case \"d\":\n            if (op.length === 2)\n                okRef(op[1]);\n            else if (op.length !== 1)\n                throw new TypeError(\"d arity\");\n            return;\n        case \"a\":\n            if (op.length === 3) {\n                okRef(op[1]);\n                if (typeof op[2] !== \"string\")\n                    throw new TypeError(\"a value\");\n            }\n            else if (op.length === 2) {\n                if (typeof op[1] !== \"string\")\n                    throw new TypeError(\"a value\");\n            }\n            else\n                throw new TypeError(\"a arity\");\n            return;\n        case \"t\":\n            if (op.length === 3) {\n                okRef(op[1]);\n                if (!Number.isInteger(op[2]) || op[2] < 0)\n                    throw new TypeError(\"t count\");\n            }\n            else if (op.length === 2) {\n                if (!Number.isInteger(op[1]) || op[1] < 0)\n                    throw new TypeError(\"t count\");\n            }\n            else\n                throw new TypeError(\"t arity\");\n            return;\n        case \"p\": {\n            const [i, r, items] = op.length === 5 ? [op[2], op[3], op[4]] : op.length === 4 ? [op[1], op[2], op[3]] : [];\n            if (items === undefined)\n                throw new TypeError(\"p arity\");\n            if (op.length === 5)\n                okRef(op[1]);\n            if (!Number.isInteger(i) || i < 0)\n                throw new TypeError(\"p index\");\n            if (!Number.isInteger(r) || r < 0)\n                throw new TypeError(\"p remove\");\n            if (!Array.isArray(items))\n                throw new TypeError(\"p items\");\n            return;\n        }\n        case \"m\":\n            if (op.length === 3)\n                okRef(op[1]);\n            else if (op.length !== 2)\n                throw new TypeError(\"m arity\");\n            assertPermutation(op[op.length - 1]);\n            return;\n        case \"#\": {\n            if (op.length !== 3 || !Number.isInteger(op[1]) || op[1] < 0 || !Array.isArray(op[2])) {\n                throw new TypeError(\"# shape\");\n            }\n            assertSafePath(op[2]);\n            return;\n        }\n        // Silently skipping an unknown verb is how a newer producer's op vanishes.\n        default:\n            throw new TypeError(`unknown op verb: ${String(verb)}`);\n    }\n}\nexport function assertSafePath(path) {\n    for (const seg of path) {\n        if (typeof seg === \"string\") {\n            if (RESERVED_SEGMENTS.has(seg))\n                throw new UnsafePathError(seg);\n        }\n        else if (!Number.isInteger(seg) || seg < 0) {\n            throw new UnsafePathError(seg);\n        }\n    }\n}\n/**\n * An index may address an existing element or append exactly one past the end.\n *\n * This is not an arbitrary cap — it is what keeps the value a `JsonValue`. A\n * sparse array does not survive a JSON round trip: holes serialise to `null` and\n * return as real properties, so `arr[7] = x` on a length-3 array already produces\n * state a replica cannot match. Rejecting the write is more honest than silently\n * diverging.\n *\n * It also removes the denial of service it would otherwise permit:\n * `[\"s\", [\"xs\", 4294967290], 1]` allocates a 4.29-billion-entry array from one op.\n * Growth stays possible and stays proportional — the tracker already emits\n * `arr.length = n` as a splice of explicit nulls, whose op size grows with the\n * gap, so a large growth costs a large op rather than a small one.\n */\nfunction assertIndexInRange(parent, index) {\n    if (index > parent.length)\n        throw new UnsafePathError(index);\n}\n// ─── Applier ─────────────────────────────────────────────────────────────────\nexport class PathError extends Error {\n    path;\n    constructor(path) {\n        super(`unresolvable path: ${JSON.stringify(path)}`);\n        this.path = path;\n        this.name = \"PathError\";\n    }\n}\n/**\n * Apply ops to a plain mutable value. Returns the value, because `r` replaces it\n * outright and cannot be done in place.\n *\n * Takes decoded ops. Path ids and omitted paths are a wire concern — run\n * `decode` first if the ops came from a boundary.\n */\nexport function apply(target, ops) {\n    return applyOps(target, ops);\n}\nfunction applyOps(target, ops) {\n    let root = target;\n    for (const op of ops) {\n        assertValidOp(op);\n        if (op[0] === \"r\") {\n            // Adopted, not copied. The consumer owns the batch it was handed.\n            //\n            // Fanning one batch out to several consumers in-process therefore makes\n            // their replicas alias each other. That is an ownership rule, not a\n            // defect: copy the batch at the fan-out point, or let each consumer\n            // decode its own. A batch that crosses a real boundary is already\n            // distinct, because serialisation produces fresh objects.\n            root = op[1];\n            continue;\n        }\n        const path = op[1];\n        assertSafePath(path);\n        if (op[0] === \"p\") {\n            const target_ = path.length === 0 ? root : resolve(root, path);\n            if (!Array.isArray(target_))\n                throw new PathError(path);\n            target_.splice(op[2], op[3]);\n            const chunkSize = 10_000;\n            for (let offset = 0; offset < op[4].length; offset += chunkSize) {\n                target_.splice(op[2] + offset, 0, ...op[4].slice(offset, offset + chunkSize));\n            }\n            continue;\n        }\n        if (op[0] === \"m\") {\n            const target_ = path.length === 0 ? root : resolve(root, path);\n            if (!Array.isArray(target_) || target_.length !== op[2].length)\n                throw new PathError(path);\n            const previous = target_.slice();\n            for (let index = 0; index < op[2].length; index++)\n                target_[index] = previous[op[2][index]];\n            continue;\n        }\n        // s/d/a/t can never target the root — the type forbids it.\n        const parent = resolve(root, path.slice(0, -1));\n        const key = path[path.length - 1];\n        if (Array.isArray(parent)) {\n            if (typeof key !== \"number\")\n                throw new UnsafePathError(key);\n            assertIndexInRange(parent, key);\n        }\n        // defineProperty rather than assignment: a setter inherited from the prototype\n        // chain would otherwise run on write.\n        const write = (value) => {\n            Object.defineProperty(parent, key, { value, writable: true, enumerable: true, configurable: true });\n        };\n        const read = () => (Object.hasOwn(parent, key) ? parent[key] : undefined);\n        switch (op[0]) {\n            case \"s\":\n                write(op[2]);\n                break;\n            case \"d\":\n                if (Array.isArray(parent)) {\n                    if (typeof key !== \"number\" || key >= parent.length)\n                        throw new PathError(path);\n                    parent.splice(key, 1);\n                }\n                else\n                    delete parent[key];\n                break;\n            case \"a\": {\n                const current = read();\n                if (typeof current !== \"string\")\n                    throw new PathError(path);\n                write(`${current}${op[2]}`);\n                break;\n            }\n            case \"t\": {\n                const current = read();\n                if (typeof current !== \"string\")\n                    throw new PathError(path);\n                write(current.slice(op[2]));\n                break;\n            }\n        }\n    }\n    return root;\n}\n/** Apply one decoded operation batch without mutating the previous immutable value. */\nexport function applyImmutable(target, ops) {\n    return applyImmutableBatches(target, [ops]);\n}\n/**\n * Apply decoded operation batches as one final-result-only replay.\n *\n * Containers copied for an earlier batch may be mutated while applying a later\n * batch, so this deliberately exposes no intermediate revisions.\n */\nexport function applyImmutableBatches(target, batches) {\n    let root = target;\n    const owned = new WeakSet();\n    for (const ops of batches) {\n        for (const op of ops) {\n            assertValidOp(op);\n            if (op[0] === \"r\") {\n                root = op[1];\n                continue;\n            }\n            if (op[0] === \"p\") {\n                const appended = appendCopy(root, op, owned);\n                if (appended !== undefined) {\n                    root = appended;\n                    continue;\n                }\n            }\n            root = copyContainers(root, op[0] === \"p\" || op[0] === \"m\" ? op[1] : op[1].slice(0, -1), owned);\n            root = applyOps(root, [op]);\n        }\n    }\n    return root;\n}\n/**\n * An append to an array not yet copied in this replay, built as one copy with the items (`concat`) instead of a copy that\n * the insert then grows, which copies it again. `undefined` for any other splice and for any path that is not a plain\n * walk over own properties, which takes the general path and so fails with its errors.\n */\nfunction appendCopy(root, op, owned) {\n    const [, path, index, deleteCount, items] = op;\n    if (deleteCount !== 0)\n        return undefined;\n    let target = root;\n    for (const segment of path) {\n        const valid = typeof segment === \"string\"\n            ? !RESERVED_SEGMENTS.has(segment) && isObj(target) && !Array.isArray(target)\n            : Number.isInteger(segment) && segment >= 0 && Array.isArray(target);\n        if (!valid || !Object.hasOwn(target, segment))\n            return undefined;\n        target = target[segment];\n    }\n    if (!Array.isArray(target) || owned.has(target) || index !== target.length)\n        return undefined;\n    const appended = target.concat(items);\n    owned.add(appended);\n    if (path.length === 0)\n        return appended;\n    const parentPath = path.slice(0, -1);\n    const copiedRoot = copyContainers(root, parentPath, owned);\n    Object.defineProperty(resolve(copiedRoot, parentPath), path[path.length - 1], {\n        value: appended,\n        writable: true,\n        enumerable: true,\n        configurable: true,\n    });\n    return copiedRoot;\n}\nfunction copyContainers(root, path, owned) {\n    const copy = (value) => {\n        if (Array.isArray(value))\n            return value.slice();\n        if (!isObj(value))\n            throw new PathError(path);\n        const result = Object.create(Object.getPrototypeOf(value) === null ? null : Object.prototype);\n        for (const key of Object.keys(value)) {\n            Object.defineProperty(result, key, {\n                value: value[key],\n                writable: true,\n                enumerable: true,\n                configurable: true,\n            });\n        }\n        return result;\n    };\n    if (!isObj(root))\n        throw new PathError(path);\n    let copiedRoot;\n    if (owned.has(root))\n        copiedRoot = root;\n    else {\n        copiedRoot = copy(root);\n        owned.add(copiedRoot);\n    }\n    let destination = copiedRoot;\n    for (const segment of path) {\n        if (!Object.hasOwn(destination, segment))\n            throw new PathError(path);\n        if (Array.isArray(destination) && typeof segment !== \"number\")\n            throw new UnsafePathError(segment);\n        const child = destination[segment];\n        if (!isObj(child))\n            throw new PathError(path);\n        if (owned.has(child)) {\n            destination = child;\n            continue;\n        }\n        const copiedChild = copy(child);\n        Object.defineProperty(destination, segment, {\n            value: copiedChild,\n            writable: true,\n            enumerable: true,\n            configurable: true,\n        });\n        owned.add(copiedChild);\n        destination = copiedChild;\n    }\n    return copiedRoot;\n}\nfunction resolveValue(root, path) {\n    let node = root;\n    for (const seg of path) {\n        if (!isObj(node))\n            throw new PathError(path);\n        if (Array.isArray(node) && typeof seg !== \"number\")\n            throw new UnsafePathError(seg);\n        // Own properties only: an inherited getter must not run, and a walk must not\n        // escape the value into the prototype chain.\n        if (!Object.hasOwn(node, seg))\n            throw new PathError(path);\n        node = node[seg];\n    }\n    return node;\n}\nfunction resolve(root, path) {\n    const node = resolveValue(root, path);\n    if (!isObj(node))\n        throw new PathError(path);\n    return node;\n}\n// ─── Codec ───────────────────────────────────────────────────────────────────\n//\n// Path interning and arity omission live between the tracker and a boundary;\n// `Op` and `apply` know nothing about them.\n//\n// Consecutive batches of one encoder may be concatenated into one batch (links\n// coalesce waiting state this way): only path ids span batches, and every batch\n// starts with an explicit path.\n//\n// ONE PAIR PER INDEPENDENT STATE STREAM. Every decoder must observe exactly the\n// batches encoded by its matching encoder, beginning with that state's base.\n// Sharing a transport connection does not make separately hydrated states one\n// stream.\nconst pathKey = (path) => JSON.stringify(path);\n/**\n * Intern on SECOND use. A definition costs more than the path it replaces, so\n * interning on first use loses on the many paths written exactly once.\n */\nexport function encoder() {\n    const seen = new Set();\n    const ids = new Map();\n    let nextId = 0;\n    let previous; // last path in THIS batch\n    return {\n        encode(ops) {\n            // Arity omission is scoped to a batch. Letting it span batches would make\n            // a batch's first op depend on the previous batch's last one, so a reader\n            // that skips or reorders a batch decodes into the wrong path. Ids are the\n            // only cross-batch state, and the dictionary makes those explicit.\n            previous = undefined;\n            const out = [];\n            for (const op of ops) {\n                if (op[0] === \"r\") {\n                    out.push(op);\n                    // A base batch is a RECOVERY POINT: a reader replays from the last one\n                    // with a fresh decoder. So everything after it must be self-contained.\n                    // Keeping ids across a replacement emits references to definitions the\n                    // reader never saw — recovery fails with an unresolvable path id.\n                    seen.clear();\n                    ids.clear();\n                    nextId = 0;\n                    previous = undefined;\n                    continue;\n                }\n                const path = op[1];\n                const key = pathKey(path);\n                // Same path as the previous op: drop the ref entirely.\n                if (key === previous) {\n                    switch (op[0]) {\n                        case \"s\":\n                            out.push([\"s\", op[2]]);\n                            break;\n                        case \"d\":\n                            out.push([\"d\"]);\n                            break;\n                        case \"a\":\n                            out.push([\"a\", op[2]]);\n                            break;\n                        case \"t\":\n                            out.push([\"t\", op[2]]);\n                            break;\n                        case \"p\":\n                            out.push([\"p\", op[2], op[3], op[4]]);\n                            break;\n                        case \"m\":\n                            out.push([\"m\", op[2]]);\n                            break;\n                    }\n                    continue;\n                }\n                let ref = path;\n                const existing = ids.get(key);\n                if (existing !== undefined) {\n                    ref = existing;\n                }\n                else if (seen.has(key)) {\n                    const id = nextId++;\n                    ids.set(key, id);\n                    out.push([\"#\", id, path]); // second use: define, then reference\n                    ref = id;\n                }\n                else {\n                    seen.add(key); // first use: inline\n                }\n                switch (op[0]) {\n                    case \"s\":\n                        out.push([\"s\", ref, op[2]]);\n                        break;\n                    case \"d\":\n                        out.push([\"d\", ref]);\n                        break;\n                    case \"a\":\n                        out.push([\"a\", ref, op[2]]);\n                        break;\n                    case \"t\":\n                        out.push([\"t\", ref, op[2]]);\n                        break;\n                    case \"p\":\n                        out.push([\"p\", ref, op[2], op[3], op[4]]);\n                        break;\n                    case \"m\":\n                        out.push([\"m\", ref, op[2]]);\n                        break;\n                }\n                previous = key;\n            }\n            return out;\n        },\n    };\n}\nexport function decoder() {\n    const paths = new Map();\n    return {\n        decode(wire) {\n            let previous; // scoped to the batch, as in encode\n            const out = [];\n            for (const op of wire) {\n                assertValidWireOp(op);\n                if (op[0] === \"#\") {\n                    assertSafePath(op[2]);\n                    paths.set(op[1], op[2]);\n                    continue;\n                }\n                if (op[0] === \"r\") {\n                    out.push(op);\n                    paths.clear();\n                    previous = undefined;\n                    continue;\n                }\n                // Arity tells us whether a ref is present: the short forms omit it.\n                const short = (op[0] === \"d\" && op.length === 1) ||\n                    (op[0] !== \"d\" && op[0] !== \"p\" && op.length === 2) ||\n                    (op[0] === \"p\" && op.length === 4);\n                let path;\n                if (short) {\n                    if (previous === undefined)\n                        throw new PathError([]);\n                    path = previous;\n                }\n                else {\n                    const ref = op[1];\n                    if (typeof ref === \"number\") {\n                        const resolved = paths.get(ref);\n                        if (resolved === undefined)\n                            throw new PathError(ref);\n                        path = resolved;\n                    }\n                    else {\n                        path = ref;\n                    }\n                    previous = path;\n                }\n                if (op[0] !== \"p\" && op[0] !== \"m\" && path.length === 0)\n                    throw new PathError(path);\n                switch (op[0]) {\n                    case \"s\":\n                        out.push([\"s\", path, (short ? op[1] : op[2])]);\n                        break;\n                    case \"d\":\n                        out.push([\"d\", path]);\n                        break;\n                    case \"a\":\n                        out.push([\"a\", path, (short ? op[1] : op[2])]);\n                        break;\n                    case \"t\":\n                        out.push([\"t\", path, (short ? op[1] : op[2])]);\n                        break;\n                    case \"p\": {\n                        const [i, r, items] = short\n                            ? [op[1], op[2], op[3]]\n                            : [op[2], op[3], op[4]];\n                        out.push([\"p\", path, i, r, items]);\n                        break;\n                    }\n                    case \"m\":\n                        out.push([\"m\", path, (short ? op[1] : op[2])]);\n                        break;\n                }\n            }\n            return out;\n        },\n    };\n}\n//# sourceMappingURL=index.js.map","/**\n * Replicated state: an immutable JSON value with ordered, serialized change notifications. Either authoritative and\n * mutable (`replicatedState(initial)`) or a publication-only view of an external revision source\n * (`replicatedState(source)`).\n */\nimport { BACKGROUND_CONTEXT } from \"./context/index.js\";\nimport { track } from \"./delta/index.js\";\n/** One public subscription, independent of producer and other subscriber progress. */\nclass StateSubscriber {\n    #listener;\n    #reportError;\n    #pending = [];\n    #running = false;\n    #started = false;\n    #closed = false;\n    constructor(listener, reportError) {\n        this.#listener = listener;\n        this.#reportError = reportError;\n    }\n    push(frame) {\n        if (this.#closed)\n            return;\n        if (this.#pending.length === 100) {\n            // A cold replica can queue updates reentrantly before this subscriber's first hydration starts.\n            const hydration = this.#started ? undefined : this.#pending[0];\n            this.#pending.length = 0;\n            if (hydration !== undefined)\n                this.#pending.push(hydration);\n        }\n        this.#pending.push(frame);\n    }\n    drain() {\n        if (this.#running || this.#closed)\n            return;\n        this.#running = true;\n        for (let frame = this.#pending.shift(); frame !== undefined; frame = this.#pending.shift()) {\n            this.#started = true;\n            try {\n                const result = this.#listener(frame.value, frame.context, frame.delivery);\n                if (isPromiseLike(result)) {\n                    void Promise.resolve(result).then(() => this.#resume(), (error) => {\n                        this.#report(error);\n                        this.#resume();\n                    });\n                    return;\n                }\n            }\n            catch (error) {\n                this.#report(error);\n            }\n        }\n        this.#running = false;\n    }\n    clear() {\n        this.#pending.length = 0;\n    }\n    close() {\n        this.#closed = true;\n        this.clear();\n    }\n    #resume() {\n        this.#running = false;\n        this.drain();\n    }\n    #report(error) {\n        try {\n            this.#reportError(toError(error));\n        }\n        catch (reportError) {\n            reportErrorAsync(toError(reportError));\n        }\n    }\n}\n/** Maintains local publication order independently of how revisions are produced. */\nclass ReplicatedStatePublisher {\n    #listeners = new Map();\n    #reportError;\n    #publications = [];\n    #value;\n    #sequence = 0;\n    #delivering = false;\n    constructor(initial, reportError = reportErrorAsync) {\n        this.#value = initial;\n        this.#reportError = reportError;\n    }\n    get value() {\n        return this.#value;\n    }\n    snapshot() {\n        return { value: this.#value, sequence: this.#sequence };\n    }\n    subscribe(listener) {\n        const { value, sequence } = this.snapshot();\n        const subscriber = new StateSubscriber(listener, this.#reportError);\n        this.#listeners.set(subscriber, sequence);\n        // Hydration has no caller; it is delivered with the background context.\n        subscriber.push({ value, context: BACKGROUND_CONTEXT, delivery: { kind: \"hydrate\", sequence } });\n        subscriber.drain();\n        return () => {\n            subscriber.close();\n            this.#listeners.delete(subscriber);\n        };\n    }\n    /** Publish an already-prepared immutable revision. Subscriber failures are reported, never thrown. */\n    publish(value, context) {\n        this.#value = value;\n        this.#sequence += 1;\n        this.#publications.push({ value, sequence: this.#sequence, context });\n        if (this.#delivering)\n            return;\n        this.#delivering = true;\n        try {\n            for (let publication = this.#publications.shift(); publication !== undefined; publication = this.#publications.shift()) {\n                const delivery = { kind: \"update\", sequence: publication.sequence };\n                for (const [subscriber, hydratedSequence] of [...this.#listeners]) {\n                    if (publication.sequence <= hydratedSequence)\n                        continue;\n                    subscriber.push({ value: publication.value, context: publication.context, delivery });\n                    subscriber.drain();\n                }\n            }\n        }\n        finally {\n            this.#delivering = false;\n        }\n    }\n}\nclass MutableReplicatedStateImpl {\n    #tracker;\n    #publisher;\n    #changing = false;\n    constructor(initial) {\n        this.#tracker = track(initial);\n        this.#publisher = new ReplicatedStatePublisher(this.#tracker.value);\n    }\n    get value() {\n        return this.#tracker.value;\n    }\n    change(context, mutate) {\n        if (this.#changing)\n            throw new Error(\"Replicated state cannot be changed reentrantly from a change callback\");\n        this.#changing = true;\n        let prepared;\n        try {\n            const change = this.#tracker.beginChange();\n            try {\n                const outcome = mutate(change.state);\n                if (isPromiseLike(outcome)) {\n                    void Promise.resolve(outcome).catch(() => undefined);\n                    throw new TypeError(\"Replicated state change callbacks must be synchronous\");\n                }\n                prepared = change.prepare();\n            }\n            catch (error) {\n                change.abort();\n                throw error;\n            }\n        }\n        finally {\n            this.#changing = false;\n        }\n        this.#tracker.adopt(prepared);\n        if (prepared.ops.length > 0)\n            this.#publisher.publish(prepared.value, context);\n    }\n    replace(context, value) {\n        if (this.#changing)\n            throw new Error(\"Replicated state cannot be replaced from a change callback\");\n        const prepared = this.#tracker.prepareReplace(value);\n        this.#tracker.adopt(prepared);\n        if (prepared.ops.length > 0)\n            this.#publisher.publish(prepared.value, context);\n    }\n    subscribe(listener) {\n        return this.#publisher.subscribe(listener);\n    }\n}\nclass AttachedReplicatedStateImpl {\n    #publisher;\n    #attachment;\n    #reportError;\n    #cursor;\n    #disposed = false;\n    constructor(attachment, options) {\n        const { snapshot } = attachment;\n        assertCursor(snapshot.cursor, \"snapshot\");\n        this.#attachment = attachment;\n        this.#cursor = snapshot.cursor;\n        this.#reportError = options.onError ?? reportErrorAsync;\n        this.#publisher = new ReplicatedStatePublisher(snapshot.value, (error) => this.#report(error));\n    }\n    get value() {\n        return this.#publisher.value;\n    }\n    subscribe(listener) {\n        return this.#publisher.subscribe(listener);\n    }\n    activate() {\n        this.#attachment.activate((frame) => this.#receive(frame));\n    }\n    dispose() {\n        if (this.#disposed)\n            return;\n        this.#disposed = true;\n        this.#attachment.dispose();\n    }\n    #receive(frame) {\n        if (this.#disposed)\n            return;\n        try {\n            assertCursor(frame.cursor, \"frame\");\n            const expected = this.#cursor + 1;\n            if (frame.cursor !== expected) {\n                throw new Error(`Replicated state source cursor has a gap: expected ${expected}, received ${frame.cursor}`);\n            }\n            this.#cursor = frame.cursor;\n            this.#publisher.publish(frame.value, frame.context);\n        }\n        catch (error) {\n            this.#fail(toError(error));\n        }\n    }\n    #fail(error) {\n        if (this.#disposed)\n            return;\n        this.#disposed = true;\n        try {\n            this.#attachment.dispose();\n        }\n        catch (disposeError) {\n            this.#report(new AggregateError([error, disposeError], \"Replicated state source contract failed\"));\n            return;\n        }\n        this.#report(error);\n    }\n    #report(error) {\n        try {\n            this.#reportError(toError(error));\n        }\n        catch (reportError) {\n            reportErrorAsync(toError(reportError));\n        }\n    }\n}\n/** Attach a publication-only replicated state to one authoritative immutable source stream. */\nfunction attachReplicatedStateSource(source, options = {}) {\n    const attachment = source.attach();\n    try {\n        const state = new AttachedReplicatedStateImpl(attachment, options);\n        state.activate();\n        return state;\n    }\n    catch (error) {\n        try {\n            attachment.dispose();\n        }\n        catch (disposeError) {\n            throw new AggregateError([error, disposeError], \"Failed to attach replicated state source\");\n        }\n        throw error;\n    }\n}\nfunction assertCursor(cursor, kind) {\n    if (!Number.isSafeInteger(cursor))\n        throw new TypeError(`Replicated state source ${kind} cursor must be a safe integer`);\n}\nfunction isPromiseLike(value) {\n    return (((typeof value === \"object\" && value !== null) || typeof value === \"function\") &&\n        typeof value.then === \"function\");\n}\nfunction reportErrorAsync(error) {\n    queueMicrotask(() => {\n        throw error;\n    });\n}\nfunction toError(error) {\n    return error instanceof Error ? error : new Error(String(error));\n}\nexport function replicatedState(initialOrSource, options) {\n    if (isReplicatedStateSource(initialOrSource))\n        return attachReplicatedStateSource(initialOrSource, options);\n    return new MutableReplicatedStateImpl(initialOrSource);\n}\nfunction isReplicatedStateSource(value) {\n    return typeof value.attach === \"function\";\n}\n//# sourceMappingURL=state.js.map","/** Apply an erased ID brand at a trusted numeric allocation or decoding boundary. */\nexport function idFromNumber(value) {\n    return value;\n}\n/** Apply the erased commit-sequence brand at a trusted storage boundary. */\nexport function seqFromNumber(value) {\n    return value;\n}\n//# sourceMappingURL=ids.js.map","import { copyJson } from \"@earendil-works/chord\";\nimport { idFromNumber } from \"./ids.js\";\nexport function defineDoc(definition) {\n    validateDefinition(definition);\n    return { definition };\n}\nexport function defineDocFamily(definition) {\n    validateDefinition(definition);\n    return { definition };\n}\nfunction validateDefinition(definition) {\n    if (!Number.isSafeInteger(definition.version) || definition.version < 1) {\n        throw new TypeError(`Document ${definition.kind} version must be a positive integer`);\n    }\n}\n/** Resolve an overloaded argument list and return the index after the owner and family key. */\nexport function resolveAddress(definition, args) {\n    let index = 0;\n    let scope;\n    switch (definition.scope) {\n        case \"session\":\n            scope = { kind: \"session\" };\n            break;\n        case \"conversation\":\n            scope = { kind: \"conversation\", conversationId: ownerId(args[index++], definition) };\n            break;\n        case \"task\":\n            scope = { kind: \"task\", taskId: ownerId(args[index++], definition) };\n            break;\n    }\n    const key = definition.family === true ? args[index++] : undefined;\n    const address = key === undefined ? { kind: definition.kind, scope } : { kind: definition.kind, scope, key };\n    return { address, id: addressId(address), nextArgument: index };\n}\nfunction ownerId(value, definition) {\n    if (typeof value !== \"number\" || !Number.isSafeInteger(value)) {\n        throw new TypeError(`Document ${definition.kind} requires a ${definition.scope} ID`);\n    }\n    return idFromNumber(value);\n}\n/** Stable string identity of one logical address. */\nexport function addressId(address) {\n    const owner = address.scope.kind === \"session\"\n        ? null\n        : address.scope.kind === \"conversation\"\n            ? address.scope.conversationId\n            : address.scope.taskId;\n    return JSON.stringify([address.kind, address.scope.kind, owner, address.key ?? null]);\n}\n/** Build the storage create record for a new incarnation at an address. */\nexport function documentCreate(definition, address, id) {\n    const key = address.key === undefined ? {} : { key: address.key };\n    switch (address.scope.kind) {\n        case \"session\":\n            return { id, kind: address.kind, ...key, scope: address.scope };\n        case \"task\":\n            return { id, kind: address.kind, ...key, scope: address.scope };\n        case \"conversation\":\n            return {\n                id,\n                kind: address.kind,\n                ...key,\n                scope: address.scope,\n                history: definition.history,\n                fork: definition.fork,\n            };\n    }\n}\n/** Reject typed access whose token disagrees with the persisted scope, history, or fork semantics. */\nexport function checkRecordScope(definition, record) {\n    if (record.scope.kind !== definition.scope ||\n        (record.scope.kind === \"conversation\" &&\n            (record.history !== definition.history || record.fork !== definition.fork))) {\n        throw new TypeError(`Document ${record.id} (${record.kind}) does not match the supplied definition semantics`);\n    }\n}\n/** Reject typed access to a stored version the supplied definition cannot use. */\nexport function checkRecordVersion(definition, record, version) {\n    if (version > definition.version) {\n        throw new Error(`Document ${record.id} (${record.kind}) has newer version ${version} than ${definition.version}`);\n    }\n    if (version < definition.version && definition.migrate === undefined) {\n        throw new Error(`Document ${record.id} (${record.kind}) requires migration from version ${version}`);\n    }\n}\n/** Validate and materialize a detached stored value for typed access. */\nexport function materializeDocument(definition, stored) {\n    return materializeDocumentValue(definition, stored.record, stored.version, stored.value);\n}\n/** Validate and materialize one detached value before its first persisted incarnation. */\nexport function materializeDocumentValue(definition, record, version, value) {\n    checkRecordScope(definition, record);\n    checkRecordVersion(definition, record, version);\n    if (version === definition.version)\n        return value;\n    return copyJson(definition.migrate(value, version));\n}\n//# sourceMappingURL=documents.js.map","/**\n * The message of a thrown value, without throwing itself: `String()` throws for values such as `Object.create(null)`,\n * and code that formats an error must not fail for the value it formats.\n */\nexport function errorMessage(error) {\n    if (error instanceof Error)\n        return error.message;\n    try {\n        return String(error);\n    }\n    catch {\n        return Object.prototype.toString.call(error);\n    }\n}\n/** A transaction read a table after its first table write. Read every required row before writing. */\nexport class ReadAfterWrite extends Error {\n    constructor(method) {\n        super(`Tx.${method}() cannot read tables after the first table write`);\n        this.name = \"ReadAfterWrite\";\n    }\n}\n/**\n * A Storage read rejected an invalid request, such as an unknown conversation or a cursor from another scan, with no\n * durable effect. Unlike any other error a Storage throws, it fails only that read, not the Session; from `commit()` it is\n * fatal like any other.\n */\nexport class StorageRequestError extends Error {\n    constructor(message) {\n        super(message);\n        this.name = \"StorageRequestError\";\n    }\n}\n/**\n * The Session failed, so nothing runs or commits any more. It fails when a Storage method throws, a commit cannot be\n * adopted, or the Harness's own bookkeeping throws (a scheduler commit, an internal commit listener, a registry whose\n * `snapshot()` throws). `cause` is that first error. Reopen the Session; reopening recovers from what was committed.\n */\nexport class SessionFailed extends Error {\n    constructor(cause) {\n        super(\"Session failed after a storage error; close and reopen it\", { cause });\n        this.name = \"SessionFailed\";\n    }\n}\n/** A submission reached a busy conversation and was not admitted. */\nexport class ConversationBusy extends Error {\n    conversationId;\n    constructor(conversationId) {\n        super(`Conversation ${conversationId} is busy`);\n        this.name = \"ConversationBusy\";\n        this.conversationId = conversationId;\n    }\n}\n//# sourceMappingURL=errors.js.map","import { withoutAbortSignal } from \"@earendil-works/chord/context\";\nimport { errorMessage } from \"../errors.js\";\n/** Maximum exact committed frames retained behind one unavailable watch listener. */\nconst MAX_PENDING_WATCH_FRAMES = 100;\n/** Canonical terminal update for a retired document incarnation. */\nexport const RETIREMENT_OPERATIONS = [[\"r\", null]];\n/**\n * Session-to-Chord bridge owned one-to-one by one attached state: a document, or a conversation view. A `null` value\n * retires it. @internal\n */\nexport class CommittedStateSource {\n    #attachments = new Set();\n    #release;\n    /** Released on disposal. */\n    #value;\n    #cursor = 0;\n    #retired = false;\n    #closed = false;\n    constructor(value, release) {\n        this.#value = value;\n        this.#release = release;\n    }\n    attach() {\n        if (this.#closed)\n            throw new Error(\"State source is closed\");\n        const attachment = new SessionSourceAttachment({ value: this.#value, cursor: this.#cursor }, () => {\n            this.#attachments.delete(attachment);\n            if (this.#attachments.size === 0)\n                this.#finishDisposal();\n        });\n        this.#attachments.add(attachment);\n        return attachment;\n    }\n    advance(value, ops, context) {\n        if (this.#closed || this.#retired)\n            return;\n        this.#value = value;\n        this.#cursor += 1;\n        if (value === null)\n            this.#retired = true;\n        const frame = {\n            cursor: this.#cursor,\n            value,\n            ops,\n            context,\n        };\n        for (const attachment of [...this.#attachments])\n            attachment.publish(frame);\n    }\n    /** Stop publishing; the attached states keep their last value. A failure ends them the same way. */\n    closeSession() {\n        if (this.#closed)\n            return;\n        for (const attachment of [...this.#attachments])\n            attachment.dispose();\n        this.#finishDisposal();\n    }\n    #finishDisposal() {\n        if (this.#closed)\n            return;\n        this.#closed = true;\n        this.#value = undefined;\n        const release = this.#release;\n        this.#release = undefined;\n        release?.();\n    }\n}\nclass SessionSourceAttachment {\n    snapshot;\n    #release;\n    #frames = [];\n    #listener;\n    #activated = false;\n    #disposed = false;\n    #scheduled = false;\n    #delivering = false;\n    constructor(snapshot, release) {\n        this.snapshot = snapshot;\n        this.#release = release;\n    }\n    activate(listener) {\n        if (this.#activated)\n            throw new Error(\"State attachment is already active\");\n        if (this.#disposed)\n            throw new Error(\"State attachment is disposed\");\n        this.#activated = true;\n        this.#listener = listener;\n        this.#drain();\n    }\n    publish(frame) {\n        if (this.#disposed)\n            return;\n        this.#frames.push(frame);\n        if (!this.#activated || this.#delivering || this.#scheduled)\n            return;\n        this.#scheduled = true;\n        queueMicrotask(() => {\n            this.#scheduled = false;\n            if (this.#disposed)\n                return;\n            try {\n                this.#drain();\n            }\n            catch {\n                // Chord's frame listener contains source-contract failures. Isolate an\n                // unexpected direct listener failure to this attachment as well.\n                this.dispose();\n            }\n        });\n    }\n    dispose() {\n        if (this.#disposed)\n            return;\n        this.#disposed = true;\n        this.#frames.length = 0;\n        this.#listener = undefined;\n        const release = this.#release;\n        this.#release = undefined;\n        release?.();\n    }\n    #drain() {\n        const listener = this.#listener;\n        if (listener === undefined || this.#delivering || this.#disposed)\n            return;\n        this.#delivering = true;\n        try {\n            while (!this.#disposed) {\n                const frame = this.#frames.shift();\n                if (frame === undefined)\n                    break;\n                listener(frame);\n            }\n        }\n        finally {\n            this.#delivering = false;\n        }\n    }\n}\n/**\n * Serialized exact-frame watch bound to one document incarnation or conversation view. A `null` value retires it.\n * @internal\n */\nexport class CommittedWatch {\n    #detach;\n    #report;\n    #replace;\n    #closed = Promise.withResolvers();\n    #pending = [];\n    #value;\n    #listener;\n    #started = false;\n    #scheduled = false;\n    #running = false;\n    #retired = false;\n    /** Set once, by `#terminate()`. */\n    #end;\n    #cancellationSignal;\n    #cancellationListener;\n    /**\n     * `report` gets a listener's throw, which also ends the watch. `replace` gives the value an overflow delivers; by\n     * default the newest value.\n     */\n    constructor(value, detach, report, replace) {\n        this.#value = value;\n        this.#detach = detach;\n        this.#report = report;\n        this.#replace = replace;\n    }\n    get value() {\n        return this.#value;\n    }\n    get closed() {\n        return this.#closed.promise;\n    }\n    start(listener) {\n        if (this.#started)\n            throw new Error(\"Watch is already started\");\n        if (this.#end !== undefined)\n            throw new Error(\"Watch is stopped\");\n        this.#started = true;\n        this.#listener = listener;\n        if (this.#pending.length > 0)\n            this.#schedule();\n    }\n    stop() {\n        this.#terminate({ reason: \"stopped\" });\n        return this.#closed.promise;\n    }\n    observeCancellation(signal) {\n        if (this.#cancellationSignal !== undefined)\n            throw new Error(\"Watch cancellation is already installed\");\n        if (this.#end !== undefined)\n            return;\n        this.#cancellationSignal = signal;\n        this.#cancellationListener = () => this.cancel();\n        signal.addEventListener(\"abort\", this.#cancellationListener, { once: true });\n        if (signal.aborted)\n            this.cancel();\n    }\n    cancel() {\n        this.#terminate({ reason: \"cancelled\" });\n    }\n    /** End with `session_closed`, or with `session_failed` and the error when the Session failed. */\n    closeSession(failure) {\n        this.#terminate(failure === undefined ? { reason: \"session_closed\" } : { reason: \"session_failed\", error: failure.error });\n    }\n    advance(value, ops, context) {\n        if (this.#end !== undefined || this.#retired)\n            return;\n        if (value === null)\n            this.#retired = true;\n        if (this.#pending.length >= MAX_PENDING_WATCH_FRAMES) {\n            this.#pending.length = 0;\n            const replacement = this.#replace?.() ?? value;\n            this.#pending.push({ value: replacement, ops: [[\"r\", replacement]], context });\n        }\n        else {\n            this.#pending.push({ value, ops, context });\n        }\n        if (this.#started)\n            this.#schedule();\n    }\n    #schedule() {\n        if (this.#scheduled || this.#running || this.#end !== undefined)\n            return;\n        this.#scheduled = true;\n        queueMicrotask(() => {\n            this.#scheduled = false;\n            void this.#drain();\n        });\n    }\n    async #drain() {\n        if (this.#running || this.#end !== undefined || !this.#started)\n            return;\n        this.#running = true;\n        try {\n            while (this.#end === undefined) {\n                const frame = this.#pending.shift();\n                if (frame === undefined)\n                    break;\n                this.#value = frame.value;\n                const deliveryContext = withoutAbortSignal(frame.context);\n                try {\n                    await this.#listener(frame.value, frame.ops, deliveryContext);\n                }\n                catch (error) {\n                    if (this.#end === undefined) {\n                        this.#report(error);\n                        this.#terminate({ reason: \"listener_error\", error: toError(error) });\n                    }\n                    break;\n                }\n                if (frame.value === null) {\n                    this.#terminate({ reason: \"retired\" });\n                    break;\n                }\n            }\n        }\n        finally {\n            this.#running = false;\n            if (this.#end === undefined && this.#pending.length > 0)\n                this.#schedule();\n        }\n    }\n    /** End the watch, once: detach, drop pending frames, and settle `closed`. A callback already running keeps running. */\n    #terminate(end) {\n        if (this.#end !== undefined)\n            return;\n        this.#end = end;\n        this.#detach();\n        this.#pending.length = 0;\n        if (this.#cancellationListener !== undefined) {\n            this.#cancellationSignal?.removeEventListener(\"abort\", this.#cancellationListener);\n        }\n        this.#closed.resolve(end);\n    }\n}\nfunction toError(error) {\n    return error instanceof Error ? error : new Error(errorMessage(error));\n}\n//# sourceMappingURL=observation.js.map","import { addressId } from \"../documents.js\";\nconst SCAN_PAGE_SIZE = 256;\n/** Select every persisted conversation document copied by one fork. */\nexport async function prepareForkDocumentCopies(storage, parentConversationId, at, childConversationId, context) {\n    const entry = await storage.entry(parentConversationId, at, context);\n    if (entry === undefined)\n        throw new Error(`Entry ${at} is not visible from conversation ${parentConversationId}`);\n    const copies = [];\n    const copiedAddresses = new Set();\n    await collectCopies(storage, { kind: \"conversation\", conversationId: entry.entry.conversationId }, entry.commitSeq, \"asOf\", childConversationId, copies, copiedAddresses, context);\n    await collectCopies(storage, { kind: \"conversation\", conversationId: parentConversationId }, \"current\", \"current\", childConversationId, copies, copiedAddresses, context);\n    return copies;\n}\nasync function collectCopies(storage, scope, at, policy, childConversationId, copies, copiedAddresses, context) {\n    let cursor;\n    do {\n        const page = await storage.scanDocuments({ scope, at }, SCAN_PAGE_SIZE, cursor, context);\n        for (const source of page.items) {\n            if (source.scope.kind !== \"conversation\" || source.fork !== policy)\n                continue;\n            const id = await storage.mintId();\n            const identity = {\n                id,\n                kind: source.kind,\n                ...(source.key === undefined ? {} : { key: source.key }),\n                scope: { kind: \"conversation\", conversationId: childConversationId },\n            };\n            const record = source.history === \"latest\"\n                ? { ...identity, history: \"latest\", fork: source.fork }\n                : { ...identity, history: \"rewindable\", fork: source.fork };\n            const copyAddress = addressId(record);\n            if (copiedAddresses.has(copyAddress)) {\n                const member = record.key === undefined ? record.kind : `${record.kind}/${record.key}`;\n                throw new Error(`Fork selects multiple source documents for ${member}`);\n            }\n            copiedAddresses.add(copyAddress);\n            copies.push({ record, source: { id: source.id, at } });\n        }\n        cursor = page.next;\n    } while (cursor !== undefined);\n}\n//# sourceMappingURL=forks.js.map","import { copyJson } from \"@earendil-works/chord\";\nimport { track } from \"@earendil-works/chord/delta\";\nimport { addressId, checkRecordScope, checkRecordVersion, documentCreate, materializeDocumentValue, resolveAddress, } from \"../documents.js\";\nimport { ReadAfterWrite } from \"../errors.js\";\nimport { ROOT_CONVERSATION_ID } from \"../types.js\";\nimport { prepareForkDocumentCopies } from \"./forks.js\";\n/**\n * Complete record after applying one change. Placement turns a queued input `placed` and a queued write `done`; only a\n * placed input can be answered. A settled record stays.\n */\nfunction applySubmissionChange(current, change) {\n    if (current.status === \"done\" || current.status === \"unanswered\")\n        return current;\n    if (change.status === \"placed\") {\n        if (current.status !== \"queued\")\n            throw new Error(`Submission ${current.id} is not queued`);\n        const status = current.type === \"input\" ? \"placed\" : \"done\";\n        return { ...current, status, entry: change.entry };\n    }\n    if (change.status === \"done\" && current.status !== \"placed\") {\n        throw new Error(`Submission ${current.id} is not a placed input`);\n    }\n    // Queued and placed records carry no answer, reason, or detail; an unanswered input keeps its entry.\n    return { ...current, ...change };\n}\nconst INTERNAL_SCAN_PAGE_SIZE = 256;\nconst EMPTY_OPERATIONS = [];\nconst TABLE_JSON_COPY_OPTIONS = { omitUndefinedProperties: true };\n/**\n * Transaction for one Session commit callback.\n *\n * Every asynchronous operation is tracked so callback settlement can reject and drain unfinished work. Session calls\n * one settlement method, then either discards prepared changes or adopts them once after Storage succeeds.\n */\nexport class Transaction {\n    #host;\n    #context;\n    #scope;\n    #pendingOperations = new Set();\n    #sealed = false;\n    #hasTableWrite = false;\n    /** Atomic batch; conversation and entry writes stage eagerly, while task and document writes assemble later. */\n    #writes = [];\n    #createdConversationIds = new Set();\n    #forkSourceConversationIds = new Set();\n    #forkSourceDocumentIds = new Set();\n    /** One entry per task touched by a public read, candidate write, or document-owner lookup. */\n    #tasksById = new Map();\n    /** Submissions created by this transaction, by ID. */\n    #submissions = new Map();\n    /** Submission settlements and placements in staging order; resolved against the latest candidate record during assembly. */\n    #submissionChanges = [];\n    /** Write and publication plans of every staged incarnation, built during assembly. */\n    #plans = [];\n    /** Every document acquisition or retirement marker in staging order. */\n    #documents = [];\n    /** Latest transaction-local incarnation or retirement marker at each logical address. */\n    #latestDocumentByAddress = new Map();\n    constructor(host, context, scope = {}) {\n        this.#host = host;\n        this.#context = context;\n        this.#scope = scope;\n    }\n    // ─── Table reads ────────────────────────────────────────────────────────\n    conversation(id) {\n        return this.#read(\"conversation\", () => this.#host.storage.conversation(id, this.#context));\n    }\n    entry(first, second) {\n        const kind = typeof first === \"number\" ? undefined : first.kind;\n        const id = typeof first === \"number\" ? first : second;\n        return this.#read(\"entry\", async () => {\n            const entry = (await this.#host.storage.entry(id, this.#context))?.entry;\n            return kind === undefined || entry?.kind === kind ? entry : undefined;\n        });\n    }\n    task(id) {\n        return this.#read(\"task\", () => this.#committedTask(id));\n    }\n    scanConversations(query, limit, cursor) {\n        return this.#read(\"scanConversations\", () => this.#host.storage.scanConversations(query, limit, cursor, this.#context));\n    }\n    scanEntries(query, limit, cursor) {\n        return this.#read(\"scanEntries\", () => this.#host.storage.scanEntries(query, limit, cursor, this.#context));\n    }\n    latestHeadMarker(conversationId) {\n        return this.#read(\"latestHeadMarker\", () => this.#host.storage.findLatestHeadMarker(conversationId, undefined, this.#context));\n    }\n    scanTasks(query, limit, cursor) {\n        return this.#read(\"scanTasks\", () => this.#host.storage.scanTasks(query, limit, cursor, this.#context));\n    }\n    /** Internal: committed submission record. */\n    submission(id) {\n        return this.#read(\"submission\", () => this.#host.storage.submission(id, this.#context));\n    }\n    /** Committed submission with a conversation-scoped request ID. */\n    submissionByRequest(conversationId, requestId) {\n        return this.#read(\"submissionByRequest\", () => this.#host.storage.submissionByRequest(conversationId, requestId, this.#context));\n    }\n    // ─── Table writes ───────────────────────────────────────────────────────\n    createConversation(options) {\n        return this.#write(() => this.#stageConversation(undefined, options.ownership));\n    }\n    /** Internal final-form bootstrap path for the reserved root identity. */\n    createRootConversation() {\n        return this.#write(() => this.#stageConversation(undefined, { kind: \"ownerless\" }, ROOT_CONVERSATION_ID));\n    }\n    forkConversation(parentConversationId, at, options) {\n        return this.#write(() => this.#stageConversation({ conversationId: parentConversationId, at }, options.ownership));\n    }\n    async #stageConversation(parent, ownership, reservedId) {\n        const ownerTaskId = ownership.kind === \"task\" ? ownership.taskId : undefined;\n        const id = reservedId ?? (await this.#host.storage.mintId());\n        this.#assertOpen();\n        let owner;\n        if (ownerTaskId !== undefined) {\n            const task = await this.#currentTask(ownerTaskId);\n            this.#assertOpen();\n            if (task === undefined)\n                throw new Error(`Conversation owner task ${ownerTaskId} does not exist`);\n            owner = { conversationId: task.conversationId, taskId: ownerTaskId };\n        }\n        const record = {\n            id,\n            ...(parent === undefined ? {} : { parent }),\n            ...(owner === undefined ? {} : { owner }),\n        };\n        const copies = parent === undefined\n            ? []\n            : await prepareForkDocumentCopies(this.#host.storage, parent.conversationId, parent.at, id, this.#context);\n        this.#assertOpen();\n        for (const copy of copies) {\n            this.#forkSourceDocumentIds.add(copy.source.id);\n            const entry = {\n                addressId: addressId(copy.record),\n                address: copy.record,\n                target: { kind: \"fork-copy\", ...copy },\n                retireOnCommit: false,\n            };\n            this.#documents.push(entry);\n            this.#latestDocumentByAddress.set(entry.addressId, entry);\n        }\n        if (parent !== undefined)\n            this.#forkSourceConversationIds.add(parent.conversationId);\n        this.#createdConversationIds.add(id);\n        this.#writes.push({ type: \"conversation\", value: record });\n        await this.#host.conversationCreated(this, record);\n        this.#assertOpen();\n        return record;\n    }\n    appendEntry(first, second, third) {\n        if (typeof first === \"number\")\n            return this.#appendEntry(first, second);\n        return this.#appendEntry(second, { ...third, kind: first.kind });\n    }\n    #appendEntry(conversationId, value) {\n        return this.#write(async () => {\n            await this.#requireConversation(conversationId);\n            this.#assertOpen();\n            const id = await this.#host.storage.mintId();\n            this.#assertOpen();\n            const { head, ...rest } = value;\n            // Undefined `head` and `byTaskId` are omitted by the copy.\n            const record = copyJson({\n                ...rest,\n                id,\n                conversationId,\n                head: head === \"self\" ? id : head,\n                byTaskId: this.#scope.taskId,\n            }, TABLE_JSON_COPY_OPTIONS);\n            this.#writes.push({ type: \"entry\", value: record });\n            return record;\n        });\n    }\n    createTask(task, input, options) {\n        return this.#write(async () => {\n            const ownership = options.ownership;\n            let owner;\n            if (ownership.kind === \"task\") {\n                // Validated again against the owner's final candidate during assembly.\n                owner = await this.#currentTask(ownership.taskId);\n                this.#assertOpen();\n                if (owner === undefined)\n                    throw new Error(`Task owner ${ownership.taskId} does not exist`);\n                if (options.background === true)\n                    throw new TypeError(\"A child task cannot be background\");\n                if (options.conversationId !== undefined && options.conversationId !== owner.conversationId) {\n                    throw new Error(`A child task lives in its owner's conversation ${owner.conversationId}`);\n                }\n            }\n            const conversationId = owner?.conversationId ?? options.conversationId ?? this.#scope.conversationId;\n            if (conversationId === undefined)\n                throw new TypeError(\"Tx.createTask() requires options.conversationId\");\n            await this.#requireConversation(conversationId);\n            this.#assertOpen();\n            const definition = task.definition;\n            const checkpoint = definition.initial(input);\n            const id = await this.#host.storage.mintId();\n            this.#assertOpen();\n            const record = copyJson({\n                id,\n                conversationId,\n                kind: definition.name,\n                version: definition.version,\n                input,\n                ...(owner === undefined ? {} : { owner: owner.id }),\n                background: options.background ?? false,\n                abortRequested: false,\n                ...(options.abandonOnRestart === true ? { abandonOnRestart: true } : {}),\n                state: { status: \"pending\", checkpoint },\n            }, TABLE_JSON_COPY_OPTIONS);\n            this.#tasksById.set(id, { write: { kind: \"create\", record } });\n            return id;\n        });\n    }\n    /** Create a raw submission record with a fresh ID; no admission rules apply. */\n    createSubmission(create) {\n        return this.#write(async () => {\n            await this.#requireConversation(create.conversationId);\n            this.#assertOpen();\n            const id = await this.#host.storage.mintId();\n            this.#assertOpen();\n            const record = copyJson({ ...create, id }, TABLE_JSON_COPY_OPTIONS);\n            this.#submissions.set(id, record);\n            return record;\n        });\n    }\n    /**\n     * Settle a submission. Resolved during assembly against the transaction's latest candidate record, falling back to\n     * committed state, so it is not a caller table read and works after the first table write.\n     */\n    settleSubmission(id, settlement) {\n        this.#assertOpen();\n        this.#hasTableWrite = true;\n        this.#submissionChanges.push({ id, change: copyJson(settlement) });\n    }\n    /** Place a queued submission at `entry`; resolved during assembly like `settleSubmission()`. */\n    placeSubmission(id, entry) {\n        this.#assertOpen();\n        this.#hasTableWrite = true;\n        this.#submissionChanges.push({ id, change: { status: \"placed\", entry } });\n    }\n    /** Internal: replace one task record completely. Tasks change their own state through their runtime. */\n    setTask(value) {\n        this.#assertOpen();\n        this.#hasTableWrite = true;\n        const task = this.#taskEntry(value.id);\n        const candidate = task.write?.record;\n        if (candidate?.state.status === \"terminal\") {\n            throw new Error(`Task ${value.id} already has a terminal candidate`);\n        }\n        if (candidate !== undefined && candidate.conversationId !== value.conversationId) {\n            throw new Error(`Task ${value.id} cannot change conversations`);\n        }\n        task.write = {\n            kind: task.write?.kind === \"create\" ? \"create\" : \"replace\",\n            record: copyJson(this.#stampTimes(value, candidate), TABLE_JSON_COPY_OPTIONS),\n        };\n    }\n    /** Internal: candidate records of the tasks this transaction created or replaced so far. */\n    stagedTasks() {\n        const records = [];\n        for (const task of this.#tasksById.values())\n            if (task.write !== undefined)\n                records.push(task.write.record);\n        return records;\n    }\n    /** Internal: conversations this transaction created or forked so far. */\n    stagedConversations() {\n        const records = [];\n        for (const write of this.#writes)\n            if (write.type === \"conversation\")\n                records.push(write.value);\n        return records;\n    }\n    doc(token, ...args) {\n        try {\n            this.#assertOpen();\n            const definition = token.definition;\n            const resolved = resolveAddress(definition, args);\n            this.#assertTaskDocumentsOpen(resolved);\n            const latest = this.#latestDocumentByAddress.get(resolved.id);\n            if (latest !== undefined && !latest.retireOnCommit) {\n                if (latest.draftPromise !== undefined)\n                    return latest.draftPromise;\n                if (latest.target?.kind === \"fork-copy\") {\n                    latest.draftPromise = this.#track(this.#acquireForkCopy(latest, definition, latest.target));\n                    return latest.draftPromise;\n                }\n            }\n            const seed = definition.family === true ? copyJson(args[resolved.nextArgument]) : undefined;\n            const docEntry = {\n                addressId: resolved.id,\n                address: resolved.address,\n                definition,\n                retireOnCommit: false,\n            };\n            this.#documents.push(docEntry);\n            this.#latestDocumentByAddress.set(docEntry.addressId, docEntry);\n            // Capture retirement before awaiting so a pending old acquisition and its replacement stay distinct.\n            docEntry.draftPromise = this.#track(this.#acquire(docEntry, seed, latest?.retireOnCommit === true));\n            return docEntry.draftPromise;\n        }\n        catch (error) {\n            return Promise.reject(error);\n        }\n    }\n    retireDoc(token, ...args) {\n        try {\n            this.#assertOpen();\n            const definition = token.definition;\n            const resolved = resolveAddress(definition, args);\n            const latest = this.#latestDocumentByAddress.get(resolved.id);\n            if (latest?.retireOnCommit)\n                return Promise.resolve();\n            if (latest?.target?.kind === \"fork-copy\") {\n                checkRecordScope(definition, latest.target.record);\n                latest.retireOnCommit = true;\n                return Promise.resolve();\n            }\n            if (latest?.draftPromise !== undefined) {\n                // Retirement of an acquired draft persists its final content before retirement.\n                latest.retireOnCommit = true;\n                return this.#track(latest.draftPromise.then(() => undefined));\n            }\n            const entry = {\n                addressId: resolved.id,\n                address: resolved.address,\n                definition,\n                retireOnCommit: true,\n            };\n            this.#documents.push(entry);\n            this.#latestDocumentByAddress.set(entry.addressId, entry);\n            return this.#track(this.#findRetirement(entry));\n        }\n        catch (error) {\n            return Promise.reject(error);\n        }\n    }\n    async #acquire(entry, seed, skipLoad) {\n        const definition = entry.definition;\n        const loaded = skipLoad\n            ? undefined\n            : await this.#host.load(definition, entry.addressId, entry.address, this.#context);\n        this.#assertOpen();\n        if (loaded !== undefined) {\n            checkRecordScope(definition, loaded.record);\n            checkRecordVersion(definition, loaded.record, loaded.storedVersion);\n            entry.target = { kind: \"loaded\", document: loaded };\n            entry.change = loaded.tracker.beginChange();\n            return entry.change.state;\n        }\n        const scope = entry.address.scope;\n        if (scope.kind === \"conversation\")\n            await this.#requireConversation(scope.conversationId);\n        if (scope.kind === \"task\") {\n            const task = await this.#currentTask(scope.taskId);\n            if (task === undefined)\n                throw new Error(`Task ${scope.taskId} does not exist`);\n            if (task.state.status === \"terminal\")\n                throw new Error(`Task ${scope.taskId} is terminal`);\n        }\n        this.#assertOpen();\n        const value = copyJson(definition.family === true ? definition.initial(seed) : definition.initial());\n        const id = await this.#host.storage.mintId();\n        this.#assertOpen();\n        const tracker = track(value);\n        entry.target = {\n            kind: \"created\",\n            record: documentCreate(definition, entry.address, id),\n            version: definition.version,\n            tracker,\n        };\n        entry.change = tracker.beginChange();\n        return entry.change.state;\n    }\n    async #acquireForkCopy(entry, definition, target) {\n        const stored = await this.#host.storage.document(target.source.id, target.source.at, this.#context);\n        this.#assertOpen();\n        if (stored === undefined) {\n            throw new Error(`Fork source document ${target.source.id} cannot be read`);\n        }\n        if (stored.record.scope.kind !== \"conversation\" ||\n            stored.record.kind !== target.record.kind ||\n            stored.record.key !== target.record.key ||\n            stored.record.history !== target.record.history ||\n            stored.record.fork !== target.record.fork) {\n            throw new Error(`Fork source document ${target.source.id} does not match the copied record`);\n        }\n        const value = materializeDocumentValue(definition, target.record, stored.version, stored.value);\n        const tracker = track(value);\n        entry.definition = definition;\n        entry.target = { kind: \"created\", record: target.record, version: definition.version, tracker };\n        entry.change = tracker.beginChange();\n        return entry.change.state;\n    }\n    async #findRetirement(entry) {\n        const record = this.#host.cached(entry.addressId)?.record ??\n            (await this.#host.storage.findDocument(entry.address, \"current\", this.#context));\n        this.#assertOpen();\n        if (record === undefined)\n            return;\n        checkRecordScope(entry.definition, record);\n        entry.target = { kind: \"retire-only\", record };\n    }\n    // ─── Settlement ─────────────────────────────────────────────────────────\n    /** Seal after callback failure: abort every change and observe every pending operation. */\n    async settleFailure() {\n        this.#sealed = true;\n        this.#abortChanges();\n        await Promise.allSettled(this.#pendingOperations);\n    }\n    /**\n     * Seal after callback success, prepare every open change, and assemble the atomic batch.\n     * Any failure aborts every change before Storage admission.\n     */\n    async settleSuccess() {\n        this.#sealed = true;\n        if (this.#pendingOperations.size > 0) {\n            this.#abortChanges();\n            await Promise.allSettled(this.#pendingOperations);\n            throw new Error(\"Session commit callback settled before its pending Tx operations\");\n        }\n        try {\n            // Synchronously prepare every open change; this revokes every draft.\n            for (const document of this.#documents) {\n                if (document.change !== undefined)\n                    document.prepared = document.change.prepare();\n            }\n            return await this.#assemble();\n        }\n        catch (error) {\n            this.#abortChanges();\n            throw error;\n        }\n    }\n    /** Abort every prepared change after Storage failure or when no write is required. */\n    discard() {\n        this.#abortChanges();\n    }\n    /** Adopt every prepared change by pointer swap after Storage success and describe the publication. */\n    adopt(seq) {\n        const publications = [];\n        for (const plan of this.#plans) {\n            const committed = \"createdAt\" in plan.record;\n            let record = committed ? plan.record : { ...plan.record, createdAt: seq };\n            if (plan.retire)\n                record = { ...record, retiredAt: seq };\n            const change = plan.change;\n            if (change !== undefined) {\n                const { tracker, prepared, loaded, version } = change;\n                // A new incarnation is adopted unless it retires in the same commit; a loaded one only when it changed.\n                if (loaded === undefined ? !plan.retire : prepared.ops.length > 0)\n                    tracker.adopt(prepared);\n                else\n                    prepared.abort();\n                if (loaded !== undefined) {\n                    if (loaded.storedVersion < version)\n                        loaded.storedVersion = version;\n                    if (plan.content?.type === \"document.change\") {\n                        if (plan.content.content.kind === \"base\")\n                            loaded.deltasSinceBase = 0;\n                        else\n                            loaded.deltasSinceBase++;\n                    }\n                }\n                else if (!plan.retire) {\n                    this.#host.install({\n                        addressId: plan.addressId,\n                        record,\n                        storedVersion: version,\n                        valueVersion: version,\n                        deltasSinceBase: 0,\n                        tracker,\n                    });\n                }\n            }\n            const conversationId = plan.conversationId;\n            if (plan.retire) {\n                if (committed)\n                    this.#host.evict(plan.addressId, record.id);\n                const retired = { version: undefined, value: null, ops: EMPTY_OPERATIONS };\n                publications.push({ type: \"document\", record, conversationId, ...retired });\n            }\n            else if (plan.content?.type === \"document.copy\") {\n                publications.push({\n                    type: \"document.copy\",\n                    record,\n                    conversationId: conversationId,\n                    source: plan.content.source,\n                });\n            }\n            else if (change !== undefined && publishes(plan)) {\n                const ops = change.loaded === undefined ? EMPTY_OPERATIONS : change.prepared.ops;\n                publications.push({\n                    type: \"document\",\n                    record,\n                    conversationId,\n                    version: change.version,\n                    value: change.prepared.value,\n                    ops,\n                });\n            }\n        }\n        return publications;\n    }\n    async #assemble() {\n        const storage = this.#host.storage;\n        const plans = this.#plans;\n        for (const document of this.#documents) {\n            const plan = planDocument(document);\n            if (plan !== undefined)\n                plans.push(plan);\n        }\n        this.#rejectForkSourceWrites(plans);\n        await this.#validateOwners();\n        for (const [id, task] of this.#tasksById) {\n            if (task.write?.kind !== \"replace\")\n                continue;\n            const committed = await this.#committedTask(id);\n            if (committed === undefined)\n                throw new Error(`Task ${id} does not exist`);\n            if (committed.state.status === \"terminal\")\n                throw new Error(`Task ${id} is already terminal`);\n            if (committed.conversationId !== task.write.record.conversationId) {\n                throw new Error(`Task ${id} cannot change conversations`);\n            }\n        }\n        // Terminal settlement retires every task document, including ones created by this transaction.\n        const terminalTaskIds = new Set();\n        for (const task of this.#tasksById.values()) {\n            if (task.write?.record.state.status === \"terminal\")\n                terminalTaskIds.add(task.write.record.id);\n        }\n        if (terminalTaskIds.size > 0) {\n            const retiring = new Set();\n            for (const plan of plans) {\n                const scope = plan.record.scope;\n                if (scope.kind !== \"task\" || !terminalTaskIds.has(scope.taskId))\n                    continue;\n                plan.retire = true;\n                retiring.add(plan.record.id);\n            }\n            for (const taskId of terminalTaskIds) {\n                if (this.#tasksById.get(taskId)?.write?.kind === \"create\")\n                    continue;\n                let cursor;\n                do {\n                    const page = await storage.scanDocuments({ scope: { kind: \"task\", taskId }, at: \"current\" }, INTERNAL_SCAN_PAGE_SIZE, cursor, this.#context);\n                    for (const record of page.items) {\n                        if (retiring.has(record.id))\n                            continue;\n                        plans.push({ addressId: addressId(record), record, retire: true });\n                        retiring.add(record.id);\n                    }\n                    cursor = page.next;\n                } while (cursor !== undefined);\n            }\n        }\n        // Resolve publication ownership before Storage admission so adoption remains synchronous.\n        for (const plan of plans) {\n            if (!publishes(plan))\n                continue;\n            const scope = plan.record.scope;\n            if (scope.kind === \"conversation\")\n                plan.conversationId = scope.conversationId;\n            if (scope.kind !== \"task\")\n                continue;\n            const task = this.#taskEntry(scope.taskId);\n            if (task.publicationConversationId === undefined) {\n                const current = await this.#currentTask(scope.taskId);\n                if (current !== undefined)\n                    task.publicationConversationId = current.conversationId;\n            }\n            plan.conversationId = task.publicationConversationId;\n        }\n        for (const { id, change } of this.#submissionChanges) {\n            const current = this.#submissions.get(id) ?? (await storage.submission(id, this.#context));\n            if (current === undefined)\n                throw new Error(`Submission ${id} does not exist`);\n            const next = applySubmissionChange(current, change);\n            if (next !== current)\n                this.#submissions.set(id, next);\n        }\n        const writes = this.#writes;\n        for (const value of this.#submissions.values())\n            writes.push({ type: \"submission\", value });\n        for (const task of this.#tasksById.values()) {\n            if (task.write !== undefined)\n                writes.push({ type: \"task\", value: task.write.record });\n        }\n        for (const plan of plans) {\n            const change = plan.change;\n            // Checkpoint predicates run last, after every validation.\n            if (plan.content?.type === \"document.change\" && plan.content.content.kind === \"delta\" && change?.loaded) {\n                const { prepared, version } = change;\n                const info = { deltasSinceBase: change.loaded.deltasSinceBase };\n                if (change.definition?.checkpointWhen?.(prepared.value, prepared.ops, info)) {\n                    plan.content = { ...plan.content, content: { version, kind: \"base\", value: prepared.value } };\n                }\n            }\n            if (plan.content !== undefined)\n                writes.push(plan.content);\n            if (plan.retire)\n                writes.push({ type: \"document.retire\", id: plan.record.id });\n        }\n        return writes;\n    }\n    // ─── Helpers ────────────────────────────────────────────────────────────\n    /**\n     * New owned work needs a live owner, judged on the owner's final candidate: not `completing`, terminal, or\n     * abort-marked. A task therefore cannot create owned work in the commit that finishes it (spec §5.5).\n     */\n    async #validateOwners() {\n        const owners = [];\n        for (const write of this.#writes) {\n            if (write.type !== \"conversation\" || write.value.owner === undefined)\n                continue;\n            owners.push({ what: \"Conversation owner task\", taskId: write.value.owner.taskId });\n        }\n        for (const task of this.#tasksById.values()) {\n            const record = task.write?.kind === \"create\" ? task.write.record : undefined;\n            if (record?.owner !== undefined)\n                owners.push({ what: \"Task owner\", taskId: record.owner });\n        }\n        for (const { what, taskId } of owners) {\n            const task = await this.#currentTask(taskId);\n            if (task === undefined)\n                throw new Error(`${what} ${taskId} does not exist`);\n            if (task.state.status === \"terminal\" || task.state.status === \"completing\") {\n                throw new Error(`${what} ${taskId} is ${task.state.status}`);\n            }\n            if (task.abortRequested)\n                throw new Error(`${what} ${taskId} is abort-marked`);\n        }\n    }\n    #rejectForkSourceWrites(plans) {\n        for (const plan of plans) {\n            if (plan.content === undefined && !plan.retire)\n                continue;\n            const record = plan.record;\n            if (this.#forkSourceDocumentIds.has(record.id)) {\n                throw new Error(`Cannot change fork source document ${record.id} in the fork transaction`);\n            }\n            const scope = plan.record.scope;\n            if (scope.kind === \"conversation\" &&\n                this.#forkSourceConversationIds.has(scope.conversationId) &&\n                record.scope.kind === \"conversation\" &&\n                record.fork === \"current\") {\n                throw new Error(`Cannot fork conversation ${scope.conversationId} while changing its current-policy documents`);\n            }\n        }\n    }\n    #abortChanges() {\n        for (const document of this.#documents)\n            document.change?.abort();\n    }\n    #assertOpen() {\n        if (this.#sealed)\n            throw new Error(\"Transaction has settled\");\n    }\n    #assertTaskDocumentsOpen(resolved) {\n        const scope = resolved.address.scope;\n        if (scope.kind === \"task\" && this.#tasksById.get(scope.taskId)?.write?.record.state.status === \"terminal\") {\n            throw new Error(`Task ${scope.taskId} is terminal`);\n        }\n    }\n    /** Register an operation so callback settlement can reject and drain it. */\n    #track(operation) {\n        this.#pendingOperations.add(operation);\n        const settle = () => {\n            this.#pendingOperations.delete(operation);\n        };\n        operation.then(settle, settle);\n        return operation;\n    }\n    #read(method, read) {\n        try {\n            this.#assertOpen();\n            if (this.#hasTableWrite)\n                throw new ReadAfterWrite(method);\n            return this.#track(read());\n        }\n        catch (error) {\n            return Promise.reject(error);\n        }\n    }\n    #write(write) {\n        try {\n            this.#assertOpen();\n            this.#hasTableWrite = true;\n            return this.#track(write());\n        }\n        catch (error) {\n            return Promise.reject(error);\n        }\n    }\n    async #requireConversation(id) {\n        if (this.#createdConversationIds.has(id))\n            return;\n        if ((await this.#host.storage.conversation(id, this.#context)) === undefined) {\n            throw new Error(`Conversation ${id} does not exist`);\n        }\n    }\n    /**\n     * Lifecycle times: `startedAt` on the first change to `running`, `endedAt` on the change to `terminal`. Once set,\n     * they carry over from the replaced record; records written before they existed lack them.\n     */\n    #stampTimes(value, candidate) {\n        const status = value.state.status;\n        const now = (stamps) => (stamps ? this.#host.now() : undefined);\n        const startedAt = candidate?.startedAt ?? value.startedAt ?? now(status === \"running\");\n        const endedAt = candidate?.endedAt ?? value.endedAt ?? now(status === \"terminal\");\n        if (startedAt === value.startedAt && endedAt === value.endedAt)\n            return value;\n        return {\n            ...value,\n            ...(startedAt === undefined ? {} : { startedAt }),\n            ...(endedAt === undefined ? {} : { endedAt }),\n        };\n    }\n    #taskEntry(id) {\n        let task = this.#tasksById.get(id);\n        if (task === undefined) {\n            task = {};\n            this.#tasksById.set(id, task);\n        }\n        return task;\n    }\n    /** Latest candidate task record, falling back to committed state; not a caller table read. */\n    async #currentTask(id) {\n        return this.#tasksById.get(id)?.write?.record ?? (await this.#committedTask(id));\n    }\n    #committedTask(id) {\n        const task = this.#taskEntry(id);\n        task.committedRead ??= this.#host.storage.task(id, this.#context);\n        return task.committedRead;\n    }\n}\n/** Plan of one staged document: its record, content write, and prepared change. Retirement is decided later. */\nfunction planDocument(document) {\n    const target = document.target;\n    if (target === undefined)\n        return undefined;\n    const plan = { addressId: document.addressId, retire: document.retireOnCommit };\n    switch (target.kind) {\n        case \"created\": {\n            const prepared = document.prepared;\n            const { record, version, tracker } = target;\n            const content = { version, kind: \"base\", value: prepared.value };\n            return {\n                ...plan,\n                record,\n                content: { type: \"document.create\", record, content },\n                change: { tracker, prepared, version },\n            };\n        }\n        case \"fork-copy\":\n            return {\n                ...plan,\n                record: target.record,\n                content: { type: \"document.copy\", record: target.record, source: target.source },\n            };\n        case \"retire-only\":\n            return { ...plan, record: target.record };\n        case \"loaded\": {\n            const loaded = target.document;\n            const definition = document.definition;\n            const prepared = document.prepared;\n            const version = definition.version;\n            const id = loaded.record.id;\n            // A version change stores a base even without operations; otherwise only a change stores a delta.\n            const content = loaded.storedVersion < version\n                ? { type: \"document.change\", id, content: { version, kind: \"base\", value: prepared.value } }\n                : prepared.ops.length > 0\n                    ? { type: \"document.change\", id, content: { version, kind: \"delta\", ops: prepared.ops } }\n                    : undefined;\n            const change = {\n                tracker: loaded.tracker,\n                prepared,\n                version,\n                loaded,\n                definition,\n            };\n            return { ...plan, record: loaded.record, change, ...(content === undefined ? {} : { content }) };\n        }\n    }\n}\n/**\n * Whether adoption publishes the plan: every creation, copy, and retirement, and a loaded incarnation that writes\n * content, which includes a migration-only base so observers of the older shape receive the new value.\n */\nfunction publishes(plan) {\n    return plan.retire || plan.change?.loaded === undefined || plan.content !== undefined;\n}\n//# sourceMappingURL=transaction.js.map","import { replicatedState } from \"@earendil-works/chord\";\nimport { awaitWithContext, BACKGROUND_CONTEXT, withoutAbortSignal } from \"@earendil-works/chord/context\";\nimport { track } from \"@earendil-works/chord/delta\";\nimport { addressId, checkRecordScope, checkRecordVersion, materializeDocument, resolveAddress, } from \"../documents.js\";\nimport { SessionFailed, StorageRequestError } from \"../errors.js\";\nimport { idFromNumber } from \"../ids.js\";\nimport { CommittedStateSource, CommittedWatch, RETIREMENT_OPERATIONS, } from \"./observation.js\";\nimport { Transaction } from \"./transaction.js\";\n/**\n * Open a Session kernel over one storage backend. `now` is the wall clock for task times; default `Date.now`. The first\n * error a Storage method throws fails the Session (`SessionFailed`); see `SessionImpl`.\n */\nexport function createSession(storage, options) {\n    const retention = options?.documentRetentionMs;\n    return new SessionImpl(storage, options?.now, retention === undefined ? undefined : () => retention);\n}\n/** Default document retention: ten minutes, as for kept contexts. */\nlet defaultRetention = 600_000;\n/** Internal, for tests: the retention of every Session that keeps the default, as a suite run with eviction at once. */\nexport function setDefaultDocumentRetention(ms) {\n    defaultRetention = ms;\n}\n/**\n * A retention as given, when it is a number of milliseconds, `0` or more (`Infinity` keeps documents); otherwise the\n * default.\n */\nexport function documentRetention(ms) {\n    return typeof ms === \"number\" && ms >= 0 ? ms : defaultRetention;\n}\n/** Longest delay `setTimeout` supports; a longer retention waits in several steps. */\nconst MAX_TIMER_DELAY = 2_147_483_647;\n/**\n * Session kernel: one mutation line, the loaded document tracker cache, and committed publication.\n *\n * The cache is bounded by use: a document with no watch or document state attached leaves it once it was not read or\n * written for the retention period, and the next access loads it from Storage. Eviction runs as a job on the mutation\n * line, so no transaction ever holds a tracker that leaves.\n *\n * Only committed state is observable. Every commit callback, preparation, Storage settlement, adoption, and\n * publication enqueue runs while the line is held; listeners run later.\n *\n * Storage failures are final. Every Storage call goes through one guard: the first error a Storage method throws, other\n * than for a cancelled caller, fails the Session, as does a commit it cannot adopt. That call gets the error; every later\n * call and every Storage call still underway gets `SessionFailed`; close listeners run at once with the error, and the\n * Session then closes itself, Storage included, and `closed` settles. Nothing retries: transient errors are the\n * Storage's to retry. Reopening recovers from what was committed.\n */\nexport class SessionImpl {\n    #storage;\n    #documents = new Map();\n    /** Cached documents with no observer attached, by address, oldest use first, with the time of that use. */\n    #idleDocuments = new Map();\n    /** Observers attached per document incarnation (record ID); a cached incarnation with any is never evicted. */\n    #attachedDocuments = new Map();\n    #clock;\n    #documentRetentionMs;\n    /** The pending eviction: a timer for the oldest idle document, or a line job when the retention is 0. */\n    #documentSweep;\n    #sweepJobs = 0;\n    /** Set once a timer could not be unreferenced: then none is kept, and the end of each commit evicts what expired. */\n    #documentTimersUnavailable = false;\n    #commitListeners = new Set();\n    /** The Session's own listeners, such as its scheduler's: they keep memory in step with storage, so a throw fails it. */\n    #internalListeners = new Set();\n    #closeListeners = new Set();\n    #host;\n    #tail = Promise.resolve();\n    #closing;\n    #failure;\n    /** Set when close reaches the backend: calls that fail from then on fail because it closes. */\n    #failed = Promise.withResolvers();\n    #closed = Promise.withResolvers();\n    get closed() {\n        return this.#closed.promise;\n    }\n    /** Internal: the error that failed the Session, if one did. */\n    get failure() {\n        return this.#failure;\n    }\n    /** Internal: rejects with `SessionFailed` the moment the Session fails, before work underway has ended; never resolves. */\n    get failed() {\n        return this.#failed.promise;\n    }\n    constructor(storage, now = Date.now, documentRetentionMs = () => undefined) {\n        // Waits race it; none has to.\n        this.#failed.promise.catch(() => { });\n        this.#storage = new GuardedStorage(storage, this);\n        // Cache bookkeeping must never change the outcome of the operation it follows: a clock or a retention setting\n        // that throws counts as now, and as the default.\n        this.#clock = () => {\n            try {\n                return now();\n            }\n            catch {\n                return Date.now();\n            }\n        };\n        this.#documentRetentionMs = () => {\n            try {\n                return documentRetention(documentRetentionMs());\n            }\n            catch {\n                return documentRetention(undefined);\n            }\n        };\n        this.#host = {\n            storage: this.#storage,\n            now,\n            cached: (id) => {\n                const cached = this.#documents.get(id);\n                if (cached !== undefined)\n                    this.#touchDocument(id);\n                return cached;\n            },\n            load: (definition, addressId, address, context) => this.#loadDocument(definition, addressId, address, context),\n            install: (document) => {\n                this.#documents.set(document.addressId, document);\n                this.#touchDocument(document.addressId);\n            },\n            evict: (id, recordId) => {\n                if (this.#documents.get(id)?.record.id === recordId)\n                    this.#dropDocument(id);\n            },\n            conversationCreated: (tx, record) => this.conversationCreated(tx, record),\n        };\n    }\n    /** The Storage behind the failure guard; every component reads and writes through it. */\n    get storage() {\n        return this.#storage;\n    }\n    commit(change, context) {\n        return this.commitWith(change, context);\n    }\n    /**\n     * Internal: fail the Session with `error`, the first wins, and report it once. Admission ends, and close listeners run\n     * now; they read the error from `failure`. The Storage guard calls this; the Harness also calls it for a throw in its\n     * scheduler's own commits.\n     */\n    fail(error) {\n        if (this.#failure !== undefined)\n            return;\n        this.#failure = { error };\n        this.#failed.reject(new SessionFailed(error));\n        // Seal first, so a report handler that calls back finds the Session failed. Closing runs the close listeners\n        // synchronously; a failing backend close is the caller's to see, and here nobody waits.\n        this.close(BACKGROUND_CONTEXT).catch(() => { });\n        this.report(error);\n    }\n    /**\n     * Internal commit exposing the concrete transaction and its internal operations, such as the reserved-ID root\n     * bootstrap and task replacement. `scope` sets the default `tx.createTask()` conversation and the task attributed to\n     * appended entries.\n     */\n    commitWith(change, context, scope) {\n        try {\n            this.assertUsable();\n        }\n        catch (error) {\n            return Promise.reject(error);\n        }\n        return this.#enqueue(() => this.#runCommit(change, context, scope));\n    }\n    /** Internal: run a read-only job on the mutation line so multi-read derivations observe one committed state. */\n    readOnLine(job) {\n        try {\n            this.assertUsable();\n        }\n        catch (error) {\n            return Promise.reject(error);\n        }\n        return this.#enqueue(async () => {\n            this.#assertHealthy();\n            return job();\n        });\n    }\n    /**\n     * Internal: a conversation document's current incarnation and value, for a job already running on the line (see\n     * `readOnLine()`). Absent documents are `undefined`.\n     */\n    async conversationDocumentOnLine(token, conversationId, context) {\n        const definition = token.definition;\n        const resolved = resolveAddress(definition, [conversationId, context]);\n        const loaded = await this.#loadDocument(definition, resolved.id, resolved.address, context);\n        if (loaded === undefined)\n            return undefined;\n        checkRecordScope(definition, loaded.record);\n        checkRecordVersion(definition, loaded.record, loaded.storedVersion);\n        return { record: loaded.record, version: loaded.valueVersion, value: loaded.tracker.value };\n    }\n    async snapshot(token, ...args) {\n        this.assertUsable();\n        const definition = token.definition;\n        const resolved = resolveAddress(definition, args);\n        const context = args[resolved.nextArgument];\n        const cached = this.#documents.get(resolved.id);\n        if (cached?.valueVersion === definition.version)\n            this.#touchDocument(resolved.id);\n        const loaded = cached?.valueVersion === definition.version\n            ? cached\n            : await this.#enqueue(async () => {\n                this.#assertHealthy();\n                return this.#loadDocument(definition, resolved.id, resolved.address, context);\n            });\n        if (loaded === undefined)\n            return undefined;\n        checkRecordScope(definition, loaded.record);\n        checkRecordVersion(definition, loaded.record, loaded.storedVersion);\n        return loaded.tracker.value;\n    }\n    documentState(token, ...args) {\n        try {\n            this.assertUsable();\n            const definition = token.definition;\n            const resolved = resolveAddress(definition, args);\n            const context = args[resolved.nextArgument];\n            return this.#enqueue(async () => {\n                this.#assertHealthy();\n                const loaded = await this.#loadDocument(definition, resolved.id, resolved.address, context);\n                if (loaded === undefined)\n                    return undefined;\n                const { observer: source, detach } = this.#attachDocument(definition, loaded, (value, release) => new CommittedStateSource(value, release));\n                try {\n                    return replicatedState(source, { onError: (error) => this.report(error) });\n                }\n                catch (error) {\n                    detach();\n                    throw error;\n                }\n            });\n        }\n        catch (error) {\n            return Promise.reject(error);\n        }\n    }\n    async watchDoc(token, ...args) {\n        this.assertUsable();\n        const definition = token.definition;\n        const resolved = resolveAddress(definition, args);\n        const context = args[resolved.nextArgument];\n        const signal = context.abortSignal;\n        let cancelled = signal?.aborted ?? false;\n        const markCancelled = () => {\n            cancelled = true;\n        };\n        signal?.addEventListener(\"abort\", markCancelled, { once: true });\n        try {\n            const watch = await this.#enqueue(async () => {\n                this.#assertHealthy();\n                if (cancelled)\n                    throw cancellationError(signal);\n                const loaded = await this.#loadDocument(definition, resolved.id, resolved.address, context);\n                if (cancelled)\n                    throw cancellationError(signal);\n                if (loaded === undefined)\n                    return undefined;\n                return this.#attachDocument(definition, loaded, (value, release) => new CommittedWatch(value, release, (error) => this.report(error))).observer;\n            });\n            if (watch === undefined)\n                return undefined;\n            if (cancelled) {\n                watch.cancel();\n                throw cancellationError(signal);\n            }\n            if (signal !== undefined)\n                watch.observeCancellation(signal);\n            return watch;\n        }\n        finally {\n            signal?.removeEventListener(\"abort\", markCancelled);\n        }\n    }\n    async snapshotAsOf(token, ...args) {\n        this.assertUsable();\n        const definition = token.definition;\n        const resolved = resolveAddress(definition, args);\n        if (resolved.address.scope.kind !== \"conversation\") {\n            throw new TypeError(\"Session.snapshotAsOf() requires a conversation document\");\n        }\n        const conversationId = resolved.address.scope.conversationId;\n        const atValue = args[resolved.nextArgument];\n        if (typeof atValue !== \"number\" || !Number.isSafeInteger(atValue)) {\n            throw new TypeError(\"Session.snapshotAsOf() requires an entry ID\");\n        }\n        const at = idFromNumber(atValue);\n        const context = args[resolved.nextArgument + 1];\n        return this.#enqueue(async () => {\n            this.#assertHealthy();\n            const storedEntry = await this.#storage.entry(conversationId, at, context);\n            if (storedEntry === undefined) {\n                throw new Error(`Entry ${at} is not visible from conversation ${conversationId}`);\n            }\n            const address = {\n                ...resolved.address,\n                scope: { kind: \"conversation\", conversationId: storedEntry.entry.conversationId },\n            };\n            const record = await this.#storage.findDocument(address, storedEntry.commitSeq, context);\n            if (record === undefined)\n                return undefined;\n            const stored = await this.#storage.document(record.id, storedEntry.commitSeq, context);\n            if (stored === undefined) {\n                throw new Error(`Historical document ${record.id} (${record.kind}) cannot be read`);\n            }\n            return materializeDocument(definition, stored);\n        });\n    }\n    close(context) {\n        if (this.#closing === undefined) {\n            const cleanup = withoutAbortSignal(context);\n            // Seal admission before anything else runs, then stop observers; admitted work settles before Storage closes.\n            this.#closing = Promise.resolve()\n                .then(() => this.beforeClose())\n                .then(() => this.#enqueue(async () => {\n                this.#commitListeners.clear();\n                this.#internalListeners.clear();\n                this.#documents.clear();\n                this.#idleDocuments.clear();\n                this.#attachedDocuments.clear();\n                try {\n                    await this.#storage.close(cleanup);\n                }\n                catch (error) {\n                    // A Storage that cannot close is a failed one; an earlier failure stays the cause.\n                    if (this.#failure === undefined) {\n                        this.#failure = { error };\n                        this.report(error);\n                    }\n                    throw error;\n                }\n            }))\n                .finally(() => {\n                const failure = this.#failure;\n                this.#closed.resolve(failure === undefined ? { reason: \"closed\" } : { reason: \"failed\", error: failure.error });\n            });\n            this.#notifyClose();\n        }\n        return awaitWithContext(this.#closing, context);\n    }\n    /** Run the close listeners once, each on its own: one that fails is reported, and the rest still run. */\n    #notifyClose() {\n        if (this.#documentSweep?.timer !== undefined)\n            clearTimeout(this.#documentSweep.timer);\n        this.#documentSweep = undefined;\n        const listeners = [...this.#closeListeners];\n        this.#closeListeners.clear();\n        for (const listener of listeners)\n            contained(listener, (error) => this.report(error));\n    }\n    /** Internal: the Session's failure, and errors of listeners, which never fail what ran them. A plain Session drops them. */\n    report(_error) { }\n    /**\n     * Runs inside every transaction that creates or forks a conversation, after the conversation record is staged. A\n     * plain Session stages nothing; a Harness stages its built-in documents.\n     */\n    conversationCreated(_tx, _record) {\n        return Promise.resolve();\n    }\n    /** Runs after close seals admission and before the line closes Storage; must not reject. */\n    beforeClose() {\n        return Promise.resolve();\n    }\n    /** Register a synchronous post-adoption listener. It must not block or call Session operations; a throw is reported. */\n    subscribeCommits(listener) {\n        this.assertUsable();\n        this.#commitListeners.add(listener);\n        return () => this.#commitListeners.delete(listener);\n    }\n    /**\n     * Internal: `subscribeCommits()` for the Session's own components, whose state follows each commit. A throw leaves\n     * that state behind storage, so it fails the Session instead of being reported. They run before host listeners.\n     */\n    observeCommits(listener) {\n        this.assertUsable();\n        this.#internalListeners.add(listener);\n        return () => this.#internalListeners.delete(listener);\n    }\n    /**\n     * Register a listener called synchronously when close begins, also when a failure closes the Session (`failure` is\n     * then set). It must not block or call Session operations; a throw is reported.\n     */\n    subscribeClose(listener) {\n        this.assertUsable();\n        this.#closeListeners.add(listener);\n        return () => this.#closeListeners.delete(listener);\n    }\n    /** Drop every loaded tracker on the mutation line; later access cold-loads from Storage. */\n    unloadDocuments() {\n        return this.#enqueue(async () => {\n            this.#documents.clear();\n            this.#idleDocuments.clear();\n        });\n    }\n    /**\n     * Internal, for tests: how many documents the cache holds, how many are idle, how many incarnations are pinned, and how\n     * many sweep jobs were queued on the line so far.\n     */\n    get documentCacheSizes() {\n        return {\n            cached: this.#documents.size,\n            idle: this.#idleDocuments.size,\n            attached: this.#attachedDocuments.size,\n            sweeps: this.#sweepJobs,\n        };\n    }\n    /** Note a use of a cached document: an unattached one becomes the newest idle one, and an eviction is scheduled. */\n    #touchDocument(addressId) {\n        const cached = this.#documents.get(addressId);\n        if (cached === undefined || this.#attachedDocuments.has(cached.record.id))\n            return;\n        const now = this.#clock();\n        const since = this.#idleDocuments.get(addressId);\n        // A hot document moves to the back at most once per granule, a tenth of the retention up to 1 s: it may then leave\n        // up to a granule early, which costs a reload, while a commit-heavy workload skips the reordering.\n        if (since !== undefined && now - since < Math.min(1_000, this.#documentRetentionMs() / 10))\n            return;\n        this.#idleDocuments.delete(addressId);\n        this.#idleDocuments.set(addressId, now);\n        // A pending sweep for the oldest document comes first unless the retention was shortened since; then it moves up.\n        if (this.#documentSweep === undefined || this.#documentSweep.at > now + this.#documentRetentionMs()) {\n            this.#scheduleDocumentSweep();\n        }\n    }\n    #dropDocument(addressId) {\n        this.#documents.delete(addressId);\n        this.#idleDocuments.delete(addressId);\n    }\n    /**\n     * Schedule the eviction of the oldest idle document: on the line at once when the retention is 0, otherwise when it\n     * expires, by a timer that never keeps the process alive. Where timers cannot be unreferenced, as in Cloudflare\n     * Workers, none is kept: the end of each commit evicts what expired.\n     */\n    #scheduleDocumentSweep() {\n        if (this.#closing !== undefined)\n            return;\n        const oldest = this.#idleDocuments.values().next();\n        if (oldest.done === true)\n            return;\n        const at = oldest.value + this.#documentRetentionMs();\n        if (this.#documentSweep !== undefined && this.#documentSweep.at <= at)\n            return;\n        if (this.#documentSweep?.timer !== undefined)\n            clearTimeout(this.#documentSweep.timer);\n        // The pending sweep stays set until its job runs, so touches while the line is busy queue no more.\n        const sweep = { at, timer: undefined };\n        const run = () => {\n            this.#sweepJobs++;\n            this.#enqueue(async () => {\n                if (this.#documentSweep === sweep)\n                    this.#documentSweep = undefined;\n                if (this.#closing === undefined)\n                    this.#sweepDocuments();\n            }).catch(() => { });\n        };\n        const delay = at - this.#clock();\n        this.#documentSweep = sweep;\n        if (delay <= 0) {\n            queueMicrotask(run);\n            return;\n        }\n        if (this.#documentTimersUnavailable) {\n            this.#documentSweep = undefined;\n            return;\n        }\n        const timer = setTimeout(run, Math.min(delay, MAX_TIMER_DELAY));\n        const unref = timer.unref;\n        if (typeof unref !== \"function\") {\n            clearTimeout(timer);\n            this.#documentTimersUnavailable = true;\n            this.#documentSweep = undefined;\n            return;\n        }\n        unref.call(timer);\n        sweep.timer = timer;\n    }\n    /** On the line: evict the idle documents whose retention passed, oldest first, then schedule the next eviction. */\n    #sweepDocuments() {\n        const expired = this.#clock() - this.#documentRetentionMs();\n        for (const [addressId, since] of this.#idleDocuments) {\n            if (since > expired)\n                break;\n            this.#dropDocument(addressId);\n        }\n        this.#scheduleDocumentSweep();\n    }\n    /** Pin a cached incarnation for one observer; the returned release unpins it once, idle again after the last. */\n    #pinDocument(addressId, recordId) {\n        this.#attachedDocuments.set(recordId, (this.#attachedDocuments.get(recordId) ?? 0) + 1);\n        this.#idleDocuments.delete(addressId);\n        let pinned = true;\n        return () => {\n            if (!pinned)\n                return;\n            pinned = false;\n            const count = (this.#attachedDocuments.get(recordId) ?? 1) - 1;\n            if (count > 0) {\n                this.#attachedDocuments.set(recordId, count);\n                return;\n            }\n            this.#attachedDocuments.delete(recordId);\n            if (this.#documents.get(addressId)?.record.id === recordId)\n                this.#touchDocument(addressId);\n        };\n    }\n    async #runCommit(change, context, scope) {\n        this.#assertHealthy();\n        context.abortSignal?.throwIfAborted();\n        const tx = new Transaction(this.#host, context, scope);\n        let result;\n        try {\n            result = await change(tx);\n            // A callback that caught a failed read must not commit, nor succeed as if it had.\n            this.#assertHealthy();\n        }\n        catch (error) {\n            await tx.settleFailure();\n            this.#sweepDocuments();\n            throw error;\n        }\n        let writes;\n        try {\n            writes = await tx.settleSuccess();\n        }\n        catch (error) {\n            // Settlement aborted every change already.\n            this.#sweepDocuments();\n            throw error;\n        }\n        if (writes.length === 0) {\n            tx.discard();\n            this.#sweepDocuments();\n            return result;\n        }\n        let seq;\n        try {\n            // Once admitted, caller cancellation does not interrupt Storage settlement.\n            seq = await this.#storage.commit(writes, withoutAbortSignal(context));\n        }\n        catch (error) {\n            // The guard has failed the Session.\n            tx.discard();\n            throw error;\n        }\n        let documents;\n        try {\n            documents = tx.adopt(seq);\n        }\n        catch (error) {\n            // Storage already committed; a failed adoption leaves memory behind durable state.\n            this.fail(error);\n            throw error;\n        }\n        for (const document of documents)\n            this.#touchDocument(addressId(document.record));\n        this.#publish(seq, writes, documents, context);\n        this.#sweepDocuments();\n        return result;\n    }\n    #publish(seq, writes, documents, context) {\n        if (this.#commitListeners.size === 0 && this.#internalListeners.size === 0)\n            return;\n        const changes = [];\n        for (const write of writes) {\n            switch (write.type) {\n                case \"conversation\":\n                case \"entry\":\n                case \"task\":\n                case \"submission\":\n                    changes.push(write);\n            }\n        }\n        for (const document of documents)\n            changes.push(document);\n        const publication = { seq, changes };\n        // The commit is durable: a failing listener neither fails the commit nor skips the others.\n        for (const listener of [...this.#internalListeners]) {\n            contained(() => listener(publication, context), (error) => this.fail(error));\n        }\n        for (const listener of [...this.#commitListeners]) {\n            contained(() => listener(publication, context), (error) => this.report(error));\n        }\n    }\n    /**\n     * Attach an observer to one committed incarnation: check the definition, then forward this incarnation's committed\n     * changes and close. `detach` removes both subscriptions.\n     */\n    #attachDocument(definition, loaded, create) {\n        checkRecordScope(definition, loaded.record);\n        checkRecordVersion(definition, loaded.record, loaded.storedVersion);\n        let unsubscribeCommit = () => { };\n        let unsubscribeClose = () => { };\n        // Attached, the incarnation stays cached; once its last observer detaches, or it retires, it is idle again.\n        const unpin = this.#pinDocument(loaded.addressId, loaded.record.id);\n        const detach = () => {\n            unsubscribeCommit();\n            unsubscribeClose();\n            unpin();\n        };\n        let observer;\n        try {\n            observer = create(loaded.tracker.value, detach);\n        }\n        catch (error) {\n            unpin();\n            throw error;\n        }\n        const observed = { version: loaded.valueVersion };\n        unsubscribeCommit = this.observeCommits((publication, context) => {\n            for (const change of publication.changes) {\n                if (change.type !== \"document\" || change.record.id !== loaded.record.id)\n                    continue;\n                // A document state's frames carry no caller cancellation; a watch observes its own cancellation.\n                const frameContext = observer instanceof CommittedStateSource ? withoutAbortSignal(context) : context;\n                const ops = observedOperations(observed, change);\n                // A migration-only base changes nothing for an observer of the new version.\n                if (ops.length === 0)\n                    continue;\n                // A retired incarnation never changes again: its observers keep their last value but pin nothing.\n                if (change.value === null)\n                    unpin();\n                observer.advance(change.value, ops, frameContext);\n            }\n        });\n        unsubscribeClose = this.subscribeClose(() => observer.closeSession(this.#failure));\n        return { observer, detach };\n    }\n    async #loadDocument(definition, addressId, address, context) {\n        const cached = this.#documents.get(addressId);\n        // A tracker serves only tokens of the version its value was materialized for; others reload from Storage.\n        if (cached?.valueVersion === definition.version) {\n            this.#touchDocument(addressId);\n            return cached;\n        }\n        if (cached !== undefined)\n            this.#dropDocument(addressId);\n        const record = await this.#storage.findDocument(address, \"current\", context);\n        if (record === undefined)\n            return undefined;\n        const stored = await this.#storage.document(record.id, \"current\", context);\n        if (stored === undefined)\n            throw new Error(`Current document ${record.id} (${record.kind}) cannot be read`);\n        const value = materializeDocument(definition, stored);\n        const loaded = {\n            addressId,\n            record: stored.record,\n            storedVersion: stored.version,\n            valueVersion: definition.version,\n            deltasSinceBase: stored.deltasSinceBase,\n            tracker: track(value),\n        };\n        this.#documents.set(addressId, loaded);\n        this.#touchDocument(addressId);\n        return loaded;\n    }\n    #enqueue(job) {\n        const run = this.#tail.then(job);\n        this.#tail = run.then(() => undefined, () => undefined);\n        return run;\n    }\n    /** Internal: throw `SessionFailed` when failed, else an error when closing. */\n    assertUsable() {\n        this.#assertHealthy();\n        if (this.#closing !== undefined)\n            throw new Error(\"Session is closed\");\n    }\n    #assertHealthy() {\n        if (this.#failure !== undefined)\n            throw new SessionFailed(this.#failure.error);\n    }\n}\n/**\n * Run a host callback that must not fail its caller: a throw, or a promise it returns that rejects, goes to `onError`,\n * which is not awaited.\n */\nexport function contained(callback, onError) {\n    try {\n        const result = callback();\n        // Any thenable, also a promise from another realm; `Promise.resolve` adopts it with handlers of its own.\n        if (typeof result?.then === \"function\")\n            Promise.resolve(result).catch(onError);\n    }\n    catch (error) {\n        onError(error);\n    }\n}\n/**\n * Operations an observer applies for one committed change. An observer hydrated under another definition version holds\n * a differently shaped value, so it receives the new value as a root replacement instead of operations for that shape.\n */\nfunction observedOperations(observed, change) {\n    if (change.value === null)\n        return RETIREMENT_OPERATIONS;\n    if (change.version === observed.version)\n        return change.ops;\n    observed.version = change.version;\n    return [[\"r\", change.value]];\n}\nfunction cancellationError(signal) {\n    return signal.reason instanceof Error ? signal.reason : new DOMException(\"The operation was aborted\", \"AbortError\");\n}\n/**\n * The Session's Storage behind its failure guard; every component of the Session reads and writes through it. Before a\n * call, a failed Session gets `SessionFailed` without reaching the backend. A call that throws fails the Session and\n * rethrows the backend's error, unless it is a `StorageRequestError` or a read whose caller's context was aborted:\n * neither says the Storage is broken.\n * `close()` always reaches the backend, so a failed Session still closes it.\n */\nclass GuardedStorage {\n    #storage;\n    #latch;\n    /** Backend calls underway, also those off the Session line, which close waits for before it closes the backend. */\n    #underway = new Set();\n    #closing = false;\n    constructor(storage, latch) {\n        this.#storage = storage;\n        this.#latch = latch;\n    }\n    /** Never exempt, whatever it throws: once admitted, whether a failed batch committed is unknown. */\n    commit(writes, context) {\n        return this.#call(undefined, () => this.#storage.commit(writes, context));\n    }\n    mintId() {\n        return this.#call(undefined, () => this.#storage.mintId());\n    }\n    conversation(id, context) {\n        return this.#call(context, () => this.#storage.conversation(id, context));\n    }\n    scanConversations(query, limit, cursor, context) {\n        return this.#call(context, () => this.#storage.scanConversations(query, limit, cursor, context));\n    }\n    entry(first, second, third) {\n        if (third === undefined) {\n            const context = second;\n            return this.#call(context, () => this.#storage.entry(first, context));\n        }\n        return this.#call(third, () => this.#storage.entry(first, second, third));\n    }\n    findLatestHeadMarker(conversationId, atOrBeforeEntryId, context) {\n        return this.#call(context, () => this.#storage.findLatestHeadMarker(conversationId, atOrBeforeEntryId, context));\n    }\n    scanEntries(query, limit, cursor, context) {\n        return this.#call(context, () => this.#storage.scanEntries(query, limit, cursor, context));\n    }\n    task(id, context) {\n        return this.#call(context, () => this.#storage.task(id, context));\n    }\n    scanTasks(query, limit, cursor, context) {\n        return this.#call(context, () => this.#storage.scanTasks(query, limit, cursor, context));\n    }\n    submission(id, context) {\n        return this.#call(context, () => this.#storage.submission(id, context));\n    }\n    scanSubmissions(query, limit, cursor, context) {\n        return this.#call(context, () => this.#storage.scanSubmissions(query, limit, cursor, context));\n    }\n    submissionByRequest(conversationId, requestId, context) {\n        return this.#call(context, () => this.#storage.submissionByRequest(conversationId, requestId, context));\n    }\n    findDocument(address, at, context) {\n        return this.#call(context, () => this.#storage.findDocument(address, at, context));\n    }\n    document(id, at, context) {\n        return this.#call(context, () => this.#storage.document(id, at, context));\n    }\n    scanDocuments(query, limit, cursor, context) {\n        return this.#call(context, () => this.#storage.scanDocuments(query, limit, cursor, context));\n    }\n    /**\n     * Close the backend once every call underway has settled, so none outlives it or fails after `closed` settles. New\n     * calls are refused from here on: a paged read must not start its next page while the backend closes.\n     */\n    async close(context) {\n        this.#closing = true;\n        await Promise.allSettled([...this.#underway]);\n        return this.#storage.close(context);\n    }\n    /**\n     * Run one backend call under the guard. `read` is a read's context; `commit()` and `mintId()` pass none, so nothing\n     * exempts their errors: once a batch is admitted, whether it committed is unknown. A call still underway when another\n     * fails the Session ends with `SessionFailed` too, whatever it returns: nothing it read or wrote is used.\n     */\n    async #call(read, run) {\n        this.#assertHealthy();\n        if (this.#closing)\n            throw new Error(\"Session is closed\");\n        let result;\n        // An async wrapper, so a backend that throws synchronously is guarded too.\n        const call = (async () => run())();\n        this.#underway.add(call);\n        try {\n            result = await call;\n        }\n        catch (error) {\n            this.#assertHealthy();\n            // An invalid read, or one its caller cancelled, says nothing about the Storage; it fails that call only.\n            const exempt = read !== undefined && (error instanceof StorageRequestError || read.abortSignal?.aborted === true);\n            if (!exempt)\n                this.#latch.fail(error);\n            throw error;\n        }\n        finally {\n            this.#underway.delete(call);\n        }\n        this.#assertHealthy();\n        return result;\n    }\n    #assertHealthy() {\n        const failure = this.#latch.failure;\n        if (failure !== undefined)\n            throw new SessionFailed(failure.error);\n    }\n}\n//# sourceMappingURL=session.js.map","import { defineDoc } from \"@earendil-works/pi-durable\";\n//#region src/services/durableSession/docs.ts\n/** Public string identity belongs to Po, not the durable numeric ID namespace. */\nconst SessionIdentityDoc = defineDoc({\n\tkind: \"po.session.identity\",\n\tversion: 1,\n\tscope: \"session\",\n\tinitial: () => ({\n\t\tid: \"\",\n\t\tcreatedAt: 0,\n\t\tparentSessionId: \"\"\n\t})\n});\nconst SessionMetadataDoc = defineDoc({\n\tkind: \"po.session.metadata\",\n\tversion: 1,\n\tscope: \"session\",\n\tinitial: () => ({\n\t\tname: \"\",\n\t\tworkspaceRoot: \"\",\n\t\texecution: \"\",\n\t\tlaneName: \"main\",\n\t\tgroups: []\n\t})\n});\nconst FastModeDoc = defineDoc({\n\tkind: \"po.fast-mode\",\n\tversion: 1,\n\tscope: \"session\",\n\tinitial: () => ({ enabled: false })\n});\nconst AgentLockDoc = defineDoc({\n\tkind: \"po.agent-lock\",\n\tversion: 1,\n\tscope: \"session\",\n\tinitial: () => ({ locked: false })\n});\nconst LabelsDoc = defineDoc({\n\tkind: \"po.labels\",\n\tversion: 1,\n\tscope: \"session\",\n\tinitial: () => ({ labels: {} })\n});\n/**\n* Profile identity entries of one conversation, written in the identity entry's commit, so a transcript page finds\n* the avatar in effect without scanning backwards. Rewindable with `asOf` forks: a fork keeps only the identities\n* written before its fork point. Sessions written before this document have no entries and show the default avatar.\n*/\nconst IdentityHistoryDoc = defineDoc({\n\tkind: \"po.identity-history\",\n\tversion: 1,\n\tscope: \"conversation\",\n\thistory: \"rewindable\",\n\tfork: \"asOf\",\n\tinitial: () => ({ items: [] })\n});\n//#endregion\nexport { AgentLockDoc, FastModeDoc, IdentityHistoryDoc, LabelsDoc, SessionIdentityDoc, SessionMetadataDoc };\n\n//# sourceMappingURL=docs.mjs.map","import { SessionIdentityDoc } from \"./docs.mjs\";\n//#region src/services/durableSession/index.ts\n/** The directory every durable session journal lives in, under the sessions root. */\nconst DURABLE_DIRECTORY = \"durable-v1\";\n/** Stamps a new session's identity, or checks an existing one matches the requested id. */\nasync function initializeSessionIdentity(session, request, context) {\n\tconst identity = await session.snapshot(SessionIdentityDoc, context);\n\tif (request.existing && (!identity || identity.id !== request.id)) throw new Error(\"SQLite session id does not match the requested session\");\n\tif (request.existing) return;\n\tawait session.commit(async (tx) => {\n\t\tconst doc = await tx.doc(SessionIdentityDoc);\n\t\tdoc.id = request.id;\n\t\tdoc.createdAt = Date.now();\n\t\tdoc.parentSessionId = request.parentSessionId ?? \"\";\n\t}, context);\n}\n//#endregion\nexport { DURABLE_DIRECTORY, initializeSessionIdentity };\n\n//# sourceMappingURL=index.mjs.map","import { readTextIfExists, writeFileAtomic } from \"../platformFiles/index.mjs\";\n//#region src/services/json/core.ts\nfunction isRecord(value) {\n\treturn typeof value === \"object\" && value !== null && !Array.isArray(value);\n}\n/** Parses a JSON object, treating missing or blank content as the fallback. */\nfunction parseJsonObject(content, fallback = {}) {\n\tconst trimmed = content?.trim();\n\treturn trimmed ? JSON.parse(trimmed) : fallback;\n}\n/** The on-disk form of a JSON state file: two-space indent and a trailing newline. */\nfunction serializeJson(value) {\n\treturn `${JSON.stringify(value, null, 2)}\\n`;\n}\n/** Reads a JSON object, treating a missing or empty file as the fallback. */\nasync function readJsonAsync(fs, filePath, context, fallback = {}) {\n\treturn parseJsonObject(await readTextIfExists(fs, filePath, context), fallback);\n}\n/** Writes a JSON object through a uniquely named temporary file and a rename. */\nasync function writeJsonAsync(fs, filePath, value, context) {\n\tawait writeFileAtomic(fs, filePath, serializeJson(value), context);\n}\n//#endregion\nexport { isRecord, parseJsonObject, readJsonAsync, serializeJson, writeJsonAsync };\n\n//# sourceMappingURL=core.mjs.map","import { parseJsonObject, serializeJson } from \"./core.mjs\";\nimport { randomUUID } from \"node:crypto\";\nimport fs from \"node:fs\";\nimport path from \"node:path\";\n//#region src/services/json/sync.ts\nconst ATOMIC_FILE_SUFFIX = \".tmp\";\n/**\n* Reads a JSON object, treating a missing or empty file as the fallback.\n*\n* @deprecated Node-only sync shim; use readJsonAsync. Removed in M2.\n*/\nfunction readJson(filePath, fallback = {}) {\n\tif (!fs.existsSync(filePath)) return fallback;\n\treturn parseJsonObject(fs.readFileSync(filePath, \"utf8\"), fallback);\n}\n/**\n* Writes through a uniquely named temporary file in the same directory.\n*\n* The pid and a UUID are both in the name so two harnesses writing the same\n* target cannot collide on the temporary path, and a failed write cleans up\n* after itself rather than leaving the fragment behind.\n*\n* @deprecated Node-only sync shim; use writeFileAtomic from `@agimon-ai/po-core/platform`. Removed in M2.\n*/\nfunction writeFileAtomic(filePath, content) {\n\tfs.mkdirSync(path.dirname(filePath), { recursive: true });\n\tconst temporaryPath = `${filePath}.${process.pid}.${randomUUID()}${ATOMIC_FILE_SUFFIX}`;\n\ttry {\n\t\tfs.writeFileSync(temporaryPath, content);\n\t\tfs.renameSync(temporaryPath, filePath);\n\t} catch (error) {\n\t\tfs.rmSync(temporaryPath, { force: true });\n\t\tthrow error;\n\t}\n}\n/** @deprecated Node-only sync shim; use writeJsonAsync. Removed in M2. */\nfunction writeJson(filePath, value) {\n\twriteFileAtomic(filePath, serializeJson(value));\n}\n//#endregion\nexport { readJson, writeFileAtomic, writeJson };\n\n//# sourceMappingURL=sync.mjs.map","import path from \"node:path\";\n//#region src/services/poPackage/core.ts\n/**\n* Recognizing an installed Po package on disk.\n*\n* Pi resolves settings entries to paths rather than through Node, so the same\n* package is spelled differently in every scope: a bare name beside the user\n* config, a relative directory beside the project config, a file inside either.\n* Both the extension alias and the project settings reconciler have to decide\n* whether one of those spellings names this package, and they have to agree.\n*/\n/** The manifest file a package root holds. */\nconst PACKAGE_MANIFEST = \"package.json\";\n/** The package name Pi loads Po under, in every settings scope. */\nconst PO_PACKAGE_NAME = \"@agimon-ai/po\";\n/** The `name` field of manifest text, when it is a readable one. */\nfunction parseManifestName(content) {\n\ttry {\n\t\tconst parsed = JSON.parse(content);\n\t\treturn typeof parsed.name === \"string\" ? parsed.name : void 0;\n\t} catch {\n\t\treturn;\n\t}\n}\n/** The `name` field of the manifest in a directory, when it has a readable one. */\nasync function manifestNameAsync(fs, directory, context) {\n\tconst result = await fs.readTextFile(path.join(directory, PACKAGE_MANIFEST), context);\n\treturn result.ok ? parseManifestName(result.value) : void 0;\n}\n/** Whether a path names a directory, following a symbolic link the way `stat` does. */\nasync function isDirectoryAsync(fs, target, context) {\n\tconst info = await fs.fileInfo(target, context);\n\tif (!info.ok) return void 0;\n\tif (info.value.kind !== \"symlink\") return info.value.kind === \"directory\";\n\tconst resolved = await fs.canonicalPath(target, context);\n\tif (!resolved.ok) return void 0;\n\tconst followed = await fs.fileInfo(resolved.value, context);\n\treturn followed.ok ? followed.value.kind === \"directory\" : void 0;\n}\n/**\n* Name of the nearest package a path belongs to, walking upward from it.\n*\n* The first manifest found wins rather than the first matching one, so a file\n* inside some other package nested under a Po checkout is not mistaken for\n* Po itself.\n*/\nasync function enclosingPackageNameAsync(fs, target, context) {\n\tconst isDirectory = await isDirectoryAsync(fs, target, context);\n\tif (isDirectory === void 0) return void 0;\n\tlet directory = isDirectory ? target : path.dirname(target);\n\twhile (true) {\n\t\tconst name = await manifestNameAsync(fs, directory, context);\n\t\tif (name !== void 0) return name;\n\t\tconst parent = path.dirname(directory);\n\t\tif (parent === directory) return void 0;\n\t\tdirectory = parent;\n\t}\n}\n/** True when a resolved path lives inside an installed Po package. */\nasync function isPoPackagePathAsync(fs, target, context) {\n\treturn await enclosingPackageNameAsync(fs, target, context) === PO_PACKAGE_NAME;\n}\n//#endregion\nexport { PACKAGE_MANIFEST, PO_PACKAGE_NAME, enclosingPackageNameAsync, isPoPackagePathAsync, manifestNameAsync, parseManifestName };\n\n//# sourceMappingURL=core.mjs.map","import { pathExists, removePath, writeFileAtomic } from \"../platformFiles/index.mjs\";\nimport { isRecord, readJsonAsync } from \"../json/core.mjs\";\nimport \"../../../runtimeJson.mjs\";\nimport { nodeHost } from \"../nodeHost/index.mjs\";\nimport { PACKAGE_MANIFEST, PO_PACKAGE_NAME } from \"../poPackage/core.mjs\";\nimport { createSerialRunner } from \"../serialRunner/index.mjs\";\nimport path from \"node:path\";\n//#region src/services/piSettings/core.ts\n/**\n* Pi's user settings, as `po sync` maintains them.\n*\n* The Po package is registered globally so a plain `pi` process can find the\n* lightweight package bootstrap before project resources are trusted. Sync owns\n* the extension registration, ambient-discovery filter, theme resource, selected default theme, and quiet-startup keys\n* while preserving every unrelated user setting.\n*/\nconst PI_CODING_AGENT_DIR_ENV = \"PI_CODING_AGENT_DIR\";\n/** Moves Po's whole home, agent directory included, away from `~/.po`. */\nconst PO_HOME_ENV = \"PO_HOME\";\n/** The folder name of Po's home and of a repository's own configuration. */\nconst PO_HOME_DIRECTORY = \".po\";\n/** Plain Pi's home, whose agent directory Po falls back to for model config. */\nconst PI_HOME_DIRECTORY = \".pi\";\n/** The agent folder inside a Po or Pi home. */\nconst AGENT_DIRECTORY = \"agent\";\nconst RUNTIME_DIRECTORY = \"runtime\";\nconst SETTINGS_FILE = \"settings.json\";\n/** Credentials file inside an agent directory. */\nconst AUTH_FILE = \"auth.json\";\n/** Custom provider file inside an agent directory. */\nconst MODELS_FILE = \"models.json\";\nconst THEMES_DIRECTORY = \"themes\";\nconst EXTENSIONS_KEY = \"extensions\";\nconst THEMES_KEY = \"themes\";\nconst THEME_KEY = \"theme\";\nconst QUIET_STARTUP_KEY = \"quietStartup\";\nconst PO_THEME_NAME = \"po-dark\";\n/** File name of the synchronized Po theme. */\nconst PO_THEME_FILE = `${PO_THEME_NAME}.json`;\nconst AGIMON_SCOPE_PREFIX = \"@agimon-ai/\";\nconst NPM_SOURCE_PREFIX = \"npm:\";\nconst HOME_ALIAS = \"~\";\nconst HOME_ALIAS_PREFIX = \"~/\";\n/** The stable package entry Pi loads for every synced repository. */\nconst PO_EXTENSION = PO_PACKAGE_NAME;\n/** Suppresses Pi's ambient extension-directory scan while leaving explicit sources intact. */\nconst AMBIENT_EXTENSION_FILTER = \"!extensions/**\";\n/**\n* Pi built-in extensions kept off under Po. po-mcp owns `/mcp` and MCP servers. Codemode and\n* tool search are opt-in in plain Pi, but Po activates every registered tool, so leaving them\n* loaded would declare both to the model in every session.\n*/\nconst DISABLED_PI_BUILTINS = [\n\t\"-builtin:mcp\",\n\t\"-builtin:codemode\",\n\t\"-builtin:tool-search\"\n];\n/** Ownership marker `po init` wrote into the dispatcher package manifest. */\nconst PO_DISPATCHER_MARKER = 1;\n/**\n* Expands `~` and resolves a relative path against home, never the cwd, so every\n* Po process lands on the same directory wherever it was started.\n*/\nfunction resolveConfiguredDirectory(configured, homeDirectory) {\n\tif (configured === HOME_ALIAS) return homeDirectory;\n\tif (configured.startsWith(HOME_ALIAS_PREFIX)) return path.join(homeDirectory, configured.slice(2));\n\treturn path.resolve(homeDirectory, configured);\n}\n/**\n* Po's home: config, workspaces, runtime registry and its Pi agent directory.\n* Defaults to `~/.po`; `PO_HOME` moves all of it.\n*/\nfunction poHomeDirectory(homeDirectory = nodeHost.homeDirectory(), environment = process.env) {\n\tconst configured = environment[PO_HOME_ENV]?.trim();\n\treturn configured ? resolveConfiguredDirectory(configured, homeDirectory) : path.join(homeDirectory, \".po\");\n}\n/**\n* The single install root for runtime packages every Po root shares: its\n* `package.json` declares them and its `node_modules` holds them.\n*/\nfunction poRuntimeDirectory(homeDirectory = nodeHost.homeDirectory(), environment = process.env) {\n\treturn path.join(poHomeDirectory(homeDirectory, environment), RUNTIME_DIRECTORY);\n}\n/** True when a `.po` folder at this path would be Po's own home rather than a repository marker. */\nfunction isPoHomeMarker(marker, homeDirectory = nodeHost.homeDirectory(), environment = process.env) {\n\treturn marker === path.resolve(poHomeDirectory(homeDirectory, environment));\n}\n/**\n* True when a directory's `.po` folder exists and is a repository's own configuration.\n*\n* Po's home is `~/.po`, so the home directory carries a `.po` folder too. That folder is\n* the global layer, not a repository marker: walking up from any path under home must not\n* stop at home and treat the global configuration as repository configuration.\n*/\nasync function hasRepositoryPoDirectoryAsync(fs, directory, context, homeDirectory = nodeHost.homeDirectory(), environment = process.env) {\n\tconst marker = path.resolve(directory, \".po\");\n\tif (isPoHomeMarker(marker, homeDirectory, environment)) return false;\n\tconst resolved = await fs.canonicalPath(marker, context);\n\tif (!resolved.ok) return false;\n\tconst info = await fs.fileInfo(resolved.value, context);\n\treturn info.ok && info.value.kind === \"directory\";\n}\n/**\n* The Pi agent directory Po runs with. Honors Pi's documented override; every Po\n* entry point sets that override, so the default only applies to library callers.\n*/\nfunction piAgentDirectory(environment = process.env, homeDirectory = nodeHost.homeDirectory()) {\n\tconst configured = environment[PI_CODING_AGENT_DIR_ENV]?.trim();\n\tif (!configured) return path.join(poHomeDirectory(homeDirectory, environment), AGENT_DIRECTORY);\n\treturn resolveConfiguredDirectory(configured, homeDirectory);\n}\n/** True when the directory names a model: credentials, a custom provider, or a default. */\nasync function hasModelConfigAsync(fs, agentDirectory, context) {\n\ttry {\n\t\treturn await pathExists(fs, path.join(agentDirectory, \"models.json\"), context) || Object.keys(await readJsonAsync(fs, path.join(agentDirectory, \"auth.json\"), context)).length > 0 || typeof (await readJsonAsync(fs, piSettingsPath(agentDirectory), context)).defaultProvider === \"string\";\n\t} catch {\n\t\treturn true;\n\t}\n}\n/**\n* Where Po reads auth.json and models.json from. Po's own agent\n* directory when it names a model; otherwise plain Pi's `~/.pi/agent`, so a user who\n* already set Pi up can start a session before configuring Po.\n*/\nasync function modelConfigDirectoryAsync(fs, agentDirectory, context, homeDirectory = nodeHost.homeDirectory()) {\n\tif (await hasModelConfigAsync(fs, agentDirectory, context)) return agentDirectory;\n\tconst pi = path.join(homeDirectory, \".pi\", AGENT_DIRECTORY);\n\treturn pi !== agentDirectory && await hasModelConfigAsync(fs, pi, context) ? pi : agentDirectory;\n}\n/** Model defaults fall back independently of credentials, only when settings.json is absent. */\nasync function modelSettingsDirectoryAsync(fs, agentDirectory, context, homeDirectory = nodeHost.homeDirectory()) {\n\tif (await pathExists(fs, piSettingsPath(agentDirectory), context)) return agentDirectory;\n\tconst pi = path.join(homeDirectory, \".pi\", AGENT_DIRECTORY);\n\treturn await pathExists(fs, piSettingsPath(pi), context) ? pi : agentDirectory;\n}\nfunction piSettingsPath(agentDirectory) {\n\treturn path.join(agentDirectory, SETTINGS_FILE);\n}\nfunction piThemeDirectory(agentDirectory) {\n\treturn path.join(agentDirectory, THEMES_DIRECTORY);\n}\nfunction stringList(value) {\n\treturn Array.isArray(value) ? value.filter((entry) => typeof entry === \"string\") : [];\n}\nfunction settingsRelativePath(agentDirectory, target) {\n\tconst relative = path.relative(agentDirectory, target);\n\tif (relative.startsWith(\"..\") || path.isAbsolute(relative)) return target;\n\treturn relative.split(path.sep).join(\"/\");\n}\nfunction isManagedExtension(value) {\n\tconst normalized = value.replaceAll(\"\\\\\", \"/\");\n\treturn normalized === PO_EXTENSION || normalized === \"!extensions/**\" || DISABLED_PI_BUILTINS.includes(normalized);\n}\nfunction isLegacyPoTheme(value, themeName) {\n\tconst normalized = value.replaceAll(\"\\\\\", \"/\");\n\treturn normalized.endsWith(`/po/${themeName}.json`) || normalized === `po/${themeName}.json`;\n}\n/** Produces the user settings content for an update, without writing it. */\nfunction mergePiSettings(current, agentDirectory, update) {\n\tconst theme = settingsRelativePath(agentDirectory, update.themePath);\n\tconst extensions = [\n\t\tPO_EXTENSION,\n\t\tAMBIENT_EXTENSION_FILTER,\n\t\t...DISABLED_PI_BUILTINS,\n\t\t...stringList(current[EXTENSIONS_KEY]).filter((value) => !isManagedExtension(value))\n\t];\n\tconst themes = [theme, ...stringList(current[THEMES_KEY]).filter((value) => value !== theme && !isLegacyPoTheme(value, update.themeName))];\n\treturn {\n\t\t...current,\n\t\t[QUIET_STARTUP_KEY]: true,\n\t\t[EXTENSIONS_KEY]: extensions,\n\t\t[THEMES_KEY]: themes,\n\t\t[THEME_KEY]: typeof current[THEME_KEY] === \"string\" ? current[THEME_KEY] : update.themeName\n\t};\n}\n/** Settings content as a JSON object; non-object JSON counts as empty. */\nfunction normalizePiSettings(settings) {\n\treturn isRecord(settings) ? settings : {};\n}\nasync function readPiSettingsAsync(fs, agentDirectory, context) {\n\treturn normalizePiSettings(await readJsonAsync(fs, piSettingsPath(agentDirectory), context));\n}\nfunction serializePiSettings(settings) {\n\treturn `${JSON.stringify(settings, null, 2)}\\n`;\n}\n/** Serialises every read-modify-write of one settings file in this process. */\nconst settingsWrites = createSerialRunner();\n/** Merges the Po-owned keys into Pi's user settings file. */\nasync function writePiSettingsAsync(fs, agentDirectory, update, context) {\n\tconst settingsPath = piSettingsPath(agentDirectory);\n\tawait settingsWrites.forKey(settingsPath)(async () => {\n\t\tconst current = await readPiSettingsAsync(fs, agentDirectory, context);\n\t\tawait writeFileAtomic(fs, settingsPath, serializePiSettings(mergePiSettings(current, agentDirectory, update)), context);\n\t});\n\treturn settingsPath;\n}\n/** Whether manifest text is the dispatcher package `po init` generated, by its ownership marker. */\nfunction isPoDispatcherManifest(content) {\n\ttry {\n\t\tconst parsed = JSON.parse(content);\n\t\treturn parsed.name === \"@agimon-ai/po\" && parsed.poDispatcher === 1;\n\t} catch {\n\t\treturn false;\n\t}\n}\n/** Whether a directory is the dispatcher package `po init` generated, by its manifest ownership marker. */\nasync function isPoDispatcherPackageAsync(fs, directory, context) {\n\tconst result = await fs.readTextFile(path.join(directory, PACKAGE_MANIFEST), context);\n\treturn result.ok && isPoDispatcherManifest(result.value);\n}\n/** Where `po init` put its dispatcher package inside an agent directory. */\nfunction poDispatcherPath(agentDirectory) {\n\treturn path.join(agentDirectory, ...PO_PACKAGE_NAME.split(\"/\"));\n}\n/** Where `po sync` put the Po theme inside an agent directory. */\nfunction poThemePath(agentDirectory) {\n\treturn path.join(piThemeDirectory(agentDirectory), PO_THEME_FILE);\n}\nfunction isOtherAgimonDistribution(value) {\n\tconst normalized = value.startsWith(NPM_SOURCE_PREFIX) ? value.slice(4) : value;\n\treturn normalized.startsWith(AGIMON_SCOPE_PREFIX) && normalized !== PO_EXTENSION;\n}\nfunction isSharedFilter(value) {\n\treturn value === \"!extensions/**\" || DISABLED_PI_BUILTINS.includes(value);\n}\n/**\n* The user settings with Po's entries removed, or undefined when no Po entry is present.\n*\n* The shared ambient and built-in filters stay while another `@agimon-ai/*` distribution\n* is still registered, because it relies on the same filters. Unrelated settings are preserved.\n*/\nfunction prunePoPiSettings(current, agentDirectory) {\n\tconst themePath = poThemePath(agentDirectory);\n\tconst extensions = stringList(current[EXTENSIONS_KEY]);\n\tconst themes = stringList(current[THEMES_KEY]);\n\tconst isPoTheme = (value) => path.resolve(agentDirectory, value) === themePath;\n\tif (!(extensions.includes(PO_EXTENSION) || themes.some(isPoTheme) || current[THEME_KEY] === PO_THEME_NAME)) return void 0;\n\tconst keepFilters = extensions.some(isOtherAgimonDistribution);\n\tconst next = { ...current };\n\tif (Array.isArray(current[EXTENSIONS_KEY])) next[EXTENSIONS_KEY] = current[EXTENSIONS_KEY].filter((value) => value !== PO_EXTENSION && (keepFilters || typeof value !== \"string\" || !isSharedFilter(value)));\n\tif (Array.isArray(current[THEMES_KEY])) next[THEMES_KEY] = current[THEMES_KEY].filter((value) => typeof value !== \"string\" || !isPoTheme(value));\n\tif (current[THEME_KEY] === PO_THEME_NAME) delete next[THEME_KEY];\n\treturn next;\n}\n/**\n* Removes the entries `po init` and older `po sync` runs added to Pi's user agent directory.\n*\n* Nothing is written when no Po entry is present. Returns the paths and entries it removed.\n*/\nasync function removePoPiSettingsAsync(fs, agentDirectory, context) {\n\tconst removed = [];\n\tconst settingsPath = piSettingsPath(agentDirectory);\n\tawait settingsWrites.forKey(settingsPath)(async () => {\n\t\tconst next = prunePoPiSettings(await readPiSettingsAsync(fs, agentDirectory, context), agentDirectory);\n\t\tif (!next) return;\n\t\tawait writeFileAtomic(fs, settingsPath, serializePiSettings(next), context);\n\t\tremoved.push(settingsPath);\n\t});\n\tconst themePath = poThemePath(agentDirectory);\n\tconst theme = await fs.fileInfo(themePath, context);\n\tif (theme.ok && theme.value.kind === \"file\") {\n\t\tawait removePath(fs, themePath, context);\n\t\tremoved.push(themePath);\n\t}\n\tconst dispatcher = poDispatcherPath(agentDirectory);\n\tconst dispatcherInfo = await fs.fileInfo(dispatcher, context);\n\tif (dispatcherInfo.ok && dispatcherInfo.value.kind === \"directory\" && await isPoDispatcherPackageAsync(fs, dispatcher, context)) {\n\t\tawait removePath(fs, dispatcher, context);\n\t\tremoved.push(dispatcher);\n\t}\n\treturn removed;\n}\n//#endregion\nexport { AGENT_DIRECTORY, AMBIENT_EXTENSION_FILTER, AUTH_FILE, DISABLED_PI_BUILTINS, MODELS_FILE, PI_HOME_DIRECTORY, PO_DISPATCHER_MARKER, PO_EXTENSION, PO_HOME_DIRECTORY, PO_HOME_ENV, PO_THEME_FILE, hasRepositoryPoDirectoryAsync, isPoDispatcherManifest, isPoDispatcherPackageAsync, isPoHomeMarker, mergePiSettings, modelConfigDirectoryAsync, modelSettingsDirectoryAsync, normalizePiSettings, piAgentDirectory, piSettingsPath, piThemeDirectory, poDispatcherPath, poHomeDirectory, poRuntimeDirectory, poThemePath, prunePoPiSettings, readPiSettingsAsync, removePoPiSettingsAsync, serializePiSettings, writePiSettingsAsync };\n\n//# sourceMappingURL=core.mjs.map","import { userInfo } from \"node:os\";\nimport path from \"node:path\";\nimport { lstat, mkdir, realpath, rm } from \"node:fs/promises\";\n//#region src/services/sessionFiles/sessionDirectory.ts\n/** Validate every Po-owned ancestor. OS temp itself may be shared. */\nasync function checkedSessionDirectory(platform, directory, create) {\n\tconst base = await realpath(platform.temporaryDirectory);\n\tconst relative = path.relative(platform.temporaryDirectory, directory);\n\tif (!relative || relative.startsWith(\"..\") || path.isAbsolute(relative)) throw new Error(\"Unsafe session temp root.\");\n\tlet current = base;\n\tconst uid = userInfo().uid;\n\tfor (const segment of relative.split(path.sep)) {\n\t\tcurrent = path.join(current, segment);\n\t\tif (create) try {\n\t\t\tawait mkdir(current, { mode: 448 });\n\t\t} catch (error) {\n\t\t\tif (!(error instanceof Error && \"code\" in error && error.code === \"EEXIST\")) throw error;\n\t\t}\n\t\tconst info = await lstat(current);\n\t\tif (!info.isDirectory() || info.isSymbolicLink() || info.uid !== uid || (info.mode & 63) !== 0) throw new Error(\"Unsafe session temporary directory.\");\n\t\tif (await realpath(current) !== current) throw new Error(\"Session temporary directory changed during access.\");\n\t}\n\treturn current;\n}\nasync function prepareSessionDirectory(platform, directory) {\n\treturn checkedSessionDirectory(platform, directory, true);\n}\n/** Remove only an existing session temp tree, never creating missing cleanup targets. */\nasync function removeSessionDirectory(platform, directory) {\n\ttry {\n\t\tconst checked = await checkedSessionDirectory(platform, directory, false);\n\t\tawait rm(checked, {\n\t\t\trecursive: true,\n\t\t\tforce: true\n\t\t});\n\t} catch (error) {\n\t\tif (!(error instanceof Error && \"code\" in error && error.code === \"ENOENT\")) throw error;\n\t}\n}\n/** Persistent output roots may contain symlinks as files, but the owned root and parent must not redirect removal. */\nasync function removeSessionOutputDirectory(_platform, directory) {\n\ttry {\n\t\tconst parent = path.dirname(directory);\n\t\tfor (const target of [parent, directory]) {\n\t\t\tconst info = await lstat(target);\n\t\t\tif (!info.isDirectory() || info.isSymbolicLink()) throw new Error(\"Unsafe session output cleanup target.\");\n\t\t}\n\t\tconst realParent = await realpath(parent);\n\t\tconst realDirectory = await realpath(directory);\n\t\tif (realDirectory !== path.join(realParent, path.basename(directory))) throw new Error(\"Session output cleanup target changed during access.\");\n\t\tawait rm(realDirectory, {\n\t\t\trecursive: true,\n\t\t\tforce: true\n\t\t});\n\t} catch (error) {\n\t\tif (!(error instanceof Error && \"code\" in error && error.code === \"ENOENT\")) throw error;\n\t}\n}\n//#endregion\nexport { prepareSessionDirectory, removeSessionDirectory, removeSessionOutputDirectory };\n\n//# sourceMappingURL=sessionDirectory.mjs.map","import { poHomeDirectory } from \"../piSettings/core.mjs\";\nimport { SessionIdentityDoc, SessionMetadataDoc } from \"../durableSession/docs.mjs\";\nimport { prepareSessionDirectory, removeSessionDirectory, removeSessionOutputDirectory } from \"./sessionDirectory.mjs\";\nimport { createHash } from \"node:crypto\";\nimport path from \"node:path\";\nimport { BACKGROUND_CONTEXT } from \"@earendil-works/chord/context\";\nimport { createSession } from \"@earendil-works/pi-durable\";\n//#region src/services/sessionFiles/index.ts\nconst PO_SESSION_TEMP_DIR = \"PO_SESSION_TEMP_DIR\";\nconst PO_SESSION_FILES_SERVICE = \"po/session-files\";\n/** A host-owned path, never a client-selected root or an inherited parent session path. */\nfunction sessionTempDirectory(options) {\n\tif (!/^[a-zA-Z0-9_-]+$/u.test(options.sessionId)) throw new Error(\"Invalid temporary-file session identity.\");\n\tif (!path.isAbsolute(options.temporaryDirectory)) throw new Error(\"The host temporary directory must be absolute.\");\n\tconst namespace = createHash(\"sha256\").update(options.homeDirectory).update(\"\\0\").update(poHomeDirectory(options.homeDirectory, options.environment)).digest(\"hex\").slice(0, 24);\n\treturn path.join(options.temporaryDirectory, `po-${namespace}`, \"sessions\", options.sessionId);\n}\n/** Both the execution host and package APIs call this with their admitted session identity. */\nasync function prepareSessionEnvironment(input) {\n\tconst environment = { ...input.environment };\n\tdelete environment[PO_SESSION_TEMP_DIR];\n\tif (input.platform.temporaryDirectory === void 0) return Object.freeze(environment);\n\tconst directory = sessionTempDirectory({\n\t\tsessionId: input.sessionId,\n\t\thomeDirectory: input.platform.homeDirectory,\n\t\tenvironment,\n\t\ttemporaryDirectory: input.platform.temporaryDirectory\n\t});\n\tconst preparedDirectory = await prepareSessionDirectory(input.platform, directory);\n\treturn Object.freeze({\n\t\t...environment,\n\t\t[PO_SESSION_TEMP_DIR]: preparedDirectory\n\t});\n}\nfunction checkedDirectories(value, sessionId) {\n\tif (!value || typeof value !== \"object\") throw new Error(\"Invalid saved session output directories.\");\n\tconst files = value;\n\tconst absolute = (directory) => typeof directory === \"string\" && !directory.includes(\"\\0\") && path.isAbsolute(directory) && path.resolve(directory) === directory;\n\tif (!absolute(files.agentDirectory)) throw new Error(\"Invalid saved session agent directory.\");\n\tif (files.temporaryDirectory !== void 0) {\n\t\tconst directory = files.temporaryDirectory;\n\t\tif (!absolute(directory) || path.basename(directory) !== sessionId || path.basename(path.dirname(directory)) !== \"sessions\" || !/^po-[a-f0-9]{24}$/u.test(path.basename(path.dirname(path.dirname(directory))))) throw new Error(\"Invalid saved session temporary directory.\");\n\t}\n\treturn {\n\t\tagentDirectory: files.agentDirectory,\n\t\t...files.temporaryDirectory === void 0 ? {} : { temporaryDirectory: files.temporaryDirectory }\n\t};\n}\n/** Narrow server-written output metadata, without exposing a session's environment or accepting request roots. */\nasync function readSessionFileDirectories(sessions, sessionId) {\n\tif (!/^[a-zA-Z0-9_-]+$/u.test(sessionId)) throw new Error(\"Invalid session output identity.\");\n\tconst storage = await sessions.openReadOnly(sessionId, BACKGROUND_CONTEXT);\n\tconst session = createSession(storage);\n\ttry {\n\t\tif ((await session.snapshot(SessionIdentityDoc, BACKGROUND_CONTEXT))?.id !== sessionId) throw new Error(\"Saved output does not belong to this session.\");\n\t\tconst metadata = await session.snapshot(SessionMetadataDoc, BACKGROUND_CONTEXT);\n\t\tif (!metadata?.execution) return void 0;\n\t\tconst execution = JSON.parse(metadata.execution);\n\t\tif (!execution || typeof execution !== \"object\" || !(\"files\" in execution) || execution.files === void 0) return void 0;\n\t\treturn checkedDirectories(execution.files, sessionId);\n\t} finally {\n\t\tawait session.close(BACKGROUND_CONTEXT);\n\t}\n}\n/** Explicit session removal only. Ordinary close, release and host shutdown preserve output. */\nasync function removeSessionFiles(input) {\n\tif (!/^[a-zA-Z0-9_-]+$/u.test(input.sessionId) || path.basename(input.artifactDirectory) !== input.sessionId) throw new Error(\"Invalid session output cleanup identity.\");\n\tconst directories = input.directories === void 0 ? void 0 : checkedDirectories(input.directories, input.sessionId);\n\tconst removals = [removeSessionOutputDirectory(input.platform, input.artifactDirectory)];\n\tconst temporaryDirectory = directories?.temporaryDirectory ?? (input.platform.temporaryDirectory === void 0 ? void 0 : sessionTempDirectory({\n\t\tsessionId: input.sessionId,\n\t\thomeDirectory: input.platform.homeDirectory,\n\t\tenvironment: input.environment,\n\t\ttemporaryDirectory: input.platform.temporaryDirectory\n\t}));\n\tif (temporaryDirectory !== void 0) {\n\t\tconst originalBase = path.dirname(path.dirname(path.dirname(temporaryDirectory)));\n\t\tremovals.push(removeSessionDirectory({\n\t\t\t...input.platform,\n\t\t\ttemporaryDirectory: originalBase\n\t\t}, temporaryDirectory));\n\t}\n\tconst failures = (await Promise.allSettled(removals)).filter((result) => result.status === \"rejected\").map((result) => result.reason);\n\tif (failures.length > 0) throw new AggregateError(failures, `Session '${input.sessionId}' output cleanup failed`);\n}\n//#endregion\nexport { PO_SESSION_FILES_SERVICE, PO_SESSION_TEMP_DIR, prepareSessionEnvironment, readSessionFileDirectories, removeSessionFiles, sessionTempDirectory };\n\n//# sourceMappingURL=index.mjs.map","//#region lib/types/misc.js\n/** No-op callback returning `undefined` at runtime and `any` at type level. */\nfunction noop() {}\n/** Return true when a value is `null` or `undefined`. */\nfunction isNullable(value) {\n\treturn value === null || value === void 0;\n}\n/** Return true when a value is neither `null` nor `undefined`. */\nfunction isNonNullable(value) {\n\treturn !isNullable(value);\n}\n/** Return true for non-array object values. */\nfunction isPlainObject(data) {\n\treturn data && typeof data === \"object\" && !Array.isArray(data);\n}\n/** Filter object entries and return a new object. */\nfunction filterKeys(object, filter) {\n\treturn Object.fromEntries(Object.entries(object).filter(([key, value]) => filter(key, value)));\n}\n/** Map object values while preserving the original key set. */\nfunction mapValues(object, transform) {\n\treturn Object.fromEntries(Object.entries(object).map(([key, value]) => [key, transform(value, key)]));\n}\n/** Pick selected keys from an object, optionally including `undefined` values. */\nfunction pick(source, keys, forced) {\n\tif (!keys) return { ...source };\n\tconst result = {};\n\tfor (const key of keys) if (forced || source[key] !== void 0) result[key] = source[key];\n\treturn result;\n}\n/** Omit selected keys from a shallow object copy. */\nfunction omit(source, keys) {\n\tif (!keys) return { ...source };\n\tconst result = { ...source };\n\tfor (const key of keys) Reflect.deleteProperty(result, key);\n\treturn result;\n}\n/** Define a non-enumerable writable property and return the object. */\nfunction defineProperty(object, key, value) {\n\treturn Object.defineProperty(object, key, {\n\t\twritable: true,\n\t\tvalue,\n\t\tenumerable: false\n\t});\n}\n//#endregion\n//#region lib/types/array.js\n/** Return true when every item in `array2` is present in `array1`. */\nfunction contain(array1, array2) {\n\treturn array2.every((item) => array1.includes(item));\n}\n/** Return items that appear in both arrays. */\nfunction intersection(array1, array2) {\n\treturn array1.filter((item) => array2.includes(item));\n}\n/** Return items from `array1` that do not appear in `array2`. */\nfunction difference(array1, array2) {\n\treturn array1.filter((item) => !array2.includes(item));\n}\n/** Return the set-union of two arrays while preserving first occurrence order. */\nfunction union(array1, array2) {\n\treturn Array.from(new Set([...array1, ...array2]));\n}\n/** Remove duplicate values while preserving first occurrence order. */\nfunction deduplicate(array) {\n\treturn [...new Set(array)];\n}\n/** Remove one item from an array and report whether it was found. */\nfunction remove(list, item) {\n\tconst index = list?.indexOf(item);\n\tif (index >= 0) {\n\t\tlist.splice(index, 1);\n\t\treturn true;\n\t} else return false;\n}\n/** Normalize nullish, scalar, or array input to an array. */\nfunction makeArray(source) {\n\treturn Array.isArray(source) ? source : isNullable(source) ? [] : [source];\n}\n//#endregion\n//#region lib/types/volatile.js\n/** Shared config references used by schema validators and plugin runtimes. */\nconst write = Symbol.for(\"cosmokit.volatile.write\");\nfunction snapshot(value, ancestors = /* @__PURE__ */ new Set()) {\n\tif (typeof value === \"function\") throw new TypeError(\"volatile config cannot contain functions\");\n\tif (value === null || typeof value !== \"object\") return value;\n\tif (ancestors.has(value)) throw new TypeError(\"volatile config cannot contain cycles\");\n\tancestors.add(value);\n\ttry {\n\t\tif (Array.isArray(value)) return Object.freeze(value.map((item) => snapshot(item, ancestors)));\n\t\tif (Object.getPrototypeOf(value) !== Object.prototype && Object.getPrototypeOf(value) !== null) throw new TypeError(\"volatile config objects must be plain objects or arrays\");\n\t\treturn Object.freeze(Object.fromEntries(Object.entries(value).map(([key, item]) => [key, snapshot(item, ancestors)])));\n\t} finally {\n\t\tancestors.delete(value);\n\t}\n}\n/**\n* Create a detached reference containing an immutable copy of the supplied data.\n* @param value - validated config data; class instances and functions are unsupported.\n* @returns a reference whose value is updated only by its owning runtime.\n*/\nfunction createVolatile(value) {\n\tlet current = snapshot(value);\n\treturn Object.freeze({\n\t\tget: () => current,\n\t\t[write]: (value) => {\n\t\t\tcurrent = value;\n\t\t}\n\t});\n}\n/**\n* Identify references across ESM/CJS copies of the shared library.\n* @param value - a parsed config value.\n* @returns whether the value implements the shared reference protocol.\n*/\nfunction isVolatile(value) {\n\treturn typeof value === \"object\" && value !== null && write in value;\n}\n/**\n* Collect config references without descending into their snapshots or opaque objects.\n* @internal\n* @param value - parsed config; cyclic ordinary fields are visited once per path.\n* @returns references and their object-key paths, including an empty path for a root reference.\n*/\nfunction volatileEntries(value) {\n\tconst ancestors = /* @__PURE__ */ new Set();\n\tfunction visit(value, path) {\n\t\tif (isVolatile(value)) return [{\n\t\t\tpath,\n\t\t\tref: value\n\t\t}];\n\t\tif (!value || typeof value !== \"object\" || ancestors.has(value)) return [];\n\t\tif (!Array.isArray(value) && Object.getPrototypeOf(value) !== Object.prototype && Object.getPrototypeOf(value) !== null) return [];\n\t\tancestors.add(value);\n\t\ttry {\n\t\t\treturn Object.entries(value).flatMap(([key, child]) => visit(child, [...path, key]));\n\t\t} finally {\n\t\t\tancestors.delete(value);\n\t\t}\n\t}\n\treturn visit(value, []);\n}\n/**\n* Commit an already validated immutable snapshot from another reference.\n* @internal\n* @param target - the owning plugin's stable reference.\n* @param source - a newly parsed candidate reference.\n*/\nfunction updateVolatile(target, source) {\n\ttarget[write](source.get());\n}\n//#endregion\n//#region lib/types/types.js\n/** Test values using `instanceof` with a `toStringTag` fallback. */\nfunction is(type, value) {\n\tif (arguments.length === 1) return (value) => is(type, value);\n\treturn type in globalThis && value instanceof globalThis[type] || Object.prototype.toString.call(value).slice(8, -1) === type;\n}\nfunction isArrayBufferLike(value) {\n\treturn is(\"ArrayBuffer\", value) || is(\"SharedArrayBuffer\", value);\n}\nfunction isArrayBufferSource(value) {\n\treturn isArrayBufferLike(value) || ArrayBuffer.isView(value);\n}\n/** Binary source detection and base64/hex conversion helpers. */\nvar Binary;\n(function(Binary) {\n\tBinary.is = isArrayBufferLike;\n\tBinary.isSource = isArrayBufferSource;\n\tfunction fromSource(source) {\n\t\tif (ArrayBuffer.isView(source)) return source.buffer.slice(source.byteOffset, source.byteOffset + source.byteLength);\n\t\telse return source;\n\t}\n\tBinary.fromSource = fromSource;\n\tfunction toBase64(source) {\n\t\tsource = fromSource(source);\n\t\tif (typeof Buffer !== \"undefined\") return Buffer.from(source).toString(\"base64\");\n\t\tlet binary = \"\";\n\t\tconst bytes = new Uint8Array(source);\n\t\tfor (let i = 0; i < bytes.byteLength; i++) binary += String.fromCharCode(bytes[i]);\n\t\treturn btoa(binary);\n\t}\n\tBinary.toBase64 = toBase64;\n\tfunction fromBase64(source) {\n\t\tif (typeof Buffer !== \"undefined\") return fromSource(Buffer.from(source, \"base64\"));\n\t\treturn Uint8Array.from(atob(source), (c) => c.charCodeAt(0));\n\t}\n\tBinary.fromBase64 = fromBase64;\n\tfunction toHex(source) {\n\t\tsource = fromSource(source);\n\t\tif (typeof Buffer !== \"undefined\") return Buffer.from(source).toString(\"hex\");\n\t\treturn Array.from(new Uint8Array(source), (byte) => byte.toString(16).padStart(2, \"0\")).join(\"\");\n\t}\n\tBinary.toHex = toHex;\n\tfunction fromHex(source) {\n\t\tif (typeof Buffer !== \"undefined\") return fromSource(Buffer.from(source, \"hex\"));\n\t\tconst hex = source.length % 2 === 0 ? source : source.slice(0, source.length - 1);\n\t\tconst buffer = [];\n\t\tfor (let i = 0; i < hex.length; i += 2) buffer.push(parseInt(`${hex[i]}${hex[i + 1]}`, 16));\n\t\treturn Uint8Array.from(buffer).buffer;\n\t}\n\tBinary.fromHex = fromHex;\n})(Binary || (Binary = {}));\n/** Decode a base64 string into binary data. */\nconst base64ToArrayBuffer = Binary.fromBase64;\n/** Encode binary data as base64. */\nconst arrayBufferToBase64 = Binary.toBase64;\n/** Decode a hex string into binary data. */\nconst hexToArrayBuffer = Binary.fromHex;\n/** Encode binary data as hex. */\nconst arrayBufferToHex = Binary.toHex;\n/** Deep-clone common JavaScript values while preserving prototypes and cycles. */\nfunction clone(source, refs = /* @__PURE__ */ new Map()) {\n\tif (!source || typeof source !== \"object\") return source;\n\tif (is(\"Date\", source)) return new Date(source.valueOf());\n\tif (is(\"RegExp\", source)) return new RegExp(source.source, source.flags);\n\tif (isArrayBufferLike(source)) return source.slice(0);\n\tif (ArrayBuffer.isView(source)) return source.buffer.slice(source.byteOffset, source.byteOffset + source.byteLength);\n\tconst cached = refs.get(source);\n\tif (cached) return cached;\n\tif (Array.isArray(source)) {\n\t\tconst result = [];\n\t\trefs.set(source, result);\n\t\tsource.forEach((value, index) => {\n\t\t\tresult[index] = Reflect.apply(clone, null, [value, refs]);\n\t\t});\n\t\treturn result;\n\t}\n\tconst result = Object.create(Object.getPrototypeOf(source));\n\trefs.set(source, result);\n\tfor (const key of Reflect.ownKeys(source)) {\n\t\tconst descriptor = { ...Reflect.getOwnPropertyDescriptor(source, key) };\n\t\tif (\"value\" in descriptor) descriptor.value = Reflect.apply(clone, null, [descriptor.value, refs]);\n\t\tReflect.defineProperty(result, key, descriptor);\n\t}\n\treturn result;\n}\n/**\n* Compare values recursively, treating two volatile references as equal regardless of value.\n* Strict comparison distinguishes null/undefined, treats opaque objects by identity,\n* compares URLs by normalized href, treats array holes as undefined, and considers distinct cyclic structures unequal.\n* @param a - first value.\n* @param b - second value.\n* @param strict - whether to require strict data equality outside volatile references.\n* @returns whether the values compare equal.\n*/\nfunction deepEqual(a, b, strict) {\n\tconst ancestors = /* @__PURE__ */ new Set();\n\tfunction compare(a, b) {\n\t\tif (a === b) return true;\n\t\tif (isVolatile(a) || isVolatile(b)) return isVolatile(a) && isVolatile(b);\n\t\tif (!strict && isNullable(a) && isNullable(b)) return true;\n\t\tif (typeof a !== typeof b || typeof a !== \"object\" || !a || !b) return false;\n\t\tif (ancestors.has(a)) return false;\n\t\tfunction check(test, then) {\n\t\t\treturn test(a) ? test(b) ? then(a, b) : false : test(b) ? false : void 0;\n\t\t}\n\t\tancestors.add(a);\n\t\ttry {\n\t\t\treturn check(Array.isArray, (a, b) => {\n\t\t\t\tif (a.length !== b.length) return false;\n\t\t\t\tfor (let index = 0; index < a.length; index++) if (!compare(a[index], b[index])) return false;\n\t\t\t\treturn true;\n\t\t\t}) ?? check(is(\"Date\"), (a, b) => a.valueOf() === b.valueOf()) ?? check(is(\"URL\"), (a, b) => a.href === b.href) ?? check(is(\"RegExp\"), (a, b) => a.source === b.source && a.flags === b.flags) ?? check(isArrayBufferLike, (a, b) => {\n\t\t\t\tif (a.byteLength !== b.byteLength) return false;\n\t\t\t\tconst viewA = new Uint8Array(a);\n\t\t\t\tconst viewB = new Uint8Array(b);\n\t\t\t\tfor (let i = 0; i < viewA.length; i++) if (viewA[i] !== viewB[i]) return false;\n\t\t\t\treturn true;\n\t\t\t}) ?? ((!strict || [a, b].every((value) => Object.getPrototypeOf(value) === Object.prototype || Object.getPrototypeOf(value) === null)) && Object.keys({\n\t\t\t\t...a,\n\t\t\t\t...b\n\t\t\t}).every((key) => compare(a[key], b[key])));\n\t\t} finally {\n\t\t\tancestors.delete(a);\n\t\t}\n\t}\n\treturn compare(a, b);\n}\n//#endregion\n//#region lib/types/string.js\n/** Uppercase the first character of a string. */\nfunction capitalize(source) {\n\treturn source.charAt(0).toUpperCase() + source.slice(1);\n}\n/** Lowercase the first character of a string. */\nfunction uncapitalize(source) {\n\treturn source.charAt(0).toLowerCase() + source.slice(1);\n}\n/** Convert dash or underscore delimited text to camelCase. */\nfunction camelCase(source) {\n\treturn source.replace(/[_-][a-z]/g, (str) => str.slice(1).toUpperCase());\n}\nfunction tokenize(source, delimiters, delimiter) {\n\tconst output = [];\n\tlet state = 0;\n\tfor (let i = 0; i < source.length; i++) {\n\t\tconst code = source.charCodeAt(i);\n\t\tif (code >= 65 && code <= 90) {\n\t\t\tif (state === 1) {\n\t\t\t\tconst next = source.charCodeAt(i + 1);\n\t\t\t\tif (next >= 97 && next <= 122) output.push(delimiter);\n\t\t\t\toutput.push(code + 32);\n\t\t\t} else {\n\t\t\t\tif (state !== 0) output.push(delimiter);\n\t\t\t\toutput.push(code + 32);\n\t\t\t}\n\t\t\tstate = 1;\n\t\t} else if (code >= 97 && code <= 122) {\n\t\t\toutput.push(code);\n\t\t\tstate = 2;\n\t\t} else if (delimiters.includes(code)) {\n\t\t\tif (state !== 0) output.push(delimiter);\n\t\t\tstate = 0;\n\t\t} else output.push(code);\n\t}\n\treturn String.fromCharCode(...output);\n}\n/** Convert text to dash-delimited parameter case. */\nfunction paramCase(source) {\n\treturn tokenize(source, [45, 95], 45);\n}\n/** Convert text to underscore-delimited snake case. */\nfunction snakeCase(source) {\n\treturn tokenize(source, [45, 95], 95);\n}\n/** Runtime alias for `camelCase`. */\nconst camelize = camelCase;\n/** Runtime alias for `paramCase`. */\nconst hyphenate = paramCase;\n/** Format a property key as a JavaScript member access suffix. */\nfunction formatProperty(key) {\n\tif (typeof key !== \"string\") return `[${key.toString()}]`;\n\treturn /^[a-z_$][\\w$]*$/i.test(key) ? `.${key}` : `[${JSON.stringify(key)}]`;\n}\n/** Remove one trailing slash from a path string. */\nfunction trimSlash(source) {\n\treturn source.replace(/\\/$/, \"\");\n}\n/** Ensure a path starts with `/` and has no trailing slash. */\nfunction sanitize(source) {\n\tif (!source.startsWith(\"/\")) source = \"/\" + source;\n\treturn trimSlash(source);\n}\n//#endregion\n//#region lib/types/time.js\n/** Time constants plus parsing and formatting helpers. */\nvar Time;\n(function(Time) {\n\tTime.millisecond = 1;\n\tTime.second = 1e3;\n\tTime.minute = Time.second * 60;\n\tTime.hour = Time.minute * 60;\n\tTime.day = Time.hour * 24;\n\tTime.week = Time.day * 7;\n\tlet timezoneOffset = (/* @__PURE__ */ new Date()).getTimezoneOffset();\n\tfunction setTimezoneOffset(offset) {\n\t\ttimezoneOffset = offset;\n\t}\n\tTime.setTimezoneOffset = setTimezoneOffset;\n\tfunction getTimezoneOffset() {\n\t\treturn timezoneOffset;\n\t}\n\tTime.getTimezoneOffset = getTimezoneOffset;\n\tfunction getDateNumber(date = /* @__PURE__ */ new Date(), offset) {\n\t\tif (typeof date === \"number\") date = new Date(date);\n\t\tif (offset === void 0) offset = timezoneOffset;\n\t\treturn Math.floor((date.valueOf() / Time.minute - offset) / 1440);\n\t}\n\tTime.getDateNumber = getDateNumber;\n\tfunction fromDateNumber(value, offset) {\n\t\tconst date = new Date(value * Time.day);\n\t\tif (offset === void 0) offset = timezoneOffset;\n\t\treturn new Date(+date + offset * Time.minute);\n\t}\n\tTime.fromDateNumber = fromDateNumber;\n\tconst numeric = /\\d+(?:\\.\\d+)?/.source;\n\tconst timeRegExp = new RegExp(`^${[\n\t\t\"w(?:eek(?:s)?)?\",\n\t\t\"d(?:ay(?:s)?)?\",\n\t\t\"h(?:our(?:s)?)?\",\n\t\t\"m(?:in(?:ute)?(?:s)?)?\",\n\t\t\"s(?:ec(?:ond)?(?:s)?)?\"\n\t].map((unit) => `(${numeric}${unit})?`).join(\"\")}$`);\n\tfunction parseTime(source) {\n\t\tconst capture = timeRegExp.exec(source);\n\t\tif (!capture) return 0;\n\t\treturn (parseFloat(capture[1]) * Time.week || 0) + (parseFloat(capture[2]) * Time.day || 0) + (parseFloat(capture[3]) * Time.hour || 0) + (parseFloat(capture[4]) * Time.minute || 0) + (parseFloat(capture[5]) * Time.second || 0);\n\t}\n\tTime.parseTime = parseTime;\n\tfunction parseDate(date) {\n\t\tconst parsed = parseTime(date);\n\t\tif (parsed) date = Date.now() + parsed;\n\t\telse if (/^\\d{1,2}(:\\d{1,2}){1,2}$/.test(date)) date = `${(/* @__PURE__ */ new Date()).toLocaleDateString()}-${date}`;\n\t\telse if (/^\\d{1,2}-\\d{1,2}-\\d{1,2}(:\\d{1,2}){1,2}$/.test(date)) date = `${(/* @__PURE__ */ new Date()).getFullYear()}-${date}`;\n\t\treturn date ? new Date(date) : /* @__PURE__ */ new Date();\n\t}\n\tTime.parseDate = parseDate;\n\tfunction format(ms) {\n\t\tconst abs = Math.abs(ms);\n\t\tif (abs >= Time.day - Time.hour / 2) return Math.round(ms / Time.day) + \"d\";\n\t\telse if (abs >= Time.hour - Time.minute / 2) return Math.round(ms / Time.hour) + \"h\";\n\t\telse if (abs >= Time.minute - Time.second / 2) return Math.round(ms / Time.minute) + \"m\";\n\t\telse if (abs >= Time.second) return Math.round(ms / Time.second) + \"s\";\n\t\treturn ms + \"ms\";\n\t}\n\tTime.format = format;\n\tfunction toDigits(source, length = 2) {\n\t\treturn source.toString().padStart(length, \"0\");\n\t}\n\tTime.toDigits = toDigits;\n\tfunction template(template, time = /* @__PURE__ */ new Date()) {\n\t\treturn template.replace(\"yyyy\", time.getFullYear().toString()).replace(\"yy\", time.getFullYear().toString().slice(2)).replace(\"MM\", toDigits(time.getMonth() + 1)).replace(\"dd\", toDigits(time.getDate())).replace(\"hh\", toDigits(time.getHours())).replace(\"mm\", toDigits(time.getMinutes())).replace(\"ss\", toDigits(time.getSeconds())).replace(\"SSS\", toDigits(time.getMilliseconds(), 3));\n\t}\n\tTime.template = template;\n})(Time || (Time = {}));\n//#endregion\nexport { Binary, Time, arrayBufferToBase64, arrayBufferToHex, base64ToArrayBuffer, camelCase, camelize, capitalize, clone, contain, createVolatile, deduplicate, deepEqual, defineProperty, difference, filterKeys, formatProperty, hexToArrayBuffer, hyphenate, intersection, is, isNonNullable, isNullable, isPlainObject, isVolatile, makeArray, mapValues, mapValues as valueMap, noop, omit, paramCase, pick, remove, sanitize, snakeCase, trimSlash, uncapitalize, union, updateVolatile, volatileEntries };\n","import { defineProperty, hyphenate, isNullable } from \"@deepseek-ai/cosmokit\";\n//#region lib/types/utils.js\n/** Ordered collection of disposable values with O(1) deletion by value. */\nvar DisposableList = class {\n\tsn = 0;\n\tmap = /* @__PURE__ */ new Map();\n\tweak = /* @__PURE__ */ new WeakMap();\n\tget length() {\n\t\treturn this.map.size;\n\t}\n\tpush(value) {\n\t\tconst sn = ++this.sn;\n\t\tthis.map.set(sn, value);\n\t\tthis.weak.set(value, sn);\n\t\treturn () => this.map.delete(sn);\n\t}\n\tdelete(value) {\n\t\tconst sn = this.weak.get(value);\n\t\tif (!sn) return false;\n\t\treturn this.map.delete(sn);\n\t}\n\tclear() {\n\t\tconst values = [...this.map.values()];\n\t\tthis.map.clear();\n\t\treturn values.reverse();\n\t}\n\t[Symbol.iterator]() {\n\t\treturn this.map.values();\n\t}\n\t[Symbol.for(\"nodejs.util.inspect.custom\")]() {\n\t\treturn [...this];\n\t}\n};\n/** Shared symbols used to avoid public property-name collisions. */\nconst symbols = {\n\tshadow: Symbol.for(\"cordis.shadow\"),\n\treceiver: Symbol.for(\"cordis.receiver\"),\n\toriginal: Symbol.for(\"cordis.original\"),\n\tmetadata: Symbol.for(\"cordis.metadata\"),\n\tinitHooks: Symbol.for(\"cordis.initHooks\"),\n\tcheckProto: Symbol.for(\"cordis.checkProto\"),\n\teffect: Symbol.for(\"cordis.effect\"),\n\tfilter: Symbol.for(\"cordis.filter\"),\n\tisolate: Symbol.for(\"cordis.isolate\"),\n\tintercept: Symbol.for(\"cordis.intercept\"),\n\tinit: Symbol.for(\"cordis.init\"),\n\tcheck: Symbol.for(\"cordis.check\"),\n\tconfig: Symbol.for(\"cordis.config\"),\n\tinvoke: Symbol.for(\"cordis.invoke\"),\n\textend: Symbol.for(\"cordis.extend\"),\n\ttracker: Symbol.for(\"cordis.tracker\"),\n\tresolveConfig: Symbol.for(\"cordis.resolveConfig\")\n};\nconst GeneratorFunction = function* () {}.constructor;\nconst AsyncGeneratorFunction = async function* () {}.constructor;\n/** Return true when a plugin callback should be constructed with `new`. */\nfunction isConstructor(func) {\n\tif (!func.prototype) return false;\n\tif (func instanceof GeneratorFunction) return false;\n\tif (AsyncGeneratorFunction !== Function && func instanceof AsyncGeneratorFunction) return false;\n\treturn true;\n}\n/** Merge two prototype chains while preserving descriptors from `proto1`. */\nfunction joinPrototype(proto1, proto2) {\n\tif (proto1 === Object.prototype) return proto2;\n\tconst result = Object.create(joinPrototype(Object.getPrototypeOf(proto1), proto2));\n\tfor (const key of Reflect.ownKeys(proto1)) Object.defineProperty(result, key, Object.getOwnPropertyDescriptor(proto1, key));\n\treturn result;\n}\n/** Return true for non-null objects and functions. */\nfunction isObject(value) {\n\treturn value && (typeof value === \"object\" || typeof value === \"function\");\n}\n/** Find a property descriptor by walking an object's prototype chain. */\nfunction getPropertyDescriptor(target, prop) {\n\tlet proto = target;\n\twhile (proto) {\n\t\tconst desc = Reflect.getOwnPropertyDescriptor(proto, prop);\n\t\tif (desc) return desc;\n\t\tproto = Object.getPrototypeOf(proto);\n\t}\n}\n/** Wrap services/functions so method calls see the caller's active context. */\nfunction getTraceable(ctx, value) {\n\tif (!isObject(value)) return value;\n\tif (Object.hasOwn(value, symbols.shadow)) return Object.getPrototypeOf(value);\n\tconst tracker = value[symbols.tracker];\n\tif (!tracker) return value;\n\treturn createTraceable(ctx, value, tracker);\n}\n/** Return a proxy that overlays readonly or writable properties onto a target. */\nfunction withProps(target, props) {\n\tif (!props) return target;\n\treturn new Proxy(target, {\n\t\tget: (target, prop, receiver) => {\n\t\t\tif (prop in props && prop !== \"constructor\") return Reflect.get(props, prop, receiver);\n\t\t\treturn Reflect.get(target, prop, receiver);\n\t\t},\n\t\tset: (target, prop, value, receiver) => {\n\t\t\tif (prop in props && prop !== \"constructor\") return Reflect.set(props, prop, value, receiver);\n\t\t\treturn Reflect.set(target, prop, value, receiver);\n\t\t}\n\t});\n}\nfunction withProp(target, prop, value) {\n\treturn withProps(target, Object.defineProperty(Object.create(null), prop, {\n\t\tvalue,\n\t\twritable: false\n\t}));\n}\nfunction createShadow(ctx, target, property, receiver) {\n\tif (!property) return receiver;\n\tconst origin = Reflect.getOwnPropertyDescriptor(target, property)?.value;\n\tif (!origin) return receiver;\n\treturn withProp(receiver, property, ctx.extend({ [symbols.shadow]: origin }));\n}\nfunction createShadowMethod(ctx, value, outer, shadow) {\n\treturn new Proxy(value, { apply: (target, thisArg, args) => {\n\t\tif (thisArg === outer) thisArg = shadow;\n\t\treturn getTraceable(ctx, Reflect.apply(target, thisArg, args));\n\t} });\n}\nfunction createTraceable(ctx, value, tracker) {\n\tif (ctx[symbols.shadow] && !tracker.noShadow) ctx = Object.getPrototypeOf(ctx);\n\tconst proxy = new Proxy(value, {\n\t\tget: (target, prop, receiver) => {\n\t\t\tif (prop === symbols.original) return target;\n\t\t\tif (prop === tracker.property) return ctx;\n\t\t\tif (typeof prop === \"symbol\") return Reflect.get(target, prop, receiver);\n\t\t\tif (tracker.associate && ctx.reflect.props[`${tracker.associate}.${prop}`]) return Reflect.get(ctx, `${tracker.associate}.${prop}`, withProp(ctx, symbols.receiver, receiver));\n\t\t\tlet shadow, innerValue;\n\t\t\tconst desc = getPropertyDescriptor(target, prop);\n\t\t\tif (desc && \"value\" in desc) innerValue = desc.value;\n\t\t\telse {\n\t\t\t\tshadow = createShadow(ctx, target, tracker.property, receiver);\n\t\t\t\tinnerValue = Reflect.get(target, prop, shadow);\n\t\t\t}\n\t\t\tconst innerTracker = innerValue?.[symbols.tracker];\n\t\t\tif (innerTracker) return createTraceable(ctx, innerValue, innerTracker);\n\t\t\telse if (!tracker.noShadow && typeof innerValue === \"function\") {\n\t\t\t\tshadow ??= createShadow(ctx, target, tracker.property, receiver);\n\t\t\t\treturn createShadowMethod(ctx, innerValue, receiver, shadow);\n\t\t\t} else return innerValue;\n\t\t},\n\t\tset: (target, prop, value, receiver) => {\n\t\t\tif (prop === symbols.original) return false;\n\t\t\tif (prop === tracker.property) return false;\n\t\t\tif (typeof prop === \"symbol\") return Reflect.set(target, prop, value, receiver);\n\t\t\tif (tracker.associate && ctx.reflect.props[`${tracker.associate}.${prop}`]) return Reflect.set(ctx, `${tracker.associate}.${prop}`, value, withProp(ctx, symbols.receiver, receiver));\n\t\t\tconst shadow = createShadow(ctx, target, tracker.property, receiver);\n\t\t\treturn Reflect.set(target, prop, value, shadow);\n\t\t},\n\t\tapply: (target, thisArg, args) => {\n\t\t\treturn applyTraceable(proxy, target, thisArg, args);\n\t\t}\n\t});\n\treturn proxy;\n}\nfunction applyTraceable(proxy, value, thisArg, args) {\n\tif (!value[symbols.invoke]) return Reflect.apply(value, thisArg, args);\n\treturn value[symbols.invoke].apply(proxy, args);\n}\n/** Create a callable service object that dispatches through `symbols.invoke`. */\nfunction createCallable(name, proto, tracker) {\n\tconst self = function(...args) {\n\t\treturn applyTraceable(createTraceable(self[\"ctx\"], self, tracker), self, this, args);\n\t};\n\tdefineProperty(self, \"name\", name);\n\treturn Object.setPrototypeOf(self, proto);\n}\nfunction handleError(info, reason, getOuterStack) {\n\tconst innerLines = info.error.stack.split(\"\\n\");\n\tif (typeof reason?.stack !== \"string\") {\n\t\tconst outerError = new Error(reason);\n\t\tconst lines = outerError.stack.split(\"\\n\");\n\t\tlines.splice(1, Infinity, ...getOuterStack());\n\t\touterError.stack = lines.join(\"\\n\");\n\t\tthrow outerError;\n\t}\n\tconst lines = reason.stack.split(\"\\n\");\n\tlet index = lines.indexOf(innerLines[2]);\n\tif (index === -1) throw reason;\n\tindex -= info.offset;\n\twhile (index > 0) {\n\t\tif (!lines[index - 1].endsWith(\" (<anonymous>)\")) break;\n\t\tindex -= 1;\n\t}\n\tlines.splice(index, Infinity, ...getOuterStack());\n\treason.stack = lines.join(\"\\n\");\n\tthrow reason;\n}\n/** Run a callback and splice outer call-site frames into thrown async errors. */\nfunction composeError(callback, getOuterStack = buildOuterStack()) {\n\tconst info = {\n\t\toffset: 1,\n\t\terror: /* @__PURE__ */ new Error()\n\t};\n\ttry {\n\t\tconst result = callback(info);\n\t\tif (isObject(result) && \"then\" in result) return result.then(void 0, (reason) => handleError(info, reason, getOuterStack));\n\t\telse return result;\n\t} catch (reason) {\n\t\thandleError(info, reason, getOuterStack);\n\t}\n}\n/** Capture a lazy stack-frame supplier for later error composition. */\nfunction buildOuterStack(offset = 0) {\n\tconst outerError = /* @__PURE__ */ new Error();\n\treturn () => outerError.stack.split(\"\\n\").slice(3 + offset);\n}\n//#endregion\n//#region lib/types/events.js\n/**\n* Return whether an event result should stop a bail-style dispatch.\n*\n* @param value — a listener's return value.\n* @returns `true` unless `value` is `null`, `false`, or `undefined`.\n*/\nfunction isBailed(value) {\n\treturn value !== null && value !== false && value !== void 0;\n}\n/**\n* Event bus installed as `ctx.events` and mixed into every context.\n*\n* The service supports concurrent, synchronous, serial, bail, and waterfall\n* dispatch and automatically disposes listeners with their owning fiber.\n*/\nvar EventsService = class {\n\tctx;\n\t_hooks = {};\n\tconstructor(ctx) {\n\t\tthis.ctx = ctx;\n\t\tdefineProperty(this, symbols.tracker, {\n\t\t\tproperty: \"ctx\",\n\t\t\tnoShadow: true\n\t\t});\n\t\tthis.on(\"internal/listener\", function(name, listener, options) {\n\t\t\tif (name === \"internal/update\" && !options.global) return (this.fiber._hooks[\"internal/update\"] ??= new DisposableList())[options.prepend ? \"unshift\" : \"push\"](listener);\n\t\t});\n\t\tthis.on(\"internal/update\", function(config, noSave, next) {\n\t\t\tconst cbs = [...this._hooks[\"internal/update\"] || []];\n\t\t\tconst _next = () => {\n\t\t\t\treturn (cbs.shift() ?? next).call(this, config, noSave, _next);\n\t\t\t};\n\t\t\treturn _next();\n\t\t}, {\n\t\t\tglobal: true,\n\t\t\tprepend: true\n\t\t});\n\t}\n\t/**\n\t* Resolve listeners for one dispatch and apply context filtering.\n\t*\n\t* @param type — the dispatch mode, reported on `internal/dispatch`.\n\t* @param args — the raw dispatch arguments; consumed up to the event name.\n\t* @returns the matching listener callbacks, bound to the dispatch `this`.\n\t*/\n\tdispatch(type, args) {\n\t\tconst thisArg = typeof args[0] === \"object\" || typeof args[0] === \"function\" ? args.shift() : null;\n\t\tconst name = args.shift();\n\t\tif (!name.startsWith(\"internal/\")) this.emit(\"internal/dispatch\", type, name, args, thisArg);\n\t\tconst filter = thisArg?.[Context.filter];\n\t\treturn (this._hooks[name] || []).filter((hook) => hook.global || !filter || filter.call(thisArg, hook.ctx)).map((hook) => hook.callback.bind(thisArg));\n\t}\n\t/**\n\t* Run listeners concurrently and wait for all of them.\n\t*\n\t* @param args — optional `this`, the event name, then listener arguments.\n\t* @returns a promise resolving once every listener has settled.\n\t*/\n\tasync parallel(...args) {\n\t\tconst errors = (await Promise.allSettled(this.dispatch(\"emit\", args).map(async (cb) => cb(...args)))).filter((result) => result.status === \"rejected\");\n\t\tif (errors.length) throw new AggregateError(errors.map((error) => error.reason));\n\t}\n\t/**\n\t* Run listeners synchronously without waiting for returned promises.\n\t*\n\t* @param args — optional `this`, the event name, then listener arguments.\n\t*/\n\temit(...args) {\n\t\tthis.dispatch(\"emit\", args).map((cb) => cb(...args));\n\t}\n\t/**\n\t* Run listeners in order, awaiting each, until one returns a bail value.\n\t*\n\t* @param args — optional `this`, the event name, then listener arguments.\n\t* @returns the first bail value (see {@link isBailed}), if any.\n\t*/\n\tasync serial(...args) {\n\t\tfor (const cb of this.dispatch(\"serial\", args)) {\n\t\t\tconst result = await cb(...args);\n\t\t\tif (isBailed(result)) return result;\n\t\t}\n\t}\n\t/**\n\t* Run listeners synchronously until one returns a bail value.\n\t*\n\t* @param args — optional `this`, the event name, then listener arguments.\n\t* @returns the first bail value (see {@link isBailed}), if any.\n\t*/\n\tbail(...args) {\n\t\tfor (const cb of this.dispatch(\"bail\", args)) {\n\t\t\tconst result = cb(...args);\n\t\t\tif (isBailed(result)) return result;\n\t\t}\n\t}\n\t/**\n\t* Compose listeners around the final `next` callback.\n\t*\n\t* The last dispatch argument is treated as the innermost `next`. Listeners\n\t* run outermost-first; a listener that does not call `next()` vetoes the\n\t* rest of the chain, including the built-in behavior.\n\t*\n\t* @param args — optional `this`, the event name, listener arguments, then `next`.\n\t* @returns the outermost listener's return value.\n\t*/\n\twaterfall(...args) {\n\t\tconst cbs = this.dispatch(\"waterfall\", args);\n\t\tconst inner = args.pop();\n\t\tconst next = () => {\n\t\t\treturn (cbs.shift() ?? inner)(...args);\n\t\t};\n\t\targs.push(next);\n\t\treturn next();\n\t}\n\t/**\n\t* Store a listener record as an effect on the current fiber.\n\t*\n\t* @param label — effect label shown in fiber diagnostics.\n\t* @param hooks — the listener list for one event.\n\t* @param callback — the listener to store.\n\t* @param options — placement and filtering options.\n\t* @returns a disposer that unregisters the listener.\n\t*/\n\tregister(label, hooks, callback, options) {\n\t\tconst method = options.prepend ? \"unshift\" : \"push\";\n\t\treturn this.ctx.fiber.effect(() => {\n\t\t\thooks[method]({\n\t\t\t\tctx: this.ctx,\n\t\t\t\tcallback,\n\t\t\t\t...options\n\t\t\t});\n\t\t\treturn () => this.unregister(hooks, callback);\n\t\t}, label);\n\t}\n\t/**\n\t* Remove a stored listener record.\n\t*\n\t* @param hooks — the listener list for one event.\n\t* @param callback — the listener to remove.\n\t* @returns `true` if the listener was found and removed.\n\t*/\n\tunregister(hooks, callback) {\n\t\tconst index = hooks.findIndex((hook) => hook.callback === callback);\n\t\tif (index >= 0) {\n\t\t\thooks.splice(index, 1);\n\t\t\treturn true;\n\t\t}\n\t}\n\t/**\n\t* Register an event listener owned by the current fiber.\n\t*\n\t* The listener is removed automatically when the fiber unloads. Throws\n\t* `CordisError('INACTIVE_EFFECT')` if the fiber is already disposed.\n\t*\n\t* @param name — the event name to listen for.\n\t* @param listener — called with the dispatch arguments.\n\t* @param options — listener options; a boolean is shorthand for `prepend`.\n\t* @returns a disposer removing the listener; `true` if it was still registered.\n\t*/\n\ton(name, listener, options) {\n\t\tif (typeof options !== \"object\") options = { prepend: options };\n\t\tthis.ctx.fiber.assertActive();\n\t\tlistener = this.ctx.reflect.bind(listener);\n\t\tconst result = this.bail(this.ctx, \"internal/listener\", name, listener, options);\n\t\tif (result) return result;\n\t\tconst hooks = this._hooks[name] ||= [];\n\t\tconst label = `ctx.on(${typeof name === \"string\" ? JSON.stringify(name) : name.toString()})`;\n\t\treturn this.register(label, hooks, listener, options);\n\t}\n\t/**\n\t* Register an event listener that disposes itself after the first call.\n\t*\n\t* @param name — the event name to listen for.\n\t* @param listener — called at most once with the dispatch arguments.\n\t* @param options — listener options; a boolean is shorthand for `prepend`.\n\t* @returns a disposer removing the listener; `true` if it was still registered.\n\t*/\n\tonce(name, listener, options) {\n\t\tconst dispose = this.on(name, function(...args) {\n\t\t\tdispose();\n\t\t\treturn listener.apply(this, args);\n\t\t}, options);\n\t\treturn dispose;\n\t}\n};\n//#endregion\n//#region lib/types/logger.js\n/** Built-in placeholder formatters used by `Logger.format()`. */\nconst defaultFormatters = {\n\ts: (value) => String(value),\n\td: (value) => Math.trunc(Number(value)),\n\ti: (value) => Math.trunc(Number(value)),\n\tf: (value) => Number(value),\n\to: (value) => JSON.stringify(value),\n\tO: (value) => JSON.stringify(value),\n\tc: () => \"\",\n\tC: (value, exporter, message) => {\n\t\treturn Logger.color(exporter, Logger.code(message.name, exporter.colors), value);\n\t}\n};\nfunction isAggregateError(error) {\n\treturn error instanceof Error && Array.isArray(error[\"errors\"]);\n}\n/** Logger facade for one named subsystem. */\nvar Logger = class {\n\tservice;\n\tstatic color(exporter, code, value, decoration = \"\") {\n\t\tif (!exporter.colors) return \"\" + value;\n\t\treturn `\\u001b[3${code < 8 ? code : \"8;5;\" + code}${exporter.colors >= 2 ? decoration : \"\"}m${value}\\u001b[0m`;\n\t}\n\tstatic code(name, level) {\n\t\tlet hash = 0;\n\t\tfor (let i = 0; i < name.length; i++) {\n\t\t\thash = (hash << 3) - hash + name.charCodeAt(i) + 13;\n\t\t\thash |= 0;\n\t\t}\n\t\tconst colors = !level ? [] : level >= 2 ? c256 : c16;\n\t\treturn colors[Math.abs(hash) % colors.length];\n\t}\n\tstatic format(exporter, message) {\n\t\tconst args = message.args.slice();\n\t\tif (args[0] instanceof Error) {\n\t\t\targs[0] = args[0].stack || args[0].message;\n\t\t\targs.unshift(\"%s\");\n\t\t} else if (typeof args[0] !== \"string\") args.unshift(\"%o\");\n\t\tlet format = args.shift();\n\t\tformat = format.replace(/%([a-zA-Z%])/g, (match, char) => {\n\t\t\tif (match === \"%%\") return \"%\";\n\t\t\tconst formatter = exporter.formatters?.[char] ?? defaultFormatters[char];\n\t\t\tif (typeof formatter === \"function\") return formatter(args.shift(), exporter, message);\n\t\t\treturn match;\n\t\t});\n\t\tconst oFormatter = exporter.formatters?.o ?? defaultFormatters.o;\n\t\tfor (let arg of args) {\n\t\t\tif (typeof arg === \"object\" && arg) arg = oFormatter(arg, exporter, message);\n\t\t\tformat += \" \" + arg;\n\t\t}\n\t\tconst { maxLength = 10240 } = exporter;\n\t\treturn format.split(/\\r?\\n/g).map((line) => {\n\t\t\treturn line.slice(0, maxLength) + (line.length > maxLength ? \"...\" : \"\");\n\t\t}).join(\"\\n\");\n\t}\n\tconstructor(options, service) {\n\t\tthis.service = service;\n\t\tObject.assign(this, options);\n\t\tthis.error = this._method(\"error\", 0);\n\t\tthis.info = this._method(\"info\", 1);\n\t\tthis.warn = this._method(\"warn\", 2);\n\t\tthis.debug = this._method(\"debug\", 3);\n\t}\n\t_method(type, level) {\n\t\treturn (...args) => {\n\t\t\tif (args.length === 1 && args[0] instanceof Error) {\n\t\t\t\tif (args[0].cause) this[type](args[0].cause);\n\t\t\t\telse if (isAggregateError(args[0])) {\n\t\t\t\t\targs[0].errors.forEach((error) => this[type](error));\n\t\t\t\t\treturn;\n\t\t\t\t}\n\t\t\t}\n\t\t\tconst sn = ++this.service._snMessage;\n\t\t\tconst ts = Date.now();\n\t\t\tfor (const exporter of this.service.exporters.values()) {\n\t\t\t\tif ((exporter.levels?.[this.name] ?? exporter.levels?.default ?? this.level ?? 1) < level) continue;\n\t\t\t\tconst message = {\n\t\t\t\t\tsn,\n\t\t\t\t\tts,\n\t\t\t\t\ttype,\n\t\t\t\t\tlevel,\n\t\t\t\t\tname: this.name,\n\t\t\t\t\t...this.meta,\n\t\t\t\t\targs\n\t\t\t\t};\n\t\t\t\texporter.export(message);\n\t\t\t}\n\t\t};\n\t}\n};\n/** ANSI 16-color palette indexes used for logger name coloring. */\nconst c16 = [\n\t6,\n\t2,\n\t3,\n\t4,\n\t5,\n\t1\n];\n/** ANSI 256-color palette indexes used for logger name coloring. */\nconst c256 = [\n\t20,\n\t21,\n\t26,\n\t27,\n\t32,\n\t33,\n\t38,\n\t39,\n\t40,\n\t41,\n\t42,\n\t43,\n\t44,\n\t45,\n\t56,\n\t57,\n\t62,\n\t63,\n\t68,\n\t69,\n\t74,\n\t75,\n\t76,\n\t77,\n\t78,\n\t79,\n\t80,\n\t81,\n\t92,\n\t93,\n\t98,\n\t99,\n\t112,\n\t113,\n\t129,\n\t134,\n\t135,\n\t148,\n\t149,\n\t160,\n\t161,\n\t162,\n\t163,\n\t164,\n\t165,\n\t166,\n\t167,\n\t168,\n\t169,\n\t170,\n\t171,\n\t172,\n\t173,\n\t178,\n\t179,\n\t184,\n\t185,\n\t196,\n\t197,\n\t198,\n\t199,\n\t200,\n\t201,\n\t202,\n\t203,\n\t204,\n\t205,\n\t206,\n\t207,\n\t208,\n\t209,\n\t214,\n\t215,\n\t220,\n\t221\n];\n/**\n* Built-in logging service.\n*\n* Call `ctx.logger()` to create a named logger, or call `ctx.logger.info()`\n* directly to log with the current fiber-derived name.\n*/\nvar LoggerService = class LoggerService {\n\tbufferSize = 1e3;\n\tbuffer = [];\n\tctx;\n\t_snMessage = 0;\n\t_snExporter = 0;\n\texporters = /* @__PURE__ */ new Map();\n\tconstructor(ctx) {\n\t\tconst tracker = {\n\t\t\tproperty: \"ctx\",\n\t\t\tnoShadow: true\n\t\t};\n\t\tconst self = createCallable(\"logger\", joinPrototype(Object.getPrototypeOf(this), Function.prototype), tracker);\n\t\tObject.assign(self, this);\n\t\tself.ctx = ctx;\n\t\tdefineProperty(self, symbols.tracker, tracker);\n\t\tself.exporter({\n\t\t\tcolors: 3,\n\t\t\texport: (message) => {\n\t\t\t\tself.buffer.push(message);\n\t\t\t\tif (self.buffer.length > self.bufferSize) self.buffer = self.buffer.slice(-self.bufferSize);\n\t\t\t}\n\t\t});\n\t\treturn self;\n\t}\n\t/**\n\t* Register an exporter and dispose it with the current fiber.\n\t*\n\t* @param exporter — the sink that receives structured log messages.\n\t* @returns a disposer that removes the exporter.\n\t*/\n\texporter(exporter) {\n\t\treturn this.ctx.effect(() => {\n\t\t\tconst id = ++this._snExporter;\n\t\t\tthis.exporters.set(id, exporter);\n\t\t\treturn () => this.exporters.delete(id);\n\t\t}, \"ctx.logger.exporter()\");\n\t}\n\t_resolveConfig() {\n\t\tlet intercept = this.ctx[symbols.intercept];\n\t\tconst configs = [];\n\t\twhile (\"logger\" in intercept) {\n\t\t\tif (Object.hasOwn(intercept, \"logger\")) configs.unshift(intercept[\"logger\"]);\n\t\t\tintercept = Object.getPrototypeOf(intercept);\n\t\t}\n\t\treturn Object.assign({}, ...configs);\n\t}\n\t[symbols.invoke](name) {\n\t\tconst config = this._resolveConfig();\n\t\tconst fiber = (this.ctx[symbols.shadow] ?? this.ctx).fiber;\n\t\tname ??= config.name;\n\t\tname ??= hyphenate(fiber.name);\n\t\treturn new Logger({\n\t\t\tname,\n\t\t\tlevel: config.level,\n\t\t\tmeta: { fiber: new WeakRef(fiber) }\n\t\t}, this);\n\t}\n\tstatic {\n\t\tfor (const type of [\n\t\t\t\"error\",\n\t\t\t\"info\",\n\t\t\t\"warn\",\n\t\t\t\"debug\"\n\t\t]) LoggerService.prototype[type] = function(...args) {\n\t\t\treturn this()[type](...args);\n\t\t};\n\t}\n};\n//#endregion\n//#region lib/types/reflect.js\nfunction enhanceError(error) {\n\tconst lines = error.stack.split(\"\\n\");\n\tlines.splice(0, 2, `Error: ${error.message}`);\n\terror.stack = lines.join(\"\\n\");\n\treturn error;\n}\nconst RESERVED_WORDS = [\"prototype\", \"then\"];\nfunction isSpecialProperty(prop) {\n\treturn typeof prop === \"symbol\" || RESERVED_WORDS.includes(prop) || parseInt(prop).toString() === prop || prop.startsWith(\"_\");\n}\n/**\n* Reflection and service-resolution layer installed as `ctx.reflect`.\n*\n* This service powers the context proxy, service registration, accessors, and\n* the mixins that expose core service methods directly on `ctx`.\n*/\nvar ReflectService = class {\n\tctx;\n\t/** Proxy traps implementing service resolution for every context object. */\n\tstatic handler = {\n\t\tget: (target, prop, ctx) => {\n\t\t\tif (isSpecialProperty(prop)) return Reflect.get(target, prop, ctx);\n\t\t\tif (Reflect.has(target, prop)) return getTraceable(ctx, Reflect.get(target, prop, ctx));\n\t\t\tconst error = /* @__PURE__ */ new Error(`cannot get property \"${prop}\" without inject`);\n\t\t\ttry {\n\t\t\t\tconst def = target.reflect.props[prop];\n\t\t\t\tif (def?.type === \"accessor\") return def.get.call(ctx, ctx[symbols.receiver], error);\n\t\t\t\tif (!ctx.fiber.runtime) return ctx.reflect.get(prop, false);\n\t\t\t\treturn ctx.events.waterfall(\"internal/get\", ctx, prop, error, () => {\n\t\t\t\t\tconst key = target[symbols.isolate][prop];\n\t\t\t\t\tlet fiber = (ctx[symbols.shadow] ?? ctx).fiber;\n\t\t\t\t\twhile (true) {\n\t\t\t\t\t\tconst impl = fiber.store?.[prop];\n\t\t\t\t\t\tif (impl) return getTraceable(ctx, impl.value);\n\t\t\t\t\t\tif (prop in fiber.inject) {\n\t\t\t\t\t\t\terror.message = `cannot get required service \"${prop}\" in inactive context`;\n\t\t\t\t\t\t\tthrow error;\n\t\t\t\t\t\t}\n\t\t\t\t\t\tif (!fiber.runtime) throw error;\n\t\t\t\t\t\tif (fiber.parent[symbols.isolate][prop] !== key) throw error;\n\t\t\t\t\t\tfiber = fiber.parent.fiber;\n\t\t\t\t\t}\n\t\t\t\t});\n\t\t\t} catch (e) {\n\t\t\t\tthrow e === error ? enhanceError(e) : e;\n\t\t\t}\n\t\t},\n\t\tset: (target, prop, value, ctx) => {\n\t\t\tif (isSpecialProperty(prop)) return Reflect.set(target, prop, value, ctx);\n\t\t\tconst error = /* @__PURE__ */ new Error(`cannot set property \"${prop}\" without provide`);\n\t\t\tconst def = target.reflect.props[prop];\n\t\t\tif (!def) {\n\t\t\t\tif (!ctx.fiber.runtime) return Reflect.set(target, prop, value, ctx);\n\t\t\t\tthrow enhanceError(error);\n\t\t\t}\n\t\t\ttry {\n\t\t\t\tif (def.type === \"accessor\") {\n\t\t\t\t\tif (!def.set) return false;\n\t\t\t\t\treturn def.set.call(ctx, value, ctx[symbols.receiver], error);\n\t\t\t\t}\n\t\t\t\treturn ctx.events.waterfall(\"internal/set\", ctx, prop, value, error, () => {\n\t\t\t\t\treturn ctx.reflect.set(prop, value, error);\n\t\t\t\t});\n\t\t\t} catch (e) {\n\t\t\t\tthrow e === error ? enhanceError(e) : e;\n\t\t\t}\n\t\t},\n\t\thas: (target, prop) => {\n\t\t\tif (isSpecialProperty(prop)) return Reflect.has(target, prop);\n\t\t\tif (Reflect.has(target, prop)) return true;\n\t\t\treturn !!target.reflect.props[prop];\n\t\t}\n\t};\n\t/** Service implementations, keyed by isolation label. */\n\tstore = Object.create(null);\n\t/** Declared context properties (services and accessors), by name. */\n\tprops = Object.create(null);\n\tconstructor(ctx) {\n\t\tthis.ctx = ctx;\n\t\tdefineProperty(this, symbols.tracker, {\n\t\t\tproperty: \"ctx\",\n\t\t\tnoShadow: true\n\t\t});\n\t\tthis.mixin(\"reflect\", [\n\t\t\t\"get\",\n\t\t\t\"set\",\n\t\t\t\"provide\",\n\t\t\t\"accessor\",\n\t\t\t\"mixin\"\n\t\t]);\n\t\tthis.mixin(\"fiber\", [\"runtime\", \"effect\"]);\n\t\tthis.mixin(\"registry\", [\"inject\", \"plugin\"]);\n\t\tthis.mixin(\"events\", [\n\t\t\t\"on\",\n\t\t\t\"once\",\n\t\t\t\"parallel\",\n\t\t\t\"emit\",\n\t\t\t\"serial\",\n\t\t\t\"bail\",\n\t\t\t\"waterfall\"\n\t\t]);\n\t}\n\t/**\n\t* Read a service from the store without the inject requirement.\n\t*\n\t* @param name — the service name.\n\t* @param strict — when `true`, only return implementations whose providing\n\t* fiber is currently active.\n\t* @returns the service value, or `undefined` when not (yet) provided.\n\t*/\n\tget(name, strict = true) {\n\t\treturn getTraceable(this.ctx, this._getImpl(name, strict)?.value);\n\t}\n\t_getImpl(name, strict = true) {\n\t\tconst key = this.ctx[symbols.isolate][name];\n\t\tconst impl = key && this.store[key];\n\t\tif (!impl) return;\n\t\tif (strict && impl.fiber.state !== 2) return;\n\t\treturn impl;\n\t}\n\t/**\n\t* Overwrite a provided service's value.\n\t*\n\t* @param name — the service name.\n\t* @param value — the new service value.\n\t* @param error — carrier for the caller stack in diagnostics.\n\t* @returns `true` on success.\n\t* @throws when `name` was never provided, or was provided by another fiber.\n\t*/\n\tset(name, value, error) {\n\t\tconst key = this.ctx[symbols.isolate][name];\n\t\tconst impl = this.store[key];\n\t\tif (!impl) throw new Error(`cannot set property \"${name}\" without provide`);\n\t\tif (impl.fiber !== this.ctx.fiber) throw new Error(`cannot set property \"${name}\" in multiple fibers`);\n\t\timpl.value = value;\n\t\treturn true;\n\t}\n\t/**\n\t* Register a service implementation owned by the current fiber.\n\t*\n\t* See the `ctx.provide()` overload above for the full contract.\n\t*\n\t* @param name — the service name.\n\t* @param value — the service value.\n\t* @param check — optional availability predicate for dependents.\n\t* @returns a disposer that unregisters the service.\n\t*/\n\tprovide(name, value, check) {\n\t\treturn this.ctx.fiber.effect(() => {\n\t\t\tif (!this.props[name]) this.props[name] ??= { type: \"service\" };\n\t\t\telse if (this.props[name].type !== \"service\") throw new Error(`property \"${name}\" is already declared as ${this.props[name].type}`);\n\t\t\tthis.props[name] = { type: \"service\" };\n\t\t\tthis.ctx.root[symbols.isolate][name] ??= Symbol(name);\n\t\t\tconst key = this.ctx[symbols.isolate][name];\n\t\t\tconst impl = {\n\t\t\t\tname,\n\t\t\t\tvalue,\n\t\t\t\tfiber: this.ctx.fiber,\n\t\t\t\tcheck\n\t\t\t};\n\t\t\tif (this.store[key]) throw new Error(`service \"${name}\" has been registered at <${this.store[key].fiber.name}>`);\n\t\t\tthis.store[key] = impl;\n\t\t\tthis.ctx.fiber.store[name] = impl;\n\t\t\tif (this.ctx.fiber.state === 2) this.notify([name]);\n\t\t\treturn async () => {\n\t\t\t\tdelete this.store[key];\n\t\t\t\tconst fibers = this.notify([name]);\n\t\t\t\tawait Promise.allSettled(fibers.map((fiber) => fiber.await()));\n\t\t\t\tdelete this.ctx.fiber.store[name];\n\t\t\t};\n\t\t}, `ctx.provide(${JSON.stringify(name)})`);\n\t}\n\t/**\n\t* Re-evaluate every fiber that requires one of the given services.\n\t*\n\t* @param names — the service names that changed.\n\t* @param filter — restricts notification to matching isolation scopes.\n\t* @returns the fibers whose dependency state was refreshed.\n\t*/\n\tnotify(names, filter = (ctx, name) => ctx[symbols.isolate][name] === this.ctx[symbols.isolate][name]) {\n\t\tconst fibers = [];\n\t\tfor (const runtime of this.ctx.registry.values()) for (const fiber of runtime.fibers) {\n\t\t\tlet hasUpdate = false;\n\t\t\tfor (const name of names) {\n\t\t\t\tif (!(name in fiber.inject)) continue;\n\t\t\t\tif (!filter(fiber.ctx, name)) continue;\n\t\t\t\thasUpdate = true;\n\t\t\t\tfiber._checkImpl(name);\n\t\t\t}\n\t\t\tif (!hasUpdate) continue;\n\t\t\tfiber._refresh();\n\t\t\tfibers.push(fiber);\n\t\t}\n\t\tfor (const name of names) {\n\t\t\tconst self = Object.create(this.ctx);\n\t\t\tself[symbols.filter] = (target) => filter(target, name);\n\t\t\tthis.ctx.events.emit(self, \"internal/service\", name, this._getImpl(name, false)?.value);\n\t\t}\n\t\treturn fibers;\n\t}\n\t/**\n\t* Define a computed context property backed by get/set hooks.\n\t*\n\t* @param name — the context property name.\n\t* @param options — the `get` hook and optional `set` hook.\n\t* @returns a disposer that removes the accessor.\n\t*/\n\taccessor(name, options) {\n\t\treturn this.ctx.fiber.effect(() => {\n\t\t\tif (name in this.props) throw new Error(`property \"${name}\" is already declared as ${this.props[name].type}`);\n\t\t\tthis.props[name] = {\n\t\t\t\ttype: \"accessor\",\n\t\t\t\t...options\n\t\t\t};\n\t\t\treturn () => delete this.props[name];\n\t\t}, `ctx.accessor(${JSON.stringify(name)})`);\n\t}\n\t/**\n\t* Expose selected members of a service directly on `ctx`.\n\t*\n\t* See the `ctx.mixin()` overload above for the full contract.\n\t*\n\t* @param source — a context property name or a source object.\n\t* @param mixins — keys to forward, or a source-key → ctx-key map.\n\t* @returns a disposer that removes all created accessors.\n\t*/\n\tmixin(source, mixins) {\n\t\tconst self = this;\n\t\treturn this.ctx.fiber.effect(function* () {\n\t\t\tconst entries = Array.isArray(mixins) ? mixins.map((key) => [key, key]) : Object.entries(mixins);\n\t\t\tconst getTarget = (ctx, error) => {\n\t\t\t\treturn ctx[source];\n\t\t\t};\n\t\t\tfor (const [key, value] of entries) yield self.accessor(value, {\n\t\t\t\tget(receiver, error) {\n\t\t\t\t\tconst service = getTarget(this, error);\n\t\t\t\t\tif (isNullable(service)) return service;\n\t\t\t\t\tconst mixin = receiver ? withProps(receiver, service) : service;\n\t\t\t\t\tconst value = Reflect.get(service, key, mixin);\n\t\t\t\t\tif (typeof value !== \"function\") return value;\n\t\t\t\t\treturn value.bind(mixin ?? service);\n\t\t\t\t},\n\t\t\t\tset(value, receiver, error) {\n\t\t\t\t\tconst service = getTarget(this, error);\n\t\t\t\t\tconst mixin = receiver ? withProps(receiver, service) : service;\n\t\t\t\t\treturn Reflect.set(service, key, value, mixin);\n\t\t\t\t}\n\t\t\t});\n\t\t}, `ctx.mixin(${JSON.stringify(source)})`);\n\t}\n\t/**\n\t* Attach this context's tracing wrapper to a value.\n\t*\n\t* @param value — the value to wrap.\n\t* @returns the traceable wrapper (or the value itself when not applicable).\n\t*/\n\ttrace(value) {\n\t\treturn getTraceable(this.ctx, value);\n\t}\n\t/**\n\t* Wrap a callback so calls trace `this` and arguments to this context.\n\t*\n\t* @param callback — the function to wrap.\n\t* @returns a proxy delegating to `callback` with traced values.\n\t*/\n\tbind(callback) {\n\t\treturn new Proxy(callback, {\n\t\t\tapply: (target, thisArg, args) => {\n\t\t\t\treturn Reflect.apply(target, this.trace(thisArg), args.map((arg) => this.trace(arg)));\n\t\t\t},\n\t\t\tconstruct: (target, args, newTarget) => {\n\t\t\t\treturn Reflect.construct(target, args.map((arg) => this.trace(arg)), newTarget);\n\t\t\t}\n\t\t});\n\t}\n};\n//#endregion\n//#region lib/types/fiber.js\nconst kValidationError = Symbol.for(\"ValidationError\");\n/** Error raised when plugin configuration fails standard-schema validation. */\nvar ValidationError = class extends TypeError {\n\tname = \"ValidationError\";\n\t/**\n\t* Build the aggregated message from schema issues.\n\t*\n\t* @param issues — the standard-schema issues, one message line each.\n\t*/\n\tconstructor(issues) {\n\t\tsuper(`invalid config:\\n` + issues.map((issue) => {\n\t\t\tif (issue.path) return `  - ${issue.message} (at ${issue.path.join(\".\")})`;\n\t\t\telse return `  - ${issue.message}`;\n\t\t}).join(\"\\n\"));\n\t}\n};\nObject.defineProperty(ValidationError.prototype, kValidationError, { value: true });\n/**\n* Validate and normalize config for a plugin runtime before it starts.\n*\n* @param runtime — the plugin runtime whose `Config` schema to apply.\n* @param config — the raw user config.\n* @returns the validated config, or `config` unchanged if the runtime has no schema.\n* @throws {ValidationError} when validation reports issues.\n*/\nfunction resolveConfig(runtime, config) {\n\tif (!runtime.Config) return config;\n\tconst result = runtime.Config[\"~standard\"].validate(config);\n\tif (\"then\" in result) throw new TypeError(\"Async config validation is not supported\");\n\tif (result.issues) throw new ValidationError(result.issues);\n\telse return result.value;\n}\nconst effectInertia = /* @__PURE__ */ new WeakMap();\nfunction runDisposable(dispose) {\n\tconst result = dispose();\n\treturn effectInertia.get(dispose)?.() ?? result;\n}\n/** Notify plugin teardown without allowing one observer to break ownership cleanup. */\nfunction emitPluginDisposed(context, fiber) {\n\tconst args = [\"internal/plugin\", fiber];\n\tlet callbacks;\n\ttry {\n\t\tcallbacks = context.events.dispatch(\"emit\", args);\n\t} catch (error) {\n\t\tcontext.logger.error(error);\n\t\treturn;\n\t}\n\tfor (const callback of callbacks) try {\n\t\tconst returned = callback(...args);\n\t\tPromise.resolve(returned).catch((error) => context.logger.error(error));\n\t} catch (error) {\n\t\tcontext.logger.error(error);\n\t}\n}\n/** Framework error with a stable machine-readable code. */\nvar CordisError = class CordisError extends Error {\n\tcode;\n\t/**\n\t* @param code — the stable error code; also the default message.\n\t* @param message — optional human-readable override.\n\t*/\n\tconstructor(code, message) {\n\t\tsuper(message ?? CordisError.Code[code]);\n\t\tthis.code = code;\n\t}\n};\n/** Cordis error code definitions. */\n(function(CordisError) {\n\tCordisError.Code = { INACTIVE_EFFECT: \"cannot create effect on inactive context\" };\n})(CordisError || (CordisError = {}));\nconst INACTIVE = \"__INACTIVE__\";\n/**\n* Runtime instance of one plugin application.\n*\n* A fiber tracks dependency state, validated config, lifecycle effects, and\n* cleanup for the plugin context returned by `ctx.plugin()`.\n*/\nvar Fiber = class {\n\tparent;\n\tinject;\n\truntime;\n\t/** Unique id within the registry; 0 for the root fiber, `null` once disposed. */\n\tuid;\n\t/** The context this fiber's plugin runs in (extends the parent context). */\n\tctx;\n\t/** The validated plugin config (updated by `update()`). */\n\tconfig;\n\t/** The raw plugin config, re-resolved before each activation. */\n\t_config;\n\t/** Current lifecycle state; transitions emit `internal/status`. */\n\tstate = 0;\n\t/** Dispose this fiber: unload the plugin, then settle once cleanup finished. */\n\tdispose;\n\t/** Snapshot of required service implementations while loaded; `undefined` otherwise. */\n\tstore;\n\t/** The in-flight load/unload transition, if one is currently running. */\n\tinertia;\n\t_hooks = Object.create(null);\n\t_disposables = new DisposableList();\n\tcontext;\n\t_error;\n\t_runner;\n\t_store = Object.create(null);\n\t/**\n\t* Create a fiber. Plugin authors normally obtain fibers from `ctx.plugin()`\n\t* rather than constructing them directly.\n\t*\n\t* @param parent — the context the plugin was loaded from.\n\t* @param config — raw config, validated against the runtime's schema.\n\t* @param inject — resolved dependency map (service name → intercept config).\n\t* @param runtime — the shared plugin runtime, or `null` for the root fiber.\n\t* @param getOuterStack — captures the caller stack for effect diagnostics.\n\t*/\n\tconstructor(parent, config, inject, runtime, getOuterStack) {\n\t\tthis.parent = parent;\n\t\tthis.inject = inject;\n\t\tthis.runtime = runtime;\n\t\tthis._config = config;\n\t\tconst collect = (dispose) => {\n\t\t\tthis._disposables.push(dispose);\n\t\t};\n\t\tif (runtime) {\n\t\t\tthis.uid = parent.registry.counter;\n\t\t\tthis.ctx = this.context = parent.extend({ fiber: this });\n\t\t\tconst injectEntries = Object.entries(this.inject);\n\t\t\tif (injectEntries.length) {\n\t\t\t\tthis.ctx[Context.intercept] = Object.create(parent[Context.intercept]);\n\t\t\t\tfor (const [name, config] of injectEntries) {\n\t\t\t\t\tif (isNullable(config)) continue;\n\t\t\t\t\tthis.ctx[Context.intercept][name] = config;\n\t\t\t\t}\n\t\t\t}\n\t\t\tthis._runner = {\n\t\t\t\tepoch: INACTIVE,\n\t\t\t\tgetOuterStack,\n\t\t\t\texecute: function() {\n\t\t\t\t\tif (isConstructor(runtime.callback)) {\n\t\t\t\t\t\tconst instance = new runtime.callback(this.ctx, this.config);\n\t\t\t\t\t\tfor (const hook of instance?.[symbols.initHooks] ?? []) hook();\n\t\t\t\t\t\treturn instance?.[symbols.init]?.();\n\t\t\t\t\t} else return runtime.callback(this.ctx, this.config);\n\t\t\t\t},\n\t\t\t\tcollect\n\t\t\t};\n\t\t\tthis.dispose = parent.fiber.effect(() => {\n\t\t\t\tconst remove = runtime.fibers.push(this);\n\t\t\t\treturn async () => {\n\t\t\t\t\tthis.uid = null;\n\t\t\t\t\temitPluginDisposed(this.context, this);\n\t\t\t\t\tif (this.ctx.registry.has(runtime.callback)) {\n\t\t\t\t\t\tremove();\n\t\t\t\t\t\tif (!runtime.fibers.length) this.ctx.registry.delete(runtime.callback);\n\t\t\t\t\t}\n\t\t\t\t\tthis._setEpoch(INACTIVE);\n\t\t\t\t\tif (!this.inertia) this._updateState(() => {\n\t\t\t\t\t\tthis.inertia = this._unload();\n\t\t\t\t\t\treturn 5;\n\t\t\t\t\t});\n\t\t\t\t\twhile (this.inertia) await this.inertia;\n\t\t\t\t};\n\t\t\t}, \"ctx.plugin()\");\n\t\t\ttry {\n\t\t\t\tthis.context.emit(\"internal/plugin\", this);\n\t\t\t} catch (error) {\n\t\t\t\tPromise.resolve(this.dispose()).catch((reason) => this.ctx.logger.error(reason));\n\t\t\t\tthrow error;\n\t\t\t}\n\t\t\tif (this.uid !== null && parent.fiber.state !== 5) {\n\t\t\t\tfor (const name of Object.keys(this.inject)) this._checkImpl(name);\n\t\t\t\tthis._refresh();\n\t\t\t}\n\t\t} else {\n\t\t\tthis.uid = 0;\n\t\t\tthis.ctx = this.context = parent;\n\t\t\tthis.state = 2;\n\t\t\tthis.store = Object.create(null);\n\t\t\tthis._runner = {\n\t\t\t\tepoch: \"\",\n\t\t\t\tgetOuterStack,\n\t\t\t\texecute: () => {},\n\t\t\t\tcollect\n\t\t\t};\n\t\t\tthis.dispose = () => this.restart();\n\t\t}\n\t}\n\t/** The plugin's display name, inherited from the nearest named ancestor, else `'root'`. */\n\tget name() {\n\t\tlet fiber = this;\n\t\tdo {\n\t\t\tif (fiber.runtime?.name) return fiber.runtime.name;\n\t\t\tfiber = fiber.parent.fiber;\n\t\t} while (fiber !== fiber.parent.fiber);\n\t\treturn \"root\";\n\t}\n\t/**\n\t* Throw if the fiber has already been disposed.\n\t*\n\t* @returns nothing when the fiber is still active.\n\t* @throws {CordisError} `INACTIVE_EFFECT` when the fiber's uid has been cleared.\n\t*/\n\tassertActive() {\n\t\tif (this.uid !== null) return;\n\t\tthrow new CordisError(\"INACTIVE_EFFECT\");\n\t}\n\t_execute(runner) {\n\t\tconst oldEpoch = runner.epoch;\n\t\treturn composeError((info) => {\n\t\t\tconst safeCollect = (dispose) => {\n\t\t\t\tif (typeof dispose === \"function\") runner.collect(dispose);\n\t\t\t\telse if (!isNullable(dispose)) throw new TypeError(\"Invalid effect\");\n\t\t\t};\n\t\t\tconst effect = runner.execute.call(this);\n\t\t\tif (typeof effect === \"function\") return runner.collect(effect);\n\t\t\telse if (isNullable(effect)) {} else if (!isObject(effect)) throw new TypeError(\"Invalid effect\");\n\t\t\telse if (\"then\" in effect) return effect.then(safeCollect);\n\t\t\telse if (Symbol.iterator in effect) {\n\t\t\t\tinfo.error = /* @__PURE__ */ new Error();\n\t\t\t\tconst iter = effect[Symbol.iterator]();\n\t\t\t\twhile (true) {\n\t\t\t\t\tconst result = iter.next();\n\t\t\t\t\tsafeCollect(result.value);\n\t\t\t\t\tif (result.done) return;\n\t\t\t\t}\n\t\t\t} else if (Symbol.asyncIterator in effect) {\n\t\t\t\tconst iter = effect[Symbol.asyncIterator]();\n\t\t\t\treturn (async () => {\n\t\t\t\t\tawait Promise.resolve();\n\t\t\t\t\tinfo.error = /* @__PURE__ */ new Error();\n\t\t\t\t\twhile (true) {\n\t\t\t\t\t\tif (runner.epoch !== oldEpoch) return;\n\t\t\t\t\t\tconst result = await iter.next();\n\t\t\t\t\t\tsafeCollect(result.value);\n\t\t\t\t\t\tif (result.done) return;\n\t\t\t\t\t}\n\t\t\t\t})();\n\t\t\t} else throw new TypeError(\"Invalid effect\");\n\t\t}, runner.getOuterStack);\n\t}\n\teffect(execute, label = \"anonymous\") {\n\t\tthis.assertActive();\n\t\tif (this.state === 5) throw new CordisError(\"INACTIVE_EFFECT\");\n\t\tconst disposables = [];\n\t\tlet disposing = false;\n\t\tlet disposalTask;\n\t\tconst dispose = () => {\n\t\t\tif (disposing) return disposalTask;\n\t\t\tdisposing = true;\n\t\t\tlet task;\n\t\t\tfor (const disposable of disposables.splice(0).reverse()) if (task) task = task.then(() => runDisposable(disposable));\n\t\t\telse {\n\t\t\t\tconst result = runDisposable(disposable);\n\t\t\t\tif (isObject(result) && \"then\" in result) task = result;\n\t\t\t}\n\t\t\treturn disposalTask = task;\n\t\t};\n\t\tconst meta = {\n\t\t\tlabel,\n\t\t\tchildren: []\n\t\t};\n\t\tconst runner = {\n\t\t\texecute,\n\t\t\tepoch: true,\n\t\t\tcollect: (dispose) => {\n\t\t\t\tdisposables.push(dispose);\n\t\t\t\tthis._disposables.delete(dispose);\n\t\t\t\tif (dispose[symbols.effect]) meta.children.push(dispose[symbols.effect]);\n\t\t\t},\n\t\t\tgetOuterStack: buildOuterStack()\n\t\t};\n\t\tlet task;\n\t\tlet executing = true;\n\t\tlet resolveSetup;\n\t\tlet rejectSetup;\n\t\tlet setupBarrier;\n\t\tlet setupFailed = false;\n\t\tlet inFlight;\n\t\tlet removeWrapper = () => false;\n\t\tconst waitForSetup = () => {\n\t\t\tsetupBarrier ??= new Promise((resolve, reject) => {\n\t\t\t\tresolveSetup = resolve;\n\t\t\t\trejectSetup = reject;\n\t\t\t});\n\t\t\treturn setupBarrier;\n\t\t};\n\t\tconst disposeAfter = (setup) => {\n\t\t\treturn Promise.resolve(setup).then(() => dispose(), async (reason) => {\n\t\t\t\tawait dispose();\n\t\t\t\tthrow reason;\n\t\t\t});\n\t\t};\n\t\tconst finalizeDisposal = (callback) => {\n\t\t\tlet result;\n\t\t\ttry {\n\t\t\t\tresult = callback();\n\t\t\t} catch (error) {\n\t\t\t\tremoveWrapper();\n\t\t\t\tthrow error;\n\t\t\t}\n\t\t\tif (isObject(result) && \"then\" in result) {\n\t\t\t\tconst pending = Promise.resolve(result).finally(() => {\n\t\t\t\t\tremoveWrapper();\n\t\t\t\t\tif (inFlight === pending) inFlight = void 0;\n\t\t\t\t});\n\t\t\t\treturn inFlight = pending;\n\t\t\t}\n\t\t\tremoveWrapper();\n\t\t\treturn result;\n\t\t};\n\t\tconst wrapper = defineProperty(() => {\n\t\t\tif (!runner.epoch) return setupFailed ? inFlight : void 0;\n\t\t\trunner.epoch = false;\n\t\t\treturn finalizeDisposal(() => {\n\t\t\t\tif (executing) return disposeAfter(waitForSetup());\n\t\t\t\treturn task ? disposeAfter(task) : dispose();\n\t\t\t});\n\t\t}, symbols.effect, meta);\n\t\teffectInertia.set(wrapper, () => inFlight);\n\t\tremoveWrapper = this._disposables.push(wrapper);\n\t\ttry {\n\t\t\ttask = this._execute(runner);\n\t\t} catch (reason) {\n\t\t\texecuting = false;\n\t\t\tsetupFailed = true;\n\t\t\trunner.epoch = false;\n\t\t\tlet cleanup;\n\t\t\ttry {\n\t\t\t\tcleanup = finalizeDisposal(dispose);\n\t\t\t} finally {\n\t\t\t\trejectSetup?.(reason);\n\t\t\t}\n\t\t\tif (isObject(cleanup) && \"then\" in cleanup) cleanup.catch((error) => this.ctx.logger.error(error));\n\t\t\tthrow reason;\n\t\t}\n\t\texecuting = false;\n\t\tif (setupBarrier) Promise.resolve(task).then(resolveSetup, rejectSetup);\n\t\ttask?.catch(() => {\n\t\t\tif (!runner.epoch) return dispose();\n\t\t\treturn finalizeDisposal(dispose);\n\t\t}).catch((error) => this.ctx.logger.error(error));\n\t\tconst disposeAsync = () => {\n\t\t\tif (!runner.epoch) return;\n\t\t\trunner.epoch = false;\n\t\t\treturn finalizeDisposal(dispose);\n\t\t};\n\t\twrapper.then = async (onFulfilled, onRejected) => {\n\t\t\treturn Promise.resolve(task).then(() => disposeAsync).then(onFulfilled, onRejected);\n\t\t};\n\t\treturn wrapper;\n\t}\n\t/**\n\t* Return metadata for currently registered effects.\n\t*\n\t* @returns one {@link EffectMeta} tree per labeled live effect.\n\t*/\n\tgetEffects() {\n\t\treturn [...this._disposables].map((dispose) => dispose[symbols.effect]).filter(Boolean);\n\t}\n\t_getState() {\n\t\tif (this.uid === null) return 4;\n\t\tif (this._error) return 3;\n\t\tif (this._runner.epoch !== INACTIVE) return 2;\n\t\treturn 0;\n\t}\n\t_updateState(callback) {\n\t\tconst oldState = this.state;\n\t\tthis.state = callback() ?? this._getState();\n\t\tif (oldState === this.state) return;\n\t\tthis.context.emit(\"internal/status\", this, oldState);\n\t\tif (oldState !== 2 && this.state !== 2) return;\n\t\tfor (const key of Reflect.ownKeys(this.ctx.reflect.store)) {\n\t\t\tconst impl = this.ctx.reflect.store[key];\n\t\t\tif (impl.fiber !== this) continue;\n\t\t\tthis.ctx.reflect.notify([impl.name]);\n\t\t}\n\t}\n\t_checkImpl(name) {\n\t\tconst impl = this.ctx.reflect._getImpl(name, true);\n\t\tif (!impl) return delete this._store[name];\n\t\ttry {\n\t\t\tif (impl.check && !impl.check.call(getTraceable(this.ctx, impl.value))) return delete this._store[name];\n\t\t} catch (error) {\n\t\t\timpl.fiber.ctx.logger.error(error);\n\t\t\treturn delete this._store[name];\n\t\t}\n\t\tthis._store[name] = impl;\n\t}\n\t_refresh() {\n\t\tlet epoch = false;\n\t\tepoch = \"\";\n\t\tfor (const name of Object.keys(this.inject)) {\n\t\t\tconst impl = this._store[name];\n\t\t\tif (!impl) {\n\t\t\t\tepoch = INACTIVE;\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\tepoch += \":\" + impl.fiber.uid;\n\t\t}\n\t\tthis._setEpoch(epoch);\n\t}\n\t_setEpoch(epoch) {\n\t\tconst oldEpoch = this._runner.epoch;\n\t\tif (epoch === oldEpoch) return;\n\t\tthis._runner.epoch = epoch;\n\t\tif (this.inertia) return;\n\t\tthis._updateState(() => {\n\t\t\tif (epoch !== INACTIVE && oldEpoch === INACTIVE) {\n\t\t\t\tthis.inertia = this._reload();\n\t\t\t\treturn 1;\n\t\t\t} else {\n\t\t\t\tthis.inertia = this._unload();\n\t\t\t\treturn 5;\n\t\t\t}\n\t\t});\n\t}\n\t_resolveConfig(config) {\n\t\tconfig = this.context.waterfall(this, \"internal/config\", config, () => config);\n\t\treturn this.runtime ? resolveConfig(this.runtime, config) : config;\n\t}\n\tasync _reload() {\n\t\tthis.store = { ...this._store };\n\t\tconst oldEpoch = this._runner.epoch;\n\t\ttry {\n\t\t\tawait Promise.resolve();\n\t\t\tif (this._runner.epoch === oldEpoch) {\n\t\t\t\tthis.config = this._resolveConfig(this._config);\n\t\t\t\tawait this._execute(this._runner);\n\t\t\t\tthis._error = void 0;\n\t\t\t}\n\t\t} catch (reason) {\n\t\t\tthis.ctx.logger.error(reason);\n\t\t\tthis._error = reason;\n\t\t\tthis._runner.epoch = INACTIVE;\n\t\t}\n\t\tthis._updateState(() => {\n\t\t\tif (this._runner.epoch === oldEpoch) this.inertia = void 0;\n\t\t\telse {\n\t\t\t\tthis.inertia = this._unload();\n\t\t\t\treturn 5;\n\t\t\t}\n\t\t});\n\t}\n\tasync _unload() {\n\t\tawait Promise.all(this._disposables.clear().map(async (dispose) => {\n\t\t\ttry {\n\t\t\t\tawait composeError(async (info) => {\n\t\t\t\t\tawait Promise.resolve();\n\t\t\t\t\tinfo.error = /* @__PURE__ */ new Error();\n\t\t\t\t\tawait runDisposable(dispose);\n\t\t\t\t}, this._runner.getOuterStack);\n\t\t\t} catch (reason) {\n\t\t\t\tthis.ctx.logger.error(reason);\n\t\t\t}\n\t\t}));\n\t\tthis.store = void 0;\n\t\tthis._updateState(() => {\n\t\t\tif (this._runner.epoch === INACTIVE) this.inertia = void 0;\n\t\t\telse {\n\t\t\t\tthis.inertia = this._reload();\n\t\t\t\treturn 1;\n\t\t\t}\n\t\t});\n\t}\n\t/**\n\t* Wait for current lifecycle work and rethrow startup errors.\n\t*\n\t* @returns this fiber, once it has settled into a stable state.\n\t* @throws the config-validation or plugin-startup error, if any.\n\t*/\n\tasync await() {\n\t\twhile (this.inertia) await this.inertia;\n\t\tif (this._error) throw this._error;\n\t\treturn this;\n\t}\n\t/**\n\t* Dispose and immediately reload this plugin with its current config.\n\t*\n\t* @returns a promise resolving once the reload settled.\n\t* @throws {CordisError} `INACTIVE_EFFECT` when the fiber is already disposed.\n\t*/\n\tasync restart() {\n\t\tthis.assertActive();\n\t\tthis._setEpoch(INACTIVE);\n\t\tthis._refresh();\n\t\tawait this.await();\n\t}\n\t/**\n\t* Validate and apply new config, then restart the plugin.\n\t*\n\t* Runs the `internal/update` waterfall first, so update hooks (and HMR)\n\t* can veto or replace the restart.\n\t*\n\t* @param config — the new raw config; validated before anything restarts.\n\t* @param noSave — hint for persistence hooks not to write the change back.\n\t* @returns nothing; the restart runs behind the `internal/update` waterfall.\n\t* @throws {ValidationError} when the new config fails validation.\n\t*/\n\tupdate(config, noSave = false) {\n\t\tthis.assertActive();\n\t\tthis._config = config;\n\t\tif (this.state !== 2) {\n\t\t\tthis._error = void 0;\n\t\t\tthis._setEpoch(INACTIVE);\n\t\t\tthis._refresh();\n\t\t\treturn;\n\t\t}\n\t\tconfig = this._resolveConfig(config);\n\t\tthis.context.waterfall(this, \"internal/update\", config, noSave, () => {\n\t\t\tthis.config = config;\n\t\t\tthis._error = void 0;\n\t\t\treturn this.restart();\n\t\t});\n\t}\n};\n//#endregion\n//#region lib/types/registry.js\nfunction isApplicable(object) {\n\treturn object && typeof object === \"object\" && typeof object.apply === \"function\";\n}\n/**\n* Decorator for declaring service dependencies on classes or class methods.\n*\n* On classes it contributes to the plugin's static `inject` map. On methods it\n* delays the method call until the declared services are available.\n*/\n/**\n* @param name — the required service name.\n* @param config — optional intercept config applied for that service.\n* @returns the class or method decorator.\n*/\nfunction Inject(name, config) {\n\treturn function(value, decorator) {\n\t\tif (decorator.kind === \"class\") {\n\t\t\tif (!Object.hasOwn(value, \"inject\")) {\n\t\t\t\tdefineProperty(value, \"inject\", Object.create(Object.getPrototypeOf(value).inject ?? null));\n\t\t\t\tdefineProperty(value.inject, symbols.checkProto, true);\n\t\t\t}\n\t\t\tvalue.inject[name] = config;\n\t\t} else if (decorator.kind === \"method\") {\n\t\t\tconst inject = (value[symbols.metadata] ??= {}).inject ??= Object.create(null);\n\t\t\tinject[name] = config;\n\t\t\tdecorator.addInitializer(function() {\n\t\t\t\tconst property = this[symbols.tracker]?.property;\n\t\t\t\t(this[symbols.initHooks] ??= []).push(() => {\n\t\t\t\t\tthis.ctx.inject(inject, (ctx) => {\n\t\t\t\t\t\treturn value.call(property ? withProps(this, { [property]: ctx }) : this);\n\t\t\t\t\t});\n\t\t\t\t});\n\t\t\t});\n\t\t} else throw new Error(\"@Inject() can only be used on class or class methods\");\n\t};\n}\n/** Utilities for normalizing plugin dependency declarations. */\n(function(Inject) {\n\t/**\n\t* Convert array/object/class-inherited inject metadata into a plain map.\n\t*\n\t* @param inject — the declaration to normalize; `null`/`undefined` add nothing.\n\t* @param result — the map to fill (service name → intercept config or `null`).\n\t* @returns `result`.\n\t*/\n\tfunction resolve(inject, result = Object.create(null)) {\n\t\tif (!inject) return result;\n\t\tif (Array.isArray(inject)) for (const name of inject) result[name] = null;\n\t\telse if (Reflect.has(inject, symbols.checkProto)) {\n\t\t\tObject.assign(result, resolve(Object.getPrototypeOf(inject)));\n\t\t\tfor (const name of Object.keys(inject)) result[name] = inject[name] ?? null;\n\t\t} else for (const name of Object.keys(inject)) result[name] = inject[name] ?? null;\n\t\treturn result;\n\t}\n\tInject.resolve = resolve;\n})(Inject || (Inject = {}));\n/**\n* Plugin registry installed as `ctx.registry` and mixed into every context.\n*\n* It normalizes plugin shapes, tracks plugin runtimes, starts fibers, and\n* exposes map-like inspection over active plugin callbacks.\n*/\nvar RegistryService = class {\n\tctx;\n\t_counter = 0;\n\t_internal = /* @__PURE__ */ new Map();\n\tconstructor(ctx) {\n\t\tthis.ctx = ctx;\n\t\tdefineProperty(this, symbols.tracker, {\n\t\t\tproperty: \"ctx\",\n\t\t\tnoShadow: true\n\t\t});\n\t}\n\t/** Allocate the next fiber uid (increments on every read). */\n\tget counter() {\n\t\treturn ++this._counter;\n\t}\n\t/** Number of registered plugin runtimes. */\n\tget size() {\n\t\treturn this._internal.size;\n\t}\n\t/**\n\t* Resolve a supported plugin shape to its executable callback.\n\t*\n\t* @param plugin — a function, class, or `{ apply }` object plugin.\n\t* @returns the callback identifying the plugin, or `undefined` if invalid.\n\t*/\n\tresolve(plugin) {\n\t\ttry {\n\t\t\tif (typeof plugin === \"function\") return plugin;\n\t\t\tif (isApplicable(plugin)) return plugin.apply;\n\t\t} catch {}\n\t}\n\t/**\n\t* Look up the runtime record for a plugin.\n\t*\n\t* @param plugin — any supported plugin shape.\n\t* @returns the runtime, or `undefined` when the plugin is not registered.\n\t*/\n\tget(plugin) {\n\t\tconst key = this.resolve(plugin);\n\t\treturn key && this._internal.get(key);\n\t}\n\t/**\n\t* Check whether a plugin has a registered runtime.\n\t*\n\t* @param plugin — any supported plugin shape.\n\t* @returns `true` when at least one fiber of the plugin exists.\n\t*/\n\thas(plugin) {\n\t\tconst key = this.resolve(plugin);\n\t\treturn !!key && this._internal.has(key);\n\t}\n\t/**\n\t* Dispose every running fiber for a plugin and remove its runtime record.\n\t*\n\t* @param plugin — any supported plugin shape.\n\t* @returns the removed runtime, or `undefined` when none was registered.\n\t*/\n\tdelete(plugin) {\n\t\tconst key = this.resolve(plugin);\n\t\tconst runtime = key && this._internal.get(key);\n\t\tif (!runtime) return;\n\t\tthis._internal.delete(key);\n\t\tfor (const fiber of runtime.fibers) fiber.dispose();\n\t\treturn runtime;\n\t}\n\t/** Iterate the registered plugin callbacks. */\n\tkeys() {\n\t\treturn this._internal.keys();\n\t}\n\t/** Iterate the registered plugin runtimes. */\n\tvalues() {\n\t\treturn this._internal.values();\n\t}\n\t/** Iterate `[callback, runtime]` pairs. */\n\tentries() {\n\t\treturn this._internal.entries();\n\t}\n\t/**\n\t* Visit every registered runtime.\n\t*\n\t* @param callback — receives each runtime and its identifying callback.\n\t*/\n\tforEach(callback) {\n\t\treturn this._internal.forEach(callback);\n\t}\n\t/**\n\t* Start a callback once the requested dependencies are available.\n\t*\n\t* @param inject — required services, as an array or a name → config map.\n\t* @param callback — plugin body called with `(ctx, config)`.\n\t* @returns the fiber; awaiting it settles once loading finished.\n\t*/\n\tinject(inject, callback) {\n\t\treturn this.plugin({\n\t\t\tinject,\n\t\t\tapply: callback,\n\t\t\tname: callback.name\n\t\t});\n\t}\n\t/**\n\t* Start a plugin in the current context and return its fiber.\n\t*\n\t* Creates (or reuses) the plugin's runtime record, then starts a new fiber\n\t* under the current context. Throws if `plugin` is not a supported shape or\n\t* if the current fiber is already disposed.\n\t*\n\t* @param plugin — a function, class, or `{ apply }` object plugin.\n\t* @param config — the plugin config, validated against its `Config` schema.\n\t* @param getOuterStack — captures the caller stack for effect diagnostics.\n\t* @returns the fiber; awaiting it settles once loading finished.\n\t*/\n\tplugin(plugin, config, getOuterStack = buildOuterStack()) {\n\t\tconst callback = this.resolve(plugin);\n\t\tif (!callback) throw new Error(\"invalid plugin, expect function or object with an \\\"apply\\\" method, received \" + typeof plugin);\n\t\tthis.ctx.fiber.assertActive();\n\t\tlet runtime = this._internal.get(callback);\n\t\tif (!runtime) {\n\t\t\tlet name = plugin.name;\n\t\t\tif (name === \"apply\") name = void 0;\n\t\t\truntime = {\n\t\t\t\tname,\n\t\t\t\tcallback,\n\t\t\t\tfibers: new DisposableList(),\n\t\t\t\tConfig: plugin.Config\n\t\t\t};\n\t\t\tthis._internal.set(callback, runtime);\n\t\t}\n\t\tconst fiber = new Fiber(this.ctx, config, Inject.resolve(plugin.inject), runtime, getOuterStack);\n\t\tconst wrapped = Object.create(fiber);\n\t\twrapped.then = (onFulfilled, onRejected) => {\n\t\t\treturn fiber.await().then(onFulfilled, onRejected);\n\t\t};\n\t\treturn wrapped;\n\t}\n};\n//#endregion\n//#region lib/types/context.js\n/**\n* Root and child dependency containers for Cordis plugins.\n*\n* A context is a proxy: normal property reads go through the service resolver,\n* while `extend()`, `isolate()`, and `intercept()` create scoped child\n* contexts without mutating their parent.\n*/\nvar Context = class Context {\n\t/** Symbol key under which a disposer exposes its {@link EffectMeta} diagnostics tree. */\n\tstatic effect = symbols.effect;\n\t/** Symbol key for a context's listener filter, consulted on every event dispatch. */\n\tstatic filter = symbols.filter;\n\t/** Symbol key of the isolation map (see the `Context[symbols.isolate]` property). */\n\tstatic isolate = symbols.isolate;\n\t/** Symbol key of the intercept map (see the `Context[symbols.intercept]` property). */\n\tstatic intercept = symbols.intercept;\n\t/**\n\t* Returns true for Cordis context proxies and context prototypes.\n\t*\n\t* Works across realms and across multiple copies of cordis, because the\n\t* brand is keyed by a global symbol rather than by `instanceof`.\n\t*\n\t* @param value — the value to test.\n\t* @returns `true` if `value` is a Cordis context, narrowing its type.\n\t*/\n\tstatic is(value) {\n\t\treturn !!value?.[Context.is];\n\t}\n\tstatic {\n\t\tContext.is[Symbol.toPrimitive] = () => Symbol.for(\"cordis.is\");\n\t\tContext.prototype[Context.is] = true;\n\t}\n\t/** Create the root context and install the built-in services. */\n\tconstructor() {\n\t\tthis[symbols.isolate] = Object.create(null);\n\t\tthis[symbols.intercept] = Object.create(null);\n\t\tconst self = new Proxy(this, ReflectService.handler);\n\t\tthis.root = self;\n\t\tthis.baseUrl = void 0;\n\t\tthis.fiber = new Fiber(self, {}, Object.create(null), null, () => []);\n\t\tthis.reflect = new ReflectService(self);\n\t\tthis.registry = new RegistryService(self);\n\t\tthis.events = new EventsService(self);\n\t\tthis.logger = new LoggerService(self);\n\t\tthis.fiber._disposables.clear();\n\t\treturn self;\n\t}\n\t[Symbol.for(\"nodejs.util.inspect.custom\")]() {\n\t\treturn `Context <${this.fiber.name}>`;\n\t}\n\t/**\n\t* Create a child context with extra metadata on top of the current scope.\n\t*\n\t* The child prototypally inherits every property of this context; own\n\t* properties of `meta` shadow the inherited ones. The parent is not mutated.\n\t*\n\t* @param meta — own properties (including symbol keys) to define on the child.\n\t* @returns a child context inheriting from this one.\n\t*/\n\textend(meta = {}) {\n\t\tconst shadow = Reflect.getOwnPropertyDescriptor(this, symbols.shadow)?.value;\n\t\tconst self = Object.create(getTraceable(this, this));\n\t\tfor (const prop of Reflect.ownKeys(meta)) Object.defineProperty(self, prop, Reflect.getOwnPropertyDescriptor(meta, prop));\n\t\tif (!shadow) return self;\n\t\treturn Object.assign(Object.create(self), { [symbols.shadow]: shadow });\n\t}\n\t/**\n\t* Create a child context with an independent service scope for `name`.\n\t*\n\t* Below the returned context, reads and writes of the service `name`\n\t* resolve against the new label instead of the parent's, so a different\n\t* implementation can be provided without affecting the parent scope.\n\t* Passing the same `label` to two `isolate()` calls joins their scopes.\n\t*\n\t* @param name — the service name to isolate.\n\t* @param label — scope label to join; defaults to a fresh unique symbol.\n\t* @returns a child context whose `name` service resolves in the new scope.\n\t*/\n\tisolate(name, label) {\n\t\tconst shadow = Object.create(this[symbols.isolate]);\n\t\tshadow[name] = label ?? Symbol(name);\n\t\treturn this.extend({ [symbols.isolate]: shadow });\n\t}\n\tintercept(name, config) {\n\t\tconst intercept = Object.create(this[symbols.intercept]);\n\t\tintercept[name] = config;\n\t\treturn this.extend({ [symbols.intercept]: intercept });\n\t}\n};\n//#endregion\n//#region lib/types/service.js\n/**\n* Base class for services that expose a named API on `ctx`.\n*\n* Subclasses call `super(ctx, name)` from their constructor. The service is\n* registered immediately and is automatically removed with the owning fiber.\n*/\nvar Service = class Service {\n\tctx;\n\t/** Symbol key of an instance method run after construction (class plugins). */\n\tstatic init = symbols.init;\n\t/** Symbol key of the availability predicate passed to `ctx.provide()`. */\n\tstatic check = symbols.check;\n\t/** Symbol key of the phantom intercept-config type parameter. */\n\tstatic config = symbols.config;\n\t/** Symbol key of the call body making a service callable (e.g. `ctx.logger()`). */\n\tstatic invoke = symbols.invoke;\n\t/** Symbol key of the helper deriving an extended service instance. */\n\tstatic extend = symbols.extend;\n\t/** Symbol key of the tracker metadata used for context tracing. */\n\tstatic tracker = symbols.tracker;\n\t/** Symbol key of the intercept-config resolution helper below. */\n\tstatic resolveConfig = symbols.resolveConfig;\n\t/** The service name this instance is registered under. */\n\tname;\n\t/**\n\t* Register this instance as `name` in the current context.\n\t*\n\t* Calls `ctx.reflect.provide(name, this, this[Service.check])`, so the\n\t* service is unregistered automatically when the owning fiber unloads.\n\t* Services with a `[Service.invoke]` body return a callable instance.\n\t*\n\t* @param ctx — the context to register in (stored as `this.ctx`).\n\t* @param name — the service name; defaults to the static `provide` field.\n\t*/\n\tconstructor(ctx, name) {\n\t\tthis.ctx = ctx;\n\t\tname ??= this.constructor[\"provide\"];\n\t\tlet self = this;\n\t\tconst tracker = {\n\t\t\tassociate: name,\n\t\t\tproperty: \"ctx\"\n\t\t};\n\t\tif (self[symbols.invoke]) self = createCallable(name, joinPrototype(Object.getPrototypeOf(this), Function.prototype), tracker);\n\t\tself.ctx = ctx;\n\t\tself.name = name;\n\t\tdefineProperty(self, symbols.tracker, tracker);\n\t\tself.ctx.reflect.provide(name, self, this[symbols.check]);\n\t\treturn self;\n\t}\n\t[symbols.filter](ctx) {\n\t\treturn ctx[symbols.isolate][this.name] === this.ctx[symbols.isolate][this.name];\n\t}\n\t[symbols.extend](props) {\n\t\tlet self;\n\t\tif (this[Service.invoke]) self = createCallable(this.name, this, this[symbols.tracker]);\n\t\telse self = Object.create(this);\n\t\treturn Object.assign(self, props);\n\t}\n\t/**\n\t* Merge intercept config from ancestors with optional base and head values.\n\t*\n\t* Entries added closer to the root apply first; `base` is prepended and\n\t* `head` appended. Uses `Config.merge` when the service declares one,\n\t* otherwise a shallow `Object.assign`.\n\t*\n\t* @param base — lowest-precedence config merged before all intercepts.\n\t* @param head — highest-precedence config merged after all intercepts.\n\t* @returns the merged config.\n\t*/\n\t[symbols.resolveConfig](base, head) {\n\t\tlet intercept = this.ctx[Context.intercept];\n\t\tconst configs = [];\n\t\twhile (this.name in intercept) {\n\t\t\tif (Object.hasOwn(intercept, this.name)) configs.unshift(intercept[this.name]);\n\t\t\tintercept = Object.getPrototypeOf(intercept);\n\t\t}\n\t\tif (base) configs.unshift(base);\n\t\tif (head) configs.push(head);\n\t\tif (this[\"Config\"]?.merge) return this[\"Config\"].merge(...configs);\n\t\telse return Object.assign({}, ...configs);\n\t}\n\tstatic [Symbol.hasInstance](instance) {\n\t\tif (!instance) return false;\n\t\tlet constructor = instance.constructor;\n\t\twhile (constructor) {\n\t\t\tconstructor = constructor.prototype?.constructor;\n\t\t\tif (constructor === this) return true;\n\t\t\tconstructor &&= Object.getPrototypeOf(constructor);\n\t\t}\n\t\treturn false;\n\t}\n};\n//#endregion\nexport { Context, CordisError, DisposableList, EventsService, Fiber, Inject, Logger, LoggerService, RegistryService, Service, ValidationError, buildOuterStack, c16, c256, composeError, createCallable, defaultFormatters, getPropertyDescriptor, getTraceable, isBailed, isConstructor, isObject, joinPrototype, resolveConfig, symbols, withProps };\n","'use strict';\n\nconst ALIAS = Symbol.for('yaml.alias');\nconst DOC = Symbol.for('yaml.document');\nconst MAP = Symbol.for('yaml.map');\nconst PAIR = Symbol.for('yaml.pair');\nconst SCALAR = Symbol.for('yaml.scalar');\nconst SEQ = Symbol.for('yaml.seq');\nconst NODE_TYPE = Symbol.for('yaml.node.type');\nconst isAlias = (node) => !!node && typeof node === 'object' && node[NODE_TYPE] === ALIAS;\nconst isDocument = (node) => !!node && typeof node === 'object' && node[NODE_TYPE] === DOC;\nconst isMap = (node) => !!node && typeof node === 'object' && node[NODE_TYPE] === MAP;\nconst isPair = (node) => !!node && typeof node === 'object' && node[NODE_TYPE] === PAIR;\nconst isScalar = (node) => !!node && typeof node === 'object' && node[NODE_TYPE] === SCALAR;\nconst isSeq = (node) => !!node && typeof node === 'object' && node[NODE_TYPE] === SEQ;\nfunction isCollection(node) {\n    if (node && typeof node === 'object')\n        switch (node[NODE_TYPE]) {\n            case MAP:\n            case SEQ:\n                return true;\n        }\n    return false;\n}\nfunction isNode(node) {\n    if (node && typeof node === 'object')\n        switch (node[NODE_TYPE]) {\n            case ALIAS:\n            case MAP:\n            case SCALAR:\n            case SEQ:\n                return true;\n        }\n    return false;\n}\nconst hasAnchor = (node) => (isScalar(node) || isCollection(node)) && !!node.anchor;\n\nexports.ALIAS = ALIAS;\nexports.DOC = DOC;\nexports.MAP = MAP;\nexports.NODE_TYPE = NODE_TYPE;\nexports.PAIR = PAIR;\nexports.SCALAR = SCALAR;\nexports.SEQ = SEQ;\nexports.hasAnchor = hasAnchor;\nexports.isAlias = isAlias;\nexports.isCollection = isCollection;\nexports.isDocument = isDocument;\nexports.isMap = isMap;\nexports.isNode = isNode;\nexports.isPair = isPair;\nexports.isScalar = isScalar;\nexports.isSeq = isSeq;\n","'use strict';\n\nvar identity = require('./nodes/identity.js');\n\nconst BREAK = Symbol('break visit');\nconst SKIP = Symbol('skip children');\nconst REMOVE = Symbol('remove node');\n/**\n * Apply a visitor to an AST node or document.\n *\n * Walks through the tree (depth-first) starting from `node`, calling a\n * `visitor` function with three arguments:\n *   - `key`: For sequence values and map `Pair`, the node's index in the\n *     collection. Within a `Pair`, `'key'` or `'value'`, correspondingly.\n *     `null` for the root node.\n *   - `node`: The current node.\n *   - `path`: The ancestry of the current node.\n *\n * The return value of the visitor may be used to control the traversal:\n *   - `undefined` (default): Do nothing and continue\n *   - `visit.SKIP`: Do not visit the children of this node, continue with next\n *     sibling\n *   - `visit.BREAK`: Terminate traversal completely\n *   - `visit.REMOVE`: Remove the current node, then continue with the next one\n *   - `Node`: Replace the current node, then continue by visiting it\n *   - `number`: While iterating the items of a sequence or map, set the index\n *     of the next step. This is useful especially if the index of the current\n *     node has changed.\n *\n * If `visitor` is a single function, it will be called with all values\n * encountered in the tree, including e.g. `null` values. Alternatively,\n * separate visitor functions may be defined for each `Map`, `Pair`, `Seq`,\n * `Alias` and `Scalar` node. To define the same visitor function for more than\n * one node type, use the `Collection` (map and seq), `Value` (map, seq & scalar)\n * and `Node` (alias, map, seq & scalar) targets. Of all these, only the most\n * specific defined one will be used for each node.\n */\nfunction visit(node, visitor) {\n    const visitor_ = initVisitor(visitor);\n    if (identity.isDocument(node)) {\n        const cd = visit_(null, node.contents, visitor_, Object.freeze([node]));\n        if (cd === REMOVE)\n            node.contents = null;\n    }\n    else\n        visit_(null, node, visitor_, Object.freeze([]));\n}\n// Without the `as symbol` casts, TS declares these in the `visit`\n// namespace using `var`, but then complains about that because\n// `unique symbol` must be `const`.\n/** Terminate visit traversal completely */\nvisit.BREAK = BREAK;\n/** Do not visit the children of the current node */\nvisit.SKIP = SKIP;\n/** Remove the current node */\nvisit.REMOVE = REMOVE;\nfunction visit_(key, node, visitor, path) {\n    const ctrl = callVisitor(key, node, visitor, path);\n    if (identity.isNode(ctrl) || identity.isPair(ctrl)) {\n        replaceNode(key, path, ctrl);\n        return visit_(key, ctrl, visitor, path);\n    }\n    if (typeof ctrl !== 'symbol') {\n        if (identity.isCollection(node)) {\n            path = Object.freeze(path.concat(node));\n            for (let i = 0; i < node.items.length; ++i) {\n                const ci = visit_(i, node.items[i], visitor, path);\n                if (typeof ci === 'number')\n                    i = ci - 1;\n                else if (ci === BREAK)\n                    return BREAK;\n                else if (ci === REMOVE) {\n                    node.items.splice(i, 1);\n                    i -= 1;\n                }\n            }\n        }\n        else if (identity.isPair(node)) {\n            path = Object.freeze(path.concat(node));\n            const ck = visit_('key', node.key, visitor, path);\n            if (ck === BREAK)\n                return BREAK;\n            else if (ck === REMOVE)\n                node.key = null;\n            const cv = visit_('value', node.value, visitor, path);\n            if (cv === BREAK)\n                return BREAK;\n            else if (cv === REMOVE)\n                node.value = null;\n        }\n    }\n    return ctrl;\n}\n/**\n * Apply an async visitor to an AST node or document.\n *\n * Walks through the tree (depth-first) starting from `node`, calling a\n * `visitor` function with three arguments:\n *   - `key`: For sequence values and map `Pair`, the node's index in the\n *     collection. Within a `Pair`, `'key'` or `'value'`, correspondingly.\n *     `null` for the root node.\n *   - `node`: The current node.\n *   - `path`: The ancestry of the current node.\n *\n * The return value of the visitor may be used to control the traversal:\n *   - `Promise`: Must resolve to one of the following values\n *   - `undefined` (default): Do nothing and continue\n *   - `visit.SKIP`: Do not visit the children of this node, continue with next\n *     sibling\n *   - `visit.BREAK`: Terminate traversal completely\n *   - `visit.REMOVE`: Remove the current node, then continue with the next one\n *   - `Node`: Replace the current node, then continue by visiting it\n *   - `number`: While iterating the items of a sequence or map, set the index\n *     of the next step. This is useful especially if the index of the current\n *     node has changed.\n *\n * If `visitor` is a single function, it will be called with all values\n * encountered in the tree, including e.g. `null` values. Alternatively,\n * separate visitor functions may be defined for each `Map`, `Pair`, `Seq`,\n * `Alias` and `Scalar` node. To define the same visitor function for more than\n * one node type, use the `Collection` (map and seq), `Value` (map, seq & scalar)\n * and `Node` (alias, map, seq & scalar) targets. Of all these, only the most\n * specific defined one will be used for each node.\n */\nasync function visitAsync(node, visitor) {\n    const visitor_ = initVisitor(visitor);\n    if (identity.isDocument(node)) {\n        const cd = await visitAsync_(null, node.contents, visitor_, Object.freeze([node]));\n        if (cd === REMOVE)\n            node.contents = null;\n    }\n    else\n        await visitAsync_(null, node, visitor_, Object.freeze([]));\n}\n// Without the `as symbol` casts, TS declares these in the `visit`\n// namespace using `var`, but then complains about that because\n// `unique symbol` must be `const`.\n/** Terminate visit traversal completely */\nvisitAsync.BREAK = BREAK;\n/** Do not visit the children of the current node */\nvisitAsync.SKIP = SKIP;\n/** Remove the current node */\nvisitAsync.REMOVE = REMOVE;\nasync function visitAsync_(key, node, visitor, path) {\n    const ctrl = await callVisitor(key, node, visitor, path);\n    if (identity.isNode(ctrl) || identity.isPair(ctrl)) {\n        replaceNode(key, path, ctrl);\n        return visitAsync_(key, ctrl, visitor, path);\n    }\n    if (typeof ctrl !== 'symbol') {\n        if (identity.isCollection(node)) {\n            path = Object.freeze(path.concat(node));\n            for (let i = 0; i < node.items.length; ++i) {\n                const ci = await visitAsync_(i, node.items[i], visitor, path);\n                if (typeof ci === 'number')\n                    i = ci - 1;\n                else if (ci === BREAK)\n                    return BREAK;\n                else if (ci === REMOVE) {\n                    node.items.splice(i, 1);\n                    i -= 1;\n                }\n            }\n        }\n        else if (identity.isPair(node)) {\n            path = Object.freeze(path.concat(node));\n            const ck = await visitAsync_('key', node.key, visitor, path);\n            if (ck === BREAK)\n                return BREAK;\n            else if (ck === REMOVE)\n                node.key = null;\n            const cv = await visitAsync_('value', node.value, visitor, path);\n            if (cv === BREAK)\n                return BREAK;\n            else if (cv === REMOVE)\n                node.value = null;\n        }\n    }\n    return ctrl;\n}\nfunction initVisitor(visitor) {\n    if (typeof visitor === 'object' &&\n        (visitor.Collection || visitor.Node || visitor.Value)) {\n        return Object.assign({\n            Alias: visitor.Node,\n            Map: visitor.Node,\n            Scalar: visitor.Node,\n            Seq: visitor.Node\n        }, visitor.Value && {\n            Map: visitor.Value,\n            Scalar: visitor.Value,\n            Seq: visitor.Value\n        }, visitor.Collection && {\n            Map: visitor.Collection,\n            Seq: visitor.Collection\n        }, visitor);\n    }\n    return visitor;\n}\nfunction callVisitor(key, node, visitor, path) {\n    if (typeof visitor === 'function')\n        return visitor(key, node, path);\n    if (identity.isMap(node))\n        return visitor.Map?.(key, node, path);\n    if (identity.isSeq(node))\n        return visitor.Seq?.(key, node, path);\n    if (identity.isPair(node))\n        return visitor.Pair?.(key, node, path);\n    if (identity.isScalar(node))\n        return visitor.Scalar?.(key, node, path);\n    if (identity.isAlias(node))\n        return visitor.Alias?.(key, node, path);\n    return undefined;\n}\nfunction replaceNode(key, path, node) {\n    const parent = path[path.length - 1];\n    if (identity.isCollection(parent)) {\n        parent.items[key] = node;\n    }\n    else if (identity.isPair(parent)) {\n        if (key === 'key')\n            parent.key = node;\n        else\n            parent.value = node;\n    }\n    else if (identity.isDocument(parent)) {\n        parent.contents = node;\n    }\n    else {\n        const pt = identity.isAlias(parent) ? 'alias' : 'scalar';\n        throw new Error(`Cannot replace node with ${pt} parent`);\n    }\n}\n\nexports.visit = visit;\nexports.visitAsync = visitAsync;\n","'use strict';\n\nvar identity = require('../nodes/identity.js');\nvar visit = require('../visit.js');\n\nconst escapeChars = {\n    '!': '%21',\n    ',': '%2C',\n    '[': '%5B',\n    ']': '%5D',\n    '{': '%7B',\n    '}': '%7D'\n};\nconst escapeTagName = (tn) => tn.replace(/[!,[\\]{}]/g, ch => escapeChars[ch]);\nclass Directives {\n    constructor(yaml, tags) {\n        /**\n         * The directives-end/doc-start marker `---`. If `null`, a marker may still be\n         * included in the document's stringified representation.\n         */\n        this.docStart = null;\n        /** The doc-end marker `...`.  */\n        this.docEnd = false;\n        this.yaml = Object.assign({}, Directives.defaultYaml, yaml);\n        this.tags = Object.assign({}, Directives.defaultTags, tags);\n    }\n    clone() {\n        const copy = new Directives(this.yaml, this.tags);\n        copy.docStart = this.docStart;\n        return copy;\n    }\n    /**\n     * During parsing, get a Directives instance for the current document and\n     * update the stream state according to the current version's spec.\n     */\n    atDocument() {\n        const res = new Directives(this.yaml, this.tags);\n        switch (this.yaml.version) {\n            case '1.1':\n                this.atNextDocument = true;\n                break;\n            case '1.2':\n                this.atNextDocument = false;\n                this.yaml = {\n                    explicit: Directives.defaultYaml.explicit,\n                    version: '1.2'\n                };\n                this.tags = Object.assign({}, Directives.defaultTags);\n                break;\n        }\n        return res;\n    }\n    /**\n     * @param onError - May be called even if the action was successful\n     * @returns `true` on success\n     */\n    add(line, onError) {\n        if (this.atNextDocument) {\n            this.yaml = { explicit: Directives.defaultYaml.explicit, version: '1.1' };\n            this.tags = Object.assign({}, Directives.defaultTags);\n            this.atNextDocument = false;\n        }\n        const parts = line.trim().split(/[ \\t]+/);\n        const name = parts.shift();\n        switch (name) {\n            case '%TAG': {\n                if (parts.length !== 2) {\n                    onError(0, '%TAG directive should contain exactly two parts');\n                    if (parts.length < 2)\n                        return false;\n                }\n                const [handle, prefix] = parts;\n                this.tags[handle] = prefix;\n                return true;\n            }\n            case '%YAML': {\n                this.yaml.explicit = true;\n                if (parts.length !== 1) {\n                    onError(0, '%YAML directive should contain exactly one part');\n                    return false;\n                }\n                const [version] = parts;\n                if (version === '1.1' || version === '1.2') {\n                    this.yaml.version = version;\n                    return true;\n                }\n                else {\n                    const isValid = /^\\d+\\.\\d+$/.test(version);\n                    onError(6, `Unsupported YAML version ${version}`, isValid);\n                    return false;\n                }\n            }\n            default:\n                onError(0, `Unknown directive ${name}`, true);\n                return false;\n        }\n    }\n    /**\n     * Resolves a tag, matching handles to those defined in %TAG directives.\n     *\n     * @returns Resolved tag, which may also be the non-specific tag `'!'` or a\n     *   `'!local'` tag, or `null` if unresolvable.\n     */\n    tagName(source, onError) {\n        if (source === '!')\n            return '!'; // non-specific tag\n        if (source[0] !== '!') {\n            onError(`Not a valid tag: ${source}`);\n            return null;\n        }\n        if (source[1] === '<') {\n            const verbatim = source.slice(2, -1);\n            if (verbatim === '!' || verbatim === '!!') {\n                onError(`Verbatim tags aren't resolved, so ${source} is invalid.`);\n                return null;\n            }\n            if (source[source.length - 1] !== '>')\n                onError('Verbatim tags must end with a >');\n            return verbatim;\n        }\n        const [, handle, suffix] = source.match(/^(.*!)([^!]*)$/s);\n        if (!suffix)\n            onError(`The ${source} tag has no suffix`);\n        const prefix = this.tags[handle];\n        if (prefix) {\n            try {\n                return prefix + decodeURIComponent(suffix);\n            }\n            catch (error) {\n                onError(String(error));\n                return null;\n            }\n        }\n        if (handle === '!')\n            return source; // local tag\n        onError(`Could not resolve tag: ${source}`);\n        return null;\n    }\n    /**\n     * Given a fully resolved tag, returns its printable string form,\n     * taking into account current tag prefixes and defaults.\n     */\n    tagString(tag) {\n        for (const [handle, prefix] of Object.entries(this.tags)) {\n            if (tag.startsWith(prefix))\n                return handle + escapeTagName(tag.substring(prefix.length));\n        }\n        return tag[0] === '!' ? tag : `!<${tag}>`;\n    }\n    toString(doc) {\n        const lines = this.yaml.explicit\n            ? [`%YAML ${this.yaml.version || '1.2'}`]\n            : [];\n        const tagEntries = Object.entries(this.tags);\n        let tagNames;\n        if (doc && tagEntries.length > 0 && identity.isNode(doc.contents)) {\n            const tags = {};\n            visit.visit(doc.contents, (_key, node) => {\n                if (identity.isNode(node) && node.tag)\n                    tags[node.tag] = true;\n            });\n            tagNames = Object.keys(tags);\n        }\n        else\n            tagNames = [];\n        for (const [handle, prefix] of tagEntries) {\n            if (handle === '!!' && prefix === 'tag:yaml.org,2002:')\n                continue;\n            if (!doc || tagNames.some(tn => tn.startsWith(prefix)))\n                lines.push(`%TAG ${handle} ${prefix}`);\n        }\n        return lines.join('\\n');\n    }\n}\nDirectives.defaultYaml = { explicit: false, version: '1.2' };\nDirectives.defaultTags = { '!!': 'tag:yaml.org,2002:' };\n\nexports.Directives = Directives;\n","'use strict';\n\nvar identity = require('../nodes/identity.js');\nvar visit = require('../visit.js');\n\n/**\n * Verify that the input string is a valid anchor.\n *\n * Will throw on errors.\n */\nfunction anchorIsValid(anchor) {\n    if (/[\\x00-\\x19\\s,[\\]{}]/.test(anchor)) {\n        const sa = JSON.stringify(anchor);\n        const msg = `Anchor must not contain whitespace or control characters: ${sa}`;\n        throw new Error(msg);\n    }\n    return true;\n}\nfunction anchorNames(root) {\n    const anchors = new Set();\n    visit.visit(root, {\n        Value(_key, node) {\n            if (node.anchor)\n                anchors.add(node.anchor);\n        }\n    });\n    return anchors;\n}\n/** Find a new anchor name with the given `prefix` and a one-indexed suffix. */\nfunction findNewAnchor(prefix, exclude) {\n    for (let i = 1; true; ++i) {\n        const name = `${prefix}${i}`;\n        if (!exclude.has(name))\n            return name;\n    }\n}\nfunction createNodeAnchors(doc, prefix) {\n    const aliasObjects = [];\n    const sourceObjects = new Map();\n    let prevAnchors = null;\n    return {\n        onAnchor: (source) => {\n            aliasObjects.push(source);\n            prevAnchors ?? (prevAnchors = anchorNames(doc));\n            const anchor = findNewAnchor(prefix, prevAnchors);\n            prevAnchors.add(anchor);\n            return anchor;\n        },\n        /**\n         * With circular references, the source node is only resolved after all\n         * of its child nodes are. This is why anchors are set only after all of\n         * the nodes have been created.\n         */\n        setAnchors: () => {\n            for (const source of aliasObjects) {\n                const ref = sourceObjects.get(source);\n                if (typeof ref === 'object' &&\n                    ref.anchor &&\n                    (identity.isScalar(ref.node) || identity.isCollection(ref.node))) {\n                    ref.node.anchor = ref.anchor;\n                }\n                else {\n                    const error = new Error('Failed to resolve repeated object (this should not happen)');\n                    error.source = source;\n                    throw error;\n                }\n            }\n        },\n        sourceObjects\n    };\n}\n\nexports.anchorIsValid = anchorIsValid;\nexports.anchorNames = anchorNames;\nexports.createNodeAnchors = createNodeAnchors;\nexports.findNewAnchor = findNewAnchor;\n","'use strict';\n\n/**\n * Applies the JSON.parse reviver algorithm as defined in the ECMA-262 spec,\n * in section 24.5.1.1 \"Runtime Semantics: InternalizeJSONProperty\" of the\n * 2021 edition: https://tc39.es/ecma262/#sec-json.parse\n *\n * Includes extensions for handling Map and Set objects.\n */\nfunction applyReviver(reviver, obj, key, val) {\n    if (val && typeof val === 'object') {\n        if (Array.isArray(val)) {\n            for (let i = 0, len = val.length; i < len; ++i) {\n                const v0 = val[i];\n                const v1 = applyReviver(reviver, val, String(i), v0);\n                // eslint-disable-next-line @typescript-eslint/no-array-delete\n                if (v1 === undefined)\n                    delete val[i];\n                else if (v1 !== v0)\n                    val[i] = v1;\n            }\n        }\n        else if (val instanceof Map) {\n            for (const k of Array.from(val.keys())) {\n                const v0 = val.get(k);\n                const v1 = applyReviver(reviver, val, k, v0);\n                if (v1 === undefined)\n                    val.delete(k);\n                else if (v1 !== v0)\n                    val.set(k, v1);\n            }\n        }\n        else if (val instanceof Set) {\n            for (const v0 of Array.from(val)) {\n                const v1 = applyReviver(reviver, val, v0, v0);\n                if (v1 === undefined)\n                    val.delete(v0);\n                else if (v1 !== v0) {\n                    val.delete(v0);\n                    val.add(v1);\n                }\n            }\n        }\n        else {\n            for (const [k, v0] of Object.entries(val)) {\n                const v1 = applyReviver(reviver, val, k, v0);\n                if (v1 === undefined)\n                    delete val[k];\n                else if (v1 !== v0)\n                    val[k] = v1;\n            }\n        }\n    }\n    return reviver.call(obj, key, val);\n}\n\nexports.applyReviver = applyReviver;\n","'use strict';\n\nvar identity = require('./identity.js');\n\n/**\n * Recursively convert any node or its contents to native JavaScript\n *\n * @param value - The input value\n * @param arg - If `value` defines a `toJSON()` method, use this\n *   as its first argument\n * @param ctx - Conversion context, originally set in Document#toJS(). If\n *   `{ keep: true }` is not set, output should be suitable for JSON\n *   stringification.\n */\nfunction toJS(value, arg, ctx) {\n    // eslint-disable-next-line @typescript-eslint/no-unsafe-return\n    if (Array.isArray(value))\n        return value.map((v, i) => toJS(v, String(i), ctx));\n    if (value && typeof value.toJSON === 'function') {\n        // eslint-disable-next-line @typescript-eslint/no-unsafe-call\n        if (!ctx || !identity.hasAnchor(value))\n            return value.toJSON(arg, ctx);\n        const data = { aliasCount: 0, count: 1, res: undefined };\n        ctx.anchors.set(value, data);\n        ctx.onCreate = res => {\n            data.res = res;\n            delete ctx.onCreate;\n        };\n        const res = value.toJSON(arg, ctx);\n        if (ctx.onCreate)\n            ctx.onCreate(res);\n        return res;\n    }\n    if (typeof value === 'bigint' && !ctx?.keep)\n        return Number(value);\n    return value;\n}\n\nexports.toJS = toJS;\n","'use strict';\n\nvar applyReviver = require('../doc/applyReviver.js');\nvar identity = require('./identity.js');\nvar toJS = require('./toJS.js');\n\nclass NodeBase {\n    constructor(type) {\n        Object.defineProperty(this, identity.NODE_TYPE, { value: type });\n    }\n    /** Create a copy of this node.  */\n    clone() {\n        const copy = Object.create(Object.getPrototypeOf(this), Object.getOwnPropertyDescriptors(this));\n        if (this.range)\n            copy.range = this.range.slice();\n        return copy;\n    }\n    /** A plain JavaScript representation of this node. */\n    toJS(doc, { mapAsMap, maxAliasCount, onAnchor, reviver } = {}) {\n        if (!identity.isDocument(doc))\n            throw new TypeError('A document argument is required');\n        const ctx = {\n            anchors: new Map(),\n            doc,\n            keep: true,\n            mapAsMap: mapAsMap === true,\n            mapKeyWarned: false,\n            maxAliasCount: typeof maxAliasCount === 'number' ? maxAliasCount : 100\n        };\n        const res = toJS.toJS(this, '', ctx);\n        if (typeof onAnchor === 'function')\n            for (const { count, res } of ctx.anchors.values())\n                onAnchor(res, count);\n        return typeof reviver === 'function'\n            ? applyReviver.applyReviver(reviver, { '': res }, '', res)\n            : res;\n    }\n}\n\nexports.NodeBase = NodeBase;\n","'use strict';\n\nvar anchors = require('../doc/anchors.js');\nvar visit = require('../visit.js');\nvar identity = require('./identity.js');\nvar Node = require('./Node.js');\nvar toJS = require('./toJS.js');\n\nclass Alias extends Node.NodeBase {\n    constructor(source) {\n        super(identity.ALIAS);\n        this.source = source;\n        Object.defineProperty(this, 'tag', {\n            set() {\n                throw new Error('Alias nodes cannot have tags');\n            }\n        });\n    }\n    /**\n     * Resolve the value of this alias within `doc`, finding the last\n     * instance of the `source` anchor before this node.\n     */\n    resolve(doc, ctx) {\n        if (ctx?.maxAliasCount === 0)\n            throw new ReferenceError('Alias resolution is disabled');\n        let nodes;\n        if (ctx?.aliasResolveCache) {\n            nodes = ctx.aliasResolveCache;\n        }\n        else {\n            nodes = [];\n            visit.visit(doc, {\n                Node: (_key, node) => {\n                    if (identity.isAlias(node) || identity.hasAnchor(node))\n                        nodes.push(node);\n                }\n            });\n            if (ctx)\n                ctx.aliasResolveCache = nodes;\n        }\n        let found = undefined;\n        for (const node of nodes) {\n            if (node === this)\n                break;\n            if (node.anchor === this.source)\n                found = node;\n        }\n        if (found && ctx) {\n            const { anchors, doc, maxAliasCount } = ctx;\n            let data = anchors.get(found);\n            if (!data) {\n                // Resolve anchors for Node.prototype.toJS()\n                toJS.toJS(found, null, ctx);\n                data = anchors.get(found);\n            }\n            /* istanbul ignore if */\n            if (data?.res === undefined) {\n                const msg = 'This should not happen: Alias anchor was not resolved?';\n                throw new ReferenceError(msg);\n            }\n            if (maxAliasCount >= 0) {\n                data.count += 1;\n                if (data.aliasCount === 0)\n                    data.aliasCount = getAliasCount(doc, found, anchors);\n                if (data.count * data.aliasCount > maxAliasCount) {\n                    const msg = 'Excessive alias count indicates a resource exhaustion attack';\n                    throw new ReferenceError(msg);\n                }\n            }\n        }\n        return found;\n    }\n    toJSON(_arg, ctx) {\n        if (!ctx)\n            return { source: this.source };\n        const source = this.resolve(ctx.doc, ctx);\n        if (!source) {\n            const msg = `Unresolved alias (the anchor must be set before the alias): ${this.source}`;\n            throw new ReferenceError(msg);\n        }\n        return ctx.anchors.get(source).res;\n    }\n    toString(ctx, _onComment, _onChompKeep) {\n        const src = `*${this.source}`;\n        if (ctx) {\n            anchors.anchorIsValid(this.source);\n            if (ctx.options.verifyAliasOrder && !ctx.anchors.has(this.source)) {\n                const msg = `Unresolved alias (the anchor must be set before the alias): ${this.source}`;\n                throw new Error(msg);\n            }\n            if (ctx.implicitKey)\n                return `${src} `;\n        }\n        return src;\n    }\n}\nfunction getAliasCount(doc, node, anchors) {\n    if (identity.isAlias(node)) {\n        const source = node.resolve(doc);\n        const anchor = anchors && source && anchors.get(source);\n        return anchor ? anchor.count * anchor.aliasCount : 0;\n    }\n    else if (identity.isCollection(node)) {\n        let count = 0;\n        for (const item of node.items) {\n            const c = getAliasCount(doc, item, anchors);\n            if (c > count)\n                count = c;\n        }\n        return count;\n    }\n    else if (identity.isPair(node)) {\n        const kc = getAliasCount(doc, node.key, anchors);\n        const vc = getAliasCount(doc, node.value, anchors);\n        return Math.max(kc, vc);\n    }\n    return 1;\n}\n\nexports.Alias = Alias;\n","'use strict';\n\nvar identity = require('./identity.js');\nvar Node = require('./Node.js');\nvar toJS = require('./toJS.js');\n\nconst isScalarValue = (value) => !value || (typeof value !== 'function' && typeof value !== 'object');\nclass Scalar extends Node.NodeBase {\n    constructor(value) {\n        super(identity.SCALAR);\n        this.value = value;\n    }\n    toJSON(arg, ctx) {\n        return ctx?.keep ? this.value : toJS.toJS(this.value, arg, ctx);\n    }\n    toString() {\n        return String(this.value);\n    }\n}\nScalar.BLOCK_FOLDED = 'BLOCK_FOLDED';\nScalar.BLOCK_LITERAL = 'BLOCK_LITERAL';\nScalar.PLAIN = 'PLAIN';\nScalar.QUOTE_DOUBLE = 'QUOTE_DOUBLE';\nScalar.QUOTE_SINGLE = 'QUOTE_SINGLE';\n\nexports.Scalar = Scalar;\nexports.isScalarValue = isScalarValue;\n","'use strict';\n\nvar Alias = require('../nodes/Alias.js');\nvar identity = require('../nodes/identity.js');\nvar Scalar = require('../nodes/Scalar.js');\n\nconst defaultTagPrefix = 'tag:yaml.org,2002:';\nfunction findTagObject(value, tagName, tags) {\n    if (tagName) {\n        const match = tags.filter(t => t.tag === tagName);\n        const tagObj = match.find(t => !t.format) ?? match[0];\n        if (!tagObj)\n            throw new Error(`Tag ${tagName} not found`);\n        return tagObj;\n    }\n    return tags.find(t => t.identify?.(value) && !t.format);\n}\nfunction createNode(value, tagName, ctx) {\n    if (identity.isDocument(value))\n        value = value.contents;\n    if (identity.isNode(value))\n        return value;\n    if (identity.isPair(value)) {\n        const map = ctx.schema[identity.MAP].createNode?.(ctx.schema, null, ctx);\n        map.items.push(value);\n        return map;\n    }\n    if (value instanceof String ||\n        value instanceof Number ||\n        value instanceof Boolean ||\n        (typeof BigInt !== 'undefined' && value instanceof BigInt) // not supported everywhere\n    ) {\n        // https://tc39.es/ecma262/#sec-serializejsonproperty\n        value = value.valueOf();\n    }\n    const { aliasDuplicateObjects, onAnchor, onTagObj, schema, sourceObjects } = ctx;\n    // Detect duplicate references to the same object & use Alias nodes for all\n    // after first. The `ref` wrapper allows for circular references to resolve.\n    let ref = undefined;\n    if (aliasDuplicateObjects && value && typeof value === 'object') {\n        ref = sourceObjects.get(value);\n        if (ref) {\n            ref.anchor ?? (ref.anchor = onAnchor(value));\n            return new Alias.Alias(ref.anchor);\n        }\n        else {\n            ref = { anchor: null, node: null };\n            sourceObjects.set(value, ref);\n        }\n    }\n    if (tagName?.startsWith('!!'))\n        tagName = defaultTagPrefix + tagName.slice(2);\n    let tagObj = findTagObject(value, tagName, schema.tags);\n    if (!tagObj) {\n        if (value && typeof value.toJSON === 'function') {\n            // eslint-disable-next-line @typescript-eslint/no-unsafe-call\n            value = value.toJSON();\n        }\n        if (!value || typeof value !== 'object') {\n            const node = new Scalar.Scalar(value);\n            if (ref)\n                ref.node = node;\n            return node;\n        }\n        tagObj =\n            value instanceof Map\n                ? schema[identity.MAP]\n                : Symbol.iterator in Object(value)\n                    ? schema[identity.SEQ]\n                    : schema[identity.MAP];\n    }\n    if (onTagObj) {\n        onTagObj(tagObj);\n        delete ctx.onTagObj;\n    }\n    const node = tagObj?.createNode\n        ? tagObj.createNode(ctx.schema, value, ctx)\n        : typeof tagObj?.nodeClass?.from === 'function'\n            ? tagObj.nodeClass.from(ctx.schema, value, ctx)\n            : new Scalar.Scalar(value);\n    if (tagName)\n        node.tag = tagName;\n    else if (!tagObj.default)\n        node.tag = tagObj.tag;\n    if (ref)\n        ref.node = node;\n    return node;\n}\n\nexports.createNode = createNode;\n","'use strict';\n\nvar createNode = require('../doc/createNode.js');\nvar identity = require('./identity.js');\nvar Node = require('./Node.js');\n\nfunction collectionFromPath(schema, path, value) {\n    let v = value;\n    for (let i = path.length - 1; i >= 0; --i) {\n        const k = path[i];\n        if (typeof k === 'number' && Number.isInteger(k) && k >= 0) {\n            const a = [];\n            a[k] = v;\n            v = a;\n        }\n        else {\n            v = new Map([[k, v]]);\n        }\n    }\n    return createNode.createNode(v, undefined, {\n        aliasDuplicateObjects: false,\n        keepUndefined: false,\n        onAnchor: () => {\n            throw new Error('This should not happen, please report a bug.');\n        },\n        schema,\n        sourceObjects: new Map()\n    });\n}\n// Type guard is intentionally a little wrong so as to be more useful,\n// as it does not cover untypable empty non-string iterables (e.g. []).\nconst isEmptyPath = (path) => path == null ||\n    (typeof path === 'object' && !!path[Symbol.iterator]().next().done);\nclass Collection extends Node.NodeBase {\n    constructor(type, schema) {\n        super(type);\n        Object.defineProperty(this, 'schema', {\n            value: schema,\n            configurable: true,\n            enumerable: false,\n            writable: true\n        });\n    }\n    /**\n     * Create a copy of this collection.\n     *\n     * @param schema - If defined, overwrites the original's schema\n     */\n    clone(schema) {\n        const copy = Object.create(Object.getPrototypeOf(this), Object.getOwnPropertyDescriptors(this));\n        if (schema)\n            copy.schema = schema;\n        copy.items = copy.items.map(it => identity.isNode(it) || identity.isPair(it) ? it.clone(schema) : it);\n        if (this.range)\n            copy.range = this.range.slice();\n        return copy;\n    }\n    /**\n     * Adds a value to the collection. For `!!map` and `!!omap` the value must\n     * be a Pair instance or a `{ key, value }` object, which may not have a key\n     * that already exists in the map.\n     */\n    addIn(path, value) {\n        if (isEmptyPath(path))\n            this.add(value);\n        else {\n            const [key, ...rest] = path;\n            const node = this.get(key, true);\n            if (identity.isCollection(node))\n                node.addIn(rest, value);\n            else if (node === undefined && this.schema)\n                this.set(key, collectionFromPath(this.schema, rest, value));\n            else\n                throw new Error(`Expected YAML collection at ${key}. Remaining path: ${rest}`);\n        }\n    }\n    /**\n     * Removes a value from the collection.\n     * @returns `true` if the item was found and removed.\n     */\n    deleteIn(path) {\n        const [key, ...rest] = path;\n        if (rest.length === 0)\n            return this.delete(key);\n        const node = this.get(key, true);\n        if (identity.isCollection(node))\n            return node.deleteIn(rest);\n        else\n            throw new Error(`Expected YAML collection at ${key}. Remaining path: ${rest}`);\n    }\n    /**\n     * Returns item at `key`, or `undefined` if not found. By default unwraps\n     * scalar values from their surrounding node; to disable set `keepScalar` to\n     * `true` (collections are always returned intact).\n     */\n    getIn(path, keepScalar) {\n        const [key, ...rest] = path;\n        const node = this.get(key, true);\n        if (rest.length === 0)\n            return !keepScalar && identity.isScalar(node) ? node.value : node;\n        else\n            return identity.isCollection(node) ? node.getIn(rest, keepScalar) : undefined;\n    }\n    hasAllNullValues(allowScalar) {\n        return this.items.every(node => {\n            if (!identity.isPair(node))\n                return false;\n            const n = node.value;\n            return (n == null ||\n                (allowScalar &&\n                    identity.isScalar(n) &&\n                    n.value == null &&\n                    !n.commentBefore &&\n                    !n.comment &&\n                    !n.tag));\n        });\n    }\n    /**\n     * Checks if the collection includes a value with the key `key`.\n     */\n    hasIn(path) {\n        const [key, ...rest] = path;\n        if (rest.length === 0)\n            return this.has(key);\n        const node = this.get(key, true);\n        return identity.isCollection(node) ? node.hasIn(rest) : false;\n    }\n    /**\n     * Sets a value in this collection. For `!!set`, `value` needs to be a\n     * boolean to add/remove the item from the set.\n     */\n    setIn(path, value) {\n        const [key, ...rest] = path;\n        if (rest.length === 0) {\n            this.set(key, value);\n        }\n        else {\n            const node = this.get(key, true);\n            if (identity.isCollection(node))\n                node.setIn(rest, value);\n            else if (node === undefined && this.schema)\n                this.set(key, collectionFromPath(this.schema, rest, value));\n            else\n                throw new Error(`Expected YAML collection at ${key}. Remaining path: ${rest}`);\n        }\n    }\n}\n\nexports.Collection = Collection;\nexports.collectionFromPath = collectionFromPath;\nexports.isEmptyPath = isEmptyPath;\n","'use strict';\n\n/**\n * Stringifies a comment.\n *\n * Empty comment lines are left empty,\n * lines consisting of a single space are replaced by `#`,\n * and all other lines are prefixed with a `#`.\n */\nconst stringifyComment = (str) => str.replace(/^(?!$)(?: $)?/gm, '#');\nfunction indentComment(comment, indent) {\n    if (/^\\n+$/.test(comment))\n        return comment.substring(1);\n    return indent ? comment.replace(/^(?! *$)/gm, indent) : comment;\n}\nconst lineComment = (str, indent, comment) => str.endsWith('\\n')\n    ? indentComment(comment, indent)\n    : comment.includes('\\n')\n        ? '\\n' + indentComment(comment, indent)\n        : (str.endsWith(' ') ? '' : ' ') + comment;\n\nexports.indentComment = indentComment;\nexports.lineComment = lineComment;\nexports.stringifyComment = stringifyComment;\n","'use strict';\n\nconst FOLD_FLOW = 'flow';\nconst FOLD_BLOCK = 'block';\nconst FOLD_QUOTED = 'quoted';\n/**\n * Tries to keep input at up to `lineWidth` characters, splitting only on spaces\n * not followed by newlines or spaces unless `mode` is `'quoted'`. Lines are\n * terminated with `\\n` and started with `indent`.\n */\nfunction foldFlowLines(text, indent, mode = 'flow', { indentAtStart, lineWidth = 80, minContentWidth = 20, onFold, onOverflow } = {}) {\n    if (!lineWidth || lineWidth < 0)\n        return text;\n    if (lineWidth < minContentWidth)\n        minContentWidth = 0;\n    const endStep = Math.max(1 + minContentWidth, 1 + lineWidth - indent.length);\n    if (text.length <= endStep)\n        return text;\n    const folds = [];\n    const escapedFolds = {};\n    let end = lineWidth - indent.length;\n    if (typeof indentAtStart === 'number') {\n        if (indentAtStart > lineWidth - Math.max(2, minContentWidth))\n            folds.push(0);\n        else\n            end = lineWidth - indentAtStart;\n    }\n    let split = undefined;\n    let prev = undefined;\n    let overflow = false;\n    let i = -1;\n    let escStart = -1;\n    let escEnd = -1;\n    if (mode === FOLD_BLOCK) {\n        i = consumeMoreIndentedLines(text, i, indent.length);\n        if (i !== -1)\n            end = i + endStep;\n    }\n    for (let ch; (ch = text[(i += 1)]);) {\n        if (mode === FOLD_QUOTED && ch === '\\\\') {\n            escStart = i;\n            switch (text[i + 1]) {\n                case 'x':\n                    i += 3;\n                    break;\n                case 'u':\n                    i += 5;\n                    break;\n                case 'U':\n                    i += 9;\n                    break;\n                default:\n                    i += 1;\n            }\n            escEnd = i;\n        }\n        if (ch === '\\n') {\n            if (mode === FOLD_BLOCK)\n                i = consumeMoreIndentedLines(text, i, indent.length);\n            end = i + indent.length + endStep;\n            split = undefined;\n        }\n        else {\n            if (ch === ' ' &&\n                prev &&\n                prev !== ' ' &&\n                prev !== '\\n' &&\n                prev !== '\\t') {\n                // space surrounded by non-space can be replaced with newline + indent\n                const next = text[i + 1];\n                if (next && next !== ' ' && next !== '\\n' && next !== '\\t')\n                    split = i;\n            }\n            if (i >= end) {\n                if (split) {\n                    folds.push(split);\n                    end = split + endStep;\n                    split = undefined;\n                }\n                else if (mode === FOLD_QUOTED) {\n                    // white-space collected at end may stretch past lineWidth\n                    while (prev === ' ' || prev === '\\t') {\n                        prev = ch;\n                        ch = text[(i += 1)];\n                        overflow = true;\n                    }\n                    // Account for newline escape, but don't break preceding escape\n                    const j = i > escEnd + 1 ? i - 2 : escStart - 1;\n                    // Bail out if lineWidth & minContentWidth are shorter than an escape string\n                    if (escapedFolds[j])\n                        return text;\n                    folds.push(j);\n                    escapedFolds[j] = true;\n                    end = j + endStep;\n                    split = undefined;\n                }\n                else {\n                    overflow = true;\n                }\n            }\n        }\n        prev = ch;\n    }\n    if (overflow && onOverflow)\n        onOverflow();\n    if (folds.length === 0)\n        return text;\n    if (onFold)\n        onFold();\n    let res = text.slice(0, folds[0]);\n    for (let i = 0; i < folds.length; ++i) {\n        const fold = folds[i];\n        const end = folds[i + 1] || text.length;\n        if (fold === 0)\n            res = `\\n${indent}${text.slice(0, end)}`;\n        else {\n            if (mode === FOLD_QUOTED && escapedFolds[fold])\n                res += `${text[fold]}\\\\`;\n            res += `\\n${indent}${text.slice(fold + 1, end)}`;\n        }\n    }\n    return res;\n}\n/**\n * Presumes `i + 1` is at the start of a line\n * @returns index of last newline in more-indented block\n */\nfunction consumeMoreIndentedLines(text, i, indent) {\n    let end = i;\n    let start = i + 1;\n    let ch = text[start];\n    while (ch === ' ' || ch === '\\t') {\n        if (i < start + indent) {\n            ch = text[++i];\n        }\n        else {\n            do {\n                ch = text[++i];\n            } while (ch && ch !== '\\n');\n            end = i;\n            start = i + 1;\n            ch = text[start];\n        }\n    }\n    return end;\n}\n\nexports.FOLD_BLOCK = FOLD_BLOCK;\nexports.FOLD_FLOW = FOLD_FLOW;\nexports.FOLD_QUOTED = FOLD_QUOTED;\nexports.foldFlowLines = foldFlowLines;\n","'use strict';\n\nvar Scalar = require('../nodes/Scalar.js');\nvar foldFlowLines = require('./foldFlowLines.js');\n\nconst getFoldOptions = (ctx, isBlock) => ({\n    indentAtStart: isBlock ? ctx.indent.length : ctx.indentAtStart,\n    lineWidth: ctx.options.lineWidth,\n    minContentWidth: ctx.options.minContentWidth\n});\n// Also checks for lines starting with %, as parsing the output as YAML 1.1 will\n// presume that's starting a new document.\nconst containsDocumentMarker = (str) => /^(%|---|\\.\\.\\.)/m.test(str);\nfunction lineLengthOverLimit(str, lineWidth, indentLength) {\n    if (!lineWidth || lineWidth < 0)\n        return false;\n    const limit = lineWidth - indentLength;\n    const strLen = str.length;\n    if (strLen <= limit)\n        return false;\n    for (let i = 0, start = 0; i < strLen; ++i) {\n        if (str[i] === '\\n') {\n            if (i - start > limit)\n                return true;\n            start = i + 1;\n            if (strLen - start <= limit)\n                return false;\n        }\n    }\n    return true;\n}\nfunction doubleQuotedString(value, ctx) {\n    const json = JSON.stringify(value);\n    if (ctx.options.doubleQuotedAsJSON)\n        return json;\n    const { implicitKey } = ctx;\n    const minMultiLineLength = ctx.options.doubleQuotedMinMultiLineLength;\n    const indent = ctx.indent || (containsDocumentMarker(value) ? '  ' : '');\n    let str = '';\n    let start = 0;\n    for (let i = 0, ch = json[i]; ch; ch = json[++i]) {\n        if (ch === ' ' && json[i + 1] === '\\\\' && json[i + 2] === 'n') {\n            // space before newline needs to be escaped to not be folded\n            str += json.slice(start, i) + '\\\\ ';\n            i += 1;\n            start = i;\n            ch = '\\\\';\n        }\n        if (ch === '\\\\')\n            switch (json[i + 1]) {\n                case 'u':\n                    {\n                        str += json.slice(start, i);\n                        const code = json.substr(i + 2, 4);\n                        switch (code) {\n                            case '0000':\n                                str += '\\\\0';\n                                break;\n                            case '0007':\n                                str += '\\\\a';\n                                break;\n                            case '000b':\n                                str += '\\\\v';\n                                break;\n                            case '001b':\n                                str += '\\\\e';\n                                break;\n                            case '0085':\n                                str += '\\\\N';\n                                break;\n                            case '00a0':\n                                str += '\\\\_';\n                                break;\n                            case '2028':\n                                str += '\\\\L';\n                                break;\n                            case '2029':\n                                str += '\\\\P';\n                                break;\n                            default:\n                                if (code.substr(0, 2) === '00')\n                                    str += '\\\\x' + code.substr(2);\n                                else\n                                    str += json.substr(i, 6);\n                        }\n                        i += 5;\n                        start = i + 1;\n                    }\n                    break;\n                case 'n':\n                    if (implicitKey ||\n                        json[i + 2] === '\"' ||\n                        json.length < minMultiLineLength) {\n                        i += 1;\n                    }\n                    else {\n                        // folding will eat first newline\n                        str += json.slice(start, i) + '\\n\\n';\n                        while (json[i + 2] === '\\\\' &&\n                            json[i + 3] === 'n' &&\n                            json[i + 4] !== '\"') {\n                            str += '\\n';\n                            i += 2;\n                        }\n                        str += indent;\n                        // space after newline needs to be escaped to not be folded\n                        if (json[i + 2] === ' ')\n                            str += '\\\\';\n                        i += 1;\n                        start = i + 1;\n                    }\n                    break;\n                default:\n                    i += 1;\n            }\n    }\n    str = start ? str + json.slice(start) : json;\n    return implicitKey\n        ? str\n        : foldFlowLines.foldFlowLines(str, indent, foldFlowLines.FOLD_QUOTED, getFoldOptions(ctx, false));\n}\nfunction singleQuotedString(value, ctx) {\n    if (ctx.options.singleQuote === false ||\n        (ctx.implicitKey && value.includes('\\n')) ||\n        /[ \\t]\\n|\\n[ \\t]/.test(value) // single quoted string can't have leading or trailing whitespace around newline\n    )\n        return doubleQuotedString(value, ctx);\n    const indent = ctx.indent || (containsDocumentMarker(value) ? '  ' : '');\n    const res = \"'\" + value.replace(/'/g, \"''\").replace(/\\n+/g, `$&\\n${indent}`) + \"'\";\n    return ctx.implicitKey\n        ? res\n        : foldFlowLines.foldFlowLines(res, indent, foldFlowLines.FOLD_FLOW, getFoldOptions(ctx, false));\n}\nfunction quotedString(value, ctx) {\n    const { singleQuote } = ctx.options;\n    let qs;\n    if (singleQuote === false)\n        qs = doubleQuotedString;\n    else {\n        const hasDouble = value.includes('\"');\n        const hasSingle = value.includes(\"'\");\n        if (hasDouble && !hasSingle)\n            qs = singleQuotedString;\n        else if (hasSingle && !hasDouble)\n            qs = doubleQuotedString;\n        else\n            qs = singleQuote ? singleQuotedString : doubleQuotedString;\n    }\n    return qs(value, ctx);\n}\n// The negative lookbehind avoids a polynomial search,\n// but isn't supported yet on Safari: https://caniuse.com/js-regexp-lookbehind\nlet blockEndNewlines;\ntry {\n    blockEndNewlines = new RegExp('(^|(?<!\\n))\\n+(?!\\n|$)', 'g');\n}\ncatch {\n    blockEndNewlines = /\\n+(?!\\n|$)/g;\n}\nfunction blockString({ comment, type, value }, ctx, onComment, onChompKeep) {\n    const { blockQuote, commentString, lineWidth } = ctx.options;\n    // 1. Block can't end in whitespace unless the last line is non-empty.\n    // 2. Strings consisting of only whitespace are best rendered explicitly.\n    if (!blockQuote || /\\n[\\t ]+$/.test(value)) {\n        return quotedString(value, ctx);\n    }\n    const indent = ctx.indent ||\n        (ctx.forceBlockIndent || containsDocumentMarker(value) ? '  ' : '');\n    const literal = blockQuote === 'literal'\n        ? true\n        : blockQuote === 'folded' || type === Scalar.Scalar.BLOCK_FOLDED\n            ? false\n            : type === Scalar.Scalar.BLOCK_LITERAL\n                ? true\n                : !lineLengthOverLimit(value, lineWidth, indent.length);\n    if (!value)\n        return literal ? '|\\n' : '>\\n';\n    // determine chomping from whitespace at value end\n    let chomp;\n    let endStart;\n    for (endStart = value.length; endStart > 0; --endStart) {\n        const ch = value[endStart - 1];\n        if (ch !== '\\n' && ch !== '\\t' && ch !== ' ')\n            break;\n    }\n    let end = value.substring(endStart);\n    const endNlPos = end.indexOf('\\n');\n    if (endNlPos === -1) {\n        chomp = '-'; // strip\n    }\n    else if (value === end || endNlPos !== end.length - 1) {\n        chomp = '+'; // keep\n        if (onChompKeep)\n            onChompKeep();\n    }\n    else {\n        chomp = ''; // clip\n    }\n    if (end) {\n        value = value.slice(0, -end.length);\n        if (end[end.length - 1] === '\\n')\n            end = end.slice(0, -1);\n        end = end.replace(blockEndNewlines, `$&${indent}`);\n    }\n    // determine indent indicator from whitespace at value start\n    let startWithSpace = false;\n    let startEnd;\n    let startNlPos = -1;\n    for (startEnd = 0; startEnd < value.length; ++startEnd) {\n        const ch = value[startEnd];\n        if (ch === ' ')\n            startWithSpace = true;\n        else if (ch === '\\n')\n            startNlPos = startEnd;\n        else\n            break;\n    }\n    let start = value.substring(0, startNlPos < startEnd ? startNlPos + 1 : startEnd);\n    if (start) {\n        value = value.substring(start.length);\n        start = start.replace(/\\n+/g, `$&${indent}`);\n    }\n    const indentSize = indent ? '2' : '1'; // root is at -1\n    // Leading | or > is added later\n    let header = (startWithSpace ? indentSize : '') + chomp;\n    if (comment) {\n        header += ' ' + commentString(comment.replace(/ ?[\\r\\n]+/g, ' '));\n        if (onComment)\n            onComment();\n    }\n    if (!literal) {\n        const foldedValue = value\n            .replace(/\\n+/g, '\\n$&')\n            .replace(/(?:^|\\n)([\\t ].*)(?:([\\n\\t ]*)\\n(?![\\n\\t ]))?/g, '$1$2') // more-indented lines aren't folded\n            //                ^ more-ind. ^ empty     ^ capture next empty lines only at end of indent\n            .replace(/\\n+/g, `$&${indent}`);\n        let literalFallback = false;\n        const foldOptions = getFoldOptions(ctx, true);\n        if (blockQuote !== 'folded' && type !== Scalar.Scalar.BLOCK_FOLDED) {\n            foldOptions.onOverflow = () => {\n                literalFallback = true;\n            };\n        }\n        const body = foldFlowLines.foldFlowLines(`${start}${foldedValue}${end}`, indent, foldFlowLines.FOLD_BLOCK, foldOptions);\n        if (!literalFallback)\n            return `>${header}\\n${indent}${body}`;\n    }\n    value = value.replace(/\\n+/g, `$&${indent}`);\n    return `|${header}\\n${indent}${start}${value}${end}`;\n}\nfunction plainString(item, ctx, onComment, onChompKeep) {\n    const { type, value } = item;\n    const { actualString, implicitKey, indent, indentStep, inFlow } = ctx;\n    if ((implicitKey && value.includes('\\n')) ||\n        (inFlow && /[[\\]{},]/.test(value))) {\n        return quotedString(value, ctx);\n    }\n    if (/^[\\n\\t ,[\\]{}#&*!|>'\"%@`]|^[?-]$|^[?-][ \\t]|[\\n:][ \\t]|[ \\t]\\n|[\\n\\t ]#|[\\n\\t :]$/.test(value)) {\n        // not allowed:\n        // - '-' or '?'\n        // - start with an indicator character (except [?:-]) or /[?-] /\n        // - '\\n ', ': ' or ' \\n' anywhere\n        // - '#' not preceded by a non-space char\n        // - end with ' ' or ':'\n        return implicitKey || inFlow || !value.includes('\\n')\n            ? quotedString(value, ctx)\n            : blockString(item, ctx, onComment, onChompKeep);\n    }\n    if (!implicitKey &&\n        !inFlow &&\n        type !== Scalar.Scalar.PLAIN &&\n        value.includes('\\n')) {\n        // Where allowed & type not set explicitly, prefer block style for multiline strings\n        return blockString(item, ctx, onComment, onChompKeep);\n    }\n    if (containsDocumentMarker(value)) {\n        if (indent === '') {\n            ctx.forceBlockIndent = true;\n            return blockString(item, ctx, onComment, onChompKeep);\n        }\n        else if (implicitKey && indent === indentStep) {\n            return quotedString(value, ctx);\n        }\n    }\n    const str = value.replace(/\\n+/g, `$&\\n${indent}`);\n    // Verify that output will be parsed as a string, as e.g. plain numbers and\n    // booleans get parsed with those types in v1.2 (e.g. '42', 'true' & '0.9e-3'),\n    // and others in v1.1.\n    if (actualString) {\n        const test = (tag) => tag.default && tag.tag !== 'tag:yaml.org,2002:str' && tag.test?.test(str);\n        const { compat, tags } = ctx.doc.schema;\n        if (tags.some(test) || compat?.some(test))\n            return quotedString(value, ctx);\n    }\n    return implicitKey\n        ? str\n        : foldFlowLines.foldFlowLines(str, indent, foldFlowLines.FOLD_FLOW, getFoldOptions(ctx, false));\n}\nfunction stringifyString(item, ctx, onComment, onChompKeep) {\n    const { implicitKey, inFlow } = ctx;\n    const ss = typeof item.value === 'string'\n        ? item\n        : Object.assign({}, item, { value: String(item.value) });\n    let { type } = item;\n    if (type !== Scalar.Scalar.QUOTE_DOUBLE) {\n        // force double quotes on control characters & unpaired surrogates\n        if (/[\\x00-\\x08\\x0b-\\x1f\\x7f-\\x9f\\u{D800}-\\u{DFFF}]/u.test(ss.value))\n            type = Scalar.Scalar.QUOTE_DOUBLE;\n    }\n    const _stringify = (_type) => {\n        switch (_type) {\n            case Scalar.Scalar.BLOCK_FOLDED:\n            case Scalar.Scalar.BLOCK_LITERAL:\n                return implicitKey || inFlow\n                    ? quotedString(ss.value, ctx) // blocks are not valid inside flow containers\n                    : blockString(ss, ctx, onComment, onChompKeep);\n            case Scalar.Scalar.QUOTE_DOUBLE:\n                return doubleQuotedString(ss.value, ctx);\n            case Scalar.Scalar.QUOTE_SINGLE:\n                return singleQuotedString(ss.value, ctx);\n            case Scalar.Scalar.PLAIN:\n                return plainString(ss, ctx, onComment, onChompKeep);\n            default:\n                return null;\n        }\n    };\n    let res = _stringify(type);\n    if (res === null) {\n        const { defaultKeyType, defaultStringType } = ctx.options;\n        const t = (implicitKey && defaultKeyType) || defaultStringType;\n        res = _stringify(t);\n        if (res === null)\n            throw new Error(`Unsupported default string type ${t}`);\n    }\n    return res;\n}\n\nexports.stringifyString = stringifyString;\n","'use strict';\n\nvar anchors = require('../doc/anchors.js');\nvar identity = require('../nodes/identity.js');\nvar stringifyComment = require('./stringifyComment.js');\nvar stringifyString = require('./stringifyString.js');\n\nfunction createStringifyContext(doc, options) {\n    const opt = Object.assign({\n        blockQuote: true,\n        commentString: stringifyComment.stringifyComment,\n        defaultKeyType: null,\n        defaultStringType: 'PLAIN',\n        directives: null,\n        doubleQuotedAsJSON: false,\n        doubleQuotedMinMultiLineLength: 40,\n        falseStr: 'false',\n        flowCollectionPadding: true,\n        indentSeq: true,\n        lineWidth: 80,\n        minContentWidth: 20,\n        nullStr: 'null',\n        simpleKeys: false,\n        singleQuote: null,\n        trailingComma: false,\n        trueStr: 'true',\n        verifyAliasOrder: true\n    }, doc.schema.toStringOptions, options);\n    let inFlow;\n    switch (opt.collectionStyle) {\n        case 'block':\n            inFlow = false;\n            break;\n        case 'flow':\n            inFlow = true;\n            break;\n        default:\n            inFlow = null;\n    }\n    return {\n        anchors: new Set(),\n        doc,\n        flowCollectionPadding: opt.flowCollectionPadding ? ' ' : '',\n        indent: '',\n        indentStep: typeof opt.indent === 'number' ? ' '.repeat(opt.indent) : '  ',\n        inFlow,\n        options: opt\n    };\n}\nfunction getTagObject(tags, item) {\n    if (item.tag) {\n        const match = tags.filter(t => t.tag === item.tag);\n        if (match.length > 0)\n            return match.find(t => t.format === item.format) ?? match[0];\n    }\n    let tagObj = undefined;\n    let obj;\n    if (identity.isScalar(item)) {\n        obj = item.value;\n        let match = tags.filter(t => t.identify?.(obj));\n        if (match.length > 1) {\n            const testMatch = match.filter(t => t.test);\n            if (testMatch.length > 0)\n                match = testMatch;\n        }\n        tagObj =\n            match.find(t => t.format === item.format) ?? match.find(t => !t.format);\n    }\n    else {\n        obj = item;\n        tagObj = tags.find(t => t.nodeClass && obj instanceof t.nodeClass);\n    }\n    if (!tagObj) {\n        const name = obj?.constructor?.name ?? (obj === null ? 'null' : typeof obj);\n        throw new Error(`Tag not resolved for ${name} value`);\n    }\n    return tagObj;\n}\n// needs to be called before value stringifier to allow for circular anchor refs\nfunction stringifyProps(node, tagObj, { anchors: anchors$1, doc }) {\n    if (!doc.directives)\n        return '';\n    const props = [];\n    const anchor = (identity.isScalar(node) || identity.isCollection(node)) && node.anchor;\n    if (anchor && anchors.anchorIsValid(anchor)) {\n        anchors$1.add(anchor);\n        props.push(`&${anchor}`);\n    }\n    const tag = node.tag ?? (tagObj.default ? null : tagObj.tag);\n    if (tag)\n        props.push(doc.directives.tagString(tag));\n    return props.join(' ');\n}\nfunction stringify(item, ctx, onComment, onChompKeep) {\n    if (identity.isPair(item))\n        return item.toString(ctx, onComment, onChompKeep);\n    if (identity.isAlias(item)) {\n        if (ctx.doc.directives)\n            return item.toString(ctx);\n        if (ctx.resolvedAliases?.has(item)) {\n            throw new TypeError(`Cannot stringify circular structure without alias nodes`);\n        }\n        else {\n            if (ctx.resolvedAliases)\n                ctx.resolvedAliases.add(item);\n            else\n                ctx.resolvedAliases = new Set([item]);\n            item = item.resolve(ctx.doc);\n        }\n    }\n    let tagObj = undefined;\n    const node = identity.isNode(item)\n        ? item\n        : ctx.doc.createNode(item, { onTagObj: o => (tagObj = o) });\n    tagObj ?? (tagObj = getTagObject(ctx.doc.schema.tags, node));\n    const props = stringifyProps(node, tagObj, ctx);\n    if (props.length > 0)\n        ctx.indentAtStart = (ctx.indentAtStart ?? 0) + props.length + 1;\n    const str = typeof tagObj.stringify === 'function'\n        ? tagObj.stringify(node, ctx, onComment, onChompKeep)\n        : identity.isScalar(node)\n            ? stringifyString.stringifyString(node, ctx, onComment, onChompKeep)\n            : node.toString(ctx, onComment, onChompKeep);\n    if (!props)\n        return str;\n    return identity.isScalar(node) || str[0] === '{' || str[0] === '['\n        ? `${props} ${str}`\n        : `${props}\\n${ctx.indent}${str}`;\n}\n\nexports.createStringifyContext = createStringifyContext;\nexports.stringify = stringify;\n","'use strict';\n\nvar identity = require('../nodes/identity.js');\nvar Scalar = require('../nodes/Scalar.js');\nvar stringify = require('./stringify.js');\nvar stringifyComment = require('./stringifyComment.js');\n\nfunction stringifyPair({ key, value }, ctx, onComment, onChompKeep) {\n    const { allNullValues, doc, indent, indentStep, options: { commentString, indentSeq, simpleKeys } } = ctx;\n    let keyComment = (identity.isNode(key) && key.comment) || null;\n    if (simpleKeys) {\n        if (keyComment) {\n            throw new Error('With simple keys, key nodes cannot have comments');\n        }\n        if (identity.isCollection(key) || (!identity.isNode(key) && typeof key === 'object')) {\n            const msg = 'With simple keys, collection cannot be used as a key value';\n            throw new Error(msg);\n        }\n    }\n    let explicitKey = !simpleKeys &&\n        (!key ||\n            (keyComment && value == null && !ctx.inFlow) ||\n            identity.isCollection(key) ||\n            (identity.isScalar(key)\n                ? key.type === Scalar.Scalar.BLOCK_FOLDED || key.type === Scalar.Scalar.BLOCK_LITERAL\n                : typeof key === 'object'));\n    ctx = Object.assign({}, ctx, {\n        allNullValues: false,\n        implicitKey: !explicitKey && (simpleKeys || !allNullValues),\n        indent: indent + indentStep\n    });\n    let keyCommentDone = false;\n    let chompKeep = false;\n    let str = stringify.stringify(key, ctx, () => (keyCommentDone = true), () => (chompKeep = true));\n    if (!explicitKey && !ctx.inFlow && str.length > 1024) {\n        if (simpleKeys)\n            throw new Error('With simple keys, single line scalar must not span more than 1024 characters');\n        explicitKey = true;\n    }\n    if (ctx.inFlow) {\n        if (allNullValues || value == null) {\n            if (keyCommentDone && onComment)\n                onComment();\n            return str === '' ? '?' : explicitKey ? `? ${str}` : str;\n        }\n    }\n    else if ((allNullValues && !simpleKeys) || (value == null && explicitKey)) {\n        str = `? ${str}`;\n        if (keyComment && !keyCommentDone) {\n            str += stringifyComment.lineComment(str, ctx.indent, commentString(keyComment));\n        }\n        else if (chompKeep && onChompKeep)\n            onChompKeep();\n        return str;\n    }\n    if (keyCommentDone)\n        keyComment = null;\n    if (explicitKey) {\n        if (keyComment)\n            str += stringifyComment.lineComment(str, ctx.indent, commentString(keyComment));\n        str = `? ${str}\\n${indent}:`;\n    }\n    else {\n        str = `${str}:`;\n        if (keyComment)\n            str += stringifyComment.lineComment(str, ctx.indent, commentString(keyComment));\n    }\n    let vsb, vcb, valueComment;\n    if (identity.isNode(value)) {\n        vsb = !!value.spaceBefore;\n        vcb = value.commentBefore;\n        valueComment = value.comment;\n    }\n    else {\n        vsb = false;\n        vcb = null;\n        valueComment = null;\n        if (value && typeof value === 'object')\n            value = doc.createNode(value);\n    }\n    ctx.implicitKey = false;\n    if (!explicitKey && !keyComment && identity.isScalar(value))\n        ctx.indentAtStart = str.length + 1;\n    chompKeep = false;\n    if (!indentSeq &&\n        indentStep.length >= 2 &&\n        !ctx.inFlow &&\n        !explicitKey &&\n        identity.isSeq(value) &&\n        !value.flow &&\n        !value.tag &&\n        !value.anchor) {\n        // If indentSeq === false, consider '- ' as part of indentation where possible\n        ctx.indent = ctx.indent.substring(2);\n    }\n    let valueCommentDone = false;\n    const valueStr = stringify.stringify(value, ctx, () => (valueCommentDone = true), () => (chompKeep = true));\n    let ws = ' ';\n    if (keyComment || vsb || vcb) {\n        ws = vsb ? '\\n' : '';\n        if (vcb) {\n            const cs = commentString(vcb);\n            ws += `\\n${stringifyComment.indentComment(cs, ctx.indent)}`;\n        }\n        if (valueStr === '' && !ctx.inFlow) {\n            if (ws === '\\n' && valueComment)\n                ws = '\\n\\n';\n        }\n        else {\n            ws += `\\n${ctx.indent}`;\n        }\n    }\n    else if (!explicitKey && identity.isCollection(value)) {\n        const vs0 = valueStr[0];\n        const nl0 = valueStr.indexOf('\\n');\n        const hasNewline = nl0 !== -1;\n        const flow = ctx.inFlow ?? value.flow ?? value.items.length === 0;\n        if (hasNewline || !flow) {\n            let hasPropsLine = false;\n            if (hasNewline && (vs0 === '&' || vs0 === '!')) {\n                let sp0 = valueStr.indexOf(' ');\n                if (vs0 === '&' &&\n                    sp0 !== -1 &&\n                    sp0 < nl0 &&\n                    valueStr[sp0 + 1] === '!') {\n                    sp0 = valueStr.indexOf(' ', sp0 + 1);\n                }\n                if (sp0 === -1 || nl0 < sp0)\n                    hasPropsLine = true;\n            }\n            if (!hasPropsLine)\n                ws = `\\n${ctx.indent}`;\n        }\n    }\n    else if (valueStr === '' || valueStr[0] === '\\n') {\n        ws = '';\n    }\n    str += ws + valueStr;\n    if (ctx.inFlow) {\n        if (valueCommentDone && onComment)\n            onComment();\n    }\n    else if (valueComment && !valueCommentDone) {\n        str += stringifyComment.lineComment(str, ctx.indent, commentString(valueComment));\n    }\n    else if (chompKeep && onChompKeep) {\n        onChompKeep();\n    }\n    return str;\n}\n\nexports.stringifyPair = stringifyPair;\n","'use strict';\n\nvar node_process = require('process');\n\nfunction debug(logLevel, ...messages) {\n    if (logLevel === 'debug')\n        console.log(...messages);\n}\nfunction warn(logLevel, warning) {\n    if (logLevel === 'debug' || logLevel === 'warn') {\n        if (typeof node_process.emitWarning === 'function')\n            node_process.emitWarning(warning);\n        else\n            console.warn(warning);\n    }\n}\n\nexports.debug = debug;\nexports.warn = warn;\n","'use strict';\n\nvar identity = require('../../nodes/identity.js');\nvar Scalar = require('../../nodes/Scalar.js');\n\n// If the value associated with a merge key is a single mapping node, each of\n// its key/value pairs is inserted into the current mapping, unless the key\n// already exists in it. If the value associated with the merge key is a\n// sequence, then this sequence is expected to contain mapping nodes and each\n// of these nodes is merged in turn according to its order in the sequence.\n// Keys in mapping nodes earlier in the sequence override keys specified in\n// later mapping nodes. -- http://yaml.org/type/merge.html\nconst MERGE_KEY = '<<';\nconst merge = {\n    identify: value => value === MERGE_KEY ||\n        (typeof value === 'symbol' && value.description === MERGE_KEY),\n    default: 'key',\n    tag: 'tag:yaml.org,2002:merge',\n    test: /^<<$/,\n    resolve: () => Object.assign(new Scalar.Scalar(Symbol(MERGE_KEY)), {\n        addToJSMap: addMergeToJSMap\n    }),\n    stringify: () => MERGE_KEY\n};\nconst isMergeKey = (ctx, key) => (merge.identify(key) ||\n    (identity.isScalar(key) &&\n        (!key.type || key.type === Scalar.Scalar.PLAIN) &&\n        merge.identify(key.value))) &&\n    ctx?.doc.schema.tags.some(tag => tag.tag === merge.tag && tag.default);\nfunction addMergeToJSMap(ctx, map, value) {\n    const source = resolveAliasValue(ctx, value);\n    if (identity.isSeq(source))\n        for (const it of source.items)\n            mergeValue(ctx, map, it);\n    else if (Array.isArray(source))\n        for (const it of source)\n            mergeValue(ctx, map, it);\n    else\n        mergeValue(ctx, map, source);\n}\nfunction mergeValue(ctx, map, value) {\n    const source = resolveAliasValue(ctx, value);\n    if (!identity.isMap(source))\n        throw new Error('Merge sources must be maps or map aliases');\n    const srcMap = source.toJSON(null, ctx, Map);\n    for (const [key, value] of srcMap) {\n        if (map instanceof Map) {\n            if (!map.has(key))\n                map.set(key, value);\n        }\n        else if (map instanceof Set) {\n            map.add(key);\n        }\n        else if (!Object.prototype.hasOwnProperty.call(map, key)) {\n            Object.defineProperty(map, key, {\n                value,\n                writable: true,\n                enumerable: true,\n                configurable: true\n            });\n        }\n    }\n    return map;\n}\nfunction resolveAliasValue(ctx, value) {\n    return ctx && identity.isAlias(value) ? value.resolve(ctx.doc, ctx) : value;\n}\n\nexports.addMergeToJSMap = addMergeToJSMap;\nexports.isMergeKey = isMergeKey;\nexports.merge = merge;\n","'use strict';\n\nvar log = require('../log.js');\nvar merge = require('../schema/yaml-1.1/merge.js');\nvar stringify = require('../stringify/stringify.js');\nvar identity = require('./identity.js');\nvar toJS = require('./toJS.js');\n\nfunction addPairToJSMap(ctx, map, { key, value }) {\n    if (identity.isNode(key) && key.addToJSMap)\n        key.addToJSMap(ctx, map, value);\n    // TODO: Should drop this special case for bare << handling\n    else if (merge.isMergeKey(ctx, key))\n        merge.addMergeToJSMap(ctx, map, value);\n    else {\n        const jsKey = toJS.toJS(key, '', ctx);\n        if (map instanceof Map) {\n            map.set(jsKey, toJS.toJS(value, jsKey, ctx));\n        }\n        else if (map instanceof Set) {\n            map.add(jsKey);\n        }\n        else {\n            const stringKey = stringifyKey(key, jsKey, ctx);\n            const jsValue = toJS.toJS(value, stringKey, ctx);\n            if (stringKey in map)\n                Object.defineProperty(map, stringKey, {\n                    value: jsValue,\n                    writable: true,\n                    enumerable: true,\n                    configurable: true\n                });\n            else\n                map[stringKey] = jsValue;\n        }\n    }\n    return map;\n}\nfunction stringifyKey(key, jsKey, ctx) {\n    if (jsKey === null)\n        return '';\n    // eslint-disable-next-line @typescript-eslint/no-base-to-string\n    if (typeof jsKey !== 'object')\n        return String(jsKey);\n    if (identity.isNode(key) && ctx?.doc) {\n        const strCtx = stringify.createStringifyContext(ctx.doc, {});\n        strCtx.anchors = new Set();\n        for (const node of ctx.anchors.keys())\n            strCtx.anchors.add(node.anchor);\n        strCtx.inFlow = true;\n        strCtx.inStringifyKey = true;\n        const strKey = key.toString(strCtx);\n        if (!ctx.mapKeyWarned) {\n            let jsonStr = JSON.stringify(strKey);\n            if (jsonStr.length > 40)\n                jsonStr = jsonStr.substring(0, 36) + '...\"';\n            log.warn(ctx.doc.options.logLevel, `Keys with collection values will be stringified due to JS Object restrictions: ${jsonStr}. Set mapAsMap: true to use object keys.`);\n            ctx.mapKeyWarned = true;\n        }\n        return strKey;\n    }\n    return JSON.stringify(jsKey);\n}\n\nexports.addPairToJSMap = addPairToJSMap;\n","'use strict';\n\nvar createNode = require('../doc/createNode.js');\nvar stringifyPair = require('../stringify/stringifyPair.js');\nvar addPairToJSMap = require('./addPairToJSMap.js');\nvar identity = require('./identity.js');\n\nfunction createPair(key, value, ctx) {\n    const k = createNode.createNode(key, undefined, ctx);\n    const v = createNode.createNode(value, undefined, ctx);\n    return new Pair(k, v);\n}\nclass Pair {\n    constructor(key, value = null) {\n        Object.defineProperty(this, identity.NODE_TYPE, { value: identity.PAIR });\n        this.key = key;\n        this.value = value;\n    }\n    clone(schema) {\n        let { key, value } = this;\n        if (identity.isNode(key))\n            key = key.clone(schema);\n        if (identity.isNode(value))\n            value = value.clone(schema);\n        return new Pair(key, value);\n    }\n    toJSON(_, ctx) {\n        const pair = ctx?.mapAsMap ? new Map() : {};\n        return addPairToJSMap.addPairToJSMap(ctx, pair, this);\n    }\n    toString(ctx, onComment, onChompKeep) {\n        return ctx?.doc\n            ? stringifyPair.stringifyPair(this, ctx, onComment, onChompKeep)\n            : JSON.stringify(this);\n    }\n}\n\nexports.Pair = Pair;\nexports.createPair = createPair;\n","'use strict';\n\nvar identity = require('../nodes/identity.js');\nvar stringify = require('./stringify.js');\nvar stringifyComment = require('./stringifyComment.js');\n\nfunction stringifyCollection(collection, ctx, options) {\n    const flow = ctx.inFlow ?? collection.flow;\n    const stringify = flow ? stringifyFlowCollection : stringifyBlockCollection;\n    return stringify(collection, ctx, options);\n}\nfunction stringifyBlockCollection({ comment, items }, ctx, { blockItemPrefix, flowChars, itemIndent, onChompKeep, onComment }) {\n    const { indent, options: { commentString } } = ctx;\n    const itemCtx = Object.assign({}, ctx, { indent: itemIndent, type: null });\n    let chompKeep = false; // flag for the preceding node's status\n    const lines = [];\n    for (let i = 0; i < items.length; ++i) {\n        const item = items[i];\n        let comment = null;\n        if (identity.isNode(item)) {\n            if (!chompKeep && item.spaceBefore)\n                lines.push('');\n            addCommentBefore(ctx, lines, item.commentBefore, chompKeep);\n            if (item.comment)\n                comment = item.comment;\n        }\n        else if (identity.isPair(item)) {\n            const ik = identity.isNode(item.key) ? item.key : null;\n            if (ik) {\n                if (!chompKeep && ik.spaceBefore)\n                    lines.push('');\n                addCommentBefore(ctx, lines, ik.commentBefore, chompKeep);\n            }\n        }\n        chompKeep = false;\n        let str = stringify.stringify(item, itemCtx, () => (comment = null), () => (chompKeep = true));\n        if (comment)\n            str += stringifyComment.lineComment(str, itemIndent, commentString(comment));\n        if (chompKeep && comment)\n            chompKeep = false;\n        lines.push(blockItemPrefix + str);\n    }\n    let str;\n    if (lines.length === 0) {\n        str = flowChars.start + flowChars.end;\n    }\n    else {\n        str = lines[0];\n        for (let i = 1; i < lines.length; ++i) {\n            const line = lines[i];\n            str += line ? `\\n${indent}${line}` : '\\n';\n        }\n    }\n    if (comment) {\n        str += '\\n' + stringifyComment.indentComment(commentString(comment), indent);\n        if (onComment)\n            onComment();\n    }\n    else if (chompKeep && onChompKeep)\n        onChompKeep();\n    return str;\n}\nfunction stringifyFlowCollection({ items }, ctx, { flowChars, itemIndent }) {\n    const { indent, indentStep, flowCollectionPadding: fcPadding, options: { commentString } } = ctx;\n    itemIndent += indentStep;\n    const itemCtx = Object.assign({}, ctx, {\n        indent: itemIndent,\n        inFlow: true,\n        type: null\n    });\n    let reqNewline = false;\n    let linesAtValue = 0;\n    const lines = [];\n    for (let i = 0; i < items.length; ++i) {\n        const item = items[i];\n        let comment = null;\n        if (identity.isNode(item)) {\n            if (item.spaceBefore)\n                lines.push('');\n            addCommentBefore(ctx, lines, item.commentBefore, false);\n            if (item.comment)\n                comment = item.comment;\n        }\n        else if (identity.isPair(item)) {\n            const ik = identity.isNode(item.key) ? item.key : null;\n            if (ik) {\n                if (ik.spaceBefore)\n                    lines.push('');\n                addCommentBefore(ctx, lines, ik.commentBefore, false);\n                if (ik.comment)\n                    reqNewline = true;\n            }\n            const iv = identity.isNode(item.value) ? item.value : null;\n            if (iv) {\n                if (iv.comment)\n                    comment = iv.comment;\n                if (iv.commentBefore)\n                    reqNewline = true;\n            }\n            else if (item.value == null && ik?.comment) {\n                comment = ik.comment;\n            }\n        }\n        if (comment)\n            reqNewline = true;\n        let str = stringify.stringify(item, itemCtx, () => (comment = null));\n        reqNewline || (reqNewline = lines.length > linesAtValue || str.includes('\\n'));\n        if (i < items.length - 1) {\n            str += ',';\n        }\n        else if (ctx.options.trailingComma) {\n            if (ctx.options.lineWidth > 0) {\n                reqNewline || (reqNewline = lines.reduce((sum, line) => sum + line.length + 2, 2) +\n                    (str.length + 2) >\n                    ctx.options.lineWidth);\n            }\n            if (reqNewline) {\n                str += ',';\n            }\n        }\n        if (comment)\n            str += stringifyComment.lineComment(str, itemIndent, commentString(comment));\n        lines.push(str);\n        linesAtValue = lines.length;\n    }\n    const { start, end } = flowChars;\n    if (lines.length === 0) {\n        return start + end;\n    }\n    else {\n        if (!reqNewline) {\n            const len = lines.reduce((sum, line) => sum + line.length + 2, 2);\n            reqNewline = ctx.options.lineWidth > 0 && len > ctx.options.lineWidth;\n        }\n        if (reqNewline) {\n            let str = start;\n            for (const line of lines)\n                str += line ? `\\n${indentStep}${indent}${line}` : '\\n';\n            return `${str}\\n${indent}${end}`;\n        }\n        else {\n            return `${start}${fcPadding}${lines.join(' ')}${fcPadding}${end}`;\n        }\n    }\n}\nfunction addCommentBefore({ indent, options: { commentString } }, lines, comment, chompKeep) {\n    if (comment && chompKeep)\n        comment = comment.replace(/^\\n+/, '');\n    if (comment) {\n        const ic = stringifyComment.indentComment(commentString(comment), indent);\n        lines.push(ic.trimStart()); // Avoid double indent on first line\n    }\n}\n\nexports.stringifyCollection = stringifyCollection;\n","'use strict';\n\nvar stringifyCollection = require('../stringify/stringifyCollection.js');\nvar addPairToJSMap = require('./addPairToJSMap.js');\nvar Collection = require('./Collection.js');\nvar identity = require('./identity.js');\nvar Pair = require('./Pair.js');\nvar Scalar = require('./Scalar.js');\n\nfunction findPair(items, key) {\n    const k = identity.isScalar(key) ? key.value : key;\n    for (const it of items) {\n        if (identity.isPair(it)) {\n            if (it.key === key || it.key === k)\n                return it;\n            if (identity.isScalar(it.key) && it.key.value === k)\n                return it;\n        }\n    }\n    return undefined;\n}\nclass YAMLMap extends Collection.Collection {\n    static get tagName() {\n        return 'tag:yaml.org,2002:map';\n    }\n    constructor(schema) {\n        super(identity.MAP, schema);\n        this.items = [];\n    }\n    /**\n     * A generic collection parsing method that can be extended\n     * to other node classes that inherit from YAMLMap\n     */\n    static from(schema, obj, ctx) {\n        const { keepUndefined, replacer } = ctx;\n        const map = new this(schema);\n        const add = (key, value) => {\n            if (typeof replacer === 'function')\n                value = replacer.call(obj, key, value);\n            else if (Array.isArray(replacer) && !replacer.includes(key))\n                return;\n            if (value !== undefined || keepUndefined)\n                map.items.push(Pair.createPair(key, value, ctx));\n        };\n        if (obj instanceof Map) {\n            for (const [key, value] of obj)\n                add(key, value);\n        }\n        else if (obj && typeof obj === 'object') {\n            for (const key of Object.keys(obj))\n                add(key, obj[key]);\n        }\n        if (typeof schema.sortMapEntries === 'function') {\n            map.items.sort(schema.sortMapEntries);\n        }\n        return map;\n    }\n    /**\n     * Adds a value to the collection.\n     *\n     * @param overwrite - If not set `true`, using a key that is already in the\n     *   collection will throw. Otherwise, overwrites the previous value.\n     */\n    add(pair, overwrite) {\n        let _pair;\n        if (identity.isPair(pair))\n            _pair = pair;\n        else if (!pair || typeof pair !== 'object' || !('key' in pair)) {\n            // In TypeScript, this never happens.\n            _pair = new Pair.Pair(pair, pair?.value);\n        }\n        else\n            _pair = new Pair.Pair(pair.key, pair.value);\n        const prev = findPair(this.items, _pair.key);\n        const sortEntries = this.schema?.sortMapEntries;\n        if (prev) {\n            if (!overwrite)\n                throw new Error(`Key ${_pair.key} already set`);\n            // For scalars, keep the old node & its comments and anchors\n            if (identity.isScalar(prev.value) && Scalar.isScalarValue(_pair.value))\n                prev.value.value = _pair.value;\n            else\n                prev.value = _pair.value;\n        }\n        else if (sortEntries) {\n            const i = this.items.findIndex(item => sortEntries(_pair, item) < 0);\n            if (i === -1)\n                this.items.push(_pair);\n            else\n                this.items.splice(i, 0, _pair);\n        }\n        else {\n            this.items.push(_pair);\n        }\n    }\n    delete(key) {\n        const it = findPair(this.items, key);\n        if (!it)\n            return false;\n        const del = this.items.splice(this.items.indexOf(it), 1);\n        return del.length > 0;\n    }\n    get(key, keepScalar) {\n        const it = findPair(this.items, key);\n        const node = it?.value;\n        return (!keepScalar && identity.isScalar(node) ? node.value : node) ?? undefined;\n    }\n    has(key) {\n        return !!findPair(this.items, key);\n    }\n    set(key, value) {\n        this.add(new Pair.Pair(key, value), true);\n    }\n    /**\n     * @param ctx - Conversion context, originally set in Document#toJS()\n     * @param {Class} Type - If set, forces the returned collection type\n     * @returns Instance of Type, Map, or Object\n     */\n    toJSON(_, ctx, Type) {\n        const map = Type ? new Type() : ctx?.mapAsMap ? new Map() : {};\n        if (ctx?.onCreate)\n            ctx.onCreate(map);\n        for (const item of this.items)\n            addPairToJSMap.addPairToJSMap(ctx, map, item);\n        return map;\n    }\n    toString(ctx, onComment, onChompKeep) {\n        if (!ctx)\n            return JSON.stringify(this);\n        for (const item of this.items) {\n            if (!identity.isPair(item))\n                throw new Error(`Map items must all be pairs; found ${JSON.stringify(item)} instead`);\n        }\n        if (!ctx.allNullValues && this.hasAllNullValues(false))\n            ctx = Object.assign({}, ctx, { allNullValues: true });\n        return stringifyCollection.stringifyCollection(this, ctx, {\n            blockItemPrefix: '',\n            flowChars: { start: '{', end: '}' },\n            itemIndent: ctx.indent || '',\n            onChompKeep,\n            onComment\n        });\n    }\n}\n\nexports.YAMLMap = YAMLMap;\nexports.findPair = findPair;\n","'use strict';\n\nvar identity = require('../../nodes/identity.js');\nvar YAMLMap = require('../../nodes/YAMLMap.js');\n\nconst map = {\n    collection: 'map',\n    default: true,\n    nodeClass: YAMLMap.YAMLMap,\n    tag: 'tag:yaml.org,2002:map',\n    resolve(map, onError) {\n        if (!identity.isMap(map))\n            onError('Expected a mapping for this tag');\n        return map;\n    },\n    createNode: (schema, obj, ctx) => YAMLMap.YAMLMap.from(schema, obj, ctx)\n};\n\nexports.map = map;\n","'use strict';\n\nvar createNode = require('../doc/createNode.js');\nvar stringifyCollection = require('../stringify/stringifyCollection.js');\nvar Collection = require('./Collection.js');\nvar identity = require('./identity.js');\nvar Scalar = require('./Scalar.js');\nvar toJS = require('./toJS.js');\n\nclass YAMLSeq extends Collection.Collection {\n    static get tagName() {\n        return 'tag:yaml.org,2002:seq';\n    }\n    constructor(schema) {\n        super(identity.SEQ, schema);\n        this.items = [];\n    }\n    add(value) {\n        this.items.push(value);\n    }\n    /**\n     * Removes a value from the collection.\n     *\n     * `key` must contain a representation of an integer for this to succeed.\n     * It may be wrapped in a `Scalar`.\n     *\n     * @returns `true` if the item was found and removed.\n     */\n    delete(key) {\n        const idx = asItemIndex(key);\n        if (typeof idx !== 'number')\n            return false;\n        const del = this.items.splice(idx, 1);\n        return del.length > 0;\n    }\n    get(key, keepScalar) {\n        const idx = asItemIndex(key);\n        if (typeof idx !== 'number')\n            return undefined;\n        const it = this.items[idx];\n        return !keepScalar && identity.isScalar(it) ? it.value : it;\n    }\n    /**\n     * Checks if the collection includes a value with the key `key`.\n     *\n     * `key` must contain a representation of an integer for this to succeed.\n     * It may be wrapped in a `Scalar`.\n     */\n    has(key) {\n        const idx = asItemIndex(key);\n        return typeof idx === 'number' && idx < this.items.length;\n    }\n    /**\n     * Sets a value in this collection. For `!!set`, `value` needs to be a\n     * boolean to add/remove the item from the set.\n     *\n     * If `key` does not contain a representation of an integer, this will throw.\n     * It may be wrapped in a `Scalar`.\n     */\n    set(key, value) {\n        const idx = asItemIndex(key);\n        if (typeof idx !== 'number')\n            throw new Error(`Expected a valid index, not ${key}.`);\n        const prev = this.items[idx];\n        if (identity.isScalar(prev) && Scalar.isScalarValue(value))\n            prev.value = value;\n        else\n            this.items[idx] = value;\n    }\n    toJSON(_, ctx) {\n        const seq = [];\n        if (ctx?.onCreate)\n            ctx.onCreate(seq);\n        let i = 0;\n        for (const item of this.items)\n            seq.push(toJS.toJS(item, String(i++), ctx));\n        return seq;\n    }\n    toString(ctx, onComment, onChompKeep) {\n        if (!ctx)\n            return JSON.stringify(this);\n        return stringifyCollection.stringifyCollection(this, ctx, {\n            blockItemPrefix: '- ',\n            flowChars: { start: '[', end: ']' },\n            itemIndent: (ctx.indent || '') + '  ',\n            onChompKeep,\n            onComment\n        });\n    }\n    static from(schema, obj, ctx) {\n        const { replacer } = ctx;\n        const seq = new this(schema);\n        if (obj && Symbol.iterator in Object(obj)) {\n            let i = 0;\n            for (let it of obj) {\n                if (typeof replacer === 'function') {\n                    const key = obj instanceof Set ? it : String(i++);\n                    it = replacer.call(obj, key, it);\n                }\n                seq.items.push(createNode.createNode(it, undefined, ctx));\n            }\n        }\n        return seq;\n    }\n}\nfunction asItemIndex(key) {\n    let idx = identity.isScalar(key) ? key.value : key;\n    if (idx && typeof idx === 'string')\n        idx = Number(idx);\n    return typeof idx === 'number' && Number.isInteger(idx) && idx >= 0\n        ? idx\n        : null;\n}\n\nexports.YAMLSeq = YAMLSeq;\n","'use strict';\n\nvar identity = require('../../nodes/identity.js');\nvar YAMLSeq = require('../../nodes/YAMLSeq.js');\n\nconst seq = {\n    collection: 'seq',\n    default: true,\n    nodeClass: YAMLSeq.YAMLSeq,\n    tag: 'tag:yaml.org,2002:seq',\n    resolve(seq, onError) {\n        if (!identity.isSeq(seq))\n            onError('Expected a sequence for this tag');\n        return seq;\n    },\n    createNode: (schema, obj, ctx) => YAMLSeq.YAMLSeq.from(schema, obj, ctx)\n};\n\nexports.seq = seq;\n","'use strict';\n\nvar stringifyString = require('../../stringify/stringifyString.js');\n\nconst string = {\n    identify: value => typeof value === 'string',\n    default: true,\n    tag: 'tag:yaml.org,2002:str',\n    resolve: str => str,\n    stringify(item, ctx, onComment, onChompKeep) {\n        ctx = Object.assign({ actualString: true }, ctx);\n        return stringifyString.stringifyString(item, ctx, onComment, onChompKeep);\n    }\n};\n\nexports.string = string;\n","'use strict';\n\nvar Scalar = require('../../nodes/Scalar.js');\n\nconst nullTag = {\n    identify: value => value == null,\n    createNode: () => new Scalar.Scalar(null),\n    default: true,\n    tag: 'tag:yaml.org,2002:null',\n    test: /^(?:~|[Nn]ull|NULL)?$/,\n    resolve: () => new Scalar.Scalar(null),\n    stringify: ({ source }, ctx) => typeof source === 'string' && nullTag.test.test(source)\n        ? source\n        : ctx.options.nullStr\n};\n\nexports.nullTag = nullTag;\n","'use strict';\n\nvar Scalar = require('../../nodes/Scalar.js');\n\nconst boolTag = {\n    identify: value => typeof value === 'boolean',\n    default: true,\n    tag: 'tag:yaml.org,2002:bool',\n    test: /^(?:[Tt]rue|TRUE|[Ff]alse|FALSE)$/,\n    resolve: str => new Scalar.Scalar(str[0] === 't' || str[0] === 'T'),\n    stringify({ source, value }, ctx) {\n        if (source && boolTag.test.test(source)) {\n            const sv = source[0] === 't' || source[0] === 'T';\n            if (value === sv)\n                return source;\n        }\n        return value ? ctx.options.trueStr : ctx.options.falseStr;\n    }\n};\n\nexports.boolTag = boolTag;\n","'use strict';\n\nfunction stringifyNumber({ format, minFractionDigits, tag, value }) {\n    if (typeof value === 'bigint')\n        return String(value);\n    const num = typeof value === 'number' ? value : Number(value);\n    if (!isFinite(num))\n        return isNaN(num) ? '.nan' : num < 0 ? '-.inf' : '.inf';\n    let n = Object.is(value, -0) ? '-0' : JSON.stringify(value);\n    if (!format &&\n        minFractionDigits &&\n        (!tag || tag === 'tag:yaml.org,2002:float') &&\n        /^-?\\d/.test(n) &&\n        !n.includes('e')) {\n        let i = n.indexOf('.');\n        if (i < 0) {\n            i = n.length;\n            n += '.';\n        }\n        let d = minFractionDigits - (n.length - i - 1);\n        while (d-- > 0)\n            n += '0';\n    }\n    return n;\n}\n\nexports.stringifyNumber = stringifyNumber;\n","'use strict';\n\nvar Scalar = require('../../nodes/Scalar.js');\nvar stringifyNumber = require('../../stringify/stringifyNumber.js');\n\nconst floatNaN = {\n    identify: value => typeof value === 'number',\n    default: true,\n    tag: 'tag:yaml.org,2002:float',\n    test: /^(?:[-+]?\\.(?:inf|Inf|INF)|\\.nan|\\.NaN|\\.NAN)$/,\n    resolve: str => str.slice(-3).toLowerCase() === 'nan'\n        ? NaN\n        : str[0] === '-'\n            ? Number.NEGATIVE_INFINITY\n            : Number.POSITIVE_INFINITY,\n    stringify: stringifyNumber.stringifyNumber\n};\nconst floatExp = {\n    identify: value => typeof value === 'number',\n    default: true,\n    tag: 'tag:yaml.org,2002:float',\n    format: 'EXP',\n    test: /^[-+]?(?:\\.[0-9]+|[0-9]+(?:\\.[0-9]*)?)[eE][-+]?[0-9]+$/,\n    resolve: str => parseFloat(str),\n    stringify(node) {\n        const num = Number(node.value);\n        return isFinite(num) ? num.toExponential() : stringifyNumber.stringifyNumber(node);\n    }\n};\nconst float = {\n    identify: value => typeof value === 'number',\n    default: true,\n    tag: 'tag:yaml.org,2002:float',\n    test: /^[-+]?(?:\\.[0-9]+|[0-9]+\\.[0-9]*)$/,\n    resolve(str) {\n        const node = new Scalar.Scalar(parseFloat(str));\n        const dot = str.indexOf('.');\n        if (dot !== -1 && str[str.length - 1] === '0')\n            node.minFractionDigits = str.length - dot - 1;\n        return node;\n    },\n    stringify: stringifyNumber.stringifyNumber\n};\n\nexports.float = float;\nexports.floatExp = floatExp;\nexports.floatNaN = floatNaN;\n","'use strict';\n\nvar stringifyNumber = require('../../stringify/stringifyNumber.js');\n\nconst intIdentify = (value) => typeof value === 'bigint' || Number.isInteger(value);\nconst intResolve = (str, offset, radix, { intAsBigInt }) => (intAsBigInt ? BigInt(str) : parseInt(str.substring(offset), radix));\nfunction intStringify(node, radix, prefix) {\n    const { value } = node;\n    if (intIdentify(value) && value >= 0)\n        return prefix + value.toString(radix);\n    return stringifyNumber.stringifyNumber(node);\n}\nconst intOct = {\n    identify: value => intIdentify(value) && value >= 0,\n    default: true,\n    tag: 'tag:yaml.org,2002:int',\n    format: 'OCT',\n    test: /^0o[0-7]+$/,\n    resolve: (str, _onError, opt) => intResolve(str, 2, 8, opt),\n    stringify: node => intStringify(node, 8, '0o')\n};\nconst int = {\n    identify: intIdentify,\n    default: true,\n    tag: 'tag:yaml.org,2002:int',\n    test: /^[-+]?[0-9]+$/,\n    resolve: (str, _onError, opt) => intResolve(str, 0, 10, opt),\n    stringify: stringifyNumber.stringifyNumber\n};\nconst intHex = {\n    identify: value => intIdentify(value) && value >= 0,\n    default: true,\n    tag: 'tag:yaml.org,2002:int',\n    format: 'HEX',\n    test: /^0x[0-9a-fA-F]+$/,\n    resolve: (str, _onError, opt) => intResolve(str, 2, 16, opt),\n    stringify: node => intStringify(node, 16, '0x')\n};\n\nexports.int = int;\nexports.intHex = intHex;\nexports.intOct = intOct;\n","'use strict';\n\nvar map = require('../common/map.js');\nvar _null = require('../common/null.js');\nvar seq = require('../common/seq.js');\nvar string = require('../common/string.js');\nvar bool = require('./bool.js');\nvar float = require('./float.js');\nvar int = require('./int.js');\n\nconst schema = [\n    map.map,\n    seq.seq,\n    string.string,\n    _null.nullTag,\n    bool.boolTag,\n    int.intOct,\n    int.int,\n    int.intHex,\n    float.floatNaN,\n    float.floatExp,\n    float.float\n];\n\nexports.schema = schema;\n","'use strict';\n\nvar Scalar = require('../../nodes/Scalar.js');\nvar map = require('../common/map.js');\nvar seq = require('../common/seq.js');\n\nfunction intIdentify(value) {\n    return typeof value === 'bigint' || Number.isInteger(value);\n}\nconst stringifyJSON = ({ value }) => JSON.stringify(value);\nconst jsonScalars = [\n    {\n        identify: value => typeof value === 'string',\n        default: true,\n        tag: 'tag:yaml.org,2002:str',\n        resolve: str => str,\n        stringify: stringifyJSON\n    },\n    {\n        identify: value => value == null,\n        createNode: () => new Scalar.Scalar(null),\n        default: true,\n        tag: 'tag:yaml.org,2002:null',\n        test: /^null$/,\n        resolve: () => null,\n        stringify: stringifyJSON\n    },\n    {\n        identify: value => typeof value === 'boolean',\n        default: true,\n        tag: 'tag:yaml.org,2002:bool',\n        test: /^true$|^false$/,\n        resolve: str => str === 'true',\n        stringify: stringifyJSON\n    },\n    {\n        identify: intIdentify,\n        default: true,\n        tag: 'tag:yaml.org,2002:int',\n        test: /^-?(?:0|[1-9][0-9]*)$/,\n        resolve: (str, _onError, { intAsBigInt }) => intAsBigInt ? BigInt(str) : parseInt(str, 10),\n        stringify: ({ value }) => intIdentify(value) ? value.toString() : JSON.stringify(value)\n    },\n    {\n        identify: value => typeof value === 'number',\n        default: true,\n        tag: 'tag:yaml.org,2002:float',\n        test: /^-?(?:0|[1-9][0-9]*)(?:\\.[0-9]*)?(?:[eE][-+]?[0-9]+)?$/,\n        resolve: str => parseFloat(str),\n        stringify: stringifyJSON\n    }\n];\nconst jsonError = {\n    default: true,\n    tag: '',\n    test: /^/,\n    resolve(str, onError) {\n        onError(`Unresolved plain scalar ${JSON.stringify(str)}`);\n        return str;\n    }\n};\nconst schema = [map.map, seq.seq].concat(jsonScalars, jsonError);\n\nexports.schema = schema;\n","'use strict';\n\nvar node_buffer = require('buffer');\nvar Scalar = require('../../nodes/Scalar.js');\nvar stringifyString = require('../../stringify/stringifyString.js');\n\nconst binary = {\n    identify: value => value instanceof Uint8Array, // Buffer inherits from Uint8Array\n    default: false,\n    tag: 'tag:yaml.org,2002:binary',\n    /**\n     * Returns a Buffer in node and an Uint8Array in browsers\n     *\n     * To use the resulting buffer as an image, you'll want to do something like:\n     *\n     *   const blob = new Blob([buffer], { type: 'image/jpeg' })\n     *   document.querySelector('#photo').src = URL.createObjectURL(blob)\n     */\n    resolve(src, onError) {\n        if (typeof node_buffer.Buffer === 'function') {\n            return node_buffer.Buffer.from(src, 'base64');\n        }\n        else if (typeof atob === 'function') {\n            // On IE 11, atob() can't handle newlines\n            const str = atob(src.replace(/[\\n\\r]/g, ''));\n            const buffer = new Uint8Array(str.length);\n            for (let i = 0; i < str.length; ++i)\n                buffer[i] = str.charCodeAt(i);\n            return buffer;\n        }\n        else {\n            onError('This environment does not support reading binary tags; either Buffer or atob is required');\n            return src;\n        }\n    },\n    stringify({ comment, type, value }, ctx, onComment, onChompKeep) {\n        if (!value)\n            return '';\n        const buf = value; // checked earlier by binary.identify()\n        let str;\n        if (typeof node_buffer.Buffer === 'function') {\n            str =\n                buf instanceof node_buffer.Buffer\n                    ? buf.toString('base64')\n                    : node_buffer.Buffer.from(buf.buffer).toString('base64');\n        }\n        else if (typeof btoa === 'function') {\n            let s = '';\n            for (let i = 0; i < buf.length; ++i)\n                s += String.fromCharCode(buf[i]);\n            str = btoa(s);\n        }\n        else {\n            throw new Error('This environment does not support writing binary tags; either Buffer or btoa is required');\n        }\n        type ?? (type = Scalar.Scalar.BLOCK_LITERAL);\n        if (type !== Scalar.Scalar.QUOTE_DOUBLE) {\n            const lineWidth = Math.max(ctx.options.lineWidth - ctx.indent.length, ctx.options.minContentWidth);\n            const n = Math.ceil(str.length / lineWidth);\n            const lines = new Array(n);\n            for (let i = 0, o = 0; i < n; ++i, o += lineWidth) {\n                lines[i] = str.substr(o, lineWidth);\n            }\n            str = lines.join(type === Scalar.Scalar.BLOCK_LITERAL ? '\\n' : ' ');\n        }\n        return stringifyString.stringifyString({ comment, type, value: str }, ctx, onComment, onChompKeep);\n    }\n};\n\nexports.binary = binary;\n","'use strict';\n\nvar identity = require('../../nodes/identity.js');\nvar Pair = require('../../nodes/Pair.js');\nvar Scalar = require('../../nodes/Scalar.js');\nvar YAMLSeq = require('../../nodes/YAMLSeq.js');\n\nfunction resolvePairs(seq, onError) {\n    if (identity.isSeq(seq)) {\n        for (let i = 0; i < seq.items.length; ++i) {\n            let item = seq.items[i];\n            if (identity.isPair(item))\n                continue;\n            else if (identity.isMap(item)) {\n                if (item.items.length > 1)\n                    onError('Each pair must have its own sequence indicator');\n                const pair = item.items[0] || new Pair.Pair(new Scalar.Scalar(null));\n                if (item.commentBefore)\n                    pair.key.commentBefore = pair.key.commentBefore\n                        ? `${item.commentBefore}\\n${pair.key.commentBefore}`\n                        : item.commentBefore;\n                if (item.comment) {\n                    const cn = pair.value ?? pair.key;\n                    cn.comment = cn.comment\n                        ? `${item.comment}\\n${cn.comment}`\n                        : item.comment;\n                }\n                item = pair;\n            }\n            seq.items[i] = identity.isPair(item) ? item : new Pair.Pair(item);\n        }\n    }\n    else\n        onError('Expected a sequence for this tag');\n    return seq;\n}\nfunction createPairs(schema, iterable, ctx) {\n    const { replacer } = ctx;\n    const pairs = new YAMLSeq.YAMLSeq(schema);\n    pairs.tag = 'tag:yaml.org,2002:pairs';\n    let i = 0;\n    if (iterable && Symbol.iterator in Object(iterable))\n        for (let it of iterable) {\n            if (typeof replacer === 'function')\n                it = replacer.call(iterable, String(i++), it);\n            let key, value;\n            if (Array.isArray(it)) {\n                if (it.length === 2) {\n                    key = it[0];\n                    value = it[1];\n                }\n                else\n                    throw new TypeError(`Expected [key, value] tuple: ${it}`);\n            }\n            else if (it && it instanceof Object) {\n                const keys = Object.keys(it);\n                if (keys.length === 1) {\n                    key = keys[0];\n                    value = it[key];\n                }\n                else {\n                    throw new TypeError(`Expected tuple with one key, not ${keys.length} keys`);\n                }\n            }\n            else {\n                key = it;\n            }\n            pairs.items.push(Pair.createPair(key, value, ctx));\n        }\n    return pairs;\n}\nconst pairs = {\n    collection: 'seq',\n    default: false,\n    tag: 'tag:yaml.org,2002:pairs',\n    resolve: resolvePairs,\n    createNode: createPairs\n};\n\nexports.createPairs = createPairs;\nexports.pairs = pairs;\nexports.resolvePairs = resolvePairs;\n","'use strict';\n\nvar identity = require('../../nodes/identity.js');\nvar toJS = require('../../nodes/toJS.js');\nvar YAMLMap = require('../../nodes/YAMLMap.js');\nvar YAMLSeq = require('../../nodes/YAMLSeq.js');\nvar pairs = require('./pairs.js');\n\nclass YAMLOMap extends YAMLSeq.YAMLSeq {\n    constructor() {\n        super();\n        this.add = YAMLMap.YAMLMap.prototype.add.bind(this);\n        this.delete = YAMLMap.YAMLMap.prototype.delete.bind(this);\n        this.get = YAMLMap.YAMLMap.prototype.get.bind(this);\n        this.has = YAMLMap.YAMLMap.prototype.has.bind(this);\n        this.set = YAMLMap.YAMLMap.prototype.set.bind(this);\n        this.tag = YAMLOMap.tag;\n    }\n    /**\n     * If `ctx` is given, the return type is actually `Map<unknown, unknown>`,\n     * but TypeScript won't allow widening the signature of a child method.\n     */\n    toJSON(_, ctx) {\n        if (!ctx)\n            return super.toJSON(_);\n        const map = new Map();\n        if (ctx?.onCreate)\n            ctx.onCreate(map);\n        for (const pair of this.items) {\n            let key, value;\n            if (identity.isPair(pair)) {\n                key = toJS.toJS(pair.key, '', ctx);\n                value = toJS.toJS(pair.value, key, ctx);\n            }\n            else {\n                key = toJS.toJS(pair, '', ctx);\n            }\n            if (map.has(key))\n                throw new Error('Ordered maps must not include duplicate keys');\n            map.set(key, value);\n        }\n        return map;\n    }\n    static from(schema, iterable, ctx) {\n        const pairs$1 = pairs.createPairs(schema, iterable, ctx);\n        const omap = new this();\n        omap.items = pairs$1.items;\n        return omap;\n    }\n}\nYAMLOMap.tag = 'tag:yaml.org,2002:omap';\nconst omap = {\n    collection: 'seq',\n    identify: value => value instanceof Map,\n    nodeClass: YAMLOMap,\n    default: false,\n    tag: 'tag:yaml.org,2002:omap',\n    resolve(seq, onError) {\n        const pairs$1 = pairs.resolvePairs(seq, onError);\n        const seenKeys = [];\n        for (const { key } of pairs$1.items) {\n            if (identity.isScalar(key)) {\n                if (seenKeys.includes(key.value)) {\n                    onError(`Ordered maps must not include duplicate keys: ${key.value}`);\n                }\n                else {\n                    seenKeys.push(key.value);\n                }\n            }\n        }\n        return Object.assign(new YAMLOMap(), pairs$1);\n    },\n    createNode: (schema, iterable, ctx) => YAMLOMap.from(schema, iterable, ctx)\n};\n\nexports.YAMLOMap = YAMLOMap;\nexports.omap = omap;\n","'use strict';\n\nvar Scalar = require('../../nodes/Scalar.js');\n\nfunction boolStringify({ value, source }, ctx) {\n    const boolObj = value ? trueTag : falseTag;\n    if (source && boolObj.test.test(source))\n        return source;\n    return value ? ctx.options.trueStr : ctx.options.falseStr;\n}\nconst trueTag = {\n    identify: value => value === true,\n    default: true,\n    tag: 'tag:yaml.org,2002:bool',\n    test: /^(?:Y|y|[Yy]es|YES|[Tt]rue|TRUE|[Oo]n|ON)$/,\n    resolve: () => new Scalar.Scalar(true),\n    stringify: boolStringify\n};\nconst falseTag = {\n    identify: value => value === false,\n    default: true,\n    tag: 'tag:yaml.org,2002:bool',\n    test: /^(?:N|n|[Nn]o|NO|[Ff]alse|FALSE|[Oo]ff|OFF)$/,\n    resolve: () => new Scalar.Scalar(false),\n    stringify: boolStringify\n};\n\nexports.falseTag = falseTag;\nexports.trueTag = trueTag;\n","'use strict';\n\nvar Scalar = require('../../nodes/Scalar.js');\nvar stringifyNumber = require('../../stringify/stringifyNumber.js');\n\nconst floatNaN = {\n    identify: value => typeof value === 'number',\n    default: true,\n    tag: 'tag:yaml.org,2002:float',\n    test: /^(?:[-+]?\\.(?:inf|Inf|INF)|\\.nan|\\.NaN|\\.NAN)$/,\n    resolve: (str) => str.slice(-3).toLowerCase() === 'nan'\n        ? NaN\n        : str[0] === '-'\n            ? Number.NEGATIVE_INFINITY\n            : Number.POSITIVE_INFINITY,\n    stringify: stringifyNumber.stringifyNumber\n};\nconst floatExp = {\n    identify: value => typeof value === 'number',\n    default: true,\n    tag: 'tag:yaml.org,2002:float',\n    format: 'EXP',\n    test: /^[-+]?(?:[0-9][0-9_]*)?(?:\\.[0-9_]*)?[eE][-+]?[0-9]+$/,\n    resolve: (str) => parseFloat(str.replace(/_/g, '')),\n    stringify(node) {\n        const num = Number(node.value);\n        return isFinite(num) ? num.toExponential() : stringifyNumber.stringifyNumber(node);\n    }\n};\nconst float = {\n    identify: value => typeof value === 'number',\n    default: true,\n    tag: 'tag:yaml.org,2002:float',\n    test: /^[-+]?(?:[0-9][0-9_]*)?\\.[0-9_]*$/,\n    resolve(str) {\n        const node = new Scalar.Scalar(parseFloat(str.replace(/_/g, '')));\n        const dot = str.indexOf('.');\n        if (dot !== -1) {\n            const f = str.substring(dot + 1).replace(/_/g, '');\n            if (f[f.length - 1] === '0')\n                node.minFractionDigits = f.length;\n        }\n        return node;\n    },\n    stringify: stringifyNumber.stringifyNumber\n};\n\nexports.float = float;\nexports.floatExp = floatExp;\nexports.floatNaN = floatNaN;\n","'use strict';\n\nvar stringifyNumber = require('../../stringify/stringifyNumber.js');\n\nconst intIdentify = (value) => typeof value === 'bigint' || Number.isInteger(value);\nfunction intResolve(str, offset, radix, { intAsBigInt }) {\n    const sign = str[0];\n    if (sign === '-' || sign === '+')\n        offset += 1;\n    str = str.substring(offset).replace(/_/g, '');\n    if (intAsBigInt) {\n        switch (radix) {\n            case 2:\n                str = `0b${str}`;\n                break;\n            case 8:\n                str = `0o${str}`;\n                break;\n            case 16:\n                str = `0x${str}`;\n                break;\n        }\n        const n = BigInt(str);\n        return sign === '-' ? BigInt(-1) * n : n;\n    }\n    const n = parseInt(str, radix);\n    return sign === '-' ? -1 * n : n;\n}\nfunction intStringify(node, radix, prefix) {\n    const { value } = node;\n    if (intIdentify(value)) {\n        const str = value.toString(radix);\n        return value < 0 ? '-' + prefix + str.substr(1) : prefix + str;\n    }\n    return stringifyNumber.stringifyNumber(node);\n}\nconst intBin = {\n    identify: intIdentify,\n    default: true,\n    tag: 'tag:yaml.org,2002:int',\n    format: 'BIN',\n    test: /^[-+]?0b[0-1_]+$/,\n    resolve: (str, _onError, opt) => intResolve(str, 2, 2, opt),\n    stringify: node => intStringify(node, 2, '0b')\n};\nconst intOct = {\n    identify: intIdentify,\n    default: true,\n    tag: 'tag:yaml.org,2002:int',\n    format: 'OCT',\n    test: /^[-+]?0[0-7_]+$/,\n    resolve: (str, _onError, opt) => intResolve(str, 1, 8, opt),\n    stringify: node => intStringify(node, 8, '0')\n};\nconst int = {\n    identify: intIdentify,\n    default: true,\n    tag: 'tag:yaml.org,2002:int',\n    test: /^[-+]?[0-9][0-9_]*$/,\n    resolve: (str, _onError, opt) => intResolve(str, 0, 10, opt),\n    stringify: stringifyNumber.stringifyNumber\n};\nconst intHex = {\n    identify: intIdentify,\n    default: true,\n    tag: 'tag:yaml.org,2002:int',\n    format: 'HEX',\n    test: /^[-+]?0x[0-9a-fA-F_]+$/,\n    resolve: (str, _onError, opt) => intResolve(str, 2, 16, opt),\n    stringify: node => intStringify(node, 16, '0x')\n};\n\nexports.int = int;\nexports.intBin = intBin;\nexports.intHex = intHex;\nexports.intOct = intOct;\n","'use strict';\n\nvar identity = require('../../nodes/identity.js');\nvar Pair = require('../../nodes/Pair.js');\nvar YAMLMap = require('../../nodes/YAMLMap.js');\n\nclass YAMLSet extends YAMLMap.YAMLMap {\n    constructor(schema) {\n        super(schema);\n        this.tag = YAMLSet.tag;\n    }\n    add(key) {\n        let pair;\n        if (identity.isPair(key))\n            pair = key;\n        else if (key &&\n            typeof key === 'object' &&\n            'key' in key &&\n            'value' in key &&\n            key.value === null)\n            pair = new Pair.Pair(key.key, null);\n        else\n            pair = new Pair.Pair(key, null);\n        const prev = YAMLMap.findPair(this.items, pair.key);\n        if (!prev)\n            this.items.push(pair);\n    }\n    /**\n     * If `keepPair` is `true`, returns the Pair matching `key`.\n     * Otherwise, returns the value of that Pair's key.\n     */\n    get(key, keepPair) {\n        const pair = YAMLMap.findPair(this.items, key);\n        return !keepPair && identity.isPair(pair)\n            ? identity.isScalar(pair.key)\n                ? pair.key.value\n                : pair.key\n            : pair;\n    }\n    set(key, value) {\n        if (typeof value !== 'boolean')\n            throw new Error(`Expected boolean value for set(key, value) in a YAML set, not ${typeof value}`);\n        const prev = YAMLMap.findPair(this.items, key);\n        if (prev && !value) {\n            this.items.splice(this.items.indexOf(prev), 1);\n        }\n        else if (!prev && value) {\n            this.items.push(new Pair.Pair(key));\n        }\n    }\n    toJSON(_, ctx) {\n        return super.toJSON(_, ctx, Set);\n    }\n    toString(ctx, onComment, onChompKeep) {\n        if (!ctx)\n            return JSON.stringify(this);\n        if (this.hasAllNullValues(true))\n            return super.toString(Object.assign({}, ctx, { allNullValues: true }), onComment, onChompKeep);\n        else\n            throw new Error('Set items must all have null values');\n    }\n    static from(schema, iterable, ctx) {\n        const { replacer } = ctx;\n        const set = new this(schema);\n        if (iterable && Symbol.iterator in Object(iterable))\n            for (let value of iterable) {\n                if (typeof replacer === 'function')\n                    value = replacer.call(iterable, value, value);\n                set.items.push(Pair.createPair(value, null, ctx));\n            }\n        return set;\n    }\n}\nYAMLSet.tag = 'tag:yaml.org,2002:set';\nconst set = {\n    collection: 'map',\n    identify: value => value instanceof Set,\n    nodeClass: YAMLSet,\n    default: false,\n    tag: 'tag:yaml.org,2002:set',\n    createNode: (schema, iterable, ctx) => YAMLSet.from(schema, iterable, ctx),\n    resolve(map, onError) {\n        if (identity.isMap(map)) {\n            if (map.hasAllNullValues(true))\n                return Object.assign(new YAMLSet(), map);\n            else\n                onError('Set items must all have null values');\n        }\n        else\n            onError('Expected a mapping for this tag');\n        return map;\n    }\n};\n\nexports.YAMLSet = YAMLSet;\nexports.set = set;\n","'use strict';\n\nvar stringifyNumber = require('../../stringify/stringifyNumber.js');\n\n/** Internal types handle bigint as number, because TS can't figure it out. */\nfunction parseSexagesimal(str, asBigInt) {\n    const sign = str[0];\n    const parts = sign === '-' || sign === '+' ? str.substring(1) : str;\n    const num = (n) => asBigInt ? BigInt(n) : Number(n);\n    const res = parts\n        .replace(/_/g, '')\n        .split(':')\n        .reduce((res, p) => res * num(60) + num(p), num(0));\n    return (sign === '-' ? num(-1) * res : res);\n}\n/**\n * hhhh:mm:ss.sss\n *\n * Internal types handle bigint as number, because TS can't figure it out.\n */\nfunction stringifySexagesimal(node) {\n    let { value } = node;\n    let num = (n) => n;\n    if (typeof value === 'bigint')\n        num = n => BigInt(n);\n    else if (isNaN(value) || !isFinite(value))\n        return stringifyNumber.stringifyNumber(node);\n    let sign = '';\n    if (value < 0) {\n        sign = '-';\n        value *= num(-1);\n    }\n    const _60 = num(60);\n    const parts = [value % _60]; // seconds, including ms\n    if (value < 60) {\n        parts.unshift(0); // at least one : is required\n    }\n    else {\n        value = (value - parts[0]) / _60;\n        parts.unshift(value % _60); // minutes\n        if (value >= 60) {\n            value = (value - parts[0]) / _60;\n            parts.unshift(value); // hours\n        }\n    }\n    return (sign +\n        parts\n            .map(n => String(n).padStart(2, '0'))\n            .join(':')\n            .replace(/000000\\d*$/, '') // % 60 may introduce error\n    );\n}\nconst intTime = {\n    identify: value => typeof value === 'bigint' || Number.isInteger(value),\n    default: true,\n    tag: 'tag:yaml.org,2002:int',\n    format: 'TIME',\n    test: /^[-+]?[0-9][0-9_]*(?::[0-5]?[0-9])+$/,\n    resolve: (str, _onError, { intAsBigInt }) => parseSexagesimal(str, intAsBigInt),\n    stringify: stringifySexagesimal\n};\nconst floatTime = {\n    identify: value => typeof value === 'number',\n    default: true,\n    tag: 'tag:yaml.org,2002:float',\n    format: 'TIME',\n    test: /^[-+]?[0-9][0-9_]*(?::[0-5]?[0-9])+\\.[0-9_]*$/,\n    resolve: str => parseSexagesimal(str, false),\n    stringify: stringifySexagesimal\n};\nconst timestamp = {\n    identify: value => value instanceof Date,\n    default: true,\n    tag: 'tag:yaml.org,2002:timestamp',\n    // If the time zone is omitted, the timestamp is assumed to be specified in UTC. The time part\n    // may be omitted altogether, resulting in a date format. In such a case, the time part is\n    // assumed to be 00:00:00Z (start of day, UTC).\n    test: RegExp('^([0-9]{4})-([0-9]{1,2})-([0-9]{1,2})' + // YYYY-Mm-Dd\n        '(?:' + // time is optional\n        '(?:t|T|[ \\\\t]+)' + // t | T | whitespace\n        '([0-9]{1,2}):([0-9]{1,2}):([0-9]{1,2}(\\\\.[0-9]+)?)' + // Hh:Mm:Ss(.ss)?\n        '(?:[ \\\\t]*(Z|[-+][012]?[0-9](?::[0-9]{2})?))?' + // Z | +5 | -03:30\n        ')?$'),\n    resolve(str) {\n        const match = str.match(timestamp.test);\n        if (!match)\n            throw new Error('!!timestamp expects a date, starting with yyyy-mm-dd');\n        const [, year, month, day, hour, minute, second] = match.map(Number);\n        const millisec = match[7] ? Number((match[7] + '00').substr(1, 3)) : 0;\n        let date = Date.UTC(year, month - 1, day, hour || 0, minute || 0, second || 0, millisec);\n        const tz = match[8];\n        if (tz && tz !== 'Z') {\n            let d = parseSexagesimal(tz, false);\n            if (Math.abs(d) < 30)\n                d *= 60;\n            date -= 60000 * d;\n        }\n        return new Date(date);\n    },\n    stringify: ({ value }) => value?.toISOString().replace(/(T00:00:00)?\\.000Z$/, '') ?? ''\n};\n\nexports.floatTime = floatTime;\nexports.intTime = intTime;\nexports.timestamp = timestamp;\n","'use strict';\n\nvar map = require('../common/map.js');\nvar _null = require('../common/null.js');\nvar seq = require('../common/seq.js');\nvar string = require('../common/string.js');\nvar binary = require('./binary.js');\nvar bool = require('./bool.js');\nvar float = require('./float.js');\nvar int = require('./int.js');\nvar merge = require('./merge.js');\nvar omap = require('./omap.js');\nvar pairs = require('./pairs.js');\nvar set = require('./set.js');\nvar timestamp = require('./timestamp.js');\n\nconst schema = [\n    map.map,\n    seq.seq,\n    string.string,\n    _null.nullTag,\n    bool.trueTag,\n    bool.falseTag,\n    int.intBin,\n    int.intOct,\n    int.int,\n    int.intHex,\n    float.floatNaN,\n    float.floatExp,\n    float.float,\n    binary.binary,\n    merge.merge,\n    omap.omap,\n    pairs.pairs,\n    set.set,\n    timestamp.intTime,\n    timestamp.floatTime,\n    timestamp.timestamp\n];\n\nexports.schema = schema;\n","'use strict';\n\nvar map = require('./common/map.js');\nvar _null = require('./common/null.js');\nvar seq = require('./common/seq.js');\nvar string = require('./common/string.js');\nvar bool = require('./core/bool.js');\nvar float = require('./core/float.js');\nvar int = require('./core/int.js');\nvar schema = require('./core/schema.js');\nvar schema$1 = require('./json/schema.js');\nvar binary = require('./yaml-1.1/binary.js');\nvar merge = require('./yaml-1.1/merge.js');\nvar omap = require('./yaml-1.1/omap.js');\nvar pairs = require('./yaml-1.1/pairs.js');\nvar schema$2 = require('./yaml-1.1/schema.js');\nvar set = require('./yaml-1.1/set.js');\nvar timestamp = require('./yaml-1.1/timestamp.js');\n\nconst schemas = new Map([\n    ['core', schema.schema],\n    ['failsafe', [map.map, seq.seq, string.string]],\n    ['json', schema$1.schema],\n    ['yaml11', schema$2.schema],\n    ['yaml-1.1', schema$2.schema]\n]);\nconst tagsByName = {\n    binary: binary.binary,\n    bool: bool.boolTag,\n    float: float.float,\n    floatExp: float.floatExp,\n    floatNaN: float.floatNaN,\n    floatTime: timestamp.floatTime,\n    int: int.int,\n    intHex: int.intHex,\n    intOct: int.intOct,\n    intTime: timestamp.intTime,\n    map: map.map,\n    merge: merge.merge,\n    null: _null.nullTag,\n    omap: omap.omap,\n    pairs: pairs.pairs,\n    seq: seq.seq,\n    set: set.set,\n    timestamp: timestamp.timestamp\n};\nconst coreKnownTags = {\n    'tag:yaml.org,2002:binary': binary.binary,\n    'tag:yaml.org,2002:merge': merge.merge,\n    'tag:yaml.org,2002:omap': omap.omap,\n    'tag:yaml.org,2002:pairs': pairs.pairs,\n    'tag:yaml.org,2002:set': set.set,\n    'tag:yaml.org,2002:timestamp': timestamp.timestamp\n};\nfunction getTags(customTags, schemaName, addMergeTag) {\n    const schemaTags = schemas.get(schemaName);\n    if (schemaTags && !customTags) {\n        return addMergeTag && !schemaTags.includes(merge.merge)\n            ? schemaTags.concat(merge.merge)\n            : schemaTags.slice();\n    }\n    let tags = schemaTags;\n    if (!tags) {\n        if (Array.isArray(customTags))\n            tags = [];\n        else {\n            const keys = Array.from(schemas.keys())\n                .filter(key => key !== 'yaml11')\n                .map(key => JSON.stringify(key))\n                .join(', ');\n            throw new Error(`Unknown schema \"${schemaName}\"; use one of ${keys} or define customTags array`);\n        }\n    }\n    if (Array.isArray(customTags)) {\n        for (const tag of customTags)\n            tags = tags.concat(tag);\n    }\n    else if (typeof customTags === 'function') {\n        tags = customTags(tags.slice());\n    }\n    if (addMergeTag)\n        tags = tags.concat(merge.merge);\n    return tags.reduce((tags, tag) => {\n        const tagObj = typeof tag === 'string' ? tagsByName[tag] : tag;\n        if (!tagObj) {\n            const tagName = JSON.stringify(tag);\n            const keys = Object.keys(tagsByName)\n                .map(key => JSON.stringify(key))\n                .join(', ');\n            throw new Error(`Unknown custom tag ${tagName}; use one of ${keys}`);\n        }\n        if (!tags.includes(tagObj))\n            tags.push(tagObj);\n        return tags;\n    }, []);\n}\n\nexports.coreKnownTags = coreKnownTags;\nexports.getTags = getTags;\n","'use strict';\n\nvar identity = require('../nodes/identity.js');\nvar map = require('./common/map.js');\nvar seq = require('./common/seq.js');\nvar string = require('./common/string.js');\nvar tags = require('./tags.js');\n\nconst sortMapEntriesByKey = (a, b) => a.key < b.key ? -1 : a.key > b.key ? 1 : 0;\nclass Schema {\n    constructor({ compat, customTags, merge, resolveKnownTags, schema, sortMapEntries, toStringDefaults }) {\n        this.compat = Array.isArray(compat)\n            ? tags.getTags(compat, 'compat')\n            : compat\n                ? tags.getTags(null, compat)\n                : null;\n        this.name = (typeof schema === 'string' && schema) || 'core';\n        this.knownTags = resolveKnownTags ? tags.coreKnownTags : {};\n        this.tags = tags.getTags(customTags, this.name, merge);\n        this.toStringOptions = toStringDefaults ?? null;\n        Object.defineProperty(this, identity.MAP, { value: map.map });\n        Object.defineProperty(this, identity.SCALAR, { value: string.string });\n        Object.defineProperty(this, identity.SEQ, { value: seq.seq });\n        // Used by createMap()\n        this.sortMapEntries =\n            typeof sortMapEntries === 'function'\n                ? sortMapEntries\n                : sortMapEntries === true\n                    ? sortMapEntriesByKey\n                    : null;\n    }\n    clone() {\n        const copy = Object.create(Schema.prototype, Object.getOwnPropertyDescriptors(this));\n        copy.tags = this.tags.slice();\n        return copy;\n    }\n}\n\nexports.Schema = Schema;\n","'use strict';\n\nvar identity = require('../nodes/identity.js');\nvar stringify = require('./stringify.js');\nvar stringifyComment = require('./stringifyComment.js');\n\nfunction stringifyDocument(doc, options) {\n    const lines = [];\n    let hasDirectives = options.directives === true;\n    if (options.directives !== false && doc.directives) {\n        const dir = doc.directives.toString(doc);\n        if (dir) {\n            lines.push(dir);\n            hasDirectives = true;\n        }\n        else if (doc.directives.docStart)\n            hasDirectives = true;\n    }\n    if (hasDirectives)\n        lines.push('---');\n    const ctx = stringify.createStringifyContext(doc, options);\n    const { commentString } = ctx.options;\n    if (doc.commentBefore) {\n        if (lines.length !== 1)\n            lines.unshift('');\n        const cs = commentString(doc.commentBefore);\n        lines.unshift(stringifyComment.indentComment(cs, ''));\n    }\n    let chompKeep = false;\n    let contentComment = null;\n    if (doc.contents) {\n        if (identity.isNode(doc.contents)) {\n            if (doc.contents.spaceBefore && hasDirectives)\n                lines.push('');\n            if (doc.contents.commentBefore) {\n                const cs = commentString(doc.contents.commentBefore);\n                lines.push(stringifyComment.indentComment(cs, ''));\n            }\n            // top-level block scalars need to be indented if followed by a comment\n            ctx.forceBlockIndent = !!doc.comment;\n            contentComment = doc.contents.comment;\n        }\n        const onChompKeep = contentComment ? undefined : () => (chompKeep = true);\n        let body = stringify.stringify(doc.contents, ctx, () => (contentComment = null), onChompKeep);\n        if (contentComment)\n            body += stringifyComment.lineComment(body, '', commentString(contentComment));\n        if ((body[0] === '|' || body[0] === '>') &&\n            lines[lines.length - 1] === '---') {\n            // Top-level block scalars with a preceding doc marker ought to use the\n            // same line for their header.\n            lines[lines.length - 1] = `--- ${body}`;\n        }\n        else\n            lines.push(body);\n    }\n    else {\n        lines.push(stringify.stringify(doc.contents, ctx));\n    }\n    if (doc.directives?.docEnd) {\n        if (doc.comment) {\n            const cs = commentString(doc.comment);\n            if (cs.includes('\\n')) {\n                lines.push('...');\n                lines.push(stringifyComment.indentComment(cs, ''));\n            }\n            else {\n                lines.push(`... ${cs}`);\n            }\n        }\n        else {\n            lines.push('...');\n        }\n    }\n    else {\n        let dc = doc.comment;\n        if (dc && chompKeep)\n            dc = dc.replace(/^\\n+/, '');\n        if (dc) {\n            if ((!chompKeep || contentComment) && lines[lines.length - 1] !== '')\n                lines.push('');\n            lines.push(stringifyComment.indentComment(commentString(dc), ''));\n        }\n    }\n    return lines.join('\\n') + '\\n';\n}\n\nexports.stringifyDocument = stringifyDocument;\n","'use strict';\n\nvar Alias = require('../nodes/Alias.js');\nvar Collection = require('../nodes/Collection.js');\nvar identity = require('../nodes/identity.js');\nvar Pair = require('../nodes/Pair.js');\nvar toJS = require('../nodes/toJS.js');\nvar Schema = require('../schema/Schema.js');\nvar stringifyDocument = require('../stringify/stringifyDocument.js');\nvar anchors = require('./anchors.js');\nvar applyReviver = require('./applyReviver.js');\nvar createNode = require('./createNode.js');\nvar directives = require('./directives.js');\n\nclass Document {\n    constructor(value, replacer, options) {\n        /** A comment before this Document */\n        this.commentBefore = null;\n        /** A comment immediately after this Document */\n        this.comment = null;\n        /** Errors encountered during parsing. */\n        this.errors = [];\n        /** Warnings encountered during parsing. */\n        this.warnings = [];\n        Object.defineProperty(this, identity.NODE_TYPE, { value: identity.DOC });\n        let _replacer = null;\n        if (typeof replacer === 'function' || Array.isArray(replacer)) {\n            _replacer = replacer;\n        }\n        else if (options === undefined && replacer) {\n            options = replacer;\n            replacer = undefined;\n        }\n        const opt = Object.assign({\n            intAsBigInt: false,\n            keepSourceTokens: false,\n            logLevel: 'warn',\n            prettyErrors: true,\n            strict: true,\n            stringKeys: false,\n            uniqueKeys: true,\n            version: '1.2'\n        }, options);\n        this.options = opt;\n        let { version } = opt;\n        if (options?._directives) {\n            this.directives = options._directives.atDocument();\n            if (this.directives.yaml.explicit)\n                version = this.directives.yaml.version;\n        }\n        else\n            this.directives = new directives.Directives({ version });\n        this.setSchema(version, options);\n        // @ts-expect-error We can't really know that this matches Contents.\n        this.contents =\n            value === undefined ? null : this.createNode(value, _replacer, options);\n    }\n    /**\n     * Create a deep copy of this Document and its contents.\n     *\n     * Custom Node values that inherit from `Object` still refer to their original instances.\n     */\n    clone() {\n        const copy = Object.create(Document.prototype, {\n            [identity.NODE_TYPE]: { value: identity.DOC }\n        });\n        copy.commentBefore = this.commentBefore;\n        copy.comment = this.comment;\n        copy.errors = this.errors.slice();\n        copy.warnings = this.warnings.slice();\n        copy.options = Object.assign({}, this.options);\n        if (this.directives)\n            copy.directives = this.directives.clone();\n        copy.schema = this.schema.clone();\n        // @ts-expect-error We can't really know that this matches Contents.\n        copy.contents = identity.isNode(this.contents)\n            ? this.contents.clone(copy.schema)\n            : this.contents;\n        if (this.range)\n            copy.range = this.range.slice();\n        return copy;\n    }\n    /** Adds a value to the document. */\n    add(value) {\n        if (assertCollection(this.contents))\n            this.contents.add(value);\n    }\n    /** Adds a value to the document. */\n    addIn(path, value) {\n        if (assertCollection(this.contents))\n            this.contents.addIn(path, value);\n    }\n    /**\n     * Create a new `Alias` node, ensuring that the target `node` has the required anchor.\n     *\n     * If `node` already has an anchor, `name` is ignored.\n     * Otherwise, the `node.anchor` value will be set to `name`,\n     * or if an anchor with that name is already present in the document,\n     * `name` will be used as a prefix for a new unique anchor.\n     * If `name` is undefined, the generated anchor will use 'a' as a prefix.\n     */\n    createAlias(node, name) {\n        if (!node.anchor) {\n            const prev = anchors.anchorNames(this);\n            node.anchor =\n                // eslint-disable-next-line @typescript-eslint/prefer-nullish-coalescing\n                !name || prev.has(name) ? anchors.findNewAnchor(name || 'a', prev) : name;\n        }\n        return new Alias.Alias(node.anchor);\n    }\n    createNode(value, replacer, options) {\n        let _replacer = undefined;\n        if (typeof replacer === 'function') {\n            value = replacer.call({ '': value }, '', value);\n            _replacer = replacer;\n        }\n        else if (Array.isArray(replacer)) {\n            const keyToStr = (v) => typeof v === 'number' || v instanceof String || v instanceof Number;\n            const asStr = replacer.filter(keyToStr).map(String);\n            if (asStr.length > 0)\n                replacer = replacer.concat(asStr);\n            _replacer = replacer;\n        }\n        else if (options === undefined && replacer) {\n            options = replacer;\n            replacer = undefined;\n        }\n        const { aliasDuplicateObjects, anchorPrefix, flow, keepUndefined, onTagObj, tag } = options ?? {};\n        const { onAnchor, setAnchors, sourceObjects } = anchors.createNodeAnchors(this, \n        // eslint-disable-next-line @typescript-eslint/prefer-nullish-coalescing\n        anchorPrefix || 'a');\n        const ctx = {\n            aliasDuplicateObjects: aliasDuplicateObjects ?? true,\n            keepUndefined: keepUndefined ?? false,\n            onAnchor,\n            onTagObj,\n            replacer: _replacer,\n            schema: this.schema,\n            sourceObjects\n        };\n        const node = createNode.createNode(value, tag, ctx);\n        if (flow && identity.isCollection(node))\n            node.flow = true;\n        setAnchors();\n        return node;\n    }\n    /**\n     * Convert a key and a value into a `Pair` using the current schema,\n     * recursively wrapping all values as `Scalar` or `Collection` nodes.\n     */\n    createPair(key, value, options = {}) {\n        const k = this.createNode(key, null, options);\n        const v = this.createNode(value, null, options);\n        return new Pair.Pair(k, v);\n    }\n    /**\n     * Removes a value from the document.\n     * @returns `true` if the item was found and removed.\n     */\n    delete(key) {\n        return assertCollection(this.contents) ? this.contents.delete(key) : false;\n    }\n    /**\n     * Removes a value from the document.\n     * @returns `true` if the item was found and removed.\n     */\n    deleteIn(path) {\n        if (Collection.isEmptyPath(path)) {\n            if (this.contents == null)\n                return false;\n            // @ts-expect-error Presumed impossible if Strict extends false\n            this.contents = null;\n            return true;\n        }\n        return assertCollection(this.contents)\n            ? this.contents.deleteIn(path)\n            : false;\n    }\n    /**\n     * Returns item at `key`, or `undefined` if not found. By default unwraps\n     * scalar values from their surrounding node; to disable set `keepScalar` to\n     * `true` (collections are always returned intact).\n     */\n    get(key, keepScalar) {\n        return identity.isCollection(this.contents)\n            ? this.contents.get(key, keepScalar)\n            : undefined;\n    }\n    /**\n     * Returns item at `path`, or `undefined` if not found. By default unwraps\n     * scalar values from their surrounding node; to disable set `keepScalar` to\n     * `true` (collections are always returned intact).\n     */\n    getIn(path, keepScalar) {\n        if (Collection.isEmptyPath(path))\n            return !keepScalar && identity.isScalar(this.contents)\n                ? this.contents.value\n                : this.contents;\n        return identity.isCollection(this.contents)\n            ? this.contents.getIn(path, keepScalar)\n            : undefined;\n    }\n    /**\n     * Checks if the document includes a value with the key `key`.\n     */\n    has(key) {\n        return identity.isCollection(this.contents) ? this.contents.has(key) : false;\n    }\n    /**\n     * Checks if the document includes a value at `path`.\n     */\n    hasIn(path) {\n        if (Collection.isEmptyPath(path))\n            return this.contents !== undefined;\n        return identity.isCollection(this.contents) ? this.contents.hasIn(path) : false;\n    }\n    /**\n     * Sets a value in this document. For `!!set`, `value` needs to be a\n     * boolean to add/remove the item from the set.\n     */\n    set(key, value) {\n        if (this.contents == null) {\n            // @ts-expect-error We can't really know that this matches Contents.\n            this.contents = Collection.collectionFromPath(this.schema, [key], value);\n        }\n        else if (assertCollection(this.contents)) {\n            this.contents.set(key, value);\n        }\n    }\n    /**\n     * Sets a value in this document. For `!!set`, `value` needs to be a\n     * boolean to add/remove the item from the set.\n     */\n    setIn(path, value) {\n        if (Collection.isEmptyPath(path)) {\n            // @ts-expect-error We can't really know that this matches Contents.\n            this.contents = value;\n        }\n        else if (this.contents == null) {\n            // @ts-expect-error We can't really know that this matches Contents.\n            this.contents = Collection.collectionFromPath(this.schema, Array.from(path), value);\n        }\n        else if (assertCollection(this.contents)) {\n            this.contents.setIn(path, value);\n        }\n    }\n    /**\n     * Change the YAML version and schema used by the document.\n     * A `null` version disables support for directives, explicit tags, anchors, and aliases.\n     * It also requires the `schema` option to be given as a `Schema` instance value.\n     *\n     * Overrides all previously set schema options.\n     */\n    setSchema(version, options = {}) {\n        if (typeof version === 'number')\n            version = String(version);\n        let opt;\n        switch (version) {\n            case '1.1':\n                if (this.directives)\n                    this.directives.yaml.version = '1.1';\n                else\n                    this.directives = new directives.Directives({ version: '1.1' });\n                opt = { resolveKnownTags: false, schema: 'yaml-1.1' };\n                break;\n            case '1.2':\n            case 'next':\n                if (this.directives)\n                    this.directives.yaml.version = version;\n                else\n                    this.directives = new directives.Directives({ version });\n                opt = { resolveKnownTags: true, schema: 'core' };\n                break;\n            case null:\n                if (this.directives)\n                    delete this.directives;\n                opt = null;\n                break;\n            default: {\n                const sv = JSON.stringify(version);\n                throw new Error(`Expected '1.1', '1.2' or null as first argument, but found: ${sv}`);\n            }\n        }\n        // Not using `instanceof Schema` to allow for duck typing\n        if (options.schema instanceof Object)\n            this.schema = options.schema;\n        else if (opt)\n            this.schema = new Schema.Schema(Object.assign(opt, options));\n        else\n            throw new Error(`With a null YAML version, the { schema: Schema } option is required`);\n    }\n    // json & jsonArg are only used from toJSON()\n    toJS({ json, jsonArg, mapAsMap, maxAliasCount, onAnchor, reviver } = {}) {\n        const ctx = {\n            anchors: new Map(),\n            doc: this,\n            keep: !json,\n            mapAsMap: mapAsMap === true,\n            mapKeyWarned: false,\n            maxAliasCount: typeof maxAliasCount === 'number' ? maxAliasCount : 100\n        };\n        const res = toJS.toJS(this.contents, jsonArg ?? '', ctx);\n        if (typeof onAnchor === 'function')\n            for (const { count, res } of ctx.anchors.values())\n                onAnchor(res, count);\n        return typeof reviver === 'function'\n            ? applyReviver.applyReviver(reviver, { '': res }, '', res)\n            : res;\n    }\n    /**\n     * A JSON representation of the document `contents`.\n     *\n     * @param jsonArg Used by `JSON.stringify` to indicate the array index or\n     *   property name.\n     */\n    toJSON(jsonArg, onAnchor) {\n        return this.toJS({ json: true, jsonArg, mapAsMap: false, onAnchor });\n    }\n    /** A YAML representation of the document. */\n    toString(options = {}) {\n        if (this.errors.length > 0)\n            throw new Error('Document with errors cannot be stringified');\n        if ('indent' in options &&\n            (!Number.isInteger(options.indent) || Number(options.indent) <= 0)) {\n            const s = JSON.stringify(options.indent);\n            throw new Error(`\"indent\" option must be a positive integer, not ${s}`);\n        }\n        return stringifyDocument.stringifyDocument(this, options);\n    }\n}\nfunction assertCollection(contents) {\n    if (identity.isCollection(contents))\n        return true;\n    throw new Error('Expected a YAML collection as document contents');\n}\n\nexports.Document = Document;\n","'use strict';\n\nclass YAMLError extends Error {\n    constructor(name, pos, code, message) {\n        super();\n        this.name = name;\n        this.code = code;\n        this.message = message;\n        this.pos = pos;\n    }\n}\nclass YAMLParseError extends YAMLError {\n    constructor(pos, code, message) {\n        super('YAMLParseError', pos, code, message);\n    }\n}\nclass YAMLWarning extends YAMLError {\n    constructor(pos, code, message) {\n        super('YAMLWarning', pos, code, message);\n    }\n}\nconst prettifyError = (src, lc) => (error) => {\n    if (error.pos[0] === -1)\n        return;\n    error.linePos = error.pos.map(pos => lc.linePos(pos));\n    const { line, col } = error.linePos[0];\n    error.message += ` at line ${line}, column ${col}`;\n    let ci = col - 1;\n    let lineStr = src\n        .substring(lc.lineStarts[line - 1], lc.lineStarts[line])\n        .replace(/[\\n\\r]+$/, '');\n    // Trim to max 80 chars, keeping col position near the middle\n    if (ci >= 60 && lineStr.length > 80) {\n        const trimStart = Math.min(ci - 39, lineStr.length - 79);\n        lineStr = '…' + lineStr.substring(trimStart);\n        ci -= trimStart - 1;\n    }\n    if (lineStr.length > 80)\n        lineStr = lineStr.substring(0, 79) + '…';\n    // Include previous line in context if pointing at line start\n    if (line > 1 && /^ *$/.test(lineStr.substring(0, ci))) {\n        // Regexp won't match if start is trimmed\n        let prev = src.substring(lc.lineStarts[line - 2], lc.lineStarts[line - 1]);\n        if (prev.length > 80)\n            prev = prev.substring(0, 79) + '…\\n';\n        lineStr = prev + lineStr;\n    }\n    if (/[^ ]/.test(lineStr)) {\n        let count = 1;\n        const end = error.linePos[1];\n        if (end?.line === line && end.col > col) {\n            count = Math.max(1, Math.min(end.col - col, 80 - ci));\n        }\n        const pointer = ' '.repeat(ci) + '^'.repeat(count);\n        error.message += `:\\n\\n${lineStr}\\n${pointer}\\n`;\n    }\n};\n\nexports.YAMLError = YAMLError;\nexports.YAMLParseError = YAMLParseError;\nexports.YAMLWarning = YAMLWarning;\nexports.prettifyError = prettifyError;\n","'use strict';\n\nfunction resolveProps(tokens, { flow, indicator, next, offset, onError, parentIndent, startOnNewline }) {\n    let spaceBefore = false;\n    let atNewline = startOnNewline;\n    let hasSpace = startOnNewline;\n    let comment = '';\n    let commentSep = '';\n    let hasNewline = false;\n    let reqSpace = false;\n    let tab = null;\n    let anchor = null;\n    let tag = null;\n    let newlineAfterProp = null;\n    let comma = null;\n    let found = null;\n    let start = null;\n    for (const token of tokens) {\n        if (reqSpace) {\n            if (token.type !== 'space' &&\n                token.type !== 'newline' &&\n                token.type !== 'comma')\n                onError(token.offset, 'MISSING_CHAR', 'Tags and anchors must be separated from the next token by white space');\n            reqSpace = false;\n        }\n        if (tab) {\n            if (atNewline && token.type !== 'comment' && token.type !== 'newline') {\n                onError(tab, 'TAB_AS_INDENT', 'Tabs are not allowed as indentation');\n            }\n            tab = null;\n        }\n        switch (token.type) {\n            case 'space':\n                // At the doc level, tabs at line start may be parsed\n                // as leading white space rather than indentation.\n                // In a flow collection, only the parser handles indent.\n                if (!flow &&\n                    (indicator !== 'doc-start' || next?.type !== 'flow-collection') &&\n                    token.source.includes('\\t')) {\n                    tab = token;\n                }\n                hasSpace = true;\n                break;\n            case 'comment': {\n                if (!hasSpace)\n                    onError(token, 'MISSING_CHAR', 'Comments must be separated from other tokens by white space characters');\n                const cb = token.source.substring(1) || ' ';\n                if (!comment)\n                    comment = cb;\n                else\n                    comment += commentSep + cb;\n                commentSep = '';\n                atNewline = false;\n                break;\n            }\n            case 'newline':\n                if (atNewline) {\n                    if (comment)\n                        comment += token.source;\n                    else if (!found || indicator !== 'seq-item-ind')\n                        spaceBefore = true;\n                }\n                else\n                    commentSep += token.source;\n                atNewline = true;\n                hasNewline = true;\n                if (anchor || tag)\n                    newlineAfterProp = token;\n                hasSpace = true;\n                break;\n            case 'anchor':\n                if (anchor)\n                    onError(token, 'MULTIPLE_ANCHORS', 'A node can have at most one anchor');\n                if (token.source.endsWith(':'))\n                    onError(token.offset + token.source.length - 1, 'BAD_ALIAS', 'Anchor ending in : is ambiguous', true);\n                anchor = token;\n                start ?? (start = token.offset);\n                atNewline = false;\n                hasSpace = false;\n                reqSpace = true;\n                break;\n            case 'tag': {\n                if (tag)\n                    onError(token, 'MULTIPLE_TAGS', 'A node can have at most one tag');\n                tag = token;\n                start ?? (start = token.offset);\n                atNewline = false;\n                hasSpace = false;\n                reqSpace = true;\n                break;\n            }\n            case indicator:\n                // Could here handle preceding comments differently\n                if (anchor || tag)\n                    onError(token, 'BAD_PROP_ORDER', `Anchors and tags must be after the ${token.source} indicator`);\n                if (found)\n                    onError(token, 'UNEXPECTED_TOKEN', `Unexpected ${token.source} in ${flow ?? 'collection'}`);\n                found = token;\n                atNewline =\n                    indicator === 'seq-item-ind' || indicator === 'explicit-key-ind';\n                hasSpace = false;\n                break;\n            case 'comma':\n                if (flow) {\n                    if (comma)\n                        onError(token, 'UNEXPECTED_TOKEN', `Unexpected , in ${flow}`);\n                    comma = token;\n                    atNewline = false;\n                    hasSpace = false;\n                    break;\n                }\n            // else fallthrough\n            default:\n                onError(token, 'UNEXPECTED_TOKEN', `Unexpected ${token.type} token`);\n                atNewline = false;\n                hasSpace = false;\n        }\n    }\n    const last = tokens[tokens.length - 1];\n    const end = last ? last.offset + last.source.length : offset;\n    if (reqSpace &&\n        next &&\n        next.type !== 'space' &&\n        next.type !== 'newline' &&\n        next.type !== 'comma' &&\n        (next.type !== 'scalar' || next.source !== '')) {\n        onError(next.offset, 'MISSING_CHAR', 'Tags and anchors must be separated from the next token by white space');\n    }\n    if (tab &&\n        ((atNewline && tab.indent <= parentIndent) ||\n            next?.type === 'block-map' ||\n            next?.type === 'block-seq'))\n        onError(tab, 'TAB_AS_INDENT', 'Tabs are not allowed as indentation');\n    return {\n        comma,\n        found,\n        spaceBefore,\n        comment,\n        hasNewline,\n        anchor,\n        tag,\n        newlineAfterProp,\n        end,\n        start: start ?? end\n    };\n}\n\nexports.resolveProps = resolveProps;\n","'use strict';\n\nfunction containsNewline(key) {\n    if (!key)\n        return null;\n    switch (key.type) {\n        case 'alias':\n        case 'scalar':\n        case 'double-quoted-scalar':\n        case 'single-quoted-scalar':\n            if (key.source.includes('\\n'))\n                return true;\n            if (key.end)\n                for (const st of key.end)\n                    if (st.type === 'newline')\n                        return true;\n            return false;\n        case 'flow-collection':\n            for (const it of key.items) {\n                for (const st of it.start)\n                    if (st.type === 'newline')\n                        return true;\n                if (it.sep)\n                    for (const st of it.sep)\n                        if (st.type === 'newline')\n                            return true;\n                if (containsNewline(it.key) || containsNewline(it.value))\n                    return true;\n            }\n            return false;\n        default:\n            return true;\n    }\n}\n\nexports.containsNewline = containsNewline;\n","'use strict';\n\nvar utilContainsNewline = require('./util-contains-newline.js');\n\nfunction flowIndentCheck(indent, fc, onError) {\n    if (fc?.type === 'flow-collection') {\n        const end = fc.end[0];\n        if (end.indent === indent &&\n            (end.source === ']' || end.source === '}') &&\n            utilContainsNewline.containsNewline(fc)) {\n            const msg = 'Flow end indicator should be more indented than parent';\n            onError(end, 'BAD_INDENT', msg, true);\n        }\n    }\n}\n\nexports.flowIndentCheck = flowIndentCheck;\n","'use strict';\n\nvar identity = require('../nodes/identity.js');\n\nfunction mapIncludes(ctx, items, search) {\n    const { uniqueKeys } = ctx.options;\n    if (uniqueKeys === false)\n        return false;\n    const isEqual = typeof uniqueKeys === 'function'\n        ? uniqueKeys\n        : (a, b) => a === b || (identity.isScalar(a) && identity.isScalar(b) && a.value === b.value);\n    return items.some(pair => isEqual(pair.key, search));\n}\n\nexports.mapIncludes = mapIncludes;\n","'use strict';\n\nvar Pair = require('../nodes/Pair.js');\nvar YAMLMap = require('../nodes/YAMLMap.js');\nvar resolveProps = require('./resolve-props.js');\nvar utilContainsNewline = require('./util-contains-newline.js');\nvar utilFlowIndentCheck = require('./util-flow-indent-check.js');\nvar utilMapIncludes = require('./util-map-includes.js');\n\nconst startColMsg = 'All mapping items must start at the same column';\nfunction resolveBlockMap({ composeNode, composeEmptyNode }, ctx, bm, onError, tag) {\n    const NodeClass = tag?.nodeClass ?? YAMLMap.YAMLMap;\n    const map = new NodeClass(ctx.schema);\n    if (ctx.atRoot)\n        ctx.atRoot = false;\n    let offset = bm.offset;\n    let commentEnd = null;\n    for (const collItem of bm.items) {\n        const { start, key, sep, value } = collItem;\n        // key properties\n        const keyProps = resolveProps.resolveProps(start, {\n            indicator: 'explicit-key-ind',\n            next: key ?? sep?.[0],\n            offset,\n            onError,\n            parentIndent: bm.indent,\n            startOnNewline: true\n        });\n        const implicitKey = !keyProps.found;\n        if (implicitKey) {\n            if (key) {\n                if (key.type === 'block-seq')\n                    onError(offset, 'BLOCK_AS_IMPLICIT_KEY', 'A block sequence may not be used as an implicit map key');\n                else if ('indent' in key && key.indent !== bm.indent)\n                    onError(offset, 'BAD_INDENT', startColMsg);\n            }\n            if (!keyProps.anchor && !keyProps.tag && !sep) {\n                commentEnd = keyProps.end;\n                if (keyProps.comment) {\n                    if (map.comment)\n                        map.comment += '\\n' + keyProps.comment;\n                    else\n                        map.comment = keyProps.comment;\n                }\n                continue;\n            }\n            if (keyProps.newlineAfterProp || utilContainsNewline.containsNewline(key)) {\n                onError(key ?? start[start.length - 1], 'MULTILINE_IMPLICIT_KEY', 'Implicit keys need to be on a single line');\n            }\n        }\n        else if (keyProps.found?.indent !== bm.indent) {\n            onError(offset, 'BAD_INDENT', startColMsg);\n        }\n        // key value\n        ctx.atKey = true;\n        const keyStart = keyProps.end;\n        const keyNode = key\n            ? composeNode(ctx, key, keyProps, onError)\n            : composeEmptyNode(ctx, keyStart, start, null, keyProps, onError);\n        if (ctx.schema.compat)\n            utilFlowIndentCheck.flowIndentCheck(bm.indent, key, onError);\n        ctx.atKey = false;\n        if (utilMapIncludes.mapIncludes(ctx, map.items, keyNode))\n            onError(keyStart, 'DUPLICATE_KEY', 'Map keys must be unique');\n        // value properties\n        const valueProps = resolveProps.resolveProps(sep ?? [], {\n            indicator: 'map-value-ind',\n            next: value,\n            offset: keyNode.range[2],\n            onError,\n            parentIndent: bm.indent,\n            startOnNewline: !key || key.type === 'block-scalar'\n        });\n        offset = valueProps.end;\n        if (valueProps.found) {\n            if (implicitKey) {\n                if (value?.type === 'block-map' && !valueProps.hasNewline)\n                    onError(offset, 'BLOCK_AS_IMPLICIT_KEY', 'Nested mappings are not allowed in compact mappings');\n                if (ctx.options.strict &&\n                    keyProps.start < valueProps.found.offset - 1024)\n                    onError(keyNode.range, 'KEY_OVER_1024_CHARS', 'The : indicator must be at most 1024 chars after the start of an implicit block mapping key');\n            }\n            // value value\n            const valueNode = value\n                ? composeNode(ctx, value, valueProps, onError)\n                : composeEmptyNode(ctx, offset, sep, null, valueProps, onError);\n            if (ctx.schema.compat)\n                utilFlowIndentCheck.flowIndentCheck(bm.indent, value, onError);\n            offset = valueNode.range[2];\n            const pair = new Pair.Pair(keyNode, valueNode);\n            if (ctx.options.keepSourceTokens)\n                pair.srcToken = collItem;\n            map.items.push(pair);\n        }\n        else {\n            // key with no value\n            if (implicitKey)\n                onError(keyNode.range, 'MISSING_CHAR', 'Implicit map keys need to be followed by map values');\n            if (valueProps.comment) {\n                if (keyNode.comment)\n                    keyNode.comment += '\\n' + valueProps.comment;\n                else\n                    keyNode.comment = valueProps.comment;\n            }\n            const pair = new Pair.Pair(keyNode);\n            if (ctx.options.keepSourceTokens)\n                pair.srcToken = collItem;\n            map.items.push(pair);\n        }\n    }\n    if (commentEnd && commentEnd < offset)\n        onError(commentEnd, 'IMPOSSIBLE', 'Map comment with trailing content');\n    map.range = [bm.offset, offset, commentEnd ?? offset];\n    return map;\n}\n\nexports.resolveBlockMap = resolveBlockMap;\n","'use strict';\n\nvar YAMLSeq = require('../nodes/YAMLSeq.js');\nvar resolveProps = require('./resolve-props.js');\nvar utilFlowIndentCheck = require('./util-flow-indent-check.js');\n\nfunction resolveBlockSeq({ composeNode, composeEmptyNode }, ctx, bs, onError, tag) {\n    const NodeClass = tag?.nodeClass ?? YAMLSeq.YAMLSeq;\n    const seq = new NodeClass(ctx.schema);\n    if (ctx.atRoot)\n        ctx.atRoot = false;\n    if (ctx.atKey)\n        ctx.atKey = false;\n    let offset = bs.offset;\n    let commentEnd = null;\n    for (const { start, value } of bs.items) {\n        const props = resolveProps.resolveProps(start, {\n            indicator: 'seq-item-ind',\n            next: value,\n            offset,\n            onError,\n            parentIndent: bs.indent,\n            startOnNewline: true\n        });\n        if (!props.found) {\n            if (props.anchor || props.tag || value) {\n                if (value?.type === 'block-seq')\n                    onError(props.end, 'BAD_INDENT', 'All sequence items must start at the same column');\n                else\n                    onError(offset, 'MISSING_CHAR', 'Sequence item without - indicator');\n            }\n            else {\n                commentEnd = props.end;\n                if (props.comment)\n                    seq.comment = props.comment;\n                continue;\n            }\n        }\n        const node = value\n            ? composeNode(ctx, value, props, onError)\n            : composeEmptyNode(ctx, props.end, start, null, props, onError);\n        if (ctx.schema.compat)\n            utilFlowIndentCheck.flowIndentCheck(bs.indent, value, onError);\n        offset = node.range[2];\n        seq.items.push(node);\n    }\n    seq.range = [bs.offset, offset, commentEnd ?? offset];\n    return seq;\n}\n\nexports.resolveBlockSeq = resolveBlockSeq;\n","'use strict';\n\nfunction resolveEnd(end, offset, reqSpace, onError) {\n    let comment = '';\n    if (end) {\n        let hasSpace = false;\n        let sep = '';\n        for (const token of end) {\n            const { source, type } = token;\n            switch (type) {\n                case 'space':\n                    hasSpace = true;\n                    break;\n                case 'comment': {\n                    if (reqSpace && !hasSpace)\n                        onError(token, 'MISSING_CHAR', 'Comments must be separated from other tokens by white space characters');\n                    const cb = source.substring(1) || ' ';\n                    if (!comment)\n                        comment = cb;\n                    else\n                        comment += sep + cb;\n                    sep = '';\n                    break;\n                }\n                case 'newline':\n                    if (comment)\n                        sep += source;\n                    hasSpace = true;\n                    break;\n                default:\n                    onError(token, 'UNEXPECTED_TOKEN', `Unexpected ${type} at node end`);\n            }\n            offset += source.length;\n        }\n    }\n    return { comment, offset };\n}\n\nexports.resolveEnd = resolveEnd;\n","'use strict';\n\nvar identity = require('../nodes/identity.js');\nvar Pair = require('../nodes/Pair.js');\nvar YAMLMap = require('../nodes/YAMLMap.js');\nvar YAMLSeq = require('../nodes/YAMLSeq.js');\nvar resolveEnd = require('./resolve-end.js');\nvar resolveProps = require('./resolve-props.js');\nvar utilContainsNewline = require('./util-contains-newline.js');\nvar utilMapIncludes = require('./util-map-includes.js');\n\nconst blockMsg = 'Block collections are not allowed within flow collections';\nconst isBlock = (token) => token && (token.type === 'block-map' || token.type === 'block-seq');\nfunction resolveFlowCollection({ composeNode, composeEmptyNode }, ctx, fc, onError, tag) {\n    const isMap = fc.start.source === '{';\n    const fcName = isMap ? 'flow map' : 'flow sequence';\n    const NodeClass = (tag?.nodeClass ?? (isMap ? YAMLMap.YAMLMap : YAMLSeq.YAMLSeq));\n    const coll = new NodeClass(ctx.schema);\n    coll.flow = true;\n    const atRoot = ctx.atRoot;\n    if (atRoot)\n        ctx.atRoot = false;\n    if (ctx.atKey)\n        ctx.atKey = false;\n    let offset = fc.offset + fc.start.source.length;\n    for (let i = 0; i < fc.items.length; ++i) {\n        const collItem = fc.items[i];\n        const { start, key, sep, value } = collItem;\n        const props = resolveProps.resolveProps(start, {\n            flow: fcName,\n            indicator: 'explicit-key-ind',\n            next: key ?? sep?.[0],\n            offset,\n            onError,\n            parentIndent: fc.indent,\n            startOnNewline: false\n        });\n        if (!props.found) {\n            if (!props.anchor && !props.tag && !sep && !value) {\n                if (i === 0 && props.comma)\n                    onError(props.comma, 'UNEXPECTED_TOKEN', `Unexpected , in ${fcName}`);\n                else if (i < fc.items.length - 1)\n                    onError(props.start, 'UNEXPECTED_TOKEN', `Unexpected empty item in ${fcName}`);\n                if (props.comment) {\n                    if (coll.comment)\n                        coll.comment += '\\n' + props.comment;\n                    else\n                        coll.comment = props.comment;\n                }\n                offset = props.end;\n                continue;\n            }\n            if (!isMap && ctx.options.strict && utilContainsNewline.containsNewline(key))\n                onError(key, // checked by containsNewline()\n                'MULTILINE_IMPLICIT_KEY', 'Implicit keys of flow sequence pairs need to be on a single line');\n        }\n        if (i === 0) {\n            if (props.comma)\n                onError(props.comma, 'UNEXPECTED_TOKEN', `Unexpected , in ${fcName}`);\n        }\n        else {\n            if (!props.comma)\n                onError(props.start, 'MISSING_CHAR', `Missing , between ${fcName} items`);\n            if (props.comment) {\n                let prevItemComment = '';\n                loop: for (const st of start) {\n                    switch (st.type) {\n                        case 'comma':\n                        case 'space':\n                            break;\n                        case 'comment':\n                            prevItemComment = st.source.substring(1);\n                            break loop;\n                        default:\n                            break loop;\n                    }\n                }\n                if (prevItemComment) {\n                    let prev = coll.items[coll.items.length - 1];\n                    if (identity.isPair(prev))\n                        prev = prev.value ?? prev.key;\n                    if (prev.comment)\n                        prev.comment += '\\n' + prevItemComment;\n                    else\n                        prev.comment = prevItemComment;\n                    props.comment = props.comment.substring(prevItemComment.length + 1);\n                }\n            }\n        }\n        if (!isMap && !sep && !props.found) {\n            // item is a value in a seq\n            // → key & sep are empty, start does not include ? or :\n            const valueNode = value\n                ? composeNode(ctx, value, props, onError)\n                : composeEmptyNode(ctx, props.end, sep, null, props, onError);\n            coll.items.push(valueNode);\n            offset = valueNode.range[2];\n            if (isBlock(value))\n                onError(valueNode.range, 'BLOCK_IN_FLOW', blockMsg);\n        }\n        else {\n            // item is a key+value pair\n            // key value\n            ctx.atKey = true;\n            const keyStart = props.end;\n            const keyNode = key\n                ? composeNode(ctx, key, props, onError)\n                : composeEmptyNode(ctx, keyStart, start, null, props, onError);\n            if (isBlock(key))\n                onError(keyNode.range, 'BLOCK_IN_FLOW', blockMsg);\n            ctx.atKey = false;\n            // value properties\n            const valueProps = resolveProps.resolveProps(sep ?? [], {\n                flow: fcName,\n                indicator: 'map-value-ind',\n                next: value,\n                offset: keyNode.range[2],\n                onError,\n                parentIndent: fc.indent,\n                startOnNewline: false\n            });\n            if (valueProps.found) {\n                if (!isMap && !props.found && ctx.options.strict) {\n                    if (sep)\n                        for (const st of sep) {\n                            if (st === valueProps.found)\n                                break;\n                            if (st.type === 'newline') {\n                                onError(st, 'MULTILINE_IMPLICIT_KEY', 'Implicit keys of flow sequence pairs need to be on a single line');\n                                break;\n                            }\n                        }\n                    if (props.start < valueProps.found.offset - 1024)\n                        onError(valueProps.found, 'KEY_OVER_1024_CHARS', 'The : indicator must be at most 1024 chars after the start of an implicit flow sequence key');\n                }\n            }\n            else if (value) {\n                if ('source' in value && value.source?.[0] === ':')\n                    onError(value, 'MISSING_CHAR', `Missing space after : in ${fcName}`);\n                else\n                    onError(valueProps.start, 'MISSING_CHAR', `Missing , or : between ${fcName} items`);\n            }\n            // value value\n            const valueNode = value\n                ? composeNode(ctx, value, valueProps, onError)\n                : valueProps.found\n                    ? composeEmptyNode(ctx, valueProps.end, sep, null, valueProps, onError)\n                    : null;\n            if (valueNode) {\n                if (isBlock(value))\n                    onError(valueNode.range, 'BLOCK_IN_FLOW', blockMsg);\n            }\n            else if (valueProps.comment) {\n                if (keyNode.comment)\n                    keyNode.comment += '\\n' + valueProps.comment;\n                else\n                    keyNode.comment = valueProps.comment;\n            }\n            const pair = new Pair.Pair(keyNode, valueNode);\n            if (ctx.options.keepSourceTokens)\n                pair.srcToken = collItem;\n            if (isMap) {\n                const map = coll;\n                if (utilMapIncludes.mapIncludes(ctx, map.items, keyNode))\n                    onError(keyStart, 'DUPLICATE_KEY', 'Map keys must be unique');\n                map.items.push(pair);\n            }\n            else {\n                const map = new YAMLMap.YAMLMap(ctx.schema);\n                map.flow = true;\n                map.items.push(pair);\n                const endRange = (valueNode ?? keyNode).range;\n                map.range = [keyNode.range[0], endRange[1], endRange[2]];\n                coll.items.push(map);\n            }\n            offset = valueNode ? valueNode.range[2] : valueProps.end;\n        }\n    }\n    const expectedEnd = isMap ? '}' : ']';\n    const [ce, ...ee] = fc.end;\n    let cePos = offset;\n    if (ce?.source === expectedEnd)\n        cePos = ce.offset + ce.source.length;\n    else {\n        const name = fcName[0].toUpperCase() + fcName.substring(1);\n        const msg = atRoot\n            ? `${name} must end with a ${expectedEnd}`\n            : `${name} in block collection must be sufficiently indented and end with a ${expectedEnd}`;\n        onError(offset, atRoot ? 'MISSING_CHAR' : 'BAD_INDENT', msg);\n        if (ce && ce.source.length !== 1)\n            ee.unshift(ce);\n    }\n    if (ee.length > 0) {\n        const end = resolveEnd.resolveEnd(ee, cePos, ctx.options.strict, onError);\n        if (end.comment) {\n            if (coll.comment)\n                coll.comment += '\\n' + end.comment;\n            else\n                coll.comment = end.comment;\n        }\n        coll.range = [fc.offset, cePos, end.offset];\n    }\n    else {\n        coll.range = [fc.offset, cePos, cePos];\n    }\n    return coll;\n}\n\nexports.resolveFlowCollection = resolveFlowCollection;\n","'use strict';\n\nvar identity = require('../nodes/identity.js');\nvar Scalar = require('../nodes/Scalar.js');\nvar YAMLMap = require('../nodes/YAMLMap.js');\nvar YAMLSeq = require('../nodes/YAMLSeq.js');\nvar resolveBlockMap = require('./resolve-block-map.js');\nvar resolveBlockSeq = require('./resolve-block-seq.js');\nvar resolveFlowCollection = require('./resolve-flow-collection.js');\n\nfunction resolveCollection(CN, ctx, token, onError, tagName, tag) {\n    const coll = token.type === 'block-map'\n        ? resolveBlockMap.resolveBlockMap(CN, ctx, token, onError, tag)\n        : token.type === 'block-seq'\n            ? resolveBlockSeq.resolveBlockSeq(CN, ctx, token, onError, tag)\n            : resolveFlowCollection.resolveFlowCollection(CN, ctx, token, onError, tag);\n    const Coll = coll.constructor;\n    // If we got a tagName matching the class, or the tag name is '!',\n    // then use the tagName from the node class used to create it.\n    if (tagName === '!' || tagName === Coll.tagName) {\n        coll.tag = Coll.tagName;\n        return coll;\n    }\n    if (tagName)\n        coll.tag = tagName;\n    return coll;\n}\nfunction composeCollection(CN, ctx, token, props, onError) {\n    const tagToken = props.tag;\n    const tagName = !tagToken\n        ? null\n        : ctx.directives.tagName(tagToken.source, msg => onError(tagToken, 'TAG_RESOLVE_FAILED', msg));\n    if (token.type === 'block-seq') {\n        const { anchor, newlineAfterProp: nl } = props;\n        const lastProp = anchor && tagToken\n            ? anchor.offset > tagToken.offset\n                ? anchor\n                : tagToken\n            : (anchor ?? tagToken);\n        if (lastProp && (!nl || nl.offset < lastProp.offset)) {\n            const message = 'Missing newline after block sequence props';\n            onError(lastProp, 'MISSING_CHAR', message);\n        }\n    }\n    const expType = token.type === 'block-map'\n        ? 'map'\n        : token.type === 'block-seq'\n            ? 'seq'\n            : token.start.source === '{'\n                ? 'map'\n                : 'seq';\n    // shortcut: check if it's a generic YAMLMap or YAMLSeq\n    // before jumping into the custom tag logic.\n    if (!tagToken ||\n        !tagName ||\n        tagName === '!' ||\n        (tagName === YAMLMap.YAMLMap.tagName && expType === 'map') ||\n        (tagName === YAMLSeq.YAMLSeq.tagName && expType === 'seq')) {\n        return resolveCollection(CN, ctx, token, onError, tagName);\n    }\n    let tag = ctx.schema.tags.find(t => t.tag === tagName && t.collection === expType);\n    if (!tag) {\n        const kt = ctx.schema.knownTags[tagName];\n        if (kt?.collection === expType) {\n            ctx.schema.tags.push(Object.assign({}, kt, { default: false }));\n            tag = kt;\n        }\n        else {\n            if (kt) {\n                onError(tagToken, 'BAD_COLLECTION_TYPE', `${kt.tag} used for ${expType} collection, but expects ${kt.collection ?? 'scalar'}`, true);\n            }\n            else {\n                onError(tagToken, 'TAG_RESOLVE_FAILED', `Unresolved tag: ${tagName}`, true);\n            }\n            return resolveCollection(CN, ctx, token, onError, tagName);\n        }\n    }\n    const coll = resolveCollection(CN, ctx, token, onError, tagName, tag);\n    const res = tag.resolve?.(coll, msg => onError(tagToken, 'TAG_RESOLVE_FAILED', msg), ctx.options) ?? coll;\n    const node = identity.isNode(res)\n        ? res\n        : new Scalar.Scalar(res);\n    node.range = coll.range;\n    node.tag = tagName;\n    if (tag?.format)\n        node.format = tag.format;\n    return node;\n}\n\nexports.composeCollection = composeCollection;\n","'use strict';\n\nvar Scalar = require('../nodes/Scalar.js');\n\nfunction resolveBlockScalar(ctx, scalar, onError) {\n    const start = scalar.offset;\n    const header = parseBlockScalarHeader(scalar, ctx.options.strict, onError);\n    if (!header)\n        return { value: '', type: null, comment: '', range: [start, start, start] };\n    const type = header.mode === '>' ? Scalar.Scalar.BLOCK_FOLDED : Scalar.Scalar.BLOCK_LITERAL;\n    const lines = scalar.source ? splitLines(scalar.source) : [];\n    // determine the end of content & start of chomping\n    let chompStart = lines.length;\n    for (let i = lines.length - 1; i >= 0; --i) {\n        const content = lines[i][1];\n        if (content === '' || content === '\\r')\n            chompStart = i;\n        else\n            break;\n    }\n    // shortcut for empty contents\n    if (chompStart === 0) {\n        const value = header.chomp === '+' && lines.length > 0\n            ? '\\n'.repeat(Math.max(1, lines.length - 1))\n            : '';\n        let end = start + header.length;\n        if (scalar.source)\n            end += scalar.source.length;\n        return { value, type, comment: header.comment, range: [start, end, end] };\n    }\n    // find the indentation level to trim from start\n    let trimIndent = scalar.indent + header.indent;\n    let offset = scalar.offset + header.length;\n    let contentStart = 0;\n    for (let i = 0; i < chompStart; ++i) {\n        const [indent, content] = lines[i];\n        if (content === '' || content === '\\r') {\n            if (header.indent === 0 && indent.length > trimIndent)\n                trimIndent = indent.length;\n        }\n        else {\n            if (indent.length < trimIndent) {\n                const message = 'Block scalars with more-indented leading empty lines must use an explicit indentation indicator';\n                onError(offset + indent.length, 'MISSING_CHAR', message);\n            }\n            if (header.indent === 0)\n                trimIndent = indent.length;\n            contentStart = i;\n            if (trimIndent === 0 && !ctx.atRoot) {\n                const message = 'Block scalar values in collections must be indented';\n                onError(offset, 'BAD_INDENT', message);\n            }\n            break;\n        }\n        offset += indent.length + content.length + 1;\n    }\n    // include trailing more-indented empty lines in content\n    for (let i = lines.length - 1; i >= chompStart; --i) {\n        if (lines[i][0].length > trimIndent)\n            chompStart = i + 1;\n    }\n    let value = '';\n    let sep = '';\n    let prevMoreIndented = false;\n    // leading whitespace is kept intact\n    for (let i = 0; i < contentStart; ++i)\n        value += lines[i][0].slice(trimIndent) + '\\n';\n    for (let i = contentStart; i < chompStart; ++i) {\n        let [indent, content] = lines[i];\n        offset += indent.length + content.length + 1;\n        const crlf = content[content.length - 1] === '\\r';\n        if (crlf)\n            content = content.slice(0, -1);\n        /* istanbul ignore if already caught in lexer */\n        if (content && indent.length < trimIndent) {\n            const src = header.indent\n                ? 'explicit indentation indicator'\n                : 'first line';\n            const message = `Block scalar lines must not be less indented than their ${src}`;\n            onError(offset - content.length - (crlf ? 2 : 1), 'BAD_INDENT', message);\n            indent = '';\n        }\n        if (type === Scalar.Scalar.BLOCK_LITERAL) {\n            value += sep + indent.slice(trimIndent) + content;\n            sep = '\\n';\n        }\n        else if (indent.length > trimIndent || content[0] === '\\t') {\n            // more-indented content within a folded block\n            if (sep === ' ')\n                sep = '\\n';\n            else if (!prevMoreIndented && sep === '\\n')\n                sep = '\\n\\n';\n            value += sep + indent.slice(trimIndent) + content;\n            sep = '\\n';\n            prevMoreIndented = true;\n        }\n        else if (content === '') {\n            // empty line\n            if (sep === '\\n')\n                value += '\\n';\n            else\n                sep = '\\n';\n        }\n        else {\n            value += sep + content;\n            sep = ' ';\n            prevMoreIndented = false;\n        }\n    }\n    switch (header.chomp) {\n        case '-':\n            break;\n        case '+':\n            for (let i = chompStart; i < lines.length; ++i)\n                value += '\\n' + lines[i][0].slice(trimIndent);\n            if (value[value.length - 1] !== '\\n')\n                value += '\\n';\n            break;\n        default:\n            value += '\\n';\n    }\n    const end = start + header.length + scalar.source.length;\n    return { value, type, comment: header.comment, range: [start, end, end] };\n}\nfunction parseBlockScalarHeader({ offset, props }, strict, onError) {\n    /* istanbul ignore if should not happen */\n    if (props[0].type !== 'block-scalar-header') {\n        onError(props[0], 'IMPOSSIBLE', 'Block scalar header not found');\n        return null;\n    }\n    const { source } = props[0];\n    const mode = source[0];\n    let indent = 0;\n    let chomp = '';\n    let error = -1;\n    for (let i = 1; i < source.length; ++i) {\n        const ch = source[i];\n        if (!chomp && (ch === '-' || ch === '+'))\n            chomp = ch;\n        else {\n            const n = Number(ch);\n            if (!indent && n)\n                indent = n;\n            else if (error === -1)\n                error = offset + i;\n        }\n    }\n    if (error !== -1)\n        onError(error, 'UNEXPECTED_TOKEN', `Block scalar header includes extra characters: ${source}`);\n    let hasSpace = false;\n    let comment = '';\n    let length = source.length;\n    for (let i = 1; i < props.length; ++i) {\n        const token = props[i];\n        switch (token.type) {\n            case 'space':\n                hasSpace = true;\n            // fallthrough\n            case 'newline':\n                length += token.source.length;\n                break;\n            case 'comment':\n                if (strict && !hasSpace) {\n                    const message = 'Comments must be separated from other tokens by white space characters';\n                    onError(token, 'MISSING_CHAR', message);\n                }\n                length += token.source.length;\n                comment = token.source.substring(1);\n                break;\n            case 'error':\n                onError(token, 'UNEXPECTED_TOKEN', token.message);\n                length += token.source.length;\n                break;\n            /* istanbul ignore next should not happen */\n            default: {\n                const message = `Unexpected token in block scalar header: ${token.type}`;\n                onError(token, 'UNEXPECTED_TOKEN', message);\n                const ts = token.source;\n                if (ts && typeof ts === 'string')\n                    length += ts.length;\n            }\n        }\n    }\n    return { mode, indent, chomp, comment, length };\n}\n/** @returns Array of lines split up as `[indent, content]` */\nfunction splitLines(source) {\n    const split = source.split(/\\n( *)/);\n    const first = split[0];\n    const m = first.match(/^( *)/);\n    const line0 = m?.[1]\n        ? [m[1], first.slice(m[1].length)]\n        : ['', first];\n    const lines = [line0];\n    for (let i = 1; i < split.length; i += 2)\n        lines.push([split[i], split[i + 1]]);\n    return lines;\n}\n\nexports.resolveBlockScalar = resolveBlockScalar;\n","'use strict';\n\nvar Scalar = require('../nodes/Scalar.js');\nvar resolveEnd = require('./resolve-end.js');\n\nfunction resolveFlowScalar(scalar, strict, onError) {\n    const { offset, type, source, end } = scalar;\n    let _type;\n    let value;\n    const _onError = (rel, code, msg) => onError(offset + rel, code, msg);\n    switch (type) {\n        case 'scalar':\n            _type = Scalar.Scalar.PLAIN;\n            value = plainValue(source, _onError);\n            break;\n        case 'single-quoted-scalar':\n            _type = Scalar.Scalar.QUOTE_SINGLE;\n            value = singleQuotedValue(source, _onError);\n            break;\n        case 'double-quoted-scalar':\n            _type = Scalar.Scalar.QUOTE_DOUBLE;\n            value = doubleQuotedValue(source, _onError);\n            break;\n        /* istanbul ignore next should not happen */\n        default:\n            onError(scalar, 'UNEXPECTED_TOKEN', `Expected a flow scalar value, but found: ${type}`);\n            return {\n                value: '',\n                type: null,\n                comment: '',\n                range: [offset, offset + source.length, offset + source.length]\n            };\n    }\n    const valueEnd = offset + source.length;\n    const re = resolveEnd.resolveEnd(end, valueEnd, strict, onError);\n    return {\n        value,\n        type: _type,\n        comment: re.comment,\n        range: [offset, valueEnd, re.offset]\n    };\n}\nfunction plainValue(source, onError) {\n    let badChar = '';\n    switch (source[0]) {\n        /* istanbul ignore next should not happen */\n        case '\\t':\n            badChar = 'a tab character';\n            break;\n        case ',':\n            badChar = 'flow indicator character ,';\n            break;\n        case '%':\n            badChar = 'directive indicator character %';\n            break;\n        case '|':\n        case '>': {\n            badChar = `block scalar indicator ${source[0]}`;\n            break;\n        }\n        case '@':\n        case '`': {\n            badChar = `reserved character ${source[0]}`;\n            break;\n        }\n    }\n    if (badChar)\n        onError(0, 'BAD_SCALAR_START', `Plain value cannot start with ${badChar}`);\n    return unfoldLines(source);\n}\nfunction singleQuotedValue(source, onError) {\n    if (source[source.length - 1] !== \"'\" || source.length === 1)\n        onError(source.length, 'MISSING_CHAR', \"Missing closing 'quote\");\n    return unfoldLines(source.slice(1, -1)).replace(/''/g, \"'\");\n}\nfunction unfoldLines(source) {\n    const line = /(.*?)\\r?\\n/sy;\n    let match = line.exec(source);\n    if (!match)\n        return source;\n    /**\n     * The negative lookbehinds in these RegExps are to\n     * prevent causing a polynomial search time in certain cases.\n     *\n     * The try-catch is for Safari < 16.4 and other old browsers:\n     * https://caniuse.com/js-regexp-lookbehind\n     */\n    let trimEnd, trimBoth;\n    try {\n        trimEnd = new RegExp('(?<![ \\t])[ \\t]+$');\n        trimBoth = new RegExp('^[ \\t]+|(?<![ \\t])[ \\t]+$', 'g');\n    }\n    catch {\n        trimEnd = /[ \\t]+$/;\n        trimBoth = /^[ \\t]+|[ \\t]+$/g;\n    }\n    let res = match[1].replace(trimEnd, '');\n    let sep = ' ';\n    let pos = line.lastIndex;\n    while ((match = line.exec(source))) {\n        const lm = match[1].replace(trimBoth, '');\n        if (lm === '') {\n            if (sep === '\\n')\n                res += sep;\n            else\n                sep = '\\n';\n        }\n        else {\n            res += sep + lm;\n            sep = ' ';\n        }\n        pos = line.lastIndex;\n    }\n    const last = /[ \\t]*(.*)/sy;\n    last.lastIndex = pos;\n    match = last.exec(source);\n    return res + sep + (match?.[1] ?? '');\n}\nfunction doubleQuotedValue(source, onError) {\n    let res = '';\n    for (let i = 1; i < source.length - 1; ++i) {\n        const ch = source[i];\n        if (ch === '\\r' && source[i + 1] === '\\n')\n            continue;\n        if (ch === '\\n') {\n            const { fold, offset } = foldNewline(source, i);\n            res += fold;\n            i = offset;\n        }\n        else if (ch === '\\\\') {\n            let next = source[++i];\n            const cc = escapeCodes[next];\n            if (cc)\n                res += cc;\n            else if (next === '\\n') {\n                // skip escaped newlines, but still trim the following line\n                next = source[i + 1];\n                while (next === ' ' || next === '\\t')\n                    next = source[++i + 1];\n            }\n            else if (next === '\\r' && source[i + 1] === '\\n') {\n                // skip escaped CRLF newlines, but still trim the following line\n                next = source[++i + 1];\n                while (next === ' ' || next === '\\t')\n                    next = source[++i + 1];\n            }\n            else if (next === 'x' || next === 'u' || next === 'U') {\n                const length = next === 'x' ? 2 : next === 'u' ? 4 : 8;\n                res += parseCharCode(source, i + 1, length, onError);\n                i += length;\n            }\n            else {\n                const raw = source.substr(i - 1, 2);\n                onError(i - 1, 'BAD_DQ_ESCAPE', `Invalid escape sequence ${raw}`);\n                res += raw;\n            }\n        }\n        else if (ch === ' ' || ch === '\\t') {\n            // trim trailing whitespace\n            const wsStart = i;\n            let next = source[i + 1];\n            while (next === ' ' || next === '\\t')\n                next = source[++i + 1];\n            if (next !== '\\n' && !(next === '\\r' && source[i + 2] === '\\n'))\n                res += i > wsStart ? source.slice(wsStart, i + 1) : ch;\n        }\n        else {\n            res += ch;\n        }\n    }\n    if (source[source.length - 1] !== '\"' || source.length === 1)\n        onError(source.length, 'MISSING_CHAR', 'Missing closing \"quote');\n    return res;\n}\n/**\n * Fold a single newline into a space, multiple newlines to N - 1 newlines.\n * Presumes `source[offset] === '\\n'`\n */\nfunction foldNewline(source, offset) {\n    let fold = '';\n    let ch = source[offset + 1];\n    while (ch === ' ' || ch === '\\t' || ch === '\\n' || ch === '\\r') {\n        if (ch === '\\r' && source[offset + 2] !== '\\n')\n            break;\n        if (ch === '\\n')\n            fold += '\\n';\n        offset += 1;\n        ch = source[offset + 1];\n    }\n    if (!fold)\n        fold = ' ';\n    return { fold, offset };\n}\nconst escapeCodes = {\n    '0': '\\0', // null character\n    a: '\\x07', // bell character\n    b: '\\b', // backspace\n    e: '\\x1b', // escape character\n    f: '\\f', // form feed\n    n: '\\n', // line feed\n    r: '\\r', // carriage return\n    t: '\\t', // horizontal tab\n    v: '\\v', // vertical tab\n    N: '\\u0085', // Unicode next line\n    _: '\\u00a0', // Unicode non-breaking space\n    L: '\\u2028', // Unicode line separator\n    P: '\\u2029', // Unicode paragraph separator\n    ' ': ' ',\n    '\"': '\"',\n    '/': '/',\n    '\\\\': '\\\\',\n    '\\t': '\\t'\n};\nfunction parseCharCode(source, offset, length, onError) {\n    const cc = source.substr(offset, length);\n    const ok = cc.length === length && /^[0-9a-fA-F]+$/.test(cc);\n    const code = ok ? parseInt(cc, 16) : NaN;\n    try {\n        return String.fromCodePoint(code);\n    }\n    catch {\n        const raw = source.substr(offset - 2, length + 2);\n        onError(offset - 2, 'BAD_DQ_ESCAPE', `Invalid escape sequence ${raw}`);\n        return raw;\n    }\n}\n\nexports.resolveFlowScalar = resolveFlowScalar;\n","'use strict';\n\nvar identity = require('../nodes/identity.js');\nvar Scalar = require('../nodes/Scalar.js');\nvar resolveBlockScalar = require('./resolve-block-scalar.js');\nvar resolveFlowScalar = require('./resolve-flow-scalar.js');\n\nfunction composeScalar(ctx, token, tagToken, onError) {\n    const { value, type, comment, range } = token.type === 'block-scalar'\n        ? resolveBlockScalar.resolveBlockScalar(ctx, token, onError)\n        : resolveFlowScalar.resolveFlowScalar(token, ctx.options.strict, onError);\n    const tagName = tagToken\n        ? ctx.directives.tagName(tagToken.source, msg => onError(tagToken, 'TAG_RESOLVE_FAILED', msg))\n        : null;\n    let tag;\n    if (ctx.options.stringKeys && ctx.atKey) {\n        tag = ctx.schema[identity.SCALAR];\n    }\n    else if (tagName)\n        tag = findScalarTagByName(ctx.schema, value, tagName, tagToken, onError);\n    else if (token.type === 'scalar')\n        tag = findScalarTagByTest(ctx, value, token, onError);\n    else\n        tag = ctx.schema[identity.SCALAR];\n    let scalar;\n    try {\n        const res = tag.resolve(value, msg => onError(tagToken ?? token, 'TAG_RESOLVE_FAILED', msg), ctx.options);\n        scalar = identity.isScalar(res) ? res : new Scalar.Scalar(res);\n    }\n    catch (error) {\n        const msg = error instanceof Error ? error.message : String(error);\n        onError(tagToken ?? token, 'TAG_RESOLVE_FAILED', msg);\n        scalar = new Scalar.Scalar(value);\n    }\n    scalar.range = range;\n    scalar.source = value;\n    if (type)\n        scalar.type = type;\n    if (tagName)\n        scalar.tag = tagName;\n    if (tag.format)\n        scalar.format = tag.format;\n    if (comment)\n        scalar.comment = comment;\n    return scalar;\n}\nfunction findScalarTagByName(schema, value, tagName, tagToken, onError) {\n    if (tagName === '!')\n        return schema[identity.SCALAR]; // non-specific tag\n    const matchWithTest = [];\n    for (const tag of schema.tags) {\n        if (!tag.collection && tag.tag === tagName) {\n            if (tag.default && tag.test)\n                matchWithTest.push(tag);\n            else\n                return tag;\n        }\n    }\n    for (const tag of matchWithTest)\n        if (tag.test?.test(value))\n            return tag;\n    const kt = schema.knownTags[tagName];\n    if (kt && !kt.collection) {\n        // Ensure that the known tag is available for stringifying,\n        // but does not get used by default.\n        schema.tags.push(Object.assign({}, kt, { default: false, test: undefined }));\n        return kt;\n    }\n    onError(tagToken, 'TAG_RESOLVE_FAILED', `Unresolved tag: ${tagName}`, tagName !== 'tag:yaml.org,2002:str');\n    return schema[identity.SCALAR];\n}\nfunction findScalarTagByTest({ atKey, directives, schema }, value, token, onError) {\n    const tag = schema.tags.find(tag => (tag.default === true || (atKey && tag.default === 'key')) &&\n        tag.test?.test(value)) || schema[identity.SCALAR];\n    if (schema.compat) {\n        const compat = schema.compat.find(tag => tag.default && tag.test?.test(value)) ??\n            schema[identity.SCALAR];\n        if (tag.tag !== compat.tag) {\n            const ts = directives.tagString(tag.tag);\n            const cs = directives.tagString(compat.tag);\n            const msg = `Value may be parsed as either ${ts} or ${cs}`;\n            onError(token, 'TAG_RESOLVE_FAILED', msg, true);\n        }\n    }\n    return tag;\n}\n\nexports.composeScalar = composeScalar;\n","'use strict';\n\nfunction emptyScalarPosition(offset, before, pos) {\n    if (before) {\n        pos ?? (pos = before.length);\n        for (let i = pos - 1; i >= 0; --i) {\n            let st = before[i];\n            switch (st.type) {\n                case 'space':\n                case 'comment':\n                case 'newline':\n                    offset -= st.source.length;\n                    continue;\n            }\n            // Technically, an empty scalar is immediately after the last non-empty\n            // node, but it's more useful to place it after any whitespace.\n            st = before[++i];\n            while (st?.type === 'space') {\n                offset += st.source.length;\n                st = before[++i];\n            }\n            break;\n        }\n    }\n    return offset;\n}\n\nexports.emptyScalarPosition = emptyScalarPosition;\n","'use strict';\n\nvar Alias = require('../nodes/Alias.js');\nvar identity = require('../nodes/identity.js');\nvar composeCollection = require('./compose-collection.js');\nvar composeScalar = require('./compose-scalar.js');\nvar resolveEnd = require('./resolve-end.js');\nvar utilEmptyScalarPosition = require('./util-empty-scalar-position.js');\n\nconst CN = { composeNode, composeEmptyNode };\nfunction composeNode(ctx, token, props, onError) {\n    const atKey = ctx.atKey;\n    const { spaceBefore, comment, anchor, tag } = props;\n    let node;\n    let isSrcToken = true;\n    switch (token.type) {\n        case 'alias':\n            node = composeAlias(ctx, token, onError);\n            if (anchor || tag)\n                onError(token, 'ALIAS_PROPS', 'An alias node must not specify any properties');\n            break;\n        case 'scalar':\n        case 'single-quoted-scalar':\n        case 'double-quoted-scalar':\n        case 'block-scalar':\n            node = composeScalar.composeScalar(ctx, token, tag, onError);\n            if (anchor)\n                node.anchor = anchor.source.substring(1);\n            break;\n        case 'block-map':\n        case 'block-seq':\n        case 'flow-collection':\n            try {\n                node = composeCollection.composeCollection(CN, ctx, token, props, onError);\n                if (anchor)\n                    node.anchor = anchor.source.substring(1);\n            }\n            catch (error) {\n                // Almost certainly here due to a stack overflow\n                const message = error instanceof Error ? error.message : String(error);\n                onError(token, 'RESOURCE_EXHAUSTION', message);\n            }\n            break;\n        default: {\n            const message = token.type === 'error'\n                ? token.message\n                : `Unsupported token (type: ${token.type})`;\n            onError(token, 'UNEXPECTED_TOKEN', message);\n            isSrcToken = false;\n        }\n    }\n    node ?? (node = composeEmptyNode(ctx, token.offset, undefined, null, props, onError));\n    if (anchor && node.anchor === '')\n        onError(anchor, 'BAD_ALIAS', 'Anchor cannot be an empty string');\n    if (atKey &&\n        ctx.options.stringKeys &&\n        (!identity.isScalar(node) ||\n            typeof node.value !== 'string' ||\n            (node.tag && node.tag !== 'tag:yaml.org,2002:str'))) {\n        const msg = 'With stringKeys, all keys must be strings';\n        onError(tag ?? token, 'NON_STRING_KEY', msg);\n    }\n    if (spaceBefore)\n        node.spaceBefore = true;\n    if (comment) {\n        if (token.type === 'scalar' && token.source === '')\n            node.comment = comment;\n        else\n            node.commentBefore = comment;\n    }\n    // @ts-expect-error Type checking misses meaning of isSrcToken\n    if (ctx.options.keepSourceTokens && isSrcToken)\n        node.srcToken = token;\n    return node;\n}\nfunction composeEmptyNode(ctx, offset, before, pos, { spaceBefore, comment, anchor, tag, end }, onError) {\n    const token = {\n        type: 'scalar',\n        offset: utilEmptyScalarPosition.emptyScalarPosition(offset, before, pos),\n        indent: -1,\n        source: ''\n    };\n    const node = composeScalar.composeScalar(ctx, token, tag, onError);\n    if (anchor) {\n        node.anchor = anchor.source.substring(1);\n        if (node.anchor === '')\n            onError(anchor, 'BAD_ALIAS', 'Anchor cannot be an empty string');\n    }\n    if (spaceBefore)\n        node.spaceBefore = true;\n    if (comment) {\n        node.comment = comment;\n        node.range[2] = end;\n    }\n    return node;\n}\nfunction composeAlias({ options }, { offset, source, end }, onError) {\n    const alias = new Alias.Alias(source.substring(1));\n    if (alias.source === '')\n        onError(offset, 'BAD_ALIAS', 'Alias cannot be an empty string');\n    if (alias.source.endsWith(':'))\n        onError(offset + source.length - 1, 'BAD_ALIAS', 'Alias ending in : is ambiguous', true);\n    const valueEnd = offset + source.length;\n    const re = resolveEnd.resolveEnd(end, valueEnd, options.strict, onError);\n    alias.range = [offset, valueEnd, re.offset];\n    if (re.comment)\n        alias.comment = re.comment;\n    return alias;\n}\n\nexports.composeEmptyNode = composeEmptyNode;\nexports.composeNode = composeNode;\n","'use strict';\n\nvar Document = require('../doc/Document.js');\nvar composeNode = require('./compose-node.js');\nvar resolveEnd = require('./resolve-end.js');\nvar resolveProps = require('./resolve-props.js');\n\nfunction composeDoc(options, directives, { offset, start, value, end }, onError) {\n    const opts = Object.assign({ _directives: directives }, options);\n    const doc = new Document.Document(undefined, opts);\n    const ctx = {\n        atKey: false,\n        atRoot: true,\n        directives: doc.directives,\n        options: doc.options,\n        schema: doc.schema\n    };\n    const props = resolveProps.resolveProps(start, {\n        indicator: 'doc-start',\n        next: value ?? end?.[0],\n        offset,\n        onError,\n        parentIndent: 0,\n        startOnNewline: true\n    });\n    if (props.found) {\n        doc.directives.docStart = true;\n        if (value &&\n            (value.type === 'block-map' || value.type === 'block-seq') &&\n            !props.hasNewline)\n            onError(props.end, 'MISSING_CHAR', 'Block collection cannot start on same line with directives-end marker');\n    }\n    // @ts-expect-error If Contents is set, let's trust the user\n    doc.contents = value\n        ? composeNode.composeNode(ctx, value, props, onError)\n        : composeNode.composeEmptyNode(ctx, props.end, start, null, props, onError);\n    const contentEnd = doc.contents.range[2];\n    const re = resolveEnd.resolveEnd(end, contentEnd, false, onError);\n    if (re.comment)\n        doc.comment = re.comment;\n    doc.range = [offset, contentEnd, re.offset];\n    return doc;\n}\n\nexports.composeDoc = composeDoc;\n","'use strict';\n\nvar node_process = require('process');\nvar directives = require('../doc/directives.js');\nvar Document = require('../doc/Document.js');\nvar errors = require('../errors.js');\nvar identity = require('../nodes/identity.js');\nvar composeDoc = require('./compose-doc.js');\nvar resolveEnd = require('./resolve-end.js');\n\nfunction getErrorPos(src) {\n    if (typeof src === 'number')\n        return [src, src + 1];\n    if (Array.isArray(src))\n        return src.length === 2 ? src : [src[0], src[1]];\n    const { offset, source } = src;\n    return [offset, offset + (typeof source === 'string' ? source.length : 1)];\n}\nfunction parsePrelude(prelude) {\n    let comment = '';\n    let atComment = false;\n    let afterEmptyLine = false;\n    for (let i = 0; i < prelude.length; ++i) {\n        const source = prelude[i];\n        switch (source[0]) {\n            case '#':\n                comment +=\n                    (comment === '' ? '' : afterEmptyLine ? '\\n\\n' : '\\n') +\n                        (source.substring(1) || ' ');\n                atComment = true;\n                afterEmptyLine = false;\n                break;\n            case '%':\n                if (prelude[i + 1]?.[0] !== '#')\n                    i += 1;\n                atComment = false;\n                break;\n            default:\n                // This may be wrong after doc-end, but in that case it doesn't matter\n                if (!atComment)\n                    afterEmptyLine = true;\n                atComment = false;\n        }\n    }\n    return { comment, afterEmptyLine };\n}\n/**\n * Compose a stream of CST nodes into a stream of YAML Documents.\n *\n * ```ts\n * import { Composer, Parser } from 'yaml'\n *\n * const src: string = ...\n * const tokens = new Parser().parse(src)\n * const docs = new Composer().compose(tokens)\n * ```\n */\nclass Composer {\n    constructor(options = {}) {\n        this.doc = null;\n        this.atDirectives = false;\n        this.prelude = [];\n        this.errors = [];\n        this.warnings = [];\n        this.onError = (source, code, message, warning) => {\n            const pos = getErrorPos(source);\n            if (warning)\n                this.warnings.push(new errors.YAMLWarning(pos, code, message));\n            else\n                this.errors.push(new errors.YAMLParseError(pos, code, message));\n        };\n        // eslint-disable-next-line @typescript-eslint/prefer-nullish-coalescing\n        this.directives = new directives.Directives({ version: options.version || '1.2' });\n        this.options = options;\n    }\n    decorate(doc, afterDoc) {\n        const { comment, afterEmptyLine } = parsePrelude(this.prelude);\n        //console.log({ dc: doc.comment, prelude, comment })\n        if (comment) {\n            const dc = doc.contents;\n            if (afterDoc) {\n                doc.comment = doc.comment ? `${doc.comment}\\n${comment}` : comment;\n            }\n            else if (afterEmptyLine || doc.directives.docStart || !dc) {\n                doc.commentBefore = comment;\n            }\n            else if (identity.isCollection(dc) && !dc.flow && dc.items.length > 0) {\n                let it = dc.items[0];\n                if (identity.isPair(it))\n                    it = it.key;\n                const cb = it.commentBefore;\n                it.commentBefore = cb ? `${comment}\\n${cb}` : comment;\n            }\n            else {\n                const cb = dc.commentBefore;\n                dc.commentBefore = cb ? `${comment}\\n${cb}` : comment;\n            }\n        }\n        if (afterDoc) {\n            for (let i = 0; i < this.errors.length; ++i)\n                doc.errors.push(this.errors[i]);\n            for (let i = 0; i < this.warnings.length; ++i)\n                doc.warnings.push(this.warnings[i]);\n        }\n        else {\n            doc.errors = this.errors;\n            doc.warnings = this.warnings;\n        }\n        this.prelude = [];\n        this.errors = [];\n        this.warnings = [];\n    }\n    /**\n     * Current stream status information.\n     *\n     * Mostly useful at the end of input for an empty stream.\n     */\n    streamInfo() {\n        return {\n            comment: parsePrelude(this.prelude).comment,\n            directives: this.directives,\n            errors: this.errors,\n            warnings: this.warnings\n        };\n    }\n    /**\n     * Compose tokens into documents.\n     *\n     * @param forceDoc - If the stream contains no document, still emit a final document including any comments and directives that would be applied to a subsequent document.\n     * @param endOffset - Should be set if `forceDoc` is also set, to set the document range end and to indicate errors correctly.\n     */\n    *compose(tokens, forceDoc = false, endOffset = -1) {\n        for (const token of tokens)\n            yield* this.next(token);\n        yield* this.end(forceDoc, endOffset);\n    }\n    /** Advance the composer by one CST token. */\n    *next(token) {\n        if (node_process.env.LOG_STREAM)\n            console.dir(token, { depth: null });\n        switch (token.type) {\n            case 'directive':\n                this.directives.add(token.source, (offset, message, warning) => {\n                    const pos = getErrorPos(token);\n                    pos[0] += offset;\n                    this.onError(pos, 'BAD_DIRECTIVE', message, warning);\n                });\n                this.prelude.push(token.source);\n                this.atDirectives = true;\n                break;\n            case 'document': {\n                const doc = composeDoc.composeDoc(this.options, this.directives, token, this.onError);\n                if (this.atDirectives && !doc.directives.docStart)\n                    this.onError(token, 'MISSING_CHAR', 'Missing directives-end/doc-start indicator line');\n                this.decorate(doc, false);\n                if (this.doc)\n                    yield this.doc;\n                this.doc = doc;\n                this.atDirectives = false;\n                break;\n            }\n            case 'byte-order-mark':\n            case 'space':\n                break;\n            case 'comment':\n            case 'newline':\n                this.prelude.push(token.source);\n                break;\n            case 'error': {\n                const msg = token.source\n                    ? `${token.message}: ${JSON.stringify(token.source)}`\n                    : token.message;\n                const error = new errors.YAMLParseError(getErrorPos(token), 'UNEXPECTED_TOKEN', msg);\n                if (this.atDirectives || !this.doc)\n                    this.errors.push(error);\n                else\n                    this.doc.errors.push(error);\n                break;\n            }\n            case 'doc-end': {\n                if (!this.doc) {\n                    const msg = 'Unexpected doc-end without preceding document';\n                    this.errors.push(new errors.YAMLParseError(getErrorPos(token), 'UNEXPECTED_TOKEN', msg));\n                    break;\n                }\n                this.doc.directives.docEnd = true;\n                const end = resolveEnd.resolveEnd(token.end, token.offset + token.source.length, this.doc.options.strict, this.onError);\n                this.decorate(this.doc, true);\n                if (end.comment) {\n                    const dc = this.doc.comment;\n                    this.doc.comment = dc ? `${dc}\\n${end.comment}` : end.comment;\n                }\n                this.doc.range[2] = end.offset;\n                break;\n            }\n            default:\n                this.errors.push(new errors.YAMLParseError(getErrorPos(token), 'UNEXPECTED_TOKEN', `Unsupported token ${token.type}`));\n        }\n    }\n    /**\n     * Call at end of input to yield any remaining document.\n     *\n     * @param forceDoc - If the stream contains no document, still emit a final document including any comments and directives that would be applied to a subsequent document.\n     * @param endOffset - Should be set if `forceDoc` is also set, to set the document range end and to indicate errors correctly.\n     */\n    *end(forceDoc = false, endOffset = -1) {\n        if (this.doc) {\n            this.decorate(this.doc, true);\n            yield this.doc;\n            this.doc = null;\n        }\n        else if (forceDoc) {\n            const opts = Object.assign({ _directives: this.directives }, this.options);\n            const doc = new Document.Document(undefined, opts);\n            if (this.atDirectives)\n                this.onError(endOffset, 'MISSING_CHAR', 'Missing directives-end indicator line');\n            doc.range = [0, endOffset, endOffset];\n            this.decorate(doc, false);\n            yield doc;\n        }\n    }\n}\n\nexports.Composer = Composer;\n","'use strict';\n\nvar resolveBlockScalar = require('../compose/resolve-block-scalar.js');\nvar resolveFlowScalar = require('../compose/resolve-flow-scalar.js');\nvar errors = require('../errors.js');\nvar stringifyString = require('../stringify/stringifyString.js');\n\nfunction resolveAsScalar(token, strict = true, onError) {\n    if (token) {\n        const _onError = (pos, code, message) => {\n            const offset = typeof pos === 'number' ? pos : Array.isArray(pos) ? pos[0] : pos.offset;\n            if (onError)\n                onError(offset, code, message);\n            else\n                throw new errors.YAMLParseError([offset, offset + 1], code, message);\n        };\n        switch (token.type) {\n            case 'scalar':\n            case 'single-quoted-scalar':\n            case 'double-quoted-scalar':\n                return resolveFlowScalar.resolveFlowScalar(token, strict, _onError);\n            case 'block-scalar':\n                return resolveBlockScalar.resolveBlockScalar({ options: { strict } }, token, _onError);\n        }\n    }\n    return null;\n}\n/**\n * Create a new scalar token with `value`\n *\n * Values that represent an actual string but may be parsed as a different type should use a `type` other than `'PLAIN'`,\n * as this function does not support any schema operations and won't check for such conflicts.\n *\n * @param value The string representation of the value, which will have its content properly indented.\n * @param context.end Comments and whitespace after the end of the value, or after the block scalar header. If undefined, a newline will be added.\n * @param context.implicitKey Being within an implicit key may affect the resolved type of the token's value.\n * @param context.indent The indent level of the token.\n * @param context.inFlow Is this scalar within a flow collection? This may affect the resolved type of the token's value.\n * @param context.offset The offset position of the token.\n * @param context.type The preferred type of the scalar token. If undefined, the previous type of the `token` will be used, defaulting to `'PLAIN'`.\n */\nfunction createScalarToken(value, context) {\n    const { implicitKey = false, indent, inFlow = false, offset = -1, type = 'PLAIN' } = context;\n    const source = stringifyString.stringifyString({ type, value }, {\n        implicitKey,\n        indent: indent > 0 ? ' '.repeat(indent) : '',\n        inFlow,\n        options: { blockQuote: true, lineWidth: -1 }\n    });\n    const end = context.end ?? [\n        { type: 'newline', offset: -1, indent, source: '\\n' }\n    ];\n    switch (source[0]) {\n        case '|':\n        case '>': {\n            const he = source.indexOf('\\n');\n            const head = source.substring(0, he);\n            const body = source.substring(he + 1) + '\\n';\n            const props = [\n                { type: 'block-scalar-header', offset, indent, source: head }\n            ];\n            if (!addEndtoBlockProps(props, end))\n                props.push({ type: 'newline', offset: -1, indent, source: '\\n' });\n            return { type: 'block-scalar', offset, indent, props, source: body };\n        }\n        case '\"':\n            return { type: 'double-quoted-scalar', offset, indent, source, end };\n        case \"'\":\n            return { type: 'single-quoted-scalar', offset, indent, source, end };\n        default:\n            return { type: 'scalar', offset, indent, source, end };\n    }\n}\n/**\n * Set the value of `token` to the given string `value`, overwriting any previous contents and type that it may have.\n *\n * Best efforts are made to retain any comments previously associated with the `token`,\n * though all contents within a collection's `items` will be overwritten.\n *\n * Values that represent an actual string but may be parsed as a different type should use a `type` other than `'PLAIN'`,\n * as this function does not support any schema operations and won't check for such conflicts.\n *\n * @param token Any token. If it does not include an `indent` value, the value will be stringified as if it were an implicit key.\n * @param value The string representation of the value, which will have its content properly indented.\n * @param context.afterKey In most cases, values after a key should have an additional level of indentation.\n * @param context.implicitKey Being within an implicit key may affect the resolved type of the token's value.\n * @param context.inFlow Being within a flow collection may affect the resolved type of the token's value.\n * @param context.type The preferred type of the scalar token. If undefined, the previous type of the `token` will be used, defaulting to `'PLAIN'`.\n */\nfunction setScalarValue(token, value, context = {}) {\n    let { afterKey = false, implicitKey = false, inFlow = false, type } = context;\n    let indent = 'indent' in token ? token.indent : null;\n    if (afterKey && typeof indent === 'number')\n        indent += 2;\n    if (!type)\n        switch (token.type) {\n            case 'single-quoted-scalar':\n                type = 'QUOTE_SINGLE';\n                break;\n            case 'double-quoted-scalar':\n                type = 'QUOTE_DOUBLE';\n                break;\n            case 'block-scalar': {\n                const header = token.props[0];\n                if (header.type !== 'block-scalar-header')\n                    throw new Error('Invalid block scalar header');\n                type = header.source[0] === '>' ? 'BLOCK_FOLDED' : 'BLOCK_LITERAL';\n                break;\n            }\n            default:\n                type = 'PLAIN';\n        }\n    const source = stringifyString.stringifyString({ type, value }, {\n        implicitKey: implicitKey || indent === null,\n        indent: indent !== null && indent > 0 ? ' '.repeat(indent) : '',\n        inFlow,\n        options: { blockQuote: true, lineWidth: -1 }\n    });\n    switch (source[0]) {\n        case '|':\n        case '>':\n            setBlockScalarValue(token, source);\n            break;\n        case '\"':\n            setFlowScalarValue(token, source, 'double-quoted-scalar');\n            break;\n        case \"'\":\n            setFlowScalarValue(token, source, 'single-quoted-scalar');\n            break;\n        default:\n            setFlowScalarValue(token, source, 'scalar');\n    }\n}\nfunction setBlockScalarValue(token, source) {\n    const he = source.indexOf('\\n');\n    const head = source.substring(0, he);\n    const body = source.substring(he + 1) + '\\n';\n    if (token.type === 'block-scalar') {\n        const header = token.props[0];\n        if (header.type !== 'block-scalar-header')\n            throw new Error('Invalid block scalar header');\n        header.source = head;\n        token.source = body;\n    }\n    else {\n        const { offset } = token;\n        const indent = 'indent' in token ? token.indent : -1;\n        const props = [\n            { type: 'block-scalar-header', offset, indent, source: head }\n        ];\n        if (!addEndtoBlockProps(props, 'end' in token ? token.end : undefined))\n            props.push({ type: 'newline', offset: -1, indent, source: '\\n' });\n        for (const key of Object.keys(token))\n            if (key !== 'type' && key !== 'offset')\n                delete token[key];\n        Object.assign(token, { type: 'block-scalar', indent, props, source: body });\n    }\n}\n/** @returns `true` if last token is a newline */\nfunction addEndtoBlockProps(props, end) {\n    if (end)\n        for (const st of end)\n            switch (st.type) {\n                case 'space':\n                case 'comment':\n                    props.push(st);\n                    break;\n                case 'newline':\n                    props.push(st);\n                    return true;\n            }\n    return false;\n}\nfunction setFlowScalarValue(token, source, type) {\n    switch (token.type) {\n        case 'scalar':\n        case 'double-quoted-scalar':\n        case 'single-quoted-scalar':\n            token.type = type;\n            token.source = source;\n            break;\n        case 'block-scalar': {\n            const end = token.props.slice(1);\n            let oa = source.length;\n            if (token.props[0].type === 'block-scalar-header')\n                oa -= token.props[0].source.length;\n            for (const tok of end)\n                tok.offset += oa;\n            delete token.props;\n            Object.assign(token, { type, source, end });\n            break;\n        }\n        case 'block-map':\n        case 'block-seq': {\n            const offset = token.offset + source.length;\n            const nl = { type: 'newline', offset, indent: token.indent, source: '\\n' };\n            delete token.items;\n            Object.assign(token, { type, source, end: [nl] });\n            break;\n        }\n        default: {\n            const indent = 'indent' in token ? token.indent : -1;\n            const end = 'end' in token && Array.isArray(token.end)\n                ? token.end.filter(st => st.type === 'space' ||\n                    st.type === 'comment' ||\n                    st.type === 'newline')\n                : [];\n            for (const key of Object.keys(token))\n                if (key !== 'type' && key !== 'offset')\n                    delete token[key];\n            Object.assign(token, { type, indent, source, end });\n        }\n    }\n}\n\nexports.createScalarToken = createScalarToken;\nexports.resolveAsScalar = resolveAsScalar;\nexports.setScalarValue = setScalarValue;\n","'use strict';\n\n/**\n * Stringify a CST document, token, or collection item\n *\n * Fair warning: This applies no validation whatsoever, and\n * simply concatenates the sources in their logical order.\n */\nconst stringify = (cst) => 'type' in cst ? stringifyToken(cst) : stringifyItem(cst);\nfunction stringifyToken(token) {\n    switch (token.type) {\n        case 'block-scalar': {\n            let res = '';\n            for (const tok of token.props)\n                res += stringifyToken(tok);\n            return res + token.source;\n        }\n        case 'block-map':\n        case 'block-seq': {\n            let res = '';\n            for (const item of token.items)\n                res += stringifyItem(item);\n            return res;\n        }\n        case 'flow-collection': {\n            let res = token.start.source;\n            for (const item of token.items)\n                res += stringifyItem(item);\n            for (const st of token.end)\n                res += st.source;\n            return res;\n        }\n        case 'document': {\n            let res = stringifyItem(token);\n            if (token.end)\n                for (const st of token.end)\n                    res += st.source;\n            return res;\n        }\n        default: {\n            let res = token.source;\n            if ('end' in token && token.end)\n                for (const st of token.end)\n                    res += st.source;\n            return res;\n        }\n    }\n}\nfunction stringifyItem({ start, key, sep, value }) {\n    let res = '';\n    for (const st of start)\n        res += st.source;\n    if (key)\n        res += stringifyToken(key);\n    if (sep)\n        for (const st of sep)\n            res += st.source;\n    if (value)\n        res += stringifyToken(value);\n    return res;\n}\n\nexports.stringify = stringify;\n","'use strict';\n\nconst BREAK = Symbol('break visit');\nconst SKIP = Symbol('skip children');\nconst REMOVE = Symbol('remove item');\n/**\n * Apply a visitor to a CST document or item.\n *\n * Walks through the tree (depth-first) starting from the root, calling a\n * `visitor` function with two arguments when entering each item:\n *   - `item`: The current item, which included the following members:\n *     - `start: SourceToken[]` – Source tokens before the key or value,\n *       possibly including its anchor or tag.\n *     - `key?: Token | null` – Set for pair values. May then be `null`, if\n *       the key before the `:` separator is empty.\n *     - `sep?: SourceToken[]` – Source tokens between the key and the value,\n *       which should include the `:` map value indicator if `value` is set.\n *     - `value?: Token` – The value of a sequence item, or of a map pair.\n *   - `path`: The steps from the root to the current node, as an array of\n *     `['key' | 'value', number]` tuples.\n *\n * The return value of the visitor may be used to control the traversal:\n *   - `undefined` (default): Do nothing and continue\n *   - `visit.SKIP`: Do not visit the children of this token, continue with\n *      next sibling\n *   - `visit.BREAK`: Terminate traversal completely\n *   - `visit.REMOVE`: Remove the current item, then continue with the next one\n *   - `number`: Set the index of the next step. This is useful especially if\n *     the index of the current token has changed.\n *   - `function`: Define the next visitor for this item. After the original\n *     visitor is called on item entry, next visitors are called after handling\n *     a non-empty `key` and when exiting the item.\n */\nfunction visit(cst, visitor) {\n    if ('type' in cst && cst.type === 'document')\n        cst = { start: cst.start, value: cst.value };\n    _visit(Object.freeze([]), cst, visitor);\n}\n// Without the `as symbol` casts, TS declares these in the `visit`\n// namespace using `var`, but then complains about that because\n// `unique symbol` must be `const`.\n/** Terminate visit traversal completely */\nvisit.BREAK = BREAK;\n/** Do not visit the children of the current item */\nvisit.SKIP = SKIP;\n/** Remove the current item */\nvisit.REMOVE = REMOVE;\n/** Find the item at `path` from `cst` as the root */\nvisit.itemAtPath = (cst, path) => {\n    let item = cst;\n    for (const [field, index] of path) {\n        const tok = item?.[field];\n        if (tok && 'items' in tok) {\n            item = tok.items[index];\n        }\n        else\n            return undefined;\n    }\n    return item;\n};\n/**\n * Get the immediate parent collection of the item at `path` from `cst` as the root.\n *\n * Throws an error if the collection is not found, which should never happen if the item itself exists.\n */\nvisit.parentCollection = (cst, path) => {\n    const parent = visit.itemAtPath(cst, path.slice(0, -1));\n    const field = path[path.length - 1][0];\n    const coll = parent?.[field];\n    if (coll && 'items' in coll)\n        return coll;\n    throw new Error('Parent collection not found');\n};\nfunction _visit(path, item, visitor) {\n    let ctrl = visitor(item, path);\n    if (typeof ctrl === 'symbol')\n        return ctrl;\n    for (const field of ['key', 'value']) {\n        const token = item[field];\n        if (token && 'items' in token) {\n            for (let i = 0; i < token.items.length; ++i) {\n                const ci = _visit(Object.freeze(path.concat([[field, i]])), token.items[i], visitor);\n                if (typeof ci === 'number')\n                    i = ci - 1;\n                else if (ci === BREAK)\n                    return BREAK;\n                else if (ci === REMOVE) {\n                    token.items.splice(i, 1);\n                    i -= 1;\n                }\n            }\n            if (typeof ctrl === 'function' && field === 'key')\n                ctrl = ctrl(item, path);\n        }\n    }\n    return typeof ctrl === 'function' ? ctrl(item, path) : ctrl;\n}\n\nexports.visit = visit;\n","'use strict';\n\nvar cstScalar = require('./cst-scalar.js');\nvar cstStringify = require('./cst-stringify.js');\nvar cstVisit = require('./cst-visit.js');\n\n/** The byte order mark */\nconst BOM = '\\u{FEFF}';\n/** Start of doc-mode */\nconst DOCUMENT = '\\x02'; // C0: Start of Text\n/** Unexpected end of flow-mode */\nconst FLOW_END = '\\x18'; // C0: Cancel\n/** Next token is a scalar value */\nconst SCALAR = '\\x1f'; // C0: Unit Separator\n/** @returns `true` if `token` is a flow or block collection */\nconst isCollection = (token) => !!token && 'items' in token;\n/** @returns `true` if `token` is a flow or block scalar; not an alias */\nconst isScalar = (token) => !!token &&\n    (token.type === 'scalar' ||\n        token.type === 'single-quoted-scalar' ||\n        token.type === 'double-quoted-scalar' ||\n        token.type === 'block-scalar');\n/* istanbul ignore next */\n/** Get a printable representation of a lexer token */\nfunction prettyToken(token) {\n    switch (token) {\n        case BOM:\n            return '<BOM>';\n        case DOCUMENT:\n            return '<DOC>';\n        case FLOW_END:\n            return '<FLOW_END>';\n        case SCALAR:\n            return '<SCALAR>';\n        default:\n            return JSON.stringify(token);\n    }\n}\n/** Identify the type of a lexer token. May return `null` for unknown tokens. */\nfunction tokenType(source) {\n    switch (source) {\n        case BOM:\n            return 'byte-order-mark';\n        case DOCUMENT:\n            return 'doc-mode';\n        case FLOW_END:\n            return 'flow-error-end';\n        case SCALAR:\n            return 'scalar';\n        case '---':\n            return 'doc-start';\n        case '...':\n            return 'doc-end';\n        case '':\n        case '\\n':\n        case '\\r\\n':\n            return 'newline';\n        case '-':\n            return 'seq-item-ind';\n        case '?':\n            return 'explicit-key-ind';\n        case ':':\n            return 'map-value-ind';\n        case '{':\n            return 'flow-map-start';\n        case '}':\n            return 'flow-map-end';\n        case '[':\n            return 'flow-seq-start';\n        case ']':\n            return 'flow-seq-end';\n        case ',':\n            return 'comma';\n    }\n    switch (source[0]) {\n        case ' ':\n        case '\\t':\n            return 'space';\n        case '#':\n            return 'comment';\n        case '%':\n            return 'directive-line';\n        case '*':\n            return 'alias';\n        case '&':\n            return 'anchor';\n        case '!':\n            return 'tag';\n        case \"'\":\n            return 'single-quoted-scalar';\n        case '\"':\n            return 'double-quoted-scalar';\n        case '|':\n        case '>':\n            return 'block-scalar-header';\n    }\n    return null;\n}\n\nexports.createScalarToken = cstScalar.createScalarToken;\nexports.resolveAsScalar = cstScalar.resolveAsScalar;\nexports.setScalarValue = cstScalar.setScalarValue;\nexports.stringify = cstStringify.stringify;\nexports.visit = cstVisit.visit;\nexports.BOM = BOM;\nexports.DOCUMENT = DOCUMENT;\nexports.FLOW_END = FLOW_END;\nexports.SCALAR = SCALAR;\nexports.isCollection = isCollection;\nexports.isScalar = isScalar;\nexports.prettyToken = prettyToken;\nexports.tokenType = tokenType;\n","'use strict';\n\nvar cst = require('./cst.js');\n\n/*\nSTART -> stream\n\nstream\n  directive -> line-end -> stream\n  indent + line-end -> stream\n  [else] -> line-start\n\nline-end\n  comment -> line-end\n  newline -> .\n  input-end -> END\n\nline-start\n  doc-start -> doc\n  doc-end -> stream\n  [else] -> indent -> block-start\n\nblock-start\n  seq-item-start -> block-start\n  explicit-key-start -> block-start\n  map-value-start -> block-start\n  [else] -> doc\n\ndoc\n  line-end -> line-start\n  spaces -> doc\n  anchor -> doc\n  tag -> doc\n  flow-start -> flow -> doc\n  flow-end -> error -> doc\n  seq-item-start -> error -> doc\n  explicit-key-start -> error -> doc\n  map-value-start -> doc\n  alias -> doc\n  quote-start -> quoted-scalar -> doc\n  block-scalar-header -> line-end -> block-scalar(min) -> line-start\n  [else] -> plain-scalar(false, min) -> doc\n\nflow\n  line-end -> flow\n  spaces -> flow\n  anchor -> flow\n  tag -> flow\n  flow-start -> flow -> flow\n  flow-end -> .\n  seq-item-start -> error -> flow\n  explicit-key-start -> flow\n  map-value-start -> flow\n  alias -> flow\n  quote-start -> quoted-scalar -> flow\n  comma -> flow\n  [else] -> plain-scalar(true, 0) -> flow\n\nquoted-scalar\n  quote-end -> .\n  [else] -> quoted-scalar\n\nblock-scalar(min)\n  newline + peek(indent < min) -> .\n  [else] -> block-scalar(min)\n\nplain-scalar(is-flow, min)\n  scalar-end(is-flow) -> .\n  peek(newline + (indent < min)) -> .\n  [else] -> plain-scalar(min)\n*/\nfunction isEmpty(ch) {\n    switch (ch) {\n        case undefined:\n        case ' ':\n        case '\\n':\n        case '\\r':\n        case '\\t':\n            return true;\n        default:\n            return false;\n    }\n}\nconst hexDigits = new Set('0123456789ABCDEFabcdef');\nconst tagChars = new Set(\"0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz-#;/?:@&=+$_.!~*'()\");\nconst flowIndicatorChars = new Set(',[]{}');\nconst invalidAnchorChars = new Set(' ,[]{}\\n\\r\\t');\nconst isNotAnchorChar = (ch) => !ch || invalidAnchorChars.has(ch);\n/**\n * Splits an input string into lexical tokens, i.e. smaller strings that are\n * easily identifiable by `tokens.tokenType()`.\n *\n * Lexing starts always in a \"stream\" context. Incomplete input may be buffered\n * until a complete token can be emitted.\n *\n * In addition to slices of the original input, the following control characters\n * may also be emitted:\n *\n * - `\\x02` (Start of Text): A document starts with the next token\n * - `\\x18` (Cancel): Unexpected end of flow-mode (indicates an error)\n * - `\\x1f` (Unit Separator): Next token is a scalar value\n * - `\\u{FEFF}` (Byte order mark): Emitted separately outside documents\n */\nclass Lexer {\n    constructor() {\n        /**\n         * Flag indicating whether the end of the current buffer marks the end of\n         * all input\n         */\n        this.atEnd = false;\n        /**\n         * Explicit indent set in block scalar header, as an offset from the current\n         * minimum indent, so e.g. set to 1 from a header `|2+`. Set to -1 if not\n         * explicitly set.\n         */\n        this.blockScalarIndent = -1;\n        /**\n         * Block scalars that include a + (keep) chomping indicator in their header\n         * include trailing empty lines, which are otherwise excluded from the\n         * scalar's contents.\n         */\n        this.blockScalarKeep = false;\n        /** Current input */\n        this.buffer = '';\n        /**\n         * Flag noting whether the map value indicator : can immediately follow this\n         * node within a flow context.\n         */\n        this.flowKey = false;\n        /** Count of surrounding flow collection levels. */\n        this.flowLevel = 0;\n        /**\n         * Minimum level of indentation required for next lines to be parsed as a\n         * part of the current scalar value.\n         */\n        this.indentNext = 0;\n        /** Indentation level of the current line. */\n        this.indentValue = 0;\n        /** Position of the next \\n character. */\n        this.lineEndPos = null;\n        /** Stores the state of the lexer if reaching the end of incpomplete input */\n        this.next = null;\n        /** A pointer to `buffer`; the current position of the lexer. */\n        this.pos = 0;\n    }\n    /**\n     * Generate YAML tokens from the `source` string. If `incomplete`,\n     * a part of the last line may be left as a buffer for the next call.\n     *\n     * @returns A generator of lexical tokens\n     */\n    *lex(source, incomplete = false) {\n        if (source) {\n            if (typeof source !== 'string')\n                throw TypeError('source is not a string');\n            this.buffer = this.buffer ? this.buffer + source : source;\n            this.lineEndPos = null;\n        }\n        this.atEnd = !incomplete;\n        let next = this.next ?? 'stream';\n        while (next && (incomplete || this.hasChars(1)))\n            next = yield* this.parseNext(next);\n    }\n    atLineEnd() {\n        let i = this.pos;\n        let ch = this.buffer[i];\n        while (ch === ' ' || ch === '\\t')\n            ch = this.buffer[++i];\n        if (!ch || ch === '#' || ch === '\\n')\n            return true;\n        if (ch === '\\r')\n            return this.buffer[i + 1] === '\\n';\n        return false;\n    }\n    charAt(n) {\n        return this.buffer[this.pos + n];\n    }\n    continueScalar(offset) {\n        let ch = this.buffer[offset];\n        if (this.indentNext > 0) {\n            let indent = 0;\n            while (ch === ' ')\n                ch = this.buffer[++indent + offset];\n            if (ch === '\\r') {\n                const next = this.buffer[indent + offset + 1];\n                if (next === '\\n' || (!next && !this.atEnd))\n                    return offset + indent + 1;\n            }\n            return ch === '\\n' || indent >= this.indentNext || (!ch && !this.atEnd)\n                ? offset + indent\n                : -1;\n        }\n        if (ch === '-' || ch === '.') {\n            const dt = this.buffer.substr(offset, 3);\n            if ((dt === '---' || dt === '...') && isEmpty(this.buffer[offset + 3]))\n                return -1;\n        }\n        return offset;\n    }\n    getLine() {\n        let end = this.lineEndPos;\n        if (typeof end !== 'number' || (end !== -1 && end < this.pos)) {\n            end = this.buffer.indexOf('\\n', this.pos);\n            this.lineEndPos = end;\n        }\n        if (end === -1)\n            return this.atEnd ? this.buffer.substring(this.pos) : null;\n        if (this.buffer[end - 1] === '\\r')\n            end -= 1;\n        return this.buffer.substring(this.pos, end);\n    }\n    hasChars(n) {\n        return this.pos + n <= this.buffer.length;\n    }\n    setNext(state) {\n        this.buffer = this.buffer.substring(this.pos);\n        this.pos = 0;\n        this.lineEndPos = null;\n        this.next = state;\n        return null;\n    }\n    peek(n) {\n        return this.buffer.substr(this.pos, n);\n    }\n    *parseNext(next) {\n        switch (next) {\n            case 'stream':\n                return yield* this.parseStream();\n            case 'line-start':\n                return yield* this.parseLineStart();\n            case 'block-start':\n                return yield* this.parseBlockStart();\n            case 'doc':\n                return yield* this.parseDocument();\n            case 'flow':\n                return yield* this.parseFlowCollection();\n            case 'quoted-scalar':\n                return yield* this.parseQuotedScalar();\n            case 'block-scalar':\n                return yield* this.parseBlockScalar();\n            case 'plain-scalar':\n                return yield* this.parsePlainScalar();\n        }\n    }\n    *parseStream() {\n        let line = this.getLine();\n        if (line === null)\n            return this.setNext('stream');\n        if (line[0] === cst.BOM) {\n            yield* this.pushCount(1);\n            line = line.substring(1);\n        }\n        if (line[0] === '%') {\n            let dirEnd = line.length;\n            let cs = line.indexOf('#');\n            while (cs !== -1) {\n                const ch = line[cs - 1];\n                if (ch === ' ' || ch === '\\t') {\n                    dirEnd = cs - 1;\n                    break;\n                }\n                else {\n                    cs = line.indexOf('#', cs + 1);\n                }\n            }\n            while (true) {\n                const ch = line[dirEnd - 1];\n                if (ch === ' ' || ch === '\\t')\n                    dirEnd -= 1;\n                else\n                    break;\n            }\n            const n = (yield* this.pushCount(dirEnd)) + (yield* this.pushSpaces(true));\n            yield* this.pushCount(line.length - n); // possible comment\n            this.pushNewline();\n            return 'stream';\n        }\n        if (this.atLineEnd()) {\n            const sp = yield* this.pushSpaces(true);\n            yield* this.pushCount(line.length - sp);\n            yield* this.pushNewline();\n            return 'stream';\n        }\n        yield cst.DOCUMENT;\n        return yield* this.parseLineStart();\n    }\n    *parseLineStart() {\n        const ch = this.charAt(0);\n        if (!ch && !this.atEnd)\n            return this.setNext('line-start');\n        if (ch === '-' || ch === '.') {\n            if (!this.atEnd && !this.hasChars(4))\n                return this.setNext('line-start');\n            const s = this.peek(3);\n            if ((s === '---' || s === '...') && isEmpty(this.charAt(3))) {\n                yield* this.pushCount(3);\n                this.indentValue = 0;\n                this.indentNext = 0;\n                return s === '---' ? 'doc' : 'stream';\n            }\n        }\n        this.indentValue = yield* this.pushSpaces(false);\n        if (this.indentNext > this.indentValue && !isEmpty(this.charAt(1)))\n            this.indentNext = this.indentValue;\n        return yield* this.parseBlockStart();\n    }\n    *parseBlockStart() {\n        const [ch0, ch1] = this.peek(2);\n        if (!ch1 && !this.atEnd)\n            return this.setNext('block-start');\n        if ((ch0 === '-' || ch0 === '?' || ch0 === ':') && isEmpty(ch1)) {\n            const n = (yield* this.pushCount(1)) + (yield* this.pushSpaces(true));\n            this.indentNext = this.indentValue + 1;\n            this.indentValue += n;\n            return 'block-start';\n        }\n        return 'doc';\n    }\n    *parseDocument() {\n        yield* this.pushSpaces(true);\n        const line = this.getLine();\n        if (line === null)\n            return this.setNext('doc');\n        let n = yield* this.pushIndicators();\n        switch (line[n]) {\n            case '#':\n                yield* this.pushCount(line.length - n);\n            // fallthrough\n            case undefined:\n                yield* this.pushNewline();\n                return yield* this.parseLineStart();\n            case '{':\n            case '[':\n                yield* this.pushCount(1);\n                this.flowKey = false;\n                this.flowLevel = 1;\n                return 'flow';\n            case '}':\n            case ']':\n                // this is an error\n                yield* this.pushCount(1);\n                return 'doc';\n            case '*':\n                yield* this.pushUntil(isNotAnchorChar);\n                return 'doc';\n            case '\"':\n            case \"'\":\n                return yield* this.parseQuotedScalar();\n            case '|':\n            case '>':\n                n += yield* this.parseBlockScalarHeader();\n                n += yield* this.pushSpaces(true);\n                yield* this.pushCount(line.length - n);\n                yield* this.pushNewline();\n                return yield* this.parseBlockScalar();\n            default:\n                return yield* this.parsePlainScalar();\n        }\n    }\n    *parseFlowCollection() {\n        let nl, sp;\n        let indent = -1;\n        do {\n            nl = yield* this.pushNewline();\n            if (nl > 0) {\n                sp = yield* this.pushSpaces(false);\n                this.indentValue = indent = sp;\n            }\n            else {\n                sp = 0;\n            }\n            sp += yield* this.pushSpaces(true);\n        } while (nl + sp > 0);\n        const line = this.getLine();\n        if (line === null)\n            return this.setNext('flow');\n        if ((indent !== -1 && indent < this.indentNext && line[0] !== '#') ||\n            (indent === 0 &&\n                (line.startsWith('---') || line.startsWith('...')) &&\n                isEmpty(line[3]))) {\n            // Allowing for the terminal ] or } at the same (rather than greater)\n            // indent level as the initial [ or { is technically invalid, but\n            // failing here would be surprising to users.\n            const atFlowEndMarker = indent === this.indentNext - 1 &&\n                this.flowLevel === 1 &&\n                (line[0] === ']' || line[0] === '}');\n            if (!atFlowEndMarker) {\n                // this is an error\n                this.flowLevel = 0;\n                yield cst.FLOW_END;\n                return yield* this.parseLineStart();\n            }\n        }\n        let n = 0;\n        while (line[n] === ',') {\n            n += yield* this.pushCount(1);\n            n += yield* this.pushSpaces(true);\n            this.flowKey = false;\n        }\n        n += yield* this.pushIndicators();\n        switch (line[n]) {\n            case undefined:\n                return 'flow';\n            case '#':\n                yield* this.pushCount(line.length - n);\n                return 'flow';\n            case '{':\n            case '[':\n                yield* this.pushCount(1);\n                this.flowKey = false;\n                this.flowLevel += 1;\n                return 'flow';\n            case '}':\n            case ']':\n                yield* this.pushCount(1);\n                this.flowKey = true;\n                this.flowLevel -= 1;\n                return this.flowLevel ? 'flow' : 'doc';\n            case '*':\n                yield* this.pushUntil(isNotAnchorChar);\n                return 'flow';\n            case '\"':\n            case \"'\":\n                this.flowKey = true;\n                return yield* this.parseQuotedScalar();\n            case ':': {\n                const next = this.charAt(1);\n                if (this.flowKey || isEmpty(next) || next === ',') {\n                    this.flowKey = false;\n                    yield* this.pushCount(1);\n                    yield* this.pushSpaces(true);\n                    return 'flow';\n                }\n            }\n            // fallthrough\n            default:\n                this.flowKey = false;\n                return yield* this.parsePlainScalar();\n        }\n    }\n    *parseQuotedScalar() {\n        const quote = this.charAt(0);\n        let end = this.buffer.indexOf(quote, this.pos + 1);\n        if (quote === \"'\") {\n            while (end !== -1 && this.buffer[end + 1] === \"'\")\n                end = this.buffer.indexOf(\"'\", end + 2);\n        }\n        else {\n            // double-quote\n            while (end !== -1) {\n                let n = 0;\n                while (this.buffer[end - 1 - n] === '\\\\')\n                    n += 1;\n                if (n % 2 === 0)\n                    break;\n                end = this.buffer.indexOf('\"', end + 1);\n            }\n        }\n        // Only looking for newlines within the quotes\n        const qb = this.buffer.substring(0, end);\n        let nl = qb.indexOf('\\n', this.pos);\n        if (nl !== -1) {\n            while (nl !== -1) {\n                const cs = this.continueScalar(nl + 1);\n                if (cs === -1)\n                    break;\n                nl = qb.indexOf('\\n', cs);\n            }\n            if (nl !== -1) {\n                // this is an error caused by an unexpected unindent\n                end = nl - (qb[nl - 1] === '\\r' ? 2 : 1);\n            }\n        }\n        if (end === -1) {\n            if (!this.atEnd)\n                return this.setNext('quoted-scalar');\n            end = this.buffer.length;\n        }\n        yield* this.pushToIndex(end + 1, false);\n        return this.flowLevel ? 'flow' : 'doc';\n    }\n    *parseBlockScalarHeader() {\n        this.blockScalarIndent = -1;\n        this.blockScalarKeep = false;\n        let i = this.pos;\n        while (true) {\n            const ch = this.buffer[++i];\n            if (ch === '+')\n                this.blockScalarKeep = true;\n            else if (ch > '0' && ch <= '9')\n                this.blockScalarIndent = Number(ch) - 1;\n            else if (ch !== '-')\n                break;\n        }\n        return yield* this.pushUntil(ch => isEmpty(ch) || ch === '#');\n    }\n    *parseBlockScalar() {\n        let nl = this.pos - 1; // may be -1 if this.pos === 0\n        let indent = 0;\n        let ch;\n        loop: for (let i = this.pos; (ch = this.buffer[i]); ++i) {\n            switch (ch) {\n                case ' ':\n                    indent += 1;\n                    break;\n                case '\\n':\n                    nl = i;\n                    indent = 0;\n                    break;\n                case '\\r': {\n                    const next = this.buffer[i + 1];\n                    if (!next && !this.atEnd)\n                        return this.setNext('block-scalar');\n                    if (next === '\\n')\n                        break;\n                } // fallthrough\n                default:\n                    break loop;\n            }\n        }\n        if (!ch && !this.atEnd)\n            return this.setNext('block-scalar');\n        if (indent >= this.indentNext) {\n            if (this.blockScalarIndent === -1)\n                this.indentNext = indent;\n            else {\n                this.indentNext =\n                    this.blockScalarIndent + (this.indentNext === 0 ? 1 : this.indentNext);\n            }\n            do {\n                const cs = this.continueScalar(nl + 1);\n                if (cs === -1)\n                    break;\n                nl = this.buffer.indexOf('\\n', cs);\n            } while (nl !== -1);\n            if (nl === -1) {\n                if (!this.atEnd)\n                    return this.setNext('block-scalar');\n                nl = this.buffer.length;\n            }\n        }\n        // Trailing insufficiently indented tabs are invalid.\n        // To catch that during parsing, we include them in the block scalar value.\n        let i = nl + 1;\n        ch = this.buffer[i];\n        while (ch === ' ')\n            ch = this.buffer[++i];\n        if (ch === '\\t') {\n            while (ch === '\\t' || ch === ' ' || ch === '\\r' || ch === '\\n')\n                ch = this.buffer[++i];\n            nl = i - 1;\n        }\n        else if (!this.blockScalarKeep) {\n            do {\n                let i = nl - 1;\n                let ch = this.buffer[i];\n                if (ch === '\\r')\n                    ch = this.buffer[--i];\n                const lastChar = i; // Drop the line if last char not more indented\n                while (ch === ' ')\n                    ch = this.buffer[--i];\n                if (ch === '\\n' && i >= this.pos && i + 1 + indent > lastChar)\n                    nl = i;\n                else\n                    break;\n            } while (true);\n        }\n        yield cst.SCALAR;\n        yield* this.pushToIndex(nl + 1, true);\n        return yield* this.parseLineStart();\n    }\n    *parsePlainScalar() {\n        const inFlow = this.flowLevel > 0;\n        let end = this.pos - 1;\n        let i = this.pos - 1;\n        let ch;\n        while ((ch = this.buffer[++i])) {\n            if (ch === ':') {\n                const next = this.buffer[i + 1];\n                if (isEmpty(next) || (inFlow && flowIndicatorChars.has(next)))\n                    break;\n                end = i;\n            }\n            else if (isEmpty(ch)) {\n                let next = this.buffer[i + 1];\n                if (ch === '\\r') {\n                    if (next === '\\n') {\n                        i += 1;\n                        ch = '\\n';\n                        next = this.buffer[i + 1];\n                    }\n                    else\n                        end = i;\n                }\n                if (next === '#' || (inFlow && flowIndicatorChars.has(next)))\n                    break;\n                if (ch === '\\n') {\n                    const cs = this.continueScalar(i + 1);\n                    if (cs === -1)\n                        break;\n                    i = Math.max(i, cs - 2); // to advance, but still account for ' #'\n                }\n            }\n            else {\n                if (inFlow && flowIndicatorChars.has(ch))\n                    break;\n                end = i;\n            }\n        }\n        if (!ch && !this.atEnd)\n            return this.setNext('plain-scalar');\n        yield cst.SCALAR;\n        yield* this.pushToIndex(end + 1, true);\n        return inFlow ? 'flow' : 'doc';\n    }\n    *pushCount(n) {\n        if (n > 0) {\n            yield this.buffer.substr(this.pos, n);\n            this.pos += n;\n            return n;\n        }\n        return 0;\n    }\n    *pushToIndex(i, allowEmpty) {\n        const s = this.buffer.slice(this.pos, i);\n        if (s) {\n            yield s;\n            this.pos += s.length;\n            return s.length;\n        }\n        else if (allowEmpty)\n            yield '';\n        return 0;\n    }\n    *pushIndicators() {\n        let n = 0;\n        loop: while (true) {\n            switch (this.charAt(0)) {\n                case '!':\n                    n += yield* this.pushTag();\n                    n += yield* this.pushSpaces(true);\n                    continue loop;\n                case '&':\n                    n += yield* this.pushUntil(isNotAnchorChar);\n                    n += yield* this.pushSpaces(true);\n                    continue loop;\n                case '-': // this is an error\n                case '?': // this is an error outside flow collections\n                case ':': {\n                    const inFlow = this.flowLevel > 0;\n                    const ch1 = this.charAt(1);\n                    if (isEmpty(ch1) || (inFlow && flowIndicatorChars.has(ch1))) {\n                        if (!inFlow)\n                            this.indentNext = this.indentValue + 1;\n                        else if (this.flowKey)\n                            this.flowKey = false;\n                        n += yield* this.pushCount(1);\n                        n += yield* this.pushSpaces(true);\n                        continue loop;\n                    }\n                }\n            }\n            break loop;\n        }\n        return n;\n    }\n    *pushTag() {\n        if (this.charAt(1) === '<') {\n            let i = this.pos + 2;\n            let ch = this.buffer[i];\n            while (!isEmpty(ch) && ch !== '>')\n                ch = this.buffer[++i];\n            return yield* this.pushToIndex(ch === '>' ? i + 1 : i, false);\n        }\n        else {\n            let i = this.pos + 1;\n            let ch = this.buffer[i];\n            while (ch) {\n                if (tagChars.has(ch))\n                    ch = this.buffer[++i];\n                else if (ch === '%' &&\n                    hexDigits.has(this.buffer[i + 1]) &&\n                    hexDigits.has(this.buffer[i + 2])) {\n                    ch = this.buffer[(i += 3)];\n                }\n                else\n                    break;\n            }\n            return yield* this.pushToIndex(i, false);\n        }\n    }\n    *pushNewline() {\n        const ch = this.buffer[this.pos];\n        if (ch === '\\n')\n            return yield* this.pushCount(1);\n        else if (ch === '\\r' && this.charAt(1) === '\\n')\n            return yield* this.pushCount(2);\n        else\n            return 0;\n    }\n    *pushSpaces(allowTabs) {\n        let i = this.pos - 1;\n        let ch;\n        do {\n            ch = this.buffer[++i];\n        } while (ch === ' ' || (allowTabs && ch === '\\t'));\n        const n = i - this.pos;\n        if (n > 0) {\n            yield this.buffer.substr(this.pos, n);\n            this.pos = i;\n        }\n        return n;\n    }\n    *pushUntil(test) {\n        let i = this.pos;\n        let ch = this.buffer[i];\n        while (!test(ch))\n            ch = this.buffer[++i];\n        return yield* this.pushToIndex(i, false);\n    }\n}\n\nexports.Lexer = Lexer;\n","'use strict';\n\n/**\n * Tracks newlines during parsing in order to provide an efficient API for\n * determining the one-indexed `{ line, col }` position for any offset\n * within the input.\n */\nclass LineCounter {\n    constructor() {\n        this.lineStarts = [];\n        /**\n         * Should be called in ascending order. Otherwise, call\n         * `lineCounter.lineStarts.sort()` before calling `linePos()`.\n         */\n        this.addNewLine = (offset) => this.lineStarts.push(offset);\n        /**\n         * Performs a binary search and returns the 1-indexed { line, col }\n         * position of `offset`. If `line === 0`, `addNewLine` has never been\n         * called or `offset` is before the first known newline.\n         */\n        this.linePos = (offset) => {\n            let low = 0;\n            let high = this.lineStarts.length;\n            while (low < high) {\n                const mid = (low + high) >> 1; // Math.floor((low + high) / 2)\n                if (this.lineStarts[mid] < offset)\n                    low = mid + 1;\n                else\n                    high = mid;\n            }\n            if (this.lineStarts[low] === offset)\n                return { line: low + 1, col: 1 };\n            if (low === 0)\n                return { line: 0, col: offset };\n            const start = this.lineStarts[low - 1];\n            return { line: low, col: offset - start + 1 };\n        };\n    }\n}\n\nexports.LineCounter = LineCounter;\n","'use strict';\n\nvar node_process = require('process');\nvar cst = require('./cst.js');\nvar lexer = require('./lexer.js');\n\nfunction includesToken(list, type) {\n    for (let i = 0; i < list.length; ++i)\n        if (list[i].type === type)\n            return true;\n    return false;\n}\nfunction findNonEmptyIndex(list) {\n    for (let i = 0; i < list.length; ++i) {\n        switch (list[i].type) {\n            case 'space':\n            case 'comment':\n            case 'newline':\n                break;\n            default:\n                return i;\n        }\n    }\n    return -1;\n}\nfunction isFlowToken(token) {\n    switch (token?.type) {\n        case 'alias':\n        case 'scalar':\n        case 'single-quoted-scalar':\n        case 'double-quoted-scalar':\n        case 'flow-collection':\n            return true;\n        default:\n            return false;\n    }\n}\nfunction getPrevProps(parent) {\n    switch (parent.type) {\n        case 'document':\n            return parent.start;\n        case 'block-map': {\n            const it = parent.items[parent.items.length - 1];\n            return it.sep ?? it.start;\n        }\n        case 'block-seq':\n            return parent.items[parent.items.length - 1].start;\n        /* istanbul ignore next should not happen */\n        default:\n            return [];\n    }\n}\n/** Note: May modify input array */\nfunction getFirstKeyStartProps(prev) {\n    if (prev.length === 0)\n        return [];\n    let i = prev.length;\n    loop: while (--i >= 0) {\n        switch (prev[i].type) {\n            case 'doc-start':\n            case 'explicit-key-ind':\n            case 'map-value-ind':\n            case 'seq-item-ind':\n            case 'newline':\n                break loop;\n        }\n    }\n    while (prev[++i]?.type === 'space') {\n        /* loop */\n    }\n    return prev.splice(i, prev.length);\n}\nfunction arrayPushArray(target, source) {\n    // May exhaust call stack with large `source` array\n    if (source.length < 1e5)\n        Array.prototype.push.apply(target, source);\n    else\n        for (let i = 0; i < source.length; ++i)\n            target.push(source[i]);\n}\nfunction fixFlowSeqItems(fc) {\n    if (fc.start.type === 'flow-seq-start') {\n        for (const it of fc.items) {\n            if (it.sep &&\n                !it.value &&\n                !includesToken(it.start, 'explicit-key-ind') &&\n                !includesToken(it.sep, 'map-value-ind')) {\n                if (it.key)\n                    it.value = it.key;\n                delete it.key;\n                if (isFlowToken(it.value)) {\n                    if (it.value.end)\n                        arrayPushArray(it.value.end, it.sep);\n                    else\n                        it.value.end = it.sep;\n                }\n                else\n                    arrayPushArray(it.start, it.sep);\n                delete it.sep;\n            }\n        }\n    }\n}\n/**\n * A YAML concrete syntax tree (CST) parser\n *\n * ```ts\n * const src: string = ...\n * for (const token of new Parser().parse(src)) {\n *   // token: Token\n * }\n * ```\n *\n * To use the parser with a user-provided lexer:\n *\n * ```ts\n * function* parse(source: string, lexer: Lexer) {\n *   const parser = new Parser()\n *   for (const lexeme of lexer.lex(source))\n *     yield* parser.next(lexeme)\n *   yield* parser.end()\n * }\n *\n * const src: string = ...\n * const lexer = new Lexer()\n * for (const token of parse(src, lexer)) {\n *   // token: Token\n * }\n * ```\n */\nclass Parser {\n    /**\n     * @param onNewLine - If defined, called separately with the start position of\n     *   each new line (in `parse()`, including the start of input).\n     */\n    constructor(onNewLine) {\n        /** If true, space and sequence indicators count as indentation */\n        this.atNewLine = true;\n        /** If true, next token is a scalar value */\n        this.atScalar = false;\n        /** Current indentation level */\n        this.indent = 0;\n        /** Current offset since the start of parsing */\n        this.offset = 0;\n        /** On the same line with a block map key */\n        this.onKeyLine = false;\n        /** Top indicates the node that's currently being built */\n        this.stack = [];\n        /** The source of the current token, set in parse() */\n        this.source = '';\n        /** The type of the current token, set in parse() */\n        this.type = '';\n        // Must be defined after `next()`\n        this.lexer = new lexer.Lexer();\n        this.onNewLine = onNewLine;\n    }\n    /**\n     * Parse `source` as a YAML stream.\n     * If `incomplete`, a part of the last line may be left as a buffer for the next call.\n     *\n     * Errors are not thrown, but yielded as `{ type: 'error', message }` tokens.\n     *\n     * @returns A generator of tokens representing each directive, document, and other structure.\n     */\n    *parse(source, incomplete = false) {\n        if (this.onNewLine && this.offset === 0)\n            this.onNewLine(0);\n        for (const lexeme of this.lexer.lex(source, incomplete))\n            yield* this.next(lexeme);\n        if (!incomplete)\n            yield* this.end();\n    }\n    /**\n     * Advance the parser by the `source` of one lexical token.\n     */\n    *next(source) {\n        this.source = source;\n        if (node_process.env.LOG_TOKENS)\n            console.log('|', cst.prettyToken(source));\n        if (this.atScalar) {\n            this.atScalar = false;\n            yield* this.step();\n            this.offset += source.length;\n            return;\n        }\n        const type = cst.tokenType(source);\n        if (!type) {\n            const message = `Not a YAML token: ${source}`;\n            yield* this.pop({ type: 'error', offset: this.offset, message, source });\n            this.offset += source.length;\n        }\n        else if (type === 'scalar') {\n            this.atNewLine = false;\n            this.atScalar = true;\n            this.type = 'scalar';\n        }\n        else {\n            this.type = type;\n            yield* this.step();\n            switch (type) {\n                case 'newline':\n                    this.atNewLine = true;\n                    this.indent = 0;\n                    if (this.onNewLine)\n                        this.onNewLine(this.offset + source.length);\n                    break;\n                case 'space':\n                    if (this.atNewLine && source[0] === ' ')\n                        this.indent += source.length;\n                    break;\n                case 'explicit-key-ind':\n                case 'map-value-ind':\n                case 'seq-item-ind':\n                    if (this.atNewLine)\n                        this.indent += source.length;\n                    break;\n                case 'doc-mode':\n                case 'flow-error-end':\n                    return;\n                default:\n                    this.atNewLine = false;\n            }\n            this.offset += source.length;\n        }\n    }\n    /** Call at end of input to push out any remaining constructions */\n    *end() {\n        while (this.stack.length > 0)\n            yield* this.pop();\n    }\n    get sourceToken() {\n        const st = {\n            type: this.type,\n            offset: this.offset,\n            indent: this.indent,\n            source: this.source\n        };\n        return st;\n    }\n    *step() {\n        const top = this.peek(1);\n        if (this.type === 'doc-end' && top?.type !== 'doc-end') {\n            while (this.stack.length > 0)\n                yield* this.pop();\n            this.stack.push({\n                type: 'doc-end',\n                offset: this.offset,\n                source: this.source\n            });\n            return;\n        }\n        if (!top)\n            return yield* this.stream();\n        switch (top.type) {\n            case 'document':\n                return yield* this.document(top);\n            case 'alias':\n            case 'scalar':\n            case 'single-quoted-scalar':\n            case 'double-quoted-scalar':\n                return yield* this.scalar(top);\n            case 'block-scalar':\n                return yield* this.blockScalar(top);\n            case 'block-map':\n                return yield* this.blockMap(top);\n            case 'block-seq':\n                return yield* this.blockSequence(top);\n            case 'flow-collection':\n                return yield* this.flowCollection(top);\n            case 'doc-end':\n                return yield* this.documentEnd(top);\n        }\n        /* istanbul ignore next should not happen */\n        yield* this.pop();\n    }\n    peek(n) {\n        return this.stack[this.stack.length - n];\n    }\n    *pop(error) {\n        const token = error ?? this.stack.pop();\n        /* istanbul ignore if should not happen */\n        if (!token) {\n            const message = 'Tried to pop an empty stack';\n            yield { type: 'error', offset: this.offset, source: '', message };\n        }\n        else if (this.stack.length === 0) {\n            yield token;\n        }\n        else {\n            const top = this.peek(1);\n            if (token.type === 'block-scalar') {\n                // Block scalars use their parent rather than header indent\n                token.indent = 'indent' in top ? top.indent : 0;\n            }\n            else if (token.type === 'flow-collection' && top.type === 'document') {\n                // Ignore all indent for top-level flow collections\n                token.indent = 0;\n            }\n            if (token.type === 'flow-collection')\n                fixFlowSeqItems(token);\n            switch (top.type) {\n                case 'document':\n                    top.value = token;\n                    break;\n                case 'block-scalar':\n                    top.props.push(token); // error\n                    break;\n                case 'block-map': {\n                    const it = top.items[top.items.length - 1];\n                    if (it.value) {\n                        top.items.push({ start: [], key: token, sep: [] });\n                        this.onKeyLine = true;\n                        return;\n                    }\n                    else if (it.sep) {\n                        it.value = token;\n                    }\n                    else {\n                        Object.assign(it, { key: token, sep: [] });\n                        this.onKeyLine = !it.explicitKey;\n                        return;\n                    }\n                    break;\n                }\n                case 'block-seq': {\n                    const it = top.items[top.items.length - 1];\n                    if (it.value)\n                        top.items.push({ start: [], value: token });\n                    else\n                        it.value = token;\n                    break;\n                }\n                case 'flow-collection': {\n                    const it = top.items[top.items.length - 1];\n                    if (!it || it.value)\n                        top.items.push({ start: [], key: token, sep: [] });\n                    else if (it.sep)\n                        it.value = token;\n                    else\n                        Object.assign(it, { key: token, sep: [] });\n                    return;\n                }\n                /* istanbul ignore next should not happen */\n                default:\n                    yield* this.pop();\n                    yield* this.pop(token);\n            }\n            if ((top.type === 'document' ||\n                top.type === 'block-map' ||\n                top.type === 'block-seq') &&\n                (token.type === 'block-map' || token.type === 'block-seq')) {\n                const last = token.items[token.items.length - 1];\n                if (last &&\n                    !last.sep &&\n                    !last.value &&\n                    last.start.length > 0 &&\n                    findNonEmptyIndex(last.start) === -1 &&\n                    (token.indent === 0 ||\n                        last.start.every(st => st.type !== 'comment' || st.indent < token.indent))) {\n                    if (top.type === 'document')\n                        top.end = last.start;\n                    else\n                        top.items.push({ start: last.start });\n                    token.items.splice(-1, 1);\n                }\n            }\n        }\n    }\n    *stream() {\n        switch (this.type) {\n            case 'directive-line':\n                yield { type: 'directive', offset: this.offset, source: this.source };\n                return;\n            case 'byte-order-mark':\n            case 'space':\n            case 'comment':\n            case 'newline':\n                yield this.sourceToken;\n                return;\n            case 'doc-mode':\n            case 'doc-start': {\n                const doc = {\n                    type: 'document',\n                    offset: this.offset,\n                    start: []\n                };\n                if (this.type === 'doc-start')\n                    doc.start.push(this.sourceToken);\n                this.stack.push(doc);\n                return;\n            }\n        }\n        yield {\n            type: 'error',\n            offset: this.offset,\n            message: `Unexpected ${this.type} token in YAML stream`,\n            source: this.source\n        };\n    }\n    *document(doc) {\n        if (doc.value)\n            return yield* this.lineEnd(doc);\n        switch (this.type) {\n            case 'doc-start': {\n                if (findNonEmptyIndex(doc.start) !== -1) {\n                    yield* this.pop();\n                    yield* this.step();\n                }\n                else\n                    doc.start.push(this.sourceToken);\n                return;\n            }\n            case 'anchor':\n            case 'tag':\n            case 'space':\n            case 'comment':\n            case 'newline':\n                doc.start.push(this.sourceToken);\n                return;\n        }\n        const bv = this.startBlockValue(doc);\n        if (bv)\n            this.stack.push(bv);\n        else {\n            yield {\n                type: 'error',\n                offset: this.offset,\n                message: `Unexpected ${this.type} token in YAML document`,\n                source: this.source\n            };\n        }\n    }\n    *scalar(scalar) {\n        if (this.type === 'map-value-ind') {\n            const prev = getPrevProps(this.peek(2));\n            const start = getFirstKeyStartProps(prev);\n            let sep;\n            if (scalar.end) {\n                sep = scalar.end;\n                sep.push(this.sourceToken);\n                delete scalar.end;\n            }\n            else\n                sep = [this.sourceToken];\n            const map = {\n                type: 'block-map',\n                offset: scalar.offset,\n                indent: scalar.indent,\n                items: [{ start, key: scalar, sep }]\n            };\n            this.onKeyLine = true;\n            this.stack[this.stack.length - 1] = map;\n        }\n        else\n            yield* this.lineEnd(scalar);\n    }\n    *blockScalar(scalar) {\n        switch (this.type) {\n            case 'space':\n            case 'comment':\n            case 'newline':\n                scalar.props.push(this.sourceToken);\n                return;\n            case 'scalar':\n                scalar.source = this.source;\n                // block-scalar source includes trailing newline\n                this.atNewLine = true;\n                this.indent = 0;\n                if (this.onNewLine) {\n                    let nl = this.source.indexOf('\\n') + 1;\n                    while (nl !== 0) {\n                        this.onNewLine(this.offset + nl);\n                        nl = this.source.indexOf('\\n', nl) + 1;\n                    }\n                }\n                yield* this.pop();\n                break;\n            /* istanbul ignore next should not happen */\n            default:\n                yield* this.pop();\n                yield* this.step();\n        }\n    }\n    *blockMap(map) {\n        const it = map.items[map.items.length - 1];\n        // it.sep is true-ish if pair already has key or : separator\n        switch (this.type) {\n            case 'newline':\n                this.onKeyLine = false;\n                if (it.value) {\n                    const end = 'end' in it.value ? it.value.end : undefined;\n                    const last = Array.isArray(end) ? end[end.length - 1] : undefined;\n                    if (last?.type === 'comment')\n                        end?.push(this.sourceToken);\n                    else\n                        map.items.push({ start: [this.sourceToken] });\n                }\n                else if (it.sep) {\n                    it.sep.push(this.sourceToken);\n                }\n                else {\n                    it.start.push(this.sourceToken);\n                }\n                return;\n            case 'space':\n            case 'comment':\n                if (it.value) {\n                    map.items.push({ start: [this.sourceToken] });\n                }\n                else if (it.sep) {\n                    it.sep.push(this.sourceToken);\n                }\n                else {\n                    if (this.atIndentedComment(it.start, map.indent)) {\n                        const prev = map.items[map.items.length - 2];\n                        const end = prev?.value?.end;\n                        if (Array.isArray(end)) {\n                            arrayPushArray(end, it.start);\n                            end.push(this.sourceToken);\n                            map.items.pop();\n                            return;\n                        }\n                    }\n                    it.start.push(this.sourceToken);\n                }\n                return;\n        }\n        if (this.indent >= map.indent) {\n            const atMapIndent = !this.onKeyLine && this.indent === map.indent;\n            const atNextItem = atMapIndent &&\n                (it.sep || it.explicitKey) &&\n                this.type !== 'seq-item-ind';\n            // For empty nodes, assign newline-separated not indented empty tokens to following node\n            let start = [];\n            if (atNextItem && it.sep && !it.value) {\n                const nl = [];\n                for (let i = 0; i < it.sep.length; ++i) {\n                    const st = it.sep[i];\n                    switch (st.type) {\n                        case 'newline':\n                            nl.push(i);\n                            break;\n                        case 'space':\n                            break;\n                        case 'comment':\n                            if (st.indent > map.indent)\n                                nl.length = 0;\n                            break;\n                        default:\n                            nl.length = 0;\n                    }\n                }\n                if (nl.length >= 2)\n                    start = it.sep.splice(nl[1]);\n            }\n            switch (this.type) {\n                case 'anchor':\n                case 'tag':\n                    if (atNextItem || it.value) {\n                        start.push(this.sourceToken);\n                        map.items.push({ start });\n                        this.onKeyLine = true;\n                    }\n                    else if (it.sep) {\n                        it.sep.push(this.sourceToken);\n                    }\n                    else {\n                        it.start.push(this.sourceToken);\n                    }\n                    return;\n                case 'explicit-key-ind':\n                    if (!it.sep && !it.explicitKey) {\n                        it.start.push(this.sourceToken);\n                        it.explicitKey = true;\n                    }\n                    else if (atNextItem || it.value) {\n                        start.push(this.sourceToken);\n                        map.items.push({ start, explicitKey: true });\n                    }\n                    else {\n                        this.stack.push({\n                            type: 'block-map',\n                            offset: this.offset,\n                            indent: this.indent,\n                            items: [{ start: [this.sourceToken], explicitKey: true }]\n                        });\n                    }\n                    this.onKeyLine = true;\n                    return;\n                case 'map-value-ind':\n                    if (it.explicitKey) {\n                        if (!it.sep) {\n                            if (includesToken(it.start, 'newline')) {\n                                Object.assign(it, { key: null, sep: [this.sourceToken] });\n                            }\n                            else {\n                                const start = getFirstKeyStartProps(it.start);\n                                this.stack.push({\n                                    type: 'block-map',\n                                    offset: this.offset,\n                                    indent: this.indent,\n                                    items: [{ start, key: null, sep: [this.sourceToken] }]\n                                });\n                            }\n                        }\n                        else if (it.value) {\n                            map.items.push({ start: [], key: null, sep: [this.sourceToken] });\n                        }\n                        else if (includesToken(it.sep, 'map-value-ind')) {\n                            this.stack.push({\n                                type: 'block-map',\n                                offset: this.offset,\n                                indent: this.indent,\n                                items: [{ start, key: null, sep: [this.sourceToken] }]\n                            });\n                        }\n                        else if (isFlowToken(it.key) &&\n                            !includesToken(it.sep, 'newline')) {\n                            const start = getFirstKeyStartProps(it.start);\n                            const key = it.key;\n                            const sep = it.sep;\n                            sep.push(this.sourceToken);\n                            // @ts-expect-error type guard is wrong here\n                            delete it.key;\n                            // @ts-expect-error type guard is wrong here\n                            delete it.sep;\n                            this.stack.push({\n                                type: 'block-map',\n                                offset: this.offset,\n                                indent: this.indent,\n                                items: [{ start, key, sep }]\n                            });\n                        }\n                        else if (start.length > 0) {\n                            // Not actually at next item\n                            it.sep = it.sep.concat(start, this.sourceToken);\n                        }\n                        else {\n                            it.sep.push(this.sourceToken);\n                        }\n                    }\n                    else {\n                        if (!it.sep) {\n                            Object.assign(it, { key: null, sep: [this.sourceToken] });\n                        }\n                        else if (it.value || atNextItem) {\n                            map.items.push({ start, key: null, sep: [this.sourceToken] });\n                        }\n                        else if (includesToken(it.sep, 'map-value-ind')) {\n                            this.stack.push({\n                                type: 'block-map',\n                                offset: this.offset,\n                                indent: this.indent,\n                                items: [{ start: [], key: null, sep: [this.sourceToken] }]\n                            });\n                        }\n                        else {\n                            it.sep.push(this.sourceToken);\n                        }\n                    }\n                    this.onKeyLine = true;\n                    return;\n                case 'alias':\n                case 'scalar':\n                case 'single-quoted-scalar':\n                case 'double-quoted-scalar': {\n                    const fs = this.flowScalar(this.type);\n                    if (atNextItem || it.value) {\n                        map.items.push({ start, key: fs, sep: [] });\n                        this.onKeyLine = true;\n                    }\n                    else if (it.sep) {\n                        this.stack.push(fs);\n                    }\n                    else {\n                        Object.assign(it, { key: fs, sep: [] });\n                        this.onKeyLine = true;\n                    }\n                    return;\n                }\n                default: {\n                    const bv = this.startBlockValue(map);\n                    if (bv) {\n                        if (bv.type === 'block-seq') {\n                            if (!it.explicitKey &&\n                                it.sep &&\n                                !includesToken(it.sep, 'newline')) {\n                                yield* this.pop({\n                                    type: 'error',\n                                    offset: this.offset,\n                                    message: 'Unexpected block-seq-ind on same line with key',\n                                    source: this.source\n                                });\n                                return;\n                            }\n                        }\n                        else if (atMapIndent) {\n                            map.items.push({ start });\n                        }\n                        this.stack.push(bv);\n                        return;\n                    }\n                }\n            }\n        }\n        yield* this.pop();\n        yield* this.step();\n    }\n    *blockSequence(seq) {\n        const it = seq.items[seq.items.length - 1];\n        switch (this.type) {\n            case 'newline':\n                if (it.value) {\n                    const end = 'end' in it.value ? it.value.end : undefined;\n                    const last = Array.isArray(end) ? end[end.length - 1] : undefined;\n                    if (last?.type === 'comment')\n                        end?.push(this.sourceToken);\n                    else\n                        seq.items.push({ start: [this.sourceToken] });\n                }\n                else\n                    it.start.push(this.sourceToken);\n                return;\n            case 'space':\n            case 'comment':\n                if (it.value)\n                    seq.items.push({ start: [this.sourceToken] });\n                else {\n                    if (this.atIndentedComment(it.start, seq.indent)) {\n                        const prev = seq.items[seq.items.length - 2];\n                        const end = prev?.value?.end;\n                        if (Array.isArray(end)) {\n                            arrayPushArray(end, it.start);\n                            end.push(this.sourceToken);\n                            seq.items.pop();\n                            return;\n                        }\n                    }\n                    it.start.push(this.sourceToken);\n                }\n                return;\n            case 'anchor':\n            case 'tag':\n                if (it.value || this.indent <= seq.indent)\n                    break;\n                it.start.push(this.sourceToken);\n                return;\n            case 'seq-item-ind':\n                if (this.indent !== seq.indent)\n                    break;\n                if (it.value || includesToken(it.start, 'seq-item-ind'))\n                    seq.items.push({ start: [this.sourceToken] });\n                else\n                    it.start.push(this.sourceToken);\n                return;\n        }\n        if (this.indent > seq.indent) {\n            const bv = this.startBlockValue(seq);\n            if (bv) {\n                this.stack.push(bv);\n                return;\n            }\n        }\n        yield* this.pop();\n        yield* this.step();\n    }\n    *flowCollection(fc) {\n        const it = fc.items[fc.items.length - 1];\n        if (this.type === 'flow-error-end') {\n            let top;\n            do {\n                yield* this.pop();\n                top = this.peek(1);\n            } while (top?.type === 'flow-collection');\n        }\n        else if (fc.end.length === 0) {\n            switch (this.type) {\n                case 'comma':\n                case 'explicit-key-ind':\n                    if (!it || it.sep)\n                        fc.items.push({ start: [this.sourceToken] });\n                    else\n                        it.start.push(this.sourceToken);\n                    return;\n                case 'map-value-ind':\n                    if (!it || it.value)\n                        fc.items.push({ start: [], key: null, sep: [this.sourceToken] });\n                    else if (it.sep)\n                        it.sep.push(this.sourceToken);\n                    else\n                        Object.assign(it, { key: null, sep: [this.sourceToken] });\n                    return;\n                case 'space':\n                case 'comment':\n                case 'newline':\n                case 'anchor':\n                case 'tag':\n                    if (!it || it.value)\n                        fc.items.push({ start: [this.sourceToken] });\n                    else if (it.sep)\n                        it.sep.push(this.sourceToken);\n                    else\n                        it.start.push(this.sourceToken);\n                    return;\n                case 'alias':\n                case 'scalar':\n                case 'single-quoted-scalar':\n                case 'double-quoted-scalar': {\n                    const fs = this.flowScalar(this.type);\n                    if (!it || it.value)\n                        fc.items.push({ start: [], key: fs, sep: [] });\n                    else if (it.sep)\n                        this.stack.push(fs);\n                    else\n                        Object.assign(it, { key: fs, sep: [] });\n                    return;\n                }\n                case 'flow-map-end':\n                case 'flow-seq-end':\n                    fc.end.push(this.sourceToken);\n                    return;\n            }\n            const bv = this.startBlockValue(fc);\n            /* istanbul ignore else should not happen */\n            if (bv)\n                this.stack.push(bv);\n            else {\n                yield* this.pop();\n                yield* this.step();\n            }\n        }\n        else {\n            const parent = this.peek(2);\n            if (parent.type === 'block-map' &&\n                ((this.type === 'map-value-ind' && parent.indent === fc.indent) ||\n                    (this.type === 'newline' &&\n                        !parent.items[parent.items.length - 1].sep))) {\n                yield* this.pop();\n                yield* this.step();\n            }\n            else if (this.type === 'map-value-ind' &&\n                parent.type !== 'flow-collection') {\n                const prev = getPrevProps(parent);\n                const start = getFirstKeyStartProps(prev);\n                fixFlowSeqItems(fc);\n                const sep = fc.end.splice(1, fc.end.length);\n                sep.push(this.sourceToken);\n                const map = {\n                    type: 'block-map',\n                    offset: fc.offset,\n                    indent: fc.indent,\n                    items: [{ start, key: fc, sep }]\n                };\n                this.onKeyLine = true;\n                this.stack[this.stack.length - 1] = map;\n            }\n            else {\n                yield* this.lineEnd(fc);\n            }\n        }\n    }\n    flowScalar(type) {\n        if (this.onNewLine) {\n            let nl = this.source.indexOf('\\n') + 1;\n            while (nl !== 0) {\n                this.onNewLine(this.offset + nl);\n                nl = this.source.indexOf('\\n', nl) + 1;\n            }\n        }\n        return {\n            type,\n            offset: this.offset,\n            indent: this.indent,\n            source: this.source\n        };\n    }\n    startBlockValue(parent) {\n        switch (this.type) {\n            case 'alias':\n            case 'scalar':\n            case 'single-quoted-scalar':\n            case 'double-quoted-scalar':\n                return this.flowScalar(this.type);\n            case 'block-scalar-header':\n                return {\n                    type: 'block-scalar',\n                    offset: this.offset,\n                    indent: this.indent,\n                    props: [this.sourceToken],\n                    source: ''\n                };\n            case 'flow-map-start':\n            case 'flow-seq-start':\n                return {\n                    type: 'flow-collection',\n                    offset: this.offset,\n                    indent: this.indent,\n                    start: this.sourceToken,\n                    items: [],\n                    end: []\n                };\n            case 'seq-item-ind':\n                return {\n                    type: 'block-seq',\n                    offset: this.offset,\n                    indent: this.indent,\n                    items: [{ start: [this.sourceToken] }]\n                };\n            case 'explicit-key-ind': {\n                this.onKeyLine = true;\n                const prev = getPrevProps(parent);\n                const start = getFirstKeyStartProps(prev);\n                start.push(this.sourceToken);\n                return {\n                    type: 'block-map',\n                    offset: this.offset,\n                    indent: this.indent,\n                    items: [{ start, explicitKey: true }]\n                };\n            }\n            case 'map-value-ind': {\n                this.onKeyLine = true;\n                const prev = getPrevProps(parent);\n                const start = getFirstKeyStartProps(prev);\n                return {\n                    type: 'block-map',\n                    offset: this.offset,\n                    indent: this.indent,\n                    items: [{ start, key: null, sep: [this.sourceToken] }]\n                };\n            }\n        }\n        return null;\n    }\n    atIndentedComment(start, indent) {\n        if (this.type !== 'comment')\n            return false;\n        if (this.indent <= indent)\n            return false;\n        return start.every(st => st.type === 'newline' || st.type === 'space');\n    }\n    *documentEnd(docEnd) {\n        if (this.type !== 'doc-mode') {\n            if (docEnd.end)\n                docEnd.end.push(this.sourceToken);\n            else\n                docEnd.end = [this.sourceToken];\n            if (this.type === 'newline')\n                yield* this.pop();\n        }\n    }\n    *lineEnd(token) {\n        switch (this.type) {\n            case 'comma':\n            case 'doc-start':\n            case 'doc-end':\n            case 'flow-seq-end':\n            case 'flow-map-end':\n            case 'map-value-ind':\n                yield* this.pop();\n                yield* this.step();\n                break;\n            case 'newline':\n                this.onKeyLine = false;\n            // fallthrough\n            case 'space':\n            case 'comment':\n            default:\n                // all other values are errors\n                if (token.end)\n                    token.end.push(this.sourceToken);\n                else\n                    token.end = [this.sourceToken];\n                if (this.type === 'newline')\n                    yield* this.pop();\n        }\n    }\n}\n\nexports.Parser = Parser;\n","'use strict';\n\nvar composer = require('./compose/composer.js');\nvar Document = require('./doc/Document.js');\nvar errors = require('./errors.js');\nvar log = require('./log.js');\nvar identity = require('./nodes/identity.js');\nvar lineCounter = require('./parse/line-counter.js');\nvar parser = require('./parse/parser.js');\n\nfunction parseOptions(options) {\n    const prettyErrors = options.prettyErrors !== false;\n    const lineCounter$1 = options.lineCounter || (prettyErrors && new lineCounter.LineCounter()) || null;\n    return { lineCounter: lineCounter$1, prettyErrors };\n}\n/**\n * Parse the input as a stream of YAML documents.\n *\n * Documents should be separated from each other by `...` or `---` marker lines.\n *\n * @returns If an empty `docs` array is returned, it will be of type\n *   EmptyStream and contain additional stream information. In\n *   TypeScript, you should use `'empty' in docs` as a type guard for it.\n */\nfunction parseAllDocuments(source, options = {}) {\n    const { lineCounter, prettyErrors } = parseOptions(options);\n    const parser$1 = new parser.Parser(lineCounter?.addNewLine);\n    const composer$1 = new composer.Composer(options);\n    const docs = Array.from(composer$1.compose(parser$1.parse(source)));\n    if (prettyErrors && lineCounter)\n        for (const doc of docs) {\n            doc.errors.forEach(errors.prettifyError(source, lineCounter));\n            doc.warnings.forEach(errors.prettifyError(source, lineCounter));\n        }\n    if (docs.length > 0)\n        return docs;\n    return Object.assign([], { empty: true }, composer$1.streamInfo());\n}\n/** Parse an input string into a single YAML.Document */\nfunction parseDocument(source, options = {}) {\n    const { lineCounter, prettyErrors } = parseOptions(options);\n    const parser$1 = new parser.Parser(lineCounter?.addNewLine);\n    const composer$1 = new composer.Composer(options);\n    // `doc` is always set by compose.end(true) at the very latest\n    let doc = null;\n    for (const _doc of composer$1.compose(parser$1.parse(source), true, source.length)) {\n        if (!doc)\n            doc = _doc;\n        else if (doc.options.logLevel !== 'silent') {\n            doc.errors.push(new errors.YAMLParseError(_doc.range.slice(0, 2), 'MULTIPLE_DOCS', 'Source contains multiple documents; please use YAML.parseAllDocuments()'));\n            break;\n        }\n    }\n    if (prettyErrors && lineCounter) {\n        doc.errors.forEach(errors.prettifyError(source, lineCounter));\n        doc.warnings.forEach(errors.prettifyError(source, lineCounter));\n    }\n    return doc;\n}\nfunction parse(src, reviver, options) {\n    let _reviver = undefined;\n    if (typeof reviver === 'function') {\n        _reviver = reviver;\n    }\n    else if (options === undefined && reviver && typeof reviver === 'object') {\n        options = reviver;\n    }\n    const doc = parseDocument(src, options);\n    if (!doc)\n        return null;\n    doc.warnings.forEach(warning => log.warn(doc.options.logLevel, warning));\n    if (doc.errors.length > 0) {\n        if (doc.options.logLevel !== 'silent')\n            throw doc.errors[0];\n        else\n            doc.errors = [];\n    }\n    return doc.toJS(Object.assign({ reviver: _reviver }, options));\n}\nfunction stringify(value, replacer, options) {\n    let _replacer = null;\n    if (typeof replacer === 'function' || Array.isArray(replacer)) {\n        _replacer = replacer;\n    }\n    else if (options === undefined && replacer) {\n        options = replacer;\n    }\n    if (typeof options === 'string')\n        options = options.length;\n    if (typeof options === 'number') {\n        const indent = Math.round(options);\n        options = indent < 1 ? undefined : indent > 8 ? { indent: 8 } : { indent };\n    }\n    if (value === undefined) {\n        const { keepUndefined } = options ?? replacer ?? {};\n        if (!keepUndefined)\n            return undefined;\n    }\n    if (identity.isDocument(value) && !_replacer)\n        return value.toString(options);\n    return new Document.Document(value, _replacer, options).toString(options);\n}\n\nexports.parse = parse;\nexports.parseAllDocuments = parseAllDocuments;\nexports.parseDocument = parseDocument;\nexports.stringify = stringify;\n","'use strict';\n\nvar composer = require('./compose/composer.js');\nvar Document = require('./doc/Document.js');\nvar Schema = require('./schema/Schema.js');\nvar errors = require('./errors.js');\nvar Alias = require('./nodes/Alias.js');\nvar identity = require('./nodes/identity.js');\nvar Pair = require('./nodes/Pair.js');\nvar Scalar = require('./nodes/Scalar.js');\nvar YAMLMap = require('./nodes/YAMLMap.js');\nvar YAMLSeq = require('./nodes/YAMLSeq.js');\nvar cst = require('./parse/cst.js');\nvar lexer = require('./parse/lexer.js');\nvar lineCounter = require('./parse/line-counter.js');\nvar parser = require('./parse/parser.js');\nvar publicApi = require('./public-api.js');\nvar visit = require('./visit.js');\n\n\n\nexports.Composer = composer.Composer;\nexports.Document = Document.Document;\nexports.Schema = Schema.Schema;\nexports.YAMLError = errors.YAMLError;\nexports.YAMLParseError = errors.YAMLParseError;\nexports.YAMLWarning = errors.YAMLWarning;\nexports.Alias = Alias.Alias;\nexports.isAlias = identity.isAlias;\nexports.isCollection = identity.isCollection;\nexports.isDocument = identity.isDocument;\nexports.isMap = identity.isMap;\nexports.isNode = identity.isNode;\nexports.isPair = identity.isPair;\nexports.isScalar = identity.isScalar;\nexports.isSeq = identity.isSeq;\nexports.Pair = Pair.Pair;\nexports.Scalar = Scalar.Scalar;\nexports.YAMLMap = YAMLMap.YAMLMap;\nexports.YAMLSeq = YAMLSeq.YAMLSeq;\nexports.CST = cst;\nexports.Lexer = lexer.Lexer;\nexports.LineCounter = lineCounter.LineCounter;\nexports.Parser = parser.Parser;\nexports.parse = publicApi.parse;\nexports.parseAllDocuments = publicApi.parseAllDocuments;\nexports.parseDocument = publicApi.parseDocument;\nexports.stringify = publicApi.stringify;\nexports.visit = visit.visit;\nexports.visitAsync = visit.visitAsync;\n","import { parse } from \"yaml\";\n//#region src/services/configPolicy/index.ts\nconst DEFAULT_PROJECT_TRUST = \"ask\";\nconst DEFAULT_VOICE_MODE = \"legacy\";\nconst DEFAULT_VOICE_ENGINE = \"auto\";\nconst DEFAULT_VOICE_LANGUAGE = \"auto\";\nconst DEFAULT_RECORDER_DEVICE = \"none:default\";\nconst ROOT_KEYS = [\n\t\"modes\",\n\t\"computerUse\",\n\t\"projectTrust\",\n\t\"editor\",\n\t\"browse\",\n\t\"voice\",\n\t\"selection\",\n\t\"web\",\n\t\"native\"\n];\nconst BROWSE_KEYS = [\"engine\", \"fallback\"];\nconst PO_BROWSE_ENGINES = [\"cloak\", \"chrome-for-testing\"];\nconst PO_BROWSE_FALLBACKS = [\"none\", \"chrome-for-testing\"];\nconst SELECTION_KEYS = [\n\t\"majorMode\",\n\t\"domains\",\n\t\"profile\"\n];\nconst MODE_KEYS = [\"planning\", \"autocompact\"];\nconst PLANNING_KEYS = [\n\t\"main\",\n\t\"subagents\",\n\t\"plansDirectory\"\n];\nconst AGENT_KEYS = [\"model\", \"thinking\"];\nconst AUTOCOMPACT_KEYS = [\n\t\"enabled\",\n\t\"model\",\n\t\"thinking\",\n\t\"thresholds\",\n\t\"overrides\"\n];\nconst AUTOCOMPACT_THRESHOLD_KEYS = [\n\t\"pass1\",\n\t\"pass2\",\n\t\"pass3\"\n];\nconst AUTOCOMPACT_OVERRIDE_KEYS = [\"model\", \"tokens\"];\nconst COMPUTER_USE_KEYS = [\"enabled\"];\n/** A pass that fires below this is noise; one above it never fires before Pi compacts natively. */\nconst MIN_AUTOCOMPACT_RATIO = .05;\nconst MAX_AUTOCOMPACT_RATIO = .99;\n/**\n* A checkpoint at zero tokens fires before the session has said anything. There is\n* deliberately no ceiling: the package takes the lower of the ratio and the token\n* value, so one larger than the window is inert rather than dangerous.\n*/\nconst MIN_AUTOCOMPACT_TOKENS = 1;\nconst EDITOR_KEYS = [\"command\"];\nconst VOICE_KEYS = [\n\t\"mode\",\n\t\"engine\",\n\t\"language\",\n\t\"recorder\",\n\t\"adapters\",\n\t\"autoCapture\",\n\t\"live\"\n];\nconst VOICE_LIVE_KEYS = [\n\t\"voice\",\n\t\"model\",\n\t\"orchestrator\"\n];\nconst LIVE_MODEL_PATTERN = /^[A-Za-z0-9][A-Za-z0-9._:-]*$/u;\nconst MAX_LIVE_MODEL_LENGTH = 64;\nconst RECORDER_KEYS = [\"binary\", \"device\"];\nconst WHISPER_CPP_ENGINE = \"whisper-cpp\";\nconst OPENAI_WHISPER_ENGINE = \"openai-whisper\";\nconst MLX_WHISPER_ENGINE = \"mlx-whisper\";\nconst MACOS_SAY_TTS_ENGINE = \"macos-say\";\nconst ADAPTERS_KEYS = [\n\tWHISPER_CPP_ENGINE,\n\tOPENAI_WHISPER_ENGINE,\n\tMLX_WHISPER_ENGINE\n];\nconst ADAPTER_KEYS = [\"binary\", \"model\"];\nconst MODEL_KEYS = [\"path\", \"id\"];\nconst AUTO_CAPTURE_KEYS = [\n\t\"model\",\n\t\"startPhrases\",\n\t\"stopPhrases\",\n\t\"composeOpenPhrases\",\n\t\"composeSendPhrases\",\n\t\"composeCancelPhrases\",\n\t\"utteranceIdleMs\",\n\t\"composeUtteranceIdleMs\",\n\t\"composeNudgeMs\",\n\t\"transcriptionTimeoutMs\",\n\t\"tts\"\n];\nconst TTS_KEYS = [\n\t\"engine\",\n\t\"voice\",\n\t\"rate\"\n];\nconst DEFAULT_UTTERANCE_IDLE_MS = 3e3;\nconst MIN_UTTERANCE_IDLE_MS = 1500;\nconst MAX_UTTERANCE_IDLE_MS = 1e4;\n/**\n* The endpoint window used while a composition draft is collecting.\n*\n* Shorter than `utteranceIdleMs` on purpose. A turn produces exactly one transcript, so\n* with the ordinary ~3 s window a short command spoken after a brief pause arrives glued\n* to the end of the preceding sentence and can never be read as a command. Roughly twice\n* the VAD's own 600 ms trailing-silence window: long enough that ordinary speech rhythm\n* does not split a sentence, short enough that a deliberate pause does. Over-splitting is\n* harmless here and only here, because draft segments are joined back together with a\n* space.\n*/\nconst DEFAULT_COMPOSE_UTTERANCE_IDLE_MS = 1200;\nconst MIN_COMPOSE_UTTERANCE_IDLE_MS = 800;\nconst MAX_COMPOSE_UTTERANCE_IDLE_MS = 3e3;\n/** Silence before Voice reminds the user a draft is still open. `0` disables it. */\nconst DEFAULT_COMPOSE_NUDGE_MS = 1e4;\nconst MIN_COMPOSE_NUDGE_MS = 5e3;\nconst MAX_COMPOSE_NUDGE_MS = 6e4;\n/**\n* Defaults kept as lists so the phrases that shipped first keep working.\n*\n* `hey po` and `that's it` read as speech; `po prompt` and `po send` are what\n* existing users have in their fingers. Dropping the originals would break them for no\n* gain, and the cost of carrying both is two extra comparisons per command candidate.\n*/\nconst DEFAULT_COMPOSE_OPEN_PHRASES = [\"hey po\", \"po prompt\"];\nconst DEFAULT_COMPOSE_SEND_PHRASES = [\"that's it\", \"po send\"];\nconst DEFAULT_COMPOSE_CANCEL_PHRASES = [\"po cancel\", \"scratch that\"];\nconst DEFAULT_TRANSCRIPTION_TIMEOUT_MS = 12e4;\nconst MIN_TRANSCRIPTION_TIMEOUT_MS = 1e3;\nconst MAX_TRANSCRIPTION_TIMEOUT_MS = 12e4;\nconst MAX_CONTROL_PHRASES = 16;\nconst MAX_CONTROL_PHRASE_LENGTH = 64;\nconst MAX_TTS_VOICE_LENGTH = 64;\nconst MIN_TTS_RATE = 80;\nconst MAX_TTS_RATE = 500;\nconst MODEL_REFERENCE_PATTERN = /^[^/\\s]+\\/[^/\\s]+(?:\\/[^/\\s]+)*$/u;\nconst PHRASE_PUNCTUATION_PATTERN = /[\\p{P}\\p{S}]+/gu;\n/**\n* The accepted values, in the order a picker should offer them.\n*\n* Exported because the config UI has to offer exactly what the parser accepts,\n* and a second hand-written list in the contributing package would drift. The\n* validating Sets below are built from these for the same reason.\n*/\nconst PO_PLANNING_THINKING_LEVELS = [\n\t\"off\",\n\t\"minimal\",\n\t\"low\",\n\t\"medium\",\n\t\"high\",\n\t\"xhigh\",\n\t\"max\"\n];\nconst PO_VOICE_MODES = [DEFAULT_VOICE_MODE, \"live\"];\nconst PO_VOICE_ENGINES = [\n\tDEFAULT_VOICE_ENGINE,\n\tWHISPER_CPP_ENGINE,\n\tOPENAI_WHISPER_ENGINE,\n\tMLX_WHISPER_ENGINE\n];\nconst PO_VOICE_TTS_ENGINES = [MACOS_SAY_TTS_ENGINE];\n/** Codex realtime V3 voices, from `codex-rs/protocol/src/protocol.rs` `RealtimeVoicesList::builtin()`. */\nconst PO_VOICE_LIVE_VOICES = [\n\t\"juniper\",\n\t\"maple\",\n\t\"spruce\",\n\t\"ember\",\n\t\"vale\",\n\t\"breeze\",\n\t\"arbor\",\n\t\"sol\",\n\t\"cove\",\n\t\"aube\",\n\t\"bubbie\",\n\t\"haetsal\",\n\t\"hanul\",\n\t\"himari\",\n\t\"leher\",\n\t\"miko\",\n\t\"neer\",\n\t\"porto\",\n\t\"rindo\",\n\t\"rio\",\n\t\"rivage\",\n\t\"selva\",\n\t\"sonna\",\n\t\"tinta\",\n\t\"viola\"\n];\nconst THINKING_VALUES = new Set(PO_PLANNING_THINKING_LEVELS);\nconst TRUST_VALUES = /* @__PURE__ */ new Set([\n\t\"ask\",\n\t\"always\",\n\t\"never\"\n]);\nconst VOICE_MODE_VALUES = new Set(PO_VOICE_MODES);\nconst ENGINE_VALUES = new Set(PO_VOICE_ENGINES);\nconst TTS_ENGINE_VALUES = new Set(PO_VOICE_TTS_ENGINES);\nfunction isObject(value) {\n\treturn typeof value === \"object\" && value !== null && !Array.isArray(value);\n}\n/**\n* Where a lenient parse collects unknown keys instead of throwing.\n*\n* Module scope rather than a parameter threaded through the twelve nested\n* parsers: `assertKeys` is the only reader, parsing is synchronous end to end,\n* and `parsePoConfig` owns the whole window in a try/finally. Threading would\n* touch every parser to change behaviour in one of them.\n*/\nlet unknownKeySink;\nfunction assertKeys(value, allowed, location, filePath) {\n\tconst unknown = Object.keys(value).filter((key) => !allowed.includes(key));\n\tif (unknown.length === 0) return;\n\tif (unknownKeySink !== void 0) {\n\t\tfor (const key of unknown) unknownKeySink.push({\n\t\t\tfilePath,\n\t\t\tpath: location === \"root\" ? key : `${location}.${key}`,\n\t\t\tmessage: `unsupported ${location} field`\n\t\t});\n\t\treturn;\n\t}\n\tthrow new Error(`Po config at ${filePath} has unsupported ${location} field(s): ${unknown.join(\", \")}`);\n}\nfunction optionalString(value, location, filePath) {\n\tif (value === void 0) return void 0;\n\tif (typeof value !== \"string\" || value.trim().length === 0) throw new Error(`Po config at ${filePath} requires ${location} to be a non-empty string`);\n\treturn value.trim();\n}\nfunction hasControlCharacters(value) {\n\tfor (const character of value) {\n\t\tconst codePoint = character.codePointAt(0);\n\t\tif (codePoint !== void 0 && (codePoint <= 31 || codePoint === 127)) return true;\n\t}\n\treturn false;\n}\nfunction boundedOptionalString(value, location, filePath, maximumLength) {\n\tconst text = optionalString(value, location, filePath);\n\tif (!text) return void 0;\n\tif (text.length > maximumLength) throw new Error(`Po config at ${filePath} requires ${location} to be at most ${maximumLength} characters`);\n\tif (hasControlCharacters(text)) throw new Error(`Po config at ${filePath} does not allow control characters in ${location}`);\n\treturn text;\n}\nfunction parseModelReference(value, filePath) {\n\tconst location = \"voice.autoCapture.model\";\n\tconst model = optionalString(value, location, filePath);\n\tif (!model || !MODEL_REFERENCE_PATTERN.test(model)) throw new Error(`Po config at ${filePath} requires ${location} in provider/model-id form`);\n\treturn model;\n}\nfunction normalizeControlPhrase(value) {\n\treturn value.normalize(\"NFKC\").toLocaleLowerCase(\"en-US\").replace(PHRASE_PUNCTUATION_PATTERN, \" \").replace(/\\s+/gu, \" \").trim();\n}\nfunction parseControlPhrases(value, location, filePath) {\n\tif (value === void 0) return void 0;\n\tif (!Array.isArray(value) || value.some((phrase) => typeof phrase !== \"string\")) throw new Error(`Po config at ${filePath} requires ${location} to be an array of strings`);\n\tif (value.length > MAX_CONTROL_PHRASES) throw new Error(`Po config at ${filePath} requires ${location} to contain at most ${MAX_CONTROL_PHRASES} phrases`);\n\tconst phrases = value.map((phrase) => phrase.trim());\n\tconst normalized = /* @__PURE__ */ new Set();\n\tfor (const phrase of phrases) {\n\t\tif (phrase.length === 0) throw new Error(`Po config at ${filePath} requires ${location} to contain non-empty strings`);\n\t\tif (phrase.length > MAX_CONTROL_PHRASE_LENGTH) throw new Error(`Po config at ${filePath} requires ${location} phrases to be at most ${MAX_CONTROL_PHRASE_LENGTH} characters`);\n\t\tif (hasControlCharacters(phrase)) throw new Error(`Po config at ${filePath} does not allow control characters in ${location}`);\n\t\tconst key = normalizeControlPhrase(phrase);\n\t\tif (!key) throw new Error(`Po config at ${filePath} requires ${location} to contain words`);\n\t\tif (normalized.has(key)) throw new Error(`Po config at ${filePath} does not allow normalized duplicates in ${location}`);\n\t\tnormalized.add(key);\n\t}\n\treturn phrases;\n}\nfunction parseBoundedInteger(value, location, filePath, minimum, maximum) {\n\tif (value === void 0) return void 0;\n\tif (typeof value !== \"number\" || !Number.isInteger(value) || value < minimum || value > maximum) throw new Error(`Po config at ${filePath} requires ${location} to be an integer from ${minimum} to ${maximum}`);\n\treturn value;\n}\n/**\n* Rejects a phrase claimed by two control roles at once.\n*\n* Composition commands are adjudicated before stop phrases and before leading\n* start-phrase removal, so a phrase shared with a later role is not ambiguous, it is\n* silently unreachable. Without a screen there is nothing to show which role won.\n*/\nfunction assertDisjointPhrases(left, right, leftName, rightName, filePath) {\n\tconst keys = new Set((left ?? []).map(normalizeControlPhrase));\n\tif ((right ?? []).some((phrase) => keys.has(normalizeControlPhrase(phrase)))) throw new Error(`Po config at ${filePath} does not allow a phrase in both ${leftName} and ${rightName}`);\n}\nfunction parseTtsConfig(value, filePath) {\n\tconst location = \"voice.autoCapture.tts\";\n\tif (!isObject(value)) throw new Error(`Po config at ${filePath} requires ${location} to be an object`);\n\tassertKeys(value, TTS_KEYS, location, filePath);\n\tif (typeof value.engine !== \"string\" || !TTS_ENGINE_VALUES.has(value.engine)) throw new Error(`Po config at ${filePath} requires ${location}.engine to be one of: ${[...TTS_ENGINE_VALUES].join(\", \")}`);\n\tconst voice = boundedOptionalString(value.voice, `${location}.voice`, filePath, MAX_TTS_VOICE_LENGTH);\n\tconst rate = value.rate;\n\tif (rate !== void 0 && (typeof rate !== \"number\" || !Number.isInteger(rate) || rate < MIN_TTS_RATE || rate > MAX_TTS_RATE)) throw new Error(`Po config at ${filePath} requires ${location}.rate to be an integer from ${MIN_TTS_RATE} to ${MAX_TTS_RATE}`);\n\treturn {\n\t\tengine: value.engine,\n\t\t...voice ? { voice } : {},\n\t\t...rate === void 0 ? {} : { rate }\n\t};\n}\nfunction parseAutoCapture(value, filePath) {\n\tif (value === void 0) return void 0;\n\tconst location = \"voice.autoCapture\";\n\tif (!isObject(value)) throw new Error(`Po config at ${filePath} requires ${location} to be an object`);\n\tassertKeys(value, AUTO_CAPTURE_KEYS, location, filePath);\n\tconst startPhrases = parseControlPhrases(value.startPhrases, `${location}.startPhrases`, filePath);\n\tconst stopPhrases = parseControlPhrases(value.stopPhrases, `${location}.stopPhrases`, filePath);\n\tconst composeOpenPhrases = parseControlPhrases(value.composeOpenPhrases, `${location}.composeOpenPhrases`, filePath);\n\tconst composeSendPhrases = parseControlPhrases(value.composeSendPhrases, `${location}.composeSendPhrases`, filePath);\n\tconst composeCancelPhrases = parseControlPhrases(value.composeCancelPhrases, `${location}.composeCancelPhrases`, filePath);\n\tconst utteranceIdleMs = parseBoundedInteger(value.utteranceIdleMs, `${location}.utteranceIdleMs`, filePath, MIN_UTTERANCE_IDLE_MS, MAX_UTTERANCE_IDLE_MS);\n\tconst composeUtteranceIdleMs = parseBoundedInteger(value.composeUtteranceIdleMs, `${location}.composeUtteranceIdleMs`, filePath, MIN_COMPOSE_UTTERANCE_IDLE_MS, MAX_COMPOSE_UTTERANCE_IDLE_MS);\n\tconst composeNudgeMs = value.composeNudgeMs === 0 ? 0 : parseBoundedInteger(value.composeNudgeMs, `${location}.composeNudgeMs`, filePath, MIN_COMPOSE_NUDGE_MS, MAX_COMPOSE_NUDGE_MS);\n\tconst transcriptionTimeoutMs = parseBoundedInteger(value.transcriptionTimeoutMs, `${location}.transcriptionTimeoutMs`, filePath, MIN_TRANSCRIPTION_TIMEOUT_MS, MAX_TRANSCRIPTION_TIMEOUT_MS);\n\tassertDisjointPhrases(startPhrases, stopPhrases, \"startPhrases\", \"stopPhrases\", filePath);\n\tassertDisjointPhrases(composeSendPhrases, composeCancelPhrases, \"composeSendPhrases\", \"composeCancelPhrases\", filePath);\n\tassertDisjointPhrases(composeOpenPhrases, composeSendPhrases, \"composeOpenPhrases\", \"composeSendPhrases\", filePath);\n\tassertDisjointPhrases(composeOpenPhrases, composeCancelPhrases, \"composeOpenPhrases\", \"composeCancelPhrases\", filePath);\n\tassertDisjointPhrases(stopPhrases, composeSendPhrases, \"stopPhrases\", \"composeSendPhrases\", filePath);\n\tassertDisjointPhrases(stopPhrases, composeCancelPhrases, \"stopPhrases\", \"composeCancelPhrases\", filePath);\n\treturn {\n\t\tmodel: parseModelReference(value.model, filePath),\n\t\t...startPhrases ? { startPhrases } : {},\n\t\t...stopPhrases ? { stopPhrases } : {},\n\t\t...composeOpenPhrases ? { composeOpenPhrases } : {},\n\t\t...composeSendPhrases ? { composeSendPhrases } : {},\n\t\t...composeCancelPhrases ? { composeCancelPhrases } : {},\n\t\t...utteranceIdleMs === void 0 ? {} : { utteranceIdleMs },\n\t\t...composeUtteranceIdleMs === void 0 ? {} : { composeUtteranceIdleMs },\n\t\t...composeNudgeMs === void 0 ? {} : { composeNudgeMs },\n\t\t...transcriptionTimeoutMs === void 0 ? {} : { transcriptionTimeoutMs },\n\t\ttts: parseTtsConfig(value.tts, filePath)\n\t};\n}\nfunction parseThinking(value, location, filePath) {\n\tif (value === void 0) return void 0;\n\tif (typeof value !== \"string\" || !THINKING_VALUES.has(value)) throw new Error(`Po config at ${filePath} requires ${location}.thinking to be one of: ${[...THINKING_VALUES].join(\", \")}`);\n\treturn value;\n}\nfunction parseAgent(value, location, filePath) {\n\tif (value === void 0) return void 0;\n\tif (!isObject(value)) throw new Error(`Po config at ${filePath} requires ${location} to be an object`);\n\tassertKeys(value, AGENT_KEYS, location, filePath);\n\tconst thinking = parseThinking(value.thinking, location, filePath);\n\tconst model = optionalString(value.model, `${location}.model`, filePath);\n\treturn {\n\t\t...model ? { model } : {},\n\t\t...thinking ? { thinking } : {}\n\t};\n}\n/**\n* A flag the cockpit can write.\n*\n* The settings page writes strings and nothing else, so `'true'` has to mean\n* what a hand-edited `true` means. Anything else is rejected rather than\n* treated as false, because a typo that silently disables a feature is the\n* worst reading of it.\n*/\nfunction parseFlexibleBoolean(value, location, filePath) {\n\tif (value === void 0) return void 0;\n\tif (typeof value === \"boolean\") return value;\n\tif (value === \"true\") return true;\n\tif (value === \"false\") return false;\n\tthrow new Error(`Po config at ${filePath} requires ${location} to be true or false`);\n}\n/** Same story as the flag: a number, or the string form the settings page writes. */\nfunction parseFlexibleRatio(value, location, filePath) {\n\tif (value === void 0) return void 0;\n\tconst ratio = typeof value === \"string\" ? Number(value.trim()) : value;\n\tif (typeof ratio !== \"number\" || !Number.isFinite(ratio) || ratio < MIN_AUTOCOMPACT_RATIO || ratio > MAX_AUTOCOMPACT_RATIO) throw new Error(`Po config at ${filePath} requires ${location} to be a number from ${MIN_AUTOCOMPACT_RATIO} to ${MAX_AUTOCOMPACT_RATIO}`);\n\treturn ratio;\n}\nfunction parseAutocompactThresholds(value, location, filePath) {\n\tif (value === void 0) return void 0;\n\tif (!isObject(value)) throw new Error(`Po config at ${filePath} requires ${location} to be an object`);\n\tassertKeys(value, AUTOCOMPACT_THRESHOLD_KEYS, location, filePath);\n\tconst pass1 = parseFlexibleRatio(value.pass1, `${location}.pass1`, filePath);\n\tconst pass2 = parseFlexibleRatio(value.pass2, `${location}.pass2`, filePath);\n\tconst pass3 = parseFlexibleRatio(value.pass3, `${location}.pass3`, filePath);\n\treturn {\n\t\t...pass1 === void 0 ? {} : { pass1 },\n\t\t...pass2 === void 0 ? {} : { pass2 },\n\t\t...pass3 === void 0 ? {} : { pass3 }\n\t};\n}\n/** Absolute token counts, unlike the ratios, are only ever written by hand, so no string form is accepted. */\nfunction parseAutocompactTokenCount(value, location, filePath) {\n\tif (value === void 0) return void 0;\n\tif (typeof value !== \"number\" || !Number.isSafeInteger(value) || value < MIN_AUTOCOMPACT_TOKENS) throw new Error(`Po config at ${filePath} requires ${location} to be an integer of at least ${MIN_AUTOCOMPACT_TOKENS}`);\n\treturn value;\n}\nfunction parseAutocompactOverrideEntry(value, location, filePath) {\n\tif (!isObject(value)) throw new Error(`Po config at ${filePath} requires ${location} to be an object`);\n\tassertKeys(value, AUTOCOMPACT_OVERRIDE_KEYS, location, filePath);\n\tconst model = optionalString(value.model, `${location}.model`, filePath);\n\tif (!model) throw new Error(`Po config at ${filePath} requires ${location}.model`);\n\tif (!isObject(value.tokens)) throw new Error(`Po config at ${filePath} requires ${location}.tokens to be an object`);\n\tassertKeys(value.tokens, AUTOCOMPACT_THRESHOLD_KEYS, `${location}.tokens`, filePath);\n\tconst pass1 = parseAutocompactTokenCount(value.tokens.pass1, `${location}.tokens.pass1`, filePath);\n\tconst pass2 = parseAutocompactTokenCount(value.tokens.pass2, `${location}.tokens.pass2`, filePath);\n\tconst pass3 = parseAutocompactTokenCount(value.tokens.pass3, `${location}.tokens.pass3`, filePath);\n\tif (pass1 === void 0 && pass2 === void 0 && pass3 === void 0) throw new Error(`Po config at ${filePath} requires one of ${location}.tokens.pass1, pass2, or pass3`);\n\treturn {\n\t\tmodel,\n\t\ttokens: {\n\t\t\t...pass1 === void 0 ? {} : { pass1 },\n\t\t\t...pass2 === void 0 ? {} : { pass2 },\n\t\t\t...pass3 === void 0 ? {} : { pass3 }\n\t\t}\n\t};\n}\nfunction parseAutocompactOverrides(value, location, filePath) {\n\tif (value === void 0) return void 0;\n\tif (!Array.isArray(value)) throw new Error(`Po config at ${filePath} requires ${location} to be a list`);\n\treturn value.map((entry, index) => parseAutocompactOverrideEntry(entry, `${location}[${index}]`, filePath));\n}\nfunction parseAutocompactModeConfig(value, filePath, location = \"modes.autocompact\") {\n\tif (!isObject(value)) throw new Error(`Po config at ${filePath} requires ${location} to be an object`);\n\tassertKeys(value, AUTOCOMPACT_KEYS, location, filePath);\n\tconst enabled = parseFlexibleBoolean(value.enabled, `${location}.enabled`, filePath);\n\tconst model = optionalString(value.model, `${location}.model`, filePath);\n\tconst thinking = parseThinking(value.thinking, location, filePath);\n\tconst thresholds = parseAutocompactThresholds(value.thresholds, `${location}.thresholds`, filePath);\n\tconst overrides = parseAutocompactOverrides(value.overrides, `${location}.overrides`, filePath);\n\treturn {\n\t\t...enabled === void 0 ? {} : { enabled },\n\t\t...model ? { model } : {},\n\t\t...thinking ? { thinking } : {},\n\t\t...thresholds ? { thresholds } : {},\n\t\t...overrides ? { overrides } : {}\n\t};\n}\nfunction parsePlanningModeConfig(value, filePath, location = \"modes.planning\") {\n\tif (!isObject(value)) throw new Error(`Po config at ${filePath} requires ${location} to be an object`);\n\tassertKeys(value, PLANNING_KEYS, location, filePath);\n\treturn {\n\t\tmain: parseAgent(value.main, `${location}.main`, filePath),\n\t\tsubagents: parseAgent(value.subagents, `${location}.subagents`, filePath),\n\t\tplansDirectory: optionalString(value.plansDirectory, `${location}.plansDirectory`, filePath)\n\t};\n}\nfunction parseModel(value, location, filePath, allowId) {\n\tif (!isObject(value)) throw new Error(`Po config at ${filePath} requires ${location} to be an object`);\n\tassertKeys(value, MODEL_KEYS, location, filePath);\n\tconst modelPath = optionalString(value.path, `${location}.path`, filePath);\n\tconst id = optionalString(value.id, `${location}.id`, filePath);\n\tif (Boolean(modelPath) === Boolean(id)) throw new Error(`Po config at ${filePath} requires exactly one of ${location}.path or ${location}.id`);\n\tif (id && !allowId) throw new Error(`Po config at ${filePath} does not support ${location}.id for whisper-cpp`);\n\treturn {\n\t\t...modelPath ? { path: modelPath } : {},\n\t\t...id ? { id } : {}\n\t};\n}\nfunction parseAdapter(value, location, filePath, allowId) {\n\tif (value === void 0) return void 0;\n\tif (!isObject(value)) throw new Error(`Po config at ${filePath} requires ${location} to be an object`);\n\tassertKeys(value, ADAPTER_KEYS, location, filePath);\n\tconst binary = optionalString(value.binary, `${location}.binary`, filePath);\n\treturn {\n\t\t...binary ? { binary } : {},\n\t\tmodel: parseModel(value.model, `${location}.model`, filePath, allowId)\n\t};\n}\nfunction parseVoice(value, filePath) {\n\tif (value === void 0) return void 0;\n\tif (!isObject(value)) throw new Error(`Po config at ${filePath} requires voice to be an object`);\n\tassertKeys(value, VOICE_KEYS, \"voice\", filePath);\n\tconst result = {};\n\tif (value.mode !== void 0) {\n\t\tif (typeof value.mode !== \"string\" || !VOICE_MODE_VALUES.has(value.mode)) throw new Error(`Po config at ${filePath} requires voice.mode to be one of: ${[...VOICE_MODE_VALUES].join(\", \")}`);\n\t\tresult.mode = value.mode;\n\t}\n\tif (value.engine !== void 0) {\n\t\tif (typeof value.engine !== \"string\" || !ENGINE_VALUES.has(value.engine)) throw new Error(`Po config at ${filePath} requires voice.engine to be one of: ${[...ENGINE_VALUES].join(\", \")}`);\n\t\tresult.engine = value.engine;\n\t}\n\tconst language = optionalString(value.language, \"voice.language\", filePath);\n\tif (language) result.language = language;\n\tif (value.recorder !== void 0) {\n\t\tif (!isObject(value.recorder)) throw new Error(`Po config at ${filePath} requires voice.recorder to be an object`);\n\t\tassertKeys(value.recorder, RECORDER_KEYS, \"voice.recorder\", filePath);\n\t\tresult.recorder = {};\n\t\tconst binary = optionalString(value.recorder.binary, \"voice.recorder.binary\", filePath);\n\t\tconst device = optionalString(value.recorder.device, \"voice.recorder.device\", filePath);\n\t\tif (binary) result.recorder.binary = binary;\n\t\tif (device) result.recorder.device = device;\n\t}\n\tif (value.adapters !== void 0) {\n\t\tif (!isObject(value.adapters)) throw new Error(`Po config at ${filePath} requires voice.adapters to be an object`);\n\t\tassertKeys(value.adapters, ADAPTERS_KEYS, \"voice.adapters\", filePath);\n\t\tresult.adapters = {\n\t\t\t[WHISPER_CPP_ENGINE]: parseAdapter(value.adapters[WHISPER_CPP_ENGINE], `voice.adapters.${WHISPER_CPP_ENGINE}`, filePath, false),\n\t\t\t[OPENAI_WHISPER_ENGINE]: parseAdapter(value.adapters[OPENAI_WHISPER_ENGINE], `voice.adapters.${OPENAI_WHISPER_ENGINE}`, filePath, true),\n\t\t\t[MLX_WHISPER_ENGINE]: parseAdapter(value.adapters[MLX_WHISPER_ENGINE], `voice.adapters.${MLX_WHISPER_ENGINE}`, filePath, true)\n\t\t};\n\t}\n\tconst autoCapture = parseAutoCapture(value.autoCapture, filePath);\n\tif (autoCapture) result.autoCapture = autoCapture;\n\tconst live = parseVoiceLive(value.live, filePath);\n\tif (live) result.live = live;\n\treturn result;\n}\nfunction parseVoiceLive(value, filePath) {\n\tif (value === void 0) return void 0;\n\tif (!isObject(value)) throw new Error(`Po config at ${filePath} requires voice.live to be an object`);\n\tassertKeys(value, VOICE_LIVE_KEYS, \"voice.live\", filePath);\n\tconst result = {};\n\tif (value.voice !== void 0) {\n\t\tif (typeof value.voice !== \"string\" || !PO_VOICE_LIVE_VOICES.includes(value.voice)) throw new Error(`Po config at ${filePath} requires voice.live.voice to be one of: ${PO_VOICE_LIVE_VOICES.join(\", \")}`);\n\t\tresult.voice = value.voice;\n\t}\n\tif (value.model !== void 0) {\n\t\tif (typeof value.model !== \"string\" || value.model.length > MAX_LIVE_MODEL_LENGTH || !LIVE_MODEL_PATTERN.test(value.model)) throw new Error(`Po config at ${filePath} requires voice.live.model to be a model id of at most ${MAX_LIVE_MODEL_LENGTH} letters, digits, dots, colons, underscores or dashes`);\n\t\tresult.model = value.model;\n\t}\n\tconst orchestrator = parseAgent(value.orchestrator, \"voice.live.orchestrator\", filePath);\n\tif (orchestrator) result.orchestrator = orchestrator;\n\treturn result;\n}\nfunction parseSelection(value, filePath) {\n\tif (value === void 0) return void 0;\n\tif (!isObject(value)) throw new Error(`Po config at ${filePath} requires selection to be an object`);\n\tassertKeys(value, SELECTION_KEYS, \"selection\", filePath);\n\tconst domains = value.domains;\n\tif (domains !== void 0 && (!Array.isArray(domains) || domains.some((name) => typeof name !== \"string\"))) throw new Error(`Po config at ${filePath} requires selection.domains to be an array of strings`);\n\treturn {\n\t\tmajorMode: optionalString(value.majorMode, \"selection.majorMode\", filePath),\n\t\tdomains,\n\t\tprofile: optionalString(value.profile, \"selection.profile\", filePath)\n\t};\n}\nfunction parseEditor(value, filePath) {\n\tif (value === void 0) return void 0;\n\tif (!isObject(value)) throw new Error(`Po config at ${filePath} requires editor to be an object`);\n\tassertKeys(value, EDITOR_KEYS, \"editor\", filePath);\n\treturn { command: optionalString(value.command, \"editor.command\", filePath) };\n}\nfunction parseBrowse(value, filePath) {\n\tif (value === void 0) return void 0;\n\tif (!isObject(value)) throw new Error(`Po config at ${filePath} requires browse to be an object`);\n\tassertKeys(value, BROWSE_KEYS, \"browse\", filePath);\n\tconst pick = (key, allowed) => {\n\t\tconst raw = value[key];\n\t\tif (raw === void 0) return void 0;\n\t\tif (typeof raw !== \"string\" || !allowed.includes(raw)) throw new Error(`Po config at ${filePath} requires browse.${key} to be one of: ${allowed.join(\", \")}`);\n\t\treturn raw;\n\t};\n\tconst engine = pick(\"engine\", PO_BROWSE_ENGINES);\n\tconst fallback = pick(\"fallback\", PO_BROWSE_FALLBACKS);\n\treturn {\n\t\t...engine ? { engine } : {},\n\t\t...fallback ? { fallback } : {}\n\t};\n}\n/** `web` and `native` each choose a template, so both read the same `{ template }` shape. */\nfunction parseTemplateChoice(value, root, filePath) {\n\tif (value === void 0) return void 0;\n\tif (!isObject(value)) throw new Error(`Po config at ${filePath} requires ${root} to be an object`);\n\tassertKeys(value, [\"template\"], root, filePath);\n\tif (value.template === void 0) return {};\n\tconst template = optionalString(value.template, `${root}.template`, filePath);\n\tif (!template || template.length > 160 || !/^[a-z][a-z0-9]*(?:-[a-z0-9]+)*$/.test(template)) throw new Error(`Po config at ${filePath} requires ${root}.template to be a kebab-case template identifier`);\n\treturn { template };\n}\nfunction parseComputerUse(value, filePath) {\n\tif (value === void 0) return void 0;\n\tif (!isObject(value)) throw new Error(`Po config at ${filePath} requires computerUse to be an object`);\n\tassertKeys(value, COMPUTER_USE_KEYS, \"computerUse\", filePath);\n\tconst enabled = parseFlexibleBoolean(value.enabled, \"computerUse.enabled\", filePath);\n\treturn enabled === void 0 ? {} : { enabled };\n}\nfunction parsePoConfig(content, filePath, options) {\n\tif (options?.lenient !== true) return parseStrict(content, filePath);\n\tconst diagnostics = [];\n\tconst previous = unknownKeySink;\n\tunknownKeySink = diagnostics;\n\ttry {\n\t\treturn {\n\t\t\tconfig: parseStrict(content, filePath),\n\t\t\tdiagnostics\n\t\t};\n\t} finally {\n\t\tunknownKeySink = previous;\n\t}\n}\nfunction parseStrict(content, filePath) {\n\tlet parsed;\n\ttry {\n\t\tparsed = parse(content) ?? {};\n\t} catch (error) {\n\t\tthrow new Error(`Could not parse Po config at ${filePath}`, { cause: error });\n\t}\n\tif (!isObject(parsed)) throw new Error(`Po config at ${filePath} must be a YAML object`);\n\tassertKeys(parsed, ROOT_KEYS, \"root\", filePath);\n\tlet modes;\n\tif (parsed.modes !== void 0) {\n\t\tif (!isObject(parsed.modes)) throw new Error(`Po config at ${filePath} requires modes to be an object`);\n\t\tassertKeys(parsed.modes, MODE_KEYS, \"modes\", filePath);\n\t\tmodes = {\n\t\t\t...parsed.modes.planning === void 0 ? {} : { planning: parsePlanningModeConfig(parsed.modes.planning, filePath) },\n\t\t\t...parsed.modes.autocompact === void 0 ? {} : { autocompact: parseAutocompactModeConfig(parsed.modes.autocompact, filePath) }\n\t\t};\n\t}\n\tconst trust = parsed.projectTrust === void 0 ? DEFAULT_PROJECT_TRUST : parsed.projectTrust;\n\tif (typeof trust !== \"string\" || !TRUST_VALUES.has(trust)) throw new Error(`Po config at ${filePath} projectTrust must be ask, always, or never`);\n\treturn {\n\t\tmodes,\n\t\tcomputerUse: parseComputerUse(parsed.computerUse, filePath),\n\t\tprojectTrust: trust,\n\t\teditor: parseEditor(parsed.editor, filePath),\n\t\tbrowse: parseBrowse(parsed.browse, filePath),\n\t\tvoice: parseVoice(parsed.voice, filePath),\n\t\tselection: parseSelection(parsed.selection, filePath),\n\t\tweb: parseTemplateChoice(parsed.web, \"web\", filePath),\n\t\tnative: parseTemplateChoice(parsed.native, \"native\", filePath)\n\t};\n}\nfunction mergeAgent(globalValue, repositoryValue) {\n\treturn globalValue || repositoryValue ? {\n\t\t...globalValue,\n\t\t...repositoryValue\n\t} : void 0;\n}\nfunction mergePoConfigs(globalConfig, repositoryConfig) {\n\tif (repositoryConfig.voice?.mode) throw new Error(\"Repository Po config voice.mode is global-only; configure it in ~/.po/config.yaml\");\n\tif (repositoryConfig.voice?.autoCapture) throw new Error(\"Repository Po config voice.autoCapture is global-only; configure it in ~/.po/config.yaml\");\n\tif (repositoryConfig.voice?.live) throw new Error(\"Repository Po config voice.live is global-only; configure it in ~/.po/config.yaml\");\n\tif (repositoryConfig.computerUse) throw new Error(\"Repository Po config computerUse is global-only; configure it in ~/.po/config.yaml\");\n\tif (repositoryConfig.browse) throw new Error(\"Repository Po config browse is global-only; configure it in ~/.po/config.yaml\");\n\tconst globalPlanning = globalConfig.modes?.planning;\n\tconst repositoryPlanning = repositoryConfig.modes?.planning;\n\tconst planning = globalPlanning || repositoryPlanning ? {\n\t\tmain: mergeAgent(globalPlanning?.main, repositoryPlanning?.main),\n\t\tsubagents: mergeAgent(globalPlanning?.subagents, repositoryPlanning?.subagents),\n\t\tplansDirectory: repositoryPlanning?.plansDirectory ?? globalPlanning?.plansDirectory\n\t} : void 0;\n\tconst globalAutocompact = globalConfig.modes?.autocompact;\n\tconst repositoryAutocompact = repositoryConfig.modes?.autocompact;\n\tconst autocompact = globalAutocompact || repositoryAutocompact ? {\n\t\t...globalAutocompact,\n\t\t...repositoryAutocompact,\n\t\t...globalAutocompact?.thresholds || repositoryAutocompact?.thresholds ? { thresholds: {\n\t\t\t...globalAutocompact?.thresholds,\n\t\t\t...repositoryAutocompact?.thresholds\n\t\t} } : {}\n\t} : void 0;\n\tconst voice = mergeVoice(globalConfig.voice, repositoryConfig.voice);\n\treturn {\n\t\tmodes: planning || autocompact ? {\n\t\t\t...planning ? { planning } : {},\n\t\t\t...autocompact ? { autocompact } : {}\n\t\t} : void 0,\n\t\tcomputerUse: globalConfig.computerUse,\n\t\tprojectTrust: repositoryConfig.projectTrust,\n\t\teditor: globalConfig.editor,\n\t\tbrowse: globalConfig.browse,\n\t\tvoice,\n\t\tweb: globalConfig.web || repositoryConfig.web ? { template: repositoryConfig.web?.template ?? globalConfig.web?.template } : void 0,\n\t\tnative: globalConfig.native || repositoryConfig.native ? { template: repositoryConfig.native?.template ?? globalConfig.native?.template } : void 0,\n\t\tselection: globalConfig.selection || repositoryConfig.selection ? {\n\t\t\t...globalConfig.selection,\n\t\t\t...repositoryConfig.selection\n\t\t} : void 0\n\t};\n}\nfunction mergeAdapter(globalValue, repositoryValue) {\n\tif (!globalValue && !repositoryValue) return void 0;\n\treturn {\n\t\t...globalValue,\n\t\t...repositoryValue,\n\t\tmodel: repositoryValue?.model ?? globalValue.model\n\t};\n}\nfunction mergeVoice(globalValue, repositoryValue) {\n\tif (!globalValue && !repositoryValue) return void 0;\n\treturn {\n\t\t...globalValue,\n\t\t...repositoryValue,\n\t\t...globalValue?.mode ? { mode: globalValue.mode } : {},\n\t\trecorder: globalValue?.recorder || repositoryValue?.recorder ? {\n\t\t\t...globalValue?.recorder,\n\t\t\t...repositoryValue?.recorder\n\t\t} : void 0,\n\t\tadapters: globalValue?.adapters || repositoryValue?.adapters ? {\n\t\t\t[WHISPER_CPP_ENGINE]: mergeAdapter(globalValue?.adapters?.[WHISPER_CPP_ENGINE], repositoryValue?.adapters?.[WHISPER_CPP_ENGINE]),\n\t\t\t[OPENAI_WHISPER_ENGINE]: mergeAdapter(globalValue?.adapters?.[OPENAI_WHISPER_ENGINE], repositoryValue?.adapters?.[OPENAI_WHISPER_ENGINE]),\n\t\t\t[MLX_WHISPER_ENGINE]: mergeAdapter(globalValue?.adapters?.[MLX_WHISPER_ENGINE], repositoryValue?.adapters?.[MLX_WHISPER_ENGINE])\n\t\t} : void 0,\n\t\t...globalValue?.autoCapture ? { autoCapture: globalValue.autoCapture } : {}\n\t};\n}\n/**\n* Resolves voice settings, optionally shadowed by the active profile's override.\n*\n* The override is per field, so a persona that sets only `rate` keeps the voice\n* from config.yaml. `engine` is deliberately not overridable: it selects the\n* synthesiser binary, which is a machine-level fact rather than a persona's.\n*\n* The result is read once when autonomous voice activates, because\n* `VoiceNarrationPlayback.config` is assigned in `activate()` and has no setter.\n* That is sufficient today only because every profile switch reloads the\n* session, which deactivates and reactivates voice. A future in-place profile\n* switch would leave the spoken voice stale until the next activation.\n*/\nfunction resolveVoiceConfig(config, ttsOverride) {\n\treturn {\n\t\tmode: config.mode ?? DEFAULT_VOICE_MODE,\n\t\tengine: config.engine ?? DEFAULT_VOICE_ENGINE,\n\t\tlanguage: config.language ?? DEFAULT_VOICE_LANGUAGE,\n\t\trecorder: {\n\t\t\t...config.recorder,\n\t\t\tdevice: config.recorder?.device ?? DEFAULT_RECORDER_DEVICE\n\t\t},\n\t\tadapters: config.adapters ?? {},\n\t\t...config.autoCapture ? { autoCapture: {\n\t\t\t...config.autoCapture,\n\t\t\tstartPhrases: [...config.autoCapture.startPhrases ?? []],\n\t\t\tstopPhrases: [...config.autoCapture.stopPhrases ?? []],\n\t\t\tcomposeOpenPhrases: [...config.autoCapture.composeOpenPhrases ?? DEFAULT_COMPOSE_OPEN_PHRASES],\n\t\t\tcomposeSendPhrases: [...config.autoCapture.composeSendPhrases ?? DEFAULT_COMPOSE_SEND_PHRASES],\n\t\t\tcomposeCancelPhrases: [...config.autoCapture.composeCancelPhrases ?? DEFAULT_COMPOSE_CANCEL_PHRASES],\n\t\t\tutteranceIdleMs: config.autoCapture.utteranceIdleMs ?? DEFAULT_UTTERANCE_IDLE_MS,\n\t\t\tcomposeUtteranceIdleMs: config.autoCapture.composeUtteranceIdleMs ?? DEFAULT_COMPOSE_UTTERANCE_IDLE_MS,\n\t\t\tcomposeNudgeMs: config.autoCapture.composeNudgeMs ?? DEFAULT_COMPOSE_NUDGE_MS,\n\t\t\ttranscriptionTimeoutMs: config.autoCapture.transcriptionTimeoutMs ?? DEFAULT_TRANSCRIPTION_TIMEOUT_MS,\n\t\t\ttts: {\n\t\t\t\t...config.autoCapture.tts,\n\t\t\t\t...ttsOverride?.voice === void 0 ? {} : { voice: ttsOverride.voice },\n\t\t\t\t...ttsOverride?.rate === void 0 ? {} : { rate: ttsOverride.rate }\n\t\t\t}\n\t\t} } : {}\n\t};\n}\n/** Root keys the merge reads from one side only. */\nconst GLOBAL_ONLY_ROOTS = [\n\t\"computerUse\",\n\t\"editor\",\n\t\"browse\"\n];\nconst REPOSITORY_ONLY_ROOTS = [\"projectTrust\"];\n/** Nested exceptions; a repository declaration of any of them throws in the merge. */\nconst GLOBAL_ONLY_PATHS = [\n\t[\"voice\", \"mode\"],\n\t[\"voice\", \"autoCapture\"],\n\t[\"voice\", \"live\"]\n];\nfunction startsWith(keyPath, prefix) {\n\treturn prefix.length <= keyPath.length && prefix.every((segment, index) => keyPath[index] === segment);\n}\n/**\n* The scopes a key path accepts. An unknown root answers `both` rather than\n* throwing: the parser is what rejects unsupported keys, and it reports them\n* far better than a scope lookup could.\n*/\nfunction configScopeOf(keyPath) {\n\tif (keyPath.length === 0) return \"both\";\n\tif (GLOBAL_ONLY_PATHS.some((prefix) => startsWith(keyPath, prefix))) return \"global\";\n\tconst root = keyPath[0];\n\tif (GLOBAL_ONLY_ROOTS.includes(root)) return \"global\";\n\tif (REPOSITORY_ONLY_ROOTS.includes(root)) return \"repository\";\n\treturn \"both\";\n}\n/** Every root key the config accepts, so a caller can enumerate without importing the parser's internals. */\nfunction configRootKeys() {\n\treturn ROOT_KEYS;\n}\nconst KEY_SEPARATOR = \".\";\nfunction isPlainRecord(value) {\n\treturn typeof value === \"object\" && value !== null && !Array.isArray(value);\n}\n/**\n* Every key path a parsed document actually sets, as dotted strings.\n*\n* A settings surface needs to tell \"this file set this key\" from \"this file is\n* silent about it\", and the parsed `PoConfig` cannot answer: an absent file\n* reads as `{ projectTrust: 'ask' }` and `parsePoConfig` always returns all\n* known root keys, some undefined. So the question is asked of the raw document\n* instead, before any defaulting has happened.\n*\n* Leaves only. A list is a leaf because it is replaced whole, and an empty\n* record sets nothing.\n*/\nfunction configLeafKeys(value, prefix = []) {\n\tif (!isPlainRecord(value)) return prefix.length > 0 ? [prefix.join(KEY_SEPARATOR)] : [];\n\tconst keys = Object.keys(value);\n\tif (keys.length === 0) return prefix.length > 0 ? [prefix.join(KEY_SEPARATOR)] : [];\n\treturn keys.flatMap((key) => configLeafKeys(value[key], [...prefix, key]));\n}\n/** The value a key path points at, or undefined when any step is missing. */\nfunction valueAtKeyPath(value, keyPath) {\n\tlet current = value;\n\tfor (const segment of keyPath) {\n\t\tif (!isPlainRecord(current)) return void 0;\n\t\tcurrent = current[segment];\n\t}\n\treturn current;\n}\n//#endregion\nexport { PO_VOICE_TTS_ENGINES as a, configScopeOf as c, parsePlanningModeConfig as d, parsePoConfig as f, PO_VOICE_MODES as i, mergePoConfigs as l, valueAtKeyPath as m, PO_VOICE_ENGINES as n, configLeafKeys as o, resolveVoiceConfig as p, PO_VOICE_LIVE_VOICES as r, configRootKeys as s, PO_PLANNING_THINKING_LEVELS as t, parseAutocompactModeConfig as u };\n\n//# sourceMappingURL=configPolicy-BIQmQv2-.mjs.map","import { readJson, writeFileAtomic } from \"../json/sync.mjs\";\nimport \"../../../runtimeJson.mjs\";\nimport { nodeHost } from \"../nodeHost/index.mjs\";\nimport { PACKAGE_MANIFEST } from \"../poPackage/core.mjs\";\nimport { AGENT_DIRECTORY, isPoDispatcherManifest, isPoHomeMarker, mergePiSettings, normalizePiSettings, piSettingsPath, poDispatcherPath, poThemePath, prunePoPiSettings, serializePiSettings } from \"./core.mjs\";\nimport fs from \"node:fs\";\nimport path from \"node:path\";\n//#region src/services/piSettings/sync.ts\n/**\n* True when a directory's `.po` folder exists and is a repository's own configuration.\n*\n* @deprecated Node-only sync shim; use hasRepositoryPoDirectoryAsync. Removed in M2.\n*/\nfunction hasRepositoryPoDirectory(directory, homeDirectory = nodeHost.homeDirectory(), environment = process.env) {\n\tconst marker = path.resolve(directory, \".po\");\n\tif (isPoHomeMarker(marker, homeDirectory, environment)) return false;\n\ttry {\n\t\treturn fs.statSync(marker).isDirectory();\n\t} catch {\n\t\treturn false;\n\t}\n}\n/** True when the directory names a model: credentials, a custom provider, or a default. */\nfunction hasModelConfig(agentDirectory) {\n\ttry {\n\t\treturn fs.existsSync(path.join(agentDirectory, \"models.json\")) || Object.keys(readJson(path.join(agentDirectory, \"auth.json\"))).length > 0 || typeof readJson(piSettingsPath(agentDirectory)).defaultProvider === \"string\";\n\t} catch {\n\t\treturn true;\n\t}\n}\n/**\n* Where Po reads auth.json and models.json from.\n*\n* @deprecated Node-only sync shim; use modelConfigDirectoryAsync. Removed in M2.\n*/\nfunction modelConfigDirectory(agentDirectory, homeDirectory = nodeHost.homeDirectory()) {\n\tif (hasModelConfig(agentDirectory)) return agentDirectory;\n\tconst pi = path.join(homeDirectory, \".pi\", AGENT_DIRECTORY);\n\treturn pi !== agentDirectory && hasModelConfig(pi) ? pi : agentDirectory;\n}\n/**\n* Model defaults fall back independently of credentials, only when settings.json is absent.\n*\n* @deprecated Node-only sync shim; use modelSettingsDirectoryAsync. Removed in M2.\n*/\nfunction modelSettingsDirectory(agentDirectory, homeDirectory = nodeHost.homeDirectory()) {\n\tif (fs.existsSync(piSettingsPath(agentDirectory))) return agentDirectory;\n\tconst pi = path.join(homeDirectory, \".pi\", AGENT_DIRECTORY);\n\treturn fs.existsSync(piSettingsPath(pi)) ? pi : agentDirectory;\n}\n/** @deprecated Node-only sync shim; use readPiSettingsAsync. Removed in M2. */\nfunction readPiSettings(agentDirectory) {\n\treturn normalizePiSettings(readJson(piSettingsPath(agentDirectory)));\n}\n/**\n* Merges the Po-owned keys into Pi's user settings file.\n*\n* @deprecated Node-only sync shim; use writePiSettingsAsync. Removed in M2.\n*/\nfunction writePiSettings(agentDirectory, update) {\n\tconst settingsPath = piSettingsPath(agentDirectory);\n\twriteFileAtomic(settingsPath, serializePiSettings(mergePiSettings(readPiSettings(agentDirectory), agentDirectory, update)));\n\treturn settingsPath;\n}\n/**\n* Whether a directory is the dispatcher package `po init` generated, by its manifest ownership marker.\n*\n* @deprecated Node-only sync shim; use isPoDispatcherPackageAsync. Removed in M2.\n*/\nfunction isPoDispatcherPackage(directory) {\n\tlet content;\n\ttry {\n\t\tcontent = fs.readFileSync(path.join(directory, PACKAGE_MANIFEST), \"utf8\");\n\t} catch {\n\t\treturn false;\n\t}\n\treturn isPoDispatcherManifest(content);\n}\n/**\n* Removes the entries `po init` and older `po sync` runs added to Pi's user agent directory.\n*\n* @deprecated Node-only sync shim; use removePoPiSettingsAsync. Removed in M2.\n*/\nfunction removePoPiSettings(agentDirectory) {\n\tconst removed = [];\n\tconst settingsPath = piSettingsPath(agentDirectory);\n\tconst next = prunePoPiSettings(readPiSettings(agentDirectory), agentDirectory);\n\tif (next) {\n\t\twriteFileAtomic(settingsPath, serializePiSettings(next));\n\t\tremoved.push(settingsPath);\n\t}\n\tconst themePath = poThemePath(agentDirectory);\n\tif (fs.lstatSync(themePath, { throwIfNoEntry: false })?.isFile()) {\n\t\tfs.rmSync(themePath, { force: true });\n\t\tremoved.push(themePath);\n\t}\n\tconst dispatcher = poDispatcherPath(agentDirectory);\n\tif (fs.lstatSync(dispatcher, { throwIfNoEntry: false })?.isDirectory() && isPoDispatcherPackage(dispatcher)) {\n\t\tfs.rmSync(dispatcher, {\n\t\t\trecursive: true,\n\t\t\tforce: true\n\t\t});\n\t\tremoved.push(dispatcher);\n\t}\n\treturn removed;\n}\n//#endregion\nexport { hasRepositoryPoDirectory, isPoDispatcherPackage, modelConfigDirectory, modelSettingsDirectory, readPiSettings, removePoPiSettings, writePiSettings };\n\n//# sourceMappingURL=sync.mjs.map","import { c as configScopeOf, f as parsePoConfig, l as mergePoConfigs, m as valueAtKeyPath, o as configLeafKeys } from \"./configPolicy-BIQmQv2-.mjs\";\nimport path from \"node:path\";\nimport { nodeHost } from \"@agimon-ai/po-core/platform\";\nimport { createHash } from \"node:crypto\";\nimport { poHomeDirectory } from \"@agimon-ai/po-core/piSettings\";\nimport { parse } from \"yaml\";\n//#region src/services/config/core.ts\n/**\n* Paths and pure parse/merge steps for the two Po config files. The readers\n* in `read.ts` (async, over a FileSystem) and `sync.ts` (Node-only shims) only\n* fetch file text and hand it here, so both produce identical results.\n*/\nconst PO_DIR = \".po\";\nconst CONFIG_FILE = \"config.yaml\";\nconst PLANS_DIR = \"plans\";\nfunction globalPoConfigDirectory(homeDirectory = nodeHost.homeDirectory()) {\n\treturn poHomeDirectory(homeDirectory);\n}\nfunction globalPoConfigPath(homeDirectory = nodeHost.homeDirectory()) {\n\treturn path.join(globalPoConfigDirectory(homeDirectory), CONFIG_FILE);\n}\nfunction resolvePlanningPlansDirectory(configured, repoRoot, homeDirectory = nodeHost.homeDirectory()) {\n\tif (!configured) return path.join(globalPoConfigDirectory(homeDirectory), PLANS_DIR);\n\tif (configured === \"~\") return homeDirectory;\n\tif (configured.startsWith(\"~/\")) return path.resolve(homeDirectory, configured.slice(2));\n\tif (configured.startsWith(\"~\")) throw new Error(\"Po planning plansDirectory supports only '~' or '~/' home aliases\");\n\treturn path.isAbsolute(configured) ? path.normalize(configured) : path.resolve(repoRoot, configured);\n}\nfunction repositoryPoConfigPath(repoRoot) {\n\treturn path.join(repoRoot, PO_DIR, CONFIG_FILE);\n}\n/**\n* True when a repository's `.po` folder is Po's home itself, as it is for a\n* session rooted at home. That folder is already the global layer; reading it\n* again as the repository layer would apply global-only keys at repository scope.\n*/\nfunction isGlobalPoConfigRoot(repoRoot, homeDirectory = nodeHost.homeDirectory()) {\n\treturn path.resolve(repoRoot, PO_DIR) === path.resolve(globalPoConfigDirectory(homeDirectory));\n}\nfunction repositoryConfigFor(repoRoot, homeDirectory) {\n\treturn isGlobalPoConfigRoot(repoRoot, homeDirectory) ? void 0 : repositoryPoConfigPath(repoRoot);\n}\n/** The config a missing file stands for. */\nfunction defaultPoConfig() {\n\treturn { projectTrust: \"ask\" };\n}\n/** Parses one file's text strictly; `undefined` text means the file is absent. */\nfunction configFromText(text, filePath) {\n\treturn text === void 0 ? defaultPoConfig() : parsePoConfig(text, filePath);\n}\n/** Parses one file's text leniently; `undefined` text means the file is absent. */\nfunction lenientConfigFromText(text, filePath) {\n\treturn text === void 0 ? {\n\t\tconfig: defaultPoConfig(),\n\t\tdiagnostics: []\n\t} : parsePoConfig(text, filePath, { lenient: true });\n}\n/** Process-local distribution defaults never grant native authority or modify user files. */\nfunction distributionDefaults(config, environment) {\n\tif (environment.PO_DISTRIBUTION !== \"desktop\") return config;\n\treturn {\n\t\t...config,\n\t\tcomputerUse: {\n\t\t\t...config.computerUse,\n\t\t\tenabled: config.computerUse?.enabled ?? true\n\t\t}\n\t};\n}\n/** Merges the global and repository files, then applies distribution defaults. */\nfunction mergeConfigLayers(globalConfig, repositoryConfig, environment) {\n\treturn distributionDefaults(mergePoConfigs(globalConfig, repositoryConfig), environment);\n}\n/** Merges lenient parses; the merge itself stays strict about cross-file scope. */\nfunction mergeLenientLayers(globalConfig, repositoryConfig, environment) {\n\tconst diagnostics = [...globalConfig.diagnostics, ...repositoryConfig.diagnostics];\n\treturn {\n\t\tconfig: mergeConfigLayers(globalConfig.config, repositoryConfig.config, environment),\n\t\tdiagnostics\n\t};\n}\n/**\n* One config file as a layer: what it is, what it sets, and the bytes it held.\n* A file that does not exist is a layer that sets nothing, which is a normal\n* state rather than an error.\n*/\nfunction layerFromText(filePath, text) {\n\tif (text === void 0) return {\n\t\tfilePath,\n\t\texists: false,\n\t\thash: \"\",\n\t\tkeys: []\n\t};\n\tconst document = parse(text) ?? {};\n\treturn {\n\t\tfilePath,\n\t\texists: true,\n\t\thash: createHash(\"sha256\").update(text, \"utf8\").digest(\"hex\"),\n\t\tkeys: configLeafKeys(document)\n\t};\n}\nfunction absentRepositoryLayer() {\n\treturn {\n\t\tfilePath: \"\",\n\t\texists: false,\n\t\thash: \"\",\n\t\tkeys: []\n\t};\n}\n/**\n* The two config files kept apart, with the merge alongside them.\n*\n* The origin answer respects the merge's own per-field rules rather than simply\n* preferring the repository: `editor` is read from the global side whatever the\n* repository says, and `projectTrust` from the repository side whatever the\n* global one says. Reporting a file as the source of a value the merge discards\n* is the exact confusion this exists to remove.\n*/\nfunction composeConfigLayers(globalLayer, repositoryLayer, effective) {\n\tconst sets = (layer, keyPath) => {\n\t\tconst dotted = keyPath.join(\".\");\n\t\treturn layer.keys.some((key) => key === dotted || key.startsWith(`${dotted}.`));\n\t};\n\treturn {\n\t\tglobalFile: globalLayer,\n\t\trepositoryFile: repositoryLayer,\n\t\teffective,\n\t\toriginOf(keyPath) {\n\t\t\tconst scope = configScopeOf(keyPath);\n\t\t\tif (scope !== \"global\" && sets(repositoryLayer, keyPath)) return \"repository\";\n\t\t\tif (scope !== \"repository\" && sets(globalLayer, keyPath)) return \"global\";\n\t\t\treturn \"default\";\n\t\t},\n\t\tvalueAt: (keyPath) => valueAtKeyPath(effective, keyPath)\n\t};\n}\n//#endregion\nexport { globalPoConfigDirectory as a, layerFromText as c, mergeLenientLayers as d, repositoryConfigFor as f, defaultPoConfig as i, lenientConfigFromText as l, resolvePlanningPlansDirectory as m, composeConfigLayers as n, globalPoConfigPath as o, repositoryPoConfigPath as p, configFromText as r, isGlobalPoConfigRoot as s, absentRepositoryLayer as t, mergeConfigLayers as u };\n\n//# sourceMappingURL=core-Cd_sGFB4.mjs.map","import fs from \"node:fs\";\nimport os from \"node:os\";\nimport path from \"node:path\";\nimport { fileURLToPath } from \"node:url\";\n//#region src/services/testMode/index.ts\nconst CLI_PACKAGE = \"@agimon-ai/po\";\nconst WEB_PACKAGE = \"@agimon-ai/po-web\";\nconst PACKAGE_PATTERNS = [\"packages/*/*/package.json\", \"layers/*/*/package.json\"];\nconst TEST_FLAG = \"--test\";\nconst SEEDED_AGENT_FILES = [\"auth.json\", \"models.json\"];\nfunction manifestName(directory) {\n\ttry {\n\t\tconst manifest = JSON.parse(fs.readFileSync(path.join(directory, \"package.json\"), \"utf8\"));\n\t\treturn typeof manifest.name === \"string\" ? manifest.name : void 0;\n\t} catch {\n\t\treturn;\n\t}\n}\n/** Resolve existing ancestors too, so a not-yet-created test home cannot hide a symlink escape. */\nfunction canonicalPath(target) {\n\tconst absolute = path.resolve(target);\n\ttry {\n\t\treturn fs.realpathSync(absolute);\n\t} catch (error) {\n\t\tif (error.code !== \"ENOENT\") throw error;\n\t\tconst parent = path.dirname(absolute);\n\t\tif (parent === absolute) throw error;\n\t\treturn path.join(canonicalPath(parent), path.basename(absolute));\n\t}\n}\nfunction contained(root, target) {\n\tconst relative = path.relative(root, target);\n\treturn relative !== \"\" && relative !== \"..\" && !relative.startsWith(`..${path.sep}`) && !path.isAbsolute(relative);\n}\n/** Find a real Po source checkout, not an arbitrary consumer with workspace folders. */\nfunction discoverPoCheckout(start) {\n\tlet directory = canonicalPath(start);\n\twhile (true) {\n\t\tif (fs.existsSync(path.join(directory, \"pnpm-workspace.yaml\")) && manifestName(path.join(directory, \"packages/cli/po\")) === CLI_PACKAGE) return directory;\n\t\tconst parent = path.dirname(directory);\n\t\tif (parent === directory) return void 0;\n\t\tdirectory = parent;\n\t}\n}\nfunction checkoutPackages(checkoutRoot) {\n\tconst packages = {};\n\tfor (const manifest of fs.globSync(PACKAGE_PATTERNS, { cwd: checkoutRoot }).sort()) {\n\t\tconst directory = fs.realpathSync(path.dirname(path.join(checkoutRoot, manifest)));\n\t\tif (!contained(checkoutRoot, directory)) throw new Error(`Po checkout package escapes ${checkoutRoot}: ${manifest}`);\n\t\tconst name = manifestName(directory);\n\t\tif (name) packages[name] = directory;\n\t}\n\treturn packages;\n}\nfunction contextEnvironment(checkoutRoot) {\n\tconst packages = checkoutPackages(checkoutRoot);\n\tif (!packages[CLI_PACKAGE] || !packages[WEB_PACKAGE]) throw new Error(\"Po test checkout must contain the Po CLI and po-web packages.\");\n\tconst poHome = path.join(checkoutRoot, \".po/test\");\n\tconst realHome = canonicalPath(poHome);\n\tconst agent = path.join(poHome, \"agent\");\n\tif (realHome !== poHome || canonicalPath(agent) !== agent || !contained(checkoutRoot, realHome) || !contained(realHome, canonicalPath(agent))) throw new Error(`Po test home must stay inside the checkout without symlinked home or agent directories: ${poHome}`);\n\tfor (const file of SEEDED_AGENT_FILES) {\n\t\tconst target = path.join(agent, file);\n\t\ttry {\n\t\t\tif (fs.lstatSync(target).isSymbolicLink() || !contained(canonicalPath(agent), canonicalPath(target))) throw new Error(`Po test credentials must be private files inside the test agent directory: ${target}`);\n\t\t} catch (error) {\n\t\t\tif (error.code !== \"ENOENT\") throw error;\n\t\t}\n\t}\n\treturn {\n\t\tPO_TEST: \"1\",\n\t\tPO_TEST_ROOT: checkoutRoot,\n\t\tPO_HOME: poHome,\n\t\tPI_CODING_AGENT_DIR: agent,\n\t\tPO_TEST_PACKAGES: JSON.stringify(packages),\n\t\tPO_WEB_PACKAGE_ROOT: packages[WEB_PACKAGE],\n\t\tPO_SERVER_COMMAND: path.join(packages[CLI_PACKAGE], \"dist/bin/serve.mjs\")\n\t};\n}\n/** Validate inherited test pins before forwarding them to another process. Invalid test mode fails closed. */\nfunction getValidatedTestContext(environment = process.env) {\n\tif (environment.PO_TEST !== \"1\") return void 0;\n\tconst root = environment.PO_TEST_ROOT;\n\tif (!root || !path.isAbsolute(root) || canonicalPath(root) !== root || discoverPoCheckout(root) !== root) throw new Error(\"Invalid PO_TEST_ROOT. Run po --test from a Po checkout to initialize test mode.\");\n\tconst expected = contextEnvironment(root);\n\tfor (const [key, value] of Object.entries(expected)) if (key === \"PO_TEST_PACKAGES\") {\n\t\tlet packages;\n\t\ttry {\n\t\t\tpackages = JSON.parse(environment[key] ?? \"\");\n\t\t} catch {\n\t\t\tthrow new Error(\"Invalid PO_TEST_PACKAGES. Run po --test to initialize checkout packages.\");\n\t\t}\n\t\tconst entries = typeof packages === \"object\" && packages !== null && !Array.isArray(packages) ? Object.entries(packages) : [];\n\t\tconst expectedPackages = JSON.parse(value);\n\t\tif (entries.length !== Object.keys(expectedPackages).length || entries.some(([name, directory]) => expectedPackages[name] !== directory)) throw new Error(\"Invalid PO_TEST_PACKAGES: package map must match the pinned Po checkout.\");\n\t} else if (environment[key] !== value) throw new Error(`Invalid ${key}: expected ${value}. Run po --test to initialize test mode.`);\n\treturn {\n\t\tcheckoutRoot: root,\n\t\tenv: expected\n\t};\n}\n/** Initialize checkout-local test mode before any configuration or runtime imports. */\nfunction initializeTestMode(entryUrl, options = {}) {\n\tconst argv = options.argv ?? process.argv;\n\tconst environment = options.env ?? process.env;\n\tconst end = argv.indexOf(\"--\", 2);\n\tif (argv.findIndex((argument, index) => index >= 2 && argument === TEST_FLAG && (end === -1 || index < end)) === -1) return getValidatedTestContext(environment)?.checkoutRoot;\n\tconst checkoutRoot = discoverPoCheckout(options.cwd ?? process.cwd()) ?? discoverPoCheckout(path.dirname(fileURLToPath(entryUrl)));\n\tif (!checkoutRoot) throw new Error(\"po --test requires a Po source checkout. Run it from the checkout or execute its built CLI.\");\n\tconst pins = contextEnvironment(checkoutRoot);\n\tconst home = options.homeDir ?? environment.HOME ?? os.homedir();\n\tconst stableHome = canonicalPath(path.join(home, \".po\"));\n\tconst testHome = canonicalPath(pins.PO_HOME);\n\tif (testHome === stableHome || contained(stableHome, testHome)) throw new Error(\"Po test home must not use the stable Po home.\");\n\tlet previousRoot;\n\ttry {\n\t\tpreviousRoot = getValidatedTestContext(environment)?.checkoutRoot;\n\t} catch {\n\t\tpreviousRoot = void 0;\n\t}\n\tObject.assign(environment, pins);\n\tif (previousRoot !== checkoutRoot) environment.PO_TEST_RESET_HARNESS = \"1\";\n\tfor (let index = (end === -1 ? argv.length : end) - 1; index >= 2; index--) if (argv[index] === TEST_FLAG) argv.splice(index, 1);\n\ttry {\n\t\tconst agent = pins.PI_CODING_AGENT_DIR;\n\t\tfs.mkdirSync(agent, {\n\t\t\trecursive: true,\n\t\t\tmode: 448\n\t\t});\n\t\tfs.chmodSync(agent, 448);\n\t\tfor (const file of SEEDED_AGENT_FILES) {\n\t\t\tconst target = path.join(agent, file);\n\t\t\tconst source = path.join(stableHome, \"agent\", file);\n\t\t\tif (fs.existsSync(target) || !fs.existsSync(source)) continue;\n\t\t\tfs.copyFileSync(source, target, fs.constants.COPYFILE_EXCL);\n\t\t\tfs.chmodSync(target, 384);\n\t\t}\n\t} catch (error) {\n\t\tprocess.stderr.write(`[po] Could not copy the stable login into ${pins.PO_HOME}: ${error instanceof Error ? error.message : String(error)}\\n`);\n\t}\n\treturn checkoutRoot;\n}\n/** Only repository-owned Po packages are excluded from implicit non-test consumer resolution. */\nfunction isCheckoutPoPackage(packageRoot) {\n\tconst realRoot = fs.realpathSync(packageRoot);\n\tconst name = manifestName(realRoot);\n\tif (name !== CLI_PACKAGE && !name?.startsWith(\"@agimon-ai/po-\")) return false;\n\tconst checkout = discoverPoCheckout(realRoot);\n\tif (!checkout) return false;\n\treturn /^(packages|layers)\\/[^/]+\\/[^/]+$/.test(path.relative(checkout, realRoot).split(path.sep).join(\"/\"));\n}\n//#endregion\nexport { discoverPoCheckout, getValidatedTestContext, initializeTestMode, isCheckoutPoPackage };\n\n//# sourceMappingURL=index.mjs.map"],"ignoreList":[0,3,4,5,6,7,8,9,10,11,12,13,14,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49,50,51,52,53,54,55,56,57,58,59,60,61,62,63,64,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,81,82,83,84,85,86,87,88,89,90,91,92,93,94,95,96],"mappings":";;;;;;;;AAAA,IAAM,2BAA2B,OAAO,OAAO,EAC3C,OAAO,OAAO,mBAAmB,EACrC,CAAC;AACD,IAAM,cAAN,MAAkB;CACd,IAAI,cAAc;EACd,OAAO,KAAK,MAAM,wBAAwB;CAC9C;AACJ;AACA,IAAM,eAAN,cAA2B,YAAY;CACnC;CACA,YAAY,MAAM;EACd,MAAM;EACN,KAAK,QAAQ;CACjB;CACA,MAAM,MAAM,CAEZ;CACA,WAAW;EACP,OAAO,KAAK;CAChB;AACJ;AACA,IAAM,eAAN,cAA2B,YAAY;CACnC;CACA;CACA;CACA,YAAY,QAAQ,KAAK,OAAO;EAC5B,MAAM;EACN,KAAK,UAAU;EACf,KAAK,OAAO;EACZ,KAAK,SAAS;CAClB;CACA,MAAM,KAAK;EACP,IAAI,IAAI,UAAU,KAAK,KAAK,OACxB,OAAO,KAAK;EAChB,OAAO,KAAK,QAAQ,MAAM,GAAG;CACjC;CACA,WAAW;EACP,OAAO,GAAG,KAAK,QAAQ,aAAa,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EACD;CACD;AACD;;AAEA,IAAM,MAAM;CACX;CACA;CACA;CACA;CACA;CACA;AACD;;AAEA,IAAM,OAAO;CACZ;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;AACD;;;;;;;AAOA,IAAI,gBAAgB,MAAM,cAAc;CACvC,aAAa;CACb,SAAS,CAAC;CACV;CACA,aAAa;CACb,cAAc;CACd,4BAA4B,IAAI,IAAI;CACpC,YAAY,KAAK;EAChB,MAAM,UAAU;GACf,UAAU;GACV,UAAU;EACX;EACA,MAAM,OAAO,eAAe,UAAU,cAAc,OAAO,eAAe,IAAI,GAAG,SAAS,SAAS,GAAG,OAAO;EAC7G,OAAO,OAAO,MAAM,IAAI;EACxB,KAAK,MAAM;EACX,eAAe,MAAM,QAAQ,SAAS,OAAO;EAC7C,KAAK,SAAS;GACb,QAAQ;GACR,SAAS,YAAY;IACpB,KAAK,OAAO,KAAK,OAAO;IACxB,IAAI,KAAK,OAAO,SAAS,KAAK,YAAY,KAAK,SAAS,KAAK,OAAO,MAAM,CAAC,KAAK,UAAU;GAC3F;EACD,CAAC;EACD,OAAO;CACR;;;;;;;CAOA,SAAS,UAAU;EAClB,OAAO,KAAK,IAAI,aAAa;GAC5B,MAAM,KAAK,EAAE,KAAK;GAClB,KAAK,UAAU,IAAI,IAAI,QAAQ;GAC/B,aAAa,KAAK,UAAU,OAAO,EAAE;EACtC,GAAG,uBAAuB;CAC3B;CACA,iBAAiB;EAChB,IAAI,YAAY,KAAK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