{"version":3,"file":"index.mjs","names":["toError","u","o","a","h","d","y","v","l","e","t","s","c","p","n","b","w","S","j","M","R","L","F","I","r","i","f","g","m","K","O","E","x","A","N","P","k","z","isPlainObject","isFunction","isNil","isString","attempt","attemptAsync","attempt","attempt","attempt","createContext","pc","mixin","stripAnsi","validate","stripAnsi","emojiRegex","stripAnsi","resolve","statSync","dirname","readdirSync","stripQuotes","require","readFileSync","statSync","y18n","shim","_y18n","shim","require","escalade","resolve","command","templates.completionZshTemplate","templates.completionShTemplate","distance","Usage","Validation","Command","Completion","esmPlatformShim","FIGLET_ROWS","FIGLET_ROWS","fs","fs","parse","FRONTMATTER_PATTERN","parseYaml","stringify","stringifyYaml","resolveDescription","parseFrontmatter","fs","resolveTags","fs","resolveChildren","CODE_BLOCK_RE","PLACEHOLDER_PREFIX","PLACEHOLDER_SUFFIX","fs","PLACEHOLDER_RE","resolveLink","fs","parseFrontmatter","stringifyFrontmatter","parseFrontmatter","fs","findFirstLink","stringifyFrontmatter","parseFrontmatter","fs","fs","fs","stripLeadingSlash","fs","resolveDirName","maybeItems","stripLeadingSlash","flattenSection","fs","fs","buildAssetConfig","fs","process","match$1","isFunction","resolveValue","process","match","defaultFigures","Text$1","match","Text","writeCrashLog","nodeVersion","Box","Text","execSilent","fs","fsPromises","normalize","isAbsolute","join","resolve","extname","dirname","basename","format","inspect","read","fileURLToPath","extname","isPlainObject","parse","e","t","n","r","i","a","o","s","c","t","e","n","r","i","n","t","r","e","i","a","o","s","c","i","n","r","a","t","o","e","s","a","t","c","n","o","e","r","i","e","r","n","t","o","a","d","m","n","e","r","t","r","t","e","i","n","e","t","n","r","i","a","s","c","u","d","o","f","g","_","m","l","h","y","b","T","E","D","O","p","A","j","M","x","N","P","F","S","w","C","z","v","k","i","n","e","a","t","r","e","r","i","a","s","c","P","#e","#t","#n","n","e","t","r","resolve","join","normalize","fileURLToPath","isAbsolute","parseJSON","parseJSONC","dirname","fs","path","#t","utils_exports","resolve","loadConfig","rc9.read","rc9.readUser","dirname","basename","join","extname","normalize","loadConfig","attemptAsync","loadConfig$1","toError","cleanCmd"],"sources":["../src/shims/require.ts","../../../node_modules/.pnpm/@kidd-cli+utils@0.4.2/node_modules/@kidd-cli/utils/dist/result-D_NYcfr2.js","../../../node_modules/.pnpm/ts-pattern@5.9.0/node_modules/ts-pattern/dist/index.js","../../../node_modules/.pnpm/es-toolkit@1.49.0/node_modules/es-toolkit/dist/predicate/isPlainObject.mjs","../../../node_modules/.pnpm/es-toolkit@1.49.0/node_modules/es-toolkit/dist/predicate/isFunction.mjs","../../../node_modules/.pnpm/es-toolkit@1.49.0/node_modules/es-toolkit/dist/predicate/isNil.mjs","../../../node_modules/.pnpm/es-toolkit@1.49.0/node_modules/es-toolkit/dist/predicate/isString.mjs","../../../node_modules/.pnpm/es-toolkit@1.49.0/node_modules/es-toolkit/dist/util/attempt.mjs","../../../node_modules/.pnpm/es-toolkit@1.49.0/node_modules/es-toolkit/dist/util/attemptAsync.mjs","../../../node_modules/.pnpm/es-toolkit@1.49.0/node_modules/es-toolkit/dist/index.mjs","../../../node_modules/.pnpm/@kidd-cli+utils@0.4.2/node_modules/@kidd-cli/utils/dist/fp.js","../../../node_modules/.pnpm/@kidd-cli+core@0.24.0_chokidar@5.0.0_ink@7.1.0_@types+react@19.2.17_react-devtools-core_a6616a0595d227c2e1432e5632a6c556/node_modules/@kidd-cli/core/dist/paths-Clz-xMIL.js","../../../node_modules/.pnpm/picocolors@1.1.1/node_modules/picocolors/picocolors.js","../../../node_modules/.pnpm/@kidd-cli+utils@0.4.2/node_modules/@kidd-cli/utils/dist/json.js","../../../node_modules/.pnpm/@kidd-cli+utils@0.4.2/node_modules/@kidd-cli/utils/dist/tag.js","../../../node_modules/.pnpm/@kidd-cli+core@0.24.0_chokidar@5.0.0_ink@7.1.0_@types+react@19.2.17_react-devtools-core_a6616a0595d227c2e1432e5632a6c556/node_modules/@kidd-cli/core/dist/create-context-BhqTipOB.js","../../../node_modules/.pnpm/cliui@9.0.1/node_modules/cliui/build/lib/index.js","../../../node_modules/.pnpm/ansi-regex@6.2.2/node_modules/ansi-regex/index.js","../../../node_modules/.pnpm/strip-ansi@7.2.0/node_modules/strip-ansi/index.js","../../../node_modules/.pnpm/get-east-asian-width@1.6.0/node_modules/get-east-asian-width/lookup-data.js","../../../node_modules/.pnpm/get-east-asian-width@1.6.0/node_modules/get-east-asian-width/utilities.js","../../../node_modules/.pnpm/get-east-asian-width@1.6.0/node_modules/get-east-asian-width/lookup.js","../../../node_modules/.pnpm/get-east-asian-width@1.6.0/node_modules/get-east-asian-width/index.js","../../../node_modules/.pnpm/emoji-regex@10.6.0/node_modules/emoji-regex/index.mjs","../../../node_modules/.pnpm/string-width@7.2.0/node_modules/string-width/index.js","../../../node_modules/.pnpm/ansi-styles@6.2.3/node_modules/ansi-styles/index.js","../../../node_modules/.pnpm/wrap-ansi@9.0.2/node_modules/wrap-ansi/index.js","../../../node_modules/.pnpm/cliui@9.0.1/node_modules/cliui/index.mjs","../../../node_modules/.pnpm/escalade@3.2.0/node_modules/escalade/sync/index.mjs","../../../node_modules/.pnpm/yargs-parser@22.0.0/node_modules/yargs-parser/build/lib/string-utils.js","../../../node_modules/.pnpm/yargs-parser@22.0.0/node_modules/yargs-parser/build/lib/tokenize-arg-string.js","../../../node_modules/.pnpm/yargs-parser@22.0.0/node_modules/yargs-parser/build/lib/yargs-parser-types.js","../../../node_modules/.pnpm/yargs-parser@22.0.0/node_modules/yargs-parser/build/lib/yargs-parser.js","../../../node_modules/.pnpm/yargs-parser@22.0.0/node_modules/yargs-parser/build/lib/index.js","../../../node_modules/.pnpm/yargs@18.0.0/node_modules/yargs/build/lib/utils/process-argv.js","../../../node_modules/.pnpm/y18n@5.0.8/node_modules/y18n/build/lib/platform-shims/node.js","../../../node_modules/.pnpm/y18n@5.0.8/node_modules/y18n/build/lib/index.js","../../../node_modules/.pnpm/y18n@5.0.8/node_modules/y18n/index.mjs","../../../node_modules/.pnpm/get-caller-file@2.0.5/node_modules/get-caller-file/index.js","../../../node_modules/.pnpm/yargs@18.0.0/node_modules/yargs/lib/platform-shims/esm.mjs","../../../node_modules/.pnpm/yargs@18.0.0/node_modules/yargs/build/lib/typings/common-types.js","../../../node_modules/.pnpm/yargs@18.0.0/node_modules/yargs/build/lib/utils/is-promise.js","../../../node_modules/.pnpm/yargs@18.0.0/node_modules/yargs/build/lib/yerror.js","../../../node_modules/.pnpm/yargs@18.0.0/node_modules/yargs/build/lib/parse-command.js","../../../node_modules/.pnpm/yargs@18.0.0/node_modules/yargs/build/lib/argsert.js","../../../node_modules/.pnpm/yargs@18.0.0/node_modules/yargs/build/lib/middleware.js","../../../node_modules/.pnpm/yargs@18.0.0/node_modules/yargs/build/lib/utils/maybe-async-result.js","../../../node_modules/.pnpm/yargs@18.0.0/node_modules/yargs/build/lib/command.js","../../../node_modules/.pnpm/yargs@18.0.0/node_modules/yargs/build/lib/utils/obj-filter.js","../../../node_modules/.pnpm/yargs@18.0.0/node_modules/yargs/build/lib/utils/set-blocking.js","../../../node_modules/.pnpm/yargs@18.0.0/node_modules/yargs/build/lib/usage.js","../../../node_modules/.pnpm/yargs@18.0.0/node_modules/yargs/build/lib/completion-templates.js","../../../node_modules/.pnpm/yargs@18.0.0/node_modules/yargs/build/lib/completion.js","../../../node_modules/.pnpm/yargs@18.0.0/node_modules/yargs/build/lib/utils/levenshtein.js","../../../node_modules/.pnpm/yargs@18.0.0/node_modules/yargs/build/lib/validation.js","../../../node_modules/.pnpm/yargs@18.0.0/node_modules/yargs/build/lib/utils/apply-extends.js","../../../node_modules/.pnpm/yargs@18.0.0/node_modules/yargs/build/lib/yargs-factory.js","../../../node_modules/.pnpm/yargs@18.0.0/node_modules/yargs/index.mjs","../../../node_modules/.pnpm/yargs@18.0.0/node_modules/yargs/helpers/helpers.mjs","../../../node_modules/.pnpm/@kidd-cli+utils@0.4.2/node_modules/@kidd-cli/utils/dist/validate.js","../src/lib/banner/figlet-data.ts","../src/lib/banner/figlet.ts","../src/lib/banner/svg-shared.ts","../src/lib/banner/svg-banner.ts","../src/lib/banner/svg-icon.ts","../src/lib/banner/svg-logo.ts","../src/lib/banner/types.ts","../src/lib/banner/index.ts","../src/lib/markers.ts","../src/lib/rspress.ts","../src/lib/sync/frontmatter.ts","../src/lib/sync/sidebar/landing.ts","../src/lib/sync/workspace.ts","../src/lib/matter.ts","../src/lib/templates.ts","../src/lib/check.ts","../src/lib/paths.ts","../src/lib/sync/badges.ts","../src/lib/sync/images.ts","../src/lib/sync/rewrite-links.ts","../src/lib/sync/copy.ts","../src/lib/sync/resolve/text.ts","../src/lib/sync/home.ts","../src/lib/sync/manifest.ts","../src/lib/sync/openapi-spec.ts","../src/lib/sync/openapi-markdown.ts","../src/lib/sync/openapi.ts","../src/lib/sync/agent-files.ts","../src/lib/sync/resolve/path.ts","../src/lib/sync/strip-xml.ts","../src/lib/sync/planning.ts","../src/lib/sync/errors.ts","../src/lib/sync/resolve/sort.ts","../src/lib/sync/resolve/recursive.ts","../src/lib/sync/resolve/index.ts","../src/lib/sync/sidebar/index.ts","../src/lib/sync/sidebar/inject.ts","../src/lib/sync/sidebar/meta.ts","../src/lib/sync/sidebar/write-meta.ts","../src/lib/sync/index.ts","../src/commands/clean.ts","../src/commands/build.ts","../src/commands/check.ts","../../../node_modules/.pnpm/@kidd-cli+core@0.24.0_chokidar@5.0.0_ink@7.1.0_@types+react@19.2.17_react-devtools-core_a6616a0595d227c2e1432e5632a6c556/node_modules/@kidd-cli/core/dist/store-key-fUtc4MNq.js","../../../node_modules/.pnpm/@kidd-cli+core@0.24.0_chokidar@5.0.0_ink@7.1.0_@types+react@19.2.17_react-devtools-core_a6616a0595d227c2e1432e5632a6c556/node_modules/@kidd-cli/core/dist/render-BsTEEL-N.js","../../../node_modules/.pnpm/is-unicode-supported@2.1.0/node_modules/is-unicode-supported/index.js","../../../node_modules/.pnpm/figures@6.1.0/node_modules/figures/index.js","../../../node_modules/.pnpm/@kidd-cli+core@0.24.0_chokidar@5.0.0_ink@7.1.0_@types+react@19.2.17_react-devtools-core_a6616a0595d227c2e1432e5632a6c556/node_modules/@kidd-cli/core/dist/use-key-binding-Cwei5N22.js","../../../node_modules/.pnpm/@kidd-cli+core@0.24.0_chokidar@5.0.0_ink@7.1.0_@types+react@19.2.17_react-devtools-core_a6616a0595d227c2e1432e5632a6c556/node_modules/@kidd-cli/core/dist/ui/index.js","../src/lib/watcher.ts","../src/lib/dev-headless.ts","../src/components/banner.tsx","../src/lib/crash-reporter.ts","../src/hooks/use-dev-server.ts","../src/screens/dev-screen.tsx","../src/commands/dev.ts","../src/lib/log-config-errors.ts","../src/commands/diff.ts","../src/lib/vars.ts","../src/commands/draft.ts","../src/commands/dump.ts","../src/commands/serve.ts","../src/commands/setup.ts","../src/commands/sync.ts","../src/commands/templates.ts","../../../node_modules/.pnpm/pathe@2.0.3/node_modules/pathe/dist/shared/pathe.M-eThtNZ.mjs","../../../node_modules/.pnpm/pathe@2.0.3/node_modules/pathe/dist/index.mjs","../../../node_modules/.pnpm/exsolve@1.1.0/node_modules/exsolve/dist/index.mjs","../../../node_modules/.pnpm/rc9@3.0.1/node_modules/rc9/dist/_chunks/libs/flat.mjs","../../../node_modules/.pnpm/destr@2.0.5/node_modules/destr/dist/index.mjs","../../../node_modules/.pnpm/defu@6.1.7/node_modules/defu/dist/defu.mjs","../../../node_modules/.pnpm/rc9@3.0.1/node_modules/rc9/dist/index.mjs","../../../node_modules/.pnpm/confbox@0.2.4/node_modules/confbox/dist/_chunks/rolldown-runtime.mjs","../../../node_modules/.pnpm/confbox@0.2.4/node_modules/confbox/dist/_chunks/libs/json5.mjs","../../../node_modules/.pnpm/confbox@0.2.4/node_modules/confbox/dist/_chunks/libs/detect-indent.mjs","../../../node_modules/.pnpm/confbox@0.2.4/node_modules/confbox/dist/_chunks/_format.mjs","../../../node_modules/.pnpm/confbox@0.2.4/node_modules/confbox/dist/json5.mjs","../../../node_modules/.pnpm/confbox@0.2.4/node_modules/confbox/dist/_chunks/libs/jsonc-parser.mjs","../../../node_modules/.pnpm/confbox@0.2.4/node_modules/confbox/dist/_chunks/json.mjs","../../../node_modules/.pnpm/confbox@0.2.4/node_modules/confbox/dist/jsonc.mjs","../../../node_modules/.pnpm/confbox@0.2.4/node_modules/confbox/dist/_chunks/libs/js-yaml.mjs","../../../node_modules/.pnpm/confbox@0.2.4/node_modules/confbox/dist/yaml.mjs","../../../node_modules/.pnpm/confbox@0.2.4/node_modules/confbox/dist/_chunks/libs/smol-toml.mjs","../../../node_modules/.pnpm/confbox@0.2.4/node_modules/confbox/dist/toml.mjs","../../../node_modules/.pnpm/confbox@0.2.4/node_modules/confbox/dist/index.mjs","../../../node_modules/.pnpm/pkg-types@2.3.1/node_modules/pkg-types/dist/index.mjs","../../../node_modules/.pnpm/dotenv@17.4.2/node_modules/dotenv/lib/main.js","../../../node_modules/.pnpm/c12@4.0.0-beta.4_chokidar@5.0.0_dotenv@17.4.2_jiti@2.7.0/node_modules/c12/dist/_chunks/libs/ohash.mjs","../../../node_modules/.pnpm/c12@4.0.0-beta.4_chokidar@5.0.0_dotenv@17.4.2_jiti@2.7.0/node_modules/c12/dist/index.mjs","../../../node_modules/.pnpm/@kidd-cli+config@0.4.1_chokidar@5.0.0_dotenv@17.4.2_jiti@2.7.0/node_modules/@kidd-cli/config/dist/utils.js","../../../node_modules/.pnpm/@kidd-cli+core@0.24.0_chokidar@5.0.0_ink@7.1.0_@types+react@19.2.17_react-devtools-core_a6616a0595d227c2e1432e5632a6c556/node_modules/@kidd-cli/core/dist/cli-9sfQca7V.js","../../../node_modules/.pnpm/@kidd-cli+core@0.24.0_chokidar@5.0.0_ink@7.1.0_@types+react@19.2.17_react-devtools-core_a6616a0595d227c2e1432e5632a6c556/node_modules/@kidd-cli/core/dist/middleware-BlwaZw6v.js","../../../node_modules/.pnpm/@kidd-cli+core@0.24.0_chokidar@5.0.0_ink@7.1.0_@types+react@19.2.17_react-devtools-core_a6616a0595d227c2e1432e5632a6c556/node_modules/@kidd-cli/core/dist/index.js","../src/middleware/error-boundary.ts","../src/index.ts"],"sourcesContent":["/**\n * ESM shim — inject global `require` for bundled CJS deps (e.g. webpack-chain\n * inside Rsbuild) that reference bare `require()` in an ESM context on Node 24+.\n *\n * Must be the first import in the CLI entry point so it runs before any\n * dependency that relies on `require`.\n *\n * @private\n */\nimport { createRequire } from 'node:module'\n\n// oxlint-disable-next-line no-global-assign -- intentional shim for Node 24 CJS compat\nglobalThis.require ??= createRequire(import.meta.url)\n","//#region src/fp/transform.ts\n/**\n* Normalize an unknown caught value into an Error instance.\n*\n* If already an Error, returns it as-is. Otherwise wraps via `new Error(String(value))`.\n*\n* @param value - The unknown value to normalize.\n* @returns An Error instance.\n*/\nfunction toError(value) {\n\tif (value instanceof Error) return value;\n\treturn new Error(String(value));\n}\n//#endregion\n//#region src/fp/result.ts\nfunction ok(value) {\n\treturn [null, value];\n}\n/**\n* Construct a failure Result tuple.\n*\n* Coerces any value to an `Error` via {@link toError} and returns `[Error, null]`.\n* For domain-specific error types (e.g. `AuthError`, `IconsError`), use raw\n* tuple literals instead: `[domainError, null] as const`.\n*\n* @param error - The error value (coerced to Error).\n* @returns A Result tuple `[Error, null]`.\n*/\nfunction err(error) {\n\treturn [toError(error), null];\n}\n//#endregion\nexport { ok as n, toError as r, err as t };\n\n//# sourceMappingURL=result-D_NYcfr2.js.map","const t=Symbol.for(\"@ts-pattern/matcher\"),e=Symbol.for(\"@ts-pattern/isVariadic\"),n=\"@ts-pattern/anonymous-select-key\",r=t=>Boolean(t&&\"object\"==typeof t),i=e=>e&&!!e[t],o=(n,s,c)=>{if(i(n)){const e=n[t](),{matched:r,selections:i}=e.match(s);return r&&i&&Object.keys(i).forEach(t=>c(t,i[t])),r}if(r(n)){if(!r(s))return!1;if(Array.isArray(n)){if(!Array.isArray(s))return!1;let t=[],r=[],u=[];for(const o of n.keys()){const s=n[o];i(s)&&s[e]?u.push(s):u.length?r.push(s):t.push(s)}if(u.length){if(u.length>1)throw new Error(\"Pattern error: Using `...P.array(...)` several times in a single pattern is not allowed.\");if(s.length<t.length+r.length)return!1;const e=s.slice(0,t.length),n=0===r.length?[]:s.slice(-r.length),i=s.slice(t.length,0===r.length?Infinity:-r.length);return t.every((t,n)=>o(t,e[n],c))&&r.every((t,e)=>o(t,n[e],c))&&(0===u.length||o(u[0],i,c))}return n.length===s.length&&n.every((t,e)=>o(t,s[e],c))}return Reflect.ownKeys(n).every(e=>{const r=n[e];return(e in s||i(u=r)&&\"optional\"===u[t]().matcherType)&&o(r,s[e],c);var u})}return Object.is(s,n)},s=e=>{var n,o,u;return r(e)?i(e)?null!=(n=null==(o=(u=e[t]()).getSelectionKeys)?void 0:o.call(u))?n:[]:Array.isArray(e)?c(e,s):c(Object.values(e),s):[]},c=(t,e)=>t.reduce((t,n)=>t.concat(e(n)),[]);function u(...t){if(1===t.length){const[e]=t;return t=>o(e,t,()=>{})}if(2===t.length){const[e,n]=t;return o(e,n,()=>{})}throw new Error(`isMatching wasn't given the right number of arguments: expected 1 or 2, received ${t.length}.`)}function a(t){return Object.assign(t,{optional:()=>h(t),and:e=>d(t,e),or:e=>y(t,e),select:e=>void 0===e?v(t):v(e,t)})}function l(t){return Object.assign((t=>Object.assign(t,{[Symbol.iterator](){let n=0;const r=[{value:Object.assign(t,{[e]:!0}),done:!1},{done:!0,value:void 0}];return{next:()=>{var t;return null!=(t=r[n++])?t:r.at(-1)}}}}))(t),{optional:()=>l(h(t)),select:e=>l(void 0===e?v(t):v(e,t))})}function h(e){return a({[t]:()=>({match:t=>{let n={};const r=(t,e)=>{n[t]=e};return void 0===t?(s(e).forEach(t=>r(t,void 0)),{matched:!0,selections:n}):{matched:o(e,t,r),selections:n}},getSelectionKeys:()=>s(e),matcherType:\"optional\"})})}const f=(t,e)=>{for(const n of t)if(!e(n))return!1;return!0},g=(t,e)=>{for(const[n,r]of t.entries())if(!e(r,n))return!1;return!0},m=(t,e)=>{const n=Reflect.ownKeys(t);for(const r of n)if(!e(r,t[r]))return!1;return!0};function d(...e){return a({[t]:()=>({match:t=>{let n={};const r=(t,e)=>{n[t]=e};return{matched:e.every(e=>o(e,t,r)),selections:n}},getSelectionKeys:()=>c(e,s),matcherType:\"and\"})})}function y(...e){return a({[t]:()=>({match:t=>{let n={};const r=(t,e)=>{n[t]=e};return c(e,s).forEach(t=>r(t,void 0)),{matched:e.some(e=>o(e,t,r)),selections:n}},getSelectionKeys:()=>c(e,s),matcherType:\"or\"})})}function p(e){return{[t]:()=>({match:t=>({matched:Boolean(e(t))})})}}function v(...e){const r=\"string\"==typeof e[0]?e[0]:void 0,i=2===e.length?e[1]:\"string\"==typeof e[0]?void 0:e[0];return a({[t]:()=>({match:t=>{let e={[null!=r?r:n]:t};return{matched:void 0===i||o(i,t,(t,n)=>{e[t]=n}),selections:e}},getSelectionKeys:()=>[null!=r?r:n].concat(void 0===i?[]:s(i))})})}function b(t){return!0}function w(t){return\"number\"==typeof t}function S(t){return\"string\"==typeof t}function j(t){return\"bigint\"==typeof t}const K=a(p(b)),O=a(p(b)),E=K,x=t=>Object.assign(a(t),{startsWith:e=>{return x(d(t,(n=e,p(t=>S(t)&&t.startsWith(n)))));var n},endsWith:e=>{return x(d(t,(n=e,p(t=>S(t)&&t.endsWith(n)))));var n},minLength:e=>x(d(t,(t=>p(e=>S(e)&&e.length>=t))(e))),length:e=>x(d(t,(t=>p(e=>S(e)&&e.length===t))(e))),maxLength:e=>x(d(t,(t=>p(e=>S(e)&&e.length<=t))(e))),includes:e=>{return x(d(t,(n=e,p(t=>S(t)&&t.includes(n)))));var n},regex:e=>{return x(d(t,(n=e,p(t=>S(t)&&Boolean(t.match(n))))));var n}}),A=x(p(S)),N=t=>Object.assign(a(t),{between:(e,n)=>N(d(t,((t,e)=>p(n=>w(n)&&t<=n&&e>=n))(e,n))),lt:e=>N(d(t,(t=>p(e=>w(e)&&e<t))(e))),gt:e=>N(d(t,(t=>p(e=>w(e)&&e>t))(e))),lte:e=>N(d(t,(t=>p(e=>w(e)&&e<=t))(e))),gte:e=>N(d(t,(t=>p(e=>w(e)&&e>=t))(e))),int:()=>N(d(t,p(t=>w(t)&&Number.isInteger(t)))),finite:()=>N(d(t,p(t=>w(t)&&Number.isFinite(t)))),positive:()=>N(d(t,p(t=>w(t)&&t>0))),negative:()=>N(d(t,p(t=>w(t)&&t<0)))}),P=N(p(w)),k=t=>Object.assign(a(t),{between:(e,n)=>k(d(t,((t,e)=>p(n=>j(n)&&t<=n&&e>=n))(e,n))),lt:e=>k(d(t,(t=>p(e=>j(e)&&e<t))(e))),gt:e=>k(d(t,(t=>p(e=>j(e)&&e>t))(e))),lte:e=>k(d(t,(t=>p(e=>j(e)&&e<=t))(e))),gte:e=>k(d(t,(t=>p(e=>j(e)&&e>=t))(e))),positive:()=>k(d(t,p(t=>j(t)&&t>0))),negative:()=>k(d(t,p(t=>j(t)&&t<0)))}),T=k(p(j)),B=a(p(function(t){return\"boolean\"==typeof t})),_=a(p(function(t){return\"symbol\"==typeof t})),W=a(p(function(t){return null==t})),$=a(p(function(t){return null!=t}));var z={__proto__:null,matcher:t,optional:h,array:function(...e){return l({[t]:()=>({match:t=>{if(!Array.isArray(t))return{matched:!1};if(0===e.length)return{matched:!0};const n=e[0];let r={};if(0===t.length)return s(n).forEach(t=>{r[t]=[]}),{matched:!0,selections:r};const i=(t,e)=>{r[t]=(r[t]||[]).concat([e])};return{matched:t.every(t=>o(n,t,i)),selections:r}},getSelectionKeys:()=>0===e.length?[]:s(e[0])})})},set:function(...e){return a({[t]:()=>({match:t=>{if(!(t instanceof Set))return{matched:!1};let n={};if(0===t.size)return{matched:!0,selections:n};if(0===e.length)return{matched:!0};const r=(t,e)=>{n[t]=(n[t]||[]).concat([e])},i=e[0];return{matched:f(t,t=>o(i,t,r)),selections:n}},getSelectionKeys:()=>0===e.length?[]:s(e[0])})})},map:function(...e){return a({[t]:()=>({match:t=>{if(!(t instanceof Map))return{matched:!1};let n={};if(0===t.size)return{matched:!0,selections:n};const r=(t,e)=>{n[t]=(n[t]||[]).concat([e])};if(0===e.length)return{matched:!0};var i;if(1===e.length)throw new Error(`\\`P.map\\` wasn't given enough arguments. Expected (key, value), received ${null==(i=e[0])?void 0:i.toString()}`);const[s,c]=e;return{matched:g(t,(t,e)=>{const n=o(s,e,r),i=o(c,t,r);return n&&i}),selections:n}},getSelectionKeys:()=>0===e.length?[]:[...s(e[0]),...s(e[1])]})})},record:function(...e){return a({[t]:()=>({match:t=>{if(null===t||\"object\"!=typeof t||Array.isArray(t))return{matched:!1};var n;if(0===e.length)throw new Error(`\\`P.record\\` wasn't given enough arguments. Expected (value) or (key, value), received ${null==(n=e[0])?void 0:n.toString()}`);let r={};const i=(t,e)=>{r[t]=(r[t]||[]).concat([e])},[s,c]=1===e.length?[A,e[0]]:e;return{matched:m(t,(t,e)=>{const n=\"string\"!=typeof t||Number.isNaN(Number(t))?null:Number(t),r=null!==n&&o(s,n,i),u=o(s,t,i),a=o(c,e,i);return(u||r)&&a}),selections:r}},getSelectionKeys:()=>0===e.length?[]:[...s(e[0]),...s(e[1])]})})},intersection:d,union:y,not:function(e){return a({[t]:()=>({match:t=>({matched:!o(e,t,()=>{})}),getSelectionKeys:()=>[],matcherType:\"not\"})})},when:p,select:v,any:K,unknown:O,_:E,string:A,number:P,bigint:T,boolean:B,symbol:_,nullish:W,nonNullable:$,instanceOf:function(t){return a(p(function(t){return e=>e instanceof t}(t)))},shape:function(t){return a(p(u(t)))}};class I extends Error{constructor(t){let e;try{e=JSON.stringify(t)}catch(n){e=t}super(`Pattern matching error: no pattern matches value ${e}`),this.input=void 0,this.input=t}}const L={matched:!1,value:void 0};function M(t){return new R(t,L)}class R{constructor(t,e){this.input=void 0,this.state=void 0,this.input=t,this.state=e}with(...t){if(this.state.matched)return this;const e=t[t.length-1],r=[t[0]];let i;3===t.length&&\"function\"==typeof t[1]?i=t[1]:t.length>2&&r.push(...t.slice(1,t.length-1));let s=!1,c={};const u=(t,e)=>{s=!0,c[t]=e},a=!r.some(t=>o(t,this.input,u))||i&&!Boolean(i(this.input))?L:{matched:!0,value:e(s?n in c?c[n]:c:this.input,this.input)};return new R(this.input,a)}when(t,e){if(this.state.matched)return this;const n=Boolean(t(this.input));return new R(this.input,n?{matched:!0,value:e(this.input,this.input)}:L)}otherwise(t){return this.state.matched?this.state.value:t(this.input)}exhaustive(t=F){return this.state.matched?this.state.value:t(this.input)}run(){return this.exhaustive()}returnType(){return this}narrow(){return this}}function F(t){throw new I(t)}export{I as NonExhaustiveError,z as P,z as Pattern,u as isMatching,M as match};\n//# sourceMappingURL=index.js.map\n","//#region src/predicate/isPlainObject.ts\n/**\n* Checks if a given value is a plain object.\n*\n* @param value - The value to check.\n* @returns True if the value is a plain object, otherwise false.\n*\n* @example\n* ```typescript\n* // ✅👇 True\n*\n* isPlainObject({ });                       // ✅\n* isPlainObject({ key: 'value' });          // ✅\n* isPlainObject({ key: new Date() });       // ✅\n* isPlainObject(new Object());              // ✅\n* isPlainObject(Object.create(null));       // ✅\n* isPlainObject({ nested: { key: true} });  // ✅\n* isPlainObject(new Proxy({}, {}));         // ✅\n* isPlainObject({ [Symbol('tag')]: 'A' });  // ✅\n*\n* // ✅👇 (cross-realms, node context, workers, ...)\n* const runInNewContext = await import('node:vm').then(\n*     (mod) => mod.runInNewContext\n* );\n* isPlainObject(runInNewContext('({})'));   // ✅\n*\n* // ❌👇 False\n*\n* class Test { };\n* isPlainObject(new Test())           // ❌\n* isPlainObject(10);                  // ❌\n* isPlainObject(null);                // ❌\n* isPlainObject('hello');             // ❌\n* isPlainObject([]);                  // ❌\n* isPlainObject(new Date());          // ❌\n* isPlainObject(new Uint8Array([1])); // ❌\n* isPlainObject(Buffer.from('ABC'));  // ❌\n* isPlainObject(Promise.resolve({})); // ❌\n* isPlainObject(Object.create({}));   // ❌\n* isPlainObject(new (class Cls {}));  // ❌\n* isPlainObject(globalThis);          // ❌,\n* ```\n*/\nfunction isPlainObject(value) {\n\tif (!value || typeof value !== \"object\") return false;\n\tconst proto = Object.getPrototypeOf(value);\n\tif (!(proto === null || proto === Object.prototype || Object.getPrototypeOf(proto) === null)) return false;\n\treturn Object.prototype.toString.call(value) === \"[object Object]\";\n}\n//#endregion\nexport { isPlainObject };\n","//#region src/predicate/isFunction.ts\n/**\n* Checks if `value` is a function.\n*\n* @param value The value to check.\n* @returns Returns `true` if `value` is a function, else `false`.\n*\n* @example\n* isFunction(Array.prototype.slice); // true\n* isFunction(async function () {}); // true\n* isFunction(function* () {}); // true\n* isFunction(Proxy); // true\n* isFunction(Int8Array); // true\n*/\nfunction isFunction(value) {\n\treturn typeof value === \"function\";\n}\n//#endregion\nexport { isFunction };\n","//#region src/predicate/isNil.ts\n/**\n* Checks if a given value is null or undefined.\n*\n* This function tests whether the provided value is either `null` or `undefined`.\n* It returns `true` if the value is `null` or `undefined`, and `false` otherwise.\n*\n* This function can also serve as a type predicate in TypeScript, narrowing the type of the argument to `null` or `undefined`.\n*\n* @param x - The value to test for null or undefined.\n* @returns `true` if the value is null or undefined, `false` otherwise.\n*\n* @example\n* const value1 = null;\n* const value2 = undefined;\n* const value3 = 42;\n* const result1 = isNil(value1); // true\n* const result2 = isNil(value2); // true\n* const result3 = isNil(value3); // false\n*/\nfunction isNil(x) {\n\treturn x == null;\n}\n//#endregion\nexport { isNil };\n","//#region src/predicate/isString.ts\n/**\n* Checks if a given value is string.\n*\n* This function can also serve as a type predicate in TypeScript, narrowing the type of the argument to `string`.\n*\n* @param value The value to check if it is string.\n* @returns Returns `true` if `value` is a string, else `false`.\n*\n* @example\n* const value1 = 'abc';\n* const value2 = 123;\n* const value3 = true;\n*\n* console.log(isString(value1)); // true\n* console.log(isString(value2)); // false\n* console.log(isString(value3)); // false\n*/\nfunction isString(value) {\n\treturn typeof value === \"string\";\n}\n//#endregion\nexport { isString };\n","//#region src/util/attempt.ts\n/**\n* Attempt to execute a function and return the result or error.\n* Returns a tuple where:\n* - On success: [null, Result] - First element is null, second is the result\n* - On error: [Error, null] - First element is the caught error, second is null\n*\n* @template {unknown} T - The type of the result of the function.\n* @template {unknown} E - The type of the error that can be thrown by the function.\n* @param func - The function to execute.\n* @returns A tuple containing either [null, result] or [error, null].\n*\n* @example\n* // Successful execution\n* const [error, result] = attempt(() => 42);\n* // [null, 42]\n*\n* // Failed execution\n* const [error, result] = attempt(() => {\n*   throw new Error('Something went wrong');\n* });\n* // [Error, null]\n*\n* // With type parameter\n* const [error, names] = attempt<string[]>(() => ['Alice', 'Bob']);\n* // [null, ['Alice', 'Bob']]\n*\n* @note\n* Important: This function is not suitable for async functions (functions that return a `Promise`).\n* When passing an async function, it will return `[null, Promise<Result>]`, but won't catch any\n* errors if the Promise is rejected later.\n*\n* For handling async functions, use the `attemptAsync` function instead:\n* ```\n* const [error, data] = await attemptAsync(async () => {\n*   const response = await fetch('https://api.example.com/data');\n*   return response.json();\n* });\n* ```\n*/\nfunction attempt(func) {\n\ttry {\n\t\treturn [null, func()];\n\t} catch (error) {\n\t\treturn [error, null];\n\t}\n}\n//#endregion\nexport { attempt };\n","//#region src/util/attemptAsync.ts\n/**\n* Attempt to execute an async function and return the result or error.\n* Returns a Promise that resolves to a tuple where:\n* - On success: [null, Result] - First element is null, second is the result\n* - On error: [Error, null] - First element is the caught error, second is null\n*\n* @template {unknown} T - The type of the result of the async function.\n* @template {unknown} E - The type of the error that can be thrown by the async function.\n* @param func - The async function to execute.\n* @returns A Promise that resolves to a tuple containing either [null, result] or [error, null].\n*\n* @example\n* // Successful execution\n* const [error, data] = await attemptAsync(async () => {\n*   const response = await fetch('https://api.example.com/data');\n*   return response.json();\n* });\n* // If successful: [null, { ... data ... }]\n*\n* // Failed execution\n* const [error, data] = await attemptAsync(async () => {\n*   throw new Error('Network error');\n* });\n* // [Error, null]\n*\n* // With type parameter\n* const [error, users] = await attemptAsync<User[]>(async () => {\n*   const response = await fetch('https://api.example.com/users');\n*   return response.json();\n* });\n* // users is typed as User[]\n*/\nasync function attemptAsync(func) {\n\ttry {\n\t\treturn [null, await func()];\n\t} catch (error) {\n\t\treturn [error, null];\n\t}\n}\n//#endregion\nexport { attemptAsync };\n","import { at } from \"./array/at.mjs\";\nimport { cartesianProduct } from \"./array/cartesianProduct.mjs\";\nimport { chunk } from \"./array/chunk.mjs\";\nimport { chunkBy } from \"./array/chunkBy.mjs\";\nimport { combinations } from \"./array/combinations.mjs\";\nimport { compact } from \"./array/compact.mjs\";\nimport { countBy } from \"./array/countBy.mjs\";\nimport { difference } from \"./array/difference.mjs\";\nimport { differenceBy } from \"./array/differenceBy.mjs\";\nimport { differenceWith } from \"./array/differenceWith.mjs\";\nimport { drop } from \"./array/drop.mjs\";\nimport { dropRight } from \"./array/dropRight.mjs\";\nimport { dropRightWhile } from \"./array/dropRightWhile.mjs\";\nimport { dropWhile } from \"./array/dropWhile.mjs\";\nimport { fill } from \"./array/fill.mjs\";\nimport { Semaphore } from \"./promise/semaphore.mjs\";\nimport { limitAsync } from \"./array/limitAsync.mjs\";\nimport { filterAsync } from \"./array/filterAsync.mjs\";\nimport { flatten } from \"./array/flatten.mjs\";\nimport { flatMap } from \"./array/flatMap.mjs\";\nimport { flatMapAsync } from \"./array/flatMapAsync.mjs\";\nimport { flattenDeep } from \"./array/flattenDeep.mjs\";\nimport { flatMapDeep } from \"./array/flatMapDeep.mjs\";\nimport { forEachAsync } from \"./array/forEachAsync.mjs\";\nimport { forEachRight } from \"./array/forEachRight.mjs\";\nimport { groupBy } from \"./array/groupBy.mjs\";\nimport { head } from \"./array/head.mjs\";\nimport { initial } from \"./array/initial.mjs\";\nimport { intersection } from \"./array/intersection.mjs\";\nimport { intersectionBy } from \"./array/intersectionBy.mjs\";\nimport { intersectionWith } from \"./array/intersectionWith.mjs\";\nimport { isSubset } from \"./array/isSubset.mjs\";\nimport { isSubsetWith } from \"./array/isSubsetWith.mjs\";\nimport { keyBy } from \"./array/keyBy.mjs\";\nimport { last } from \"./array/last.mjs\";\nimport { mapAsync } from \"./array/mapAsync.mjs\";\nimport { maxBy } from \"./array/maxBy.mjs\";\nimport { minBy } from \"./array/minBy.mjs\";\nimport { orderBy } from \"./array/orderBy.mjs\";\nimport { partition } from \"./array/partition.mjs\";\nimport { pull } from \"./array/pull.mjs\";\nimport { pullAt } from \"./array/pullAt.mjs\";\nimport { reduceAsync } from \"./array/reduceAsync.mjs\";\nimport { remove } from \"./array/remove.mjs\";\nimport { sample } from \"./array/sample.mjs\";\nimport { random } from \"./math/random.mjs\";\nimport { randomInt } from \"./math/randomInt.mjs\";\nimport { sampleSize } from \"./array/sampleSize.mjs\";\nimport { shuffle } from \"./array/shuffle.mjs\";\nimport { sortBy } from \"./array/sortBy.mjs\";\nimport { tail } from \"./array/tail.mjs\";\nimport { take } from \"./array/take.mjs\";\nimport { takeRight } from \"./array/takeRight.mjs\";\nimport { takeRightWhile } from \"./array/takeRightWhile.mjs\";\nimport { takeWhile } from \"./array/takeWhile.mjs\";\nimport { toFilled } from \"./array/toFilled.mjs\";\nimport { uniq } from \"./array/uniq.mjs\";\nimport { union } from \"./array/union.mjs\";\nimport { uniqBy } from \"./array/uniqBy.mjs\";\nimport { unionBy } from \"./array/unionBy.mjs\";\nimport { uniqWith } from \"./array/uniqWith.mjs\";\nimport { unionWith } from \"./array/unionWith.mjs\";\nimport { unzip } from \"./array/unzip.mjs\";\nimport { unzipWith } from \"./array/unzipWith.mjs\";\nimport { windowed } from \"./array/windowed.mjs\";\nimport { without } from \"./array/without.mjs\";\nimport { xor } from \"./array/xor.mjs\";\nimport { xorBy } from \"./array/xorBy.mjs\";\nimport { xorWith } from \"./array/xorWith.mjs\";\nimport { zip } from \"./array/zip.mjs\";\nimport { zipObject } from \"./array/zipObject.mjs\";\nimport { zipWith } from \"./array/zipWith.mjs\";\nimport \"./array/index.mjs\";\nimport { AbortError } from \"./error/AbortError.mjs\";\nimport { TimeoutError } from \"./error/TimeoutError.mjs\";\nimport \"./error/index.mjs\";\nimport { after } from \"./function/after.mjs\";\nimport { ary } from \"./function/ary.mjs\";\nimport { asyncNoop } from \"./function/asyncNoop.mjs\";\nimport { before } from \"./function/before.mjs\";\nimport { curry } from \"./function/curry.mjs\";\nimport { curryRight } from \"./function/curryRight.mjs\";\nimport { debounce } from \"./function/debounce.mjs\";\nimport { flow } from \"./function/flow.mjs\";\nimport { flowRight } from \"./function/flowRight.mjs\";\nimport { identity } from \"./function/identity.mjs\";\nimport { memoize } from \"./function/memoize.mjs\";\nimport { negate } from \"./function/negate.mjs\";\nimport { noop } from \"./function/noop.mjs\";\nimport { once } from \"./function/once.mjs\";\nimport { partial } from \"./function/partial.mjs\";\nimport { partialRight } from \"./function/partialRight.mjs\";\nimport { rest } from \"./function/rest.mjs\";\nimport { delay } from \"./promise/delay.mjs\";\nimport { retry } from \"./function/retry.mjs\";\nimport { spread } from \"./function/spread.mjs\";\nimport { throttle } from \"./function/throttle.mjs\";\nimport { unary } from \"./function/unary.mjs\";\nimport \"./function/index.mjs\";\nimport { clamp } from \"./math/clamp.mjs\";\nimport { inRange } from \"./math/inRange.mjs\";\nimport { sum } from \"./math/sum.mjs\";\nimport { mean } from \"./math/mean.mjs\";\nimport { sumBy } from \"./math/sumBy.mjs\";\nimport { meanBy } from \"./math/meanBy.mjs\";\nimport { median } from \"./math/median.mjs\";\nimport { medianBy } from \"./math/medianBy.mjs\";\nimport { percentile } from \"./math/percentile.mjs\";\nimport { range } from \"./math/range.mjs\";\nimport { rangeRight } from \"./math/rangeRight.mjs\";\nimport { round } from \"./math/round.mjs\";\nimport \"./math/index.mjs\";\nimport { isPrimitive } from \"./predicate/isPrimitive.mjs\";\nimport { isTypedArray } from \"./predicate/isTypedArray.mjs\";\nimport { clone } from \"./object/clone.mjs\";\nimport { isBuffer } from \"./predicate/isBuffer.mjs\";\nimport { cloneDeepWith } from \"./object/cloneDeepWith.mjs\";\nimport { cloneDeep } from \"./object/cloneDeep.mjs\";\nimport { findKey } from \"./object/findKey.mjs\";\nimport { isPlainObject } from \"./predicate/isPlainObject.mjs\";\nimport { flattenObject } from \"./object/flattenObject.mjs\";\nimport { invert } from \"./object/invert.mjs\";\nimport { mapKeys } from \"./object/mapKeys.mjs\";\nimport { mapValues } from \"./object/mapValues.mjs\";\nimport { merge } from \"./object/merge.mjs\";\nimport { mergeWith } from \"./object/mergeWith.mjs\";\nimport { omit } from \"./object/omit.mjs\";\nimport { omitBy } from \"./object/omitBy.mjs\";\nimport { pick } from \"./object/pick.mjs\";\nimport { pickBy } from \"./object/pickBy.mjs\";\nimport { sortKeys } from \"./object/sortKeys.mjs\";\nimport { capitalize } from \"./string/capitalize.mjs\";\nimport { words } from \"./string/words.mjs\";\nimport { camelCase } from \"./string/camelCase.mjs\";\nimport { toCamelCaseKeys } from \"./object/toCamelCaseKeys.mjs\";\nimport { toMerged } from \"./object/toMerged.mjs\";\nimport { snakeCase } from \"./string/snakeCase.mjs\";\nimport { toSnakeCaseKeys } from \"./object/toSnakeCaseKeys.mjs\";\nimport \"./object/index.mjs\";\nimport { isArrayBuffer } from \"./predicate/isArrayBuffer.mjs\";\nimport { isBlob } from \"./predicate/isBlob.mjs\";\nimport { isBoolean } from \"./predicate/isBoolean.mjs\";\nimport { isBrowser } from \"./predicate/isBrowser.mjs\";\nimport { isDate } from \"./predicate/isDate.mjs\";\nimport { isEmptyObject } from \"./predicate/isEmptyObject.mjs\";\nimport { isEqualWith } from \"./predicate/isEqualWith.mjs\";\nimport { isEqual } from \"./predicate/isEqual.mjs\";\nimport { isError } from \"./predicate/isError.mjs\";\nimport { isFile } from \"./predicate/isFile.mjs\";\nimport { isFunction } from \"./predicate/isFunction.mjs\";\nimport { isIterable } from \"./predicate/isIterable.mjs\";\nimport { isJSON } from \"./predicate/isJSON.mjs\";\nimport { isJSONArray, isJSONObject, isJSONValue } from \"./predicate/isJSONValue.mjs\";\nimport { isLength } from \"./predicate/isLength.mjs\";\nimport { isMap } from \"./predicate/isMap.mjs\";\nimport { isNil } from \"./predicate/isNil.mjs\";\nimport { isNode } from \"./predicate/isNode.mjs\";\nimport { isNotNil } from \"./predicate/isNotNil.mjs\";\nimport { isNull } from \"./predicate/isNull.mjs\";\nimport { isNumber } from \"./predicate/isNumber.mjs\";\nimport { isPromise } from \"./predicate/isPromise.mjs\";\nimport { isRegExp } from \"./predicate/isRegExp.mjs\";\nimport { isSet } from \"./predicate/isSet.mjs\";\nimport { isString } from \"./predicate/isString.mjs\";\nimport { isSymbol } from \"./predicate/isSymbol.mjs\";\nimport { isUndefined } from \"./predicate/isUndefined.mjs\";\nimport { isWeakMap } from \"./predicate/isWeakMap.mjs\";\nimport { isWeakSet } from \"./predicate/isWeakSet.mjs\";\nimport \"./predicate/index.mjs\";\nimport { allKeyed } from \"./promise/allKeyed.mjs\";\nimport { Mutex } from \"./promise/mutex.mjs\";\nimport { timeout } from \"./promise/timeout.mjs\";\nimport { withTimeout } from \"./promise/withTimeout.mjs\";\nimport \"./promise/index.mjs\";\nimport { constantCase } from \"./string/constantCase.mjs\";\nimport { deburr } from \"./string/deburr.mjs\";\nimport { escape } from \"./string/escape.mjs\";\nimport { escapeRegExp } from \"./string/escapeRegExp.mjs\";\nimport { kebabCase } from \"./string/kebabCase.mjs\";\nimport { lowerCase } from \"./string/lowerCase.mjs\";\nimport { lowerFirst } from \"./string/lowerFirst.mjs\";\nimport { pad } from \"./string/pad.mjs\";\nimport { pascalCase } from \"./string/pascalCase.mjs\";\nimport { reverseString } from \"./string/reverseString.mjs\";\nimport { startCase } from \"./string/startCase.mjs\";\nimport { trimEnd } from \"./string/trimEnd.mjs\";\nimport { trimStart } from \"./string/trimStart.mjs\";\nimport { trim } from \"./string/trim.mjs\";\nimport { unescape } from \"./string/unescape.mjs\";\nimport { upperCase } from \"./string/upperCase.mjs\";\nimport { upperFirst } from \"./string/upperFirst.mjs\";\nimport \"./string/index.mjs\";\nimport { attempt } from \"./util/attempt.mjs\";\nimport { attemptAsync } from \"./util/attemptAsync.mjs\";\nimport { invariant } from \"./util/invariant.mjs\";\nimport \"./util/index.mjs\";\nexport { AbortError, Mutex, Semaphore, TimeoutError, after, allKeyed, ary, invariant as assert, asyncNoop, at, attempt, attemptAsync, before, camelCase, capitalize, cartesianProduct, chunk, chunkBy, clamp, clone, cloneDeep, cloneDeepWith, combinations, compact, constantCase, countBy, curry, curryRight, debounce, deburr, delay, difference, differenceBy, differenceWith, drop, dropRight, dropRightWhile, dropWhile, escape, escapeRegExp, fill, filterAsync, findKey, flatMap, flatMapAsync, flatMapDeep, flatten, flattenDeep, flattenObject, flow, flowRight, forEachAsync, forEachRight, groupBy, head, identity, inRange, initial, intersection, intersectionBy, intersectionWith, invariant, invert, isArrayBuffer, isBlob, isBoolean, isBrowser, isBuffer, isDate, isEmptyObject, isEqual, isEqualWith, isError, isFile, isFunction, isIterable, isJSON, isJSONArray, isJSONObject, isJSONValue, isLength, isMap, isNil, isNode, isNotNil, isNull, isNumber, isPlainObject, isPrimitive, isPromise, isRegExp, isSet, isString, isSubset, isSubsetWith, isSymbol, isTypedArray, isUndefined, isWeakMap, isWeakSet, kebabCase, keyBy, last, limitAsync, lowerCase, lowerFirst, mapAsync, mapKeys, mapValues, maxBy, mean, meanBy, median, medianBy, memoize, merge, mergeWith, minBy, negate, noop, omit, omitBy, once, orderBy, pad, partial, partialRight, partition, pascalCase, percentile, pick, pickBy, pull, pullAt, random, randomInt, range, rangeRight, reduceAsync, remove, rest, retry, reverseString, round, sample, sampleSize, shuffle, snakeCase, sortBy, sortKeys, spread, startCase, sum, sumBy, tail, take, takeRight, takeRightWhile, takeWhile, throttle, timeout, toCamelCaseKeys, toFilled, toMerged, toSnakeCaseKeys, trim, trimEnd, trimStart, unary, unescape, union, unionBy, unionWith, uniq, uniqBy, uniqWith, unzip, unzipWith, upperCase, upperFirst, windowed, withTimeout, without, words, xor, xorBy, xorWith, zip, zipObject, zipWith };\n","import { n as ok, r as toError, t as err } from \"./result-D_NYcfr2.js\";\nimport { P, match } from \"ts-pattern\";\nexport * from \"es-toolkit\";\nexport { P, err, match, ok, toError };\n","import { dirname, join, resolve } from \"node:path\";\nimport { attempt } from \"@kidd-cli/utils/fp\";\nimport { existsSync } from \"node:fs\";\nimport { homedir } from \"node:os\";\nimport { match as match$1 } from \"ts-pattern\";\n//#region src/lib/project/root.ts\n/**\n* Walk up the directory tree to find the nearest git project root.\n*\n* Stops at the first directory containing a `.git` entry (either a `.git`\n* directory in a normal clone, or a `.git` file in a worktree or submodule).\n*\n* @param startDir - Directory to start searching from (defaults to cwd).\n* @returns The absolute path of the project root, or null if none is found.\n*/\nfunction findProjectRoot(startDir = process.cwd()) {\n\tconst findRootRecursive = (currentDir, visited) => {\n\t\tif (visited.has(currentDir)) return null;\n\t\tconst nextVisited = new Set([...visited, currentDir]);\n\t\tconst gitPath = join(currentDir, \".git\");\n\t\tconst [, exists] = attempt(() => existsSync(gitPath));\n\t\tif (exists) return currentDir;\n\t\tconst parent = dirname(currentDir);\n\t\tif (parent === currentDir) return null;\n\t\treturn findRootRecursive(parent, nextVisited);\n\t};\n\treturn findRootRecursive(resolve(startDir), /* @__PURE__ */ new Set());\n}\n//#endregion\n//#region src/lib/project/paths.ts\n/**\n* Resolve a directory path relative to the project root.\n*\n* @param options - Options containing the directory name and optional start directory.\n* @returns The resolved local path, or null if no project root is found.\n*/\nfunction resolveLocalPath(options) {\n\tconst projectRoot = findProjectRoot(options.startDir);\n\tif (!projectRoot) return null;\n\treturn join(projectRoot, options.dirName);\n}\n/**\n* Resolve a directory path relative to the user's home directory.\n*\n* @param options - Options containing the directory name.\n* @returns The resolved global path.\n*/\nfunction resolveGlobalPath(options) {\n\treturn join(homedir(), options.dirName);\n}\n/**\n* Resolve a directory path using the specified source strategy.\n*\n* When source is 'local', resolves relative to the project root.\n* When source is 'global', resolves relative to the home directory.\n* When source is 'resolve' (default), tries local first, falling back to global.\n*\n* @param options - Resolution options with dirName, source, and startDir.\n* @returns The resolved path, or null if local resolution fails with source='local'.\n*/\nfunction resolvePath(options) {\n\tconst { dirName, source = \"resolve\", startDir } = options;\n\treturn match$1(source).with(\"local\", () => resolveLocalPath({\n\t\tdirName,\n\t\tstartDir\n\t})).with(\"global\", () => resolveGlobalPath({ dirName })).with(\"resolve\", () => {\n\t\tconst localPath = resolveLocalPath({\n\t\t\tdirName,\n\t\t\tstartDir\n\t\t});\n\t\tif (localPath) return localPath;\n\t\treturn resolveGlobalPath({ dirName });\n\t}).exhaustive();\n}\n//#endregion\nexport { findProjectRoot as i, resolveLocalPath as n, resolvePath as r, resolveGlobalPath as t };\n\n//# sourceMappingURL=paths-Clz-xMIL.js.map","let p = process || {}, argv = p.argv || [], env = p.env || {}\nlet isColorSupported =\n\t!(!!env.NO_COLOR || argv.includes(\"--no-color\")) &&\n\t(!!env.FORCE_COLOR || argv.includes(\"--color\") || p.platform === \"win32\" || ((p.stdout || {}).isTTY && env.TERM !== \"dumb\") || !!env.CI)\n\nlet formatter = (open, close, replace = open) =>\n\tinput => {\n\t\tlet string = \"\" + input, index = string.indexOf(close, open.length)\n\t\treturn ~index ? open + replaceClose(string, close, replace, index) + close : open + string + close\n\t}\n\nlet replaceClose = (string, close, replace, index) => {\n\tlet result = \"\", cursor = 0\n\tdo {\n\t\tresult += string.substring(cursor, index) + replace\n\t\tcursor = index + close.length\n\t\tindex = string.indexOf(close, cursor)\n\t} while (~index)\n\treturn result + string.substring(cursor)\n}\n\nlet createColors = (enabled = isColorSupported) => {\n\tlet f = enabled ? formatter : () => String\n\treturn {\n\t\tisColorSupported: enabled,\n\t\treset: f(\"\\x1b[0m\", \"\\x1b[0m\"),\n\t\tbold: f(\"\\x1b[1m\", \"\\x1b[22m\", \"\\x1b[22m\\x1b[1m\"),\n\t\tdim: f(\"\\x1b[2m\", \"\\x1b[22m\", \"\\x1b[22m\\x1b[2m\"),\n\t\titalic: f(\"\\x1b[3m\", \"\\x1b[23m\"),\n\t\tunderline: f(\"\\x1b[4m\", \"\\x1b[24m\"),\n\t\tinverse: f(\"\\x1b[7m\", \"\\x1b[27m\"),\n\t\thidden: f(\"\\x1b[8m\", \"\\x1b[28m\"),\n\t\tstrikethrough: f(\"\\x1b[9m\", \"\\x1b[29m\"),\n\n\t\tblack: f(\"\\x1b[30m\", \"\\x1b[39m\"),\n\t\tred: f(\"\\x1b[31m\", \"\\x1b[39m\"),\n\t\tgreen: f(\"\\x1b[32m\", \"\\x1b[39m\"),\n\t\tyellow: f(\"\\x1b[33m\", \"\\x1b[39m\"),\n\t\tblue: f(\"\\x1b[34m\", \"\\x1b[39m\"),\n\t\tmagenta: f(\"\\x1b[35m\", \"\\x1b[39m\"),\n\t\tcyan: f(\"\\x1b[36m\", \"\\x1b[39m\"),\n\t\twhite: f(\"\\x1b[37m\", \"\\x1b[39m\"),\n\t\tgray: f(\"\\x1b[90m\", \"\\x1b[39m\"),\n\n\t\tbgBlack: f(\"\\x1b[40m\", \"\\x1b[49m\"),\n\t\tbgRed: f(\"\\x1b[41m\", \"\\x1b[49m\"),\n\t\tbgGreen: f(\"\\x1b[42m\", \"\\x1b[49m\"),\n\t\tbgYellow: f(\"\\x1b[43m\", \"\\x1b[49m\"),\n\t\tbgBlue: f(\"\\x1b[44m\", \"\\x1b[49m\"),\n\t\tbgMagenta: f(\"\\x1b[45m\", \"\\x1b[49m\"),\n\t\tbgCyan: f(\"\\x1b[46m\", \"\\x1b[49m\"),\n\t\tbgWhite: f(\"\\x1b[47m\", \"\\x1b[49m\"),\n\n\t\tblackBright: f(\"\\x1b[90m\", \"\\x1b[39m\"),\n\t\tredBright: f(\"\\x1b[91m\", \"\\x1b[39m\"),\n\t\tgreenBright: f(\"\\x1b[92m\", \"\\x1b[39m\"),\n\t\tyellowBright: f(\"\\x1b[93m\", \"\\x1b[39m\"),\n\t\tblueBright: f(\"\\x1b[94m\", \"\\x1b[39m\"),\n\t\tmagentaBright: f(\"\\x1b[95m\", \"\\x1b[39m\"),\n\t\tcyanBright: f(\"\\x1b[96m\", \"\\x1b[39m\"),\n\t\twhiteBright: f(\"\\x1b[97m\", \"\\x1b[39m\"),\n\n\t\tbgBlackBright: f(\"\\x1b[100m\", \"\\x1b[49m\"),\n\t\tbgRedBright: f(\"\\x1b[101m\", \"\\x1b[49m\"),\n\t\tbgGreenBright: f(\"\\x1b[102m\", \"\\x1b[49m\"),\n\t\tbgYellowBright: f(\"\\x1b[103m\", \"\\x1b[49m\"),\n\t\tbgBlueBright: f(\"\\x1b[104m\", \"\\x1b[49m\"),\n\t\tbgMagentaBright: f(\"\\x1b[105m\", \"\\x1b[49m\"),\n\t\tbgCyanBright: f(\"\\x1b[106m\", \"\\x1b[49m\"),\n\t\tbgWhiteBright: f(\"\\x1b[107m\", \"\\x1b[49m\"),\n\t}\n}\n\nmodule.exports = createColors()\nmodule.exports.createColors = createColors\n","import { n as ok, t as err } from \"./result-D_NYcfr2.js\";\nimport { attempt } from \"es-toolkit\";\n//#region src/json.ts\nconst JSON_INDENT = 2;\n/**\n* Parse a JSON string into an unknown value, returning a {@link Result} instead of throwing.\n*\n* @param raw - The JSON string to parse.\n* @returns A Result tuple with the parsed value or an error message.\n*/\nfunction jsonParse(raw) {\n\tconst [error, value] = attempt(() => JSON.parse(raw));\n\tif (error) return err(`Failed to parse JSON: ${error.message}`);\n\treturn ok(value);\n}\n/**\n* Serialize a value to a JSON string, returning a {@link Result} instead of throwing.\n*\n* @param data - The value to serialize.\n* @param options - Serialization options.\n* @returns A Result tuple with the JSON string or an error message.\n*/\nfunction jsonStringify(data, options = {}) {\n\tconst { pretty = false } = options;\n\tconst [error, value] = attempt(() => {\n\t\tif (pretty) return JSON.stringify(data, null, JSON_INDENT);\n\t\treturn JSON.stringify(data);\n\t});\n\tif (error) return err(`Failed to stringify JSON: ${error.message}`);\n\treturn ok(value);\n}\n//#endregion\nexport { jsonParse, jsonStringify };\n\n//# sourceMappingURL=json.js.map","//#region src/tag.ts\n/**\n* Property key used to brand objects with a tag string.\n*\n* Defined via `Object.defineProperty` as non-enumerable, non-writable, and\n* non-configurable, so it does not appear in `Object.keys`, `JSON.stringify`,\n* `for...in`, or spread.\n*/\nconst TAG = \"__tag\";\n/**\n* Create a shallow copy of `obj` with a non-enumerable {@link TAG} property.\n*\n* The original object is not mutated. The tag is defined as non-enumerable,\n* non-writable, and non-configurable via `Object.defineProperty`.\n*\n* @param obj - The source object to copy and tag.\n* @param tag - The tag string to brand the copy with.\n* @returns A new object with all own enumerable properties of `obj` plus the hidden tag.\n*/\nfunction withTag(obj, tag) {\n\tconst copy = { ...obj };\n\tObject.defineProperty(copy, TAG, {\n\t\tconfigurable: false,\n\t\tenumerable: false,\n\t\tvalue: tag,\n\t\twritable: false\n\t});\n\treturn copy;\n}\n/**\n* Type guard that checks whether `value` carries the given tag.\n*\n* @param value - The value to inspect.\n* @param tag - The expected tag string.\n* @returns `true` when `value` is a non-null object whose `[TAG]` equals `tag`.\n*/\nfunction hasTag(value, tag) {\n\tif (typeof value !== \"object\" || value === null) return false;\n\treturn value[TAG] === tag;\n}\n/**\n* Read the tag from a value, if present.\n*\n* @param value - The value to inspect.\n* @returns The tag string, or `undefined` when the value is untagged.\n*/\nfunction getTag(value) {\n\tif (typeof value !== \"object\" || value === null) return;\n\tconst tag = value[TAG];\n\tif (typeof tag === \"string\") return tag;\n}\n//#endregion\nexport { TAG, getTag, hasTag, withTag };\n\n//# sourceMappingURL=tag.js.map","import { n as resolveLocalPath, t as resolveGlobalPath } from \"./paths-Clz-xMIL.js\";\nimport { resolve, sep } from \"node:path\";\nimport * as clack from \"@clack/prompts\";\nimport { attempt } from \"@kidd-cli/utils/fp\";\nimport { existsSync, lstatSync, mkdirSync, readFileSync, unlinkSync, writeFileSync } from \"node:fs\";\nimport pc from \"picocolors\";\nimport { jsonParse, jsonStringify } from \"@kidd-cli/utils/json\";\nimport { TAG, hasTag, withTag } from \"@kidd-cli/utils/tag\";\n//#region src/lib/dotdir/create-dot-directory-client.ts\n/**\n* Create a scoped {@link DotDirectoryClient} for a single resolved directory.\n*\n* All filesystem operations are synchronous (consistent with {@link FileStore}).\n* Protected files are checked against the shared {@link ProtectionRegistry}.\n* Filenames are validated to prevent path traversal outside the scoped directory.\n*\n* @param options - Directory path, location scope, and protection registry.\n* @returns A frozen DotDirectoryClient instance.\n*/\nfunction createDotDirectoryClient(options) {\n\tconst { dir, location, registry } = options;\n\tconst resolvedDir = resolve(dir);\n\t/**\n\t* Resolve a filename and validate it stays within the scoped directory.\n\t*\n\t* @private\n\t* @param filename - The filename to resolve.\n\t* @returns A Result with the resolved path on success, or a path_traversal error.\n\t*/\n\tfunction safePath(filename) {\n\t\tconst resolved = resolve(resolvedDir, filename);\n\t\tif (!resolved.startsWith(resolvedDir + sep) && resolved !== resolvedDir) return [{\n\t\t\tmessage: `Path \"${filename}\" escapes the dot directory boundary.`,\n\t\t\ttype: \"path_traversal\"\n\t\t}, null];\n\t\tconst [, stat] = attempt(() => lstatSync(resolved));\n\t\tif (stat && stat.isSymbolicLink()) return [{\n\t\t\tmessage: `Path \"${filename}\" is a symbolic link, which is not allowed.`,\n\t\t\ttype: \"path_traversal\"\n\t\t}, null];\n\t\treturn [null, resolved];\n\t}\n\t/**\n\t* Check whether a file is protected and access was not explicitly opted-in.\n\t*\n\t* @private\n\t* @param filename - The filename to check.\n\t* @param accessOptions - Access options that may include the bypass flag.\n\t* @returns A DotDirectoryError if the file is protected, or null.\n\t*/\n\tfunction checkProtection(filename, accessOptions) {\n\t\tif (accessOptions !== void 0 && accessOptions.dangerouslyAccessProtectedFile === true) return null;\n\t\tif (registry.has(location, filename)) return {\n\t\t\tmessage: `File \"${filename}\" is protected in ${location} scope. Pass { dangerouslyAccessProtectedFile: true } to access it.`,\n\t\t\ttype: \"protected_file\"\n\t\t};\n\t\treturn null;\n\t}\n\t/**\n\t* Ensure the directory exists, creating it with mode 0o700 if needed.\n\t*\n\t* @private\n\t* @returns A Result with the directory path on success.\n\t*/\n\tfunction ensure() {\n\t\tconst [error] = attempt(() => {\n\t\t\tmkdirSync(resolvedDir, {\n\t\t\t\tmode: 448,\n\t\t\t\trecursive: true\n\t\t\t});\n\t\t});\n\t\tif (error) return [{\n\t\t\tmessage: `Failed to create directory \"${resolvedDir}\": ${error.message}`,\n\t\t\ttype: \"fs_error\"\n\t\t}, null];\n\t\treturn [null, resolvedDir];\n\t}\n\t/**\n\t* Read a file as a raw string.\n\t*\n\t* @private\n\t* @param filename - The filename to read.\n\t* @param accessOptions - Access options.\n\t* @returns A Result with the file content on success.\n\t*/\n\tfunction read(filename, accessOptions) {\n\t\tconst protectionError = checkProtection(filename, accessOptions);\n\t\tif (protectionError) return [protectionError, null];\n\t\tconst [pathError, filePath] = safePath(filename);\n\t\tif (pathError) return [pathError, null];\n\t\tconst [error, content] = attempt(() => readFileSync(filePath, \"utf8\"));\n\t\tif (error) return [{\n\t\t\tmessage: `Failed to read \"${filePath}\": ${error.message}`,\n\t\t\ttype: \"fs_error\"\n\t\t}, null];\n\t\treturn [null, content];\n\t}\n\t/**\n\t* Write a raw string to a file (mode 0o600). Creates the directory if needed.\n\t*\n\t* @private\n\t* @param filename - The filename to write.\n\t* @param content - The string content.\n\t* @param writeOptions - Write options.\n\t* @returns A Result with the written file path on success.\n\t*/\n\tfunction write(filename, content, writeOptions) {\n\t\tconst protectionError = checkProtection(filename, writeOptions);\n\t\tif (protectionError) return [protectionError, null];\n\t\tconst [pathError, filePath] = safePath(filename);\n\t\tif (pathError) return [pathError, null];\n\t\tconst [ensureError] = ensure();\n\t\tif (ensureError) return [ensureError, null];\n\t\tconst [error] = attempt(() => {\n\t\t\twriteFileSync(filePath, content, {\n\t\t\t\tencoding: \"utf8\",\n\t\t\t\tmode: 384\n\t\t\t});\n\t\t});\n\t\tif (error) return [{\n\t\t\tmessage: `Failed to write \"${filePath}\": ${error.message}`,\n\t\t\ttype: \"fs_error\"\n\t\t}, null];\n\t\treturn [null, filePath];\n\t}\n\t/**\n\t* Read and parse a JSON file, optionally validating with a Zod schema.\n\t*\n\t* @private\n\t* @param filename - The filename to read.\n\t* @param readOptions - Read options with optional schema.\n\t* @returns A Result with the parsed (and optionally validated) data.\n\t*/\n\tfunction readJson(filename, readOptions) {\n\t\tconst [readError, content] = read(filename, readOptions);\n\t\tif (readError) return [readError, null];\n\t\tconst [parseError, parsed] = jsonParse(content);\n\t\tif (parseError) return [{\n\t\t\tmessage: `Failed to parse \"${filename}\": ${parseError.message}`,\n\t\t\ttype: \"parse_error\"\n\t\t}, null];\n\t\tif (readOptions !== void 0 && readOptions.schema !== void 0) {\n\t\t\tconst result = readOptions.schema.safeParse(parsed);\n\t\t\tif (!result.success) return [{\n\t\t\t\tmessage: `Validation failed for \"${filename}\": ${result.error.message}`,\n\t\t\t\ttype: \"parse_error\"\n\t\t\t}, null];\n\t\t\treturn [null, result.data];\n\t\t}\n\t\treturn [null, parsed];\n\t}\n\t/**\n\t* Serialize data to JSON and write it to a file.\n\t*\n\t* @private\n\t* @param filename - The filename to write.\n\t* @param data - The data to serialize.\n\t* @param writeOptions - Write options.\n\t* @returns A Result with the written file path on success.\n\t*/\n\tfunction writeJson(filename, data, writeOptions) {\n\t\tconst [stringifyError, json] = jsonStringify(data, { pretty: true });\n\t\tif (stringifyError) return [{\n\t\t\tmessage: `Failed to serialize \"${filename}\": ${stringifyError.message}`,\n\t\t\ttype: \"parse_error\"\n\t\t}, null];\n\t\treturn write(filename, json, writeOptions);\n\t}\n\t/**\n\t* Check whether a file exists in the directory.\n\t*\n\t* @private\n\t* @param filename - The filename to check.\n\t* @returns True if the file exists and the path is within the directory boundary.\n\t*/\n\tfunction fileExists(filename) {\n\t\tconst [pathError, filePath] = safePath(filename);\n\t\tif (pathError) return false;\n\t\treturn existsSync(filePath);\n\t}\n\t/**\n\t* Remove a file from the directory. Idempotent — succeeds if the file does not exist.\n\t*\n\t* @private\n\t* @param filename - The filename to remove.\n\t* @param accessOptions - Access options.\n\t* @returns A Result with the file path on success.\n\t*/\n\tfunction remove(filename, accessOptions) {\n\t\tconst protectionError = checkProtection(filename, accessOptions);\n\t\tif (protectionError) return [protectionError, null];\n\t\tconst [pathError, filePath] = safePath(filename);\n\t\tif (pathError) return [pathError, null];\n\t\tif (!existsSync(filePath)) return [null, filePath];\n\t\tconst [error] = attempt(() => {\n\t\t\tunlinkSync(filePath);\n\t\t});\n\t\tif (error) return [{\n\t\t\tmessage: `Failed to remove \"${filePath}\": ${error.message}`,\n\t\t\ttype: \"fs_error\"\n\t\t}, null];\n\t\treturn [null, filePath];\n\t}\n\t/**\n\t* Resolve the full absolute path for a filename within the directory.\n\t*\n\t* Validates the filename against path traversal and symlink checks\n\t* via {@link safePath}.\n\t*\n\t* @private\n\t* @param filename - The filename to resolve.\n\t* @returns A Result with the absolute path on success, or a path_traversal error.\n\t*/\n\tfunction resolvePath(filename) {\n\t\treturn safePath(filename);\n\t}\n\treturn Object.freeze({\n\t\tdir: resolvedDir,\n\t\tensure,\n\t\texists: fileExists,\n\t\tpath: resolvePath,\n\t\tread,\n\t\treadJson,\n\t\tremove,\n\t\twrite,\n\t\twriteJson\n\t});\n}\n//#endregion\n//#region src/lib/dotdir/protection.ts\n/**\n* Create a {@link ProtectionRegistry} backed by a `Set<string>`.\n*\n* Keys are serialized as `\"location:filename\"`. The registry is shared\n* by reference across all `DotDirectoryClient` instances from the same `DotDirectory`.\n*\n* @returns A frozen ProtectionRegistry instance.\n*/\nfunction createProtectionRegistry() {\n\tconst entries = /* @__PURE__ */ new Set();\n\treturn Object.freeze({\n\t\tadd(entry) {\n\t\t\tentries.add(toKey(entry.location, entry.filename));\n\t\t},\n\t\thas(location, filename) {\n\t\t\treturn entries.has(toKey(location, filename));\n\t\t}\n\t});\n}\n/**\n* Serialize a location and filename into a registry key.\n*\n* @private\n* @param location - The directory location.\n* @param filename - The filename.\n* @returns A colon-delimited key string.\n*/\nfunction toKey(location, filename) {\n\treturn `${location}:${filename}`;\n}\n//#endregion\n//#region src/lib/dotdir/create-dot-directory.ts\n/**\n* Create a {@link DotDirectory} that returns scoped {@link DotDirectoryClient}\n* handles and manages a shared protection registry.\n*\n* @param options - The resolved directory names from `ctx.meta.dirs`.\n* @returns A frozen DotDirectory instance.\n*/\nfunction createDotDirectory(options) {\n\tconst { dirs } = options;\n\tconst registry = createProtectionRegistry();\n\t/**\n\t* Get a DotDirectoryClient scoped to the global home directory.\n\t*\n\t* @private\n\t* @returns A DotDirectoryClient for the global scope.\n\t*/\n\tfunction global() {\n\t\treturn createDotDirectoryClient({\n\t\t\tdir: resolveGlobalPath({ dirName: dirs.global }),\n\t\t\tlocation: \"global\",\n\t\t\tregistry\n\t\t});\n\t}\n\t/**\n\t* Get a DotDirectoryClient scoped to the project-local directory.\n\t*\n\t* @private\n\t* @returns A Result with a DotDirectoryClient on success, or a no_project_root error.\n\t*/\n\tfunction local() {\n\t\tconst dir = resolveLocalPath({ dirName: dirs.local });\n\t\tif (dir === null) return [{\n\t\t\tmessage: \"No project root found\",\n\t\t\ttype: \"no_project_root\"\n\t\t}, null];\n\t\treturn [null, createDotDirectoryClient({\n\t\t\tdir,\n\t\t\tlocation: \"local\",\n\t\t\tregistry\n\t\t})];\n\t}\n\t/**\n\t* Register a file as protected in the shared registry.\n\t*\n\t* @private\n\t* @param entry - The file entry to protect.\n\t*/\n\tfunction protect(entry) {\n\t\tregistry.add(entry);\n\t}\n\treturn Object.freeze({\n\t\tglobal,\n\t\tlocal,\n\t\tprotect\n\t});\n}\n//#endregion\n//#region src/context/resolve-defaults.ts\n/**\n* Shared empty base object. Returned when no defaults are configured to avoid\n* allocating a new `{}` on every call.\n*/\nconst EMPTY_CLACK_BASE = Object.freeze({});\n/**\n* Map display-config-style defaults (`guide`, `input`, `output`) to clack's\n* expected option names (`withGuide`, `input`, `output`).\n*\n* Returns {@link EMPTY_CLACK_BASE} when `defaults` is undefined so callers\n* can spread without allocating a throwaway object.\n*\n* @param defaults - Per-call defaults from display config, if any.\n* @returns A plain object suitable for spreading into clack calls.\n*/\nfunction resolveClackBase(defaults) {\n\tif (defaults === void 0) return EMPTY_CLACK_BASE;\n\treturn {\n\t\twithGuide: defaults.guide,\n\t\tinput: defaults.input,\n\t\toutput: defaults.output\n\t};\n}\n/**\n* Merge clack base defaults with per-call options, skipping the spread when\n* `opts` is undefined.\n*\n* @param base - The resolved clack base defaults.\n* @param opts - Per-call options from the method caller.\n* @returns The merged options object, or `base` if `opts` is undefined.\n*/\nfunction mergeClackOpts(base, opts) {\n\tif (opts === void 0) return base;\n\treturn {\n\t\t...base,\n\t\t...opts\n\t};\n}\n//#endregion\n//#region src/lib/log.ts\n/**\n* Create a {@link Log} instance that delegates to `@clack/prompts` for\n* structured terminal output.\n*\n* When `defaults` are provided, they are spread as the base of every clack\n* call. Method-level options always take precedence.\n*\n* @param options - Optional configuration for the log instance.\n* @returns A frozen Log object.\n*/\nfunction createLog(options) {\n\tconst output = resolveOutput(options);\n\tconst base = resolveClackBase(options?.defaults);\n\tconst boxBase = resolveBoxBase(base, options?.boxDefaults);\n\treturn Object.freeze({\n\t\terror(message, opts) {\n\t\t\tclack.log.error(message, mergeClackOpts(base, opts));\n\t\t},\n\t\tinfo(message, opts) {\n\t\t\tclack.log.info(message, mergeClackOpts(base, opts));\n\t\t},\n\t\tintro(title) {\n\t\t\tclack.intro(title, base);\n\t\t},\n\t\tmessage(message, opts) {\n\t\t\tclack.log.message(message, mergeClackOpts(base, opts));\n\t\t},\n\t\tnewline() {\n\t\t\toutput.write(\"\\n\");\n\t\t},\n\t\tnote(message, title, opts) {\n\t\t\tclack.note(message, title, mergeClackOpts(base, opts));\n\t\t},\n\t\tbox(message, title, opts) {\n\t\t\tclack.box(message, title, mergeClackOpts(boxBase, opts));\n\t\t},\n\t\toutro(message) {\n\t\t\tclack.outro(message, base);\n\t\t},\n\t\traw(text) {\n\t\t\toutput.write(`${text}\\n`);\n\t\t},\n\t\tstep(message, opts) {\n\t\t\tclack.log.step(message, mergeClackOpts(base, opts));\n\t\t},\n\t\tsuccess(message, opts) {\n\t\t\tclack.log.success(message, mergeClackOpts(base, opts));\n\t\t},\n\t\twarn(message, opts) {\n\t\t\tclack.log.warn(message, mergeClackOpts(base, opts));\n\t\t},\n\t\tstream: createStreamLog()\n\t});\n}\n/**\n* Resolve the output stream from options, defaulting to `process.stderr`.\n*\n* @private\n* @param options - Optional configuration containing an output stream.\n* @returns The resolved writable stream.\n*/\nfunction resolveOutput(options) {\n\tif (options !== void 0 && options.output !== void 0) return options.output;\n\treturn process.stderr;\n}\n/**\n* Resolve the base options for box calls by merging common defaults with box-specific defaults.\n*\n* @private\n* @param base - Common clack defaults (withGuide, output).\n* @param boxDefaults - Box-specific display config defaults.\n* @returns A merged object suitable for spreading into `clack.box()` calls.\n*/\nfunction resolveBoxBase(base, boxDefaults) {\n\tif (boxDefaults === void 0) return base;\n\treturn {\n\t\t...base,\n\t\t...boxDefaults\n\t};\n}\n/**\n* Create the streaming log methods that delegate to `@clack/prompts` stream API.\n*\n* Note: clack's stream methods (except `message`) do not accept per-call options,\n* so display defaults are not passed here.\n*\n* @private\n* @returns A frozen StreamLog object.\n*/\nfunction createStreamLog() {\n\treturn Object.freeze({\n\t\tasync info(iterable) {\n\t\t\tawait clack.stream.info(iterable);\n\t\t},\n\t\tasync success(iterable) {\n\t\t\tawait clack.stream.success(iterable);\n\t\t},\n\t\tasync error(iterable) {\n\t\t\tawait clack.stream.error(iterable);\n\t\t},\n\t\tasync warn(iterable) {\n\t\t\tawait clack.stream.warn(iterable);\n\t\t},\n\t\tasync step(iterable) {\n\t\t\tawait clack.stream.step(iterable);\n\t\t},\n\t\tasync message(iterable) {\n\t\t\tawait clack.stream.message(iterable);\n\t\t}\n\t});\n}\n/**\n* Create a ContextError with an exit code and optional error code.\n*\n* Used to surface user-facing CLI errors with clean messages.\n* The error carries a Symbol-based tag for reliable type-narrowing\n* via {@link isContextError}.\n*\n* @param message - Human-readable error message.\n* @param options - Optional error code and exit code overrides.\n* @returns A ContextError instance.\n*/\nfunction createContextError(message, options) {\n\tconst data = createContextErrorData(message, options);\n\tconst error = new Error(data.message);\n\terror.name = \"ContextError\";\n\tObject.defineProperty(error, TAG, {\n\t\tenumerable: false,\n\t\tvalue: \"ContextError\",\n\t\twritable: false\n\t});\n\tObject.defineProperty(error, \"code\", {\n\t\tenumerable: true,\n\t\tvalue: data.code,\n\t\twritable: false\n\t});\n\tObject.defineProperty(error, \"exitCode\", {\n\t\tenumerable: true,\n\t\tvalue: data.exitCode,\n\t\twritable: false\n\t});\n\treturn error;\n}\n/**\n* Type guard that narrows an unknown value to {@link ContextError}.\n*\n* Checks that the value is an Error instance whose `[TAG]` property\n* equals `'ContextError'`, which distinguishes CLI-layer errors from\n* unexpected exceptions.\n*\n* @param error - The value to check.\n* @returns `true` when the value is a ContextError.\n*/\nfunction isContextError(error) {\n\tif (error instanceof Error) return hasTag(error, \"ContextError\");\n\treturn false;\n}\nfunction resolveExitCode(options) {\n\tif (options && options.exitCode !== void 0) return options.exitCode;\n\treturn 1;\n}\nfunction resolveCode(options) {\n\tif (options && options.code !== void 0) return options.code;\n}\nfunction createContextErrorData(message, options) {\n\treturn withTag({\n\t\tcode: resolveCode(options),\n\t\texitCode: resolveExitCode(options),\n\t\tmessage\n\t}, \"ContextError\");\n}\n//#endregion\n//#region src/context/format.ts\n/**\n* Create the pure string formatter methods for a context.\n*\n* @private\n* @returns A Format instance with json and table formatters.\n*/\nfunction createContextFormat() {\n\treturn Object.freeze({\n\t\tjson(data) {\n\t\t\tconst [, json] = jsonStringify(data, { pretty: true });\n\t\t\treturn `${json}\\n`;\n\t\t},\n\t\ttable(rows) {\n\t\t\tif (rows.length === 0) return \"\";\n\t\t\tconst [firstRow] = rows;\n\t\t\tif (!firstRow) return \"\";\n\t\t\treturn formatTable(rows, Object.keys(firstRow));\n\t\t}\n\t});\n}\n/**\n* Format an unknown value as a string for table cell display.\n*\n* @private\n* @param val - The value to format.\n* @returns The stringified value, or empty string for undefined.\n*/\nfunction formatStringValue(val) {\n\tif (val === void 0) return \"\";\n\treturn String(val);\n}\n/**\n* Create a padded header row string from column keys and widths.\n*\n* @private\n* @param options - The keys and column widths.\n* @returns A formatted header string.\n*/\nfunction createTableHeader(options) {\n\tconst { keys, widths } = options;\n\treturn keys.map((key, idx) => {\n\t\tconst width = widths[idx];\n\t\tif (width === void 0) return key;\n\t\treturn key.padEnd(width);\n\t}).join(\"  \");\n}\n/**\n* Create a padded row string from a data record, column keys, and widths.\n*\n* @private\n* @param options - The row data, keys, and column widths.\n* @returns A formatted row string.\n*/\nfunction createTableRow(options) {\n\tconst { row, keys, widths } = options;\n\treturn keys.map((key, idx) => {\n\t\tconst width = widths[idx];\n\t\tconst val = formatStringValue(row[key]);\n\t\tif (width === void 0) return val;\n\t\treturn val.padEnd(width);\n\t}).join(\"  \");\n}\n/**\n* Compute the maximum column width for each key across all rows.\n*\n* @private\n* @param rows - The data rows.\n* @param keys - The column keys.\n* @returns An array of column widths.\n*/\nfunction computeColumnWidths(rows, keys) {\n\treturn keys.map((key) => {\n\t\tconst values = rows.map((row) => formatStringValue(row[key]));\n\t\treturn Math.max(key.length, ...values.map((val) => val.length));\n\t});\n}\n/**\n* Format a table (header, separator, rows) as a string.\n*\n* @private\n* @param rows - The data rows.\n* @param keys - The column keys.\n* @returns The formatted table string.\n*/\nfunction formatTable(rows, keys) {\n\tconst widths = computeColumnWidths(rows, keys);\n\treturn `${[\n\t\tcreateTableHeader({\n\t\t\tkeys,\n\t\t\twidths\n\t\t}),\n\t\twidths.map((width) => \"-\".repeat(width)).join(\"  \"),\n\t\t...rows.map((row) => createTableRow({\n\t\t\tkeys,\n\t\t\trow,\n\t\t\twidths\n\t\t}))\n\t].join(\"\\n\")}\\n`;\n}\n//#endregion\n//#region src/context/prompts.ts\n/**\n* Create the interactive prompt methods for a context.\n*\n* Each method delegates to `@clack/prompts` and unwraps cancel signals\n* into a ContextError so the CLI runner can exit cleanly.\n*\n* When `defaults` are provided, they are spread as the base of every clack\n* call. Method-level options always take precedence.\n*\n* @param options - Optional configuration with per-call defaults.\n* @returns A Prompts instance backed by clack.\n*/\nfunction createContextPrompts(options) {\n\tconst base = resolveClackBase(options?.defaults);\n\treturn {\n\t\tasync confirm(opts) {\n\t\t\treturn unwrapCancelSignal(await clack.confirm({\n\t\t\t\t...base,\n\t\t\t\t...opts\n\t\t\t}));\n\t\t},\n\t\tasync multiselect(opts) {\n\t\t\treturn unwrapCancelSignal(await clack.multiselect({\n\t\t\t\t...base,\n\t\t\t\t...opts\n\t\t\t}));\n\t\t},\n\t\tasync password(opts) {\n\t\t\treturn unwrapCancelSignal(await clack.password({\n\t\t\t\t...base,\n\t\t\t\t...opts\n\t\t\t}));\n\t\t},\n\t\tasync select(opts) {\n\t\t\treturn unwrapCancelSignal(await clack.select({\n\t\t\t\t...base,\n\t\t\t\t...opts\n\t\t\t}));\n\t\t},\n\t\tasync text(opts) {\n\t\t\treturn unwrapCancelSignal(await clack.text({\n\t\t\t\t...base,\n\t\t\t\t...opts\n\t\t\t}));\n\t\t},\n\t\tasync autocomplete(opts) {\n\t\t\treturn unwrapCancelSignal(await clack.autocomplete({\n\t\t\t\t...base,\n\t\t\t\t...opts\n\t\t\t}));\n\t\t},\n\t\tasync autocompleteMultiselect(opts) {\n\t\t\treturn unwrapCancelSignal(await clack.autocompleteMultiselect({\n\t\t\t\t...base,\n\t\t\t\t...opts\n\t\t\t}));\n\t\t},\n\t\tasync groupMultiselect(opts) {\n\t\t\treturn unwrapCancelSignal(await clack.groupMultiselect({\n\t\t\t\t...base,\n\t\t\t\t...opts\n\t\t\t}));\n\t\t},\n\t\tasync selectKey(opts) {\n\t\t\treturn unwrapCancelSignal(await clack.selectKey({\n\t\t\t\t...base,\n\t\t\t\t...opts\n\t\t\t}));\n\t\t},\n\t\tasync path(opts) {\n\t\t\treturn unwrapCancelSignal(await clack.path({\n\t\t\t\t...base,\n\t\t\t\t...opts\n\t\t\t}));\n\t\t},\n\t\tasync group(prompts, opts) {\n\t\t\treturn await clack.group(prompts, { onCancel: opts?.onCancel });\n\t\t}\n\t};\n}\n/**\n* Unwrap a prompt result that may be a cancel symbol.\n*\n* If the user cancelled (Ctrl-C), throws a ContextError. Otherwise returns\n* the typed result value.\n*\n* @private\n* @param result - The raw prompt result (value or cancel symbol).\n* @returns The unwrapped typed value.\n*/\nfunction unwrapCancelSignal(result) {\n\tif (clack.isCancel(result)) {\n\t\tclack.cancel(\"Operation cancelled.\");\n\t\tthrow createContextError(\"Prompt cancelled by user\", {\n\t\t\tcode: \"PROMPT_CANCELLED\",\n\t\t\texitCode: 1\n\t\t});\n\t}\n\treturn result;\n}\n//#endregion\n//#region src/context/status.ts\n/**\n* Create the live status indicator methods for a context.\n*\n* Provides a pre-created spinner, plus factories for progress bars,\n* sequential task runners, and task logs. Each delegates to `@clack/prompts`.\n*\n* When config defaults are provided, they are merged into each clack call.\n* Method-level options always take precedence.\n*\n* @param options - Optional overrides for status sub-components.\n* @returns A frozen Status instance backed by clack.\n*/\nfunction createContextStatus(options) {\n\tconst base = resolveClackBase(options?.defaults);\n\tconst spinner = createDefaultSpinner(base, options?.spinnerConfig ?? {});\n\tconst progressConfig = options?.progressConfig ?? {};\n\treturn Object.freeze({\n\t\tspinner,\n\t\tprogress(opts) {\n\t\t\tconst bar = clack.progress({\n\t\t\t\t...base,\n\t\t\t\t...progressConfig,\n\t\t\t\t...opts\n\t\t\t});\n\t\t\treturn {\n\t\t\t\tstart(message) {\n\t\t\t\t\tbar.start(message);\n\t\t\t\t},\n\t\t\t\tadvance(step, message) {\n\t\t\t\t\tbar.advance(step, message);\n\t\t\t\t},\n\t\t\t\tstop(message) {\n\t\t\t\t\tbar.stop(message);\n\t\t\t\t},\n\t\t\t\tmessage(message) {\n\t\t\t\t\tbar.message(message);\n\t\t\t\t},\n\t\t\t\tcancel(message) {\n\t\t\t\t\tbar.cancel(message);\n\t\t\t\t},\n\t\t\t\terror(message) {\n\t\t\t\t\tbar.error(message);\n\t\t\t\t},\n\t\t\t\tclear() {\n\t\t\t\t\tbar.clear();\n\t\t\t\t},\n\t\t\t\tget isCancelled() {\n\t\t\t\t\treturn bar.isCancelled;\n\t\t\t\t}\n\t\t\t};\n\t\t},\n\t\tasync tasks(tasks) {\n\t\t\tawait clack.tasks(tasks.map((t) => ({\n\t\t\t\ttitle: t.title,\n\t\t\t\ttask: t.task,\n\t\t\t\tenabled: t.enabled\n\t\t\t})), base);\n\t\t},\n\t\ttaskLog(opts) {\n\t\t\tconst tl = clack.taskLog({\n\t\t\t\t...base,\n\t\t\t\t...opts\n\t\t\t});\n\t\t\treturn {\n\t\t\t\tmessage(line, mopts) {\n\t\t\t\t\ttl.message(line, mopts);\n\t\t\t\t},\n\t\t\t\tsuccess(message, copts) {\n\t\t\t\t\ttl.success(message, copts);\n\t\t\t\t},\n\t\t\t\terror(message, copts) {\n\t\t\t\t\ttl.error(message, copts);\n\t\t\t\t},\n\t\t\t\tgroup(name) {\n\t\t\t\t\tconst g = tl.group(name);\n\t\t\t\t\treturn {\n\t\t\t\t\t\tmessage(line, mopts) {\n\t\t\t\t\t\t\tg.message(line, mopts);\n\t\t\t\t\t\t},\n\t\t\t\t\t\tsuccess(message) {\n\t\t\t\t\t\t\tg.success(message);\n\t\t\t\t\t\t},\n\t\t\t\t\t\terror(message) {\n\t\t\t\t\t\t\tg.error(message);\n\t\t\t\t\t\t}\n\t\t\t\t\t};\n\t\t\t\t}\n\t\t\t};\n\t\t}\n\t});\n}\n/**\n* Create the default clack spinner with merged config.\n*\n* @private\n* @param base - Common clack defaults (withGuide, output).\n* @param config - Spinner-specific display config.\n* @returns A Spinner instance.\n*/\nfunction createDefaultSpinner(base, config) {\n\treturn clack.spinner({\n\t\t...base,\n\t\t...config,\n\t\tframes: resolveFrames(config.frames)\n\t});\n}\n/**\n* Convert readonly frames tuple to a mutable array for clack, or undefined if not set.\n*\n* @private\n* @param frames - The readonly frames from display config.\n* @returns A mutable string array or undefined.\n*/\nfunction resolveFrames(frames) {\n\tif (frames === void 0) return;\n\treturn [...frames];\n}\n//#endregion\n//#region src/context/store.ts\n/**\n* Create an in-memory key-value store.\n*\n* @private\n* @returns A Store instance backed by a Map.\n*/\nfunction createMemoryStore() {\n\tconst map = /* @__PURE__ */ new Map();\n\treturn {\n\t\tclear() {\n\t\t\tmap.clear();\n\t\t},\n\t\tdelete(key) {\n\t\t\treturn map.delete(key);\n\t\t},\n\t\tget(key) {\n\t\t\treturn map.get(key);\n\t\t},\n\t\thas(key) {\n\t\t\treturn map.has(key);\n\t\t},\n\t\tset(key, value) {\n\t\t\tmap.set(key, value);\n\t\t}\n\t};\n}\n//#endregion\n//#region src/context/create-context.ts\n/**\n* Create the {@link CommandContext} object threaded through middleware and command handlers.\n*\n* Assembles log, status, format, store, prompts, and meta from\n* the provided options into a single immutable context. Each sub-system is\n* constructed via its own factory so this function remains a lean orchestrator.\n*\n* When `display` is provided, per-call defaults are extracted and passed\n* to each factory. Global-only settings (`aliases`, `messages`) are applied\n* via `updateSettings()` at boot time in `cli()`, not here.\n*\n* @param options - Args, config, and meta for the current invocation.\n* @returns A fully constructed CommandContext.\n*/\nfunction createContext(options) {\n\tconst dc = options.display ?? {};\n\tconst commonDefaults = resolveCommonDefaults(dc);\n\tconst ctxLog = options.log ?? createLog({\n\t\tboxDefaults: dc.box,\n\t\tdefaults: commonDefaults,\n\t\toutput: dc.output\n\t});\n\tconst ctxStatus = resolveStatus(options, dc, commonDefaults);\n\tconst ctxFormat = createContextFormat();\n\tconst ctxStore = createMemoryStore();\n\tconst ctxPrompts = options.prompts ?? createContextPrompts({ defaults: commonDefaults });\n\tconst ctxMeta = {\n\t\tcommand: options.meta.command,\n\t\tdirs: Object.freeze({ ...options.meta.dirs }),\n\t\tname: options.meta.name,\n\t\tversion: options.meta.version\n\t};\n\tconst ctxDotdir = createDotDirectory({ dirs: options.meta.dirs });\n\treturn {\n\t\targs: options.args,\n\t\tcolors: Object.freeze({ ...pc }),\n\t\tdotdir: ctxDotdir,\n\t\tfail(message, failOptions) {\n\t\t\tthrow createContextError(message, failOptions);\n\t\t},\n\t\tformat: ctxFormat,\n\t\tlog: ctxLog,\n\t\tmeta: ctxMeta,\n\t\tprompts: ctxPrompts,\n\t\traw: Object.freeze({ argv: Object.freeze([...options.argv]) }),\n\t\tstatus: ctxStatus,\n\t\tstore: ctxStore\n\t};\n}\n/**\n* Extract the common per-call defaults from display config.\n*\n* @private\n* @param dc - The display config, if any.\n* @returns Common defaults suitable for prompts, log, and status factories.\n*/\nfunction resolveCommonDefaults(dc) {\n\treturn {\n\t\tguide: dc.guide,\n\t\tinput: dc.input,\n\t\toutput: dc.output\n\t};\n}\n/**\n* Resolve the Status instance from options or create a default one.\n*\n* @private\n* @param options - The create context options.\n* @param dc - The resolved display config.\n* @param commonDefaults - Common per-call defaults from display config.\n* @returns A Status instance.\n*/\nfunction resolveStatus(options, dc, commonDefaults) {\n\tif (options.status !== void 0) return options.status;\n\treturn createContextStatus({\n\t\tdefaults: commonDefaults,\n\t\tprogressConfig: dc.progress,\n\t\tspinnerConfig: dc.spinner\n\t});\n}\n//#endregion\nexport { isContextError as n, createLog as r, createContext as t };\n\n//# sourceMappingURL=create-context-BhqTipOB.js.map","'use strict';\nconst align = {\n    right: alignRight,\n    center: alignCenter\n};\nconst top = 0;\nconst right = 1;\nconst bottom = 2;\nconst left = 3;\nexport class UI {\n    constructor(opts) {\n        var _a;\n        this.width = opts.width;\n        this.wrap = (_a = opts.wrap) !== null && _a !== void 0 ? _a : true;\n        this.rows = [];\n    }\n    span(...args) {\n        const cols = this.div(...args);\n        cols.span = true;\n    }\n    resetOutput() {\n        this.rows = [];\n    }\n    div(...args) {\n        if (args.length === 0) {\n            this.div('');\n        }\n        if (this.wrap && this.shouldApplyLayoutDSL(...args) && typeof args[0] === 'string') {\n            return this.applyLayoutDSL(args[0]);\n        }\n        const cols = args.map(arg => {\n            if (typeof arg === 'string') {\n                return this.colFromString(arg);\n            }\n            return arg;\n        });\n        this.rows.push(cols);\n        return cols;\n    }\n    shouldApplyLayoutDSL(...args) {\n        return args.length === 1 && typeof args[0] === 'string' &&\n            /[\\t\\n]/.test(args[0]);\n    }\n    applyLayoutDSL(str) {\n        const rows = str.split('\\n').map(row => row.split('\\t'));\n        let leftColumnWidth = 0;\n        // simple heuristic for layout, make sure the\n        // second column lines up along the left-hand.\n        // don't allow the first column to take up more\n        // than 50% of the screen.\n        rows.forEach(columns => {\n            if (columns.length > 1 && mixin.stringWidth(columns[0]) > leftColumnWidth) {\n                leftColumnWidth = Math.min(Math.floor(this.width * 0.5), mixin.stringWidth(columns[0]));\n            }\n        });\n        // generate a table:\n        //  replacing ' ' with padding calculations.\n        //  using the algorithmically generated width.\n        rows.forEach(columns => {\n            this.div(...columns.map((r, i) => {\n                return {\n                    text: r.trim(),\n                    padding: this.measurePadding(r),\n                    width: (i === 0 && columns.length > 1) ? leftColumnWidth : undefined\n                };\n            }));\n        });\n        return this.rows[this.rows.length - 1];\n    }\n    colFromString(text) {\n        return {\n            text,\n            padding: this.measurePadding(text)\n        };\n    }\n    measurePadding(str) {\n        // measure padding without ansi escape codes\n        const noAnsi = mixin.stripAnsi(str);\n        return [0, noAnsi.match(/\\s*$/)[0].length, 0, noAnsi.match(/^\\s*/)[0].length];\n    }\n    toString() {\n        const lines = [];\n        this.rows.forEach(row => {\n            this.rowToString(row, lines);\n        });\n        // don't display any lines with the\n        // hidden flag set.\n        return lines\n            .filter(line => !line.hidden)\n            .map(line => line.text)\n            .join('\\n');\n    }\n    rowToString(row, lines) {\n        this.rasterize(row).forEach((rrow, r) => {\n            let str = '';\n            rrow.forEach((col, c) => {\n                const { width } = row[c]; // the width with padding.\n                const wrapWidth = this.negatePadding(row[c]); // the width without padding.\n                let ts = col; // temporary string used during alignment/padding.\n                if (wrapWidth > mixin.stringWidth(col)) {\n                    ts += ' '.repeat(wrapWidth - mixin.stringWidth(col));\n                }\n                // align the string within its column.\n                if (row[c].align && row[c].align !== 'left' && this.wrap) {\n                    const fn = align[row[c].align];\n                    ts = fn(ts, wrapWidth);\n                    if (mixin.stringWidth(ts) < wrapWidth) {\n                        ts += ' '.repeat((width || 0) - mixin.stringWidth(ts) - 1);\n                    }\n                }\n                // apply border and padding to string.\n                const padding = row[c].padding || [0, 0, 0, 0];\n                if (padding[left]) {\n                    str += ' '.repeat(padding[left]);\n                }\n                str += addBorder(row[c], ts, '| ');\n                str += ts;\n                str += addBorder(row[c], ts, ' |');\n                if (padding[right]) {\n                    str += ' '.repeat(padding[right]);\n                }\n                // if prior row is span, try to render the\n                // current row on the prior line.\n                if (r === 0 && lines.length > 0) {\n                    str = this.renderInline(str, lines[lines.length - 1]);\n                }\n            });\n            // remove trailing whitespace.\n            lines.push({\n                text: str.replace(/ +$/, ''),\n                span: row.span\n            });\n        });\n        return lines;\n    }\n    // if the full 'source' can render in\n    // the target line, do so.\n    renderInline(source, previousLine) {\n        const match = source.match(/^ */);\n        const leadingWhitespace = match ? match[0].length : 0;\n        const target = previousLine.text;\n        const targetTextWidth = mixin.stringWidth(target.trimRight());\n        if (!previousLine.span) {\n            return source;\n        }\n        // if we're not applying wrapping logic,\n        // just always append to the span.\n        if (!this.wrap) {\n            previousLine.hidden = true;\n            return target + source;\n        }\n        if (leadingWhitespace < targetTextWidth) {\n            return source;\n        }\n        previousLine.hidden = true;\n        return target.trimRight() + ' '.repeat(leadingWhitespace - targetTextWidth) + source.trimLeft();\n    }\n    rasterize(row) {\n        const rrows = [];\n        const widths = this.columnWidths(row);\n        let wrapped;\n        // word wrap all columns, and create\n        // a data-structure that is easy to rasterize.\n        row.forEach((col, c) => {\n            // leave room for left and right padding.\n            col.width = widths[c];\n            if (this.wrap) {\n                wrapped = mixin.wrap(col.text, this.negatePadding(col), { hard: true }).split('\\n');\n            }\n            else {\n                wrapped = col.text.split('\\n');\n            }\n            if (col.border) {\n                wrapped.unshift('.' + '-'.repeat(this.negatePadding(col) + 2) + '.');\n                wrapped.push(\"'\" + '-'.repeat(this.negatePadding(col) + 2) + \"'\");\n            }\n            // add top and bottom padding.\n            if (col.padding) {\n                wrapped.unshift(...new Array(col.padding[top] || 0).fill(''));\n                wrapped.push(...new Array(col.padding[bottom] || 0).fill(''));\n            }\n            wrapped.forEach((str, r) => {\n                if (!rrows[r]) {\n                    rrows.push([]);\n                }\n                const rrow = rrows[r];\n                for (let i = 0; i < c; i++) {\n                    if (rrow[i] === undefined) {\n                        rrow.push('');\n                    }\n                }\n                rrow.push(str);\n            });\n        });\n        return rrows;\n    }\n    negatePadding(col) {\n        let wrapWidth = col.width || 0;\n        if (col.padding) {\n            wrapWidth -= (col.padding[left] || 0) + (col.padding[right] || 0);\n        }\n        if (col.border) {\n            wrapWidth -= 4;\n        }\n        return wrapWidth;\n    }\n    columnWidths(row) {\n        if (!this.wrap) {\n            return row.map(col => {\n                return col.width || mixin.stringWidth(col.text);\n            });\n        }\n        let unset = row.length;\n        let remainingWidth = this.width;\n        // column widths can be set in config.\n        const widths = row.map(col => {\n            if (col.width) {\n                unset--;\n                remainingWidth -= col.width;\n                return col.width;\n            }\n            return undefined;\n        });\n        // any unset widths should be calculated.\n        const unsetWidth = unset ? Math.floor(remainingWidth / unset) : 0;\n        return widths.map((w, i) => {\n            if (w === undefined) {\n                return Math.max(unsetWidth, _minWidth(row[i]));\n            }\n            return w;\n        });\n    }\n}\nfunction addBorder(col, ts, style) {\n    if (col.border) {\n        if (/[.']-+[.']/.test(ts)) {\n            return '';\n        }\n        if (ts.trim().length !== 0) {\n            return style;\n        }\n        return '  ';\n    }\n    return '';\n}\n// calculates the minimum width of\n// a column, based on padding preferences.\nfunction _minWidth(col) {\n    const padding = col.padding || [];\n    const minWidth = 1 + (padding[left] || 0) + (padding[right] || 0);\n    if (col.border) {\n        return minWidth + 4;\n    }\n    return minWidth;\n}\nfunction getWindowWidth() {\n    /* c8 ignore next 5: depends on terminal */\n    if (typeof process === 'object' && process.stdout && process.stdout.columns) {\n        return process.stdout.columns;\n    }\n    return 80;\n}\nfunction alignRight(str, width) {\n    str = str.trim();\n    const strWidth = mixin.stringWidth(str);\n    if (strWidth < width) {\n        return ' '.repeat(width - strWidth) + str;\n    }\n    return str;\n}\nfunction alignCenter(str, width) {\n    str = str.trim();\n    const strWidth = mixin.stringWidth(str);\n    /* c8 ignore next 3 */\n    if (strWidth >= width) {\n        return str;\n    }\n    return ' '.repeat((width - strWidth) >> 1) + str;\n}\nlet mixin;\nexport function cliui(opts, _mixin) {\n    mixin = _mixin;\n    return new UI({\n        width: (opts === null || opts === void 0 ? void 0 : opts.width) || getWindowWidth(),\n        wrap: opts === null || opts === void 0 ? void 0 : opts.wrap\n    });\n}\n","export default function ansiRegex({onlyFirst = false} = {}) {\n\t// Valid string terminator sequences are BEL, ESC\\, and 0x9c\n\tconst ST = '(?:\\\\u0007|\\\\u001B\\\\u005C|\\\\u009C)';\n\n\t// OSC sequences only: ESC ] ... ST (non-greedy until the first ST)\n\tconst osc = `(?:\\\\u001B\\\\][\\\\s\\\\S]*?${ST})`;\n\n\t// CSI and related: ESC/C1, optional intermediates, optional params (supports ; and :) then final byte\n\tconst csi = '[\\\\u001B\\\\u009B][[\\\\]()#;?]*(?:\\\\d{1,4}(?:[;:]\\\\d{0,4})*)?[\\\\dA-PR-TZcf-nq-uy=><~]';\n\n\tconst pattern = `${osc}|${csi}`;\n\n\treturn new RegExp(pattern, onlyFirst ? undefined : 'g');\n}\n","import ansiRegex from 'ansi-regex';\n\nconst regex = ansiRegex();\n\nexport default function stripAnsi(string) {\n\tif (typeof string !== 'string') {\n\t\tthrow new TypeError(`Expected a \\`string\\`, got \\`${typeof string}\\``);\n\t}\n\n\t// Fast path: ANSI codes require ESC (7-bit) or CSI (8-bit) introducer\n\tif (!string.includes('\\u001B') && !string.includes('\\u009B')) {\n\t\treturn string;\n\t}\n\n\t// Even though the regex is global, we don't need to reset the `.lastIndex`\n\t// because unlike `.exec()` and `.test()`, `.replace()` does it automatically\n\t// and doing it manually has a performance penalty.\n\treturn string.replace(regex, '');\n}\n","// Generated by scripts/build.js\n\nexport const ambiguousMinimalCodePoint = 161;\nexport const ambiguousMaximumCodePoint = 1114109;\nexport const ambiguousRanges = [161, 161, 164, 164, 167, 168, 170, 170, 173, 174, 176, 180, 182, 186, 188, 191, 198, 198, 208, 208, 215, 216, 222, 225, 230, 230, 232, 234, 236, 237, 240, 240, 242, 243, 247, 250, 252, 252, 254, 254, 257, 257, 273, 273, 275, 275, 283, 283, 294, 295, 299, 299, 305, 307, 312, 312, 319, 322, 324, 324, 328, 331, 333, 333, 338, 339, 358, 359, 363, 363, 462, 462, 464, 464, 466, 466, 468, 468, 470, 470, 472, 472, 474, 474, 476, 476, 593, 593, 609, 609, 708, 708, 711, 711, 713, 715, 717, 717, 720, 720, 728, 731, 733, 733, 735, 735, 768, 879, 913, 929, 931, 937, 945, 961, 963, 969, 1025, 1025, 1040, 1103, 1105, 1105, 8208, 8208, 8211, 8214, 8216, 8217, 8220, 8221, 8224, 8226, 8228, 8231, 8240, 8240, 8242, 8243, 8245, 8245, 8251, 8251, 8254, 8254, 8308, 8308, 8319, 8319, 8321, 8324, 8364, 8364, 8451, 8451, 8453, 8453, 8457, 8457, 8467, 8467, 8470, 8470, 8481, 8482, 8486, 8486, 8491, 8491, 8531, 8532, 8539, 8542, 8544, 8555, 8560, 8569, 8585, 8585, 8592, 8601, 8632, 8633, 8658, 8658, 8660, 8660, 8679, 8679, 8704, 8704, 8706, 8707, 8711, 8712, 8715, 8715, 8719, 8719, 8721, 8721, 8725, 8725, 8730, 8730, 8733, 8736, 8739, 8739, 8741, 8741, 8743, 8748, 8750, 8750, 8756, 8759, 8764, 8765, 8776, 8776, 8780, 8780, 8786, 8786, 8800, 8801, 8804, 8807, 8810, 8811, 8814, 8815, 8834, 8835, 8838, 8839, 8853, 8853, 8857, 8857, 8869, 8869, 8895, 8895, 8978, 8978, 9312, 9449, 9451, 9547, 9552, 9587, 9600, 9615, 9618, 9621, 9632, 9633, 9635, 9641, 9650, 9651, 9654, 9655, 9660, 9661, 9664, 9665, 9670, 9672, 9675, 9675, 9678, 9681, 9698, 9701, 9711, 9711, 9733, 9734, 9737, 9737, 9742, 9743, 9756, 9756, 9758, 9758, 9792, 9792, 9794, 9794, 9824, 9825, 9827, 9829, 9831, 9834, 9836, 9837, 9839, 9839, 9886, 9887, 9919, 9919, 9926, 9933, 9935, 9939, 9941, 9953, 9955, 9955, 9960, 9961, 9963, 9969, 9972, 9972, 9974, 9977, 9979, 9980, 9982, 9983, 10045, 10045, 10102, 10111, 11094, 11097, 12872, 12879, 57344, 63743, 65024, 65039, 65533, 65533, 127232, 127242, 127248, 127277, 127280, 127337, 127344, 127373, 127375, 127376, 127387, 127404, 917760, 917999, 983040, 1048573, 1048576, 1114109];\n\nexport const fullwidthMinimalCodePoint = 12288;\nexport const fullwidthMaximumCodePoint = 65510;\nexport const fullwidthRanges = [12288, 12288, 65281, 65376, 65504, 65510];\n\nexport const halfwidthMinimalCodePoint = 8361;\nexport const halfwidthMaximumCodePoint = 65518;\nexport const halfwidthRanges = [8361, 8361, 65377, 65470, 65474, 65479, 65482, 65487, 65490, 65495, 65498, 65500, 65512, 65518];\n\nexport const narrowMinimalCodePoint = 32;\nexport const narrowMaximumCodePoint = 10630;\nexport const narrowRanges = [32, 126, 162, 163, 165, 166, 172, 172, 175, 175, 10214, 10221, 10629, 10630];\n\nexport const wideMinimalCodePoint = 4352;\nexport const wideMaximumCodePoint = 262141;\nexport const wideRanges = [4352, 4447, 8986, 8987, 9001, 9002, 9193, 9196, 9200, 9200, 9203, 9203, 9725, 9726, 9748, 9749, 9776, 9783, 9800, 9811, 9855, 9855, 9866, 9871, 9875, 9875, 9889, 9889, 9898, 9899, 9917, 9918, 9924, 9925, 9934, 9934, 9940, 9940, 9962, 9962, 9970, 9971, 9973, 9973, 9978, 9978, 9981, 9981, 9989, 9989, 9994, 9995, 10024, 10024, 10060, 10060, 10062, 10062, 10067, 10069, 10071, 10071, 10133, 10135, 10160, 10160, 10175, 10175, 11035, 11036, 11088, 11088, 11093, 11093, 11904, 11929, 11931, 12019, 12032, 12245, 12272, 12287, 12289, 12350, 12353, 12438, 12441, 12543, 12549, 12591, 12593, 12686, 12688, 12773, 12783, 12830, 12832, 12871, 12880, 42124, 42128, 42182, 43360, 43388, 44032, 55203, 63744, 64255, 65040, 65049, 65072, 65106, 65108, 65126, 65128, 65131, 94176, 94180, 94192, 94198, 94208, 101589, 101631, 101662, 101760, 101874, 110576, 110579, 110581, 110587, 110589, 110590, 110592, 110882, 110898, 110898, 110928, 110930, 110933, 110933, 110948, 110951, 110960, 111355, 119552, 119638, 119648, 119670, 126980, 126980, 127183, 127183, 127374, 127374, 127377, 127386, 127488, 127490, 127504, 127547, 127552, 127560, 127568, 127569, 127584, 127589, 127744, 127776, 127789, 127797, 127799, 127868, 127870, 127891, 127904, 127946, 127951, 127955, 127968, 127984, 127988, 127988, 127992, 128062, 128064, 128064, 128066, 128252, 128255, 128317, 128331, 128334, 128336, 128359, 128378, 128378, 128405, 128406, 128420, 128420, 128507, 128591, 128640, 128709, 128716, 128716, 128720, 128722, 128725, 128728, 128732, 128735, 128747, 128748, 128756, 128764, 128992, 129003, 129008, 129008, 129292, 129338, 129340, 129349, 129351, 129535, 129648, 129660, 129664, 129674, 129678, 129734, 129736, 129736, 129741, 129756, 129759, 129770, 129775, 129784, 131072, 196605, 196608, 262141];\n","/**\nBinary search on a sorted flat array of [start, end] pairs.\n\n@param {number[]} ranges - Flat array of inclusive [start, end] range pairs, e.g. [0, 5, 10, 20].\n@param {number} codePoint - The value to search for.\n@returns {boolean} Whether the value falls within any of the ranges.\n*/\nexport const isInRange = (ranges, codePoint) => {\n\tlet low = 0;\n\tlet high = Math.floor(ranges.length / 2) - 1;\n\twhile (low <= high) {\n\t\tconst mid = Math.floor((low + high) / 2);\n\t\tconst i = mid * 2;\n\t\tif (codePoint < ranges[i]) {\n\t\t\thigh = mid - 1;\n\t\t} else if (codePoint > ranges[i + 1]) {\n\t\t\tlow = mid + 1;\n\t\t} else {\n\t\t\treturn true;\n\t\t}\n\t}\n\n\treturn false;\n};\n","import {\n\tambiguousMinimalCodePoint,\n\tambiguousMaximumCodePoint,\n\tambiguousRanges,\n\n\tfullwidthMinimalCodePoint,\n\tfullwidthMaximumCodePoint,\n\tfullwidthRanges,\n\n\thalfwidthMinimalCodePoint,\n\thalfwidthMaximumCodePoint,\n\thalfwidthRanges,\n\n\tnarrowMinimalCodePoint,\n\tnarrowMaximumCodePoint,\n\tnarrowRanges,\n\n\twideMinimalCodePoint,\n\twideMaximumCodePoint,\n\twideRanges,\n} from './lookup-data.js';\nimport {isInRange} from './utilities.js';\n\nconst commonCjkCodePoint = 0x4E_00;\nconst [wideFastPathStart, wideFastPathEnd] = /* #__PURE__ */ findWideFastPathRange(wideRanges);\n\n// Use a hot-path range so common `isWide` calls can skip binary search.\n// The range containing U+4E00 covers common CJK ideographs;\n// fallback to the largest range for resilience to Unicode table changes.\nfunction findWideFastPathRange(ranges) {\n\tlet fastPathStart = ranges[0];\n\tlet fastPathEnd = ranges[1];\n\n\tfor (let index = 0; index < ranges.length; index += 2) {\n\t\tconst start = ranges[index];\n\t\tconst end = ranges[index + 1];\n\n\t\tif (\n\t\t\tcommonCjkCodePoint >= start\n\t\t\t&& commonCjkCodePoint <= end\n\t\t) {\n\t\t\treturn [start, end];\n\t\t}\n\n\t\tif ((end - start) > (fastPathEnd - fastPathStart)) {\n\t\t\tfastPathStart = start;\n\t\t\tfastPathEnd = end;\n\t\t}\n\t}\n\n\treturn [fastPathStart, fastPathEnd];\n}\n\nexport const isAmbiguous = codePoint => {\n\tif (\n\t\tcodePoint < ambiguousMinimalCodePoint\n\t\t|| codePoint > ambiguousMaximumCodePoint\n\t) {\n\t\treturn false;\n\t}\n\n\treturn isInRange(ambiguousRanges, codePoint);\n};\n\nexport const isFullWidth = codePoint => {\n\tif (\n\t\tcodePoint < fullwidthMinimalCodePoint\n\t\t|| codePoint > fullwidthMaximumCodePoint\n\t) {\n\t\treturn false;\n\t}\n\n\treturn isInRange(fullwidthRanges, codePoint);\n};\n\nconst isHalfWidth = codePoint => {\n\tif (\n\t\tcodePoint < halfwidthMinimalCodePoint\n\t\t|| codePoint > halfwidthMaximumCodePoint\n\t) {\n\t\treturn false;\n\t}\n\n\treturn isInRange(halfwidthRanges, codePoint);\n};\n\nconst isNarrow = codePoint => {\n\tif (\n\t\tcodePoint < narrowMinimalCodePoint\n\t\t|| codePoint > narrowMaximumCodePoint\n\t) {\n\t\treturn false;\n\t}\n\n\treturn isInRange(narrowRanges, codePoint);\n};\n\nexport const isWide = codePoint => {\n\tif (\n\t\tcodePoint >= wideFastPathStart\n\t\t&& codePoint <= wideFastPathEnd\n\t) {\n\t\treturn true;\n\t}\n\n\tif (\n\t\tcodePoint < wideMinimalCodePoint\n\t\t|| codePoint > wideMaximumCodePoint\n\t) {\n\t\treturn false;\n\t}\n\n\treturn isInRange(wideRanges, codePoint);\n};\n\nexport function getCategory(codePoint) {\n\tif (isAmbiguous(codePoint)) {\n\t\treturn 'ambiguous';\n\t}\n\n\tif (isFullWidth(codePoint)) {\n\t\treturn 'fullwidth';\n\t}\n\n\tif (isHalfWidth(codePoint)) {\n\t\treturn 'halfwidth';\n\t}\n\n\tif (isNarrow(codePoint)) {\n\t\treturn 'narrow';\n\t}\n\n\tif (isWide(codePoint)) {\n\t\treturn 'wide';\n\t}\n\n\treturn 'neutral';\n}\n","import {getCategory, isAmbiguous, isFullWidth, isWide} from './lookup.js';\n\nfunction validate(codePoint) {\n\tif (!Number.isSafeInteger(codePoint)) {\n\t\tthrow new TypeError(`Expected a code point, got \\`${typeof codePoint}\\`.`);\n\t}\n}\n\nexport function eastAsianWidthType(codePoint) {\n\tvalidate(codePoint);\n\n\treturn getCategory(codePoint);\n}\n\nexport function eastAsianWidth(codePoint, {ambiguousAsWide = false} = {}) {\n\tvalidate(codePoint);\n\n\tif (\n\t\tisFullWidth(codePoint)\n\t\t|| isWide(codePoint)\n\t\t|| (ambiguousAsWide && isAmbiguous(codePoint))\n\t) {\n\t\treturn 2;\n\t}\n\n\treturn 1;\n}\n\n// Private exports for https://github.com/sindresorhus/is-fullwidth-code-point\nexport {isFullWidth as _isFullWidth, isWide as _isWide} from './lookup.js';\n","export default () => {\n\t// https://mths.be/emoji\n\treturn /[#*0-9]\\uFE0F?\\u20E3|[\\xA9\\xAE\\u203C\\u2049\\u2122\\u2139\\u2194-\\u2199\\u21A9\\u21AA\\u231A\\u231B\\u2328\\u23CF\\u23ED-\\u23EF\\u23F1\\u23F2\\u23F8-\\u23FA\\u24C2\\u25AA\\u25AB\\u25B6\\u25C0\\u25FB\\u25FC\\u25FE\\u2600-\\u2604\\u260E\\u2611\\u2614\\u2615\\u2618\\u2620\\u2622\\u2623\\u2626\\u262A\\u262E\\u262F\\u2638-\\u263A\\u2640\\u2642\\u2648-\\u2653\\u265F\\u2660\\u2663\\u2665\\u2666\\u2668\\u267B\\u267E\\u267F\\u2692\\u2694-\\u2697\\u2699\\u269B\\u269C\\u26A0\\u26A7\\u26AA\\u26B0\\u26B1\\u26BD\\u26BE\\u26C4\\u26C8\\u26CF\\u26D1\\u26E9\\u26F0-\\u26F5\\u26F7\\u26F8\\u26FA\\u2702\\u2708\\u2709\\u270F\\u2712\\u2714\\u2716\\u271D\\u2721\\u2733\\u2734\\u2744\\u2747\\u2757\\u2763\\u27A1\\u2934\\u2935\\u2B05-\\u2B07\\u2B1B\\u2B1C\\u2B55\\u3030\\u303D\\u3297\\u3299]\\uFE0F?|[\\u261D\\u270C\\u270D](?:\\uD83C[\\uDFFB-\\uDFFF]|\\uFE0F)?|[\\u270A\\u270B](?:\\uD83C[\\uDFFB-\\uDFFF])?|[\\u23E9-\\u23EC\\u23F0\\u23F3\\u25FD\\u2693\\u26A1\\u26AB\\u26C5\\u26CE\\u26D4\\u26EA\\u26FD\\u2705\\u2728\\u274C\\u274E\\u2753-\\u2755\\u2795-\\u2797\\u27B0\\u27BF\\u2B50]|\\u26D3\\uFE0F?(?:\\u200D\\uD83D\\uDCA5)?|\\u26F9(?:\\uD83C[\\uDFFB-\\uDFFF]|\\uFE0F)?(?:\\u200D[\\u2640\\u2642]\\uFE0F?)?|\\u2764\\uFE0F?(?:\\u200D(?:\\uD83D\\uDD25|\\uD83E\\uDE79))?|\\uD83C(?:[\\uDC04\\uDD70\\uDD71\\uDD7E\\uDD7F\\uDE02\\uDE37\\uDF21\\uDF24-\\uDF2C\\uDF36\\uDF7D\\uDF96\\uDF97\\uDF99-\\uDF9B\\uDF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\\uDC67(?:\\u200D\\uD83D[\\uDC66\\uDC67])?)|[\\uDCBB\\uDCBC\\uDD27\\uDD2C\\uDE80\\uDE92]|\\uDC66(?:\\u200D\\uD83D\\uDC66)?|\\uDC67(?:\\u200D\\uD83D[\\uDC66\\uDC67])?)|\\uD83E(?:[\\uDDAF\\uDDBC\\uDDBD](?:\\u200D\\u27A1\\uFE0F?)?|[\\uDDB0-\\uDDB3]))|\\uD83C(?:\\uDFFB(?:\\u200D(?:[\\u2695\\u2696\\u2708]\\uFE0F?|\\u2764\\uFE0F?\\u200D\\uD83D(?:\\uDC8B\\u200D\\uD83D)?\\uDC68\\uD83C[\\uDFFB-\\uDFFF]|\\uD83C[\\uDF3E\\uDF73\\uDF7C\\uDF93\\uDFA4\\uDFA8\\uDFEB\\uDFED]|\\uD83D(?:[\\uDCBB\\uDCBC\\uDD27\\uDD2C\\uDE80\\uDE92]|\\uDC30\\u200D\\uD83D\\uDC68\\uD83C[\\uDFFC-\\uDFFF])|\\uD83E(?:[\\uDD1D\\uDEEF]\\u200D\\uD83D\\uDC68\\uD83C[\\uDFFC-\\uDFFF]|[\\uDDAF\\uDDBC\\uDDBD](?:\\u200D\\u27A1\\uFE0F?)?|[\\uDDB0-\\uDDB3])))?|\\uDFFC(?:\\u200D(?:[\\u2695\\u2696\\u2708]\\uFE0F?|\\u2764\\uFE0F?\\u200D\\uD83D(?:\\uDC8B\\u200D\\uD83D)?\\uDC68\\uD83C[\\uDFFB-\\uDFFF]|\\uD83C[\\uDF3E\\uDF73\\uDF7C\\uDF93\\uDFA4\\uDFA8\\uDFEB\\uDFED]|\\uD83D(?:[\\uDCBB\\uDCBC\\uDD27\\uDD2C\\uDE80\\uDE92]|\\uDC30\\u200D\\uD83D\\uDC68\\uD83C[\\uDFFB\\uDFFD-\\uDFFF])|\\uD83E(?:[\\uDD1D\\uDEEF]\\u200D\\uD83D\\uDC68\\uD83C[\\uDFFB\\uDFFD-\\uDFFF]|[\\uDDAF\\uDDBC\\uDDBD](?:\\u200D\\u27A1\\uFE0F?)?|[\\uDDB0-\\uDDB3])))?|\\uDFFD(?:\\u200D(?:[\\u2695\\u2696\\u2708]\\uFE0F?|\\u2764\\uFE0F?\\u200D\\uD83D(?:\\uDC8B\\u200D\\uD83D)?\\uDC68\\uD83C[\\uDFFB-\\uDFFF]|\\uD83C[\\uDF3E\\uDF73\\uDF7C\\uDF93\\uDFA4\\uDFA8\\uDFEB\\uDFED]|\\uD83D(?:[\\uDCBB\\uDCBC\\uDD27\\uDD2C\\uDE80\\uDE92]|\\uDC30\\u200D\\uD83D\\uDC68\\uD83C[\\uDFFB\\uDFFC\\uDFFE\\uDFFF])|\\uD83E(?:[\\uDD1D\\uDEEF]\\u200D\\uD83D\\uDC68\\uD83C[\\uDFFB\\uDFFC\\uDFFE\\uDFFF]|[\\uDDAF\\uDDBC\\uDDBD](?:\\u200D\\u27A1\\uFE0F?)?|[\\uDDB0-\\uDDB3])))?|\\uDFFE(?:\\u200D(?:[\\u2695\\u2696\\u2708]\\uFE0F?|\\u2764\\uFE0F?\\u200D\\uD83D(?:\\uDC8B\\u200D\\uD83D)?\\uDC68\\uD83C[\\uDFFB-\\uDFFF]|\\uD83C[\\uDF3E\\uDF73\\uDF7C\\uDF93\\uDFA4\\uDFA8\\uDFEB\\uDFED]|\\uD83D(?:[\\uDCBB\\uDCBC\\uDD27\\uDD2C\\uDE80\\uDE92]|\\uDC30\\u200D\\uD83D\\uDC68\\uD83C[\\uDFFB-\\uDFFD\\uDFFF])|\\uD83E(?:[\\uDD1D\\uDEEF]\\u200D\\uD83D\\uDC68\\uD83C[\\uDFFB-\\uDFFD\\uDFFF]|[\\uDDAF\\uDDBC\\uDDBD](?:\\u200D\\u27A1\\uFE0F?)?|[\\uDDB0-\\uDDB3])))?|\\uDFFF(?:\\u200D(?:[\\u2695\\u2696\\u2708]\\uFE0F?|\\u2764\\uFE0F?\\u200D\\uD83D(?:\\uDC8B\\u200D\\uD83D)?\\uDC68\\uD83C[\\uDFFB-\\uDFFF]|\\uD83C[\\uDF3E\\uDF73\\uDF7C\\uDF93\\uDFA4\\uDFA8\\uDFEB\\uDFED]|\\uD83D(?:[\\uDCBB\\uDCBC\\uDD27\\uDD2C\\uDE80\\uDE92]|\\uDC30\\u200D\\uD83D\\uDC68\\uD83C[\\uDFFB-\\uDFFE])|\\uD83E(?:[\\uDD1D\\uDEEF]\\u200D\\uD83D\\uDC68\\uD83C[\\uDFFB-\\uDFFE]|[\\uDDAF\\uDDBC\\uDDBD](?:\\u200D\\u27A1\\uFE0F?)?|[\\uDDB0-\\uDDB3])))?))?|\\uDC69(?:\\u200D(?:[\\u2695\\u2696\\u2708]\\uFE0F?|\\u2764\\uFE0F?\\u200D\\uD83D(?:\\uDC8B\\u200D\\uD83D)?[\\uDC68\\uDC69]|\\uD83C[\\uDF3E\\uDF73\\uDF7C\\uDF93\\uDFA4\\uDFA8\\uDFEB\\uDFED]|\\uD83D(?:[\\uDCBB\\uDCBC\\uDD27\\uDD2C\\uDE80\\uDE92]|\\uDC66(?:\\u200D\\uD83D\\uDC66)?|\\uDC67(?:\\u200D\\uD83D[\\uDC66\\uDC67])?|\\uDC69\\u200D\\uD83D(?:\\uDC66(?:\\u200D\\uD83D\\uDC66)?|\\uDC67(?:\\u200D\\uD83D[\\uDC66\\uDC67])?))|\\uD83E(?:[\\uDDAF\\uDDBC\\uDDBD](?:\\u200D\\u27A1\\uFE0F?)?|[\\uDDB0-\\uDDB3]))|\\uD83C(?:\\uDFFB(?:\\u200D(?:[\\u2695\\u2696\\u2708]\\uFE0F?|\\u2764\\uFE0F?\\u200D\\uD83D(?:[\\uDC68\\uDC69]|\\uDC8B\\u200D\\uD83D[\\uDC68\\uDC69])\\uD83C[\\uDFFB-\\uDFFF]|\\uD83C[\\uDF3E\\uDF73\\uDF7C\\uDF93\\uDFA4\\uDFA8\\uDFEB\\uDFED]|\\uD83D(?:[\\uDCBB\\uDCBC\\uDD27\\uDD2C\\uDE80\\uDE92]|\\uDC30\\u200D\\uD83D\\uDC69\\uD83C[\\uDFFC-\\uDFFF])|\\uD83E(?:[\\uDDAF\\uDDBC\\uDDBD](?:\\u200D\\u27A1\\uFE0F?)?|[\\uDDB0-\\uDDB3]|\\uDD1D\\u200D\\uD83D[\\uDC68\\uDC69]\\uD83C[\\uDFFC-\\uDFFF]|\\uDEEF\\u200D\\uD83D\\uDC69\\uD83C[\\uDFFC-\\uDFFF])))?|\\uDFFC(?:\\u200D(?:[\\u2695\\u2696\\u2708]\\uFE0F?|\\u2764\\uFE0F?\\u200D\\uD83D(?:[\\uDC68\\uDC69]|\\uDC8B\\u200D\\uD83D[\\uDC68\\uDC69])\\uD83C[\\uDFFB-\\uDFFF]|\\uD83C[\\uDF3E\\uDF73\\uDF7C\\uDF93\\uDFA4\\uDFA8\\uDFEB\\uDFED]|\\uD83D(?:[\\uDCBB\\uDCBC\\uDD27\\uDD2C\\uDE80\\uDE92]|\\uDC30\\u200D\\uD83D\\uDC69\\uD83C[\\uDFFB\\uDFFD-\\uDFFF])|\\uD83E(?:[\\uDDAF\\uDDBC\\uDDBD](?:\\u200D\\u27A1\\uFE0F?)?|[\\uDDB0-\\uDDB3]|\\uDD1D\\u200D\\uD83D[\\uDC68\\uDC69]\\uD83C[\\uDFFB\\uDFFD-\\uDFFF]|\\uDEEF\\u200D\\uD83D\\uDC69\\uD83C[\\uDFFB\\uDFFD-\\uDFFF])))?|\\uDFFD(?:\\u200D(?:[\\u2695\\u2696\\u2708]\\uFE0F?|\\u2764\\uFE0F?\\u200D\\uD83D(?:[\\uDC68\\uDC69]|\\uDC8B\\u200D\\uD83D[\\uDC68\\uDC69])\\uD83C[\\uDFFB-\\uDFFF]|\\uD83C[\\uDF3E\\uDF73\\uDF7C\\uDF93\\uDFA4\\uDFA8\\uDFEB\\uDFED]|\\uD83D(?:[\\uDCBB\\uDCBC\\uDD27\\uDD2C\\uDE80\\uDE92]|\\uDC30\\u200D\\uD83D\\uDC69\\uD83C[\\uDFFB\\uDFFC\\uDFFE\\uDFFF])|\\uD83E(?:[\\uDDAF\\uDDBC\\uDDBD](?:\\u200D\\u27A1\\uFE0F?)?|[\\uDDB0-\\uDDB3]|\\uDD1D\\u200D\\uD83D[\\uDC68\\uDC69]\\uD83C[\\uDFFB\\uDFFC\\uDFFE\\uDFFF]|\\uDEEF\\u200D\\uD83D\\uDC69\\uD83C[\\uDFFB\\uDFFC\\uDFFE\\uDFFF])))?|\\uDFFE(?:\\u200D(?:[\\u2695\\u2696\\u2708]\\uFE0F?|\\u2764\\uFE0F?\\u200D\\uD83D(?:[\\uDC68\\uDC69]|\\uDC8B\\u200D\\uD83D[\\uDC68\\uDC69])\\uD83C[\\uDFFB-\\uDFFF]|\\uD83C[\\uDF3E\\uDF73\\uDF7C\\uDF93\\uDFA4\\uDFA8\\uDFEB\\uDFED]|\\uD83D(?:[\\uDCBB\\uDCBC\\uDD27\\uDD2C\\uDE80\\uDE92]|\\uDC30\\u200D\\uD83D\\uDC69\\uD83C[\\uDFFB-\\uDFFD\\uDFFF])|\\uD83E(?:[\\uDDAF\\uDDBC\\uDDBD](?:\\u200D\\u27A1\\uFE0F?)?|[\\uDDB0-\\uDDB3]|\\uDD1D\\u200D\\uD83D[\\uDC68\\uDC69]\\uD83C[\\uDFFB-\\uDFFD\\uDFFF]|\\uDEEF\\u200D\\uD83D\\uDC69\\uD83C[\\uDFFB-\\uDFFD\\uDFFF])))?|\\uDFFF(?:\\u200D(?:[\\u2695\\u2696\\u2708]\\uFE0F?|\\u2764\\uFE0F?\\u200D\\uD83D(?:[\\uDC68\\uDC69]|\\uDC8B\\u200D\\uD83D[\\uDC68\\uDC69])\\uD83C[\\uDFFB-\\uDFFF]|\\uD83C[\\uDF3E\\uDF73\\uDF7C\\uDF93\\uDFA4\\uDFA8\\uDFEB\\uDFED]|\\uD83D(?:[\\uDCBB\\uDCBC\\uDD27\\uDD2C\\uDE80\\uDE92]|\\uDC30\\u200D\\uD83D\\uDC69\\uD83C[\\uDFFB-\\uDFFE])|\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\\uDEF2\\uD83C[\\uDFFB\\uDFFD-\\uDFFF])?|\\uDFFD(?:\\u200D\\uD83E\\uDEF2\\uD83C[\\uDFFB\\uDFFC\\uDFFE\\uDFFF])?|\\uDFFE(?:\\u200D\\uD83E\\uDEF2\\uD83C[\\uDFFB-\\uDFFD\\uDFFF])?|\\uDFFF(?:\\u200D\\uD83E\\uDEF2\\uD83C[\\uDFFB-\\uDFFE])?))?)/g;\n};\n","import stripAnsi from 'strip-ansi';\nimport {eastAsianWidth} from 'get-east-asian-width';\nimport emojiRegex from 'emoji-regex';\n\nconst segmenter = new Intl.Segmenter();\n\nconst defaultIgnorableCodePointRegex = /^\\p{Default_Ignorable_Code_Point}$/u;\n\nexport default function stringWidth(string, options = {}) {\n\tif (typeof string !== 'string' || string.length === 0) {\n\t\treturn 0;\n\t}\n\n\tconst {\n\t\tambiguousIsNarrow = true,\n\t\tcountAnsiEscapeCodes = false,\n\t} = options;\n\n\tif (!countAnsiEscapeCodes) {\n\t\tstring = stripAnsi(string);\n\t}\n\n\tif (string.length === 0) {\n\t\treturn 0;\n\t}\n\n\tlet width = 0;\n\tconst eastAsianWidthOptions = {ambiguousAsWide: !ambiguousIsNarrow};\n\n\tfor (const {segment: character} of segmenter.segment(string)) {\n\t\tconst codePoint = character.codePointAt(0);\n\n\t\t// Ignore control characters\n\t\tif (codePoint <= 0x1F || (codePoint >= 0x7F && codePoint <= 0x9F)) {\n\t\t\tcontinue;\n\t\t}\n\n\t\t// Ignore zero-width characters\n\t\tif (\n\t\t\t(codePoint >= 0x20_0B && codePoint <= 0x20_0F) // Zero-width space, non-joiner, joiner, left-to-right mark, right-to-left mark\n\t\t\t|| codePoint === 0xFE_FF // Zero-width no-break space\n\t\t) {\n\t\t\tcontinue;\n\t\t}\n\n\t\t// Ignore combining characters\n\t\tif (\n\t\t\t(codePoint >= 0x3_00 && codePoint <= 0x3_6F) // Combining diacritical marks\n\t\t\t|| (codePoint >= 0x1A_B0 && codePoint <= 0x1A_FF) // Combining diacritical marks extended\n\t\t\t|| (codePoint >= 0x1D_C0 && codePoint <= 0x1D_FF) // Combining diacritical marks supplement\n\t\t\t|| (codePoint >= 0x20_D0 && codePoint <= 0x20_FF) // Combining diacritical marks for symbols\n\t\t\t|| (codePoint >= 0xFE_20 && codePoint <= 0xFE_2F) // Combining half marks\n\t\t) {\n\t\t\tcontinue;\n\t\t}\n\n\t\t// Ignore surrogate pairs\n\t\tif (codePoint >= 0xD8_00 && codePoint <= 0xDF_FF) {\n\t\t\tcontinue;\n\t\t}\n\n\t\t// Ignore variation selectors\n\t\tif (codePoint >= 0xFE_00 && codePoint <= 0xFE_0F) {\n\t\t\tcontinue;\n\t\t}\n\n\t\t// This covers some of the above cases, but we still keep them for performance reasons.\n\t\tif (defaultIgnorableCodePointRegex.test(character)) {\n\t\t\tcontinue;\n\t\t}\n\n\t\t// TODO: Use `/\\p{RGI_Emoji}/v` when targeting Node.js 20.\n\t\tif (emojiRegex().test(character)) {\n\t\t\twidth += 2;\n\t\t\tcontinue;\n\t\t}\n\n\t\twidth += eastAsianWidth(codePoint, eastAsianWidthOptions);\n\t}\n\n\treturn width;\n}\n","const ANSI_BACKGROUND_OFFSET = 10;\n\nconst wrapAnsi16 = (offset = 0) => code => `\\u001B[${code + offset}m`;\n\nconst wrapAnsi256 = (offset = 0) => code => `\\u001B[${38 + offset};5;${code}m`;\n\nconst wrapAnsi16m = (offset = 0) => (red, green, blue) => `\\u001B[${38 + offset};2;${red};${green};${blue}m`;\n\nconst styles = {\n\tmodifier: {\n\t\treset: [0, 0],\n\t\t// 21 isn't widely supported and 22 does the same thing\n\t\tbold: [1, 22],\n\t\tdim: [2, 22],\n\t\titalic: [3, 23],\n\t\tunderline: [4, 24],\n\t\toverline: [53, 55],\n\t\tinverse: [7, 27],\n\t\thidden: [8, 28],\n\t\tstrikethrough: [9, 29],\n\t},\n\tcolor: {\n\t\tblack: [30, 39],\n\t\tred: [31, 39],\n\t\tgreen: [32, 39],\n\t\tyellow: [33, 39],\n\t\tblue: [34, 39],\n\t\tmagenta: [35, 39],\n\t\tcyan: [36, 39],\n\t\twhite: [37, 39],\n\n\t\t// Bright color\n\t\tblackBright: [90, 39],\n\t\tgray: [90, 39], // Alias of `blackBright`\n\t\tgrey: [90, 39], // Alias of `blackBright`\n\t\tredBright: [91, 39],\n\t\tgreenBright: [92, 39],\n\t\tyellowBright: [93, 39],\n\t\tblueBright: [94, 39],\n\t\tmagentaBright: [95, 39],\n\t\tcyanBright: [96, 39],\n\t\twhiteBright: [97, 39],\n\t},\n\tbgColor: {\n\t\tbgBlack: [40, 49],\n\t\tbgRed: [41, 49],\n\t\tbgGreen: [42, 49],\n\t\tbgYellow: [43, 49],\n\t\tbgBlue: [44, 49],\n\t\tbgMagenta: [45, 49],\n\t\tbgCyan: [46, 49],\n\t\tbgWhite: [47, 49],\n\n\t\t// Bright color\n\t\tbgBlackBright: [100, 49],\n\t\tbgGray: [100, 49], // Alias of `bgBlackBright`\n\t\tbgGrey: [100, 49], // Alias of `bgBlackBright`\n\t\tbgRedBright: [101, 49],\n\t\tbgGreenBright: [102, 49],\n\t\tbgYellowBright: [103, 49],\n\t\tbgBlueBright: [104, 49],\n\t\tbgMagentaBright: [105, 49],\n\t\tbgCyanBright: [106, 49],\n\t\tbgWhiteBright: [107, 49],\n\t},\n};\n\nexport const modifierNames = Object.keys(styles.modifier);\nexport const foregroundColorNames = Object.keys(styles.color);\nexport const backgroundColorNames = Object.keys(styles.bgColor);\nexport const colorNames = [...foregroundColorNames, ...backgroundColorNames];\n\nfunction assembleStyles() {\n\tconst codes = new Map();\n\n\tfor (const [groupName, group] of Object.entries(styles)) {\n\t\tfor (const [styleName, style] of Object.entries(group)) {\n\t\t\tstyles[styleName] = {\n\t\t\t\topen: `\\u001B[${style[0]}m`,\n\t\t\t\tclose: `\\u001B[${style[1]}m`,\n\t\t\t};\n\n\t\t\tgroup[styleName] = styles[styleName];\n\n\t\t\tcodes.set(style[0], style[1]);\n\t\t}\n\n\t\tObject.defineProperty(styles, groupName, {\n\t\t\tvalue: group,\n\t\t\tenumerable: false,\n\t\t});\n\t}\n\n\tObject.defineProperty(styles, 'codes', {\n\t\tvalue: codes,\n\t\tenumerable: false,\n\t});\n\n\tstyles.color.close = '\\u001B[39m';\n\tstyles.bgColor.close = '\\u001B[49m';\n\n\tstyles.color.ansi = wrapAnsi16();\n\tstyles.color.ansi256 = wrapAnsi256();\n\tstyles.color.ansi16m = wrapAnsi16m();\n\tstyles.bgColor.ansi = wrapAnsi16(ANSI_BACKGROUND_OFFSET);\n\tstyles.bgColor.ansi256 = wrapAnsi256(ANSI_BACKGROUND_OFFSET);\n\tstyles.bgColor.ansi16m = wrapAnsi16m(ANSI_BACKGROUND_OFFSET);\n\n\t// From https://github.com/Qix-/color-convert/blob/3f0e0d4e92e235796ccb17f6e85c72094a651f49/conversions.js\n\tObject.defineProperties(styles, {\n\t\trgbToAnsi256: {\n\t\t\tvalue(red, green, blue) {\n\t\t\t\t// We use the extended greyscale palette here, with the exception of\n\t\t\t\t// black and white. normal palette only has 4 greyscale shades.\n\t\t\t\tif (red === green && green === blue) {\n\t\t\t\t\tif (red < 8) {\n\t\t\t\t\t\treturn 16;\n\t\t\t\t\t}\n\n\t\t\t\t\tif (red > 248) {\n\t\t\t\t\t\treturn 231;\n\t\t\t\t\t}\n\n\t\t\t\t\treturn Math.round(((red - 8) / 247) * 24) + 232;\n\t\t\t\t}\n\n\t\t\t\treturn 16\n\t\t\t\t\t+ (36 * Math.round(red / 255 * 5))\n\t\t\t\t\t+ (6 * Math.round(green / 255 * 5))\n\t\t\t\t\t+ Math.round(blue / 255 * 5);\n\t\t\t},\n\t\t\tenumerable: false,\n\t\t},\n\t\thexToRgb: {\n\t\t\tvalue(hex) {\n\t\t\t\tconst matches = /[a-f\\d]{6}|[a-f\\d]{3}/i.exec(hex.toString(16));\n\t\t\t\tif (!matches) {\n\t\t\t\t\treturn [0, 0, 0];\n\t\t\t\t}\n\n\t\t\t\tlet [colorString] = matches;\n\n\t\t\t\tif (colorString.length === 3) {\n\t\t\t\t\tcolorString = [...colorString].map(character => character + character).join('');\n\t\t\t\t}\n\n\t\t\t\tconst integer = Number.parseInt(colorString, 16);\n\n\t\t\t\treturn [\n\t\t\t\t\t/* eslint-disable no-bitwise */\n\t\t\t\t\t(integer >> 16) & 0xFF,\n\t\t\t\t\t(integer >> 8) & 0xFF,\n\t\t\t\t\tinteger & 0xFF,\n\t\t\t\t\t/* eslint-enable no-bitwise */\n\t\t\t\t];\n\t\t\t},\n\t\t\tenumerable: false,\n\t\t},\n\t\thexToAnsi256: {\n\t\t\tvalue: hex => styles.rgbToAnsi256(...styles.hexToRgb(hex)),\n\t\t\tenumerable: false,\n\t\t},\n\t\tansi256ToAnsi: {\n\t\t\tvalue(code) {\n\t\t\t\tif (code < 8) {\n\t\t\t\t\treturn 30 + code;\n\t\t\t\t}\n\n\t\t\t\tif (code < 16) {\n\t\t\t\t\treturn 90 + (code - 8);\n\t\t\t\t}\n\n\t\t\t\tlet red;\n\t\t\t\tlet green;\n\t\t\t\tlet blue;\n\n\t\t\t\tif (code >= 232) {\n\t\t\t\t\tred = (((code - 232) * 10) + 8) / 255;\n\t\t\t\t\tgreen = red;\n\t\t\t\t\tblue = red;\n\t\t\t\t} else {\n\t\t\t\t\tcode -= 16;\n\n\t\t\t\t\tconst remainder = code % 36;\n\n\t\t\t\t\tred = Math.floor(code / 36) / 5;\n\t\t\t\t\tgreen = Math.floor(remainder / 6) / 5;\n\t\t\t\t\tblue = (remainder % 6) / 5;\n\t\t\t\t}\n\n\t\t\t\tconst value = Math.max(red, green, blue) * 2;\n\n\t\t\t\tif (value === 0) {\n\t\t\t\t\treturn 30;\n\t\t\t\t}\n\n\t\t\t\t// eslint-disable-next-line no-bitwise\n\t\t\t\tlet result = 30 + ((Math.round(blue) << 2) | (Math.round(green) << 1) | Math.round(red));\n\n\t\t\t\tif (value === 2) {\n\t\t\t\t\tresult += 60;\n\t\t\t\t}\n\n\t\t\t\treturn result;\n\t\t\t},\n\t\t\tenumerable: false,\n\t\t},\n\t\trgbToAnsi: {\n\t\t\tvalue: (red, green, blue) => styles.ansi256ToAnsi(styles.rgbToAnsi256(red, green, blue)),\n\t\t\tenumerable: false,\n\t\t},\n\t\thexToAnsi: {\n\t\t\tvalue: hex => styles.ansi256ToAnsi(styles.hexToAnsi256(hex)),\n\t\t\tenumerable: false,\n\t\t},\n\t});\n\n\treturn styles;\n}\n\nconst ansiStyles = assembleStyles();\n\nexport default ansiStyles;\n","import stringWidth from 'string-width';\nimport stripAnsi from 'strip-ansi';\nimport ansiStyles from 'ansi-styles';\n\nconst ESCAPES = new Set([\n\t'\\u001B',\n\t'\\u009B',\n]);\n\nconst END_CODE = 39;\nconst ANSI_ESCAPE_BELL = '\\u0007';\nconst ANSI_CSI = '[';\nconst ANSI_OSC = ']';\nconst ANSI_SGR_TERMINATOR = 'm';\nconst ANSI_ESCAPE_LINK = `${ANSI_OSC}8;;`;\n\nconst wrapAnsiCode = code => `${ESCAPES.values().next().value}${ANSI_CSI}${code}${ANSI_SGR_TERMINATOR}`;\nconst wrapAnsiHyperlink = url => `${ESCAPES.values().next().value}${ANSI_ESCAPE_LINK}${url}${ANSI_ESCAPE_BELL}`;\n\n// Calculate the length of words split on ' ', ignoring\n// the extra characters added by ansi escape codes\nconst wordLengths = string => string.split(' ').map(character => stringWidth(character));\n\n// Wrap a long word across multiple rows\n// Ansi escape codes do not count towards length\nconst wrapWord = (rows, word, columns) => {\n\tconst characters = [...word];\n\n\tlet isInsideEscape = false;\n\tlet isInsideLinkEscape = false;\n\tlet visible = stringWidth(stripAnsi(rows.at(-1)));\n\n\tfor (const [index, character] of characters.entries()) {\n\t\tconst characterLength = stringWidth(character);\n\n\t\tif (visible + characterLength <= columns) {\n\t\t\trows[rows.length - 1] += character;\n\t\t} else {\n\t\t\trows.push(character);\n\t\t\tvisible = 0;\n\t\t}\n\n\t\tif (ESCAPES.has(character)) {\n\t\t\tisInsideEscape = true;\n\n\t\t\tconst ansiEscapeLinkCandidate = characters.slice(index + 1, index + 1 + ANSI_ESCAPE_LINK.length).join('');\n\t\t\tisInsideLinkEscape = ansiEscapeLinkCandidate === ANSI_ESCAPE_LINK;\n\t\t}\n\n\t\tif (isInsideEscape) {\n\t\t\tif (isInsideLinkEscape) {\n\t\t\t\tif (character === ANSI_ESCAPE_BELL) {\n\t\t\t\t\tisInsideEscape = false;\n\t\t\t\t\tisInsideLinkEscape = false;\n\t\t\t\t}\n\t\t\t} else if (character === ANSI_SGR_TERMINATOR) {\n\t\t\t\tisInsideEscape = false;\n\t\t\t}\n\n\t\t\tcontinue;\n\t\t}\n\n\t\tvisible += characterLength;\n\n\t\tif (visible === columns && index < characters.length - 1) {\n\t\t\trows.push('');\n\t\t\tvisible = 0;\n\t\t}\n\t}\n\n\t// It's possible that the last row we copy over is only\n\t// ansi escape characters, handle this edge-case\n\tif (!visible && rows.at(-1).length > 0 && rows.length > 1) {\n\t\trows[rows.length - 2] += rows.pop();\n\t}\n};\n\n// Trims spaces from a string ignoring invisible sequences\nconst stringVisibleTrimSpacesRight = string => {\n\tconst words = string.split(' ');\n\tlet last = words.length;\n\n\twhile (last > 0) {\n\t\tif (stringWidth(words[last - 1]) > 0) {\n\t\t\tbreak;\n\t\t}\n\n\t\tlast--;\n\t}\n\n\tif (last === words.length) {\n\t\treturn string;\n\t}\n\n\treturn words.slice(0, last).join(' ') + words.slice(last).join('');\n};\n\n// The wrap-ansi module can be invoked in either 'hard' or 'soft' wrap mode.\n//\n// 'hard' will never allow a string to take up more than columns characters.\n//\n// 'soft' allows long words to expand past the column length.\nconst exec = (string, columns, options = {}) => {\n\tif (options.trim !== false && string.trim() === '') {\n\t\treturn '';\n\t}\n\n\tlet returnValue = '';\n\tlet escapeCode;\n\tlet escapeUrl;\n\n\tconst lengths = wordLengths(string);\n\tlet rows = [''];\n\n\tfor (const [index, word] of string.split(' ').entries()) {\n\t\tif (options.trim !== false) {\n\t\t\trows[rows.length - 1] = rows.at(-1).trimStart();\n\t\t}\n\n\t\tlet rowLength = stringWidth(rows.at(-1));\n\n\t\tif (index !== 0) {\n\t\t\tif (rowLength >= columns && (options.wordWrap === false || options.trim === false)) {\n\t\t\t\t// If we start with a new word but the current row length equals the length of the columns, add a new row\n\t\t\t\trows.push('');\n\t\t\t\trowLength = 0;\n\t\t\t}\n\n\t\t\tif (rowLength > 0 || options.trim === false) {\n\t\t\t\trows[rows.length - 1] += ' ';\n\t\t\t\trowLength++;\n\t\t\t}\n\t\t}\n\n\t\t// In 'hard' wrap mode, the length of a line is never allowed to extend past 'columns'\n\t\tif (options.hard && lengths[index] > columns) {\n\t\t\tconst remainingColumns = (columns - rowLength);\n\t\t\tconst breaksStartingThisLine = 1 + Math.floor((lengths[index] - remainingColumns - 1) / columns);\n\t\t\tconst breaksStartingNextLine = Math.floor((lengths[index] - 1) / columns);\n\t\t\tif (breaksStartingNextLine < breaksStartingThisLine) {\n\t\t\t\trows.push('');\n\t\t\t}\n\n\t\t\twrapWord(rows, word, columns);\n\t\t\tcontinue;\n\t\t}\n\n\t\tif (rowLength + lengths[index] > columns && rowLength > 0 && lengths[index] > 0) {\n\t\t\tif (options.wordWrap === false && rowLength < columns) {\n\t\t\t\twrapWord(rows, word, columns);\n\t\t\t\tcontinue;\n\t\t\t}\n\n\t\t\trows.push('');\n\t\t}\n\n\t\tif (rowLength + lengths[index] > columns && options.wordWrap === false) {\n\t\t\twrapWord(rows, word, columns);\n\t\t\tcontinue;\n\t\t}\n\n\t\trows[rows.length - 1] += word;\n\t}\n\n\tif (options.trim !== false) {\n\t\trows = rows.map(row => stringVisibleTrimSpacesRight(row));\n\t}\n\n\tconst preString = rows.join('\\n');\n\tconst pre = [...preString];\n\n\t// We need to keep a separate index as `String#slice()` works on Unicode code units, while `pre` is an array of codepoints.\n\tlet preStringIndex = 0;\n\n\tfor (const [index, character] of pre.entries()) {\n\t\treturnValue += character;\n\n\t\tif (ESCAPES.has(character)) {\n\t\t\tconst {groups} = new RegExp(`(?:\\\\${ANSI_CSI}(?<code>\\\\d+)m|\\\\${ANSI_ESCAPE_LINK}(?<uri>.*)${ANSI_ESCAPE_BELL})`).exec(preString.slice(preStringIndex)) || {groups: {}};\n\t\t\tif (groups.code !== undefined) {\n\t\t\t\tconst code = Number.parseFloat(groups.code);\n\t\t\t\tescapeCode = code === END_CODE ? undefined : code;\n\t\t\t} else if (groups.uri !== undefined) {\n\t\t\t\tescapeUrl = groups.uri.length === 0 ? undefined : groups.uri;\n\t\t\t}\n\t\t}\n\n\t\tconst code = ansiStyles.codes.get(Number(escapeCode));\n\n\t\tif (pre[index + 1] === '\\n') {\n\t\t\tif (escapeUrl) {\n\t\t\t\treturnValue += wrapAnsiHyperlink('');\n\t\t\t}\n\n\t\t\tif (escapeCode && code) {\n\t\t\t\treturnValue += wrapAnsiCode(code);\n\t\t\t}\n\t\t} else if (character === '\\n') {\n\t\t\tif (escapeCode && code) {\n\t\t\t\treturnValue += wrapAnsiCode(escapeCode);\n\t\t\t}\n\n\t\t\tif (escapeUrl) {\n\t\t\t\treturnValue += wrapAnsiHyperlink(escapeUrl);\n\t\t\t}\n\t\t}\n\n\t\tpreStringIndex += character.length;\n\t}\n\n\treturn returnValue;\n};\n\n// For each newline, invoke the method separately\nexport default function wrapAnsi(string, columns, options) {\n\treturn String(string)\n\t\t.normalize()\n\t\t.replaceAll('\\r\\n', '\\n')\n\t\t.split('\\n')\n\t\t.map(line => exec(line, columns, options))\n\t\t.join('\\n');\n}\n","// Bootstrap cliui with CommonJS dependencies:\nimport { cliui } from './build/lib/index.js'\nimport stringWidth from 'string-width'\nimport stripAnsi from 'strip-ansi'\nimport wrapAnsi from 'wrap-ansi'\n\nexport default function ui (opts) {\n  return cliui(opts, {\n    stringWidth,\n    stripAnsi,\n    wrap: wrapAnsi\n  })\n}\n\nexport {ui as 'module.exports'};\n","import { dirname, resolve } from 'path';\nimport { readdirSync, statSync } from 'fs';\n\nexport default function (start, callback) {\n\tlet dir = resolve('.', start);\n\tlet tmp, stats = statSync(dir);\n\n\tif (!stats.isDirectory()) {\n\t\tdir = dirname(dir);\n\t}\n\n\twhile (true) {\n\t\ttmp = callback(dir, readdirSync(dir));\n\t\tif (tmp) return resolve(dir, tmp);\n\t\tdir = dirname(tmp = dir);\n\t\tif (tmp === dir) break;\n\t}\n}\n","/**\n * @license\n * Copyright (c) 2016, Contributors\n * SPDX-License-Identifier: ISC\n */\nexport function camelCase(str) {\n    // Handle the case where an argument is provided as camel case, e.g., fooBar.\n    // by ensuring that the string isn't already mixed case:\n    const isCamelCase = str !== str.toLowerCase() && str !== str.toUpperCase();\n    if (!isCamelCase) {\n        str = str.toLowerCase();\n    }\n    if (str.indexOf('-') === -1 && str.indexOf('_') === -1) {\n        return str;\n    }\n    else {\n        let camelcase = '';\n        let nextChrUpper = false;\n        const leadingHyphens = str.match(/^-+/);\n        for (let i = leadingHyphens ? leadingHyphens[0].length : 0; i < str.length; i++) {\n            let chr = str.charAt(i);\n            if (nextChrUpper) {\n                nextChrUpper = false;\n                chr = chr.toUpperCase();\n            }\n            if (i !== 0 && (chr === '-' || chr === '_')) {\n                nextChrUpper = true;\n            }\n            else if (chr !== '-' && chr !== '_') {\n                camelcase += chr;\n            }\n        }\n        return camelcase;\n    }\n}\nexport function decamelize(str, joinString) {\n    const lowercase = str.toLowerCase();\n    joinString = joinString || '-';\n    let notCamelcase = '';\n    for (let i = 0; i < str.length; i++) {\n        const chrLower = lowercase.charAt(i);\n        const chrString = str.charAt(i);\n        if (chrLower !== chrString && i > 0) {\n            notCamelcase += `${joinString}${lowercase.charAt(i)}`;\n        }\n        else {\n            notCamelcase += chrString;\n        }\n    }\n    return notCamelcase;\n}\nexport function looksLikeNumber(x) {\n    if (x === null || x === undefined)\n        return false;\n    // if loaded from config, may already be a number.\n    if (typeof x === 'number')\n        return true;\n    // hexadecimal.\n    if (/^0x[0-9a-f]+$/i.test(x))\n        return true;\n    // don't treat 0123 as a number; as it drops the leading '0'.\n    if (/^0[^.]/.test(x))\n        return false;\n    return /^[-]?(?:\\d+(?:\\.\\d*)?|\\.\\d+)(e[-+]?\\d+)?$/.test(x);\n}\n","/**\n * @license\n * Copyright (c) 2016, Contributors\n * SPDX-License-Identifier: ISC\n */\n// take an un-split argv string and tokenize it.\nexport function tokenizeArgString(argString) {\n    if (Array.isArray(argString)) {\n        return argString.map(e => typeof e !== 'string' ? e + '' : e);\n    }\n    argString = argString.trim();\n    let i = 0;\n    let prevC = null;\n    let c = null;\n    let opening = null;\n    const args = [];\n    for (let ii = 0; ii < argString.length; ii++) {\n        prevC = c;\n        c = argString.charAt(ii);\n        // split on spaces unless we're in quotes.\n        if (c === ' ' && !opening) {\n            if (!(prevC === ' ')) {\n                i++;\n            }\n            continue;\n        }\n        // don't split the string if we're in matching\n        // opening or closing single and double quotes.\n        if (c === opening) {\n            opening = null;\n        }\n        else if ((c === \"'\" || c === '\"') && !opening) {\n            opening = c;\n        }\n        if (!args[i])\n            args[i] = '';\n        args[i] += c;\n    }\n    return args;\n}\n","/**\n * @license\n * Copyright (c) 2016, Contributors\n * SPDX-License-Identifier: ISC\n */\nexport var DefaultValuesForTypeKey;\n(function (DefaultValuesForTypeKey) {\n    DefaultValuesForTypeKey[\"BOOLEAN\"] = \"boolean\";\n    DefaultValuesForTypeKey[\"STRING\"] = \"string\";\n    DefaultValuesForTypeKey[\"NUMBER\"] = \"number\";\n    DefaultValuesForTypeKey[\"ARRAY\"] = \"array\";\n})(DefaultValuesForTypeKey || (DefaultValuesForTypeKey = {}));\n","/**\n * @license\n * Copyright (c) 2016, Contributors\n * SPDX-License-Identifier: ISC\n */\n/* eslint-disable prefer-arrow-callback */\nimport { tokenizeArgString } from './tokenize-arg-string.js';\nimport { DefaultValuesForTypeKey } from './yargs-parser-types.js';\nimport { camelCase, decamelize, looksLikeNumber } from './string-utils.js';\nlet mixin;\nexport class YargsParser {\n    constructor(_mixin) {\n        mixin = _mixin;\n    }\n    parse(argsInput, options) {\n        const opts = Object.assign({\n            alias: undefined,\n            array: undefined,\n            boolean: undefined,\n            config: undefined,\n            configObjects: undefined,\n            configuration: undefined,\n            coerce: undefined,\n            count: undefined,\n            default: undefined,\n            envPrefix: undefined,\n            narg: undefined,\n            normalize: undefined,\n            string: undefined,\n            number: undefined,\n            __: undefined,\n            key: undefined\n        }, options);\n        // allow a string argument to be passed in rather\n        // than an argv array.\n        const args = tokenizeArgString(argsInput);\n        // tokenizeArgString adds extra quotes to args if argsInput is a string\n        // only strip those extra quotes in processValue if argsInput is a string\n        const inputIsString = typeof argsInput === 'string';\n        // aliases might have transitive relationships, normalize this.\n        const aliases = combineAliases(Object.assign(Object.create(null), opts.alias));\n        const configuration = Object.assign({\n            'boolean-negation': true,\n            'camel-case-expansion': true,\n            'combine-arrays': false,\n            'dot-notation': true,\n            'duplicate-arguments-array': true,\n            'flatten-duplicate-arrays': true,\n            'greedy-arrays': true,\n            'halt-at-non-option': false,\n            'nargs-eats-options': false,\n            'negation-prefix': 'no-',\n            'parse-numbers': true,\n            'parse-positional-numbers': true,\n            'populate--': false,\n            'set-placeholder-key': false,\n            'short-option-groups': true,\n            'strip-aliased': false,\n            'strip-dashed': false,\n            'unknown-options-as-args': false\n        }, opts.configuration);\n        const defaults = Object.assign(Object.create(null), opts.default);\n        const configObjects = opts.configObjects || [];\n        const envPrefix = opts.envPrefix;\n        const notFlagsOption = configuration['populate--'];\n        const notFlagsArgv = notFlagsOption ? '--' : '_';\n        const newAliases = Object.create(null);\n        const defaulted = Object.create(null);\n        // allow a i18n handler to be passed in, default to a fake one (util.format).\n        const __ = opts.__ || mixin.format;\n        const flags = {\n            aliases: Object.create(null),\n            arrays: Object.create(null),\n            bools: Object.create(null),\n            strings: Object.create(null),\n            numbers: Object.create(null),\n            counts: Object.create(null),\n            normalize: Object.create(null),\n            configs: Object.create(null),\n            nargs: Object.create(null),\n            coercions: Object.create(null),\n            keys: []\n        };\n        const negative = /^-([0-9]+(\\.[0-9]+)?|\\.[0-9]+)$/;\n        const negatedBoolean = new RegExp('^--' + configuration['negation-prefix'] + '(.+)');\n        [].concat(opts.array || []).filter(Boolean).forEach(function (opt) {\n            const key = typeof opt === 'object' ? opt.key : opt;\n            // assign to flags[bools|strings|numbers]\n            const assignment = Object.keys(opt).map(function (key) {\n                const arrayFlagKeys = {\n                    boolean: 'bools',\n                    string: 'strings',\n                    number: 'numbers'\n                };\n                return arrayFlagKeys[key];\n            }).filter(Boolean).pop();\n            // assign key to be coerced\n            if (assignment) {\n                flags[assignment][key] = true;\n            }\n            flags.arrays[key] = true;\n            flags.keys.push(key);\n        });\n        [].concat(opts.boolean || []).filter(Boolean).forEach(function (key) {\n            flags.bools[key] = true;\n            flags.keys.push(key);\n        });\n        [].concat(opts.string || []).filter(Boolean).forEach(function (key) {\n            flags.strings[key] = true;\n            flags.keys.push(key);\n        });\n        [].concat(opts.number || []).filter(Boolean).forEach(function (key) {\n            flags.numbers[key] = true;\n            flags.keys.push(key);\n        });\n        [].concat(opts.count || []).filter(Boolean).forEach(function (key) {\n            flags.counts[key] = true;\n            flags.keys.push(key);\n        });\n        [].concat(opts.normalize || []).filter(Boolean).forEach(function (key) {\n            flags.normalize[key] = true;\n            flags.keys.push(key);\n        });\n        if (typeof opts.narg === 'object') {\n            Object.entries(opts.narg).forEach(([key, value]) => {\n                if (typeof value === 'number') {\n                    flags.nargs[key] = value;\n                    flags.keys.push(key);\n                }\n            });\n        }\n        if (typeof opts.coerce === 'object') {\n            Object.entries(opts.coerce).forEach(([key, value]) => {\n                if (typeof value === 'function') {\n                    flags.coercions[key] = value;\n                    flags.keys.push(key);\n                }\n            });\n        }\n        if (typeof opts.config !== 'undefined') {\n            if (Array.isArray(opts.config) || typeof opts.config === 'string') {\n                ;\n                [].concat(opts.config).filter(Boolean).forEach(function (key) {\n                    flags.configs[key] = true;\n                });\n            }\n            else if (typeof opts.config === 'object') {\n                Object.entries(opts.config).forEach(([key, value]) => {\n                    if (typeof value === 'boolean' || typeof value === 'function') {\n                        flags.configs[key] = value;\n                    }\n                });\n            }\n        }\n        // create a lookup table that takes into account all\n        // combinations of aliases: {f: ['foo'], foo: ['f']}\n        extendAliases(opts.key, aliases, opts.default, flags.arrays);\n        // apply default values to all aliases.\n        Object.keys(defaults).forEach(function (key) {\n            (flags.aliases[key] || []).forEach(function (alias) {\n                defaults[alias] = defaults[key];\n            });\n        });\n        let error = null;\n        checkConfiguration();\n        let notFlags = [];\n        const argv = Object.assign(Object.create(null), { _: [] });\n        // TODO(bcoe): for the first pass at removing object prototype  we didn't\n        // remove all prototypes from objects returned by this API, we might want\n        // to gradually move towards doing so.\n        const argvReturn = {};\n        for (let i = 0; i < args.length; i++) {\n            const arg = args[i];\n            const truncatedArg = arg.replace(/^-{3,}/, '---');\n            let broken;\n            let key;\n            let letters;\n            let m;\n            let next;\n            let value;\n            // any unknown option (except for end-of-options, \"--\")\n            if (arg !== '--' && /^-/.test(arg) && isUnknownOptionAsArg(arg)) {\n                pushPositional(arg);\n                // ---, ---=, ----, etc,\n            }\n            else if (truncatedArg.match(/^---+(=|$)/)) {\n                // options without key name are invalid.\n                pushPositional(arg);\n                continue;\n                // -- separated by =\n            }\n            else if (arg.match(/^--.+=/) || (!configuration['short-option-groups'] && arg.match(/^-.+=/))) {\n                // Using [\\s\\S] instead of . because js doesn't support the\n                // 'dotall' regex modifier. See:\n                // http://stackoverflow.com/a/1068308/13216\n                m = arg.match(/^--?([^=]+)=([\\s\\S]*)$/);\n                // arrays format = '--f=a b c'\n                if (m !== null && Array.isArray(m) && m.length >= 3) {\n                    if (checkAllAliases(m[1], flags.arrays)) {\n                        i = eatArray(i, m[1], args, m[2]);\n                    }\n                    else if (checkAllAliases(m[1], flags.nargs) !== false) {\n                        // nargs format = '--f=monkey washing cat'\n                        i = eatNargs(i, m[1], args, m[2]);\n                    }\n                    else {\n                        setArg(m[1], m[2], true);\n                    }\n                }\n            }\n            else if (arg.match(negatedBoolean) && configuration['boolean-negation']) {\n                m = arg.match(negatedBoolean);\n                if (m !== null && Array.isArray(m) && m.length >= 2) {\n                    key = m[1];\n                    setArg(key, checkAllAliases(key, flags.arrays) ? [false] : false);\n                }\n                // -- separated by space.\n            }\n            else if (arg.match(/^--.+/) || (!configuration['short-option-groups'] && arg.match(/^-[^-]+/))) {\n                m = arg.match(/^--?(.+)/);\n                if (m !== null && Array.isArray(m) && m.length >= 2) {\n                    key = m[1];\n                    if (checkAllAliases(key, flags.arrays)) {\n                        // array format = '--foo a b c'\n                        i = eatArray(i, key, args);\n                    }\n                    else if (checkAllAliases(key, flags.nargs) !== false) {\n                        // nargs format = '--foo a b c'\n                        // should be truthy even if: flags.nargs[key] === 0\n                        i = eatNargs(i, key, args);\n                    }\n                    else {\n                        next = args[i + 1];\n                        if (next !== undefined && (!next.match(/^-/) ||\n                            next.match(negative)) &&\n                            !checkAllAliases(key, flags.bools) &&\n                            !checkAllAliases(key, flags.counts)) {\n                            setArg(key, next);\n                            i++;\n                        }\n                        else if (/^(true|false)$/.test(next)) {\n                            setArg(key, next);\n                            i++;\n                        }\n                        else {\n                            setArg(key, defaultValue(key));\n                        }\n                    }\n                }\n                // dot-notation flag separated by '='.\n            }\n            else if (arg.match(/^-.\\..+=/)) {\n                m = arg.match(/^-([^=]+)=([\\s\\S]*)$/);\n                if (m !== null && Array.isArray(m) && m.length >= 3) {\n                    setArg(m[1], m[2]);\n                }\n                // dot-notation flag separated by space.\n            }\n            else if (arg.match(/^-.\\..+/) && !arg.match(negative)) {\n                next = args[i + 1];\n                m = arg.match(/^-(.\\..+)/);\n                if (m !== null && Array.isArray(m) && m.length >= 2) {\n                    key = m[1];\n                    if (next !== undefined && !next.match(/^-/) &&\n                        !checkAllAliases(key, flags.bools) &&\n                        !checkAllAliases(key, flags.counts)) {\n                        setArg(key, next);\n                        i++;\n                    }\n                    else {\n                        setArg(key, defaultValue(key));\n                    }\n                }\n            }\n            else if (arg.match(/^-[^-]+/) && !arg.match(negative)) {\n                letters = arg.slice(1, -1).split('');\n                broken = false;\n                for (let j = 0; j < letters.length; j++) {\n                    next = arg.slice(j + 2);\n                    if (letters[j + 1] && letters[j + 1] === '=') {\n                        value = arg.slice(j + 3);\n                        key = letters[j];\n                        if (checkAllAliases(key, flags.arrays)) {\n                            // array format = '-f=a b c'\n                            i = eatArray(i, key, args, value);\n                        }\n                        else if (checkAllAliases(key, flags.nargs) !== false) {\n                            // nargs format = '-f=monkey washing cat'\n                            i = eatNargs(i, key, args, value);\n                        }\n                        else {\n                            setArg(key, value);\n                        }\n                        broken = true;\n                        break;\n                    }\n                    if (next === '-') {\n                        setArg(letters[j], next);\n                        continue;\n                    }\n                    // current letter is an alphabetic character and next value is a number\n                    if (/[A-Za-z]/.test(letters[j]) &&\n                        /^-?\\d+(\\.\\d*)?(e-?\\d+)?$/.test(next) &&\n                        checkAllAliases(next, flags.bools) === false) {\n                        setArg(letters[j], next);\n                        broken = true;\n                        break;\n                    }\n                    if (letters[j + 1] && letters[j + 1].match(/\\W/)) {\n                        setArg(letters[j], next);\n                        broken = true;\n                        break;\n                    }\n                    else {\n                        setArg(letters[j], defaultValue(letters[j]));\n                    }\n                }\n                key = arg.slice(-1)[0];\n                if (!broken && key !== '-') {\n                    if (checkAllAliases(key, flags.arrays)) {\n                        // array format = '-f a b c'\n                        i = eatArray(i, key, args);\n                    }\n                    else if (checkAllAliases(key, flags.nargs) !== false) {\n                        // nargs format = '-f a b c'\n                        // should be truthy even if: flags.nargs[key] === 0\n                        i = eatNargs(i, key, args);\n                    }\n                    else {\n                        next = args[i + 1];\n                        if (next !== undefined && (!/^(-|--)[^-]/.test(next) ||\n                            next.match(negative)) &&\n                            !checkAllAliases(key, flags.bools) &&\n                            !checkAllAliases(key, flags.counts)) {\n                            setArg(key, next);\n                            i++;\n                        }\n                        else if (/^(true|false)$/.test(next)) {\n                            setArg(key, next);\n                            i++;\n                        }\n                        else {\n                            setArg(key, defaultValue(key));\n                        }\n                    }\n                }\n            }\n            else if (arg.match(/^-[0-9]$/) &&\n                arg.match(negative) &&\n                checkAllAliases(arg.slice(1), flags.bools)) {\n                // single-digit boolean alias, e.g: xargs -0\n                key = arg.slice(1);\n                setArg(key, defaultValue(key));\n            }\n            else if (arg === '--') {\n                notFlags = args.slice(i + 1);\n                break;\n            }\n            else if (configuration['halt-at-non-option']) {\n                notFlags = args.slice(i);\n                break;\n            }\n            else {\n                pushPositional(arg);\n            }\n        }\n        // order of precedence:\n        // 1. command line arg\n        // 2. value from env var\n        // 3. value from config file\n        // 4. value from config objects\n        // 5. configured default value\n        applyEnvVars(argv, true); // special case: check env vars that point to config file\n        applyEnvVars(argv, false);\n        setConfig(argv);\n        setConfigObjects();\n        applyDefaultsAndAliases(argv, flags.aliases, defaults, true);\n        applyCoercions(argv);\n        if (configuration['set-placeholder-key'])\n            setPlaceholderKeys(argv);\n        // for any counts either not in args or without an explicit default, set to 0\n        Object.keys(flags.counts).forEach(function (key) {\n            if (!hasKey(argv, key.split('.')))\n                setArg(key, 0);\n        });\n        // '--' defaults to undefined.\n        if (notFlagsOption && notFlags.length)\n            argv[notFlagsArgv] = [];\n        notFlags.forEach(function (key) {\n            argv[notFlagsArgv].push(key);\n        });\n        if (configuration['camel-case-expansion'] && configuration['strip-dashed']) {\n            Object.keys(argv).filter(key => key !== '--' && key.includes('-')).forEach(key => {\n                delete argv[key];\n            });\n        }\n        if (configuration['strip-aliased']) {\n            ;\n            [].concat(...Object.keys(aliases).map(k => aliases[k])).forEach(alias => {\n                if (configuration['camel-case-expansion'] && alias.includes('-')) {\n                    delete argv[alias.split('.').map(prop => camelCase(prop)).join('.')];\n                }\n                delete argv[alias];\n            });\n        }\n        // Push argument into positional array, applying numeric coercion:\n        function pushPositional(arg) {\n            const maybeCoercedNumber = maybeCoerceNumber('_', arg);\n            if (typeof maybeCoercedNumber === 'string' || typeof maybeCoercedNumber === 'number') {\n                argv._.push(maybeCoercedNumber);\n            }\n        }\n        // how many arguments should we consume, based\n        // on the nargs option?\n        function eatNargs(i, key, args, argAfterEqualSign) {\n            let ii;\n            let toEat = checkAllAliases(key, flags.nargs);\n            // NaN has a special meaning for the array type, indicating that one or\n            // more values are expected.\n            toEat = typeof toEat !== 'number' || isNaN(toEat) ? 1 : toEat;\n            if (toEat === 0) {\n                if (!isUndefined(argAfterEqualSign)) {\n                    error = Error(__('Argument unexpected for: %s', key));\n                }\n                setArg(key, defaultValue(key));\n                return i;\n            }\n            let available = isUndefined(argAfterEqualSign) ? 0 : 1;\n            if (configuration['nargs-eats-options']) {\n                // classic behavior, yargs eats positional and dash arguments.\n                if (args.length - (i + 1) + available < toEat) {\n                    error = Error(__('Not enough arguments following: %s', key));\n                }\n                available = toEat;\n            }\n            else {\n                // nargs will not consume flag arguments, e.g., -abc, --foo,\n                // and terminates when one is observed.\n                for (ii = i + 1; ii < args.length; ii++) {\n                    if (!args[ii].match(/^-[^0-9]/) || args[ii].match(negative) || isUnknownOptionAsArg(args[ii]))\n                        available++;\n                    else\n                        break;\n                }\n                if (available < toEat)\n                    error = Error(__('Not enough arguments following: %s', key));\n            }\n            let consumed = Math.min(available, toEat);\n            if (!isUndefined(argAfterEqualSign) && consumed > 0) {\n                setArg(key, argAfterEqualSign);\n                consumed--;\n            }\n            for (ii = i + 1; ii < (consumed + i + 1); ii++) {\n                setArg(key, args[ii]);\n            }\n            return (i + consumed);\n        }\n        // if an option is an array, eat all non-hyphenated arguments\n        // following it... YUM!\n        // e.g., --foo apple banana cat becomes [\"apple\", \"banana\", \"cat\"]\n        function eatArray(i, key, args, argAfterEqualSign) {\n            let argsToSet = [];\n            let next = argAfterEqualSign || args[i + 1];\n            // If both array and nargs are configured, enforce the nargs count:\n            const nargsCount = checkAllAliases(key, flags.nargs);\n            if (checkAllAliases(key, flags.bools) && !(/^(true|false)$/.test(next))) {\n                argsToSet.push(true);\n            }\n            else if (isUndefined(next) ||\n                (isUndefined(argAfterEqualSign) && /^-/.test(next) && !negative.test(next) && !isUnknownOptionAsArg(next))) {\n                // for keys without value ==> argsToSet remains an empty []\n                // set user default value, if available\n                if (defaults[key] !== undefined) {\n                    const defVal = defaults[key];\n                    argsToSet = Array.isArray(defVal) ? defVal : [defVal];\n                }\n            }\n            else {\n                // value in --option=value is eaten as is\n                if (!isUndefined(argAfterEqualSign)) {\n                    argsToSet.push(processValue(key, argAfterEqualSign, true));\n                }\n                for (let ii = i + 1; ii < args.length; ii++) {\n                    if ((!configuration['greedy-arrays'] && argsToSet.length > 0) ||\n                        (nargsCount && typeof nargsCount === 'number' && argsToSet.length >= nargsCount))\n                        break;\n                    next = args[ii];\n                    if (/^-/.test(next) && !negative.test(next) && !isUnknownOptionAsArg(next))\n                        break;\n                    i = ii;\n                    argsToSet.push(processValue(key, next, inputIsString));\n                }\n            }\n            // If both array and nargs are configured, create an error if less than\n            // nargs positionals were found. NaN has special meaning, indicating\n            // that at least one value is required (more are okay).\n            if (typeof nargsCount === 'number' && ((nargsCount && argsToSet.length < nargsCount) ||\n                (isNaN(nargsCount) && argsToSet.length === 0))) {\n                error = Error(__('Not enough arguments following: %s', key));\n            }\n            setArg(key, argsToSet);\n            return i;\n        }\n        function setArg(key, val, shouldStripQuotes = inputIsString) {\n            if (/-/.test(key) && configuration['camel-case-expansion']) {\n                const alias = key.split('.').map(function (prop) {\n                    return camelCase(prop);\n                }).join('.');\n                addNewAlias(key, alias);\n            }\n            const value = processValue(key, val, shouldStripQuotes);\n            const splitKey = key.split('.');\n            setKey(argv, splitKey, value);\n            // handle populating aliases of the full key\n            if (flags.aliases[key]) {\n                flags.aliases[key].forEach(function (x) {\n                    const keyProperties = x.split('.');\n                    setKey(argv, keyProperties, value);\n                });\n            }\n            // handle populating aliases of the first element of the dot-notation key\n            if (splitKey.length > 1 && configuration['dot-notation']) {\n                ;\n                (flags.aliases[splitKey[0]] || []).forEach(function (x) {\n                    let keyProperties = x.split('.');\n                    // expand alias with nested objects in key\n                    const a = [].concat(splitKey);\n                    a.shift(); // nuke the old key.\n                    keyProperties = keyProperties.concat(a);\n                    // populate alias only if is not already an alias of the full key\n                    // (already populated above)\n                    if (!(flags.aliases[key] || []).includes(keyProperties.join('.'))) {\n                        setKey(argv, keyProperties, value);\n                    }\n                });\n            }\n            // Set normalize getter and setter when key is in 'normalize' but isn't an array\n            if (checkAllAliases(key, flags.normalize) && !checkAllAliases(key, flags.arrays)) {\n                const keys = [key].concat(flags.aliases[key] || []);\n                keys.forEach(function (key) {\n                    Object.defineProperty(argvReturn, key, {\n                        enumerable: true,\n                        get() {\n                            return val;\n                        },\n                        set(value) {\n                            val = typeof value === 'string' ? mixin.normalize(value) : value;\n                        }\n                    });\n                });\n            }\n        }\n        function addNewAlias(key, alias) {\n            if (!(flags.aliases[key] && flags.aliases[key].length)) {\n                flags.aliases[key] = [alias];\n                newAliases[alias] = true;\n            }\n            if (!(flags.aliases[alias] && flags.aliases[alias].length)) {\n                addNewAlias(alias, key);\n            }\n        }\n        function processValue(key, val, shouldStripQuotes) {\n            // strings may be quoted, clean this up as we assign values.\n            if (shouldStripQuotes) {\n                val = stripQuotes(val);\n            }\n            // handle parsing boolean arguments --foo=true --bar false.\n            if (checkAllAliases(key, flags.bools) || checkAllAliases(key, flags.counts)) {\n                if (typeof val === 'string')\n                    val = val === 'true';\n            }\n            let value = Array.isArray(val)\n                ? val.map(function (v) { return maybeCoerceNumber(key, v); })\n                : maybeCoerceNumber(key, val);\n            // increment a count given as arg (either no value or value parsed as boolean)\n            if (checkAllAliases(key, flags.counts) && (isUndefined(value) || typeof value === 'boolean')) {\n                value = increment();\n            }\n            // Set normalized value when key is in 'normalize' and in 'arrays'\n            if (checkAllAliases(key, flags.normalize) && checkAllAliases(key, flags.arrays)) {\n                if (Array.isArray(val))\n                    value = val.map((val) => { return mixin.normalize(val); });\n                else\n                    value = mixin.normalize(val);\n            }\n            return value;\n        }\n        function maybeCoerceNumber(key, value) {\n            if (!configuration['parse-positional-numbers'] && key === '_')\n                return value;\n            if (!checkAllAliases(key, flags.strings) && !checkAllAliases(key, flags.bools) && !Array.isArray(value)) {\n                const shouldCoerceNumber = looksLikeNumber(value) && configuration['parse-numbers'] && (Number.isSafeInteger(Math.floor(parseFloat(`${value}`))));\n                if (shouldCoerceNumber || (!isUndefined(value) && checkAllAliases(key, flags.numbers))) {\n                    value = Number(value);\n                }\n            }\n            return value;\n        }\n        // set args from config.json file, this should be\n        // applied last so that defaults can be applied.\n        function setConfig(argv) {\n            const configLookup = Object.create(null);\n            // expand defaults/aliases, in-case any happen to reference\n            // the config.json file.\n            applyDefaultsAndAliases(configLookup, flags.aliases, defaults);\n            Object.keys(flags.configs).forEach(function (configKey) {\n                const configPath = argv[configKey] || configLookup[configKey];\n                if (configPath) {\n                    try {\n                        let config = null;\n                        const resolvedConfigPath = mixin.resolve(mixin.cwd(), configPath);\n                        const resolveConfig = flags.configs[configKey];\n                        if (typeof resolveConfig === 'function') {\n                            try {\n                                config = resolveConfig(resolvedConfigPath);\n                            }\n                            catch (e) {\n                                config = e;\n                            }\n                            if (config instanceof Error) {\n                                error = config;\n                                return;\n                            }\n                        }\n                        else {\n                            config = mixin.require(resolvedConfigPath);\n                        }\n                        setConfigObject(config);\n                    }\n                    catch (ex) {\n                        // Deno will receive a PermissionDenied error if an attempt is\n                        // made to load config without the --allow-read flag:\n                        if (ex.name === 'PermissionDenied')\n                            error = ex;\n                        else if (argv[configKey])\n                            error = Error(__('Invalid JSON config file: %s', configPath));\n                    }\n                }\n            });\n        }\n        // set args from config object.\n        // it recursively checks nested objects.\n        function setConfigObject(config, prev) {\n            Object.keys(config).forEach(function (key) {\n                const value = config[key];\n                const fullKey = prev ? prev + '.' + key : key;\n                // if the value is an inner object and we have dot-notation\n                // enabled, treat inner objects in config the same as\n                // heavily nested dot notations (foo.bar.apple).\n                if (typeof value === 'object' && value !== null && !Array.isArray(value) && configuration['dot-notation']) {\n                    // if the value is an object but not an array, check nested object\n                    setConfigObject(value, fullKey);\n                }\n                else {\n                    // setting arguments via CLI takes precedence over\n                    // values within the config file.\n                    if (!hasKey(argv, fullKey.split('.')) || (checkAllAliases(fullKey, flags.arrays) && configuration['combine-arrays'])) {\n                        setArg(fullKey, value);\n                    }\n                }\n            });\n        }\n        // set all config objects passed in opts\n        function setConfigObjects() {\n            if (typeof configObjects !== 'undefined') {\n                configObjects.forEach(function (configObject) {\n                    setConfigObject(configObject);\n                });\n            }\n        }\n        function applyEnvVars(argv, configOnly) {\n            if (typeof envPrefix === 'undefined')\n                return;\n            const prefix = typeof envPrefix === 'string' ? envPrefix : '';\n            const env = mixin.env();\n            Object.keys(env).forEach(function (envVar) {\n                if (prefix === '' || envVar.lastIndexOf(prefix, 0) === 0) {\n                    // get array of nested keys and convert them to camel case\n                    const keys = envVar.split('__').map(function (key, i) {\n                        if (i === 0) {\n                            key = key.substring(prefix.length);\n                        }\n                        return camelCase(key);\n                    });\n                    if (((configOnly && flags.configs[keys.join('.')]) || !configOnly) && !hasKey(argv, keys)) {\n                        setArg(keys.join('.'), env[envVar]);\n                    }\n                }\n            });\n        }\n        function applyCoercions(argv) {\n            let coerce;\n            const applied = new Set();\n            Object.keys(argv).forEach(function (key) {\n                if (!applied.has(key)) { // If we haven't already coerced this option via one of its aliases\n                    coerce = checkAllAliases(key, flags.coercions);\n                    if (typeof coerce === 'function') {\n                        try {\n                            const value = maybeCoerceNumber(key, coerce(argv[key]));\n                            ([].concat(flags.aliases[key] || [], key)).forEach(ali => {\n                                applied.add(ali);\n                                argv[ali] = value;\n                            });\n                        }\n                        catch (err) {\n                            error = err;\n                        }\n                    }\n                }\n            });\n        }\n        function setPlaceholderKeys(argv) {\n            flags.keys.forEach((key) => {\n                // don't set placeholder keys for dot notation options 'foo.bar'.\n                if (~key.indexOf('.'))\n                    return;\n                if (typeof argv[key] === 'undefined')\n                    argv[key] = undefined;\n            });\n            return argv;\n        }\n        function applyDefaultsAndAliases(obj, aliases, defaults, canLog = false) {\n            Object.keys(defaults).forEach(function (key) {\n                if (!hasKey(obj, key.split('.'))) {\n                    setKey(obj, key.split('.'), defaults[key]);\n                    if (canLog)\n                        defaulted[key] = true;\n                    (aliases[key] || []).forEach(function (x) {\n                        if (hasKey(obj, x.split('.')))\n                            return;\n                        setKey(obj, x.split('.'), defaults[key]);\n                    });\n                }\n            });\n        }\n        function hasKey(obj, keys) {\n            let o = obj;\n            if (!configuration['dot-notation'])\n                keys = [keys.join('.')];\n            keys.slice(0, -1).forEach(function (key) {\n                o = (o[key] || {});\n            });\n            const key = keys[keys.length - 1];\n            if (typeof o !== 'object')\n                return false;\n            else\n                return key in o;\n        }\n        function setKey(obj, keys, value) {\n            let o = obj;\n            if (!configuration['dot-notation'])\n                keys = [keys.join('.')];\n            keys.slice(0, -1).forEach(function (key) {\n                // TODO(bcoe): in the next major version of yargs, switch to\n                // Object.create(null) for dot notation:\n                key = sanitizeKey(key);\n                if (typeof o === 'object' && o[key] === undefined) {\n                    o[key] = {};\n                }\n                if (typeof o[key] !== 'object' || Array.isArray(o[key])) {\n                    // ensure that o[key] is an array, and that the last item is an empty object.\n                    if (Array.isArray(o[key])) {\n                        o[key].push({});\n                    }\n                    else {\n                        o[key] = [o[key], {}];\n                    }\n                    // we want to update the empty object at the end of the o[key] array, so set o to that object\n                    o = o[key][o[key].length - 1];\n                }\n                else {\n                    o = o[key];\n                }\n            });\n            // TODO(bcoe): in the next major version of yargs, switch to\n            // Object.create(null) for dot notation:\n            const key = sanitizeKey(keys[keys.length - 1]);\n            const isTypeArray = checkAllAliases(keys.join('.'), flags.arrays);\n            const isValueArray = Array.isArray(value);\n            let duplicate = configuration['duplicate-arguments-array'];\n            // nargs has higher priority than duplicate\n            if (!duplicate && checkAllAliases(key, flags.nargs)) {\n                duplicate = true;\n                if ((!isUndefined(o[key]) && flags.nargs[key] === 1) || (Array.isArray(o[key]) && o[key].length === flags.nargs[key])) {\n                    o[key] = undefined;\n                }\n            }\n            if (value === increment()) {\n                o[key] = increment(o[key]);\n            }\n            else if (Array.isArray(o[key])) {\n                if (duplicate && isTypeArray && isValueArray) {\n                    o[key] = configuration['flatten-duplicate-arrays'] ? o[key].concat(value) : (Array.isArray(o[key][0]) ? o[key] : [o[key]]).concat([value]);\n                }\n                else if (!duplicate && Boolean(isTypeArray) === Boolean(isValueArray)) {\n                    o[key] = value;\n                }\n                else {\n                    o[key] = o[key].concat([value]);\n                }\n            }\n            else if (o[key] === undefined && isTypeArray) {\n                o[key] = isValueArray ? value : [value];\n            }\n            else if (duplicate && !(o[key] === undefined ||\n                checkAllAliases(key, flags.counts) ||\n                checkAllAliases(key, flags.bools))) {\n                o[key] = [o[key], value];\n            }\n            else {\n                o[key] = value;\n            }\n        }\n        // extend the aliases list with inferred aliases.\n        function extendAliases(...args) {\n            args.forEach(function (obj) {\n                Object.keys(obj || {}).forEach(function (key) {\n                    // short-circuit if we've already added a key\n                    // to the aliases array, for example it might\n                    // exist in both 'opts.default' and 'opts.key'.\n                    if (flags.aliases[key])\n                        return;\n                    flags.aliases[key] = [].concat(aliases[key] || []);\n                    // For \"--option-name\", also set argv.optionName\n                    flags.aliases[key].concat(key).forEach(function (x) {\n                        if (/-/.test(x) && configuration['camel-case-expansion']) {\n                            const c = camelCase(x);\n                            if (c !== key && flags.aliases[key].indexOf(c) === -1) {\n                                flags.aliases[key].push(c);\n                                newAliases[c] = true;\n                            }\n                        }\n                    });\n                    // For \"--optionName\", also set argv['option-name']\n                    flags.aliases[key].concat(key).forEach(function (x) {\n                        if (x.length > 1 && /[A-Z]/.test(x) && configuration['camel-case-expansion']) {\n                            const c = decamelize(x, '-');\n                            if (c !== key && flags.aliases[key].indexOf(c) === -1) {\n                                flags.aliases[key].push(c);\n                                newAliases[c] = true;\n                            }\n                        }\n                    });\n                    flags.aliases[key].forEach(function (x) {\n                        flags.aliases[x] = [key].concat(flags.aliases[key].filter(function (y) {\n                            return x !== y;\n                        }));\n                    });\n                });\n            });\n        }\n        function checkAllAliases(key, flag) {\n            const toCheck = [].concat(flags.aliases[key] || [], key);\n            const keys = Object.keys(flag);\n            const setAlias = toCheck.find(key => keys.includes(key));\n            return setAlias ? flag[setAlias] : false;\n        }\n        function hasAnyFlag(key) {\n            const flagsKeys = Object.keys(flags);\n            const toCheck = [].concat(flagsKeys.map(k => flags[k]));\n            return toCheck.some(function (flag) {\n                return Array.isArray(flag) ? flag.includes(key) : flag[key];\n            });\n        }\n        function hasFlagsMatching(arg, ...patterns) {\n            const toCheck = [].concat(...patterns);\n            return toCheck.some(function (pattern) {\n                const match = arg.match(pattern);\n                return match && hasAnyFlag(match[1]);\n            });\n        }\n        // based on a simplified version of the short flag group parsing logic\n        function hasAllShortFlags(arg) {\n            // if this is a negative number, or doesn't start with a single hyphen, it's not a short flag group\n            if (arg.match(negative) || !arg.match(/^-[^-]+/)) {\n                return false;\n            }\n            let hasAllFlags = true;\n            let next;\n            const letters = arg.slice(1).split('');\n            for (let j = 0; j < letters.length; j++) {\n                next = arg.slice(j + 2);\n                if (!hasAnyFlag(letters[j])) {\n                    hasAllFlags = false;\n                    break;\n                }\n                if ((letters[j + 1] && letters[j + 1] === '=') ||\n                    next === '-' ||\n                    (/[A-Za-z]/.test(letters[j]) && /^-?\\d+(\\.\\d*)?(e-?\\d+)?$/.test(next)) ||\n                    (letters[j + 1] && letters[j + 1].match(/\\W/))) {\n                    break;\n                }\n            }\n            return hasAllFlags;\n        }\n        function isUnknownOptionAsArg(arg) {\n            return configuration['unknown-options-as-args'] && isUnknownOption(arg);\n        }\n        function isUnknownOption(arg) {\n            arg = arg.replace(/^-{3,}/, '--');\n            // ignore negative numbers\n            if (arg.match(negative)) {\n                return false;\n            }\n            // if this is a short option group and all of them are configured, it isn't unknown\n            if (hasAllShortFlags(arg)) {\n                return false;\n            }\n            // e.g. '--count=2'\n            const flagWithEquals = /^-+([^=]+?)=[\\s\\S]*$/;\n            // e.g. '-a' or '--arg'\n            const normalFlag = /^-+([^=]+?)$/;\n            // e.g. '-a-'\n            const flagEndingInHyphen = /^-+([^=]+?)-$/;\n            // e.g. '-abc123'\n            const flagEndingInDigits = /^-+([^=]+?\\d+)$/;\n            // e.g. '-a/usr/local'\n            const flagEndingInNonWordCharacters = /^-+([^=]+?)\\W+.*$/;\n            // check the different types of flag styles, including negatedBoolean, a pattern defined near the start of the parse method\n            return !hasFlagsMatching(arg, flagWithEquals, negatedBoolean, normalFlag, flagEndingInHyphen, flagEndingInDigits, flagEndingInNonWordCharacters);\n        }\n        // make a best effort to pick a default value\n        // for an option based on name and type.\n        function defaultValue(key) {\n            if (!checkAllAliases(key, flags.bools) &&\n                !checkAllAliases(key, flags.counts) &&\n                `${key}` in defaults) {\n                return defaults[key];\n            }\n            else {\n                return defaultForType(guessType(key));\n            }\n        }\n        // return a default value, given the type of a flag.,\n        function defaultForType(type) {\n            const def = {\n                [DefaultValuesForTypeKey.BOOLEAN]: true,\n                [DefaultValuesForTypeKey.STRING]: '',\n                [DefaultValuesForTypeKey.NUMBER]: undefined,\n                [DefaultValuesForTypeKey.ARRAY]: []\n            };\n            return def[type];\n        }\n        // given a flag, enforce a default type.\n        function guessType(key) {\n            let type = DefaultValuesForTypeKey.BOOLEAN;\n            if (checkAllAliases(key, flags.strings))\n                type = DefaultValuesForTypeKey.STRING;\n            else if (checkAllAliases(key, flags.numbers))\n                type = DefaultValuesForTypeKey.NUMBER;\n            else if (checkAllAliases(key, flags.bools))\n                type = DefaultValuesForTypeKey.BOOLEAN;\n            else if (checkAllAliases(key, flags.arrays))\n                type = DefaultValuesForTypeKey.ARRAY;\n            return type;\n        }\n        function isUndefined(num) {\n            return num === undefined;\n        }\n        // check user configuration settings for inconsistencies\n        function checkConfiguration() {\n            // count keys should not be set as array/narg\n            Object.keys(flags.counts).find(key => {\n                if (checkAllAliases(key, flags.arrays)) {\n                    error = Error(__('Invalid configuration: %s, opts.count excludes opts.array.', key));\n                    return true;\n                }\n                else if (checkAllAliases(key, flags.nargs)) {\n                    error = Error(__('Invalid configuration: %s, opts.count excludes opts.narg.', key));\n                    return true;\n                }\n                return false;\n            });\n        }\n        return {\n            aliases: Object.assign({}, flags.aliases),\n            argv: Object.assign(argvReturn, argv),\n            configuration: configuration,\n            defaulted: Object.assign({}, defaulted),\n            error: error,\n            newAliases: Object.assign({}, newAliases)\n        };\n    }\n}\n// if any aliases reference each other, we should\n// merge them together.\nfunction combineAliases(aliases) {\n    const aliasArrays = [];\n    const combined = Object.create(null);\n    let change = true;\n    // turn alias lookup hash {key: ['alias1', 'alias2']} into\n    // a simple array ['key', 'alias1', 'alias2']\n    Object.keys(aliases).forEach(function (key) {\n        aliasArrays.push([].concat(aliases[key], key));\n    });\n    // combine arrays until zero changes are\n    // made in an iteration.\n    while (change) {\n        change = false;\n        for (let i = 0; i < aliasArrays.length; i++) {\n            for (let ii = i + 1; ii < aliasArrays.length; ii++) {\n                const intersect = aliasArrays[i].filter(function (v) {\n                    return aliasArrays[ii].indexOf(v) !== -1;\n                });\n                if (intersect.length) {\n                    aliasArrays[i] = aliasArrays[i].concat(aliasArrays[ii]);\n                    aliasArrays.splice(ii, 1);\n                    change = true;\n                    break;\n                }\n            }\n        }\n    }\n    // map arrays back to the hash-lookup (de-dupe while\n    // we're at it).\n    aliasArrays.forEach(function (aliasArray) {\n        aliasArray = aliasArray.filter(function (v, i, self) {\n            return self.indexOf(v) === i;\n        });\n        const lastAlias = aliasArray.pop();\n        if (lastAlias !== undefined && typeof lastAlias === 'string') {\n            combined[lastAlias] = aliasArray;\n        }\n    });\n    return combined;\n}\n// this function should only be called when a count is given as an arg\n// it is NOT called to set a default value\n// thus we can start the count at 1 instead of 0\nfunction increment(orig) {\n    return orig !== undefined ? orig + 1 : 1;\n}\n// TODO(bcoe): in the next major version of yargs, switch to\n// Object.create(null) for dot notation:\nfunction sanitizeKey(key) {\n    if (key === '__proto__')\n        return '___proto___';\n    return key;\n}\nfunction stripQuotes(val) {\n    return (typeof val === 'string' &&\n        (val[0] === \"'\" || val[0] === '\"') &&\n        val[val.length - 1] === val[0])\n        ? val.substring(1, val.length - 1)\n        : val;\n}\n","/**\n * @fileoverview Main entrypoint for libraries using yargs-parser in Node.js\n *\n * @license\n * Copyright (c) 2016, Contributors\n * SPDX-License-Identifier: ISC\n */\nvar _a, _b, _c;\n/* eslint-disable n/no-unpublished-import */\nimport { format } from 'util';\nimport { normalize, resolve } from 'path';\nimport { camelCase, decamelize, looksLikeNumber } from './string-utils.js';\nimport { YargsParser } from './yargs-parser.js';\nimport { readFileSync } from 'fs';\nimport { createRequire } from 'node:module';\n// See https://github.com/yargs/yargs-parser#supported-nodejs-versions for our\n// version support policy. The YARGS_MIN_NODE_VERSION is used for testing only.\nconst minNodeVersion = (process && process.env && process.env.YARGS_MIN_NODE_VERSION)\n    ? Number(process.env.YARGS_MIN_NODE_VERSION)\n    : 20;\nconst nodeVersion = (_b = (_a = process === null || process === void 0 ? void 0 : process.versions) === null || _a === void 0 ? void 0 : _a.node) !== null && _b !== void 0 ? _b : (_c = process === null || process === void 0 ? void 0 : process.version) === null || _c === void 0 ? void 0 : _c.slice(1);\nif (nodeVersion) {\n    const major = Number(nodeVersion.match(/^([^.]+)/)[1]);\n    if (major < minNodeVersion) {\n        throw Error(`yargs parser supports a minimum Node.js version of ${minNodeVersion}. Read our version support policy: https://github.com/yargs/yargs-parser#supported-nodejs-versions`);\n    }\n}\n// Creates a yargs-parser instance using Node.js standard libraries:\nconst env = process ? process.env : {};\nconst require = createRequire ? createRequire(import.meta.url) : undefined;\nconst parser = new YargsParser({\n    cwd: process.cwd,\n    env: () => {\n        return env;\n    },\n    format,\n    normalize,\n    resolve,\n    require: (path) => {\n        if (typeof require !== 'undefined') {\n            return require(path);\n        }\n        else if (path.match(/\\.json$/)) {\n            // Addresses: https://github.com/yargs/yargs/issues/2040\n            return JSON.parse(readFileSync(path, 'utf8'));\n        }\n        else {\n            throw Error('only .json config files are supported in ESM');\n        }\n    }\n});\nconst yargsParser = function Parser(args, opts) {\n    const result = parser.parse(args.slice(), opts);\n    return result.argv;\n};\nyargsParser.detailed = function (args, opts) {\n    return parser.parse(args.slice(), opts);\n};\nyargsParser.camelCase = camelCase;\nyargsParser.decamelize = decamelize;\nyargsParser.looksLikeNumber = looksLikeNumber;\nexport default yargsParser;\n// special syntax to allow unqualified default export from CommonJS\nexport { yargsParser as 'module.exports' };\n","function getProcessArgvBinIndex() {\n    if (isBundledElectronApp())\n        return 0;\n    return 1;\n}\nfunction isBundledElectronApp() {\n    return isElectronApp() && !process.defaultApp;\n}\nfunction isElectronApp() {\n    return !!process.versions.electron;\n}\nexport function hideBin(argv) {\n    return argv.slice(getProcessArgvBinIndex() + 1);\n}\nexport function getProcessArgvBin() {\n    return process.argv[getProcessArgvBinIndex()];\n}\n","import { readFileSync, statSync, writeFile } from 'fs';\nimport { format } from 'util';\nimport { resolve } from 'path';\nexport default {\n    fs: {\n        readFileSync,\n        writeFile\n    },\n    format,\n    resolve,\n    exists: (file) => {\n        try {\n            return statSync(file).isFile();\n        }\n        catch (err) {\n            return false;\n        }\n    }\n};\n","let shim;\nclass Y18N {\n    constructor(opts) {\n        // configurable options.\n        opts = opts || {};\n        this.directory = opts.directory || './locales';\n        this.updateFiles = typeof opts.updateFiles === 'boolean' ? opts.updateFiles : true;\n        this.locale = opts.locale || 'en';\n        this.fallbackToLanguage = typeof opts.fallbackToLanguage === 'boolean' ? opts.fallbackToLanguage : true;\n        // internal stuff.\n        this.cache = Object.create(null);\n        this.writeQueue = [];\n    }\n    __(...args) {\n        if (typeof arguments[0] !== 'string') {\n            return this._taggedLiteral(arguments[0], ...arguments);\n        }\n        const str = args.shift();\n        let cb = function () { }; // start with noop.\n        if (typeof args[args.length - 1] === 'function')\n            cb = args.pop();\n        cb = cb || function () { }; // noop.\n        if (!this.cache[this.locale])\n            this._readLocaleFile();\n        // we've observed a new string, update the language file.\n        if (!this.cache[this.locale][str] && this.updateFiles) {\n            this.cache[this.locale][str] = str;\n            // include the current directory and locale,\n            // since these values could change before the\n            // write is performed.\n            this._enqueueWrite({\n                directory: this.directory,\n                locale: this.locale,\n                cb\n            });\n        }\n        else {\n            cb();\n        }\n        return shim.format.apply(shim.format, [this.cache[this.locale][str] || str].concat(args));\n    }\n    __n() {\n        const args = Array.prototype.slice.call(arguments);\n        const singular = args.shift();\n        const plural = args.shift();\n        const quantity = args.shift();\n        let cb = function () { }; // start with noop.\n        if (typeof args[args.length - 1] === 'function')\n            cb = args.pop();\n        if (!this.cache[this.locale])\n            this._readLocaleFile();\n        let str = quantity === 1 ? singular : plural;\n        if (this.cache[this.locale][singular]) {\n            const entry = this.cache[this.locale][singular];\n            str = entry[quantity === 1 ? 'one' : 'other'];\n        }\n        // we've observed a new string, update the language file.\n        if (!this.cache[this.locale][singular] && this.updateFiles) {\n            this.cache[this.locale][singular] = {\n                one: singular,\n                other: plural\n            };\n            // include the current directory and locale,\n            // since these values could change before the\n            // write is performed.\n            this._enqueueWrite({\n                directory: this.directory,\n                locale: this.locale,\n                cb\n            });\n        }\n        else {\n            cb();\n        }\n        // if a %d placeholder is provided, add quantity\n        // to the arguments expanded by util.format.\n        const values = [str];\n        if (~str.indexOf('%d'))\n            values.push(quantity);\n        return shim.format.apply(shim.format, values.concat(args));\n    }\n    setLocale(locale) {\n        this.locale = locale;\n    }\n    getLocale() {\n        return this.locale;\n    }\n    updateLocale(obj) {\n        if (!this.cache[this.locale])\n            this._readLocaleFile();\n        for (const key in obj) {\n            if (Object.prototype.hasOwnProperty.call(obj, key)) {\n                this.cache[this.locale][key] = obj[key];\n            }\n        }\n    }\n    _taggedLiteral(parts, ...args) {\n        let str = '';\n        parts.forEach(function (part, i) {\n            const arg = args[i + 1];\n            str += part;\n            if (typeof arg !== 'undefined') {\n                str += '%s';\n            }\n        });\n        return this.__.apply(this, [str].concat([].slice.call(args, 1)));\n    }\n    _enqueueWrite(work) {\n        this.writeQueue.push(work);\n        if (this.writeQueue.length === 1)\n            this._processWriteQueue();\n    }\n    _processWriteQueue() {\n        const _this = this;\n        const work = this.writeQueue[0];\n        // destructure the enqueued work.\n        const directory = work.directory;\n        const locale = work.locale;\n        const cb = work.cb;\n        const languageFile = this._resolveLocaleFile(directory, locale);\n        const serializedLocale = JSON.stringify(this.cache[locale], null, 2);\n        shim.fs.writeFile(languageFile, serializedLocale, 'utf-8', function (err) {\n            _this.writeQueue.shift();\n            if (_this.writeQueue.length > 0)\n                _this._processWriteQueue();\n            cb(err);\n        });\n    }\n    _readLocaleFile() {\n        let localeLookup = {};\n        const languageFile = this._resolveLocaleFile(this.directory, this.locale);\n        try {\n            // When using a bundler such as webpack, readFileSync may not be defined:\n            if (shim.fs.readFileSync) {\n                localeLookup = JSON.parse(shim.fs.readFileSync(languageFile, 'utf-8'));\n            }\n        }\n        catch (err) {\n            if (err instanceof SyntaxError) {\n                err.message = 'syntax error in ' + languageFile;\n            }\n            if (err.code === 'ENOENT')\n                localeLookup = {};\n            else\n                throw err;\n        }\n        this.cache[this.locale] = localeLookup;\n    }\n    _resolveLocaleFile(directory, locale) {\n        let file = shim.resolve(directory, './', locale + '.json');\n        if (this.fallbackToLanguage && !this._fileExistsSync(file) && ~locale.lastIndexOf('_')) {\n            // attempt fallback to language only\n            const languageFile = shim.resolve(directory, './', locale.split('_')[0] + '.json');\n            if (this._fileExistsSync(languageFile))\n                file = languageFile;\n        }\n        return file;\n    }\n    _fileExistsSync(file) {\n        return shim.exists(file);\n    }\n}\nexport function y18n(opts, _shim) {\n    shim = _shim;\n    const y18n = new Y18N(opts);\n    return {\n        __: y18n.__.bind(y18n),\n        __n: y18n.__n.bind(y18n),\n        setLocale: y18n.setLocale.bind(y18n),\n        getLocale: y18n.getLocale.bind(y18n),\n        updateLocale: y18n.updateLocale.bind(y18n),\n        locale: y18n.locale\n    };\n}\n","import shim from './build/lib/platform-shims/node.js'\nimport { y18n as _y18n } from './build/lib/index.js'\n\nconst y18n = (opts) => {\n  return _y18n(opts, shim)\n}\n\nexport default y18n\n","\"use strict\";\n// Call this function in a another function to find out the file from\n// which that function was called from. (Inspects the v8 stack trace)\n//\n// Inspired by http://stackoverflow.com/questions/13227489\nmodule.exports = function getCallerFile(position) {\n    if (position === void 0) { position = 2; }\n    if (position >= Error.stackTraceLimit) {\n        throw new TypeError('getCallerFile(position) requires position be less then Error.stackTraceLimit but position was: `' + position + '` and Error.stackTraceLimit was: `' + Error.stackTraceLimit + '`');\n    }\n    var oldPrepareStackTrace = Error.prepareStackTrace;\n    Error.prepareStackTrace = function (_, stack) { return stack; };\n    var stack = new Error().stack;\n    Error.prepareStackTrace = oldPrepareStackTrace;\n    if (stack !== null && typeof stack === 'object') {\n        // stack[0] holds this file\n        // stack[1] holds where this function was called\n        // stack[2] holds the file we're interested in\n        return stack[position] ? stack[position].getFileName() : undefined;\n    }\n};\n//# sourceMappingURL=index.js.map","'use strict'\n\nimport { notStrictEqual, strictEqual } from 'assert'\nimport cliui from 'cliui'\nimport escalade from 'escalade/sync'\nimport { inspect } from 'util'\nimport { fileURLToPath } from 'url';\nimport Parser from 'yargs-parser'\nimport { basename, dirname, extname, relative, resolve, join } from 'path'\nimport { getProcessArgvBin } from '../../build/lib/utils/process-argv.js'\nimport stringWidth from 'string-width';\nimport y18n from 'y18n'\nimport { createRequire } from 'node:module';\nimport getCallerFile from 'get-caller-file';\nimport { readFileSync, readdirSync } from 'node:fs'\n\nconst __dirname = fileURLToPath(import.meta.url);\nconst mainFilename = __dirname.substring(0, __dirname.lastIndexOf('node_modules'));\nconst require = createRequire(import.meta.url);\n\nexport default {\n  assert: {\n    notStrictEqual,\n    strictEqual\n  },\n  cliui,\n  findUp: escalade,\n  getEnv: (key) => {\n    return process.env[key]\n  },\n  inspect,\n  getProcessArgvBin,\n  mainFilename: mainFilename || process.cwd(),\n  Parser,\n  path: {\n    basename,\n    dirname,\n    extname,\n    relative,\n    resolve,\n    join\n  },\n  process: {\n    argv: () => process.argv,\n    cwd: process.cwd,\n    emitWarning: (warning, type) => process.emitWarning(warning, type),\n    execPath: () => process.execPath,\n    exit: (code) => {\n      // eslint-disable-next-line n/no-process-exit\n      process.exit(code);\n    },\n    nextTick: process.nextTick,\n    stdColumns: typeof process.stdout.columns !== 'undefined' ? process.stdout.columns : null\n  },\n  readFileSync,\n  readdirSync,\n  require,\n  getCallerFile: () => {\n    const callerFile = getCallerFile(3);\n    return callerFile.match(/^file:\\/\\//) ? fileURLToPath(callerFile) : callerFile;\n  },\n  stringWidth,\n  y18n: y18n({\n    directory: resolve(__dirname, '../../../locales'),\n    updateFiles: false\n  })\n}\n","export function assertNotStrictEqual(actual, expected, shim, message) {\n    shim.assert.notStrictEqual(actual, expected, message);\n}\nexport function assertSingleKey(actual, shim) {\n    shim.assert.strictEqual(typeof actual, 'string');\n}\nexport function objectKeys(object) {\n    return Object.keys(object);\n}\n","export function isPromise(maybePromise) {\n    return (!!maybePromise &&\n        !!maybePromise.then &&\n        typeof maybePromise.then === 'function');\n}\n","export class YError extends Error {\n    constructor(msg) {\n        super(msg || 'yargs error');\n        this.name = 'YError';\n        if (Error.captureStackTrace) {\n            Error.captureStackTrace(this, YError);\n        }\n    }\n}\n","export function parseCommand(cmd) {\n    const extraSpacesStrippedCommand = cmd.replace(/\\s{2,}/g, ' ');\n    const splitCommand = extraSpacesStrippedCommand.split(/\\s+(?![^[]*]|[^<]*>)/);\n    const bregex = /\\.*[\\][<>]/g;\n    const firstCommand = splitCommand.shift();\n    if (!firstCommand)\n        throw new Error(`No command found in: ${cmd}`);\n    const parsedCommand = {\n        cmd: firstCommand.replace(bregex, ''),\n        demanded: [],\n        optional: [],\n    };\n    splitCommand.forEach((cmd, i) => {\n        let variadic = false;\n        cmd = cmd.replace(/\\s/g, '');\n        if (/\\.+[\\]>]/.test(cmd) && i === splitCommand.length - 1)\n            variadic = true;\n        if (/^\\[/.test(cmd)) {\n            parsedCommand.optional.push({\n                cmd: cmd.replace(bregex, '').split('|'),\n                variadic,\n            });\n        }\n        else {\n            parsedCommand.demanded.push({\n                cmd: cmd.replace(bregex, '').split('|'),\n                variadic,\n            });\n        }\n    });\n    return parsedCommand;\n}\n","import { YError } from './yerror.js';\nimport { parseCommand } from './parse-command.js';\nconst positionName = ['first', 'second', 'third', 'fourth', 'fifth', 'sixth'];\nexport function argsert(arg1, arg2, arg3) {\n    function parseArgs() {\n        return typeof arg1 === 'object'\n            ? [{ demanded: [], optional: [] }, arg1, arg2]\n            : [\n                parseCommand(`cmd ${arg1}`),\n                arg2,\n                arg3,\n            ];\n    }\n    try {\n        let position = 0;\n        const [parsed, callerArguments, _length] = parseArgs();\n        const args = [].slice.call(callerArguments);\n        while (args.length && args[args.length - 1] === undefined)\n            args.pop();\n        const length = _length || args.length;\n        if (length < parsed.demanded.length) {\n            throw new YError(`Not enough arguments provided. Expected ${parsed.demanded.length} but received ${args.length}.`);\n        }\n        const totalCommands = parsed.demanded.length + parsed.optional.length;\n        if (length > totalCommands) {\n            throw new YError(`Too many arguments provided. Expected max ${totalCommands} but received ${length}.`);\n        }\n        parsed.demanded.forEach(demanded => {\n            const arg = args.shift();\n            const observedType = guessType(arg);\n            const matchingTypes = demanded.cmd.filter(type => type === observedType || type === '*');\n            if (matchingTypes.length === 0)\n                argumentTypeError(observedType, demanded.cmd, position);\n            position += 1;\n        });\n        parsed.optional.forEach(optional => {\n            if (args.length === 0)\n                return;\n            const arg = args.shift();\n            const observedType = guessType(arg);\n            const matchingTypes = optional.cmd.filter(type => type === observedType || type === '*');\n            if (matchingTypes.length === 0)\n                argumentTypeError(observedType, optional.cmd, position);\n            position += 1;\n        });\n    }\n    catch (err) {\n        console.warn(err.stack);\n    }\n}\nfunction guessType(arg) {\n    if (Array.isArray(arg)) {\n        return 'array';\n    }\n    else if (arg === null) {\n        return 'null';\n    }\n    return typeof arg;\n}\nfunction argumentTypeError(observedType, allowedTypes, position) {\n    throw new YError(`Invalid ${positionName[position] || 'manyith'} argument. Expected ${allowedTypes.join(' or ')} but received ${observedType}.`);\n}\n","import { argsert } from './argsert.js';\nimport { isPromise } from './utils/is-promise.js';\nexport class GlobalMiddleware {\n    constructor(yargs) {\n        this.globalMiddleware = [];\n        this.frozens = [];\n        this.yargs = yargs;\n    }\n    addMiddleware(callback, applyBeforeValidation, global = true, mutates = false) {\n        argsert('<array|function> [boolean] [boolean] [boolean]', [callback, applyBeforeValidation, global], arguments.length);\n        if (Array.isArray(callback)) {\n            for (let i = 0; i < callback.length; i++) {\n                if (typeof callback[i] !== 'function') {\n                    throw Error('middleware must be a function');\n                }\n                const m = callback[i];\n                m.applyBeforeValidation = applyBeforeValidation;\n                m.global = global;\n            }\n            Array.prototype.push.apply(this.globalMiddleware, callback);\n        }\n        else if (typeof callback === 'function') {\n            const m = callback;\n            m.applyBeforeValidation = applyBeforeValidation;\n            m.global = global;\n            m.mutates = mutates;\n            this.globalMiddleware.push(callback);\n        }\n        return this.yargs;\n    }\n    addCoerceMiddleware(callback, option) {\n        const aliases = this.yargs.getAliases();\n        this.globalMiddleware = this.globalMiddleware.filter(m => {\n            const toCheck = [...(aliases[option] || []), option];\n            if (!m.option)\n                return true;\n            else\n                return !toCheck.includes(m.option);\n        });\n        callback.option = option;\n        return this.addMiddleware(callback, true, true, true);\n    }\n    getMiddleware() {\n        return this.globalMiddleware;\n    }\n    freeze() {\n        this.frozens.push([...this.globalMiddleware]);\n    }\n    unfreeze() {\n        const frozen = this.frozens.pop();\n        if (frozen !== undefined)\n            this.globalMiddleware = frozen;\n    }\n    reset() {\n        this.globalMiddleware = this.globalMiddleware.filter(m => m.global);\n    }\n}\nexport function commandMiddlewareFactory(commandMiddleware) {\n    if (!commandMiddleware)\n        return [];\n    return commandMiddleware.map(middleware => {\n        middleware.applyBeforeValidation = false;\n        return middleware;\n    });\n}\nexport function applyMiddleware(argv, yargs, middlewares, beforeValidation) {\n    return middlewares.reduce((acc, middleware) => {\n        if (middleware.applyBeforeValidation !== beforeValidation) {\n            return acc;\n        }\n        if (middleware.mutates) {\n            if (middleware.applied)\n                return acc;\n            middleware.applied = true;\n        }\n        if (isPromise(acc)) {\n            return acc\n                .then(initialObj => Promise.all([initialObj, middleware(initialObj, yargs)]))\n                .then(([initialObj, middlewareObj]) => Object.assign(initialObj, middlewareObj));\n        }\n        else {\n            const result = middleware(acc, yargs);\n            return isPromise(result)\n                ? result.then(middlewareObj => Object.assign(acc, middlewareObj))\n                : Object.assign(acc, result);\n        }\n    }, argv);\n}\n","import { isPromise } from './is-promise.js';\nexport function maybeAsyncResult(getResult, resultHandler, errorHandler = (err) => {\n    throw err;\n}) {\n    try {\n        const result = isFunction(getResult) ? getResult() : getResult;\n        return isPromise(result)\n            ? result.then((result) => resultHandler(result))\n            : resultHandler(result);\n    }\n    catch (err) {\n        return errorHandler(err);\n    }\n}\nfunction isFunction(arg) {\n    return typeof arg === 'function';\n}\n","import { assertNotStrictEqual, } from './typings/common-types.js';\nimport { isPromise } from './utils/is-promise.js';\nimport { applyMiddleware, commandMiddlewareFactory, } from './middleware.js';\nimport { parseCommand } from './parse-command.js';\nimport { isYargsInstance, } from './yargs-factory.js';\nimport { maybeAsyncResult } from './utils/maybe-async-result.js';\nconst DEFAULT_MARKER = /(^\\*)|(^\\$0)/;\nexport class CommandInstance {\n    constructor(usage, validation, globalMiddleware, shim) {\n        this.requireCache = new Set();\n        this.handlers = {};\n        this.aliasMap = {};\n        this.frozens = [];\n        this.shim = shim;\n        this.usage = usage;\n        this.globalMiddleware = globalMiddleware;\n        this.validation = validation;\n    }\n    addDirectory(dir, req, callerFile, opts) {\n        opts = opts || {};\n        this.requireCache.add(callerFile);\n        const fullDirPath = this.shim.path.resolve(this.shim.path.dirname(callerFile), dir);\n        const files = this.shim.readdirSync(fullDirPath, {\n            recursive: opts.recurse ? true : false,\n        });\n        if (!Array.isArray(opts.extensions))\n            opts.extensions = ['js'];\n        const visit = typeof opts.visit === 'function' ? opts.visit : (o) => o;\n        for (const fileb of files) {\n            const file = fileb.toString();\n            if (opts.exclude) {\n                let exclude = false;\n                if (typeof opts.exclude === 'function') {\n                    exclude = opts.exclude(file);\n                }\n                else {\n                    exclude = opts.exclude.test(file);\n                }\n                if (exclude)\n                    continue;\n            }\n            if (opts.include) {\n                let include = false;\n                if (typeof opts.include === 'function') {\n                    include = opts.include(file);\n                }\n                else {\n                    include = opts.include.test(file);\n                }\n                if (!include)\n                    continue;\n            }\n            let supportedExtension = false;\n            for (const ext of opts.extensions) {\n                if (file.endsWith(ext))\n                    supportedExtension = true;\n            }\n            if (supportedExtension) {\n                const joined = this.shim.path.join(fullDirPath, file);\n                const module = req(joined);\n                const extendableModule = Object.create(null, Object.getOwnPropertyDescriptors({ ...module }));\n                const visited = visit(extendableModule, joined, file);\n                if (visited) {\n                    if (this.requireCache.has(joined))\n                        continue;\n                    else\n                        this.requireCache.add(joined);\n                    if (!extendableModule.command) {\n                        extendableModule.command = this.shim.path.basename(joined, this.shim.path.extname(joined));\n                    }\n                    this.addHandler(extendableModule);\n                }\n            }\n        }\n    }\n    addHandler(cmd, description, builder, handler, commandMiddleware, deprecated) {\n        let aliases = [];\n        const middlewares = commandMiddlewareFactory(commandMiddleware);\n        handler = handler || (() => { });\n        if (Array.isArray(cmd)) {\n            if (isCommandAndAliases(cmd)) {\n                [cmd, ...aliases] = cmd;\n            }\n            else {\n                for (const command of cmd) {\n                    this.addHandler(command);\n                }\n            }\n        }\n        else if (isCommandHandlerDefinition(cmd)) {\n            let command = Array.isArray(cmd.command) || typeof cmd.command === 'string'\n                ? cmd.command\n                : null;\n            if (command === null) {\n                throw new Error(`No command name given for module: ${this.shim.inspect(cmd)}`);\n            }\n            if (cmd.aliases)\n                command = [].concat(command).concat(cmd.aliases);\n            this.addHandler(command, this.extractDesc(cmd), cmd.builder, cmd.handler, cmd.middlewares, cmd.deprecated);\n            return;\n        }\n        else if (isCommandBuilderDefinition(builder)) {\n            this.addHandler([cmd].concat(aliases), description, builder.builder, builder.handler, builder.middlewares, builder.deprecated);\n            return;\n        }\n        if (typeof cmd === 'string') {\n            const parsedCommand = parseCommand(cmd);\n            aliases = aliases.map(alias => parseCommand(alias).cmd);\n            let isDefault = false;\n            const parsedAliases = [parsedCommand.cmd].concat(aliases).filter(c => {\n                if (DEFAULT_MARKER.test(c)) {\n                    isDefault = true;\n                    return false;\n                }\n                return true;\n            });\n            if (parsedAliases.length === 0 && isDefault)\n                parsedAliases.push('$0');\n            if (isDefault) {\n                parsedCommand.cmd = parsedAliases[0];\n                aliases = parsedAliases.slice(1);\n                cmd = cmd.replace(DEFAULT_MARKER, parsedCommand.cmd);\n            }\n            aliases.forEach(alias => {\n                this.aliasMap[alias] = parsedCommand.cmd;\n            });\n            if (description !== false) {\n                this.usage.command(cmd, description, isDefault, aliases, deprecated);\n            }\n            this.handlers[parsedCommand.cmd] = {\n                original: cmd,\n                description,\n                handler,\n                builder: builder || {},\n                middlewares,\n                deprecated,\n                demanded: parsedCommand.demanded,\n                optional: parsedCommand.optional,\n            };\n            if (isDefault)\n                this.defaultCommand = this.handlers[parsedCommand.cmd];\n        }\n    }\n    getCommandHandlers() {\n        return this.handlers;\n    }\n    getCommands() {\n        return Object.keys(this.handlers).concat(Object.keys(this.aliasMap));\n    }\n    hasDefaultCommand() {\n        return !!this.defaultCommand;\n    }\n    runCommand(command, yargs, parsed, commandIndex, helpOnly, helpOrVersionSet) {\n        const commandHandler = this.handlers[command] ||\n            this.handlers[this.aliasMap[command]] ||\n            this.defaultCommand;\n        const currentContext = yargs.getInternalMethods().getContext();\n        const parentCommands = currentContext.commands.slice();\n        const isDefaultCommand = !command;\n        if (command) {\n            currentContext.commands.push(command);\n            currentContext.fullCommands.push(commandHandler.original);\n        }\n        const builderResult = this.applyBuilderUpdateUsageAndParse(isDefaultCommand, commandHandler, yargs, parsed.aliases, parentCommands, commandIndex, helpOnly, helpOrVersionSet);\n        return isPromise(builderResult)\n            ? builderResult.then(result => this.applyMiddlewareAndGetResult(isDefaultCommand, commandHandler, result.innerArgv, currentContext, helpOnly, result.aliases, yargs))\n            : this.applyMiddlewareAndGetResult(isDefaultCommand, commandHandler, builderResult.innerArgv, currentContext, helpOnly, builderResult.aliases, yargs);\n    }\n    applyBuilderUpdateUsageAndParse(isDefaultCommand, commandHandler, yargs, aliases, parentCommands, commandIndex, helpOnly, helpOrVersionSet) {\n        const builder = commandHandler.builder;\n        let innerYargs = yargs;\n        if (isCommandBuilderCallback(builder)) {\n            yargs.getInternalMethods().getUsageInstance().freeze();\n            const builderOutput = builder(yargs.getInternalMethods().reset(aliases), helpOrVersionSet);\n            if (isPromise(builderOutput)) {\n                return builderOutput.then(output => {\n                    innerYargs = isYargsInstance(output) ? output : yargs;\n                    return this.parseAndUpdateUsage(isDefaultCommand, commandHandler, innerYargs, parentCommands, commandIndex, helpOnly);\n                });\n            }\n        }\n        else if (isCommandBuilderOptionDefinitions(builder)) {\n            yargs.getInternalMethods().getUsageInstance().freeze();\n            innerYargs = yargs.getInternalMethods().reset(aliases);\n            Object.keys(commandHandler.builder).forEach(key => {\n                innerYargs.option(key, builder[key]);\n            });\n        }\n        return this.parseAndUpdateUsage(isDefaultCommand, commandHandler, innerYargs, parentCommands, commandIndex, helpOnly);\n    }\n    parseAndUpdateUsage(isDefaultCommand, commandHandler, innerYargs, parentCommands, commandIndex, helpOnly) {\n        if (isDefaultCommand)\n            innerYargs.getInternalMethods().getUsageInstance().unfreeze(true);\n        if (this.shouldUpdateUsage(innerYargs)) {\n            innerYargs\n                .getInternalMethods()\n                .getUsageInstance()\n                .usage(this.usageFromParentCommandsCommandHandler(parentCommands, commandHandler), commandHandler.description);\n        }\n        const innerArgv = innerYargs\n            .getInternalMethods()\n            .runYargsParserAndExecuteCommands(null, undefined, true, commandIndex, helpOnly);\n        return isPromise(innerArgv)\n            ? innerArgv.then(argv => ({\n                aliases: innerYargs.parsed.aliases,\n                innerArgv: argv,\n            }))\n            : {\n                aliases: innerYargs.parsed.aliases,\n                innerArgv: innerArgv,\n            };\n    }\n    shouldUpdateUsage(yargs) {\n        return (!yargs.getInternalMethods().getUsageInstance().getUsageDisabled() &&\n            yargs.getInternalMethods().getUsageInstance().getUsage().length === 0);\n    }\n    usageFromParentCommandsCommandHandler(parentCommands, commandHandler) {\n        const c = DEFAULT_MARKER.test(commandHandler.original)\n            ? commandHandler.original.replace(DEFAULT_MARKER, '').trim()\n            : commandHandler.original;\n        const pc = parentCommands.filter(c => {\n            return !DEFAULT_MARKER.test(c);\n        });\n        pc.push(c);\n        return `$0 ${pc.join(' ')}`;\n    }\n    handleValidationAndGetResult(isDefaultCommand, commandHandler, innerArgv, currentContext, aliases, yargs, middlewares, positionalMap) {\n        if (!yargs.getInternalMethods().getHasOutput()) {\n            const validation = yargs\n                .getInternalMethods()\n                .runValidation(aliases, positionalMap, yargs.parsed.error, isDefaultCommand);\n            innerArgv = maybeAsyncResult(innerArgv, result => {\n                validation(result);\n                return result;\n            });\n        }\n        if (commandHandler.handler && !yargs.getInternalMethods().getHasOutput()) {\n            yargs.getInternalMethods().setHasOutput();\n            const populateDoubleDash = !!yargs.getOptions().configuration['populate--'];\n            yargs\n                .getInternalMethods()\n                .postProcess(innerArgv, populateDoubleDash, false, false);\n            innerArgv = applyMiddleware(innerArgv, yargs, middlewares, false);\n            innerArgv = maybeAsyncResult(innerArgv, result => {\n                const handlerResult = commandHandler.handler(result);\n                return isPromise(handlerResult)\n                    ? handlerResult.then(() => result)\n                    : result;\n            });\n            if (!isDefaultCommand) {\n                yargs.getInternalMethods().getUsageInstance().cacheHelpMessage();\n            }\n            if (isPromise(innerArgv) &&\n                !yargs.getInternalMethods().hasParseCallback()) {\n                innerArgv.catch(error => {\n                    try {\n                        yargs.getInternalMethods().getUsageInstance().fail(null, error);\n                    }\n                    catch (_err) {\n                    }\n                });\n            }\n        }\n        if (!isDefaultCommand) {\n            currentContext.commands.pop();\n            currentContext.fullCommands.pop();\n        }\n        return innerArgv;\n    }\n    applyMiddlewareAndGetResult(isDefaultCommand, commandHandler, innerArgv, currentContext, helpOnly, aliases, yargs) {\n        let positionalMap = {};\n        if (helpOnly)\n            return innerArgv;\n        if (!yargs.getInternalMethods().getHasOutput()) {\n            positionalMap = this.populatePositionals(commandHandler, innerArgv, currentContext, yargs);\n        }\n        const middlewares = this.globalMiddleware\n            .getMiddleware()\n            .slice(0)\n            .concat(commandHandler.middlewares);\n        const maybePromiseArgv = applyMiddleware(innerArgv, yargs, middlewares, true);\n        return isPromise(maybePromiseArgv)\n            ? maybePromiseArgv.then(resolvedInnerArgv => this.handleValidationAndGetResult(isDefaultCommand, commandHandler, resolvedInnerArgv, currentContext, aliases, yargs, middlewares, positionalMap))\n            : this.handleValidationAndGetResult(isDefaultCommand, commandHandler, maybePromiseArgv, currentContext, aliases, yargs, middlewares, positionalMap);\n    }\n    populatePositionals(commandHandler, argv, context, yargs) {\n        argv._ = argv._.slice(context.commands.length);\n        const demanded = commandHandler.demanded.slice(0);\n        const optional = commandHandler.optional.slice(0);\n        const positionalMap = {};\n        this.validation.positionalCount(demanded.length, argv._.length);\n        while (demanded.length) {\n            const demand = demanded.shift();\n            this.populatePositional(demand, argv, positionalMap);\n        }\n        while (optional.length) {\n            const maybe = optional.shift();\n            this.populatePositional(maybe, argv, positionalMap);\n        }\n        argv._ = context.commands.concat(argv._.map(a => '' + a));\n        this.postProcessPositionals(argv, positionalMap, this.cmdToParseOptions(commandHandler.original), yargs);\n        return positionalMap;\n    }\n    populatePositional(positional, argv, positionalMap) {\n        const cmd = positional.cmd[0];\n        if (positional.variadic) {\n            positionalMap[cmd] = argv._.splice(0).map(String);\n        }\n        else {\n            if (argv._.length)\n                positionalMap[cmd] = [String(argv._.shift())];\n        }\n    }\n    cmdToParseOptions(cmdString) {\n        const parseOptions = {\n            array: [],\n            default: {},\n            alias: {},\n            demand: {},\n        };\n        const parsed = parseCommand(cmdString);\n        parsed.demanded.forEach(d => {\n            const [cmd, ...aliases] = d.cmd;\n            if (d.variadic) {\n                parseOptions.array.push(cmd);\n                parseOptions.default[cmd] = [];\n            }\n            parseOptions.alias[cmd] = aliases;\n            parseOptions.demand[cmd] = true;\n        });\n        parsed.optional.forEach(o => {\n            const [cmd, ...aliases] = o.cmd;\n            if (o.variadic) {\n                parseOptions.array.push(cmd);\n                parseOptions.default[cmd] = [];\n            }\n            parseOptions.alias[cmd] = aliases;\n        });\n        return parseOptions;\n    }\n    postProcessPositionals(argv, positionalMap, parseOptions, yargs) {\n        const options = Object.assign({}, yargs.getOptions());\n        options.default = Object.assign(parseOptions.default, options.default);\n        for (const key of Object.keys(parseOptions.alias)) {\n            options.alias[key] = (options.alias[key] || []).concat(parseOptions.alias[key]);\n        }\n        options.array = options.array.concat(parseOptions.array);\n        options.config = {};\n        const unparsed = [];\n        Object.keys(positionalMap).forEach(key => {\n            positionalMap[key].map(value => {\n                if (options.configuration['unknown-options-as-args'])\n                    options.key[key] = true;\n                unparsed.push(`--${key}`);\n                unparsed.push(value);\n            });\n        });\n        if (!unparsed.length)\n            return;\n        const config = Object.assign({}, options.configuration, {\n            'populate--': false,\n        });\n        const parsed = this.shim.Parser.detailed(unparsed, Object.assign({}, options, {\n            configuration: config,\n        }));\n        if (parsed.error) {\n            yargs\n                .getInternalMethods()\n                .getUsageInstance()\n                .fail(parsed.error.message, parsed.error);\n        }\n        else {\n            const positionalKeys = Object.keys(positionalMap);\n            Object.keys(positionalMap).forEach(key => {\n                positionalKeys.push(...parsed.aliases[key]);\n            });\n            Object.keys(parsed.argv).forEach(key => {\n                if (positionalKeys.includes(key)) {\n                    if (!positionalMap[key])\n                        positionalMap[key] = parsed.argv[key];\n                    if (!this.isInConfigs(yargs, key) &&\n                        !this.isDefaulted(yargs, key) &&\n                        Object.prototype.hasOwnProperty.call(argv, key) &&\n                        Object.prototype.hasOwnProperty.call(parsed.argv, key) &&\n                        (Array.isArray(argv[key]) || Array.isArray(parsed.argv[key]))) {\n                        argv[key] = [].concat(argv[key], parsed.argv[key]);\n                    }\n                    else {\n                        argv[key] = parsed.argv[key];\n                    }\n                }\n            });\n        }\n    }\n    isDefaulted(yargs, key) {\n        const { default: defaults } = yargs.getOptions();\n        return (Object.prototype.hasOwnProperty.call(defaults, key) ||\n            Object.prototype.hasOwnProperty.call(defaults, this.shim.Parser.camelCase(key)));\n    }\n    isInConfigs(yargs, key) {\n        const { configObjects } = yargs.getOptions();\n        return (configObjects.some(c => Object.prototype.hasOwnProperty.call(c, key)) ||\n            configObjects.some(c => Object.prototype.hasOwnProperty.call(c, this.shim.Parser.camelCase(key))));\n    }\n    runDefaultBuilderOn(yargs) {\n        if (!this.defaultCommand)\n            return;\n        if (this.shouldUpdateUsage(yargs)) {\n            const commandString = DEFAULT_MARKER.test(this.defaultCommand.original)\n                ? this.defaultCommand.original\n                : this.defaultCommand.original.replace(/^[^[\\]<>]*/, '$0 ');\n            yargs\n                .getInternalMethods()\n                .getUsageInstance()\n                .usage(commandString, this.defaultCommand.description);\n        }\n        const builder = this.defaultCommand.builder;\n        if (isCommandBuilderCallback(builder)) {\n            return builder(yargs, true);\n        }\n        else if (!isCommandBuilderDefinition(builder)) {\n            Object.keys(builder).forEach(key => {\n                yargs.option(key, builder[key]);\n            });\n        }\n        return undefined;\n    }\n    extractDesc({ describe, description, desc }) {\n        for (const test of [describe, description, desc]) {\n            if (typeof test === 'string' || test === false)\n                return test;\n            assertNotStrictEqual(test, true, this.shim);\n        }\n        return false;\n    }\n    freeze() {\n        this.frozens.push({\n            handlers: this.handlers,\n            aliasMap: this.aliasMap,\n            defaultCommand: this.defaultCommand,\n        });\n    }\n    unfreeze() {\n        const frozen = this.frozens.pop();\n        assertNotStrictEqual(frozen, undefined, this.shim);\n        ({\n            handlers: this.handlers,\n            aliasMap: this.aliasMap,\n            defaultCommand: this.defaultCommand,\n        } = frozen);\n    }\n    reset() {\n        this.handlers = {};\n        this.aliasMap = {};\n        this.defaultCommand = undefined;\n        this.requireCache = new Set();\n        return this;\n    }\n}\nexport function command(usage, validation, globalMiddleware, shim) {\n    return new CommandInstance(usage, validation, globalMiddleware, shim);\n}\nexport function isCommandBuilderDefinition(builder) {\n    return (typeof builder === 'object' &&\n        !!builder.builder &&\n        typeof builder.handler === 'function');\n}\nfunction isCommandAndAliases(cmd) {\n    return cmd.every(c => typeof c === 'string');\n}\nexport function isCommandBuilderCallback(builder) {\n    return typeof builder === 'function';\n}\nfunction isCommandBuilderOptionDefinitions(builder) {\n    return typeof builder === 'object';\n}\nexport function isCommandHandlerDefinition(cmd) {\n    return typeof cmd === 'object' && !Array.isArray(cmd);\n}\n","import { objectKeys } from '../typings/common-types.js';\nexport function objFilter(original = {}, filter = () => true) {\n    const obj = {};\n    objectKeys(original).forEach(key => {\n        if (filter(key, original[key])) {\n            obj[key] = original[key];\n        }\n    });\n    return obj;\n}\n","export default function setBlocking(blocking) {\n    if (typeof process === 'undefined')\n        return;\n    [process.stdout, process.stderr].forEach(_stream => {\n        const stream = _stream;\n        if (stream._handle &&\n            stream.isTTY &&\n            typeof stream._handle.setBlocking === 'function') {\n            stream._handle.setBlocking(blocking);\n        }\n    });\n}\n","import { objFilter } from './utils/obj-filter.js';\nimport { YError } from './yerror.js';\nimport setBlocking from './utils/set-blocking.js';\nfunction isBoolean(fail) {\n    return typeof fail === 'boolean';\n}\nexport function usage(yargs, shim) {\n    const __ = shim.y18n.__;\n    const self = {};\n    const fails = [];\n    self.failFn = function failFn(f) {\n        fails.push(f);\n    };\n    let failMessage = null;\n    let globalFailMessage = null;\n    let showHelpOnFail = true;\n    self.showHelpOnFail = function showHelpOnFailFn(arg1 = true, arg2) {\n        const [enabled, message] = typeof arg1 === 'string' ? [true, arg1] : [arg1, arg2];\n        if (yargs.getInternalMethods().isGlobalContext()) {\n            globalFailMessage = message;\n        }\n        failMessage = message;\n        showHelpOnFail = enabled;\n        return self;\n    };\n    let failureOutput = false;\n    self.fail = function fail(msg, err) {\n        const logger = yargs.getInternalMethods().getLoggerInstance();\n        if (fails.length) {\n            for (let i = fails.length - 1; i >= 0; --i) {\n                const fail = fails[i];\n                if (isBoolean(fail)) {\n                    if (err)\n                        throw err;\n                    else if (msg)\n                        throw Error(msg);\n                }\n                else {\n                    fail(msg, err, self);\n                }\n            }\n        }\n        else {\n            if (yargs.getExitProcess())\n                setBlocking(true);\n            if (!failureOutput) {\n                failureOutput = true;\n                if (showHelpOnFail) {\n                    yargs.showHelp('error');\n                    logger.error();\n                }\n                if (msg || err)\n                    logger.error(msg || err);\n                const globalOrCommandFailMessage = failMessage || globalFailMessage;\n                if (globalOrCommandFailMessage) {\n                    if (msg || err)\n                        logger.error('');\n                    logger.error(globalOrCommandFailMessage);\n                }\n            }\n            err = err || new YError(msg);\n            if (yargs.getExitProcess()) {\n                return yargs.exit(1);\n            }\n            else if (yargs.getInternalMethods().hasParseCallback()) {\n                return yargs.exit(1, err);\n            }\n            else {\n                throw err;\n            }\n        }\n    };\n    let usages = [];\n    let usageDisabled = false;\n    self.usage = (msg, description) => {\n        if (msg === null) {\n            usageDisabled = true;\n            usages = [];\n            return self;\n        }\n        usageDisabled = false;\n        usages.push([msg, description || '']);\n        return self;\n    };\n    self.getUsage = () => {\n        return usages;\n    };\n    self.getUsageDisabled = () => {\n        return usageDisabled;\n    };\n    self.getPositionalGroupName = () => {\n        return __('Positionals:');\n    };\n    let examples = [];\n    self.example = (cmd, description) => {\n        examples.push([cmd, description || '']);\n    };\n    let commands = [];\n    self.command = function command(cmd, description, isDefault, aliases, deprecated = false) {\n        if (isDefault) {\n            commands = commands.map(cmdArray => {\n                cmdArray[2] = false;\n                return cmdArray;\n            });\n        }\n        commands.push([cmd, description || '', isDefault, aliases, deprecated]);\n    };\n    self.getCommands = () => commands;\n    let descriptions = {};\n    self.describe = function describe(keyOrKeys, desc) {\n        if (Array.isArray(keyOrKeys)) {\n            keyOrKeys.forEach(k => {\n                self.describe(k, desc);\n            });\n        }\n        else if (typeof keyOrKeys === 'object') {\n            Object.keys(keyOrKeys).forEach(k => {\n                self.describe(k, keyOrKeys[k]);\n            });\n        }\n        else {\n            descriptions[keyOrKeys] = desc;\n        }\n    };\n    self.getDescriptions = () => descriptions;\n    let epilogs = [];\n    self.epilog = msg => {\n        epilogs.push(msg);\n    };\n    let wrapSet = false;\n    let wrap;\n    self.wrap = cols => {\n        wrapSet = true;\n        wrap = cols;\n    };\n    self.getWrap = () => {\n        if (shim.getEnv('YARGS_DISABLE_WRAP')) {\n            return null;\n        }\n        if (!wrapSet) {\n            wrap = windowWidth();\n            wrapSet = true;\n        }\n        return wrap;\n    };\n    const deferY18nLookupPrefix = '__yargsString__:';\n    self.deferY18nLookup = str => deferY18nLookupPrefix + str;\n    self.help = function help() {\n        if (cachedHelpMessage)\n            return cachedHelpMessage;\n        normalizeAliases();\n        const base$0 = yargs.customScriptName\n            ? yargs.$0\n            : shim.path.basename(yargs.$0);\n        const demandedOptions = yargs.getDemandedOptions();\n        const demandedCommands = yargs.getDemandedCommands();\n        const deprecatedOptions = yargs.getDeprecatedOptions();\n        const groups = yargs.getGroups();\n        const options = yargs.getOptions();\n        let keys = [];\n        keys = keys.concat(Object.keys(descriptions));\n        keys = keys.concat(Object.keys(demandedOptions));\n        keys = keys.concat(Object.keys(demandedCommands));\n        keys = keys.concat(Object.keys(options.default));\n        keys = keys.filter(filterHiddenOptions);\n        keys = Object.keys(keys.reduce((acc, key) => {\n            if (key !== '_')\n                acc[key] = true;\n            return acc;\n        }, {}));\n        const theWrap = self.getWrap();\n        const ui = shim.cliui({\n            width: theWrap,\n            wrap: !!theWrap,\n        });\n        if (!usageDisabled) {\n            if (usages.length) {\n                usages.forEach(usage => {\n                    ui.div({ text: `${usage[0].replace(/\\$0/g, base$0)}` });\n                    if (usage[1]) {\n                        ui.div({ text: `${usage[1]}`, padding: [1, 0, 0, 0] });\n                    }\n                });\n                ui.div();\n            }\n            else if (commands.length) {\n                let u = null;\n                if (demandedCommands._) {\n                    u = `${base$0} <${__('command')}>\\n`;\n                }\n                else {\n                    u = `${base$0} [${__('command')}]\\n`;\n                }\n                ui.div(`${u}`);\n            }\n        }\n        if (commands.length > 1 || (commands.length === 1 && !commands[0][2])) {\n            ui.div(__('Commands:'));\n            const context = yargs.getInternalMethods().getContext();\n            const parentCommands = context.commands.length\n                ? `${context.commands.join(' ')} `\n                : '';\n            if (yargs.getInternalMethods().getParserConfiguration()['sort-commands'] ===\n                true) {\n                commands = commands.sort((a, b) => a[0].localeCompare(b[0]));\n            }\n            const prefix = base$0 ? `${base$0} ` : '';\n            commands.forEach(command => {\n                const commandString = `${prefix}${parentCommands}${command[0].replace(/^\\$0 ?/, '')}`;\n                ui.span({\n                    text: commandString,\n                    padding: [0, 2, 0, 2],\n                    width: maxWidth(commands, theWrap, `${base$0}${parentCommands}`) + 4,\n                }, { text: command[1] });\n                const hints = [];\n                if (command[2])\n                    hints.push(`[${__('default')}]`);\n                if (command[3] && command[3].length) {\n                    hints.push(`[${__('aliases:')} ${command[3].join(', ')}]`);\n                }\n                if (command[4]) {\n                    if (typeof command[4] === 'string') {\n                        hints.push(`[${__('deprecated: %s', command[4])}]`);\n                    }\n                    else {\n                        hints.push(`[${__('deprecated')}]`);\n                    }\n                }\n                if (hints.length) {\n                    ui.div({\n                        text: hints.join(' '),\n                        padding: [0, 0, 0, 2],\n                        align: 'right',\n                    });\n                }\n                else {\n                    ui.div();\n                }\n            });\n            ui.div();\n        }\n        const aliasKeys = (Object.keys(options.alias) || []).concat(Object.keys(yargs.parsed.newAliases) || []);\n        keys = keys.filter(key => !yargs.parsed.newAliases[key] &&\n            aliasKeys.every(alias => (options.alias[alias] || []).indexOf(key) === -1));\n        const defaultGroup = __('Options:');\n        if (!groups[defaultGroup])\n            groups[defaultGroup] = [];\n        addUngroupedKeys(keys, options.alias, groups, defaultGroup);\n        const isLongSwitch = (sw) => /^--/.test(getText(sw));\n        const displayedGroups = Object.keys(groups)\n            .filter(groupName => groups[groupName].length > 0)\n            .map(groupName => {\n            const normalizedKeys = groups[groupName]\n                .filter(filterHiddenOptions)\n                .map(key => {\n                if (aliasKeys.includes(key))\n                    return key;\n                for (let i = 0, aliasKey; (aliasKey = aliasKeys[i]) !== undefined; i++) {\n                    if ((options.alias[aliasKey] || []).includes(key))\n                        return aliasKey;\n                }\n                return key;\n            });\n            return { groupName, normalizedKeys };\n        })\n            .filter(({ normalizedKeys }) => normalizedKeys.length > 0)\n            .map(({ groupName, normalizedKeys }) => {\n            const switches = normalizedKeys.reduce((acc, key) => {\n                acc[key] = [key]\n                    .concat(options.alias[key] || [])\n                    .map(sw => {\n                    if (groupName === self.getPositionalGroupName())\n                        return sw;\n                    else {\n                        return ((/^[0-9]$/.test(sw)\n                            ? options.boolean.includes(key)\n                                ? '-'\n                                : '--'\n                            : sw.length > 1\n                                ? '--'\n                                : '-') + sw);\n                    }\n                })\n                    .sort((sw1, sw2) => isLongSwitch(sw1) === isLongSwitch(sw2)\n                    ? 0\n                    : isLongSwitch(sw1)\n                        ? 1\n                        : -1)\n                    .join(', ');\n                return acc;\n            }, {});\n            return { groupName, normalizedKeys, switches };\n        });\n        const shortSwitchesUsed = displayedGroups\n            .filter(({ groupName }) => groupName !== self.getPositionalGroupName())\n            .some(({ normalizedKeys, switches }) => !normalizedKeys.every(key => isLongSwitch(switches[key])));\n        if (shortSwitchesUsed) {\n            displayedGroups\n                .filter(({ groupName }) => groupName !== self.getPositionalGroupName())\n                .forEach(({ normalizedKeys, switches }) => {\n                normalizedKeys.forEach(key => {\n                    if (isLongSwitch(switches[key])) {\n                        switches[key] = addIndentation(switches[key], '-x, '.length);\n                    }\n                });\n            });\n        }\n        displayedGroups.forEach(({ groupName, normalizedKeys, switches }) => {\n            ui.div(groupName);\n            normalizedKeys.forEach(key => {\n                const kswitch = switches[key];\n                let desc = descriptions[key] || '';\n                let type = null;\n                if (desc.includes(deferY18nLookupPrefix))\n                    desc = __(desc.substring(deferY18nLookupPrefix.length));\n                if (options.boolean.includes(key))\n                    type = `[${__('boolean')}]`;\n                if (options.count.includes(key))\n                    type = `[${__('count')}]`;\n                if (options.string.includes(key))\n                    type = `[${__('string')}]`;\n                if (options.normalize.includes(key))\n                    type = `[${__('string')}]`;\n                if (options.array.includes(key))\n                    type = `[${__('array')}]`;\n                if (options.number.includes(key))\n                    type = `[${__('number')}]`;\n                const deprecatedExtra = (deprecated) => typeof deprecated === 'string'\n                    ? `[${__('deprecated: %s', deprecated)}]`\n                    : `[${__('deprecated')}]`;\n                const extra = [\n                    key in deprecatedOptions\n                        ? deprecatedExtra(deprecatedOptions[key])\n                        : null,\n                    type,\n                    key in demandedOptions ? `[${__('required')}]` : null,\n                    options.choices && options.choices[key]\n                        ? `[${__('choices:')} ${self.stringifiedValues(options.choices[key])}]`\n                        : null,\n                    defaultString(options.default[key], options.defaultDescription[key]),\n                ]\n                    .filter(Boolean)\n                    .join(' ');\n                ui.span({\n                    text: getText(kswitch),\n                    padding: [0, 2, 0, 2 + getIndentation(kswitch)],\n                    width: maxWidth(switches, theWrap) + 4,\n                }, desc);\n                const shouldHideOptionExtras = yargs.getInternalMethods().getUsageConfiguration()['hide-types'] ===\n                    true;\n                if (extra && !shouldHideOptionExtras)\n                    ui.div({ text: extra, padding: [0, 0, 0, 2], align: 'right' });\n                else\n                    ui.div();\n            });\n            ui.div();\n        });\n        if (examples.length) {\n            ui.div(__('Examples:'));\n            examples.forEach(example => {\n                example[0] = example[0].replace(/\\$0/g, base$0);\n            });\n            examples.forEach(example => {\n                if (example[1] === '') {\n                    ui.div({\n                        text: example[0],\n                        padding: [0, 2, 0, 2],\n                    });\n                }\n                else {\n                    ui.div({\n                        text: example[0],\n                        padding: [0, 2, 0, 2],\n                        width: maxWidth(examples, theWrap) + 4,\n                    }, {\n                        text: example[1],\n                    });\n                }\n            });\n            ui.div();\n        }\n        if (epilogs.length > 0) {\n            const e = epilogs\n                .map(epilog => epilog.replace(/\\$0/g, base$0))\n                .join('\\n');\n            ui.div(`${e}\\n`);\n        }\n        return ui.toString().replace(/\\s*$/, '');\n    };\n    function maxWidth(table, theWrap, modifier) {\n        let width = 0;\n        if (!Array.isArray(table)) {\n            table = Object.values(table).map(v => [v]);\n        }\n        table.forEach(v => {\n            width = Math.max(shim.stringWidth(modifier ? `${modifier} ${getText(v[0])}` : getText(v[0])) + getIndentation(v[0]), width);\n        });\n        if (theWrap)\n            width = Math.min(width, parseInt((theWrap * 0.5).toString(), 10));\n        return width;\n    }\n    function normalizeAliases() {\n        const demandedOptions = yargs.getDemandedOptions();\n        const options = yargs.getOptions();\n        (Object.keys(options.alias) || []).forEach(key => {\n            options.alias[key].forEach(alias => {\n                if (descriptions[alias])\n                    self.describe(key, descriptions[alias]);\n                if (alias in demandedOptions)\n                    yargs.demandOption(key, demandedOptions[alias]);\n                if (options.boolean.includes(alias))\n                    yargs.boolean(key);\n                if (options.count.includes(alias))\n                    yargs.count(key);\n                if (options.string.includes(alias))\n                    yargs.string(key);\n                if (options.normalize.includes(alias))\n                    yargs.normalize(key);\n                if (options.array.includes(alias))\n                    yargs.array(key);\n                if (options.number.includes(alias))\n                    yargs.number(key);\n            });\n        });\n    }\n    let cachedHelpMessage;\n    self.cacheHelpMessage = function () {\n        cachedHelpMessage = this.help();\n    };\n    self.clearCachedHelpMessage = function () {\n        cachedHelpMessage = undefined;\n    };\n    self.hasCachedHelpMessage = function () {\n        return !!cachedHelpMessage;\n    };\n    function addUngroupedKeys(keys, aliases, groups, defaultGroup) {\n        let groupedKeys = [];\n        let toCheck = null;\n        Object.keys(groups).forEach(group => {\n            groupedKeys = groupedKeys.concat(groups[group]);\n        });\n        keys.forEach(key => {\n            toCheck = [key].concat(aliases[key]);\n            if (!toCheck.some(k => groupedKeys.indexOf(k) !== -1)) {\n                groups[defaultGroup].push(key);\n            }\n        });\n        return groupedKeys;\n    }\n    function filterHiddenOptions(key) {\n        return (yargs.getOptions().hiddenOptions.indexOf(key) < 0 ||\n            yargs.parsed.argv[yargs.getOptions().showHiddenOpt]);\n    }\n    self.showHelp = (level) => {\n        const logger = yargs.getInternalMethods().getLoggerInstance();\n        if (!level)\n            level = 'error';\n        const emit = typeof level === 'function' ? level : logger[level];\n        emit(self.help());\n    };\n    self.functionDescription = fn => {\n        const description = fn.name\n            ? shim.Parser.decamelize(fn.name, '-')\n            : __('generated-value');\n        return ['(', description, ')'].join('');\n    };\n    self.stringifiedValues = function stringifiedValues(values, separator) {\n        let string = '';\n        const sep = separator || ', ';\n        const array = [].concat(values);\n        if (!values || !array.length)\n            return string;\n        array.forEach(value => {\n            if (string.length)\n                string += sep;\n            string += JSON.stringify(value);\n        });\n        return string;\n    };\n    function defaultString(value, defaultDescription) {\n        let string = `[${__('default:')} `;\n        if (value === undefined && !defaultDescription)\n            return null;\n        if (defaultDescription) {\n            string += defaultDescription;\n        }\n        else {\n            switch (typeof value) {\n                case 'string':\n                    string += `\"${value}\"`;\n                    break;\n                case 'object':\n                    string += JSON.stringify(value);\n                    break;\n                default:\n                    string += value;\n            }\n        }\n        return `${string}]`;\n    }\n    function windowWidth() {\n        const maxWidth = 80;\n        if (shim.process.stdColumns) {\n            return Math.min(maxWidth, shim.process.stdColumns);\n        }\n        else {\n            return maxWidth;\n        }\n    }\n    let version = null;\n    self.version = ver => {\n        version = ver;\n    };\n    self.showVersion = level => {\n        const logger = yargs.getInternalMethods().getLoggerInstance();\n        if (!level)\n            level = 'error';\n        const emit = typeof level === 'function' ? level : logger[level];\n        emit(version);\n    };\n    self.reset = function reset(localLookup) {\n        failMessage = null;\n        failureOutput = false;\n        usages = [];\n        usageDisabled = false;\n        epilogs = [];\n        examples = [];\n        commands = [];\n        descriptions = objFilter(descriptions, k => !localLookup[k]);\n        return self;\n    };\n    const frozens = [];\n    self.freeze = function freeze() {\n        frozens.push({\n            failMessage,\n            failureOutput,\n            usages,\n            usageDisabled,\n            epilogs,\n            examples,\n            commands,\n            descriptions,\n        });\n    };\n    self.unfreeze = function unfreeze(defaultCommand = false) {\n        const frozen = frozens.pop();\n        if (!frozen)\n            return;\n        if (defaultCommand) {\n            descriptions = { ...frozen.descriptions, ...descriptions };\n            commands = [...frozen.commands, ...commands];\n            usages = [...frozen.usages, ...usages];\n            examples = [...frozen.examples, ...examples];\n            epilogs = [...frozen.epilogs, ...epilogs];\n        }\n        else {\n            ({\n                failMessage,\n                failureOutput,\n                usages,\n                usageDisabled,\n                epilogs,\n                examples,\n                commands,\n                descriptions,\n            } = frozen);\n        }\n    };\n    return self;\n}\nfunction isIndentedText(text) {\n    return typeof text === 'object';\n}\nfunction addIndentation(text, indent) {\n    return isIndentedText(text)\n        ? { text: text.text, indentation: text.indentation + indent }\n        : { text, indentation: indent };\n}\nfunction getIndentation(text) {\n    return isIndentedText(text) ? text.indentation : 0;\n}\nfunction getText(text) {\n    return isIndentedText(text) ? text.text : text;\n}\n","export const completionShTemplate = `###-begin-{{app_name}}-completions-###\n#\n# yargs command completion script\n#\n# Installation: {{app_path}} {{completion_command}} >> ~/.bashrc\n#    or {{app_path}} {{completion_command}} >> ~/.bash_profile on OSX.\n#\n_{{app_name}}_yargs_completions()\n{\n    local cur_word args type_list\n\n    cur_word=\"\\${COMP_WORDS[COMP_CWORD]}\"\n    args=(\"\\${COMP_WORDS[@]}\")\n\n    # ask yargs to generate completions.\n    # see https://stackoverflow.com/a/40944195/7080036 for the spaces-handling awk\n    mapfile -t type_list < <({{app_path}} --get-yargs-completions \"\\${args[@]}\")\n    mapfile -t COMPREPLY < <(compgen -W \"$( printf '%q ' \"\\${type_list[@]}\" )\" -- \"\\${cur_word}\" |\n        awk '/ / { print \"\\\\\"\"$0\"\\\\\"\" } /^[^ ]+$/ { print $0 }')\n\n    # if no match was found, fall back to filename completion\n    if [ \\${#COMPREPLY[@]} -eq 0 ]; then\n      COMPREPLY=()\n    fi\n\n    return 0\n}\ncomplete -o bashdefault -o default -F _{{app_name}}_yargs_completions {{app_name}}\n###-end-{{app_name}}-completions-###\n`;\nexport const completionZshTemplate = `#compdef {{app_name}}\n###-begin-{{app_name}}-completions-###\n#\n# yargs command completion script\n#\n# Installation: {{app_path}} {{completion_command}} >> ~/.zshrc\n#    or {{app_path}} {{completion_command}} >> ~/.zprofile on OSX.\n#\n_{{app_name}}_yargs_completions()\n{\n  local reply\n  local si=$IFS\n  IFS=$'\\n' reply=($(COMP_CWORD=\"$((CURRENT-1))\" COMP_LINE=\"$BUFFER\" COMP_POINT=\"$CURSOR\" {{app_path}} --get-yargs-completions \"\\${words[@]}\"))\n  IFS=$si\n  if [[ \\${#reply} -gt 0 ]]; then\n    _describe 'values' reply\n  else\n    _default\n  fi\n}\nif [[ \"'\\${zsh_eval_context[-1]}\" == \"loadautofunc\" ]]; then\n  _{{app_name}}_yargs_completions \"$@\"\nelse\n  compdef _{{app_name}}_yargs_completions {{app_name}}\nfi\n###-end-{{app_name}}-completions-###\n`;\n","import { isCommandBuilderCallback } from './command.js';\nimport { assertNotStrictEqual } from './typings/common-types.js';\nimport * as templates from './completion-templates.js';\nimport { isPromise } from './utils/is-promise.js';\nimport { parseCommand } from './parse-command.js';\nexport class Completion {\n    constructor(yargs, usage, command, shim) {\n        var _a, _b, _c;\n        this.yargs = yargs;\n        this.usage = usage;\n        this.command = command;\n        this.shim = shim;\n        this.completionKey = 'get-yargs-completions';\n        this.aliases = null;\n        this.customCompletionFunction = null;\n        this.indexAfterLastReset = 0;\n        this.zshShell =\n            (_c = (((_a = this.shim.getEnv('SHELL')) === null || _a === void 0 ? void 0 : _a.includes('zsh')) ||\n                ((_b = this.shim.getEnv('ZSH_NAME')) === null || _b === void 0 ? void 0 : _b.includes('zsh')))) !== null && _c !== void 0 ? _c : false;\n    }\n    defaultCompletion(args, argv, current, done) {\n        const handlers = this.command.getCommandHandlers();\n        for (let i = 0, ii = args.length; i < ii; ++i) {\n            if (handlers[args[i]] && handlers[args[i]].builder) {\n                const builder = handlers[args[i]].builder;\n                if (isCommandBuilderCallback(builder)) {\n                    this.indexAfterLastReset = i + 1;\n                    const y = this.yargs.getInternalMethods().reset();\n                    builder(y, true);\n                    return y.argv;\n                }\n            }\n        }\n        const completions = [];\n        this.commandCompletions(completions, args, current);\n        this.optionCompletions(completions, args, argv, current);\n        this.choicesFromOptionsCompletions(completions, args, argv, current);\n        this.choicesFromPositionalsCompletions(completions, args, argv, current);\n        done(null, completions);\n    }\n    commandCompletions(completions, args, current) {\n        const parentCommands = this.yargs\n            .getInternalMethods()\n            .getContext().commands;\n        if (!current.match(/^-/) &&\n            parentCommands[parentCommands.length - 1] !== current &&\n            !this.previousArgHasChoices(args)) {\n            this.usage.getCommands().forEach(usageCommand => {\n                const commandName = parseCommand(usageCommand[0]).cmd;\n                if (args.indexOf(commandName) === -1) {\n                    if (!this.zshShell) {\n                        completions.push(commandName);\n                    }\n                    else {\n                        const desc = usageCommand[1] || '';\n                        completions.push(commandName.replace(/:/g, '\\\\:') + ':' + desc);\n                    }\n                }\n            });\n        }\n    }\n    optionCompletions(completions, args, argv, current) {\n        if ((current.match(/^-/) || (current === '' && completions.length === 0)) &&\n            !this.previousArgHasChoices(args)) {\n            const options = this.yargs.getOptions();\n            const positionalKeys = this.yargs.getGroups()[this.usage.getPositionalGroupName()] || [];\n            Object.keys(options.key).forEach(key => {\n                const negable = !!options.configuration['boolean-negation'] &&\n                    options.boolean.includes(key);\n                const isPositionalKey = positionalKeys.includes(key);\n                if (!isPositionalKey &&\n                    !options.hiddenOptions.includes(key) &&\n                    !this.argsContainKey(args, key, negable)) {\n                    this.completeOptionKey(key, completions, current, negable && !!options.default[key]);\n                }\n            });\n        }\n    }\n    choicesFromOptionsCompletions(completions, args, argv, current) {\n        if (this.previousArgHasChoices(args)) {\n            const choices = this.getPreviousArgChoices(args);\n            if (choices && choices.length > 0) {\n                completions.push(...choices.map(c => c.replace(/:/g, '\\\\:')));\n            }\n        }\n    }\n    choicesFromPositionalsCompletions(completions, args, argv, current) {\n        if (current === '' &&\n            completions.length > 0 &&\n            this.previousArgHasChoices(args)) {\n            return;\n        }\n        const positionalKeys = this.yargs.getGroups()[this.usage.getPositionalGroupName()] || [];\n        const offset = Math.max(this.indexAfterLastReset, this.yargs.getInternalMethods().getContext().commands.length +\n            1);\n        const positionalKey = positionalKeys[argv._.length - offset - 1];\n        if (!positionalKey) {\n            return;\n        }\n        const choices = this.yargs.getOptions().choices[positionalKey] || [];\n        for (const choice of choices) {\n            if (choice.startsWith(current)) {\n                completions.push(choice.replace(/:/g, '\\\\:'));\n            }\n        }\n    }\n    getPreviousArgChoices(args) {\n        if (args.length < 1)\n            return;\n        let previousArg = args[args.length - 1];\n        let filter = '';\n        if (!previousArg.startsWith('-') && args.length > 1) {\n            filter = previousArg;\n            previousArg = args[args.length - 2];\n        }\n        if (!previousArg.startsWith('-'))\n            return;\n        const previousArgKey = previousArg.replace(/^-+/, '');\n        const options = this.yargs.getOptions();\n        const possibleAliases = [\n            previousArgKey,\n            ...(this.yargs.getAliases()[previousArgKey] || []),\n        ];\n        let choices;\n        for (const possibleAlias of possibleAliases) {\n            if (Object.prototype.hasOwnProperty.call(options.key, possibleAlias) &&\n                Array.isArray(options.choices[possibleAlias])) {\n                choices = options.choices[possibleAlias];\n                break;\n            }\n        }\n        if (choices) {\n            return choices.filter(choice => !filter || choice.startsWith(filter));\n        }\n    }\n    previousArgHasChoices(args) {\n        const choices = this.getPreviousArgChoices(args);\n        return choices !== undefined && choices.length > 0;\n    }\n    argsContainKey(args, key, negable) {\n        const argsContains = (s) => args.indexOf((/^[^0-9]$/.test(s) ? '-' : '--') + s) !== -1;\n        if (argsContains(key))\n            return true;\n        if (negable && argsContains(`no-${key}`))\n            return true;\n        if (this.aliases) {\n            for (const alias of this.aliases[key]) {\n                if (argsContains(alias))\n                    return true;\n            }\n        }\n        return false;\n    }\n    completeOptionKey(key, completions, current, negable) {\n        var _a, _b, _c, _d;\n        let keyWithDesc = key;\n        if (this.zshShell) {\n            const descs = this.usage.getDescriptions();\n            const aliasKey = (_b = (_a = this === null || this === void 0 ? void 0 : this.aliases) === null || _a === void 0 ? void 0 : _a[key]) === null || _b === void 0 ? void 0 : _b.find(alias => {\n                const desc = descs[alias];\n                return typeof desc === 'string' && desc.length > 0;\n            });\n            const descFromAlias = aliasKey ? descs[aliasKey] : undefined;\n            const desc = (_d = (_c = descs[key]) !== null && _c !== void 0 ? _c : descFromAlias) !== null && _d !== void 0 ? _d : '';\n            keyWithDesc = `${key.replace(/:/g, '\\\\:')}:${desc\n                .replace('__yargsString__:', '')\n                .replace(/(\\r\\n|\\n|\\r)/gm, ' ')}`;\n        }\n        const startsByTwoDashes = (s) => /^--/.test(s);\n        const isShortOption = (s) => /^[^0-9]$/.test(s);\n        const dashes = !startsByTwoDashes(current) && isShortOption(key) ? '-' : '--';\n        completions.push(dashes + keyWithDesc);\n        if (negable) {\n            completions.push(dashes + 'no-' + keyWithDesc);\n        }\n    }\n    customCompletion(args, argv, current, done) {\n        assertNotStrictEqual(this.customCompletionFunction, null, this.shim);\n        if (isSyncCompletionFunction(this.customCompletionFunction)) {\n            const result = this.customCompletionFunction(current, argv);\n            if (isPromise(result)) {\n                return result\n                    .then(list => {\n                    this.shim.process.nextTick(() => {\n                        done(null, list);\n                    });\n                })\n                    .catch(err => {\n                    this.shim.process.nextTick(() => {\n                        done(err, undefined);\n                    });\n                });\n            }\n            return done(null, result);\n        }\n        else if (isFallbackCompletionFunction(this.customCompletionFunction)) {\n            return this.customCompletionFunction(current, argv, (onCompleted = done) => this.defaultCompletion(args, argv, current, onCompleted), completions => {\n                done(null, completions);\n            });\n        }\n        else {\n            return this.customCompletionFunction(current, argv, completions => {\n                done(null, completions);\n            });\n        }\n    }\n    getCompletion(args, done) {\n        const current = args.length ? args[args.length - 1] : '';\n        const argv = this.yargs.parse(args, true);\n        const completionFunction = this.customCompletionFunction\n            ? (argv) => this.customCompletion(args, argv, current, done)\n            : (argv) => this.defaultCompletion(args, argv, current, done);\n        return isPromise(argv)\n            ? argv.then(completionFunction)\n            : completionFunction(argv);\n    }\n    generateCompletionScript($0, cmd) {\n        let script = this.zshShell\n            ? templates.completionZshTemplate\n            : templates.completionShTemplate;\n        const name = this.shim.path.basename($0);\n        if ($0.match(/\\.js$/))\n            $0 = `./${$0}`;\n        script = script.replace(/{{app_name}}/g, name);\n        script = script.replace(/{{completion_command}}/g, cmd);\n        return script.replace(/{{app_path}}/g, $0);\n    }\n    registerFunction(fn) {\n        this.customCompletionFunction = fn;\n    }\n    setParsed(parsed) {\n        this.aliases = parsed.aliases;\n    }\n}\nexport function completion(yargs, usage, command, shim) {\n    return new Completion(yargs, usage, command, shim);\n}\nfunction isSyncCompletionFunction(completionFunction) {\n    return completionFunction.length < 3;\n}\nfunction isFallbackCompletionFunction(completionFunction) {\n    return completionFunction.length > 3;\n}\n","export function levenshtein(a, b) {\n    if (a.length === 0)\n        return b.length;\n    if (b.length === 0)\n        return a.length;\n    const matrix = [];\n    let i;\n    for (i = 0; i <= b.length; i++) {\n        matrix[i] = [i];\n    }\n    let j;\n    for (j = 0; j <= a.length; j++) {\n        matrix[0][j] = j;\n    }\n    for (i = 1; i <= b.length; i++) {\n        for (j = 1; j <= a.length; j++) {\n            if (b.charAt(i - 1) === a.charAt(j - 1)) {\n                matrix[i][j] = matrix[i - 1][j - 1];\n            }\n            else {\n                if (i > 1 &&\n                    j > 1 &&\n                    b.charAt(i - 2) === a.charAt(j - 1) &&\n                    b.charAt(i - 1) === a.charAt(j - 2)) {\n                    matrix[i][j] = matrix[i - 2][j - 2] + 1;\n                }\n                else {\n                    matrix[i][j] = Math.min(matrix[i - 1][j - 1] + 1, Math.min(matrix[i][j - 1] + 1, matrix[i - 1][j] + 1));\n                }\n            }\n        }\n    }\n    return matrix[b.length][a.length];\n}\n","import { argsert } from './argsert.js';\nimport { assertNotStrictEqual, } from './typings/common-types.js';\nimport { levenshtein as distance } from './utils/levenshtein.js';\nimport { objFilter } from './utils/obj-filter.js';\nconst specialKeys = ['$0', '--', '_'];\nexport function validation(yargs, usage, shim) {\n    const __ = shim.y18n.__;\n    const __n = shim.y18n.__n;\n    const self = {};\n    self.nonOptionCount = function nonOptionCount(argv) {\n        const demandedCommands = yargs.getDemandedCommands();\n        const positionalCount = argv._.length + (argv['--'] ? argv['--'].length : 0);\n        const _s = positionalCount - yargs.getInternalMethods().getContext().commands.length;\n        if (demandedCommands._ &&\n            (_s < demandedCommands._.min || _s > demandedCommands._.max)) {\n            if (_s < demandedCommands._.min) {\n                if (demandedCommands._.minMsg !== undefined) {\n                    usage.fail(demandedCommands._.minMsg\n                        ? demandedCommands._.minMsg\n                            .replace(/\\$0/g, _s.toString())\n                            .replace(/\\$1/, demandedCommands._.min.toString())\n                        : null);\n                }\n                else {\n                    usage.fail(__n('Not enough non-option arguments: got %s, need at least %s', 'Not enough non-option arguments: got %s, need at least %s', _s, _s.toString(), demandedCommands._.min.toString()));\n                }\n            }\n            else if (_s > demandedCommands._.max) {\n                if (demandedCommands._.maxMsg !== undefined) {\n                    usage.fail(demandedCommands._.maxMsg\n                        ? demandedCommands._.maxMsg\n                            .replace(/\\$0/g, _s.toString())\n                            .replace(/\\$1/, demandedCommands._.max.toString())\n                        : null);\n                }\n                else {\n                    usage.fail(__n('Too many non-option arguments: got %s, maximum of %s', 'Too many non-option arguments: got %s, maximum of %s', _s, _s.toString(), demandedCommands._.max.toString()));\n                }\n            }\n        }\n    };\n    self.positionalCount = function positionalCount(required, observed) {\n        if (observed < required) {\n            usage.fail(__n('Not enough non-option arguments: got %s, need at least %s', 'Not enough non-option arguments: got %s, need at least %s', observed, observed + '', required + ''));\n        }\n    };\n    self.requiredArguments = function requiredArguments(argv, demandedOptions) {\n        let missing = null;\n        for (const key of Object.keys(demandedOptions)) {\n            if (!Object.prototype.hasOwnProperty.call(argv, key) ||\n                typeof argv[key] === 'undefined') {\n                missing = missing || {};\n                missing[key] = demandedOptions[key];\n            }\n        }\n        if (missing) {\n            const customMsgs = [];\n            for (const key of Object.keys(missing)) {\n                const msg = missing[key];\n                if (msg && customMsgs.indexOf(msg) < 0) {\n                    customMsgs.push(msg);\n                }\n            }\n            const customMsg = customMsgs.length ? `\\n${customMsgs.join('\\n')}` : '';\n            usage.fail(__n('Missing required argument: %s', 'Missing required arguments: %s', Object.keys(missing).length, Object.keys(missing).join(', ') + customMsg));\n        }\n    };\n    self.unknownArguments = function unknownArguments(argv, aliases, positionalMap, isDefaultCommand, checkPositionals = true) {\n        var _a;\n        const commandKeys = yargs\n            .getInternalMethods()\n            .getCommandInstance()\n            .getCommands();\n        const unknown = [];\n        const currentContext = yargs.getInternalMethods().getContext();\n        Object.keys(argv).forEach(key => {\n            if (!specialKeys.includes(key) &&\n                !Object.prototype.hasOwnProperty.call(positionalMap, key) &&\n                !Object.prototype.hasOwnProperty.call(yargs.getInternalMethods().getParseContext(), key) &&\n                !self.isValidAndSomeAliasIsNotNew(key, aliases)) {\n                unknown.push(key);\n            }\n        });\n        if (checkPositionals &&\n            (currentContext.commands.length > 0 ||\n                commandKeys.length > 0 ||\n                isDefaultCommand)) {\n            argv._.slice(currentContext.commands.length).forEach(key => {\n                if (!commandKeys.includes('' + key)) {\n                    unknown.push('' + key);\n                }\n            });\n        }\n        if (checkPositionals) {\n            const demandedCommands = yargs.getDemandedCommands();\n            const maxNonOptDemanded = ((_a = demandedCommands._) === null || _a === void 0 ? void 0 : _a.max) || 0;\n            const expected = currentContext.commands.length + maxNonOptDemanded;\n            if (expected < argv._.length) {\n                argv._.slice(expected).forEach(key => {\n                    key = String(key);\n                    if (!currentContext.commands.includes(key) &&\n                        !unknown.includes(key)) {\n                        unknown.push(key);\n                    }\n                });\n            }\n        }\n        if (unknown.length) {\n            usage.fail(__n('Unknown argument: %s', 'Unknown arguments: %s', unknown.length, unknown.map(s => (s.trim() ? s : `\"${s}\"`)).join(', ')));\n        }\n    };\n    self.unknownCommands = function unknownCommands(argv) {\n        const commandKeys = yargs\n            .getInternalMethods()\n            .getCommandInstance()\n            .getCommands();\n        const unknown = [];\n        const currentContext = yargs.getInternalMethods().getContext();\n        if (currentContext.commands.length > 0 || commandKeys.length > 0) {\n            argv._.slice(currentContext.commands.length).forEach(key => {\n                if (!commandKeys.includes('' + key)) {\n                    unknown.push('' + key);\n                }\n            });\n        }\n        if (unknown.length > 0) {\n            usage.fail(__n('Unknown command: %s', 'Unknown commands: %s', unknown.length, unknown.join(', ')));\n            return true;\n        }\n        else {\n            return false;\n        }\n    };\n    self.isValidAndSomeAliasIsNotNew = function isValidAndSomeAliasIsNotNew(key, aliases) {\n        if (!Object.prototype.hasOwnProperty.call(aliases, key)) {\n            return false;\n        }\n        const newAliases = yargs.parsed.newAliases;\n        return [key, ...aliases[key]].some(a => !Object.prototype.hasOwnProperty.call(newAliases, a) || !newAliases[key]);\n    };\n    self.limitedChoices = function limitedChoices(argv) {\n        const options = yargs.getOptions();\n        const invalid = {};\n        if (!Object.keys(options.choices).length)\n            return;\n        Object.keys(argv).forEach(key => {\n            if (specialKeys.indexOf(key) === -1 &&\n                Object.prototype.hasOwnProperty.call(options.choices, key)) {\n                [].concat(argv[key]).forEach(value => {\n                    if (options.choices[key].indexOf(value) === -1 &&\n                        value !== undefined) {\n                        invalid[key] = (invalid[key] || []).concat(value);\n                    }\n                });\n            }\n        });\n        const invalidKeys = Object.keys(invalid);\n        if (!invalidKeys.length)\n            return;\n        let msg = __('Invalid values:');\n        invalidKeys.forEach(key => {\n            msg += `\\n  ${__('Argument: %s, Given: %s, Choices: %s', key, usage.stringifiedValues(invalid[key]), usage.stringifiedValues(options.choices[key]))}`;\n        });\n        usage.fail(msg);\n    };\n    let implied = {};\n    self.implies = function implies(key, value) {\n        argsert('<string|object> [array|number|string]', [key, value], arguments.length);\n        if (typeof key === 'object') {\n            Object.keys(key).forEach(k => {\n                self.implies(k, key[k]);\n            });\n        }\n        else {\n            yargs.global(key);\n            if (!implied[key]) {\n                implied[key] = [];\n            }\n            if (Array.isArray(value)) {\n                value.forEach(i => self.implies(key, i));\n            }\n            else {\n                assertNotStrictEqual(value, undefined, shim);\n                implied[key].push(value);\n            }\n        }\n    };\n    self.getImplied = function getImplied() {\n        return implied;\n    };\n    function keyExists(argv, val) {\n        const num = Number(val);\n        val = isNaN(num) ? val : num;\n        if (typeof val === 'number') {\n            val = argv._.length >= val;\n        }\n        else if (val.match(/^--no-.+/)) {\n            val = val.match(/^--no-(.+)/)[1];\n            val = !Object.prototype.hasOwnProperty.call(argv, val);\n        }\n        else {\n            val = Object.prototype.hasOwnProperty.call(argv, val);\n        }\n        return val;\n    }\n    self.implications = function implications(argv) {\n        const implyFail = [];\n        Object.keys(implied).forEach(key => {\n            const origKey = key;\n            (implied[key] || []).forEach(value => {\n                let key = origKey;\n                const origValue = value;\n                key = keyExists(argv, key);\n                value = keyExists(argv, value);\n                if (key && !value) {\n                    implyFail.push(` ${origKey} -> ${origValue}`);\n                }\n            });\n        });\n        if (implyFail.length) {\n            let msg = `${__('Implications failed:')}\\n`;\n            implyFail.forEach(value => {\n                msg += value;\n            });\n            usage.fail(msg);\n        }\n    };\n    let conflicting = {};\n    self.conflicts = function conflicts(key, value) {\n        argsert('<string|object> [array|string]', [key, value], arguments.length);\n        if (typeof key === 'object') {\n            Object.keys(key).forEach(k => {\n                self.conflicts(k, key[k]);\n            });\n        }\n        else {\n            yargs.global(key);\n            if (!conflicting[key]) {\n                conflicting[key] = [];\n            }\n            if (Array.isArray(value)) {\n                value.forEach(i => self.conflicts(key, i));\n            }\n            else {\n                conflicting[key].push(value);\n            }\n        }\n    };\n    self.getConflicting = () => conflicting;\n    self.conflicting = function conflictingFn(argv) {\n        Object.keys(argv).forEach(key => {\n            if (conflicting[key]) {\n                conflicting[key].forEach(value => {\n                    if (value && argv[key] !== undefined && argv[value] !== undefined) {\n                        usage.fail(__('Arguments %s and %s are mutually exclusive', key, value));\n                    }\n                });\n            }\n        });\n        if (yargs.getInternalMethods().getParserConfiguration()['strip-dashed']) {\n            Object.keys(conflicting).forEach(key => {\n                conflicting[key].forEach(value => {\n                    if (value &&\n                        argv[shim.Parser.camelCase(key)] !== undefined &&\n                        argv[shim.Parser.camelCase(value)] !== undefined) {\n                        usage.fail(__('Arguments %s and %s are mutually exclusive', key, value));\n                    }\n                });\n            });\n        }\n    };\n    self.recommendCommands = function recommendCommands(cmd, potentialCommands) {\n        const threshold = 3;\n        potentialCommands = potentialCommands.sort((a, b) => b.length - a.length);\n        let recommended = null;\n        let bestDistance = Infinity;\n        for (let i = 0, candidate; (candidate = potentialCommands[i]) !== undefined; i++) {\n            const d = distance(cmd, candidate);\n            if (d <= threshold && d < bestDistance) {\n                bestDistance = d;\n                recommended = candidate;\n            }\n        }\n        if (recommended)\n            usage.fail(__('Did you mean %s?', recommended));\n    };\n    self.reset = function reset(localLookup) {\n        implied = objFilter(implied, k => !localLookup[k]);\n        conflicting = objFilter(conflicting, k => !localLookup[k]);\n        return self;\n    };\n    const frozens = [];\n    self.freeze = function freeze() {\n        frozens.push({\n            implied,\n            conflicting,\n        });\n    };\n    self.unfreeze = function unfreeze() {\n        const frozen = frozens.pop();\n        assertNotStrictEqual(frozen, undefined, shim);\n        ({ implied, conflicting } = frozen);\n    };\n    return self;\n}\n","import { YError } from '../yerror.js';\nlet previouslyVisitedConfigs = [];\nlet shim;\nexport function applyExtends(config, cwd, mergeExtends, _shim) {\n    shim = _shim;\n    let defaultConfig = {};\n    if (Object.prototype.hasOwnProperty.call(config, 'extends')) {\n        if (typeof config.extends !== 'string')\n            return defaultConfig;\n        const isPath = /\\.json|\\..*rc$/.test(config.extends);\n        let pathToDefault = null;\n        if (!isPath) {\n            try {\n                pathToDefault = import.meta.resolve(config.extends);\n            }\n            catch (_err) {\n                return config;\n            }\n        }\n        else {\n            pathToDefault = getPathToDefaultConfig(cwd, config.extends);\n        }\n        checkForCircularExtends(pathToDefault);\n        previouslyVisitedConfigs.push(pathToDefault);\n        defaultConfig = isPath\n            ? JSON.parse(shim.readFileSync(pathToDefault, 'utf8'))\n            : _shim.require(config.extends);\n        delete config.extends;\n        defaultConfig = applyExtends(defaultConfig, shim.path.dirname(pathToDefault), mergeExtends, shim);\n    }\n    previouslyVisitedConfigs = [];\n    return mergeExtends\n        ? mergeDeep(defaultConfig, config)\n        : Object.assign({}, defaultConfig, config);\n}\nfunction checkForCircularExtends(cfgPath) {\n    if (previouslyVisitedConfigs.indexOf(cfgPath) > -1) {\n        throw new YError(`Circular extended configurations: '${cfgPath}'.`);\n    }\n}\nfunction getPathToDefaultConfig(cwd, pathToExtend) {\n    return shim.path.resolve(cwd, pathToExtend);\n}\nfunction mergeDeep(config1, config2) {\n    const target = {};\n    function isObject(obj) {\n        return obj && typeof obj === 'object' && !Array.isArray(obj);\n    }\n    Object.assign(target, config1);\n    for (const key of Object.keys(config2)) {\n        if (isObject(config2[key]) && isObject(target[key])) {\n            target[key] = mergeDeep(config1[key], config2[key]);\n        }\n        else {\n            target[key] = config2[key];\n        }\n    }\n    return target;\n}\n","var __classPrivateFieldSet = (this && this.__classPrivateFieldSet) || function (receiver, state, value, kind, f) {\n    if (kind === \"m\") throw new TypeError(\"Private method is not writable\");\n    if (kind === \"a\" && !f) throw new TypeError(\"Private accessor was defined without a setter\");\n    if (typeof state === \"function\" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError(\"Cannot write private member to an object whose class did not declare it\");\n    return (kind === \"a\" ? f.call(receiver, value) : f ? f.value = value : state.set(receiver, value)), value;\n};\nvar __classPrivateFieldGet = (this && this.__classPrivateFieldGet) || function (receiver, state, kind, f) {\n    if (kind === \"a\" && !f) throw new TypeError(\"Private accessor was defined without a getter\");\n    if (typeof state === \"function\" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError(\"Cannot read private member from an object whose class did not declare it\");\n    return kind === \"m\" ? f : kind === \"a\" ? f.call(receiver) : f ? f.value : state.get(receiver);\n};\nvar _YargsInstance_command, _YargsInstance_cwd, _YargsInstance_context, _YargsInstance_completion, _YargsInstance_completionCommand, _YargsInstance_defaultShowHiddenOpt, _YargsInstance_exitError, _YargsInstance_detectLocale, _YargsInstance_emittedWarnings, _YargsInstance_exitProcess, _YargsInstance_frozens, _YargsInstance_globalMiddleware, _YargsInstance_groups, _YargsInstance_hasOutput, _YargsInstance_helpOpt, _YargsInstance_isGlobalContext, _YargsInstance_logger, _YargsInstance_output, _YargsInstance_options, _YargsInstance_parentRequire, _YargsInstance_parserConfig, _YargsInstance_parseFn, _YargsInstance_parseContext, _YargsInstance_pkgs, _YargsInstance_preservedGroups, _YargsInstance_processArgs, _YargsInstance_recommendCommands, _YargsInstance_shim, _YargsInstance_strict, _YargsInstance_strictCommands, _YargsInstance_strictOptions, _YargsInstance_usage, _YargsInstance_usageConfig, _YargsInstance_versionOpt, _YargsInstance_validation;\nimport { command as Command, } from './command.js';\nimport { assertNotStrictEqual, assertSingleKey, objectKeys, } from './typings/common-types.js';\nimport { YError } from './yerror.js';\nimport { usage as Usage } from './usage.js';\nimport { argsert } from './argsert.js';\nimport { completion as Completion, } from './completion.js';\nimport { validation as Validation, } from './validation.js';\nimport { objFilter } from './utils/obj-filter.js';\nimport { applyExtends } from './utils/apply-extends.js';\nimport { applyMiddleware, GlobalMiddleware, } from './middleware.js';\nimport { isPromise } from './utils/is-promise.js';\nimport { maybeAsyncResult } from './utils/maybe-async-result.js';\nimport setBlocking from './utils/set-blocking.js';\nexport function YargsFactory(_shim) {\n    return (processArgs = [], cwd = _shim.process.cwd(), parentRequire) => {\n        const yargs = new YargsInstance(processArgs, cwd, parentRequire, _shim);\n        Object.defineProperty(yargs, 'argv', {\n            get: () => {\n                return yargs.parse();\n            },\n            enumerable: true,\n        });\n        yargs.help();\n        yargs.version();\n        return yargs;\n    };\n}\nconst kCopyDoubleDash = Symbol('copyDoubleDash');\nconst kCreateLogger = Symbol('copyDoubleDash');\nconst kDeleteFromParserHintObject = Symbol('deleteFromParserHintObject');\nconst kEmitWarning = Symbol('emitWarning');\nconst kFreeze = Symbol('freeze');\nconst kGetDollarZero = Symbol('getDollarZero');\nconst kGetParserConfiguration = Symbol('getParserConfiguration');\nconst kGetUsageConfiguration = Symbol('getUsageConfiguration');\nconst kGuessLocale = Symbol('guessLocale');\nconst kGuessVersion = Symbol('guessVersion');\nconst kParsePositionalNumbers = Symbol('parsePositionalNumbers');\nconst kPkgUp = Symbol('pkgUp');\nconst kPopulateParserHintArray = Symbol('populateParserHintArray');\nconst kPopulateParserHintSingleValueDictionary = Symbol('populateParserHintSingleValueDictionary');\nconst kPopulateParserHintArrayDictionary = Symbol('populateParserHintArrayDictionary');\nconst kPopulateParserHintDictionary = Symbol('populateParserHintDictionary');\nconst kSanitizeKey = Symbol('sanitizeKey');\nconst kSetKey = Symbol('setKey');\nconst kUnfreeze = Symbol('unfreeze');\nconst kValidateAsync = Symbol('validateAsync');\nconst kGetCommandInstance = Symbol('getCommandInstance');\nconst kGetContext = Symbol('getContext');\nconst kGetHasOutput = Symbol('getHasOutput');\nconst kGetLoggerInstance = Symbol('getLoggerInstance');\nconst kGetParseContext = Symbol('getParseContext');\nconst kGetUsageInstance = Symbol('getUsageInstance');\nconst kGetValidationInstance = Symbol('getValidationInstance');\nconst kHasParseCallback = Symbol('hasParseCallback');\nconst kIsGlobalContext = Symbol('isGlobalContext');\nconst kPostProcess = Symbol('postProcess');\nconst kRebase = Symbol('rebase');\nconst kReset = Symbol('reset');\nconst kRunYargsParserAndExecuteCommands = Symbol('runYargsParserAndExecuteCommands');\nconst kRunValidation = Symbol('runValidation');\nconst kSetHasOutput = Symbol('setHasOutput');\nconst kTrackManuallySetKeys = Symbol('kTrackManuallySetKeys');\nconst DEFAULT_LOCALE = 'en_US';\nexport class YargsInstance {\n    constructor(processArgs = [], cwd, parentRequire, shim) {\n        this.customScriptName = false;\n        this.parsed = false;\n        _YargsInstance_command.set(this, void 0);\n        _YargsInstance_cwd.set(this, void 0);\n        _YargsInstance_context.set(this, { commands: [], fullCommands: [] });\n        _YargsInstance_completion.set(this, null);\n        _YargsInstance_completionCommand.set(this, null);\n        _YargsInstance_defaultShowHiddenOpt.set(this, 'show-hidden');\n        _YargsInstance_exitError.set(this, null);\n        _YargsInstance_detectLocale.set(this, true);\n        _YargsInstance_emittedWarnings.set(this, {});\n        _YargsInstance_exitProcess.set(this, true);\n        _YargsInstance_frozens.set(this, []);\n        _YargsInstance_globalMiddleware.set(this, void 0);\n        _YargsInstance_groups.set(this, {});\n        _YargsInstance_hasOutput.set(this, false);\n        _YargsInstance_helpOpt.set(this, null);\n        _YargsInstance_isGlobalContext.set(this, true);\n        _YargsInstance_logger.set(this, void 0);\n        _YargsInstance_output.set(this, '');\n        _YargsInstance_options.set(this, void 0);\n        _YargsInstance_parentRequire.set(this, void 0);\n        _YargsInstance_parserConfig.set(this, {});\n        _YargsInstance_parseFn.set(this, null);\n        _YargsInstance_parseContext.set(this, null);\n        _YargsInstance_pkgs.set(this, {});\n        _YargsInstance_preservedGroups.set(this, {});\n        _YargsInstance_processArgs.set(this, void 0);\n        _YargsInstance_recommendCommands.set(this, false);\n        _YargsInstance_shim.set(this, void 0);\n        _YargsInstance_strict.set(this, false);\n        _YargsInstance_strictCommands.set(this, false);\n        _YargsInstance_strictOptions.set(this, false);\n        _YargsInstance_usage.set(this, void 0);\n        _YargsInstance_usageConfig.set(this, {});\n        _YargsInstance_versionOpt.set(this, null);\n        _YargsInstance_validation.set(this, void 0);\n        __classPrivateFieldSet(this, _YargsInstance_shim, shim, \"f\");\n        __classPrivateFieldSet(this, _YargsInstance_processArgs, processArgs, \"f\");\n        __classPrivateFieldSet(this, _YargsInstance_cwd, cwd, \"f\");\n        __classPrivateFieldSet(this, _YargsInstance_parentRequire, parentRequire, \"f\");\n        __classPrivateFieldSet(this, _YargsInstance_globalMiddleware, new GlobalMiddleware(this), \"f\");\n        this.$0 = this[kGetDollarZero]();\n        this[kReset]();\n        __classPrivateFieldSet(this, _YargsInstance_command, __classPrivateFieldGet(this, _YargsInstance_command, \"f\"), \"f\");\n        __classPrivateFieldSet(this, _YargsInstance_usage, __classPrivateFieldGet(this, _YargsInstance_usage, \"f\"), \"f\");\n        __classPrivateFieldSet(this, _YargsInstance_validation, __classPrivateFieldGet(this, _YargsInstance_validation, \"f\"), \"f\");\n        __classPrivateFieldSet(this, _YargsInstance_options, __classPrivateFieldGet(this, _YargsInstance_options, \"f\"), \"f\");\n        __classPrivateFieldGet(this, _YargsInstance_options, \"f\").showHiddenOpt = __classPrivateFieldGet(this, _YargsInstance_defaultShowHiddenOpt, \"f\");\n        __classPrivateFieldSet(this, _YargsInstance_logger, this[kCreateLogger](), \"f\");\n        __classPrivateFieldGet(this, _YargsInstance_shim, \"f\").y18n.setLocale(DEFAULT_LOCALE);\n    }\n    addHelpOpt(opt, msg) {\n        const defaultHelpOpt = 'help';\n        argsert('[string|boolean] [string]', [opt, msg], arguments.length);\n        if (__classPrivateFieldGet(this, _YargsInstance_helpOpt, \"f\")) {\n            this[kDeleteFromParserHintObject](__classPrivateFieldGet(this, _YargsInstance_helpOpt, \"f\"));\n            __classPrivateFieldSet(this, _YargsInstance_helpOpt, null, \"f\");\n        }\n        if (opt === false && msg === undefined)\n            return this;\n        __classPrivateFieldSet(this, _YargsInstance_helpOpt, typeof opt === 'string' ? opt : defaultHelpOpt, \"f\");\n        this.boolean(__classPrivateFieldGet(this, _YargsInstance_helpOpt, \"f\"));\n        this.describe(__classPrivateFieldGet(this, _YargsInstance_helpOpt, \"f\"), msg || __classPrivateFieldGet(this, _YargsInstance_usage, \"f\").deferY18nLookup('Show help'));\n        return this;\n    }\n    help(opt, msg) {\n        return this.addHelpOpt(opt, msg);\n    }\n    addShowHiddenOpt(opt, msg) {\n        argsert('[string|boolean] [string]', [opt, msg], arguments.length);\n        if (opt === false && msg === undefined)\n            return this;\n        const showHiddenOpt = typeof opt === 'string' ? opt : __classPrivateFieldGet(this, _YargsInstance_defaultShowHiddenOpt, \"f\");\n        this.boolean(showHiddenOpt);\n        this.describe(showHiddenOpt, msg || __classPrivateFieldGet(this, _YargsInstance_usage, \"f\").deferY18nLookup('Show hidden options'));\n        __classPrivateFieldGet(this, _YargsInstance_options, \"f\").showHiddenOpt = showHiddenOpt;\n        return this;\n    }\n    showHidden(opt, msg) {\n        return this.addShowHiddenOpt(opt, msg);\n    }\n    alias(key, value) {\n        argsert('<object|string|array> [string|array]', [key, value], arguments.length);\n        this[kPopulateParserHintArrayDictionary](this.alias.bind(this), 'alias', key, value);\n        return this;\n    }\n    array(keys) {\n        argsert('<array|string>', [keys], arguments.length);\n        this[kPopulateParserHintArray]('array', keys);\n        this[kTrackManuallySetKeys](keys);\n        return this;\n    }\n    boolean(keys) {\n        argsert('<array|string>', [keys], arguments.length);\n        this[kPopulateParserHintArray]('boolean', keys);\n        this[kTrackManuallySetKeys](keys);\n        return this;\n    }\n    check(f, global) {\n        argsert('<function> [boolean]', [f, global], arguments.length);\n        this.middleware((argv, _yargs) => {\n            return maybeAsyncResult(() => {\n                return f(argv, _yargs.getOptions());\n            }, (result) => {\n                if (!result) {\n                    __classPrivateFieldGet(this, _YargsInstance_usage, \"f\").fail(__classPrivateFieldGet(this, _YargsInstance_shim, \"f\").y18n.__('Argument check failed: %s', f.toString()));\n                }\n                else if (typeof result === 'string' || result instanceof Error) {\n                    __classPrivateFieldGet(this, _YargsInstance_usage, \"f\").fail(result.toString(), result);\n                }\n                return argv;\n            }, (err) => {\n                __classPrivateFieldGet(this, _YargsInstance_usage, \"f\").fail(err.message ? err.message : err.toString(), err);\n                return argv;\n            });\n        }, false, global);\n        return this;\n    }\n    choices(key, value) {\n        argsert('<object|string|array> [string|array]', [key, value], arguments.length);\n        this[kPopulateParserHintArrayDictionary](this.choices.bind(this), 'choices', key, value);\n        return this;\n    }\n    coerce(keys, value) {\n        argsert('<object|string|array> [function]', [keys, value], arguments.length);\n        if (Array.isArray(keys)) {\n            if (!value) {\n                throw new YError('coerce callback must be provided');\n            }\n            for (const key of keys) {\n                this.coerce(key, value);\n            }\n            return this;\n        }\n        else if (typeof keys === 'object') {\n            for (const key of Object.keys(keys)) {\n                this.coerce(key, keys[key]);\n            }\n            return this;\n        }\n        if (!value) {\n            throw new YError('coerce callback must be provided');\n        }\n        const coerceKey = keys;\n        __classPrivateFieldGet(this, _YargsInstance_options, \"f\").key[coerceKey] = true;\n        __classPrivateFieldGet(this, _YargsInstance_globalMiddleware, \"f\").addCoerceMiddleware((argv, yargs) => {\n            var _a;\n            const coerceKeyAliases = (_a = yargs.getAliases()[coerceKey]) !== null && _a !== void 0 ? _a : [];\n            const argvKeys = [coerceKey, ...coerceKeyAliases].filter(key => Object.prototype.hasOwnProperty.call(argv, key));\n            if (argvKeys.length === 0) {\n                return argv;\n            }\n            return maybeAsyncResult(() => {\n                return value(argv[argvKeys[0]]);\n            }, (result) => {\n                argvKeys.forEach(key => {\n                    argv[key] = result;\n                });\n                return argv;\n            }, (err) => {\n                throw new YError(err.message);\n            });\n        }, coerceKey);\n        return this;\n    }\n    conflicts(key1, key2) {\n        argsert('<string|object> [string|array]', [key1, key2], arguments.length);\n        __classPrivateFieldGet(this, _YargsInstance_validation, \"f\").conflicts(key1, key2);\n        return this;\n    }\n    config(key = 'config', msg, parseFn) {\n        argsert('[object|string] [string|function] [function]', [key, msg, parseFn], arguments.length);\n        if (typeof key === 'object' && !Array.isArray(key)) {\n            key = applyExtends(key, __classPrivateFieldGet(this, _YargsInstance_cwd, \"f\"), this[kGetParserConfiguration]()['deep-merge-config'] || false, __classPrivateFieldGet(this, _YargsInstance_shim, \"f\"));\n            __classPrivateFieldGet(this, _YargsInstance_options, \"f\").configObjects = (__classPrivateFieldGet(this, _YargsInstance_options, \"f\").configObjects || []).concat(key);\n            return this;\n        }\n        if (typeof msg === 'function') {\n            parseFn = msg;\n            msg = undefined;\n        }\n        this.describe(key, msg || __classPrivateFieldGet(this, _YargsInstance_usage, \"f\").deferY18nLookup('Path to JSON config file'));\n        (Array.isArray(key) ? key : [key]).forEach(k => {\n            __classPrivateFieldGet(this, _YargsInstance_options, \"f\").config[k] = parseFn || true;\n        });\n        return this;\n    }\n    completion(cmd, desc, fn) {\n        argsert('[string] [string|boolean|function] [function]', [cmd, desc, fn], arguments.length);\n        if (typeof desc === 'function') {\n            fn = desc;\n            desc = undefined;\n        }\n        __classPrivateFieldSet(this, _YargsInstance_completionCommand, cmd || __classPrivateFieldGet(this, _YargsInstance_completionCommand, \"f\") || 'completion', \"f\");\n        if (!desc && desc !== false) {\n            desc = 'generate completion script';\n        }\n        this.command(__classPrivateFieldGet(this, _YargsInstance_completionCommand, \"f\"), desc);\n        if (fn)\n            __classPrivateFieldGet(this, _YargsInstance_completion, \"f\").registerFunction(fn);\n        return this;\n    }\n    command(cmd, description, builder, handler, middlewares, deprecated) {\n        argsert('<string|array|object> [string|boolean] [function|object] [function] [array] [boolean|string]', [cmd, description, builder, handler, middlewares, deprecated], arguments.length);\n        __classPrivateFieldGet(this, _YargsInstance_command, \"f\").addHandler(cmd, description, builder, handler, middlewares, deprecated);\n        return this;\n    }\n    commands(cmd, description, builder, handler, middlewares, deprecated) {\n        return this.command(cmd, description, builder, handler, middlewares, deprecated);\n    }\n    commandDir(dir, opts) {\n        argsert('<string> [object]', [dir, opts], arguments.length);\n        const req = __classPrivateFieldGet(this, _YargsInstance_parentRequire, \"f\") || __classPrivateFieldGet(this, _YargsInstance_shim, \"f\").require;\n        __classPrivateFieldGet(this, _YargsInstance_command, \"f\").addDirectory(dir, req, __classPrivateFieldGet(this, _YargsInstance_shim, \"f\").getCallerFile(), opts);\n        return this;\n    }\n    count(keys) {\n        argsert('<array|string>', [keys], arguments.length);\n        this[kPopulateParserHintArray]('count', keys);\n        this[kTrackManuallySetKeys](keys);\n        return this;\n    }\n    default(key, value, defaultDescription) {\n        argsert('<object|string|array> [*] [string]', [key, value, defaultDescription], arguments.length);\n        if (defaultDescription) {\n            assertSingleKey(key, __classPrivateFieldGet(this, _YargsInstance_shim, \"f\"));\n            __classPrivateFieldGet(this, _YargsInstance_options, \"f\").defaultDescription[key] = defaultDescription;\n        }\n        if (typeof value === 'function') {\n            assertSingleKey(key, __classPrivateFieldGet(this, _YargsInstance_shim, \"f\"));\n            if (!__classPrivateFieldGet(this, _YargsInstance_options, \"f\").defaultDescription[key])\n                __classPrivateFieldGet(this, _YargsInstance_options, \"f\").defaultDescription[key] =\n                    __classPrivateFieldGet(this, _YargsInstance_usage, \"f\").functionDescription(value);\n            value = value.call();\n        }\n        this[kPopulateParserHintSingleValueDictionary](this.default.bind(this), 'default', key, value);\n        return this;\n    }\n    defaults(key, value, defaultDescription) {\n        return this.default(key, value, defaultDescription);\n    }\n    demandCommand(min = 1, max, minMsg, maxMsg) {\n        argsert('[number] [number|string] [string|null|undefined] [string|null|undefined]', [min, max, minMsg, maxMsg], arguments.length);\n        if (typeof max !== 'number') {\n            minMsg = max;\n            max = Infinity;\n        }\n        this.global('_', false);\n        __classPrivateFieldGet(this, _YargsInstance_options, \"f\").demandedCommands._ = {\n            min,\n            max,\n            minMsg,\n            maxMsg,\n        };\n        return this;\n    }\n    demand(keys, max, msg) {\n        if (Array.isArray(max)) {\n            max.forEach(key => {\n                assertNotStrictEqual(msg, true, __classPrivateFieldGet(this, _YargsInstance_shim, \"f\"));\n                this.demandOption(key, msg);\n            });\n            max = Infinity;\n        }\n        else if (typeof max !== 'number') {\n            msg = max;\n            max = Infinity;\n        }\n        if (typeof keys === 'number') {\n            assertNotStrictEqual(msg, true, __classPrivateFieldGet(this, _YargsInstance_shim, \"f\"));\n            this.demandCommand(keys, max, msg, msg);\n        }\n        else if (Array.isArray(keys)) {\n            keys.forEach(key => {\n                assertNotStrictEqual(msg, true, __classPrivateFieldGet(this, _YargsInstance_shim, \"f\"));\n                this.demandOption(key, msg);\n            });\n        }\n        else {\n            if (typeof msg === 'string') {\n                this.demandOption(keys, msg);\n            }\n            else if (msg === true || typeof msg === 'undefined') {\n                this.demandOption(keys);\n            }\n        }\n        return this;\n    }\n    demandOption(keys, msg) {\n        argsert('<object|string|array> [string]', [keys, msg], arguments.length);\n        this[kPopulateParserHintSingleValueDictionary](this.demandOption.bind(this), 'demandedOptions', keys, msg);\n        return this;\n    }\n    deprecateOption(option, message) {\n        argsert('<string> [string|boolean]', [option, message], arguments.length);\n        __classPrivateFieldGet(this, _YargsInstance_options, \"f\").deprecatedOptions[option] = message;\n        return this;\n    }\n    describe(keys, description) {\n        argsert('<object|string|array> [string]', [keys, description], arguments.length);\n        this[kSetKey](keys, true);\n        __classPrivateFieldGet(this, _YargsInstance_usage, \"f\").describe(keys, description);\n        return this;\n    }\n    detectLocale(detect) {\n        argsert('<boolean>', [detect], arguments.length);\n        __classPrivateFieldSet(this, _YargsInstance_detectLocale, detect, \"f\");\n        return this;\n    }\n    env(prefix) {\n        argsert('[string|boolean]', [prefix], arguments.length);\n        if (prefix === false)\n            delete __classPrivateFieldGet(this, _YargsInstance_options, \"f\").envPrefix;\n        else\n            __classPrivateFieldGet(this, _YargsInstance_options, \"f\").envPrefix = prefix || '';\n        return this;\n    }\n    epilogue(msg) {\n        argsert('<string>', [msg], arguments.length);\n        __classPrivateFieldGet(this, _YargsInstance_usage, \"f\").epilog(msg);\n        return this;\n    }\n    epilog(msg) {\n        return this.epilogue(msg);\n    }\n    example(cmd, description) {\n        argsert('<string|array> [string]', [cmd, description], arguments.length);\n        if (Array.isArray(cmd)) {\n            cmd.forEach(exampleParams => this.example(...exampleParams));\n        }\n        else {\n            __classPrivateFieldGet(this, _YargsInstance_usage, \"f\").example(cmd, description);\n        }\n        return this;\n    }\n    exit(code, err) {\n        __classPrivateFieldSet(this, _YargsInstance_hasOutput, true, \"f\");\n        __classPrivateFieldSet(this, _YargsInstance_exitError, err, \"f\");\n        if (__classPrivateFieldGet(this, _YargsInstance_exitProcess, \"f\"))\n            __classPrivateFieldGet(this, _YargsInstance_shim, \"f\").process.exit(code);\n    }\n    exitProcess(enabled = true) {\n        argsert('[boolean]', [enabled], arguments.length);\n        __classPrivateFieldSet(this, _YargsInstance_exitProcess, enabled, \"f\");\n        return this;\n    }\n    fail(f) {\n        argsert('<function|boolean>', [f], arguments.length);\n        if (typeof f === 'boolean' && f !== false) {\n            throw new YError(\"Invalid first argument. Expected function or boolean 'false'\");\n        }\n        __classPrivateFieldGet(this, _YargsInstance_usage, \"f\").failFn(f);\n        return this;\n    }\n    getAliases() {\n        return this.parsed ? this.parsed.aliases : {};\n    }\n    async getCompletion(args, done) {\n        argsert('<array> [function]', [args, done], arguments.length);\n        if (!done) {\n            return new Promise((resolve, reject) => {\n                __classPrivateFieldGet(this, _YargsInstance_completion, \"f\").getCompletion(args, (err, completions) => {\n                    if (err)\n                        reject(err);\n                    else\n                        resolve(completions);\n                });\n            });\n        }\n        else {\n            return __classPrivateFieldGet(this, _YargsInstance_completion, \"f\").getCompletion(args, done);\n        }\n    }\n    getDemandedOptions() {\n        argsert([], 0);\n        return __classPrivateFieldGet(this, _YargsInstance_options, \"f\").demandedOptions;\n    }\n    getDemandedCommands() {\n        argsert([], 0);\n        return __classPrivateFieldGet(this, _YargsInstance_options, \"f\").demandedCommands;\n    }\n    getDeprecatedOptions() {\n        argsert([], 0);\n        return __classPrivateFieldGet(this, _YargsInstance_options, \"f\").deprecatedOptions;\n    }\n    getDetectLocale() {\n        return __classPrivateFieldGet(this, _YargsInstance_detectLocale, \"f\");\n    }\n    getExitProcess() {\n        return __classPrivateFieldGet(this, _YargsInstance_exitProcess, \"f\");\n    }\n    getGroups() {\n        return Object.assign({}, __classPrivateFieldGet(this, _YargsInstance_groups, \"f\"), __classPrivateFieldGet(this, _YargsInstance_preservedGroups, \"f\"));\n    }\n    getHelp() {\n        __classPrivateFieldSet(this, _YargsInstance_hasOutput, true, \"f\");\n        if (!__classPrivateFieldGet(this, _YargsInstance_usage, \"f\").hasCachedHelpMessage()) {\n            if (!this.parsed) {\n                const parse = this[kRunYargsParserAndExecuteCommands](__classPrivateFieldGet(this, _YargsInstance_processArgs, \"f\"), undefined, undefined, 0, true);\n                if (isPromise(parse)) {\n                    return parse.then(() => {\n                        return __classPrivateFieldGet(this, _YargsInstance_usage, \"f\").help();\n                    });\n                }\n            }\n            const builderResponse = __classPrivateFieldGet(this, _YargsInstance_command, \"f\").runDefaultBuilderOn(this);\n            if (isPromise(builderResponse)) {\n                return builderResponse.then(() => {\n                    return __classPrivateFieldGet(this, _YargsInstance_usage, \"f\").help();\n                });\n            }\n        }\n        return Promise.resolve(__classPrivateFieldGet(this, _YargsInstance_usage, \"f\").help());\n    }\n    getOptions() {\n        return __classPrivateFieldGet(this, _YargsInstance_options, \"f\");\n    }\n    getStrict() {\n        return __classPrivateFieldGet(this, _YargsInstance_strict, \"f\");\n    }\n    getStrictCommands() {\n        return __classPrivateFieldGet(this, _YargsInstance_strictCommands, \"f\");\n    }\n    getStrictOptions() {\n        return __classPrivateFieldGet(this, _YargsInstance_strictOptions, \"f\");\n    }\n    global(globals, global) {\n        argsert('<string|array> [boolean]', [globals, global], arguments.length);\n        globals = [].concat(globals);\n        if (global !== false) {\n            __classPrivateFieldGet(this, _YargsInstance_options, \"f\").local = __classPrivateFieldGet(this, _YargsInstance_options, \"f\").local.filter(l => globals.indexOf(l) === -1);\n        }\n        else {\n            globals.forEach(g => {\n                if (!__classPrivateFieldGet(this, _YargsInstance_options, \"f\").local.includes(g))\n                    __classPrivateFieldGet(this, _YargsInstance_options, \"f\").local.push(g);\n            });\n        }\n        return this;\n    }\n    group(opts, groupName) {\n        argsert('<string|array> <string>', [opts, groupName], arguments.length);\n        const existing = __classPrivateFieldGet(this, _YargsInstance_preservedGroups, \"f\")[groupName] || __classPrivateFieldGet(this, _YargsInstance_groups, \"f\")[groupName];\n        if (__classPrivateFieldGet(this, _YargsInstance_preservedGroups, \"f\")[groupName]) {\n            delete __classPrivateFieldGet(this, _YargsInstance_preservedGroups, \"f\")[groupName];\n        }\n        const seen = {};\n        __classPrivateFieldGet(this, _YargsInstance_groups, \"f\")[groupName] = (existing || []).concat(opts).filter(key => {\n            if (seen[key])\n                return false;\n            return (seen[key] = true);\n        });\n        return this;\n    }\n    hide(key) {\n        argsert('<string>', [key], arguments.length);\n        __classPrivateFieldGet(this, _YargsInstance_options, \"f\").hiddenOptions.push(key);\n        return this;\n    }\n    implies(key, value) {\n        argsert('<string|object> [number|string|array]', [key, value], arguments.length);\n        __classPrivateFieldGet(this, _YargsInstance_validation, \"f\").implies(key, value);\n        return this;\n    }\n    locale(locale) {\n        argsert('[string]', [locale], arguments.length);\n        if (locale === undefined) {\n            this[kGuessLocale]();\n            return __classPrivateFieldGet(this, _YargsInstance_shim, \"f\").y18n.getLocale();\n        }\n        __classPrivateFieldSet(this, _YargsInstance_detectLocale, false, \"f\");\n        __classPrivateFieldGet(this, _YargsInstance_shim, \"f\").y18n.setLocale(locale);\n        return this;\n    }\n    middleware(callback, applyBeforeValidation, global) {\n        return __classPrivateFieldGet(this, _YargsInstance_globalMiddleware, \"f\").addMiddleware(callback, !!applyBeforeValidation, global);\n    }\n    nargs(key, value) {\n        argsert('<string|object|array> [number]', [key, value], arguments.length);\n        this[kPopulateParserHintSingleValueDictionary](this.nargs.bind(this), 'narg', key, value);\n        return this;\n    }\n    normalize(keys) {\n        argsert('<array|string>', [keys], arguments.length);\n        this[kPopulateParserHintArray]('normalize', keys);\n        return this;\n    }\n    number(keys) {\n        argsert('<array|string>', [keys], arguments.length);\n        this[kPopulateParserHintArray]('number', keys);\n        this[kTrackManuallySetKeys](keys);\n        return this;\n    }\n    option(key, opt) {\n        argsert('<string|object> [object]', [key, opt], arguments.length);\n        if (typeof key === 'object') {\n            Object.keys(key).forEach(k => {\n                this.options(k, key[k]);\n            });\n        }\n        else {\n            if (typeof opt !== 'object') {\n                opt = {};\n            }\n            this[kTrackManuallySetKeys](key);\n            if (__classPrivateFieldGet(this, _YargsInstance_versionOpt, \"f\") && (key === 'version' || (opt === null || opt === void 0 ? void 0 : opt.alias) === 'version')) {\n                this[kEmitWarning]([\n                    '\"version\" is a reserved word.',\n                    'Please do one of the following:',\n                    '- Disable version with `yargs.version(false)` if using \"version\" as an option',\n                    '- Use the built-in `yargs.version` method instead (if applicable)',\n                    '- Use a different option key',\n                    'https://yargs.js.org/docs/#api-reference-version',\n                ].join('\\n'), undefined, 'versionWarning');\n            }\n            __classPrivateFieldGet(this, _YargsInstance_options, \"f\").key[key] = true;\n            if (opt.alias)\n                this.alias(key, opt.alias);\n            const deprecate = opt.deprecate || opt.deprecated;\n            if (deprecate) {\n                this.deprecateOption(key, deprecate);\n            }\n            const demand = opt.demand || opt.required || opt.require;\n            if (demand) {\n                this.demand(key, demand);\n            }\n            if (opt.demandOption) {\n                this.demandOption(key, typeof opt.demandOption === 'string' ? opt.demandOption : undefined);\n            }\n            if (opt.conflicts) {\n                this.conflicts(key, opt.conflicts);\n            }\n            if ('default' in opt) {\n                this.default(key, opt.default);\n            }\n            if (opt.implies !== undefined) {\n                this.implies(key, opt.implies);\n            }\n            if (opt.nargs !== undefined) {\n                this.nargs(key, opt.nargs);\n            }\n            if (opt.config) {\n                this.config(key, opt.configParser);\n            }\n            if (opt.normalize) {\n                this.normalize(key);\n            }\n            if (opt.choices) {\n                this.choices(key, opt.choices);\n            }\n            if (opt.coerce) {\n                this.coerce(key, opt.coerce);\n            }\n            if (opt.group) {\n                this.group(key, opt.group);\n            }\n            if (opt.boolean || opt.type === 'boolean') {\n                this.boolean(key);\n                if (opt.alias)\n                    this.boolean(opt.alias);\n            }\n            if (opt.array || opt.type === 'array') {\n                this.array(key);\n                if (opt.alias)\n                    this.array(opt.alias);\n            }\n            if (opt.number || opt.type === 'number') {\n                this.number(key);\n                if (opt.alias)\n                    this.number(opt.alias);\n            }\n            if (opt.string || opt.type === 'string') {\n                this.string(key);\n                if (opt.alias)\n                    this.string(opt.alias);\n            }\n            if (opt.count || opt.type === 'count') {\n                this.count(key);\n            }\n            if (typeof opt.global === 'boolean') {\n                this.global(key, opt.global);\n            }\n            if (opt.defaultDescription) {\n                __classPrivateFieldGet(this, _YargsInstance_options, \"f\").defaultDescription[key] = opt.defaultDescription;\n            }\n            if (opt.skipValidation) {\n                this.skipValidation(key);\n            }\n            const desc = opt.describe || opt.description || opt.desc;\n            const descriptions = __classPrivateFieldGet(this, _YargsInstance_usage, \"f\").getDescriptions();\n            if (!Object.prototype.hasOwnProperty.call(descriptions, key) ||\n                typeof desc === 'string') {\n                this.describe(key, desc);\n            }\n            if (opt.hidden) {\n                this.hide(key);\n            }\n            if (opt.requiresArg) {\n                this.requiresArg(key);\n            }\n        }\n        return this;\n    }\n    options(key, opt) {\n        return this.option(key, opt);\n    }\n    parse(args, shortCircuit, _parseFn) {\n        argsert('[string|array] [function|boolean|object] [function]', [args, shortCircuit, _parseFn], arguments.length);\n        this[kFreeze]();\n        if (typeof args === 'undefined') {\n            args = __classPrivateFieldGet(this, _YargsInstance_processArgs, \"f\");\n        }\n        if (typeof shortCircuit === 'object') {\n            __classPrivateFieldSet(this, _YargsInstance_parseContext, shortCircuit, \"f\");\n            shortCircuit = _parseFn;\n        }\n        if (typeof shortCircuit === 'function') {\n            __classPrivateFieldSet(this, _YargsInstance_parseFn, shortCircuit, \"f\");\n            shortCircuit = false;\n        }\n        if (!shortCircuit)\n            __classPrivateFieldSet(this, _YargsInstance_processArgs, args, \"f\");\n        if (__classPrivateFieldGet(this, _YargsInstance_parseFn, \"f\"))\n            __classPrivateFieldSet(this, _YargsInstance_exitProcess, false, \"f\");\n        const parsed = this[kRunYargsParserAndExecuteCommands](args, !!shortCircuit);\n        const tmpParsed = this.parsed;\n        __classPrivateFieldGet(this, _YargsInstance_completion, \"f\").setParsed(this.parsed);\n        if (isPromise(parsed)) {\n            return parsed\n                .then(argv => {\n                if (__classPrivateFieldGet(this, _YargsInstance_parseFn, \"f\"))\n                    __classPrivateFieldGet(this, _YargsInstance_parseFn, \"f\").call(this, __classPrivateFieldGet(this, _YargsInstance_exitError, \"f\"), argv, __classPrivateFieldGet(this, _YargsInstance_output, \"f\"));\n                return argv;\n            })\n                .catch(err => {\n                if (__classPrivateFieldGet(this, _YargsInstance_parseFn, \"f\")) {\n                    __classPrivateFieldGet(this, _YargsInstance_parseFn, \"f\")(err, this.parsed.argv, __classPrivateFieldGet(this, _YargsInstance_output, \"f\"));\n                }\n                throw err;\n            })\n                .finally(() => {\n                this[kUnfreeze]();\n                this.parsed = tmpParsed;\n            });\n        }\n        else {\n            if (__classPrivateFieldGet(this, _YargsInstance_parseFn, \"f\"))\n                __classPrivateFieldGet(this, _YargsInstance_parseFn, \"f\").call(this, __classPrivateFieldGet(this, _YargsInstance_exitError, \"f\"), parsed, __classPrivateFieldGet(this, _YargsInstance_output, \"f\"));\n            this[kUnfreeze]();\n            this.parsed = tmpParsed;\n        }\n        return parsed;\n    }\n    parseAsync(args, shortCircuit, _parseFn) {\n        const maybePromise = this.parse(args, shortCircuit, _parseFn);\n        return !isPromise(maybePromise)\n            ? Promise.resolve(maybePromise)\n            : maybePromise;\n    }\n    parseSync(args, shortCircuit, _parseFn) {\n        const maybePromise = this.parse(args, shortCircuit, _parseFn);\n        if (isPromise(maybePromise)) {\n            throw new YError('.parseSync() must not be used with asynchronous builders, handlers, or middleware');\n        }\n        return maybePromise;\n    }\n    parserConfiguration(config) {\n        argsert('<object>', [config], arguments.length);\n        __classPrivateFieldSet(this, _YargsInstance_parserConfig, config, \"f\");\n        return this;\n    }\n    pkgConf(key, rootPath) {\n        argsert('<string> [string]', [key, rootPath], arguments.length);\n        let conf = null;\n        const obj = this[kPkgUp](rootPath || __classPrivateFieldGet(this, _YargsInstance_cwd, \"f\"));\n        if (obj[key] && typeof obj[key] === 'object') {\n            conf = applyExtends(obj[key], rootPath || __classPrivateFieldGet(this, _YargsInstance_cwd, \"f\"), this[kGetParserConfiguration]()['deep-merge-config'] || false, __classPrivateFieldGet(this, _YargsInstance_shim, \"f\"));\n            __classPrivateFieldGet(this, _YargsInstance_options, \"f\").configObjects = (__classPrivateFieldGet(this, _YargsInstance_options, \"f\").configObjects || []).concat(conf);\n        }\n        return this;\n    }\n    positional(key, opts) {\n        argsert('<string> <object>', [key, opts], arguments.length);\n        const supportedOpts = [\n            'default',\n            'defaultDescription',\n            'implies',\n            'normalize',\n            'choices',\n            'conflicts',\n            'coerce',\n            'type',\n            'describe',\n            'desc',\n            'description',\n            'alias',\n        ];\n        opts = objFilter(opts, (k, v) => {\n            if (k === 'type' && !['string', 'number', 'boolean'].includes(v))\n                return false;\n            return supportedOpts.includes(k);\n        });\n        const fullCommand = __classPrivateFieldGet(this, _YargsInstance_context, \"f\").fullCommands[__classPrivateFieldGet(this, _YargsInstance_context, \"f\").fullCommands.length - 1];\n        const parseOptions = fullCommand\n            ? __classPrivateFieldGet(this, _YargsInstance_command, \"f\").cmdToParseOptions(fullCommand)\n            : {\n                array: [],\n                alias: {},\n                default: {},\n                demand: {},\n            };\n        objectKeys(parseOptions).forEach(pk => {\n            const parseOption = parseOptions[pk];\n            if (Array.isArray(parseOption)) {\n                if (parseOption.indexOf(key) !== -1)\n                    opts[pk] = true;\n            }\n            else {\n                if (parseOption[key] && !(pk in opts))\n                    opts[pk] = parseOption[key];\n            }\n        });\n        this.group(key, __classPrivateFieldGet(this, _YargsInstance_usage, \"f\").getPositionalGroupName());\n        return this.option(key, opts);\n    }\n    recommendCommands(recommend = true) {\n        argsert('[boolean]', [recommend], arguments.length);\n        __classPrivateFieldSet(this, _YargsInstance_recommendCommands, recommend, \"f\");\n        return this;\n    }\n    required(keys, max, msg) {\n        return this.demand(keys, max, msg);\n    }\n    require(keys, max, msg) {\n        return this.demand(keys, max, msg);\n    }\n    requiresArg(keys) {\n        argsert('<array|string|object> [number]', [keys], arguments.length);\n        if (typeof keys === 'string' && __classPrivateFieldGet(this, _YargsInstance_options, \"f\").narg[keys]) {\n            return this;\n        }\n        else {\n            this[kPopulateParserHintSingleValueDictionary](this.requiresArg.bind(this), 'narg', keys, NaN);\n        }\n        return this;\n    }\n    showCompletionScript($0, cmd) {\n        argsert('[string] [string]', [$0, cmd], arguments.length);\n        $0 = $0 || this.$0;\n        __classPrivateFieldGet(this, _YargsInstance_logger, \"f\").log(__classPrivateFieldGet(this, _YargsInstance_completion, \"f\").generateCompletionScript($0, cmd || __classPrivateFieldGet(this, _YargsInstance_completionCommand, \"f\") || 'completion'));\n        return this;\n    }\n    showHelp(level) {\n        argsert('[string|function]', [level], arguments.length);\n        __classPrivateFieldSet(this, _YargsInstance_hasOutput, true, \"f\");\n        if (!__classPrivateFieldGet(this, _YargsInstance_usage, \"f\").hasCachedHelpMessage()) {\n            if (!this.parsed) {\n                const parse = this[kRunYargsParserAndExecuteCommands](__classPrivateFieldGet(this, _YargsInstance_processArgs, \"f\"), undefined, undefined, 0, true);\n                if (isPromise(parse)) {\n                    parse.then(() => {\n                        __classPrivateFieldGet(this, _YargsInstance_usage, \"f\").showHelp(level);\n                    });\n                    return this;\n                }\n            }\n            const builderResponse = __classPrivateFieldGet(this, _YargsInstance_command, \"f\").runDefaultBuilderOn(this);\n            if (isPromise(builderResponse)) {\n                builderResponse.then(() => {\n                    __classPrivateFieldGet(this, _YargsInstance_usage, \"f\").showHelp(level);\n                });\n                return this;\n            }\n        }\n        __classPrivateFieldGet(this, _YargsInstance_usage, \"f\").showHelp(level);\n        return this;\n    }\n    scriptName(scriptName) {\n        this.customScriptName = true;\n        this.$0 = scriptName;\n        return this;\n    }\n    showHelpOnFail(enabled, message) {\n        argsert('[boolean|string] [string]', [enabled, message], arguments.length);\n        __classPrivateFieldGet(this, _YargsInstance_usage, \"f\").showHelpOnFail(enabled, message);\n        return this;\n    }\n    showVersion(level) {\n        argsert('[string|function]', [level], arguments.length);\n        __classPrivateFieldGet(this, _YargsInstance_usage, \"f\").showVersion(level);\n        return this;\n    }\n    skipValidation(keys) {\n        argsert('<array|string>', [keys], arguments.length);\n        this[kPopulateParserHintArray]('skipValidation', keys);\n        return this;\n    }\n    strict(enabled) {\n        argsert('[boolean]', [enabled], arguments.length);\n        __classPrivateFieldSet(this, _YargsInstance_strict, enabled !== false, \"f\");\n        return this;\n    }\n    strictCommands(enabled) {\n        argsert('[boolean]', [enabled], arguments.length);\n        __classPrivateFieldSet(this, _YargsInstance_strictCommands, enabled !== false, \"f\");\n        return this;\n    }\n    strictOptions(enabled) {\n        argsert('[boolean]', [enabled], arguments.length);\n        __classPrivateFieldSet(this, _YargsInstance_strictOptions, enabled !== false, \"f\");\n        return this;\n    }\n    string(keys) {\n        argsert('<array|string>', [keys], arguments.length);\n        this[kPopulateParserHintArray]('string', keys);\n        this[kTrackManuallySetKeys](keys);\n        return this;\n    }\n    terminalWidth() {\n        argsert([], 0);\n        return __classPrivateFieldGet(this, _YargsInstance_shim, \"f\").process.stdColumns;\n    }\n    updateLocale(obj) {\n        return this.updateStrings(obj);\n    }\n    updateStrings(obj) {\n        argsert('<object>', [obj], arguments.length);\n        __classPrivateFieldSet(this, _YargsInstance_detectLocale, false, \"f\");\n        __classPrivateFieldGet(this, _YargsInstance_shim, \"f\").y18n.updateLocale(obj);\n        return this;\n    }\n    usage(msg, description, builder, handler) {\n        argsert('<string|null|undefined> [string|boolean] [function|object] [function]', [msg, description, builder, handler], arguments.length);\n        if (description !== undefined) {\n            assertNotStrictEqual(msg, null, __classPrivateFieldGet(this, _YargsInstance_shim, \"f\"));\n            if ((msg || '').match(/^\\$0( |$)/)) {\n                return this.command(msg, description, builder, handler);\n            }\n            else {\n                throw new YError('.usage() description must start with $0 if being used as alias for .command()');\n            }\n        }\n        else {\n            __classPrivateFieldGet(this, _YargsInstance_usage, \"f\").usage(msg);\n            return this;\n        }\n    }\n    usageConfiguration(config) {\n        argsert('<object>', [config], arguments.length);\n        __classPrivateFieldSet(this, _YargsInstance_usageConfig, config, \"f\");\n        return this;\n    }\n    version(opt, msg, ver) {\n        const defaultVersionOpt = 'version';\n        argsert('[boolean|string] [string] [string]', [opt, msg, ver], arguments.length);\n        if (__classPrivateFieldGet(this, _YargsInstance_versionOpt, \"f\")) {\n            this[kDeleteFromParserHintObject](__classPrivateFieldGet(this, _YargsInstance_versionOpt, \"f\"));\n            __classPrivateFieldGet(this, _YargsInstance_usage, \"f\").version(undefined);\n            __classPrivateFieldSet(this, _YargsInstance_versionOpt, null, \"f\");\n        }\n        if (arguments.length === 0) {\n            ver = this[kGuessVersion]();\n            opt = defaultVersionOpt;\n        }\n        else if (arguments.length === 1) {\n            if (opt === false) {\n                return this;\n            }\n            ver = opt;\n            opt = defaultVersionOpt;\n        }\n        else if (arguments.length === 2) {\n            ver = msg;\n            msg = undefined;\n        }\n        __classPrivateFieldSet(this, _YargsInstance_versionOpt, typeof opt === 'string' ? opt : defaultVersionOpt, \"f\");\n        msg = msg || __classPrivateFieldGet(this, _YargsInstance_usage, \"f\").deferY18nLookup('Show version number');\n        __classPrivateFieldGet(this, _YargsInstance_usage, \"f\").version(ver || undefined);\n        this.boolean(__classPrivateFieldGet(this, _YargsInstance_versionOpt, \"f\"));\n        this.describe(__classPrivateFieldGet(this, _YargsInstance_versionOpt, \"f\"), msg);\n        return this;\n    }\n    wrap(cols) {\n        argsert('<number|null|undefined>', [cols], arguments.length);\n        __classPrivateFieldGet(this, _YargsInstance_usage, \"f\").wrap(cols);\n        return this;\n    }\n    [(_YargsInstance_command = new WeakMap(), _YargsInstance_cwd = new WeakMap(), _YargsInstance_context = new WeakMap(), _YargsInstance_completion = new WeakMap(), _YargsInstance_completionCommand = new WeakMap(), _YargsInstance_defaultShowHiddenOpt = new WeakMap(), _YargsInstance_exitError = new WeakMap(), _YargsInstance_detectLocale = new WeakMap(), _YargsInstance_emittedWarnings = new WeakMap(), _YargsInstance_exitProcess = new WeakMap(), _YargsInstance_frozens = new WeakMap(), _YargsInstance_globalMiddleware = new WeakMap(), _YargsInstance_groups = new WeakMap(), _YargsInstance_hasOutput = new WeakMap(), _YargsInstance_helpOpt = new WeakMap(), _YargsInstance_isGlobalContext = new WeakMap(), _YargsInstance_logger = new WeakMap(), _YargsInstance_output = new WeakMap(), _YargsInstance_options = new WeakMap(), _YargsInstance_parentRequire = new WeakMap(), _YargsInstance_parserConfig = new WeakMap(), _YargsInstance_parseFn = new WeakMap(), _YargsInstance_parseContext = new WeakMap(), _YargsInstance_pkgs = new WeakMap(), _YargsInstance_preservedGroups = new WeakMap(), _YargsInstance_processArgs = new WeakMap(), _YargsInstance_recommendCommands = new WeakMap(), _YargsInstance_shim = new WeakMap(), _YargsInstance_strict = new WeakMap(), _YargsInstance_strictCommands = new WeakMap(), _YargsInstance_strictOptions = new WeakMap(), _YargsInstance_usage = new WeakMap(), _YargsInstance_usageConfig = new WeakMap(), _YargsInstance_versionOpt = new WeakMap(), _YargsInstance_validation = new WeakMap(), kCopyDoubleDash)](argv) {\n        if (!argv._ || !argv['--'])\n            return argv;\n        argv._.push.apply(argv._, argv['--']);\n        try {\n            delete argv['--'];\n        }\n        catch (_err) { }\n        return argv;\n    }\n    [kCreateLogger]() {\n        return {\n            log: (...args) => {\n                if (!this[kHasParseCallback]())\n                    console.log(...args);\n                __classPrivateFieldSet(this, _YargsInstance_hasOutput, true, \"f\");\n                if (__classPrivateFieldGet(this, _YargsInstance_output, \"f\").length)\n                    __classPrivateFieldSet(this, _YargsInstance_output, __classPrivateFieldGet(this, _YargsInstance_output, \"f\") + '\\n', \"f\");\n                __classPrivateFieldSet(this, _YargsInstance_output, __classPrivateFieldGet(this, _YargsInstance_output, \"f\") + args.join(' '), \"f\");\n            },\n            error: (...args) => {\n                if (!this[kHasParseCallback]())\n                    console.error(...args);\n                __classPrivateFieldSet(this, _YargsInstance_hasOutput, true, \"f\");\n                if (__classPrivateFieldGet(this, _YargsInstance_output, \"f\").length)\n                    __classPrivateFieldSet(this, _YargsInstance_output, __classPrivateFieldGet(this, _YargsInstance_output, \"f\") + '\\n', \"f\");\n                __classPrivateFieldSet(this, _YargsInstance_output, __classPrivateFieldGet(this, _YargsInstance_output, \"f\") + args.join(' '), \"f\");\n            },\n        };\n    }\n    [kDeleteFromParserHintObject](optionKey) {\n        objectKeys(__classPrivateFieldGet(this, _YargsInstance_options, \"f\")).forEach((hintKey) => {\n            if (((key) => key === 'configObjects')(hintKey))\n                return;\n            const hint = __classPrivateFieldGet(this, _YargsInstance_options, \"f\")[hintKey];\n            if (Array.isArray(hint)) {\n                if (hint.includes(optionKey))\n                    hint.splice(hint.indexOf(optionKey), 1);\n            }\n            else if (typeof hint === 'object') {\n                delete hint[optionKey];\n            }\n        });\n        delete __classPrivateFieldGet(this, _YargsInstance_usage, \"f\").getDescriptions()[optionKey];\n    }\n    [kEmitWarning](warning, type, deduplicationId) {\n        if (!__classPrivateFieldGet(this, _YargsInstance_emittedWarnings, \"f\")[deduplicationId]) {\n            __classPrivateFieldGet(this, _YargsInstance_shim, \"f\").process.emitWarning(warning, type);\n            __classPrivateFieldGet(this, _YargsInstance_emittedWarnings, \"f\")[deduplicationId] = true;\n        }\n    }\n    [kFreeze]() {\n        __classPrivateFieldGet(this, _YargsInstance_frozens, \"f\").push({\n            options: __classPrivateFieldGet(this, _YargsInstance_options, \"f\"),\n            configObjects: __classPrivateFieldGet(this, _YargsInstance_options, \"f\").configObjects.slice(0),\n            exitProcess: __classPrivateFieldGet(this, _YargsInstance_exitProcess, \"f\"),\n            groups: __classPrivateFieldGet(this, _YargsInstance_groups, \"f\"),\n            strict: __classPrivateFieldGet(this, _YargsInstance_strict, \"f\"),\n            strictCommands: __classPrivateFieldGet(this, _YargsInstance_strictCommands, \"f\"),\n            strictOptions: __classPrivateFieldGet(this, _YargsInstance_strictOptions, \"f\"),\n            completionCommand: __classPrivateFieldGet(this, _YargsInstance_completionCommand, \"f\"),\n            output: __classPrivateFieldGet(this, _YargsInstance_output, \"f\"),\n            exitError: __classPrivateFieldGet(this, _YargsInstance_exitError, \"f\"),\n            hasOutput: __classPrivateFieldGet(this, _YargsInstance_hasOutput, \"f\"),\n            parsed: this.parsed,\n            parseFn: __classPrivateFieldGet(this, _YargsInstance_parseFn, \"f\"),\n            parseContext: __classPrivateFieldGet(this, _YargsInstance_parseContext, \"f\"),\n        });\n        __classPrivateFieldGet(this, _YargsInstance_usage, \"f\").freeze();\n        __classPrivateFieldGet(this, _YargsInstance_validation, \"f\").freeze();\n        __classPrivateFieldGet(this, _YargsInstance_command, \"f\").freeze();\n        __classPrivateFieldGet(this, _YargsInstance_globalMiddleware, \"f\").freeze();\n    }\n    [kGetDollarZero]() {\n        let $0 = '';\n        let default$0;\n        if (/\\b(node|iojs|electron)(\\.exe)?$/.test(__classPrivateFieldGet(this, _YargsInstance_shim, \"f\").process.argv()[0])) {\n            default$0 = __classPrivateFieldGet(this, _YargsInstance_shim, \"f\").process.argv().slice(1, 2);\n        }\n        else {\n            default$0 = __classPrivateFieldGet(this, _YargsInstance_shim, \"f\").process.argv().slice(0, 1);\n        }\n        $0 = default$0\n            .map(x => {\n            const b = this[kRebase](__classPrivateFieldGet(this, _YargsInstance_cwd, \"f\"), x);\n            return x.match(/^(\\/|([a-zA-Z]:)?\\\\)/) && b.length < x.length ? b : x;\n        })\n            .join(' ')\n            .trim();\n        if (__classPrivateFieldGet(this, _YargsInstance_shim, \"f\").getEnv('_') &&\n            __classPrivateFieldGet(this, _YargsInstance_shim, \"f\").getProcessArgvBin() === __classPrivateFieldGet(this, _YargsInstance_shim, \"f\").getEnv('_')) {\n            $0 = __classPrivateFieldGet(this, _YargsInstance_shim, \"f\")\n                .getEnv('_')\n                .replace(`${__classPrivateFieldGet(this, _YargsInstance_shim, \"f\").path.dirname(__classPrivateFieldGet(this, _YargsInstance_shim, \"f\").process.execPath())}/`, '');\n        }\n        return $0;\n    }\n    [kGetParserConfiguration]() {\n        return __classPrivateFieldGet(this, _YargsInstance_parserConfig, \"f\");\n    }\n    [kGetUsageConfiguration]() {\n        return __classPrivateFieldGet(this, _YargsInstance_usageConfig, \"f\");\n    }\n    [kGuessLocale]() {\n        if (!__classPrivateFieldGet(this, _YargsInstance_detectLocale, \"f\"))\n            return;\n        const locale = __classPrivateFieldGet(this, _YargsInstance_shim, \"f\").getEnv('LC_ALL') ||\n            __classPrivateFieldGet(this, _YargsInstance_shim, \"f\").getEnv('LC_MESSAGES') ||\n            __classPrivateFieldGet(this, _YargsInstance_shim, \"f\").getEnv('LANG') ||\n            __classPrivateFieldGet(this, _YargsInstance_shim, \"f\").getEnv('LANGUAGE') ||\n            'en_US';\n        this.locale(locale.replace(/[.:].*/, ''));\n    }\n    [kGuessVersion]() {\n        const obj = this[kPkgUp]();\n        return obj.version || 'unknown';\n    }\n    [kParsePositionalNumbers](argv) {\n        const args = argv['--'] ? argv['--'] : argv._;\n        for (let i = 0, arg; (arg = args[i]) !== undefined; i++) {\n            if (__classPrivateFieldGet(this, _YargsInstance_shim, \"f\").Parser.looksLikeNumber(arg) &&\n                Number.isSafeInteger(Math.floor(parseFloat(`${arg}`)))) {\n                args[i] = Number(arg);\n            }\n        }\n        return argv;\n    }\n    [kPkgUp](rootPath) {\n        const npath = rootPath || '*';\n        if (__classPrivateFieldGet(this, _YargsInstance_pkgs, \"f\")[npath])\n            return __classPrivateFieldGet(this, _YargsInstance_pkgs, \"f\")[npath];\n        let obj = {};\n        try {\n            let startDir = rootPath || __classPrivateFieldGet(this, _YargsInstance_shim, \"f\").mainFilename;\n            if (__classPrivateFieldGet(this, _YargsInstance_shim, \"f\").path.extname(startDir)) {\n                startDir = __classPrivateFieldGet(this, _YargsInstance_shim, \"f\").path.dirname(startDir);\n            }\n            const pkgJsonPath = __classPrivateFieldGet(this, _YargsInstance_shim, \"f\").findUp(startDir, (dir, names) => {\n                if (names.includes('package.json')) {\n                    return 'package.json';\n                }\n                else {\n                    return undefined;\n                }\n            });\n            assertNotStrictEqual(pkgJsonPath, undefined, __classPrivateFieldGet(this, _YargsInstance_shim, \"f\"));\n            obj = JSON.parse(__classPrivateFieldGet(this, _YargsInstance_shim, \"f\").readFileSync(pkgJsonPath, 'utf8'));\n        }\n        catch (_noop) { }\n        __classPrivateFieldGet(this, _YargsInstance_pkgs, \"f\")[npath] = obj || {};\n        return __classPrivateFieldGet(this, _YargsInstance_pkgs, \"f\")[npath];\n    }\n    [kPopulateParserHintArray](type, keys) {\n        keys = [].concat(keys);\n        keys.forEach(key => {\n            key = this[kSanitizeKey](key);\n            __classPrivateFieldGet(this, _YargsInstance_options, \"f\")[type].push(key);\n        });\n    }\n    [kPopulateParserHintSingleValueDictionary](builder, type, key, value) {\n        this[kPopulateParserHintDictionary](builder, type, key, value, (type, key, value) => {\n            __classPrivateFieldGet(this, _YargsInstance_options, \"f\")[type][key] = value;\n        });\n    }\n    [kPopulateParserHintArrayDictionary](builder, type, key, value) {\n        this[kPopulateParserHintDictionary](builder, type, key, value, (type, key, value) => {\n            __classPrivateFieldGet(this, _YargsInstance_options, \"f\")[type][key] = (__classPrivateFieldGet(this, _YargsInstance_options, \"f\")[type][key] || []).concat(value);\n        });\n    }\n    [kPopulateParserHintDictionary](builder, type, key, value, singleKeyHandler) {\n        if (Array.isArray(key)) {\n            key.forEach(k => {\n                builder(k, value);\n            });\n        }\n        else if (((key) => typeof key === 'object')(key)) {\n            for (const k of objectKeys(key)) {\n                builder(k, key[k]);\n            }\n        }\n        else {\n            singleKeyHandler(type, this[kSanitizeKey](key), value);\n        }\n    }\n    [kSanitizeKey](key) {\n        if (key === '__proto__')\n            return '___proto___';\n        return key;\n    }\n    [kSetKey](key, set) {\n        this[kPopulateParserHintSingleValueDictionary](this[kSetKey].bind(this), 'key', key, set);\n        return this;\n    }\n    [kUnfreeze]() {\n        var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m;\n        const frozen = __classPrivateFieldGet(this, _YargsInstance_frozens, \"f\").pop();\n        assertNotStrictEqual(frozen, undefined, __classPrivateFieldGet(this, _YargsInstance_shim, \"f\"));\n        let configObjects;\n        (_a = this, _b = this, _c = this, _d = this, _e = this, _f = this, _g = this, _h = this, _j = this, _k = this, _l = this, _m = this, {\n            options: ({ set value(_o) { __classPrivateFieldSet(_a, _YargsInstance_options, _o, \"f\"); } }).value,\n            configObjects,\n            exitProcess: ({ set value(_o) { __classPrivateFieldSet(_b, _YargsInstance_exitProcess, _o, \"f\"); } }).value,\n            groups: ({ set value(_o) { __classPrivateFieldSet(_c, _YargsInstance_groups, _o, \"f\"); } }).value,\n            output: ({ set value(_o) { __classPrivateFieldSet(_d, _YargsInstance_output, _o, \"f\"); } }).value,\n            exitError: ({ set value(_o) { __classPrivateFieldSet(_e, _YargsInstance_exitError, _o, \"f\"); } }).value,\n            hasOutput: ({ set value(_o) { __classPrivateFieldSet(_f, _YargsInstance_hasOutput, _o, \"f\"); } }).value,\n            parsed: this.parsed,\n            strict: ({ set value(_o) { __classPrivateFieldSet(_g, _YargsInstance_strict, _o, \"f\"); } }).value,\n            strictCommands: ({ set value(_o) { __classPrivateFieldSet(_h, _YargsInstance_strictCommands, _o, \"f\"); } }).value,\n            strictOptions: ({ set value(_o) { __classPrivateFieldSet(_j, _YargsInstance_strictOptions, _o, \"f\"); } }).value,\n            completionCommand: ({ set value(_o) { __classPrivateFieldSet(_k, _YargsInstance_completionCommand, _o, \"f\"); } }).value,\n            parseFn: ({ set value(_o) { __classPrivateFieldSet(_l, _YargsInstance_parseFn, _o, \"f\"); } }).value,\n            parseContext: ({ set value(_o) { __classPrivateFieldSet(_m, _YargsInstance_parseContext, _o, \"f\"); } }).value,\n        } = frozen);\n        __classPrivateFieldGet(this, _YargsInstance_options, \"f\").configObjects = configObjects;\n        __classPrivateFieldGet(this, _YargsInstance_usage, \"f\").unfreeze();\n        __classPrivateFieldGet(this, _YargsInstance_validation, \"f\").unfreeze();\n        __classPrivateFieldGet(this, _YargsInstance_command, \"f\").unfreeze();\n        __classPrivateFieldGet(this, _YargsInstance_globalMiddleware, \"f\").unfreeze();\n    }\n    [kValidateAsync](validation, argv) {\n        return maybeAsyncResult(argv, result => {\n            validation(result);\n            return result;\n        });\n    }\n    getInternalMethods() {\n        return {\n            getCommandInstance: this[kGetCommandInstance].bind(this),\n            getContext: this[kGetContext].bind(this),\n            getHasOutput: this[kGetHasOutput].bind(this),\n            getLoggerInstance: this[kGetLoggerInstance].bind(this),\n            getParseContext: this[kGetParseContext].bind(this),\n            getParserConfiguration: this[kGetParserConfiguration].bind(this),\n            getUsageConfiguration: this[kGetUsageConfiguration].bind(this),\n            getUsageInstance: this[kGetUsageInstance].bind(this),\n            getValidationInstance: this[kGetValidationInstance].bind(this),\n            hasParseCallback: this[kHasParseCallback].bind(this),\n            isGlobalContext: this[kIsGlobalContext].bind(this),\n            postProcess: this[kPostProcess].bind(this),\n            reset: this[kReset].bind(this),\n            runValidation: this[kRunValidation].bind(this),\n            runYargsParserAndExecuteCommands: this[kRunYargsParserAndExecuteCommands].bind(this),\n            setHasOutput: this[kSetHasOutput].bind(this),\n        };\n    }\n    [kGetCommandInstance]() {\n        return __classPrivateFieldGet(this, _YargsInstance_command, \"f\");\n    }\n    [kGetContext]() {\n        return __classPrivateFieldGet(this, _YargsInstance_context, \"f\");\n    }\n    [kGetHasOutput]() {\n        return __classPrivateFieldGet(this, _YargsInstance_hasOutput, \"f\");\n    }\n    [kGetLoggerInstance]() {\n        return __classPrivateFieldGet(this, _YargsInstance_logger, \"f\");\n    }\n    [kGetParseContext]() {\n        return __classPrivateFieldGet(this, _YargsInstance_parseContext, \"f\") || {};\n    }\n    [kGetUsageInstance]() {\n        return __classPrivateFieldGet(this, _YargsInstance_usage, \"f\");\n    }\n    [kGetValidationInstance]() {\n        return __classPrivateFieldGet(this, _YargsInstance_validation, \"f\");\n    }\n    [kHasParseCallback]() {\n        return !!__classPrivateFieldGet(this, _YargsInstance_parseFn, \"f\");\n    }\n    [kIsGlobalContext]() {\n        return __classPrivateFieldGet(this, _YargsInstance_isGlobalContext, \"f\");\n    }\n    [kPostProcess](argv, populateDoubleDash, calledFromCommand, runGlobalMiddleware) {\n        if (calledFromCommand)\n            return argv;\n        if (isPromise(argv))\n            return argv;\n        if (!populateDoubleDash) {\n            argv = this[kCopyDoubleDash](argv);\n        }\n        const parsePositionalNumbers = this[kGetParserConfiguration]()['parse-positional-numbers'] ||\n            this[kGetParserConfiguration]()['parse-positional-numbers'] === undefined;\n        if (parsePositionalNumbers) {\n            argv = this[kParsePositionalNumbers](argv);\n        }\n        if (runGlobalMiddleware) {\n            argv = applyMiddleware(argv, this, __classPrivateFieldGet(this, _YargsInstance_globalMiddleware, \"f\").getMiddleware(), false);\n        }\n        return argv;\n    }\n    [kReset](aliases = {}) {\n        __classPrivateFieldSet(this, _YargsInstance_options, __classPrivateFieldGet(this, _YargsInstance_options, \"f\") || {}, \"f\");\n        const tmpOptions = {};\n        tmpOptions.local = __classPrivateFieldGet(this, _YargsInstance_options, \"f\").local || [];\n        tmpOptions.configObjects = __classPrivateFieldGet(this, _YargsInstance_options, \"f\").configObjects || [];\n        const localLookup = {};\n        tmpOptions.local.forEach(l => {\n            localLookup[l] = true;\n            (aliases[l] || []).forEach(a => {\n                localLookup[a] = true;\n            });\n        });\n        Object.assign(__classPrivateFieldGet(this, _YargsInstance_preservedGroups, \"f\"), Object.keys(__classPrivateFieldGet(this, _YargsInstance_groups, \"f\")).reduce((acc, groupName) => {\n            const keys = __classPrivateFieldGet(this, _YargsInstance_groups, \"f\")[groupName].filter(key => !(key in localLookup));\n            if (keys.length > 0) {\n                acc[groupName] = keys;\n            }\n            return acc;\n        }, {}));\n        __classPrivateFieldSet(this, _YargsInstance_groups, {}, \"f\");\n        const arrayOptions = [\n            'array',\n            'boolean',\n            'string',\n            'skipValidation',\n            'count',\n            'normalize',\n            'number',\n            'hiddenOptions',\n        ];\n        const objectOptions = [\n            'narg',\n            'key',\n            'alias',\n            'default',\n            'defaultDescription',\n            'config',\n            'choices',\n            'demandedOptions',\n            'demandedCommands',\n            'deprecatedOptions',\n        ];\n        arrayOptions.forEach(k => {\n            tmpOptions[k] = (__classPrivateFieldGet(this, _YargsInstance_options, \"f\")[k] || []).filter((k) => !localLookup[k]);\n        });\n        objectOptions.forEach((k) => {\n            tmpOptions[k] = objFilter(__classPrivateFieldGet(this, _YargsInstance_options, \"f\")[k], k => !localLookup[k]);\n        });\n        tmpOptions.envPrefix = __classPrivateFieldGet(this, _YargsInstance_options, \"f\").envPrefix;\n        __classPrivateFieldSet(this, _YargsInstance_options, tmpOptions, \"f\");\n        __classPrivateFieldSet(this, _YargsInstance_usage, __classPrivateFieldGet(this, _YargsInstance_usage, \"f\")\n            ? __classPrivateFieldGet(this, _YargsInstance_usage, \"f\").reset(localLookup)\n            : Usage(this, __classPrivateFieldGet(this, _YargsInstance_shim, \"f\")), \"f\");\n        __classPrivateFieldSet(this, _YargsInstance_validation, __classPrivateFieldGet(this, _YargsInstance_validation, \"f\")\n            ? __classPrivateFieldGet(this, _YargsInstance_validation, \"f\").reset(localLookup)\n            : Validation(this, __classPrivateFieldGet(this, _YargsInstance_usage, \"f\"), __classPrivateFieldGet(this, _YargsInstance_shim, \"f\")), \"f\");\n        __classPrivateFieldSet(this, _YargsInstance_command, __classPrivateFieldGet(this, _YargsInstance_command, \"f\")\n            ? __classPrivateFieldGet(this, _YargsInstance_command, \"f\").reset()\n            : Command(__classPrivateFieldGet(this, _YargsInstance_usage, \"f\"), __classPrivateFieldGet(this, _YargsInstance_validation, \"f\"), __classPrivateFieldGet(this, _YargsInstance_globalMiddleware, \"f\"), __classPrivateFieldGet(this, _YargsInstance_shim, \"f\")), \"f\");\n        if (!__classPrivateFieldGet(this, _YargsInstance_completion, \"f\"))\n            __classPrivateFieldSet(this, _YargsInstance_completion, Completion(this, __classPrivateFieldGet(this, _YargsInstance_usage, \"f\"), __classPrivateFieldGet(this, _YargsInstance_command, \"f\"), __classPrivateFieldGet(this, _YargsInstance_shim, \"f\")), \"f\");\n        __classPrivateFieldGet(this, _YargsInstance_globalMiddleware, \"f\").reset();\n        __classPrivateFieldSet(this, _YargsInstance_completionCommand, null, \"f\");\n        __classPrivateFieldSet(this, _YargsInstance_output, '', \"f\");\n        __classPrivateFieldSet(this, _YargsInstance_exitError, null, \"f\");\n        __classPrivateFieldSet(this, _YargsInstance_hasOutput, false, \"f\");\n        this.parsed = false;\n        return this;\n    }\n    [kRebase](base, dir) {\n        return __classPrivateFieldGet(this, _YargsInstance_shim, \"f\").path.relative(base, dir);\n    }\n    [kRunYargsParserAndExecuteCommands](args, shortCircuit, calledFromCommand, commandIndex = 0, helpOnly = false) {\n        var _a, _b, _c, _d;\n        let skipValidation = !!calledFromCommand || helpOnly;\n        args = args || __classPrivateFieldGet(this, _YargsInstance_processArgs, \"f\");\n        __classPrivateFieldGet(this, _YargsInstance_options, \"f\").__ = __classPrivateFieldGet(this, _YargsInstance_shim, \"f\").y18n.__;\n        __classPrivateFieldGet(this, _YargsInstance_options, \"f\").configuration = this[kGetParserConfiguration]();\n        const populateDoubleDash = !!__classPrivateFieldGet(this, _YargsInstance_options, \"f\").configuration['populate--'];\n        const config = Object.assign({}, __classPrivateFieldGet(this, _YargsInstance_options, \"f\").configuration, {\n            'populate--': true,\n        });\n        const parsed = __classPrivateFieldGet(this, _YargsInstance_shim, \"f\").Parser.detailed(args, Object.assign({}, __classPrivateFieldGet(this, _YargsInstance_options, \"f\"), {\n            configuration: { 'parse-positional-numbers': false, ...config },\n        }));\n        const argv = Object.assign(parsed.argv, __classPrivateFieldGet(this, _YargsInstance_parseContext, \"f\"));\n        let argvPromise = undefined;\n        const aliases = parsed.aliases;\n        let helpOptSet = false;\n        let versionOptSet = false;\n        Object.keys(argv).forEach(key => {\n            if (key === __classPrivateFieldGet(this, _YargsInstance_helpOpt, \"f\") && argv[key]) {\n                helpOptSet = true;\n            }\n            else if (key === __classPrivateFieldGet(this, _YargsInstance_versionOpt, \"f\") && argv[key]) {\n                versionOptSet = true;\n            }\n        });\n        argv.$0 = this.$0;\n        this.parsed = parsed;\n        if (commandIndex === 0) {\n            __classPrivateFieldGet(this, _YargsInstance_usage, \"f\").clearCachedHelpMessage();\n        }\n        try {\n            this[kGuessLocale]();\n            if (shortCircuit) {\n                return this[kPostProcess](argv, populateDoubleDash, !!calledFromCommand, false);\n            }\n            if (__classPrivateFieldGet(this, _YargsInstance_helpOpt, \"f\")) {\n                const helpCmds = [__classPrivateFieldGet(this, _YargsInstance_helpOpt, \"f\")]\n                    .concat(aliases[__classPrivateFieldGet(this, _YargsInstance_helpOpt, \"f\")] || [])\n                    .filter(k => k.length > 1);\n                if (helpCmds.includes('' + argv._[argv._.length - 1])) {\n                    argv._.pop();\n                    helpOptSet = true;\n                }\n            }\n            __classPrivateFieldSet(this, _YargsInstance_isGlobalContext, false, \"f\");\n            const handlerKeys = __classPrivateFieldGet(this, _YargsInstance_command, \"f\").getCommands();\n            const requestCompletions = ((_a = __classPrivateFieldGet(this, _YargsInstance_completion, \"f\")) === null || _a === void 0 ? void 0 : _a.completionKey)\n                ? [\n                    (_b = __classPrivateFieldGet(this, _YargsInstance_completion, \"f\")) === null || _b === void 0 ? void 0 : _b.completionKey,\n                    ...((_d = this.getAliases()[(_c = __classPrivateFieldGet(this, _YargsInstance_completion, \"f\")) === null || _c === void 0 ? void 0 : _c.completionKey]) !== null && _d !== void 0 ? _d : []),\n                ].some((key) => Object.prototype.hasOwnProperty.call(argv, key))\n                : false;\n            const skipRecommendation = helpOptSet || requestCompletions || helpOnly;\n            if (argv._.length) {\n                if (handlerKeys.length) {\n                    let firstUnknownCommand;\n                    for (let i = commandIndex || 0, cmd; argv._[i] !== undefined; i++) {\n                        cmd = String(argv._[i]);\n                        if (handlerKeys.includes(cmd) && cmd !== __classPrivateFieldGet(this, _YargsInstance_completionCommand, \"f\")) {\n                            const innerArgv = __classPrivateFieldGet(this, _YargsInstance_command, \"f\").runCommand(cmd, this, parsed, i + 1, helpOnly, helpOptSet || versionOptSet || helpOnly);\n                            return this[kPostProcess](innerArgv, populateDoubleDash, !!calledFromCommand, false);\n                        }\n                        else if (!firstUnknownCommand &&\n                            cmd !== __classPrivateFieldGet(this, _YargsInstance_completionCommand, \"f\")) {\n                            firstUnknownCommand = cmd;\n                            break;\n                        }\n                    }\n                    if (!__classPrivateFieldGet(this, _YargsInstance_command, \"f\").hasDefaultCommand() &&\n                        __classPrivateFieldGet(this, _YargsInstance_recommendCommands, \"f\") &&\n                        firstUnknownCommand &&\n                        !skipRecommendation) {\n                        __classPrivateFieldGet(this, _YargsInstance_validation, \"f\").recommendCommands(firstUnknownCommand, handlerKeys);\n                    }\n                }\n                if (__classPrivateFieldGet(this, _YargsInstance_completionCommand, \"f\") &&\n                    argv._.includes(__classPrivateFieldGet(this, _YargsInstance_completionCommand, \"f\")) &&\n                    !requestCompletions) {\n                    if (__classPrivateFieldGet(this, _YargsInstance_exitProcess, \"f\"))\n                        setBlocking(true);\n                    this.showCompletionScript();\n                    this.exit(0);\n                }\n            }\n            if (__classPrivateFieldGet(this, _YargsInstance_command, \"f\").hasDefaultCommand() && !skipRecommendation) {\n                const innerArgv = __classPrivateFieldGet(this, _YargsInstance_command, \"f\").runCommand(null, this, parsed, 0, helpOnly, helpOptSet || versionOptSet || helpOnly);\n                return this[kPostProcess](innerArgv, populateDoubleDash, !!calledFromCommand, false);\n            }\n            if (requestCompletions) {\n                if (__classPrivateFieldGet(this, _YargsInstance_exitProcess, \"f\"))\n                    setBlocking(true);\n                args = [].concat(args);\n                const completionArgs = args.slice(args.indexOf(`--${__classPrivateFieldGet(this, _YargsInstance_completion, \"f\").completionKey}`) + 1);\n                __classPrivateFieldGet(this, _YargsInstance_completion, \"f\").getCompletion(completionArgs, (err, completions) => {\n                    if (err)\n                        throw new YError(err.message);\n                    (completions || []).forEach(completion => {\n                        __classPrivateFieldGet(this, _YargsInstance_logger, \"f\").log(completion);\n                    });\n                    this.exit(0);\n                });\n                return this[kPostProcess](argv, !populateDoubleDash, !!calledFromCommand, false);\n            }\n            if (!__classPrivateFieldGet(this, _YargsInstance_hasOutput, \"f\")) {\n                if (helpOptSet) {\n                    if (__classPrivateFieldGet(this, _YargsInstance_exitProcess, \"f\"))\n                        setBlocking(true);\n                    skipValidation = true;\n                    this.showHelp(message => {\n                        __classPrivateFieldGet(this, _YargsInstance_logger, \"f\").log(message);\n                        this.exit(0);\n                    });\n                }\n                else if (versionOptSet) {\n                    if (__classPrivateFieldGet(this, _YargsInstance_exitProcess, \"f\"))\n                        setBlocking(true);\n                    skipValidation = true;\n                    __classPrivateFieldGet(this, _YargsInstance_usage, \"f\").showVersion('log');\n                    this.exit(0);\n                }\n            }\n            if (!skipValidation && __classPrivateFieldGet(this, _YargsInstance_options, \"f\").skipValidation.length > 0) {\n                skipValidation = Object.keys(argv).some(key => __classPrivateFieldGet(this, _YargsInstance_options, \"f\").skipValidation.indexOf(key) >= 0 && argv[key] === true);\n            }\n            if (!skipValidation) {\n                if (parsed.error)\n                    throw new YError(parsed.error.message);\n                if (!requestCompletions) {\n                    const validation = this[kRunValidation](aliases, {}, parsed.error);\n                    if (!calledFromCommand) {\n                        argvPromise = applyMiddleware(argv, this, __classPrivateFieldGet(this, _YargsInstance_globalMiddleware, \"f\").getMiddleware(), true);\n                    }\n                    argvPromise = this[kValidateAsync](validation, argvPromise !== null && argvPromise !== void 0 ? argvPromise : argv);\n                    if (isPromise(argvPromise) && !calledFromCommand) {\n                        argvPromise = argvPromise.then(() => {\n                            return applyMiddleware(argv, this, __classPrivateFieldGet(this, _YargsInstance_globalMiddleware, \"f\").getMiddleware(), false);\n                        });\n                    }\n                }\n            }\n        }\n        catch (err) {\n            if (err instanceof YError)\n                __classPrivateFieldGet(this, _YargsInstance_usage, \"f\").fail(err.message, err);\n            else\n                throw err;\n        }\n        return this[kPostProcess](argvPromise !== null && argvPromise !== void 0 ? argvPromise : argv, populateDoubleDash, !!calledFromCommand, true);\n    }\n    [kRunValidation](aliases, positionalMap, parseErrors, isDefaultCommand) {\n        const demandedOptions = { ...this.getDemandedOptions() };\n        return (argv) => {\n            if (parseErrors)\n                throw new YError(parseErrors.message);\n            __classPrivateFieldGet(this, _YargsInstance_validation, \"f\").nonOptionCount(argv);\n            __classPrivateFieldGet(this, _YargsInstance_validation, \"f\").requiredArguments(argv, demandedOptions);\n            let failedStrictCommands = false;\n            if (__classPrivateFieldGet(this, _YargsInstance_strictCommands, \"f\")) {\n                failedStrictCommands = __classPrivateFieldGet(this, _YargsInstance_validation, \"f\").unknownCommands(argv);\n            }\n            if (__classPrivateFieldGet(this, _YargsInstance_strict, \"f\") && !failedStrictCommands) {\n                __classPrivateFieldGet(this, _YargsInstance_validation, \"f\").unknownArguments(argv, aliases, positionalMap, !!isDefaultCommand);\n            }\n            else if (__classPrivateFieldGet(this, _YargsInstance_strictOptions, \"f\")) {\n                __classPrivateFieldGet(this, _YargsInstance_validation, \"f\").unknownArguments(argv, aliases, {}, false, false);\n            }\n            __classPrivateFieldGet(this, _YargsInstance_validation, \"f\").limitedChoices(argv);\n            __classPrivateFieldGet(this, _YargsInstance_validation, \"f\").implications(argv);\n            __classPrivateFieldGet(this, _YargsInstance_validation, \"f\").conflicting(argv);\n        };\n    }\n    [kSetHasOutput]() {\n        __classPrivateFieldSet(this, _YargsInstance_hasOutput, true, \"f\");\n    }\n    [kTrackManuallySetKeys](keys) {\n        if (typeof keys === 'string') {\n            __classPrivateFieldGet(this, _YargsInstance_options, \"f\").key[keys] = true;\n        }\n        else {\n            for (const k of keys) {\n                __classPrivateFieldGet(this, _YargsInstance_options, \"f\").key[k] = true;\n            }\n        }\n    }\n}\nexport function isYargsInstance(y) {\n    return !!y && typeof y.getInternalMethods === 'function';\n}\n","'use strict';\n\n// Bootstraps yargs for ESM:\nimport esmPlatformShim from './lib/platform-shims/esm.mjs';\nimport {YargsFactory} from './build/lib/yargs-factory.js';\n\nconst Yargs = YargsFactory(esmPlatformShim);\nexport default Yargs;\n\nexport {Yargs as 'module.exports'};\n","import {applyExtends as _applyExtends} from '../build/lib/utils/apply-extends.js';\nimport {hideBin} from '../build/lib/utils/process-argv.js';\nimport Parser from 'yargs-parser';\nimport shim from '../lib/platform-shims/esm.mjs';\n\nconst applyExtends = (config, cwd, mergeExtends) => {\n  return _applyExtends(config, cwd, mergeExtends, shim);\n};\n\nexport {applyExtends, hideBin, Parser};\n","import { n as ok, t as err } from \"./result-D_NYcfr2.js\";\n//#region src/validate.ts\n/**\n* Validate unknown input against a Zod schema.\n*\n* When validation fails, issues are automatically formatted into a human-readable\n* message. If a `createError` factory is provided, it receives the formatted\n* issues and message. Otherwise, a plain `Error` with the formatted message is\n* returned.\n*\n* @param options - The validation options.\n* @param options.schema - The Zod schema to validate against.\n* @param options.params - The unknown value to validate.\n* @param options.createError - Optional factory invoked when validation fails.\n* @returns A Result tuple - either [Error, null] on failure or [null, T] on success.\n*/\nfunction validate({ schema, params, createError }) {\n\tconst result = schema.safeParse(params);\n\tif (!result.success) {\n\t\tconst formatted = formatZodIssues(result.error.issues);\n\t\tif (createError) return err(createError(formatted));\n\t\treturn err(formatted.message);\n\t}\n\treturn ok(result.data);\n}\n/**\n* Format raw Zod validation issues into structured objects and a human-readable string.\n*\n* @private\n* @param issues - Raw Zod validation issues.\n* @param separator - Separator between formatted issue strings.\n* @returns An object containing the formatted issues array and a joined message string.\n*/\nfunction formatZodIssues(issues, separator = \"\\n  \") {\n\tconst formatted = issues.map((issue) => ({\n\t\tmessage: issue.message,\n\t\tpath: issue.path.map(String).join(\".\")\n\t}));\n\treturn {\n\t\tissues: formatted,\n\t\tmessage: formatted.map((item) => {\n\t\t\tif (item.path.length > 0) return `${item.path}: ${item.message}`;\n\t\t\treturn item.message;\n\t\t}).join(separator)\n\t};\n}\n//#endregion\nexport { validate };\n\n//# sourceMappingURL=validate.js.map","/**\n * FIGlet font character data.\n *\n * Two glyph sets:\n * 1. **ANSI Shadow** (6-row) — the primary ciderpress brand font\n * 2. **RubiFont** (4-row) — compact pixel-art fallback for long titles\n *    Source: https://github.com/patorjk/figlet.js (fonts/RubiFont.flf)\n *    Author: RubixTW — created with patorjk.com figfont editor\n */\n\n/**\n * Number of text rows per ANSI Shadow glyph.\n */\nexport const FIGLET_ROWS = 6 as const\n\n/**\n * Number of text rows per RubiFont glyph.\n */\nexport const PIXEL_ROWS = 4 as const\n\n/**\n * String inserted between adjacent ANSI Shadow glyphs (empty — glyphs include trailing space).\n */\nexport const FIGLET_CHAR_GAP = '' as const\n\n/**\n * String inserted between adjacent RubiFont glyphs.\n */\nexport const PIXEL_CHAR_GAP = ' ' as const\n\ntype FigletGlyph = readonly [string, string, string, string, string, string]\ntype PixelGlyph = readonly [string, string, string, string]\n\n/* eslint-disable @stylistic/no-multi-spaces */\n\n/**\n * ANSI Shadow character map — the primary ciderpress brand font.\n */\nexport const FIGLET_CHARS: Readonly<Record<string, FigletGlyph>> = Object.freeze({\n  A: [' █████╗ ', '██╔══██╗', '███████║', '██╔══██║', '██║  ██║', '╚═╝  ╚═╝'],\n  B: ['██████╗ ', '██╔══██╗', '██████╔╝', '██╔══██╗', '██████╔╝', '╚═════╝ '],\n  C: [' ██████╗', '██╔════╝', '██║     ', '██║     ', '╚██████╗', ' ╚═════╝'],\n  D: ['██████╗ ', '██╔══██╗', '██║  ██║', '██║  ██║', '██████╔╝', '╚═════╝ '],\n  E: ['███████╗', '██╔════╝', '█████╗  ', '██╔══╝  ', '███████╗', '╚══════╝'],\n  F: ['███████╗', '██╔════╝', '█████╗  ', '██╔══╝  ', '██║     ', '╚═╝     '],\n  G: [' ██████╗ ', '██╔════╝ ', '██║  ███╗', '██║   ██║', '╚██████╔╝', ' ╚═════╝ '],\n  H: ['██╗  ██╗', '██║  ██║', '███████║', '██╔══██║', '██║  ██║', '╚═╝  ╚═╝'],\n  I: ['██╗', '██║', '██║', '██║', '██║', '╚═╝'],\n  J: ['     ██╗', '     ██║', '     ██║', '██   ██║', '╚█████╔╝', ' ╚════╝ '],\n  K: ['██╗  ██╗', '██║ ██╔╝', '█████╔╝ ', '██╔═██╗ ', '██║  ██╗', '╚═╝  ╚═╝'],\n  L: ['██╗     ', '██║     ', '██║     ', '██║     ', '███████╗', '╚══════╝'],\n  M: ['███╗   ███╗', '████╗ ████║', '██╔████╔██║', '██║╚██╔╝██║', '██║ ╚═╝ ██║', '╚═╝     ╚═╝'],\n  N: ['███╗   ██╗', '████╗  ██║', '██╔██╗ ██║', '██║╚██╗██║', '██║ ╚████║', '╚═╝  ╚═══╝'],\n  O: [' ██████╗ ', '██╔═══██╗', '██║   ██║', '██║   ██║', '╚██████╔╝', ' ╚═════╝ '],\n  P: ['██████╗ ', '██╔══██╗', '██████╔╝', '██╔═══╝ ', '██║     ', '╚═╝     '],\n  Q: [' ██████╗ ', '██╔═══██╗', '██║   ██║', '██║▄▄ ██║', '╚██████╔╝', ' ╚══▀▀═╝ '],\n  R: ['██████╗ ', '██╔══██╗', '██████╔╝', '██╔══██╗', '██║  ██║', '╚═╝  ╚═╝'],\n  S: ['███████╗', '██╔════╝', '███████╗', '╚════██║', '███████║', '╚══════╝'],\n  T: ['████████╗', '╚══██╔══╝', '   ██║   ', '   ██║   ', '   ██║   ', '   ╚═╝   '],\n  U: ['██╗   ██╗', '██║   ██║', '██║   ██║', '██║   ██║', '╚██████╔╝', ' ╚═════╝ '],\n  V: ['██╗   ██╗', '██║   ██║', '██║   ██║', '╚██╗ ██╔╝', ' ╚████╔╝ ', '  ╚═══╝  '],\n  W: ['██╗    ██╗', '██║    ██║', '██║ █╗ ██║', '██║███╗██║', '╚███╔███╔╝', ' ╚══╝╚══╝ '],\n  X: ['██╗  ██╗', '╚██╗██╔╝', ' ╚███╔╝ ', ' ██╔██╗ ', '██╔╝ ██╗', '╚═╝  ╚═╝'],\n  Y: ['██╗   ██╗', '╚██╗ ██╔╝', ' ╚████╔╝ ', '  ╚██╔╝  ', '   ██║   ', '   ╚═╝   '],\n  Z: ['███████╗', '╚══███╔╝', '  ███╔╝ ', ' ███╔╝  ', '███████╗', '╚══════╝'],\n  '0': [' ██████╗ ', '██╔═████╗', '██║██╔██║', '████╔╝██║', '╚██████╔╝', ' ╚═════╝ '],\n  '1': [' ██╗', '███║', '╚██║', ' ██║', ' ██║', ' ╚═╝'],\n  '2': ['██████╗ ', '╚════██╗', ' █████╔╝', '██╔═══╝ ', '███████╗', '╚══════╝'],\n  '3': ['██████╗ ', '╚════██╗', ' █████╔╝', ' ╚═══██╗', '██████╔╝', '╚═════╝ '],\n  '4': ['██╗  ██╗', '██║  ██║', '███████║', '╚════██║', '     ██║', '     ╚═╝'],\n  '5': ['███████╗', '██╔════╝', '███████╗', '╚════██║', '███████║', '╚══════╝'],\n  '6': [' ██████╗', '██╔════╝', '██████╗ ', '██╔══██╗', '╚█████╔╝', ' ╚════╝ '],\n  '7': ['███████╗', '╚════██║', '    ██╔╝', '   ██╔╝ ', '   ██║  ', '   ╚═╝  '],\n  '8': [' █████╗ ', '██╔══██╗', '╚█████╔╝', '██╔══██╗', '╚█████╔╝', ' ╚════╝ '],\n  '9': [' █████╗ ', '██╔══██╗', '╚██████║', ' ╚═══██║', ' █████╔╝', ' ╚════╝ '],\n  ' ': ['     ', '     ', '     ', '     ', '     ', '     '],\n  '-': ['        ', '        ', '███████╗', '╚══════╝', '        ', '        '],\n  '.': ['   ', '   ', '   ', '   ', '██╗', '╚═╝'],\n  _: ['        ', '        ', '        ', '        ', '███████╗', '╚══════╝'],\n})\n\n/**\n * RubiFont character map — compact pixel-art fallback for long titles.\n *\n * Uses quarter-block Unicode characters for a retro-gaming aesthetic.\n * Only A–Z are defined; missing characters fall back to the space glyph.\n *\n * @see https://github.com/patorjk/figlet.js — fonts/RubiFont.flf\n */\nexport const PIXEL_CHARS: Readonly<Record<string, PixelGlyph>> = Object.freeze({\n  A: [' ▗▄▖ ', '▐▌ ▐▌', '▐▛▀▜▌', '▐▌ ▐▌'],\n  B: ['▗▄▄▖ ', '▐▌ ▐▌', '▐▛▀▚▖', '▐▙▄▞▘'],\n  C: [' ▗▄▄▖', '▐▌   ', '▐▌   ', '▝▚▄▄▖'],\n  D: ['▗▄▄▄ ', '▐▌  █', '▐▌  █', '▐▙▄▄▀'],\n  E: ['▗▄▄▄▖', '▐▌   ', '▐▛▀▀▘', '▐▙▄▄▖'],\n  F: ['▗▄▄▄▖', '▐▌   ', '▐▛▀▀▘', '▐▌   '],\n  G: [' ▗▄▄▖', '▐▌   ', '▐▌▝▜▌', '▝▚▄▞▘'],\n  H: ['▗▖ ▗▖', '▐▌ ▐▌', '▐▛▀▜▌', '▐▌ ▐▌'],\n  I: ['▗▄▄▄▖', '  █  ', '  █  ', '▗▄█▄▖'],\n  J: ['   ▗▖', '   ▐▌', '   ▐▌', '▗▄▄▞▘'],\n  K: ['▗▖ ▗▖', '▐▌▗▞▘', '▐▛▚▖ ', '▐▌ ▐▌'],\n  L: ['▗▖   ', '▐▌   ', '▐▌   ', '▐▙▄▄▖'],\n  M: ['▗▖  ▗▖', '▐▛▚▞▜▌', '▐▌  ▐▌', '▐▌  ▐▌'],\n  N: ['▗▖  ▗▖', '▐▛▚▖▐▌', '▐▌ ▝▜▌', '▐▌  ▐▌'],\n  O: [' ▗▄▖ ', '▐▌ ▐▌', '▐▌ ▐▌', '▝▚▄▞▘'],\n  P: ['▗▄▄▖ ', '▐▌ ▐▌', '▐▛▀▘ ', '▐▌   '],\n  Q: ['▗▄▄▄▖ ', '▐▌ ▐▌ ', '▐▌ ▐▌ ', '▐▙▄▟▙▖'],\n  R: ['▗▄▄▖ ', '▐▌ ▐▌', '▐▛▀▚▖', '▐▌ ▐▌'],\n  S: [' ▗▄▄▖', '▐▌   ', ' ▝▀▚▖', '▗▄▄▞▘'],\n  T: ['▗▄▄▄▖', '  █  ', '  █  ', '  █  '],\n  U: ['▗▖ ▗▖', '▐▌ ▐▌', '▐▌ ▐▌', '▝▚▄▞▘'],\n  V: ['▗▖  ▗▖', '▐▌  ▐▌', '▐▌  ▐▌', ' ▝▚▞▘ '],\n  W: ['▗▖ ▗▖', '▐▌ ▐▌', '▐▌ ▐▌', '▐▙█▟▌'],\n  X: ['▗▖  ▗▖', ' ▝▚▞▘ ', '  ▐▌  ', '▗▞▘▝▚▖'],\n  Y: ['▗▖  ▗▖', ' ▝▚▞▘ ', '  ▐▌  ', '  ▐▌  '],\n  Z: ['▗▄▄▄▄▖', '   ▗▞▘', ' ▗▞▘  ', '▐▙▄▄▄▖'],\n  ' ': ['     ', '     ', '     ', '     '],\n  '-': ['     ', '     ', '▗▄▄▄▖', '     '],\n  '.': ['  ', '  ', '  ', '▗▖'],\n  _: ['     ', '     ', '     ', '▗▄▄▄▖'],\n})\n","/**\n * FIGlet text renderers.\n *\n * Two renderers:\n * 1. `renderFigletText` — ANSI Shadow (primary ciderpress brand font)\n * 2. `renderPixelText` — compact pixel-art (retro fallback for long titles)\n */\n\nimport { range } from 'massaman/math'\n\nimport {\n  FIGLET_CHARS,\n  FIGLET_CHAR_GAP,\n  FIGLET_ROWS,\n  PIXEL_CHARS,\n  PIXEL_CHAR_GAP,\n  PIXEL_ROWS,\n} from './figlet-data.ts'\n\n/**\n * Result of rendering a FIGlet text block.\n */\nexport interface FigletResult {\n  /**\n   * The rendered text rows (one string per row).\n   */\n  readonly lines: readonly string[]\n  /**\n   * Width of the widest row in monospace character columns.\n   */\n  readonly width: number\n  /**\n   * Number of rows in the rendered block.\n   */\n  readonly rows: number\n}\n\n/**\n * Render a plain-text string as ANSI Shadow FIGlet block art.\n *\n * Uppercases the input, maps each character to its ANSI Shadow glyph,\n * and joins rows horizontally.\n *\n * @param text - The text to render (A-Z, 0-9, space, hyphen, dot, underscore)\n * @returns Rendered lines, width in monospace columns, and row count\n */\nexport function renderFigletText(text: string): FigletResult {\n  return renderGlyphs({\n    text,\n    chars: FIGLET_CHARS,\n    gap: FIGLET_CHAR_GAP,\n    rows: FIGLET_ROWS,\n  })\n}\n\n/**\n * Render a plain-text string as pixel block art.\n *\n * Uppercases the input, maps each character to its pixel glyph,\n * and joins rows horizontally. Compact retro-gaming style for long titles.\n *\n * @param text - The text to render (A-Z, 0-9, space, hyphen, dot, underscore)\n * @returns Rendered lines, width in monospace columns, and row count\n */\nexport function renderPixelText(text: string): FigletResult {\n  return renderGlyphs({\n    text,\n    chars: PIXEL_CHARS,\n    gap: PIXEL_CHAR_GAP,\n    rows: PIXEL_ROWS,\n  })\n}\n\ninterface RenderGlyphsParams {\n  readonly text: string\n  readonly chars: Readonly<Record<string, readonly string[]>>\n  readonly gap: string\n  readonly rows: number\n}\n\n/**\n * Generic glyph renderer shared by both font styles.\n *\n * @private\n * @param params - Text, character map, gap string, and row count\n * @returns Rendered lines, width, and row count\n */\nfunction renderGlyphs(params: RenderGlyphsParams): FigletResult {\n  const upperChars = [...params.text.toUpperCase()]\n  const spaceGlyph = params.chars[' ']\n  const glyphs = upperChars.map((c) => {\n    const glyph = params.chars[c]\n    if (glyph) {\n      return glyph\n    }\n    return spaceGlyph\n  })\n\n  const lines = range(params.rows).map((row) => glyphs.map((glyph) => glyph[row]).join(params.gap))\n\n  const width = Math.max(...lines.map((line) => line.length))\n\n  return { lines, width, rows: params.rows }\n}\n","/**\n * Shared constants for SVG banner and logo generation.\n *\n * Surfaces / chrome use the Catppuccin Mocha palette to match the\n * existing ciderpress banner aesthetic. The `brand` slot is the active\n * theme's primary, pulled from `@ciderpress/theme` so static SVGs stay\n * in sync with the docs site CSS and the CLI TUI.\n */\n\nimport { resolveBrandPalette } from '@ciderpress/theme'\n\n/**\n * Catppuccin Mocha palette colors used across all generated SVGs.\n * `brand` resolves to the canonical honeycrisp theme's primary at module\n * load — the same color the docs site and CLI render.\n */\nexport const COLORS = Object.freeze({\n  base: '#1e1e2e',\n  mantle: '#181825',\n  surface0: '#313244',\n  overlay0: '#6c7086',\n  text: '#cdd6f4',\n  blue: '#89b4fa',\n  green: '#a6e3a1',\n  red: '#f38ba8',\n  yellow: '#f9e2af',\n  brand: resolveBrandPalette('honeycrisp').primary,\n})\n\n/**\n * Monospace font stack used for all SVG text elements.\n */\nexport const FONT_STACK = \"'SF Mono', 'Fira Code', 'JetBrains Mono', Consolas, monospace\"\n\n/**\n * Approximate pixel width of a single monospace character at font-size 13px.\n */\nexport const CHAR_WIDTH_PX = 7.8\n\n/**\n * Font size for FIGlet ASCII art text elements.\n */\nexport const ART_FONT_SIZE = 13\n\n/**\n * Line height (in px) between FIGlet art rows.\n */\nexport const ART_LINE_HEIGHT = 16\n\n/**\n * Font size for code/terminal text.\n */\nexport const CODE_FONT_SIZE = 12\n\n/**\n * Height of the macOS-style title bar.\n */\nexport const TITLE_BAR_HEIGHT = 36\n\n/**\n * Maximum title length (in characters) before falling back to plain text.\n */\nexport const FIGLET_MAX_LENGTH = 12\n\n/**\n * Minimum banner width in pixels.\n */\nexport const MIN_BANNER_WIDTH = 600\n\n/**\n * Horizontal padding on each side of the SVG content.\n */\nexport const CONTENT_PADDING = 24\n\n/**\n * Comment placed as the first line of generated SVGs to distinguish\n * from user-customized files.\n */\nexport const GENERATED_MARKER = '<!-- ciderpress-generated -->'\n\n/**\n * Escape special XML characters in text content.\n *\n * @param text - Raw string to escape for use in SVG/XML text nodes and attributes\n * @returns String with `&`, `<`, `>`, and `\"` replaced by XML entities\n */\nexport function escapeXml(text: string): string {\n  return text\n    .replaceAll('&', '&amp;')\n    .replaceAll('<', '&lt;')\n    .replaceAll('>', '&gt;')\n    .replaceAll('\"', '&quot;')\n}\n","/**\n * SVG banner composer.\n *\n * Generates a terminal-themed banner SVG with:\n * 1. macOS title bar with traffic lights\n * 2. FIGlet ASCII art of the project title (or monospace fallback)\n * 3. Optional tagline in dim text\n * 4. Separator line\n * 5. Fake CLI output showing a dev server startup\n */\n\nimport { match, P } from 'massaman/match'\n\nimport { renderFigletText, renderPixelText } from './figlet.ts'\nimport {\n  ART_FONT_SIZE,\n  ART_LINE_HEIGHT,\n  CHAR_WIDTH_PX,\n  CODE_FONT_SIZE,\n  COLORS,\n  CONTENT_PADDING,\n  FIGLET_MAX_LENGTH,\n  FONT_STACK,\n  GENERATED_MARKER,\n  MIN_BANNER_WIDTH,\n  TITLE_BAR_HEIGHT,\n  escapeXml,\n} from './svg-shared.ts'\n\nconst ART_TOP_PAD = 26\nconst FIGLET_ROWS = 6\nconst TAGLINE_GAP = 24\nconst SEPARATOR_GAP = 16\nconst CLI_SECTION_HEIGHT = 240\n\n/**\n * Compose a banner SVG string from the project title and optional tagline.\n *\n * For titles ≤ 12 characters, renders FIGlet block art.\n * For longer titles, falls back to large monospace text.\n * The banner includes a terminal chrome frame and fake CLI output.\n *\n * @param params - Banner configuration\n * @returns Complete SVG markup string with generated marker\n */\nexport function composeBanner(params: {\n  readonly title: string\n  readonly tagline: string | undefined\n}): string {\n  const cmdName = params.title.toLowerCase().replaceAll(/\\s+/g, '')\n  const art = computeArtLayout({ title: params.title, minWidth: MIN_BANNER_WIDTH })\n\n  const trimmedTagline = resolveTagline(params.tagline)\n  const taglineSection = match(trimmedTagline)\n    .with(P.string.minLength(1), (tagline) => {\n      const taglineY = art.artEndY + TAGLINE_GAP\n      const separatorY = taglineY + SEPARATOR_GAP\n      const centerX = Math.round(art.width / 2)\n\n      return {\n        markup: buildTagline({ text: tagline, centerX, y: taglineY }),\n        separatorY,\n      }\n    })\n    .otherwise(() => ({\n      markup: '',\n      separatorY: art.artEndY + SEPARATOR_GAP,\n    }))\n\n  const height = taglineSection.separatorY + CLI_SECTION_HEIGHT\n\n  const sections = [\n    GENERATED_MARKER,\n    `<svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 ${art.width} ${height}\">`,\n    buildStyles(),\n    buildBackground({ width: art.width, height }),\n    buildTitleBar({ width: art.width, name: cmdName }),\n    art.artSection,\n    taglineSection.markup,\n    buildSeparator({ width: art.width, y: taglineSection.separatorY }),\n    buildCliOutput({ name: cmdName, separatorY: taglineSection.separatorY }),\n    '</svg>',\n  ]\n\n  return sections.filter((s) => s.length > 0).join('\\n')\n}\n\n/**\n * Trim a tagline string, returning undefined if absent or empty.\n *\n * @private\n * @param tagline - Raw tagline string or undefined\n * @returns Trimmed tagline or undefined\n */\nfunction resolveTagline(tagline: string | undefined): string | undefined {\n  if (tagline) {\n    return tagline.trim()\n  }\n  return undefined\n}\n\n/**\n * Computed layout dimensions and pre-rendered art SVG for the banner.\n *\n * @private\n */\ninterface BannerLayout {\n  readonly width: number\n  readonly height: number\n  readonly artSection: string\n  readonly artEndY: number\n}\n\n/**\n * Build the inline CSS `<defs>` block for the banner SVG.\n *\n * @private\n * @returns SVG `<defs>` string containing all style rules\n */\nfunction buildStyles(): string {\n  return [\n    '  <defs>',\n    '    <style>',\n    `      .text { font-family: ${FONT_STACK}; }`,\n    `      .code { font-family: ${FONT_STACK}; font-size: ${CODE_FONT_SIZE}px; }`,\n    `      .brand { fill: ${COLORS.brand}; }`,\n    `      .dim { fill: ${COLORS.overlay0}; }`,\n    `      .tx { fill: ${COLORS.text}; }`,\n    `      .st { fill: ${COLORS.green}; }`,\n    `      .prompt { fill: ${COLORS.blue}; }`,\n    `      .tab { font-family: ${FONT_STACK}; font-size: 11px; fill: ${COLORS.text}; }`,\n    '    </style>',\n    '  </defs>',\n  ].join('\\n')\n}\n\n/**\n * Build the background rectangle for the banner SVG.\n *\n * @private\n * @param params - Dimensions for the background\n * @param params.width - Banner width in pixels\n * @param params.height - Banner height in pixels\n * @returns SVG rect element string\n */\nfunction buildBackground(params: { readonly width: number; readonly height: number }): string {\n  return [\n    '',\n    '  <!-- Background -->',\n    `  <rect width=\"${params.width}\" height=\"${params.height}\" rx=\"10\" ry=\"10\" fill=\"${COLORS.base}\" />`,\n  ].join('\\n')\n}\n\n/**\n * Build the macOS-style title bar with traffic-light buttons.\n *\n * @private\n * @param params - Title bar configuration\n * @param params.width - Banner width in pixels\n * @param params.name - Display name shown in the title bar\n * @returns SVG elements for the title bar, traffic lights, and title text\n */\nfunction buildTitleBar(params: { readonly width: number; readonly name: string }): string {\n  const centerX = Math.round(params.width / 2)\n  const escaped = escapeXml(params.name)\n  return [\n    '',\n    '  <!-- Title bar -->',\n    `  <rect width=\"${params.width}\" height=\"${TITLE_BAR_HEIGHT}\" rx=\"10\" ry=\"10\" fill=\"${COLORS.mantle}\" />`,\n    `  <rect y=\"26\" width=\"${params.width}\" height=\"10\" fill=\"${COLORS.mantle}\" />`,\n    '',\n    '  <!-- Traffic lights -->',\n    `  <circle cx=\"20\" cy=\"18\" r=\"6\" fill=\"${COLORS.red}\" />`,\n    `  <circle cx=\"40\" cy=\"18\" r=\"6\" fill=\"${COLORS.yellow}\" />`,\n    `  <circle cx=\"60\" cy=\"18\" r=\"6\" fill=\"${COLORS.green}\" />`,\n    '',\n    '  <!-- Title bar text -->',\n    `  <text class=\"text dim\" font-size=\"12\" x=\"${centerX}\" y=\"22\" text-anchor=\"middle\">${escaped}</text>`,\n  ].join('\\n')\n}\n\n/**\n * Build text art (FIGlet or pixel) as SVG text elements within a positioned group.\n *\n * @private\n * @param params - Art configuration\n * @param params.lines - Rendered text rows\n * @param params.translateX - Horizontal offset for centering\n * @param params.startY - Vertical start position\n * @param params.label - Comment label for the SVG group\n * @returns SVG group element containing the art text lines\n */\nfunction buildArtGroup(params: {\n  readonly lines: readonly string[]\n  readonly translateX: number\n  readonly startY: number\n  readonly label: string\n}): string {\n  const textLines = params.lines\n    .map((line, i) => {\n      const y = params.startY + i * ART_LINE_HEIGHT\n      return `    <text class=\"text brand\" font-size=\"${ART_FONT_SIZE}\" y=\"${y}\" xml:space=\"preserve\">${line}</text>`\n    })\n    .join('\\n')\n\n  return [\n    '',\n    `  <!-- ${params.label} -->`,\n    `  <g transform=\"translate(${params.translateX}, 0)\">`,\n    textLines,\n    '  </g>',\n  ].join('\\n')\n}\n\n/**\n * Build the tagline text element centered below the art section.\n *\n * @private\n * @param params - Tagline configuration\n * @param params.text - Tagline string to display\n * @param params.centerX - Horizontal center position\n * @param params.y - Vertical position\n * @returns SVG text element for the tagline\n */\nfunction buildTagline(params: {\n  readonly text: string\n  readonly centerX: number\n  readonly y: number\n}): string {\n  const escaped = escapeXml(params.text)\n  return [\n    '',\n    '  <!-- Tagline -->',\n    `  <text class=\"text dim\" font-size=\"12\" x=\"${params.centerX}\" y=\"${params.y}\" text-anchor=\"middle\">${escaped}</text>`,\n  ].join('\\n')\n}\n\n/**\n * Build a horizontal separator line across the banner width.\n *\n * @private\n * @param params - Separator configuration\n * @param params.width - Banner width in pixels\n * @param params.y - Vertical position of the line\n * @returns SVG line element string\n */\nfunction buildSeparator(params: { readonly width: number; readonly y: number }): string {\n  return [\n    '',\n    '  <!-- Separator -->',\n    `  <line x1=\"16\" y1=\"${params.y}\" x2=\"${params.width - 16}\" y2=\"${params.y}\" stroke=\"${COLORS.surface0}\" stroke-width=\"1\" />`,\n  ].join('\\n')\n}\n\n/**\n * Build the fake CLI terminal output section of the banner.\n *\n * @private\n * @param params - CLI output configuration\n * @param params.name - Command name shown in terminal prompts\n * @param params.separatorY - Y position of the separator above this section\n * @returns SVG elements representing terminal tab, commands, and output\n */\nfunction buildCliOutput(params: { readonly name: string; readonly separatorY: number }): string {\n  const baseY = params.separatorY\n  const x = 18\n\n  return [\n    '',\n    '  <!-- Terminal tab -->',\n    `  <rect x=\"4\" y=\"${baseY + 4}\" width=\"80\" height=\"24\" rx=\"4\" ry=\"4\" fill=\"${COLORS.mantle}\" />`,\n    `  <text class=\"tab\" x=\"${x}\" y=\"${baseY + 20}\">terminal</text>`,\n    '',\n    '  <!-- CLI output -->',\n    `  <text class=\"code\" x=\"${x}\" y=\"${baseY + 48}\"><tspan class=\"prompt\">~</tspan><tspan class=\"dim\"> $ </tspan><tspan class=\"tx\">${escapeXml(params.name)} dev</tspan></text>`,\n    '',\n    `  <text class=\"code\" x=\"${x}\" y=\"${baseY + 76}\"><tspan class=\"dim\">Starting </tspan><tspan class=\"brand\">${escapeXml(params.name)}</tspan><tspan class=\"dim\">...</tspan></text>`,\n    '',\n    `  <text class=\"code\" x=\"${x}\" y=\"${baseY + 100}\" xml:space=\"preserve\"><tspan class=\"st\">  ✓</tspan><tspan class=\"tx\"> Loaded config</tspan></text>`,\n    `  <text class=\"code\" x=\"${x}\" y=\"${baseY + 116}\" xml:space=\"preserve\"><tspan class=\"st\">  ✓</tspan><tspan class=\"tx\"> Built 24 pages</tspan></text>`,\n    `  <text class=\"code\" x=\"${x}\" y=\"${baseY + 132}\" xml:space=\"preserve\"><tspan class=\"st\">  ✓</tspan><tspan class=\"tx\"> Generated sidebar</tspan></text>`,\n    `  <text class=\"code\" x=\"${x}\" y=\"${baseY + 148}\" xml:space=\"preserve\"><tspan class=\"st\">  ✓</tspan><tspan class=\"tx\"> Ready — dev server on :5173</tspan></text>`,\n    '',\n    '  <!-- New prompt with cursor -->',\n    `  <text class=\"code\" x=\"${x}\" y=\"${baseY + 180}\"><tspan class=\"prompt\">~</tspan><tspan class=\"dim\"> $ </tspan><tspan class=\"tx\">&#x2588;</tspan></text>`,\n  ].join('\\n')\n}\n\n/**\n * Compute the art layout dimensions and SVG content for the banner title.\n *\n * Chooses between FIGlet block art (for short titles) and a large monospace\n * fallback, then calculates the width, art SVG content, and vertical end position.\n *\n * @private\n * @param params - Layout computation parameters\n * @param params.title - Project title to render\n * @param params.minWidth - Minimum banner width in pixels\n * @returns Layout dimensions and pre-rendered art SVG section\n */\nfunction computeArtLayout(params: {\n  readonly title: string\n  readonly minWidth: number\n}): BannerLayout {\n  const useFiglet = params.title.length <= FIGLET_MAX_LENGTH\n\n  if (useFiglet) {\n    const figlet = renderFigletText(params.title)\n    const artPixelWidth = figlet.width * CHAR_WIDTH_PX\n    const contentWidth = Math.ceil(artPixelWidth + CONTENT_PADDING * 2)\n    const width = Math.max(params.minWidth, contentWidth)\n    const artStartY = TITLE_BAR_HEIGHT + ART_TOP_PAD\n    const translateX = Math.round((width - artPixelWidth) / 2)\n    const artEndY = artStartY + (FIGLET_ROWS - 1) * ART_LINE_HEIGHT\n\n    const artSection = buildArtGroup({\n      lines: figlet.lines,\n      translateX,\n      startY: artStartY,\n      label: 'ASCII art',\n    })\n\n    return { width, height: 0, artSection, artEndY }\n  }\n\n  const pixel = renderPixelText(params.title)\n  const artPixelWidth = pixel.width * CHAR_WIDTH_PX\n  const contentWidth = Math.ceil(artPixelWidth + CONTENT_PADDING * 2)\n  const width = Math.max(params.minWidth, contentWidth)\n  const artStartY = TITLE_BAR_HEIGHT + ART_TOP_PAD\n  const translateX = Math.round((width - artPixelWidth) / 2)\n  const artEndY = artStartY + (pixel.rows - 1) * ART_LINE_HEIGHT\n\n  const artSection = buildArtGroup({\n    lines: pixel.lines,\n    translateX,\n    startY: artStartY,\n    label: 'Pixel art (fallback)',\n  })\n\n  return { width, height: 0, artSection, artEndY }\n}\n","/**\n * SVG icon (favicon) composer.\n *\n * Generates a 512x512 rounded-square icon containing the first\n * letter of the project title rendered as FIGlet ASCII art\n * (or a large monospace fallback for unsupported characters).\n */\n\nimport { renderFigletText } from './figlet.ts'\nimport {\n  ART_FONT_SIZE,\n  ART_LINE_HEIGHT,\n  CHAR_WIDTH_PX,\n  COLORS,\n  FONT_STACK,\n  GENERATED_MARKER,\n  escapeXml,\n} from './svg-shared.ts'\n\nconst ICON_SIZE = 512\nconst ICON_RADIUS = 32\nconst ICON_PADDING = 64\nconst FIGLET_ROWS = 6\n/**\n * Font size for the single-character fallback — larger than banner/logo\n * to fill the 512px square.\n */\nconst ICON_FALLBACK_FONT_SIZE = 320\n\n/**\n * Compose a favicon SVG string from the project title.\n *\n * Extracts the first character, renders it as FIGlet block art\n * centered on a dark rounded square. Falls back to a large\n * monospace character when the glyph is unavailable.\n *\n * @param params - Icon configuration\n * @returns Complete SVG markup string with generated marker\n */\nexport function composeIcon(params: { readonly title: string }): string {\n  const [firstChar = 'Z'] = [...params.title.trimStart()]\n  const figlet = renderFigletText(firstChar)\n  const hasFigletGlyph = figlet.lines.some((line) => line.trim().length > 0)\n\n  if (hasFigletGlyph) {\n    return buildFigletIcon({ lines: figlet.lines, width: figlet.width })\n  }\n\n  return buildFallbackIcon({ char: firstChar })\n}\n\n/**\n * Build a FIGlet-based icon SVG with the glyph scaled and centered in a 512px square.\n *\n * @private\n * @param params - FIGlet icon configuration\n * @param params.lines - Rendered FIGlet text rows for the character\n * @param params.width - Width of the FIGlet glyph in character columns\n * @returns Complete SVG markup string for the FIGlet icon\n */\nfunction buildFigletIcon(params: {\n  readonly lines: readonly string[]\n  readonly width: number\n}): string {\n  const artPixelWidth = params.width * CHAR_WIDTH_PX\n  const artPixelHeight = (FIGLET_ROWS - 1) * ART_LINE_HEIGHT\n  const usable = ICON_SIZE - ICON_PADDING * 2\n  const scale = Math.min(usable / artPixelWidth, usable / artPixelHeight)\n  const scaledWidth = artPixelWidth * scale\n  const scaledHeight = artPixelHeight * scale\n  const translateX = Math.round((ICON_SIZE - scaledWidth) / 2)\n  const translateY = Math.round((ICON_SIZE - scaledHeight) / 2)\n\n  const textLines = params.lines\n    .map((line, i) => {\n      const y = i * ART_LINE_HEIGHT\n      return `      <text class=\"text brand\" font-size=\"${ART_FONT_SIZE}\" y=\"${y}\" xml:space=\"preserve\">${escapeXml(line)}</text>`\n    })\n    .join('\\n')\n\n  return [\n    GENERATED_MARKER,\n    `<svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 ${ICON_SIZE} ${ICON_SIZE}\">`,\n    '  <defs>',\n    '    <style>',\n    `      .text { font-family: ${FONT_STACK}; }`,\n    `      .brand { fill: ${COLORS.brand}; }`,\n    '    </style>',\n    '  </defs>',\n    '',\n    '  <!-- Background -->',\n    `  <rect width=\"${ICON_SIZE}\" height=\"${ICON_SIZE}\" rx=\"${ICON_RADIUS}\" ry=\"${ICON_RADIUS}\" fill=\"${COLORS.base}\" />`,\n    '',\n    '  <!-- FIGlet letter -->',\n    `  <g transform=\"translate(${translateX}, ${translateY}) scale(${scale.toFixed(4)})\">`,\n    textLines,\n    '  </g>',\n    '</svg>',\n  ].join('\\n')\n}\n\n/**\n * Build a fallback icon SVG with a single large character centered in a 512px square.\n *\n * @private\n * @param params - Fallback icon configuration\n * @param params.char - Single character to render\n * @returns Complete SVG markup string for the fallback icon\n */\nfunction buildFallbackIcon(params: { readonly char: string }): string {\n  const centerX = ICON_SIZE / 2\n  const centerY = ICON_SIZE / 2 + ICON_FALLBACK_FONT_SIZE * 0.35\n  const escaped = escapeXml(params.char)\n\n  return [\n    GENERATED_MARKER,\n    `<svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 ${ICON_SIZE} ${ICON_SIZE}\">`,\n    '  <defs>',\n    '    <style>',\n    `      .text { font-family: ${FONT_STACK}; }`,\n    `      .brand { fill: ${COLORS.brand}; }`,\n    '    </style>',\n    '  </defs>',\n    '',\n    '  <!-- Background -->',\n    `  <rect width=\"${ICON_SIZE}\" height=\"${ICON_SIZE}\" rx=\"${ICON_RADIUS}\" ry=\"${ICON_RADIUS}\" fill=\"${COLORS.base}\" />`,\n    '',\n    '  <!-- Fallback letter -->',\n    `  <text class=\"text brand\" font-size=\"${ICON_FALLBACK_FONT_SIZE}\" x=\"${centerX}\" y=\"${centerY}\" text-anchor=\"middle\">${escaped}</text>`,\n    '</svg>',\n  ].join('\\n')\n}\n","/**\n * SVG logo composer.\n *\n * Generates a compact logo SVG containing the project title\n * rendered as FIGlet ASCII art (or plain monospace fallback for long titles).\n */\n\nimport { renderFigletText, renderPixelText } from './figlet.ts'\nimport {\n  ART_FONT_SIZE,\n  ART_LINE_HEIGHT,\n  CHAR_WIDTH_PX,\n  COLORS,\n  CONTENT_PADDING,\n  FIGLET_MAX_LENGTH,\n  FONT_STACK,\n  GENERATED_MARKER,\n} from './svg-shared.ts'\n\nconst LOGO_TOP_PAD = 28\nconst LOGO_BOTTOM_PAD = 28\nconst FIGLET_ROWS = 6\n\n/**\n * Compose a logo SVG string from the project title.\n *\n * For titles ≤ 12 characters, renders FIGlet block art.\n * For longer titles, falls back to large monospace text.\n *\n * @param params - Logo configuration\n * @returns Complete SVG markup string with generated marker\n */\nexport function composeLogo(params: { readonly title: string }): string {\n  const useFiglet = params.title.length <= FIGLET_MAX_LENGTH\n\n  if (useFiglet) {\n    const figlet = renderFigletText(params.title)\n    const artPixelWidth = figlet.width * CHAR_WIDTH_PX\n    const width = Math.ceil(artPixelWidth + CONTENT_PADDING * 2)\n    const height = LOGO_TOP_PAD + (FIGLET_ROWS - 1) * ART_LINE_HEIGHT + LOGO_BOTTOM_PAD\n    const artLines = buildArtLines({ lines: figlet.lines, startY: 0 })\n\n    return [\n      GENERATED_MARKER,\n      `<svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 ${width} ${height}\">`,\n      '  <defs>',\n      '    <style>',\n      `      .text { font-family: ${FONT_STACK}; }`,\n      `      .brand { fill: ${COLORS.brand}; }`,\n      '    </style>',\n      '  </defs>',\n      '',\n      `  <g transform=\"translate(${CONTENT_PADDING}, ${LOGO_TOP_PAD})\">`,\n      artLines,\n      '  </g>',\n      '</svg>',\n    ].join('\\n')\n  }\n\n  const pixel = renderPixelText(params.title)\n  const artPixelWidth = pixel.width * CHAR_WIDTH_PX\n  const width = Math.ceil(artPixelWidth + CONTENT_PADDING * 2)\n  const height = LOGO_TOP_PAD + (pixel.rows - 1) * ART_LINE_HEIGHT + LOGO_BOTTOM_PAD\n  const artLines = buildArtLines({ lines: pixel.lines, startY: 0 })\n\n  return [\n    GENERATED_MARKER,\n    `<svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 ${width} ${height}\">`,\n    '  <defs>',\n    '    <style>',\n    `      .text { font-family: ${FONT_STACK}; }`,\n    `      .brand { fill: ${COLORS.brand}; }`,\n    '    </style>',\n    '  </defs>',\n    '',\n    `  <g transform=\"translate(${CONTENT_PADDING}, ${LOGO_TOP_PAD})\">`,\n    artLines,\n    '  </g>',\n    '</svg>',\n  ].join('\\n')\n}\n\n/**\n * Build text art (FIGlet or pixel) as SVG text elements for the logo.\n *\n * @private\n * @param params - Art configuration\n * @param params.lines - Rendered text rows\n * @param params.startY - Vertical start position for the first line\n * @returns SVG text elements joined as a single string\n */\nfunction buildArtLines(params: {\n  readonly lines: readonly string[]\n  readonly startY: number\n}): string {\n  return params.lines\n    .map((line, i) => {\n      const y = params.startY + i * ART_LINE_HEIGHT\n      return `    <text class=\"text brand\" font-size=\"${ART_FONT_SIZE}\" y=\"${y}\" xml:space=\"preserve\">${line}</text>`\n    })\n    .join('\\n')\n}\n","/**\n * Types for auto-generated SVG banner and logo assets.\n */\n\nimport type { Result } from '@ciderpress/config'\n\n/**\n * Error produced during asset generation or file writing.\n */\nexport interface AssetError {\n  readonly _tag: 'AssetError'\n  readonly type: 'empty_title' | 'write_failed' | 'mkdir_failed'\n  readonly message: string\n}\n\n/**\n * Convenience alias for asset operation results.\n */\nexport type AssetResult<T> = Result<T, AssetError>\n\n/**\n * Create an `AssetError` value.\n *\n * @param type - Error classification\n * @param message - Human-readable description\n * @returns A frozen `AssetError` object\n */\nexport function assetError(type: AssetError['type'], message: string): AssetError {\n  return Object.freeze({ _tag: 'AssetError' as const, type, message })\n}\n\n/**\n * Input configuration for asset generation, extracted from CiderpressConfig.\n */\nexport interface AssetConfig {\n  readonly title: string\n  readonly tagline: string | undefined\n}\n\n/**\n * A generated SVG asset ready to be written to disk.\n */\nexport interface GeneratedAsset {\n  readonly filename: string\n  readonly content: string\n}\n","/**\n * Auto-generated SVG banner, logo, and icon assets.\n *\n * Produces committable SVG files from the project title so users\n * get branded assets with zero manual work.\n */\n\nimport fs from 'node:fs/promises'\nimport path from 'node:path'\n\nimport { toError } from 'massaman/conversion'\n\nimport { composeBanner } from './svg-banner.ts'\nimport { composeIcon } from './svg-icon.ts'\nimport { composeLogo } from './svg-logo.ts'\nimport { GENERATED_MARKER } from './svg-shared.ts'\nimport { assetError } from './types.ts'\nimport type { AssetConfig, AssetResult, GeneratedAsset } from './types.ts'\n\nexport type { AssetConfig, AssetError, AssetResult, GeneratedAsset } from './types.ts'\n\n/**\n * Generate a banner SVG from the project config.\n *\n * @param config - Title and optional tagline\n * @returns Result containing the generated asset or an error\n */\nexport function generateBannerSvg(config: AssetConfig): AssetResult<GeneratedAsset> {\n  if (config.title.trim().length === 0) {\n    return [assetError('empty_title', 'Cannot generate banner: title is empty'), null]\n  }\n\n  return [\n    null,\n    {\n      filename: 'banner.svg',\n      content: composeBanner({ title: config.title, tagline: config.tagline }),\n    },\n  ]\n}\n\n/**\n * Generate a logo SVG from the project config.\n *\n * @param config - Title (tagline is ignored for logos)\n * @returns Result containing the generated asset or an error\n */\nexport function generateLogoSvg(config: AssetConfig): AssetResult<GeneratedAsset> {\n  if (config.title.trim().length === 0) {\n    return [assetError('empty_title', 'Cannot generate logo: title is empty'), null]\n  }\n\n  return [\n    null,\n    {\n      filename: 'logo.svg',\n      content: composeLogo({ title: config.title }),\n    },\n  ]\n}\n\n/**\n * Generate an icon (favicon) SVG from the project config.\n *\n * @param config - Title (first character is used for the icon glyph)\n * @returns Result containing the generated asset or an error\n */\nexport function generateIconSvg(config: AssetConfig): AssetResult<GeneratedAsset> {\n  if (config.title.trim().length === 0) {\n    return [assetError('empty_title', 'Cannot generate icon: title is empty'), null]\n  }\n\n  return [\n    null,\n    {\n      filename: 'icon.svg',\n      content: composeIcon({ title: config.title }),\n    },\n  ]\n}\n\ninterface GenerateAssetsParams {\n  readonly config: AssetConfig\n  readonly publicDir: string\n}\n\n/**\n * Generate banner, logo, and icon SVGs, writing them to the public directory.\n *\n * For each asset:\n * 1. If the file is missing or has the ciderpress-generated marker → write it\n * 2. If the file exists without the marker → skip (user-customized)\n *\n * @param params - Config and target directory\n * @returns Result containing the list of filenames written, or an error\n */\nexport async function generateAssets(\n  params: GenerateAssetsParams\n): Promise<AssetResult<readonly string[]>> {\n  // oxlint-disable-next-line security/detect-non-literal-fs-filename -- publicDir comes from trusted Paths config\n  const mkdirResult = await fs\n    .mkdir(params.publicDir, { recursive: true })\n    .then(() => null)\n    .catch(toError)\n\n  if (mkdirResult) {\n    return [assetError('mkdir_failed', `Failed to create public dir: ${mkdirResult.message}`), null]\n  }\n\n  const generators: readonly (() => AssetResult<GeneratedAsset>)[] = [\n    () => generateBannerSvg(params.config),\n    () => generateLogoSvg(params.config),\n    () => generateIconSvg(params.config),\n  ]\n\n  const results = await Promise.all(\n    generators.map(async (generate) => {\n      const [err, asset] = generate()\n      if (err) {\n        return null\n      }\n\n      const filePath = path.resolve(params.publicDir, asset.filename)\n      const shouldWrite = await shouldGenerate(filePath, asset.content)\n      if (!shouldWrite) {\n        return null\n      }\n\n      const [writeErr, filename] = await writeAsset({ asset, publicDir: params.publicDir })\n      if (writeErr) {\n        return null\n      }\n\n      return filename\n    })\n  )\n\n  const written = results.filter((f): f is string => f !== null)\n\n  return [null, written]\n}\n\n/**\n * Determine whether a file should be (re)generated.\n *\n * Returns `true` when:\n * - The file does not exist (first generation)\n * - The file exists with the generated marker and content differs from `newContent`\n *\n * Returns `false` when:\n * - The file exists without the marker (user-customized)\n * - The file exists with the marker but content is identical to `newContent`\n *\n * @private\n * @param filePath - Absolute path to the file to check\n * @param newContent - The content that would be written\n * @returns Whether the file should be (re)generated\n */\nasync function shouldGenerate(filePath: string, newContent: string): Promise<boolean> {\n  // oxlint-disable-next-line security/detect-non-literal-fs-filename -- path is constructed from trusted publicDir + known filenames\n  const existing = await fs.readFile(filePath, 'utf8').catch(() => null)\n  if (existing === null) {\n    return true\n  }\n  const normalized = existing.replaceAll('\\r\\n', '\\n')\n  const [firstLine] = normalized.split('\\n')\n  if (firstLine !== GENERATED_MARKER) {\n    return false\n  }\n  if (normalized === newContent) {\n    return false\n  }\n  return true\n}\n\ninterface WriteAssetParams {\n  readonly asset: GeneratedAsset\n  readonly publicDir: string\n}\n\n/**\n * Write a generated asset to disk, returning either the filename or an error.\n *\n * @private\n * @param params - Asset and target directory\n * @returns Result containing the written filename or a write error\n */\nasync function writeAsset(params: WriteAssetParams): Promise<AssetResult<string>> {\n  const filePath = path.resolve(params.publicDir, params.asset.filename)\n  // oxlint-disable-next-line security/detect-non-literal-fs-filename -- path is constructed from trusted publicDir + known filenames\n  const writeResult = await fs\n    .writeFile(filePath, params.asset.content, 'utf8')\n    .then(() => null)\n    .catch(toError)\n\n  if (writeResult) {\n    return [\n      assetError(\n        'write_failed',\n        `Failed to write ${params.asset.filename}: ${writeResult.message}`\n      ),\n      null,\n    ]\n  }\n\n  return [null, params.asset.filename]\n}\n","/**\n * Detects leftover `{{ }}` fill markers in synced documentation content.\n *\n * A doc scaffolded from a template but never finished still carries the\n * template's `{{ id }}` markers. This scans the synced content (what actually\n * ships) so `check`/`build --check` can fail before those markers reach a\n * published site. Fenced and inline code are stripped first so docs that\n * *demonstrate* the convention in code samples don't false-positive.\n */\n\nimport fs from 'node:fs/promises'\nimport path from 'node:path'\n\nimport { findMarkers } from '@ciderpress/templates'\nimport { attemptAsync } from 'massaman/control'\n\nconst FENCED_BLOCK_PATTERN = /```[\\s\\S]*?```/g\nconst TILDE_BLOCK_PATTERN = /~~~[\\s\\S]*?~~~/g\nconst INLINE_CODE_PATTERN = /`[^`\\n]*`/g\n\n/**\n * A doc that still contains one or more unfilled `{{ }}` markers.\n */\nexport interface MarkerIssue {\n  /** File path relative to the repo root. */\n  readonly file: string\n  /** The distinct leftover markers found, each normalized to `{{ key }}`. */\n  readonly markers: readonly string[]\n}\n\n/**\n * Scan synced content for docs that still carry unfilled `{{ }}` markers.\n *\n * Walks every `.md`/`.mdx` file under `contentDir`, strips fenced and inline\n * code, and reports any remaining markers. Templates live outside the synced\n * content, so they are naturally excluded.\n *\n * @param input - The synced content directory and repo root for relative paths\n * @returns One issue per file with leftover markers (empty when all clean)\n */\nexport async function scanMarkers(input: {\n  readonly contentDir: string\n  readonly repoRoot: string\n}): Promise<readonly MarkerIssue[]> {\n  const { contentDir, repoRoot } = input\n  const files = await collectMarkdownFiles(contentDir)\n\n  const results = await Promise.all(\n    files.map(async (absPath) => {\n      const read = await attemptAsync(() => fs.readFile(absPath, 'utf8'))\n      if (!read.ok) {\n        return null\n      }\n      const markers = findMarkers(stripCode(read.value))\n      if (markers.length === 0) {\n        return null\n      }\n      return { file: path.relative(repoRoot, absPath), markers }\n    })\n  )\n\n  return results.flatMap((result) => {\n    if (result === null) {\n      return []\n    }\n    return [result]\n  })\n}\n\n/**\n * Recursively collect every `.md`/`.mdx` file under a directory.\n *\n * @private\n * @param dir - The directory to walk\n * @returns Absolute paths of all markdown/MDX files found (empty on read error)\n */\nasync function collectMarkdownFiles(dir: string): Promise<readonly string[]> {\n  const read = await attemptAsync(() => fs.readdir(dir, { withFileTypes: true }))\n  if (!read.ok) {\n    return []\n  }\n  const entries = read.value\n\n  const here = entries\n    .filter((entry) => entry.isFile() && isMarkdown(entry.name))\n    .map((entry) => path.join(dir, entry.name))\n\n  const subDirs = await Promise.all(\n    entries\n      .filter((entry) => entry.isDirectory())\n      .map((entry) => collectMarkdownFiles(path.join(dir, entry.name)))\n  )\n\n  return [...here, ...subDirs.flat()]\n}\n\n/**\n * Check whether a filename is a markdown or MDX document.\n *\n * @private\n * @param name - The filename to inspect\n * @returns True for `.md` and `.mdx` files\n */\nfunction isMarkdown(name: string): boolean {\n  return name.endsWith('.md') || name.endsWith('.mdx')\n}\n\n/**\n * Remove fenced code blocks and inline code spans so markers used purely as\n * documentation examples are not treated as unfilled.\n *\n * @private\n * @param text - The raw document text\n * @returns The text with all code regions removed\n */\nfunction stripCode(text: string): string {\n  return text\n    .replace(FENCED_BLOCK_PATTERN, '')\n    .replace(TILDE_BLOCK_PATTERN, '')\n    .replace(INLINE_CODE_PATTERN, '')\n}\n","import { spawn } from 'node:child_process'\nimport { once } from 'node:events'\nimport { Server } from 'node:http'\nimport { platform } from 'node:os'\n\nimport type { CiderpressConfig } from '@ciderpress/config'\nimport type { ThemeVariant } from '@ciderpress/theme'\nimport { createRspressConfig } from '@ciderpress/ui/node'\nimport { dev, build, serve } from '@rspress/core'\nimport getPort, { portNumbers } from 'get-port'\nimport { toError } from 'massaman/conversion'\nimport { match, P } from 'massaman/match'\n\nimport type { Paths } from './paths.ts'\n\n/**\n * Default port for the dev server.\n * Falls back to the next available port in range DEV_PORT..DEV_PORT + DEV_PORT_RANGE.\n */\nexport const DEV_PORT = 6174\nconst DEV_PORT_RANGE = 5\n\n/** Default port for the static preview server. Errors if occupied. */\nexport const SERVE_PORT = 8080\n\ninterface ServerOptions {\n  readonly config: CiderpressConfig\n  readonly paths: Paths\n  readonly port?: number\n  readonly host?: string\n  readonly url?: string\n  readonly vscode?: boolean\n  readonly theme?: string\n  readonly colorMode?: ThemeVariant\n}\n\n/**\n * Default bind interface for the dev server when no override is supplied.\n *\n * Explicitly `127.0.0.1` rather than `'localhost'` because Node.js on\n * macOS resolves `localhost` to IPv6 (`[::1]`) first — Rsbuild then\n * binds IPv6-only, and any reverse proxy (portless.sh, nginx, Caddy)\n * pointed at `127.0.0.1:port` returns 502 Bad Gateway. Binding the\n * IPv4 loopback by default keeps localhost-only security while staying\n * compatible with every proxy. Set `devServer.host: '0.0.0.0'` to\n * expose on every interface (LAN / Docker).\n */\nconst DEFAULT_DEV_HOST = '127.0.0.1'\n\n/**\n * Server instance returned by Rspress dev().\n *\n * Rspress only declares `close()` in its public types, but the\n * underlying Rsbuild server exposes `httpServer` at runtime.\n * We access it via {@link getHttpServer} to avoid a type mismatch.\n */\ninterface ServerInstance {\n  readonly close: () => Promise<void>\n}\n\n/**\n * Internal options for `startServer` that control rebuild behaviour.\n */\ninterface StartServerOptions {\n  /**\n   * When true, disables the persistent build cache for this invocation.\n   */\n  readonly skipBuildCache: boolean\n}\n\n/**\n * Callback invoked when the dev server should restart due to config changes.\n */\nexport type OnConfigReload = (newConfig: CiderpressConfig) => Promise<void>\n\n/**\n * Result returned by `startDevServer` containing the reload callback,\n * the resolved port and host the server bound to, and the\n * externally-visible URL surfaced to the terminal / browser auto-open.\n *\n * Callers that need the local bind URL derive it from `http://${host}:${port}`.\n */\nexport interface DevServerResult {\n  readonly onConfigReload: OnConfigReload\n  readonly port: number\n  readonly host: string\n  readonly url: string\n  readonly close: () => Promise<void>\n}\n\n/**\n * Start the Rspress dev server with ciderpress configuration.\n *\n * Returns the resolved port and a callback that will restart the server when\n * invoked with updated config. The callback closes the current server instance\n * and starts a new one with the fresh configuration values.\n *\n * @param options - Dev server configuration including config and paths\n * @returns The resolved port and an async reload callback\n */\nexport async function startDevServer(options: ServerOptions): Promise<DevServerResult> {\n  const { paths, config: initialConfig } = options\n  const devServer = initialConfig.devServer\n  const devServerPort = match(devServer)\n    .with(P.nonNullable, (d) => d.port)\n    .otherwise(() => undefined)\n  const devServerHost = match(devServer)\n    .with(P.nonNullable, (d) => d.host)\n    .otherwise(() => undefined)\n  const devServerUrl = match(devServer)\n    .with(P.nonNullable, (d) => d.url)\n    .otherwise(() => undefined)\n  const preferred = options.port ?? devServerPort ?? DEV_PORT\n  const host = options.host ?? devServerHost ?? DEFAULT_DEV_HOST\n  const port = await getPort({ port: portNumbers(preferred, preferred + DEV_PORT_RANGE) })\n  const url = resolveDevUrl({ override: options.url, config: devServerUrl, host, port })\n  // oxlint-disable-next-line functional/no-let -- mutable server instance for restart capability\n  let serverInstance: ServerInstance | null = null\n\n  async function startServer(\n    config: CiderpressConfig,\n    internalOptions: StartServerOptions\n  ): Promise<boolean> {\n    const rspressConfig = createRspressConfig({\n      config,\n      paths,\n      logLevel: 'silent',\n      vscode: options.vscode,\n      themeOverride: options.theme,\n      variantOverride: options.colorMode,\n    })\n    try {\n      serverInstance = await dev({\n        appDirectory: paths.repoRoot,\n        docDirectory: paths.contentDir,\n        config: rspressConfig,\n        configFilePath: '',\n        extraBuilderConfig: {\n          server: {\n            port,\n            host,\n            strictPort: true,\n          },\n          dev: {\n            progressBar: false,\n          },\n          // Disable persistent build cache on config-reload restarts.\n          // Rspress's cacheDigest only covers sidebar/nav structure,\n          // so changes to title, theme, colors, source.define values\n          // etc. would serve stale cached output without this.\n          ...buildCacheOverride(internalOptions),\n        },\n      })\n      return true\n    } catch (error) {\n      process.stderr.write(`Dev server error: ${toError(error).message}\\n`)\n      return false\n    }\n  }\n\n  const started = await startServer(options.config, { skipBuildCache: false })\n  if (!started) {\n    process.exit(1)\n  }\n\n  async function handleConfigReload(newConfig: CiderpressConfig): Promise<void> {\n    process.stdout.write('\\n🔄 Config changed — restarting dev server...\\n')\n\n    if (serverInstance) {\n      const httpServer = getHttpServer(serverInstance)\n      // Register the close listener before close() so we don't miss the\n      // event (once() only observes future emissions)\n      const closeEvent = createCloseEvent(httpServer)\n      try {\n        await serverInstance.close()\n      } catch (error) {\n        process.stderr.write(`Error closing server: ${toError(error).message}\\n`)\n      }\n      // Rsbuild's close() destroys tracked sockets and calls httpServer.close(),\n      // but the 'close' event fires only once the port is actually freed.\n      if (closeEvent) {\n        const PORT_RELEASE_TIMEOUT = 5_000\n        await Promise.race([\n          closeEvent,\n          // oxlint-disable-next-line no-promise-executor-return -- timeout resolve is intentional\n          new Promise((resolve) => setTimeout(resolve, PORT_RELEASE_TIMEOUT)),\n        ])\n      }\n      serverInstance = null\n\n      // Rspack's file-based storage layer (rspack_storage) holds a transaction\n      // lock on .temp/ inside the cache directory. Rsbuild's close() resolves\n      // before that lock is fully released. Without this settle window the new\n      // dev() call panics with \"Transaction already in progress\".\n      const RSPACK_SETTLE_MS = 500\n      // oxlint-disable-next-line no-promise-executor-return -- settle delay is intentional\n      await new Promise((resolve) => setTimeout(resolve, RSPACK_SETTLE_MS))\n    }\n\n    const restarted = await startServer(newConfig, { skipBuildCache: true })\n    if (restarted) {\n      process.stdout.write('✅ Dev server restarted\\n\\n')\n    } else {\n      process.stderr.write('⚠️  Dev server failed to restart — fix the config and save again\\n\\n')\n    }\n  }\n\n  async function closeServer(): Promise<void> {\n    if (serverInstance) {\n      try {\n        await serverInstance.close()\n      } catch {\n        // Server may already be closed — ignore\n      }\n      serverInstance = null\n    }\n  }\n\n  return { onConfigReload: handleConfigReload, port, host, url, close: closeServer }\n}\n\n/**\n * Resolve the externally-visible dev URL from precedence: CLI override\n * (`options.url`) > config (`devServer.url`) > computed `http://${host}:${port}`.\n *\n * @private\n * @param params - Override, config value, and resolved bind host + port\n * @returns Final URL surfaced to the terminal and browser auto-open\n */\nfunction resolveDevUrl(params: {\n  readonly override: string | undefined\n  readonly config: string | undefined\n  readonly host: string\n  readonly port: number\n}): string {\n  if (params.override !== undefined && params.override.length > 0) {\n    return params.override\n  }\n  if (params.config !== undefined && params.config.length > 0) {\n    return params.config\n  }\n  return `http://${params.host}:${params.port}`\n}\n\n/**\n * Build the Rspress site with ciderpress configuration.\n *\n * @param options - Build configuration including config and paths\n * @returns A promise that resolves when the build completes\n */\nexport async function buildSite(options: ServerOptions): Promise<void> {\n  const rspressConfig = createRspressConfig({ config: options.config, paths: options.paths })\n  await build({\n    docDirectory: options.paths.contentDir,\n    config: rspressConfig,\n    configFilePath: '',\n  })\n}\n\n/**\n * Build the Rspress site for check/validation purposes.\n *\n * Uses the standard Rspress build (no log-level suppression) so that\n * `remarkLink`'s deadlink diagnostics are written to stderr and can be\n * captured by the calling code. The caller is responsible for swallowing\n * stderr output so it doesn't reach the terminal.\n *\n * @param options - Build configuration including config and paths\n * @returns A promise that resolves when the build completes\n */\nexport async function buildSiteForCheck(options: ServerOptions): Promise<void> {\n  const rspressConfig = createRspressConfig({ config: options.config, paths: options.paths })\n  await build({\n    docDirectory: options.paths.contentDir,\n    config: rspressConfig,\n    configFilePath: '',\n  })\n}\n\n/**\n * Serve the built Rspress site (static preview).\n *\n * @param options - Serve configuration including config and paths\n * @returns The port the server is listening on\n */\nexport async function serveSite(options: ServerOptions): Promise<number> {\n  const rspressConfig = createRspressConfig({\n    config: options.config,\n    paths: options.paths,\n    vscode: options.vscode,\n    themeOverride: options.theme,\n    variantOverride: options.colorMode,\n  })\n  const preferredPort = options.port ?? SERVE_PORT\n  const port = await getPort({ port: portNumbers(preferredPort, preferredPort + DEV_PORT_RANGE) })\n  await serve({\n    config: rspressConfig,\n    configFilePath: '',\n    port,\n  })\n  return port\n}\n\n/**\n * Open a URL in the default browser (cross-platform).\n *\n * @param url - The URL to open in the default browser\n */\nexport function openBrowser(url: string): void {\n  const os = platform()\n  const { cmd, args } = match(os)\n    .with('darwin', () => ({ cmd: 'open', args: [url] }))\n    .with('win32', () => ({ cmd: 'cmd', args: ['/c', 'start', url] }))\n    .otherwise(() => ({ cmd: 'xdg-open', args: [url] }))\n  spawn(cmd, args, { stdio: 'ignore', detached: true }).unref()\n}\n\n/**\n * Create a close event promise if the server is actively listening.\n *\n * Must be called before `close()` so the listener is registered\n * before the event fires — `once()` only observes future emissions.\n *\n * @private\n * @param httpServer - The HTTP server to listen on, or null\n * @returns A promise that resolves when 'close' fires, or null if not listening\n */\nfunction createCloseEvent(httpServer: Server | null): Promise<unknown[]> | null {\n  if (httpServer === null) {\n    return null\n  }\n  if (!httpServer.listening) {\n    return null\n  }\n  return once(httpServer, 'close')\n}\n\n/**\n * Return a performance config override that disables persistent build cache\n * on config-reload restarts.\n *\n * Rspress's persistent cache (`buildCache.cacheDigest`) only tracks sidebar/nav\n * structure. Changes to title, theme, colors, and `source.define` values are\n * invisible to it, causing stale cached output. Disabling the cache on restart\n * forces a fresh Rsbuild compilation with the updated config values.\n *\n * @private\n * @param options - Internal server options\n * @returns Partial Rsbuild config with cache override, or empty object\n */\nfunction buildCacheOverride(options: StartServerOptions): Record<string, unknown> {\n  if (options.skipBuildCache) {\n    return { performance: { buildCache: false } }\n  }\n  return {}\n}\n\n/**\n * Extract the underlying HTTP server from a Rspress/Rsbuild server instance.\n *\n * Rspress's public `ServerInstance` type only declares `close()`, but the\n * runtime object is a Rsbuild dev server which exposes `httpServer`.\n * This helper performs a runtime property check to safely extract it.\n *\n * @private\n * @param instance - The server instance returned by Rspress dev()\n * @returns The HTTP server if present, otherwise null\n */\nfunction getHttpServer(instance: ServerInstance): Server | null {\n  const record = instance as unknown as Record<string, unknown>\n  const value = record['httpServer']\n  if (value instanceof Server) {\n    return value\n  }\n  return null\n}\n","import { parse as parseYaml, stringify as stringifyYaml } from 'yaml'\n\nconst FRONTMATTER_PATTERN = /^---\\r?\\n([\\s\\S]*?)\\r?\\n---\\r?\\n?/\nconst BOM = '﻿'\nconst EMPTY_DATA: Readonly<Record<string, unknown>> = Object.freeze({})\n\n/**\n * Result of {@link parse} — the YAML frontmatter block as a plain object\n * and the remaining markdown body.\n *\n * `data` is `Record<string, unknown>` rather than `Frontmatter` because\n * source files may carry arbitrary YAML keys; the typed `Frontmatter`\n * surface only applies to config-time injection. Callers narrow as needed.\n */\nexport interface ParsedFrontmatter {\n  readonly data: Readonly<Record<string, unknown>>\n  readonly content: string\n}\n\n/**\n * Parse a markdown string into its YAML frontmatter block (if any) and\n * the remaining body content.\n *\n * Drop-in replacement for `gray-matter`'s default callable export, with\n * the same behavioural contract for our usage:\n *  - Recognises `---\\n…\\n---\\n` (and `\\r\\n` line endings) at the very start.\n *  - When no frontmatter block is present, returns `{ data: {}, content: raw }`.\n *  - Strips a leading UTF-8 BOM before scanning.\n *\n * Built on `yaml` (eemeli/yaml) — actively maintained, YAML 1.2 spec-\n * compliant, zero dependencies.\n *\n * @param raw - Raw markdown source (possibly with a leading frontmatter block)\n * @returns The parsed YAML data and the body content after the frontmatter\n *\n * @example\n * const { data, content } = parse('---\\ntitle: Hello\\n---\\n# Body\\n')\n * // data => { title: 'Hello' }\n * // content => '# Body\\n'\n */\nexport function parse(raw: string): ParsedFrontmatter {\n  const stripped = stripBom(raw)\n  const match = stripped.match(FRONTMATTER_PATTERN)\n  if (match === null) {\n    return { data: EMPTY_DATA, content: stripped }\n  }\n  const yamlBody = match[1] ?? ''\n  const content = stripped.slice(match[0].length)\n  if (yamlBody.trim().length === 0) {\n    return { data: EMPTY_DATA, content }\n  }\n  const parsed = parseYaml(yamlBody) as unknown\n  if (parsed === null || typeof parsed !== 'object' || Array.isArray(parsed)) {\n    return { data: EMPTY_DATA, content }\n  }\n  return { data: parsed as Record<string, unknown>, content }\n}\n\n/**\n * Serialise content + frontmatter data back into a single markdown string.\n *\n * Drop-in replacement for `gray-matter`'s `matter.stringify(content, data)`:\n *  - When `data` has no enumerable keys, the body is returned unchanged\n *    (no empty `---\\n---\\n` block is emitted).\n *  - Otherwise, the YAML block is prepended in the canonical\n *    `---\\n<yaml>\\n---\\n<content>` form.\n *\n * @param content - The markdown body to append after the frontmatter block\n * @param data - Frontmatter key-value pairs to serialise as YAML\n * @returns A markdown string with the frontmatter block prepended when present\n *\n * @example\n * stringify('# Body\\n', { title: 'Hello' })\n * // => '---\\ntitle: Hello\\n---\\n# Body\\n'\n *\n * stringify('# Body\\n', {})\n * // => '# Body\\n'\n */\nexport function stringify(content: string, data: Readonly<Record<string, unknown>>): string {\n  if (Object.keys(data).length === 0) {\n    return content\n  }\n  const yaml = stringifyYaml(data).replace(/\\n+$/u, '')\n  return `---\\n${yaml}\\n---\\n${content}`\n}\n\n/**\n * Strip a leading UTF-8 BOM (U+FEFF) from a string, if present.\n *\n * @private\n * @param raw - Input string\n * @returns Input with leading BOM removed when present, otherwise unchanged\n */\nfunction stripBom(raw: string): string {\n  if (raw.startsWith(BOM)) {\n    return raw.slice(1)\n  }\n  return raw\n}\n","import fs from 'node:fs/promises'\n\nimport { resolveOptionalIcon, serializeIcon } from '@ciderpress/config'\nimport type { IconColor, SerializedIcon } from '@ciderpress/config'\nimport { match, P } from 'massaman/match'\nimport { isNotNil, isString } from 'massaman/predicate'\n\nimport { parse as parseFrontmatter } from '../frontmatter.ts'\nimport type { ResolvedEntry } from '../types.ts'\n\n/**\n * Input data for building a workspace card JSX string.\n */\nexport interface WorkspaceCardData {\n  /**\n   * Card link target.\n   */\n  readonly link: string\n  /**\n   * Display name for the card.\n   */\n  readonly title: string\n  /**\n   * Icon config — Iconify identifier string, `{ id, color }` object, or\n   * `{ kind: 'image', src, alt }` for a static image asset.\n   */\n  readonly icon?: SerializedIcon\n  /**\n   * Scope label shown above the name (e.g. 'apps/').\n   */\n  readonly scope?: string\n  /**\n   * Short description shown on the card.\n   */\n  readonly description?: string\n  /**\n   * Technology tags — kebab-case tag keys resolved by UI TechTag.\n   */\n  readonly tags?: readonly string[]\n  /**\n   * Deploy badge image.\n   */\n  readonly badge?: { readonly src: string; readonly alt: string }\n  /**\n   * Whether this entry has sub-items (used for default icon selection).\n   */\n  readonly hasChildren?: boolean\n}\n\n/**\n * Generate section landing page MDX from resolved children.\n *\n * Uses **workspace cards** when any child has `card` metadata\n * (richer cards with scope, tags, deploy badges — like the homepage).\n * Falls back to **section cards** (simple icon + title + description).\n *\n * @param sectionText - Section heading text\n * @param description - Optional section description\n * @param children - Resolved child entries\n * @param iconColor - Color theme for section card icons\n * @returns MDX string with React component imports and JSX elements\n */\nexport async function generateLandingContent(\n  sectionText: string,\n  description: string | undefined,\n  children: readonly ResolvedEntry[],\n  iconColor: IconColor\n): Promise<string> {\n  const visible = children.filter((c) => !c.hidden && c.link)\n  const useWorkspace = visible.some((c) => c.card)\n\n  const descLine = match(description)\n    .with(P.nonNullable, (d) => `\\n${d}\\n`)\n    .otherwise(() => '')\n\n  const imports =\n    'import { WorkspaceCard, WorkspaceGrid, SectionCard, SectionGrid } from ' +\n    \"'@ciderpress/ui/theme'\\n\\n\"\n\n  if (useWorkspace) {\n    const cards = await Promise.all(visible.map((child) => buildWorkspaceCard(child)))\n    const grid = cards.join('\\n')\n    return `${imports}# ${sectionText}\\n${descLine}\\n<WorkspaceGrid>\\n${grid}\\n</WorkspaceGrid>\\n`\n  }\n\n  const cards = await Promise.all(visible.map((child) => buildSectionCard(child, iconColor)))\n  const grid = cards.join('\\n')\n  return `${imports}# ${sectionText}\\n${descLine}\\n<SectionGrid>\\n${grid}\\n</SectionGrid>\\n`\n}\n\n/**\n * Build a workspace card JSX string from structured data.\n *\n * Shared builder used by both the landing page generator (for resolved entries)\n * and the workspace module (for WorkspaceItem arrays).\n *\n * @param data - Card data with link, text, icon, tags, etc.\n * @returns JSX string for a single WorkspaceCard component\n */\nexport function buildWorkspaceCardJsx(data: WorkspaceCardData): string {\n  const defaultIcon = match(data.hasChildren === true)\n    .with(true, () => 'pixelarticons:folder')\n    .otherwise(() => 'pixelarticons:file')\n  const icon = data.icon ?? defaultIcon\n\n  const props: readonly string[] = [\n    `title=\"${escapeJsxProp(data.title)}\"`,\n    `href=\"${data.link}\"`,\n    ...serializeIconProp(icon),\n    ...maybeScopeProp(data.scope),\n    ...maybeDescriptionProp(data.description),\n    ...maybeTagsProp(data.tags),\n    ...maybeBadgeProp(data.badge),\n  ]\n\n  return `  <WorkspaceCard ${props.join(' ')} />`\n}\n\n/**\n * Build a workspace card JSX string from a resolved entry with card metadata.\n *\n * @private\n * @param entry - Resolved entry with card metadata\n * @returns JSX string for a WorkspaceCard component\n */\nasync function buildWorkspaceCard(entry: ResolvedEntry): Promise<string> {\n  const card = entry.card ?? {}\n  const description = card.description ?? (await resolveDescription(entry))\n  const resolved = resolveOptionalIcon(card.icon)\n\n  return buildWorkspaceCardJsx({\n    link: entry.link ?? '',\n    title: entry.title,\n    icon: serializeIcon(resolved),\n    scope: card.scope,\n    description,\n    tags: card.tags,\n    badge: card.badge,\n    hasChildren: isNotNil(entry.items) && entry.items.length > 0,\n  })\n}\n\n/**\n * Build a section card JSX string from a resolved entry.\n *\n * @private\n * @param entry - Resolved entry to render as a card\n * @param iconColor - Color theme for the icon\n * @returns JSX string for a single SectionCard component\n */\nasync function buildSectionCard(entry: ResolvedEntry, iconColor: IconColor): Promise<string> {\n  const hasChildren = entry.items && entry.items.length > 0\n  const iconId = match(hasChildren)\n    .with(true, () => 'pixelarticons:folder')\n    .otherwise(() => 'pixelarticons:file')\n  const icon: SerializedIcon = match(iconColor)\n    .with('purple', () => iconId as SerializedIcon)\n    .otherwise(() => ({ id: iconId, color: iconColor }) as SerializedIcon)\n  const description = await resolveDescription(entry)\n\n  const baseProps = [\n    `href=\"${entry.link}\"`,\n    `title=\"${escapeJsxProp(entry.title)}\"`,\n    ...serializeIconProp(icon),\n  ]\n  const descriptionProps = match(description)\n    .with(P.string, (d) => [`description=\"${escapeJsxProp(d)}\"`])\n    .otherwise(() => [] as string[])\n  const allProps = [...baseProps, ...descriptionProps]\n\n  return `  <SectionCard ${allProps.join(' ')} />`\n}\n\n/**\n * Resolve a description for a card.\n * Priority: card.description > source file frontmatter > first paragraph > page frontmatter.\n *\n * @private\n * @param entry - Resolved entry to extract description from\n * @returns Description string, or undefined if none found\n */\nasync function resolveDescription(entry: ResolvedEntry): Promise<string | undefined> {\n  if (isNotNil(entry.page) && entry.page.source) {\n    try {\n      const desc = await extractDescription(entry.page.source)\n      if (desc) {\n        return desc\n      }\n    } catch {\n      // ignore\n    }\n  }\n\n  // Config-level description as fallback (no file, or file has no description)\n  if (entry.description) {\n    return entry.description\n  }\n\n  return undefined\n}\n\n/**\n * Extract a short description from a markdown file.\n * Checks frontmatter `description` first, then first paragraph after heading.\n *\n * @private\n * @param sourcePath - Absolute path to the markdown file\n * @returns Description string, or undefined if none found\n */\nasync function extractDescription(sourcePath: string): Promise<string | undefined> {\n  const raw = await fs.readFile(sourcePath, 'utf8')\n  const { data, content } = parseFrontmatter(raw)\n\n  if (data.description) {\n    return String(data.description)\n  }\n\n  const lines = content.split('\\n')\n  const headingIdx = lines.findIndex((l) => l.startsWith('#'))\n  const para: readonly string[] = resolveParagraph(lines, headingIdx)\n\n  if (para.length > 0) {\n    return para.join(' ')\n  }\n}\n\n/**\n * Escape special characters in JSX prop values.\n *\n * @private\n * @param str - Raw string to escape for use in JSX attribute values\n * @returns Escaped string safe for JSX prop interpolation\n */\nfunction escapeJsxProp(str: string): string {\n  // Backslash must escape first, otherwise the entity-replacement passes below\n  // would multiply existing backslashes. Without this, a trailing odd-count\n  // backslash (`alt: 'x\\\\'`) escapes the closing `\"` of the emitted JSX\n  // attribute and the parser swallows the next character into the string —\n  // adjacent props become part of the value or the build errors confusingly.\n  return str\n    .replaceAll('\\\\', String.raw`\\\\`)\n    .replaceAll('\"', '&quot;')\n    .replaceAll('{', '&#123;')\n    .replaceAll('}', '&#125;')\n}\n\n/**\n * Extract the first non-empty paragraph after a heading from markdown lines.\n *\n * @private\n * @param lines - Array of markdown lines\n * @param headingIdx - Index of the heading line (-1 if none found)\n * @returns Array of trimmed paragraph lines\n */\nfunction resolveParagraph(lines: readonly string[], headingIdx: number): readonly string[] {\n  if (headingIdx === -1) {\n    return []\n  }\n\n  return lines\n    .slice(headingIdx + 1)\n    .reduce<{ readonly done: boolean; readonly result: readonly string[] }>(\n      (acc, line) => {\n        if (acc.done) {\n          return acc\n        }\n        if (line.startsWith('#')) {\n          return { done: true, result: acc.result }\n        }\n\n        const trimmed = line.trim()\n        if (trimmed === '' && acc.result.length > 0) {\n          return { done: true, result: acc.result }\n        }\n        if (trimmed === '') {\n          return acc\n        }\n        if (trimmed.startsWith('<') || trimmed.startsWith('---')) {\n          return acc\n        }\n\n        return { done: false, result: [...acc.result, trimmed] }\n      },\n      { done: false, result: [] }\n    ).result\n}\n\n/**\n * Serialize a unified icon config into JSX prop strings.\n *\n * - String → `icon=\"prefix:name\"`\n * - Object → `icon={{ id: \"prefix:name\", color: \"blue\" }}`\n *\n * @private\n * @param icon - Icon config value (string or object)\n * @returns Array with the icon JSX prop string\n */\nfunction serializeIconProp(icon: SerializedIcon): readonly string[] {\n  if (isString(icon)) {\n    return [`icon=\"${icon}\"`]\n  }\n  // Match on the discriminant value rather than `'kind' in icon` so a\n  // future variant that also carries a `kind` field (or a malformed\n  // runtime input) can't silently slip into the image branch.\n  return match(icon)\n    .with({ kind: 'image' }, (img) => {\n      const src = escapeJsxProp(img.src)\n      const alt = escapeJsxProp(img.alt)\n      return [`icon={{ kind: \"image\", src: \"${src}\", alt: \"${alt}\" }}`]\n    })\n    .otherwise((i) => [`icon={{ id: \"${i.id}\", color: \"${i.color}\" }}`])\n}\n\n/**\n * Return a scope JSX prop array if scope is defined.\n *\n * @private\n * @param scope - Optional scope string\n * @returns Array with scope prop string, or empty\n */\nfunction maybeScopeProp(scope: string | undefined): readonly string[] {\n  if (scope) {\n    return [`scope=\"${escapeJsxProp(scope)}\"`]\n  }\n  return []\n}\n\n/**\n * Return a description JSX prop array if description is defined.\n *\n * @private\n * @param description - Optional description string\n * @returns Array with description prop string, or empty\n */\nfunction maybeDescriptionProp(description: string | undefined): readonly string[] {\n  if (description) {\n    return [`description=\"${escapeJsxProp(description)}\"`]\n  }\n  return []\n}\n\n/**\n * Return a tags JSX prop array if tags are present and non-empty.\n *\n * @private\n * @param tags - Optional array of tag strings\n * @returns Array with tags prop string, or empty\n */\nfunction maybeTagsProp(tags: readonly string[] | undefined): readonly string[] {\n  if (tags && tags.length > 0) {\n    return [`tags={${JSON.stringify(tags)}}`]\n  }\n  return []\n}\n\n/**\n * Return a badge JSX prop array if badge is defined.\n *\n * @private\n * @param badge - Optional badge object with src and alt\n * @returns Array with badge prop string, or empty\n */\nfunction maybeBadgeProp(\n  badge: { readonly src: string; readonly alt: string } | undefined\n): readonly string[] {\n  if (badge) {\n    return [`badge={${JSON.stringify(badge)}}`]\n  }\n  return []\n}\n","import {\n  collectAllWorkspaceItems,\n  configWarning,\n  normalizeInclude,\n  resolveOptionalIcon,\n  serializeIcon,\n} from '@ciderpress/config'\nimport type {\n  ConfigWarning,\n  Page,\n  TitleConfig,\n  Workspace,\n  CiderpressConfig,\n} from '@ciderpress/config'\nimport { match, P } from 'massaman/match'\nimport { omitBy } from 'massaman/object'\nimport { isNil, isString, isUndefined } from 'massaman/predicate'\nimport { kebabCase } from 'massaman/string'\n\nimport { buildWorkspaceCardJsx } from './sidebar/landing.ts'\nimport type { ResolvedEntry } from './types.ts'\n\n/**\n * Apps and packages arrays extracted from config.\n */\ninterface WorkspaceArrays {\n  readonly apps: readonly Workspace[]\n  readonly packages: readonly Workspace[]\n}\n\n/**\n * Default descriptions for well-known workspace category titles.\n */\nconst DEFAULT_CATEGORY_DESCRIPTIONS: Readonly<Record<string, string>> = {\n  packages:\n    'Reusable modules shared across the codebase — libraries, utilities, configs, SDKs, and internal tooling.',\n  apps: 'Standalone applications and runnable services — APIs, workers, web apps, and anything that deploys independently.',\n}\n\n/**\n * Enrich resolved entries with card metadata derived from workspace items.\n *\n * Walks the resolved entry tree and, for each entry whose link starts with\n * a `Workspace.path`, produces a new tree with `CardConfig` metadata\n * added — without mutating the original entries.\n *\n * @param entries - Resolved entry tree from `resolveEntries()`\n * @param config - ciderpress config containing `workspaces` categories\n * @returns New entry tree with card metadata enriched\n */\nexport function enrichWorkspaceCards(\n  entries: readonly ResolvedEntry[],\n  config: CiderpressConfig\n): ResolvedEntry[] {\n  const items = collectAllWorkspaceItems(config)\n  if (items.length === 0) {\n    return [...entries]\n  }\n\n  return enrichEntries(entries, items)\n}\n\n/**\n * Generate the home page markdown from workspace items.\n *\n * Produces Rspress frontmatter (hero, features) plus workspace grid blocks.\n * Tags render as SVG icons (when available) or text labels.\n *\n * @param workspaces - Workspace categories from config\n * @returns Full home page markdown string\n */\nexport function generateHomePage(workspaces: WorkspaceArrays): string {\n  const frontmatter = [\n    '---',\n    'layout: home',\n    'hero:',\n    '  text: Documentation',\n    '  tagline: \"Internal platform documentation\"',\n    '  image:',\n    '    src: /banner.svg',\n    '    alt: ciderpress',\n    '  actions:',\n    '    - theme: brand',\n    '      text: Get Started',\n    '      link: /introduction',\n    '    - theme: alt',\n    '      text: Architecture',\n    '      link: /architecture',\n    'features:',\n    '  - title: Guides',\n    '    icon:',\n    '      src: /icons/guides.svg',\n    '      height: 48px',\n    '      width: 48px',\n    '    details: Step-by-step walkthroughs covering setup, workflows, and common tasks.',\n    '    link: /guides/setup-local-env',\n    '  - title: Standards',\n    '    icon:',\n    '      src: /icons/standards.svg',\n    '      height: 48px',\n    '      width: 48px',\n    '    details: Code style, naming conventions, and engineering best practices for the team.',\n    '    link: /standards/git-commits',\n    '  - title: Security',\n    '    icon:',\n    '      src: /icons/security.svg',\n    '      height: 48px',\n    '      width: 48px',\n    '    details: Authentication, authorization, secrets management, and vulnerability policies.',\n    '    link: /security/http',\n    '---',\n  ].join('\\n')\n\n  const appsSection = buildWorkspaceSection(\n    'Apps',\n    'Standalone applications and runnable services — APIs, workers, web apps, and anything that deploys independently.',\n    workspaces.apps,\n    'apps/'\n  )\n\n  const packagesSection = buildWorkspaceSection(\n    'Packages',\n    'Reusable modules shared across the codebase — libraries, utilities, configs, SDKs, and internal tooling.',\n    workspaces.packages,\n    'packages/'\n  )\n\n  return [\n    frontmatter,\n    '',\n    '<div class=\"cp-workspace-section\">',\n    '',\n    appsSection,\n    '',\n    packagesSection,\n    '',\n    '</div>',\n  ].join('\\n')\n}\n\n/**\n * Generate the introduction page markdown from workspace items.\n *\n * Produces a \"What's inside\" section with dynamic bullet lists derived\n * from workspace items.\n *\n * @param workspaces - Workspace items from config\n * @returns Full introduction page markdown string\n */\nexport function generateIntroPage(workspaces: WorkspaceArrays): string {\n  const appsList = workspaces.apps.map((a) => `${a.title} (${a.description})`).join(', ')\n  const packagesList = workspaces.packages.map((a) => `${a.title} (${a.description})`).join(', ')\n\n  return [\n    '# Introduction',\n    '',\n    'Internal platform documentation.',\n    '',\n    'The codebase is a **pnpm workspace** managed by **Turborepo**, written in **TypeScript** with strict mode enabled.',\n    '',\n    \"## What's inside\",\n    '',\n    `- **Apps** \\u2014 Standalone applications and runnable services: ${appsList}`,\n    `- **Packages** \\u2014 Reusable modules and shared code: ${packagesList}`,\n    '- **Tooling** \\u2014 Internal developer tools including this documentation site',\n  ].join('\\n')\n}\n\n/**\n * Synthesize Page entries from workspace config (categories).\n *\n * Produces standalone parent pages with workspace item children,\n * ready to merge into `config.pages` before resolution.\n * Skips any category whose link already exists in `config.pages`.\n *\n * @param config - ciderpress config containing workspaces\n * @returns Page array of synthesized workspace pages\n */\nexport function synthesizeWorkspaceSections(config: CiderpressConfig): Page[] {\n  const existingLinks = collectAllLinks(config.pages)\n\n  const apps = config.apps ?? []\n  const packages = config.packages ?? []\n  const categories = config.workspaces ?? []\n\n  const appsSection = match(apps.length > 0 && !existingLinks.has('/apps'))\n    .with(true, (): Page | null => {\n      const filteredItems = apps\n        .filter((item) => !existingLinks.has(item.path))\n        .map(workspaceToSection)\n      if (filteredItems.length === 0) {\n        return null\n      }\n      return {\n        title: 'Apps',\n        path: '/apps',\n        nav: { island: true },\n        defaults: {\n          description:\n            'Standalone applications and runnable services — APIs, workers, web apps, and anything that deploys independently.',\n        },\n        pages: filteredItems,\n      }\n    })\n    .otherwise(() => null)\n\n  const packagesSection = match(packages.length > 0 && !existingLinks.has('/packages'))\n    .with(true, (): Page | null => {\n      const filteredItems = packages\n        .filter((item) => !existingLinks.has(item.path))\n        .map(workspaceToSection)\n      if (filteredItems.length === 0) {\n        return null\n      }\n      return {\n        title: 'Packages',\n        path: '/packages',\n        nav: { island: true },\n        defaults: {\n          description:\n            'Reusable modules shared across the codebase — libraries, utilities, configs, SDKs, and internal tooling.',\n        },\n        pages: filteredItems,\n      }\n    })\n    .otherwise(() => null)\n\n  const categoryEntries = categories.map((category): Page | null => {\n    const link = category.link ?? `/${slugify(String(category.title))}`\n    if (existingLinks.has(link)) {\n      return null\n    }\n    const filteredItems = category.items\n      .filter((item) => !existingLinks.has(item.path))\n      .map(workspaceToSection)\n    if (filteredItems.length === 0) {\n      return null\n    }\n    const description = category.description ?? resolveDefaultCategoryDescription(category.title)\n    return {\n      title: category.title,\n      path: link,\n      nav: { island: true },\n      defaults: {\n        description,\n      },\n      pages: filteredItems,\n    }\n  })\n\n  return [appsSection, packagesSection, ...categoryEntries].filter(\n    (section): section is Page => section !== null\n  )\n}\n\n/**\n * Check workspace items for include patterns that will be double-prefixed.\n *\n * When a workspace `include` pattern already starts with the basePath\n * derived from `path`, the resolved glob becomes double-prefixed\n * and will silently match zero files. This produces warnings so the\n * user can fix their config before broken links appear in the build.\n *\n * @param config - Validated ciderpress config\n * @returns Array of warnings for any workspace items with suspect includes\n */\nexport function checkWorkspaceIncludes(config: CiderpressConfig): readonly ConfigWarning[] {\n  const allItems = collectAllWorkspaceItems(config)\n  return allItems.flatMap((item) => checkItemInclude(item))\n}\n\n/**\n * Convert display text to a URL-safe slug.\n * E.g. \"Getting Started\" → \"getting-started\", \"updatePet\" → \"update-pet\"\n *\n * @param text - Display text to slugify\n * @returns URL-safe lowercase slug\n */\nexport function slugify(text: string): string {\n  return kebabCase(text)\n}\n\n/**\n * Check a single workspace item for include patterns that already start\n * with the basePath derived from `path`.\n *\n * @private\n * @param item - Workspace item to check\n * @returns Array of warnings (empty if no issues)\n */\nfunction checkItemInclude(item: Workspace): readonly ConfigWarning[] {\n  if (isNil(item.include)) {\n    return []\n  }\n  const basePath = item.path.replace(/^\\//, '')\n  const patterns = normalizeInclude(item.include)\n  return patterns\n    .filter((pattern) => pattern.startsWith(basePath))\n    .map((pattern) =>\n      configWarning(\n        'duplicate_include_prefix',\n        `Workspace \"${String(item.title)}\" include \"${pattern}\" already starts with \"${basePath}\" — ` +\n          `it will resolve to \"${basePath}/${pattern}\" which likely matches zero files. ` +\n          `Did you mean \"${pattern.slice(basePath.length + 1)}\"? (include is relative to path)`\n      )\n    )\n}\n\n/**\n * Recursively collect all links from a page tree.\n * Walks pages and their nested children to find every defined link.\n *\n * @private\n * @param pages - Page tree to walk\n * @returns Set of all link strings found in the tree\n */\nfunction collectAllLinks(pages: readonly Page[]): Set<string> {\n  return new Set(\n    pages.flatMap((page): string[] => {\n      const self = collectSelfLinks(page.path)\n      const nested = collectNestedLinks(page.pages)\n      return [...self, ...nested]\n    })\n  )\n}\n\n/**\n * Recursively produce a new entry tree with card metadata from workspace items.\n *\n * @private\n * @param entries - Resolved entry tree to enrich\n * @param items - Workspace items containing card metadata\n * @returns New entry tree with card metadata added where matched\n */\nfunction enrichEntries(\n  entries: readonly ResolvedEntry[],\n  items: readonly Workspace[]\n): ResolvedEntry[] {\n  return entries.map((entry) => {\n    const enrichedItems = resolveEnrichedItems(entry.items, items)\n\n    if (entry.link && !entry.card) {\n      const entryLink = entry.link\n      const matched = items.find((item) => entryLink === item.path)\n      if (matched) {\n        const scope = deriveScope(matched.path)\n        const tags = resolveTags(matched.tags)\n        const badge = resolveBadge(matched.badge)\n\n        return {\n          ...entry,\n          items: enrichedItems,\n          card: {\n            icon: matched.icon,\n            scope,\n            description: matched.description,\n            tags,\n            badge,\n          },\n        }\n      }\n    }\n\n    if (enrichedItems) {\n      return { ...entry, items: enrichedItems }\n    }\n    return entry\n  })\n}\n\n/**\n * Derive the scope label from a path.\n * E.g. \"/apps/api\" → \"apps/\", \"/packages/database\" → \"packages/\"\n *\n * @private\n * @param itemPath - Workspace item path\n * @returns Scope label string (first segment with trailing slash)\n */\nfunction deriveScope(itemPath: string): string {\n  const segments = itemPath.split('/').filter(Boolean)\n  if (segments.length > 0) {\n    return `${segments[0]}/`\n  }\n  return ''\n}\n\n/**\n * Build a workspace section (heading + description + card grid) for the home page.\n *\n * @private\n * @param heading - Section heading text\n * @param description - Section description text\n * @param items - Workspace items to render as cards\n * @param scopePrefix - Prefix for scoping items\n * @returns Markdown string with heading, description, and card grid\n */\nfunction buildWorkspaceSection(\n  heading: string,\n  description: string,\n  items: readonly Workspace[],\n  scopePrefix: string\n): string {\n  const cards = items.map((item) => {\n    const resolved = resolveOptionalIcon(item.icon)\n    const titleStr = match(item.title)\n      .with(P.string, (t) => t)\n      .otherwise(String)\n    return buildWorkspaceCardJsx({\n      link: item.path,\n      title: titleStr,\n      icon: serializeIcon(resolved),\n      scope: scopePrefix,\n      description: item.description,\n      tags: item.tags,\n      badge: item.badge,\n    })\n  })\n\n  return [\n    `## ${heading}`,\n    '',\n    description,\n    '',\n    '<WorkspaceGrid>',\n    cards.join('\\n'),\n    '</WorkspaceGrid>',\n  ].join('\\n')\n}\n\n/**\n * Convert a Workspace to a Page, resolving the include glob and passing\n * Page-shaped fields (`pages`, `discover`, `defaults`) through directly.\n *\n * Uses `path` as both the page URL and URL prefix for glob-discovered children.\n * The `include` field is resolved relative to the workspace item's base path\n * (derived from `path`). When `discover.recursive` is `true` the default\n * include is a deep glob matching all nested markdown, otherwise a shallow\n * single-level glob.\n *\n * @private\n * @param item - Workspace item to convert\n * @returns Page config derived from the workspace item\n */\nfunction workspaceToSection(item: Workspace): Page {\n  const defaultPattern = match(item.discover)\n    .with({ recursive: true }, () => 'docs/**/*.md')\n    .otherwise(() => 'docs/*.md')\n  const fromPattern = item.include ?? defaultPattern\n  const basePath = item.path.replace(/^\\//, '')\n  const resolvedInclude = normalizeAndResolveInclude(fromPattern, basePath)\n\n  return omitBy(\n    {\n      title: item.title,\n      icon: item.icon,\n      path: item.path,\n      include: resolvedInclude,\n      pages: item.pages,\n      defaults: item.defaults,\n      discover: item.discover,\n    },\n    isUndefined\n  ) as Page\n}\n\n/**\n * Return the link as a single-element array, or empty if undefined.\n *\n * @private\n * @param link - Optional link string\n * @returns Array with the link, or empty array\n */\nfunction collectSelfLinks(link: string | undefined): string[] {\n  if (!isNil(link)) {\n    return [link]\n  }\n  return []\n}\n\n/**\n * Collect links from nested page entries.\n *\n * @private\n * @param items - Optional array of child pages\n * @returns Array of link strings from nested items\n */\nfunction collectNestedLinks(items: readonly Page[] | undefined): string[] {\n  if (items) {\n    return [...collectAllLinks(items)]\n  }\n  return []\n}\n\n/**\n * Recursively enrich child items with workspace card metadata.\n *\n * @private\n * @param items - Optional child entries to enrich\n * @param workspaceItems - Workspace items containing card metadata\n * @returns Enriched entries or undefined if no items\n */\nfunction resolveEnrichedItems(\n  items: readonly ResolvedEntry[] | undefined,\n  workspaceItems: readonly Workspace[]\n): ResolvedEntry[] | undefined {\n  if (items) {\n    return enrichEntries(items, workspaceItems)\n  }\n  return undefined\n}\n\n/**\n * Copy tags array, or return undefined if not present.\n *\n * @private\n * @param tags - Optional tags array\n * @returns Copied tags array or undefined\n */\nfunction resolveTags(tags: readonly string[] | undefined): string[] | undefined {\n  if (tags) {\n    return [...tags]\n  }\n  return undefined\n}\n\n/**\n * Copy badge object, or return undefined if not present.\n *\n * @private\n * @param badge - Optional badge with src and alt\n * @returns Copied badge object or undefined\n */\nfunction resolveBadge(\n  badge: { readonly src: string; readonly alt: string } | undefined\n): { readonly src: string; readonly alt: string } | undefined {\n  if (badge) {\n    return { src: badge.src, alt: badge.alt }\n  }\n  return undefined\n}\n\n/**\n * Normalize include (string | string[]) and resolve relative to base path.\n *\n * @private\n * @param include - Include pattern(s) from workspace\n * @param basePath - Base directory path to resolve relative to\n * @returns Resolved include pattern(s) as string or string[]\n */\nfunction normalizeAndResolveInclude(\n  include: string | readonly string[],\n  basePath: string\n): string | readonly string[] {\n  if (isString(include)) {\n    return `${basePath}/${include}`\n  }\n  return include.map((pattern) => `${basePath}/${pattern}`)\n}\n\n/**\n * Resolve a default description for well-known workspace category titles.\n *\n * @private\n * @param title - Category title config\n * @returns Default description string, or empty string for unknown titles\n */\nfunction resolveDefaultCategoryDescription(title: TitleConfig): string {\n  const key = String(title).toLowerCase()\n  return DEFAULT_CATEGORY_DESCRIPTIONS[key] ?? ''\n}\n","import type { Result } from '@ciderpress/config'\nimport { attempt } from 'massaman/control'\nimport { isPlainObject } from 'massaman/predicate'\nimport { parse } from 'yaml'\n\n// Isolates a leading `---` fenced YAML block: group 1 is the raw frontmatter,\n// group 2 is everything after the closing fence. The `s` flag lets `.` span\n// newlines so multi-line bodies are captured whole.\nconst FRONTMATTER_PATTERN = /^---\\r?\\n(.*?)\\r?\\n---\\r?\\n?(.*)$/s\n\n/**\n * Parsed markdown/MDX file, split into frontmatter and body. Field names mirror\n * gray-matter's surface (`data`, `content`, `matter`, `excerpt`) so this is a\n * near drop-in for existing gray-matter call sites.\n */\nexport interface MatterFile {\n  readonly data: Record<string, unknown>\n  readonly content: string\n  readonly matter: string\n  readonly excerpt: string\n}\n\n/**\n * Categories of frontmatter parse failure.\n */\nexport type MatterFileErrorType = 'missing_frontmatter' | 'invalid_yaml'\n\n/**\n * A frontmatter parse failure. Distinct from any downstream validation error.\n */\nexport interface MatterFileError {\n  readonly _tag: 'MatterFileError'\n  readonly type: MatterFileErrorType\n  readonly message: string\n}\n\n/**\n * Split a markdown/MDX source string into its frontmatter and body.\n *\n * The body (`content`) is always the text after the closing `---` fence, so\n * frontmatter is stripped by construction — identical behaviour for `.md` and\n * `.mdx`. Unlike gray-matter, this returns a `Result` tuple and never throws.\n *\n * @example\n * ```ts\n * const [error, file] = splitFrontmatter('---\\nlabel: Guide\\n---\\n# {{title}}\\n')\n * if (!error) {\n *   file.data // { label: 'Guide' }\n *   file.content // '# {{title}}\\n'\n * }\n * ```\n *\n * @param source - Raw file contents, expected to begin with a `---` YAML block\n * @returns A Result tuple: the parsed `MatterFile`, or a `MatterFileError`\n */\nexport function splitFrontmatter(source: string): Result<MatterFile, MatterFileError> {\n  const match = FRONTMATTER_PATTERN.exec(source)\n  if (!match) {\n    return [\n      matterFileError(\n        'missing_frontmatter',\n        'No frontmatter found — the file must begin with a `---` fenced YAML block'\n      ),\n      null,\n    ]\n  }\n\n  const rawMatter = match[1] ?? ''\n  const content = match[2] ?? ''\n\n  const parsed = attempt(() => parse(rawMatter))\n  if (!parsed.ok) {\n    return [\n      matterFileError('invalid_yaml', `Failed to parse frontmatter YAML: ${parsed.error.message}`),\n      null,\n    ]\n  }\n\n  return [null, { data: toData(parsed.value), content, matter: rawMatter, excerpt: '' }]\n}\n\n/**\n * Coerce a parsed YAML value into a frontmatter record. Empty or scalar\n * frontmatter yields an empty object; downstream validation reports the\n * resulting missing fields.\n *\n * @private\n * @param value - The parsed YAML value\n * @returns A frontmatter record\n */\nfunction toData(value: unknown): Record<string, unknown> {\n  if (isPlainObject(value)) {\n    return value\n  }\n  return {}\n}\n\n/**\n * Construct a {@link MatterFileError}.\n *\n * @private\n * @param type - The error category discriminant\n * @param message - Human-readable error message\n * @returns A `MatterFileError`\n */\nfunction matterFileError(type: MatterFileErrorType, message: string): MatterFileError {\n  return { _tag: 'MatterFileError', type, message }\n}\n","import fs from 'node:fs/promises'\nimport path from 'node:path'\n\nimport type { CiderpressConfig } from '@ciderpress/config'\nimport { buildTemplate, createRegistry, getBuiltInTemplates } from '@ciderpress/templates'\nimport type { Template, TemplateRegistry } from '@ciderpress/templates'\nimport { groupBy } from 'massaman/array'\nimport { attemptAsync } from 'massaman/control'\nimport { isString } from 'massaman/predicate'\n\nimport { splitFrontmatter } from './matter.ts'\nimport type { Paths } from './paths.ts'\n\n/**\n * A resolved template with its origin, ready for display.\n */\nexport interface ResolvedTemplate {\n  readonly template: Template\n  /** `'built-in'` for bundled templates, otherwise the source file path. */\n  readonly source: 'built-in' | string\n  readonly overridesBuiltIn: boolean\n}\n\n/**\n * A template-loading problem, flattened to a single presentable shape across\n * directory-read, frontmatter-parse, and template-validation failures.\n */\nexport interface TemplateIssue {\n  /** File or directory path, relative to the repo root. */\n  readonly file: string\n  readonly type: string\n  readonly message: string\n}\n\n/**\n * The outcome of resolving templates from config: the effective registry\n * (built-ins overridden by user templates), the display list, and any issues.\n */\nexport interface ResolvedTemplates {\n  readonly registry: TemplateRegistry\n  readonly resolved: readonly ResolvedTemplate[]\n  readonly issues: readonly TemplateIssue[]\n}\n\n/**\n * Resolve documentation templates by merging the built-ins with any user\n * templates declared via `config.templates`. User templates whose type (their\n * filename stem) matches a built-in override it.\n *\n * Never throws — directory, parse, and validation failures are collected into\n * `issues` so callers can present them (used by `templates list/check` and\n * `check`). `draft` treats a missing/empty `templates` config as built-ins only.\n *\n * @param input - The configured template dir(s) and resolved project paths\n * @returns The effective registry, a display list, and any loading issues\n */\nexport async function resolveTemplates(input: {\n  readonly templates: string | readonly string[] | undefined\n  readonly paths: Paths\n}): Promise<ResolvedTemplates> {\n  const { templates, paths } = input\n  const dirs = normalizeDirs(templates)\n\n  const dirResults = await Promise.all(\n    dirs.map((dir) => loadDir({ repoRoot: paths.repoRoot, dir }))\n  )\n  const loadedAll = dirResults.flatMap((result) => result.loaded)\n  const dirIssues = dirResults.flatMap((result) => result.issues)\n\n  const { unique, issues: duplicateIssues } = dedupeByType(loadedAll)\n  const userTemplates = unique.map((entry) => entry.template)\n\n  const registry = createRegistry().merge(createRegistry(userTemplates))\n  const resolved = buildResolvedList(unique)\n\n  return { registry, resolved, issues: [...dirIssues, ...duplicateIssues] }\n}\n\n/**\n * Extract the `templates` field from a possibly-null config, for callers that\n * tolerate a failed config load by falling back to built-ins only.\n *\n * @param config - The loaded config, or null when loading failed\n * @returns The configured template dir(s), or undefined\n */\nexport function configTemplates(\n  config: CiderpressConfig | null\n): string | readonly string[] | undefined {\n  if (config === null) {\n    return undefined\n  }\n  return config.templates\n}\n\n/**\n * A selectable option for a single-select template prompt.\n */\nexport interface TemplateOption {\n  readonly value: string\n  readonly label: string\n  readonly hint: string\n}\n\n/**\n * Build a flat option list for a single-select template prompt. Templates that\n * declare a group — via a `group` frontmatter field or a sub-directory under\n * the templates dir — render as `Group/Label` (e.g. `guides/UI`); ungrouped\n * templates (files at the templates root and all built-ins) render flat.\n *\n * @param resolved - The resolved templates from {@link resolveTemplates}\n * @returns The options in resolved order, prefixed only for grouped templates\n */\nexport function toTemplateSelectOptions(\n  resolved: readonly ResolvedTemplate[]\n): readonly TemplateOption[] {\n  return resolved.map((entry) => toOption(entry.template))\n}\n\n/**\n * A user template successfully loaded from a file.\n */\ninterface LoadedTemplate {\n  readonly template: Template\n  readonly file: string\n}\n\n/**\n * Discriminated outcome of loading a single template file.\n */\ntype FileOutcome =\n  | { readonly kind: 'ok'; readonly loaded: LoadedTemplate }\n  | { readonly kind: 'issue'; readonly issue: TemplateIssue }\n\n/**\n * Normalize the `templates` config field into an array of directory paths.\n *\n * @private\n * @param templates - The raw config value (string, array, or undefined)\n * @returns An array of directory paths (empty when unset)\n */\nfunction normalizeDirs(templates: string | readonly string[] | undefined): readonly string[] {\n  if (templates === undefined) {\n    return []\n  }\n  if (isString(templates)) {\n    return [templates]\n  }\n  return templates\n}\n\n/**\n * Map a filename to its supported template extension.\n *\n * @private\n * @param filename - The file name to inspect\n * @returns The extension, or null when unsupported\n */\nfunction toExtension(filename: string): '.md' | '.mdx' | null {\n  if (filename.endsWith('.mdx')) {\n    return '.mdx'\n  }\n  if (filename.endsWith('.md')) {\n    return '.md'\n  }\n  return null\n}\n\n/**\n * Load every supported template file from a single directory.\n *\n * @private\n * @param input - Repo root and the (relative) template directory\n * @returns Loaded templates and any per-file or directory-read issues\n */\nasync function loadDir(input: { readonly repoRoot: string; readonly dir: string }): Promise<{\n  readonly loaded: readonly LoadedTemplate[]\n  readonly issues: readonly TemplateIssue[]\n}> {\n  const { repoRoot, dir } = input\n  return walkTemplates({ absDir: path.resolve(repoRoot, dir), relDir: dir, group: undefined })\n}\n\n/**\n * Recursively load supported template files under a directory, tagging each\n * with the group derived from its location. Files at the configured root are\n * ungrouped; each nested directory contributes a `parent/child` group segment.\n * A frontmatter `group` overrides the derived value in {@link buildTemplate}.\n *\n * @private\n * @param input - The current absolute + repo-relative dir and the accumulated\n *   group for files at this level\n * @returns Loaded templates and any per-file or directory-read issues\n */\nasync function walkTemplates(input: {\n  readonly absDir: string\n  readonly relDir: string\n  readonly group: string | undefined\n}): Promise<{\n  readonly loaded: readonly LoadedTemplate[]\n  readonly issues: readonly TemplateIssue[]\n}> {\n  const { absDir, relDir, group } = input\n\n  const read = await attemptAsync(() => fs.readdir(absDir, { withFileTypes: true }))\n  if (!read.ok) {\n    return {\n      loaded: [],\n      issues: [\n        {\n          file: relDir,\n          type: 'read_error',\n          message: `Cannot read templates directory: ${read.error.message}`,\n        },\n      ],\n    }\n  }\n\n  const entries = read.value\n\n  const candidates = entries\n    .filter((entry) => entry.isFile())\n    .map((entry) => ({ name: entry.name, extension: toExtension(entry.name) }))\n    .flatMap((candidate) => {\n      if (candidate.extension === null) {\n        return []\n      }\n      return [{ name: candidate.name, extension: candidate.extension }]\n    })\n\n  const outcomes = await Promise.all(\n    candidates.map((candidate) =>\n      loadTemplateFile({\n        absPath: path.join(absDir, candidate.name),\n        relPath: path.join(relDir, candidate.name),\n        extension: candidate.extension,\n        group,\n      })\n    )\n  )\n\n  const subResults = await Promise.all(\n    entries\n      .filter((entry) => entry.isDirectory())\n      .map((entry) =>\n        walkTemplates({\n          absDir: path.join(absDir, entry.name),\n          relDir: path.join(relDir, entry.name),\n          group: extendGroup(group, entry.name),\n        })\n      )\n  )\n\n  return {\n    loaded: [\n      ...outcomes.flatMap((outcome) => {\n        if (outcome.kind === 'ok') {\n          return [outcome.loaded]\n        }\n        return []\n      }),\n      ...subResults.flatMap((result) => result.loaded),\n    ],\n    issues: [\n      ...outcomes.flatMap((outcome) => {\n        if (outcome.kind === 'issue') {\n          return [outcome.issue]\n        }\n        return []\n      }),\n      ...subResults.flatMap((result) => result.issues),\n    ],\n  }\n}\n\n/**\n * Extend a group path with a nested directory segment.\n *\n * @private\n * @param group - The parent group, or undefined at the configured root\n * @param name - The nested directory name\n * @returns `name` at the root, otherwise `group/name`\n */\nfunction extendGroup(group: string | undefined, name: string): string {\n  if (group === undefined) {\n    return name\n  }\n  return `${group}/${name}`\n}\n\n/**\n * Read, parse, and validate a single template file.\n *\n * @private\n * @param input - Absolute path, repo-relative path, and resolved extension\n * @returns A discriminated `FileOutcome`\n */\nasync function loadTemplateFile(input: {\n  readonly absPath: string\n  readonly relPath: string\n  readonly extension: '.md' | '.mdx'\n  readonly group: string | undefined\n}): Promise<FileOutcome> {\n  const { absPath, relPath, extension, group } = input\n\n  const read = await attemptAsync(() => fs.readFile(absPath, 'utf8'))\n  if (!read.ok) {\n    return {\n      kind: 'issue',\n      issue: { file: relPath, type: 'read_error', message: read.error.message },\n    }\n  }\n\n  const [matterError, matter] = splitFrontmatter(read.value)\n  if (matterError) {\n    return {\n      kind: 'issue',\n      issue: { file: relPath, type: matterError.type, message: matterError.message },\n    }\n  }\n\n  const type = path.basename(relPath, extension)\n  const [buildError, template] = buildTemplate({\n    type,\n    data: matter.data,\n    content: matter.content,\n    extension,\n    group,\n  })\n  if (buildError) {\n    return {\n      kind: 'issue',\n      issue: { file: relPath, type: buildError.type, message: buildError.message },\n    }\n  }\n\n  return { kind: 'ok', loaded: { template, file: relPath } }\n}\n\n/**\n * Drop user templates that collide on type (filename stem), keeping the first\n * and reporting the rest as `duplicate_type` issues.\n *\n * @private\n * @param loaded - All user templates loaded across directories\n * @returns The unique templates and duplicate-collision issues\n */\nfunction dedupeByType(loaded: readonly LoadedTemplate[]): {\n  readonly unique: readonly LoadedTemplate[]\n  readonly issues: readonly TemplateIssue[]\n} {\n  const groups = groupBy(loaded, (entry) => entry.template.type)\n  const grouped = Object.values(groups)\n\n  const unique = grouped.flatMap((group) => {\n    const [first] = group\n    if (first === undefined) {\n      return []\n    }\n    return [first]\n  })\n\n  const issues = grouped.flatMap((group) => {\n    const [first, ...rest] = group\n    if (first === undefined) {\n      return []\n    }\n    return rest.map((duplicate) => ({\n      file: duplicate.file,\n      type: 'duplicate_type',\n      message: `Duplicate template type \"${duplicate.template.type}\" (already defined in ${first.file})`,\n    }))\n  })\n\n  return { unique, issues }\n}\n\n/**\n * Build the display list: built-ins not overridden by a user template, followed\n * by user templates (flagged when they override a built-in).\n *\n * @private\n * @param unique - The deduplicated user templates\n * @returns The ordered list of resolved templates\n */\nfunction buildResolvedList(unique: readonly LoadedTemplate[]): readonly ResolvedTemplate[] {\n  const builtIns = getBuiltInTemplates()\n  const builtInTypes = new Set(Object.keys(builtIns))\n  const userTypes = new Set(unique.map((entry) => entry.template.type))\n\n  const builtInResolved = Object.values(builtIns)\n    .filter((template) => !userTypes.has(template.type))\n    .map((template) => ({ template, source: 'built-in' as const, overridesBuiltIn: false }))\n\n  const userResolved = unique.map((entry) => ({\n    template: entry.template,\n    source: entry.file,\n    overridesBuiltIn: builtInTypes.has(entry.template.type),\n  }))\n\n  return [...builtInResolved, ...userResolved]\n}\n\n/**\n * Map a template to a selectable prompt option, prefixing its label with the\n * template's group when one is set.\n *\n * @private\n * @param template - The template to project\n * @returns The option with a `Group/Label` display label, or a flat label\n */\nfunction toOption(template: Template): TemplateOption {\n  const { type, label, hint, group } = template\n  if (group === undefined || group.length === 0) {\n    return { value: type, label, hint }\n  }\n  return { value: type, label: `${group}/${label}`, hint }\n}\n","/**\n * Shared check orchestration for config validation and deadlink detection.\n *\n * This module is the CLI-level boundary for side effects: it intercepts\n * process.stderr to capture Rspress's `remarkLink` diagnostics and\n * presents structured results via the CLI logger. Mutation of process\n * state is confined here (like `watcher.ts`) and disabled from lint.\n */\n\nimport path from 'node:path'\n\nimport { configError } from '@ciderpress/config'\nimport type { ConfigError, ConfigWarning, CiderpressConfig } from '@ciderpress/config'\nimport type { Log } from '@kidd-cli/core'\nimport { toError } from 'massaman/conversion'\nimport { sumBy } from 'massaman/math'\nimport { isString } from 'massaman/predicate'\n\nimport { scanMarkers } from './markers.ts'\nimport type { MarkerIssue } from './markers.ts'\nimport type { Paths } from './paths.ts'\nimport { buildSiteForCheck } from './rspress.ts'\nimport { checkWorkspaceIncludes } from './sync/workspace.ts'\nimport { resolveTemplates } from './templates.ts'\nimport type { TemplateIssue } from './templates.ts'\n\n// oxlint-disable-next-line prefer-regex-literals, no-control-regex -- regex literal is clearer for a well-known ANSI escape pattern\nconst ANSI_PATTERN = /\\u001B\\[[0-9;]*m/g\n\nconst RED = '\\u001B[31m'\nconst YELLOW = '\\u001B[33m'\nconst DIM = '\\u001B[2m'\nconst RESET = '\\u001B[0m'\n\ninterface DeadlinkInfo {\n  readonly file: string\n  readonly links: readonly string[]\n}\n\ninterface ConfigCheckResult {\n  readonly passed: boolean\n  readonly errors: readonly ConfigError[]\n  readonly warnings: readonly ConfigWarning[]\n}\n\ntype BuildCheckResult =\n  | { readonly status: 'passed' }\n  | { readonly status: 'failed'; readonly deadlinks: readonly DeadlinkInfo[] }\n  | { readonly status: 'skipped' }\n  | { readonly status: 'error'; readonly message: string }\n\ntype TemplatesCheckResult =\n  | { readonly status: 'passed'; readonly count: number }\n  | { readonly status: 'failed'; readonly issues: readonly TemplateIssue[] }\n  | { readonly status: 'skipped' }\n\ntype MarkersCheckResult =\n  | { readonly status: 'passed' }\n  | { readonly status: 'failed'; readonly issues: readonly MarkerIssue[] }\n  | { readonly status: 'skipped' }\n\ninterface CaptureResult<T> {\n  readonly result: T | null\n  readonly error: Error | null\n  readonly captured: string\n}\n\ninterface PresentResultsParams {\n  readonly configResult: ConfigCheckResult\n  readonly templatesResult: TemplatesCheckResult\n  readonly markersResult: MarkersCheckResult\n  readonly buildResult: BuildCheckResult\n  readonly logger: Log\n}\n\ninterface RunBuildCheckParams {\n  readonly config: CiderpressConfig\n  readonly paths: Paths\n  readonly verbose?: boolean\n}\n\ninterface RunConfigCheckParams {\n  readonly config: CiderpressConfig | null\n  readonly loadError: ConfigError | null\n}\n\n/**\n * Wrap a config load result into a structured check result.\n *\n * `loadConfig` already validates via `validateConfig` and returns a\n * `ConfigResult` tuple. This function translates that into the\n * `ConfigCheckResult` shape used by the presentation layer.\n *\n * @param params - The loaded config and any load error\n * @returns A `ConfigCheckResult` with pass/fail status and any errors\n */\nexport function runConfigCheck(params: RunConfigCheckParams): ConfigCheckResult {\n  const { config, loadError } = params\n  if (loadError) {\n    return { passed: false, errors: [loadError], warnings: [] }\n  }\n  if (!config) {\n    return {\n      passed: false,\n      errors: [configError('empty_sections', 'Config is missing')],\n      warnings: [],\n    }\n  }\n  const warnings = checkWorkspaceIncludes(config)\n  return { passed: true, errors: [], warnings }\n}\n\n/**\n * Validate documentation templates declared via `config.templates`.\n *\n * Resolves the templates the same way `draft` and `templates check` do,\n * surfacing frontmatter, syntax, and collision issues. Built-ins are always\n * valid, so a project without a `templates` field passes trivially.\n *\n * @param params - The configured template dir(s) and paths for resolution\n * @returns A `TemplatesCheckResult` with pass/fail status and any issues\n */\nexport async function runTemplatesCheck(params: {\n  readonly templates: string | readonly string[] | undefined\n  readonly paths: Paths\n}): Promise<TemplatesCheckResult> {\n  const { resolved, issues } = await resolveTemplates({\n    templates: params.templates,\n    paths: params.paths,\n  })\n  if (issues.length > 0) {\n    return { status: 'failed', issues }\n  }\n  return { status: 'passed', count: resolved.length }\n}\n\n/**\n * Scan synced content for docs that still carry unfilled `{{ }}` fill markers.\n *\n * Runs after sync so it sees exactly what ships. Fails when any published doc\n * retains a template's fill marker; templates themselves are not synced and so\n * are excluded. Fenced and inline code are ignored (see {@link scanMarkers}).\n *\n * @param params - The synced content directory and repo root\n * @returns A `MarkersCheckResult` with pass/fail status and any issues\n */\nexport async function runMarkersCheck(params: {\n  readonly contentDir: string\n  readonly repoRoot: string\n}): Promise<MarkersCheckResult> {\n  const issues = await scanMarkers({ contentDir: params.contentDir, repoRoot: params.repoRoot })\n  if (issues.length > 0) {\n    return { status: 'failed', issues }\n  }\n  return { status: 'passed' }\n}\n\n/**\n * Run a silent Rspress build to detect deadlinks.\n *\n * Rspress's `remarkLink` plugin checks internal links during build. In\n * production mode it logs colored error messages per file via `logger.error()`\n * then throws `Error(\"Dead link found\")`. We capture stderr to parse the\n * diagnostics and present them in our own clean format.\n *\n * @param params - Config and paths for the build\n * @returns A `BuildCheckResult` with pass/fail status and any deadlinks found\n */\nexport async function runBuildCheck(params: RunBuildCheckParams): Promise<BuildCheckResult> {\n  if (params.verbose) {\n    return runBuildCheckVerbose(params)\n  }\n\n  const { error, captured } = await captureOutput(() =>\n    buildSiteForCheck({ config: params.config, paths: params.paths })\n  )\n\n  // Rspress wraps the \"Dead link found\" error inside an Rspack build failure,\n  // so we check captured output for deadlink patterns rather than the error message.\n  if (error) {\n    const { repoRoot } = params.paths\n    const deadlinks = parseDeadlinks(captured).map((info) => ({\n      file: path.relative(repoRoot, info.file),\n      links: info.links,\n    }))\n    if (deadlinks.length > 0) {\n      return { status: 'failed', deadlinks }\n    }\n\n    return { status: 'error', message: error.message }\n  }\n\n  return { status: 'passed' }\n}\n\n/**\n * Format and display check results using the CLI logger.\n *\n * @param params - Config check result, build check result, and logger instance\n * @returns `true` if all checks passed, `false` otherwise\n */\nexport function presentResults(params: PresentResultsParams): boolean {\n  const { configResult, templatesResult, markersResult, buildResult, logger } = params\n\n  if (configResult.passed) {\n    logger.success('Config valid')\n  } else {\n    logger.error('Config validation failed:')\n    // oxlint-disable-next-line no-unused-expressions -- side-effect logging over config errors\n    configResult.errors.map((err) => {\n      logger.message(`  ${err.message}`)\n      return null\n    })\n  }\n\n  if (configResult.warnings.length > 0) {\n    logger.warn(`${configResult.warnings.length} config warning(s):`)\n    // oxlint-disable-next-line no-unused-expressions -- side-effect logging over config warnings\n    configResult.warnings.map((w) => {\n      logger.message(`  ${YELLOW}⚠${RESET} ${w.message}`)\n      return null\n    })\n  }\n\n  if (templatesResult.status === 'passed') {\n    logger.success('Templates valid')\n  } else if (templatesResult.status === 'failed') {\n    logger.error(`Found ${templatesResult.issues.length} template issue(s):`)\n    logger.message(templatesResult.issues.map(formatTemplateIssue).join('\\n'))\n  }\n\n  if (markersResult.status === 'passed') {\n    logger.success('No unfilled markers')\n  } else if (markersResult.status === 'failed') {\n    const total = sumBy(markersResult.issues, (issue) => issue.markers.length)\n    logger.error(`Found ${total} unfilled marker(s):`)\n    logger.message(markersResult.issues.map(formatMarkerGroup).join('\\n'))\n  }\n\n  if (buildResult.status === 'passed') {\n    logger.success('No broken links')\n  } else if (buildResult.status === 'skipped') {\n    // Build was skipped (e.g. config invalid) — nothing to report\n  } else if (buildResult.status === 'error') {\n    logger.error(`Build failed: ${buildResult.message}`)\n  } else {\n    const totalLinks = sumBy(buildResult.deadlinks, (info) => info.links.length)\n    logger.error(`Found ${totalLinks} broken link(s):`)\n    const block = buildResult.deadlinks.map(formatDeadlinkGroup).join('\\n')\n    logger.message(block)\n  }\n\n  return (\n    configResult.passed &&\n    templatesResult.status !== 'failed' &&\n    markersResult.status !== 'failed' &&\n    buildResult.status === 'passed'\n  )\n}\n\n/**\n * Format a single template issue as an indented line.\n *\n * @private\n * @param issue - The template issue to format\n * @returns Formatted line for CLI output\n */\nfunction formatTemplateIssue(issue: TemplateIssue): string {\n  return `  ${RED}✖${RESET} ${issue.file} ${DIM}—${RESET} ${issue.message}`\n}\n\n/**\n * Format a single marker issue as a compact multi-line group, mirroring the\n * deadlink report: a file header followed by each leftover marker.\n *\n * @private\n * @param issue - The marker issue with file path and leftover markers\n * @returns Formatted multi-line string for CLI output\n */\nfunction formatMarkerGroup(issue: MarkerIssue): string {\n  const header = `  ${RED}✖${RESET} ${issue.file}`\n  const markers = issue.markers.map((marker) => `      ${DIM}→${RESET} ${marker}`)\n  return [header, ...markers].join('\\n')\n}\n\n/**\n * Run the build check without capturing output, letting Rspress/Rspack\n * write directly to stdout/stderr so the full error details are visible.\n *\n * @private\n * @param params - Config and paths for the build\n * @returns A `BuildCheckResult` with pass/fail status\n */\nasync function runBuildCheckVerbose(params: RunBuildCheckParams): Promise<BuildCheckResult> {\n  try {\n    await buildSiteForCheck({ config: params.config, paths: params.paths })\n    return { status: 'passed' }\n  } catch (error) {\n    return { status: 'error', message: toError(error).message }\n  }\n}\n\n/**\n * Strip ANSI escape codes from a string.\n *\n * @private\n * @param text - Text potentially containing ANSI color codes\n * @returns The text with all ANSI escape sequences removed\n */\nfunction stripAnsi(text: string): string {\n  return text.replace(ANSI_PATTERN, '')\n}\n\n/**\n * Coerce a chunk to a UTF-8 string.\n *\n * @private\n * @param chunk - Buffer or string from a writable stream\n * @returns UTF-8 string representation\n */\nfunction chunkToString(chunk: Uint8Array | string): string {\n  if (isString(chunk)) {\n    return chunk\n  }\n  return Buffer.from(chunk).toString('utf8')\n}\n\n/**\n * Create an interceptor that captures writes and swallows them.\n *\n * Invokes any callback passed via Node's overloaded `write` signature\n * so callers that rely on write-completion callbacks are not left hanging.\n *\n * @private\n * @param chunks - Mutable array to accumulate captured text\n * @returns Interceptor function matching the `process.stdout.write` signature\n */\nfunction createInterceptor(chunks: string[]): typeof process.stdout.write {\n  return function interceptWrite(\n    chunk: Uint8Array | string,\n    // oxlint-disable-next-line @typescript-eslint/no-explicit-any -- matching Node's overloaded write signature\n    encodingOrCb?: any,\n    // oxlint-disable-next-line @typescript-eslint/no-explicit-any -- matching Node's overloaded write signature\n    maybeCb?: any\n  ): boolean {\n    const text = chunkToString(chunk)\n    // oxlint-disable-next-line functional/immutable-data -- accumulating captured output\n    chunks.push(text)\n    if (typeof encodingOrCb === 'function') {\n      // oxlint-disable-next-line eslint-plugin-promise/prefer-await-to-callbacks -- invoking Node's write callback, not an async pattern\n      encodingOrCb()\n    } else if (typeof maybeCb === 'function') {\n      // oxlint-disable-next-line eslint-plugin-promise/prefer-await-to-callbacks -- invoking Node's write callback, not an async pattern\n      maybeCb()\n    }\n    return true\n  } as typeof process.stdout.write\n}\n\n/**\n * Execute an async function while capturing all stdout and stderr output.\n *\n * Temporarily replaces both `process.stdout.write` and `process.stderr.write`\n * to intercept output from Rspress/Rsbuild. The Rsbuild logger writes\n * deadlink diagnostics to stdout (not stderr), so we must capture both\n * streams. All output is swallowed — the check command presents its own\n * clean results. Original write functions are always restored.\n *\n * @private\n * @param fn - The async function to execute while capturing output\n * @returns The function result (or null on error), any thrown error, and captured output text\n */\nasync function captureOutput<T>(fn: () => Promise<T>): Promise<CaptureResult<T>> {\n  const chunks: string[] = []\n  const originalStdoutWrite = process.stdout.write\n  const originalStderrWrite = process.stderr.write\n\n  // oxlint-disable-next-line functional/immutable-data -- boundary mutation: intercepting stdout for build output capture\n  process.stdout.write = createInterceptor(chunks)\n  // oxlint-disable-next-line functional/immutable-data -- boundary mutation: intercepting stderr for build output capture\n  process.stderr.write = createInterceptor(chunks)\n\n  try {\n    const result = await fn()\n    return { result, error: null, captured: chunks.join('') }\n  } catch (error) {\n    return { result: null, error: toError(error), captured: chunks.join('') }\n  } finally {\n    // oxlint-disable-next-line functional/immutable-data -- restoring original stdout.write\n    process.stdout.write = originalStdoutWrite\n    // oxlint-disable-next-line functional/immutable-data -- restoring original stderr.write\n    process.stderr.write = originalStderrWrite\n  }\n}\n\n/**\n * Flush accumulated deadlink state into a result entry if present.\n *\n * @private\n * @param results - Accumulated deadlink results so far\n * @param file - Current file being parsed, or null\n * @param links - Links accumulated for the current file\n * @returns Updated results array with the current group appended if non-empty\n */\nfunction flushGroup(\n  results: readonly DeadlinkInfo[],\n  file: string | null,\n  links: readonly string[]\n): readonly DeadlinkInfo[] {\n  if (file && links.length > 0) {\n    return [...results, { file, links }]\n  }\n  return results\n}\n\n/**\n * Parse Rspress's `remarkLink` deadlink output from captured stderr.\n *\n * The format (after ANSI stripping) is:\n * ```\n * Dead links found in /path/to/file.mdx:\n *   \"[..](/invalid-path)\" /resolved/path\n *   \"[..](/another-bad)\" /resolved/path\n * ```\n *\n * @private\n * @param stderr - Raw captured stderr text (may contain ANSI codes)\n * @returns Array of `DeadlinkInfo` grouped by file\n */\nfunction parseDeadlinks(stderr: string): readonly DeadlinkInfo[] {\n  const clean = stripAnsi(stderr)\n  const lines = clean.split('\\n')\n\n  // Rsbuild logger may prefix lines with \"error   \" or other labels + ANSI codes.\n  // Match loosely: any line containing \"Dead links found in <path>:\"\n  // oxlint-disable-next-line prefer-regex-literals -- regex literal is clearer for this pattern\n  const headerPattern = /Dead links found in (.+?):\\s*$/\n  // Match loosely: any line containing \"[..](/some-link)\"\n  // oxlint-disable-next-line prefer-regex-literals -- regex literal is clearer for this pattern\n  const linkPattern = /\"\\[\\.\\.]\\(([^)]+)\\)\"/\n\n  /* oxlint-disable no-accumulating-spread -- small bounded input (deadlink stderr lines); clarity over perf here */\n  const acc = lines.reduce<{\n    readonly results: readonly DeadlinkInfo[]\n    readonly currentFile: string | null\n    readonly currentLinks: readonly string[]\n  }>(\n    (state, line) => {\n      const headerMatch = headerPattern.exec(line)\n      if (headerMatch) {\n        const file = headerMatch[1] ?? ''\n        return {\n          results: flushGroup(state.results, state.currentFile, state.currentLinks),\n          currentFile: file,\n          currentLinks: [],\n        }\n      }\n\n      const linkMatch = linkPattern.exec(line)\n      if (linkMatch && state.currentFile) {\n        const link = linkMatch[1] ?? ''\n        return { ...state, currentLinks: [...state.currentLinks, link] }\n      }\n\n      return state\n    },\n    { results: [], currentFile: null, currentLinks: [] }\n  )\n  /* oxlint-enable no-accumulating-spread */\n\n  return flushGroup(acc.results, acc.currentFile, acc.currentLinks)\n}\n\n/**\n * Format a single deadlink group as a compact multi-line string.\n *\n * Output resembles linting output:\n * ```\n *   ✖ .ciderpress/content/getting-started.md\n *       → /this-does-not-exist\n *       → /another/bad-link\n * ```\n *\n * @private\n * @param info - Deadlink info with file path and broken links\n * @returns Formatted multi-line string for CLI output\n */\nfunction formatDeadlinkGroup(info: DeadlinkInfo): string {\n  const header = `  ${RED}✖${RESET} ${info.file}`\n  const links = info.links.map((link) => `      ${DIM}→${RESET} ${link}`)\n  return [header, ...links].join('\\n')\n}\n","import path from 'node:path'\n\nimport type { Paths } from '@ciderpress/config'\n\nexport type { Paths }\n\n/**\n * Create all derived project paths from a resolved directory.\n *\n * @param dir - Directory path to resolve as the repo root\n * @returns All derived project paths under the `.ciderpress/` output root\n */\nexport function createPaths(dir: string): Paths {\n  const repoRoot = path.resolve(dir)\n  const outputRoot = path.resolve(repoRoot, '.ciderpress')\n  return {\n    repoRoot,\n    outputRoot,\n    contentDir: path.resolve(outputRoot, 'content'),\n    publicDir: path.resolve(outputRoot, 'public'),\n    distDir: path.resolve(outputRoot, 'dist'),\n    cacheDir: path.resolve(outputRoot, 'cache'),\n  }\n}\n","/**\n * Sidebar badge resolution.\n *\n * Walks the resolved entry tree and stamps each entry with an encoded\n * Rspress `tag` string ({@link ResolvedEntry.badgeTag}) built from three\n * sources, in precedence order:\n *\n * 1. the page's own file frontmatter `badge` (read from disk here),\n * 2. inherited/`defaults` `badge` (already merged onto `page.frontmatter`),\n * 3. glob {@link BadgeRule}s matched against the entry's route path.\n *\n * Frontmatter and `defaults` win over glob rules; the first source that\n * yields a badge wins outright (override, not merge).\n *\n * A collapsible group entry that is *also* a doc (has children and a link)\n * shows no badge by default — it would crowd the collapse chevron — and the\n * suppression is uniform: the sidebar `tag`, the route→badges map (which\n * feeds the breadcrumb), and section cards are all withheld together so a\n * group never badges in one place but not another. Enable `groupBadges` to\n * surface them everywhere at once.\n *\n * @see https://rspress.dev/guide/basic/auto-nav-sidebar — sidebar `tag`\n */\n\nimport fs from 'node:fs'\n\nimport { encodeBadges, normalizeBadgeInput, resolveStatusBadges } from '@ciderpress/config'\nimport type { BadgeConfig, BadgeRule, Status } from '@ciderpress/config'\n\nimport { splitFrontmatter } from '../matter.ts'\nimport type { ResolvedEntry } from './types.ts'\n\n/**\n * Inputs to the badge pass: glob rules and the resolved status registry.\n */\nexport interface BadgeContext {\n  /**\n   * Glob badge rules from the top-level `badges` config.\n   */\n  readonly rules: readonly BadgeRule[]\n  /**\n   * The effective status registry (built-in defaults + user overrides).\n   */\n  readonly registry: readonly Status[]\n  /**\n   * Show badges on collapsible group items that are also docs\n   * (`sidebar.groupBadges`) across every surface — the sidebar, the\n   * breadcrumb, and section cards. Defaults to `false` — suppressed\n   * everywhere to avoid crowding the sidebar collapse chevron.\n   */\n  readonly groupBadges: boolean\n}\n\n/**\n * The result of a badge pass: the badged entry tree and a flat\n * route→badges map for page-level rendering (e.g. breadcrumbs).\n */\nexport interface BadgeResult {\n  /**\n   * The entry tree with `badgeTag` stamped where a sidebar badge applies.\n   */\n  readonly tree: readonly ResolvedEntry[]\n  /**\n   * Map of route path → resolved badges, covering every entry whose badges\n   * are surfaced. Collapsible-doc groups appear only when `groupBadges` is\n   * enabled — otherwise their badges are withheld from every surface.\n   */\n  readonly badgeMap: Record<string, readonly BadgeConfig[]>\n}\n\n/**\n * Resolve badges across the tree, stamping sidebar `tag`s and building a\n * route→badges map. Returns a new tree; the input is not mutated.\n *\n * @param entries - Resolved entry tree\n * @param ctx - Glob rules and the resolved status registry\n * @returns The badged tree and the route→badges map\n */\nexport async function applyBadges(\n  entries: readonly ResolvedEntry[],\n  ctx: BadgeContext\n): Promise<BadgeResult> {\n  const results = await Promise.all(entries.map((entry) => applyToEntry(entry, ctx)))\n  return {\n    tree: results.map((r) => r.tree),\n    badgeMap: mergeMaps(results.map((r) => r.badgeMap)),\n  }\n}\n\n/**\n * Resolve badges for a single entry and recurse into its children.\n *\n * @private\n * @param entry - Entry to stamp\n * @param ctx - Glob rules and the resolved status registry\n * @returns The badged entry (with children) and its subtree's badge map\n */\nasync function applyToEntry(\n  entry: ResolvedEntry,\n  ctx: BadgeContext\n): Promise<{\n  readonly tree: ResolvedEntry\n  readonly badgeMap: Record<string, readonly BadgeConfig[]>\n}> {\n  const resolved = await resolveEntryBadges(entry, ctx)\n  const badges = surfaceBadges(entry, resolved, ctx.groupBadges)\n  const children = await resolveChildren(entry.items, ctx)\n  const selfMap = mapField(entry.link, badges)\n  return {\n    tree: {\n      ...entry,\n      ...tagField(encodeBadges(badges)),\n      ...itemsField(children.tree),\n    },\n    badgeMap: { ...selfMap, ...children.badgeMap },\n  }\n}\n\n/**\n * Withhold a collapsible-doc group's badges unless `groupBadges` is on.\n *\n * Returning an empty list here suppresses the badge on every surface at\n * once: `encodeBadges([])` yields no sidebar `tag`, and {@link mapField}\n * omits the route from the badge map so the breadcrumb and section cards\n * stay bare too. Any non-group entry keeps its badges unchanged.\n *\n * @private\n * @param entry - Entry being stamped\n * @param badges - Resolved badges for the entry\n * @param groupBadges - When true, keep badges on collapsible-doc groups\n * @returns The badges to surface (empty when suppressed)\n */\nfunction surfaceBadges(\n  entry: ResolvedEntry,\n  badges: readonly BadgeConfig[],\n  groupBadges: boolean\n): readonly BadgeConfig[] {\n  if (!groupBadges && isCollapsibleDoc(entry)) {\n    return []\n  }\n  return badges\n}\n\n/**\n * Whether an entry is a collapsible group that is also a doc — i.e. it has\n * children (renders a collapse toggle) and a link (the toggle row is also\n * a page).\n *\n * @private\n * @param entry - Entry to test\n * @returns True when the entry is a collapsible doc\n */\nfunction isCollapsibleDoc(entry: ResolvedEntry): boolean {\n  const hasChildren = entry.items !== undefined && entry.items.length > 0\n  return hasChildren && entry.link !== undefined\n}\n\n/**\n * Recurse into an entry's children when present.\n *\n * @private\n * @param items - Child entries, if any\n * @param ctx - Glob rules and the resolved status registry\n * @returns Badged children (or undefined) and their merged badge map\n */\nasync function resolveChildren(\n  items: readonly ResolvedEntry[] | undefined,\n  ctx: BadgeContext\n): Promise<{\n  readonly tree: readonly ResolvedEntry[] | undefined\n  readonly badgeMap: Record<string, readonly BadgeConfig[]>\n}> {\n  if (items === undefined) {\n    return { tree: undefined, badgeMap: {} }\n  }\n  const result = await applyBadges(items, ctx)\n  return { tree: result.tree, badgeMap: result.badgeMap }\n}\n\n/**\n * Merge a list of badge maps into one.\n *\n * @private\n * @param maps - Badge maps to merge\n * @returns A single merged map\n */\nfunction mergeMaps(\n  maps: readonly Record<string, readonly BadgeConfig[]>[]\n): Record<string, readonly BadgeConfig[]> {\n  return Object.assign({}, ...maps)\n}\n\n/**\n * Build a single-entry badge map for an entry, omitted when it has no link\n * or no badges.\n *\n * @private\n * @param link - Entry route path, if any\n * @param badges - Resolved badges for the entry\n * @returns `{ [link]: badges }` or an empty object\n */\nfunction mapField(\n  link: string | undefined,\n  badges: readonly BadgeConfig[]\n): Record<string, readonly BadgeConfig[]> {\n  if (link === undefined || badges.length === 0) {\n    return {}\n  }\n  return { [link]: badges }\n}\n\n/**\n * Resolve the effective badges for an entry by precedence. Each source\n * contributes both its ad-hoc `badge` and its named `status`; the first\n * source that yields any badge wins (file → defaults → glob).\n *\n * @private\n * @param entry - Entry to resolve badges for\n * @param ctx - Glob rules and the resolved status registry\n * @returns Normalized badges (empty when none apply)\n */\nasync function resolveEntryBadges(\n  entry: ResolvedEntry,\n  ctx: BadgeContext\n): Promise<readonly BadgeConfig[]> {\n  const fromFile = await readFileBadges(entry, ctx.registry)\n  if (fromFile.length > 0) {\n    return fromFile\n  }\n  const fromDefaults = collectSource(\n    readFrontmatterField(entry, 'badge'),\n    readFrontmatterField(entry, 'status'),\n    ctx.registry\n  )\n  if (fromDefaults.length > 0) {\n    return fromDefaults\n  }\n  return matchRuleBadges(entry.link, ctx)\n}\n\n/**\n * Combine a source's ad-hoc `badge` input and named `status` reference(s)\n * into a flat list of badge chips.\n *\n * @private\n * @param badgeInput - Raw `badge` value from the source\n * @param statusInput - Raw `status` reference from the source\n * @param registry - The resolved status registry\n * @returns Badges from the status refs followed by the ad-hoc badges\n */\nfunction collectSource(\n  badgeInput: unknown,\n  statusInput: unknown,\n  registry: readonly Status[]\n): readonly BadgeConfig[] {\n  return [...resolveStatusBadges(statusInput, registry), ...normalizeBadgeInput(badgeInput)]\n}\n\n/**\n * Read the `badge`/`status` fields from an entry's source file frontmatter\n * (the file's own YAML wins over config `defaults`).\n *\n * @private\n * @param entry - Entry whose source file to read\n * @param registry - The resolved status registry\n * @returns Badges from file frontmatter (empty when absent)\n */\nasync function readFileBadges(\n  entry: ResolvedEntry,\n  registry: readonly Status[]\n): Promise<readonly BadgeConfig[]> {\n  const source = readSource(entry)\n  if (source === null) {\n    return []\n  }\n  const [readErr, raw] = await readFileSafe(source)\n  if (readErr) {\n    return []\n  }\n  const [parseErr, file] = splitFrontmatter(raw)\n  if (parseErr) {\n    return []\n  }\n  return collectSource(file.data.badge, file.data.status, registry)\n}\n\n/**\n * Match an entry's route path against glob rules, returning the first\n * matching rule's badges (its `badge` and `status`).\n *\n * @private\n * @param link - Entry route path (e.g. `/api/foo`)\n * @param ctx - Glob rules and the resolved status registry\n * @returns Badges from the first matching rule (empty when none)\n */\nfunction matchRuleBadges(link: string | undefined, ctx: BadgeContext): readonly BadgeConfig[] {\n  if (link === undefined) {\n    return []\n  }\n  const rule = ctx.rules.find((r) => patternsOf(r.match).some((p) => matchesRoute(link, p)))\n  if (rule === undefined) {\n    return []\n  }\n  return collectSource(rule.badge, rule.status, ctx.registry)\n}\n\n/**\n * Test a route path against a single glob pattern.\n *\n * Supported syntax: `*` (any run of non-slash chars), `**` (any run,\n * including slashes), and `?` (a single non-slash char). Patterns are\n * anchored to the full path.\n *\n * @private\n * @param link - Route path to test\n * @param pattern - Glob pattern\n * @returns True when the path matches the pattern\n */\nfunction matchesRoute(link: string, pattern: string): boolean {\n  return globToRegExp(pattern).test(link)\n}\n\n/**\n * Compile a glob pattern into an anchored regular expression.\n *\n * @private\n * @param pattern - Glob pattern\n * @returns Anchored `RegExp` for the pattern\n */\nfunction globToRegExp(pattern: string): RegExp {\n  const escaped = pattern.replaceAll(/[.+^${}()|[\\]\\\\]/g, String.raw`\\$&`)\n  const body = escaped\n    .replaceAll('**', '\u0000')\n    .replaceAll('*', '[^/]*')\n    .replaceAll('\u0000', '.*')\n    .replaceAll('?', '[^/]')\n  // oxlint-disable-next-line security/detect-non-literal-regexp -- pattern is compiled from trusted config-authored globs, not user input\n  return new RegExp(`^${body}$`)\n}\n\n/**\n * Read a field from an entry's merged page frontmatter (config `defaults`).\n *\n * @private\n * @param entry - Entry to inspect\n * @param field - Frontmatter field to read (`'badge'` or `'status'`)\n * @returns The raw field value, or `undefined`\n */\nfunction readFrontmatterField(entry: ResolvedEntry, field: 'badge' | 'status'): unknown {\n  const { page } = entry\n  if (page === undefined) {\n    return undefined\n  }\n  return page.frontmatter[field]\n}\n\n/**\n * Get an entry's source file path, if it is backed by one.\n *\n * @private\n * @param entry - Entry to inspect\n * @returns Absolute source path, or `null` for virtual/grouping entries\n */\nfunction readSource(entry: ResolvedEntry): string | null {\n  const { page } = entry\n  if (page === undefined) {\n    return null\n  }\n  const { source } = page\n  if (source === undefined) {\n    return null\n  }\n  return source\n}\n\n/**\n * Normalize a rule's `match` into an array of patterns.\n *\n * @private\n * @param match - Single pattern or array of patterns\n * @returns Array of patterns\n */\nfunction patternsOf(match: string | readonly string[]): readonly string[] {\n  if (typeof match === 'string') {\n    return [match]\n  }\n  return match\n}\n\n/**\n * Build the optional `badgeTag` field, omitted when there is no tag.\n *\n * @private\n * @param badgeTag - Encoded tag or `undefined`\n * @returns `{ badgeTag }` or an empty object\n */\nfunction tagField(badgeTag: string | undefined): { readonly badgeTag?: string } {\n  if (badgeTag === undefined) {\n    return {}\n  }\n  return { badgeTag }\n}\n\n/**\n * Build the optional `items` field, omitted for leaf entries.\n *\n * @private\n * @param items - Child entries or `undefined`\n * @returns `{ items }` or an empty object\n */\nfunction itemsField(items: readonly ResolvedEntry[] | undefined): {\n  items?: readonly ResolvedEntry[]\n} {\n  if (items === undefined) {\n    return {}\n  }\n  return { items }\n}\n\n/**\n * Read a file's contents, returning a Result tuple instead of throwing.\n *\n * @private\n * @param source - Absolute file path\n * @returns `[error, null]` on failure, `[null, contents]` on success\n */\nasync function readFileSafe(\n  source: string\n): Promise<readonly [Error, null] | readonly [null, string]> {\n  try {\n    const contents = await fs.promises.readFile(source, 'utf8')\n    return [null, contents]\n  } catch (error) {\n    if (error instanceof Error) {\n      return [error, null]\n    }\n    return [new Error(String(error)), null]\n  }\n}\n","import { createHash } from 'node:crypto'\nimport fs from 'node:fs/promises'\nimport path from 'node:path'\n\n/**\n * Image file extensions recognized during sync.\n */\nconst IMAGE_EXTENSIONS = new Set([\n  '.png',\n  '.jpg',\n  '.jpeg',\n  '.gif',\n  '.svg',\n  '.webp',\n  '.avif',\n  '.ico',\n])\n\n/**\n * Regex matching fenced code blocks (to protect them from rewriting).\n */\nconst CODE_BLOCK_RE = /```[\\s\\S]*?```/g\n\n/**\n * Placeholder prefix for protected code blocks.\n */\nconst PLACEHOLDER_PREFIX = '<!--CIDERPRESS_IMG_CB_'\n\n/**\n * Placeholder suffix for protected code blocks.\n */\nconst PLACEHOLDER_SUFFIX = '-->'\n\n/**\n * Regex to restore code block placeholders.\n */\nconst PLACEHOLDER_RE = /<!--CIDERPRESS_IMG_CB_(\\d+)-->/g\n\n/**\n * Regex matching markdown image syntax: `![alt](path)` or `![alt](path \"title\")`.\n */\n// oxlint-disable-next-line security/detect-unsafe-regex -- pattern is bounded by non-overlapping character classes; no ReDoS risk\nconst IMAGE_RE = /!\\[[^\\]]*\\]\\(([^)\\s]+)(?:\\s+\"[^\"]*\")?\\)/g\n\n/**\n * Regex matching HTML/JSX image `src` attributes: `src=\"path\"` or `src='path'`.\n */\nconst IMG_SRC_RE = /<img\\s[^>]*?src=[\"']([^\"']+)[\"'][^>]*?\\/?>/g\n\n/**\n * Rewrite relative image references in markdown content.\n *\n * Scans for markdown image syntax (`![alt](path)`) and HTML/JSX image tags\n * (`<img src=\"path\" />`), resolves relative paths against the source file\n * location, copies image files into the content public directory, and rewrites\n * paths to absolute `/images/filename.ext` URLs that Rspress can serve.\n *\n * Absolute paths, external URLs, and non-image extensions are left unchanged.\n * Code blocks are protected from rewriting.\n *\n * @param params - Content, source path, repo root, and output directory\n * @returns Rewritten content with absolute image paths\n */\nexport async function rewriteImages(params: {\n  readonly content: string\n  readonly sourcePath: string\n  readonly repoRoot: string\n  readonly outDir: string\n}): Promise<string> {\n  const sourceDir = path.dirname(path.resolve(params.repoRoot, params.sourcePath))\n  const imagesOutDir = path.resolve(params.outDir, 'public', 'images')\n\n  // Protect code blocks during link/image rewriting.\n  // intentional mutation: collect code blocks during regex replacement\n  const codeBlocks: string[] = []\n  const withoutCode = params.content.replace(CODE_BLOCK_RE, (block) => {\n    const idx = codeBlocks.length\n    codeBlocks.push(block)\n    return `${PLACEHOLDER_PREFIX}${idx}${PLACEHOLDER_SUFFIX}`\n  })\n\n  const mdMatches = [...withoutCode.matchAll(IMAGE_RE)]\n  const htmlMatches = [...withoutCode.matchAll(IMG_SRC_RE)]\n  const allImagePaths = [...mdMatches.map((m) => m[1]), ...htmlMatches.map((m) => m[1])]\n\n  const uniqueImagePaths = allImagePaths.filter(\n    (imagePath, index, arr) =>\n      !isAbsoluteOrExternal(imagePath) &&\n      IMAGE_EXTENSIONS.has(path.extname(imagePath).toLowerCase()) &&\n      arr.indexOf(imagePath) === index\n  )\n\n  if (uniqueImagePaths.length > 0) {\n    await fs.mkdir(imagesOutDir, { recursive: true })\n  }\n\n  const entries = await Promise.all(\n    uniqueImagePaths.map(async (imagePath): Promise<readonly [string, string] | null> => {\n      const ext = path.extname(imagePath).toLowerCase()\n      const absoluteImagePath = path.resolve(sourceDir, imagePath)\n      const exists = await fs.stat(absoluteImagePath).catch(() => null)\n      if (!exists) {\n        return null\n      }\n\n      const baseName = path.basename(imagePath, path.extname(imagePath))\n      const hash = createHash('md5').update(imagePath).digest('hex').slice(0, 8)\n      const filename = `${baseName}-${hash}${ext}`\n      const destPath = path.resolve(imagesOutDir, filename)\n\n      const destStat = await fs.stat(destPath).catch(() => null)\n      if (destStat && destStat.mtimeMs >= exists.mtimeMs) {\n        return [imagePath, `/images/${filename}`] as const\n      }\n\n      // oxlint-disable-next-line security/detect-non-literal-fs-filename -- paths are constructed from trusted repo root + user source paths\n      await fs.copyFile(absoluteImagePath, destPath)\n\n      return [imagePath, `/images/${filename}`] as const\n    })\n  )\n\n  const imageMap = new Map(\n    entries.filter((entry): entry is readonly [string, string] => entry !== null)\n  )\n\n  const mdRewritten = withoutCode.replace(IMAGE_RE, (fullMatch, url: string) => {\n    const replacement = imageMap.get(url)\n    if (replacement === undefined) {\n      return fullMatch\n    }\n    return fullMatch.replace(url, replacement)\n  })\n\n  const rewritten = mdRewritten.replace(IMG_SRC_RE, (fullMatch, url: string) => {\n    const replacement = imageMap.get(url)\n    if (replacement === undefined) {\n      return fullMatch\n    }\n    return fullMatch.replace(url, replacement)\n  })\n\n  return rewritten.replace(PLACEHOLDER_RE, (_, idx) => codeBlocks[Number(idx)])\n}\n\n/**\n * Check whether a URL is absolute or external (should not be rewritten).\n *\n * @private\n * @param url - URL string to check\n * @returns True if the URL is absolute, protocol-based, or a data URI\n */\nfunction isAbsoluteOrExternal(url: string): boolean {\n  return (\n    url.startsWith('/') ||\n    url.startsWith('#') ||\n    url.startsWith('http://') ||\n    url.startsWith('https://') ||\n    url.startsWith('data:')\n  )\n}\n","import path from 'node:path'\n\nimport { match } from 'massaman/match'\n\nimport type { PageData } from './types.ts'\n\n/**\n * Placeholder prefix used to protect code blocks from link rewriting.\n */\nconst PLACEHOLDER_PREFIX = '<!--CIDERPRESS_CODE_BLOCK_'\n\n/**\n * Placeholder suffix for code block markers.\n */\nconst PLACEHOLDER_SUFFIX = '-->'\n\n/**\n * Regex matching fenced code blocks.\n */\nconst CODE_BLOCK_RE = /```[\\s\\S]*?```/g\n\n/**\n * Regex matching markdown links: `[text](url)` or `[text](url \"title\")`.\n * Uses a negative lookbehind to exclude image links (prefixed with `!`).\n */\n// oxlint-disable-next-line security/detect-unsafe-regex -- pattern is bounded by non-overlapping character classes; no ReDoS risk\nconst LINK_RE = /(?<!!)\\[[^\\]]*\\]\\(([^)\\s]+)(?:\\s+\"[^\"]*\")?\\)/g\n\n/**\n * Regex to restore code block placeholders.\n */\nconst PLACEHOLDER_RE = /<!--CIDERPRESS_CODE_BLOCK_(\\d+)-->/g\n\n/**\n * Mapping from repo-relative source path to content-relative output path.\n */\nexport type SourceMap = ReadonlyMap<string, string>\n\n/**\n * Build a mapping from repo-relative source paths to content-relative output paths.\n *\n * Used by the link rewriter to resolve relative links in source markdown files\n * to their correct output locations.\n *\n * @param params - Pages and repo root for computing relative paths\n * @returns Immutable map of source path to output path\n */\nexport function buildSourceMap(params: {\n  readonly pages: readonly PageData[]\n  readonly repoRoot: string\n}): SourceMap {\n  return new Map(\n    params.pages.flatMap((page): readonly [string, string][] => {\n      if (page.source === null || page.source === undefined) {\n        return []\n      }\n      const relSource = path.relative(params.repoRoot, page.source)\n      return [[relSource, page.outputPath]]\n    })\n  )\n}\n\n/**\n * Rewrite relative markdown links in content to match the output directory structure.\n *\n * Scans markdown for relative links to `.md`/`.mdx` files, resolves them against\n * the source file's location, looks up the target in the source map, and rewrites\n * the link to point to the correct output location.\n *\n * Links that cannot be mapped (external, absolute, anchor-only, or not in the\n * source map) are left unchanged.\n *\n * @param params - Content, source/output paths, and the source-to-output map\n * @returns Content with rewritten links\n */\nexport function rewriteLinks(params: {\n  readonly content: string\n  readonly sourcePath: string\n  readonly outputPath: string\n  readonly sourceMap: SourceMap\n}): string {\n  const codeBlocks: string[] = []\n  const withoutCode = params.content.replace(CODE_BLOCK_RE, (block) => {\n    const idx = codeBlocks.length\n    codeBlocks.push(block)\n    return `${PLACEHOLDER_PREFIX}${idx}${PLACEHOLDER_SUFFIX}`\n  })\n\n  const sourceDir = path.dirname(params.sourcePath)\n  const outputDir = path.dirname(params.outputPath)\n\n  const rewritten = withoutCode.replace(LINK_RE, (fullMatch, url: string) => {\n    const resolved = resolveLink({ url, sourceDir, outputDir, sourceMap: params.sourceMap })\n    if (resolved === null) {\n      return fullMatch\n    }\n    return fullMatch.replace(url, resolved)\n  })\n\n  return rewritten.replace(PLACEHOLDER_RE, (_, idx) => codeBlocks[Number(idx)])\n}\n\n/**\n * Attempt to resolve a single link URL to its correct output-relative path.\n *\n * @private\n * @param params - Link resolution parameters\n * @param params.url - The URL to resolve\n * @param params.sourceDir - Directory of the source file\n * @param params.outputDir - Directory of the output file\n * @param params.sourceMap - Source-to-output path mapping\n * @returns The rewritten URL string, or null if the link should be left unchanged\n */\nfunction resolveLink(params: {\n  readonly url: string\n  readonly sourceDir: string\n  readonly outputDir: string\n  readonly sourceMap: SourceMap\n}): string | null {\n  if (isNonRewritableUrl(params.url)) {\n    return null\n  }\n\n  const { linkPath, fragment } = splitFragment(params.url)\n\n  if (!linkPath.endsWith('.md') && !linkPath.endsWith('.mdx')) {\n    return null\n  }\n\n  const resolvedSource = path.normalize(path.join(params.sourceDir, linkPath))\n\n  const targetOutput = params.sourceMap.get(resolvedSource)\n  if (targetOutput === undefined) {\n    return null\n  }\n\n  const relativePath = path.relative(params.outputDir, targetOutput)\n\n  const normalized = relativePath.split(path.sep).join('/')\n\n  return `${normalized}${fragment}`\n}\n\n/**\n * Check whether a URL should be skipped by the link rewriter.\n *\n * @private\n * @param url - URL string to check\n * @returns True if the URL is absolute, protocol-based, or anchor-only\n */\nfunction isNonRewritableUrl(url: string): boolean {\n  return (\n    url.startsWith('/') ||\n    url.startsWith('#') ||\n    url.startsWith('http://') ||\n    url.startsWith('https://') ||\n    url.startsWith('mailto:')\n  )\n}\n\n/**\n * Split a URL into its path and fragment components.\n *\n * @private\n * @param url - URL string to split\n * @returns Object with linkPath and fragment (empty string if no fragment)\n */\nfunction splitFragment(url: string): { readonly linkPath: string; readonly fragment: string } {\n  const hashIdx = url.indexOf('#')\n  return match(hashIdx !== -1)\n    .with(true, () => ({\n      linkPath: url.slice(0, hashIdx),\n      fragment: url.slice(hashIdx),\n    }))\n    .otherwise(() => ({\n      linkPath: url,\n      fragment: '',\n    }))\n}\n","import { createHash } from 'node:crypto'\nimport fs from 'node:fs/promises'\nimport path from 'node:path'\n\nimport type { Frontmatter } from '@ciderpress/config'\nimport { log } from '@clack/prompts'\nimport { match } from 'massaman/match'\nimport { isEmpty, isNil, isNotNil } from 'massaman/predicate'\n\nimport { parse as parseFrontmatter, stringify as stringifyFrontmatter } from './frontmatter.ts'\nimport { rewriteImages } from './images.ts'\nimport { rewriteLinks } from './rewrite-links.ts'\nimport type { ManifestEntry, PageData, SyncContext } from './types.ts'\n\n/**\n * Copy/generate a single page into `.content/`.\n *\n * Reads from `page.source` (file-backed) or evaluates `page.content`\n * (virtual), injects frontmatter, computes a content hash, and writes\n * the output file. Skips the write when the hash matches the previous manifest.\n *\n * @param page - Page data with source path or inline content\n * @param ctx - Sync context (provides output dir, repo root, previous manifest)\n * @returns Manifest entry with content hash for incremental tracking\n */\nexport async function copyPage(page: PageData, ctx: SyncContext): Promise<ManifestEntry> {\n  const outPath = path.resolve(ctx.outDir, page.outputPath)\n  await fs.mkdir(path.dirname(outPath), { recursive: true })\n\n  const cached = await tryMtimeSkip(page, ctx)\n  if (cached !== null) {\n    // Verify the output file still exists on disk — the manifest may survive\n    // even if .ciderpress/content/ was partially deleted.\n    const outputExists = await fs.stat(outPath).catch(() => null)\n    if (outputExists !== null) {\n      return cached\n    }\n  }\n\n  const content: string = await (async () => {\n    if (page.source) {\n      const raw = await fs.readFile(page.source, 'utf8')\n      const rewritten = rewriteSourceLinks(raw, page, ctx)\n      const withImages = await rewriteSourceImages(rewritten, page, ctx)\n      return injectFrontmatter(withImages, page.frontmatter)\n    }\n    if (page.content) {\n      const body = match(typeof page.content)\n        .with('function', async () => await (page.content as () => Promise<string>)())\n        .otherwise(() => page.content as string)\n      return injectFrontmatter(await body, page.frontmatter)\n    }\n    log.error(`[ciderpress] Page \"${page.outputPath}\" has neither source nor content`)\n    return ''\n  })()\n\n  // Only warn for user-authored source files, not generated pages\n  if (page.source) {\n    warnMdxExports(content, page.outputPath)\n  }\n\n  const contentHash = createHash('sha256').update(content).digest('hex')\n\n  const relativeSource = (() => {\n    if (isNotNil(page.source)) {\n      return path.relative(ctx.repoRoot, page.source)\n    }\n  })()\n\n  const prev = (() => {\n    if (isNotNil(ctx.previousManifest)) {\n      return ctx.previousManifest.files[page.outputPath]\n    }\n  })()\n\n  async function resolveSourceMtime(): Promise<number | undefined> {\n    if (isNotNil(page.source)) {\n      const stat = await fs.stat(page.source)\n      return stat.mtimeMs\n    }\n  }\n\n  const fmHash = hashFrontmatter(page.frontmatter)\n\n  if (prev && prev.contentHash === contentHash) {\n    return {\n      source: relativeSource,\n      sourceMtime: await resolveSourceMtime(),\n      contentHash,\n      outputPath: page.outputPath,\n      frontmatterHash: fmHash,\n    }\n  }\n\n  await fs.writeFile(outPath, content, 'utf8')\n\n  return {\n    source: relativeSource,\n    sourceMtime: await resolveSourceMtime(),\n    contentHash,\n    outputPath: page.outputPath,\n    frontmatterHash: fmHash,\n  }\n}\n\n/**\n * Compute an MD5 hash of serialized frontmatter for change detection.\n *\n * @private\n * @param fm - Frontmatter key-value pairs\n * @returns Hex MD5 digest of the JSON-serialized frontmatter\n */\nfunction hashFrontmatter(fm: Frontmatter): string {\n  return createHash('md5').update(JSON.stringify(fm)).digest('hex')\n}\n\n/**\n * Attempt to skip the full copy pipeline by comparing source mtime and frontmatter hash.\n *\n * Returns the previous manifest entry when all conditions hold:\n * - `ctx.skipMtimeOptimization` is not true\n * - Page has a source file (not virtual)\n * - Previous manifest has a matching entry with the same `sourceMtime`\n * - Page frontmatter hash matches stored `frontmatterHash`\n *\n * @private\n * @param page - Page data to check\n * @param ctx - Sync context with previous manifest\n * @returns Previous manifest entry if skippable, null otherwise\n */\nasync function tryMtimeSkip(page: PageData, ctx: SyncContext): Promise<ManifestEntry | null> {\n  if (ctx.skipMtimeOptimization === true) {\n    return null\n  }\n  if (isNil(page.source)) {\n    return null\n  }\n  if (isNil(ctx.previousManifest)) {\n    return null\n  }\n  const prev = ctx.previousManifest.files[page.outputPath]\n  if (isNil(prev)) {\n    return null\n  }\n  if (isNil(prev.sourceMtime)) {\n    return null\n  }\n  const stat = await fs.stat(page.source).catch(() => null)\n  if (stat === null) {\n    return null\n  }\n  if (stat.mtimeMs !== prev.sourceMtime) {\n    return null\n  }\n  const fmHash = hashFrontmatter(page.frontmatter)\n  if (isNil(prev.frontmatterHash)) {\n    return null\n  }\n  if (fmHash !== prev.frontmatterHash) {\n    return null\n  }\n  return prev\n}\n\n/**\n * Rewrite relative markdown links in source content when a source map is available.\n * No-op when the context has no source map (e.g. during resolve-only passes).\n *\n * @private\n * @param raw - Raw markdown content\n * @param page - Page data with source path information\n * @param ctx - Sync context with optional source map\n * @returns Content with rewritten links, or original content if no source map\n */\nfunction rewriteSourceLinks(raw: string, page: PageData, ctx: SyncContext): string {\n  if (isNil(ctx.sourceMap)) {\n    return raw\n  }\n  if (isNil(page.source)) {\n    return raw\n  }\n  const sourcePath = path.relative(ctx.repoRoot, page.source)\n  return rewriteLinks({\n    content: raw,\n    sourcePath,\n    outputPath: page.outputPath,\n    sourceMap: ctx.sourceMap,\n  })\n}\n\n/**\n * Rewrite relative image references in source content, copying image files\n * to the content public directory. No-op for virtual pages (no source file).\n *\n * @private\n * @param content - Markdown content (after link rewriting)\n * @param page - Page data with source path information\n * @param ctx - Sync context with repo root and output directory\n * @returns Content with rewritten image paths\n */\nfunction rewriteSourceImages(content: string, page: PageData, ctx: SyncContext): Promise<string> {\n  if (isNil(page.source)) {\n    return Promise.resolve(content)\n  }\n  const sourcePath = path.relative(ctx.repoRoot, page.source)\n  return rewriteImages({\n    content,\n    sourcePath,\n    repoRoot: ctx.repoRoot,\n    outDir: ctx.outDir,\n  })\n}\n\n/**\n * Regex matching ESM export declarations that `remarkSplitMdx` strips during SSG-MD.\n *\n * @private\n */\nconst MDX_EXPORT_PATTERN = /^export\\s+(const|let|var|function|default)\\s/\n\n/**\n * Warn when an `.mdx` file contains top-level ESM exports outside fenced code blocks.\n *\n * Rspress's `remarkSplitMdx` strips all `mdxjsEsm` nodes during the SSG-MD pass,\n * so any `export const` referenced by JSX will cause a `ReferenceError` at build time.\n * This check catches those issues early during sync.\n *\n * @private\n * @param content - Full page content string\n * @param outputPath - Output path used for the warning message\n */\nfunction warnMdxExports(content: string, outputPath: string): void {\n  if (!outputPath.endsWith('.mdx')) {\n    return\n  }\n\n  const lines = content.split('\\n')\n  const exportLines = lines.reduce<readonly number[]>((acc, line, index) => {\n    if (MDX_EXPORT_PATTERN.test(line)) {\n      return [...acc, index + 1]\n    }\n    return acc\n  }, [])\n\n  if (exportLines.length === 0) {\n    return\n  }\n\n  const fenceRanges = lines.reduce<readonly (readonly [number, number])[]>((acc, line, index) => {\n    const isFence = line.trimStart().startsWith('```')\n    const lastRange = acc.at(-1)\n    if (isFence && lastRange && lastRange[1] === -1) {\n      return [...acc.slice(0, -1), [lastRange[0], index + 1] as const]\n    }\n    if (isFence) {\n      return [...acc, [index + 1, -1] as const]\n    }\n    return acc\n  }, [])\n\n  const outsideFence = exportLines.filter(\n    (lineNum) =>\n      !fenceRanges.some(([start, end]) => lineNum >= start && (end === -1 || lineNum <= end))\n  )\n\n  if (outsideFence.length > 0) {\n    log.warn(\n      `[ciderpress] ${outputPath}: found ESM export(s) on line(s) ${outsideFence.join(', ')}. ` +\n        'ESM exports are stripped during SSG-MD rendering and will cause ReferenceErrors ' +\n        'if referenced by JSX. Use inline values instead.'\n    )\n  }\n}\n\n/**\n * Merge frontmatter into markdown.\n * Config-level frontmatter acts as defaults; source file frontmatter wins.\n *\n * @private\n * @param raw - Raw markdown content (may include existing frontmatter)\n * @param fm - Frontmatter key-value pairs to inject as defaults\n * @returns Markdown string with merged frontmatter\n */\nfunction injectFrontmatter(raw: string, fm: Frontmatter): string {\n  if (isEmpty(fm)) {\n    return raw\n  }\n\n  const parsed = parseFrontmatter(raw)\n  const merged = { ...fm, ...parsed.data }\n  return stringifyFrontmatter(parsed.content, merged)\n}\n","import fs from 'node:fs/promises'\n\nimport type { Page } from '@ciderpress/config'\nimport { match, P } from 'massaman/match'\nimport { capitalize, words } from 'massaman/string'\n\nimport { parse as parseFrontmatter } from '../frontmatter.ts'\n\n/**\n * Derive display text for a page.\n *\n * - `'auto'` (default) — frontmatter > heading > filename fallback chain\n * - `'filename'` — kebab-to-title from the slug\n * - `'heading'` — first `# heading` in the file, falls back to filename\n * - `'frontmatter'` — `title` from YAML frontmatter only, falls back to heading\n *\n * @param sourcePath - Absolute path to the source markdown file\n * @param slug - Filename slug (without extension)\n * @param mode - Text derivation strategy\n * @returns Derived display text for sidebar/nav\n */\nexport function deriveText(\n  sourcePath: string,\n  slug: string,\n  mode: 'auto' | 'filename' | 'heading' | 'frontmatter'\n): Promise<string> {\n  return match(mode)\n    .with('auto', () => deriveFromFrontmatter(sourcePath, slug))\n    .with('frontmatter', () => deriveFromFrontmatter(sourcePath, slug))\n    .with('heading', () => deriveFromHeading(sourcePath, slug))\n    .with('filename', () => Promise.resolve(kebabToTitle(slug)))\n    .exhaustive()\n}\n\n/**\n * Resolve a display title for a page node.\n *\n * When `title` is a string, returns it directly.\n * When `title` is a TitleConfig object (e.g. `{ from: 'heading' }`),\n * derives a human-readable name from the path's last segment.\n * Falls back to `'Section'` only when no path is available.\n *\n * @param section - Page with title and optional path\n * @returns Display title string\n */\nexport function resolveSectionTitle(section: Page): string {\n  return match(section.title)\n    .with(P.string, (t) => t)\n    .otherwise(() => {\n      const prefix = section.path\n      const lastSegment = match(prefix)\n        .with(P.string, (p) => p.split('/').findLast(Boolean))\n        .otherwise(() => '')\n      return match(lastSegment)\n        .with(P.string, kebabToTitle)\n        .otherwise(() => 'Section')\n    })\n}\n\n/**\n * Convert a kebab-case slug to title case.\n *\n * @param slug - Kebab-case string (e.g. `\"add-api-route\"`)\n * @returns Title-cased string (e.g. `\"Add Api Route\"`)\n */\nexport function kebabToTitle(slug: string): string {\n  return words(slug).map(capitalize).join(' ')\n}\n\n/**\n * Derive text from YAML frontmatter `title` field, falling back to first heading,\n * then to filename. Reads the file once and reuses the content for heading extraction.\n *\n * @private\n * @param sourcePath - Absolute path to the markdown file\n * @param fallbackSlug - Slug to use when no title or heading is found\n * @returns Derived display text\n */\nasync function deriveFromFrontmatter(sourcePath: string, fallbackSlug: string): Promise<string> {\n  const content = await fs.readFile(sourcePath, 'utf8')\n  const parsed = parseFrontmatter(content)\n\n  return match(parsed.data.title)\n    .with(P.string.minLength(1), (title) => title)\n    .otherwise(() => extractHeading(parsed.content, fallbackSlug))\n}\n\n/**\n * Derive text from the first `# heading` in the file.\n * Falls back to kebab-to-title of the slug when no heading is found.\n *\n * @private\n * @param sourcePath - Absolute path to the markdown file\n * @param fallbackSlug - Slug to use when no heading is found\n * @returns Heading text or title-cased slug\n */\nasync function deriveFromHeading(sourcePath: string, fallbackSlug: string): Promise<string> {\n  const content = await fs.readFile(sourcePath, 'utf8')\n  const { content: body } = parseFrontmatter(content)\n  return extractHeading(body, fallbackSlug)\n}\n\n/**\n * Extract the first `# heading` from markdown body content.\n * Falls back to kebab-to-title of the slug when no heading is found.\n *\n * @private\n * @param body - Markdown content with frontmatter already stripped\n * @param fallbackSlug - Slug to use when no heading is found\n * @returns Heading text or title-cased slug\n */\nfunction extractHeading(body: string, fallbackSlug: string): string {\n  const heading = body.match(/^#\\s+(.+)$/m)\n  return match(heading)\n    .with(P.nonNullable, (h) => h[1].trim())\n    .otherwise(() => kebabToTitle(fallbackSlug))\n}\n","import fs from 'node:fs/promises'\nimport path from 'node:path'\n\nimport { hasGlobChars, resolveOptionalIcon, serializeIcon } from '@ciderpress/config'\nimport type { Feature, Page, SerializedIcon, Workspace, CiderpressConfig } from '@ciderpress/config'\nimport { match, P } from 'massaman/match'\nimport { isNotNil, isString } from 'massaman/predicate'\n\nimport { parse as parseFrontmatter, stringify as stringifyFrontmatter } from './frontmatter.ts'\nimport { resolveSectionTitle } from './resolve/text.ts'\n\n/**\n * Serializable workspace card data for a single item.\n */\nexport interface HomeWorkspaceCardData {\n  readonly title: string\n  readonly href: string\n  readonly icon: SerializedIcon | undefined\n  readonly scope: string | undefined\n  readonly description: string | undefined\n  readonly tags: readonly string[]\n  readonly badge: { readonly src: string; readonly alt: string } | undefined\n}\n\n/**\n * A group of workspace cards (apps, packages, or custom).\n */\nexport interface HomeWorkspaceGroupData {\n  readonly type: 'apps' | 'packages' | 'workspaces'\n  readonly heading: string\n  readonly description: string\n  readonly cards: readonly HomeWorkspaceCardData[]\n}\n\n/**\n * All workspace groups for the home page.\n */\nexport type HomeWorkspaceData = readonly HomeWorkspaceGroupData[]\n\n/**\n * Result of generating the default home page.\n * Contains the markdown content and workspace data.\n */\nexport interface HomePageResult {\n  readonly content: string\n  readonly workspaces: HomeWorkspaceData\n}\n\n/**\n * Sensible fallback descriptions for common section names.\n * Used when no frontmatter description is available.\n */\nconst DEFAULT_SECTION_DESCRIPTIONS: Readonly<Record<string, string>> = {\n  guides: 'Step-by-step walkthroughs covering setup, workflows, and common tasks.',\n  guide: 'Step-by-step walkthroughs covering setup, workflows, and common tasks.',\n  standards: 'Code style, naming conventions, and engineering best practices for the team.',\n  standard: 'Code style, naming conventions, and engineering best practices for the team.',\n  security: 'Authentication, authorization, secrets management, and vulnerability policies.',\n  architecture: 'System design, service boundaries, data flow, and infrastructure decisions.',\n  'getting started': 'Everything you need to set up your environment and start contributing.',\n  introduction: 'Project overview, goals, and how the pieces fit together.',\n  overview: 'High-level summary of the platform, key concepts, and navigation.',\n  'api reference': 'Endpoint contracts, request/response schemas, and usage examples.',\n  api: 'Endpoint contracts, request/response schemas, and usage examples.',\n  testing: 'Test strategy, tooling, coverage targets, and how to run the suite.',\n  deployment: 'Build pipelines, release process, and environment configuration.',\n  contributing: 'How to propose changes, open PRs, and follow the development workflow.',\n  troubleshooting: 'Common issues, error explanations, and debugging techniques.',\n  configuration: 'Available settings, environment variables, and how to customize behavior.',\n  reference: 'Detailed technical reference covering APIs, types, and configuration options.',\n}\n\n/**\n * Generate a default Rspress home page from config metadata.\n *\n * Produces `pageType: home` frontmatter with hero derived from config\n * `title`/`description` and `features:` array from top-level sections.\n * Workspace data is serialized separately for `.generated/workspaces.json`.\n *\n * @param config - ciderpress config\n * @param repoRoot - Absolute path to repo root (for resolving source files)\n * @returns Home page content and workspace data\n */\nexport async function generateDefaultHomePage(\n  config: CiderpressConfig,\n  repoRoot: string\n): Promise<HomePageResult> {\n  const title = config.title ?? 'Documentation'\n  const description = config.description ?? title\n  const firstLink = findFirstLink(config.pages)\n  const home = config.home\n  const hero = match(home)\n    .with(P.nonNullable, (h) => h.hero)\n    .otherwise(() => undefined)\n  const featuresItems = match(home)\n    .with(P.nonNullable, (h) => h.features)\n    .otherwise(() => undefined)\n  const explicitFeatureItems = match(featuresItems)\n    .with(P.nonNullable, (f) => f.items)\n    .otherwise(() => undefined)\n  const features = await match(explicitFeatureItems)\n    .with(P.nonNullable, buildExplicitFeatures)\n    .otherwise(() => buildFeatures(config.pages, repoRoot))\n  const frontmatterFeatures = buildFrontmatterFeatures(features)\n  const workspaceResult = buildWorkspaceData(config)\n\n  // Landing-page extensions live on the typed `HomeConfig` now — no more\n  // `Record<string, unknown>` casts. Destructure with a defaulted empty\n  // object so optional fields surface as `undefined` cleanly.\n  const label = match(hero)\n    .with(P.nonNullable, (h) => h.label)\n    .otherwise(() => undefined)\n  const tagline = match(hero)\n    .with(P.nonNullable, (h) => h.tagline)\n    .otherwise(() => undefined)\n  const heroActions = match(hero)\n    .with(P.nonNullable, (h) => h.actions)\n    .otherwise(() => undefined)\n  const heroDemo = match(hero)\n    .with(P.nonNullable, (h) => h.demo)\n    .otherwise(() => undefined)\n  const proof = match(home)\n    .with(P.nonNullable, (h) => h.proof)\n    .otherwise(() => undefined)\n  const cta = match(home)\n    .with(P.nonNullable, (h) => h.cta)\n    .otherwise(() => undefined)\n  const split = match(home)\n    .with(P.nonNullable, (h) => h.split)\n    .otherwise(() => undefined)\n  const showcaseConfig = match(home)\n    .with(P.nonNullable, (h) => h.showcase)\n    .otherwise(() => undefined)\n  const layout = match(home)\n    .with(P.nonNullable, (h) => h.layout)\n    .otherwise(() => undefined)\n  const featuresHeading = match(featuresItems)\n    .with(P.nonNullable, (f) => f.heading)\n    .otherwise(() => undefined)\n  const workspacesHeading = match(showcaseConfig)\n    .with(P.nonNullable, (s) => s.heading)\n    .otherwise(() => undefined)\n\n  const brandBanner = match(config.brand)\n    .with(P.nonNullable, (b) => b.banner)\n    .otherwise(() => undefined)\n  const bannerSrc = match(brandBanner)\n    .with(P.string, (s) => s)\n    .otherwise(() => '/banner.svg')\n\n  const defaultActions = [{ variant: 'primary', text: 'Get Started', href: firstLink }]\n  const heroConfig: Record<string, unknown> = {\n    name: title,\n    text: description,\n    ...match(label)\n      .with(P.nonNullable, (e) => ({ eyebrow: e }))\n      .otherwise(() => ({})),\n    ...match(tagline)\n      .with(P.nonNullable, (t) => ({ tagline: t }))\n      .otherwise(() => ({})),\n    actions: match(heroActions)\n      .with(P.nonNullable, (a) => a)\n      .otherwise(() => defaultActions),\n    image: {\n      src: bannerSrc,\n      alt: title,\n    },\n  }\n\n  const frontmatterData: Record<string, unknown> = {\n    pageType: 'home',\n    hero: heroConfig,\n    ...match(frontmatterFeatures.length > 0)\n      .with(true, () => ({ features: frontmatterFeatures }))\n      .otherwise(() => ({})),\n    ...match(featuresHeading)\n      .with(P.nonNullable, (h) => ({ featuresHeading: h }))\n      .otherwise(() => ({})),\n    ...match(workspacesHeading)\n      .with(P.nonNullable, (h) => ({ workspacesHeading: h }))\n      .otherwise(() => ({})),\n    ...match(proof)\n      .with(P.nonNullable, (t) => ({ trust: t }))\n      .otherwise(() => ({})),\n    ...match(cta)\n      .with(P.nonNullable, (c) => ({ cta: c }))\n      .otherwise(() => ({})),\n    // heroDemo flows through verbatim — `false` suppresses the slot,\n    // an object selects between image and structured terminal variants\n    // at render time. The HomeLayout handles both via discriminator.\n    ...match(heroDemo)\n      .with(P.nonNullable, (h) => ({ heroDemo: h }))\n      .otherwise(() => ({})),\n    // split flows through verbatim — `false` suppresses the slot, an\n    // object overrides every framework-default copy. HomeLayout reads\n    // the object shape and renders it via HomeSplit.\n    ...match(split)\n      .with(P.nonNullable, (s) => ({ split: s }))\n      .otherwise(() => ({})),\n    // `home.layout` is plumbed into frontmatter as-is so the HomeLayout\n    // component can drive section render order from a single source.\n    ...match(layout)\n      .with(P.nonNullable, (l) => ({ layout: l }))\n      .otherwise(() => ({})),\n  }\n\n  const content = stringifyFrontmatter('', frontmatterData)\n\n  return { content, workspaces: workspaceResult.data }\n}\n\n/**\n * Build serializable workspace data from config apps/packages/workspaces.\n * Returns typed group data for the home page.\n *\n * @param config - Ciderpress config with apps, packages, and workspace groups\n * @returns Workspace data result containing all groups\n */\nexport function buildWorkspaceData(config: CiderpressConfig): WorkspaceDataResult {\n  const apps = config.apps ?? []\n  const packages = config.packages ?? []\n  const workspaceGroups = config.workspaces ?? []\n\n  const hasWorkspaceItems = apps.length > 0 || packages.length > 0 || workspaceGroups.length > 0\n\n  if (!hasWorkspaceItems) {\n    return { data: [] }\n  }\n\n  const appsResult = match(apps.length > 0)\n    .with(true, () =>\n      buildGroupData({\n        type: 'apps',\n        heading: 'Apps',\n        description:\n          'Standalone applications and runnable services — APIs, workers, web apps, and anything that deploys independently.',\n        items: apps,\n        scopePrefix: 'apps/',\n      })\n    )\n    .otherwise(() => null)\n\n  const packagesResult = match(packages.length > 0)\n    .with(true, () =>\n      buildGroupData({\n        type: 'packages',\n        heading: 'Packages',\n        description:\n          'Reusable modules shared across the codebase — libraries, utilities, configs, SDKs, and internal tooling.',\n        items: packages,\n        scopePrefix: 'packages/',\n      })\n    )\n    .otherwise(() => null)\n\n  const groupResults = workspaceGroups.map((g) => {\n    const titleStr = match(g.title)\n      .with(P.string, (t) => t)\n      .otherwise(String)\n    const descStr = g.description ?? ''\n    return buildGroupData({\n      type: 'workspaces',\n      heading: titleStr,\n      description: descStr,\n      items: g.items,\n      scopePrefix: '',\n    })\n  })\n\n  const allResults = [appsResult, packagesResult, ...groupResults].filter(\n    (r): r is GroupDataResult => r !== null\n  )\n\n  return {\n    data: allResults.map((r) => r.group),\n  }\n}\n\n/**\n * Internal result wrapper returned by `buildWorkspaceData`.\n *\n * @private\n */\ninterface WorkspaceDataResult {\n  readonly data: HomeWorkspaceData\n}\n\n/**\n * Internal result wrapper returned by `buildGroupData`.\n *\n * @private\n */\ninterface GroupDataResult {\n  readonly group: HomeWorkspaceGroupData\n}\n\n/**\n * Resolved feature data used internally before serializing to frontmatter.\n *\n * @private\n */\ninterface ResolvedFeature {\n  readonly title: string\n  readonly details: string\n  readonly link: string | undefined\n  readonly icon: SerializedIcon | null\n}\n\n/**\n * Frontmatter-serializable feature shape for YAML output.\n *\n * @private\n */\ninterface FrontmatterFeature {\n  readonly title: string\n  readonly details: string\n  readonly link?: string\n  readonly icon?: SerializedIcon\n}\n\n/**\n * Convert resolved features into frontmatter-serializable objects.\n * Icon identifiers are stored as Iconify strings for YAML serialization.\n *\n * @private\n * @param features - Resolved feature data\n * @returns Frontmatter-compatible feature objects\n */\nfunction buildFrontmatterFeatures(\n  features: readonly ResolvedFeature[]\n): readonly FrontmatterFeature[] {\n  return features.map((f) => ({\n    title: f.title,\n    details: f.details,\n    ...match(f.link)\n      .with(P.nonNullable, (l) => ({ link: l }))\n      .otherwise(() => ({})),\n    ...match(f.icon)\n      .with(P.nonNullable, (ic) => ({ icon: ic }))\n      .otherwise(() => ({})),\n  }))\n}\n\n/**\n * Convert explicit user-defined features into resolved features.\n * Icon colors are cycled in the same way as auto-generated features.\n *\n * @private\n * @param features - User-defined feature config entries\n * @returns Resolved feature data with icon identifiers and colors\n */\nfunction buildExplicitFeatures(features: readonly Feature[]): Promise<readonly ResolvedFeature[]> {\n  return Promise.resolve(\n    features.map((f, _index) => {\n      const resolved = resolveOptionalIcon(f.icon)\n      const titleStr = match(f.title)\n        .with(P.string, (t) => t)\n        .otherwise(String)\n      const descStr = f.description ?? ''\n      return {\n        title: titleStr,\n        details: descStr,\n        link: f.link,\n        icon: serializeIcon(resolved) ?? null,\n      }\n    })\n  )\n}\n\n/**\n * Parameters for building a single workspace group.\n *\n * @private\n */\ninterface BuildGroupDataParams {\n  readonly type: 'apps' | 'packages' | 'workspaces'\n  readonly heading: string\n  readonly description: string\n  readonly items: readonly Workspace[]\n  readonly scopePrefix: string\n}\n\n/**\n * Build a single workspace group with card data.\n *\n * @private\n * @param params - Group configuration\n * @returns Group data result containing the workspace group\n */\nfunction buildGroupData(params: BuildGroupDataParams): GroupDataResult {\n  const { type, heading, description, items, scopePrefix } = params\n  const cards: readonly HomeWorkspaceCardData[] = items.map((item) => {\n    const resolved = resolveOptionalIcon(item.icon)\n    const titleStr = match(item.title)\n      .with(P.string, (t) => t)\n      .otherwise(String)\n    return {\n      title: titleStr,\n      href: item.path,\n      icon: serializeIcon(resolved),\n      scope: resolveScope(scopePrefix),\n      description: item.description,\n      tags: resolveTagLabels(item.tags),\n      badge: item.badge,\n    }\n  })\n\n  return {\n    group: { type, heading, description, cards },\n  }\n}\n\n/**\n * Find the first navigable link from the pages array.\n *\n * @private\n * @param pages - Config pages to search\n * @returns First available link path, or '/' as fallback\n */\nfunction findFirstLink(pages: readonly Page[]): string {\n  const [first] = pages\n  if (!first) {\n    return '/'\n  }\n  return first.path ?? '/'\n}\n\n/**\n * Build resolved feature data from the first 3 config pages\n * with Iconify identifiers and cycled icon colors.\n *\n * @private\n * @param pages - Config pages to derive features from\n * @param repoRoot - Absolute path to repo root for resolving source files\n * @returns Resolved feature data for up to 3 pages\n */\nfunction buildFeatures(\n  pages: readonly Page[],\n  repoRoot: string\n): Promise<readonly ResolvedFeature[]> {\n  return Promise.all(\n    pages.slice(0, 3).map(async (section, _index) => {\n      const link = section.path ?? findFirstChildLink(section)\n      const details = await extractSectionDescription(section, repoRoot)\n      const resolved = resolveOptionalIcon(section.icon)\n      const icon = serializeIcon(resolved) ?? null\n      const titleStr = resolveSectionTitle(section)\n      return { title: titleStr, details, link, icon }\n    })\n  )\n}\n\n/**\n * Recursively find the first child link in a page's children.\n *\n * @private\n * @param section - Page to search for child links\n * @returns First child link path, or undefined if none found\n */\nfunction findFirstChildLink(section: Page): string | undefined {\n  if (!section.pages) {\n    return undefined\n  }\n  const first = section.pages.find((item) => item.path)\n  if (first) {\n    return first.path\n  }\n  const nested = section.pages.find((item) => findFirstChildLink(item))\n  if (nested) {\n    return findFirstChildLink(nested)\n  }\n  return undefined\n}\n\n/**\n * Extract a description for a config page.\n *\n * Priority: source file frontmatter -> config defaults -> well-known defaults -> page title.\n *\n * @private\n * @param section - Page to extract description from\n * @param repoRoot - Absolute path to repo root for resolving source files\n * @returns Description string for the page\n */\nasync function extractSectionDescription(section: Page, repoRoot: string): Promise<string> {\n  if (isString(section.include) && !hasGlobChars(section.include)) {\n    const description = await readFrontmatterDescription(path.resolve(repoRoot, section.include))\n    if (description) {\n      return description\n    }\n  }\n\n  if (isNotNil(section.defaults) && section.defaults.description) {\n    return String(section.defaults.description)\n  }\n\n  const titleStr = resolveSectionTitle(section)\n  const knownDesc = DEFAULT_SECTION_DESCRIPTIONS[titleStr.toLowerCase()]\n  if (knownDesc) {\n    return knownDesc\n  }\n\n  return titleStr\n}\n\n/**\n * Read the `description` field from a markdown file's frontmatter.\n *\n * @private\n * @param filePath - Absolute path to the markdown file\n * @returns Description string if found, or undefined\n */\nasync function readFrontmatterDescription(filePath: string): Promise<string | undefined> {\n  try {\n    const raw = await fs.readFile(filePath, 'utf8')\n    const { data } = parseFrontmatter(raw)\n    return (\n      match(data.description)\n        .with(P.nonNullable, String)\n        // oxlint-disable-next-line unicorn/no-useless-undefined -- explicit return for Result-style consistency\n        .otherwise(() => undefined)\n    )\n  } catch {\n    return undefined\n  }\n}\n\n/**\n * Pass through raw tag strings. UI layer handles label resolution via TechTag.\n *\n * @private\n * @param tags - Optional array of tag strings\n * @returns Array of tag strings, or empty array if undefined\n */\nfunction resolveTagLabels(tags: readonly string[] | undefined): readonly string[] {\n  if (!tags) {\n    return []\n  }\n  return [...tags]\n}\n\n/**\n * Resolve a scope prefix string to a display value.\n *\n * @private\n * @param scopePrefix - Scope prefix string\n * @returns Scope string if non-empty, or undefined\n */\nfunction resolveScope(scopePrefix: string): string | undefined {\n  if (scopePrefix.length > 0) {\n    return scopePrefix\n  }\n  return undefined\n}\n","import fs from 'node:fs/promises'\nimport path from 'node:path'\n\nimport { difference, partition, uniq } from 'massaman/array'\nimport { attemptAsync } from 'massaman/control'\n\nimport type { Manifest } from './types.ts'\n\nconst MANIFEST_FILE = '.generated/manifest.json'\n\n/**\n * Load the previous sync manifest from disk.\n *\n * @param outDir - Absolute path to the output directory\n * @returns Parsed manifest, or `null` if no manifest exists\n */\nexport async function loadManifest(outDir: string): Promise<Manifest | null> {\n  const p = path.resolve(outDir, MANIFEST_FILE)\n  // I/O boundary: both fs.readFile and JSON.parse can throw —\n  // missing file (first sync) or corrupted manifest are expected cases.\n  try {\n    const raw = await fs.readFile(p, 'utf8')\n    return JSON.parse(raw) as Manifest\n  } catch {\n    return null\n  }\n}\n\n/**\n * Write the current sync manifest to disk.\n *\n * @param outDir - Absolute path to the output directory\n * @param manifest - Manifest to persist\n */\nexport async function saveManifest(outDir: string, manifest: Manifest): Promise<void> {\n  const p = path.resolve(outDir, MANIFEST_FILE)\n  await fs.mkdir(path.dirname(p), { recursive: true })\n  await fs.writeFile(p, JSON.stringify(manifest, null, 2), 'utf8')\n}\n\n/**\n * Result returned by {@link cleanStaleFiles} describing the outcome of\n * deleting stale output files.\n *\n * `attempted` is the total number of stale paths considered for removal,\n * `removed` is how many `fs.rm` calls completed without error, and `failed`\n * captures any per-path errors (with `force: true` set, failures are rare\n * but indicate permission/IO issues worth surfacing).\n */\nexport interface CleanStaleFilesResult {\n  readonly attempted: number\n  readonly removed: number\n  readonly failed: readonly { readonly path: string; readonly reason: string }[]\n}\n\n/**\n * Delete output files that exist in the old manifest but not the new one.\n * Prunes empty parent directories after removing stale files.\n *\n * Each `fs.rm` is wrapped in `attemptAsync` so a single failure cannot\n * abort the entire cleanup pass. Per-path failures are collected and\n * returned to the caller; `attempted` may exceed `removed` when some\n * paths failed to delete (and `failed` will be non-empty).\n *\n * @param outDir - Absolute path to the output directory\n * @param oldManifest - Manifest from the previous sync\n * @param newManifest - Manifest from the current sync\n * @returns Counts of attempted vs removed stale files plus per-path failures\n */\nexport async function cleanStaleFiles(\n  outDir: string,\n  oldManifest: Manifest,\n  newManifest: Manifest\n): Promise<CleanStaleFilesResult> {\n  const stalePaths = difference(Object.keys(oldManifest.files), Object.keys(newManifest.files))\n\n  const resolved = stalePaths.map((oldPath) => path.resolve(outDir, oldPath))\n\n  const outcomes = await Promise.all(\n    resolved.map(async (abs) => {\n      const result = await attemptAsync(async () => {\n        await fs.rm(abs, { force: true })\n      })\n      return { abs, result } as const\n    })\n  )\n\n  const [failures, successes] = partition(outcomes, ({ result }) => !result.ok)\n  const failed = failures.map(({ abs, result }) => ({\n    path: abs,\n    reason: resolveReason(result.error),\n  }))\n\n  const uniqueParents = uniq(resolved.map((abs) => path.dirname(abs)))\n  await Promise.all(uniqueParents.map((dir) => pruneEmptyDirs(dir, outDir)))\n\n  return {\n    attempted: stalePaths.length,\n    removed: successes.length,\n    failed,\n  }\n}\n\n/**\n * Translate an `attemptAsync` error into a human-readable reason string.\n *\n * @private\n * @param error - Error from a failed `attemptAsync` result, or null\n * @returns Reason message, or `'unknown'` when the error was null\n */\nfunction resolveReason(error: Error | null): string {\n  if (error === null) {\n    return 'unknown'\n  }\n  return error.message\n}\n\n/**\n * Recursively remove empty parent directories up to the stop boundary.\n *\n * @private\n * @param dir - Absolute path to the directory to check and possibly remove\n * @param stopAt - Absolute path to the boundary directory (never removed)\n * @returns Promise that resolves when pruning is complete\n */\nasync function pruneEmptyDirs(dir: string, stopAt: string): Promise<void> {\n  if (dir === stopAt || !dir.startsWith(stopAt)) {\n    return\n  }\n  try {\n    const entries = await fs.readdir(dir)\n    if (entries.length === 0) {\n      await fs.rmdir(dir)\n      await pruneEmptyDirs(path.dirname(dir), stopAt)\n    }\n  } catch {\n    // directory may have been removed already\n  }\n}\n","/**\n * OpenAPI spec utility functions shared by the sync engine and markdown renderer.\n *\n * Pure functions for resolving operations, parameters, security requirements,\n * and other data from a parsed OpenAPI spec object.\n */\n\nimport { match, P } from 'massaman/match'\n\n/**\n * All HTTP methods recognised by the OpenAPI specification.\n */\nexport const HTTP_METHODS: readonly string[] = [\n  'get',\n  'post',\n  'put',\n  'patch',\n  'delete',\n  'options',\n  'head',\n  'trace',\n]\n\n/**\n * A group of parameters sharing the same `in` location.\n */\nexport interface ParameterGroup {\n  readonly label: string\n  readonly items: readonly Record<string, unknown>[]\n}\n\n/**\n * Resolve an operation object from the spec by path and method.\n *\n * @param input - Spec object, URL path, and HTTP method\n * @returns The matched operation object or null if not found\n */\nexport function resolveOperation(input: {\n  readonly spec: Record<string, unknown>\n  readonly path: string\n  readonly method: string\n}): Record<string, unknown> | null {\n  const paths = input.spec['paths'] as Record<string, Record<string, unknown>> | undefined\n  return match(paths)\n    .with(P.nonNullable, (p) => {\n      const pathItem = p[input.path]\n      return match(pathItem)\n        .with(P.nonNullable, (pi) => {\n          const op = pi[input.method.toLowerCase()]\n          return match(op)\n            .with(P.nonNullable, (o) => o as Record<string, unknown>)\n            .otherwise(() => null)\n        })\n        .otherwise(() => null)\n    })\n    .otherwise(() => null)\n}\n\n/**\n * Extract the first server URL from the spec, falling back to a placeholder.\n *\n * @param spec - Parsed OpenAPI spec object\n * @returns First server URL string or `'https://api.example.com'`\n */\nexport function resolveBaseUrl(spec: Record<string, unknown>): string {\n  const servers = spec['servers'] as readonly Record<string, unknown>[] | undefined\n  return match(servers)\n    .with(\n      P.when((s): s is readonly Record<string, unknown>[] => s !== undefined && s.length > 0),\n      (s) => String(s[0]['url'] ?? 'https://api.example.com')\n    )\n    .otherwise(() => 'https://api.example.com')\n}\n\n/**\n * Resolve security requirements from the operation or global spec.\n *\n * @param input - Operation object and full spec object\n * @returns Array of security requirement objects (operation-level takes precedence)\n */\nexport function resolveSecurities(input: {\n  readonly operation: Record<string, unknown>\n  readonly spec: Record<string, unknown>\n}): readonly Record<string, unknown>[] {\n  const opSecurity = input.operation['security'] as readonly Record<string, unknown>[] | undefined\n  const globalSecurity = input.spec['security'] as readonly Record<string, unknown>[] | undefined\n  return match(opSecurity)\n    .with(P.nonNullable, (s) => s)\n    .otherwise(() =>\n      match(globalSecurity)\n        .with(P.nonNullable, (s) => s)\n        .otherwise(() => [] as readonly Record<string, unknown>[])\n    )\n}\n\n/**\n * Extract the first example value from a request body's content map.\n *\n * @param requestBody - OpenAPI request body object, or undefined\n * @returns The first example value found, or null\n */\nexport function extractBodyExample(\n  requestBody: Record<string, unknown> | undefined\n): unknown | null {\n  return match(requestBody)\n    .with(P.nonNullable, (rb) => {\n      const content = rb['content'] as Record<string, Record<string, unknown>> | undefined\n      return match(content)\n        .with(P.nonNullable, (c) => {\n          const entries = Object.entries(c)\n          return match(entries)\n            .with(\n              P.when((e): e is [string, Record<string, unknown>][] => e.length > 0),\n              (e) => {\n                const [[, mediaType]] = e\n                const { example } = mediaType as { readonly example?: unknown }\n                return match(example)\n                  .with(P.nonNullable, (ex) => ex)\n                  .otherwise(() => null)\n              }\n            )\n            .otherwise(() => null)\n        })\n        .otherwise(() => null)\n    })\n    .otherwise(() => null)\n}\n\n/**\n * Check if an HTTP method typically carries a request body.\n *\n * @param method - Lowercase HTTP method string\n * @returns True if the method is POST, PUT, or PATCH\n */\nexport function isBodyMethod(method: string): boolean {\n  return method === 'post' || method === 'put' || method === 'patch'\n}\n\n/**\n * Group parameters by their `in` field (path, query, header, etc.).\n *\n * @param params - OpenAPI parameter objects\n * @returns Array of parameter groups\n */\nexport function groupParametersByIn(\n  params: readonly Record<string, unknown>[]\n): readonly ParameterGroup[] {\n  const grouped = Map.groupBy(params, (param) => String(param['in'] ?? 'other'))\n  return [...grouped.entries()].map(([label, items]) => ({ label, items }))\n}\n","/**\n * OpenAPI markdown renderer — generates copyable markdown from specs via Liquid templates.\n *\n * Loads `.liquid` templates from the package `templates/` directory and\n * renders them with flattened spec data to produce clean, structured\n * markdown strings for the \"Copy Markdown\" button.\n */\n\nimport { existsSync, readFileSync } from 'node:fs'\nimport { join } from 'node:path'\n\nimport { Liquid } from 'liquidjs'\nimport { match, P } from 'massaman/match'\nimport { isNil, isNotNil } from 'massaman/predicate'\n\nimport {\n  extractBodyExample,\n  groupParametersByIn,\n  HTTP_METHODS,\n  isBodyMethod,\n  resolveBaseUrl,\n  resolveOperation,\n  resolveSecurities,\n} from './openapi-spec.ts'\n\n/**\n * Input for rendering an operation's markdown.\n */\ninterface OperationInput {\n  readonly spec: Record<string, unknown>\n  readonly method: string\n  readonly path: string\n  readonly operationId: string\n}\n\n/**\n * Input for rendering an overview page's markdown.\n */\ninterface OverviewInput {\n  readonly spec: Record<string, unknown>\n}\n\nconst engine = new Liquid()\n\nconst operationTemplate = loadTemplate('openapi-operation.liquid')\nconst overviewTemplate = loadTemplate('openapi-overview.liquid')\n\n/**\n * Render markdown for an OpenAPI operation page.\n *\n * Resolves the operation from the spec, flattens all fields into\n * template-friendly shapes, and renders the Liquid template.\n *\n * @param input - Operation data with parsed spec\n * @returns Rendered markdown string\n */\nexport function renderOperationMarkdown(input: OperationInput): string {\n  const operation = resolveOperation({ spec: input.spec, path: input.path, method: input.method })\n\n  if (operation === null) {\n    return `# ${input.method.toUpperCase()} \\`${input.path}\\`\\n\\nOperation not found.`\n  }\n\n  const summary = operation['summary'] as string | undefined\n  const description = operation['description'] as string | undefined\n  const parameters = (operation['parameters'] ?? []) as readonly Record<string, unknown>[]\n  const requestBody = operation['requestBody'] as Record<string, unknown> | undefined\n  const responses = (operation['responses'] ?? {}) as Record<string, unknown>\n  const deprecated = operation['deprecated'] === true\n  const securities = resolveSecurities({ operation, spec: input.spec })\n  const baseUrl = resolveBaseUrl(input.spec)\n\n  const data = {\n    method: input.method.toUpperCase(),\n    path: input.path,\n    operationId: input.operationId,\n    deprecated,\n    summary,\n    description,\n    hasParameters: parameters.length > 0,\n    parameterGroups: flattenParameterGroups(parameters),\n    hasRequestBody: requestBody !== undefined,\n    requestBody: flattenRequestBody(requestBody),\n    hasResponses: Object.keys(responses).length > 0,\n    responses: flattenResponses(responses),\n    hasSecurity: securities.length > 0,\n    securities: flattenSecurities(securities),\n    curlExample: buildCurl(input.method, input.path, baseUrl, requestBody),\n  }\n\n  return engine.parseAndRenderSync(operationTemplate, data)\n}\n\n/**\n * Render markdown for an OpenAPI overview page.\n *\n * Extracts info, servers, auth schemes, and tag groups from the spec\n * and renders the Liquid template.\n *\n * @param input - Parsed spec object\n * @returns Rendered markdown string\n */\nexport function renderOverviewMarkdown(input: OverviewInput): string {\n  const info = (input.spec['info'] ?? {}) as Record<string, unknown>\n  const title = String(info['title'] ?? 'API Reference')\n  const version = String(info['version'] ?? '')\n  const description = info['description'] as string | undefined\n  const servers = (input.spec['servers'] ?? []) as readonly Record<string, unknown>[]\n  const components = (input.spec['components'] ?? {}) as Record<string, unknown>\n  const securitySchemes = (components['securitySchemes'] ?? {}) as Record<\n    string,\n    Record<string, unknown>\n  >\n\n  const authEntries = Object.entries(securitySchemes)\n  const tagGroups = collectTagGroups(input.spec)\n\n  const data = {\n    title,\n    version: match(version.length > 0)\n      .with(true, () => version)\n      .otherwise(() => null),\n    description,\n    hasServers: servers.length > 0,\n    servers: servers.map((s) => ({\n      url: String(s['url'] ?? ''),\n      description: s['description'] as string | undefined,\n    })),\n    hasAuthSchemes: authEntries.length > 0,\n    authSchemes: authEntries.map(([name, scheme]) => ({\n      name,\n      type: String(scheme['type'] ?? ''),\n    })),\n    hasTagGroups: tagGroups.length > 0,\n    tagGroups,\n  }\n\n  return engine.parseAndRenderSync(overviewTemplate, data)\n}\n\n/**\n * Load a Liquid template from the package templates directory.\n *\n * @private\n * @param filename - Template filename\n * @returns Raw template string\n */\nfunction loadTemplate(filename: string): string {\n  // When bundled (dist/), templates live at ../templates relative to the\n  // bundle. When running from source (src/lib/sync/), the package root is\n  // three levels up. Probe both so source-mode consumers (benchmarks,\n  // tests) work without a build step. Falls through to the bundled path\n  // when neither exists so readFileSync surfaces a clear ENOENT.\n  const bundled = join(import.meta.dirname, '..', 'templates', filename)\n  const source = join(import.meta.dirname, '..', '..', '..', 'templates', filename)\n  // oxlint-disable-next-line security/detect-non-literal-fs-filename -- candidates derived from package-relative paths\n  const resolved = match(existsSync(source))\n    .with(true, () => source)\n    .otherwise(() => bundled)\n  // oxlint-disable-next-line security/detect-non-literal-fs-filename -- path resolved above from trusted candidates\n  return readFileSync(resolved, 'utf8')\n}\n\n/**\n * Flatten parameter groups into template-friendly arrays.\n *\n * @private\n * @param parameters - OpenAPI parameter objects\n * @returns Array of groups with label and items\n */\nfunction flattenParameterGroups(parameters: readonly Record<string, unknown>[]): readonly {\n  readonly label: string\n  readonly items: readonly {\n    readonly name: string\n    readonly type: string\n    readonly required: string\n    readonly description: string\n  }[]\n}[] {\n  const groups = groupParametersByIn(parameters)\n  return groups.map((group) => ({\n    label: group.label,\n    items: group.items.map((param) => ({\n      name: String(param['name'] ?? ''),\n      type: extractParamType(param),\n      required: match(param['required'] === true)\n        .with(true, () => 'Yes')\n        .otherwise(() => 'No'),\n      description: String(param['description'] ?? ''),\n    })),\n  }))\n}\n\n/**\n * Flatten a request body into template-friendly shape.\n *\n * @private\n * @param requestBody - OpenAPI request body object or undefined\n * @returns Flattened request body or undefined\n */\nfunction flattenRequestBody(requestBody: Record<string, unknown> | undefined):\n  | {\n      readonly description: string | undefined\n      readonly contentType: string\n      readonly schema: string | null\n      readonly example: string | null\n    }\n  | undefined {\n  if (requestBody === undefined) {\n    return undefined\n  }\n\n  const description = requestBody['description'] as string | undefined\n  const content = requestBody['content'] as Record<string, Record<string, unknown>> | undefined\n\n  if (isNil(content)) {\n    return { description, contentType: 'application/json', schema: null, example: null }\n  }\n\n  const entries = Object.entries(content)\n  if (entries.length === 0) {\n    return { description, contentType: 'application/json', schema: null, example: null }\n  }\n\n  const [[contentType, mediaType]] = entries\n  const schema = mediaType['schema'] as Record<string, unknown> | undefined\n  const schemaText = match(schema)\n    .with(P.nonNullable, (s) => renderSchemaText(s, 0))\n    .otherwise(() => null)\n  const example = mediaType['example'] as unknown\n\n  return {\n    description,\n    contentType,\n    schema: schemaText,\n    example: match(example)\n      .with(P.nonNullable, (ex) => JSON.stringify(ex, null, 2))\n      .otherwise(() => null),\n  }\n}\n\n/**\n * Flatten responses into template-friendly array.\n *\n * @private\n * @param responses - OpenAPI responses object keyed by status code\n * @returns Array of response objects with code, description, and optional schema\n */\nfunction flattenResponses(responses: Record<string, unknown>): readonly {\n  readonly code: string\n  readonly description: string\n  readonly schema: string | null\n}[] {\n  return Object.entries(responses).map(([code, value]) => {\n    const response = (value ?? {}) as Record<string, unknown>\n    const description = String(response['description'] ?? '')\n    const schema = extractResponseSchema(response)\n    return {\n      code,\n      description,\n      schema: match(schema)\n        .with(P.nonNullable, (s) => renderSchemaText(s, 0))\n        .otherwise(() => null),\n    }\n  })\n}\n\n/**\n * Flatten security requirements into template-friendly text lines.\n *\n * @private\n * @param securities - Security requirement objects\n * @returns Array of objects with display text\n */\nfunction flattenSecurities(\n  securities: readonly Record<string, unknown>[]\n): readonly { readonly text: string }[] {\n  return securities.map((requirement, index) => {\n    const schemes = Object.entries(requirement).map(([name, scopes]) => {\n      const scopeSuffix = match(scopes)\n        .with(\n          P.when((s): s is readonly string[] => Array.isArray(s) && s.length > 0),\n          (s) => ` (${s.join(', ')})`\n        )\n        .otherwise(() => '')\n      return `${name}${scopeSuffix}`\n    })\n\n    if (schemes.length === 0) {\n      return { text: 'No authentication' }\n    }\n\n    const prefix = match(securities.length > 1)\n      .with(true, () => `Option ${String(index + 1)}: `)\n      .otherwise(() => '')\n    return { text: `${prefix}${schemes.join(' + ')}` }\n  })\n}\n\n/**\n * Collect tag groups with operation counts from the spec.\n *\n * @private\n * @param spec - Parsed OpenAPI spec\n * @returns Array of tag groups with name and count\n */\nfunction collectTagGroups(\n  spec: Record<string, unknown>\n): readonly { readonly name: string; readonly count: number }[] {\n  const paths = (spec['paths'] ?? {}) as Record<string, Record<string, unknown>>\n\n  const allTags = Object.values(paths).flatMap((pathItem) =>\n    HTTP_METHODS.filter((method) => pathItem[method] !== undefined).flatMap((method) => {\n      const operation = pathItem[method] as Record<string, unknown>\n      return (operation['tags'] ?? ['default']) as readonly string[]\n    })\n  )\n\n  if (allTags.length === 0) {\n    return []\n  }\n\n  const tagCounts = Map.groupBy(allTags, (tag) => tag)\n  return [...tagCounts.entries()].map(([name, occurrences]) => ({\n    name,\n    count: occurrences.length,\n  }))\n}\n\n/**\n * Build a cURL command string for the operation.\n *\n * @private\n * @param method - HTTP method\n * @param urlPath - URL path template\n * @param baseUrl - API base URL\n * @param requestBody - Optional request body object\n * @returns cURL command string\n */\nfunction buildCurl(\n  method: string,\n  urlPath: string,\n  baseUrl: string,\n  requestBody: Record<string, unknown> | undefined\n): string {\n  const normalizedMethod = method.toLowerCase()\n  const url = `${baseUrl}${urlPath}`\n  const upper = normalizedMethod.toUpperCase()\n\n  const headerPart = match(isBodyMethod(normalizedMethod))\n    .with(true, () => \" \\\\\\n  -H 'Content-Type: application/json'\")\n    .otherwise(() => '')\n\n  const bodyExample = extractBodyExample(requestBody)\n  const bodyPart = match(bodyExample)\n    .with(P.nonNullable, (ex) => ` \\\\\\n  -d ${shellQuote(JSON.stringify(ex))}`)\n    .otherwise(() => '')\n\n  return `curl -X ${upper} ${shellQuote(url)}${headerPart}${bodyPart}`\n}\n\n/**\n * Shell-quote a string for use in cURL commands.\n *\n * @private\n * @param value - String to quote\n * @returns Shell-quoted string\n */\nfunction shellQuote(value: string): string {\n  return `'${value.replaceAll(\"'\", \"'\\\"'\\\"'\")}'`\n}\n\n/**\n * Recursively render a JSON Schema as a plain-text markdown string.\n *\n * @private\n * @param schema - JSON Schema object\n * @param depth - Current nesting depth (max 4)\n * @returns Text representation of the schema\n */\nfunction renderSchemaText(schema: Record<string, unknown>, depth: number): string {\n  if (depth > 4) {\n    return '_...(nested)_'\n  }\n\n  const schemaType = String(schema['type'] ?? '')\n  const description = schema['description'] as string | undefined\n\n  const oneOf = schema['oneOf'] as readonly Record<string, unknown>[] | undefined\n  if (oneOf !== undefined) {\n    const variants = oneOf.map((v, i) => `  ${String(i + 1)}. ${renderSchemaText(v, depth + 1)}`)\n    return ['**One of:**', ...variants].join('\\n')\n  }\n\n  const anyOf = schema['anyOf'] as readonly Record<string, unknown>[] | undefined\n  if (anyOf !== undefined) {\n    const variants = anyOf.map((v, i) => `  ${String(i + 1)}. ${renderSchemaText(v, depth + 1)}`)\n    return ['**Any of:**', ...variants].join('\\n')\n  }\n\n  if (schemaType === 'object') {\n    return renderObjectSchema(schema, depth, description)\n  }\n\n  if (schemaType === 'array') {\n    const items = (schema['items'] ?? {}) as Record<string, unknown>\n    const itemDesc = renderSchemaText(items, depth + 1)\n    const descSuffix = match(description)\n      .with(P.nonNullable, (d) => ` — ${d}`)\n      .otherwise(() => '')\n    return `array of ${itemDesc}${descSuffix}`\n  }\n\n  const enumValues = schema['enum'] as readonly unknown[] | undefined\n  const enumSuffix = match(enumValues)\n    .with(\n      P.when((e): e is readonly unknown[] => e !== undefined && e.length > 0),\n      (e) => ` (enum: ${e.map(String).join(', ')})`\n    )\n    .otherwise(() => '')\n  const descSuffix = match(description)\n    .with(P.nonNullable, (d) => ` — ${d}`)\n    .otherwise(() => '')\n\n  return `\\`${schemaType}\\`${enumSuffix}${descSuffix}`\n}\n\n/**\n * Render an object schema as markdown with property listing.\n *\n * @private\n * @param schema - Object JSON Schema\n * @param depth - Current nesting depth\n * @param description - Optional schema description\n * @returns Markdown representation\n */\nfunction renderObjectSchema(\n  schema: Record<string, unknown>,\n  depth: number,\n  description: string | undefined\n): string {\n  const properties = (schema['properties'] ?? {}) as Record<string, Record<string, unknown>>\n  const requiredList = (schema['required'] ?? []) as readonly string[]\n  const propEntries = Object.entries(properties)\n\n  const descSuffix = match(description)\n    .with(P.nonNullable, (d) => ` — ${d}`)\n    .otherwise(() => '')\n\n  if (propEntries.length === 0) {\n    return `\\`object\\`${descSuffix}`\n  }\n\n  const indent = '  '.repeat(depth)\n  const rows = propEntries.map(([name, propSchema]) => {\n    const required = match(requiredList.includes(name))\n      .with(true, () => ' **(required)**')\n      .otherwise(() => '')\n    const propDesc = renderSchemaText(propSchema, depth + 1)\n    return `${indent}- \\`${name}\\`${required}: ${propDesc}`\n  })\n\n  return [`\\`object\\`${descSuffix}`, ...rows].join('\\n')\n}\n\n/**\n * Extract the type string from a parameter's schema.\n *\n * @private\n * @param param - OpenAPI parameter object\n * @returns Type string or dash placeholder\n */\nfunction extractParamType(param: Record<string, unknown>): string {\n  const schema = param['schema'] as Record<string, unknown> | undefined\n  if (schema !== undefined && schema['type'] !== undefined) {\n    return String(schema['type'])\n  }\n  return String(param['type'] ?? '—')\n}\n\n/**\n * Extract the response schema from the first content type entry.\n *\n * @private\n * @param response - OpenAPI response object\n * @returns Schema object or null\n */\nfunction extractResponseSchema(response: Record<string, unknown>): Record<string, unknown> | null {\n  const content = response['content'] as Record<string, Record<string, unknown>> | undefined\n  if (isNotNil(content)) {\n    const entries = Object.entries(content)\n    if (entries.length > 0) {\n      const [[, mediaType]] = entries\n      return (mediaType['schema'] ?? null) as Record<string, unknown> | null\n    }\n  }\n\n  const directSchema = response['schema'] as Record<string, unknown> | undefined\n  return match(directSchema)\n    .with(P.nonNullable, (s) => s)\n    .otherwise(() => null)\n}\n","/**\n * OpenAPI sync engine — reads specs, resolves refs, and generates MDX pages + sidebar.\n *\n * Reads an OpenAPI spec file (JSON or YAML), resolves all `$ref`s via\n * `@apidevtools/swagger-parser`, extracts operations from paths, groups\n * by tag, and generates one `.mdx` per operation plus an index overview page.\n */\n\nimport fs from 'node:fs/promises'\nimport path from 'node:path'\n\nimport SwaggerParser from '@apidevtools/swagger-parser'\nimport type { OpenAPISpec, Workspace, CiderpressConfig } from '@ciderpress/config'\nimport { collectAllWorkspaceItems } from '@ciderpress/config'\nimport { match, P } from 'massaman/match'\nimport { isNil, isNotNil } from 'massaman/predicate'\nimport { capitalize } from 'massaman/string'\n\nimport { renderOperationMarkdown, renderOverviewMarkdown } from './openapi-markdown.ts'\nimport { HTTP_METHODS } from './openapi-spec.ts'\nimport type { PageData, SidebarItem, SyncContext } from './types.ts'\nimport { slugify } from './workspace.ts'\n\n/**\n * A sidebar entry keyed by its prefix path.\n */\nexport interface OpenAPISidebarEntry {\n  readonly prefix: string\n  readonly sidebar: readonly SidebarItem[]\n  /**\n   * True when this entry originates from a top-level `Page.openapi` rather\n   * than a workspace item's `.openapi`. Root-level entries need their own\n   * standalone sidebar scope and a root `_meta.json` dir entry.\n   */\n  readonly rootLevel: boolean\n}\n\n/**\n * Aggregate result from syncing all OpenAPI configs.\n */\nexport interface SyncOpenAPIResult {\n  readonly sidebar: readonly OpenAPISidebarEntry[]\n  readonly pages: readonly PageData[]\n  readonly specMtimes: Readonly<Record<string, number>>\n}\n\n/**\n * Sync all OpenAPI configs from page tree and workspace items.\n *\n * Collects specs from any `Page.openapi` field in the tree and all workspace\n * items' `.openapi`, processes each spec, and returns aggregated sidebar\n * entries and pages.\n *\n * @param ctx - Sync context with config and paths\n * @returns Aggregated sidebar entries and generated pages\n */\nexport async function syncAllOpenAPI(ctx: SyncContext): Promise<SyncOpenAPIResult> {\n  const rootConfigs = collectRootConfigs(ctx.config)\n  const workspaceConfigs = collectWorkspaceConfigs(ctx.config)\n  const allConfigs = [...rootConfigs, ...workspaceConfigs]\n\n  if (allConfigs.length === 0) {\n    return { sidebar: [], pages: [], specMtimes: {} }\n  }\n\n  const configResults = await Promise.all(allConfigs.map((entry) => syncOpenAPI(entry.config, ctx)))\n\n  const specMtimes = configResults.reduce<Record<string, number>>(\n    // oxlint-disable-next-line unicorn/no-accumulating-spread -- Object.assign avoids O(n^2) copies\n    (acc, result) => Object.assign(acc, result.specMtimes),\n    {}\n  )\n\n  return {\n    sidebar: configResults.map((result, index) => ({\n      prefix: allConfigs[index].config.path,\n      sidebar: result.sidebar,\n      rootLevel: allConfigs[index].rootLevel,\n    })),\n    pages: configResults.flatMap((result) => result.pages),\n    specMtimes,\n  }\n}\n\n/**\n * An operation extracted from an OpenAPI paths object.\n *\n * @private\n */\ninterface OperationInfo {\n  readonly method: string\n  readonly path: string\n  readonly operationId: string\n  readonly summary: string\n  readonly tags: readonly string[]\n}\n\n/**\n * Operations grouped under a single tag.\n *\n * @private\n */\ninterface TagGroup {\n  readonly tag: string\n  readonly operations: readonly OperationInfo[]\n}\n\n/**\n * Result from processing a single OpenAPI spec.\n *\n * @private\n */\ninterface SingleSyncResult {\n  readonly sidebar: readonly SidebarItem[]\n  readonly pages: readonly PageData[]\n  readonly specMtimes: Readonly<Record<string, number>>\n}\n\n/**\n * A config entry with its associated OpenAPI config and source flag.\n *\n * @private\n */\ninterface ConfigEntry {\n  readonly config: OpenAPISpec\n  readonly rootLevel: boolean\n}\n\n/**\n * Sync a single OpenAPI spec — parse, extract operations, generate pages + sidebar.\n *\n * @private\n * @param config - OpenAPI config with spec path and prefix\n * @param ctx - Sync context\n * @returns Sidebar items and generated page data\n */\nasync function syncOpenAPI(config: OpenAPISpec, ctx: SyncContext): Promise<SingleSyncResult> {\n  const specAbsPath = path.resolve(ctx.repoRoot, config.spec)\n  const specRelPath = config.spec\n\n  const specStat = await fs.stat(specAbsPath).catch(() => null)\n  const specMtime = match(specStat)\n    .with(P.nonNullable, (s) => s.mtimeMs)\n    .otherwise(() => null)\n\n  const api = await (async () => {\n    if (specMtime !== null && ctx.openapiCache) {\n      const prevMtime = match(ctx.previousManifest)\n        .with(P.nonNullable, (m) => (m.openapiMtimes ?? {})[specRelPath])\n        .otherwise(() => null)\n      if (prevMtime === specMtime && ctx.openapiCache.has(specRelPath)) {\n        return ctx.openapiCache.get(specRelPath) as Record<string, unknown>\n      }\n    }\n    const parsed = await SwaggerParser.dereference(specAbsPath, {\n      dereference: { circular: 'ignore' },\n    }).catch((error: unknown) => {\n      const message = match(error)\n        .with(P.instanceOf(Error), (e) => e.message)\n        .otherwise(String)\n      console.warn(`[ciderpress] Failed to parse OpenAPI spec at ${specAbsPath}: ${message}`)\n      return null\n    })\n    if (parsed === null) {\n      // Evict stale cache entry so the next pass retries instead of serving stale output\n      if (ctx.openapiCache) {\n        ctx.openapiCache.delete(specRelPath)\n      }\n      return null\n    }\n    if (ctx.openapiCache) {\n      ctx.openapiCache.set(specRelPath, parsed)\n    }\n    return parsed\n  })()\n\n  const specMtimes: Readonly<Record<string, number>> = match(specMtime)\n    .with(P.nonNullable, (mt) => ({ [specRelPath]: mt }))\n    .otherwise(() => ({}))\n\n  // oxlint-disable-next-line security/detect-possible-timing-attacks -- not a security comparison\n  if (api === null) {\n    return { sidebar: [], pages: [], specMtimes }\n  }\n  const paths = (api as Record<string, unknown>).paths as\n    | Record<string, Record<string, unknown>>\n    | undefined\n\n  if (isNil(paths)) {\n    return { sidebar: [], pages: [], specMtimes }\n  }\n\n  const operations = extractOperations(paths)\n  const tagGroups = groupByTag(operations)\n  const title = resolveTitle(config)\n  const prefix = config.path\n\n  // Write the fully dereferenced spec JSON into the content directory\n  // so generated MDX pages can import it with a relative path.\n  const specOutputPath = `${stripLeadingSlash(prefix)}/openapi.json`\n  const specPage: PageData = {\n    content: JSON.stringify(api, null, 2),\n    outputPath: specOutputPath,\n    frontmatter: {},\n  }\n\n  const spec = api as Record<string, unknown>\n  const operationPages = tagGroups.flatMap((group) =>\n    group.operations.map((op) => buildOperationPage(op, prefix, spec))\n  )\n\n  const slugCounts = Map.groupBy(operationPages, (page) => page.outputPath)\n  const duplicates = [...slugCounts.entries()].filter(([, pages]) => pages.length > 1)\n  if (duplicates.length > 0) {\n    const duplicatePaths = duplicates.map(([p]) => p).join(', ')\n    console.warn(\n      `[ciderpress] Duplicate OpenAPI slugs detected: ${duplicatePaths}. Later operations will overwrite earlier ones.`\n    )\n  }\n\n  const indexPage = buildIndexPage(title, prefix, spec)\n  const pages = [specPage, indexPage, ...operationPages]\n\n  const sidebarLayout = match(config.sidebarLayout)\n    .with('title', () => 'title' as const)\n    .otherwise(() => 'method-path' as const)\n  const sidebarItems = buildSidebarItems(title, prefix, tagGroups, sidebarLayout)\n\n  return { sidebar: sidebarItems, pages, specMtimes }\n}\n\n/**\n * Collect root-level OpenAPI configs from any top-level `Page.openapi` field.\n *\n * The legacy top-level `config.openapi` field has been removed; per-page\n * OpenAPI specs now live on `Page.openapi`. A page is considered \"root-level\"\n * when it sits in the top-level `config.pages` array, mirroring the previous\n * behavior of treating root specs as standalone sidebar scopes.\n *\n * @private\n * @param config - Ciderpress config\n * @returns Array of config entries from top-level pages with `openapi`\n */\nfunction collectRootConfigs(config: CiderpressConfig): readonly ConfigEntry[] {\n  return config.pages\n    .filter((page): page is typeof page & { readonly openapi: OpenAPISpec } =>\n      isNotNil(page.openapi)\n    )\n    .map((page) => ({ config: page.openapi, rootLevel: true }))\n}\n\n/**\n * Collect workspace-level OpenAPI configs from apps, packages, and workspace categories.\n *\n * @private\n * @param config - Ciderpress config\n * @returns Array of config entries from workspace items\n */\nfunction collectWorkspaceConfigs(config: CiderpressConfig): readonly ConfigEntry[] {\n  const allWorkspaces = collectAllWorkspaceItems(config)\n\n  return allWorkspaces\n    .filter((ws): ws is Workspace & { readonly openapi: OpenAPISpec } => isNotNil(ws.openapi))\n    .map((ws) => ({ config: ws.openapi, rootLevel: false }))\n}\n\n/**\n * Extract all operations from OpenAPI paths object.\n *\n * @private\n * @param paths - OpenAPI paths object keyed by path string\n * @returns Flat array of operation info for all HTTP methods\n */\nfunction extractOperations(\n  paths: Record<string, Record<string, unknown>>\n): readonly OperationInfo[] {\n  return Object.entries(paths).flatMap(([pathStr, methods]) =>\n    HTTP_METHODS.filter((method) => isNotNil(methods[method])).map((method) => {\n      const op = methods[method] as Record<string, unknown>\n      const summary = match(op.summary)\n        .with(P.string, (s) => s)\n        .otherwise(() => `${method.toUpperCase()} ${pathStr}`)\n      const operationId = match(op.operationId)\n        .with(P.string, (id) => id)\n        .otherwise(() => `${method}-${slugify(pathStr)}`)\n      const tags = match(op.tags)\n        .with(P.array(P.string), (t) => t)\n        .otherwise(() => ['default'])\n      return { method, path: pathStr, operationId, summary, tags }\n    })\n  )\n}\n\n/**\n * Group operations by their first tag.\n *\n * @private\n * @param operations - Flat array of operation info\n * @returns Operations grouped by tag name\n */\nfunction groupByTag(operations: readonly OperationInfo[]): readonly TagGroup[] {\n  const grouped = Map.groupBy(operations, (op) =>\n    match(op.tags[0])\n      .with(P.string, (t) => t)\n      .otherwise(() => 'default')\n  )\n\n  return [...grouped.entries()].map(([tag, ops]) => ({ tag, operations: ops }))\n}\n\n/**\n * Build an MDX page for a single OpenAPI operation.\n *\n * Wraps the interactive component with a `LlmsMarkdownOverride` component that\n * renders the pre-generated markdown during Rspress's SSR markdown pass,\n * so the per-page `.md` endpoint serves structured content instead of\n * raw MDX/JSX source.\n *\n * @private\n * @param op - Operation info (method, path, operationId, summary)\n * @param prefix - URL prefix for the OpenAPI section\n * @param spec - Dereferenced OpenAPI spec\n * @returns Page data with MDX content importing the spec and rendering the operation\n */\nfunction buildOperationPage(\n  op: OperationInfo,\n  prefix: string,\n  spec: Record<string, unknown>\n): PageData {\n  const slug = slugify(op.operationId)\n  const outputPath = `${stripLeadingSlash(prefix)}/${slug}.mdx`\n  const title = op.summary\n  const markdown = renderOperationMarkdown({\n    spec,\n    method: op.method,\n    path: op.path,\n    operationId: op.operationId,\n  })\n\n  const content = [\n    '---',\n    `title: ${JSON.stringify(title)}`,\n    '---',\n    '',\n    \"import spec from './openapi.json'\",\n    \"import { OpenAPIOperation } from '@ciderpress/ui/theme'\",\n    '',\n    '<OpenAPIOperation',\n    '  spec={spec}',\n    `  method={${JSON.stringify(op.method)}}`,\n    `  path={${JSON.stringify(op.path)}}`,\n    `  operationId={${JSON.stringify(op.operationId)}}`,\n    `  markdown={${JSON.stringify(markdown)}}`,\n    '/>',\n    '',\n  ].join('\\n')\n\n  return {\n    content,\n    outputPath,\n    frontmatter: { title },\n  }\n}\n\n/**\n * Build an index/overview MDX page for the OpenAPI spec.\n *\n * Includes a `LlmsMarkdownOverride` component so Rspress's SSR markdown pass\n * outputs the pre-rendered overview markdown for the `.md` endpoint.\n *\n * @private\n * @param title - Display title for the overview page\n * @param prefix - URL prefix for the OpenAPI section\n * @param spec - Dereferenced OpenAPI spec\n * @returns Page data with MDX content rendering the overview component\n */\nfunction buildIndexPage(title: string, prefix: string, spec: Record<string, unknown>): PageData {\n  const outputPath = `${stripLeadingSlash(prefix)}/index.mdx`\n  const markdown = renderOverviewMarkdown({ spec })\n\n  const content = [\n    '---',\n    `title: ${JSON.stringify(title)}`,\n    '---',\n    '',\n    \"import spec from './openapi.json'\",\n    \"import { OpenAPIOverview } from '@ciderpress/ui/theme'\",\n    '',\n    `<OpenAPIOverview spec={spec} markdown={${JSON.stringify(markdown)}} />`,\n    '',\n  ].join('\\n')\n\n  return {\n    content,\n    outputPath,\n    frontmatter: { title },\n  }\n}\n\n/**\n * Build sidebar items grouped by tag.\n *\n * @private\n * @param title - Root sidebar item title\n * @param prefix - URL prefix for linking operations\n * @param tagGroups - Operations grouped by tag\n * @param sidebarLayout - Display style for sidebar entries\n * @returns Sidebar item tree with tag groups as children\n */\nfunction buildSidebarItems(\n  title: string,\n  prefix: string,\n  tagGroups: readonly TagGroup[],\n  sidebarLayout: 'method-path' | 'title'\n): readonly SidebarItem[] {\n  const tagItems: readonly SidebarItem[] = tagGroups.map((group) => ({\n    text: capitalize(group.tag),\n    collapsed: false,\n    items: group.operations.map((op) => ({\n      text: formatSidebarText(op, sidebarLayout),\n      link: `${prefix}/${slugify(op.operationId)}`,\n    })),\n  }))\n\n  return [\n    {\n      text: title,\n      link: prefix,\n      items: tagItems,\n    },\n  ]\n}\n\n/**\n * Format sidebar text for an operation based on the configured style.\n *\n * - `'method-path'` renders an HTML string with a colored method badge\n *   (`.cp-oas-sidebar-badge--{method}`) and the API path in monospace\n *   (`.cp-oas-sidebar-path`). Rspress renders this via `dangerouslySetInnerHTML`.\n * - `'title'` renders the operation summary as plain text (e.g., \"List Users\")\n *\n * @private\n * @param op - Operation info with method and summary\n * @param style - Sidebar display style\n * @returns Formatted sidebar text string (plain or HTML)\n */\nfunction formatSidebarText(op: OperationInfo, style: 'method-path' | 'title'): string {\n  return match(style)\n    .with('title', () => op.summary)\n    .with('method-path', () => {\n      const method = op.method.toUpperCase()\n      const badge = `<span class=\"cp-oas-sidebar-badge cp-oas-sidebar-badge--${op.method}\">${method}</span>`\n      const pathHtml = `<code class=\"cp-oas-sidebar-path\">${escapeHtml(op.path)}</code>`\n      return `${badge}${pathHtml}`\n    })\n    .exhaustive()\n}\n\n/**\n * Resolve the sidebar title from config, defaulting to 'API Reference'.\n *\n * @private\n * @param config - OpenAPI config with optional title\n * @returns Resolved title string\n */\nfunction resolveTitle(config: OpenAPISpec): string {\n  return match(config.title)\n    .with(P.string, (t) => t)\n    .otherwise(() => 'API Reference')\n}\n\n/**\n * Escape HTML special characters for safe interpolation into HTML strings.\n *\n * @private\n * @param text - Raw text to escape\n * @returns HTML-escaped text\n */\nfunction escapeHtml(text: string): string {\n  return text\n    .replaceAll('&', '&amp;')\n    .replaceAll('<', '&lt;')\n    .replaceAll('>', '&gt;')\n    .replaceAll('\"', '&quot;')\n    .replaceAll(\"'\", '&#39;')\n}\n\n/**\n * Strip the leading slash from a path for use as an output path.\n *\n * @private\n * @param p - Path string that may start with '/'\n * @returns Path without leading slash\n */\nfunction stripLeadingSlash(p: string): string {\n  if (p.startsWith('/')) {\n    return p.slice(1)\n  }\n  return p\n}\n","import path from 'node:path'\n\nimport { hasGlobChars } from '@ciderpress/config'\n\n/**\n * Bare filenames of coding-agent instruction files that must never be pulled\n * into the docs site by a content glob.\n *\n * These files (Claude Code's `CLAUDE.md`, the `AGENTS.md` convention, Gemini\n * CLI's `GEMINI.md`, etc.) live at arbitrary depths in a repo and are written\n * for agents, not readers. Matching is case-sensitive against the uppercase\n * convention only — a lowercase `claude.md` is treated as ordinary content,\n * since the agent-file convention is effectively always uppercase.\n *\n * Extend this list to exclude additional agent instruction files.\n */\nexport const AGENT_INSTRUCTION_FILES: readonly string[] = [\n  'CLAUDE.md',\n  'AGENTS.md',\n  'AGENT.md',\n  'GEMINI.md',\n]\n\n/**\n * Whether a bare filename is a known coding-agent instruction file.\n *\n * @param filename - A bare filename with no directory component (e.g. `CLAUDE.md`)\n * @returns True when the name exactly matches an uppercase agent instruction file\n */\nexport function isAgentInstructionFile(filename: string): boolean {\n  return AGENT_INSTRUCTION_FILES.includes(filename)\n}\n\n/**\n * Drop agent instruction files that a glob swept up, while keeping any that a\n * literal include named directly.\n *\n * A glob such as `**\\/*.md` should never surface `CLAUDE.md`, but an include of\n * `docs/CLAUDE.md` (no glob metacharacters) is an explicit request and is kept.\n *\n * @param files - Repo-relative file paths returned by fast-glob\n * @param patterns - The include patterns that produced `files`\n * @returns `files` with globbed agent instruction files removed\n */\nexport function excludeGlobbedAgentFiles(\n  files: readonly string[],\n  patterns: readonly string[]\n): readonly string[] {\n  const explicit = new Set(patterns.filter((p) => !hasGlobChars(p)).map(normalizeRelative))\n\n  return files.filter((file) => {\n    if (!isAgentInstructionFile(path.basename(file))) {\n      return true\n    }\n    return explicit.has(normalizeRelative(file))\n  })\n}\n\n/**\n * Normalize a relative path for equality comparison — POSIX separators, no `./`.\n *\n * @private\n * @param p - A relative path from an include pattern or glob result\n * @returns The normalized POSIX-style relative path\n */\nfunction normalizeRelative(p: string): string {\n  return p.replace(/\\\\/g, '/').replace(/^\\.\\//, '')\n}\n","import { dirname, extname } from 'node:path'\n\nimport { match } from 'massaman/match'\n\n/**\n * Slugs that identify entry/overview pages, in priority order.\n *\n * Used by the sort comparator (pinned-first) and by auto-nav resolution\n * to prefer a real content page over a generated landing page.\n */\nexport const ENTRY_SLUGS = ['introduction', 'intro', 'overview', 'index', 'readme'] as const\n\n/**\n * Check whether a URL-style link ends with a known entry-page slug.\n *\n * @param link - URL path (e.g. \"/guides/overview\")\n * @returns True when the last segment matches an entry slug\n */\nexport function isEntrySlug(link: string): boolean {\n  const last = link.split('/').pop()\n  if (!last) {\n    return false\n  }\n  return (ENTRY_SLUGS as readonly string[]).includes(last.toLowerCase())\n}\n\n/**\n * Return the priority index of an entry slug, or -1 if not an entry slug.\n *\n * Lower values indicate higher priority (introduction > intro > overview > index > readme).\n *\n * @param slug - Bare filename stem (e.g. \"overview\", \"readme\")\n * @returns Index in ENTRY_SLUGS, or -1\n */\nexport function entrySlugRank(slug: string): number {\n  return (ENTRY_SLUGS as readonly string[]).indexOf(slug.toLowerCase())\n}\n\n/**\n * Convert \"/guides/add-api-route\" → \"guides/add-api-route.md\"\n *\n * Accepts an optional extension override (e.g. `'.mdx'`) to preserve\n * the source file format through to the output path.\n *\n * @param link - URL-style link path (e.g. \"/guides/add-api-route\")\n * @param ext - Output file extension (defaults to \".md\")\n * @returns Relative output path with extension (e.g. \"guides/add-api-route.md\")\n */\nexport function linkToOutputPath(link: string, ext = '.md'): string {\n  const clean = match(link.startsWith('/'))\n    .with(true, () => link.slice(1))\n    .otherwise(() => link)\n  if (clean === '' || clean === '/') {\n    return `index${ext}`\n  }\n  return `${clean}${ext}`\n}\n\n/**\n * Return the output extension for a source file path.\n *\n * Preserves `.mdx` when present so Rspress processes the file through\n * the MDX pipeline. All other extensions default to `.md`.\n *\n * @param filePath - Absolute or relative path to a source file\n * @returns \".mdx\" for MDX files, \".md\" for everything else\n */\nexport function sourceExt(filePath: string): string {\n  return match(extname(filePath))\n    .with('.mdx', () => '.mdx')\n    .otherwise(() => '.md')\n}\n\n/**\n * Extract the static base directory from a glob pattern.\n *\n * @param globPattern - Glob pattern to extract the base from\n * @returns Static directory path before any glob characters\n */\nexport function extractBaseDir(globPattern: string): string {\n  const firstGlobChar = globPattern.search(/[*?{}[\\]]/)\n  if (firstGlobChar === -1) {\n    return dirname(globPattern)\n  }\n  const beforeGlob = globPattern.slice(0, firstGlobChar)\n  return match(beforeGlob.endsWith('/'))\n    .with(true, () => beforeGlob.slice(0, -1))\n    .otherwise(() => dirname(beforeGlob))\n}\n","/**\n * Standard HTML elements that Rspress renders natively.\n *\n * Tags in this set are preserved during XML stripping so they\n * appear in the final output (e.g. `<details>` accordions).\n */\nconst PRESERVED_HTML_TAGS: ReadonlySet<string> = new Set([\n  'details',\n  'summary',\n  'dialog',\n  'div',\n  'p',\n  'blockquote',\n  'pre',\n  'figure',\n  'figcaption',\n  'hr',\n  'br',\n  'h1',\n  'h2',\n  'h3',\n  'h4',\n  'h5',\n  'h6',\n  'span',\n  'a',\n  'em',\n  'strong',\n  'code',\n  'del',\n  'ins',\n  'mark',\n  'sub',\n  'sup',\n  'kbd',\n  'abbr',\n  'small',\n  'img',\n  'video',\n  'audio',\n  'source',\n  'picture',\n  'table',\n  'thead',\n  'tbody',\n  'tfoot',\n  'tr',\n  'th',\n  'td',\n  'caption',\n  'colgroup',\n  'col',\n  'ul',\n  'ol',\n  'li',\n  'dl',\n  'dt',\n  'dd',\n])\n\n/**\n * Strip custom XML tags from markdown while preserving code blocks\n * and standard HTML elements.\n *\n * Planning documents use XML-style structural tags (`<tasks>`, `<task>`,\n * `<status>`, `<criterion>`, etc.) that Rspress interprets as React\n * components. This strips those tags while keeping their text content,\n * standard HTML elements (like `<details>` accordions), and fenced\n * code blocks untouched.\n *\n * @param markdown - Raw markdown string potentially containing XML tags\n * @returns Cleaned markdown with custom XML tags removed\n */\nexport function stripXmlTags(markdown: string): string {\n  const parts = markdown.split(/(```[\\s\\S]*?```)/g)\n\n  const stripped = parts\n    .map((part, i) => {\n      if (i % 2 === 1) {\n        return part\n      }\n      return part.replaceAll(/<\\/?([a-zA-Z][\\w-]*)[^>]*>/g, (tag, name: string) => {\n        if (PRESERVED_HTML_TAGS.has(name.toLowerCase())) {\n          return tag\n        }\n        return ''\n      })\n    })\n    .join('')\n\n  return stripped.replaceAll(/\\n{3,}/g, '\\n\\n')\n}\n","import { existsSync } from 'node:fs'\nimport fs from 'node:fs/promises'\nimport path from 'node:path'\n\nimport fg from 'fast-glob'\nimport { groupBy } from 'massaman/array'\nimport { range } from 'massaman/math'\n\nimport { excludeGlobbedAgentFiles } from './agent-files.ts'\nimport { linkToOutputPath } from './resolve/path.ts'\nimport { deriveText, kebabToTitle } from './resolve/text.ts'\nimport { stripXmlTags } from './strip-xml.ts'\nimport type { PageData, SyncContext } from './types.ts'\n\n/**\n * Directory name at repo root containing planning docs.\n */\nconst PLANNING_DIR = '.planning'\n\n/**\n * URL prefix for planning pages (no leading dot).\n */\nconst PLANNING_PREFIX = '/planning'\n\n/**\n * Frontmatter applied to all planning pages — hides sidebar and constrains width.\n */\nconst PLANNING_FRONTMATTER = { sidebar: false, pageClass: 'planning-page' } as const\n\n/**\n * Discover planning documents from the `.planning/` directory at repo root.\n *\n * Scans for `**\\/*.md` files, maps each to a `/planning/<relative-slug>` route,\n * and generates a virtual index page listing all discovered docs.\n * Planning pages are intentionally excluded from sidebar and nav.\n *\n * XML-style structural tags in planning docs are stripped during copy so\n * Rspress does not attempt to render them as React components.\n *\n * @param ctx - The current sync context (provides repoRoot and outDir)\n * @returns Array of PageData for the copy pipeline; empty array if `.planning/` does not exist\n */\nexport async function discoverPlanningPages(ctx: SyncContext): Promise<readonly PageData[]> {\n  const planningDir = path.resolve(ctx.repoRoot, PLANNING_DIR)\n\n  if (!existsSync(planningDir)) {\n    return []\n  }\n\n  const matched = await fg('**/*.md', {\n    cwd: planningDir,\n    onlyFiles: true,\n    ignore: ['**/_*'],\n  })\n  const files = excludeGlobbedAgentFiles(matched, ['**/*.md'])\n\n  if (files.length === 0) {\n    return []\n  }\n\n  const docPages: readonly PageData[] = files.map((relativePath) => {\n    const sourcePath = path.resolve(planningDir, relativePath)\n    const slug = relativePath.replace(/\\.md$/, '')\n\n    return {\n      content: async () => {\n        const raw = await fs.readFile(sourcePath, 'utf8')\n        return stripXmlTags(raw)\n      },\n      outputPath: linkToOutputPath(`${PLANNING_PREFIX}/${slug}`),\n      frontmatter: PLANNING_FRONTMATTER,\n    } satisfies PageData\n  })\n\n  const indexPage: PageData = {\n    content: () => generatePlanningIndex(files, planningDir),\n    outputPath: linkToOutputPath(PLANNING_PREFIX),\n    frontmatter: PLANNING_FRONTMATTER,\n  }\n\n  return [indexPage, ...docPages]\n}\n\n/**\n * File entry with derived title and path info.\n *\n * @private\n */\ninterface FileEntry {\n  readonly slug: string\n  readonly title: string\n}\n\n/**\n * Directory node grouping files under a heading.\n *\n * @private\n */\ninterface DirNode {\n  readonly name: string\n  readonly title: string\n  readonly files: readonly FileEntry[]\n}\n\n/**\n * Enriched file entry with directory context for partitioning.\n *\n * @private\n */\ninterface EnrichedEntry {\n  readonly slug: string\n  readonly title: string\n  readonly dirName: string | undefined\n}\n\n/**\n * Generate the planning index page with hierarchical layout.\n *\n * Direct children of `.planning/` appear first (e.g. `plan.md`),\n * followed by each subdirectory as a section with its own heading.\n * Files within directories are sorted naturally (numeric-aware).\n *\n * @private\n * @param files - Relative file paths discovered in the planning directory\n * @param planningDir - Absolute path to the planning directory\n * @returns Markdown string for the planning index page\n */\nasync function generatePlanningIndex(\n  files: readonly string[],\n  planningDir: string\n): Promise<string> {\n  const entries: readonly EnrichedEntry[] = await Promise.all(\n    files.map(async (relativePath) => {\n      const slug = relativePath.replace(/\\.md$/, '')\n      const sourcePath = path.resolve(planningDir, relativePath)\n      const title = await deriveText(sourcePath, path.basename(slug), 'heading')\n      const segments = relativePath.split('/')\n\n      const dirName = resolveDirName(segments)\n\n      return { slug, title, dirName } satisfies EnrichedEntry\n    })\n  )\n\n  const rootFiles: readonly FileEntry[] = entries\n    .filter((e) => e.dirName === undefined)\n    .toSorted((a, b) => naturalCompare(a.slug, b.slug))\n\n  const grouped = groupBy(\n    entries.filter((e): e is EnrichedEntry & { dirName: string } => e.dirName !== undefined),\n    (e) => e.dirName\n  )\n\n  const dirs: readonly DirNode[] = Object.entries(grouped)\n    .toSorted(([a], [b]) => naturalCompare(a, b))\n    .map(([dirName, dirEntries]) => ({\n      name: dirName,\n      title: kebabToTitle(dirName),\n      files: dirEntries\n        .map((e): FileEntry => ({ slug: e.slug, title: e.title }))\n        .toSorted((a, b) => naturalCompare(a.slug, b.slug)),\n    }))\n\n  const rootSection = resolveRootSection(rootFiles)\n\n  const dirSections = dirs.map((dir) => {\n    const heading = `## ${dir.title}\\n`\n    const links = dir.files.map((e) => `- [${e.title}](${PLANNING_PREFIX}/${e.slug})`).join('\\n')\n    return `${heading}\\n${links}`\n  })\n\n  const sections = ['# Planning\\n\\nInternal planning documents.\\n', ...rootSection, ...dirSections]\n\n  return `${sections.join('\\n\\n')}\\n`\n}\n\n/**\n * Natural sort comparator — numeric segments are compared by value\n * so \"phase-2\" sorts before \"phase-10\".\n *\n * @private\n * @param a - First string to compare\n * @param b - Second string to compare\n * @returns Negative, zero, or positive number for sort ordering\n */\nfunction naturalCompare(a: string, b: string): number {\n  const aParts = a.split(/(\\d+)/)\n  const bParts = b.split(/(\\d+)/)\n  const len = Math.min(aParts.length, bParts.length)\n\n  const indices = range(len)\n\n  const result = indices.reduce<number | null>((acc, idx) => {\n    if (acc !== null) {\n      return acc\n    }\n\n    const aPart = aParts[idx]\n    const bPart = bParts[idx]\n\n    if (/^\\d+$/.test(aPart) && /^\\d+$/.test(bPart)) {\n      const diff = Number(aPart) - Number(bPart)\n      if (diff !== 0) {\n        return diff\n      }\n      return null\n    }\n\n    if (aPart < bPart) {\n      return -1\n    }\n    if (aPart > bPart) {\n      return 1\n    }\n\n    return null\n  }, null)\n\n  if (result !== null) {\n    return result\n  }\n\n  return aParts.length - bParts.length\n}\n\n/**\n * Extract the directory name from path segments, or undefined for root-level files.\n *\n * @private\n * @param segments - Path segments split by '/'\n * @returns First segment as directory name, or undefined for single-segment paths\n */\nfunction resolveDirName(segments: readonly string[]): string | undefined {\n  if (segments.length > 1) {\n    return segments[0]\n  }\n  return undefined\n}\n\n/**\n * Render root-level planning files as a markdown link list.\n *\n * @private\n * @param rootFiles - File entries at the planning directory root\n * @returns Array with a single markdown string, or empty if no root files\n */\nfunction resolveRootSection(rootFiles: readonly FileEntry[]): readonly string[] {\n  if (rootFiles.length === 0) {\n    return []\n  }\n  return [rootFiles.map((e) => `- [${e.title}](${PLANNING_PREFIX}/${e.slug})`).join('\\n')]\n}\n","export type { ConfigError, ConfigResult } from '@ciderpress/config'\nexport { configError } from '@ciderpress/config'\n\n/**\n * Error produced by the sync engine during entry resolution, page copy, or sidebar generation.\n */\nexport interface SyncError {\n  readonly _tag: 'SyncError'\n  readonly type: 'missing_from' | 'missing_link' | 'file_not_found' | 'missing_content' | 'internal'\n  readonly message: string\n}\n\n/**\n * Convenience alias for sync operation results.\n *\n * Named `SyncOutcome` to avoid collision with the `SyncResult` interface\n * in `sync/index.ts` (which represents the aggregate return value of a full sync pass).\n */\nexport type SyncOutcome<T> = readonly [SyncError, null] | readonly [null, T]\n\n/**\n * Create a `SyncError` value.\n *\n * @param type - Error classification\n * @param message - Human-readable description\n * @returns A frozen `SyncError` object\n */\nexport function syncError(type: SyncError['type'], message: string): SyncError {\n  return Object.freeze({ _tag: 'SyncError' as const, type, message })\n}\n\n/**\n * Collect results from an array, short-circuiting on the first error.\n *\n * @param results - Array of Result tuples to collect\n * @returns Either the first error encountered, or an array of all success values\n */\nexport function collectResults<T, E>(\n  results: readonly (readonly [E, null] | readonly [null, T])[]\n): readonly [E, null] | readonly [null, readonly T[]] {\n  return results.reduce<readonly [E, null] | readonly [null, readonly T[]]>(\n    (acc, result) => {\n      const [accErr] = acc\n      if (accErr !== null) {\n        return acc\n      }\n      const [err, val] = result\n      if (err !== null) {\n        return [err, null] as const\n      }\n      const [, prevValues] = acc as readonly [null, readonly T[]]\n      return [null, [...prevValues, val as T]] as const\n    },\n    [null, []] as const\n  )\n}\n","import { basename, extname } from 'node:path'\n\nimport type { ResolvedPage } from '@ciderpress/config'\nimport { match, P } from 'massaman/match'\n\nimport type { ResolvedEntry } from '../types.ts'\nimport { entrySlugRank } from './path.ts'\n\n/**\n * Sort resolved entries using the specified strategy.\n *\n * Sections (entries with children) always sort before leaf pages.\n * When no sort strategy is provided, entries are sorted with pinned entry-style\n * files first (see `ENTRY_SLUGS`), then alpha by title.\n *\n * @param entries - Entries to sort\n * @param sort - Sort strategy: `\"default\"` (pinned + alpha), `\"alpha\"` by text, `\"filename\"` by output path, or custom comparator\n * @returns Sorted copy of the entries array\n */\nexport function sortEntries(\n  entries: readonly ResolvedEntry[],\n  sort:\n    | 'default'\n    | 'alpha'\n    | 'filename'\n    | 'none'\n    | ((a: ResolvedPage, b: ResolvedPage) => number) = 'default'\n): ResolvedEntry[] {\n  return match(sort)\n    .with('none', () => [...entries])\n    .with('default', () => entries.toSorted(defaultCompare))\n    .with('alpha', () =>\n      entries.toSorted((a, b) => sectionFirst(a, b) || a.title.localeCompare(b.title))\n    )\n    .with('filename', () =>\n      entries.toSorted((a, b) => {\n        const rank = sectionFirst(a, b)\n        if (rank !== 0) {\n          return rank\n        }\n        const aKey = match(a.page)\n          .with(P.nonNullable, (p) => p.outputPath)\n          .otherwise(() => a.title)\n        const bKey = match(b.page)\n          .with(P.nonNullable, (p) => p.outputPath)\n          .otherwise(() => b.title)\n        return aKey.localeCompare(bKey)\n      })\n    )\n    .otherwise((comparator) =>\n      entries.toSorted((a, b) => comparator(toResolvedPage(a), toResolvedPage(b)))\n    )\n}\n\n/**\n * Default comparator: sections first, then pinned intro files, then alpha by title.\n *\n * @private\n * @param a - First entry to compare\n * @param b - Second entry to compare\n * @returns Standard comparator result\n */\nfunction defaultCompare(a: ResolvedEntry, b: ResolvedEntry): number {\n  return sectionFirst(a, b) || pinnedFirst(a, b) || a.title.localeCompare(b.title)\n}\n\n/**\n * Return 0 for sections (entries with children), 1 for leaf pages.\n *\n * @private\n * @param entry - Entry to rank\n * @returns 0 if section, 1 if leaf\n */\nfunction sectionRank(entry: ResolvedEntry): number {\n  if (entry.items !== undefined && entry.items.length > 0) {\n    return 0\n  }\n  return 1\n}\n\n/**\n * Sections (entries with items) sort before leaf pages.\n *\n * @private\n * @param a - First entry to compare\n * @param b - Second entry to compare\n * @returns Negative if a is a section, positive if b is, zero if equal\n */\nfunction sectionFirst(a: ResolvedEntry, b: ResolvedEntry): number {\n  return sectionRank(a) - sectionRank(b)\n}\n\n/**\n * Rank an entry by its pinned stem position, returning -1 if not pinned.\n *\n * @private\n * @param entry - Entry to rank\n * @returns Index in ENTRY_SLUGS, or -1 if not a pinned file\n */\nfunction pinnedRank(entry: ResolvedEntry): number {\n  if (!entry.page) {\n    return -1\n  }\n  const { source } = entry.page\n  if (!source) {\n    return -1\n  }\n  const stem = basename(source, extname(source))\n  return entrySlugRank(stem)\n}\n\n/**\n * Sort pinned entry-style files before all others, preserving their relative order.\n *\n * @private\n * @param a - First entry to compare\n * @param b - Second entry to compare\n * @returns Negative if a is pinned first, positive if b is, zero if equal priority\n */\nfunction pinnedFirst(a: ResolvedEntry, b: ResolvedEntry): number {\n  const aRank = pinnedRank(a)\n  const bRank = pinnedRank(b)\n  if (aRank !== -1 && bRank !== -1) {\n    return aRank - bRank\n  }\n  if (aRank !== -1) {\n    return -1\n  }\n  if (bRank !== -1) {\n    return 1\n  }\n  return 0\n}\n\n/**\n * Convert a ResolvedEntry to a ResolvedPage for custom sort comparators.\n *\n * @private\n * @param entry - Resolved entry to convert\n * @returns Resolved page shape with title, link, source, and frontmatter\n */\nfunction toResolvedPage(entry: ResolvedEntry): ResolvedPage {\n  const page = match(entry.page)\n    .with(P.nonNullable, (p) => ({ source: p.source, frontmatter: p.frontmatter }))\n    .otherwise(() => ({ source: undefined, frontmatter: {} }))\n  return {\n    title: entry.title,\n    link: match(entry.link)\n      .with(P.nonNullable, (l) => l)\n      .otherwise(() => ''),\n    source: page.source,\n    frontmatter: page.frontmatter,\n  }\n}\n","import path from 'node:path'\n\nimport { normalizeInclude } from '@ciderpress/config'\nimport type { Page, Frontmatter, SortStrategy } from '@ciderpress/config'\nimport { log } from '@clack/prompts'\nimport fg from 'fast-glob'\nimport { match, P } from 'massaman/match'\nimport { isNotNil } from 'massaman/predicate'\n\nimport { excludeGlobbedAgentFiles } from '../agent-files.ts'\nimport type { ResolvedEntry, SyncContext } from '../types.ts'\nimport { extractBaseDir, linkToOutputPath, sourceExt } from './path.ts'\nimport { sortEntries } from './sort.ts'\nimport { deriveText, kebabToTitle, resolveSectionTitle } from './text.ts'\n\n/**\n * Resolve a recursive glob pattern into a nested page tree.\n *\n * Scans all files matching the glob, groups them by directory structure,\n * and produces a nested `ResolvedEntry` tree mirroring the filesystem.\n *\n * @param section - Page config with a recursive glob `include` pattern\n * @param ctx - Sync context (provides repo root, exclude patterns, quiet flag)\n * @param frontmatter - Merged frontmatter inherited from parent pages\n * @param depth - Current nesting depth for collapsible auto-detection\n * @returns Flat or nested resolved entries matching the glob\n */\nexport async function resolveRecursiveGlob(\n  section: Page,\n  ctx: SyncContext,\n  frontmatter: Frontmatter,\n  depth: number\n): Promise<ResolvedEntry[]> {\n  const globalIgnore = match(ctx.config.discover)\n    .with(P.nonNullable, (d) => d.ignore ?? [])\n    .otherwise(() => [] as readonly string[])\n  const sectionIgnore = match(section.discover)\n    .with(P.nonNullable, (d) => d.ignore ?? [])\n    .otherwise(() => [] as readonly string[])\n  const ignore = [...globalIgnore, ...sectionIgnore]\n  const indexFile = match(section.discover)\n    .with(P.nonNullable, (d) => d.indexFile)\n    .otherwise(() => undefined)\n  const sort = match(section.discover)\n    .with(P.nonNullable, (d) => d.sort)\n    .otherwise(() => undefined)\n  const collapsible = match(section.nav)\n    .with(P.nonNullable, (n) => n.collapsible)\n    .otherwise(() => undefined)\n  const entryFile = indexFile ?? 'overview'\n\n  const patterns = normalizeInclude(section.include)\n  if (patterns.length === 0) {\n    log.error('[ciderpress] resolveRecursiveGlob called without page.include')\n    return []\n  }\n\n  const matched = await fg(patterns as string[], {\n    cwd: ctx.repoRoot,\n    ignore,\n    absolute: false,\n    onlyFiles: true,\n  })\n  const files = excludeGlobbedAgentFiles(matched, patterns)\n\n  const titleStr = resolveSectionTitle(section)\n\n  if (files.length === 0) {\n    if (!ctx.quiet) {\n      log.warn(`Glob \"${String(section.include)}\" matched 0 files for \"${titleStr}\"`)\n    }\n    return []\n  }\n\n  const baseDir = extractBaseDir(patterns[0])\n  const prefix = section.path ?? ''\n\n  const titleConfig = match(section.title)\n    .when(\n      (\n        t\n      ): t is {\n        from: 'auto' | 'filename' | 'heading' | 'frontmatter'\n        transform?: (text: string, slug: string) => string\n      } => typeof t === 'object' && t !== null && 'from' in t,\n      (t) => t\n    )\n    .otherwise(() => null)\n  const titleFrom = match(titleConfig)\n    .with(P.nonNullable, (tc) => tc.from)\n    .otherwise(() => 'auto' as const)\n  const titleTransform = match(titleConfig)\n    .with(P.nonNullable, (tc) => tc.transform ?? null)\n    .otherwise(() => null)\n\n  const root = buildDirTree(files, baseDir)\n  return buildEntryTree({\n    node: root,\n    prefix,\n    titleFrom,\n    titleTransform,\n    sort,\n    collapsible,\n    entryFile,\n    ctx,\n    frontmatter,\n    depth,\n  })\n}\n\n/**\n * A node in the directory tree built from glob results.\n *\n * @private\n */\ninterface DirNode {\n  /**\n   * Files directly in this directory (repo-relative paths).\n   */\n  readonly files: readonly string[]\n  /**\n   * Subdirectories keyed by directory name.\n   */\n  readonly subdirs: ReadonlyMap<string, DirNode>\n}\n\n/**\n * Group a flat file list into a directory tree.\n *\n * @private\n * @param files - Repo-relative file paths from the glob\n * @param baseDir - Static base directory prefix to strip\n * @returns Root directory node containing the full tree\n */\nfunction buildDirTree(files: readonly string[], baseDir: string): DirNode {\n  const basePrefixLen = match(baseDir.length > 0)\n    .with(true, () => baseDir.length + 1)\n    .otherwise(() => 0)\n\n  // NOTE: Intentional mutation — tree-building via nested Map/Array insert; immutable rebuild would require deep-cloning nested Maps on every insert\n  return files.reduce<{\n    files: string[]\n    subdirs: Map<string, { files: string[]; subdirs: Map<string, unknown> }>\n  }>(\n    (tree, file) => {\n      const rel = file.slice(basePrefixLen)\n      const segments = rel.split('/')\n      const dirSegments = segments.slice(0, -1)\n\n      const current = dirSegments.reduce(\n        (\n          acc: {\n            files: string[]\n            subdirs: Map<string, { files: string[]; subdirs: Map<string, unknown> }>\n          },\n          seg\n        ) => {\n          if (!acc.subdirs.has(seg)) {\n            acc.subdirs.set(seg, { files: [], subdirs: new Map() })\n          }\n          return acc.subdirs.get(seg) as {\n            files: string[]\n            subdirs: Map<string, { files: string[]; subdirs: Map<string, unknown> }>\n          }\n        },\n        tree\n      )\n\n      current.files.push(file)\n      return tree\n    },\n    { files: [], subdirs: new Map() }\n  ) as unknown as DirNode\n}\n\n/**\n * Parameters for `buildEntryTree` — grouped into an object to avoid positional ambiguity.\n *\n * @private\n */\ninterface BuildEntryTreeParams {\n  readonly node: DirNode\n  readonly prefix: string\n  readonly titleFrom: 'auto' | 'filename' | 'heading' | 'frontmatter'\n  readonly titleTransform: ((text: string, slug: string) => string) | null\n  readonly sort: SortStrategy | undefined\n  readonly collapsible: boolean | undefined\n  readonly entryFile: string\n  readonly ctx: SyncContext\n  readonly frontmatter: Frontmatter\n  readonly depth: number\n}\n\n/**\n * Recursively convert a DirNode tree into ResolvedEntry[].\n *\n * The `entryFile` (default `\"overview\"`) in each directory becomes the section\n * header page and is excluded from the child list to avoid duplication.\n *\n * @private\n * @param params - Tree building parameters including node, prefix, and context\n * @returns Resolved entries for all files and subdirectories\n */\nasync function buildEntryTree(params: BuildEntryTreeParams): Promise<ResolvedEntry[]> {\n  const {\n    node,\n    prefix,\n    titleFrom,\n    titleTransform,\n    sort,\n    collapsible,\n    entryFile,\n    ctx,\n    frontmatter,\n    depth,\n  } = params\n\n  // Files at this level — exclude the entry file (it becomes the section header)\n  const nonIndexFiles = node.files.filter(\n    (file) => path.basename(file, path.extname(file)) !== entryFile\n  )\n\n  const fileEntries = await Promise.all(\n    nonIndexFiles.map(async (file) => {\n      const ext = sourceExt(file)\n      const slug = path.basename(file, path.extname(file))\n      const link = `${prefix}/${slug}`\n      const sourcePath = path.resolve(ctx.repoRoot, file)\n      const rawTitle = await deriveText(sourcePath, slug, titleFrom)\n      const title = match(titleTransform)\n        .with(P.nonNullable, (t) => t(rawTitle, slug))\n        .otherwise(() => rawTitle)\n\n      return {\n        title,\n        link,\n        page: {\n          source: sourcePath,\n          outputPath: linkToOutputPath(link, ext),\n          frontmatter,\n        },\n      } satisfies ResolvedEntry\n    })\n  )\n\n  const subdirEntries = await Promise.all(\n    [...node.subdirs].map(async ([dirName, subNode]) => {\n      const subPrefix = `${prefix}/${dirName}`\n\n      const entryFilePath = subNode.files.find(\n        (f) => path.basename(f, path.extname(f)) === entryFile\n      )\n\n      const { sectionTitle, sectionPage } = await resolveSubdirSection({\n        entryFilePath,\n        dirName,\n        subPrefix,\n        entryFile,\n        titleFrom,\n        titleTransform,\n        ctx,\n        frontmatter,\n      })\n\n      const children = await buildEntryTree({\n        node: subNode,\n        prefix: subPrefix,\n        titleFrom,\n        titleTransform,\n        sort,\n        collapsible,\n        entryFile,\n        ctx,\n        frontmatter,\n        depth: depth + 1,\n      })\n\n      const sorted = sortEntries(children, sort)\n\n      // Explicit collapsible wins, otherwise auto-collapse below top level\n      const autoEffectiveCollapsible = resolveAutoCollapsible(depth)\n      const effectiveCollapsible = collapsible ?? autoEffectiveCollapsible\n\n      const sectionLink = resolveSectionLink(entryFilePath, subPrefix, entryFile)\n\n      return {\n        title: sectionTitle,\n        link: sectionLink,\n        collapsible: effectiveCollapsible,\n        items: sorted,\n        page: sectionPage,\n      } satisfies ResolvedEntry\n    })\n  )\n\n  return sortEntries([...fileEntries, ...subdirEntries], sort)\n}\n\n/**\n * Parameters for `resolveSubdirSection`.\n *\n * @private\n */\ninterface ResolveSubdirSectionParams {\n  readonly entryFilePath: string | undefined\n  readonly dirName: string\n  readonly subPrefix: string\n  readonly entryFile: string\n  readonly titleFrom: 'auto' | 'filename' | 'heading' | 'frontmatter'\n  readonly titleTransform: ((text: string, slug: string) => string) | null\n  readonly ctx: SyncContext\n  readonly frontmatter: Frontmatter\n}\n\n/**\n * Resolve the section title and optional page for a subdirectory entry.\n *\n * When an entry file exists, derives the section heading from it and\n * creates a page entry. Otherwise falls back to kebab-to-title of the\n * directory name.\n *\n * @private\n * @param params - Subdirectory resolution parameters\n * @returns Object with section title and optional page data\n */\nasync function resolveSubdirSection(\n  params: ResolveSubdirSectionParams\n): Promise<{ sectionTitle: string; sectionPage: ResolvedEntry['page'] | undefined }> {\n  const {\n    entryFilePath,\n    dirName,\n    subPrefix,\n    entryFile,\n    titleFrom,\n    titleTransform,\n    ctx,\n    frontmatter,\n  } = params\n\n  if (entryFilePath) {\n    const ext = sourceExt(entryFilePath)\n    const sourcePath = path.resolve(ctx.repoRoot, entryFilePath)\n    const rawTitle = await deriveText(sourcePath, dirName, titleFrom)\n    const sectionTitle = match(titleTransform)\n      .with(P.nonNullable, (t) => t(rawTitle, dirName))\n      .otherwise(() => rawTitle)\n    const sectionPage: ResolvedEntry['page'] = {\n      source: sourcePath,\n      outputPath: linkToOutputPath(`${subPrefix}/${entryFile}`, ext),\n      frontmatter,\n    }\n    return { sectionTitle, sectionPage }\n  }\n  const rawTitle = kebabToTitle(dirName)\n  const sectionTitle = match(titleTransform)\n    .with(P.nonNullable, (t) => t(rawTitle, dirName))\n    .otherwise(() => rawTitle)\n  return { sectionTitle, sectionPage: undefined }\n}\n\n/**\n * Determine whether a section should be auto-collapsed based on depth.\n *\n * @private\n * @param depth - Current nesting depth\n * @returns True for depths greater than 0, undefined otherwise\n */\nfunction resolveAutoCollapsible(depth: number): true | undefined {\n  if (depth > 0) {\n    return true as const\n  }\n  return undefined\n}\n\n/**\n * Resolve the section link when an entry file exists.\n *\n * @private\n * @param entryFilePath - Path to the entry file, or undefined\n * @param subPrefix - URL prefix for the subdirectory\n * @param entryFile - Entry file name (e.g. 'overview')\n * @returns Link to the entry page, or undefined\n */\nfunction resolveSectionLink(\n  entryFilePath: string | undefined,\n  subPrefix: string,\n  entryFile: string\n): string | undefined {\n  if (isNotNil(entryFilePath)) {\n    return `${subPrefix}/${entryFile}`\n  }\n  return undefined\n}\n","import fs from 'node:fs'\nimport path from 'node:path'\n\nimport { hasAnyGlobInclude, isSingleFileInclude, normalizeInclude } from '@ciderpress/config'\nimport type { Page, Frontmatter } from '@ciderpress/config'\nimport { log } from '@clack/prompts'\nimport fg from 'fast-glob'\nimport { match, P } from 'massaman/match'\nimport { isNil, isNotNil, isString } from 'massaman/predicate'\n\nimport { excludeGlobbedAgentFiles } from '../agent-files.ts'\nimport { syncError, collectResults } from '../errors.ts'\nimport type { SyncError, SyncOutcome } from '../errors.ts'\nimport type { ResolvedEntry, SyncContext } from '../types.ts'\nimport { extractBaseDir, linkToOutputPath, sourceExt } from './path.ts'\nimport { resolveRecursiveGlob } from './recursive.ts'\nimport { sortEntries } from './sort.ts'\nimport { deriveText, resolveSectionTitle } from './text.ts'\n\n/**\n * Walk the Page tree and produce a ResolvedEntry tree.\n *\n * Resolves globs, derives text, merges frontmatter, deduplicates.\n * Returns a `SyncOutcome` tuple — the caller is responsible for\n * surfacing errors and exiting.\n *\n * @param pages - Config page tree to resolve\n * @param ctx - Sync context (provides repo root, config, quiet flag)\n * @param inheritedFrontmatter - Frontmatter inherited from parent pages\n * @param depth - Current nesting depth (0 = top-level)\n * @returns Result tuple containing resolved entry tree or the first sync error\n */\nexport async function resolveEntries(\n  pages: readonly Page[],\n  ctx: SyncContext,\n  inheritedFrontmatter: Frontmatter = {},\n  depth = 0\n): Promise<readonly [SyncError, null] | readonly [null, ResolvedEntry[]]> {\n  const results = await Promise.all(\n    pages.map((page) => resolveSection(page, ctx, inheritedFrontmatter, depth))\n  )\n\n  const result = collectResults(results)\n  const [err] = result\n  if (err) {\n    return [err, null]\n  }\n\n  const [, collected] = result as readonly [null, readonly ResolvedEntry[]]\n  return [null, [...collected]]\n}\n\n/**\n * Resolve a single page node — dispatches to leaf, virtual, or nested section handler.\n *\n * @private\n * @param section - Page config node to resolve\n * @param ctx - Sync context\n * @param inheritedFrontmatter - Frontmatter inherited from parent\n * @param depth - Current nesting depth\n * @returns Sync outcome tuple with resolved entry or error\n */\nfunction resolveSection(\n  section: Page,\n  ctx: SyncContext,\n  inheritedFrontmatter: Frontmatter,\n  depth: number\n): Promise<SyncOutcome<ResolvedEntry>> {\n  const mergedFm = { ...inheritedFrontmatter, ...section.defaults }\n\n  if (isSingleFileInclude(section.include) && !section.pages) {\n    return Promise.resolve(resolveFilePage(section, ctx, mergedFm))\n  }\n\n  if (isNotNil(section.content) && section.path) {\n    return Promise.resolve(resolveVirtualPage(section, mergedFm))\n  }\n\n  return resolveNestedSection(section, ctx, mergedFm, depth)\n}\n\n/**\n * Resolve a leaf page backed by a single source file.\n *\n * @private\n * @param section - Page config with `include` pointing to a file\n * @param ctx - Sync context\n * @param frontmatter - Merged frontmatter for the page\n * @returns Sync outcome with resolved entry or error\n */\nfunction resolveFilePage(\n  section: Page,\n  ctx: SyncContext,\n  frontmatter: Frontmatter\n): SyncOutcome<ResolvedEntry> {\n  const { include } = section\n  if (isNil(include) || !isString(include)) {\n    return [\n      syncError('missing_from', 'resolveFilePage called without single-file page.include'),\n      null,\n    ]\n  }\n\n  const sourcePath = path.resolve(ctx.repoRoot, include)\n  if (!fs.existsSync(sourcePath)) {\n    return [syncError('file_not_found', `Source file not found: ${include}`), null]\n  }\n\n  if (isNil(section.path)) {\n    return [\n      syncError('missing_link', `resolveFilePage called without page.path for: ${include}`),\n      null,\n    ]\n  }\n\n  const ext = sourceExt(include)\n  const hidden = match(section.nav)\n    .with(P.nonNullable, (n) => n.hidden)\n    .otherwise(() => undefined)\n\n  return [\n    null,\n    {\n      title: resolveSectionTitle(section),\n      description: section.description,\n      link: section.path,\n      hidden,\n      card: section.card,\n      page: {\n        source: sourcePath,\n        outputPath: linkToOutputPath(section.path, ext),\n        frontmatter,\n      },\n    },\n  ]\n}\n\n/**\n * Resolve a virtual page with inline or generated content.\n *\n * @private\n * @param section - Page config with `content` field\n * @param frontmatter - Merged frontmatter for the page\n * @returns Sync outcome with resolved entry or error\n */\nfunction resolveVirtualPage(section: Page, frontmatter: Frontmatter): SyncOutcome<ResolvedEntry> {\n  if (isNil(section.path)) {\n    return [syncError('missing_link', 'resolveVirtualPage called without page.path'), null]\n  }\n\n  const hidden = match(section.nav)\n    .with(P.nonNullable, (n) => n.hidden)\n    .otherwise(() => undefined)\n\n  return [\n    null,\n    {\n      title: resolveSectionTitle(section),\n      description: section.description,\n      link: section.path,\n      hidden,\n      card: section.card,\n      page: {\n        content: section.content,\n        outputPath: linkToOutputPath(section.path),\n        frontmatter,\n      },\n    },\n  ]\n}\n\n/**\n * Resolve a nested page — may include glob-discovered children,\n * explicit children, or both. Deduplicates and sorts the result.\n *\n * @private\n * @param section - Page config node with potential children\n * @param ctx - Sync context\n * @param mergedFm - Merged frontmatter\n * @param depth - Current nesting depth\n * @returns Sync outcome with resolved entry containing children\n */\nasync function resolveNestedSection(\n  section: Page,\n  ctx: SyncContext,\n  mergedFm: Frontmatter,\n  depth: number\n): Promise<SyncOutcome<ResolvedEntry>> {\n  const recursive = match(section.discover)\n    .with(P.nonNullable, (d) => d.recursive)\n    .otherwise(() => undefined)\n  const sort = match(section.discover)\n    .with(P.nonNullable, (d) => d.sort)\n    .otherwise(() => undefined)\n  const nav = section.nav\n  const hidden = match(nav)\n    .with(P.nonNullable, (n) => n.hidden)\n    .otherwise(() => undefined)\n  const navCollapsible = match(nav)\n    .with(P.nonNullable, (n) => n.collapsible)\n    .otherwise(() => undefined)\n  const island = match(nav)\n    .with(P.nonNullable, (n) => n.island)\n    .otherwise(() => undefined)\n  const navRoot = match(nav)\n    .with(P.nonNullable, (n) => n.root)\n    .otherwise(() => undefined)\n\n  const globbed = await (() => {\n    if (hasAnyGlobInclude(section.include)) {\n      if (recursive) {\n        return resolveRecursiveGlob(section, ctx, mergedFm, depth + 1)\n      }\n      return resolveGlob(section, ctx, mergedFm)\n    }\n    return Promise.resolve([] as ResolvedEntry[])\n  })()\n\n  const explicitResult = await (() => {\n    if (section.pages) {\n      return resolveEntries(section.pages, ctx, mergedFm, depth + 1)\n    }\n    return Promise.resolve([null, [] as ResolvedEntry[]] as const)\n  })()\n\n  const [explicitErr, explicit] = explicitResult\n  if (explicitErr) {\n    return [explicitErr, null]\n  }\n\n  const children = [...globbed, ...explicit]\n  const deduped = deduplicateByLink(children)\n  const sorted = sortEntries(deduped, sort)\n\n  const sectionPage = resolveSectionPage(section, ctx, mergedFm)\n\n  // Collapsible: explicit value wins, otherwise auto-collapse below top level\n  const autoCollapsible = (() => {\n    if (depth > 0) {\n      return true as const\n    }\n  })()\n  const collapsible = navCollapsible ?? autoCollapsible\n\n  // Auto-derive link so the group is navigable and gets a landing page.\n  // Priority: explicit path > common prefix of children's links\n  const derivedLink = deriveCommonPrefix(sorted)\n  const link = section.path ?? derivedLink\n  const autoLink = !section.path && link !== undefined\n\n  return [\n    null,\n    {\n      title: resolveSectionTitle(section),\n      description: section.description,\n      link,\n      collapsible,\n      hidden,\n      card: section.card,\n      landing: section.landing,\n      standalone: island,\n      root: navRoot,\n      autoLink,\n      items: sorted,\n      page: sectionPage,\n    },\n  ]\n}\n\n/**\n * Resolve the section header page (if the page has a `path` and a single-file `include`).\n *\n * @private\n * @param section - Page config\n * @param ctx - Sync context\n * @param mergedFm - Merged frontmatter\n * @returns Page data for the section header, or undefined\n */\nfunction resolveSectionPage(\n  section: Page,\n  ctx: SyncContext,\n  mergedFm: Frontmatter\n): ResolvedEntry['page'] | undefined {\n  const recursive = match(section.discover)\n    .with(P.nonNullable, (d) => d.recursive)\n    .otherwise(() => undefined)\n  const indexFile = match(section.discover)\n    .with(P.nonNullable, (d) => d.indexFile)\n    .otherwise(() => undefined)\n\n  if (section.path && isSingleFileInclude(section.include)) {\n    const include = section.include as string\n    const sourcePath = path.resolve(ctx.repoRoot, include)\n    if (fs.existsSync(sourcePath)) {\n      const ext = sourceExt(include)\n      return {\n        source: sourcePath,\n        outputPath: linkToOutputPath(section.path, ext),\n        frontmatter: mergedFm,\n      }\n    }\n  } else if (section.path && recursive && section.include) {\n    // Recursive mode: find the root-level entry file from the glob base (.md or .mdx)\n    const patterns = normalizeInclude(section.include)\n    const baseDir = extractBaseDir(patterns[0])\n    const entryFile = indexFile ?? 'overview'\n    const mdPath = path.join(baseDir, `${entryFile}.md`)\n    const mdxPath = path.join(baseDir, `${entryFile}.mdx`)\n    const mdxExists = fs.existsSync(path.resolve(ctx.repoRoot, mdxPath))\n    const indexPath = match(mdxExists)\n      .with(true, () => mdxPath)\n      .otherwise(() => mdPath)\n    const sourcePath = path.resolve(ctx.repoRoot, indexPath)\n    if (fs.existsSync(sourcePath)) {\n      const ext = sourceExt(indexPath)\n      return {\n        source: sourcePath,\n        outputPath: linkToOutputPath(section.path, ext),\n        frontmatter: mergedFm,\n      }\n    }\n  }\n}\n\n/**\n * Resolve a non-recursive glob pattern into leaf page entries.\n *\n * @private\n * @param section - Page config with glob `include` pattern(s)\n * @param ctx - Sync context\n * @param frontmatter - Frontmatter to apply to discovered pages\n * @returns Array of resolved entries for each matching file\n */\nasync function resolveGlob(\n  section: Page,\n  ctx: SyncContext,\n  frontmatter: Frontmatter\n): Promise<ResolvedEntry[]> {\n  const globalIgnore = match(ctx.config.discover)\n    .with(P.nonNullable, (d) => d.ignore ?? [])\n    .otherwise(() => [] as readonly string[])\n  const sectionIgnore = match(section.discover)\n    .with(P.nonNullable, (d) => d.ignore ?? [])\n    .otherwise(() => [] as readonly string[])\n  const ignore = [...globalIgnore, ...sectionIgnore]\n\n  if (isNil(section.include)) {\n    log.error('[ciderpress] resolveGlob called without page.include')\n    return []\n  }\n\n  const patterns = normalizeInclude(section.include)\n  const matched = await fg(patterns as string[], {\n    cwd: ctx.repoRoot,\n    ignore,\n    absolute: false,\n    onlyFiles: true,\n  })\n  const files = excludeGlobbedAgentFiles(matched, patterns)\n\n  const titleStr = resolveSectionTitle(section)\n\n  if (files.length === 0) {\n    if (!ctx.quiet) {\n      log.warn(`Glob \"${String(section.include)}\" matched 0 files for \"${titleStr}\"`)\n    }\n    return []\n  }\n\n  const prefix = section.path ?? ''\n\n  const titleConfig = match(section.title)\n    .when(\n      (\n        t\n      ): t is {\n        from: 'auto' | 'filename' | 'heading' | 'frontmatter'\n        transform?: (text: string, slug: string) => string\n      } => typeof t === 'object' && t !== null && 'from' in t,\n      (t) => t\n    )\n    .otherwise(() => null)\n  const titleFrom = match(titleConfig)\n    .with(P.nonNullable, (tc) => tc.from)\n    .otherwise(() => 'auto' as const)\n  const titleTransform = match(titleConfig)\n    .with(P.nonNullable, (tc) => tc.transform ?? null)\n    .otherwise(() => null)\n\n  return Promise.all(\n    files.map(async (file) => {\n      const ext = sourceExt(file)\n      const slug = path.basename(file, path.extname(file))\n      const link = `${prefix}/${slug}`\n      const sourcePath = path.resolve(ctx.repoRoot, file)\n      const rawTitle = await deriveText(sourcePath, slug, titleFrom)\n      const title = match(titleTransform)\n        .with(P.nonNullable, (t) => t(rawTitle, slug))\n        .otherwise(() => rawTitle)\n\n      return {\n        title,\n        link,\n        page: {\n          source: sourcePath,\n          outputPath: linkToOutputPath(link, ext),\n          frontmatter,\n        },\n      } satisfies ResolvedEntry\n    })\n  )\n}\n\n/**\n * Derive a common path prefix from children's links.\n *\n * Given children with links like `/a/b/c`, `/a/b/d`, `/a/b/e`,\n * returns `/a/b`. Returns `undefined` when no common prefix exists\n * or there are no children with links.\n *\n * @private\n * @param children - Child entries to derive common prefix from\n * @returns Common link prefix, or undefined\n */\nfunction deriveCommonPrefix(children: readonly ResolvedEntry[]): string | undefined {\n  const links = children.filter((c) => c.link).map((c) => c.link as string)\n  if (links.length === 0) {\n    return undefined\n  }\n\n  const segmentArrays = links.map((link) => link.split('/').filter(Boolean))\n  const shortest = segmentArrays.reduce(\n    (min, segs) => Math.min(min, segs.length),\n    Number.POSITIVE_INFINITY\n  )\n\n  const refSegs = segmentArrays[0].slice(0, shortest)\n  const divergeAt = refSegs.findIndex((seg, i) => !segmentArrays.every((segs) => segs[i] === seg))\n  const common = match(divergeAt)\n    .with(-1, () => refSegs)\n    .otherwise((n) => refSegs.slice(0, n))\n\n  if (common.length === 0) {\n    return undefined\n  }\n\n  return `/${common.join('/')}`\n}\n\n/**\n * Deduplicate entries by `link`. Later entries (explicit) override earlier (glob).\n *\n * Uses `link` as the dedup key when present. Entries without a link are never\n * considered duplicates — they always pass through (sections with only `text`).\n *\n * @private\n * @param entries - Entries to deduplicate\n * @returns Deduplicated entries with later entries winning over earlier ones\n */\nfunction deduplicateByLink(entries: readonly ResolvedEntry[]): ResolvedEntry[] {\n  const { result } = entries.reduce<{ seen: Map<string, number>; result: ResolvedEntry[] }>(\n    (acc, entry) => {\n      if (isNil(entry.link)) {\n        return {\n          seen: acc.seen,\n          result: [...acc.result, entry],\n        }\n      }\n      const existing = acc.seen.get(entry.link)\n      if (existing === undefined) {\n        // intentional mutation: seen Map is mutated in-place for O(1) dedup lookups\n        acc.seen.set(entry.link, acc.result.length)\n        return {\n          seen: acc.seen,\n          result: [...acc.result, entry],\n        }\n      }\n      return {\n        seen: acc.seen,\n        result: acc.result.map((item, i) => {\n          if (i === existing) {\n            return entry\n          }\n          return item\n        }),\n      }\n    },\n    { seen: new Map<string, number>(), result: [] }\n  )\n\n  return result\n}\n","import type { NavItem, CiderpressConfig } from '@ciderpress/config'\n\nimport { isEntrySlug } from '../resolve/path.ts'\nimport type { ResolvedEntry, RspressNavItem } from '../types.ts'\n\n/**\n * Generate Rspress nav config from resolved tree.\n *\n * When `config.topbar.nav` is `\"auto\"` (or omitted), produces one nav item per\n * top-level section, linking to its first child page.\n *\n * @param config - ciderpress config (provides explicit nav or `\"auto\"`)\n * @param resolved - Resolved entry tree from the sync engine\n * @returns Rspress nav items array\n */\nexport function generateNav(\n  config: CiderpressConfig,\n  resolved: readonly ResolvedEntry[]\n): RspressNavItem[] {\n  const nav = config.topbar && config.topbar.nav\n  if (nav !== 'auto' && nav !== undefined) {\n    return nav.map(mapNavItem)\n  }\n\n  // Auto: first 3 non-standalone sections (matching home page features),\n  // plus all standalone sections (workspace dropdowns).\n  const visible = resolved.filter((e) => !e.hidden)\n  const nonStandalone = visible.filter((e) => !e.standalone && !e.root).slice(0, 3)\n  const standalone = visible.filter((e) => e.standalone || e.root)\n\n  return [...nonStandalone, ...standalone]\n    .map(buildNavEntry)\n    .filter((item) => item.link !== undefined)\n}\n\n/**\n * Build a NavItem from a resolved entry.\n *\n * @private\n * @param entry - Resolved entry to convert\n * @returns Rspress nav item with text, link, and optional children\n */\nfunction buildNavEntry(entry: ResolvedEntry): RspressNavItem {\n  const link = resolveLink(entry)\n  const children = resolveChildren(entry)\n\n  return {\n    text: entry.title,\n    link,\n    ...maybeChildren(children),\n  }\n}\n\n/**\n * Recursively find the first link in an entry tree.\n *\n * @private\n * @param entry - Entry to search for a link\n * @returns First link found, or undefined\n */\nfunction findFirstLink(entry: ResolvedEntry): string | undefined {\n  if (entry.link) {\n    return entry.link\n  }\n  if (entry.items) {\n    const mapped = entry.items.map(findFirstLink)\n    return mapped.find(Boolean)\n  }\n  return undefined\n}\n\n/**\n * Find a child entry whose link ends with a known entry-page slug.\n *\n * Checks children (one level) for links matching entry slugs (overview,\n * introduction, intro, index, readme). Returns the first match found,\n * preferring earlier slugs in priority order.\n *\n * @private\n * @param items - Direct children of a section\n * @returns Link of the first matching entry page, or undefined\n */\nfunction findEntryPageLink(items: readonly ResolvedEntry[]): string | undefined {\n  const entryChildren = items\n    .filter((c) => !c.hidden && c.link)\n    .filter((c) => isEntrySlug(c.link as string))\n  if (entryChildren.length === 0) {\n    return undefined\n  }\n  return entryChildren[0].link\n}\n\n/**\n * Resolve the link for a nav entry.\n *\n * For sections with children, prefers a child whose slug matches a known\n * entry-page name (overview, introduction, index, readme) so the nav\n * points to an actual content page rather than a generated landing page.\n * Falls back to the section's own link, then the first child link.\n *\n * @private\n * @param entry - Resolved entry to extract link from\n * @returns Link string or undefined\n */\nfunction resolveLink(entry: ResolvedEntry): string | undefined {\n  if (entry.items && entry.items.length > 0) {\n    const entryPage = findEntryPageLink(entry.items)\n    if (entryPage) {\n      return entryPage\n    }\n  }\n  if (entry.link) {\n    return entry.link\n  }\n  return findFirstLink(entry)\n}\n\n/**\n * Resolve children for standalone nav dropdowns (one level deep).\n * Only standalone sections produce dropdown children — nested sub-items\n * within those children are intentionally flattened to { text, link }.\n *\n * @private\n * @param entry - Resolved entry to check for standalone children\n * @returns Array of nav items for dropdown, or undefined\n */\nfunction resolveChildren(entry: ResolvedEntry): readonly RspressNavItem[] | undefined {\n  if ((entry.standalone || entry.root) && entry.items && entry.items.length > 0) {\n    return entry.items\n      .filter((child) => !child.hidden)\n      .map(\n        (child): RspressNavItem => ({\n          text: child.title,\n          link: resolveChildLink(child),\n        })\n      )\n      .filter((child) => child.link !== undefined)\n  }\n  return undefined\n}\n\n/**\n * Resolve the link for a child nav entry, falling back to first nested link.\n *\n * @private\n * @param child - Child resolved entry\n * @returns Link string or undefined\n */\nfunction resolveChildLink(child: ResolvedEntry): string | undefined {\n  if (child.link) {\n    return child.link\n  }\n  return findFirstLink(child)\n}\n\n/**\n * Return an items property object if children are present.\n *\n * @private\n * @param children - Optional array of nav items\n * @returns Object with items property, or empty object\n */\nfunction maybeChildren(children: readonly RspressNavItem[] | undefined): {\n  items?: readonly RspressNavItem[]\n} {\n  if (children && children.length > 0) {\n    return { items: children }\n  }\n  return {}\n}\n\n/**\n * Return an activeMatch property object if defined on the nav item.\n *\n * @private\n * @param item - Nav item config from user\n * @returns Object with activeMatch property, or empty object\n */\nfunction maybeActiveMatch(item: NavItem): Pick<RspressNavItem, 'activeMatch'> {\n  if (item.activeMatch) {\n    return { activeMatch: item.activeMatch }\n  }\n  return {}\n}\n\n/**\n * Return an items property object if the nav item has children.\n *\n * @private\n * @param item - Nav item config from user\n * @returns Object with recursively mapped items, or empty object\n */\nfunction maybeItems(item: NavItem): Pick<RspressNavItem, 'items'> {\n  if (item.items) {\n    return { items: item.items.map(mapNavItem) }\n  }\n  return {}\n}\n\n/**\n * Map a user-facing NavItem (title) to an Rspress NavItem (text).\n *\n * @private\n * @param item - User-facing nav item config\n * @returns Rspress-compatible nav item\n */\nfunction mapNavItem(item: NavItem): RspressNavItem {\n  return {\n    text: item.title,\n    link: item.link,\n    ...maybeActiveMatch(item),\n    ...maybeItems(item),\n  }\n}\n","import { ICON_COLORS, resolveOptionalIcon, serializeIcon } from '@ciderpress/config'\nimport type { IconColor, Page, Workspace } from '@ciderpress/config'\nimport { match, P } from 'massaman/match'\nimport { isNil, isNotNil } from 'massaman/predicate'\n\nimport { linkToOutputPath } from '../resolve/path.ts'\nimport type { ResolvedEntry } from '../types.ts'\nimport { buildWorkspaceCardJsx, generateLandingContent } from './landing.ts'\n\n/**\n * Walk the resolved tree and inject virtual landing pages\n * for any section that has a `link` and children but no page of its own.\n *\n * Landing pages with React components use `.mdx` extension;\n * simple text pages stay as `.md`.\n *\n * Pure: returns a new tree rather than mutating `entries`. The recursion\n * threads `colorIndex` through each call so cycling icon colors remain\n * deterministic without a mutable counter.\n *\n * @param entries - Resolved entry tree to walk\n * @param configSections - Original config pages for metadata lookup\n * @param workspaces - Workspace items for generating workspace landing pages\n * @returns New resolved entry tree with landing pages injected\n */\nexport function injectLandingPages(\n  entries: readonly ResolvedEntry[],\n  configSections: readonly Page[],\n  workspaces: readonly Workspace[]\n): readonly ResolvedEntry[] {\n  const { entries: result } = injectMany({\n    entries,\n    configSections,\n    workspaces,\n    colorIndex: 0,\n  })\n  return result\n}\n\n/**\n * Recursion frame for `injectMany` / `injectOne`. Threads the current\n * `colorIndex` through the tree so cycling icon colors stay deterministic\n * without a mutable counter.\n *\n * @private\n */\ninterface InjectFrame {\n  readonly entries: readonly ResolvedEntry[]\n  readonly configSections: readonly Page[]\n  readonly workspaces: readonly Workspace[]\n  readonly colorIndex: number\n}\n\n/**\n * Result of an `injectMany` / `injectOne` pass — the rebuilt subtree\n * and the next color-index the parent should use for its next child.\n *\n * @private\n */\ninterface InjectResult {\n  readonly entries: readonly ResolvedEntry[]\n  readonly nextColorIndex: number\n}\n\n/**\n * Recursively inject landing pages across an array of entries, threading\n * the color index so siblings continue cycling from where the previous\n * sibling left off.\n *\n * @private\n * @param frame - Current recursion state (entries + threaded color index)\n * @returns Rebuilt entry array and the next available color index\n */\nfunction injectMany(frame: InjectFrame): InjectResult {\n  return frame.entries.reduce<InjectResult>(\n    (acc, entry) => {\n      const { entry: rebuilt, nextColorIndex } = injectOne({\n        entry,\n        configSections: frame.configSections,\n        workspaces: frame.workspaces,\n        colorIndex: acc.nextColorIndex,\n      })\n      return {\n        entries: [...acc.entries, rebuilt],\n        nextColorIndex,\n      }\n    },\n    { entries: [], nextColorIndex: frame.colorIndex }\n  )\n}\n\n/**\n * Frame for a single-entry inject pass.\n *\n * @private\n */\ninterface InjectOneFrame {\n  readonly entry: ResolvedEntry\n  readonly configSections: readonly Page[]\n  readonly workspaces: readonly Workspace[]\n  readonly colorIndex: number\n}\n\n/**\n * Result of injecting a single entry — the rebuilt entry and the next\n * color index after any landing-page color was consumed.\n *\n * @private\n */\ninterface InjectOneResult {\n  readonly entry: ResolvedEntry\n  readonly nextColorIndex: number\n}\n\n/**\n * Rebuild a single entry with an injected landing page when applicable.\n * Recurses into `entry.items` so the entire subtree is replaced rather\n * than mutated.\n *\n * @private\n * @param frame - Current single-entry inject frame\n * @returns Rebuilt entry and next color index\n */\nfunction injectOne(frame: InjectOneFrame): InjectOneResult {\n  const { entry, configSections, workspaces, colorIndex } = frame\n\n  // Recurse into children first so the rebuilt subtree is available when\n  // we decide whether to inject a landing page for this entry.\n  const childResult = match(entry.items)\n    .with(P.nonNullable, (items) =>\n      injectMany({ entries: items, configSections, workspaces, colorIndex })\n    )\n    .otherwise(() => ({\n      entries: undefined as readonly ResolvedEntry[] | undefined,\n      nextColorIndex: colorIndex,\n    }))\n\n  const baseEntry: ResolvedEntry = match(childResult.entries)\n    .with(P.nonNullable, (children) => ({ ...entry, items: children }))\n    .otherwise(() => entry)\n\n  const shouldInject = Boolean(entry.link) && !entry.page && entry.landing !== false\n  if (!shouldInject) {\n    return { entry: baseEntry, nextColorIndex: childResult.nextColorIndex }\n  }\n\n  const link = entry.link as string\n  const configSection = findConfigSection(configSections, link)\n  const description: string | undefined = resolveDescription(configSection)\n  const rebuiltItems = childResult.entries\n  const hasSelfLinkedChild = checkHasSelfLinkedChild(rebuiltItems, link)\n\n  if (rebuiltItems && rebuiltItems.length > 0 && !hasSelfLinkedChild) {\n    const color: IconColor = ICON_COLORS[childResult.nextColorIndex % ICON_COLORS.length]\n    const children = rebuiltItems\n    const page: ResolvedEntry['page'] = {\n      content: () => generateLandingContent(entry.title, description, children, color),\n      outputPath: linkToOutputPath(link).replace(/\\.md$/, '.mdx'),\n      frontmatter: {},\n    }\n    return {\n      entry: { ...baseEntry, page },\n      nextColorIndex: childResult.nextColorIndex + 1,\n    }\n  }\n\n  if (!rebuiltItems || rebuiltItems.length === 0) {\n    const matching = workspaces.filter((item) => item.path.startsWith(`${link}/`))\n    if (matching.length > 0) {\n      const segments = link.split('/')\n      const lastSegment = segments.findLast((seg) => seg.length > 0)\n      const scope = `${lastSegment}/`\n      const page: ResolvedEntry['page'] = {\n        content: () => generateWorkspaceLandingPage(entry.title, description, matching, scope),\n        outputPath: linkToOutputPath(link).replace(/\\.md$/, '.mdx'),\n        frontmatter: {},\n      }\n      return { entry: { ...baseEntry, page }, nextColorIndex: childResult.nextColorIndex }\n    }\n\n    const exact = workspaces.find((item) => item.path === link)\n    if (exact) {\n      const titleStr = match(exact.title)\n        .with(P.string, (t) => t)\n        .otherwise(String)\n      const page: ResolvedEntry['page'] = {\n        content: () => `# ${titleStr}\\n\\n${exact.description}\\n`,\n        outputPath: linkToOutputPath(link),\n        frontmatter: {},\n      }\n      return { entry: { ...baseEntry, page }, nextColorIndex: childResult.nextColorIndex }\n    }\n  }\n\n  return { entry: baseEntry, nextColorIndex: childResult.nextColorIndex }\n}\n\n/**\n * Generate a workspace-style landing page MDX from workspace items.\n *\n * @private\n * @param heading - Page heading\n * @param description - Optional description below heading\n * @param items - Workspace items to render as cards\n * @param scopePrefix - Scope label for cards (e.g. 'apps/')\n * @returns MDX string with React component imports and JSX elements\n */\nfunction generateWorkspaceLandingPage(\n  heading: string,\n  description: string | undefined,\n  items: readonly Workspace[],\n  scopePrefix: string\n): string {\n  const imports = \"import { WorkspaceCard, WorkspaceGrid } from '@ciderpress/ui/theme'\\n\\n\"\n\n  const cards = items.map((item) => {\n    const tags: readonly string[] | undefined = resolveTags(item.tags)\n    const resolved = resolveOptionalIcon(item.icon)\n    const titleStr = match(item.title)\n      .with(P.string, (t) => t)\n      .otherwise(String)\n    return buildWorkspaceCardJsx({\n      link: item.path,\n      title: titleStr,\n      icon: serializeIcon(resolved),\n      scope: scopePrefix,\n      description: item.description,\n      tags,\n      badge: item.badge,\n    })\n  })\n\n  const descLine = match(description)\n    .with(P.nonNullable, (d) => `\\n${d}\\n`)\n    .otherwise(() => '')\n\n  return `${imports}# ${heading}\\n${descLine}\\n<WorkspaceGrid>\\n${cards.join('\\n')}\\n</WorkspaceGrid>\\n`\n}\n\n/**\n * Look up the original config Page by link for extracting metadata.\n *\n * @private\n * @param sections - Config pages to search\n * @param link - Link path to match\n * @returns Matching page, or undefined\n */\nfunction findConfigSection(sections: readonly Page[], link: string): Page | undefined {\n  const direct = sections.find((section) => section.path === link)\n  if (direct) {\n    return direct\n  }\n  const nested = sections\n    .filter((section) => isNotNil(section.pages))\n    .map((section) => findConfigSection(section.pages as readonly Page[], link))\n    .find((result) => isNotNil(result))\n  return nested\n}\n\n/**\n * Extract description from a config page.\n *\n * @private\n * @param configSection - Optional config page\n * @returns Description string, or undefined\n */\nfunction resolveDescription(configSection: Page | undefined): string | undefined {\n  if (isNil(configSection)) {\n    return undefined\n  }\n\n  if (configSection.description) {\n    return configSection.description\n  }\n\n  return undefined\n}\n\n/**\n * Check if any child entry has the same link as the parent.\n *\n * @private\n * @param items - Optional child entries\n * @param link - Parent link to check against\n * @returns True if a child has the same link\n */\nfunction checkHasSelfLinkedChild(\n  items: readonly ResolvedEntry[] | undefined,\n  link: string | undefined\n): boolean {\n  if (items) {\n    return items.some((child) => child.link === link)\n  }\n  return false\n}\n\n/**\n * Copy tags array, or return undefined if not present.\n *\n * @private\n * @param tags - Optional tags array\n * @returns Copied tags array or undefined\n */\nfunction resolveTags(tags: readonly string[] | undefined): readonly string[] | undefined {\n  if (tags) {\n    return [...tags]\n  }\n  return undefined\n}\n","/**\n * _meta.json generation — converts ResolvedEntry trees to Rspress sidebar meta format.\n *\n * Rspress uses per-directory `_meta.json` files to control sidebar ordering,\n * labels, and collapsed state. This module converts the resolved entry tree\n * into a flat list of directories, each with its ordered meta items.\n *\n * Placement is filesystem-first: each entry is placed in the `_meta.json`\n * of its actual parent directory (derived from output path or link), not\n * from its position in the config tree. This handles cases where the\n * config tree doesn't match the directory hierarchy.\n *\n * @see https://rspress.dev/guide/basic/auto-nav-sidebar\n */\n\nimport { basename, dirname, extname } from 'node:path'\n\nimport { isNotNil, isString } from 'massaman/predicate'\n\nimport type { ResolvedEntry } from '../types.ts'\n\n/**\n * A meta item for Rspress's `_meta.json` sidebar control.\n *\n * String items reference files by stem (Rspress reads frontmatter for label).\n * Object items describe directories, files, or section headers with explicit labels.\n */\nexport type MetaItem = string | MetaDirItem | MetaFileItem | MetaSectionHeaderItem\n\n/**\n * A directory entry in `_meta.json`.\n */\nexport interface MetaDirItem {\n  readonly type: 'dir'\n  readonly name: string\n  readonly label: string\n  readonly collapsed?: boolean\n  /**\n   * Rspress sidebar tag — carries this entry's encoded badge(s).\n   */\n  readonly tag?: string\n}\n\n/**\n * A file entry in `_meta.json` with explicit label.\n */\nexport interface MetaFileItem {\n  readonly type: 'file'\n  readonly name: string\n  readonly label: string\n  /**\n   * Rspress sidebar tag — carries this entry's encoded badge(s).\n   */\n  readonly tag?: string\n}\n\n/**\n * A section header entry in `_meta.json` — visual label with no link.\n */\nexport interface MetaSectionHeaderItem {\n  readonly type: 'section-header'\n  readonly label: string\n  /**\n   * Rspress sidebar tag — carries this entry's encoded badge(s).\n   */\n  readonly tag?: string\n}\n\n/**\n * A directory that needs a `_meta.json` written.\n */\nexport interface MetaDirectory {\n  /**\n   * Directory path relative to content dir (e.g., \"concepts\" or \"concepts/engine\").\n   */\n  readonly dirPath: string\n  /**\n   * Ordered meta items for this directory's `_meta.json`.\n   */\n  readonly items: readonly MetaItem[]\n}\n\n/**\n * Build the root `_meta.json` items for the content directory.\n *\n * Rspress creates a separate sidebar per top-level directory by default.\n * A root `_meta.json` listing all sections as `dir` items tells Rspress\n * to generate a single unified sidebar (keyed by `\"/\"`) instead, with\n * full HMR support for sidebar changes.\n *\n * @param entries - Top-level resolved entries (sections)\n * @returns Root meta items for the content-level `_meta.json`\n */\nexport function buildRootMeta(entries: readonly ResolvedEntry[]): readonly MetaItem[] {\n  return entries\n    .filter((e) => !e.hidden)\n    .flatMap((entry) => {\n      if (entry.root && entry.items) {\n        return entry.items.filter((child) => !child.hidden).flatMap(entryToRootMetaItems)\n      }\n\n      return entryToRootMetaItems(entry)\n    })\n}\n\n/**\n * Convert a top-level entry to its root `_meta.json` item.\n *\n * Sections (entries with children) map to `dir` items so Rspress recurses\n * into their subdirectory. Leaf pages (no children) map to `file` items so\n * Rspress renders a plain link — without this gate a depth-0 leaf renders as\n * a collapsible group with a dead chevron.\n *\n * @private\n * @param entry - Top-level resolved entry (section or leaf)\n * @returns Single-element meta item array, or empty when no name resolves\n */\nfunction entryToRootMetaItems(entry: ResolvedEntry): readonly (MetaDirItem | MetaFileItem)[] {\n  if (hasChildren(entry)) {\n    const name = resolveDirName(entry)\n    if (name === null) {\n      return []\n    }\n    return [{ type: 'dir' as const, name, label: entry.title, ...maybeTag(entry.badgeTag) }]\n  }\n\n  const name = resolveFileStem(entry) ?? resolveDirName(entry)\n  if (name === null) {\n    return []\n  }\n  return [{ type: 'file' as const, name, label: entry.title, ...maybeTag(entry.badgeTag) }]\n}\n\n/**\n * Build all `_meta.json` directory entries from a resolved entry tree.\n *\n * Uses a filesystem-first approach: each entry is placed in the `_meta.json`\n * of its actual parent directory on disk, regardless of its position in the\n * config tree. This correctly handles cases where the config tree nesting\n * doesn't match the directory hierarchy (e.g., a section at\n * `/contributing/concepts/engine` configured as a flat child of `/contributing`).\n *\n * @param entries - Top-level resolved entries (sections)\n * @returns Flat array of directories needing `_meta.json` files\n */\nexport function buildMetaDirectories(entries: readonly ResolvedEntry[]): readonly MetaDirectory[] {\n  const visibleEntries = entries.filter((entry) => !entry.hidden)\n  const rootParentDirs = new Set(\n    visibleEntries\n      .filter((entry) => entry.root && entry.link)\n      .map((entry) => stripLeadingSlash(entry.link ?? ''))\n      .filter(Boolean)\n  )\n  const expanded = visibleEntries.flatMap((entry) => {\n    if (entry.root && entry.items) {\n      return entry.items.filter((child) => !child.hidden)\n    }\n    return [entry]\n  })\n  const { placements } = flattenToPlacements(expanded, 0)\n  return groupPlacementsByDir(placements).filter((dir) => !rootParentDirs.has(dir.dirPath))\n}\n\n/**\n * A placement instruction: which directory a meta item belongs to.\n *\n * @private\n */\ninterface MetaPlacement {\n  /**\n   * Target directory path for the `_meta.json` (e.g., \"contributing/concepts\").\n   */\n  readonly dirPath: string\n  /**\n   * The meta item to write.\n   */\n  readonly item: MetaItem\n  /**\n   * Insertion order for stable sorting within a directory.\n   */\n  readonly order: number\n  /**\n   * Whether this is a section (directory) or a leaf (file).\n   * Leaves are ordered before sections within each directory.\n   */\n  readonly isSection: boolean\n}\n\n/**\n * Accumulator returned by the recursive flattener.\n *\n * @private\n */\ninterface FlattenResult {\n  readonly placements: readonly MetaPlacement[]\n  readonly nextOrder: number\n}\n\n/**\n * Recursively flatten the entry tree into placement instructions.\n *\n * For each visible entry, determines its target `_meta.json` directory\n * from the filesystem path and emits a placement. Sections are recursed\n * into so their children also get placements.\n *\n * @private\n * @param entries - Entries to flatten\n * @param startOrder - Starting order counter for stable sorting\n * @returns Placements and the next available order counter\n */\nfunction flattenToPlacements(entries: readonly ResolvedEntry[], startOrder: number): FlattenResult {\n  return entries\n    .filter((e) => !e.hidden)\n    .reduce<FlattenResult>(\n      (acc, entry) => {\n        const isSection = hasChildren(entry)\n\n        if (isSection) {\n          return flattenSection(entry, acc)\n        }\n\n        return flattenLeaf(entry, acc)\n      },\n      { placements: [], nextOrder: startOrder }\n    )\n}\n\n/**\n * Create placements for a section entry and recurse into its children.\n *\n * The section itself becomes a `dir` item in its filesystem parent's\n * `_meta.json`. Its children are recursively flattened.\n *\n * @private\n * @param entry - Section entry with children\n * @param acc - Current accumulator\n * @returns Updated accumulator with section and child placements\n */\nfunction flattenSection(entry: ResolvedEntry, acc: FlattenResult): FlattenResult {\n  const dirPath = resolveDirPath(entry)\n  if (dirPath === null) {\n    return acc\n  }\n\n  const parentDir = dirname(dirPath)\n  const targetDir = resolveTargetDir(parentDir)\n\n  // Only place the dir item if it has a real parent directory.\n  // Top-level sections (targetDir === '') are discovered by Rspress automatically.\n  const dirPlacement: readonly MetaPlacement[] = buildDirPlacement(targetDir, entry, acc.nextOrder)\n\n  const childResult = flattenToPlacements(entry.items ?? [], acc.nextOrder + 1)\n\n  return {\n    // oxlint-disable-next-line unicorn/no-accumulating-spread -- bounded by tree depth\n    placements: [...acc.placements, ...dirPlacement, ...childResult.placements],\n    nextOrder: childResult.nextOrder,\n  }\n}\n\n/**\n * Create a placement for a leaf entry.\n *\n * The leaf becomes a `file` item in its filesystem parent's `_meta.json`.\n *\n * @private\n * @param entry - Leaf entry (no children)\n * @param acc - Current accumulator\n * @returns Updated accumulator with the leaf placement\n */\nfunction flattenLeaf(entry: ResolvedEntry, acc: FlattenResult): FlattenResult {\n  const targetDir = resolveLeafParentDir(entry)\n  if (targetDir === null) {\n    return acc\n  }\n\n  const placement: MetaPlacement = {\n    dirPath: targetDir,\n    item: leafToMetaItem(entry),\n    order: acc.nextOrder,\n    isSection: false,\n  }\n\n  return {\n    // oxlint-disable-next-line unicorn/no-accumulating-spread -- bounded by entry count per section\n    placements: [...acc.placements, placement],\n    nextOrder: acc.nextOrder + 1,\n  }\n}\n\n/**\n * Resolve a parent directory path, mapping '.' to empty string for top-level.\n *\n * @private\n * @param parentDir - Raw dirname result\n * @returns Empty string for top-level, otherwise the parent path\n */\nfunction resolveTargetDir(parentDir: string): string {\n  if (parentDir === '.') {\n    return ''\n  }\n  return parentDir\n}\n\n/**\n * Build a dir placement array for a section entry.\n *\n * Returns an empty array when the target directory is top-level (empty string),\n * since Rspress discovers top-level sections automatically.\n *\n * @private\n * @param targetDir - Target directory for the placement\n * @param entry - Section entry to place\n * @param order - Insertion order for stable sorting\n * @returns Single-element placement array, or empty array for top-level\n */\nfunction buildDirPlacement(\n  targetDir: string,\n  entry: ResolvedEntry,\n  order: number\n): readonly MetaPlacement[] {\n  if (targetDir === '') {\n    return []\n  }\n  return [\n    {\n      dirPath: targetDir,\n      item: sectionToMetaItem(entry),\n      order,\n      isSection: true,\n    },\n  ]\n}\n\n/**\n * Group placements by target directory and build MetaDirectory entries.\n *\n * Within each directory, leaves are ordered before sections (matching\n * the existing sidebar convention), with stable ordering within each group.\n *\n * @private\n * @param placements - All placement instructions\n * @returns Deduplicated MetaDirectory entries\n */\nfunction groupPlacementsByDir(placements: readonly MetaPlacement[]): readonly MetaDirectory[] {\n  const grouped = Map.groupBy(placements, (p) => p.dirPath)\n  const allDirPaths = new Set(grouped.keys())\n\n  return [...grouped.entries()]\n    .filter(([dirPath]) => dirPath !== '')\n    .map(([dirPath, items]) => {\n      const leaves = items.filter((p) => !p.isSection).toSorted((a, b) => a.order - b.order)\n      const sections = items.filter((p) => p.isSection).toSorted((a, b) => a.order - b.order)\n      // Build a lookup of merged sections keyed by name. Merging uses the\n      // section's label but downgrades to file type when no subdirectory\n      // content exists (see mergeWithLeaf).\n      const mergedByName = new Map(\n        sections\n          .map((s) => mergeWithLeaf({ section: s, leaves, dirPath, allDirPaths }))\n          .map((s) => [extractItemName(s.item), s] as const)\n          .filter((pair): pair is readonly [string, MetaPlacement] => pair[0] !== null)\n      )\n      // Leaves first, then sections — preserving relative order within each\n      // group. Merged sections replace their leaf counterpart so the section\n      // label wins but the item appears in the sections block (bottom).\n      const mergedNames = new Set(mergedByName.keys())\n      const orderedLeaves = leaves.filter((p) => {\n        const name = extractItemName(p.item)\n        return name === null || !mergedNames.has(name)\n      })\n      const orderedSections = sections.map((s) => {\n        const name = extractItemName(s.item)\n        if (name === null) {\n          return s\n        }\n        return mergedByName.get(name) ?? s\n      })\n      const deduped = [...orderedLeaves, ...orderedSections]\n      return { dirPath, items: deduped.map((p) => p.item) }\n    })\n}\n\n/**\n * Parameters for {@link mergeWithLeaf}.\n *\n * @private\n */\ninterface MergeWithLeafParams {\n  readonly section: MetaPlacement\n  readonly leaves: readonly MetaPlacement[]\n  readonly dirPath: string\n  readonly allDirPaths: ReadonlySet<string>\n}\n\n/**\n * Merge a section placement with its matching leaf when the section's\n * subdirectory has no content placements.\n *\n * When both a `dir` section and a `file` leaf exist for the same name\n * (e.g., `packages/cli` has both a directory and a landing page file),\n * keep the section's label but downgrade to a `file` type if no actual\n * subdirectory content exists. This prevents Rspress from expecting a\n * directory that doesn't exist on disk.\n *\n * @private\n * @param params - Merge parameters\n * @returns The section placement, possibly with its item downgraded to file type\n */\nfunction mergeWithLeaf(params: MergeWithLeafParams): MetaPlacement {\n  const { section, leaves, dirPath, allDirPaths } = params\n  const sectionName = extractItemName(section.item)\n  if (sectionName === null) {\n    return section\n  }\n  const subDirPath = resolveSubDirPath(dirPath, sectionName)\n  if (allDirPaths.has(subDirPath)) {\n    return section\n  }\n  // No subdirectory content — find matching leaf and use file type with section label\n  const matchingLeaf = leaves.find((l) => extractItemName(l.item) === sectionName)\n  if (matchingLeaf && typeof section.item === 'object' && 'label' in section.item) {\n    return {\n      ...section,\n      item: { type: 'file' as const, name: sectionName, label: section.item.label },\n    }\n  }\n  return section\n}\n\n/**\n * Build a subdirectory path from a parent dir and child name.\n *\n * @private\n * @param dirPath - Parent directory path (empty string for root)\n * @param name - Child directory name\n * @returns Full subdirectory path\n */\nfunction resolveSubDirPath(dirPath: string, name: string): string {\n  if (dirPath === '') {\n    return name\n  }\n  return `${dirPath}/${name}`\n}\n\n/**\n * Extract the identifying name from a meta item for deduplication.\n *\n * @private\n * @param item - Meta item to extract name from\n * @returns Name string, or null for non-deduplicable items\n */\nfunction extractItemName(item: MetaItem): string | null {\n  if (isString(item)) {\n    return item\n  }\n  if ('name' in item) {\n    return item.name\n  }\n  return null\n}\n\n/**\n * Check whether an entry has child items.\n *\n * @private\n * @param entry - Resolved entry to check\n * @returns True when the entry has a non-empty items array\n */\nfunction hasChildren(entry: ResolvedEntry): boolean {\n  return isNotNil(entry.items) && entry.items.length > 0\n}\n\n/**\n * Derive the content-relative directory path from an entry's link.\n *\n * @private\n * @param entry - Resolved entry with a link\n * @returns Directory path (e.g. \"concepts\") or null if invalid\n */\nfunction resolveDirPath(entry: ResolvedEntry): string | null {\n  if (!entry.link) {\n    return null\n  }\n  const cleaned = stripLeadingSlash(entry.link)\n  if (cleaned === '' || cleaned === '/') {\n    return null\n  }\n  return cleaned\n}\n\n/**\n * Determine the parent directory for a leaf entry's `_meta.json` placement.\n *\n * Uses the output path's directory when available, falling back to the\n * link's parent path.\n *\n * @private\n * @param entry - Leaf entry\n * @returns Parent directory path, or null\n */\nfunction resolveLeafParentDir(entry: ResolvedEntry): string | null {\n  if (entry.page) {\n    const dir = dirname(entry.page.outputPath)\n    if (dir === '.') {\n      return null\n    }\n    return dir\n  }\n  if (entry.link) {\n    const cleaned = stripLeadingSlash(entry.link)\n    const dir = dirname(cleaned)\n    if (dir === '.') {\n      return null\n    }\n    return dir\n  }\n  return null\n}\n\n/**\n * Convert a leaf entry to a `_meta.json` file item.\n *\n * @private\n * @param entry - Leaf resolved entry (no children)\n * @returns Meta file item with name and label\n */\nfunction leafToMetaItem(entry: ResolvedEntry): MetaItem {\n  const name = resolveFileStem(entry)\n  if (name === null) {\n    return entry.title\n  }\n  return {\n    type: 'file' as const,\n    name,\n    label: entry.title,\n    ...maybeTag(entry.badgeTag),\n  }\n}\n\n/**\n * Convert a section entry to a `_meta.json` directory item.\n *\n * @private\n * @param entry - Section resolved entry (has children)\n * @returns Meta directory item with name, label, and optional collapsed flag\n */\nfunction sectionToMetaItem(entry: ResolvedEntry): MetaItem {\n  const name = resolveDirName(entry)\n  if (name === null) {\n    return entry.title\n  }\n  return {\n    type: 'dir' as const,\n    name,\n    label: entry.title,\n    ...maybeCollapsed(entry.collapsible),\n    ...maybeTag(entry.badgeTag),\n  }\n}\n\n/**\n * Extract the filename stem from a leaf entry's output path or link.\n *\n * @private\n * @param entry - Leaf entry with optional page data\n * @returns Filename stem (e.g. \"deploying\") or null\n */\nfunction resolveFileStem(entry: ResolvedEntry): string | null {\n  if (entry.page) {\n    const ext = extname(entry.page.outputPath)\n    return basename(entry.page.outputPath, ext)\n  }\n  if (entry.link) {\n    return lastSegment(entry.link)\n  }\n  return null\n}\n\n/**\n * Extract the directory name from a section entry's link.\n *\n * @private\n * @param entry - Section entry with link\n * @returns Directory name (last path segment) or null\n */\nfunction resolveDirName(entry: ResolvedEntry): string | null {\n  if (entry.link) {\n    return lastSegment(entry.link)\n  }\n  return null\n}\n\n/**\n * Return the last non-empty segment of a URL path.\n *\n * @private\n * @param link - URL path (e.g. \"/guides/deploying\")\n * @returns Last segment (e.g. \"deploying\") or null\n */\nfunction lastSegment(link: string): string | null {\n  const segments = link.split('/').filter(Boolean)\n  if (segments.length === 0) {\n    return null\n  }\n  return segments.at(-1) ?? null\n}\n\n/**\n * Return a collapsed property object if collapsible is true.\n *\n * @private\n * @param collapsible - Whether the sidebar group starts collapsed\n * @returns Object with collapsed flag, or empty object\n */\nfunction maybeCollapsed(collapsible: boolean | undefined): { readonly collapsed?: boolean } {\n  if (collapsible) {\n    return { collapsed: true }\n  }\n  return {}\n}\n\n/**\n * Build the optional `tag` field for a meta item, omitted when the entry\n * carries no badge.\n *\n * @private\n * @param badgeTag - Encoded badge tag string, or undefined\n * @returns `{ tag }` or an empty object\n */\nfunction maybeTag(badgeTag: string | undefined): { readonly tag?: string } {\n  if (badgeTag === undefined) {\n    return {}\n  }\n  return { tag: badgeTag }\n}\n\n/**\n * Strip the leading slash from a path.\n *\n * @private\n * @param p - Path string\n * @returns Path without leading slash\n */\nfunction stripLeadingSlash(p: string): string {\n  if (p.startsWith('/')) {\n    return p.slice(1)\n  }\n  return p\n}\n","/**\n * Write Rspress `_meta.json` and `_nav.json` files to the content directory.\n *\n * These files enable Rspress's native sidebar/nav auto-discovery with HMR\n * support, replacing the static `.generated/sidebar.json` approach.\n *\n * @see https://rspress.dev/guide/basic/auto-nav-sidebar\n */\n\nimport fs from 'node:fs/promises'\nimport path from 'node:path'\n\nimport type { OpenAPISidebarEntry } from '../openapi.ts'\nimport type { ResolvedEntry, RspressNavItem, SidebarItem } from '../types.ts'\nimport type { MetaDirectory, MetaDirItem, MetaItem, MetaSectionHeaderItem } from './meta.ts'\nimport { buildMetaDirectories, buildRootMeta } from './meta.ts'\n\n/**\n * Options for writing meta files.\n */\ninterface WriteMetaOptions {\n  /**\n   * Absolute path to the content output directory.\n   */\n  readonly contentDir: string\n  /**\n   * Resolved entry tree from the sync engine.\n   */\n  readonly entries: readonly ResolvedEntry[]\n  /**\n   * Generated nav items for `_nav.json`.\n   */\n  readonly nav: readonly RspressNavItem[]\n  /**\n   * OpenAPI sidebar entries to write as `_meta.json` in their prefix directories.\n   */\n  readonly openapiEntries: readonly OpenAPISidebarEntry[]\n}\n\n/**\n * Write `_meta.json` files for all section directories and `_nav.json` at root.\n *\n * Creates a `_meta.json` in each directory that has sidebar items, controlling\n * the ordering and labels. Also writes `_nav.json` at the content root for\n * Rspress navigation auto-discovery.\n *\n * OpenAPI directories receive flat `_meta.json` files with section-header\n * items for tag groups.\n *\n * @param options - Content directory, resolved entries, nav items, and OpenAPI entries\n * @returns Promise that resolves when all files are written\n */\nexport async function writeMetaFiles(options: WriteMetaOptions): Promise<void> {\n  const { contentDir, entries, nav, openapiEntries } = options\n\n  const sectionDirectories = buildMetaDirectories(entries)\n  const openapiDirectories = openapiEntries.flatMap(buildOpenapiMetaDirectory)\n  const rootMeta = buildRootMeta(entries)\n\n  // Merge OpenAPI entries into the appropriate _meta.json files:\n  // - Root-level entries → root _meta.json as dir items\n  // - Workspace-level entries → parent directory's _meta.json as dir items\n  const openapiRootItems = buildOpenapiRootMetaItems(openapiEntries)\n  const mergedSectionDirectories = mergeOpenapiParentEntries(sectionDirectories, openapiEntries)\n\n  const mergedRootMeta = [...rootMeta, ...openapiRootItems]\n\n  const allDirectories = [...mergedSectionDirectories, ...openapiDirectories]\n\n  // Ensure all directories referenced in the root _meta.json exist on disk.\n  // Rspress's auto-nav-sidebar reads these with scandir and crashes if missing.\n  const rootDirNames = mergedRootMeta\n    .filter(\n      (item): item is MetaDirItem =>\n        typeof item !== 'string' && 'type' in item && item.type === 'dir'\n    )\n    .map((item) => item.name)\n\n  await Promise.all([\n    ...rootDirNames.map((name) => fs.mkdir(path.resolve(contentDir, name), { recursive: true })),\n    fs.writeFile(\n      path.resolve(contentDir, '_meta.json'),\n      JSON.stringify(mergedRootMeta, null, 2),\n      'utf8'\n    ),\n    ...allDirectories.map(async (dir) => {\n      const metaPath = path.resolve(contentDir, dir.dirPath, '_meta.json')\n      await fs.mkdir(path.dirname(metaPath), { recursive: true })\n      await fs.writeFile(metaPath, JSON.stringify(dir.items, null, 2), 'utf8')\n    }),\n    fs.writeFile(path.resolve(contentDir, '_nav.json'), JSON.stringify(nav, null, 2), 'utf8'),\n  ])\n}\n\n/**\n * Build root `_meta.json` dir items for root-level OpenAPI entries.\n *\n * Root-level entries (from `config.openapi`) need a `dir` item in the root\n * `_meta.json` so Rspress discovers them in the unified sidebar.\n * Workspace-level entries are nested under an existing section and do not\n * need root-level discovery.\n *\n * @private\n * @param entries - All OpenAPI sidebar entries\n * @returns Dir meta items for root-level entries\n */\nfunction buildOpenapiRootMetaItems(\n  entries: readonly OpenAPISidebarEntry[]\n): readonly MetaDirItem[] {\n  return entries\n    .filter((entry) => entry.rootLevel)\n    .flatMap((entry) => {\n      const dirName = stripLeadingSlash(entry.prefix)\n      if (dirName === '' || dirName.includes('/')) {\n        return []\n      }\n      const label = resolveOpenapiLabel(entry)\n      return [{ type: 'dir' as const, name: dirName, label }]\n    })\n}\n\n/**\n * Merge workspace-level OpenAPI entries into their parent directory's meta.\n *\n * For each workspace-level OpenAPI entry whose prefix is nested (e.g.\n * `/apps/api/reference`), adds a `dir` item for the last segment\n * (`reference`) into the parent directory's (`apps/api`) `_meta.json`.\n * If the parent directory doesn't exist yet, creates a new MetaDirectory.\n *\n * @private\n * @param directories - Existing section meta directories\n * @param openapiEntries - All OpenAPI sidebar entries\n * @returns Updated directories with workspace-level OpenAPI dir items merged in\n */\nfunction mergeOpenapiParentEntries(\n  directories: readonly MetaDirectory[],\n  openapiEntries: readonly OpenAPISidebarEntry[]\n): readonly MetaDirectory[] {\n  const workspaceEntries = openapiEntries.filter((entry) => !entry.rootLevel)\n  if (workspaceEntries.length === 0) {\n    return [...directories]\n  }\n\n  const dirMap = new Map<string, MetaItem[]>(\n    directories.map((dir) => [dir.dirPath, [...dir.items]])\n  )\n\n  workspaceEntries.reduce<null>((_, entry) => {\n    const cleanPrefix = stripLeadingSlash(entry.prefix)\n    if (cleanPrefix === '' || !cleanPrefix.includes('/')) {\n      return null\n    }\n    const segments = cleanPrefix.split('/')\n    const childName = segments.at(-1) as string\n    const parentDir = segments.slice(0, -1).join('/')\n    const label = resolveOpenapiLabel(entry)\n    const dirItem: MetaDirItem = { type: 'dir', name: childName, label }\n\n    const existing = dirMap.get(parentDir)\n    if (existing) {\n      existing.push(dirItem)\n    } else {\n      dirMap.set(parentDir, [dirItem])\n    }\n    return null\n  }, null)\n\n  return [...dirMap.entries()].map(([dirPath, items]) => ({ dirPath, items }))\n}\n\n/**\n * Resolve the display label for an OpenAPI sidebar entry.\n *\n * Extracts the title from the root sidebar item (e.g. \"API Reference\"),\n * falling back to \"API Reference\" when the sidebar is empty.\n *\n * @private\n * @param entry - OpenAPI sidebar entry\n * @returns Display label string\n */\nfunction resolveOpenapiLabel(entry: OpenAPISidebarEntry): string {\n  const [root] = entry.sidebar\n  if (root && root.text) {\n    return root.text\n  }\n  return 'API Reference'\n}\n\n/**\n * Build a `_meta.json` directory entry for an OpenAPI sidebar.\n *\n * Flattens the nested tag-group sidebar structure into a flat list\n * using `section-header` items for tag labels and `file` items for operations.\n * The index page (overview) is listed first.\n *\n * @private\n * @param entry - OpenAPI sidebar entry with prefix and sidebar items\n * @returns MetaDirectory for the OpenAPI prefix directory\n */\nfunction buildOpenapiMetaDirectory(entry: OpenAPISidebarEntry): readonly MetaDirectory[] {\n  const dirPath = stripLeadingSlash(entry.prefix)\n  if (dirPath === '') {\n    return []\n  }\n\n  const items = flattenOpenapiSidebar(entry.sidebar, entry.prefix, entry.rootLevel)\n\n  return [{ dirPath, items }]\n}\n\n/**\n * Flatten a nested OpenAPI sidebar into ordered `_meta.json` items.\n *\n * The root sidebar item (e.g. \"API Reference\") is represented by the\n * index page. Each tag group becomes a `section-header` followed by\n * its operation file items.\n *\n * @private\n * @param sidebar - Nested sidebar items from OpenAPI sync\n * @param prefix - URL prefix for the OpenAPI section\n * @returns Flat array of meta items\n */\nfunction flattenOpenapiSidebar(\n  sidebar: readonly SidebarItem[],\n  prefix: string,\n  rootLevel: boolean\n): readonly MetaItem[] {\n  // The root sidebar typically has one item: { text: \"API Reference\", items: [tag groups] }\n  // Extract the tag groups from the root item's children\n  const tagGroups = sidebar.flatMap((root) => root.items ?? [])\n\n  const tagItems = tagGroupsToMetaItems(tagGroups, prefix)\n\n  // Root-level entries have a `dir` item in root _meta.json that already\n  // links to the index page. Including it again causes a double highlight.\n  // Workspace-level entries have no parent dir linking to them, so they\n  // need the explicit index item.\n  if (rootLevel) {\n    return [...tagItems]\n  }\n\n  const indexItem: MetaItem = { type: 'file', name: 'index', label: 'Overview' }\n  return [indexItem, ...tagItems]\n}\n\n/**\n * Convert OpenAPI tag groups to flat meta items with section headers.\n *\n * Each tag group produces a section-header followed by file items\n * for each operation in that group.\n *\n * @private\n * @param groups - Tag group sidebar items\n * @param prefix - URL prefix for extracting file stems\n * @returns Flat array of meta items\n */\nfunction tagGroupsToMetaItems(groups: readonly SidebarItem[], prefix: string): readonly MetaItem[] {\n  return groups.reduce<MetaItem[]>((acc, group) => {\n    const header: MetaSectionHeaderItem = { type: 'section-header', label: group.text }\n    const operations: readonly MetaItem[] = (group.items ?? []).flatMap((op) => {\n      const stem = extractStemFromLink(op.link, prefix)\n      if (stem === null) {\n        return []\n      }\n      return [{ type: 'file' as const, name: stem, label: op.text }]\n    })\n    // oxlint-disable-next-line unicorn/no-accumulating-spread -- small bounded arrays (tag count)\n    return [...acc, header, ...operations]\n  }, [])\n}\n\n/**\n * Extract a filename stem from a sidebar link, removing the prefix.\n *\n * @private\n * @param link - Sidebar link (e.g. \"/api/list-users\")\n * @param prefix - URL prefix to strip (e.g. \"/api\")\n * @returns Filename stem (e.g. \"list-users\") or null\n */\nfunction extractStemFromLink(link: string | undefined, prefix: string): string | null {\n  if (!link) {\n    return null\n  }\n  const cleanPrefix = stripLeadingSlash(prefix)\n  const cleanLink = stripLeadingSlash(link)\n  if (cleanLink.startsWith(`${cleanPrefix}/`)) {\n    return cleanLink.slice(cleanPrefix.length + 1)\n  }\n  return cleanLink.split('/').at(-1) ?? null\n}\n\n/**\n * Strip the leading slash from a path.\n *\n * @private\n * @param p - Path string\n * @returns Path without leading slash\n */\nfunction stripLeadingSlash(p: string): string {\n  if (p.startsWith('/')) {\n    return p.slice(1)\n  }\n  return p\n}\n","import { createHash } from 'node:crypto'\nimport fs from 'node:fs/promises'\nimport path from 'node:path'\n\nimport type { BadgeRule, Page, CiderpressConfig } from '@ciderpress/config'\nimport { collectAllWorkspaceItems, resolveStatuses } from '@ciderpress/config'\nimport { log } from '@clack/prompts'\nimport { match, P } from 'massaman/match'\nimport { isNil, isNotNil } from 'massaman/predicate'\n\nimport { generateAssets } from '../banner/index.ts'\nimport type { AssetConfig } from '../banner/types.ts'\nimport type { Paths } from '../paths.ts'\nimport { applyBadges } from './badges.ts'\nimport { copyPage } from './copy.ts'\nimport { buildWorkspaceData, generateDefaultHomePage } from './home.ts'\nimport { loadManifest, saveManifest, cleanStaleFiles } from './manifest.ts'\nimport type { OpenAPISidebarEntry } from './openapi.ts'\nimport { syncAllOpenAPI } from './openapi.ts'\nimport { discoverPlanningPages } from './planning.ts'\nimport { resolveEntries } from './resolve/index.ts'\nimport { buildSourceMap } from './rewrite-links.ts'\nimport { generateNav } from './sidebar/index.ts'\nimport { injectLandingPages } from './sidebar/inject.ts'\nimport { writeMetaFiles } from './sidebar/write-meta.ts'\nimport type { PageData, ResolvedEntry, SidebarItem, SyncContext } from './types.ts'\nimport { enrichWorkspaceCards, synthesizeWorkspaceSections } from './workspace.ts'\n\n/**\n * Aggregate result from a completed sync pass.\n */\nexport interface SyncResult {\n  readonly pagesWritten: number\n  readonly pagesSkipped: number\n  readonly pagesRemoved: number\n  readonly elapsed: number\n  /**\n   * When set, the sync failed and this message describes why.\n   * Callers should treat a non-null error as a hard failure.\n   */\n  readonly error?: string\n}\n\nexport interface SyncOptions {\n  /**\n   * Resolved project paths.\n   */\n  readonly paths: Paths\n  /**\n   * When true, suppress all log output during sync.\n   */\n  readonly quiet?: boolean\n  /**\n   * Shared cache of dereferenced OpenAPI specs.\n   * Persisted across sync passes in dev mode to avoid re-parsing unchanged specs.\n   */\n  readonly openapiCache?: Map<string, unknown>\n}\n\n/**\n * Run a full documentation sync from config to the output directory.\n *\n * Resolves sections, copies pages, generates sidebar/nav, syncs OpenAPI specs,\n * and manages the incremental manifest for change tracking.\n *\n * @param config - Validated ciderpress config\n * @param options - Sync options including resolved paths and quiet flag\n * @returns Sync result with counts of pages written, skipped, and removed\n */\nexport async function sync(config: CiderpressConfig, options: SyncOptions): Promise<SyncResult> {\n  const start = performance.now()\n  const quiet = resolveQuiet(options.quiet)\n\n  const { repoRoot, contentDir: outDir } = options.paths\n\n  await fs.mkdir(outDir, { recursive: true })\n  await fs.mkdir(path.resolve(outDir, '.generated'), { recursive: true })\n\n  const assetConfig = buildAssetConfig(config)\n  const assetConfigHash = createHash('sha256').update(JSON.stringify(assetConfig)).digest('hex')\n\n  const previousManifest = await loadManifest(outDir)\n\n  const assetConfigChanged =\n    isNil(previousManifest) || previousManifest.assetConfigHash !== assetConfigHash\n  if (assetConfigChanged) {\n    await generateAssets({ config: assetConfig, publicDir: options.paths.publicDir })\n  }\n\n  // Wipe top-level files in `outDir/public` so deleted user assets\n  // (e.g. a removed `repoRoot/public/logo.svg`) don't linger and\n  // silently override the freshly generated set on the next build —\n  // `copyAll` is append-only. Subdirectories are preserved because\n  // `outDir/public/images/` is the destination for the per-page\n  // `rewriteImages` step further down, which is gated by mtime\n  // caching and won't re-copy files for unchanged pages.\n  await wipePublicTopLevel(path.resolve(outDir, 'public'))\n\n  // Copy public assets into content/public/ so Rspress can resolve them\n  // (Rspress looks for public/ inside the root directory, which is .ciderpress/content/)\n  await copyAll(options.paths.publicDir, path.resolve(outDir, 'public'))\n\n  // Overlay user-owned static assets from `<repoRoot>/public/` on top of\n  // the generated set. This is the documented opt-in path for shipping\n  // a custom `logo.svg` / `favicon.svg` / `icon.svg` / loader asset —\n  // user files win over the auto-generated ones with the same name.\n  // `copyAll` is a no-op when the source directory does not exist, so\n  // projects without a `public/` dir get the auto-generated set only.\n  await copyAll(path.resolve(repoRoot, 'public'), path.resolve(outDir, 'public'))\n\n  const ctx: SyncContext = {\n    repoRoot,\n    outDir,\n    config,\n    previousManifest,\n    manifest: { files: {}, timestamp: Date.now() },\n    quiet,\n    openapiCache: options.openapiCache,\n  }\n\n  const workspaceSections = synthesizeWorkspaceSections(config)\n  const rootPages: Page[] = [...config.pages, ...workspaceSections]\n\n  const [resolveErr, rawResolved] = await resolveEntries(rootPages, ctx)\n  if (resolveErr) {\n    return {\n      pagesWritten: 0,\n      pagesSkipped: 0,\n      pagesRemoved: 0,\n      elapsed: performance.now() - start,\n      error: resolveErr.message,\n    }\n  }\n\n  const enriched = enrichWorkspaceCards(rawResolved, config)\n\n  // Returns a new tree (immutable) rather than mutating `enriched`.\n  const workspaces = collectAllWorkspaceItems(config)\n  const withLandings = injectLandingPages(enriched, rootPages, workspaces)\n\n  // Stamp badges (frontmatter/defaults/glob + named statuses) onto the\n  // tree so `_meta.json` generation can carry them as Rspress `tag`s, and\n  // collect a route→badges map for page-level rendering (breadcrumbs).\n  const badgeResult = await applyBadges(withLandings, {\n    rules: resolveBadgeRules(config),\n    registry: resolveStatuses(config.statuses),\n    groupBadges: resolveGroupBadges(config),\n  })\n  const resolved = badgeResult.tree\n  await fs.writeFile(\n    path.resolve(outDir, '.generated/badges.json'),\n    JSON.stringify(badgeResult.badgeMap, null, 2),\n    'utf8'\n  )\n\n  const sectionPages = collectPages(resolved)\n\n  const workspaceResult = buildWorkspaceData(config)\n  const sectionScopePaths = collectStandaloneScopePaths(resolved)\n  await fs.writeFile(\n    path.resolve(outDir, '.generated/workspaces.json'),\n    JSON.stringify(workspaceResult.data, null, 2),\n    'utf8'\n  )\n\n  const hasExplicitHome = sectionPages.some((p) => p.outputPath === 'index.md')\n  const homeResult = await match(hasExplicitHome)\n    .with(true, () => Promise.resolve(null))\n    .otherwise(() => generateDefaultHomePage(config, repoRoot))\n\n  const pages: PageData[] = match(homeResult)\n    .with(P.nonNullable, (result) => [\n      ...sectionPages,\n      {\n        content: result.content,\n        outputPath: 'index.md',\n        frontmatter: {},\n      } satisfies PageData,\n    ])\n    .otherwise(() => sectionPages)\n\n  const planningPages = await discoverPlanningPages(ctx)\n\n  const openapiResult = await syncAllOpenAPI(ctx)\n\n  const openapiScopePaths = collectOpenapiScopePaths(openapiResult.sidebar)\n  const standaloneScopePaths = [...sectionScopePaths, ...openapiScopePaths]\n  await fs.writeFile(\n    path.resolve(outDir, '.generated/scopes.json'),\n    JSON.stringify(standaloneScopePaths, null, 2),\n    'utf8'\n  )\n\n  const allPages = [...pages, ...planningPages, ...openapiResult.pages]\n\n  const skipMtimeOptimization =\n    isNotNil(previousManifest) && allPages.length !== previousManifest.resolvedCount\n\n  const sourceMap = buildSourceMap({ pages: allPages, repoRoot })\n  const copyCtx: SyncContext = { ...ctx, sourceMap, skipMtimeOptimization }\n\n  const pageResults = await Promise.all(\n    allPages.map(async (page) => {\n      const entry = await copyPage(page, copyCtx)\n      const prevFile = match(previousManifest)\n        .with(P.nonNullable, (m) => m.files[entry.outputPath])\n        .otherwise(() => {})\n      const isNew =\n        entry.contentHash !==\n        match(prevFile)\n          .with(P.nonNullable, (p) => p.contentHash)\n          .otherwise(() => {})\n      return { entry, isNew }\n    })\n  )\n\n  const manifestFiles = Object.fromEntries(\n    pageResults.map(({ entry }) => [entry.outputPath, entry])\n  )\n  // oxlint-disable-next-line eslint/no-unused-expressions -- side-effect boundary: manifest is intentionally mutable context accumulated during sync\n  ctx.manifest.files = manifestFiles\n\n  const { written, skipped } = pageResults.reduce(\n    (counts, { isNew }) => {\n      if (isNew) {\n        return { written: counts.written + 1, skipped: counts.skipped }\n      }\n      return { written: counts.written, skipped: counts.skipped + 1 }\n    },\n    { written: 0, skipped: 0 }\n  )\n\n  // `cleanStaleFiles` returns `{ attempted, removed, failed }` so we can\n  // surface per-path failures to the user without aborting the sync.\n  const cleanResult = await match(previousManifest)\n    .with(P.nonNullable, async (m) => await cleanStaleFiles(outDir, m, ctx.manifest))\n    .otherwise(() => Promise.resolve({ attempted: 0, removed: 0, failed: [] as const }))\n  const { removed, attempted: cleanAttempted, failed: cleanFailed } = cleanResult\n  if (!quiet && cleanFailed.length > 0) {\n    log.warn(\n      `Failed to remove ${cleanFailed.length} stale file(s); ` +\n        `${removed}/${cleanAttempted} succeeded`\n    )\n    // oxlint-disable-next-line unicorn/no-array-for-each -- side-effect log per failure\n    cleanFailed.forEach((f) => {\n      log.warn(`  ${f.path}: ${f.reason}`)\n    })\n  }\n\n  const nav = generateNav(config, resolved)\n  await writeMetaFiles({\n    contentDir: outDir,\n    entries: resolved,\n    nav,\n    openapiEntries: openapiResult.sidebar,\n  })\n\n  // Rspress no longer reads sidebar.json/nav.json (sidebar/nav come from\n  // _meta.json/_nav.json), but they provide a single-file view of the\n  // resolved structure for tooling and debugging.\n  await Promise.all([\n    fs.writeFile(\n      path.resolve(outDir, '.generated/sidebar.json'),\n      JSON.stringify(buildSidebarSnapshot(resolved), null, 2),\n      'utf8'\n    ),\n    fs.writeFile(path.resolve(outDir, '.generated/nav.json'), JSON.stringify(nav, null, 2), 'utf8'),\n  ])\n\n  const manifest = {\n    ...ctx.manifest,\n    assetConfigHash,\n    openapiMtimes: openapiResult.specMtimes,\n    resolvedCount: allPages.length,\n  }\n  await saveManifest(outDir, manifest)\n\n  await writeCiderpressReadme(options.paths.outputRoot)\n\n  const elapsed = performance.now() - start\n  if (!quiet) {\n    log.success(\n      `Sync complete: ${written} written, ${skipped} unchanged, ${removed} removed (${elapsed.toFixed(0)}ms)`\n    )\n  }\n\n  return { pagesWritten: written, pagesSkipped: skipped, pagesRemoved: removed, elapsed }\n}\n\n/**\n * Read the glob {@link BadgeRule}s from the `badges.rules` config.\n *\n * @private\n * @param config - Loaded ciderpress config\n * @returns The badge rules, or an empty array when none are declared\n */\nfunction resolveBadgeRules(config: CiderpressConfig): readonly BadgeRule[] {\n  return match(config.badges)\n    .with({ rules: P.nonNullable }, (badges) => badges.rules)\n    .otherwise(() => [])\n}\n\n/**\n * Read the `badges.group` toggle (default `false`) — whether a\n * collapsible-doc group surfaces its badge on any surface.\n *\n * @private\n * @param config - Loaded ciderpress config\n * @returns True when collapsible-doc groups should show their badge\n */\nfunction resolveGroupBadges(config: CiderpressConfig): boolean {\n  return match(config.badges)\n    .with({ group: true }, () => true)\n    .otherwise(() => false)\n}\n\n/**\n * Recursively collect all page data from a resolved entry tree.\n *\n * @private\n * @param entries - Resolved entry tree nodes\n * @returns Flat array of page data from all entries and their children\n */\nfunction collectPages(entries: readonly ResolvedEntry[]): PageData[] {\n  return entries.reduce<PageData[]>((pages, entry) => {\n    const withPage = concatPage(pages, entry.page)\n    if (entry.items) {\n      return [...withPage, ...collectPages(entry.items)]\n    }\n    return withPage\n  }, [])\n}\n\n/**\n * Write a bare-bones README.md in the .ciderpress/ root explaining the directory.\n *\n * @private\n * @param outputRoot - Absolute path to the .ciderpress/ directory\n * @returns Promise that resolves when the file is written\n */\nasync function writeCiderpressReadme(outputRoot: string): Promise<void> {\n  const readmePath = path.resolve(outputRoot, 'README.md')\n  const content = `# .ciderpress\n\nThis directory is managed by ciderpress. It contains the\nmaterialized documentation site — synced content, build artifacts, and static assets.\n\n| Directory   | Description                                    |\n| ----------- | ---------------------------------------------- |\n| \\`content/\\`  | Synced markdown pages and generated config     |\n| \\`public/\\`   | Static assets (logos, icons, banners)           |\n| \\`dist/\\`     | Build output                                   |\n| \\`cache/\\`    | Build cache                                    |\n\n## Commands\n\n\\`\\`\\`bash\nciderpress sync    # Sync docs into content/\nciderpress dev     # Start dev server\nciderpress build   # Build static site\n\\`\\`\\`\n\n> **Do not edit files in \\`content/\\`** — they are regenerated on every sync.\n> Edit the source markdown in your workspace packages instead.\n`\n  await fs.writeFile(readmePath, content, 'utf8')\n}\n\n/**\n * Recursively copy all files from src to dest, overwriting existing files.\n *\n * @private\n * @param src - Source directory path\n * @param dest - Destination directory path\n * @returns Promise that resolves when all files are copied\n */\nasync function copyAll(src: string, dest: string): Promise<void> {\n  const exists = await fs.stat(src).catch(() => null)\n  if (!exists) {\n    return\n  }\n  await fs.mkdir(dest, { recursive: true })\n  const entries = await fs.readdir(src, { withFileTypes: true })\n  await Promise.all(\n    entries.map(async (entry) => {\n      const srcPath = path.resolve(src, entry.name)\n      const destPath = path.resolve(dest, entry.name)\n      if (entry.isDirectory()) {\n        await copyAll(srcPath, destPath)\n      } else {\n        await fs.copyFile(srcPath, destPath)\n      }\n    })\n  )\n}\n\n/**\n * Remove every top-level file inside `dir` while leaving subdirectories\n * intact. Used before the public-asset overlay so deleted user assets\n * don't linger, without nuking the per-page rewriteImages output at\n * `dir/images/`.\n *\n * @private\n * @param dir - Absolute path to the directory whose top-level files\n *   should be wiped. No-op when the directory does not exist.\n */\nasync function wipePublicTopLevel(dir: string): Promise<void> {\n  const exists = await fs.stat(dir).catch(() => null)\n  if (!exists) {\n    return\n  }\n  const entries = await fs.readdir(dir, { withFileTypes: true })\n  await Promise.all(\n    entries\n      .filter((entry) => entry.isFile())\n      .map((entry) => fs.rm(path.resolve(dir, entry.name), { force: true }))\n  )\n}\n\n/**\n * Resolve the quiet flag to a boolean, defaulting to false.\n *\n * @private\n * @param quiet - Optional quiet flag from sync options\n * @returns Resolved boolean value\n */\nfunction resolveQuiet(quiet: boolean | undefined | null): boolean {\n  if (isNotNil(quiet)) {\n    return quiet\n  }\n  return false\n}\n\n/**\n * Append a page to the pages array if it exists.\n *\n * @private\n * @param pages - Existing pages array\n * @param page - Optional page to append\n * @returns New array with the page appended (if present)\n */\nfunction concatPage(pages: readonly PageData[], page: PageData | undefined): PageData[] {\n  if (page) {\n    return [...pages, page]\n  }\n  return [...pages]\n}\n\n/**\n * Collect standalone sidebar scope paths from resolved entries.\n *\n * Returns an array of link paths (e.g. `[\"/packages\", \"/contributing\"]`)\n * for sections that have `standalone: true`. These paths are written to\n * `.generated/scopes.json` and consumed at runtime by the custom Sidebar\n * component to isolate standalone sections into their own sidebar scope.\n *\n * @private\n * @param entries - Top-level resolved entries\n * @returns Array of standalone scope path strings\n */\nfunction collectStandaloneScopePaths(entries: readonly ResolvedEntry[]): readonly string[] {\n  return entries.filter((e) => (e.standalone || e.root) && e.link).map((e) => e.link as string)\n}\n\n/**\n * Collect scope paths from root-level OpenAPI sidebar entries.\n *\n * Root-level entries (from `config.openapi`) need their own standalone\n * scope so their sidebar items don't bleed into the main sidebar.\n * Workspace-level entries inherit their parent workspace's scope.\n *\n * @private\n * @param entries - OpenAPI sidebar entries from sync\n * @returns Array of root-level OpenAPI scope path strings\n */\nfunction collectOpenapiScopePaths(entries: readonly OpenAPISidebarEntry[]): readonly string[] {\n  return entries.filter((e) => e.rootLevel).map((e) => e.prefix)\n}\n\n/**\n * Extract an `AssetConfig` from the ciderpress config.\n * Falls back to 'Documentation' when no title is set.\n *\n * @private\n * @param config - Ciderpress config object\n * @returns Asset config with title and optional tagline\n */\nfunction buildAssetConfig(config: CiderpressConfig): AssetConfig {\n  const heroTagline = match(config.home)\n    .with({ hero: { tagline: P.string } }, (h) => h.hero.tagline)\n    .otherwise(() => undefined)\n  return { title: config.title ?? 'Documentation', tagline: heroTagline }\n}\n\n/**\n * Build a flat sidebar snapshot from the resolved entry tree.\n *\n * Produces a `Record<string, SidebarItem[]>` keyed by top-level section\n * link (or `\"/\"` for non-standalone sections). Used only for the\n * `.generated/sidebar.json` snapshot — Rspress reads `_meta.json` instead.\n *\n * @private\n * @param entries - Resolved entry tree\n * @returns Sidebar record suitable for JSON serialization\n */\nfunction buildSidebarSnapshot(entries: readonly ResolvedEntry[]): Record<string, unknown[]> {\n  return {\n    '/': entriesToSidebarItems(entries) as unknown[],\n  }\n}\n\n/**\n * Recursively convert resolved entries to sidebar items for the snapshot.\n *\n * @private\n * @param items - Resolved entries to convert\n * @returns Flat sidebar items array\n */\nfunction entriesToSidebarItems(items: readonly ResolvedEntry[]): readonly SidebarItem[] {\n  return items.filter((e) => !e.hidden).map(entryToSidebarItem)\n}\n\n/**\n * Convert a single resolved entry to a sidebar item.\n *\n * @private\n * @param entry - Resolved entry to convert\n * @returns Sidebar item with text, optional link, and optional children\n */\nfunction entryToSidebarItem(entry: ResolvedEntry): SidebarItem {\n  if (entry.items && entry.items.length > 0) {\n    return {\n      text: entry.title,\n      ...maybeSidebarLink(entry.link),\n      ...maybeSidebarCollapsed(entry.collapsible),\n      items: entriesToSidebarItems(entry.items),\n    }\n  }\n  return { text: entry.title, link: entry.link }\n}\n\n/**\n * Return a link property if defined.\n *\n * @private\n * @param link - Optional link string\n * @returns Object with link, or empty object\n */\nfunction maybeSidebarLink(link: string | undefined): { readonly link?: string } {\n  if (link) {\n    return { link }\n  }\n  return {}\n}\n\n/**\n * Return a collapsed property if collapsible is true.\n *\n * @private\n * @param collapsible - Optional collapsible flag\n * @returns Object with collapsed flag, or empty object\n */\nfunction maybeSidebarCollapsed(collapsible: boolean | undefined): { readonly collapsed?: true } {\n  if (collapsible) {\n    return { collapsed: true as const }\n  }\n  return {}\n}\n","import fs from 'node:fs/promises'\n\nimport { command } from '@kidd-cli/core'\nimport { compact } from 'massaman/array'\n\nimport { createPaths } from '../lib/paths.ts'\nimport type { Paths } from '../lib/paths.ts'\n\n/**\n * Remove ciderpress build artifacts and caches.\n *\n * Deletes `.ciderpress/cache/`, `.ciderpress/content/`, and `.ciderpress/dist/`.\n * Safe to run at any time — all directories are regenerated by `sync` and `build`.\n *\n * @param paths - Resolved project paths\n * @returns Names of directories that were actually removed\n */\nexport async function clean(paths: Paths): Promise<readonly string[]> {\n  const results = await Promise.all(\n    cleanTargets(paths).map(async ({ dir, label }) => {\n      // oxlint-disable-next-line security/detect-non-literal-fs-filename -- safe: removing known ciderpress output directories\n      const exists = await fs.stat(dir).catch(() => null)\n      if (exists) {\n        // oxlint-disable-next-line security/detect-non-literal-fs-filename -- safe: removing known ciderpress output directories\n        await fs.rm(dir, { recursive: true, force: true })\n        return label\n      }\n      return null\n    })\n  )\n\n  return compact(results)\n}\n\n/**\n * Registers the `clean` CLI command to remove build artifacts and caches.\n */\nexport default command({\n  name: 'clean',\n  description: 'Remove build artifacts, synced content, and build cache',\n  handler: async (ctx) => {\n    const paths = createPaths(process.cwd())\n    ctx.log.intro('ciderpress clean')\n\n    const removed = await clean(paths)\n\n    if (removed.length > 0) {\n      ctx.log.success(`Removed: ${removed.join(', ')}`)\n    } else {\n      ctx.log.info('Nothing to clean')\n    }\n\n    ctx.log.outro('Done')\n  },\n})\n\n/**\n * Build the list of directories to remove for a given set of paths.\n *\n * @private\n * @param paths - Resolved project paths\n * @returns Array of directory/label pairs to clean\n */\nfunction cleanTargets(paths: Paths): readonly { readonly dir: string; readonly label: string }[] {\n  return [\n    { dir: paths.cacheDir, label: 'cache' },\n    { dir: paths.contentDir, label: 'content' },\n    { dir: paths.distDir, label: 'dist' },\n  ]\n}\n","import type { CiderpressConfig } from '@ciderpress/config'\nimport { loadConfig } from '@ciderpress/config/loader'\nimport { command } from '@kidd-cli/core'\nimport { match, P } from 'massaman/match'\nimport { z } from 'zod'\n\nimport { generateAssets } from '../lib/banner/index.ts'\nimport type { AssetConfig } from '../lib/banner/index.ts'\nimport {\n  presentResults,\n  runBuildCheck,\n  runConfigCheck,\n  runMarkersCheck,\n  runTemplatesCheck,\n} from '../lib/check.ts'\nimport { createPaths } from '../lib/paths.ts'\nimport { buildSite } from '../lib/rspress.ts'\nimport { sync } from '../lib/sync/index.ts'\nimport { configTemplates } from '../lib/templates.ts'\nimport { clean } from './clean.ts'\n\n/**\n * Registers the `build` CLI command — the full production pipeline.\n *\n * Steps: clean (optional) → sync content → generate assets → build site.\n *\n * When `--check` is enabled (default), config validation and deadlink\n * detection run as part of the build. Use `--no-check` to skip checks\n * and build with standard (noisy) Rspress output.\n */\nexport default command({\n  name: 'build',\n  description: 'Sync content, generate assets, and build the site',\n  options: z.object({\n    quiet: z.boolean().optional().default(false),\n    clean: z.boolean().optional().default(false),\n    check: z.boolean().optional().default(true),\n    verbose: z.boolean().optional().default(false),\n  }),\n  handler: async (ctx) => {\n    const { quiet, check, verbose } = ctx.args\n    const paths = createPaths(process.cwd())\n    ctx.log.intro('ciderpress build')\n\n    if (ctx.args.clean) {\n      const removed = await clean(paths)\n      if (removed.length > 0 && !quiet) {\n        ctx.log.info(`Cleaned: ${removed.join(', ')}`)\n      }\n    }\n\n    const [configErr, config] = await loadConfig(paths.repoRoot)\n    if (configErr) {\n      ctx.log.error(configErr.message)\n      if (configErr.errors && configErr.errors.length > 0) {\n        const details = configErr.errors\n          .map((err) => `  ${err.path.join('.')}: ${err.message}`)\n          .join('\\n')\n        ctx.log.error(details)\n      }\n      process.exit(1)\n    }\n\n    if (check) {\n      ctx.log.step('Validating config...')\n      const configResult = runConfigCheck({ config, loadError: configErr })\n\n      ctx.log.step('Validating templates...')\n      const templatesResult = await runTemplatesCheck({\n        templates: configTemplates(config),\n        paths,\n      })\n\n      ctx.log.step('Syncing content...')\n      const syncResult = await sync(config, { paths, quiet: true })\n      if (syncResult.error) {\n        ctx.log.error(syncResult.error)\n        process.exit(1)\n      }\n\n      await runAssetGeneration({ config, paths, log: ctx.log, quiet: true })\n\n      ctx.log.step('Checking for unfilled markers...')\n      const markersResult = await runMarkersCheck({\n        contentDir: paths.contentDir,\n        repoRoot: paths.repoRoot,\n      })\n\n      ctx.log.step('Building & checking for broken links...')\n      const buildResult = await runBuildCheck({ config, paths, verbose })\n\n      const passed = presentResults({\n        configResult,\n        templatesResult,\n        markersResult,\n        buildResult,\n        logger: ctx.log,\n      })\n      if (!passed) {\n        ctx.log.outro('Build failed')\n        process.exit(1)\n      }\n    } else {\n      const uncheckedSyncResult = await sync(config, { paths, quiet })\n      if (uncheckedSyncResult.error) {\n        ctx.log.error(uncheckedSyncResult.error)\n        process.exit(1)\n      }\n      await runAssetGeneration({ config, paths, log: ctx.log, quiet })\n      await buildSite({ config, paths })\n    }\n\n    ctx.log.outro('Done')\n  },\n})\n\n/**\n * Build an `AssetConfig` from the loaded ciderpress config.\n * Returns `null` when no title is configured (nothing to generate).\n *\n * @private\n * @param config - Resolved ciderpress config\n * @returns Asset config or null when no title is present\n */\nfunction buildAssetConfig(config: CiderpressConfig): AssetConfig | null {\n  if (!config.title) {\n    return null\n  }\n  const tagline = match(config.home)\n    .with({ hero: { tagline: P.string } }, (h) => h.hero.tagline)\n    .otherwise(() => undefined)\n  return { title: config.title, tagline }\n}\n\ninterface RunAssetGenerationParams {\n  readonly config: CiderpressConfig\n  readonly paths: ReturnType<typeof createPaths>\n  readonly log: { readonly step: (msg: string) => void; readonly info: (msg: string) => void }\n  readonly quiet: boolean\n}\n\n/**\n * Generate branded SVG assets (banner, logo, icon) if a title is configured.\n *\n * @private\n * @param params - Config, paths, logger, and quiet flag\n */\nasync function runAssetGeneration(params: RunAssetGenerationParams): Promise<void> {\n  const assetConfig = buildAssetConfig(params.config)\n  if (!assetConfig) {\n    return\n  }\n\n  if (!params.quiet) {\n    params.log.step('Generating assets...')\n  }\n\n  const [assetErr, written] = await generateAssets({\n    config: assetConfig,\n    publicDir: params.paths.publicDir,\n  })\n\n  if (assetErr) {\n    params.log.info(`Asset generation skipped: ${assetErr.message}`)\n    return\n  }\n\n  if (written.length > 0 && !params.quiet) {\n    params.log.info(`Generated ${written.join(', ')}`)\n  }\n}\n","import { loadConfig } from '@ciderpress/config/loader'\nimport { command } from '@kidd-cli/core'\n\nimport {\n  presentResults,\n  runBuildCheck,\n  runConfigCheck,\n  runMarkersCheck,\n  runTemplatesCheck,\n} from '../lib/check.ts'\nimport { createPaths } from '../lib/paths.ts'\nimport { sync } from '../lib/sync/index.ts'\n\n/**\n * Registers the `check` CLI command to validate config and detect deadlinks.\n */\nexport default command({\n  name: 'check',\n  description: 'Validate config and check for broken links',\n  handler: async (ctx) => {\n    const paths = createPaths(process.cwd())\n    ctx.log.intro('ciderpress check')\n\n    // Config validation — loadConfig validates via validateConfig and\n    // returns a Result tuple. No process.exit, no process overrides.\n    ctx.log.step('Validating config...')\n    const [configErr, config] = await loadConfig(paths.repoRoot)\n    const configResult = runConfigCheck({ config, loadError: configErr })\n\n    // If config is invalid, present the error and bail — sync/build need valid config\n    if (configErr || !config) {\n      const templatesResult = { status: 'skipped' } as const\n      const markersResult = { status: 'skipped' } as const\n      const buildResult = { status: 'skipped' } as const\n      presentResults({ configResult, templatesResult, markersResult, buildResult, logger: ctx.log })\n      ctx.log.outro('Checks failed')\n      process.exit(1)\n    }\n\n    ctx.log.step('Validating templates...')\n    const templatesResult = await runTemplatesCheck({ templates: config.templates, paths })\n\n    ctx.log.step('Syncing content...')\n    const syncResult = await sync(config, { paths, quiet: true })\n    if (syncResult.error) {\n      ctx.log.error(syncResult.error)\n      process.exit(1)\n    }\n    ctx.log.success(\n      `Synced (${syncResult.pagesWritten} written, ${syncResult.pagesSkipped} unchanged)`\n    )\n\n    ctx.log.step('Checking for unfilled markers...')\n    const markersResult = await runMarkersCheck({\n      contentDir: paths.contentDir,\n      repoRoot: paths.repoRoot,\n    })\n\n    ctx.log.step('Checking for broken links...')\n    const buildResult = await runBuildCheck({ config, paths })\n\n    const passed = presentResults({\n      configResult,\n      templatesResult,\n      markersResult,\n      buildResult,\n      logger: ctx.log,\n    })\n\n    if (passed) {\n      ctx.log.outro('All checks passed')\n    } else {\n      ctx.log.outro('Checks failed')\n      process.exit(1)\n    }\n  },\n})\n","import { createContext, useContext, useEffect, useState } from \"react\";\nimport { jsx } from \"react/jsx-runtime\";\nimport process from \"node:process\";\nimport { Box, useStdout } from \"ink\";\n//#region src/screen/provider.tsx\nconst KiddContext = createContext(null);\n/**\n* Provider that injects the kidd screen context into the React tree.\n* Screens rendered by the kidd runtime are automatically wrapped in\n* this provider.\n*\n* @private\n* @param props - Provider props containing the context value and children.\n* @returns A React element wrapping children with the kidd context.\n*/\nfunction KiddProvider({ children, value }) {\n\treturn /* @__PURE__ */ jsx(KiddContext.Provider, {\n\t\tvalue,\n\t\tchildren\n\t});\n}\n/**\n* Access the command context from within a screen component.\n*\n* Returns a {@link ScreenContext} containing data properties (`args`,\n* `config`, `meta`, `store`), React-backed I/O (`log`, `spinner`),\n* and middleware-decorated properties (`auth`, `http`, `report`, etc.).\n*\n* `log` and `spinner` are automatically swapped with screen-safe\n* implementations that render through the `<Output />` component.\n* Middleware properties like `report` are also swapped when present.\n*\n* @returns The current screen context.\n*/\nfunction useScreenContext() {\n\tconst ctx = useContext(KiddContext);\n\tif (!ctx) throw new Error(\"useScreenContext must be used inside a screen() component\");\n\treturn ctx;\n}\n//#endregion\n//#region src/ui/layout/fullscreen.tsx\n/** ANSI: switch to the alternate screen buffer. */\nconst ENTER_ALT_SCREEN = \"\\x1B[?1049h\";\n/**\n* ANSI: return to the normal screen buffer.\n*/\nconst LEAVE_ALT_SCREEN = \"\\x1B[?1049l\";\n/**\n* ANSI: clear the entire screen.\n*/\nconst CLEAR_SCREEN = \"\\x1B[2J\";\n/**\n* ANSI: move the cursor to the top-left corner.\n*/\nconst CURSOR_HOME = \"\\x1B[H\";\n/** ANSI: hide the cursor. */\nconst HIDE_CURSOR = \"\\x1B[?25l\";\n/** ANSI: show the cursor. */\nconst SHOW_CURSOR = \"\\x1B[?25h\";\nconst FullScreenContext = createContext(null);\n/**\n* Read terminal dimensions and fullscreen state from the nearest\n* `<FullScreen>` ancestor.\n*\n* When used outside a `<FullScreen>`, falls back to `process.stdout`\n* dimensions with `isFullScreen: false`.\n*\n* @returns Current fullscreen state including terminal dimensions.\n*/\nfunction useFullScreen() {\n\tconst ctx = useContext(FullScreenContext);\n\tif (ctx) return ctx;\n\treturn {\n\t\tcolumns: process.stdout.columns ?? 80,\n\t\tisFullScreen: false,\n\t\trows: process.stdout.rows ?? 24\n\t};\n}\n/**\n* Track terminal dimensions with resize events.\n*\n* Standalone hook that does not depend on `<FullScreen>`. Listens for\n* the `resize` event on `process.stdout` and returns the current\n* columns and rows.\n*\n* @returns Current terminal size.\n*/\nfunction useTerminalSize() {\n\tconst [size, setSize] = useState(readTerminalSize);\n\tuseEffect(() => {\n\t\t/**\n\t\t* Handle terminal resize events.\n\t\t*\n\t\t* @private\n\t\t*/\n\t\tfunction handleResize() {\n\t\t\tsetSize(readTerminalSize());\n\t\t}\n\t\tprocess.stdout.on(\"resize\", handleResize);\n\t\treturn () => {\n\t\t\tprocess.stdout.off(\"resize\", handleResize);\n\t\t};\n\t}, []);\n\treturn size;\n}\n/**\n* Enter the terminal's alternate screen buffer while mounted.\n*\n* Wraps children in a `<Box>` that fills the terminal height. On mount,\n* writes the ANSI alternate-screen-enter sequence; on unmount (or\n* process exit), writes the leave sequence. All cleanup handlers are\n* idempotent.\n*\n* @param props - Component props including children and optional cursor hiding.\n* @returns A React element that renders children in fullscreen mode.\n*/\nfunction FullScreen({ children, hideCursor = false }) {\n\tconst { write } = useStdout();\n\tconst { columns, rows } = useTerminalSize();\n\tuseEffect(() => {\n\t\twrite(ENTER_ALT_SCREEN);\n\t\tif (hideCursor) write(HIDE_CURSOR);\n\t\tconst handlers = createCleanupHandlers({\n\t\t\thideCursor,\n\t\t\twrite\n\t\t});\n\t\thandlers.register();\n\t\treturn () => {\n\t\t\thandlers.unregister();\n\t\t\twriteLeaveSequence({\n\t\t\t\thideCursor,\n\t\t\t\twrite\n\t\t\t});\n\t\t};\n\t}, [write, hideCursor]);\n\tconst state = Object.freeze({\n\t\tcolumns,\n\t\tisFullScreen: true,\n\t\trows\n\t});\n\treturn /* @__PURE__ */ jsx(FullScreenContext.Provider, {\n\t\tvalue: state,\n\t\tchildren: /* @__PURE__ */ jsx(Box, {\n\t\t\tminHeight: rows,\n\t\t\tchildren\n\t\t})\n\t});\n}\n/**\n* Read the current terminal size from `process.stdout`.\n*\n* @private\n* @returns Terminal dimensions with sensible defaults.\n*/\nfunction readTerminalSize() {\n\treturn Object.freeze({\n\t\tcolumns: process.stdout.columns ?? 80,\n\t\trows: process.stdout.rows ?? 24\n\t});\n}\n/**\n* Write the leave-fullscreen ANSI sequences.\n*\n* @private\n* @param opts - Options for the write.\n*/\nfunction writeLeaveSequence({ hideCursor, write }) {\n\twrite(CLEAR_SCREEN);\n\twrite(CURSOR_HOME);\n\tif (hideCursor) write(SHOW_CURSOR);\n\twrite(LEAVE_ALT_SCREEN);\n}\n/**\n* Create signal and process-exit handlers that leave the alternate screen\n* buffer on abnormal termination. All handlers are idempotent.\n*\n* @private\n* @param config - Configuration including write function and cursor visibility.\n* @returns Frozen object with `register` and `unregister` methods.\n*/\nfunction createCleanupHandlers(config) {\n\t/**\n\t* Handle SIGINT / SIGTERM — leave alt screen and re-raise.\n\t*\n\t* @private\n\t*/\n\tfunction handleSignal(signal) {\n\t\twriteLeaveSequence(config);\n\t\tprocess.kill(process.pid, signal);\n\t}\n\t/**\n\t* Handle process.exit — leave alt screen synchronously.\n\t*\n\t* @private\n\t*/\n\tfunction handleExit() {\n\t\twriteLeaveSequence(config);\n\t}\n\treturn Object.freeze({\n\t\tregister: () => {\n\t\t\tprocess.on(\"SIGINT\", handleSignal);\n\t\t\tprocess.on(\"SIGTERM\", handleSignal);\n\t\t\tprocess.on(\"exit\", handleExit);\n\t\t},\n\t\tunregister: () => {\n\t\t\tprocess.off(\"SIGINT\", handleSignal);\n\t\t\tprocess.off(\"SIGTERM\", handleSignal);\n\t\t\tprocess.off(\"exit\", handleExit);\n\t\t}\n\t});\n}\n//#endregion\n//#region src/screen/output/store-key.ts\n/**\n* Symbol key used to attach the {@link OutputStore} to the screen context.\n*\n* @private\n*/\nconst OUTPUT_STORE_KEY = Symbol(\"kidd.outputStore\");\n/**\n* Return a new context with the {@link OutputStore} attached via a hidden\n* Symbol key. Does not mutate the original context.\n*\n* @param options - The injection options.\n* @returns A new record containing all original entries plus the store.\n*/\nfunction injectOutputStore({ ctx, store }) {\n\treturn {\n\t\t...ctx,\n\t\t[OUTPUT_STORE_KEY]: store\n\t};\n}\n/**\n* Retrieve the {@link OutputStore} from a screen context.\n*\n* Asserts that the store exists — this is a framework invariant\n* guaranteed by `screen()` calling {@link injectOutputStore}.\n*\n* @param ctx - The screen context to read from.\n* @returns The output store attached by {@link injectOutputStore}.\n*/\nfunction getOutputStore(ctx) {\n\tconst store = ctx[OUTPUT_STORE_KEY];\n\tif (store === void 0) throw new Error(\"OutputStore not found on ScreenContext. Ensure useOutputStore is called within a screen() context.\");\n\treturn store;\n}\n//#endregion\nexport { useFullScreen as a, useScreenContext as c, LEAVE_ALT_SCREEN as i, injectOutputStore as n, useTerminalSize as o, FullScreen as r, KiddProvider as s, getOutputStore as t };\n\n//# sourceMappingURL=store-key-fUtc4MNq.js.map","import { i as LEAVE_ALT_SCREEN, n as injectOutputStore, r as FullScreen, s as KiddProvider } from \"./store-key-fUtc4MNq.js\";\nimport { isFunction } from \"@kidd-cli/utils/fp\";\nimport { match as match$1 } from \"ts-pattern\";\nimport { withTag } from \"@kidd-cli/utils/tag\";\nimport \"react\";\nimport { jsx } from \"react/jsx-runtime\";\nimport process from \"node:process\";\n//#region src/screen/output/screen-log.ts\n/**\n* Create a {@link Log} instance that writes to an {@link OutputStore}\n* for rendering by the `<Output />` component.\n*\n* @param store - The output store to push entries to.\n* @returns A frozen Log instance compatible with `ctx.log`.\n*/\nfunction createScreenLog(store) {\n\treturn Object.freeze({\n\t\tinfo(message, _opts) {\n\t\t\tstore.push({\n\t\t\t\tkind: \"log\",\n\t\t\t\tlevel: \"info\",\n\t\t\t\ttext: message\n\t\t\t});\n\t\t},\n\t\tsuccess(message, _opts) {\n\t\t\tstore.push({\n\t\t\t\tkind: \"log\",\n\t\t\t\tlevel: \"success\",\n\t\t\t\ttext: message\n\t\t\t});\n\t\t},\n\t\terror(message, _opts) {\n\t\t\tstore.push({\n\t\t\t\tkind: \"log\",\n\t\t\t\tlevel: \"error\",\n\t\t\t\ttext: message\n\t\t\t});\n\t\t},\n\t\twarn(message, _opts) {\n\t\t\tstore.push({\n\t\t\t\tkind: \"log\",\n\t\t\t\tlevel: \"warn\",\n\t\t\t\ttext: message\n\t\t\t});\n\t\t},\n\t\tstep(message, _opts) {\n\t\t\tstore.push({\n\t\t\t\tkind: \"log\",\n\t\t\t\tlevel: \"step\",\n\t\t\t\ttext: message\n\t\t\t});\n\t\t},\n\t\tmessage(message, opts) {\n\t\t\tconst symbol = match$1(opts).with(void 0, () => void 0).otherwise((o) => o.symbol);\n\t\t\tstore.push({\n\t\t\t\tkind: \"log\",\n\t\t\t\tlevel: \"message\",\n\t\t\t\ttext: message,\n\t\t\t\tsymbol\n\t\t\t});\n\t\t},\n\t\tintro(_title) {},\n\t\toutro(_message) {},\n\t\tnote(_message, _title, _opts) {},\n\t\tnewline() {\n\t\t\tstore.push({ kind: \"newline\" });\n\t\t},\n\t\traw(text) {\n\t\t\tstore.push({\n\t\t\t\tkind: \"raw\",\n\t\t\t\ttext\n\t\t\t});\n\t\t},\n\t\tbox(_message, _title) {},\n\t\tstream: createScreenStreamLog()\n\t});\n}\n/**\n* Create a no-op {@link StreamLog} for screen contexts.\n*\n* @private\n*/\nfunction createScreenStreamLog() {\n\tconst noop = async (_iterable) => {};\n\treturn Object.freeze({\n\t\tinfo: noop,\n\t\tsuccess: noop,\n\t\terror: noop,\n\t\twarn: noop,\n\t\tstep: noop,\n\t\tmessage: noop\n\t});\n}\n//#endregion\n//#region src/screen/output/screen-report.ts\n/**\n* Create a {@link Report} instance that writes to an {@link OutputStore}\n* for rendering by the `<Output />` component.\n*\n* @param store - The output store to push entries to.\n* @returns A frozen Report instance compatible with `ctx.report`.\n*/\nfunction createScreenReport(store) {\n\treturn Object.freeze({\n\t\tcheck(input) {\n\t\t\tstore.push({\n\t\t\t\tkind: \"check\",\n\t\t\t\tinput\n\t\t\t});\n\t\t},\n\t\tfinding(input) {\n\t\t\tstore.push({\n\t\t\t\tkind: \"finding\",\n\t\t\t\tinput\n\t\t\t});\n\t\t},\n\t\tsummary(input) {\n\t\t\tstore.push({\n\t\t\t\tkind: \"summary\",\n\t\t\t\tinput\n\t\t\t});\n\t\t}\n\t});\n}\n//#endregion\n//#region src/screen/output/screen-spinner.ts\n/**\n* Create a {@link Spinner} instance that manages state in an {@link OutputStore}\n* for rendering by the `<Output />` component.\n*\n* @param store - The output store to update spinner state on.\n* @returns A frozen Spinner instance compatible with `ctx.status.spinner`.\n*/\nfunction createScreenSpinner(store) {\n\treturn Object.freeze({\n\t\tstart(message) {\n\t\t\tstore.setSpinner({\n\t\t\t\tstatus: \"spinning\",\n\t\t\t\tmessage: message ?? \"Loading...\"\n\t\t\t});\n\t\t},\n\t\tstop(message) {\n\t\t\tstore.setSpinner({\n\t\t\t\tstatus: \"stopped\",\n\t\t\t\tmessage: message ?? \"\"\n\t\t\t});\n\t\t},\n\t\tmessage(text) {\n\t\t\tstore.setSpinner({\n\t\t\t\tstatus: \"spinning\",\n\t\t\t\tmessage: text ?? \"\"\n\t\t\t});\n\t\t},\n\t\tcancel(message) {\n\t\t\tstore.setSpinner({\n\t\t\t\tstatus: \"cancelled\",\n\t\t\t\tmessage: message ?? \"\"\n\t\t\t});\n\t\t},\n\t\terror(message) {\n\t\t\tstore.setSpinner({\n\t\t\t\tstatus: \"error\",\n\t\t\t\tmessage: message ?? \"\"\n\t\t\t});\n\t\t},\n\t\tclear() {\n\t\t\tstore.setSpinner({ status: \"idle\" });\n\t\t},\n\t\tget isCancelled() {\n\t\t\treturn store.getSnapshot().spinner.status === \"cancelled\";\n\t\t}\n\t});\n}\n//#endregion\n//#region src/screen/output/store.ts\n/**\n* Create an external output store for accumulating log, report,\n* and spinner state in screen components.\n*\n* @returns A frozen {@link OutputStore} instance.\n*/\nfunction createOutputStore() {\n\tconst entries = [];\n\tconst subscribers = /* @__PURE__ */ new Set();\n\tlet nextId = 0;\n\tconst idle = Object.freeze({ status: \"idle\" });\n\tlet spinnerState = idle;\n\tlet snapshot = Object.freeze({\n\t\tentries: Object.freeze([]),\n\t\tspinner: idle\n\t});\n\t/**\n\t* Rebuild the snapshot and notify all subscribers.\n\t*\n\t* @private\n\t*/\n\tconst notify = () => {\n\t\tsnapshot = Object.freeze({\n\t\t\tentries: Object.freeze([...entries]),\n\t\t\tspinner: spinnerState\n\t\t});\n\t\t[...subscribers].map((cb) => cb());\n\t};\n\treturn Object.freeze({\n\t\tgetSnapshot() {\n\t\t\treturn snapshot;\n\t\t},\n\t\tsubscribe(callback) {\n\t\t\tsubscribers.add(callback);\n\t\t\treturn () => {\n\t\t\t\tsubscribers.delete(callback);\n\t\t\t};\n\t\t},\n\t\tpush(entry) {\n\t\t\tconst id = nextId;\n\t\t\tnextId += 1;\n\t\t\tentries.push({\n\t\t\t\t...entry,\n\t\t\t\tid\n\t\t\t});\n\t\t\tnotify();\n\t\t},\n\t\tsetSpinner(state) {\n\t\t\tspinnerState = state;\n\t\t\tnotify();\n\t\t}\n\t});\n}\n//#endregion\n//#region src/screen/screen.tsx\n/**\n* Define a screen command that renders a React/Ink TUI.\n*\n* The `render` property accepts a React component that receives the\n* parsed args as props. The full command context — including `log`,\n* `status`, and any middleware-decorated properties like `report` —\n* is available via `useScreenContext()`.\n*\n* Imperative I/O properties (`log`, `status`, `report`) are automatically\n* swapped with React-backed implementations that render through the\n* `<Output />` component, so the same interface works in both\n* `command()` and `screen()` contexts.\n*\n* @param def - Screen definition including description, options, exit behavior, and render component.\n* @returns A tagged Command object compatible with the kidd autoloader and command map.\n*/\nfunction screen(def) {\n\tconst exitMode = def.exit ?? \"manual\";\n\tconst ScreenComponent = def.render;\n\tconst renderFn = async (ctx) => {\n\t\tconst { render: inkRender } = await import(\"ink\");\n\t\tconst screenCtx = toScreenContext(ctx);\n\t\tconst isFullscreen = await match$1(isFunction(def.fullscreen)).with(true, () => def.fullscreen(screenCtx)).with(false, () => def.fullscreen === true).exhaustive();\n\t\tconst instance = inkRender(/* @__PURE__ */ jsx(KiddProvider, {\n\t\t\tvalue: screenCtx,\n\t\t\tchildren: match$1(isFullscreen).with(true, () => /* @__PURE__ */ jsx(FullScreen, { children: /* @__PURE__ */ jsx(ScreenComponent, { ...ctx.args }) })).with(false, () => /* @__PURE__ */ jsx(ScreenComponent, { ...ctx.args })).exhaustive()\n\t\t}));\n\t\tif (exitMode === \"auto\") {\n\t\t\tconst { unmount } = instance;\n\t\t\tsetTimeout(() => {\n\t\t\t\tunmount();\n\t\t\t}, 0);\n\t\t}\n\t\ttry {\n\t\t\tawait instance.waitUntilExit();\n\t\t} finally {\n\t\t\tif (isFullscreen) process.stdout.write(LEAVE_ALT_SCREEN);\n\t\t}\n\t};\n\treturn withTag({\n\t\taliases: def.aliases,\n\t\tdeprecated: resolveValue(def.deprecated),\n\t\tdescription: resolveValue(def.description),\n\t\thidden: resolveValue(def.hidden),\n\t\tname: def.name,\n\t\toptions: def.options,\n\t\tpositionals: def.positionals,\n\t\trender: renderFn,\n\t\tstrict: def.strict\n\t}, \"Command\");\n}\n/**\n* Keys stripped from the screen context (no screen-safe equivalent).\n*\n* @private\n*/\nconst STRIPPED_KEYS = new Set([\n\t\"colors\",\n\t\"fail\",\n\t\"format\",\n\t\"prompts\"\n]);\n/**\n* Convert a full {@link CommandContext} into a {@link ScreenContext} by\n* replacing imperative I/O properties with React-backed implementations.\n*\n* Creates an {@link OutputStore} and swaps `log`, `status.spinner`, and any\n* middleware-decorated `report` with screen-backed versions that push\n* entries to the store. The store is attached via {@link OUTPUT_STORE_KEY}\n* (a private symbol) so `<Output />` can subscribe to it.\n*\n* @param ctx - The full command context.\n* @returns A ScreenContext with React-backed I/O.\n*/\nfunction toScreenContext(ctx) {\n\tconst store = createOutputStore();\n\tconst screenLog = createScreenLog(store);\n\tconst screenSpinner = createScreenSpinner(store);\n\tconst ctxRecord = ctx;\n\tconst baseEntries = Object.keys(ctx).filter((key) => !STRIPPED_KEYS.has(key)).map((key) => [key, ctxRecord[key]]);\n\tconst reportEntries = match$1(\"report\" in ctx).with(true, () => [[\"report\", createScreenReport(store)]]).with(false, () => []).exhaustive();\n\tconst screenCtx = injectOutputStore({\n\t\tctx: Object.fromEntries([\n\t\t\t...baseEntries,\n\t\t\t[\"log\", screenLog],\n\t\t\t[\"status\", {\n\t\t\t\t...ctx.status,\n\t\t\t\tspinner: screenSpinner\n\t\t\t}],\n\t\t\t...reportEntries\n\t\t]),\n\t\tstore\n\t});\n\treturn Object.freeze(screenCtx);\n}\n/**\n* Resolve a {@link Resolvable} value.\n*\n* @private\n*/\nfunction resolveValue(value) {\n\treturn match$1(isFunction(value)).with(true, () => value()).with(false, () => value).exhaustive();\n}\n//#endregion\n//#region src/screen/render.tsx\n/**\n* Render a React element as a live Ink terminal application with the kidd\n* screen context injected.\n*\n* Wraps the provided node in a {@link KiddProvider} that supplies the\n* screen context (React-backed `log`, `spinner`, `store`, and any\n* middleware-decorated properties). Returns the raw Ink {@link Instance}\n* so callers have full lifecycle control — `waitUntilExit()`, `unmount()`,\n* `rerender()`, etc.\n*\n* @param node - The React element to render.\n* @param ctx - The command context to convert and inject as screen context.\n* @param options - Optional Ink render options (stdout, stdin, debug, etc.).\n* @returns The Ink render instance.\n*/\nasync function render(node, ctx, options) {\n\tconst { render: inkRender } = await import(\"ink\");\n\treturn inkRender(/* @__PURE__ */ jsx(KiddProvider, {\n\t\tvalue: toScreenContext(ctx),\n\t\tchildren: node\n\t}), options);\n}\n/**\n* Render a React element to a string with the kidd screen context injected.\n*\n* Wraps the provided node in a {@link KiddProvider} and delegates to Ink's\n* `renderToString`. Useful for generating documentation, writing output to\n* files, testing, or scenarios where rendered output is needed as a string\n* without a persistent terminal session.\n*\n* @param node - The React element to render.\n* @param ctx - The command context to convert and inject as screen context.\n* @param options - Optional render-to-string options (columns width).\n* @returns The rendered string output.\n*/\nasync function renderToString(node, ctx, options) {\n\tconst { renderToString: inkRenderToString } = await import(\"ink\");\n\treturn inkRenderToString(/* @__PURE__ */ jsx(KiddProvider, {\n\t\tvalue: toScreenContext(ctx),\n\t\tchildren: node\n\t}), options);\n}\n//#endregion\nexport { renderToString as n, screen as r, render as t };\n\n//# sourceMappingURL=render-BsTEEL-N.js.map","import process from 'node:process';\n\nexport default function isUnicodeSupported() {\n\tconst {env} = process;\n\tconst {TERM, TERM_PROGRAM} = env;\n\n\tif (process.platform !== 'win32') {\n\t\treturn TERM !== 'linux'; // Linux console (kernel)\n\t}\n\n\treturn Boolean(env.WT_SESSION) // Windows Terminal\n\t\t|| Boolean(env.TERMINUS_SUBLIME) // Terminus (<0.2.27)\n\t\t|| env.ConEmuTask === '{cmd::Cmder}' // ConEmu and cmder\n\t\t|| TERM_PROGRAM === 'Terminus-Sublime'\n\t\t|| TERM_PROGRAM === 'vscode'\n\t\t|| TERM === 'xterm-256color'\n\t\t|| TERM === 'alacritty'\n\t\t|| TERM === 'rxvt-unicode'\n\t\t|| TERM === 'rxvt-unicode-256color'\n\t\t|| env.TERMINAL_EMULATOR === 'JetBrains-JediTerm';\n}\n","import isUnicodeSupported from 'is-unicode-supported';\n\nconst common = {\n\tcircleQuestionMark: '(?)',\n\tquestionMarkPrefix: '(?)',\n\tsquare: '█',\n\tsquareDarkShade: '▓',\n\tsquareMediumShade: '▒',\n\tsquareLightShade: '░',\n\tsquareTop: '▀',\n\tsquareBottom: '▄',\n\tsquareLeft: '▌',\n\tsquareRight: '▐',\n\tsquareCenter: '■',\n\tbullet: '●',\n\tdot: '․',\n\tellipsis: '…',\n\tpointerSmall: '›',\n\ttriangleUp: '▲',\n\ttriangleUpSmall: '▴',\n\ttriangleDown: '▼',\n\ttriangleDownSmall: '▾',\n\ttriangleLeftSmall: '◂',\n\ttriangleRightSmall: '▸',\n\thome: '⌂',\n\theart: '♥',\n\tmusicNote: '♪',\n\tmusicNoteBeamed: '♫',\n\tarrowUp: '↑',\n\tarrowDown: '↓',\n\tarrowLeft: '←',\n\tarrowRight: '→',\n\tarrowLeftRight: '↔',\n\tarrowUpDown: '↕',\n\talmostEqual: '≈',\n\tnotEqual: '≠',\n\tlessOrEqual: '≤',\n\tgreaterOrEqual: '≥',\n\tidentical: '≡',\n\tinfinity: '∞',\n\tsubscriptZero: '₀',\n\tsubscriptOne: '₁',\n\tsubscriptTwo: '₂',\n\tsubscriptThree: '₃',\n\tsubscriptFour: '₄',\n\tsubscriptFive: '₅',\n\tsubscriptSix: '₆',\n\tsubscriptSeven: '₇',\n\tsubscriptEight: '₈',\n\tsubscriptNine: '₉',\n\toneHalf: '½',\n\toneThird: '⅓',\n\toneQuarter: '¼',\n\toneFifth: '⅕',\n\toneSixth: '⅙',\n\toneEighth: '⅛',\n\ttwoThirds: '⅔',\n\ttwoFifths: '⅖',\n\tthreeQuarters: '¾',\n\tthreeFifths: '⅗',\n\tthreeEighths: '⅜',\n\tfourFifths: '⅘',\n\tfiveSixths: '⅚',\n\tfiveEighths: '⅝',\n\tsevenEighths: '⅞',\n\tline: '─',\n\tlineBold: '━',\n\tlineDouble: '═',\n\tlineDashed0: '┄',\n\tlineDashed1: '┅',\n\tlineDashed2: '┈',\n\tlineDashed3: '┉',\n\tlineDashed4: '╌',\n\tlineDashed5: '╍',\n\tlineDashed6: '╴',\n\tlineDashed7: '╶',\n\tlineDashed8: '╸',\n\tlineDashed9: '╺',\n\tlineDashed10: '╼',\n\tlineDashed11: '╾',\n\tlineDashed12: '−',\n\tlineDashed13: '–',\n\tlineDashed14: '‐',\n\tlineDashed15: '⁃',\n\tlineVertical: '│',\n\tlineVerticalBold: '┃',\n\tlineVerticalDouble: '║',\n\tlineVerticalDashed0: '┆',\n\tlineVerticalDashed1: '┇',\n\tlineVerticalDashed2: '┊',\n\tlineVerticalDashed3: '┋',\n\tlineVerticalDashed4: '╎',\n\tlineVerticalDashed5: '╏',\n\tlineVerticalDashed6: '╵',\n\tlineVerticalDashed7: '╷',\n\tlineVerticalDashed8: '╹',\n\tlineVerticalDashed9: '╻',\n\tlineVerticalDashed10: '╽',\n\tlineVerticalDashed11: '╿',\n\tlineDownLeft: '┐',\n\tlineDownLeftArc: '╮',\n\tlineDownBoldLeftBold: '┓',\n\tlineDownBoldLeft: '┒',\n\tlineDownLeftBold: '┑',\n\tlineDownDoubleLeftDouble: '╗',\n\tlineDownDoubleLeft: '╖',\n\tlineDownLeftDouble: '╕',\n\tlineDownRight: '┌',\n\tlineDownRightArc: '╭',\n\tlineDownBoldRightBold: '┏',\n\tlineDownBoldRight: '┎',\n\tlineDownRightBold: '┍',\n\tlineDownDoubleRightDouble: '╔',\n\tlineDownDoubleRight: '╓',\n\tlineDownRightDouble: '╒',\n\tlineUpLeft: '┘',\n\tlineUpLeftArc: '╯',\n\tlineUpBoldLeftBold: '┛',\n\tlineUpBoldLeft: '┚',\n\tlineUpLeftBold: '┙',\n\tlineUpDoubleLeftDouble: '╝',\n\tlineUpDoubleLeft: '╜',\n\tlineUpLeftDouble: '╛',\n\tlineUpRight: '└',\n\tlineUpRightArc: '╰',\n\tlineUpBoldRightBold: '┗',\n\tlineUpBoldRight: '┖',\n\tlineUpRightBold: '┕',\n\tlineUpDoubleRightDouble: '╚',\n\tlineUpDoubleRight: '╙',\n\tlineUpRightDouble: '╘',\n\tlineUpDownLeft: '┤',\n\tlineUpBoldDownBoldLeftBold: '┫',\n\tlineUpBoldDownBoldLeft: '┨',\n\tlineUpDownLeftBold: '┥',\n\tlineUpBoldDownLeftBold: '┩',\n\tlineUpDownBoldLeftBold: '┪',\n\tlineUpDownBoldLeft: '┧',\n\tlineUpBoldDownLeft: '┦',\n\tlineUpDoubleDownDoubleLeftDouble: '╣',\n\tlineUpDoubleDownDoubleLeft: '╢',\n\tlineUpDownLeftDouble: '╡',\n\tlineUpDownRight: '├',\n\tlineUpBoldDownBoldRightBold: '┣',\n\tlineUpBoldDownBoldRight: '┠',\n\tlineUpDownRightBold: '┝',\n\tlineUpBoldDownRightBold: '┡',\n\tlineUpDownBoldRightBold: '┢',\n\tlineUpDownBoldRight: '┟',\n\tlineUpBoldDownRight: '┞',\n\tlineUpDoubleDownDoubleRightDouble: '╠',\n\tlineUpDoubleDownDoubleRight: '╟',\n\tlineUpDownRightDouble: '╞',\n\tlineDownLeftRight: '┬',\n\tlineDownBoldLeftBoldRightBold: '┳',\n\tlineDownLeftBoldRightBold: '┯',\n\tlineDownBoldLeftRight: '┰',\n\tlineDownBoldLeftBoldRight: '┱',\n\tlineDownBoldLeftRightBold: '┲',\n\tlineDownLeftRightBold: '┮',\n\tlineDownLeftBoldRight: '┭',\n\tlineDownDoubleLeftDoubleRightDouble: '╦',\n\tlineDownDoubleLeftRight: '╥',\n\tlineDownLeftDoubleRightDouble: '╤',\n\tlineUpLeftRight: '┴',\n\tlineUpBoldLeftBoldRightBold: '┻',\n\tlineUpLeftBoldRightBold: '┷',\n\tlineUpBoldLeftRight: '┸',\n\tlineUpBoldLeftBoldRight: '┹',\n\tlineUpBoldLeftRightBold: '┺',\n\tlineUpLeftRightBold: '┶',\n\tlineUpLeftBoldRight: '┵',\n\tlineUpDoubleLeftDoubleRightDouble: '╩',\n\tlineUpDoubleLeftRight: '╨',\n\tlineUpLeftDoubleRightDouble: '╧',\n\tlineUpDownLeftRight: '┼',\n\tlineUpBoldDownBoldLeftBoldRightBold: '╋',\n\tlineUpDownBoldLeftBoldRightBold: '╈',\n\tlineUpBoldDownLeftBoldRightBold: '╇',\n\tlineUpBoldDownBoldLeftRightBold: '╊',\n\tlineUpBoldDownBoldLeftBoldRight: '╉',\n\tlineUpBoldDownLeftRight: '╀',\n\tlineUpDownBoldLeftRight: '╁',\n\tlineUpDownLeftBoldRight: '┽',\n\tlineUpDownLeftRightBold: '┾',\n\tlineUpBoldDownBoldLeftRight: '╂',\n\tlineUpDownLeftBoldRightBold: '┿',\n\tlineUpBoldDownLeftBoldRight: '╃',\n\tlineUpBoldDownLeftRightBold: '╄',\n\tlineUpDownBoldLeftBoldRight: '╅',\n\tlineUpDownBoldLeftRightBold: '╆',\n\tlineUpDoubleDownDoubleLeftDoubleRightDouble: '╬',\n\tlineUpDoubleDownDoubleLeftRight: '╫',\n\tlineUpDownLeftDoubleRightDouble: '╪',\n\tlineCross: '╳',\n\tlineBackslash: '╲',\n\tlineSlash: '╱',\n};\n\nconst specialMainSymbols = {\n\ttick: '✔',\n\tinfo: 'ℹ',\n\twarning: '⚠',\n\tcross: '✘',\n\tsquareSmall: '◻',\n\tsquareSmallFilled: '◼',\n\tcircle: '◯',\n\tcircleFilled: '◉',\n\tcircleDotted: '◌',\n\tcircleDouble: '◎',\n\tcircleCircle: 'ⓞ',\n\tcircleCross: 'ⓧ',\n\tcirclePipe: 'Ⓘ',\n\tradioOn: '◉',\n\tradioOff: '◯',\n\tcheckboxOn: '☒',\n\tcheckboxOff: '☐',\n\tcheckboxCircleOn: 'ⓧ',\n\tcheckboxCircleOff: 'Ⓘ',\n\tpointer: '❯',\n\ttriangleUpOutline: '△',\n\ttriangleLeft: '◀',\n\ttriangleRight: '▶',\n\tlozenge: '◆',\n\tlozengeOutline: '◇',\n\thamburger: '☰',\n\tsmiley: '㋡',\n\tmustache: '෴',\n\tstar: '★',\n\tplay: '▶',\n\tnodejs: '⬢',\n\toneSeventh: '⅐',\n\toneNinth: '⅑',\n\toneTenth: '⅒',\n};\n\nconst specialFallbackSymbols = {\n\ttick: '√',\n\tinfo: 'i',\n\twarning: '‼',\n\tcross: '×',\n\tsquareSmall: '□',\n\tsquareSmallFilled: '■',\n\tcircle: '( )',\n\tcircleFilled: '(*)',\n\tcircleDotted: '( )',\n\tcircleDouble: '( )',\n\tcircleCircle: '(○)',\n\tcircleCross: '(×)',\n\tcirclePipe: '(│)',\n\tradioOn: '(*)',\n\tradioOff: '( )',\n\tcheckboxOn: '[×]',\n\tcheckboxOff: '[ ]',\n\tcheckboxCircleOn: '(×)',\n\tcheckboxCircleOff: '( )',\n\tpointer: '>',\n\ttriangleUpOutline: '∆',\n\ttriangleLeft: '◄',\n\ttriangleRight: '►',\n\tlozenge: '♦',\n\tlozengeOutline: '◊',\n\thamburger: '≡',\n\tsmiley: '☺',\n\tmustache: '┌─┐',\n\tstar: '✶',\n\tplay: '►',\n\tnodejs: '♦',\n\toneSeventh: '1/7',\n\toneNinth: '1/9',\n\toneTenth: '1/10',\n};\n\nexport const mainSymbols = {...common, ...specialMainSymbols};\nexport const fallbackSymbols = {...common, ...specialFallbackSymbols};\n\nconst shouldUseMain = isUnicodeSupported();\nconst figures = shouldUseMain ? mainSymbols : fallbackSymbols;\nexport default figures;\n\nconst replacements = Object.entries(specialMainSymbols);\n\n// On terminals which do not support Unicode symbols, substitute them to other symbols\nexport const replaceSymbols = (string, {useFallback = !shouldUseMain} = {}) => {\n\tif (useFallback) {\n\t\tfor (const [key, mainSymbol] of replacements) {\n\t\t\tstring = string.replaceAll(mainSymbol, fallbackSymbols[key]);\n\t\t}\n\t}\n\n\treturn string;\n};\n","import { c as useScreenContext, o as useTerminalSize, t as getOutputStore } from \"./store-key-fUtc4MNq.js\";\nimport { i as formatCheck, n as formatFinding, t as formatSummary } from \"./tally-CQivzeuB.js\";\nimport pc from \"picocolors\";\nimport { match } from \"ts-pattern\";\nimport { useCallback, useEffect, useMemo, useReducer, useRef, useState, useSyncExternalStore } from \"react\";\nimport { jsx, jsxs } from \"react/jsx-runtime\";\nimport { Box, Text, measureElement, useInput } from \"ink\";\nimport defaultFigures from \"figures\";\n//#region src/ui/layout/scroll-area.tsx\n/**\n* A vertically scrollable container that clips content to a fixed height\n* and auto-scrolls to keep the active item in view.\n*\n* Uses Ink's `overflow=\"hidden\"` for clipping and slices children to the\n* visible window. Optionally renders a scroll indicator showing relative\n* position within the list.\n*\n* @param props - The scroll area props.\n* @returns A rendered scroll area element.\n*/\nfunction ScrollArea({ children, height, activeIndex, itemCount, showIndicator = false, scrollOffset: controlledOffset, onScrollChange }) {\n\tconst childArray = flattenChildren(children);\n\tconst totalItems = itemCount ?? childArray.length;\n\tconst isControlled = controlledOffset !== void 0;\n\tconst [internalOffset, setInternalOffset] = useState(0);\n\tconst offset = resolveOffset(isControlled, controlledOffset, internalOffset);\n\tuseEffect(() => {\n\t\tif (activeIndex === void 0) return;\n\t\tconst newOffset = clampOffset({\n\t\t\tactiveIndex,\n\t\t\tcurrentOffset: offset,\n\t\t\theight,\n\t\t\ttotalItems\n\t\t});\n\t\tif (newOffset === offset) return;\n\t\tif (!isControlled) setInternalOffset(newOffset);\n\t\tif (onScrollChange) onScrollChange(newOffset);\n\t}, [\n\t\tactiveIndex,\n\t\theight,\n\t\ttotalItems,\n\t\toffset,\n\t\tisControlled,\n\t\tonScrollChange\n\t]);\n\treturn /* @__PURE__ */ jsxs(Box, {\n\t\tflexDirection: \"row\",\n\t\tchildren: [/* @__PURE__ */ jsx(Box, {\n\t\t\tflexDirection: \"column\",\n\t\t\toverflow: \"hidden\",\n\t\t\theight,\n\t\t\tchildren: childArray.slice(offset, offset + height)\n\t\t}), match(showIndicator && totalItems > height).with(true, () => /* @__PURE__ */ jsx(ScrollIndicator, {\n\t\t\toffset,\n\t\t\theight,\n\t\t\ttotalItems\n\t\t})).with(false, () => null).exhaustive()]\n\t});\n}\n/**\n* Render a vertical scroll indicator showing the current viewport\n* position within the full list.\n*\n* @private\n* @param props - The indicator props.\n* @returns A rendered scroll indicator column.\n*/\nfunction ScrollIndicator({ offset, height, totalItems }) {\n\tconst thumbSize = Math.max(1, Math.round(height / totalItems * height));\n\tconst maxThumbOffset = height - thumbSize;\n\tconst thumbOffset = computeThumbOffset(totalItems - height, offset, maxThumbOffset);\n\treturn /* @__PURE__ */ jsx(Box, {\n\t\tflexDirection: \"column\",\n\t\tmarginLeft: 1,\n\t\tchildren: Array.from({ length: height }, (_, i) => {\n\t\t\tconst isThumb = i >= thumbOffset && i < thumbOffset + thumbSize;\n\t\t\treturn /* @__PURE__ */ jsx(Text, {\n\t\t\t\tdimColor: !isThumb,\n\t\t\t\tchildren: match(isThumb).with(true, () => \"┃\").with(false, () => \"│\").exhaustive()\n\t\t\t}, i);\n\t\t})\n\t});\n}\n/**\n* Resolve the effective scroll offset, preferring the controlled value\n* when the component is in controlled mode.\n*\n* @private\n* @param isControlled - Whether the component is in controlled mode.\n* @param controlledOffset - The externally provided offset.\n* @param internalOffset - The internally managed offset.\n* @returns The resolved offset.\n*/\nfunction resolveOffset(isControlled, controlledOffset, internalOffset) {\n\tif (isControlled && controlledOffset !== void 0) return controlledOffset;\n\treturn internalOffset;\n}\n/**\n* Compute the thumb position within the scroll indicator track.\n* Returns 0 when the scroll range is zero (no scrolling possible).\n*\n* @private\n* @param scrollRange - Total scrollable range.\n* @param offset - Current scroll offset.\n* @param maxThumbOffset - Maximum thumb position.\n* @returns The thumb offset position.\n*/\nfunction computeThumbOffset(scrollRange, offset, maxThumbOffset) {\n\tif (scrollRange <= 0) return 0;\n\treturn Math.round(offset / scrollRange * maxThumbOffset);\n}\n/**\n* Compute a new scroll offset that keeps `activeIndex` within the\n* visible viewport. Returns `currentOffset` unchanged when the\n* active item is already visible.\n*\n* @private\n* @param options - The clamp calculation inputs.\n* @returns The clamped scroll offset.\n*/\nfunction clampOffset({ activeIndex, currentOffset, height, totalItems }) {\n\tconst maxOffset = Math.max(0, totalItems - height);\n\tif (activeIndex < currentOffset) return Math.max(0, activeIndex);\n\tif (activeIndex >= currentOffset + height) return Math.min(maxOffset, activeIndex - height + 1);\n\treturn Math.min(currentOffset, maxOffset);\n}\n/**\n* Flatten React children into an array of ReactNode elements.\n* Handles arrays, fragments, and single children uniformly.\n*\n* @private\n* @param children - The React children to flatten.\n* @returns A flat array of child nodes.\n*/\nfunction flattenChildren(children) {\n\tif (children === null || children === void 0) return [];\n\tif (Array.isArray(children)) return children.flat();\n\treturn [children];\n}\n//#endregion\n//#region src/ui/theme.ts\n/**\n* Color palette used by kidd UI components.\n*/\nconst colors = Object.freeze({\n\tprimary: \"cyan\",\n\tsuccess: \"green\",\n\terror: \"red\",\n\twarning: \"yellow\",\n\tinfo: \"blue\"\n});\n/**\n* Resolve the theme color for a given variant.\n*\n* @param variant - The display variant.\n* @returns The color string from the theme palette.\n*/\nfunction resolveVariantColor(variant) {\n\treturn match(variant).with(\"info\", () => colors.info).with(\"success\", () => colors.success).with(\"error\", () => colors.error).with(\"warning\", () => colors.warning).exhaustive();\n}\n/**\n* Symbol set used by kidd UI components for indicators and status icons.\n*/\nconst symbols = Object.freeze({\n\tradioOn: defaultFigures.radioOn,\n\tradioOff: defaultFigures.radioOff,\n\tcheckboxOn: defaultFigures.checkboxOn,\n\tcheckboxOff: defaultFigures.checkboxOff,\n\tpointer: defaultFigures.pointer,\n\ttick: defaultFigures.tick,\n\tcross: defaultFigures.cross,\n\twarning: defaultFigures.warning,\n\tinfo: defaultFigures.info,\n\tcircle: defaultFigures.circle,\n\tline: defaultFigures.line,\n\tellipsis: defaultFigures.ellipsis\n});\n//#endregion\n//#region src/ui/prompts/cursor-value.tsx\n/**\n* Render a string with a visible cursor at the specified position.\n*\n* The character at the cursor position is rendered with inverse styling.\n* If the cursor is at the end, an inverse space is appended.\n*\n* @param props - The cursor value props.\n* @returns A rendered value element with cursor.\n*/\nfunction CursorValue({ value, cursor, disabled }) {\n\tconst beforeCursor = value.slice(0, cursor);\n\tconst atCursor = value[cursor];\n\tconst afterCursor = value.slice(cursor + 1);\n\treturn /* @__PURE__ */ jsxs(Text, {\n\t\tdimColor: disabled,\n\t\tchildren: [\n\t\t\tbeforeCursor,\n\t\t\t/* @__PURE__ */ jsx(Text, {\n\t\t\t\tinverse: true,\n\t\t\t\tchildren: match(atCursor).with(void 0, () => \" \").otherwise((ch) => ch)\n\t\t\t}),\n\t\t\tafterCursor\n\t\t]\n\t});\n}\n//#endregion\n//#region src/ui/prompts/navigation.ts\n/**\n* Resolve a keyboard event to a navigation direction.\n*\n* @param key - The Ink key object with arrow properties.\n* @returns The resolved direction.\n*/\nfunction resolveDirection(key) {\n\treturn match(key).with({ upArrow: true }, () => \"up\").with({ downArrow: true }, () => \"down\").otherwise(() => \"none\");\n}\n/**\n* Compute the next focusable option index, skipping disabled options.\n*\n* @param opts - The navigation options.\n* @returns The next valid focus index.\n*/\nfunction resolveNextFocusIndex({ options, currentIndex, direction }) {\n\tif (direction === \"none\") return currentIndex;\n\treturn findNextEnabledIndex(options, currentIndex, match(direction).with(\"up\", () => -1).with(\"down\", () => 1).exhaustive());\n}\n/**\n* Find the first non-disabled option index.\n*\n* @param options - The option list.\n* @returns The first enabled index, or 0 if none found.\n*/\nfunction resolveFirstEnabledIndex(options) {\n\tconst index = options.findIndex((o) => o.disabled !== true);\n\treturn Math.max(0, index);\n}\n/**\n* Resolve the initial focus index from a default value. Falls back to\n* the first non-disabled option if no match is found.\n*\n* @param opts - The resolution options.\n* @returns The initial focus index.\n*/\nfunction resolveInitialIndex({ options, defaultValue }) {\n\tif (defaultValue !== void 0) {\n\t\tconst matchIndex = options.findIndex((o) => o.value === defaultValue);\n\t\tif (matchIndex !== -1) return matchIndex;\n\t}\n\treturn resolveFirstEnabledIndex(options);\n}\n/**\n* Walk through options in the given step direction to find the next\n* non-disabled index. Returns the current index if no enabled option\n* is found.\n*\n* @private\n* @param options - The option list.\n* @param startIndex - The index to start searching from.\n* @param step - The step direction (-1 or 1).\n* @returns The next enabled index, or the start index if none found.\n*/\nfunction findNextEnabledIndex(options, startIndex, step) {\n\tconst count = options.length;\n\treturn Array.from({ length: count - 1 }, (_, i) => {\n\t\treturn ((startIndex + (i + 1) * step) % count + count) % count;\n\t}).find((i) => {\n\t\tconst opt = options[i];\n\t\treturn opt !== void 0 && opt.disabled !== true;\n\t}) ?? startIndex;\n}\n//#endregion\n//#region src/ui/prompts/option-row.tsx\n/**\n* Render a single option row with pointer, indicator, label, and hint.\n*\n* Shared by Select, MultiSelect, and similar prompt components to ensure\n* consistent styling and keyboard focus behavior.\n*\n* @param props - The option row props.\n* @returns A rendered option row element.\n*/\nfunction OptionRow({ option, indicator, isFocused, isSelected, disabled }) {\n\tconst isOptionDisabled = option.disabled === true || disabled;\n\treturn /* @__PURE__ */ jsxs(Box, { children: [\n\t\t/* @__PURE__ */ jsx(Text, {\n\t\t\tdimColor: !isFocused,\n\t\t\tchildren: match(isFocused).with(true, () => `${symbols.pointer} `).with(false, () => \"  \").exhaustive()\n\t\t}),\n\t\t/* @__PURE__ */ jsx(Text, {\n\t\t\tcolor: match({\n\t\t\t\tisOptionDisabled,\n\t\t\t\tisSelected,\n\t\t\t\tisFocused\n\t\t\t}).with({ isOptionDisabled: true }, () => \"gray\").with({ isSelected: true }, () => colors.primary).with({ isFocused: true }, () => colors.primary).otherwise(() => void 0),\n\t\t\tchildren: indicator\n\t\t}),\n\t\t/* @__PURE__ */ jsx(Text, { children: \" \" }),\n\t\t/* @__PURE__ */ jsxs(Text, {\n\t\t\tcolor: match({\n\t\t\t\tisOptionDisabled,\n\t\t\t\tisFocused\n\t\t\t}).with({ isOptionDisabled: true }, () => \"gray\").with({ isFocused: true }, () => colors.primary).otherwise(() => void 0),\n\t\t\tchildren: [option.label, match(isOptionDisabled && !pc.isColorSupported).with(true, () => \" (disabled)\").with(false, () => \"\").exhaustive()]\n\t\t}),\n\t\tmatch(option.hint).with(void 0, () => null).otherwise((hint) => /* @__PURE__ */ jsx(Text, {\n\t\t\tcolor: match(isOptionDisabled).with(true, () => \"gray\").with(false, () => void 0).exhaustive(),\n\t\t\tdimColor: true,\n\t\t\tchildren: `  ${hint}`\n\t\t}))\n\t] });\n}\n//#endregion\n//#region src/ui/prompts/confirm.tsx\n/**\n* A boolean confirm prompt with toggle-style keyboard navigation.\n*\n* Renders two choices side by side. The active choice is styled with\n* cyan color and underline. Users toggle with left/right arrows or\n* y/n keys and submit with Enter.\n*\n* **Keyboard shortcuts:**\n* - Left/Right arrows — toggle between choices\n* - y — select the affirmative choice\n* - n — select the negative choice\n* - Enter — submit the current value\n*\n* @param props - The confirm component props.\n* @returns A rendered confirm element.\n*/\nfunction Confirm({ active = \"Yes\", inactive = \"No\", defaultValue = true, onSubmit, focused = true, disabled = false }) {\n\tconst [value, setValue] = useState(defaultValue);\n\tuseInput((input, key) => {\n\t\tif (key.return) {\n\t\t\tif (onSubmit) onSubmit(value);\n\t\t\treturn;\n\t\t}\n\t\tif (key.leftArrow || key.rightArrow) {\n\t\t\tsetValue(!value);\n\t\t\treturn;\n\t\t}\n\t\tif (input === \"y\" || input === \"Y\") {\n\t\t\tsetValue(true);\n\t\t\treturn;\n\t\t}\n\t\tif (input === \"n\" || input === \"N\") setValue(false);\n\t}, { isActive: focused && !disabled });\n\treturn /* @__PURE__ */ jsxs(Box, {\n\t\tgap: 1,\n\t\tchildren: [\n\t\t\t/* @__PURE__ */ jsx(ConfirmChoice, {\n\t\t\t\tlabel: active,\n\t\t\t\tisActive: value,\n\t\t\t\tdisabled\n\t\t\t}),\n\t\t\t/* @__PURE__ */ jsx(Text, {\n\t\t\t\tdimColor: true,\n\t\t\t\tchildren: \"/\"\n\t\t\t}),\n\t\t\t/* @__PURE__ */ jsx(ConfirmChoice, {\n\t\t\t\tlabel: inactive,\n\t\t\t\tisActive: !value,\n\t\t\t\tdisabled\n\t\t\t})\n\t\t]\n\t});\n}\n/**\n* Render a single confirm choice with active/inactive styling.\n*\n* @private\n* @param props - The choice props.\n* @returns A rendered choice element.\n*/\nfunction ConfirmChoice({ label, isActive, disabled }) {\n\treturn /* @__PURE__ */ jsx(Text, {\n\t\tcolor: match({\n\t\t\tisActive,\n\t\t\tdisabled\n\t\t}).with({ disabled: true }, () => void 0).with({ isActive: true }, () => colors.primary).otherwise(() => void 0),\n\t\tdimColor: !isActive || disabled,\n\t\tunderline: isActive && !disabled,\n\t\tchildren: label\n\t});\n}\n//#endregion\n//#region src/ui/display/error-message.tsx\n/**\n* Render a validation error message in red, or nothing when absent.\n*\n* @param props - The error message props.\n* @returns A rendered error text element, or `null`.\n*/\nfunction ErrorMessage({ message }) {\n\treturn match(message).with(void 0, () => null).otherwise((msg) => /* @__PURE__ */ jsx(Text, {\n\t\tcolor: colors.error,\n\t\tchildren: msg\n\t}));\n}\n//#endregion\n//#region src/ui/prompts/multi-select.tsx\n/**\n* A multi-value select prompt with checkbox indicators and keyboard navigation.\n*\n* Renders a vertical list of options with checkbox-style indicators. Users\n* toggle selections with Space and submit with Enter. Disabled options are\n* rendered dimmed with strikethrough and cannot be toggled.\n*\n* **Keyboard shortcuts:**\n* - Up/Down arrows — navigate between enabled options\n* - Space — toggle the focused option\n* - Enter — submit the current selection\n*\n* @typeParam TValue - The type of each option's value.\n* @param props - The multi-select component props.\n* @returns A rendered multi-select element.\n*/\nfunction MultiSelect({ options, defaultValue, maxVisible = 5, required = false, onChange, onSubmit, focused = true, disabled = false }) {\n\tconst initialSelected = resolveInitialSelected(options, defaultValue);\n\tconst [focusedIndex, setFocusedIndex] = useState(resolveFirstEnabledIndex(options));\n\tconst [selectedIndices, setSelectedIndices] = useState(initialSelected);\n\tconst [validationError, setValidationError] = useState(void 0);\n\tuseInput((input, key) => {\n\t\tif (key.return) {\n\t\t\tif (required && selectedIndices.size === 0) {\n\t\t\t\tsetValidationError(\"At least one option must be selected\");\n\t\t\t\treturn;\n\t\t\t}\n\t\t\tsetValidationError(void 0);\n\t\t\tconst selectedValues = resolveSelectedValues(options, selectedIndices);\n\t\t\tif (onSubmit) onSubmit(selectedValues);\n\t\t\treturn;\n\t\t}\n\t\tif (input === \" \") {\n\t\t\tconst option = options[focusedIndex];\n\t\t\tif (option && option.disabled !== true) {\n\t\t\t\tconst nextSelected = toggleIndex(selectedIndices, focusedIndex);\n\t\t\t\tsetSelectedIndices(nextSelected);\n\t\t\t\tsetValidationError(void 0);\n\t\t\t\tif (onChange) onChange(resolveSelectedValues(options, nextSelected));\n\t\t\t}\n\t\t\treturn;\n\t\t}\n\t\tconst nextIndex = resolveNextFocusIndex({\n\t\t\toptions,\n\t\t\tcurrentIndex: focusedIndex,\n\t\t\tdirection: resolveDirection(key)\n\t\t});\n\t\tif (nextIndex !== focusedIndex) setFocusedIndex(nextIndex);\n\t}, { isActive: focused && !disabled });\n\treturn /* @__PURE__ */ jsxs(Box, {\n\t\tflexDirection: \"column\",\n\t\tchildren: [/* @__PURE__ */ jsx(ScrollArea, {\n\t\t\theight: Math.min(maxVisible, options.length),\n\t\t\tactiveIndex: focusedIndex,\n\t\t\tchildren: options.map((option, index) => {\n\t\t\t\tconst isSelected = selectedIndices.has(index);\n\t\t\t\treturn /* @__PURE__ */ jsx(OptionRow, {\n\t\t\t\t\toption,\n\t\t\t\t\tindicator: match(isSelected).with(true, () => symbols.checkboxOn).with(false, () => symbols.checkboxOff).exhaustive(),\n\t\t\t\t\tisFocused: index === focusedIndex,\n\t\t\t\t\tisSelected,\n\t\t\t\t\tdisabled\n\t\t\t\t}, String(option.value));\n\t\t\t})\n\t\t}), /* @__PURE__ */ jsx(ErrorMessage, { message: validationError })]\n\t});\n}\n/**\n* Toggle an index in a readonly set, returning a new set.\n*\n* @private\n* @param set - The current selection set.\n* @param index - The index to toggle.\n* @returns A new set with the index toggled.\n*/\nfunction toggleIndex(set, index) {\n\tconst next = new Set(set);\n\tif (next.has(index)) next.delete(index);\n\telse next.add(index);\n\treturn next;\n}\n/**\n* Resolve the initially selected indices from default values.\n*\n* @private\n* @param options - The option list.\n* @param defaultValue - The default selected values.\n* @returns A set of selected indices.\n*/\nfunction resolveInitialSelected(options, defaultValue) {\n\tif (defaultValue === void 0) return /* @__PURE__ */ new Set();\n\tconst indices = options.map((option, index) => ({\n\t\toption,\n\t\tindex\n\t})).filter(({ option }) => defaultValue.includes(option.value)).map(({ index }) => index);\n\treturn new Set(indices);\n}\n/**\n* Extract the values from selected indices.\n*\n* @private\n* @param options - The option list.\n* @param selectedIndices - The set of selected indices.\n* @returns An array of selected values.\n*/\nfunction resolveSelectedValues(options, selectedIndices) {\n\treturn options.filter((_, index) => selectedIndices.has(index)).map((option) => option.value);\n}\n//#endregion\n//#region src/ui/prompts/input-state.ts\n/**\n* Compute the next input state from a keyboard event.\n*\n* Handles cursor movement (left/right, home/end), character deletion\n* (backspace, Ctrl+D for forward-delete), and character insertion.\n*\n* Backspace removes the character before the cursor.\n* Forward-delete uses Ctrl+D.\n*\n* @param options - The state resolution options.\n* @returns The next input state.\n*/\nfunction resolveNextState({ state, input, key }) {\n\tif (key.leftArrow) return {\n\t\t...state,\n\t\tcursor: Math.max(0, state.cursor - 1)\n\t};\n\tif (key.rightArrow) return {\n\t\t...state,\n\t\tcursor: Math.min(state.value.length, state.cursor + 1)\n\t};\n\tif (key.ctrl && input === \"a\") return {\n\t\t...state,\n\t\tcursor: 0\n\t};\n\tif (key.ctrl && input === \"e\") return {\n\t\t...state,\n\t\tcursor: state.value.length\n\t};\n\tif (key.ctrl && input === \"d\") {\n\t\tif (state.cursor >= state.value.length) return state;\n\t\tconst nextValue = state.value.slice(0, state.cursor) + state.value.slice(state.cursor + 1);\n\t\treturn {\n\t\t\t...state,\n\t\t\tvalue: nextValue,\n\t\t\terror: void 0\n\t\t};\n\t}\n\tif (key.backspace) {\n\t\tif (state.cursor === 0) return state;\n\t\tconst nextValue = state.value.slice(0, state.cursor - 1) + state.value.slice(state.cursor);\n\t\treturn {\n\t\t\t...state,\n\t\t\tvalue: nextValue,\n\t\t\tcursor: state.cursor - 1,\n\t\t\terror: void 0\n\t\t};\n\t}\n\tif (key.ctrl || key.meta) return state;\n\tif (input.length === 0 || key.return) return state;\n\tconst nextValue = state.value.slice(0, state.cursor) + input + state.value.slice(state.cursor);\n\treturn {\n\t\t...state,\n\t\tvalue: nextValue,\n\t\tcursor: state.cursor + input.length,\n\t\terror: void 0\n\t};\n}\n//#endregion\n//#region src/ui/prompts/select.tsx\n/**\n* A single-value select prompt with keyboard navigation and scroll support.\n*\n* Renders a vertical list of options with radio-style indicators. The focused\n* option is highlighted with a pointer and cyan coloring. Disabled options are\n* rendered dimmed with strikethrough and are skipped during navigation.\n*\n* **Keyboard shortcuts:**\n* - Up/Down arrows — navigate between enabled options\n* - Enter — submit the focused option\n*\n* @typeParam TValue - The type of each option's value.\n* @param props - The select component props.\n* @returns A rendered select element.\n*/\nfunction Select({ options, defaultValue, maxVisible = 5, onChange, onSubmit, focused = true, disabled = false }) {\n\tconst initialIndex = resolveInitialIndex({\n\t\toptions,\n\t\tdefaultValue\n\t});\n\tconst [focusedIndex, setFocusedIndex] = useState(initialIndex);\n\tconst [selectedIndex, setSelectedIndex] = useState(initialIndex);\n\tuseInput((_input, key) => {\n\t\tif (key.return) {\n\t\t\tconst option = options[focusedIndex];\n\t\t\tif (option && !option.disabled) {\n\t\t\t\tsetSelectedIndex(focusedIndex);\n\t\t\t\tif (onSubmit) onSubmit(option.value);\n\t\t\t}\n\t\t\treturn;\n\t\t}\n\t\tconst nextIndex = resolveNextFocusIndex({\n\t\t\toptions,\n\t\t\tcurrentIndex: focusedIndex,\n\t\t\tdirection: resolveDirection(key)\n\t\t});\n\t\tif (nextIndex !== focusedIndex) {\n\t\t\tsetFocusedIndex(nextIndex);\n\t\t\tconst nextOption = options[nextIndex];\n\t\t\tif (nextOption && onChange) onChange(nextOption.value);\n\t\t}\n\t}, { isActive: focused && !disabled });\n\treturn /* @__PURE__ */ jsx(ScrollArea, {\n\t\theight: Math.min(maxVisible, options.length),\n\t\tactiveIndex: focusedIndex,\n\t\tchildren: options.map((option, index) => {\n\t\t\tconst isSelected = index === selectedIndex;\n\t\t\treturn /* @__PURE__ */ jsx(OptionRow, {\n\t\t\t\toption,\n\t\t\t\tindicator: match(isSelected).with(true, () => symbols.radioOn).with(false, () => symbols.radioOff).exhaustive(),\n\t\t\t\tisFocused: index === focusedIndex,\n\t\t\t\tisSelected,\n\t\t\t\tdisabled\n\t\t\t}, String(option.value));\n\t\t})\n\t});\n}\n//#endregion\n//#region src/ui/prompts/text-input.tsx\n/**\n* A single-line text input prompt with cursor movement and validation.\n*\n* Renders the current value with a visible cursor (inverse character).\n* Shows placeholder text when the input is empty. Validation errors\n* appear below the input in red.\n*\n* **Keyboard shortcuts:**\n* - Left/Right arrows — move cursor\n* - Home (Ctrl+A) / End (Ctrl+E) — jump to start/end\n* - Backspace — delete character before cursor\n* - Delete (Ctrl+D) — delete character at cursor\n* - Enter — validate and submit\n*\n* @param props - The text input component props.\n* @returns A rendered text input element.\n*/\nfunction TextInput({ placeholder, defaultValue = \"\", validate, onChange, onSubmit, focused = true, disabled = false }) {\n\tconst [state, setState] = useState({\n\t\tvalue: defaultValue,\n\t\tcursor: defaultValue.length,\n\t\terror: void 0\n\t});\n\tuseInput((input, key) => {\n\t\tif (key.return) {\n\t\t\tconst validationError = match(validate).with(void 0, () => void 0).otherwise((fn) => fn(state.value));\n\t\t\tif (validationError) {\n\t\t\t\tsetState({\n\t\t\t\t\t...state,\n\t\t\t\t\terror: validationError\n\t\t\t\t});\n\t\t\t\treturn;\n\t\t\t}\n\t\t\tsetState({\n\t\t\t\t...state,\n\t\t\t\terror: void 0\n\t\t\t});\n\t\t\tif (onSubmit) onSubmit(state.value);\n\t\t\treturn;\n\t\t}\n\t\tconst nextState = resolveNextState({\n\t\t\tstate,\n\t\t\tinput,\n\t\t\tkey\n\t\t});\n\t\tif (nextState.value !== state.value || nextState.cursor !== state.cursor) {\n\t\t\tsetState(nextState);\n\t\t\tif (nextState.value !== state.value && onChange) onChange(nextState.value);\n\t\t}\n\t}, { isActive: focused && !disabled });\n\treturn /* @__PURE__ */ jsxs(Box, {\n\t\tflexDirection: \"column\",\n\t\tchildren: [match(state.value.length === 0 && placeholder !== void 0).with(true, () => /* @__PURE__ */ jsx(Text, {\n\t\t\tdimColor: true,\n\t\t\tchildren: placeholder\n\t\t})).with(false, () => /* @__PURE__ */ jsx(CursorValue, {\n\t\t\tvalue: state.value,\n\t\t\tcursor: state.cursor,\n\t\t\tdisabled\n\t\t})).exhaustive(), /* @__PURE__ */ jsx(ErrorMessage, { message: state.error })]\n\t});\n}\n//#endregion\n//#region src/ui/display/spinner.tsx\n/**\n* Built-in spinner definitions.\n*\n* @private\n*/\nconst spinners = Object.freeze({\n\tdots: {\n\t\tinterval: 80,\n\t\tframes: Object.freeze([\n\t\t\t\"⠋\",\n\t\t\t\"⠙\",\n\t\t\t\"⠹\",\n\t\t\t\"⠸\",\n\t\t\t\"⠼\",\n\t\t\t\"⠴\",\n\t\t\t\"⠦\",\n\t\t\t\"⠧\",\n\t\t\t\"⠇\",\n\t\t\t\"⠏\"\n\t\t])\n\t},\n\tline: {\n\t\tinterval: 130,\n\t\tframes: Object.freeze([\n\t\t\t\"-\",\n\t\t\t\"\\\\\",\n\t\t\t\"|\",\n\t\t\t\"/\"\n\t\t])\n\t},\n\tarc: {\n\t\tinterval: 100,\n\t\tframes: Object.freeze([\n\t\t\t\"◜\",\n\t\t\t\"◠\",\n\t\t\t\"◝\",\n\t\t\t\"◞\",\n\t\t\t\"◡\",\n\t\t\t\"◟\"\n\t\t])\n\t},\n\tbouncingBar: {\n\t\tinterval: 80,\n\t\tframes: Object.freeze([\n\t\t\t\"[    ]\",\n\t\t\t\"[=   ]\",\n\t\t\t\"[==  ]\",\n\t\t\t\"[=== ]\",\n\t\t\t\"[ ===]\",\n\t\t\t\"[  ==]\",\n\t\t\t\"[   =]\",\n\t\t\t\"[    ]\",\n\t\t\t\"[   =]\",\n\t\t\t\"[  ==]\",\n\t\t\t\"[ ===]\",\n\t\t\t\"[====]\",\n\t\t\t\"[=== ]\",\n\t\t\t\"[==  ]\",\n\t\t\t\"[=   ]\"\n\t\t])\n\t}\n});\n/**\n* An animated terminal spinner that cycles through frames.\n*\n* When `isActive` is `false`, the component renders nothing. The spinner\n* frame is colored cyan and the label is rendered as plain text beside it.\n*\n* @param props - The spinner props.\n* @returns A rendered spinner element, or `null` when inactive.\n*/\nfunction Spinner({ label, isActive = true, type = \"dots\" }) {\n\tconst spinner = spinners[type];\n\tconst [frameIndex, setFrameIndex] = useState(0);\n\tuseEffect(() => {\n\t\tsetFrameIndex(0);\n\t\tif (!isActive) return;\n\t\tconst timer = setInterval(() => {\n\t\t\tsetFrameIndex((prev) => (prev + 1) % spinner.frames.length);\n\t\t}, spinner.interval);\n\t\treturn () => {\n\t\t\tclearInterval(timer);\n\t\t};\n\t}, [isActive, spinner]);\n\treturn match(isActive).with(false, () => null).with(true, () => /* @__PURE__ */ jsxs(Text, { children: [/* @__PURE__ */ jsx(Text, {\n\t\tcolor: colors.primary,\n\t\tchildren: spinner.frames[frameIndex]\n\t}), match(label).with(void 0, () => null).otherwise((text) => /* @__PURE__ */ jsx(Text, { children: ` ${text}` }))] })).exhaustive();\n}\n//#endregion\n//#region src/ui/layout/tabs.tsx\n/**\n* Horizontal tab bar with keyboard navigation and content switching.\n*\n* Renders a row of tab labels at the top, with the active tab highlighted\n* in cyan and underlined. The corresponding tab content is rendered below.\n* Supports both controlled and uncontrolled modes via `activeTab` and\n* `onTabChange`.\n*\n* **Keyboard shortcuts** (when `isFocused` is `true`):\n* - Tab key — cycle to next tab (wraps around)\n* - Left/Right arrows — move between tabs\n*\n* @param props - The tabs component props.\n* @returns A rendered tabs element.\n*/\nfunction Tabs({ tabs, isFocused, activeTab, onTabChange }) {\n\tconst isControlled = activeTab !== void 0;\n\tconst [internalIndex, setInternalIndex] = useState(0);\n\tconst currentIndex = clampIndex(match(isControlled).with(true, () => activeTab ?? 0).with(false, () => internalIndex).exhaustive(), tabs.length);\n\tuseInput((_input, key) => {\n\t\tif (tabs.length === 0) return;\n\t\tconst nextIndex = resolveNextIndex({\n\t\t\tkey,\n\t\t\tcurrentIndex,\n\t\t\ttabCount: tabs.length\n\t\t});\n\t\tif (nextIndex === currentIndex) return;\n\t\tif (!isControlled) setInternalIndex(nextIndex);\n\t\tif (onTabChange) onTabChange(nextIndex);\n\t}, { isActive: isFocused });\n\tif (tabs.length === 0) return /* @__PURE__ */ jsx(Box, {});\n\tconst activeContent = tabs[currentIndex];\n\treturn /* @__PURE__ */ jsxs(Box, {\n\t\tflexDirection: \"column\",\n\t\tflexGrow: 1,\n\t\tchildren: [/* @__PURE__ */ jsx(TabBar, {\n\t\t\ttabs,\n\t\t\tactiveIndex: currentIndex,\n\t\t\tisFocused\n\t\t}), /* @__PURE__ */ jsx(Box, {\n\t\t\tflexDirection: \"column\",\n\t\t\tflexGrow: 1,\n\t\t\tchildren: match(activeContent).with(void 0, () => null).otherwise((tab) => tab.content)\n\t\t})]\n\t});\n}\n/**\n* Render the horizontal tab label row with a navigation hint.\n*\n* @private\n* @param props - The tab bar props.\n* @returns A rendered tab bar element.\n*/\nfunction TabBar({ tabs, activeIndex, isFocused }) {\n\treturn /* @__PURE__ */ jsx(Box, {\n\t\tflexDirection: \"column\",\n\t\tchildren: /* @__PURE__ */ jsxs(Box, {\n\t\t\tgap: 2,\n\t\t\tchildren: [tabs.map((tab, index) => {\n\t\t\t\tconst isActive = index === activeIndex;\n\t\t\t\treturn /* @__PURE__ */ jsx(TabLabel, {\n\t\t\t\t\tlabel: tab.label,\n\t\t\t\t\tisActive,\n\t\t\t\t\tisFocused\n\t\t\t\t}, tab.label);\n\t\t\t}), match(isFocused).with(true, () => /* @__PURE__ */ jsx(Text, {\n\t\t\t\tdimColor: true,\n\t\t\t\tchildren: \"| tab/←→\"\n\t\t\t})).with(false, () => null).exhaustive()]\n\t\t})\n\t});\n}\n/**\n* Render a single tab label with active styling and underline indicator.\n*\n* @private\n* @param props - The tab label props.\n* @returns A rendered tab label element.\n*/\nfunction TabLabel({ label, isActive, isFocused }) {\n\tconst color = resolveTabColor(isActive, isFocused);\n\treturn /* @__PURE__ */ jsx(Text, {\n\t\tdimColor: !isActive,\n\t\tcolor,\n\t\tbold: isActive,\n\t\tunderline: isActive,\n\t\tchildren: label\n\t});\n}\n/**\n* Resolve the color for a tab label based on its active and focus state.\n*\n* @private\n* @param isActive - Whether this tab is the active tab.\n* @param isFocused - Whether the tabs component is focused.\n* @returns The color string, or undefined for default.\n*/\nfunction resolveTabColor(isActive, isFocused) {\n\treturn match({\n\t\tisActive,\n\t\tisFocused\n\t}).with({\n\t\tisActive: true,\n\t\tisFocused: true\n\t}, () => colors.primary).with({\n\t\tisActive: true,\n\t\tisFocused: false\n\t}, () => \"white\").otherwise(() => void 0);\n}\n/**\n* Compute the next tab index from a keyboard input event. Supports\n* left/right arrows for directional movement and Tab to cycle forward\n* (wrapping from last to first).\n*\n* @private\n* @param options - The input resolution options.\n* @returns The next tab index.\n*/\nfunction resolveNextIndex({ key, currentIndex, tabCount }) {\n\tif (key.tab) return (currentIndex + 1) % tabCount;\n\tif (key.leftArrow) return Math.max(0, currentIndex - 1);\n\tif (key.rightArrow) return Math.min(tabCount - 1, currentIndex + 1);\n\treturn currentIndex;\n}\n/**\n* Clamp an index to valid bounds for the given tab count.\n*\n* @private\n* @param index - The index to clamp.\n* @param count - The total number of tabs.\n* @returns The clamped index.\n*/\nfunction clampIndex(index, count) {\n\tif (count === 0) return 0;\n\treturn Math.max(0, Math.min(count - 1, index));\n}\n//#endregion\n//#region src/ui/layout/use-size.tsx\n/**\n* Measure the computed dimensions of a `<Box>` element, or fall back to\n* terminal dimensions when no ref is provided.\n*\n* Attaches to a `<Box ref={ref}>` and reads the Yoga-computed width and\n* height after each render. When `ref` is omitted or its `.current` is\n* `null`, returns the terminal's column and row count instead — behaving\n* like a \"window size\" hook.\n*\n* Uses a render counter to ensure measurement runs after the ref is\n* populated on the first mount and after layout changes.\n*\n* @example\n* ```tsx\n* // Measure a specific element\n* const ref = useRef<DOMElement>(null)\n* const { width, height } = useSize(ref)\n* return <Box ref={ref} flexGrow={1}>...</Box>\n*\n* // Fall back to terminal size\n* const { width, height } = useSize()\n* ```\n*\n* @param ref - Optional ref to a `<Box>` element. When omitted, returns\n*   terminal dimensions.\n* @returns The measured width and height.\n*/\nfunction useSize(ref) {\n\tconst terminal = useTerminalSize();\n\tconst [size, setSize] = useState(() => resolveInitialSize(ref, terminal));\n\tconst [tick, bump] = useReducer(incrementTick, 0);\n\tuseEffect(() => {\n\t\tbump();\n\t}, []);\n\tuseEffect(() => {\n\t\tif (ref === void 0) {\n\t\t\tsetSize((prev) => updateIfChanged(prev, {\n\t\t\t\twidth: terminal.columns,\n\t\t\t\theight: terminal.rows\n\t\t\t}));\n\t\t\treturn;\n\t\t}\n\t\tif (ref.current === null) return;\n\t\tconst measured = measureElement(ref.current);\n\t\tsetSize((prev) => updateIfChanged(prev, measured));\n\t}, [\n\t\tref,\n\t\tterminal.columns,\n\t\tterminal.rows,\n\t\ttick\n\t]);\n\treturn size;\n}\n/**\n* Compute the initial size from a ref or terminal dimensions.\n*\n* @private\n* @param ref - Optional element ref.\n* @param terminal - Current terminal dimensions.\n* @returns The initial size.\n*/\nfunction resolveInitialSize(ref, terminal) {\n\tif (ref === void 0) return Object.freeze({\n\t\twidth: terminal.columns,\n\t\theight: terminal.rows\n\t});\n\tif (ref.current === null) return Object.freeze({\n\t\twidth: 0,\n\t\theight: 0\n\t});\n\treturn Object.freeze(measureElement(ref.current));\n}\n/**\n* Reducer that increments a tick counter. Used to force re-measurement\n* after the ref is populated on mount.\n*\n* @private\n* @param n - The current tick count.\n* @returns The next tick count.\n*/\nfunction incrementTick(n) {\n\treturn n + 1;\n}\n/**\n* Return the next size only when dimensions have actually changed,\n* preserving referential identity to avoid unnecessary re-renders.\n*\n* @private\n* @param prev - The previous size.\n* @param next - The candidate next size.\n* @returns The previous size if unchanged, otherwise the next size (frozen).\n*/\nfunction updateIfChanged(prev, next) {\n\tif (prev.width === next.width && prev.height === next.height) return prev;\n\treturn Object.freeze({\n\t\twidth: next.width,\n\t\theight: next.height\n\t});\n}\n//#endregion\n//#region src/screen/output/use-output-store.ts\n/**\n* Access the {@link OutputStore} attached to the current screen context.\n*\n* The store is attached by `screen()` via {@link injectOutputStore} and\n* retrieved here via {@link getOutputStore}.\n* Used internally by `<Output />` and available for advanced use cases\n* that need direct store access.\n*\n* @returns The output store for the current screen.\n*/\nfunction useOutputStore() {\n\treturn getOutputStore(useScreenContext());\n}\n//#endregion\n//#region src/ui/output.tsx\n/**\n* Render accumulated output entries and spinner state from the screen's\n* {@link OutputStore}.\n*\n* Automatically retrieves the store from the screen context provider.\n* Subscribes via `useSyncExternalStore` and re-renders whenever new\n* entries are pushed or spinner state changes.\n*\n* @returns A rendered output element.\n*/\nfunction Output() {\n\tconst store = useOutputStore();\n\tconst snapshot = useSyncExternalStore(store.subscribe, store.getSnapshot);\n\treturn /* @__PURE__ */ jsxs(Box, {\n\t\tflexDirection: \"column\",\n\t\tchildren: [/* @__PURE__ */ jsx(SpinnerRow, { state: snapshot.spinner }), snapshot.entries.map((entry) => /* @__PURE__ */ jsx(EntryRow, { entry }, `${entry.kind}-${String(entry.id)}`))]\n\t});\n}\n/**\n* Render the spinner row based on current spinner state.\n*\n* @private\n*/\nfunction SpinnerRow({ state }) {\n\treturn match(state).with({ status: \"idle\" }, () => null).with({ status: \"spinning\" }, ({ message }) => /* @__PURE__ */ jsx(Spinner, { label: message })).with({ status: \"stopped\" }, ({ message }) => resolveTerminalIcon(message, colors.success, symbols.tick)).with({ status: \"cancelled\" }, ({ message }) => resolveTerminalIcon(message, colors.warning, symbols.warning)).with({ status: \"error\" }, ({ message }) => resolveTerminalIcon(message, colors.error, symbols.cross)).exhaustive();\n}\n/**\n* Render a terminal-state spinner icon with a message, or null if the message is empty.\n*\n* @private\n*/\nfunction resolveTerminalIcon(message, color, icon) {\n\tif (message.length === 0) return null;\n\treturn /* @__PURE__ */ jsxs(Text, { children: [\n\t\t/* @__PURE__ */ jsx(Text, {\n\t\t\tcolor,\n\t\t\tchildren: icon\n\t\t}),\n\t\t\" \",\n\t\tmessage\n\t] });\n}\n/**\n* Render a single output entry.\n*\n* @private\n*/\nfunction EntryRow({ entry }) {\n\treturn match(entry).with({ kind: \"log\" }, (e) => /* @__PURE__ */ jsx(LogRow, {\n\t\tlevel: e.level,\n\t\ttext: e.text,\n\t\tsymbol: e.symbol\n\t})).with({ kind: \"raw\" }, (e) => /* @__PURE__ */ jsx(Text, { children: e.text })).with({ kind: \"newline\" }, () => /* @__PURE__ */ jsx(Text, { children: \" \" })).with({ kind: \"check\" }, (e) => /* @__PURE__ */ jsx(Text, { children: formatCheck(e.input) })).with({ kind: \"finding\" }, (e) => /* @__PURE__ */ jsx(Text, { children: formatFinding(e.input) })).with({ kind: \"summary\" }, (e) => /* @__PURE__ */ jsx(Text, { children: formatSummary(e.input) })).exhaustive();\n}\n/**\n* Render a log entry with the appropriate color and icon.\n*\n* @private\n*/\nfunction LogRow({ level, text, symbol }) {\n\treturn match(level).with(\"info\", () => /* @__PURE__ */ jsxs(Text, { children: [\n\t\t/* @__PURE__ */ jsx(Text, {\n\t\t\tcolor: colors.info,\n\t\t\tchildren: symbols.circle\n\t\t}),\n\t\t\" \",\n\t\ttext\n\t] })).with(\"success\", () => /* @__PURE__ */ jsxs(Text, { children: [\n\t\t/* @__PURE__ */ jsx(Text, {\n\t\t\tcolor: colors.success,\n\t\t\tchildren: symbols.tick\n\t\t}),\n\t\t\" \",\n\t\ttext\n\t] })).with(\"error\", () => /* @__PURE__ */ jsxs(Text, { children: [\n\t\t/* @__PURE__ */ jsx(Text, {\n\t\t\tcolor: colors.error,\n\t\t\tchildren: symbols.cross\n\t\t}),\n\t\t\" \",\n\t\ttext\n\t] })).with(\"warn\", () => /* @__PURE__ */ jsxs(Text, { children: [\n\t\t/* @__PURE__ */ jsx(Text, {\n\t\t\tcolor: colors.warning,\n\t\t\tchildren: symbols.warning\n\t\t}),\n\t\t\" \",\n\t\ttext\n\t] })).with(\"step\", () => /* @__PURE__ */ jsxs(Text, { children: [\n\t\t/* @__PURE__ */ jsx(Text, {\n\t\t\tcolor: colors.primary,\n\t\t\tchildren: symbols.circle\n\t\t}),\n\t\t\" \",\n\t\ttext\n\t] })).with(\"message\", () => /* @__PURE__ */ jsxs(Text, { children: [match(symbol).with(void 0, () => \"\").otherwise((s) => `${s} `), text] })).exhaustive();\n}\n//#endregion\n//#region src/ui/keys.ts\n/**\n* Maps Ink `Key` boolean field names to normalized key name strings.\n*\n* @private\n*/\nconst INK_KEY_ENTRIES = [\n\t[\"upArrow\", \"up\"],\n\t[\"downArrow\", \"down\"],\n\t[\"leftArrow\", \"left\"],\n\t[\"rightArrow\", \"right\"],\n\t[\"pageUp\", \"pageup\"],\n\t[\"pageDown\", \"pagedown\"],\n\t[\"home\", \"home\"],\n\t[\"end\", \"end\"],\n\t[\"return\", \"return\"],\n\t[\"escape\", \"escape\"],\n\t[\"tab\", \"tab\"],\n\t[\"backspace\", \"backspace\"],\n\t[\"delete\", \"delete\"]\n];\n/**\n* Modifier key names used as prefixes in key patterns (e.g. `ctrl+c`).\n*\n* @private\n*/\nconst MODIFIER_NAMES = new Set([\n\t\"ctrl\",\n\t\"meta\",\n\t\"shift\"\n]);\n/**\n* Normalize Ink's `(input, Key)` callback arguments into a single\n* {@link NormalizedKeyEvent} with a resolved key name string.\n*\n* Priority: special keys (from `Key` booleans) take precedence over\n* character input. Space is normalized to `'space'`.\n*\n* @param input - The raw character(s) from Ink's `useInput`.\n* @param key - The Ink `Key` object with boolean flags.\n* @returns A normalized key event.\n*/\nfunction normalizeKey(input, key) {\n\tconst resolvedKey = match(resolveSpecialKey(key)).with(null, () => match(input).with(\" \", () => \"space\").otherwise(() => input)).otherwise((name) => name);\n\treturn {\n\t\tkey: resolvedKey,\n\t\tctrl: key.ctrl,\n\t\tmeta: match(resolvedKey).with(\"escape\", () => false).otherwise(() => key.meta),\n\t\tshift: key.shift\n\t};\n}\n/**\n* Parse a declarative key pattern string into a structured\n* {@link ParsedKeyPattern}. Supports single keys (`'q'`), modifier\n* combinations (`'ctrl+c'`), and space-separated sequences\n* (`'escape escape'`).\n*\n* @param pattern - The key pattern string to parse.\n* @returns The parsed key pattern.\n*/\nfunction parseKeyPattern(pattern) {\n\tconst parts = pattern.split(\" \");\n\tif (parts.length > 1) return {\n\t\ttype: \"sequence\",\n\t\tsteps: parts.map(parseSinglePattern)\n\t};\n\treturn parseSinglePattern(pattern);\n}\n/**\n* Check whether a {@link NormalizedKeyEvent} matches a\n* {@link SingleKeyPattern}. Compares the key name and all modifier flags.\n*\n* @param pattern - The parsed single-key pattern.\n* @param event - The normalized key event to test.\n* @returns `true` when the event matches the pattern.\n*/\nfunction matchesSingleKey(pattern, event) {\n\treturn pattern.key === event.key && pattern.ctrl === event.ctrl && pattern.meta === event.meta && pattern.shift === event.shift;\n}\n/**\n* Check whether a sequence of recent {@link NormalizedKeyEvent}s matches a\n* {@link SequenceKeyPattern}. Compares the last N events (where N is the\n* number of steps) and verifies all timestamps fall within the timeout.\n*\n* @param pattern - The parsed sequence key pattern.\n* @param history - Recent key events with timestamps, newest last.\n* @param timeout - Maximum elapsed time in ms between first and last event.\n* @returns `true` when the history tail matches the full sequence within timeout.\n*/\nfunction matchesSequence(pattern, history, timeout) {\n\tconst stepCount = pattern.steps.length;\n\tif (history.length < stepCount) return false;\n\tconst startIndex = history.length - stepCount;\n\tconst first = history[startIndex];\n\tconst last = history.at(-1);\n\tif (first === void 0 || last === void 0) return false;\n\tif (last.timestamp - first.timestamp > timeout) return false;\n\treturn pattern.steps.every((step, index) => {\n\t\tconst event = history[startIndex + index];\n\t\tif (event === void 0) return false;\n\t\treturn matchesSingleKey(step, event);\n\t});\n}\n/**\n* Resolve the first active special key from an Ink `Key` object.\n* Returns `null` when no special key boolean is `true`.\n*\n* @private\n* @param key - The Ink Key object.\n* @returns The normalized key name, or null.\n*/\nfunction resolveSpecialKey(key) {\n\tconst found = INK_KEY_ENTRIES.find(([field]) => key[field] === true);\n\tif (found === void 0) return null;\n\treturn found[1];\n}\n/**\n* Parse a single key pattern segment (no spaces). Handles modifier\n* prefixes like `ctrl+`, `meta+`, `shift+`.\n*\n* @private\n* @param segment - A single key pattern segment.\n* @returns The parsed single key pattern.\n*/\nfunction parseSinglePattern(segment) {\n\tconst parts = segment.split(\"+\");\n\tconst modifierList = new Set(parts.slice(0, -1).filter((p) => MODIFIER_NAMES.has(p)));\n\treturn {\n\t\ttype: \"single\",\n\t\tkey: parts.at(-1) ?? segment,\n\t\tctrl: modifierList.has(\"ctrl\"),\n\t\tmeta: modifierList.has(\"meta\"),\n\t\tshift: modifierList.has(\"shift\")\n\t};\n}\n//#endregion\n//#region src/ui/use-key-binding.ts\n/**\n* Default timeout in ms for multi-key sequences.\n*/\nconst DEFAULT_SEQUENCE_TIMEOUT = 600;\n/**\n* Minimum key history entries retained for sequence matching.\n*/\nconst MIN_HISTORY_LENGTH = 10;\n/**\n* Bind one or more key patterns to a single action. Supports single keys\n* (`'q'`), modifier combinations (`'ctrl+c'`), and space-separated\n* sequences (`'escape escape'`). Use multiple `useHotkey` calls for\n* independent actions.\n*\n* @param args - Key patterns, action callback, and optional configuration.\n* @returns Nothing.\n*/\nfunction useHotkey({ keys, action, active = true, sequenceTimeout = DEFAULT_SEQUENCE_TIMEOUT }) {\n\tconst historyRef = useRef([]);\n\tconst actionRef = useRef(action);\n\tconst activeRef = useRef(active);\n\tconst keysKey = keys.join(\"\\0\");\n\tuseEffect(() => {\n\t\tactionRef.current = action;\n\t});\n\tactiveRef.current = active;\n\tconst parsedPatterns = useMemo(() => keys.map(parseKeyPattern), [keysKey]);\n\tconst maxHistory = useMemo(() => resolveMaxHistory(parsedPatterns), [parsedPatterns]);\n\tuseInput(useCallback((input, key) => {\n\t\tconst normalized = normalizeKey(input, key);\n\t\tconst entry = {\n\t\t\t...normalized,\n\t\t\ttimestamp: Date.now()\n\t\t};\n\t\thistoryRef.current = [...historyRef.current.slice(-(maxHistory - 1)), entry];\n\t\tif (!activeRef.current) return;\n\t\tif (parsedPatterns.some((pattern) => checkBinding(pattern, normalized, historyRef.current, sequenceTimeout))) actionRef.current();\n\t}, [\n\t\tparsedPatterns,\n\t\tsequenceTimeout,\n\t\tmaxHistory\n\t]));\n}\n/**\n* Derive the history buffer size from the longest sequence binding.\n*\n* Returns at least {@link MIN_HISTORY_LENGTH} so the buffer is never\n* smaller than a reasonable default, even when no sequence bindings\n* are registered.\n*\n* @private\n* @param patterns - The parsed key patterns from all bindings.\n* @returns The required history length.\n*/\nfunction resolveMaxHistory(patterns) {\n\tconst longest = patterns.reduce((max, p) => Math.max(max, resolvePatternLength(p)), 0);\n\treturn Math.max(longest, MIN_HISTORY_LENGTH);\n}\n/**\n* Get the effective length of a parsed key pattern.\n*\n* @private\n* @param pattern - The parsed key pattern.\n* @returns The number of key events the pattern requires.\n*/\nfunction resolvePatternLength(pattern) {\n\treturn match(pattern).with({ type: \"single\" }, () => 1).with({ type: \"sequence\" }, (p) => p.steps.length).exhaustive();\n}\n/**\n* Check whether a normalized key event (and recent history) matches a\n* parsed key pattern.\n*\n* @private\n* @param pattern - The parsed key pattern to check.\n* @param event - The current normalized key event.\n* @param history - Recent key history entries with timestamps.\n* @param timeout - Sequence timeout in ms.\n* @returns `true` when the event matches the pattern.\n*/\nfunction checkBinding(pattern, event, history, timeout) {\n\treturn match(pattern).with({ type: \"single\" }, (p) => matchesSingleKey(p, event)).with({ type: \"sequence\" }, (p) => matchesSequence(p, history, timeout)).exhaustive();\n}\n//#endregion\nexport { resolveVariantColor as _, Tabs as a, Select as c, ErrorMessage as d, Confirm as f, colors as g, CursorValue as h, useSize as i, resolveNextState as l, resolveInitialIndex as m, Output as n, Spinner as o, OptionRow as p, useOutputStore as r, TextInput as s, useHotkey as t, MultiSelect as u, symbols as v, ScrollArea as y };\n\n//# sourceMappingURL=use-key-binding-Cwei5N22.js.map","import { a as useFullScreen, c as useScreenContext, o as useTerminalSize, r as FullScreen } from \"../store-key-fUtc4MNq.js\";\nimport { n as renderToString, r as screen, t as render } from \"../render-BsTEEL-N.js\";\nimport { _ as resolveVariantColor, a as Tabs, c as Select, d as ErrorMessage, f as Confirm, g as colors, h as CursorValue, i as useSize, l as resolveNextState, m as resolveInitialIndex, n as Output, o as Spinner, p as OptionRow, r as useOutputStore, s as TextInput, t as useHotkey, u as MultiSelect, v as symbols, y as ScrollArea } from \"../use-key-binding-Cwei5N22.js\";\nimport { join, resolve } from \"node:path\";\nimport { readdirSync, statSync } from \"node:fs\";\nimport pc from \"picocolors\";\nimport { match } from \"ts-pattern\";\nimport { useEffect, useMemo, useState } from \"react\";\nimport { jsx, jsxs } from \"react/jsx-runtime\";\nimport { Box, Box as Box$1, Newline, Spacer, Static, Text, Text as Text$1, Transform, kittyFlags, kittyModifiers, measureElement, useApp, useCursor, useFocus, useFocusManager, useInput, useInput as useInput$1, useIsScreenReaderEnabled, useStderr, useStdin, useStdout } from \"ink\";\n//#region src/ui/prompts/string-utils.ts\n/**\n* Remove a character at the given position in a string.\n*\n* @param opts - The removal options.\n* @returns The string with the character removed.\n*/\nfunction removeCharAt({ str, index }) {\n\treturn str.slice(0, index) + str.slice(index + 1);\n}\n/**\n* Insert a character sequence at the given position in a string.\n*\n* @param opts - The insertion options.\n* @returns The string with the characters inserted.\n*/\nfunction insertCharAt({ str, index, chars }) {\n\treturn str.slice(0, index) + chars + str.slice(index);\n}\n//#endregion\n//#region src/ui/prompts/autocomplete.tsx\n/**\n* Autocomplete prompt with real-time filtering and keyboard navigation.\n*\n* Renders a text input at the top that filters the option list as the user\n* types. Arrow keys navigate the filtered results and Enter selects the\n* currently focused option. Uses {@link ScrollArea} to constrain the visible\n* list to `maxVisible` rows.\n*\n* @param props - The autocomplete props.\n* @returns A rendered autocomplete element.\n*/\nfunction Autocomplete({ options, placeholder, maxVisible = 5, defaultValue, filter = defaultFilter, onChange, onSubmit, focused = true, disabled = false }) {\n\tconst [search, setSearch] = useState(\"\");\n\tconst [focusIndex, setFocusIndex] = useState(resolveInitialIndex({\n\t\toptions,\n\t\tdefaultValue\n\t}));\n\tconst [cursorOffset, setCursorOffset] = useState(0);\n\tconst filtered = useMemo(() => options.filter((option) => filter(search, option)), [\n\t\toptions,\n\t\tsearch,\n\t\tfilter\n\t]);\n\tuseInput$1((input, key) => {\n\t\tif (key.upArrow) {\n\t\t\tif (filtered.length === 0) return;\n\t\t\tconst clamped = Math.min(focusIndex, filtered.length - 1);\n\t\t\tconst next = Math.max(0, clamped - 1);\n\t\t\tsetFocusIndex(next);\n\t\t\tconst focusedOption = filtered[next];\n\t\t\tif (onChange && focusedOption !== void 0) onChange(focusedOption.value);\n\t\t\treturn;\n\t\t}\n\t\tif (key.downArrow) {\n\t\t\tif (filtered.length === 0) return;\n\t\t\tconst next = Math.min(filtered.length - 1, focusIndex + 1);\n\t\t\tsetFocusIndex(next);\n\t\t\tconst focusedOption = filtered[next];\n\t\t\tif (onChange && focusedOption !== void 0) onChange(focusedOption.value);\n\t\t\treturn;\n\t\t}\n\t\tif (key.return) {\n\t\t\tconst focusedOption = filtered[focusIndex];\n\t\t\tif (onSubmit && focusedOption !== void 0 && !focusedOption.disabled) onSubmit(focusedOption.value);\n\t\t\treturn;\n\t\t}\n\t\tif (key.leftArrow) {\n\t\t\tsetCursorOffset(Math.max(0, cursorOffset - 1));\n\t\t\treturn;\n\t\t}\n\t\tif (key.rightArrow) {\n\t\t\tsetCursorOffset(Math.min(search.length, cursorOffset + 1));\n\t\t\treturn;\n\t\t}\n\t\tif (key.ctrl && input === \"d\") {\n\t\t\tif (cursorOffset < search.length) {\n\t\t\t\tsetSearch(removeCharAt({\n\t\t\t\t\tstr: search,\n\t\t\t\t\tindex: cursorOffset\n\t\t\t\t}));\n\t\t\t\tsetFocusIndex(0);\n\t\t\t}\n\t\t\treturn;\n\t\t}\n\t\tif (key.backspace) {\n\t\t\tif (cursorOffset > 0) {\n\t\t\t\tsetSearch(removeCharAt({\n\t\t\t\t\tstr: search,\n\t\t\t\t\tindex: cursorOffset - 1\n\t\t\t\t}));\n\t\t\t\tsetCursorOffset(cursorOffset - 1);\n\t\t\t\tsetFocusIndex(0);\n\t\t\t}\n\t\t\treturn;\n\t\t}\n\t\tif (input && !key.ctrl && !key.meta) {\n\t\t\tsetSearch(insertCharAt({\n\t\t\t\tstr: search,\n\t\t\t\tindex: cursorOffset,\n\t\t\t\tchars: input\n\t\t\t}));\n\t\t\tsetCursorOffset(cursorOffset + input.length);\n\t\t\tsetFocusIndex(0);\n\t\t}\n\t}, { isActive: focused && !disabled });\n\treturn /* @__PURE__ */ jsxs(Box$1, {\n\t\tflexDirection: \"column\",\n\t\tchildren: [/* @__PURE__ */ jsx(SearchInput, {\n\t\t\tvalue: search,\n\t\t\tplaceholder,\n\t\t\tdisabled,\n\t\t\tcursorOffset\n\t\t}), match(filtered.length > 0).with(true, () => /* @__PURE__ */ jsx(ScrollArea, {\n\t\t\theight: Math.min(maxVisible, filtered.length),\n\t\t\tactiveIndex: focusIndex,\n\t\t\tchildren: filtered.map((option, index) => {\n\t\t\t\tconst isFocused = index === focusIndex;\n\t\t\t\treturn /* @__PURE__ */ jsx(OptionRow, {\n\t\t\t\t\toption,\n\t\t\t\t\tindicator: match(isFocused).with(true, () => symbols.radioOn).with(false, () => symbols.radioOff).exhaustive(),\n\t\t\t\t\tisFocused,\n\t\t\t\t\tisSelected: isFocused,\n\t\t\t\t\tdisabled\n\t\t\t\t}, String(option.value));\n\t\t\t})\n\t\t})).with(false, () => /* @__PURE__ */ jsx(Text$1, {\n\t\t\tdimColor: true,\n\t\t\tchildren: \"No matches found.\"\n\t\t})).exhaustive()]\n\t});\n}\n/**\n* Default case-insensitive substring filter.\n*\n* @private\n* @param search - The current search string.\n* @param option - The option to test.\n* @returns Whether the option matches the search.\n*/\nfunction defaultFilter(search, option) {\n\tif (search === \"\") return true;\n\treturn option.label.toLowerCase().includes(search.toLowerCase());\n}\n/**\n* Render the search text input with cursor and placeholder support.\n*\n* @private\n* @param props - The search input props.\n* @returns A rendered search input element.\n*/\nfunction SearchInput({ value, placeholder, disabled, cursorOffset }) {\n\treturn /* @__PURE__ */ jsxs(Box$1, { children: [/* @__PURE__ */ jsx(Text$1, {\n\t\tcolor: colors.primary,\n\t\tbold: true,\n\t\tchildren: \"> \"\n\t}), match({\n\t\tisEmpty: value === \"\",\n\t\thasPlaceholder: placeholder !== void 0\n\t}).with({\n\t\tisEmpty: true,\n\t\thasPlaceholder: true\n\t}, () => /* @__PURE__ */ jsx(Text$1, {\n\t\tdimColor: true,\n\t\tchildren: placeholder\n\t})).otherwise(() => /* @__PURE__ */ jsx(CursorValue, {\n\t\tvalue,\n\t\tcursor: cursorOffset,\n\t\tdisabled\n\t}))] });\n}\n//#endregion\n//#region src/ui/prompts/group-multi-select.tsx\n/**\n* Multi-select prompt with options organized into named groups.\n*\n* Renders group headers as bold section labels with indented options beneath.\n* Space toggles the focused item, Enter submits the current selection.\n* When `selectableGroups` is enabled, toggling a group header toggles all\n* of its child options.\n*\n* @param props - The group multi-select props.\n* @returns A rendered group multi-select element.\n*/\nfunction GroupMultiSelect({ options, defaultValue = [], required = false, selectableGroups = false, onChange, onSubmit, focused = true, disabled = false }) {\n\tconst flatItems = useMemo(() => buildFlatItems({\n\t\toptions,\n\t\tselectableGroups\n\t}), [options, selectableGroups]);\n\tconst [focusIndex, setFocusIndex] = useState(0);\n\tconst [selected, setSelected] = useState(defaultValue);\n\tconst [error, setError] = useState(void 0);\n\tconst selectedSet = useMemo(() => new Set(selected), [selected]);\n\tuseEffect(() => {\n\t\tif (flatItems.length === 0) return;\n\t\tif (focusIndex >= flatItems.length) setFocusIndex(flatItems.length - 1);\n\t}, [flatItems, focusIndex]);\n\tuseInput$1((input, key) => {\n\t\tif (key.return) {\n\t\t\tif (required && selected.length === 0) {\n\t\t\t\tsetError(\"At least one option must be selected.\");\n\t\t\t\treturn;\n\t\t\t}\n\t\t\tif (onSubmit) onSubmit(selected);\n\t\t\treturn;\n\t\t}\n\t\tif (flatItems.length === 0) return;\n\t\tif (key.upArrow) {\n\t\t\tsetFocusIndex(moveFocus(focusIndex, -1, flatItems));\n\t\t\treturn;\n\t\t}\n\t\tif (key.downArrow) {\n\t\t\tsetFocusIndex(moveFocus(focusIndex, 1, flatItems));\n\t\t\treturn;\n\t\t}\n\t\tif (input === \" \") {\n\t\t\tconst item = flatItems[focusIndex];\n\t\t\tif (item === void 0) return;\n\t\t\tconst nextSelected = toggleItem({\n\t\t\t\titem,\n\t\t\t\tselected,\n\t\t\t\tselectedSet,\n\t\t\t\toptions\n\t\t\t});\n\t\t\tsetSelected(nextSelected);\n\t\t\tsetError(void 0);\n\t\t\tif (onChange) onChange(nextSelected);\n\t\t}\n\t}, { isActive: focused && !disabled });\n\treturn /* @__PURE__ */ jsxs(Box$1, {\n\t\tflexDirection: \"column\",\n\t\tchildren: [flatItems.map((item, index) => {\n\t\t\treturn /* @__PURE__ */ jsx(FlatItemRow, {\n\t\t\t\titem,\n\t\t\t\tisFocused: index === focusIndex,\n\t\t\t\tisSelected: isItemSelected(item, selectedSet, options),\n\t\t\t\tdisabled\n\t\t\t}, itemKey(item));\n\t\t}), /* @__PURE__ */ jsx(ErrorMessage, { message: error })]\n\t});\n}\n/**\n* Build a flat list of items from the grouped options map.\n*\n* @private\n* @param opts - The build options.\n* @returns A flat array of group headers and options.\n*/\nfunction buildFlatItems({ options, selectableGroups }) {\n\treturn Object.entries(options).flatMap(([groupName, groupOptions]) => {\n\t\tconst header = {\n\t\t\tkind: \"group\",\n\t\t\tgroupName\n\t\t};\n\t\tconst items = groupOptions.map((option) => ({\n\t\t\tkind: \"option\",\n\t\t\tgroupName,\n\t\t\toption\n\t\t}));\n\t\treturn match(selectableGroups).with(true, () => [header, ...items]).with(false, () => items).exhaustive();\n\t});\n}\n/**\n* Compute the next focus index, skipping disabled options.\n*\n* @private\n* @param current - The current focus index.\n* @param direction - The direction to move (-1 or 1).\n* @param items - The flat item list.\n* @returns The next valid focus index.\n*/\nfunction moveFocus(current, direction, items) {\n\tconst next = current + direction;\n\tif (next < 0 || next >= items.length) return current;\n\tconst item = items[next];\n\tif (item !== void 0 && item.kind === \"option\" && item.option.disabled) {\n\t\tconst result = moveFocus(next, direction, items);\n\t\treturn match(result === next).with(true, () => current).with(false, () => result).exhaustive();\n\t}\n\treturn next;\n}\n/**\n* Toggle the selection state for a flat item. For group headers, toggles all\n* non-disabled options in the group. For options, toggles the single value.\n*\n* @private\n* @param opts - The toggle options.\n* @returns The updated selection array.\n*/\nfunction toggleItem({ item, selected, selectedSet, options }) {\n\treturn match(item.kind).with(\"group\", () => {\n\t\tconst enabledValues = (options[item.groupName] ?? []).filter((opt) => !opt.disabled).map((opt) => opt.value);\n\t\tconst enabledSet = new Set(enabledValues);\n\t\treturn match(enabledValues.every((v) => selectedSet.has(v))).with(true, () => selected.filter((v) => !enabledSet.has(v))).with(false, () => [...selected.filter((v) => !enabledSet.has(v)), ...enabledValues]).exhaustive();\n\t}).with(\"option\", () => {\n\t\tif (item.kind !== \"option\" || item.option.disabled) return selected;\n\t\tconst { value } = item.option;\n\t\treturn match(selectedSet.has(value)).with(true, () => selected.filter((v) => v !== value)).with(false, () => [...selected, value]).exhaustive();\n\t}).exhaustive();\n}\n/**\n* Determine whether a flat item is currently selected.\n*\n* @private\n* @param item - The flat item.\n* @param selectedSet - A set of currently selected values for O(1) lookup.\n* @param options - The grouped options.\n* @returns Whether the item is selected.\n*/\nfunction isItemSelected(item, selectedSet, options) {\n\treturn match(item.kind).with(\"group\", () => {\n\t\tconst enabledValues = (options[item.groupName] ?? []).filter((opt) => !opt.disabled).map((opt) => opt.value);\n\t\treturn enabledValues.length > 0 && enabledValues.every((v) => selectedSet.has(v));\n\t}).with(\"option\", () => item.kind === \"option\" && selectedSet.has(item.option.value)).exhaustive();\n}\n/**\n* Generate a stable key for a flat item.\n*\n* @private\n* @param item - The flat item.\n* @param index - The item index.\n* @returns A string key.\n*/\nfunction itemKey(item) {\n\treturn match(item).with({ kind: \"group\" }, (i) => `group-${i.groupName}`).with({ kind: \"option\" }, (i) => `option-${i.groupName}-${String(i.option.value)}`).exhaustive();\n}\n/**\n* Render a single row in the flat item list, either a group header\n* or an indented option with checkbox.\n*\n* @private\n* @param props - The row props.\n* @returns A rendered row element.\n*/\nfunction FlatItemRow({ item, isFocused, isSelected, disabled }) {\n\treturn match(item).with({ kind: \"group\" }, (groupItem) => /* @__PURE__ */ jsx(Box$1, { children: /* @__PURE__ */ jsxs(Text$1, {\n\t\tbold: true,\n\t\tdimColor: disabled,\n\t\tchildren: [\n\t\t\tmatch(isFocused).with(true, () => `${symbols.pointer} `).with(false, () => \"  \").exhaustive(),\n\t\t\tmatch(isSelected).with(true, () => `${symbols.checkboxOn} `).with(false, () => `${symbols.checkboxOff} `).exhaustive(),\n\t\t\tgroupItem.groupName\n\t\t]\n\t}) })).with({ kind: \"option\" }, (optionItem) => {\n\t\tconst { option } = optionItem;\n\t\tconst isOptionDisabled = disabled || (option.disabled ?? false);\n\t\treturn /* @__PURE__ */ jsxs(Box$1, {\n\t\t\tpaddingLeft: 2,\n\t\t\tchildren: [/* @__PURE__ */ jsxs(Text$1, {\n\t\t\t\tcolor: match({\n\t\t\t\t\tisFocused,\n\t\t\t\t\tisOptionDisabled\n\t\t\t\t}).with({ isOptionDisabled: true }, () => \"gray\").with({ isFocused: true }, () => colors.primary).otherwise(() => void 0),\n\t\t\t\tchildren: [\n\t\t\t\t\tmatch(isFocused).with(true, () => `${symbols.pointer} `).with(false, () => \"  \").exhaustive(),\n\t\t\t\t\tmatch(isSelected).with(true, () => `${symbols.checkboxOn} `).with(false, () => `${symbols.checkboxOff} `).exhaustive(),\n\t\t\t\t\toption.label,\n\t\t\t\t\tmatch(isOptionDisabled && !pc.isColorSupported).with(true, () => \" (disabled)\").with(false, () => \"\").exhaustive()\n\t\t\t\t]\n\t\t\t}), match(option.hint).with(void 0, () => null).otherwise((hint) => /* @__PURE__ */ jsxs(Text$1, {\n\t\t\t\tcolor: match(isOptionDisabled).with(true, () => \"gray\").with(false, () => void 0).exhaustive(),\n\t\t\t\tdimColor: true,\n\t\t\t\tchildren: [\" \", hint]\n\t\t\t}))]\n\t\t});\n\t}).exhaustive();\n}\n//#endregion\n//#region src/ui/prompts/password-input.tsx\n/**\n* A masked single-line text input prompt with cursor movement and validation.\n*\n* Renders the current value with each character replaced by the mask\n* character. Shows a visible cursor (inverse character) at the current\n* position. Placeholder text is shown dimmed when the input is empty.\n* Validation errors appear below the input in red.\n*\n* **Keyboard shortcuts:**\n* - Left/Right arrows — move cursor\n* - Home (Ctrl+A) / End (Ctrl+E) — jump to start/end\n* - Backspace — delete character before cursor\n* - Delete (Ctrl+D) — delete character at cursor\n* - Enter — validate and submit\n*\n* @param props - The password input component props.\n* @returns A rendered password input element.\n*/\nfunction PasswordInput({ placeholder, mask = \"*\", validate, onChange, onSubmit, focused = true, disabled = false }) {\n\tconst [state, setState] = useState({\n\t\tvalue: \"\",\n\t\tcursor: 0,\n\t\terror: void 0\n\t});\n\tuseInput$1((input, key) => {\n\t\tif (key.return) {\n\t\t\tconst validationError = match(validate).with(void 0, () => void 0).otherwise((fn) => fn(state.value));\n\t\t\tif (validationError) {\n\t\t\t\tsetState({\n\t\t\t\t\t...state,\n\t\t\t\t\terror: validationError\n\t\t\t\t});\n\t\t\t\treturn;\n\t\t\t}\n\t\t\tsetState({\n\t\t\t\t...state,\n\t\t\t\terror: void 0\n\t\t\t});\n\t\t\tif (onSubmit) onSubmit(state.value);\n\t\t\treturn;\n\t\t}\n\t\tconst nextState = resolveNextState({\n\t\t\tstate,\n\t\t\tinput,\n\t\t\tkey\n\t\t});\n\t\tif (nextState.value !== state.value || nextState.cursor !== state.cursor) {\n\t\t\tsetState(nextState);\n\t\t\tif (nextState.value !== state.value && onChange) onChange(nextState.value);\n\t\t}\n\t}, { isActive: focused && !disabled });\n\tconst maskedValue = mask.repeat(state.value.length);\n\treturn /* @__PURE__ */ jsxs(Box$1, {\n\t\tflexDirection: \"column\",\n\t\tchildren: [match(state.value.length === 0 && placeholder !== void 0).with(true, () => /* @__PURE__ */ jsx(Text$1, {\n\t\t\tdimColor: true,\n\t\t\tchildren: placeholder\n\t\t})).with(false, () => /* @__PURE__ */ jsx(CursorValue, {\n\t\t\tvalue: maskedValue,\n\t\t\tcursor: state.cursor,\n\t\t\tdisabled\n\t\t})).exhaustive(), /* @__PURE__ */ jsx(ErrorMessage, { message: state.error })]\n\t});\n}\n//#endregion\n//#region src/ui/prompts/path-input.tsx\nconst MAX_SUGGESTIONS = 5;\n/**\n* File path input with tab-completion from the filesystem.\n*\n* Renders a text input that reads directory entries from `root` on Tab\n* press and cycles through matching completions. Up to 5 suggestions\n* are shown below the input. Validation runs on Enter and errors are\n* displayed in red.\n*\n* @param props - The path input props.\n* @returns A rendered path input element.\n*/\nfunction PathInput({ root, directoryOnly = false, defaultValue = \"\", validate, onChange, onSubmit, focused = true, disabled = false }) {\n\tconst resolvedRoot = root ?? process.cwd();\n\tconst [value, setValue] = useState(defaultValue);\n\tconst [cursorOffset, setCursorOffset] = useState(defaultValue.length);\n\tconst [suggestions, setSuggestions] = useState([]);\n\tconst [suggestionIndex, setSuggestionIndex] = useState(0);\n\tconst [error, setError] = useState(void 0);\n\tuseInput$1((input, key) => {\n\t\tif (key.tab) {\n\t\t\tconst matches = readCompletions({\n\t\t\t\troot: resolvedRoot,\n\t\t\t\tpartial: value,\n\t\t\t\tdirectoryOnly\n\t\t\t});\n\t\t\tsetSuggestions(matches);\n\t\t\tif (matches.length > 0) {\n\t\t\t\tconst nextIndex = match(suggestions.length > 0).with(true, () => (suggestionIndex + 1) % matches.length).with(false, () => 0).exhaustive();\n\t\t\t\tsetSuggestionIndex(nextIndex);\n\t\t\t\tconst completed = matches[nextIndex] ?? value;\n\t\t\t\tsetValue(completed);\n\t\t\t\tsetCursorOffset(completed.length);\n\t\t\t\tsetError(void 0);\n\t\t\t\tif (onChange) onChange(completed);\n\t\t\t}\n\t\t\treturn;\n\t\t}\n\t\tif (key.return) {\n\t\t\tif (validate) {\n\t\t\t\tconst validationError = validate(value);\n\t\t\t\tif (validationError !== void 0) {\n\t\t\t\t\tsetError(validationError);\n\t\t\t\t\treturn;\n\t\t\t\t}\n\t\t\t}\n\t\t\tsetError(void 0);\n\t\t\tif (onSubmit) onSubmit(value);\n\t\t\treturn;\n\t\t}\n\t\tif (key.leftArrow) {\n\t\t\tsetCursorOffset(Math.max(0, cursorOffset - 1));\n\t\t\treturn;\n\t\t}\n\t\tif (key.rightArrow) {\n\t\t\tsetCursorOffset(Math.min(value.length, cursorOffset + 1));\n\t\t\treturn;\n\t\t}\n\t\tif (key.backspace) {\n\t\t\tif (cursorOffset > 0) {\n\t\t\t\tconst nextValue = removeCharAt({\n\t\t\t\t\tstr: value,\n\t\t\t\t\tindex: cursorOffset - 1\n\t\t\t\t});\n\t\t\t\tsetValue(nextValue);\n\t\t\t\tsetCursorOffset(cursorOffset - 1);\n\t\t\t\tsetSuggestions([]);\n\t\t\t\tsetSuggestionIndex(0);\n\t\t\t\tsetError(void 0);\n\t\t\t\tif (onChange) onChange(nextValue);\n\t\t\t}\n\t\t\treturn;\n\t\t}\n\t\tif (input && !key.ctrl && !key.meta) {\n\t\t\tconst nextValue = insertCharAt({\n\t\t\t\tstr: value,\n\t\t\t\tindex: cursorOffset,\n\t\t\t\tchars: input\n\t\t\t});\n\t\t\tsetValue(nextValue);\n\t\t\tsetCursorOffset(cursorOffset + input.length);\n\t\t\tsetSuggestions([]);\n\t\t\tsetSuggestionIndex(0);\n\t\t\tsetError(void 0);\n\t\t\tif (onChange) onChange(nextValue);\n\t\t}\n\t}, { isActive: focused && !disabled });\n\treturn /* @__PURE__ */ jsxs(Box$1, {\n\t\tflexDirection: \"column\",\n\t\tchildren: [\n\t\t\t/* @__PURE__ */ jsxs(Box$1, { children: [/* @__PURE__ */ jsx(Text$1, {\n\t\t\t\tcolor: colors.primary,\n\t\t\t\tbold: true,\n\t\t\t\tchildren: \"> \"\n\t\t\t}), /* @__PURE__ */ jsx(Text$1, {\n\t\t\t\tdimColor: disabled,\n\t\t\t\tchildren: value\n\t\t\t})] }),\n\t\t\tmatch(suggestions.length > 0).with(true, () => /* @__PURE__ */ jsx(Box$1, {\n\t\t\t\tflexDirection: \"column\",\n\t\t\t\tpaddingLeft: 2,\n\t\t\t\tchildren: suggestions.slice(0, MAX_SUGGESTIONS).map((suggestion, index) => /* @__PURE__ */ jsx(Text$1, {\n\t\t\t\t\tdimColor: index !== suggestionIndex,\n\t\t\t\t\tcolor: match(index === suggestionIndex).with(true, () => colors.primary).with(false, () => void 0).exhaustive(),\n\t\t\t\t\tchildren: suggestion\n\t\t\t\t}, suggestion))\n\t\t\t})).with(false, () => null).exhaustive(),\n\t\t\t/* @__PURE__ */ jsx(ErrorMessage, { message: error })\n\t\t]\n\t});\n}\n/**\n* Read directory entries matching a partial path from the filesystem.\n*\n* @private\n* @param opts - The completion options.\n* @returns An array of matching path strings relative to root.\n*/\nfunction readCompletions({ root, partial, directoryOnly }) {\n\tconst [dirPart, prefix] = splitPartial(partial);\n\tconst targetDir = resolve(root, dirPart);\n\tconst [readError, entries] = safeReaddir(targetDir);\n\tif (readError !== null) return [];\n\treturn entries.filter((entry) => {\n\t\tif (!entry.toLowerCase().startsWith(prefix.toLowerCase())) return false;\n\t\tif (directoryOnly) return isDirectory(join(targetDir, entry));\n\t\treturn true;\n\t}).map((entry) => match(dirPart).with(\"\", () => entry).otherwise((dir) => `${dir}/${entry}`));\n}\n/**\n* Split a partial path into the directory portion and the filename prefix.\n*\n* @private\n* @param partial - The partial path string.\n* @returns A tuple of [directory, prefix].\n*/\nfunction splitPartial(partial) {\n\tconst lastSlash = partial.lastIndexOf(\"/\");\n\tif (lastSlash === -1) return [\"\", partial];\n\treturn [partial.slice(0, lastSlash), partial.slice(lastSlash + 1)];\n}\n/**\n* Safely read a directory, returning a Result tuple.\n*\n* @private\n* @param dir - The directory path.\n* @returns A Result tuple with entries or an error.\n*/\nfunction safeReaddir(dir) {\n\ttry {\n\t\treturn [null, readdirSync(dir)];\n\t} catch (error) {\n\t\treturn [match(error instanceof Error).with(true, () => error).with(false, () => new Error(String(error))).exhaustive(), null];\n\t}\n}\n/**\n* Check whether a path is a directory.\n*\n* @private\n* @param path - The filesystem path.\n* @returns Whether the path is a directory.\n*/\nfunction isDirectory(path) {\n\ttry {\n\t\treturn statSync(path).isDirectory();\n\t} catch {\n\t\treturn false;\n\t}\n}\n//#endregion\n//#region src/ui/prompts/select-key.tsx\n/**\n* Key-press driven select prompt where each option maps to a single key.\n*\n* Renders options in a vertical list with the key character highlighted\n* in cyan and bold. Pressing the corresponding key immediately fires\n* `onSubmit`. Disabled options are shown dimmed and their key presses\n* are ignored.\n*\n* @param props - The select-key props.\n* @returns A rendered select-key element.\n*/\nfunction SelectKey({ options, onSubmit, focused = true, disabled = false }) {\n\tuseInput$1((input) => {\n\t\tconst matched = options.find((opt) => opt.value.toLowerCase() === input.toLowerCase());\n\t\tif (matched === void 0 || matched.disabled) return;\n\t\tif (onSubmit) onSubmit(matched.value);\n\t}, { isActive: focused && !disabled });\n\treturn /* @__PURE__ */ jsx(Box$1, {\n\t\tflexDirection: \"column\",\n\t\tchildren: options.map((option) => /* @__PURE__ */ jsx(KeyOptionRow, {\n\t\t\toption,\n\t\t\tdisabled\n\t\t}, option.value))\n\t});\n}\n/**\n* Render a single option row with the key character highlighted.\n*\n* @private\n* @param props - The row props.\n* @returns A rendered row element.\n*/\nfunction KeyOptionRow({ option, disabled }) {\n\tconst isOptionDisabled = disabled || (option.disabled ?? false);\n\tconst keyChar = option.value.charAt(0);\n\tconst restLabel = option.label.slice(1);\n\tconst startsWithKey = option.label.charAt(0).toLowerCase() === keyChar.toLowerCase();\n\treturn /* @__PURE__ */ jsxs(Box$1, { children: [match(isOptionDisabled).with(true, () => /* @__PURE__ */ jsxs(Text$1, {\n\t\tdimColor: true,\n\t\tchildren: [\n\t\t\t\"  \",\n\t\t\t\"[\",\n\t\t\tkeyChar,\n\t\t\t\"] \",\n\t\t\toption.label\n\t\t]\n\t})).with(false, () => /* @__PURE__ */ jsxs(Box$1, { children: [\n\t\t/* @__PURE__ */ jsx(Text$1, { children: \"  \" }),\n\t\t/* @__PURE__ */ jsx(Text$1, { children: \"[\" }),\n\t\t/* @__PURE__ */ jsx(Text$1, {\n\t\t\tcolor: colors.primary,\n\t\t\tbold: true,\n\t\t\tchildren: keyChar\n\t\t}),\n\t\t/* @__PURE__ */ jsx(Text$1, { children: \"] \" }),\n\t\tmatch(startsWithKey).with(true, () => /* @__PURE__ */ jsxs(Text$1, { children: [/* @__PURE__ */ jsx(Text$1, {\n\t\t\tcolor: colors.primary,\n\t\t\tbold: true,\n\t\t\tchildren: option.label.charAt(0)\n\t\t}), restLabel] })).with(false, () => /* @__PURE__ */ jsx(Text$1, { children: option.label })).exhaustive()\n\t] })).exhaustive(), match(option.hint).with(void 0, () => null).otherwise((hint) => /* @__PURE__ */ jsxs(Text$1, {\n\t\tdimColor: true,\n\t\tchildren: [\" \", hint]\n\t}))] });\n}\n//#endregion\n//#region src/ui/display/alert.tsx\n/**\n* A bordered alert box with variant-colored borders and icon.\n*\n* Renders a box constructed from text characters with a colored border\n* matching the alert variant. An icon (from the theme symbols) is prepended\n* to the content. The title, when provided, is inset into the top border.\n*\n* @param props - The alert props.\n* @returns A rendered alert element.\n*/\nfunction Alert({ children, variant, title, width = \"auto\", rounded = true, contentAlign = \"left\", titleAlign = \"left\" }) {\n\tconst variantColor = resolveVariantColor(variant);\n\tconst icon = resolveVariantIcon(variant);\n\tconst border = resolveBorderChars(rounded);\n\tconst contentStr = `${icon} ${children}`;\n\tconst innerWidth = resolveInnerWidth({\n\t\twidth,\n\t\ttitle,\n\t\tcontentStr\n\t});\n\tconst topLine = buildTopBorder({\n\t\tborder,\n\t\ttitle,\n\t\tinnerWidth,\n\t\ttitleAlign\n\t});\n\tconst bottomLine = `${border.bottomLeft}${border.horizontal.repeat(innerWidth + 2)}${border.bottomRight}`;\n\treturn /* @__PURE__ */ jsx(Text$1, {\n\t\tcolor: variantColor,\n\t\tchildren: `${topLine}\\n${buildContentLines({\n\t\t\tcontentStr,\n\t\t\tinnerWidth,\n\t\t\tborder,\n\t\t\tcontentAlign\n\t\t})}\\n${bottomLine}`\n\t});\n}\n/**\n* Resolve the icon symbol for a given alert variant.\n*\n* @private\n* @param variant - The alert variant.\n* @returns The icon string.\n*/\nfunction resolveVariantIcon(variant) {\n\treturn match(variant).with(\"info\", () => symbols.info).with(\"success\", () => symbols.tick).with(\"error\", () => symbols.cross).with(\"warning\", () => symbols.warning).exhaustive();\n}\n/**\n* Resolve the border character set based on the rounded flag.\n*\n* @private\n* @param rounded - Whether to use rounded corners.\n* @returns The border character set.\n*/\nfunction resolveBorderChars(rounded) {\n\treturn match(rounded).with(true, () => ({\n\t\ttopLeft: \"╭\",\n\t\ttopRight: \"╮\",\n\t\tbottomLeft: \"╰\",\n\t\tbottomRight: \"╯\",\n\t\thorizontal: \"─\",\n\t\tvertical: \"│\"\n\t})).with(false, () => ({\n\t\ttopLeft: \"┌\",\n\t\ttopRight: \"┐\",\n\t\tbottomLeft: \"└\",\n\t\tbottomRight: \"┘\",\n\t\thorizontal: \"─\",\n\t\tvertical: \"│\"\n\t})).exhaustive();\n}\n/**\n* Compute the inner width of the alert box (excluding border and padding).\n*\n* @private\n* @param options - The width resolution options.\n* @returns The inner width in characters.\n*/\nfunction resolveInnerWidth({ width, title, contentStr }) {\n\tif (width !== \"auto\") return Math.max(0, width - 4);\n\tconst maxLineWidth = contentStr.split(\"\\n\").reduce((max, line) => Math.max(max, line.length), 0);\n\tconst titleWidth = match(title).with(void 0, () => 0).otherwise((t) => t.length + 4);\n\treturn Math.max(maxLineWidth, titleWidth);\n}\n/**\n* Build the top border string with an optional inset title.\n*\n* @private\n* @param options - The top border options.\n* @returns The top border string.\n*/\nfunction buildTopBorder({ border, title, innerWidth, titleAlign }) {\n\tif (!title) return `${border.topLeft}${border.horizontal.repeat(innerWidth + 2)}${border.topRight}`;\n\tconst titleSegment = ` ${title} `;\n\tconst remainingWidth = Math.max(0, innerWidth + 2 - titleSegment.length - 1);\n\treturn match(titleAlign).with(\"left\", () => `${border.topLeft}${border.horizontal}${titleSegment}${border.horizontal.repeat(remainingWidth)}${border.topRight}`).with(\"right\", () => `${border.topLeft}${border.horizontal.repeat(remainingWidth)}${titleSegment}${border.horizontal}${border.topRight}`).with(\"center\", () => {\n\t\tconst leftPad = Math.floor(remainingWidth / 2);\n\t\tconst rightPad = remainingWidth - leftPad;\n\t\treturn `${border.topLeft}${border.horizontal.repeat(leftPad + 1)}${titleSegment}${border.horizontal.repeat(rightPad)}${border.topRight}`;\n\t}).exhaustive();\n}\n/**\n* Build the padded content lines for the alert body.\n*\n* @private\n* @param options - The content line options.\n* @returns The formatted content lines as a single string.\n*/\nfunction buildContentLines({ contentStr, innerWidth, border, contentAlign }) {\n\treturn contentStr.split(\"\\n\").map((line) => alignLine({\n\t\tline,\n\t\tinnerWidth,\n\t\tborder,\n\t\tcontentAlign\n\t})).join(\"\\n\");\n}\n/**\n* Align a single content line within the alert box.\n*\n* @private\n* @param options - The line alignment options.\n* @returns The aligned line with border characters.\n*/\nfunction alignLine({ line, innerWidth, border, contentAlign }) {\n\tconst padding = Math.max(0, innerWidth - line.length);\n\treturn match(contentAlign).with(\"left\", () => `${border.vertical} ${line}${\" \".repeat(padding)} ${border.vertical}`).with(\"right\", () => `${border.vertical} ${\" \".repeat(padding)}${line} ${border.vertical}`).with(\"center\", () => {\n\t\tconst leftPad = Math.floor(padding / 2);\n\t\tconst rightPad = padding - leftPad;\n\t\treturn `${border.vertical} ${\" \".repeat(leftPad)}${line}${\" \".repeat(rightPad)} ${border.vertical}`;\n\t}).exhaustive();\n}\n//#endregion\n//#region src/ui/display/progress-bar.tsx\n/**\n* A horizontal progress bar with percentage display.\n*\n* Renders completed segments in cyan and remaining segments as dim text.\n* The style prop controls the characters used for completed and remaining\n* portions of the bar.\n*\n* @param props - The progress bar props.\n* @returns A rendered progress bar element.\n*/\nfunction ProgressBar({ value, max = 100, label, style = \"block\", size = 20 }) {\n\tconst ratio = match(max > 0).with(true, () => Math.min(1, Math.max(0, value / max))).with(false, () => 0).exhaustive();\n\tconst percentage = Math.round(ratio * 100);\n\tconst guardedSize = Math.max(0, size);\n\tconst filledCount = Math.round(ratio * guardedSize);\n\tconst emptyCount = guardedSize - filledCount;\n\tconst chars = resolveChars(style);\n\tconst filledBar = chars.filled.repeat(filledCount);\n\tconst emptyBar = chars.empty.repeat(emptyCount);\n\treturn /* @__PURE__ */ jsxs(Text$1, { children: [\n\t\t/* @__PURE__ */ jsx(Text$1, {\n\t\t\tcolor: colors.primary,\n\t\t\tchildren: filledBar\n\t\t}),\n\t\t/* @__PURE__ */ jsx(Text$1, {\n\t\t\tdimColor: true,\n\t\t\tchildren: emptyBar\n\t\t}),\n\t\t/* @__PURE__ */ jsx(Text$1, { children: ` ${String(percentage)}%` }),\n\t\tmatch(label).with(void 0, () => null).otherwise((text) => /* @__PURE__ */ jsx(Text$1, { children: ` ${text}` }))\n\t] });\n}\n/**\n* Resolve the filled and empty characters for a given bar style.\n*\n* @private\n* @param style - The progress bar style.\n* @returns The character pair for the given style.\n*/\nfunction resolveChars(style) {\n\treturn match(style).with(\"light\", () => ({\n\t\tfilled: \"░\",\n\t\tempty: \" \"\n\t})).with(\"heavy\", () => ({\n\t\tfilled: \"▓\",\n\t\tempty: \"░\"\n\t})).with(\"block\", () => ({\n\t\tfilled: \"█\",\n\t\tempty: \"░\"\n\t})).exhaustive();\n}\n//#endregion\n//#region src/ui/display/status-message.tsx\n/**\n* A status message with a colored icon indicating the variant.\n*\n* Renders a symbol (tick, cross, warning, or circle) in the variant color\n* followed by the message content. Ideal for command output lines that\n* communicate success, failure, warnings, or information.\n*\n* @param props - The status message props.\n* @returns A rendered status message element.\n*/\nfunction StatusMessage({ children, variant }) {\n\tconst icon = resolveIcon(variant);\n\treturn /* @__PURE__ */ jsxs(Text$1, { children: [/* @__PURE__ */ jsx(Text$1, {\n\t\tcolor: resolveVariantColor(variant),\n\t\tchildren: icon\n\t}), /* @__PURE__ */ jsx(Text$1, { children: ` ${children}` })] });\n}\n/**\n* Resolve the symbol icon for a given status variant.\n*\n* @private\n* @param variant - The status message variant.\n* @returns The icon string.\n*/\nfunction resolveIcon(variant) {\n\treturn match(variant).with(\"info\", () => symbols.circle).with(\"success\", () => symbols.tick).with(\"error\", () => symbols.cross).with(\"warning\", () => symbols.warning).exhaustive();\n}\n//#endregion\nexport { Alert, Autocomplete, Box, Confirm, ErrorMessage, FullScreen, GroupMultiSelect, MultiSelect, Newline, Output, PasswordInput, PathInput, ProgressBar, ScrollArea, Select, SelectKey, Spacer, Spinner, Static, StatusMessage, Tabs, Text, TextInput, Transform, colors, kittyFlags, kittyModifiers, measureElement, render, renderToString, resolveVariantColor, screen, symbols, useApp, useCursor, useFocus, useFocusManager, useFullScreen, useHotkey, useInput, useIsScreenReaderEnabled, useOutputStore, useScreenContext, useSize, useStderr, useStdin, useStdout, useTerminalSize };\n\n//# sourceMappingURL=index.js.map","import { createHash } from 'node:crypto'\nimport { watch } from 'node:fs'\nimport path from 'node:path'\n\nimport type { CiderpressConfig } from '@ciderpress/config'\nimport { loadConfig } from '@ciderpress/config/loader'\nimport { toError } from 'massaman/conversion'\nimport { debounce } from 'massaman/function'\n\nimport type { WatcherCallbacks, WatcherHandle } from './dev-types.ts'\nimport type { Paths } from './paths.ts'\nimport { sync } from './sync/index.ts'\n\nconst CONFIG_EXTENSIONS = ['.ts', '.mts', '.cts', '.js', '.mjs', '.cjs', '.json'] as const\n\nconst MARKDOWN_EXTENSIONS = ['.md', '.mdx'] as const\n\n/**\n * Directories to ignore — any event whose path contains one of these\n * segments is silently dropped.\n */\nconst IGNORED_DIRS = new Set(['node_modules', '.git', '.ciderpress', 'bundle', 'dist', '.turbo'])\n\n/**\n * Create a file watcher that re-syncs documentation on changes.\n *\n * Uses Node.js native fs.watch with recursive:true which on macOS\n * creates a single FSEvents subscription — one file descriptor for\n * the entire tree. Filtering happens in the callback, not at the\n * OS level, so there are zero EMFILE concerns.\n *\n * @param params - Watcher configuration\n * @param params.initialConfig - Initial ciderpress config to use for syncing\n * @param params.paths - Resolved project paths\n * @param params.callbacks - Callbacks for status changes, sync results, and file changes\n * @param params.onConfigReload - Optional async callback invoked after config reload and sync complete, receives new config\n * @param params.openapiCache - Optional shared cache of dereferenced OpenAPI specs\n * @returns Closeable and resyncable watcher handle\n */\nexport function createWatcher(params: {\n  readonly initialConfig: CiderpressConfig\n  readonly paths: Paths\n  readonly callbacks: WatcherCallbacks\n  readonly onConfigReload?: (newConfig: CiderpressConfig) => Promise<void>\n  readonly openapiCache?: Map<string, unknown>\n}): WatcherHandle {\n  const { initialConfig, paths, callbacks, onConfigReload, openapiCache } = params\n  const { repoRoot } = paths\n  const configFileNames = new Set(CONFIG_EXTENSIONS.map((ext) => `ciderpress.config${ext}`))\n  // oxlint-disable-next-line functional/no-let -- mutable config reloaded on file changes\n  let config = initialConfig\n\n  callbacks.onStatusChange('idle')\n\n  // oxlint-disable-next-line functional/no-let -- mutable sync state for debounced watcher\n  let syncing = false\n  // oxlint-disable-next-line functional/no-let -- tracks whether a pending resync needs config reload\n  let pendingReloadConfig: boolean | null = null\n  // oxlint-disable-next-line functional/no-let -- bounded retry counter to prevent unbounded recursive sync\n  let consecutiveFailures = 0\n  const MAX_CONSECUTIVE_FAILURES = 5\n\n  async function triggerSync(reloadConfig: boolean) {\n    if (syncing) {\n      pendingReloadConfig = pendingReloadConfig === true || reloadConfig\n      return\n    }\n    syncing = true\n    callbacks.onStatusChange('syncing')\n    // oxlint-disable-next-line functional/no-let -- tracks whether this sync included a config reload\n    let didReloadConfig = false\n    const previousConfig = config\n    try {\n      if (reloadConfig) {\n        const [configErr, newConfig] = await loadConfig(paths.repoRoot)\n        if (configErr) {\n          callbacks.onStatusChange('error')\n          callbacks.onError(`Config reload failed: ${configErr.message}`)\n          return\n        }\n        config = newConfig\n        didReloadConfig = true\n        if (openapiCache) {\n          openapiCache.clear()\n        }\n      }\n      const result = await sync(config, { paths, quiet: true, openapiCache })\n      if (result.error) {\n        callbacks.onStatusChange('error')\n        callbacks.onError(`Sync error: ${result.error}`)\n        return\n      }\n      consecutiveFailures = 0\n      callbacks.onSyncComplete(result)\n      // Only restart the dev server when restart-relevant fields changed.\n      // Sidebar/nav changes are picked up by Rspress via _meta.json/_nav.json HMR.\n      if (didReloadConfig && onConfigReload && needsServerRestart(previousConfig, config)) {\n        callbacks.onStatusChange('restarting')\n        await onConfigReload(config)\n        callbacks.onConfigReloaded()\n      }\n      callbacks.onStatusChange('idle')\n    } catch (error) {\n      consecutiveFailures += 1\n      callbacks.onStatusChange('error')\n      callbacks.onError(`Sync error: ${toError(error).message}`)\n    } finally {\n      syncing = false\n      if (pendingReloadConfig !== null) {\n        if (consecutiveFailures >= MAX_CONSECUTIVE_FAILURES) {\n          callbacks.onStatusChange('error')\n          callbacks.onError(\n            `Sync failed ${consecutiveFailures} consecutive times, dropping pending resync. Will retry on next file change.`\n          )\n          pendingReloadConfig = null\n          consecutiveFailures = 0\n        } else {\n          const shouldReload = pendingReloadConfig\n          pendingReloadConfig = null\n          // Intentionally not awaited — queues the next sync cycle without\n          // blocking the finally block. Errors are caught by triggerSync's\n          // own try/catch; the extra .catch here defends against rejections\n          // that escape (e.g. synchronous throws before the inner try).\n          // oxlint-disable-next-line promise/prefer-await-to-callbacks -- awaiting would block the finally\n          triggerSync(shouldReload).catch((error: unknown) => {\n            callbacks.onError(`Sync error: ${toError(error).message}`)\n          })\n        }\n      }\n    }\n  }\n\n  const debouncedSync = debounce(() => triggerSync(false), 150)\n  const debouncedConfigSync = debounce(() => triggerSync(true), 150)\n\n  function isConfigFile(filename: string, filePath: string): boolean {\n    if (!configFileNames.has(filename)) {\n      return false\n    }\n    // Only treat config files at the repo root as actual config changes,\n    // not nested files (e.g. test fixtures) with the same basename.\n    const dir = path.dirname(filePath)\n    return dir === '.'\n  }\n\n  // Native recursive watcher — single FSEvents subscription on macOS,\n  // single inotify recursive watch on Linux (Node 22+).\n  // Note: fs.watch does NOT follow symlinks — symlinked doc directories\n  // will not trigger change events (unlike the previous chokidar watcher).\n  // _event ('rename' | 'change') is intentionally discarded — all changes\n  // trigger the same debounced re-sync regardless of event type.\n  const watcher = watch(repoRoot, { recursive: true }, (_event, filename) => {\n    if (!filename) {\n      return\n    }\n\n    if (isIgnored(filename)) {\n      return\n    }\n\n    const basename = path.basename(filename)\n\n    if (isConfigFile(basename, filename)) {\n      callbacks.onFileChange(basename)\n      debouncedConfigSync()\n      return\n    }\n\n    if (!isMarkdownFile(filename)) {\n      return\n    }\n\n    callbacks.onFileChange(filename)\n    debouncedSync()\n  })\n\n  return {\n    close() {\n      debouncedSync.cancel()\n      debouncedConfigSync.cancel()\n      watcher.close()\n    },\n    resync() {\n      triggerSync(false)\n    },\n  }\n}\n\n/**\n * Check whether a file path has a markdown extension.\n *\n * @private\n * @param filePath - File path to check\n * @returns True if the path ends with a markdown extension\n */\nfunction isMarkdownFile(filePath: string): boolean {\n  return MARKDOWN_EXTENSIONS.some((ext) => filePath.endsWith(ext))\n}\n\n/**\n * Check whether any path segment is in the ignored directory set.\n *\n * @private\n * @param filePath - File path to check for ignored segments\n * @returns True if any segment matches an ignored directory name\n */\nfunction isIgnored(filePath: string): boolean {\n  return filePath.split(path.sep).some((segment) => IGNORED_DIRS.has(segment))\n}\n\n/**\n * Check whether a config change requires a full dev server restart.\n *\n * Sidebar/nav structure changes are handled by Rspress HMR via `_meta.json`\n * and `_nav.json` files. Only changes to fields that affect `source.define`,\n * theme CSS, or other Rsbuild-level config require a restart.\n *\n * @private\n * @param prev - Previous ciderpress config\n * @param next - New ciderpress config after reload\n * @returns True if the server must restart\n */\nfunction needsServerRestart(prev: CiderpressConfig, next: CiderpressConfig): boolean {\n  return restartRelevantHash(prev) !== restartRelevantHash(next)\n}\n\n/**\n * Hash the config fields that require a server restart when changed.\n *\n * Excludes `pages` since that only affects sidebar/nav structure handled\n * by `_meta.json`/`_nav.json` HMR.\n *\n * Includes `apps`, `packages`, `workspaces`, and `home` because they feed\n * into the generated home page (`index.md`) hero, feature cards, and\n * workspace cards via `themeConfig.home`.\n *\n * @private\n * @param config - Ciderpress config to hash\n * @returns SHA-256 hex digest of restart-relevant fields\n */\nfunction restartRelevantHash(config: CiderpressConfig): string {\n  const relevant = {\n    title: config.title,\n    description: config.description,\n    brand: config.brand,\n    theme: config.theme,\n    sidebar: config.sidebar,\n    socials: config.socials,\n    footer: config.footer,\n    topbar: config.topbar,\n    home: config.home,\n    apps: config.apps,\n    packages: config.packages,\n    workspaces: config.workspaces,\n  }\n  return createHash('sha256').update(JSON.stringify(relevant)).digest('hex')\n}\n","import { loadConfig } from '@ciderpress/config/loader'\nimport { toError } from 'massaman/conversion'\nimport { match, P } from 'massaman/match'\n\nimport { clean } from '../commands/clean.ts'\nimport { createPaths } from './paths.ts'\nimport { openBrowser, startDevServer } from './rspress.ts'\nimport { sync } from './sync/index.ts'\nimport { createWatcher } from './watcher.ts'\n\n/**\n * Options accepted by the headless dev runner — a strict superset of the\n * TUI flags, minus the React/Ink rendering concerns.\n */\nexport interface RunDevHeadlessOptions {\n  readonly quiet?: boolean\n  readonly clean?: boolean\n  readonly port?: number\n  readonly host?: string\n  readonly url?: string\n  readonly theme?: string\n  readonly colorMode?: 'dark' | 'light'\n  readonly vscode?: boolean\n}\n\n/**\n * Long-running headless dev runner — the non-TTY counterpart to\n * `DevScreen`. Performs config load, optional clean, initial sync,\n * dev server start, and content watcher attachment, then keeps the\n * process alive until SIGINT/SIGTERM is received.\n *\n * Logs to stdout/stderr only — no Ink, no raw-mode stdin. Safe to run\n * from CI, nodemon, Docker, or any non-interactive parent process.\n *\n * @param options - Same option shape as the `dev` TUI command\n * @returns Resolves on graceful shutdown\n */\nexport async function runDevHeadless(options: RunDevHeadlessOptions): Promise<void> {\n  const log = resolveLogger(options.quiet === true)\n\n  const cwd = process.cwd()\n  const paths = createPaths(cwd)\n\n  log('loading config...')\n  const [configError, config] = await loadConfig(cwd)\n  if (configError) {\n    logError(`config error: ${configError.message}`)\n    process.exit(1)\n  }\n\n  if (options.clean === true) {\n    log('cleaning previous output...')\n    await clean(paths)\n  }\n\n  log('syncing content...')\n  const syncResult = await sync(config, { paths, quiet: true })\n  if (syncResult.error) {\n    logError(`sync error: ${syncResult.error}`)\n    process.exit(1)\n  }\n  log(`sync ok (${syncResult.pagesWritten} written)`)\n\n  log('starting dev server...')\n  const server = await startDevServer({\n    config,\n    paths,\n    port: options.port,\n    host: options.host,\n    url: options.url,\n    theme: options.theme,\n    colorMode: options.colorMode,\n    vscode: options.vscode ?? false,\n  })\n\n  log(`ready: ${server.url}`)\n  const localUrl = `http://${server.host}:${server.port}`\n  if (server.url !== localUrl) {\n    log(`local: ${localUrl}`)\n  }\n\n  const shouldOpen = match(config.devServer)\n    .with(P.nonNullable, (d) => d.open === true)\n    .otherwise(() => false)\n  if (shouldOpen) {\n    openBrowser(server.url)\n  }\n\n  const watcher = createWatcher({\n    paths,\n    initialConfig: config,\n    callbacks: {\n      onStatusChange: (status) => log(`watcher: ${status}`),\n      onError: (message) => logError(`watcher error: ${message}`),\n      onSyncComplete: (result) => {\n        if (result.error) {\n          logError(`sync error: ${result.error}`)\n        } else {\n          log(`sync ok (${result.pagesWritten} written)`)\n        }\n      },\n      onFileChange: (filename) => log(`changed: ${filename}`),\n      onConfigReloaded: () => log('config reloaded'),\n    },\n    onConfigReload: async (newConfig) => {\n      try {\n        await server.onConfigReload(newConfig)\n      } catch (error) {\n        logError(`config reload failed: ${toError(error).message}`)\n      }\n    },\n  })\n\n  await waitForShutdown(log, server.close, watcher.close)\n}\n\n/**\n * Block on SIGINT/SIGTERM and gracefully shut down the watcher and server.\n *\n * @private\n * @param log - Info logger\n * @param closeServer - Async server close\n * @param closeWatcher - Sync watcher close\n * @returns Resolves once shutdown completes\n */\nfunction waitForShutdown(\n  log: (msg: string) => void,\n  closeServer: () => Promise<void>,\n  closeWatcher: () => void\n): Promise<void> {\n  return new Promise<void>((resolve) => {\n    async function shutdown(signal: NodeJS.Signals): Promise<void> {\n      log(`received ${signal} — shutting down...`)\n      closeWatcher()\n      await closeServer()\n      resolve()\n    }\n    process.once('SIGINT', shutdown)\n    process.once('SIGTERM', shutdown)\n  })\n}\n\n/**\n * Pick the right info-level logger based on the `--quiet` flag.\n *\n * @private\n * @param quiet - True when `--quiet` was passed\n * @returns Either the stdout writer or a no-op\n */\nfunction resolveLogger(quiet: boolean): (msg: string) => void {\n  if (quiet) {\n    return logSilent\n  }\n  return logInfo\n}\n\n/**\n * Writes an info-level message to stdout with the `[ciderpress]` prefix.\n *\n * @private\n * @param msg - Message body\n */\nfunction logInfo(msg: string): void {\n  process.stdout.write(`[ciderpress] ${msg}\\n`)\n}\n\n/**\n * No-op logger used when `--quiet` is set.\n *\n * @private\n */\nfunction logSilent(): void {\n  // intentionally empty\n}\n\n/**\n * Writes an error-level message to stderr with the `[ciderpress]` prefix.\n *\n * @private\n * @param msg - Message body\n */\nfunction logError(msg: string): void {\n  process.stderr.write(`[ciderpress] ${msg}\\n`)\n}\n","import { DEFAULT_THEME_NAME, resolveBrandGradient } from '@ciderpress/theme'\nimport { Text } from '@kidd-cli/core/ui'\nimport BigText from 'ink-big-text'\nimport Gradient from 'ink-gradient'\nimport { match, P } from 'massaman/match'\n\ntype BannerFont = 'block' | 'tiny'\n\ninterface BannerSize {\n  readonly font: BannerFont | 'text'\n  readonly minWidth: number\n  readonly letterSpacing: number\n}\n\n/**\n * Font tiers, sized so the \"ciderpress\" string fits at each breakpoint\n * with a few columns of breathing room. The block font appears twice\n * with different letter spacings — wider terminals get the spacious\n * variant (letterSpacing 2, ~100 cols) for breathing room, narrower\n * ones get the tight default (letterSpacing 1, ~90 cols). Below that\n * the banner drops straight to `tiny`; the `simple` font in between\n * looked off, so the system jumps directly from block to tiny.\n *\n *   block spacious (6 lines, letterSpacing 2) — ~100 cols\n *   block tight    (6 lines, letterSpacing 1) — ~90 cols\n *   tiny           (2 lines, letterSpacing 1) — ~40 cols\n *   text           (1 line) — fallback\n *\n * Ordered widest first so `pickSize` returns the first match by `minWidth`.\n */\nconst BANNER_SIZES: readonly BannerSize[] = [\n  { font: 'block', minWidth: 100, letterSpacing: 2 },\n  { font: 'block', minWidth: 90, letterSpacing: 1 },\n  { font: 'tiny', minWidth: 40, letterSpacing: 1 },\n  { font: 'text', minWidth: 0, letterSpacing: 1 },\n]\n\n/**\n * Props for the {@link Banner} component.\n */\nexport interface BannerProps {\n  /**\n   * Available width (in columns) for the banner to render into. The\n   * banner picks the largest font tier that fits.\n   */\n  readonly width: number\n}\n\n/**\n * Render the ciderpress logo banner with the framework's default brand\n * gradient — currently mulled (deep cider burgundy). Picks a font tier\n * based on `width` so the banner shrinks gracefully as the terminal\n * narrows, instead of wrapping mid-glyph.\n *\n * @param props - Banner sizing\n * @returns React element with the styled ciderpress banner\n */\nexport function Banner(props: BannerProps): React.ReactElement {\n  const colors = resolveBrandGradient(DEFAULT_THEME_NAME)\n  const choice = pickSize(props.width)\n  return (\n    <Gradient colors={[...colors]}>\n      {match(choice)\n        .with({ font: 'text' }, () => <Text bold>{'ciderpress'}</Text>)\n        .with({ font: P.union('block', 'tiny') }, (c) => (\n          <BigText text=\"ciderpress\" font={c.font} letterSpacing={c.letterSpacing} />\n        ))\n        .exhaustive()}\n    </Gradient>\n  )\n}\n\n/**\n * Pick the largest banner size that fits in `width` columns.\n *\n * @private\n * @param width - Available width in columns\n * @returns Size entry — last fallback (`text`) always matches at width 0\n */\nfunction pickSize(width: number): BannerSize {\n  const choice = BANNER_SIZES.find((size) => width >= size.minWidth)\n  return match(choice)\n    .with(P.nullish, () => BANNER_SIZES.at(-1) as BannerSize)\n    .otherwise((c) => c)\n}\n","import { randomUUID } from 'node:crypto'\nimport { mkdirSync, writeFileSync } from 'node:fs'\nimport { tmpdir } from 'node:os'\nimport { join } from 'node:path'\nimport { arch, platform, version as nodeVersion } from 'node:process'\n\nimport { toError } from 'massaman/conversion'\n\n/**\n * Source of the crash — where it was caught.\n */\nexport type CrashSource = 'middleware' | 'uncaughtException' | 'unhandledRejection'\n\n/**\n * Options for reporting a crash.\n */\nexport interface CrashReportOptions {\n  readonly error: unknown\n  readonly source: CrashSource\n  readonly command?: string\n  readonly args?: Record<string, unknown>\n  readonly version: string\n}\n\n/**\n * Result of a crash report attempt.\n *\n * - `ok: true` — log written successfully, `logPath` is the file path\n * - `ok: false` — log write failed, `error` describes why, `logPath` is null\n *\n * `message` is always the original error's message regardless of write outcome.\n */\nexport interface CrashResult {\n  readonly ok: boolean\n  readonly message: string\n  readonly logPath: string | null\n  readonly error: Error | null\n}\n\n/**\n * Write a fatal error message to stderr based on the crash result.\n *\n * @param result - The CrashResult from reportCrash\n */\nexport function writeFatalToStderr(result: CrashResult): void {\n  if (result.ok) {\n    process.stderr.write(`\\n✖ Fatal Error: ${result.message}\\n  Full log: ${result.logPath}\\n\\n`)\n  } else {\n    process.stderr.write(`\\n✖ Fatal Error: ${result.message}\\n\\n`)\n  }\n}\n\n/**\n * Report a fatal crash: build a structured report and write it to disk.\n *\n * @param options - Crash context including the caught error, source, and optional command info\n * @returns A CrashResult indicating whether the log was written and where\n */\nexport function reportCrash(options: CrashReportOptions): CrashResult {\n  const normalized = toError(options.error)\n  const report = buildReport({ error: normalized, options })\n  return writeCrashLog({ report, message: normalized.message })\n}\n\n/**\n * Structured crash report written to disk as JSON.\n *\n * @private\n */\ninterface CrashReport {\n  readonly timestamp: string\n  readonly level: 'fatal'\n  readonly source: CrashSource\n  readonly command: string | null\n  readonly args: Record<string, unknown> | null\n  readonly error: {\n    readonly name: string\n    readonly message: string\n    readonly stack: string | null\n  }\n  readonly env: {\n    readonly node: string\n    readonly platform: string\n    readonly arch: string\n    readonly ciderpress: string\n  }\n}\n\n/**\n * Assemble a CrashReport from the normalized error and options.\n *\n * @private\n * @param params - The error and original crash report options\n * @returns A structured CrashReport object\n */\nfunction buildReport(params: {\n  readonly error: Error\n  readonly options: CrashReportOptions\n}): CrashReport {\n  const { error, options } = params\n  return {\n    timestamp: new Date().toISOString(),\n    level: 'fatal',\n    source: options.source,\n    command: options.command ?? null,\n    args: options.args ?? null,\n    error: {\n      name: error.name,\n      message: error.message,\n      stack: error.stack ?? null,\n    },\n    env: {\n      node: nodeVersion,\n      platform,\n      arch,\n      ciderpress: options.version,\n    },\n  }\n}\n\n/**\n * Write a crash report to a JSON file in the OS temp directory.\n *\n * Creates `<tmpdir>/ciderpress/` if it doesn't exist. Each crash gets a unique\n * filename based on the current timestamp and a random suffix.\n *\n * @private\n * @param params - The report to serialize and the original error message\n * @returns A CrashResult with the write outcome\n */\nfunction writeCrashLog(params: {\n  readonly report: CrashReport\n  readonly message: string\n}): CrashResult {\n  const { report, message } = params\n  try {\n    const dir = join(tmpdir(), 'ciderpress')\n    mkdirSync(dir, { recursive: true, mode: 0o700 })\n\n    const timestamp = report.timestamp.replaceAll(/[:.]/g, '-')\n    const filename = `error-${timestamp}-${randomUUID()}.log`\n    const logPath = join(dir, filename)\n\n    writeFileSync(logPath, JSON.stringify(report, null, 2), { encoding: 'utf8', mode: 0o600 })\n\n    return { ok: true, message, logPath, error: null }\n  } catch (error) {\n    return { ok: false, message, logPath: null, error: toError(error) }\n  }\n}\n","import { loadConfig } from '@ciderpress/config/loader'\nimport { attemptAsync } from 'massaman/control'\nimport { toError } from 'massaman/conversion'\nimport { match, P } from 'massaman/match'\nimport { mapValues } from 'massaman/object'\nimport { useCallback, useEffect, useRef, useState } from 'react'\n\nimport { clean } from '../commands/clean.ts'\nimport { reportCrash } from '../lib/crash-reporter.ts'\nimport type {\n  DevPhase,\n  DevServerActions,\n  DevServerState,\n  LogEntry,\n  WatcherCallbacks,\n  WatcherHandle,\n  WatcherStatus,\n} from '../lib/dev-types.ts'\nimport { createPaths } from '../lib/paths.ts'\nimport { openBrowser, startDevServer } from '../lib/rspress.ts'\nimport { sync } from '../lib/sync/index.ts'\nimport type { SyncResult } from '../lib/sync/index.ts'\nimport { createWatcher } from '../lib/watcher.ts'\n\n/**\n * Props accepted by the useDevServer hook.\n */\nexport interface UseDevServerProps {\n  readonly quiet?: boolean\n  readonly clean?: boolean\n  readonly port?: number\n  readonly host?: string\n  readonly url?: string\n  readonly theme?: string\n  readonly colorMode?: 'dark' | 'light'\n  readonly vscode?: boolean\n}\n\n/**\n * Result returned by the useDevServer hook.\n */\nexport interface UseDevServerResult {\n  readonly state: DevServerState\n  readonly actions: DevServerActions\n}\n\n/**\n * Manages the full dev server lifecycle: config loading, content sync,\n * Rspress dev server, and file watcher.\n *\n * All actions are stable functions — safe to call at any time, noops\n * when the underlying resource isn't ready yet.\n *\n * @param props - Dev server configuration from CLI options\n * @returns Read-only state snapshot and action handles\n */\nexport function useDevServer(props: UseDevServerProps): UseDevServerResult {\n  const [phase, setPhase] = useState<DevPhase>('loading')\n  const [error, setError] = useState<string | null>(null)\n  const [crashLogPath, setCrashLogPath] = useState<string | null>(null)\n  const [status, setStatus] = useState<WatcherStatus>('idle')\n  const [lastSync, setLastSync] = useState<SyncResult | null>(null)\n  const [port, setPort] = useState(0)\n  const [url, setUrl] = useState('')\n\n  const { log, pushLog, clearLog } = useActivityLog()\n\n  const watcher = useRef<WatcherHandle | null>(null)\n  const serverClose = useRef<(() => Promise<void>) | null>(null)\n  const openapiCache = useRef(new Map<string, unknown>())\n  const disposed = useRef(false)\n  const pendingFile = useRef<string | null>(null)\n\n  const resync = useCallback(() => {\n    if (watcher.current) {\n      watcher.current.resync()\n    }\n  }, [])\n\n  const close = useCallback(async () => {\n    // oxlint-disable-next-line functional/immutable-data -- mark disposed to cancel in-flight init\n    disposed.current = true\n    if (watcher.current) {\n      watcher.current.close()\n    }\n    const closeFn = serverClose.current\n    if (closeFn) {\n      await attemptAsync(closeFn)\n    }\n  }, [])\n\n  useEffect(() => {\n    const set = guardSetters(disposed, {\n      phase: setPhase,\n      error: setError,\n      crashLogPath: setCrashLogPath,\n      status: setStatus,\n      lastSync: setLastSync,\n      port: setPort,\n      url: setUrl,\n      pushLog,\n    })\n\n    async function init() {\n      const paths = createPaths(process.cwd())\n\n      if (props.clean) {\n        await clean(paths)\n      }\n\n      const [configErr, config] = await loadConfig(paths.repoRoot)\n      if (configErr) {\n        set.error(configErr.message)\n        set.phase('error')\n        return\n      }\n\n      const syncOutcome = await attemptAsync<SyncResult>(() =>\n        sync(config, { paths, quiet: props.quiet ?? true, openapiCache: openapiCache.current })\n      )\n\n      if (disposed.current) {\n        return\n      }\n      if (!syncOutcome.ok) {\n        set.error(`Sync failed: ${syncOutcome.error.message}`)\n        set.phase('error')\n        return\n      }\n      const syncResult = syncOutcome.value\n      if (syncResult.error) {\n        set.error(syncResult.error)\n        set.phase('error')\n        return\n      }\n\n      set.lastSync(syncResult)\n\n      const serverOutcome = await attemptAsync<Awaited<ReturnType<typeof startDevServer>>>(() =>\n        startDevServer({\n          config,\n          paths,\n          port: props.port,\n          host: props.host,\n          url: props.url,\n          theme: props.theme,\n          colorMode: props.colorMode,\n          vscode: props.vscode,\n        })\n      )\n\n      if (disposed.current) {\n        if (serverOutcome.ok) {\n          await serverOutcome.value.close()\n        }\n        return\n      }\n      if (!serverOutcome.ok) {\n        set.error(`Dev server failed: ${serverOutcome.error.message}`)\n        set.phase('error')\n        return\n      }\n      const server = serverOutcome.value\n\n      // oxlint-disable-next-line functional/immutable-data -- ref assignment for cleanup\n      serverClose.current = server.close\n      set.port(server.port)\n      set.url(server.url)\n      const shouldOpen = match(config.devServer)\n        .with(P.nonNullable, (d) => d.open === true)\n        .otherwise(() => false)\n      if (shouldOpen) {\n        openBrowser(server.url)\n      }\n\n      const callbacks: WatcherCallbacks = {\n        onStatusChange: set.status,\n        onError: set.error,\n        onSyncComplete: (result) => {\n          set.lastSync(result)\n          const file = pendingFile.current\n          if (file) {\n            set.pushLog({\n              timestamp: formatTime(new Date()),\n              action: 'synced',\n              file,\n              elapsed: result.elapsed,\n            })\n          }\n        },\n        onFileChange: (filename) => {\n          // oxlint-disable-next-line functional/immutable-data -- tracks file for log attribution\n          pendingFile.current = filename\n        },\n        onConfigReloaded: () => {\n          set.pushLog({\n            timestamp: formatTime(new Date()),\n            action: 'restarted',\n            file: pendingFile.current ?? 'ciderpress.config.ts',\n            elapsed: 0,\n          })\n        },\n      }\n\n      // oxlint-disable-next-line functional/immutable-data -- ref assignment for teardown\n      watcher.current = createWatcher({\n        initialConfig: config,\n        paths,\n        callbacks,\n        onConfigReload: server.onConfigReload,\n        openapiCache: openapiCache.current,\n      })\n\n      set.phase('ready')\n    }\n\n    // oxlint-disable-next-line promise/prefer-await-to-callbacks unicorn/catch-error-name -- useEffect cannot be async; outer scope already binds `error`\n    init().catch((cause: unknown) => {\n      if (disposed.current) {\n        return\n      }\n      const normalized = toError(cause)\n      const result = reportCrash({\n        error: normalized,\n        source: 'middleware',\n        command: 'dev',\n        version: 'unknown',\n      })\n      set.error(normalized.message)\n      if (result.ok) {\n        set.crashLogPath(result.logPath)\n      }\n      set.phase('error')\n    })\n\n    return () => {\n      // oxlint-disable-next-line functional/immutable-data -- mark disposed on unmount\n      disposed.current = true\n      if (watcher.current) {\n        watcher.current.close()\n      }\n      if (serverClose.current) {\n        // oxlint-disable-next-line no-empty-function -- best-effort cleanup\n        serverClose.current().catch(() => {})\n      }\n    }\n  }, [])\n\n  return {\n    state: { phase, error, crashLogPath, status, lastSync, log, port, url },\n    actions: { resync, clearLog, close },\n  }\n}\n\nconst MAX_LOG_ENTRIES = 50\n\n/**\n * Manages a bounded activity log.\n *\n * @private\n * @returns Log state, push function, and clear action\n */\nfunction useActivityLog(): {\n  readonly log: readonly LogEntry[]\n  readonly pushLog: (entry: LogEntry) => void\n  readonly clearLog: () => void\n} {\n  const [log, setLog] = useState<readonly LogEntry[]>([])\n\n  const pushLog = useCallback((entry: LogEntry) => {\n    setLog((prev) => [entry, ...prev].slice(0, MAX_LOG_ENTRIES))\n  }, [])\n\n  const clearLog = useCallback(() => {\n    setLog([])\n  }, [])\n\n  return { log, pushLog, clearLog }\n}\n\n/**\n * Wrap each setter so it becomes a no-op after disposal.\n *\n * @private\n * @param disposed - Ref that indicates the hook has been torn down\n * @param setters - Raw state setters keyed by name\n * @returns Guarded setters safe to call from async callbacks\n */\n// oxlint-disable-next-line typescript/no-explicit-any -- generic setter signatures can't be narrowed without any\nfunction guardSetters<T extends Record<string, (...args: readonly any[]) => void>>(\n  disposed: React.RefObject<boolean>,\n  setters: T\n): T {\n  // oxlint-disable-next-line typescript/no-explicit-any -- preserves original setter signature\n  return mapValues(setters, (setter) => (...args: readonly any[]) => {\n    if (!disposed.current) {\n      setter(...args)\n    }\n  }) as T\n}\n\n/**\n * Format a Date to HH:MM:SS string.\n *\n * @private\n * @param date - Date to format\n * @returns Time string in HH:MM:SS format\n */\nfunction formatTime(date: Date): string {\n  return [\n    String(date.getHours()).padStart(2, '0'),\n    String(date.getMinutes()).padStart(2, '0'),\n    String(date.getSeconds()).padStart(2, '0'),\n  ].join(':')\n}\n","import { execSync } from 'node:child_process'\nimport { platform } from 'node:os'\n\nimport {\n  Alert,\n  Box,\n  Spacer,\n  Spinner,\n  Text,\n  useApp,\n  useFullScreen,\n  useHotkey,\n  useInput,\n} from '@kidd-cli/core/ui'\nimport { match } from 'massaman/match'\nimport { useCallback, useEffect, useRef, useState } from 'react'\n\nimport { Banner } from '../components/banner.tsx'\nimport { useDevServer } from '../hooks/use-dev-server.ts'\nimport type { LogEntry } from '../lib/dev-types.ts'\nimport { openBrowser } from '../lib/rspress.ts'\n\nexport type { LogEntry } from '../lib/dev-types.ts'\n\nconst isTTY = Boolean(process.stdin.isTTY)\n\n/**\n * Maximum width (in columns) of the dev TUI. Sized to fit the\n * `ciderpress` banner rendered by `<Banner />` with `letterSpacing: 2`\n * on the \"block\" tier — ~100 cols of glyphs + a few cols of breathing\n * room. On wider terminals the layout stays at this width for a\n * compact feel; on narrower terminals everything (banner included)\n * shrinks tier-by-tier to fit.\n */\nconst MAX_TUI_WIDTH = 110\n\n/**\n * Props passed to the DevScreen component by the screen() runtime.\n * These correspond to the parsed CLI options.\n */\ninterface DevScreenProps {\n  readonly quiet?: boolean\n  readonly clean?: boolean\n  readonly port?: number\n  readonly host?: string\n  readonly url?: string\n  readonly theme?: string\n  readonly colorMode?: 'dark' | 'light'\n  readonly vscode?: boolean\n}\n\n/**\n * React/Ink TUI for the `ciderpress dev` command.\n *\n * Renders a fullscreen status display with styled banner, activity log,\n * sync stats, and hotkey bar. All lifecycle logic is delegated to\n * the `useDevServer` hook.\n *\n * @param props - Parsed CLI options\n * @returns React element tree for the dev TUI\n */\nexport function DevScreen(props: DevScreenProps): React.ReactElement {\n  const { exit } = useApp()\n  const { columns } = useFullScreen()\n  const { state, actions } = useDevServer(props)\n\n  useHotkey({\n    keys: ['r'],\n    action: actions.resync,\n    active: state.phase === 'ready' && isTTY,\n  })\n\n  useHotkey({\n    keys: ['c'],\n    action: actions.clearLog,\n    active: state.phase === 'ready' && isTTY,\n  })\n\n  useHotkey({\n    keys: ['o'],\n    action: () => {\n      openBrowser(state.url)\n    },\n    active: state.phase === 'ready' && isTTY,\n  })\n\n  useInput(\n    (input, key) => {\n      if (input === 'q' || (key.ctrl && input === 'c')) {\n        actions.close().finally(() => {\n          exit()\n          process.exit(0)\n        })\n      }\n    },\n    { isActive: isTTY && state.phase !== 'error' }\n  )\n\n  // Cap the TUI at MAX_TUI_WIDTH columns and pin the outer\n  // <Box width={width}/> so children that use <Spacer /> (e.g. the URL\n  // row pushing \"Ready\" right) align with the separator hairlines\n  // instead of extending past them on wide terminals.\n  // `separatorWidth = width - 2` accounts for the outer padding={1} on\n  // each side. The cap is sized to fit the \"ciderpress\" banner in\n  // ink-big-text's \"block\" font (~88-90 cols), with a small buffer so\n  // the dividers extend a few chars past the banner's right edge.\n  const width = Math.max(Math.min(columns, MAX_TUI_WIDTH), 2)\n  const separatorWidth = Math.max(width - 2, 0)\n\n  const [copied, setCopied] = useState(false)\n  const copiedTimer = useRef<ReturnType<typeof setTimeout> | null>(null)\n\n  const handleCopy = useCallback(() => {\n    if (!state.crashLogPath) {\n      return\n    }\n    if (!copyToClipboard(state.crashLogPath)) {\n      return\n    }\n    setCopied(true)\n    if (copiedTimer.current) {\n      clearTimeout(copiedTimer.current)\n    }\n    // oxlint-disable-next-line functional/immutable-data -- timer ref for auto-clear\n    copiedTimer.current = setTimeout(() => {\n      setCopied(false)\n    }, 2000)\n  }, [state.crashLogPath])\n\n  useEffect(\n    () => () => {\n      if (copiedTimer.current) {\n        clearTimeout(copiedTimer.current)\n      }\n    },\n    []\n  )\n\n  useInput(\n    (input, key) => {\n      if (input === 'q' || (key.ctrl && input === 'c')) {\n        exit()\n        process.exit(1)\n      }\n      if (input === 'c' && !key.ctrl && state.crashLogPath) {\n        handleCopy()\n      }\n    },\n    { isActive: isTTY && state.phase === 'error' }\n  )\n\n  if (state.phase === 'error') {\n    return (\n      <Box flexDirection=\"column\" padding={1} width={width}>\n        <Banner width={separatorWidth} />\n        <Box marginTop={1}>\n          <Alert variant=\"error\" title=\"Fatal Error\" width={width}>\n            {state.error ?? 'Unknown error'}\n          </Alert>\n        </Box>\n        {state.crashLogPath && (\n          <Box marginTop={1} paddingLeft={1} flexDirection=\"column\">\n            <Text dimColor>Full log:</Text>\n            <Text color=\"cyan\">{state.crashLogPath}</Text>\n          </Box>\n        )}\n        {copied && (\n          <Box marginTop={1} paddingLeft={1}>\n            <Text color=\"green\">✓ Copied to clipboard</Text>\n          </Box>\n        )}\n        <Box marginTop={1} paddingLeft={1}>\n          {state.crashLogPath && (\n            <>\n              <HotkeyHint label=\"c\" description=\"copy log path\" />\n              <Text dimColor> · </Text>\n            </>\n          )}\n          <HotkeyHint label=\"q\" description=\"quit\" />\n        </Box>\n      </Box>\n    )\n  }\n\n  if (state.phase === 'loading') {\n    return (\n      <Box flexDirection=\"column\" padding={1} width={width}>\n        <Banner width={separatorWidth} />\n        <Box marginTop={1}>\n          <Spinner label=\"Starting dev server...\" type=\"dots\" />\n        </Box>\n      </Box>\n    )\n  }\n\n  return (\n    <Box flexDirection=\"column\" padding={1} width={width}>\n      {/* Banner + URL */}\n      <Banner width={separatorWidth} />\n      <Box marginTop={1}>\n        <Text color=\"cyan\">{state.url}</Text>\n        <Spacer />\n        {match(state.status)\n          .with('idle', () => <Text color=\"green\">● Ready</Text>)\n          .with('syncing', () => <Spinner label=\"Syncing\" type=\"dots\" />)\n          .with('restarting', () => <Spinner label=\"Restarting\" type=\"dots\" />)\n          .with('error', () => <Text color=\"red\">● Error: {state.error}</Text>)\n          .exhaustive()}\n      </Box>\n\n      {/* Separator */}\n      <Box marginTop={1}>\n        <Text dimColor>{'─'.repeat(separatorWidth)}</Text>\n      </Box>\n\n      {/* Activity log */}\n      <Box flexDirection=\"column\" marginTop={0}>\n        {state.log.length === 0 && (\n          <Box paddingLeft={1}>\n            <Text dimColor>Waiting for changes...</Text>\n          </Box>\n        )}\n        {state.log.slice(0, 12).map((entry, i) => (\n          <LogLine key={`${entry.timestamp}-${entry.file}-${i}`} entry={entry} first={i === 0} />\n        ))}\n      </Box>\n\n      {/* Separator */}\n      <Box marginTop={1}>\n        <Text dimColor>{'─'.repeat(separatorWidth)}</Text>\n      </Box>\n\n      {/* Stats bar */}\n      {state.lastSync !== null && (\n        <Box paddingLeft={1}>\n          <Text dimColor>\n            <Text color=\"green\">{state.lastSync.pagesWritten}</Text> written\n            {' · '}\n            <Text color=\"yellow\">{state.lastSync.pagesSkipped}</Text> skipped\n            {' · '}\n            <Text color=\"red\">{state.lastSync.pagesRemoved}</Text> removed\n            {' · '}\n            {Math.round(state.lastSync.elapsed)}ms\n          </Text>\n        </Box>\n      )}\n\n      {/* Hotkey bar */}\n      {isTTY && (\n        <Box marginTop={1} paddingLeft={1}>\n          <HotkeyHint label=\"r\" description=\"resync\" />\n          <Text dimColor> · </Text>\n          <HotkeyHint label=\"o\" description=\"open\" />\n          <Text dimColor> · </Text>\n          <HotkeyHint label=\"c\" description=\"clear\" />\n          <Text dimColor> · </Text>\n          <HotkeyHint label=\"q\" description=\"quit\" />\n        </Box>\n      )}\n    </Box>\n  )\n}\n\n/**\n * Render a single line in the activity log.\n *\n * @private\n * @param props - Log entry data and whether this is the most recent entry\n * @returns React element for one log line\n */\nfunction LogLine(props: { readonly entry: LogEntry; readonly first: boolean }): React.ReactElement {\n  const { entry, first } = props\n  const actionColor = match(entry.action)\n    .with('synced', () => 'green' as const)\n    .with('removed', () => 'red' as const)\n    .with('restarted', () => 'yellow' as const)\n    .with('error', () => 'red' as const)\n    .exhaustive()\n  const resolvedColor = match(first)\n    .with(true, () => actionColor)\n    // oxlint-disable-next-line unicorn/no-useless-undefined -- match requires explicit return\n    .otherwise(() => undefined)\n\n  return (\n    <Box paddingLeft={1}>\n      <Text dimColor={!first}>{entry.timestamp}</Text>\n      <Text> </Text>\n      <Text color={resolvedColor} dimColor={!first}>\n        {entry.action.padEnd(10)}\n      </Text>\n      <Text dimColor={!first}>{entry.file}</Text>\n      {entry.elapsed > 0 && <Text dimColor> {Math.round(entry.elapsed)}ms</Text>}\n    </Box>\n  )\n}\n\n/**\n * Render a single hotkey hint (e.g. \"r resync\").\n *\n * @private\n * @param props - Label and description for the hotkey\n * @returns React element with styled hotkey hint\n */\nfunction HotkeyHint(props: {\n  readonly label: string\n  readonly description: string\n}): React.ReactElement {\n  return (\n    <Text>\n      <Text bold color=\"cyan\">\n        {props.label}\n      </Text>\n      <Text dimColor> {props.description}</Text>\n    </Text>\n  )\n}\n\n/**\n * Copy text to the system clipboard.\n *\n * @private\n * @param text - The text to copy\n * @returns Whether the copy succeeded\n */\nfunction copyToClipboard(text: string): boolean {\n  const cmd = match(platform())\n    .with('darwin', () => 'pbcopy')\n    .with('win32', () => 'clip')\n    .otherwise(() => 'xclip -selection clipboard')\n\n  try {\n    execSync(cmd, { input: text, stdio: ['pipe', 'ignore', 'ignore'] })\n    return true\n  } catch {\n    return false\n  }\n}\n","import { command } from '@kidd-cli/core'\nimport { screen } from '@kidd-cli/core/ui'\nimport { z } from 'zod'\n\nimport { runDevHeadless } from '../lib/dev-headless.ts'\nimport { DevScreen } from '../screens/dev-screen.tsx'\n\nconst devOptions = z.object({\n  quiet: z.boolean().optional().default(false),\n  clean: z.boolean().optional().default(false),\n  port: z.number().optional(),\n  host: z.string().optional(),\n  url: z.string().optional(),\n  theme: z.string().optional(),\n  colorMode: z.enum(['dark', 'light']).optional(),\n  vscode: z.boolean().optional().default(false),\n  headless: z.boolean().optional().default(false),\n})\n\n/**\n * Detected at module load by scanning `process.argv`. When `--headless`\n * is present the command is registered as a plain handler (no Ink/TUI);\n * otherwise the full DevScreen fullscreen TUI is rendered.\n *\n * Argv inspection is the cleanest way to swap registration shape under\n * kidd-cli's auto-discovery model — by the time the command file is\n * imported, `process.argv` already reflects the user's invocation.\n */\nconst isHeadless = process.argv.includes('--headless')\n\n/**\n * Registers the `dev` CLI command to sync, watch, and start a live dev server.\n *\n * Default invocation renders an Ink TUI (`DevScreen`). Pass `--headless`\n * to run without the TUI — useful for CI, nodemon, Docker, or any\n * non-interactive parent process where raw-mode stdin isn't available.\n */\nexport default defineDevCommand()\n\n/**\n * Build the command registration — headless path uses a plain handler,\n * default path uses the Ink TUI screen.\n *\n * @private\n * @returns Registration accepted by kidd-cli's command auto-discovery\n */\nfunction defineDevCommand() {\n  if (isHeadless) {\n    return command({\n      name: 'dev',\n      description: 'Run sync + watcher and start Rspress dev server',\n      options: devOptions,\n      handler: async (ctx) => {\n        await runDevHeadless(ctx.args)\n      },\n    })\n  }\n  return screen({\n    name: 'dev',\n    description: 'Run sync + watcher and start Rspress dev server',\n    exit: 'manual',\n    fullscreen: true,\n    options: devOptions,\n    render: DevScreen,\n  })\n}\n","import type { Log } from '@kidd-cli/core'\n\n/**\n * Shape of a single config validation issue, matching the optional `errors`\n * array on `ConfigError` from `@ciderpress/config`.\n */\nexport interface ConfigValidationIssue {\n  readonly path: readonly (string | number)[]\n  readonly message: string\n}\n\n/**\n * Log a list of config validation errors via the kidd-cli logger.\n *\n * Renders each issue as `  <dot-joined path>: <message>` using `log.error`.\n * Centralizes the side-effect logging pattern previously implemented inline\n * across multiple commands (`serve`, `dump`, `diff`, `build`).\n *\n * @param log - kidd-cli `ctx.log` instance for emitting messages\n * @param errors - Validation issues to render, one per line\n */\nexport function logConfigErrors(log: Log, errors: readonly ConfigValidationIssue[]): void {\n  // oxlint-disable-next-line unicorn/no-array-for-each -- side-effect log\n  errors.forEach((err) => {\n    const path = err.path.join('.')\n    log.error(`  ${path}: ${err.message}`)\n  })\n}\n","import { execFileSync } from 'node:child_process'\n\nimport { hasGlobChars, normalizeInclude } from '@ciderpress/config'\nimport type { Page, CiderpressConfig, Result } from '@ciderpress/config'\nimport { loadConfig } from '@ciderpress/config/loader'\nimport { command } from '@kidd-cli/core'\nimport { uniq } from 'massaman/array'\nimport { match } from 'massaman/match'\nimport { z } from 'zod'\n\nimport { logConfigErrors } from '../lib/log-config-errors.ts'\nimport { createPaths } from '../lib/paths.ts'\n\nconst CONFIG_GLOBS = [\n  'ciderpress.config.ts',\n  'ciderpress.config.mts',\n  'ciderpress.config.cts',\n  'ciderpress.config.js',\n  'ciderpress.config.mjs',\n  'ciderpress.config.cjs',\n  'ciderpress.config.json',\n] as const\n\n/**\n * Registers the `diff` CLI command to show changed files in watched directories.\n *\n * By default uses `git status` to detect uncommitted changes and outputs a\n * space-separated file list to stdout (suitable for lefthook, scripts, and piping).\n *\n * Use `--ref <ref>` to compare between commits instead of checking working tree\n * status. This uses `git diff --name-only <ref> HEAD` under the hood and exits\n * with code 1 when changes are detected — matching the Vercel `ignoreCommand`\n * convention (exit 1 = proceed with build, exit 0 = skip).\n *\n * @example\n * ```bash\n * # Detect uncommitted changes (default, uses git status)\n * ciderpress diff\n *\n * # Compare against parent commit (CI / Vercel ignoreCommand)\n * ciderpress diff --ref HEAD^\n *\n * # Compare against main branch (PR context)\n * ciderpress diff --ref main\n *\n * # Human-readable output\n * ciderpress diff --ref main --pretty\n * ```\n */\nexport default command({\n  name: 'diff',\n  description: 'Show changed files in configured source directories',\n  options: z.object({\n    pretty: z.boolean().optional().default(false),\n    ref: z\n      .string()\n      .optional()\n      .describe(\n        'Git ref to compare against HEAD (e.g. HEAD^, main). Exits 1 when changes are detected.'\n      ),\n  }),\n  handler: async (ctx) => {\n    const { pretty, ref } = ctx.args\n    const paths = createPaths(process.cwd())\n\n    const [configErr, config] = await loadConfig(paths.repoRoot)\n    if (configErr) {\n      if (pretty) {\n        ctx.log.intro('ciderpress diff')\n        ctx.log.error(configErr.message)\n        if (configErr.errors && configErr.errors.length > 0) {\n          logConfigErrors(ctx.log, configErr.errors)\n        }\n      }\n      process.exit(1)\n    }\n\n    const dirs = collectWatchPaths(config)\n\n    if (dirs.length === 0) {\n      if (pretty) {\n        ctx.log.intro('ciderpress diff')\n        ctx.log.warn('No source directories found in config')\n        ctx.log.outro('Done')\n      }\n      return\n    }\n\n    const [gitErr, changed] = match(ref)\n      .when(\n        (r): r is string => r !== undefined,\n        (r) => gitDiffFiles({ repoRoot: paths.repoRoot, dirs, ref: r })\n      )\n      .otherwise(() => gitChangedFiles({ repoRoot: paths.repoRoot, dirs }))\n\n    if (gitErr) {\n      if (pretty) {\n        ctx.log.intro('ciderpress diff')\n        ctx.log.error(`Git failed: ${gitErr.message}`)\n        ctx.log.outro('Done')\n      }\n      process.exit(1)\n    }\n\n    if (changed.length === 0) {\n      if (pretty) {\n        ctx.log.intro('ciderpress diff')\n        ctx.log.success('No changes detected')\n        ctx.log.outro('Done')\n      }\n      return\n    }\n\n    if (pretty) {\n      ctx.log.intro('ciderpress diff')\n      ctx.log.step(`Watching ${dirs.length} path(s)`)\n      ctx.log.note(changed.join('\\n'), `${changed.length} changed file(s)`)\n      ctx.log.outro('Done')\n    } else {\n      process.stdout.write(`${changed.join(' ')}\\n`)\n    }\n\n    // When --ref is used (e.g. as a Vercel ignoreCommand), exit 1 signals\n    // \"changes detected, proceed with build\". Exit 0 (no changes) means skip.\n    if (ref) {\n      process.exit(1)\n    }\n  },\n})\n\n/**\n * Collect unique directory paths from all page `include` fields in the config.\n *\n * @private\n * @param config - Resolved ciderpress config\n * @returns Deduplicated array of directory paths to watch\n */\nfunction collectWatchPaths(config: CiderpressConfig): readonly string[] {\n  const dirs = flattenIncludePaths(config.pages).map(toDirectory)\n  const roots = dirs.map(toTopLevelRoot).filter((r) => r.length > 0)\n  return uniq([...dirs, ...roots, ...CONFIG_GLOBS])\n}\n\n/**\n * Recursively extract all `include` values from a page tree.\n *\n * @private\n * @param pages - Page tree to traverse\n * @returns Flat array of all `include` path strings\n */\nfunction flattenIncludePaths(pages: readonly Page[]): readonly string[] {\n  return pages.flatMap(flattenSection)\n}\n\n/**\n * Extract `include` paths from a single page, including nested children.\n *\n * @private\n * @param section - Page to extract include paths from\n * @returns Array of `include` path strings found in this page and its children\n */\nfunction flattenSection(section: Page): readonly string[] {\n  const includes = normalizeInclude(section.include)\n  if (includes.length > 0 && section.pages) {\n    return [...includes, ...flattenIncludePaths(section.pages)]\n  }\n  if (includes.length > 0) {\n    return includes\n  }\n  if (section.pages) {\n    return flattenIncludePaths(section.pages)\n  }\n  return []\n}\n\n/**\n * Extract the directory portion from a path that may contain glob characters.\n *\n * @private\n * @param from - A path or glob pattern (e.g. `docs/guides/*.md`)\n * @returns The directory portion (e.g. `docs/guides`)\n */\nfunction toDirectory(from: string): string {\n  if (hasGlobChars(from)) {\n    const normalized = from.replaceAll('\\\\', '/')\n    const segments = normalized.split('/')\n    const dirSegments = segments.filter((s) => !hasGlobChars(s))\n    return dirSegments.join('/') || '.'\n  }\n  return from\n}\n\n/**\n * Extract the top-level root directory from a path (the first segment).\n *\n * For example, `docs/getting-started` → `docs/`, `packages/cli` → `packages/`.\n * This ensures that sibling directories (e.g. asset folders) within the same\n * root are also watched for changes.\n *\n * @private\n * @param dir - A directory path\n * @returns The top-level root directory with trailing slash, or empty string for root paths\n */\nfunction toTopLevelRoot(dir: string): string {\n  const idx = dir.indexOf('/')\n  if (idx === -1) {\n    return ''\n  }\n  return dir.slice(0, idx + 1)\n}\n\n/**\n * Separator used by `git status --short` for renamed/copied entries.\n *\n * @private\n */\nconst RENAME_SEPARATOR = ' -> '\n\n/**\n * Run `git status --short` scoped to the given directories and return changed file paths.\n *\n * @private\n * @param params - Parameters for the git status query\n * @param params.repoRoot - Absolute path to the repo root\n * @param params.dirs - Directories to scope the git status to\n * @returns Result tuple with changed file paths (repo-relative) or an error\n */\nfunction gitChangedFiles(params: {\n  readonly repoRoot: string\n  readonly dirs: readonly string[]\n}): Result<readonly string[]> {\n  const [err, output] = execSilent({\n    file: 'git',\n    args: ['status', '--short', '--', ...params.dirs],\n    cwd: params.repoRoot,\n  })\n  if (err) {\n    return [err, null]\n  }\n  if (!output) {\n    return [null, []]\n  }\n  const files = output\n    .split('\\n')\n    .filter((line) => line.length > 0)\n    .map(parseStatusLine)\n    .filter((p) => p.length > 0)\n  return [null, files]\n}\n\n/**\n * Extract the file path from a single `git status --short` output line.\n *\n * Format: `XY <path>` or `XY <old> -> <new>` for renames/copies.\n * The status prefix is always 3 characters (2 status chars + 1 space).\n *\n * @private\n * @param line - A single line from git status --short output\n * @returns The extracted file path (new path for renames)\n */\nfunction parseStatusLine(line: string): string {\n  const filePart = line.slice(3)\n  const renameIdx = filePart.indexOf(RENAME_SEPARATOR)\n  if (renameIdx !== -1) {\n    return stripQuotes(filePart.slice(renameIdx + RENAME_SEPARATOR.length))\n  }\n  return stripQuotes(filePart)\n}\n\n/**\n * Remove surrounding double quotes from a git path if present.\n *\n * Git quotes paths containing spaces or non-ASCII characters\n * (e.g. `\"docs/my file.md\"`). This strips those quotes.\n *\n * @private\n * @param value - A file path that may be surrounded by double quotes\n * @returns The unquoted, trimmed path\n */\nfunction stripQuotes(value: string): string {\n  const trimmed = value.trim()\n  if (trimmed.startsWith('\"') && trimmed.endsWith('\"')) {\n    return trimmed.slice(1, -1)\n  }\n  return trimmed\n}\n\n/**\n * Run `git diff --name-only <ref> HEAD` scoped to the given directories and return changed file paths.\n *\n * Use this instead of `gitChangedFiles` when comparing between commits (e.g. for\n * CI ignore commands like Vercel's `ignoreCommand`), since `git status` only\n * detects uncommitted changes and always returns empty on clean checkouts.\n *\n * @private\n * @param params - Parameters for the git diff query\n * @param params.repoRoot - Absolute path to the repo root\n * @param params.dirs - Directories to scope the git diff to\n * @param params.ref - Git ref to compare against HEAD (e.g. `HEAD^`, `main`)\n * @returns Result tuple with changed file paths (repo-relative) or an error\n */\nfunction gitDiffFiles(params: {\n  readonly repoRoot: string\n  readonly dirs: readonly string[]\n  readonly ref: string\n}): Result<readonly string[]> {\n  const [err, output] = execSilent({\n    file: 'git',\n    args: ['diff', '--name-only', params.ref, 'HEAD', '--', ...params.dirs],\n    cwd: params.repoRoot,\n  })\n  if (err) {\n    return [err, null]\n  }\n  if (!output) {\n    return [null, []]\n  }\n  const files = output.split('\\n').filter((line) => line.length > 0)\n  return [null, files]\n}\n\n/**\n * Run a command silently with an explicit argument array, returning a Result\n * tuple with trimmed stdout on success or an Error on failure.\n *\n * @private\n * @param params - Parameters for the command execution\n * @param params.file - Executable to run\n * @param params.args - Arguments to pass to the executable\n * @param params.cwd - Working directory for the command\n * @returns Result tuple with trimmed stdout or an error\n */\nfunction execSilent(params: {\n  readonly file: string\n  readonly args: readonly string[]\n  readonly cwd: string\n}): Result<string> {\n  try {\n    const output = execFileSync(params.file, [...params.args], {\n      cwd: params.cwd,\n      stdio: 'pipe',\n      encoding: 'utf8',\n    }).trimEnd()\n    return [null, output]\n  } catch (error) {\n    // See https://github.com/thebytefarm/ciderpress/issues/73 — replace with shared toError util\n    if (error instanceof Error) {\n      return [error, null]\n    }\n    return [new Error(String(error)), null]\n  }\n}\n","/**\n * Parsing helpers for `draft` template variables: the `--var id=value`\n * arguments and the always-available built-in variables. Kept pure and free of\n * prompts/IO so they can be unit-tested in isolation.\n */\n\n/**\n * Reserved built-in variable ids, always resolved by `draft` regardless of a\n * template's declared `vars`. A template may still list one of these in `vars`\n * (e.g. for documentation), but the built-in value wins.\n */\nexport const RESERVED_VARS = ['title', 'slug', 'date', 'filename'] as const\n\n/**\n * The outcome of parsing `--var` arguments: the resolved key/value map plus any\n * malformed entries (missing `=` or empty id) for the caller to warn about.\n */\nexport interface ParsedVarArgs {\n  readonly values: Readonly<Record<string, string>>\n  readonly invalid: readonly string[]\n}\n\n/**\n * Parse repeated `--var id=value` arguments into a key/value map.\n *\n * Splits on the first `=` so values may themselves contain `=`. Entries with no\n * `=` or an empty id are collected into `invalid` rather than silently dropped.\n *\n * @example\n * ```ts\n * parseVarArgs(['decision=Use Postgres', 'context=']).values\n * // { decision: 'Use Postgres', context: '' }\n * ```\n *\n * @param args - The raw `--var` argument strings, or undefined when none passed\n * @returns The parsed values and any malformed entries\n */\nexport function parseVarArgs(args: readonly string[] | undefined): ParsedVarArgs {\n  if (args === undefined) {\n    return { values: {}, invalid: [] }\n  }\n  const parsed = args.map(parseVarArg)\n  const values = Object.fromEntries(\n    parsed.flatMap((entry) => {\n      if (entry.ok) {\n        return [[entry.id, entry.value] as const]\n      }\n      return []\n    })\n  )\n  const invalid = parsed.flatMap((entry) => {\n    if (entry.ok) {\n      return []\n    }\n    return [entry.raw]\n  })\n  return { values, invalid }\n}\n\n/**\n * The always-available built-in variables resolved for every draft.\n */\nexport interface BuiltInVars {\n  readonly title: string\n  readonly slug: string\n  readonly date: string\n  readonly filename: string\n}\n\n/**\n * The outcome of parsing a single `--var` argument.\n */\ntype VarArgOutcome =\n  | { readonly ok: true; readonly id: string; readonly value: string }\n  | { readonly ok: false; readonly raw: string }\n\n/**\n * Parse a single `id=value` argument, splitting on the first `=`.\n *\n * @private\n * @param raw - The raw argument string\n * @returns An `ok` outcome with id/value, or a failure carrying the raw string\n */\nfunction parseVarArg(raw: string): VarArgOutcome {\n  const eq = raw.indexOf('=')\n  if (eq <= 0) {\n    return { ok: false, raw }\n  }\n  const id = raw.slice(0, eq).trim()\n  if (id.length === 0) {\n    return { ok: false, raw }\n  }\n  return { ok: true, id, value: raw.slice(eq + 1) }\n}\n\n/**\n * Build the always-available built-in variables for a draft.\n *\n * @example\n * ```ts\n * buildBuiltInVars({\n *   title: 'Auth',\n *   slug: 'auth',\n *   filename: 'auth.md',\n *   now: new Date('2026-07-08T00:00:00Z'),\n * })\n * // { title: 'Auth', slug: 'auth', filename: 'auth.md', date: '2026-07-08' }\n * ```\n *\n * @param input - The resolved title, slug, output filename, and current date\n * @returns The built-in variable map (title, slug, filename, ISO date)\n */\nexport function buildBuiltInVars(input: {\n  readonly title: string\n  readonly slug: string\n  readonly filename: string\n  readonly now: Date\n}): BuiltInVars {\n  return {\n    title: input.title,\n    slug: input.slug,\n    filename: input.filename,\n    date: input.now.toISOString().slice(0, 10),\n  }\n}\n","import fs from 'node:fs/promises'\nimport path from 'node:path'\n\nimport { loadConfig } from '@ciderpress/config/loader'\nimport { findMarkers, render, toSlug } from '@ciderpress/templates'\nimport type { TemplateVar, TemplateVariables } from '@ciderpress/templates'\nimport type { Prompts } from '@kidd-cli/core'\nimport { command } from '@kidd-cli/core'\nimport { match, P } from 'massaman/match'\nimport { z } from 'zod'\n\nimport { createPaths } from '../lib/paths.ts'\nimport { configTemplates, resolveTemplates, toTemplateSelectOptions } from '../lib/templates.ts'\nimport { buildBuiltInVars, parseVarArgs } from '../lib/vars.ts'\n\n/**\n * Scaffold a new documentation file from a template.\n *\n * With a known `type` arg, scaffolds straight away. With no `type`, walks the\n * user through an interactive picker — a single grouped list of built-in and\n * config templates — then prompts for a title. Templates declared via the\n * `templates` config field are merged with the built-ins (user templates\n * override built-ins by type); when no config or `templates` field is present,\n * only built-ins are offered.\n *\n * Built-in variables (`title`, `slug`, `date`, `filename`) are always\n * substituted. A template's declared `vars` are filled from `--var id=value`\n * arguments, then — on an interactive terminal — prompted for; any left blank\n * (or every declared var when running non-interactively) stay as raw `{{ id }}`\n * markers for a human or agent to fill in later, and are reported as a\n * checklist. Undeclared `{{ }}` markers always pass through untouched.\n */\nexport default command({\n  name: 'draft',\n  description: 'Scaffold a new documentation file from a template',\n  options: z.object({\n    type: z.string().optional(),\n    title: z.string().optional(),\n    out: z.string().optional().default('.'),\n    var: z\n      .array(z.string())\n      .optional()\n      .describe('Fill a template variable, repeatable: --var id=value'),\n  }),\n  handler: async (ctx) => {\n    ctx.log.intro('ciderpress draft')\n\n    const paths = createPaths(process.cwd())\n    const [, config] = await loadConfig(paths.repoRoot)\n    const { registry, resolved } = await resolveTemplates({\n      templates: configTemplates(config),\n      paths,\n    })\n\n    const typeArg = ctx.args.type\n    const hasValidType = match(typeArg)\n      .with(P.string.minLength(1), (t) => registry.has(t))\n      .otherwise(() => false)\n\n    const selectedType: string = await match(hasValidType)\n      .with(true, () => Promise.resolve(typeArg as string))\n      .otherwise(() =>\n        ctx.prompts.select<string>({\n          message: 'Select a doc type',\n          options: [...toTemplateSelectOptions(resolved)],\n        })\n      )\n\n    const template = registry.get(selectedType)\n    if (!template) {\n      ctx.log.error(`Unknown template type: ${selectedType}`)\n      return\n    }\n\n    const title = await match(ctx.args.title)\n      .with(P.string.minLength(1), (t) => Promise.resolve(t))\n      .otherwise(() =>\n        ctx.prompts.text({\n          message: 'Document title',\n          placeholder: 'e.g. Authentication',\n          validate: (value): string | undefined => {\n            if (!value || value.trim().length === 0) {\n              return 'Title is required'\n            }\n          },\n        })\n      )\n\n    const slug = toSlug(title)\n    if (slug.length === 0) {\n      ctx.log.error('Title must include at least one letter or number')\n      return\n    }\n\n    const extension = template.extension ?? '.md'\n    const filename = `${slug}${extension}`\n\n    const { values: argVars, invalid } = parseVarArgs(ctx.args.var)\n    if (invalid.length > 0) {\n      ctx.log.warn(`Ignoring malformed --var (expected id=value): ${invalid.join(', ')}`)\n    }\n\n    const filledVars = await resolveDeclaredVars({\n      vars: template.vars,\n      provided: argVars,\n      prompts: ctx.prompts,\n      interactive: process.stdout.isTTY === true,\n    })\n\n    // Built-in variables are resolved last so they always win over an\n    // arg/prompt collision (e.g. a stray `--var title=…`).\n    const builtIns = buildBuiltInVars({ title, slug, filename, now: new Date() })\n    const variables: TemplateVariables = { ...argVars, ...filledVars, ...builtIns }\n\n    const content = render(template, variables)\n    const outDir = path.resolve(process.cwd(), ctx.args.out)\n    const filePath = path.join(outDir, filename)\n\n    const exists = await fs\n      .access(filePath)\n      .then(() => true)\n      .catch(() => false)\n\n    if (exists) {\n      ctx.log.error(`File already exists: ${path.relative(process.cwd(), filePath)}`)\n      return\n    }\n\n    await fs.mkdir(outDir, { recursive: true })\n    await fs.writeFile(filePath, content, 'utf8')\n\n    ctx.log.success(`Created ${path.relative(process.cwd(), filePath)}`)\n\n    const remaining = findMarkers(content)\n    if (remaining.length > 0) {\n      ctx.log.warn(`${remaining.length} marker(s) still to fill:`)\n      ctx.log.message(remaining.map((marker) => `  ${marker}`).join('\\n'))\n    }\n\n    ctx.log.outro('Done')\n  },\n})\n\n/**\n * Resolve a template's declared `vars` into a value map, filling each from the\n * provided `--var` args, then — when interactive — prompting for the rest.\n *\n * Values are collected sequentially so prompts appear one at a time. A var\n * already provided via args is not prompted; a var left blank (or every var\n * when non-interactive) is omitted so {@link render} leaves its raw marker.\n *\n * @private\n * @param input - Declared vars, provided arg values, the prompt API, and\n *   whether the session is interactive\n * @returns A map of resolved var id to value (omitting skipped vars)\n */\nfunction resolveDeclaredVars(input: {\n  readonly vars: readonly TemplateVar[] | undefined\n  readonly provided: Readonly<Record<string, string>>\n  readonly prompts: Prompts\n  readonly interactive: boolean\n}): Promise<Readonly<Record<string, string>>> {\n  const { vars, provided, prompts, interactive } = input\n  if (vars === undefined || vars.length === 0) {\n    return Promise.resolve({})\n  }\n  return vars.reduce<Promise<Readonly<Record<string, string>>>>(async (accPromise, variable) => {\n    const acc = await accPromise\n    if (Object.hasOwn(provided, variable.id) || !interactive) {\n      return acc\n    }\n    const answer = await prompts.text({\n      message: promptMessage(variable),\n      placeholder: 'Leave blank to fill in later',\n    })\n    if (answer.trim().length === 0) {\n      return acc\n    }\n    return { ...acc, [variable.id]: answer }\n  }, Promise.resolve({}))\n}\n\n/**\n * Build the prompt message for a declared var from its title/description,\n * falling back to the id.\n *\n * @private\n * @param variable - The declared template var\n * @returns The prompt message string\n */\nfunction promptMessage(variable: TemplateVar): string {\n  const label = match(variable.title)\n    .with(P.string.minLength(1), (title) => title)\n    .otherwise(() => variable.id)\n  return match(variable.description)\n    .with(P.string.minLength(1), (description) => `${label} — ${description}`)\n    .otherwise(() => label)\n}\n","import { loadConfig } from '@ciderpress/config/loader'\nimport { command } from '@kidd-cli/core'\n\nimport { logConfigErrors } from '../lib/log-config-errors.ts'\nimport { createPaths } from '../lib/paths.ts'\nimport { loadManifest } from '../lib/sync/manifest.ts'\nimport { resolveEntries } from '../lib/sync/resolve/index.ts'\nimport type { ResolvedEntry, SyncContext } from '../lib/sync/types.ts'\n\n/**\n * Slim shape for JSON output — drops page data and keeps only the navigation tree.\n */\ninterface DumpEntry {\n  readonly text: string\n  readonly link?: string\n  readonly collapsible?: boolean\n  readonly hidden?: boolean\n  readonly standalone?: boolean\n  readonly items?: DumpEntry[]\n}\n\n/**\n * Registers the `dump` CLI command to resolve and print the full entry tree as JSON.\n *\n * @returns A CLI command that outputs the resolved entry tree as formatted JSON\n */\nexport default command({\n  name: 'dump',\n  description: 'Resolve and print the full entry tree as JSON',\n  handler: async (ctx) => {\n    const paths = createPaths(process.cwd())\n    const [configErr, config] = await loadConfig(paths.repoRoot)\n    if (configErr) {\n      ctx.log.error(configErr.message)\n      if (configErr.errors && configErr.errors.length > 0) {\n        logConfigErrors(ctx.log, configErr.errors)\n      }\n      process.exit(1)\n    }\n    const previousManifest = await loadManifest(paths.contentDir)\n\n    const syncCtx: SyncContext = {\n      repoRoot: paths.repoRoot,\n      outDir: paths.contentDir,\n      config,\n      previousManifest,\n      manifest: { files: {}, timestamp: Date.now() },\n      quiet: true,\n    }\n\n    const [resolveErr, resolved] = await resolveEntries(config.pages, syncCtx)\n    if (resolveErr) {\n      ctx.log.error(resolveErr.message)\n      process.exit(1)\n    }\n    const tree = toTree(resolved)\n    process.stdout.write(`${JSON.stringify(tree, null, 2)}\\n`)\n  },\n})\n\n/**\n * Conditionally include a `link` property in the spread object.\n *\n * @private\n * @param link - Optional link string\n * @returns Object with `link` if defined, empty object otherwise\n */\nfunction maybeLink(link: string | undefined): { readonly link: string } | Record<string, never> {\n  if (link) {\n    return { link }\n  }\n  return {}\n}\n\n/**\n * Conditionally include a `collapsible` property in the spread object.\n *\n * @private\n * @param collapsible - Optional collapsible flag\n * @returns Object with `collapsible` if truthy, empty object otherwise\n */\nfunction maybeCollapsible(\n  collapsible: boolean | undefined\n): { readonly collapsible: boolean } | Record<string, never> {\n  if (collapsible) {\n    return { collapsible }\n  }\n  return {}\n}\n\n/**\n * Conditionally include a `hidden` property in the spread object.\n *\n * @private\n * @param hidden - Optional hidden flag\n * @returns Object with `hidden` if truthy, empty object otherwise\n */\nfunction maybeHidden(\n  hidden: boolean | undefined\n): { readonly hidden: boolean } | Record<string, never> {\n  if (hidden) {\n    return { hidden }\n  }\n  return {}\n}\n\n/**\n * Conditionally include a `standalone` property in the spread object.\n *\n * @private\n * @param standalone - Optional standalone flag\n * @returns Object with `standalone` if truthy, empty object otherwise\n */\nfunction maybeStandalone(\n  standalone: boolean | undefined\n): { readonly standalone: boolean } | Record<string, never> {\n  if (standalone) {\n    return { standalone }\n  }\n  return {}\n}\n\n/**\n * Conditionally include nested `items` by recursively converting child entries.\n *\n * @private\n * @param items - Optional resolved child entries\n * @returns Object with `items` if non-empty, empty object otherwise\n */\nfunction maybeItems(\n  items: readonly ResolvedEntry[] | undefined\n): { readonly items: DumpEntry[] } | Record<string, never> {\n  if (items && items.length > 0) {\n    return { items: toTree(items) }\n  }\n  return {}\n}\n\n/**\n * Convert a list of resolved entries into a slim dump tree for JSON output.\n *\n * @private\n * @param entries - Resolved entries from the sync engine\n * @returns Array of slim dump entries\n */\nfunction toTree(entries: readonly ResolvedEntry[]): DumpEntry[] {\n  return entries.map(buildDumpEntry)\n}\n\n/**\n * Build a single dump entry from a resolved entry, spreading optional fields.\n *\n * @private\n * @param entry - Resolved entry to convert\n * @returns Slim dump entry for JSON serialization\n */\nfunction buildDumpEntry(entry: ResolvedEntry): DumpEntry {\n  return {\n    text: entry.title,\n    ...maybeLink(entry.link),\n    ...maybeCollapsible(entry.collapsible),\n    ...maybeHidden(entry.hidden),\n    ...maybeStandalone(entry.standalone),\n    ...maybeItems(entry.items as readonly ResolvedEntry[] | undefined),\n  }\n}\n","import { loadConfig } from '@ciderpress/config/loader'\nimport { command } from '@kidd-cli/core'\nimport { z } from 'zod'\n\nimport { logConfigErrors } from '../lib/log-config-errors.ts'\nimport { createPaths } from '../lib/paths.ts'\nimport { openBrowser, serveSite } from '../lib/rspress.ts'\n\n/**\n * Registers the `serve` CLI command to preview a previously built site.\n */\nexport default command({\n  name: 'serve',\n  description: 'Preview the built Rspress site',\n  options: z.object({\n    open: z.boolean().optional().default(true),\n    port: z.number().optional(),\n    theme: z.string().optional(),\n    colorMode: z.enum(['dark', 'light']).optional(),\n    vscode: z.boolean().optional().default(false),\n  }),\n  handler: async (ctx) => {\n    ctx.log.intro('ciderpress serve')\n    const paths = createPaths(process.cwd())\n    const [configErr, config] = await loadConfig(paths.repoRoot)\n    if (configErr) {\n      ctx.log.error(configErr.message)\n      if (configErr.errors && configErr.errors.length > 0) {\n        logConfigErrors(ctx.log, configErr.errors)\n      }\n      process.exit(1)\n    }\n\n    const port = await serveSite({\n      config,\n      paths,\n      port: ctx.args.port,\n      theme: ctx.args.theme,\n      colorMode: ctx.args.colorMode,\n      vscode: ctx.args.vscode,\n    })\n\n    if (ctx.args.open) {\n      openBrowser(`http://localhost:${port}`)\n    }\n  },\n})\n","import { execFileSync } from 'node:child_process'\nimport fs from 'node:fs'\nimport fsPromises from 'node:fs/promises'\nimport path from 'node:path'\n\nimport { command } from '@kidd-cli/core'\n\nimport { generateAssets } from '../lib/banner/index.ts'\nimport { createPaths } from '../lib/paths.ts'\nimport type { Paths } from '../lib/paths.ts'\n\nconst CONFIG_FILENAME = 'ciderpress.config.ts'\n\n/**\n * Initialize a ciderpress config file in the project root.\n *\n * Derives the project title from the git remote origin (falling back\n * to the directory name), writes a starter `ciderpress.config.ts`,\n * and generates initial banner/logo assets.\n */\nexport default command({\n  name: 'setup',\n  description: 'Initialize a ciderpress config in the current project',\n  handler: async (ctx) => {\n    const cwd = process.cwd()\n    const paths = createPaths(cwd)\n    const configPath = path.join(paths.repoRoot, CONFIG_FILENAME)\n\n    ctx.log.intro('ciderpress setup')\n\n    if (fs.existsSync(configPath)) {\n      ctx.log.warn(`${CONFIG_FILENAME} already exists — skipping`)\n      ctx.log.outro('Done')\n      return\n    }\n\n    const title = deriveTitle(cwd)\n\n    fs.writeFileSync(configPath, buildConfigTemplate(title), 'utf8')\n    ctx.log.success(`Created ${CONFIG_FILENAME} (title: \"${title}\")`)\n\n    await ensureGitignore(paths, ctx.log)\n\n    await fsPromises.mkdir(paths.publicDir, { recursive: true })\n    const [assetErr, written] = await generateAssets({\n      config: { title, tagline: undefined },\n      publicDir: paths.publicDir,\n    })\n\n    if (assetErr) {\n      ctx.log.error(`Asset generation failed: ${assetErr.message}`)\n      process.exit(1)\n    }\n\n    if (written.length > 0) {\n      ctx.log.success(`Generated ${written.join(', ')}`)\n    }\n\n    ctx.log.outro('Done')\n  },\n})\n\n/**\n * Extract the repository name from the git remote origin URL.\n * Returns `null` if not in a git repo or no origin is configured.\n *\n * @private\n * @param cwd - Working directory to run git commands in\n * @returns Repository name or null\n */\nfunction extractGitRepoName(cwd: string): string | null {\n  const url = execSilent('git', ['remote', 'get-url', 'origin'], cwd)\n  if (!url) {\n    return null\n  }\n\n  // Handle SSH (git@github.com:org/repo.git) and HTTPS (https://github.com/org/repo.git)\n  const match = url.match(/[/:]([^/:]+?)(?:\\.git)?$/)\n  if (!match) {\n    return null\n  }\n  // Trailing-slash remotes (e.g. `https://github.com/org/`) produce an\n  // empty capture; treat that as a miss so we fall back to the directory name.\n  if (!match[1]) {\n    return null\n  }\n\n  return match[1]\n}\n\n/**\n * Run a command silently with an explicit argument array, returning\n * trimmed stdout or `null` on failure.\n *\n * Uses `execFileSync` (not `execSync`) to avoid shell interpolation\n * and defend against command injection.\n *\n * @private\n * @param file - Executable to run\n * @param args - Arguments to pass to the executable\n * @param cwd - Working directory for the command\n * @returns Trimmed stdout string or null on failure\n */\nfunction execSilent(file: string, args: readonly string[], cwd: string): string | null {\n  try {\n    return execFileSync(file, [...args], { cwd, stdio: 'pipe', encoding: 'utf8' }).trim()\n  } catch {\n    return null\n  }\n}\n\n/**\n * Derive a project title from git origin repo name or the current directory name.\n *\n * @private\n * @param cwd - Working directory to derive the title from\n * @returns Project title string\n */\nfunction deriveTitle(cwd: string): string {\n  const repoName = extractGitRepoName(cwd)\n  if (repoName) {\n    return repoName\n  }\n  return path.basename(cwd)\n}\n\n/**\n * Build a config template string with the given title.\n *\n * @private\n * @param title - Project title to embed in the template\n * @returns Config file content string\n */\nfunction buildConfigTemplate(title: string): string {\n  const escaped = title.replaceAll(\"'\", String.raw`\\'`)\n  return `import { defineConfig } from 'ciderpress'\n\nexport default defineConfig({\n  title: '${escaped}',\n  sections: [\n    {\n      title: 'Getting Started',\n      path: '/getting-started',\n      include: 'docs/*.md',\n    },\n  ],\n})\n`\n}\n\nconst CIDERPRESS_GITIGNORE_ENTRY = '.ciderpress/'\n\nconst NESTED_GITIGNORE_CONTENT = `# managed by ciderpress — ignore everything by default\n*\n\n# to track custom assets (e.g. banners, logos), uncomment the following lines:\n# !public/\n# !public/**\n`\n\n/**\n * Ensure .ciderpress/ is gitignored. Tries to append to the root .gitignore first;\n * if no root .gitignore exists, writes a nested .gitignore inside .ciderpress/ instead.\n *\n * @private\n * @param paths - Project paths\n * @param logger - Logger for status messages\n */\nasync function ensureGitignore(\n  paths: Paths,\n  logger: { success: (msg: string) => void }\n): Promise<void> {\n  const rootGitignore = path.join(paths.repoRoot, '.gitignore')\n\n  if (fs.existsSync(rootGitignore)) {\n    const content = fs.readFileSync(rootGitignore, 'utf8')\n    const lines = content.split('\\n')\n    const alreadyIgnored = lines.some(\n      (line) => line.trim() === CIDERPRESS_GITIGNORE_ENTRY || line.trim() === '.ciderpress'\n    )\n\n    if (alreadyIgnored) {\n      return\n    }\n\n    const suffix: string = (() => {\n      if (content.endsWith('\\n')) {\n        return ''\n      }\n      return '\\n'\n    })()\n    fs.writeFileSync(\n      rootGitignore,\n      `${content}${suffix}\\n# ciderpress\\n${CIDERPRESS_GITIGNORE_ENTRY}\\n`,\n      'utf8'\n    )\n    logger.success('Added .ciderpress/ to .gitignore')\n    return\n  }\n\n  await fsPromises.mkdir(paths.outputRoot, { recursive: true })\n  await fsPromises.writeFile(\n    path.join(paths.outputRoot, '.gitignore'),\n    NESTED_GITIGNORE_CONTENT,\n    'utf8'\n  )\n  logger.success('Created .ciderpress/.gitignore')\n}\n","import { loadConfig } from '@ciderpress/config/loader'\nimport { command } from '@kidd-cli/core'\nimport { z } from 'zod'\n\nimport { createPaths } from '../lib/paths.ts'\nimport { sync } from '../lib/sync/index.ts'\n\n/**\n * Registers the `sync` CLI command — runs the sync engine and exits.\n *\n * Loads config, syncs all content to `.ciderpress/content/`, and reports results.\n * Useful for CI pipelines and benchmarking where dev server or build is not needed.\n */\nexport default command({\n  name: 'sync',\n  description: 'Sync documentation content without building or starting dev server',\n  options: z.object({\n    quiet: z.boolean().optional().default(false),\n  }),\n  handler: async (ctx) => {\n    const paths = createPaths(process.cwd())\n    if (!ctx.args.quiet) {\n      ctx.log.intro('ciderpress sync')\n    }\n\n    const [configErr, config] = await loadConfig(paths.repoRoot)\n    if (configErr) {\n      ctx.log.error(configErr.message)\n      process.exit(1)\n    }\n\n    const result = await sync(config, { paths, quiet: ctx.args.quiet })\n    if (result.error) {\n      ctx.log.error(result.error)\n      process.exit(1)\n    }\n\n    if (!ctx.args.quiet) {\n      ctx.log.success(\n        `${result.pagesWritten} written, ${result.pagesSkipped} unchanged, ${result.pagesRemoved} removed (${result.elapsed.toFixed(0)}ms)`\n      )\n    }\n\n    if (!ctx.args.quiet) {\n      ctx.log.outro('Done')\n    }\n  },\n})\n","import { loadConfig } from '@ciderpress/config/loader'\nimport { command } from '@kidd-cli/core'\n\nimport { createPaths } from '../lib/paths.ts'\nimport { configTemplates, resolveTemplates } from '../lib/templates.ts'\nimport type { ResolvedTemplate, ResolvedTemplates, TemplateIssue } from '../lib/templates.ts'\n\n/**\n * List available document templates — built-ins plus any declared via the\n * `templates` config field, with overrides flagged.\n */\nconst list = command({\n  name: 'list',\n  description: 'List available document templates',\n  handler: async (ctx) => {\n    ctx.log.intro('ciderpress templates')\n\n    const { resolved, issues } = await resolveFromCwd()\n    ctx.log.message(formatTemplateList(resolved))\n\n    if (issues.length > 0) {\n      ctx.log.warn(`${issues.length} template(s) could not be loaded:`)\n      ctx.log.message(formatIssues(issues))\n    }\n\n    ctx.log.outro('Done')\n  },\n})\n\n/**\n * Validate every resolved template and report frontmatter, syntax, and\n * collision issues. Exits non-zero when any template is invalid.\n */\nconst check = command({\n  name: 'check',\n  description: 'Validate document templates',\n  handler: async (ctx) => {\n    ctx.log.intro('ciderpress templates check')\n\n    const { resolved, issues } = await resolveFromCwd()\n\n    if (issues.length === 0) {\n      ctx.log.success(`All templates valid (${resolved.length} total)`)\n      ctx.log.outro('Done')\n      return\n    }\n\n    ctx.log.error(`${issues.length} template issue(s):`)\n    ctx.log.message(formatIssues(issues))\n    ctx.log.outro('Templates check failed')\n    process.exit(1)\n  },\n})\n\n/**\n * The `templates` command group: `list` and `check`.\n */\nexport default command({\n  name: 'templates',\n  description: 'List and validate document templates',\n  commands: { list, check },\n})\n\n/**\n * Resolve templates from the current working directory, tolerating a missing\n * or invalid config by falling back to built-ins only.\n *\n * @private\n * @returns The resolved templates for the current project\n */\nasync function resolveFromCwd(): Promise<ResolvedTemplates> {\n  const paths = createPaths(process.cwd())\n  const [, config] = await loadConfig(paths.repoRoot)\n  return resolveTemplates({ templates: configTemplates(config), paths })\n}\n\n/**\n * Format the template list into grouped, aligned sections.\n *\n * @private\n * @param resolved - The resolved templates to display\n * @returns A printable multi-line string\n */\nfunction formatTemplateList(resolved: readonly ResolvedTemplate[]): string {\n  const builtIns = resolved.filter((entry) => entry.source === 'built-in')\n  const custom = resolved.filter((entry) => entry.source !== 'built-in')\n  const width = Math.max(0, ...resolved.map((entry) => rowLabel(entry).length))\n\n  const sections = [\n    formatSection('Built-in', builtIns, width),\n    formatSection('Custom', custom, width),\n  ].filter((section) => section.length > 0)\n\n  return [...sections, ...overrideFootnote(resolved)].join('\\n')\n}\n\n/**\n * Build the override-marker footnote when any template overrides a built-in.\n *\n * @private\n * @param resolved - The resolved templates\n * @returns Footnote lines, or an empty array\n */\nfunction overrideFootnote(resolved: readonly ResolvedTemplate[]): readonly string[] {\n  if (resolved.some((entry) => entry.overridesBuiltIn)) {\n    return ['', '  * overrides a built-in template']\n  }\n  return []\n}\n\n/**\n * Format a single named section of the template list.\n *\n * @private\n * @param title - The section heading\n * @param items - Templates in this section\n * @param width - Column width for the label column\n * @returns A printable section string, or '' when empty\n */\nfunction formatSection(title: string, items: readonly ResolvedTemplate[], width: number): string {\n  if (items.length === 0) {\n    return ''\n  }\n  const lines = items.map((entry) => `  ${rowLabel(entry).padEnd(width)}  ${entry.template.hint}`)\n  return [title, ...lines].join('\\n')\n}\n\n/**\n * Build the label cell for a template row, marking overrides.\n *\n * @private\n * @param entry - The resolved template\n * @returns The label cell text\n */\nfunction rowLabel(entry: ResolvedTemplate): string {\n  if (entry.overridesBuiltIn) {\n    return `${entry.template.type} *`\n  }\n  return entry.template.type\n}\n\n/**\n * Format template loading issues as an indented list.\n *\n * @private\n * @param issues - The issues to format\n * @returns A printable multi-line string\n */\nfunction formatIssues(issues: readonly TemplateIssue[]): string {\n  return issues.map((issue) => `  ✖ ${issue.file} — ${issue.message}`).join('\\n')\n}\n","let _lazyMatch = () => { var __lib__=(()=>{var m=Object.defineProperty,V=Object.getOwnPropertyDescriptor,G=Object.getOwnPropertyNames,T=Object.prototype.hasOwnProperty,q=(r,e)=>{for(var n in e)m(r,n,{get:e[n],enumerable:true});},H=(r,e,n,a)=>{if(e&&typeof e==\"object\"||typeof e==\"function\")for(let t of G(e))!T.call(r,t)&&t!==n&&m(r,t,{get:()=>e[t],enumerable:!(a=V(e,t))||a.enumerable});return r},J=r=>H(m({},\"__esModule\",{value:true}),r),w={};q(w,{default:()=>re});var A=r=>Array.isArray(r),d=r=>typeof r==\"function\",Q=r=>r.length===0,W=r=>typeof r==\"number\",K=r=>typeof r==\"object\"&&r!==null,X=r=>r instanceof RegExp,b=r=>typeof r==\"string\",h=r=>r===void 0,Y=r=>{const e=new Map;return n=>{const a=e.get(n);if(a)return a;const t=r(n);return e.set(n,t),t}},rr=(r,e,n={})=>{const a={cache:{},input:r,index:0,indexMax:0,options:n,output:[]};if(v(e)(a)&&a.index===r.length)return a.output;throw new Error(`Failed to parse at index ${a.indexMax}`)},i=(r,e)=>A(r)?er(r,e):b(r)?ar(r,e):nr(r,e),er=(r,e)=>{const n={};for(const a of r){if(a.length!==1)throw new Error(`Invalid character: \"${a}\"`);const t=a.charCodeAt(0);n[t]=true;}return a=>{const t=a.index,o=a.input;for(;a.index<o.length&&o.charCodeAt(a.index)in n;)a.index+=1;const u=a.index;if(u>t){if(!h(e)&&!a.options.silent){const s=a.input.slice(t,u),c=d(e)?e(s,o,String(t)):e;h(c)||a.output.push(c);}a.indexMax=Math.max(a.indexMax,a.index);}return  true}},nr=(r,e)=>{const n=r.source,a=r.flags.replace(/y|$/,\"y\"),t=new RegExp(n,a);return g(o=>{t.lastIndex=o.index;const u=t.exec(o.input);if(u){if(!h(e)&&!o.options.silent){const s=d(e)?e(...u,o.input,String(o.index)):e;h(s)||o.output.push(s);}return o.index+=u[0].length,o.indexMax=Math.max(o.indexMax,o.index),true}else return  false})},ar=(r,e)=>n=>{if(n.input.startsWith(r,n.index)){if(!h(e)&&!n.options.silent){const t=d(e)?e(r,n.input,String(n.index)):e;h(t)||n.output.push(t);}return n.index+=r.length,n.indexMax=Math.max(n.indexMax,n.index),true}else return  false},C=(r,e,n,a)=>{const t=v(r);return g(_(M(o=>{let u=0;for(;u<n;){const s=o.index;if(!t(o)||(u+=1,o.index===s))break}return u>=e})))},tr=(r,e)=>C(r,0,1),f=(r,e)=>C(r,0,1/0),x=(r,e)=>{const n=r.map(v);return g(_(M(a=>{for(let t=0,o=n.length;t<o;t++)if(!n[t](a))return  false;return  true})))},l=(r,e)=>{const n=r.map(v);return g(_(a=>{for(let t=0,o=n.length;t<o;t++)if(n[t](a))return  true;return  false}))},M=(r,e=false)=>{const n=v(r);return a=>{const t=a.index,o=a.output.length,u=n(a);return (!u||e)&&(a.index=t,a.output.length!==o&&(a.output.length=o)),u}},_=(r,e)=>{const n=v(r);return n},g=(()=>{let r=0;return e=>{const n=v(e),a=r+=1;return t=>{var o;if(t.options.memoization===false)return n(t);const u=t.index,s=(o=t.cache)[a]||(o[a]=new Map),c=s.get(u);if(c===false)return  false;if(W(c))return t.index=c,true;if(c)return t.index=c.index,c.output?.length&&t.output.push(...c.output),true;{const Z=t.output.length;if(n(t)){const D=t.index,U=t.output.length;if(U>Z){const ee=t.output.slice(Z,U);s.set(u,{index:D,output:ee});}else s.set(u,D);return  true}else return s.set(u,false),false}}}})(),E=r=>{let e;return n=>(e||(e=v(r())),e(n))},v=Y(r=>{if(d(r))return Q(r)?E(r):r;if(b(r)||X(r))return i(r);if(A(r))return x(r);if(K(r))return l(Object.values(r));throw new Error(\"Invalid rule\")}),P=\"abcdefghijklmnopqrstuvwxyz\",ir=r=>{let e=\"\";for(;r>0;){const n=(r-1)%26;e=P[n]+e,r=Math.floor((r-1)/26);}return e},O=r=>{let e=0;for(let n=0,a=r.length;n<a;n++)e=e*26+P.indexOf(r[n])+1;return e},S=(r,e)=>{if(e<r)return S(e,r);const n=[];for(;r<=e;)n.push(r++);return n},or=(r,e,n)=>S(r,e).map(a=>String(a).padStart(n,\"0\")),R=(r,e)=>S(O(r),O(e)).map(ir),p=r=>r,z=r=>ur(e=>rr(e,r,{memoization:false}).join(\"\")),ur=r=>{const e={};return n=>e[n]??(e[n]=r(n))},sr=i(/^\\*\\*\\/\\*$/,\".*\"),cr=i(/^\\*\\*\\/(\\*)?([ a-zA-Z0-9._-]+)$/,(r,e,n)=>`.*${e?\"\":\"(?:^|/)\"}${n.replaceAll(\".\",\"\\\\.\")}`),lr=i(/^\\*\\*\\/(\\*)?([ a-zA-Z0-9._-]*)\\{([ a-zA-Z0-9._-]+(?:,[ a-zA-Z0-9._-]+)*)\\}$/,(r,e,n,a)=>`.*${e?\"\":\"(?:^|/)\"}${n.replaceAll(\".\",\"\\\\.\")}(?:${a.replaceAll(\",\",\"|\").replaceAll(\".\",\"\\\\.\")})`),y=i(/\\\\./,p),pr=i(/[$.*+?^(){}[\\]\\|]/,r=>`\\\\${r}`),vr=i(/./,p),hr=i(/^(?:!!)*!(.*)$/,(r,e)=>`(?!^${L(e)}$).*?`),dr=i(/^(!!)+/,\"\"),fr=l([hr,dr]),xr=i(/\\/(\\*\\*\\/)+/,\"(?:/.+/|/)\"),gr=i(/^(\\*\\*\\/)+/,\"(?:^|.*/)\"),mr=i(/\\/(\\*\\*)$/,\"(?:/.*|$)\"),_r=i(/\\*\\*/,\".*\"),j=l([xr,gr,mr,_r]),Sr=i(/\\*\\/(?!\\*\\*\\/)/,\"[^/]*/\"),yr=i(/\\*/,\"[^/]*\"),N=l([Sr,yr]),k=i(\"?\",\"[^/]\"),$r=i(\"[\",p),wr=i(\"]\",p),Ar=i(/[!^]/,\"^/\"),br=i(/[a-z]-[a-z]|[0-9]-[0-9]/i,p),Cr=i(/[$.*+?^(){}[\\|]/,r=>`\\\\${r}`),Mr=i(/[^\\]]/,p),Er=l([y,Cr,br,Mr]),B=x([$r,tr(Ar),f(Er),wr]),Pr=i(\"{\",\"(?:\"),Or=i(\"}\",\")\"),Rr=i(/(\\d+)\\.\\.(\\d+)/,(r,e,n)=>or(+e,+n,Math.min(e.length,n.length)).join(\"|\")),zr=i(/([a-z]+)\\.\\.([a-z]+)/,(r,e,n)=>R(e,n).join(\"|\")),jr=i(/([A-Z]+)\\.\\.([A-Z]+)/,(r,e,n)=>R(e.toLowerCase(),n.toLowerCase()).join(\"|\").toUpperCase()),Nr=l([Rr,zr,jr]),I=x([Pr,Nr,Or]),kr=i(\"{\",\"(?:\"),Br=i(\"}\",\")\"),Ir=i(\",\",\"|\"),Fr=i(/[$.*+?^(){[\\]\\|]/,r=>`\\\\${r}`),Lr=i(/[^}]/,p),Zr=E(()=>F),Dr=l([j,N,k,B,I,Zr,y,Fr,Ir,Lr]),F=x([kr,f(Dr),Br]),Ur=f(l([sr,cr,lr,fr,j,N,k,B,I,F,y,pr,vr])),Vr=Ur,Gr=z(Vr),L=Gr,Tr=i(/\\\\./,p),qr=i(/./,p),Hr=i(/\\*\\*\\*+/,\"*\"),Jr=i(/([^/{[(!])\\*\\*/,(r,e)=>`${e}*`),Qr=i(/(^|.)\\*\\*(?=[^*/)\\]}])/,(r,e)=>`${e}*`),Wr=f(l([Tr,Hr,Jr,Qr,qr])),Kr=Wr,Xr=z(Kr),Yr=Xr,$=(r,e)=>{const n=Array.isArray(r)?r:[r];if(!n.length)return  false;const a=n.map($.compile),t=n.every(s=>/(\\/(?:\\*\\*)?|\\[\\/\\])$/.test(s)),o=e.replace(/[\\\\\\/]+/g,\"/\").replace(/\\/$/,t?\"/\":\"\");return a.some(s=>s.test(o))};$.compile=r=>new RegExp(`^${L(Yr(r))}$`,\"s\");var re=$;return J(w)})();\n return __lib__.default || __lib__; };\nlet _match;\nconst zeptomatch = (path, pattern) => {\n  if (!_match) {\n    _match = _lazyMatch();\n    _lazyMatch = null;\n  }\n  return _match(path, pattern);\n};\n\nconst _DRIVE_LETTER_START_RE = /^[A-Za-z]:\\//;\nfunction normalizeWindowsPath(input = \"\") {\n  if (!input) {\n    return input;\n  }\n  return input.replace(/\\\\/g, \"/\").replace(_DRIVE_LETTER_START_RE, (r) => r.toUpperCase());\n}\n\nconst _UNC_REGEX = /^[/\\\\]{2}/;\nconst _IS_ABSOLUTE_RE = /^[/\\\\](?![/\\\\])|^[/\\\\]{2}(?!\\.)|^[A-Za-z]:[/\\\\]/;\nconst _DRIVE_LETTER_RE = /^[A-Za-z]:$/;\nconst _ROOT_FOLDER_RE = /^\\/([A-Za-z]:)?$/;\nconst _EXTNAME_RE = /.(\\.[^./]+|\\.)$/;\nconst _PATH_ROOT_RE = /^[/\\\\]|^[a-zA-Z]:[/\\\\]/;\nconst sep = \"/\";\nconst normalize = function(path) {\n  if (path.length === 0) {\n    return \".\";\n  }\n  path = normalizeWindowsPath(path);\n  const isUNCPath = path.match(_UNC_REGEX);\n  const isPathAbsolute = isAbsolute(path);\n  const trailingSeparator = path[path.length - 1] === \"/\";\n  path = normalizeString(path, !isPathAbsolute);\n  if (path.length === 0) {\n    if (isPathAbsolute) {\n      return \"/\";\n    }\n    return trailingSeparator ? \"./\" : \".\";\n  }\n  if (trailingSeparator) {\n    path += \"/\";\n  }\n  if (_DRIVE_LETTER_RE.test(path)) {\n    path += \"/\";\n  }\n  if (isUNCPath) {\n    if (!isPathAbsolute) {\n      return `//./${path}`;\n    }\n    return `//${path}`;\n  }\n  return isPathAbsolute && !isAbsolute(path) ? `/${path}` : path;\n};\nconst join = function(...segments) {\n  let path = \"\";\n  for (const seg of segments) {\n    if (!seg) {\n      continue;\n    }\n    if (path.length > 0) {\n      const pathTrailing = path[path.length - 1] === \"/\";\n      const segLeading = seg[0] === \"/\";\n      const both = pathTrailing && segLeading;\n      if (both) {\n        path += seg.slice(1);\n      } else {\n        path += pathTrailing || segLeading ? seg : `/${seg}`;\n      }\n    } else {\n      path += seg;\n    }\n  }\n  return normalize(path);\n};\nfunction cwd() {\n  if (typeof process !== \"undefined\" && typeof process.cwd === \"function\") {\n    return process.cwd().replace(/\\\\/g, \"/\");\n  }\n  return \"/\";\n}\nconst resolve = function(...arguments_) {\n  arguments_ = arguments_.map((argument) => normalizeWindowsPath(argument));\n  let resolvedPath = \"\";\n  let resolvedAbsolute = false;\n  for (let index = arguments_.length - 1; index >= -1 && !resolvedAbsolute; index--) {\n    const path = index >= 0 ? arguments_[index] : cwd();\n    if (!path || path.length === 0) {\n      continue;\n    }\n    resolvedPath = `${path}/${resolvedPath}`;\n    resolvedAbsolute = isAbsolute(path);\n  }\n  resolvedPath = normalizeString(resolvedPath, !resolvedAbsolute);\n  if (resolvedAbsolute && !isAbsolute(resolvedPath)) {\n    return `/${resolvedPath}`;\n  }\n  return resolvedPath.length > 0 ? resolvedPath : \".\";\n};\nfunction normalizeString(path, allowAboveRoot) {\n  let res = \"\";\n  let lastSegmentLength = 0;\n  let lastSlash = -1;\n  let dots = 0;\n  let char = null;\n  for (let index = 0; index <= path.length; ++index) {\n    if (index < path.length) {\n      char = path[index];\n    } else if (char === \"/\") {\n      break;\n    } else {\n      char = \"/\";\n    }\n    if (char === \"/\") {\n      if (lastSlash === index - 1 || dots === 1) ; else if (dots === 2) {\n        if (res.length < 2 || lastSegmentLength !== 2 || res[res.length - 1] !== \".\" || res[res.length - 2] !== \".\") {\n          if (res.length > 2) {\n            const lastSlashIndex = res.lastIndexOf(\"/\");\n            if (lastSlashIndex === -1) {\n              res = \"\";\n              lastSegmentLength = 0;\n            } else {\n              res = res.slice(0, lastSlashIndex);\n              lastSegmentLength = res.length - 1 - res.lastIndexOf(\"/\");\n            }\n            lastSlash = index;\n            dots = 0;\n            continue;\n          } else if (res.length > 0) {\n            res = \"\";\n            lastSegmentLength = 0;\n            lastSlash = index;\n            dots = 0;\n            continue;\n          }\n        }\n        if (allowAboveRoot) {\n          res += res.length > 0 ? \"/..\" : \"..\";\n          lastSegmentLength = 2;\n        }\n      } else {\n        if (res.length > 0) {\n          res += `/${path.slice(lastSlash + 1, index)}`;\n        } else {\n          res = path.slice(lastSlash + 1, index);\n        }\n        lastSegmentLength = index - lastSlash - 1;\n      }\n      lastSlash = index;\n      dots = 0;\n    } else if (char === \".\" && dots !== -1) {\n      ++dots;\n    } else {\n      dots = -1;\n    }\n  }\n  return res;\n}\nconst isAbsolute = function(p) {\n  return _IS_ABSOLUTE_RE.test(p);\n};\nconst toNamespacedPath = function(p) {\n  return normalizeWindowsPath(p);\n};\nconst extname = function(p) {\n  if (p === \"..\") return \"\";\n  const match = _EXTNAME_RE.exec(normalizeWindowsPath(p));\n  return match && match[1] || \"\";\n};\nconst relative = function(from, to) {\n  const _from = resolve(from).replace(_ROOT_FOLDER_RE, \"$1\").split(\"/\");\n  const _to = resolve(to).replace(_ROOT_FOLDER_RE, \"$1\").split(\"/\");\n  if (_to[0][1] === \":\" && _from[0][1] === \":\" && _from[0] !== _to[0]) {\n    return _to.join(\"/\");\n  }\n  const _fromCopy = [..._from];\n  for (const segment of _fromCopy) {\n    if (_to[0] !== segment) {\n      break;\n    }\n    _from.shift();\n    _to.shift();\n  }\n  return [..._from.map(() => \"..\"), ..._to].join(\"/\");\n};\nconst dirname = function(p) {\n  const segments = normalizeWindowsPath(p).replace(/\\/$/, \"\").split(\"/\").slice(0, -1);\n  if (segments.length === 1 && _DRIVE_LETTER_RE.test(segments[0])) {\n    segments[0] += \"/\";\n  }\n  return segments.join(\"/\") || (isAbsolute(p) ? \"/\" : \".\");\n};\nconst format = function(p) {\n  const ext = p.ext ? p.ext.startsWith(\".\") ? p.ext : `.${p.ext}` : \"\";\n  const segments = [p.root, p.dir, p.base ?? (p.name ?? \"\") + ext].filter(\n    Boolean\n  );\n  return normalizeWindowsPath(\n    p.root ? resolve(...segments) : segments.join(\"/\")\n  );\n};\nconst basename = function(p, extension) {\n  const segments = normalizeWindowsPath(p).split(\"/\");\n  let lastSegment = \"\";\n  for (let i = segments.length - 1; i >= 0; i--) {\n    const val = segments[i];\n    if (val) {\n      lastSegment = val;\n      break;\n    }\n  }\n  return extension && lastSegment.endsWith(extension) ? lastSegment.slice(0, -extension.length) : lastSegment;\n};\nconst parse = function(p) {\n  const root = _PATH_ROOT_RE.exec(p)?.[0]?.replace(/\\\\/g, \"/\") || \"\";\n  const base = basename(p);\n  const extension = extname(base);\n  return {\n    root,\n    dir: dirname(p),\n    base,\n    ext: extension,\n    name: base.slice(0, base.length - extension.length)\n  };\n};\nconst matchesGlob = (path, pattern) => {\n  return zeptomatch(pattern, normalize(path));\n};\n\nconst _path = {\n  __proto__: null,\n  basename: basename,\n  dirname: dirname,\n  extname: extname,\n  format: format,\n  isAbsolute: isAbsolute,\n  join: join,\n  matchesGlob: matchesGlob,\n  normalize: normalize,\n  normalizeString: normalizeString,\n  parse: parse,\n  relative: relative,\n  resolve: resolve,\n  sep: sep,\n  toNamespacedPath: toNamespacedPath\n};\n\nexport { _path as _, normalizeString as a, relative as b, basename as c, dirname as d, extname as e, format as f, normalizeWindowsPath as g, isAbsolute as i, join as j, matchesGlob as m, normalize as n, parse as p, resolve as r, sep as s, toNamespacedPath as t };\n","import { _ as _path } from './shared/pathe.M-eThtNZ.mjs';\nexport { c as basename, d as dirname, e as extname, f as format, i as isAbsolute, j as join, m as matchesGlob, n as normalize, a as normalizeString, p as parse, b as relative, r as resolve, s as sep, t as toNamespacedPath } from './shared/pathe.M-eThtNZ.mjs';\n\nconst delimiter = /* @__PURE__ */ (() => globalThis.process?.platform === \"win32\" ? \";\" : \":\")();\nconst _platforms = { posix: void 0, win32: void 0 };\nconst mix = (del = delimiter) => {\n  return new Proxy(_path, {\n    get(_, prop) {\n      if (prop === \"delimiter\") return del;\n      if (prop === \"posix\") return posix;\n      if (prop === \"win32\") return win32;\n      return _platforms[prop] || _path[prop];\n    }\n  });\n};\nconst posix = /* @__PURE__ */ mix(\":\");\nconst win32 = /* @__PURE__ */ mix(\";\");\n\nexport { posix as default, delimiter, posix, win32 };\n","import fs, { lstatSync, realpathSync, statSync } from \"node:fs\";\nimport { URL as URL$1, fileURLToPath, pathToFileURL } from \"node:url\";\nimport path, { isAbsolute } from \"node:path\";\nimport assert from \"node:assert\";\nimport process$1 from \"node:process\";\nimport { format, inspect } from \"node:util\";\nconst nodeBuiltins = [\n\t\"_http_agent\",\n\t\"_http_client\",\n\t\"_http_common\",\n\t\"_http_incoming\",\n\t\"_http_outgoing\",\n\t\"_http_server\",\n\t\"_stream_duplex\",\n\t\"_stream_passthrough\",\n\t\"_stream_readable\",\n\t\"_stream_transform\",\n\t\"_stream_wrap\",\n\t\"_stream_writable\",\n\t\"_tls_common\",\n\t\"_tls_wrap\",\n\t\"assert\",\n\t\"assert/strict\",\n\t\"async_hooks\",\n\t\"buffer\",\n\t\"child_process\",\n\t\"cluster\",\n\t\"console\",\n\t\"constants\",\n\t\"crypto\",\n\t\"dgram\",\n\t\"diagnostics_channel\",\n\t\"dns\",\n\t\"dns/promises\",\n\t\"domain\",\n\t\"events\",\n\t\"fs\",\n\t\"fs/promises\",\n\t\"http\",\n\t\"http2\",\n\t\"https\",\n\t\"inspector\",\n\t\"inspector/promises\",\n\t\"module\",\n\t\"net\",\n\t\"os\",\n\t\"path\",\n\t\"path/posix\",\n\t\"path/win32\",\n\t\"perf_hooks\",\n\t\"process\",\n\t\"punycode\",\n\t\"querystring\",\n\t\"readline\",\n\t\"readline/promises\",\n\t\"repl\",\n\t\"stream\",\n\t\"stream/consumers\",\n\t\"stream/promises\",\n\t\"stream/web\",\n\t\"string_decoder\",\n\t\"sys\",\n\t\"timers\",\n\t\"timers/promises\",\n\t\"tls\",\n\t\"trace_events\",\n\t\"tty\",\n\t\"url\",\n\t\"util\",\n\t\"util/types\",\n\t\"v8\",\n\t\"vm\",\n\t\"wasi\",\n\t\"worker_threads\",\n\t\"zlib\"\n];\nconst classRegExp = /^([A-Z][a-z\\d]*)+$/;\nconst kTypes = /* @__PURE__ */ new Set([\n\t\"string\",\n\t\"function\",\n\t\"number\",\n\t\"object\",\n\t\"Function\",\n\t\"Object\",\n\t\"boolean\",\n\t\"bigint\",\n\t\"symbol\"\n]);\nconst messages = /* @__PURE__ */ new Map();\nfunction formatList(array, type = \"and\") {\n\tswitch (array.length) {\n\t\tcase 0: return \"\";\n\t\tcase 1: return `${array[0]}`;\n\t\tcase 2: return `${array[0]} ${type} ${array[1]}`;\n\t\tcase 3: return `${array[0]}, ${array[1]}, ${type} ${array[2]}`;\n\t\tdefault: return `${array.slice(0, -1).join(\", \")}, ${type} ${array.at(-1)}`;\n\t}\n}\nfunction getExpectedArgumentLength(message) {\n\tlet expectedLength = 0;\n\tconst regex = /%[dfijoOs]/g;\n\twhile (regex.exec(message) !== null) expectedLength++;\n\treturn expectedLength;\n}\nfunction createError(sym, value, constructor) {\n\tmessages.set(sym, value);\n\treturn makeNodeErrorWithCode(constructor, sym);\n}\nconst kIsNodeError = Symbol(\"kIsNodeError\");\nfunction makeNodeErrorWithCode(Base, key) {\n\tconst message = messages.get(key);\n\tconst expectedLength = typeof message === \"string\" ? getExpectedArgumentLength(message) : -1;\n\tswitch (expectedLength) {\n\t\tcase 0: {\n\t\t\tclass NodeError extends Base {\n\t\t\t\tcode = key;\n\t\t\t\tconstructor(...args) {\n\t\t\t\t\tassert.ok(args.length === 0, `Code: ${key}; The provided arguments length (${args.length}) does not match the required ones (${expectedLength}).`);\n\t\t\t\t\tsuper(message);\n\t\t\t\t}\n\t\t\t\tget [\"constructor\"]() {\n\t\t\t\t\treturn Base;\n\t\t\t\t}\n\t\t\t\tget [kIsNodeError]() {\n\t\t\t\t\treturn true;\n\t\t\t\t}\n\t\t\t\ttoString() {\n\t\t\t\t\treturn `${this.name} [${key}]: ${this.message}`;\n\t\t\t\t}\n\t\t\t}\n\t\t\treturn NodeError;\n\t\t}\n\t\tcase -1: {\n\t\t\tclass NodeError extends Base {\n\t\t\t\tcode = key;\n\t\t\t\tconstructor(...args) {\n\t\t\t\t\tsuper();\n\t\t\t\t\tObject.defineProperty(this, \"message\", {\n\t\t\t\t\t\tvalue: getMessage(key, args, this),\n\t\t\t\t\t\tenumerable: false,\n\t\t\t\t\t\twritable: true,\n\t\t\t\t\t\tconfigurable: true\n\t\t\t\t\t});\n\t\t\t\t}\n\t\t\t\tget [\"constructor\"]() {\n\t\t\t\t\treturn Base;\n\t\t\t\t}\n\t\t\t\tget [kIsNodeError]() {\n\t\t\t\t\treturn true;\n\t\t\t\t}\n\t\t\t\ttoString() {\n\t\t\t\t\treturn `${this.name} [${key}]: ${this.message}`;\n\t\t\t\t}\n\t\t\t}\n\t\t\treturn NodeError;\n\t\t}\n\t\tdefault: {\n\t\t\tclass NodeError extends Base {\n\t\t\t\tcode = key;\n\t\t\t\tconstructor(...args) {\n\t\t\t\t\tassert.ok(args.length === expectedLength, `Code: ${key}; The provided arguments length (${args.length}) does not match the required ones (${expectedLength}).`);\n\t\t\t\t\targs.unshift(message);\n\t\t\t\t\tsuper(Reflect.apply(format, null, args));\n\t\t\t\t}\n\t\t\t\tget [\"constructor\"]() {\n\t\t\t\t\treturn Base;\n\t\t\t\t}\n\t\t\t\tget [kIsNodeError]() {\n\t\t\t\t\treturn true;\n\t\t\t\t}\n\t\t\t\ttoString() {\n\t\t\t\t\treturn `${this.name} [${key}]: ${this.message}`;\n\t\t\t\t}\n\t\t\t}\n\t\t\treturn NodeError;\n\t\t}\n\t}\n}\nfunction getMessage(key, parameters, self) {\n\tconst message = messages.get(key);\n\tassert.ok(message !== void 0, \"expected `message` to be found\");\n\tif (typeof message === \"function\") {\n\t\tassert.ok(message.length <= parameters.length, `Code: ${key}; The provided arguments length (${parameters.length}) does not match the required ones (${message.length}).`);\n\t\treturn Reflect.apply(message, self, parameters);\n\t}\n\tconst expectedLength = getExpectedArgumentLength(message);\n\tassert.ok(expectedLength === parameters.length, `Code: ${key}; The provided arguments length (${parameters.length}) does not match the required ones (${expectedLength}).`);\n\tif (parameters.length === 0) return message;\n\tparameters.unshift(message);\n\treturn Reflect.apply(format, null, parameters);\n}\nfunction determineSpecificType(value) {\n\tif (value === null) return \"null\";\n\telse if (value === void 0) return \"undefined\";\n\tconst type = typeof value;\n\tswitch (type) {\n\t\tcase \"bigint\": return `type bigint (${value}n)`;\n\t\tcase \"number\":\n\t\t\tif (value === 0) return 1 / value === Number.NEGATIVE_INFINITY ? \"type number (-0)\" : \"type number (0)\";\n\t\t\telse if (Number.isNaN(value)) return \"type number (NaN)\";\n\t\t\telse if (value === Number.POSITIVE_INFINITY) return \"type number (Infinity)\";\n\t\t\telse if (value === Number.NEGATIVE_INFINITY) return \"type number (-Infinity)\";\n\t\t\treturn `type number (${value})`;\n\t\tcase \"boolean\": return value ? \"type boolean (true)\" : \"type boolean (false)\";\n\t\tcase \"symbol\": return `type symbol (${String(value)})`;\n\t\tcase \"function\": return `function ${value.name}`;\n\t\tcase \"object\":\n\t\t\tif (value.constructor && value.constructor.name) return `an instance of ${value.constructor.name}`;\n\t\t\treturn `${inspect(value, { depth: -1 })}`;\n\t\tcase \"string\": {\n\t\t\tlet string = value;\n\t\t\tif (string.length > 28) string = `${string.slice(0, 25)}...`;\n\t\t\tif (!string.includes(\"'\")) return `type string ('${string}')`;\n\t\t\treturn `type string (${JSON.stringify(string)})`;\n\t\t}\n\t\tdefault: {\n\t\t\tlet inspected = inspect(value, { colors: false });\n\t\t\tif (inspected.length > 28) inspected = `${inspected.slice(0, 25)}...`;\n\t\t\treturn `type ${type} (${inspected})`;\n\t\t}\n\t}\n}\ncreateError(\"ERR_INVALID_ARG_TYPE\", (name, expected, actual) => {\n\tassert.ok(typeof name === \"string\", \"'name' must be a string\");\n\tif (!Array.isArray(expected)) expected = [expected];\n\tlet message = \"The \";\n\tif (name.endsWith(\" argument\")) message += `${name} `;\n\telse {\n\t\tconst type = name.includes(\".\") ? \"property\" : \"argument\";\n\t\tmessage += `\"${name}\" ${type} `;\n\t}\n\tmessage += \"must be \";\n\tconst types = [];\n\tconst instances = [];\n\tconst other = [];\n\tfor (const value of expected) {\n\t\tassert.ok(typeof value === \"string\", \"All expected entries have to be of type string\");\n\t\tif (kTypes.has(value)) types.push(value.toLowerCase());\n\t\telse if (classRegExp.exec(value) === null) {\n\t\t\tassert.ok(value !== \"object\", \"The value \\\"object\\\" should be written as \\\"Object\\\"\");\n\t\t\tother.push(value);\n\t\t} else instances.push(value);\n\t}\n\tif (instances.length > 0) {\n\t\tconst pos = types.indexOf(\"object\");\n\t\tif (pos !== -1) {\n\t\t\ttypes.splice(pos, 1);\n\t\t\tinstances.push(\"Object\");\n\t\t}\n\t}\n\tif (types.length > 0) {\n\t\tmessage += `${types.length > 1 ? \"one of type\" : \"of type\"} ${formatList(types, \"or\")}`;\n\t\tif (instances.length > 0 || other.length > 0) message += \" or \";\n\t}\n\tif (instances.length > 0) {\n\t\tmessage += `an instance of ${formatList(instances, \"or\")}`;\n\t\tif (other.length > 0) message += \" or \";\n\t}\n\tif (other.length > 0) if (other.length > 1) message += `one of ${formatList(other, \"or\")}`;\n\telse {\n\t\tif (other[0]?.toLowerCase() !== other[0]) message += \"an \";\n\t\tmessage += `${other[0]}`;\n\t}\n\tmessage += `. Received ${determineSpecificType(actual)}`;\n\treturn message;\n}, TypeError);\nconst ERR_INVALID_MODULE_SPECIFIER = createError(\"ERR_INVALID_MODULE_SPECIFIER\", (request, reason, base) => {\n\treturn `Invalid module \"${request}\" ${reason}${base ? ` imported from ${base}` : \"\"}`;\n}, TypeError);\nconst ERR_INVALID_PACKAGE_CONFIG = createError(\"ERR_INVALID_PACKAGE_CONFIG\", (path, base, message) => {\n\treturn `Invalid package config ${path}${base ? ` while importing ${base}` : \"\"}${message ? `. ${message}` : \"\"}`;\n}, Error);\nconst ERR_INVALID_PACKAGE_TARGET = createError(\"ERR_INVALID_PACKAGE_TARGET\", (packagePath, key, target, isImport = false, base) => {\n\tconst relatedError = typeof target === \"string\" && !isImport && target.length > 0 && !target.startsWith(\"./\");\n\tif (key === \".\") {\n\t\tassert.ok(isImport === false);\n\t\treturn `Invalid \"exports\" main target ${JSON.stringify(target)} defined in the package config ${packagePath}package.json${base ? ` imported from ${base}` : \"\"}${relatedError ? \"; targets must start with \\\"./\\\"\" : \"\"}`;\n\t}\n\treturn `Invalid \"${isImport ? \"imports\" : \"exports\"}\" target ${JSON.stringify(target)} defined for '${key}' in the package config ${packagePath}package.json${base ? ` imported from ${base}` : \"\"}${relatedError ? \"; targets must start with \\\"./\\\"\" : \"\"}`;\n}, Error);\nconst ERR_MODULE_NOT_FOUND = createError(\"ERR_MODULE_NOT_FOUND\", function(path, base, exactUrl = false) {\n\tif (exactUrl && typeof exactUrl === \"string\") this.url = `${exactUrl}`;\n\treturn `Cannot find ${exactUrl ? \"module\" : \"package\"} '${path}' imported from ${base}`;\n}, Error);\nconst ERR_PACKAGE_IMPORT_NOT_DEFINED = createError(\"ERR_PACKAGE_IMPORT_NOT_DEFINED\", (specifier, packagePath, base) => {\n\treturn `Package import specifier \"${specifier}\" is not defined${packagePath ? ` in package ${packagePath || \"\"}package.json` : \"\"} imported from ${base}`;\n}, TypeError);\nconst ERR_PACKAGE_PATH_NOT_EXPORTED = createError(\"ERR_PACKAGE_PATH_NOT_EXPORTED\", (packagePath, subpath, base) => {\n\tif (subpath === \".\") return `No \"exports\" main defined in ${packagePath}package.json${base ? ` imported from ${base}` : \"\"}`;\n\treturn `Package subpath '${subpath}' is not defined by \"exports\" in ${packagePath}package.json${base ? ` imported from ${base}` : \"\"}`;\n}, Error);\nconst ERR_UNSUPPORTED_DIR_IMPORT = createError(\"ERR_UNSUPPORTED_DIR_IMPORT\", function(path, base, exactUrl = void 0) {\n\tthis.url = exactUrl;\n\treturn `Directory import '${path}' is not supported resolving ES modules imported from ${base}`;\n}, Error);\nconst ERR_UNSUPPORTED_RESOLVE_REQUEST = createError(\"ERR_UNSUPPORTED_RESOLVE_REQUEST\", \"Failed to resolve module specifier \\\"%s\\\" from \\\"%s\\\": Invalid relative URL or base scheme is not hierarchical.\", TypeError);\nconst ERR_UNKNOWN_FILE_EXTENSION = createError(\"ERR_UNKNOWN_FILE_EXTENSION\", (extension, path) => {\n\treturn `Unknown file extension \"${extension}\" for ${path}`;\n}, TypeError);\ncreateError(\"ERR_INVALID_ARG_VALUE\", (name, value, reason = \"is invalid\") => {\n\tlet inspected = inspect(value);\n\tif (inspected.length > 128) inspected = `${inspected.slice(0, 128)}...`;\n\treturn `The ${name.includes(\".\") ? \"property\" : \"argument\"} '${name}' ${reason}. Received ${inspected}`;\n}, TypeError);\nconst hasOwnProperty$1 = {}.hasOwnProperty;\nconst cache = /* @__PURE__ */ new Map();\nfunction read(jsonPath, { base, specifier }) {\n\tconst existing = cache.get(jsonPath);\n\tif (existing) return existing;\n\tlet string;\n\ttry {\n\t\tstring = fs.readFileSync(path.toNamespacedPath(jsonPath), \"utf8\");\n\t} catch (error) {\n\t\tconst exception = error;\n\t\tif (exception.code !== \"ENOENT\") throw exception;\n\t}\n\tconst result = {\n\t\texists: false,\n\t\tpjsonPath: jsonPath,\n\t\tmain: void 0,\n\t\tname: void 0,\n\t\ttype: \"none\",\n\t\texports: void 0,\n\t\timports: void 0\n\t};\n\tif (string !== void 0) {\n\t\tlet parsed;\n\t\ttry {\n\t\t\tparsed = JSON.parse(string);\n\t\t} catch (error_) {\n\t\t\tconst error = new ERR_INVALID_PACKAGE_CONFIG(jsonPath, (base ? `\"${specifier}\" from ` : \"\") + fileURLToPath(base || specifier), error_.message);\n\t\t\terror.cause = error_;\n\t\t\tthrow error;\n\t\t}\n\t\tresult.exists = true;\n\t\tif (hasOwnProperty$1.call(parsed, \"name\") && typeof parsed.name === \"string\") result.name = parsed.name;\n\t\tif (hasOwnProperty$1.call(parsed, \"main\") && typeof parsed.main === \"string\") result.main = parsed.main;\n\t\tif (hasOwnProperty$1.call(parsed, \"exports\")) result.exports = parsed.exports;\n\t\tif (hasOwnProperty$1.call(parsed, \"imports\")) result.imports = parsed.imports;\n\t\tif (hasOwnProperty$1.call(parsed, \"type\") && (parsed.type === \"commonjs\" || parsed.type === \"module\")) result.type = parsed.type;\n\t}\n\tcache.set(jsonPath, result);\n\treturn result;\n}\nfunction getPackageScopeConfig(resolved) {\n\tlet packageJSONUrl = new URL(\"package.json\", resolved);\n\twhile (true) {\n\t\tif (packageJSONUrl.pathname.endsWith(\"node_modules/package.json\")) break;\n\t\tconst packageConfig = read(fileURLToPath(packageJSONUrl), { specifier: resolved });\n\t\tif (packageConfig.exists) return packageConfig;\n\t\tconst lastPackageJSONUrl = packageJSONUrl;\n\t\tpackageJSONUrl = new URL(\"../package.json\", packageJSONUrl);\n\t\tif (packageJSONUrl.pathname === lastPackageJSONUrl.pathname) break;\n\t}\n\treturn {\n\t\tpjsonPath: fileURLToPath(packageJSONUrl),\n\t\texists: false,\n\t\ttype: \"none\"\n\t};\n}\nconst hasOwnProperty = {}.hasOwnProperty;\nconst extensionFormatMap = {\n\t__proto__: null,\n\t\".json\": \"json\",\n\t\".cjs\": \"commonjs\",\n\t\".cts\": \"commonjs\",\n\t\".js\": \"module\",\n\t\".ts\": \"module\",\n\t\".mts\": \"module\",\n\t\".mjs\": \"module\"\n};\nconst protocolHandlers = {\n\t__proto__: null,\n\t\"data:\": getDataProtocolModuleFormat,\n\t\"file:\": getFileProtocolModuleFormat,\n\t\"node:\": () => \"builtin\"\n};\nfunction mimeToFormat(mime) {\n\tif (mime && /^\\s*(text|application)\\/javascript\\s*(;\\s*charset=utf-?8\\s*)?$/i.test(mime)) return \"module\";\n\tif (mime === \"application/json\") return \"json\";\n\treturn null;\n}\nfunction getDataProtocolModuleFormat(parsed) {\n\tconst { 1: mime } = /^([^/]+\\/[^;,]+)(?:[^,]*?)(;base64)?,/.exec(parsed.pathname) || [\n\t\tnull,\n\t\tnull,\n\t\tnull\n\t];\n\treturn mimeToFormat(mime);\n}\nconst DOT_CODE = 46;\nconst SLASH_CODE = 47;\nfunction extname(url) {\n\tconst pathname = url.pathname;\n\tfor (let i = pathname.length - 1; i > 0; i--) switch (pathname.charCodeAt(i)) {\n\t\tcase SLASH_CODE: return \"\";\n\t\tcase DOT_CODE: return pathname.charCodeAt(i - 1) === SLASH_CODE ? \"\" : pathname.slice(i);\n\t}\n\treturn \"\";\n}\nfunction getFileProtocolModuleFormat(url, _context, ignoreErrors) {\n\tconst ext = extname(url);\n\tif (ext === \".js\") {\n\t\tconst { type: packageType } = getPackageScopeConfig(url);\n\t\tif (packageType !== \"none\") return packageType;\n\t\treturn \"commonjs\";\n\t}\n\tif (ext === \"\") {\n\t\tconst { type: packageType } = getPackageScopeConfig(url);\n\t\tif (packageType === \"module\") return \"module\";\n\t\tif (packageType !== \"none\") return packageType;\n\t\treturn \"commonjs\";\n\t}\n\tconst format = extensionFormatMap[ext];\n\tif (format) return format;\n\tif (ignoreErrors) return;\n\tthrow new ERR_UNKNOWN_FILE_EXTENSION(ext, fileURLToPath(url));\n}\nfunction defaultGetFormatWithoutErrors(url, context) {\n\tconst protocol = url.protocol;\n\tif (!hasOwnProperty.call(protocolHandlers, protocol)) return null;\n\treturn protocolHandlers[protocol](url, context, true) || null;\n}\nconst RegExpPrototypeSymbolReplace = RegExp.prototype[Symbol.replace];\nconst own = {}.hasOwnProperty;\nconst invalidSegmentRegEx = /(^|\\\\|\\/)((\\.|%2e)(\\.|%2e)?|(n|%6e|%4e)(o|%6f|%4f)(d|%64|%44)(e|%65|%45)(_|%5f)(m|%6d|%4d)(o|%6f|%4f)(d|%64|%44)(u|%75|%55)(l|%6c|%4c)(e|%65|%45)(s|%73|%53))?(\\\\|\\/|$)/i;\nconst deprecatedInvalidSegmentRegEx = /(^|\\\\|\\/)((\\.|%2e)(\\.|%2e)?|(n|%6e|%4e)(o|%6f|%4f)(d|%64|%44)(e|%65|%45)(_|%5f)(m|%6d|%4d)(o|%6f|%4f)(d|%64|%44)(u|%75|%55)(l|%6c|%4c)(e|%65|%45)(s|%73|%53))(\\\\|\\/|$)/i;\nconst invalidPackageNameRegEx = /^\\.|%|\\\\/;\nconst patternRegEx = /\\*/g;\nconst encodedSeparatorRegEx = /%2f|%5c/i;\nconst emittedPackageWarnings = /* @__PURE__ */ new Set();\nconst doubleSlashRegEx = /[/\\\\]{2}/;\nfunction emitInvalidSegmentDeprecation(target, request, match, packageJsonUrl, internal, base, isTarget) {\n\tif (process$1.noDeprecation) return;\n\tconst pjsonPath = fileURLToPath(packageJsonUrl);\n\tconst double = doubleSlashRegEx.exec(isTarget ? target : request) !== null;\n\tprocess$1.emitWarning(`Use of deprecated ${double ? \"double slash\" : \"leading or trailing slash matching\"} resolving \"${target}\" for module request \"${request}\" ${request === match ? \"\" : `matched to \"${match}\" `}in the \"${internal ? \"imports\" : \"exports\"}\" field module resolution of the package at ${pjsonPath}${base ? ` imported from ${fileURLToPath(base)}` : \"\"}.`, \"DeprecationWarning\", \"DEP0166\");\n}\nfunction emitLegacyIndexDeprecation(url, packageJsonUrl, base, main) {\n\tif (process$1.noDeprecation) return;\n\tif (defaultGetFormatWithoutErrors(url, { parentURL: base.href }) !== \"module\") return;\n\tconst urlPath = fileURLToPath(url.href);\n\tconst packagePath = fileURLToPath(new URL$1(\".\", packageJsonUrl));\n\tconst basePath = fileURLToPath(base);\n\tif (!main) process$1.emitWarning(`No \"main\" or \"exports\" field defined in the package.json for ${packagePath} resolving the main entry point \"${urlPath.slice(packagePath.length)}\", imported from ${basePath}.\\nDefault \"index\" lookups for the main are deprecated for ES modules.`, \"DeprecationWarning\", \"DEP0151\");\n\telse if (path.resolve(packagePath, main) !== urlPath) process$1.emitWarning(`Package ${packagePath} has a \"main\" field set to \"${main}\", excluding the full filename and extension to the resolved file at \"${urlPath.slice(packagePath.length)}\", imported from ${basePath}.\\n Automatic extension resolution of the \"main\" field is deprecated for ES modules.`, \"DeprecationWarning\", \"DEP0151\");\n}\nfunction tryStatSync(path) {\n\ttry {\n\t\treturn statSync(path);\n\t} catch {}\n}\nfunction fileExists(url) {\n\tconst stats = statSync(url, { throwIfNoEntry: false });\n\tconst isFile = stats ? stats.isFile() : void 0;\n\treturn isFile === null || isFile === void 0 ? false : isFile;\n}\nfunction legacyMainResolve(packageJsonUrl, packageConfig, base) {\n\tlet guess;\n\tif (packageConfig.main !== void 0) {\n\t\tguess = new URL$1(packageConfig.main, packageJsonUrl);\n\t\tif (fileExists(guess)) return guess;\n\t\tconst tries = [\n\t\t\t`./${packageConfig.main}.js`,\n\t\t\t`./${packageConfig.main}.json`,\n\t\t\t`./${packageConfig.main}.node`,\n\t\t\t`./${packageConfig.main}/index.js`,\n\t\t\t`./${packageConfig.main}/index.json`,\n\t\t\t`./${packageConfig.main}/index.node`\n\t\t];\n\t\tlet i = -1;\n\t\twhile (++i < tries.length) {\n\t\t\tguess = new URL$1(tries[i], packageJsonUrl);\n\t\t\tif (fileExists(guess)) break;\n\t\t\tguess = void 0;\n\t\t}\n\t\tif (guess) {\n\t\t\temitLegacyIndexDeprecation(guess, packageJsonUrl, base, packageConfig.main);\n\t\t\treturn guess;\n\t\t}\n\t}\n\tconst tries = [\n\t\t\"./index.js\",\n\t\t\"./index.json\",\n\t\t\"./index.node\"\n\t];\n\tlet i = -1;\n\twhile (++i < tries.length) {\n\t\tguess = new URL$1(tries[i], packageJsonUrl);\n\t\tif (fileExists(guess)) break;\n\t\tguess = void 0;\n\t}\n\tif (guess) {\n\t\temitLegacyIndexDeprecation(guess, packageJsonUrl, base, packageConfig.main);\n\t\treturn guess;\n\t}\n\tthrow new ERR_MODULE_NOT_FOUND(fileURLToPath(new URL$1(\".\", packageJsonUrl)), fileURLToPath(base));\n}\nfunction finalizeResolution(resolved, base, preserveSymlinks) {\n\tif (encodedSeparatorRegEx.exec(resolved.pathname) !== null) throw new ERR_INVALID_MODULE_SPECIFIER(resolved.pathname, String.raw`must not include encoded \"/\" or \"\\\" characters`, fileURLToPath(base));\n\tlet filePath;\n\ttry {\n\t\tfilePath = fileURLToPath(resolved);\n\t} catch (error) {\n\t\tObject.defineProperty(error, \"input\", { value: String(resolved) });\n\t\tObject.defineProperty(error, \"module\", { value: String(base) });\n\t\tthrow error;\n\t}\n\tconst stats = tryStatSync(filePath.endsWith(\"/\") ? filePath.slice(-1) : filePath);\n\tif (stats && stats.isDirectory()) {\n\t\tconst error = new ERR_UNSUPPORTED_DIR_IMPORT(filePath, fileURLToPath(base));\n\t\terror.url = String(resolved);\n\t\tthrow error;\n\t}\n\tif (!stats || !stats.isFile()) {\n\t\tconst error = new ERR_MODULE_NOT_FOUND(filePath || resolved.pathname, base && fileURLToPath(base), true);\n\t\terror.url = String(resolved);\n\t\tthrow error;\n\t}\n\tif (!preserveSymlinks) {\n\t\tconst real = realpathSync(filePath);\n\t\tconst { search, hash } = resolved;\n\t\tresolved = pathToFileURL(real + (filePath.endsWith(path.sep) ? \"/\" : \"\"));\n\t\tresolved.search = search;\n\t\tresolved.hash = hash;\n\t}\n\treturn resolved;\n}\nfunction importNotDefined(specifier, packageJsonUrl, base) {\n\treturn new ERR_PACKAGE_IMPORT_NOT_DEFINED(specifier, packageJsonUrl && fileURLToPath(new URL$1(\".\", packageJsonUrl)), fileURLToPath(base));\n}\nfunction exportsNotFound(subpath, packageJsonUrl, base) {\n\treturn new ERR_PACKAGE_PATH_NOT_EXPORTED(fileURLToPath(new URL$1(\".\", packageJsonUrl)), subpath, base && fileURLToPath(base));\n}\nfunction throwInvalidSubpath(request, match, packageJsonUrl, internal, base) {\n\tthrow new ERR_INVALID_MODULE_SPECIFIER(request, `request is not a valid match in pattern \"${match}\" for the \"${internal ? \"imports\" : \"exports\"}\" resolution of ${fileURLToPath(packageJsonUrl)}`, base && fileURLToPath(base));\n}\nfunction invalidPackageTarget(subpath, target, packageJsonUrl, internal, base) {\n\ttarget = typeof target === \"object\" && target !== null ? JSON.stringify(target, null, \"\") : `${target}`;\n\treturn new ERR_INVALID_PACKAGE_TARGET(fileURLToPath(new URL$1(\".\", packageJsonUrl)), subpath, target, internal, base && fileURLToPath(base));\n}\nfunction resolvePackageTargetString(target, subpath, match, packageJsonUrl, base, pattern, internal, isPathMap, conditions) {\n\tif (subpath !== \"\" && !pattern && target.at(-1) !== \"/\") throw invalidPackageTarget(match, target, packageJsonUrl, internal, base);\n\tif (!target.startsWith(\"./\")) {\n\t\tif (internal && !target.startsWith(\"../\") && !target.startsWith(\"/\")) {\n\t\t\tlet isURL = false;\n\t\t\ttry {\n\t\t\t\tnew URL$1(target);\n\t\t\t\tisURL = true;\n\t\t\t} catch {}\n\t\t\tif (!isURL) return packageResolve(pattern ? RegExpPrototypeSymbolReplace.call(patternRegEx, target, () => subpath) : target + subpath, packageJsonUrl, conditions);\n\t\t}\n\t\tthrow invalidPackageTarget(match, target, packageJsonUrl, internal, base);\n\t}\n\tif (invalidSegmentRegEx.exec(target.slice(2)) !== null) if (deprecatedInvalidSegmentRegEx.exec(target.slice(2)) === null) {\n\t\tif (!isPathMap) {\n\t\t\tconst request = pattern ? match.replace(\"*\", () => subpath) : match + subpath;\n\t\t\temitInvalidSegmentDeprecation(pattern ? RegExpPrototypeSymbolReplace.call(patternRegEx, target, () => subpath) : target, request, match, packageJsonUrl, internal, base, true);\n\t\t}\n\t} else throw invalidPackageTarget(match, target, packageJsonUrl, internal, base);\n\tconst resolved = new URL$1(target, packageJsonUrl);\n\tconst resolvedPath = resolved.pathname;\n\tconst packagePath = new URL$1(\".\", packageJsonUrl).pathname;\n\tif (!resolvedPath.startsWith(packagePath)) throw invalidPackageTarget(match, target, packageJsonUrl, internal, base);\n\tif (subpath === \"\") return resolved;\n\tif (invalidSegmentRegEx.exec(subpath) !== null) {\n\t\tconst request = pattern ? match.replace(\"*\", () => subpath) : match + subpath;\n\t\tif (deprecatedInvalidSegmentRegEx.exec(subpath) === null) {\n\t\t\tif (!isPathMap) emitInvalidSegmentDeprecation(pattern ? RegExpPrototypeSymbolReplace.call(patternRegEx, target, () => subpath) : target, request, match, packageJsonUrl, internal, base, false);\n\t\t} else throwInvalidSubpath(request, match, packageJsonUrl, internal, base);\n\t}\n\tif (pattern) return new URL$1(RegExpPrototypeSymbolReplace.call(patternRegEx, resolved.href, () => subpath));\n\treturn new URL$1(subpath, resolved);\n}\nfunction isArrayIndex(key) {\n\tconst keyNumber = Number(key);\n\tif (`${keyNumber}` !== key) return false;\n\treturn keyNumber >= 0 && keyNumber < 4294967295;\n}\nfunction resolvePackageTarget(packageJsonUrl, target, subpath, packageSubpath, base, pattern, internal, isPathMap, conditions) {\n\tif (typeof target === \"string\") return resolvePackageTargetString(target, subpath, packageSubpath, packageJsonUrl, base, pattern, internal, isPathMap, conditions);\n\tif (Array.isArray(target)) {\n\t\tconst targetList = target;\n\t\tif (targetList.length === 0) return null;\n\t\tlet lastException;\n\t\tlet i = -1;\n\t\twhile (++i < targetList.length) {\n\t\t\tconst targetItem = targetList[i];\n\t\t\tlet resolveResult;\n\t\t\ttry {\n\t\t\t\tresolveResult = resolvePackageTarget(packageJsonUrl, targetItem, subpath, packageSubpath, base, pattern, internal, isPathMap, conditions);\n\t\t\t} catch (error) {\n\t\t\t\tconst exception = error;\n\t\t\t\tlastException = exception;\n\t\t\t\tif (exception.code === \"ERR_INVALID_PACKAGE_TARGET\") continue;\n\t\t\t\tthrow error;\n\t\t\t}\n\t\t\tif (resolveResult === void 0) continue;\n\t\t\tif (resolveResult === null) {\n\t\t\t\tlastException = null;\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t\treturn resolveResult;\n\t\t}\n\t\tif (lastException === void 0 || lastException === null) return lastException;\n\t\tthrow lastException;\n\t}\n\tif (typeof target === \"object\" && target !== null) {\n\t\tconst keys = Object.getOwnPropertyNames(target);\n\t\tlet i = -1;\n\t\twhile (++i < keys.length) {\n\t\t\tconst key = keys[i];\n\t\t\tif (isArrayIndex(key)) throw new ERR_INVALID_PACKAGE_CONFIG(fileURLToPath(packageJsonUrl), fileURLToPath(base), \"\\\"exports\\\" cannot contain numeric property keys.\");\n\t\t}\n\t\ti = -1;\n\t\twhile (++i < keys.length) {\n\t\t\tconst key = keys[i];\n\t\t\tif (key === \"default\" || conditions && conditions.has(key)) {\n\t\t\t\tconst conditionalTarget = target[key];\n\t\t\t\tconst resolveResult = resolvePackageTarget(packageJsonUrl, conditionalTarget, subpath, packageSubpath, base, pattern, internal, isPathMap, conditions);\n\t\t\t\tif (resolveResult === void 0) continue;\n\t\t\t\treturn resolveResult;\n\t\t\t}\n\t\t}\n\t\treturn;\n\t}\n\tif (target === null) return null;\n\tthrow invalidPackageTarget(packageSubpath, target, packageJsonUrl, internal, base);\n}\nfunction isConditionalExportsMainSugar(exports, packageJsonUrl, base) {\n\tif (typeof exports === \"string\" || Array.isArray(exports)) return true;\n\tif (typeof exports !== \"object\" || exports === null) return false;\n\tconst keys = Object.getOwnPropertyNames(exports);\n\tlet isConditionalSugar = false;\n\tlet i = 0;\n\tlet keyIndex = -1;\n\twhile (++keyIndex < keys.length) {\n\t\tconst key = keys[keyIndex];\n\t\tconst currentIsConditionalSugar = key === \"\" || key[0] !== \".\";\n\t\tif (i++ === 0) isConditionalSugar = currentIsConditionalSugar;\n\t\telse if (isConditionalSugar !== currentIsConditionalSugar) throw new ERR_INVALID_PACKAGE_CONFIG(fileURLToPath(packageJsonUrl), fileURLToPath(base), \"\\\"exports\\\" cannot contain some keys starting with '.' and some not. The exports object must either be an object of package subpath keys or an object of main entry condition name keys only.\");\n\t}\n\treturn isConditionalSugar;\n}\nfunction emitTrailingSlashPatternDeprecation(match, pjsonUrl, base) {\n\tif (process$1.noDeprecation) return;\n\tconst pjsonPath = fileURLToPath(pjsonUrl);\n\tif (emittedPackageWarnings.has(pjsonPath + \"|\" + match)) return;\n\temittedPackageWarnings.add(pjsonPath + \"|\" + match);\n\tprocess$1.emitWarning(`Use of deprecated trailing slash pattern mapping \"${match}\" in the \"exports\" field module resolution of the package at ${pjsonPath}${base ? ` imported from ${fileURLToPath(base)}` : \"\"}. Mapping specifiers ending in \"/\" is no longer supported.`, \"DeprecationWarning\", \"DEP0155\");\n}\nfunction packageExportsResolve(packageJsonUrl, packageSubpath, packageConfig, base, conditions) {\n\tlet exports = packageConfig.exports;\n\tif (isConditionalExportsMainSugar(exports, packageJsonUrl, base)) exports = { \".\": exports };\n\tif (own.call(exports, packageSubpath) && !packageSubpath.includes(\"*\") && !packageSubpath.endsWith(\"/\")) {\n\t\tconst target = exports[packageSubpath];\n\t\tconst resolveResult = resolvePackageTarget(packageJsonUrl, target, \"\", packageSubpath, base, false, false, false, conditions);\n\t\tif (resolveResult === null || resolveResult === void 0) throw exportsNotFound(packageSubpath, packageJsonUrl, base);\n\t\treturn resolveResult;\n\t}\n\tlet bestMatch = \"\";\n\tlet bestMatchSubpath = \"\";\n\tconst keys = Object.getOwnPropertyNames(exports);\n\tlet i = -1;\n\twhile (++i < keys.length) {\n\t\tconst key = keys[i];\n\t\tconst patternIndex = key.indexOf(\"*\");\n\t\tif (patternIndex !== -1 && packageSubpath.startsWith(key.slice(0, patternIndex))) {\n\t\t\tif (packageSubpath.endsWith(\"/\")) emitTrailingSlashPatternDeprecation(packageSubpath, packageJsonUrl, base);\n\t\t\tconst patternTrailer = key.slice(patternIndex + 1);\n\t\t\tif (packageSubpath.length >= key.length && packageSubpath.endsWith(patternTrailer) && patternKeyCompare(bestMatch, key) === 1 && key.lastIndexOf(\"*\") === patternIndex) {\n\t\t\t\tbestMatch = key;\n\t\t\t\tbestMatchSubpath = packageSubpath.slice(patternIndex, packageSubpath.length - patternTrailer.length);\n\t\t\t}\n\t\t}\n\t}\n\tif (bestMatch) {\n\t\tconst target = exports[bestMatch];\n\t\tconst resolveResult = resolvePackageTarget(packageJsonUrl, target, bestMatchSubpath, bestMatch, base, true, false, packageSubpath.endsWith(\"/\"), conditions);\n\t\tif (resolveResult === null || resolveResult === void 0) throw exportsNotFound(packageSubpath, packageJsonUrl, base);\n\t\treturn resolveResult;\n\t}\n\tthrow exportsNotFound(packageSubpath, packageJsonUrl, base);\n}\nfunction patternKeyCompare(a, b) {\n\tconst aPatternIndex = a.indexOf(\"*\");\n\tconst bPatternIndex = b.indexOf(\"*\");\n\tconst baseLengthA = aPatternIndex === -1 ? a.length : aPatternIndex + 1;\n\tconst baseLengthB = bPatternIndex === -1 ? b.length : bPatternIndex + 1;\n\tif (baseLengthA > baseLengthB) return -1;\n\tif (baseLengthB > baseLengthA) return 1;\n\tif (aPatternIndex === -1) return 1;\n\tif (bPatternIndex === -1) return -1;\n\tif (a.length > b.length) return -1;\n\tif (b.length > a.length) return 1;\n\treturn 0;\n}\nfunction packageImportsResolve(name, base, conditions) {\n\tif (name === \"#\" || name.endsWith(\"/\")) throw new ERR_INVALID_MODULE_SPECIFIER(name, \"is not a valid internal imports specifier name\", fileURLToPath(base));\n\tlet packageJsonUrl;\n\tconst packageConfig = getPackageScopeConfig(base);\n\tif (packageConfig.exists) {\n\t\tpackageJsonUrl = pathToFileURL(packageConfig.pjsonPath);\n\t\tconst imports = packageConfig.imports;\n\t\tif (imports) if (own.call(imports, name) && !name.includes(\"*\")) {\n\t\t\tconst resolveResult = resolvePackageTarget(packageJsonUrl, imports[name], \"\", name, base, false, true, false, conditions);\n\t\t\tif (resolveResult !== null && resolveResult !== void 0) return resolveResult;\n\t\t} else {\n\t\t\tlet bestMatch = \"\";\n\t\t\tlet bestMatchSubpath = \"\";\n\t\t\tconst keys = Object.getOwnPropertyNames(imports);\n\t\t\tlet i = -1;\n\t\t\twhile (++i < keys.length) {\n\t\t\t\tconst key = keys[i];\n\t\t\t\tconst patternIndex = key.indexOf(\"*\");\n\t\t\t\tif (patternIndex !== -1 && name.startsWith(key.slice(0, -1))) {\n\t\t\t\t\tconst patternTrailer = key.slice(patternIndex + 1);\n\t\t\t\t\tif (name.length >= key.length && name.endsWith(patternTrailer) && patternKeyCompare(bestMatch, key) === 1 && key.lastIndexOf(\"*\") === patternIndex) {\n\t\t\t\t\t\tbestMatch = key;\n\t\t\t\t\t\tbestMatchSubpath = name.slice(patternIndex, name.length - patternTrailer.length);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\tif (bestMatch) {\n\t\t\t\tconst target = imports[bestMatch];\n\t\t\t\tconst resolveResult = resolvePackageTarget(packageJsonUrl, target, bestMatchSubpath, bestMatch, base, true, true, false, conditions);\n\t\t\t\tif (resolveResult !== null && resolveResult !== void 0) return resolveResult;\n\t\t\t}\n\t\t}\n\t}\n\tthrow importNotDefined(name, packageJsonUrl, base);\n}\nfunction parsePackageName(specifier, base) {\n\tlet separatorIndex = specifier.indexOf(\"/\");\n\tlet validPackageName = true;\n\tlet isScoped = false;\n\tif (specifier[0] === \"@\") {\n\t\tisScoped = true;\n\t\tif (separatorIndex === -1 || specifier.length === 0) validPackageName = false;\n\t\telse separatorIndex = specifier.indexOf(\"/\", separatorIndex + 1);\n\t}\n\tconst packageName = separatorIndex === -1 ? specifier : specifier.slice(0, separatorIndex);\n\tif (invalidPackageNameRegEx.exec(packageName) !== null) validPackageName = false;\n\tif (!validPackageName) throw new ERR_INVALID_MODULE_SPECIFIER(specifier, \"is not a valid package name\", fileURLToPath(base));\n\treturn {\n\t\tpackageName,\n\t\tpackageSubpath: \".\" + (separatorIndex === -1 ? \"\" : specifier.slice(separatorIndex)),\n\t\tisScoped\n\t};\n}\nfunction packageResolve(specifier, base, conditions) {\n\tif (nodeBuiltins.includes(specifier)) return new URL$1(\"node:\" + specifier);\n\tconst { packageName, packageSubpath, isScoped } = parsePackageName(specifier, base);\n\tconst packageConfig = getPackageScopeConfig(base);\n\tif (packageConfig.exists && packageConfig.name === packageName && packageConfig.exports !== void 0 && packageConfig.exports !== null) return packageExportsResolve(pathToFileURL(packageConfig.pjsonPath), packageSubpath, packageConfig, base, conditions);\n\tlet packageJsonUrl = new URL$1(\"./node_modules/\" + packageName + \"/package.json\", base);\n\tlet packageJsonPath = fileURLToPath(packageJsonUrl);\n\tlet lastPath;\n\tdo {\n\t\tconst stat = tryStatSync(packageJsonPath.slice(0, -13));\n\t\tif (!stat || !stat.isDirectory()) {\n\t\t\tlastPath = packageJsonPath;\n\t\t\tpackageJsonUrl = new URL$1((isScoped ? \"../../../../node_modules/\" : \"../../../node_modules/\") + packageName + \"/package.json\", packageJsonUrl);\n\t\t\tpackageJsonPath = fileURLToPath(packageJsonUrl);\n\t\t\tcontinue;\n\t\t}\n\t\tconst packageConfig = read(packageJsonPath, {\n\t\t\tbase,\n\t\t\tspecifier\n\t\t});\n\t\tif (packageConfig.exports !== void 0 && packageConfig.exports !== null) return packageExportsResolve(packageJsonUrl, packageSubpath, packageConfig, base, conditions);\n\t\tif (packageSubpath === \".\") return legacyMainResolve(packageJsonUrl, packageConfig, base);\n\t\treturn new URL$1(packageSubpath, packageJsonUrl);\n\t} while (packageJsonPath.length !== lastPath.length);\n\tthrow new ERR_MODULE_NOT_FOUND(packageName, fileURLToPath(base), false);\n}\nfunction isRelativeSpecifier(specifier) {\n\tif (specifier[0] === \".\") {\n\t\tif (specifier.length === 1 || specifier[1] === \"/\") return true;\n\t\tif (specifier[1] === \".\" && (specifier.length === 2 || specifier[2] === \"/\")) return true;\n\t}\n\treturn false;\n}\nfunction shouldBeTreatedAsRelativeOrAbsolutePath(specifier) {\n\tif (specifier === \"\") return false;\n\tif (specifier[0] === \"/\") return true;\n\treturn isRelativeSpecifier(specifier);\n}\nfunction moduleResolve(specifier, base, conditions, preserveSymlinks) {\n\tconst protocol = base.protocol;\n\tconst isData = protocol === \"data:\";\n\tlet resolved;\n\tif (shouldBeTreatedAsRelativeOrAbsolutePath(specifier)) try {\n\t\tresolved = new URL$1(specifier, base);\n\t} catch (error_) {\n\t\tconst error = new ERR_UNSUPPORTED_RESOLVE_REQUEST(specifier, base);\n\t\terror.cause = error_;\n\t\tthrow error;\n\t}\n\telse if (protocol === \"file:\" && specifier[0] === \"#\") resolved = packageImportsResolve(specifier, base, conditions);\n\telse try {\n\t\tresolved = new URL$1(specifier);\n\t} catch (error_) {\n\t\tif (isData && !nodeBuiltins.includes(specifier)) {\n\t\t\tconst error = new ERR_UNSUPPORTED_RESOLVE_REQUEST(specifier, base);\n\t\t\terror.cause = error_;\n\t\t\tthrow error;\n\t\t}\n\t\tresolved = packageResolve(specifier, base, conditions);\n\t}\n\tassert.ok(resolved !== void 0, \"expected to be defined\");\n\tif (resolved.protocol !== \"file:\") return resolved;\n\treturn finalizeResolution(resolved, base, preserveSymlinks);\n}\nconst DEFAULT_CONDITIONS_SET = /* #__PURE__ */ new Set([\"node\", \"import\"]);\nconst DEFAULT_CONDITIONS_KEY = \"2:6:import4:node\";\nconst isWindows = /* #__PURE__ */ (() => process.platform === \"win32\")();\nconst globalCache = /* #__PURE__ */ (() => globalThis[\"__EXSOLVE_CACHE__\"] ||= /* @__PURE__ */ new Map())();\nfunction resolveModuleURL(input, options) {\n\tconst parsedInput = _parseInput(input);\n\tif (\"external\" in parsedInput) return parsedInput.external;\n\tconst specifier = parsedInput.specifier;\n\tlet url = parsedInput.url;\n\tlet absolutePath = parsedInput.absolutePath;\n\tlet cacheKey;\n\tlet cacheObj;\n\tif (options?.cache !== false) {\n\t\tcacheKey = _cacheKey(absolutePath || specifier, options);\n\t\tcacheObj = options?.cache && typeof options?.cache === \"object\" ? options.cache : globalCache;\n\t}\n\tif (cacheObj) {\n\t\tconst cached = cacheObj.get(cacheKey);\n\t\tif (typeof cached === \"string\") return cached;\n\t\tif (cached instanceof Error) {\n\t\t\tif (options?.try) return;\n\t\t\tthrow cached;\n\t\t}\n\t}\n\tif (absolutePath) try {\n\t\tconst stat = lstatSync(absolutePath);\n\t\tif (stat.isSymbolicLink()) {\n\t\t\tabsolutePath = realpathSync(absolutePath);\n\t\t\turl = pathToFileURL(absolutePath);\n\t\t}\n\t\tif (stat.isFile()) {\n\t\t\tif (cacheObj) cacheObj.set(cacheKey, url.href);\n\t\t\treturn url.href;\n\t\t}\n\t} catch (error) {\n\t\tif (error?.code !== \"ENOENT\") {\n\t\t\tif (cacheObj) cacheObj.set(cacheKey, error);\n\t\t\tthrow error;\n\t\t}\n\t}\n\tconst conditionsSet = options?.conditions ? new Set(options.conditions) : DEFAULT_CONDITIONS_SET;\n\tconst target = specifier || url.href;\n\tconst bases = _normalizeBases(options?.from);\n\tconst suffixes = options?.suffixes || [\"\"];\n\tconst extensions = options?.extensions ? [\"\", ...options.extensions] : [\"\"];\n\tlet resolved;\n\tfor (const base of bases) {\n\t\tfor (const suffix of suffixes) {\n\t\t\tlet name = _join(target, suffix);\n\t\t\tif (name === \".\") name += \"/.\";\n\t\t\tfor (const extension of extensions) {\n\t\t\t\tresolved = _tryModuleResolve(name + extension, base, conditionsSet);\n\t\t\t\tif (resolved) break;\n\t\t\t}\n\t\t\tif (resolved) break;\n\t\t}\n\t\tif (resolved) break;\n\t}\n\tif (!resolved) {\n\t\tconst error = /* @__PURE__ */ new Error(`Cannot resolve module \"${input}\" (from: ${bases.map((u) => _fmtPath(u)).join(\", \")})`);\n\t\terror.code = \"ERR_MODULE_NOT_FOUND\";\n\t\tif (cacheObj) cacheObj.set(cacheKey, error);\n\t\tif (options?.try) return;\n\t\tthrow error;\n\t}\n\tif (cacheObj) cacheObj.set(cacheKey, resolved.href);\n\treturn resolved.href;\n}\nfunction resolveModulePath(id, options) {\n\tconst resolved = resolveModuleURL(id, options);\n\tif (!resolved) return;\n\tif (!resolved.startsWith(\"file://\") && options?.try) return;\n\tconst absolutePath = fileURLToPath(resolved);\n\treturn isWindows ? _normalizeWinPath(absolutePath) : absolutePath;\n}\nfunction createResolver(defaults) {\n\tif (defaults?.from) defaults = {\n\t\t...defaults,\n\t\tfrom: _normalizeBases(defaults?.from)\n\t};\n\treturn {\n\t\tresolveModuleURL: (id, opts) => resolveModuleURL(id, {\n\t\t\t...defaults,\n\t\t\t...opts\n\t\t}),\n\t\tresolveModulePath: (id, opts) => resolveModulePath(id, {\n\t\t\t...defaults,\n\t\t\t...opts\n\t\t}),\n\t\tclearResolveCache: () => {\n\t\t\tif (defaults?.cache !== false) if (defaults?.cache && typeof defaults?.cache === \"object\") defaults.cache.clear();\n\t\t\telse globalCache.clear();\n\t\t}\n\t};\n}\nfunction clearResolveCache() {\n\tglobalCache.clear();\n}\nfunction _tryModuleResolve(specifier, base, conditions) {\n\ttry {\n\t\treturn moduleResolve(specifier, base, conditions);\n\t} catch {}\n}\nfunction _normalizeBases(inputs) {\n\tconst urls = (Array.isArray(inputs) ? inputs : [inputs]).flatMap((input) => _normalizeBase(input));\n\tif (urls.length === 0) return [pathToFileURL(\"./\")];\n\treturn urls;\n}\nfunction _normalizeBase(input) {\n\tif (!input) return [];\n\tif (_isURL(input)) return [input];\n\tif (typeof input !== \"string\") return [];\n\tif (/^(?:node|data|http|https|file):/.test(input)) return new URL(input);\n\ttry {\n\t\tif (input.endsWith(\"/\") || statSync(input).isDirectory()) return pathToFileURL(input + \"/\");\n\t\treturn pathToFileURL(input);\n\t} catch {\n\t\treturn [pathToFileURL(input + \"/\"), pathToFileURL(input)];\n\t}\n}\nfunction _fmtPath(input) {\n\ttry {\n\t\treturn fileURLToPath(input);\n\t} catch {\n\t\treturn input;\n\t}\n}\nfunction _cacheKey(id, options) {\n\tlet from;\n\tif (Array.isArray(options?.from)) from = options.from;\n\telse if (options?.from) from = [options.from];\n\treturn _cacheKeyValues([id]) + _conditionsKey(options?.conditions) + _cacheKeyValues(options?.extensions) + _cacheKeyValues(from) + _cacheKeyValues(options?.suffixes);\n}\nfunction _conditionsKey(conditions) {\n\tif (!conditions) return DEFAULT_CONDITIONS_KEY;\n\treturn _cacheKeyValues([...new Set(conditions)].sort());\n}\nfunction _cacheKeyValues(values) {\n\tif (!values) return \"-\";\n\tlet key = `${values.length}:`;\n\tfor (const value of values) {\n\t\tconst stringValue = String(value);\n\t\tkey += `${stringValue.length}:${stringValue}`;\n\t}\n\treturn key;\n}\nfunction _join(a, b) {\n\tif (!a || !b || b === \"/\") return a;\n\treturn (a.endsWith(\"/\") ? a : a + \"/\") + (b.startsWith(\"/\") ? b.slice(1) : b);\n}\nfunction _normalizeWinPath(path) {\n\treturn path.replace(/\\\\/g, \"/\").replace(/^[a-z]:\\//, (r) => r.toUpperCase());\n}\nfunction _isURL(input) {\n\treturn input instanceof URL || input?.constructor?.name === \"URL\";\n}\nfunction _parseInput(input) {\n\tif (typeof input === \"string\") {\n\t\tif (input.startsWith(\"file:\")) {\n\t\t\tconst url = new URL(input);\n\t\t\treturn {\n\t\t\t\turl,\n\t\t\t\tabsolutePath: fileURLToPath(url)\n\t\t\t};\n\t\t}\n\t\tif (isAbsolute(input)) return {\n\t\t\turl: pathToFileURL(input),\n\t\t\tabsolutePath: input\n\t\t};\n\t\tif (/^(?:node|data|http|https):/.test(input)) return { external: input };\n\t\tif (nodeBuiltins.includes(input) && !input.includes(\":\")) return { external: `node:${input}` };\n\t\treturn { specifier: input };\n\t}\n\tif (_isURL(input)) {\n\t\tif (input.protocol === \"file:\") return {\n\t\t\turl: input,\n\t\t\tabsolutePath: fileURLToPath(input)\n\t\t};\n\t\treturn { external: input.href };\n\t}\n\tthrow new TypeError(\"id must be a `string` or `URL`\");\n}\nexport { clearResolveCache, createResolver, resolveModulePath, resolveModuleURL };\n","//#region node_modules/.pnpm/flat@6.0.1/node_modules/flat/index.js\nfunction isBuffer(obj) {\n\treturn obj && obj.constructor && typeof obj.constructor.isBuffer === \"function\" && obj.constructor.isBuffer(obj);\n}\nfunction keyIdentity(key) {\n\treturn key;\n}\nfunction flatten(target, opts) {\n\topts = opts || {};\n\tconst delimiter = opts.delimiter || \".\";\n\tconst maxDepth = opts.maxDepth;\n\tconst transformKey = opts.transformKey || keyIdentity;\n\tconst output = {};\n\tfunction step(object, prev, currentDepth) {\n\t\tcurrentDepth = currentDepth || 1;\n\t\tObject.keys(object).forEach(function(key) {\n\t\t\tconst value = object[key];\n\t\t\tconst isarray = opts.safe && Array.isArray(value);\n\t\t\tconst type = Object.prototype.toString.call(value);\n\t\t\tconst isbuffer = isBuffer(value);\n\t\t\tconst isobject = type === \"[object Object]\" || type === \"[object Array]\";\n\t\t\tconst newKey = prev ? prev + delimiter + transformKey(key) : transformKey(key);\n\t\t\tif (!isarray && !isbuffer && isobject && Object.keys(value).length && (!opts.maxDepth || currentDepth < maxDepth)) return step(value, newKey, currentDepth + 1);\n\t\t\toutput[newKey] = value;\n\t\t});\n\t}\n\tstep(target);\n\treturn output;\n}\nfunction unflatten(target, opts) {\n\topts = opts || {};\n\tconst delimiter = opts.delimiter || \".\";\n\tconst overwrite = opts.overwrite || false;\n\tconst transformKey = opts.transformKey || keyIdentity;\n\tconst result = {};\n\tif (isBuffer(target) || Object.prototype.toString.call(target) !== \"[object Object]\") return target;\n\tfunction getkey(key) {\n\t\tconst parsedKey = Number(key);\n\t\treturn isNaN(parsedKey) || key.indexOf(\".\") !== -1 || opts.object ? key : parsedKey;\n\t}\n\tfunction addKeys(keyPrefix, recipient, target) {\n\t\treturn Object.keys(target).reduce(function(result, key) {\n\t\t\tresult[keyPrefix + delimiter + key] = target[key];\n\t\t\treturn result;\n\t\t}, recipient);\n\t}\n\tfunction isEmpty(val) {\n\t\tconst type = Object.prototype.toString.call(val);\n\t\tconst isArray = type === \"[object Array]\";\n\t\tconst isObject = type === \"[object Object]\";\n\t\tif (!val) return true;\n\t\telse if (isArray) return !val.length;\n\t\telse if (isObject) return !Object.keys(val).length;\n\t}\n\ttarget = Object.keys(target).reduce(function(result, key) {\n\t\tconst type = Object.prototype.toString.call(target[key]);\n\t\tif (!(type === \"[object Object]\" || type === \"[object Array]\") || isEmpty(target[key])) {\n\t\t\tresult[key] = target[key];\n\t\t\treturn result;\n\t\t} else return addKeys(key, result, flatten(target[key], opts));\n\t}, {});\n\tObject.keys(target).forEach(function(key) {\n\t\tconst split = key.split(delimiter).map(transformKey);\n\t\tlet key1 = getkey(split.shift());\n\t\tlet key2 = getkey(split[0]);\n\t\tlet recipient = result;\n\t\twhile (key2 !== void 0) {\n\t\t\tif (key1 === \"__proto__\") return;\n\t\t\tconst type = Object.prototype.toString.call(recipient[key1]);\n\t\t\tconst isobject = type === \"[object Object]\" || type === \"[object Array]\";\n\t\t\tif (!overwrite && !isobject && typeof recipient[key1] !== \"undefined\") return;\n\t\t\tif (overwrite && !isobject || !overwrite && recipient[key1] == null) recipient[key1] = typeof key2 === \"number\" && !opts.object ? [] : {};\n\t\t\trecipient = recipient[key1];\n\t\t\tif (split.length > 0) {\n\t\t\t\tkey1 = getkey(split.shift());\n\t\t\t\tkey2 = getkey(split[0]);\n\t\t\t}\n\t\t}\n\t\trecipient[key1] = unflatten(target[key], opts);\n\t});\n\treturn result;\n}\n//#endregion\nexport { unflatten as n, flatten as t };\n","const suspectProtoRx = /\"(?:_|\\\\u0{2}5[Ff]){2}(?:p|\\\\u0{2}70)(?:r|\\\\u0{2}72)(?:o|\\\\u0{2}6[Ff])(?:t|\\\\u0{2}74)(?:o|\\\\u0{2}6[Ff])(?:_|\\\\u0{2}5[Ff]){2}\"\\s*:/;\nconst suspectConstructorRx = /\"(?:c|\\\\u0063)(?:o|\\\\u006[Ff])(?:n|\\\\u006[Ee])(?:s|\\\\u0073)(?:t|\\\\u0074)(?:r|\\\\u0072)(?:u|\\\\u0075)(?:c|\\\\u0063)(?:t|\\\\u0074)(?:o|\\\\u006[Ff])(?:r|\\\\u0072)\"\\s*:/;\nconst JsonSigRx = /^\\s*[\"[{]|^\\s*-?\\d{1,16}(\\.\\d{1,17})?([Ee][+-]?\\d+)?\\s*$/;\nfunction jsonParseTransform(key, value) {\n  if (key === \"__proto__\" || key === \"constructor\" && value && typeof value === \"object\" && \"prototype\" in value) {\n    warnKeyDropped(key);\n    return;\n  }\n  return value;\n}\nfunction warnKeyDropped(key) {\n  console.warn(`[destr] Dropping \"${key}\" key to prevent prototype pollution.`);\n}\nfunction destr(value, options = {}) {\n  if (typeof value !== \"string\") {\n    return value;\n  }\n  if (value[0] === '\"' && value[value.length - 1] === '\"' && value.indexOf(\"\\\\\") === -1) {\n    return value.slice(1, -1);\n  }\n  const _value = value.trim();\n  if (_value.length <= 9) {\n    switch (_value.toLowerCase()) {\n      case \"true\": {\n        return true;\n      }\n      case \"false\": {\n        return false;\n      }\n      case \"undefined\": {\n        return void 0;\n      }\n      case \"null\": {\n        return null;\n      }\n      case \"nan\": {\n        return Number.NaN;\n      }\n      case \"infinity\": {\n        return Number.POSITIVE_INFINITY;\n      }\n      case \"-infinity\": {\n        return Number.NEGATIVE_INFINITY;\n      }\n    }\n  }\n  if (!JsonSigRx.test(value)) {\n    if (options.strict) {\n      throw new SyntaxError(\"[destr] Invalid JSON\");\n    }\n    return value;\n  }\n  try {\n    if (suspectProtoRx.test(value) || suspectConstructorRx.test(value)) {\n      if (options.strict) {\n        throw new Error(\"[destr] Possible prototype pollution\");\n      }\n      return JSON.parse(value, jsonParseTransform);\n    }\n    return JSON.parse(value);\n  } catch (error) {\n    if (options.strict) {\n      throw error;\n    }\n    return value;\n  }\n}\nfunction safeDestr(value, options = {}) {\n  return destr(value, { ...options, strict: true });\n}\n\nexport { destr as default, destr, safeDestr };\n","function isPlainObject(value) {\n  if (value === null || typeof value !== \"object\") {\n    return false;\n  }\n  const prototype = Object.getPrototypeOf(value);\n  if (prototype !== null && prototype !== Object.prototype && Object.getPrototypeOf(prototype) !== null) {\n    return false;\n  }\n  if (Symbol.iterator in value) {\n    return false;\n  }\n  if (Symbol.toStringTag in value) {\n    return Object.prototype.toString.call(value) === \"[object Module]\";\n  }\n  return true;\n}\n\nfunction _defu(baseObject, defaults, namespace = \".\", merger) {\n  if (!isPlainObject(defaults)) {\n    return _defu(baseObject, {}, namespace, merger);\n  }\n  const object = { ...defaults };\n  for (const key of Object.keys(baseObject)) {\n    if (key === \"__proto__\" || key === \"constructor\") {\n      continue;\n    }\n    const value = baseObject[key];\n    if (value === null || value === void 0) {\n      continue;\n    }\n    if (merger && merger(object, key, value, namespace)) {\n      continue;\n    }\n    if (Array.isArray(value) && Array.isArray(object[key])) {\n      object[key] = [...value, ...object[key]];\n    } else if (isPlainObject(value) && isPlainObject(object[key])) {\n      object[key] = _defu(\n        value,\n        object[key],\n        (namespace ? `${namespace}.` : \"\") + key.toString(),\n        merger\n      );\n    } else {\n      object[key] = value;\n    }\n  }\n  return object;\n}\nfunction createDefu(merger) {\n  return (...arguments_) => (\n    // eslint-disable-next-line unicorn/no-array-reduce\n    arguments_.reduce((p, c) => _defu(p, c, \"\", merger), {})\n  );\n}\nconst defu = createDefu();\nconst defuFn = createDefu((object, key, currentValue) => {\n  if (object[key] !== void 0 && typeof currentValue === \"function\") {\n    object[key] = currentValue(object[key]);\n    return true;\n  }\n});\nconst defuArrayFn = createDefu((object, key, currentValue) => {\n  if (Array.isArray(object[key]) && typeof currentValue === \"function\") {\n    object[key] = currentValue(object[key]);\n    return true;\n  }\n});\n\nexport { createDefu, defu as default, defu, defuArrayFn, defuFn };\n","import { n as unflatten, t as flatten } from \"./_chunks/libs/flat.mjs\";\nimport { existsSync, readFileSync, writeFileSync } from \"node:fs\";\nimport { resolve } from \"node:path\";\nimport { homedir } from \"node:os\";\nimport destr from \"destr\";\nimport { defu } from \"defu\";\n//#region src/index.ts\nconst RE_KEY_VAL = /^\\s*([^\\s=]+)\\s*=\\s*(.*)?\\s*$/;\nconst RE_LINES = /\\n|\\r|\\r\\n/;\n/**\n* The default options for the configuration file.\n*/\nconst defaults = {\n\tname: \".conf\",\n\tdir: process.cwd(),\n\tflat: false\n};\nfunction withDefaults(options) {\n\tif (typeof options === \"string\") options = { name: options };\n\treturn {\n\t\t...defaults,\n\t\t...options\n\t};\n}\nfunction parse(contents, options = {}) {\n\tconst config = {};\n\tconst lines = contents.split(RE_LINES);\n\tfor (const line of lines) {\n\t\tconst match = line.match(RE_KEY_VAL);\n\t\tif (!match) continue;\n\t\tconst key = match[1];\n\t\tif (!key || key === \"__proto__\" || key === \"constructor\") continue;\n\t\tconst value = destr((match[2] || \"\").trim());\n\t\tif (key.endsWith(\"[]\")) {\n\t\t\tconst nkey = key.slice(0, Math.max(0, key.length - 2));\n\t\t\tconfig[nkey] = (config[nkey] || []).concat(value);\n\t\t\tcontinue;\n\t\t}\n\t\tconfig[key] = value;\n\t}\n\treturn options.flat ? config : unflatten(config, { overwrite: true });\n}\n/**\n* Parses a configuration string into an object.\n* @param {string} contents - The configuration data as a raw string.\n* @param {RCOptions} [options={}] - Options to control the parsing behaviour. See {@link RCOptions}.\n* @returns {RC} - The parsed configuration object. See {@link RC}.\n*/\nfunction parseFile(path, options) {\n\tif (!existsSync(path)) return {};\n\treturn parse(readFileSync(path, \"utf8\"), options);\n}\n/**\n* Reads a configuration file from a default or specified location and parses its contents.\n* @param {RCOptions|string} [options] - Options for reading the configuration file, or the name of the configuration file. See {@link RCOptions}.\n* @returns {RC} - The parsed configuration object. See {@link RC}.\n*/\nfunction read(options) {\n\toptions = withDefaults(options);\n\treturn parseFile(resolve(options.dir, options.name), options);\n}\n/**\n* Reads a custom configuration file from a default or specified location and parses its contents.\n* @param {RCOptions|string} [options] - Options for reading the configuration file, or the name of the configuration file. See {@link RCOptions}.\n* @returns {RC} - The parsed configuration object.\n* @deprecated Use {@link readUserConfig} instead, which uses `~/.config` following XDG conventions.\n*/\nfunction readUser(options) {\n\toptions = withDefaults(options);\n\toptions.dir = process.env.XDG_CONFIG_HOME || homedir();\n\treturn read(options);\n}\n/**\n* Serialises a configuration object to a string format.\n* @param {RC} config - The configuration object to serialise. See {@link RC}.\n* @returns {string} - The serialised configuration string.\n*/\nfunction serialize(config) {\n\treturn Object.entries(flatten(config)).map(([key, value]) => `${key}=${JSON.stringify(value)}`).join(\"\\n\");\n}\n/**\n* Writes a configuration object to a file in a default or specified location.\n* @param {RC} config - The configuration object to write. See {@link RC}.\n* @param {RCOptions|string} [options] - Options for writing the configuration file, or the name of the configuration file. See {@link RCOptions}.\n*/\nfunction write(config, options) {\n\toptions = withDefaults(options);\n\twriteFileSync(resolve(options.dir, options.name), serialize(config), { encoding: \"utf8\" });\n}\n/**\n* Writes a custom configuration object to a file in a default or specified location.\n* @param {RC} config - The configuration object to write. See {@link RC}.\n* @param {RCOptions|string} [options] - Options for writing the configuration file, or the name of the configuration file. See {@link RCOptions}.\n* @deprecated Use {@link writeUserConfig} instead, which uses `~/.config` following XDG conventions.\n*/\nfunction writeUser(config, options) {\n\toptions = withDefaults(options);\n\toptions.dir = process.env.XDG_CONFIG_HOME || homedir();\n\twrite(config, options);\n}\n/**\n* Reads a configuration file from `$XDG_CONFIG_HOME` or `$HOME/.config` and parses its contents.\n* @param {RCOptions|string} [options] - Options for reading the configuration file, or the name of the configuration file. See {@link RCOptions}.\n* @returns {RC} - The parsed configuration object.\n*/\nfunction readUserConfig(options) {\n\toptions = withDefaults(options);\n\toptions.dir = process.env.XDG_CONFIG_HOME || resolve(homedir(), \".config\");\n\treturn read(options);\n}\n/**\n* Writes a configuration object to a file in `$XDG_CONFIG_HOME` or `$HOME/.config`.\n* @param {RC} config - The configuration object to write. See {@link RC}.\n* @param {RCOptions|string} [options] - Options for writing the configuration file, or the name of the configuration file. See {@link RCOptions}.\n*/\nfunction writeUserConfig(config, options) {\n\toptions = withDefaults(options);\n\toptions.dir = process.env.XDG_CONFIG_HOME || resolve(homedir(), \".config\");\n\twrite(config, options);\n}\n/**\n* Updates a configuration object in `$XDG_CONFIG_HOME` or `$HOME/.config` by merging and writing the result.\n* @param {RC} config - The configuration object to update. See {@link RC}.\n* @param {RCOptions|string} [options] - Options for updating the configuration file, or the name of the configuration file. See {@link RCOptions}.\n* @returns {RC} - The updated configuration object.\n*/\nfunction updateUserConfig(config, options) {\n\toptions = withDefaults(options);\n\toptions.dir = process.env.XDG_CONFIG_HOME || resolve(homedir(), \".config\");\n\treturn update(config, options);\n}\n/**\n* Updates an existing configuration object by merging it with the contents of a configuration file and writing the result.\n* @param {RC} config - The configuration object to update. See {@link RC}.\n* @param {RCOptions|string} [options] - Options for updating the configuration file, or the name of the configuration file. See {@link RCOptions}.\n* @returns {RC} - The updated configuration object. See {@link RC}.\n*/\nfunction update(config, options) {\n\toptions = withDefaults(options);\n\tif (!options.flat) config = unflatten(config, { overwrite: true });\n\tconst newConfig = defu(config, read(options));\n\twrite(newConfig, options);\n\treturn newConfig;\n}\n/**\n* Updates a custom configuration object by merging it with the contents of a configuration file in a default location and writing the result.\n* @param {RC} config - The configuration object to update. See {@link RC}.\n* @param {RCOptions|string} [options] - Options for updating the configuration file, or the name of the configuration file. See {@link RCOptions}.\n* @returns {RC} - The updated configuration object. See {@link RC}.\n* @deprecated Use {@link updateUserConfig} instead, which uses `~/.config` following XDG conventions.\n*/\nfunction updateUser(config, options) {\n\toptions = withDefaults(options);\n\toptions.dir = process.env.XDG_CONFIG_HOME || homedir();\n\treturn update(config, options);\n}\n//#endregion\nexport { defaults, parse, parseFile, read, readUser, readUserConfig, serialize, update, updateUser, updateUserConfig, write, writeUser, writeUserConfig };\n","import\"node:module\";var e=Object.create,t=Object.defineProperty,n=Object.getOwnPropertyDescriptor,r=Object.getOwnPropertyNames,i=Object.getPrototypeOf,a=Object.prototype.hasOwnProperty,o=(e,t)=>()=>(t||e((t={exports:{}}).exports,t),t.exports),s=(e,i,o,s)=>{if(i&&typeof i==`object`||typeof i==`function`)for(var c=r(i),l=0,u=c.length,d;l<u;l++)d=c[l],!a.call(e,d)&&d!==o&&t(e,d,{get:(e=>i[e]).bind(null,d),enumerable:!(s=n(i,d))||s.enumerable});return e},c=(n,r,a)=>(a=n==null?{}:e(i(n)),s(r||!n||!n.__esModule?t(a,`default`,{value:n,enumerable:!0}):a,n));export{c as n,o as t};","import{t as e}from\"../rolldown-runtime.mjs\";var t=e(((e,t)=>{t.exports.Space_Separator=/[\\u1680\\u2000-\\u200A\\u202F\\u205F\\u3000]/,t.exports.ID_Start=/[\\xAA\\xB5\\xBA\\xC0-\\xD6\\xD8-\\xF6\\xF8-\\u02C1\\u02C6-\\u02D1\\u02E0-\\u02E4\\u02EC\\u02EE\\u0370-\\u0374\\u0376\\u0377\\u037A-\\u037D\\u037F\\u0386\\u0388-\\u038A\\u038C\\u038E-\\u03A1\\u03A3-\\u03F5\\u03F7-\\u0481\\u048A-\\u052F\\u0531-\\u0556\\u0559\\u0561-\\u0587\\u05D0-\\u05EA\\u05F0-\\u05F2\\u0620-\\u064A\\u066E\\u066F\\u0671-\\u06D3\\u06D5\\u06E5\\u06E6\\u06EE\\u06EF\\u06FA-\\u06FC\\u06FF\\u0710\\u0712-\\u072F\\u074D-\\u07A5\\u07B1\\u07CA-\\u07EA\\u07F4\\u07F5\\u07FA\\u0800-\\u0815\\u081A\\u0824\\u0828\\u0840-\\u0858\\u0860-\\u086A\\u08A0-\\u08B4\\u08B6-\\u08BD\\u0904-\\u0939\\u093D\\u0950\\u0958-\\u0961\\u0971-\\u0980\\u0985-\\u098C\\u098F\\u0990\\u0993-\\u09A8\\u09AA-\\u09B0\\u09B2\\u09B6-\\u09B9\\u09BD\\u09CE\\u09DC\\u09DD\\u09DF-\\u09E1\\u09F0\\u09F1\\u09FC\\u0A05-\\u0A0A\\u0A0F\\u0A10\\u0A13-\\u0A28\\u0A2A-\\u0A30\\u0A32\\u0A33\\u0A35\\u0A36\\u0A38\\u0A39\\u0A59-\\u0A5C\\u0A5E\\u0A72-\\u0A74\\u0A85-\\u0A8D\\u0A8F-\\u0A91\\u0A93-\\u0AA8\\u0AAA-\\u0AB0\\u0AB2\\u0AB3\\u0AB5-\\u0AB9\\u0ABD\\u0AD0\\u0AE0\\u0AE1\\u0AF9\\u0B05-\\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u124D\\u1250-\\u1256\\u1258\\u125A-\\u125D\\u1260-\\u1288\\u128A-\\u128D\\u1290-\\u12B0\\u12B2-\\u12B5\\u12B8-\\u12BE\\u12C0\\u12C2-\\u12C5\\u12C8-\\u12D6\\u12D8-\\u1310\\u1312-\\u1315\\u1318-\\u135A\\u1380-\\u138F\\u13A0-\\u13F5\\u13F8-\\u13FD\\u1401-\\u166C\\u166F-\\u167F\\u1681-\\u169A\\u16A0-\\u16EA\\u16EE-\\u16F8\\u1700-\\u170C\\u170E-\\u1711\\u1720-\\u1731\\u1740-\\u1751\\u1760-\\u176C\\u176E-\\u1770\\u1780-\\u17B3\\u17D7\\u17DC\\u1820-\\u1877\\u1880-\\u1884\\u1887-\\u18A8\\u18AA\\u18B0-\\u18F5\\u1900-\\u191E\\u1950-\\u196D\\u1970-\\u1974\\u1980-\\u19AB\\u19B0-\\u19C9\\u1A00-\\u1A16\\u1A20-\\u1A54\\u1AA7\\u1B05-\\u1B33\\u1B45-\\u1B4B\\u1B83-\\u1BA0\\u1BAE\\u1BAF\\u1BBA-\\u1BE5\\u1C00-\\u1C23\\u1C4D-\\u1C4F\\u1C5A-\\u1C7D\\u1C80-\\u1C88\\u1CE9-\\u1CEC\\u1CEE-\\u1CF1\\u1CF5\\u1CF6\\u1D00-\\u1DBF\\u1E00-\\u1F15\\u1F18-\\u1F1D\\u1F20-\\u1F45\\u1F48-\\u1F4D\\u1F50-\\u1F57\\u1F59\\u1F5B\\u1F5D\\u1F5F-\\u1F7D\\u1F80-\\u1FB4\\u1FB6-\\u1FBC\\u1FBE\\u1FC2-\\u1FC4\\u1FC6-\\u1FCC\\u1FD0-\\u1FD3\\u1FD6-\\u1FDB\\u1FE0-\\u1FEC\\u1FF2-\\u1FF4\\u1FF6-\\u1FFC\\u2071\\u207F\\u2090-\\u209C\\u2102\\u2107\\u210A-\\u2113\\u2115\\u2119-\\u211D\\u2124\\u2126\\u2128\\u212A-\\u212D\\u212F-\\u2139\\u213C-\\u213F\\u2145-\\u2149\\u214E\\u2160-\\u2188\\u2C00-\\u2C2E\\u2C30-\\u2C5E\\u2C60-\\u2CE4\\u2CEB-\\u2CEE\\u2CF2\\u2CF3\\u2D00-\\u2D25\\u2D27\\u2D2D\\u2D30-\\u2D67\\u2D6F\\u2D80-\\u2D96\\u2DA0-\\u2DA6\\u2DA8-\\u2DAE\\u2DB0-\\u2DB6\\u2DB8-\\u2DBE\\u2DC0-\\u2DC6\\u2DC8-\\u2DCE\\u2DD0-\\u2DD6\\u2DD8-\\u2DDE\\u2E2F\\u3005-\\u3007\\u3021-\\u3029\\u3031-\\u3035\\u3038-\\u303C\\u3041-\\u3096\\u309D-\\u309F\\u30A1-\\u30FA\\u30FC-\\u30FF\\u3105-\\u312E\\u3131-\\u318E\\u31A0-\\u31BA\\u31F0-\\u31FF\\u3400-\\u4DB5\\u4E00-\\u9FEA\\uA000-\\uA48C\\uA4D0-\\uA4FD\\uA500-\\uA60C\\uA610-\\uA61F\\uA62A\\uA62B\\uA640-\\uA66E\\uA67F-\\uA69D\\uA6A0-\\uA6EF\\uA717-\\uA71F\\uA722-\\uA788\\uA78B-\\uA7AE\\uA7B0-\\uA7B7\\uA7F7-\\uA801\\uA803-\\uA805\\uA807-\\uA80A\\uA80C-\\uA822\\uA840-\\uA873\\uA882-\\uA8B3\\uA8F2-\\uA8F7\\uA8FB\\uA8FD\\uA90A-\\uA925\\uA930-\\uA946\\uA960-\\uA97C\\uA984-\\uA9B2\\uA9CF\\uA9E0-\\uA9E4\\uA9E6-\\uA9EF\\uA9FA-\\uA9FE\\uAA00-\\uAA28\\uAA40-\\uAA42\\uAA44-\\uAA4B\\uAA60-\\uAA76\\uAA7A\\uAA7E-\\uAAAF\\uAAB1\\uAAB5\\uAAB6\\uAAB9-\\uAABD\\uAAC0\\uAAC2\\uAADB-\\uAADD\\uAAE0-\\uAAEA\\uAAF2-\\uAAF4\\uAB01-\\uAB06\\uAB09-\\uAB0E\\uAB11-\\uAB16\\uAB20-\\uAB26\\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E33\\uDE60-\\uDE7C\\uDE80-\\uDE9C\\uDEC0-\\uDEC7\\uDEC9-\\uDEE4\\uDF00-\\uDF35\\uDF40-\\uDF55\\uDF60-\\uDF72\\uDF80-\\uDF91]|\\uD803[\\uDC00-\\uDC48\\uDC80-\\uDCB2\\uDCC0-\\uDCF2]|\\uD804[\\uDC03-\\uDC37\\uDC83-\\uDCAF\\uDCD0-\\uDCE8\\uDD03-\\uDD26\\uDD50-\\uDD72\\uDD76\\uDD83-\\uDDB2\\uDDC1-\\uDDC4\\uDDDA\\uDDDC\\uDE00-\\uDE11\\uDE13-\\uDE2B\\uDE80-\\uDE86\\uDE88\\uDE8A-\\uDE8D\\uDE8F-\\uDE9D\\uDE9F-\\uDEA8\\uDEB0-\\uDEDE\\uDF05-\\uDF0C\\uDF0F\\uDF10\\uDF13-\\uDF28\\uDF2A-\\uDF30\\uDF32\\uDF33\\uDF35-\\uDF39\\uDF3D\\uDF50\\uDF5D-\\uDF61]|\\uD805[\\uDC00-\\uDC34\\uDC47-\\uDC4A\\uDC80-\\uDCAF\\uDCC4\\uDCC5\\uDCC7\\uDD80-\\uDDAE\\uDDD8-\\uDDDB\\uDE00-\\uDE2F\\uDE44\\uDE80-\\uDEAA\\uDF00-\\uDF19]|\\uD806[\\uDCA0-\\uDCDF\\uDCFF\\uDE00\\uDE0B-\\uDE32\\uDE3A\\uDE50\\uDE5C-\\uDE83\\uDE86-\\uDE89\\uDEC0-\\uDEF8]|\\uD807[\\uDC00-\\uDC08\\uDC0A-\\uDC2E\\uDC40\\uDC72-\\uDC8F\\uDD00-\\uDD06\\uDD08\\uDD09\\uDD0B-\\uDD30\\uDD46]|\\uD808[\\uDC00-\\uDF99]|\\uD809[\\uDC00-\\uDC6E\\uDC80-\\uDD43]|[\\uD80C\\uD81C-\\uD820\\uD840-\\uD868\\uD86A-\\uD86C\\uD86F-\\uD872\\uD874-\\uD879][\\uDC00-\\uDFFF]|\\uD80D[\\uDC00-\\uDC2E]|\\uD811[\\u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C\\uDE7E\\uDE80-\\uDE89\\uDE8B-\\uDE9B\\uDEA1-\\uDEA3\\uDEA5-\\uDEA9\\uDEAB-\\uDEBB]|\\uD869[\\uDC00-\\uDED6\\uDF00-\\uDFFF]|\\uD86D[\\uDC00-\\uDF34\\uDF40-\\uDFFF]|\\uD86E[\\uDC00-\\uDC1D\\uDC20-\\uDFFF]|\\uD873[\\uDC00-\\uDEA1\\uDEB0-\\uDFFF]|\\uD87A[\\uDC00-\\uDFE0]|\\uD87E[\\uDC00-\\uDE1D]/,t.exports.ID_Continue=/[\\xAA\\xB5\\xBA\\xC0-\\xD6\\xD8-\\xF6\\xF8-\\u02C1\\u02C6-\\u02D1\\u02E0-\\u02E4\\u02EC\\u02EE\\u0300-\\u0374\\u0376\\u0377\\u037A-\\u037D\\u037F\\u0386\\u0388-\\u038A\\u038C\\u038E-\\u03A1\\u03A3-\\u03F5\\u03F7-\\u0481\\u0483-\\u0487\\u048A-\\u052F\\u0531-\\u0556\\u0559\\u0561-\\u0587\\u0591-\\u05BD\\u05BF\\u05C1\\u05C2\\u05C4\\u05C5\\u05C7\\u05D0-\\u05EA\\u05F0-\\u05F2\\u0610-\\u061A\\u0620-\\u0669\\u066E-\\u06D3\\u06D5-\\u06DC\\u06DF-\\u06E8\\u06EA-\\u06FC\\u06FF\\u0710-\\u074A\\u074D-\\u07B1\\u07C0-\\u07F5\\u07FA\\u0800-\\u082D\\u0840-\\u085B\\u0860-\\u086A\\u08A0-\\u08B4\\u08B6-\\u08BD\\u08D4-\\u08E1\\u08E3-\\u0963\\u0966-\\u096F\\u0971-\\u0983\\u0985-\\u098C\\u098F\\u0990\\u0993-\\u09A8\\u09AA-\\u09B0\\u09B2\\u09B6-\\u09B9\\u09BC-\\u09C4\\u09C7\\u09C8\\u09CB-\\u09CE\\u09D7\\u09DC\\u09DD\\u09DF-\\u09E3\\u09E6-\\u09F1\\u09FC\\u0A01-\\u0A03\\u0A05-\\u0A0A\\u0A0F\\u0A10\\u0A13-\\u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0CCD\\u0CD5\\u0CD6\\u0CDE\\u0CE0-\\u0CE3\\u0CE6-\\u0CEF\\u0CF1\\u0CF2\\u0D00-\\u0D03\\u0D05-\\u0D0C\\u0D0E-\\u0D10\\u0D12-\\u0D44\\u0D46-\\u0D48\\u0D4A-\\u0D4E\\u0D54-\\u0D57\\u0D5F-\\u0D63\\u0D66-\\u0D6F\\u0D7A-\\u0D7F\\u0D82\\u0D83\\u0D85-\\u0D96\\u0D9A-\\u0DB1\\u0DB3-\\u0DBB\\u0DBD\\u0DC0-\\u0DC6\\u0DCA\\u0DCF-\\u0DD4\\u0DD6\\u0DD8-\\u0DDF\\u0DE6-\\u0DEF\\u0DF2\\u0DF3\\u0E01-\\u0E3A\\u0E40-\\u0E4E\\u0E50-\\u0E59\\u0E81\\u0E82\\u0E84\\u0E87\\u0E88\\u0E8A\\u0E8D\\u0E94-\\u0E97\\u0E99-\\u0E9F\\u0EA1-\\u0EA3\\u0EA5\\u0EA7\\u0EAA\\u0EAB\\u0EAD-\\u0EB9\\u0EBB-\\u0EBD\\u0EC0-\\u0EC4\\u0EC6\\u0EC8-\\u0ECD\\u0ED0-\\u0ED9\\u0EDC-\\u0EDF\\u0F00\\u0F18\\u0F19\\u0F20-\\u0F29\\u0F35\\u0F37\\u0F39\\u0F3E-\\u0F47\\u0F49-\\u0F6C\\u0F71-\\u0F84\\u0F86-\\u0F97\\u0F99-\\u0FBC\\u0FC6\\u1000-\\u1049\\u1050-\\u109D\\u10A0-\\u10C5\\u10C7\\u10CD\\u10D0-\\u10FA\\u10FC-\\u1248\\u124A-\\u124D\\u1250-\\u1256\\u1258\\u125A-\\u125D\\u1260-\\u1288\\u128A-\\u128D\\u1290-\\u12B0\\u12B2-\\u12B5\\u12B8-\\u12BE\\u12C0\\u12C2-\\u12C5\\u12C8-\\u12D6\\u12D8-\\u1310\\u1312-\\u1315\\u1318-\\u135A\\u135D-\\u135F\\u1380-\\u138F\\u13A0-\\u13F5\\u13F8-\\u13FD\\u1401-\\u166C\\u166F-\\u167F\\u1681-\\u169A\\u16A0-\\u16EA\\u16EE-\\u16F8\\u1700-\\u170C\\u170E-\\u1714\\u1720-\\u1734\\u1740-\\u1753\\u1760-\\u176C\\u176E-\\u1770\\u1772\\u1773\\u1780-\\u17D3\\u17D7\\u17DC\\u17DD\\u17E0-\\u17E9\\u180B-\\u180D\\u1810-\\u1819\\u1820-\\u1877\\u1880-\\u18AA\\u18B0-\\u18F5\\u1900-\\u191E\\u1920-\\u192B\\u1930-\\u193B\\u1946-\\u196D\\u1970-\\u1974\\u1980-\\u19AB\\u19B0-\\u19C9\\u19D0-\\u19D9\\u1A00-\\u1A1B\\u1A20-\\u1A5E\\u1A60-\\u1A7C\\u1A7F-\\u1A89\\u1A90-\\u1A99\\u1AA7\\u1AB0-\\u1ABD\\u1B00-\\u1B4B\\u1B50-\\u1B59\\u1B6B-\\u1B73\\u1B80-\\u1BF3\\u1C00-\\u1C37\\u1C40-\\u1C49\\u1C4D-\\u1C7D\\u1C80-\\u1C88\\u1CD0-\\u1CD2\\u1CD4-\\u1CF9\\u1D00-\\u1DF9\\u1DFB-\\u1F15\\u1F18-\\u1F1D\\u1F20-\\u1F45\\u1F48-\\u1F4D\\u1F50-\\u1F57\\u1F59\\u1F5B\\u1F5D\\u1F5F-\\u1F7D\\u1F80-\\u1FB4\\u1FB6-\\u1FBC\\u1FBE\\u1FC2-\\u1FC4\\u1FC6-\\u1FCC\\u1FD0-\\u1FD3\\u1FD6-\\u1FDB\\u1FE0-\\u1FEC\\u1FF2-\\u1FF4\\u1FF6-\\u1FFC\\u203F\\u2040\\u2054\\u2071\\u207F\\u2090-\\u209C\\u20D0-\\u20DC\\u20E1\\u20E5-\\u20F0\\u2102\\u2107\\u210A-\\u2113\\u2115\\u2119-\\u211D\\u2124\\u2126\\u2128\\u212A-\\u212D\\u212F-\\u2139\\u213C-\\u213F\\u2145-\\u2149\\u214E\\u2160-\\u2188\\u2C00-\\u2C2E\\u2C30-\\u2C5E\\u2C60-\\u2CE4\\u2CEB-\\u2CF3\\u2D00-\\u2D25\\u2D27\\u2D2D\\u2D30-\\u2D67\\u2D6F\\u2D7F-\\u2D96\\u2DA0-\\u2DA6\\u2DA8-\\u2DAE\\u2DB0-\\u2DB6\\u2DB8-\\u2DBE\\u2DC0-\\u2DC6\\u2DC8-\\u2DCE\\u2DD0-\\u2DD6\\u2DD8-\\u2DDE\\u2DE0-\\u2DFF\\u2E2F\\u3005-\\u3007\\u3021-\\u302F\\u3031-\\u3035\\u3038-\\u303C\\u3041-\\u3096\\u3099\\u309A\\u309D-\\u309F\\u30A1-\\u30FA\\u30FC-\\u30FF\\u3105-\\u312E\\u3131-\\u318E\\u31A0-\\u31BA\\u31F0-\\u31FF\\u3400-\\u4DB5\\u4E00-\\u9FEA\\uA000-\\uA48C\\uA4D0-\\uA4FD\\uA500-\\uA60C\\uA610-\\uA62B\\uA640-\\uA66F\\uA674-\\uA67D\\uA67F-\\uA6F1\\uA717-\\uA71F\\uA722-\\uA788\\uA78B-\\uA7AE\\uA7B0-\\uA7B7\\uA7F7-\\uA827\\uA840-\\uA873\\uA880-\\uA8C5\\uA8D0-\\uA8D9\\uA8E0-\\uA8F7\\uA8FB\\uA8FD\\uA900-\\uA92D\\uA930-\\uA953\\uA960-\\uA97C\\uA980-\\uA9C0\\uA9CF-\\uA9D9\\uA9E0-\\uA9FE\\uAA00-\\uAA36\\uAA40-\\uAA4D\\uAA50-\\uAA59\\uAA60-\\uAA76\\uAA7A-\\uAAC2\\uAADB-\\uAADD\\uAAE0-\\uAAEF\\uAAF2-\\uAAF6\\uAB01-\\uAB06\\uAB09-\\uAB0E\\uAB11-\\uAB16\\uAB20-\\uAB26\\uAB28-\\uAB2E\\uAB30-\\uAB5A\\uAB5C-\\uAB65\\uAB70-\\uABEA\\uABEC\\uABED\\uABF0-\\uABF9\\uAC00-\\uD7A3\\uD7B0-\\uD7C6\\uD7CB-\\uD7FB\\uF900-\\uFA6D\\uFA70-\\uFAD9\\uFB00-\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uDC59\\uDC72-\\uDC8F\\uDC92-\\uDCA7\\uDCA9-\\uDCB6\\uDD00-\\uDD06\\uDD08\\uDD09\\uDD0B-\\uDD36\\uDD3A\\uDD3C\\uDD3D\\uDD3F-\\uDD47\\uDD50-\\uDD59]|\\uD808[\\uDC00-\\uDF99]|\\uD809[\\uDC00-\\uDC6E\\uDC80-\\uDD43]|[\\uD80C\\uD81C-\\uD820\\uD840-\\uD868\\uD86A-\\uD86C\\uD86F-\\uD872\\uD874-\\uD879][\\uDC00-\\uDFFF]|\\uD80D[\\uDC00-\\uDC2E]|\\uD811[\\uDC00-\\uDE46]|\\uD81A[\\uDC00-\\uDE38\\uDE40-\\uDE5E\\uDE60-\\uDE69\\uDED0-\\uDEED\\uDEF0-\\uDEF4\\uDF00-\\uDF36\\uDF40-\\uDF43\\uDF50-\\uDF59\\uDF63-\\uDF77\\uDF7D-\\uDF8F]|\\uD81B[\\uDF00-\\uDF44\\uDF50-\\uDF7E\\uDF8F-\\uDF9F\\uDFE0\\uDFE1]|\\uD821[\\uDC00-\\uDFEC]|\\uD822[\\uDC00-\\uDEF2]|\\uD82C[\\uDC00-\\uDD1E\\uDD70-\\uDEFB]|\\uD82F[\\uDC00-\\uDC6A\\uDC70-\\uDC7C\\uDC80-\\uDC88\\uDC90-\\uDC99\\uDC9D\\uDC9E]|\\uD834[\\uDD65-\\uDD69\\uDD6D-\\uDD72\\uDD7B-\\uDD82\\uDD85-\\uDD8B\\uDDAA-\\uDDAD\\uDE42-\\uDE44]|\\uD835[\\uDC00-\\uDC54\\uDC56-\\uDC9C\\uDC9E\\uDC9F\\uDCA2\\uDCA5\\uDCA6\\uDCA9-\\uDCAC\\uDCAE-\\uDCB9\\uDCBB\\uDCBD-\\uDCC3\\uDCC5-\\uDD05\\uDD07-\\uDD0A\\uDD0D-\\uDD14\\uDD16-\\uDD1C\\uDD1E-\\uDD39\\uDD3B-\\uDD3E\\uDD40-\\uDD44\\uDD46\\uDD4A-\\uDD50\\uDD52-\\uDEA5\\uDEA8-\\uDEC0\\uDEC2-\\uDEDA\\uDEDC-\\uDEFA\\uDEFC-\\uDF14\\uDF16-\\uDF34\\uDF36-\\uDF4E\\uDF50-\\uDF6E\\uDF70-\\uDF88\\uDF8A-\\uDFA8\\uDFAA-\\uDFC2\\uDFC4-\\uDFCB\\uDFCE-\\uDFFF]|\\uD836[\\uDE00-\\uDE36\\uDE3B-\\uDE6C\\uDE75\\uDE84\\uDE9B-\\uDE9F\\uDEA1-\\uDEAF]|\\uD838[\\uDC00-\\uDC06\\uDC08-\\uDC18\\uDC1B-\\uDC21\\uDC23\\uDC24\\uDC26-\\uDC2A]|\\uD83A[\\uDC00-\\uDCC4\\uDCD0-\\uDCD6\\uDD00-\\uDD4A\\uDD50-\\uDD59]|\\uD83B[\\uDE00-\\uDE03\\uDE05-\\uDE1F\\uDE21\\uDE22\\uDE24\\uDE27\\uDE29-\\uDE32\\uDE34-\\uDE37\\uDE39\\uDE3B\\uDE42\\uDE47\\uDE49\\uDE4B\\uDE4D-\\uDE4F\\uDE51\\uDE52\\uDE54\\uDE57\\uDE59\\uDE5B\\uDE5D\\uDE5F\\uDE61\\uDE62\\uDE64\\uDE67-\\uDE6A\\uDE6C-\\uDE72\\uDE74-\\uDE77\\uDE79-\\uDE7C\\uDE7E\\uDE80-\\uDE89\\uDE8B-\\uDE9B\\uDEA1-\\uDEA3\\uDEA5-\\uDEA9\\uDEAB-\\uDEBB]|\\uD869[\\uDC00-\\uDED6\\uDF00-\\uDFFF]|\\uD86D[\\uDC00-\\uDF34\\uDF40-\\uDFFF]|\\uD86E[\\uDC00-\\uDC1D\\uDC20-\\uDFFF]|\\uD873[\\uDC00-\\uDEA1\\uDEB0-\\uDFFF]|\\uD87A[\\uDC00-\\uDFE0]|\\uD87E[\\uDC00-\\uDE1D]|\\uDB40[\\uDD00-\\uDDEF]/})),n=e(((e,n)=>{let r=t();n.exports={isSpaceSeparator(e){return typeof e==`string`&&r.Space_Separator.test(e)},isIdStartChar(e){return typeof e==`string`&&(e>=`a`&&e<=`z`||e>=`A`&&e<=`Z`||e===`$`||e===`_`||r.ID_Start.test(e))},isIdContinueChar(e){return typeof e==`string`&&(e>=`a`&&e<=`z`||e>=`A`&&e<=`Z`||e>=`0`&&e<=`9`||e===`$`||e===`_`||e===`‌`||e===`‍`||r.ID_Continue.test(e))},isDigit(e){return typeof e==`string`&&/[0-9]/.test(e)},isHexDigit(e){return typeof e==`string`&&/[0-9A-Fa-f]/.test(e)}}})),r=e(((e,t)=>{let r=n(),i,a,o,s,c,l,u,d,f;t.exports=function(e,t){i=String(e),a=`start`,o=[],s=0,c=1,l=0,u=void 0,d=void 0,f=void 0;do u=y(),O[a]();while(u.type!==`eof`);return typeof t==`function`?p({\"\":f},``,t):f};function p(e,t,n){let r=e[t];if(typeof r==`object`&&r)if(Array.isArray(r))for(let e=0;e<r.length;e++){let t=String(e),i=p(r,t,n);i===void 0?delete r[t]:Object.defineProperty(r,t,{value:i,writable:!0,enumerable:!0,configurable:!0})}else for(let e in r){let t=p(r,e,n);t===void 0?delete r[e]:Object.defineProperty(r,e,{value:t,writable:!0,enumerable:!0,configurable:!0})}return n.call(e,t,r)}let m,h,g,_,v;function y(){for(m=`default`,h=``,g=!1,_=1;;){v=b();let e=S[m]();if(e)return e}}function b(){if(i[s])return String.fromCodePoint(i.codePointAt(s))}function x(){let e=b();return e===`\n`?(c++,l=0):e?l+=e.length:l++,e&&(s+=e.length),e}let S={default(){switch(v){case`\t`:case`\\v`:case`\\f`:case` `:case`\\xA0`:case`﻿`:case`\n`:case`\\r`:case`\\u2028`:case`\\u2029`:x();return;case`/`:x(),m=`comment`;return;case void 0:return x(),C(`eof`)}if(r.isSpaceSeparator(v)){x();return}return S[a]()},comment(){switch(v){case`*`:x(),m=`multiLineComment`;return;case`/`:x(),m=`singleLineComment`;return}throw j(x())},multiLineComment(){switch(v){case`*`:x(),m=`multiLineCommentAsterisk`;return;case void 0:throw j(x())}x()},multiLineCommentAsterisk(){switch(v){case`*`:x();return;case`/`:x(),m=`default`;return;case void 0:throw j(x())}x(),m=`multiLineComment`},singleLineComment(){switch(v){case`\n`:case`\\r`:case`\\u2028`:case`\\u2029`:x(),m=`default`;return;case void 0:return x(),C(`eof`)}x()},value(){switch(v){case`{`:case`[`:return C(`punctuator`,x());case`n`:return x(),w(`ull`),C(`null`,null);case`t`:return x(),w(`rue`),C(`boolean`,!0);case`f`:return x(),w(`alse`),C(`boolean`,!1);case`-`:case`+`:x()===`-`&&(_=-1),m=`sign`;return;case`.`:h=x(),m=`decimalPointLeading`;return;case`0`:h=x(),m=`zero`;return;case`1`:case`2`:case`3`:case`4`:case`5`:case`6`:case`7`:case`8`:case`9`:h=x(),m=`decimalInteger`;return;case`I`:return x(),w(`nfinity`),C(`numeric`,1/0);case`N`:return x(),w(`aN`),C(`numeric`,NaN);case`\"`:case`'`:g=x()===`\"`,h=``,m=`string`;return}throw j(x())},identifierNameStartEscape(){if(v!==`u`)throw j(x());x();let e=D();switch(e){case`$`:case`_`:break;default:if(!r.isIdStartChar(e))throw N();break}h+=e,m=`identifierName`},identifierName(){switch(v){case`$`:case`_`:case`‌`:case`‍`:h+=x();return;case`\\\\`:x(),m=`identifierNameEscape`;return}if(r.isIdContinueChar(v)){h+=x();return}return C(`identifier`,h)},identifierNameEscape(){if(v!==`u`)throw j(x());x();let e=D();switch(e){case`$`:case`_`:case`‌`:case`‍`:break;default:if(!r.isIdContinueChar(e))throw N();break}h+=e,m=`identifierName`},sign(){switch(v){case`.`:h=x(),m=`decimalPointLeading`;return;case`0`:h=x(),m=`zero`;return;case`1`:case`2`:case`3`:case`4`:case`5`:case`6`:case`7`:case`8`:case`9`:h=x(),m=`decimalInteger`;return;case`I`:return x(),w(`nfinity`),C(`numeric`,_*(1/0));case`N`:return x(),w(`aN`),C(`numeric`,NaN)}throw j(x())},zero(){switch(v){case`.`:h+=x(),m=`decimalPoint`;return;case`e`:case`E`:h+=x(),m=`decimalExponent`;return;case`x`:case`X`:h+=x(),m=`hexadecimal`;return}return C(`numeric`,_*0)},decimalInteger(){switch(v){case`.`:h+=x(),m=`decimalPoint`;return;case`e`:case`E`:h+=x(),m=`decimalExponent`;return}if(r.isDigit(v)){h+=x();return}return C(`numeric`,_*Number(h))},decimalPointLeading(){if(r.isDigit(v)){h+=x(),m=`decimalFraction`;return}throw j(x())},decimalPoint(){switch(v){case`e`:case`E`:h+=x(),m=`decimalExponent`;return}if(r.isDigit(v)){h+=x(),m=`decimalFraction`;return}return C(`numeric`,_*Number(h))},decimalFraction(){switch(v){case`e`:case`E`:h+=x(),m=`decimalExponent`;return}if(r.isDigit(v)){h+=x();return}return C(`numeric`,_*Number(h))},decimalExponent(){switch(v){case`+`:case`-`:h+=x(),m=`decimalExponentSign`;return}if(r.isDigit(v)){h+=x(),m=`decimalExponentInteger`;return}throw j(x())},decimalExponentSign(){if(r.isDigit(v)){h+=x(),m=`decimalExponentInteger`;return}throw j(x())},decimalExponentInteger(){if(r.isDigit(v)){h+=x();return}return C(`numeric`,_*Number(h))},hexadecimal(){if(r.isHexDigit(v)){h+=x(),m=`hexadecimalInteger`;return}throw j(x())},hexadecimalInteger(){if(r.isHexDigit(v)){h+=x();return}return C(`numeric`,_*Number(h))},string(){switch(v){case`\\\\`:x(),h+=T();return;case`\"`:if(g)return x(),C(`string`,h);h+=x();return;case`'`:if(!g)return x(),C(`string`,h);h+=x();return;case`\n`:case`\\r`:throw j(x());case`\\u2028`:case`\\u2029`:P(v);break;case void 0:throw j(x())}h+=x()},start(){switch(v){case`{`:case`[`:return C(`punctuator`,x())}m=`value`},beforePropertyName(){switch(v){case`$`:case`_`:h=x(),m=`identifierName`;return;case`\\\\`:x(),m=`identifierNameStartEscape`;return;case`}`:return C(`punctuator`,x());case`\"`:case`'`:g=x()===`\"`,m=`string`;return}if(r.isIdStartChar(v)){h+=x(),m=`identifierName`;return}throw j(x())},afterPropertyName(){if(v===`:`)return C(`punctuator`,x());throw j(x())},beforePropertyValue(){m=`value`},afterPropertyValue(){switch(v){case`,`:case`}`:return C(`punctuator`,x())}throw j(x())},beforeArrayValue(){if(v===`]`)return C(`punctuator`,x());m=`value`},afterArrayValue(){switch(v){case`,`:case`]`:return C(`punctuator`,x())}throw j(x())},end(){throw j(x())}};function C(e,t){return{type:e,value:t,line:c,column:l}}function w(e){for(let t of e){if(b()!==t)throw j(x());x()}}function T(){switch(b()){case`b`:return x(),`\\b`;case`f`:return x(),`\\f`;case`n`:return x(),`\n`;case`r`:return x(),`\\r`;case`t`:return x(),`\t`;case`v`:return x(),`\\v`;case`0`:if(x(),r.isDigit(b()))throw j(x());return`\\0`;case`x`:return x(),E();case`u`:return x(),D();case`\n`:case`\\u2028`:case`\\u2029`:return x(),``;case`\\r`:return x(),b()===`\n`&&x(),``;case`1`:case`2`:case`3`:case`4`:case`5`:case`6`:case`7`:case`8`:case`9`:throw j(x());case void 0:throw j(x())}return x()}function E(){let e=``,t=b();if(!r.isHexDigit(t)||(e+=x(),t=b(),!r.isHexDigit(t)))throw j(x());return e+=x(),String.fromCodePoint(parseInt(e,16))}function D(){let e=``,t=4;for(;t-- >0;){let t=b();if(!r.isHexDigit(t))throw j(x());e+=x()}return String.fromCodePoint(parseInt(e,16))}let O={start(){if(u.type===`eof`)throw M();k()},beforePropertyName(){switch(u.type){case`identifier`:case`string`:d=u.value,a=`afterPropertyName`;return;case`punctuator`:A();return;case`eof`:throw M()}},afterPropertyName(){if(u.type===`eof`)throw M();a=`beforePropertyValue`},beforePropertyValue(){if(u.type===`eof`)throw M();k()},beforeArrayValue(){if(u.type===`eof`)throw M();if(u.type===`punctuator`&&u.value===`]`){A();return}k()},afterPropertyValue(){if(u.type===`eof`)throw M();switch(u.value){case`,`:a=`beforePropertyName`;return;case`}`:A()}},afterArrayValue(){if(u.type===`eof`)throw M();switch(u.value){case`,`:a=`beforeArrayValue`;return;case`]`:A()}},end(){}};function k(){let e;switch(u.type){case`punctuator`:switch(u.value){case`{`:e={};break;case`[`:e=[];break}break;case`null`:case`boolean`:case`numeric`:case`string`:e=u.value;break}if(f===void 0)f=e;else{let t=o[o.length-1];Array.isArray(t)?t.push(e):Object.defineProperty(t,d,{value:e,writable:!0,enumerable:!0,configurable:!0})}if(typeof e==`object`&&e)o.push(e),a=Array.isArray(e)?`beforeArrayValue`:`beforePropertyName`;else{let e=o[o.length-1];a=e==null?`end`:Array.isArray(e)?`afterArrayValue`:`afterPropertyValue`}}function A(){o.pop();let e=o[o.length-1];a=e==null?`end`:Array.isArray(e)?`afterArrayValue`:`afterPropertyValue`}function j(e){return I(e===void 0?`JSON5: invalid end of input at ${c}:${l}`:`JSON5: invalid character '${F(e)}' at ${c}:${l}`)}function M(){return I(`JSON5: invalid end of input at ${c}:${l}`)}function N(){return l-=5,I(`JSON5: invalid identifier character at ${c}:${l}`)}function P(e){console.warn(`JSON5: '${F(e)}' in strings is not valid ECMAScript; consider escaping`)}function F(e){let t={\"'\":`\\\\'`,'\"':`\\\\\"`,\"\\\\\":`\\\\\\\\`,\"\\b\":`\\\\b`,\"\\f\":`\\\\f`,\"\\n\":`\\\\n`,\"\\r\":`\\\\r`,\"\t\":`\\\\t`,\"\\v\":`\\\\v`,\"\\0\":`\\\\0`,\"\\u2028\":`\\\\u2028`,\"\\u2029\":`\\\\u2029`};if(t[e])return t[e];if(e<` `){let t=e.charCodeAt(0).toString(16);return`\\\\x`+(`00`+t).substring(t.length)}return e}function I(e){let t=SyntaxError(e);return t.lineNumber=c,t.columnNumber=l,t}})),i=e(((e,t)=>{let r=n();t.exports=function(e,t,n){let i=[],a=``,o,s,c=``,l;if(typeof t==`object`&&t&&!Array.isArray(t)&&(n=t.space,l=t.quote,t=t.replacer),typeof t==`function`)s=t;else if(Array.isArray(t)){o=[];for(let e of t){let t;typeof e==`string`?t=e:(typeof e==`number`||e instanceof String||e instanceof Number)&&(t=String(e)),t!==void 0&&o.indexOf(t)<0&&o.push(t)}}return n instanceof Number?n=Number(n):n instanceof String&&(n=String(n)),typeof n==`number`?n>0&&(n=Math.min(10,Math.floor(n)),c=`          `.substr(0,n)):typeof n==`string`&&(c=n.substr(0,10)),u(``,{\"\":e});function u(e,t){let n=t[e];switch(n!=null&&(typeof n.toJSON5==`function`?n=n.toJSON5(e):typeof n.toJSON==`function`&&(n=n.toJSON(e))),s&&(n=s.call(t,e,n)),n instanceof Number?n=Number(n):n instanceof String?n=String(n):n instanceof Boolean&&(n=n.valueOf()),n){case null:return`null`;case!0:return`true`;case!1:return`false`}if(typeof n==`string`)return d(n,!1);if(typeof n==`number`)return String(n);if(typeof n==`object`)return Array.isArray(n)?m(n):f(n)}function d(e){let t={\"'\":.1,'\"':.2},n={\"'\":`\\\\'`,'\"':`\\\\\"`,\"\\\\\":`\\\\\\\\`,\"\\b\":`\\\\b`,\"\\f\":`\\\\f`,\"\\n\":`\\\\n`,\"\\r\":`\\\\r`,\"\t\":`\\\\t`,\"\\v\":`\\\\v`,\"\\0\":`\\\\0`,\"\\u2028\":`\\\\u2028`,\"\\u2029\":`\\\\u2029`},i=``;for(let a=0;a<e.length;a++){let o=e[a];switch(o){case`'`:case`\"`:t[o]++,i+=o;continue;case`\\0`:if(r.isDigit(e[a+1])){i+=`\\\\x00`;continue}}if(n[o]){i+=n[o];continue}if(o<` `){let e=o.charCodeAt(0).toString(16);i+=`\\\\x`+(`00`+e).substring(e.length);continue}i+=o}let a=l||Object.keys(t).reduce((e,n)=>t[e]<t[n]?e:n);return i=i.replace(new RegExp(a,`g`),n[a]),a+i+a}function f(e){if(i.indexOf(e)>=0)throw TypeError(`Converting circular structure to JSON5`);i.push(e);let t=a;a+=c;let n=o||Object.keys(e),r=[];for(let t of n){let n=u(t,e);if(n!==void 0){let e=p(t)+`:`;c!==``&&(e+=` `),e+=n,r.push(e)}}let s;if(r.length===0)s=`{}`;else{let e;if(c===``)e=r.join(`,`),s=`{`+e+`}`;else{let n=`,\n`+a;e=r.join(n),s=`{\n`+a+e+`,\n`+t+`}`}}return i.pop(),a=t,s}function p(e){if(e.length===0)return d(e,!0);let t=String.fromCodePoint(e.codePointAt(0));if(!r.isIdStartChar(t))return d(e,!0);for(let n=t.length;n<e.length;n++)if(!r.isIdContinueChar(String.fromCodePoint(e.codePointAt(n))))return d(e,!0);return e}function m(e){if(i.indexOf(e)>=0)throw TypeError(`Converting circular structure to JSON5`);i.push(e);let t=a;a+=c;let n=[];for(let t=0;t<e.length;t++){let r=u(String(t),e);n.push(r===void 0?`null`:r)}let r;if(n.length===0)r=`[]`;else if(c===``)r=`[`+n.join(`,`)+`]`;else{let e=`,\n`+a,i=n.join(e);r=`[\n`+a+i+`,\n`+t+`]`}return i.pop(),a=t,r}}}));export{r as n,i as t};","const e=/^(?:( )+|\\t+)/,t=`space`;function n(e,n,r){return e&&n===t&&r===1}function r(r,a){let o=new Map,s=0,c,l;for(let u of r.split(/\\n/g)){if(!u)continue;let r=u.match(e);if(r===null)s=0,c=``;else{let e=r[0].length,u=r[1]?t:`tab`;if(n(a,u,e))continue;u!==c&&(s=0),c=u;let d=1,f=0,p=e-s;if(s=e,p===0)d=0,f=1;else{let e=Math.abs(p);if(n(a,u,e))continue;l=i(u,e)}let m=o.get(l);o.set(l,m===void 0?[1,0]:[m[0]+d,m[1]+f])}}return o}function i(e,n){return(e===t?`s`:`t`)+String(n)}function a(e){return{type:e[0]===`s`?t:`tab`,amount:Number(e.slice(1))}}function o(e){let t,n=0,r=0;for(let[i,[a,o]]of e)(a>n||a===n&&o>r)&&(n=a,r=o,t=i);return t}function s(e,n){return(e===t?` `:`\t`).repeat(n)}function c(e){if(typeof e!=`string`)throw TypeError(`Expected a string`);let t=r(e,!0);t.size===0&&(t=r(e,!1));let n=o(t),i,c=0,l=``;return n!==void 0&&({type:i,amount:c}=a(n),l=s(i,c)),{amount:c,type:i,indent:l}}export{c as t};","import{t as e}from\"./libs/detect-indent.mjs\";const t=Symbol.for(`__confbox_fmt__`),n=/^(\\s+)/,r=/(\\s+)$/;function i(e,t={}){return{sample:t.indent===void 0&&t.preserveIndentation!==!1&&e.slice(0,t?.sampleSize||1024),whiteSpace:t.preserveWhitespace===!1?void 0:{start:n.exec(e)?.[0]||``,end:r.exec(e)?.[0]||``}}}function a(e,n,r){!n||typeof n!=`object`||Object.defineProperty(n,t,{enumerable:!1,configurable:!0,writable:!0,value:i(e,r)})}function o(n,r){if(!n||typeof n!=`object`||!(t in n))return{indent:r?.indent??2,whitespace:{start:``,end:``}};let i=n[t];return{indent:r?.indent||e(i.sample||``).indent,whitespace:i.whiteSpace||{start:``,end:``}}}export{a as n,o as t};","import{n as e}from\"./_chunks/rolldown-runtime.mjs\";import{n as t,t as n}from\"./_chunks/_format.mjs\";import{n as r,t as i}from\"./_chunks/libs/json5.mjs\";var a=e(r(),1),o=e(i(),1);function s(e,n){let r=(0,a.default)(e,n?.reviver);return t(e,r,n),r}function c(e,t){let r=n(e,t),i=(0,o.default)(e,t?.replacer,r.indent);return r.whitespace.start+i+r.whitespace.end}export{s as parseJSON5,c as stringifyJSON5};","function e(e,i=!1){let a=e.length,o=0,s=``,c=0,l=16,u=0,d=0,f=0,p=0,m=0;function h(t,n){let r=0,i=0;for(;r<t||!n;){let t=e.charCodeAt(o);if(t>=48&&t<=57)i=i*16+t-48;else if(t>=65&&t<=70)i=i*16+t-65+10;else if(t>=97&&t<=102)i=i*16+t-97+10;else break;o++,r++}return r<t&&(i=-1),i}function g(e){o=e,s=``,c=0,l=16,m=0}function _(){let t=o;if(e.charCodeAt(o)===48)o++;else for(o++;o<e.length&&r(e.charCodeAt(o));)o++;if(o<e.length&&e.charCodeAt(o)===46)if(o++,o<e.length&&r(e.charCodeAt(o)))for(o++;o<e.length&&r(e.charCodeAt(o));)o++;else return m=3,e.substring(t,o);let n=o;if(o<e.length&&(e.charCodeAt(o)===69||e.charCodeAt(o)===101))if(o++,(o<e.length&&e.charCodeAt(o)===43||e.charCodeAt(o)===45)&&o++,o<e.length&&r(e.charCodeAt(o))){for(o++;o<e.length&&r(e.charCodeAt(o));)o++;n=o}else m=3;return e.substring(t,n)}function v(){let t=``,r=o;for(;;){if(o>=a){t+=e.substring(r,o),m=2;break}let i=e.charCodeAt(o);if(i===34){t+=e.substring(r,o),o++;break}if(i===92){if(t+=e.substring(r,o),o++,o>=a){m=2;break}switch(e.charCodeAt(o++)){case 34:t+=`\"`;break;case 92:t+=`\\\\`;break;case 47:t+=`/`;break;case 98:t+=`\\b`;break;case 102:t+=`\\f`;break;case 110:t+=`\n`;break;case 114:t+=`\\r`;break;case 116:t+=`\t`;break;case 117:let e=h(4,!0);e>=0?t+=String.fromCharCode(e):m=4;break;default:m=5}r=o;continue}if(i>=0&&i<=31)if(n(i)){t+=e.substring(r,o),m=2;break}else m=6;o++}return t}function y(){if(s=``,m=0,c=o,d=u,p=f,o>=a)return c=a,l=17;let i=e.charCodeAt(o);if(t(i)){do o++,s+=String.fromCharCode(i),i=e.charCodeAt(o);while(t(i));return l=15}if(n(i))return o++,s+=String.fromCharCode(i),i===13&&e.charCodeAt(o)===10&&(o++,s+=`\n`),u++,f=o,l=14;switch(i){case 123:return o++,l=1;case 125:return o++,l=2;case 91:return o++,l=3;case 93:return o++,l=4;case 58:return o++,l=6;case 44:return o++,l=5;case 34:return o++,s=v(),l=10;case 47:let t=o-1;if(e.charCodeAt(o+1)===47){for(o+=2;o<a&&!n(e.charCodeAt(o));)o++;return s=e.substring(t,o),l=12}if(e.charCodeAt(o+1)===42){o+=2;let r=a-1,i=!1;for(;o<r;){let t=e.charCodeAt(o);if(t===42&&e.charCodeAt(o+1)===47){o+=2,i=!0;break}o++,n(t)&&(t===13&&e.charCodeAt(o)===10&&o++,u++,f=o)}return i||(o++,m=1),s=e.substring(t,o),l=13}return s+=String.fromCharCode(i),o++,l=16;case 45:if(s+=String.fromCharCode(i),o++,o===a||!r(e.charCodeAt(o)))return l=16;case 48:case 49:case 50:case 51:case 52:case 53:case 54:case 55:case 56:case 57:return s+=_(),l=11;default:for(;o<a&&b(i);)o++,i=e.charCodeAt(o);if(c!==o){switch(s=e.substring(c,o),s){case`true`:return l=8;case`false`:return l=9;case`null`:return l=7}return l=16}return s+=String.fromCharCode(i),o++,l=16}}function b(e){if(t(e)||n(e))return!1;switch(e){case 125:case 93:case 123:case 91:case 34:case 58:case 44:case 47:return!1}return!0}function x(){let e;do e=y();while(e>=12&&e<=15);return e}return{setPosition:g,getPosition:()=>o,scan:i?x:y,getToken:()=>l,getTokenValue:()=>s,getTokenOffset:()=>c,getTokenLength:()=>o-c,getTokenStartLine:()=>d,getTokenStartCharacter:()=>c-p,getTokenError:()=>m}}function t(e){return e===32||e===9}function n(e){return e===10||e===13}function r(e){return e>=48&&e<=57}var i;(function(e){e[e.lineFeed=10]=`lineFeed`,e[e.carriageReturn=13]=`carriageReturn`,e[e.space=32]=`space`,e[e._0=48]=`_0`,e[e._1=49]=`_1`,e[e._2=50]=`_2`,e[e._3=51]=`_3`,e[e._4=52]=`_4`,e[e._5=53]=`_5`,e[e._6=54]=`_6`,e[e._7=55]=`_7`,e[e._8=56]=`_8`,e[e._9=57]=`_9`,e[e.a=97]=`a`,e[e.b=98]=`b`,e[e.c=99]=`c`,e[e.d=100]=`d`,e[e.e=101]=`e`,e[e.f=102]=`f`,e[e.g=103]=`g`,e[e.h=104]=`h`,e[e.i=105]=`i`,e[e.j=106]=`j`,e[e.k=107]=`k`,e[e.l=108]=`l`,e[e.m=109]=`m`,e[e.n=110]=`n`,e[e.o=111]=`o`,e[e.p=112]=`p`,e[e.q=113]=`q`,e[e.r=114]=`r`,e[e.s=115]=`s`,e[e.t=116]=`t`,e[e.u=117]=`u`,e[e.v=118]=`v`,e[e.w=119]=`w`,e[e.x=120]=`x`,e[e.y=121]=`y`,e[e.z=122]=`z`,e[e.A=65]=`A`,e[e.B=66]=`B`,e[e.C=67]=`C`,e[e.D=68]=`D`,e[e.E=69]=`E`,e[e.F=70]=`F`,e[e.G=71]=`G`,e[e.H=72]=`H`,e[e.I=73]=`I`,e[e.J=74]=`J`,e[e.K=75]=`K`,e[e.L=76]=`L`,e[e.M=77]=`M`,e[e.N=78]=`N`,e[e.O=79]=`O`,e[e.P=80]=`P`,e[e.Q=81]=`Q`,e[e.R=82]=`R`,e[e.S=83]=`S`,e[e.T=84]=`T`,e[e.U=85]=`U`,e[e.V=86]=`V`,e[e.W=87]=`W`,e[e.X=88]=`X`,e[e.Y=89]=`Y`,e[e.Z=90]=`Z`,e[e.asterisk=42]=`asterisk`,e[e.backslash=92]=`backslash`,e[e.closeBrace=125]=`closeBrace`,e[e.closeBracket=93]=`closeBracket`,e[e.colon=58]=`colon`,e[e.comma=44]=`comma`,e[e.dot=46]=`dot`,e[e.doubleQuote=34]=`doubleQuote`,e[e.minus=45]=`minus`,e[e.openBrace=123]=`openBrace`,e[e.openBracket=91]=`openBracket`,e[e.plus=43]=`plus`,e[e.slash=47]=`slash`,e[e.formFeed=12]=`formFeed`,e[e.tab=9]=`tab`})(i||={}),Array(20).fill(0).map((e,t)=>` `.repeat(t)),Array(200).fill(0).map((e,t)=>`\n`+` `.repeat(t)),Array(200).fill(0).map((e,t)=>`\\r`+` `.repeat(t)),Array(200).fill(0).map((e,t)=>`\\r\n`+` `.repeat(t)),Array(200).fill(0).map((e,t)=>`\n`+`\t`.repeat(t)),Array(200).fill(0).map((e,t)=>`\\r`+`\t`.repeat(t)),Array(200).fill(0).map((e,t)=>`\\r\n`+`\t`.repeat(t));var a;(function(e){e.DEFAULT={allowTrailingComma:!1}})(a||={});function o(e,t=[],n=a.DEFAULT){let r=null,i=[],o=[];function s(e){Array.isArray(i)?i.push(e):r!==null&&(i[r]=e)}return d(e,{onObjectBegin:()=>{let e={};s(e),o.push(i),i=e,r=null},onObjectProperty:e=>{r=e},onObjectEnd:()=>{i=o.pop()},onArrayBegin:()=>{let e=[];s(e),o.push(i),i=e,r=null},onArrayEnd:()=>{i=o.pop()},onLiteralValue:s,onError:(e,n,r)=>{t.push({error:e,offset:n,length:r})}},n),i[0]}function s(e){if(!e.parent||!e.parent.children)return[];let t=s(e.parent);if(e.parent.type===`property`){let n=e.parent.children[0].value;t.push(n)}else if(e.parent.type===`array`){let n=e.parent.children.indexOf(e);n!==-1&&t.push(n)}return t}function c(e){switch(e.type){case`array`:return e.children.map(c);case`object`:let t=Object.create(null);for(let n of e.children){let e=n.children[1];e&&(t[n.children[0].value]=c(e))}return t;case`null`:case`string`:case`number`:case`boolean`:return e.value;default:return}}function l(e,t,n=!1){return t>=e.offset&&t<e.offset+e.length||n&&t===e.offset+e.length}function u(e,t,n=!1){if(l(e,t,n)){let r=e.children;if(Array.isArray(r))for(let e=0;e<r.length&&r[e].offset<=t;e++){let i=u(r[e],t,n);if(i)return i}return e}}function d(t,n,r=a.DEFAULT){let i=e(t,!1),o=[],s=0;function c(e){return e?()=>s===0&&e(i.getTokenOffset(),i.getTokenLength(),i.getTokenStartLine(),i.getTokenStartCharacter()):()=>!0}function l(e){return e?t=>s===0&&e(t,i.getTokenOffset(),i.getTokenLength(),i.getTokenStartLine(),i.getTokenStartCharacter()):()=>!0}function u(e){return e?t=>s===0&&e(t,i.getTokenOffset(),i.getTokenLength(),i.getTokenStartLine(),i.getTokenStartCharacter(),()=>o.slice()):()=>!0}function d(e){return e?()=>{s>0?s++:e(i.getTokenOffset(),i.getTokenLength(),i.getTokenStartLine(),i.getTokenStartCharacter(),()=>o.slice())===!1&&(s=1)}:()=>!0}function f(e){return e?()=>{s>0&&s--,s===0&&e(i.getTokenOffset(),i.getTokenLength(),i.getTokenStartLine(),i.getTokenStartCharacter())}:()=>!0}let p=d(n.onObjectBegin),m=u(n.onObjectProperty),h=f(n.onObjectEnd),g=d(n.onArrayBegin),_=f(n.onArrayEnd),v=u(n.onLiteralValue),y=l(n.onSeparator),b=c(n.onComment),x=l(n.onError),S=r&&r.disallowComments,C=r&&r.allowTrailingComma;function w(){for(;;){let e=i.scan();switch(i.getTokenError()){case 4:T(14);break;case 5:T(15);break;case 3:T(13);break;case 1:S||T(11);break;case 2:T(12);break;case 6:T(16);break}switch(e){case 12:case 13:S?T(10):b();break;case 16:T(1);break;case 15:case 14:break;default:return e}}}function T(e,t=[],n=[]){if(x(e),t.length+n.length>0){let e=i.getToken();for(;e!==17;){if(t.indexOf(e)!==-1){w();break}else if(n.indexOf(e)!==-1)break;e=w()}}}function E(e){let t=i.getTokenValue();return e?v(t):(m(t),o.push(t)),w(),!0}function D(){switch(i.getToken()){case 11:let e=i.getTokenValue(),t=Number(e);isNaN(t)&&(T(2),t=0),v(t);break;case 7:v(null);break;case 8:v(!0);break;case 9:v(!1);break;default:return!1}return w(),!0}function O(){return i.getToken()===10?(E(!1),i.getToken()===6?(y(`:`),w(),j()||T(4,[],[2,5])):T(5,[],[2,5]),o.pop(),!0):(T(3,[],[2,5]),!1)}function k(){p(),w();let e=!1;for(;i.getToken()!==2&&i.getToken()!==17;){if(i.getToken()===5){if(e||T(4,[],[]),y(`,`),w(),i.getToken()===2&&C)break}else e&&T(6,[],[]);O()||T(4,[],[2,5]),e=!0}return h(),i.getToken()===2?w():T(7,[2],[]),!0}function A(){g(),w();let e=!0,t=!1;for(;i.getToken()!==4&&i.getToken()!==17;){if(i.getToken()===5){if(t||T(4,[],[]),y(`,`),w(),i.getToken()===4&&C)break}else t&&T(6,[],[]);e?(o.push(0),e=!1):o[o.length-1]++,j()||T(4,[],[4,5]),t=!0}return _(),e||o.pop(),i.getToken()===4?w():T(8,[4],[]),!0}function j(){switch(i.getToken()){case 3:return A();case 1:return k();case 10:return E(!0);default:return D()}}return w(),i.getToken()===17?r.allowEmptyContent?!0:(T(4,[],[]),!1):j()?(i.getToken()!==17&&T(9,[],[]),!0):(T(4,[],[]),!1)}var f;(function(e){e[e.None=0]=`None`,e[e.UnexpectedEndOfComment=1]=`UnexpectedEndOfComment`,e[e.UnexpectedEndOfString=2]=`UnexpectedEndOfString`,e[e.UnexpectedEndOfNumber=3]=`UnexpectedEndOfNumber`,e[e.InvalidUnicode=4]=`InvalidUnicode`,e[e.InvalidEscapeCharacter=5]=`InvalidEscapeCharacter`,e[e.InvalidCharacter=6]=`InvalidCharacter`})(f||={});var p;(function(e){e[e.OpenBraceToken=1]=`OpenBraceToken`,e[e.CloseBraceToken=2]=`CloseBraceToken`,e[e.OpenBracketToken=3]=`OpenBracketToken`,e[e.CloseBracketToken=4]=`CloseBracketToken`,e[e.CommaToken=5]=`CommaToken`,e[e.ColonToken=6]=`ColonToken`,e[e.NullKeyword=7]=`NullKeyword`,e[e.TrueKeyword=8]=`TrueKeyword`,e[e.FalseKeyword=9]=`FalseKeyword`,e[e.StringLiteral=10]=`StringLiteral`,e[e.NumericLiteral=11]=`NumericLiteral`,e[e.LineCommentTrivia=12]=`LineCommentTrivia`,e[e.BlockCommentTrivia=13]=`BlockCommentTrivia`,e[e.LineBreakTrivia=14]=`LineBreakTrivia`,e[e.Trivia=15]=`Trivia`,e[e.Unknown=16]=`Unknown`,e[e.EOF=17]=`EOF`})(p||={});const m=o;var h;(function(e){e[e.InvalidSymbol=1]=`InvalidSymbol`,e[e.InvalidNumberFormat=2]=`InvalidNumberFormat`,e[e.PropertyNameExpected=3]=`PropertyNameExpected`,e[e.ValueExpected=4]=`ValueExpected`,e[e.ColonExpected=5]=`ColonExpected`,e[e.CommaExpected=6]=`CommaExpected`,e[e.CloseBraceExpected=7]=`CloseBraceExpected`,e[e.CloseBracketExpected=8]=`CloseBracketExpected`,e[e.EndOfFileExpected=9]=`EndOfFileExpected`,e[e.InvalidCommentToken=10]=`InvalidCommentToken`,e[e.UnexpectedEndOfComment=11]=`UnexpectedEndOfComment`,e[e.UnexpectedEndOfString=12]=`UnexpectedEndOfString`,e[e.UnexpectedEndOfNumber=13]=`UnexpectedEndOfNumber`,e[e.InvalidUnicode=14]=`InvalidUnicode`,e[e.InvalidEscapeCharacter=15]=`InvalidEscapeCharacter`,e[e.InvalidCharacter=16]=`InvalidCharacter`})(h||={});export{m as t};","import{n as e,t}from\"./_format.mjs\";function n(t,n){let r=JSON.parse(t,n?.reviver);return e(t,r,n),r}function r(e,n){let r=t(e,n),i=JSON.stringify(e,n?.replacer,r.indent);return r.whitespace.start+i+r.whitespace.end}export{r as n,n as t};","import{n as e}from\"./_chunks/_format.mjs\";import{t}from\"./_chunks/libs/jsonc-parser.mjs\";import{n}from\"./_chunks/json.mjs\";function r(n,r){let i=t(n,r?.errors,r);return e(n,i,r),i}function i(e,t){return n(e,t)}export{r as parseJSONC,i as stringifyJSONC};","/*! js-yaml 4.1.1 https://github.com/nodeca/js-yaml @license MIT */\nfunction e(e){return e==null}function t(e){return typeof e==`object`&&!!e}function n(t){return Array.isArray(t)?t:e(t)?[]:[t]}function r(e,t){var n,r,i,a;if(t)for(a=Object.keys(t),n=0,r=a.length;n<r;n+=1)i=a[n],e[i]=t[i];return e}function i(e,t){var n=``,r;for(r=0;r<t;r+=1)n+=e;return n}function a(e){return e===0&&1/e==-1/0}var o={isNothing:e,isObject:t,toArray:n,repeat:i,isNegativeZero:a,extend:r};function s(e,t){var n=``,r=e.reason||`(unknown reason)`;return e.mark?(e.mark.name&&(n+=`in \"`+e.mark.name+`\" `),n+=`(`+(e.mark.line+1)+`:`+(e.mark.column+1)+`)`,!t&&e.mark.snippet&&(n+=`\n\n`+e.mark.snippet),r+` `+n):r}function c(e,t){Error.call(this),this.name=`YAMLException`,this.reason=e,this.mark=t,this.message=s(this,!1),Error.captureStackTrace?Error.captureStackTrace(this,this.constructor):this.stack=Error().stack||``}c.prototype=Object.create(Error.prototype),c.prototype.constructor=c,c.prototype.toString=function(e){return this.name+`: `+s(this,e)};var l=c;function u(e,t,n,r,i){var a=``,o=``,s=Math.floor(i/2)-1;return r-t>s&&(a=` ... `,t=r-s+a.length),n-r>s&&(o=` ...`,n=r+s-o.length),{str:a+e.slice(t,n).replace(/\\t/g,`→`)+o,pos:r-t+a.length}}function d(e,t){return o.repeat(` `,t-e.length)+e}function f(e,t){if(t=Object.create(t||null),!e.buffer)return null;t.maxLength||=79,typeof t.indent!=`number`&&(t.indent=1),typeof t.linesBefore!=`number`&&(t.linesBefore=3),typeof t.linesAfter!=`number`&&(t.linesAfter=2);for(var n=/\\r?\\n|\\r|\\0/g,r=[0],i=[],a,s=-1;a=n.exec(e.buffer);)i.push(a.index),r.push(a.index+a[0].length),e.position<=a.index&&s<0&&(s=r.length-2);s<0&&(s=r.length-1);var c=``,l,f,p=Math.min(e.line+t.linesAfter,i.length).toString().length,m=t.maxLength-(t.indent+p+3);for(l=1;l<=t.linesBefore&&!(s-l<0);l++)f=u(e.buffer,r[s-l],i[s-l],e.position-(r[s]-r[s-l]),m),c=o.repeat(` `,t.indent)+d((e.line-l+1).toString(),p)+` | `+f.str+`\n`+c;for(f=u(e.buffer,r[s],i[s],e.position,m),c+=o.repeat(` `,t.indent)+d((e.line+1).toString(),p)+` | `+f.str+`\n`,c+=o.repeat(`-`,t.indent+p+3+f.pos)+`^\n`,l=1;l<=t.linesAfter&&!(s+l>=i.length);l++)f=u(e.buffer,r[s+l],i[s+l],e.position-(r[s]-r[s+l]),m),c+=o.repeat(` `,t.indent)+d((e.line+l+1).toString(),p)+` | `+f.str+`\n`;return c.replace(/\\n$/,``)}var p=f,m=[`kind`,`multi`,`resolve`,`construct`,`instanceOf`,`predicate`,`represent`,`representName`,`defaultStyle`,`styleAliases`],h=[`scalar`,`sequence`,`mapping`];function g(e){var t={};return e!==null&&Object.keys(e).forEach(function(n){e[n].forEach(function(e){t[String(e)]=n})}),t}function _(e,t){if(t||={},Object.keys(t).forEach(function(t){if(m.indexOf(t)===-1)throw new l(`Unknown option \"`+t+`\" is met in definition of \"`+e+`\" YAML type.`)}),this.options=t,this.tag=e,this.kind=t.kind||null,this.resolve=t.resolve||function(){return!0},this.construct=t.construct||function(e){return e},this.instanceOf=t.instanceOf||null,this.predicate=t.predicate||null,this.represent=t.represent||null,this.representName=t.representName||null,this.defaultStyle=t.defaultStyle||null,this.multi=t.multi||!1,this.styleAliases=g(t.styleAliases||null),h.indexOf(this.kind)===-1)throw new l(`Unknown kind \"`+this.kind+`\" is specified for \"`+e+`\" YAML type.`)}var v=_;function ee(e,t){var n=[];return e[t].forEach(function(e){var t=n.length;n.forEach(function(n,r){n.tag===e.tag&&n.kind===e.kind&&n.multi===e.multi&&(t=r)}),n[t]=e}),n}function te(){var e={scalar:{},sequence:{},mapping:{},fallback:{},multi:{scalar:[],sequence:[],mapping:[],fallback:[]}},t,n;function r(t){t.multi?(e.multi[t.kind].push(t),e.multi.fallback.push(t)):e[t.kind][t.tag]=e.fallback[t.tag]=t}for(t=0,n=arguments.length;t<n;t+=1)arguments[t].forEach(r);return e}function y(e){return this.extend(e)}y.prototype.extend=function(e){var t=[],n=[];if(e instanceof v)n.push(e);else if(Array.isArray(e))n=n.concat(e);else if(e&&(Array.isArray(e.implicit)||Array.isArray(e.explicit)))e.implicit&&(t=t.concat(e.implicit)),e.explicit&&(n=n.concat(e.explicit));else throw new l(`Schema.extend argument should be a Type, [ Type ], or a schema definition ({ implicit: [...], explicit: [...] })`);t.forEach(function(e){if(!(e instanceof v))throw new l(`Specified list of YAML types (or a single Type object) contains a non-Type object.`);if(e.loadKind&&e.loadKind!==`scalar`)throw new l(`There is a non-scalar type in the implicit list of a schema. Implicit resolving of such types is not supported.`);if(e.multi)throw new l(`There is a multi type in the implicit list of a schema. Multi tags can only be listed as explicit.`)}),n.forEach(function(e){if(!(e instanceof v))throw new l(`Specified list of YAML types (or a single Type object) contains a non-Type object.`)});var r=Object.create(y.prototype);return r.implicit=(this.implicit||[]).concat(t),r.explicit=(this.explicit||[]).concat(n),r.compiledImplicit=ee(r,`implicit`),r.compiledExplicit=ee(r,`explicit`),r.compiledTypeMap=te(r.compiledImplicit,r.compiledExplicit),r};var ne=new y({explicit:[new v(`tag:yaml.org,2002:str`,{kind:`scalar`,construct:function(e){return e===null?``:e}}),new v(`tag:yaml.org,2002:seq`,{kind:`sequence`,construct:function(e){return e===null?[]:e}}),new v(`tag:yaml.org,2002:map`,{kind:`mapping`,construct:function(e){return e===null?{}:e}})]});function re(e){if(e===null)return!0;var t=e.length;return t===1&&e===`~`||t===4&&(e===`null`||e===`Null`||e===`NULL`)}function ie(){return null}function ae(e){return e===null}var oe=new v(`tag:yaml.org,2002:null`,{kind:`scalar`,resolve:re,construct:ie,predicate:ae,represent:{canonical:function(){return`~`},lowercase:function(){return`null`},uppercase:function(){return`NULL`},camelcase:function(){return`Null`},empty:function(){return``}},defaultStyle:`lowercase`});function se(e){if(e===null)return!1;var t=e.length;return t===4&&(e===`true`||e===`True`||e===`TRUE`)||t===5&&(e===`false`||e===`False`||e===`FALSE`)}function ce(e){return e===`true`||e===`True`||e===`TRUE`}function le(e){return Object.prototype.toString.call(e)===`[object Boolean]`}var ue=new v(`tag:yaml.org,2002:bool`,{kind:`scalar`,resolve:se,construct:ce,predicate:le,represent:{lowercase:function(e){return e?`true`:`false`},uppercase:function(e){return e?`TRUE`:`FALSE`},camelcase:function(e){return e?`True`:`False`}},defaultStyle:`lowercase`});function de(e){return 48<=e&&e<=57||65<=e&&e<=70||97<=e&&e<=102}function fe(e){return 48<=e&&e<=55}function pe(e){return 48<=e&&e<=57}function me(e){if(e===null)return!1;var t=e.length,n=0,r=!1,i;if(!t)return!1;if(i=e[n],(i===`-`||i===`+`)&&(i=e[++n]),i===`0`){if(n+1===t)return!0;if(i=e[++n],i===`b`){for(n++;n<t;n++)if(i=e[n],i!==`_`){if(i!==`0`&&i!==`1`)return!1;r=!0}return r&&i!==`_`}if(i===`x`){for(n++;n<t;n++)if(i=e[n],i!==`_`){if(!de(e.charCodeAt(n)))return!1;r=!0}return r&&i!==`_`}if(i===`o`){for(n++;n<t;n++)if(i=e[n],i!==`_`){if(!fe(e.charCodeAt(n)))return!1;r=!0}return r&&i!==`_`}}if(i===`_`)return!1;for(;n<t;n++)if(i=e[n],i!==`_`){if(!pe(e.charCodeAt(n)))return!1;r=!0}return!(!r||i===`_`)}function he(e){var t=e,n=1,r;if(t.indexOf(`_`)!==-1&&(t=t.replace(/_/g,``)),r=t[0],(r===`-`||r===`+`)&&(r===`-`&&(n=-1),t=t.slice(1),r=t[0]),t===`0`)return 0;if(r===`0`){if(t[1]===`b`)return n*parseInt(t.slice(2),2);if(t[1]===`x`)return n*parseInt(t.slice(2),16);if(t[1]===`o`)return n*parseInt(t.slice(2),8)}return n*parseInt(t,10)}function ge(e){return Object.prototype.toString.call(e)===`[object Number]`&&e%1==0&&!o.isNegativeZero(e)}var _e=new v(`tag:yaml.org,2002:int`,{kind:`scalar`,resolve:me,construct:he,predicate:ge,represent:{binary:function(e){return e>=0?`0b`+e.toString(2):`-0b`+e.toString(2).slice(1)},octal:function(e){return e>=0?`0o`+e.toString(8):`-0o`+e.toString(8).slice(1)},decimal:function(e){return e.toString(10)},hexadecimal:function(e){return e>=0?`0x`+e.toString(16).toUpperCase():`-0x`+e.toString(16).toUpperCase().slice(1)}},defaultStyle:`decimal`,styleAliases:{binary:[2,`bin`],octal:[8,`oct`],decimal:[10,`dec`],hexadecimal:[16,`hex`]}}),ve=RegExp(`^(?:[-+]?(?:[0-9][0-9_]*)(?:\\\\.[0-9_]*)?(?:[eE][-+]?[0-9]+)?|\\\\.[0-9_]+(?:[eE][-+]?[0-9]+)?|[-+]?\\\\.(?:inf|Inf|INF)|\\\\.(?:nan|NaN|NAN))$`);function ye(e){return!(e===null||!ve.test(e)||e[e.length-1]===`_`)}function be(e){var t=e.replace(/_/g,``).toLowerCase(),n=t[0]===`-`?-1:1;return`+-`.indexOf(t[0])>=0&&(t=t.slice(1)),t===`.inf`?n===1?1/0:-1/0:t===`.nan`?NaN:n*parseFloat(t,10)}var xe=/^[-+]?[0-9]+e/;function Se(e,t){var n;if(isNaN(e))switch(t){case`lowercase`:return`.nan`;case`uppercase`:return`.NAN`;case`camelcase`:return`.NaN`}else if(e===1/0)switch(t){case`lowercase`:return`.inf`;case`uppercase`:return`.INF`;case`camelcase`:return`.Inf`}else if(e===-1/0)switch(t){case`lowercase`:return`-.inf`;case`uppercase`:return`-.INF`;case`camelcase`:return`-.Inf`}else if(o.isNegativeZero(e))return`-0.0`;return n=e.toString(10),xe.test(n)?n.replace(`e`,`.e`):n}function Ce(e){return Object.prototype.toString.call(e)===`[object Number]`&&(e%1!=0||o.isNegativeZero(e))}var we=new v(`tag:yaml.org,2002:float`,{kind:`scalar`,resolve:ye,construct:be,predicate:Ce,represent:Se,defaultStyle:`lowercase`}),Te=ne.extend({implicit:[oe,ue,_e,we]}),Ee=RegExp(`^([0-9][0-9][0-9][0-9])-([0-9][0-9])-([0-9][0-9])$`),De=RegExp(`^([0-9][0-9][0-9][0-9])-([0-9][0-9]?)-([0-9][0-9]?)(?:[Tt]|[ \\\\t]+)([0-9][0-9]?):([0-9][0-9]):([0-9][0-9])(?:\\\\.([0-9]*))?(?:[ \\\\t]*(Z|([-+])([0-9][0-9]?)(?::([0-9][0-9]))?))?$`);function Oe(e){return e===null?!1:Ee.exec(e)!==null||De.exec(e)!==null}function ke(e){var t,n,r,i,a,o,s,c=0,l=null,u,d,f;if(t=Ee.exec(e),t===null&&(t=De.exec(e)),t===null)throw Error(`Date resolve error`);if(n=+t[1],r=t[2]-1,i=+t[3],!t[4])return new Date(Date.UTC(n,r,i));if(a=+t[4],o=+t[5],s=+t[6],t[7]){for(c=t[7].slice(0,3);c.length<3;)c+=`0`;c=+c}return t[9]&&(u=+t[10],d=+(t[11]||0),l=(u*60+d)*6e4,t[9]===`-`&&(l=-l)),f=new Date(Date.UTC(n,r,i,a,o,s,c)),l&&f.setTime(f.getTime()-l),f}function Ae(e){return e.toISOString()}var je=new v(`tag:yaml.org,2002:timestamp`,{kind:`scalar`,resolve:Oe,construct:ke,instanceOf:Date,represent:Ae});function Me(e){return e===`<<`||e===null}var Ne=new v(`tag:yaml.org,2002:merge`,{kind:`scalar`,resolve:Me}),b=`ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=\n\\r`;function Pe(e){if(e===null)return!1;var t,n,r=0,i=e.length,a=b;for(n=0;n<i;n++)if(t=a.indexOf(e.charAt(n)),!(t>64)){if(t<0)return!1;r+=6}return r%8==0}function Fe(e){var t,n,r=e.replace(/[\\r\\n=]/g,``),i=r.length,a=b,o=0,s=[];for(t=0;t<i;t++)t%4==0&&t&&(s.push(o>>16&255),s.push(o>>8&255),s.push(o&255)),o=o<<6|a.indexOf(r.charAt(t));return n=i%4*6,n===0?(s.push(o>>16&255),s.push(o>>8&255),s.push(o&255)):n===18?(s.push(o>>10&255),s.push(o>>2&255)):n===12&&s.push(o>>4&255),new Uint8Array(s)}function Ie(e){var t=``,n=0,r,i,a=e.length,o=b;for(r=0;r<a;r++)r%3==0&&r&&(t+=o[n>>18&63],t+=o[n>>12&63],t+=o[n>>6&63],t+=o[n&63]),n=(n<<8)+e[r];return i=a%3,i===0?(t+=o[n>>18&63],t+=o[n>>12&63],t+=o[n>>6&63],t+=o[n&63]):i===2?(t+=o[n>>10&63],t+=o[n>>4&63],t+=o[n<<2&63],t+=o[64]):i===1&&(t+=o[n>>2&63],t+=o[n<<4&63],t+=o[64],t+=o[64]),t}function Le(e){return Object.prototype.toString.call(e)===`[object Uint8Array]`}var Re=new v(`tag:yaml.org,2002:binary`,{kind:`scalar`,resolve:Pe,construct:Fe,predicate:Le,represent:Ie}),ze=Object.prototype.hasOwnProperty,Be=Object.prototype.toString;function Ve(e){if(e===null)return!0;var t=[],n,r,i,a,o,s=e;for(n=0,r=s.length;n<r;n+=1){if(i=s[n],o=!1,Be.call(i)!==`[object Object]`)return!1;for(a in i)if(ze.call(i,a))if(!o)o=!0;else return!1;if(!o)return!1;if(t.indexOf(a)===-1)t.push(a);else return!1}return!0}function He(e){return e===null?[]:e}var Ue=new v(`tag:yaml.org,2002:omap`,{kind:`sequence`,resolve:Ve,construct:He}),We=Object.prototype.toString;function Ge(e){if(e===null)return!0;var t,n,r,i,a,o=e;for(a=Array(o.length),t=0,n=o.length;t<n;t+=1){if(r=o[t],We.call(r)!==`[object Object]`||(i=Object.keys(r),i.length!==1))return!1;a[t]=[i[0],r[i[0]]]}return!0}function Ke(e){if(e===null)return[];var t,n,r,i,a,o=e;for(a=Array(o.length),t=0,n=o.length;t<n;t+=1)r=o[t],i=Object.keys(r),a[t]=[i[0],r[i[0]]];return a}var qe=new v(`tag:yaml.org,2002:pairs`,{kind:`sequence`,resolve:Ge,construct:Ke}),Je=Object.prototype.hasOwnProperty;function Ye(e){if(e===null)return!0;var t,n=e;for(t in n)if(Je.call(n,t)&&n[t]!==null)return!1;return!0}function Xe(e){return e===null?{}:e}var Ze=new v(`tag:yaml.org,2002:set`,{kind:`mapping`,resolve:Ye,construct:Xe}),Qe=Te.extend({implicit:[je,Ne],explicit:[Re,Ue,qe,Ze]}),x=Object.prototype.hasOwnProperty,S=1,$e=2,et=3,C=4,w=1,tt=2,nt=3,rt=/[\\x00-\\x08\\x0B\\x0C\\x0E-\\x1F\\x7F-\\x84\\x86-\\x9F\\uFFFE\\uFFFF]|[\\uD800-\\uDBFF](?![\\uDC00-\\uDFFF])|(?:[^\\uD800-\\uDBFF]|^)[\\uDC00-\\uDFFF]/,it=/[\\x85\\u2028\\u2029]/,at=/[,\\[\\]\\{\\}]/,ot=/^(?:!|!!|![a-z\\-]+!)$/i,st=/^(?:!|[^,\\[\\]\\{\\}])(?:%[0-9a-f]{2}|[0-9a-z\\-#;\\/\\?:@&=\\+\\$,_\\.!~\\*'\\(\\)\\[\\]])*$/i;function ct(e){return Object.prototype.toString.call(e)}function T(e){return e===10||e===13}function E(e){return e===9||e===32}function D(e){return e===9||e===32||e===10||e===13}function O(e){return e===44||e===91||e===93||e===123||e===125}function lt(e){var t;return 48<=e&&e<=57?e-48:(t=e|32,97<=t&&t<=102?t-97+10:-1)}function ut(e){return e===120?2:e===117?4:e===85?8:0}function dt(e){return 48<=e&&e<=57?e-48:-1}function ft(e){return e===48?`\\0`:e===97?`\\x07`:e===98?`\\b`:e===116||e===9?`\t`:e===110?`\n`:e===118?`\\v`:e===102?`\\f`:e===114?`\\r`:e===101?`\\x1B`:e===32?` `:e===34?`\"`:e===47?`/`:e===92?`\\\\`:e===78?``:e===95?`\\xA0`:e===76?`\\u2028`:e===80?`\\u2029`:``}function pt(e){return e<=65535?String.fromCharCode(e):String.fromCharCode((e-65536>>10)+55296,(e-65536&1023)+56320)}function mt(e,t,n){t===`__proto__`?Object.defineProperty(e,t,{configurable:!0,enumerable:!0,writable:!0,value:n}):e[t]=n}for(var ht=Array(256),gt=Array(256),k=0;k<256;k++)ht[k]=ft(k)?1:0,gt[k]=ft(k);function _t(e,t){this.input=e,this.filename=t.filename||null,this.schema=t.schema||Qe,this.onWarning=t.onWarning||null,this.legacy=t.legacy||!1,this.json=t.json||!1,this.listener=t.listener||null,this.implicitTypes=this.schema.compiledImplicit,this.typeMap=this.schema.compiledTypeMap,this.length=e.length,this.position=0,this.line=0,this.lineStart=0,this.lineIndent=0,this.firstTabInLine=-1,this.documents=[]}function vt(e,t){var n={name:e.filename,buffer:e.input.slice(0,-1),position:e.position,line:e.line,column:e.position-e.lineStart};return n.snippet=p(n),new l(t,n)}function A(e,t){throw vt(e,t)}function j(e,t){e.onWarning&&e.onWarning.call(null,vt(e,t))}var yt={YAML:function(e,t,n){var r,i,a;e.version!==null&&A(e,`duplication of %YAML directive`),n.length!==1&&A(e,`YAML directive accepts exactly one argument`),r=/^([0-9]+)\\.([0-9]+)$/.exec(n[0]),r===null&&A(e,`ill-formed argument of the YAML directive`),i=parseInt(r[1],10),a=parseInt(r[2],10),i!==1&&A(e,`unacceptable YAML version of the document`),e.version=n[0],e.checkLineBreaks=a<2,a!==1&&a!==2&&j(e,`unsupported YAML version of the document`)},TAG:function(e,t,n){var r,i;n.length!==2&&A(e,`TAG directive accepts exactly two arguments`),r=n[0],i=n[1],ot.test(r)||A(e,`ill-formed tag handle (first argument) of the TAG directive`),x.call(e.tagMap,r)&&A(e,`there is a previously declared suffix for \"`+r+`\" tag handle`),st.test(i)||A(e,`ill-formed tag prefix (second argument) of the TAG directive`);try{i=decodeURIComponent(i)}catch{A(e,`tag prefix is malformed: `+i)}e.tagMap[r]=i}};function M(e,t,n,r){var i,a,o,s;if(t<n){if(s=e.input.slice(t,n),r)for(i=0,a=s.length;i<a;i+=1)o=s.charCodeAt(i),o===9||32<=o&&o<=1114111||A(e,`expected valid JSON character`);else rt.test(s)&&A(e,`the stream contains non-printable characters`);e.result+=s}}function bt(e,t,n,r){var i,a,s,c;for(o.isObject(n)||A(e,`cannot merge mappings; the provided source object is unacceptable`),i=Object.keys(n),s=0,c=i.length;s<c;s+=1)a=i[s],x.call(t,a)||(mt(t,a,n[a]),r[a]=!0)}function N(e,t,n,r,i,a,o,s,c){var l,u;if(Array.isArray(i))for(i=Array.prototype.slice.call(i),l=0,u=i.length;l<u;l+=1)Array.isArray(i[l])&&A(e,`nested arrays are not supported inside keys`),typeof i==`object`&&ct(i[l])===`[object Object]`&&(i[l]=`[object Object]`);if(typeof i==`object`&&ct(i)===`[object Object]`&&(i=`[object Object]`),i=String(i),t===null&&(t={}),r===`tag:yaml.org,2002:merge`)if(Array.isArray(a))for(l=0,u=a.length;l<u;l+=1)bt(e,t,a[l],n);else bt(e,t,a,n);else !e.json&&!x.call(n,i)&&x.call(t,i)&&(e.line=o||e.line,e.lineStart=s||e.lineStart,e.position=c||e.position,A(e,`duplicated mapping key`)),mt(t,i,a),delete n[i];return t}function P(e){var t=e.input.charCodeAt(e.position);t===10?e.position++:t===13?(e.position++,e.input.charCodeAt(e.position)===10&&e.position++):A(e,`a line break is expected`),e.line+=1,e.lineStart=e.position,e.firstTabInLine=-1}function F(e,t,n){for(var r=0,i=e.input.charCodeAt(e.position);i!==0;){for(;E(i);)i===9&&e.firstTabInLine===-1&&(e.firstTabInLine=e.position),i=e.input.charCodeAt(++e.position);if(t&&i===35)do i=e.input.charCodeAt(++e.position);while(i!==10&&i!==13&&i!==0);if(T(i))for(P(e),i=e.input.charCodeAt(e.position),r++,e.lineIndent=0;i===32;)e.lineIndent++,i=e.input.charCodeAt(++e.position);else break}return n!==-1&&r!==0&&e.lineIndent<n&&j(e,`deficient indentation`),r}function I(e){var t=e.position,n=e.input.charCodeAt(t);return!!((n===45||n===46)&&n===e.input.charCodeAt(t+1)&&n===e.input.charCodeAt(t+2)&&(t+=3,n=e.input.charCodeAt(t),n===0||D(n)))}function L(e,t){t===1?e.result+=` `:t>1&&(e.result+=o.repeat(`\n`,t-1))}function xt(e,t,n){var r,i,a,o,s,c,l,u,d=e.kind,f=e.result,p=e.input.charCodeAt(e.position);if(D(p)||O(p)||p===35||p===38||p===42||p===33||p===124||p===62||p===39||p===34||p===37||p===64||p===96||(p===63||p===45)&&(i=e.input.charCodeAt(e.position+1),D(i)||n&&O(i)))return!1;for(e.kind=`scalar`,e.result=``,a=o=e.position,s=!1;p!==0;){if(p===58){if(i=e.input.charCodeAt(e.position+1),D(i)||n&&O(i))break}else if(p===35){if(r=e.input.charCodeAt(e.position-1),D(r))break}else if(e.position===e.lineStart&&I(e)||n&&O(p))break;else if(T(p))if(c=e.line,l=e.lineStart,u=e.lineIndent,F(e,!1,-1),e.lineIndent>=t){s=!0,p=e.input.charCodeAt(e.position);continue}else{e.position=o,e.line=c,e.lineStart=l,e.lineIndent=u;break}s&&=(M(e,a,o,!1),L(e,e.line-c),a=o=e.position,!1),E(p)||(o=e.position+1),p=e.input.charCodeAt(++e.position)}return M(e,a,o,!1),e.result?!0:(e.kind=d,e.result=f,!1)}function St(e,t){var n=e.input.charCodeAt(e.position),r,i;if(n!==39)return!1;for(e.kind=`scalar`,e.result=``,e.position++,r=i=e.position;(n=e.input.charCodeAt(e.position))!==0;)if(n===39)if(M(e,r,e.position,!0),n=e.input.charCodeAt(++e.position),n===39)r=e.position,e.position++,i=e.position;else return!0;else T(n)?(M(e,r,i,!0),L(e,F(e,!1,t)),r=i=e.position):e.position===e.lineStart&&I(e)?A(e,`unexpected end of the document within a single quoted scalar`):(e.position++,i=e.position);A(e,`unexpected end of the stream within a single quoted scalar`)}function Ct(e,t){var n,r,i,a,o,s=e.input.charCodeAt(e.position);if(s!==34)return!1;for(e.kind=`scalar`,e.result=``,e.position++,n=r=e.position;(s=e.input.charCodeAt(e.position))!==0;)if(s===34)return M(e,n,e.position,!0),e.position++,!0;else if(s===92){if(M(e,n,e.position,!0),s=e.input.charCodeAt(++e.position),T(s))F(e,!1,t);else if(s<256&&ht[s])e.result+=gt[s],e.position++;else if((o=ut(s))>0){for(i=o,a=0;i>0;i--)s=e.input.charCodeAt(++e.position),(o=lt(s))>=0?a=(a<<4)+o:A(e,`expected hexadecimal character`);e.result+=pt(a),e.position++}else A(e,`unknown escape sequence`);n=r=e.position}else T(s)?(M(e,n,r,!0),L(e,F(e,!1,t)),n=r=e.position):e.position===e.lineStart&&I(e)?A(e,`unexpected end of the document within a double quoted scalar`):(e.position++,r=e.position);A(e,`unexpected end of the stream within a double quoted scalar`)}function wt(e,t){var n=!0,r,i,a,o=e.tag,s,c=e.anchor,l,u,d,f,p,m=Object.create(null),h,g,_,v=e.input.charCodeAt(e.position);if(v===91)u=93,p=!1,s=[];else if(v===123)u=125,p=!0,s={};else return!1;for(e.anchor!==null&&(e.anchorMap[e.anchor]=s),v=e.input.charCodeAt(++e.position);v!==0;){if(F(e,!0,t),v=e.input.charCodeAt(e.position),v===u)return e.position++,e.tag=o,e.anchor=c,e.kind=p?`mapping`:`sequence`,e.result=s,!0;n?v===44&&A(e,`expected the node content, but found ','`):A(e,`missed comma between flow collection entries`),g=h=_=null,d=f=!1,v===63&&(l=e.input.charCodeAt(e.position+1),D(l)&&(d=f=!0,e.position++,F(e,!0,t))),r=e.line,i=e.lineStart,a=e.position,R(e,t,S,!1,!0),g=e.tag,h=e.result,F(e,!0,t),v=e.input.charCodeAt(e.position),(f||e.line===r)&&v===58&&(d=!0,v=e.input.charCodeAt(++e.position),F(e,!0,t),R(e,t,S,!1,!0),_=e.result),p?N(e,s,m,g,h,_,r,i,a):d?s.push(N(e,null,m,g,h,_,r,i,a)):s.push(h),F(e,!0,t),v=e.input.charCodeAt(e.position),v===44?(n=!0,v=e.input.charCodeAt(++e.position)):n=!1}A(e,`unexpected end of the stream within a flow collection`)}function Tt(e,t){var n,r,i=w,a=!1,s=!1,c=t,l=0,u=!1,d,f=e.input.charCodeAt(e.position);if(f===124)r=!1;else if(f===62)r=!0;else return!1;for(e.kind=`scalar`,e.result=``;f!==0;)if(f=e.input.charCodeAt(++e.position),f===43||f===45)w===i?i=f===43?nt:tt:A(e,`repeat of a chomping mode identifier`);else if((d=dt(f))>=0)d===0?A(e,`bad explicit indentation width of a block scalar; it cannot be less than one`):s?A(e,`repeat of an indentation width identifier`):(c=t+d-1,s=!0);else break;if(E(f)){do f=e.input.charCodeAt(++e.position);while(E(f));if(f===35)do f=e.input.charCodeAt(++e.position);while(!T(f)&&f!==0)}for(;f!==0;){for(P(e),e.lineIndent=0,f=e.input.charCodeAt(e.position);(!s||e.lineIndent<c)&&f===32;)e.lineIndent++,f=e.input.charCodeAt(++e.position);if(!s&&e.lineIndent>c&&(c=e.lineIndent),T(f)){l++;continue}if(e.lineIndent<c){i===nt?e.result+=o.repeat(`\n`,a?1+l:l):i===w&&a&&(e.result+=`\n`);break}for(r?E(f)?(u=!0,e.result+=o.repeat(`\n`,a?1+l:l)):u?(u=!1,e.result+=o.repeat(`\n`,l+1)):l===0?a&&(e.result+=` `):e.result+=o.repeat(`\n`,l):e.result+=o.repeat(`\n`,a?1+l:l),a=!0,s=!0,l=0,n=e.position;!T(f)&&f!==0;)f=e.input.charCodeAt(++e.position);M(e,n,e.position,!1)}return!0}function Et(e,t){var n,r=e.tag,i=e.anchor,a=[],o,s=!1,c;if(e.firstTabInLine!==-1)return!1;for(e.anchor!==null&&(e.anchorMap[e.anchor]=a),c=e.input.charCodeAt(e.position);c!==0&&(e.firstTabInLine!==-1&&(e.position=e.firstTabInLine,A(e,`tab characters must not be used in indentation`)),!(c!==45||(o=e.input.charCodeAt(e.position+1),!D(o))));){if(s=!0,e.position++,F(e,!0,-1)&&e.lineIndent<=t){a.push(null),c=e.input.charCodeAt(e.position);continue}if(n=e.line,R(e,t,et,!1,!0),a.push(e.result),F(e,!0,-1),c=e.input.charCodeAt(e.position),(e.line===n||e.lineIndent>t)&&c!==0)A(e,`bad indentation of a sequence entry`);else if(e.lineIndent<t)break}return s?(e.tag=r,e.anchor=i,e.kind=`sequence`,e.result=a,!0):!1}function Dt(e,t,n){var r,i,a,o,s,c,l=e.tag,u=e.anchor,d={},f=Object.create(null),p=null,m=null,h=null,g=!1,_=!1,v;if(e.firstTabInLine!==-1)return!1;for(e.anchor!==null&&(e.anchorMap[e.anchor]=d),v=e.input.charCodeAt(e.position);v!==0;){if(!g&&e.firstTabInLine!==-1&&(e.position=e.firstTabInLine,A(e,`tab characters must not be used in indentation`)),r=e.input.charCodeAt(e.position+1),a=e.line,(v===63||v===58)&&D(r))v===63?(g&&(N(e,d,f,p,m,null,o,s,c),p=m=h=null),_=!0,g=!0,i=!0):g?(g=!1,i=!0):A(e,`incomplete explicit mapping pair; a key node is missed; or followed by a non-tabulated empty line`),e.position+=1,v=r;else{if(o=e.line,s=e.lineStart,c=e.position,!R(e,n,$e,!1,!0))break;if(e.line===a){for(v=e.input.charCodeAt(e.position);E(v);)v=e.input.charCodeAt(++e.position);if(v===58)v=e.input.charCodeAt(++e.position),D(v)||A(e,`a whitespace character is expected after the key-value separator within a block mapping`),g&&(N(e,d,f,p,m,null,o,s,c),p=m=h=null),_=!0,g=!1,i=!1,p=e.tag,m=e.result;else if(_)A(e,`can not read an implicit mapping pair; a colon is missed`);else return e.tag=l,e.anchor=u,!0}else if(_)A(e,`can not read a block mapping entry; a multiline key may not be an implicit key`);else return e.tag=l,e.anchor=u,!0}if((e.line===a||e.lineIndent>t)&&(g&&(o=e.line,s=e.lineStart,c=e.position),R(e,t,C,!0,i)&&(g?m=e.result:h=e.result),g||(N(e,d,f,p,m,h,o,s,c),p=m=h=null),F(e,!0,-1),v=e.input.charCodeAt(e.position)),(e.line===a||e.lineIndent>t)&&v!==0)A(e,`bad indentation of a mapping entry`);else if(e.lineIndent<t)break}return g&&N(e,d,f,p,m,null,o,s,c),_&&(e.tag=l,e.anchor=u,e.kind=`mapping`,e.result=d),_}function Ot(e){var t,n=!1,r=!1,i,a,o=e.input.charCodeAt(e.position);if(o!==33)return!1;if(e.tag!==null&&A(e,`duplication of a tag property`),o=e.input.charCodeAt(++e.position),o===60?(n=!0,o=e.input.charCodeAt(++e.position)):o===33?(r=!0,i=`!!`,o=e.input.charCodeAt(++e.position)):i=`!`,t=e.position,n){do o=e.input.charCodeAt(++e.position);while(o!==0&&o!==62);e.position<e.length?(a=e.input.slice(t,e.position),o=e.input.charCodeAt(++e.position)):A(e,`unexpected end of the stream within a verbatim tag`)}else{for(;o!==0&&!D(o);)o===33&&(r?A(e,`tag suffix cannot contain exclamation marks`):(i=e.input.slice(t-1,e.position+1),ot.test(i)||A(e,`named tag handle cannot contain such characters`),r=!0,t=e.position+1)),o=e.input.charCodeAt(++e.position);a=e.input.slice(t,e.position),at.test(a)&&A(e,`tag suffix cannot contain flow indicator characters`)}a&&!st.test(a)&&A(e,`tag name cannot contain such characters: `+a);try{a=decodeURIComponent(a)}catch{A(e,`tag name is malformed: `+a)}return n?e.tag=a:x.call(e.tagMap,i)?e.tag=e.tagMap[i]+a:i===`!`?e.tag=`!`+a:i===`!!`?e.tag=`tag:yaml.org,2002:`+a:A(e,`undeclared tag handle \"`+i+`\"`),!0}function kt(e){var t,n=e.input.charCodeAt(e.position);if(n!==38)return!1;for(e.anchor!==null&&A(e,`duplication of an anchor property`),n=e.input.charCodeAt(++e.position),t=e.position;n!==0&&!D(n)&&!O(n);)n=e.input.charCodeAt(++e.position);return e.position===t&&A(e,`name of an anchor node must contain at least one character`),e.anchor=e.input.slice(t,e.position),!0}function At(e){var t,n,r=e.input.charCodeAt(e.position);if(r!==42)return!1;for(r=e.input.charCodeAt(++e.position),t=e.position;r!==0&&!D(r)&&!O(r);)r=e.input.charCodeAt(++e.position);return e.position===t&&A(e,`name of an alias node must contain at least one character`),n=e.input.slice(t,e.position),x.call(e.anchorMap,n)||A(e,`unidentified alias \"`+n+`\"`),e.result=e.anchorMap[n],F(e,!0,-1),!0}function R(e,t,n,r,i){var a,o,s,c=1,l=!1,u=!1,d,f,p,m,h,g;if(e.listener!==null&&e.listener(`open`,e),e.tag=null,e.anchor=null,e.kind=null,e.result=null,a=o=s=C===n||et===n,r&&F(e,!0,-1)&&(l=!0,e.lineIndent>t?c=1:e.lineIndent===t?c=0:e.lineIndent<t&&(c=-1)),c===1)for(;Ot(e)||kt(e);)F(e,!0,-1)?(l=!0,s=a,e.lineIndent>t?c=1:e.lineIndent===t?c=0:e.lineIndent<t&&(c=-1)):s=!1;if(s&&=l||i,(c===1||C===n)&&(h=S===n||$e===n?t:t+1,g=e.position-e.lineStart,c===1?s&&(Et(e,g)||Dt(e,g,h))||wt(e,h)?u=!0:(o&&Tt(e,h)||St(e,h)||Ct(e,h)?u=!0:At(e)?(u=!0,(e.tag!==null||e.anchor!==null)&&A(e,`alias node should not have any properties`)):xt(e,h,S===n)&&(u=!0,e.tag===null&&(e.tag=`?`)),e.anchor!==null&&(e.anchorMap[e.anchor]=e.result)):c===0&&(u=s&&Et(e,g))),e.tag===null)e.anchor!==null&&(e.anchorMap[e.anchor]=e.result);else if(e.tag===`?`){for(e.result!==null&&e.kind!==`scalar`&&A(e,`unacceptable node kind for !<?> tag; it should be \"scalar\", not \"`+e.kind+`\"`),d=0,f=e.implicitTypes.length;d<f;d+=1)if(m=e.implicitTypes[d],m.resolve(e.result)){e.result=m.construct(e.result),e.tag=m.tag,e.anchor!==null&&(e.anchorMap[e.anchor]=e.result);break}}else if(e.tag!==`!`){if(x.call(e.typeMap[e.kind||`fallback`],e.tag))m=e.typeMap[e.kind||`fallback`][e.tag];else for(m=null,p=e.typeMap.multi[e.kind||`fallback`],d=0,f=p.length;d<f;d+=1)if(e.tag.slice(0,p[d].tag.length)===p[d].tag){m=p[d];break}m||A(e,`unknown tag !<`+e.tag+`>`),e.result!==null&&m.kind!==e.kind&&A(e,`unacceptable node kind for !<`+e.tag+`> tag; it should be \"`+m.kind+`\", not \"`+e.kind+`\"`),m.resolve(e.result,e.tag)?(e.result=m.construct(e.result,e.tag),e.anchor!==null&&(e.anchorMap[e.anchor]=e.result)):A(e,`cannot resolve a node with !<`+e.tag+`> explicit tag`)}return e.listener!==null&&e.listener(`close`,e),e.tag!==null||e.anchor!==null||u}function jt(e){var t=e.position,n,r,i,a=!1,o;for(e.version=null,e.checkLineBreaks=e.legacy,e.tagMap=Object.create(null),e.anchorMap=Object.create(null);(o=e.input.charCodeAt(e.position))!==0&&(F(e,!0,-1),o=e.input.charCodeAt(e.position),!(e.lineIndent>0||o!==37));){for(a=!0,o=e.input.charCodeAt(++e.position),n=e.position;o!==0&&!D(o);)o=e.input.charCodeAt(++e.position);for(r=e.input.slice(n,e.position),i=[],r.length<1&&A(e,`directive name must not be less than one character in length`);o!==0;){for(;E(o);)o=e.input.charCodeAt(++e.position);if(o===35){do o=e.input.charCodeAt(++e.position);while(o!==0&&!T(o));break}if(T(o))break;for(n=e.position;o!==0&&!D(o);)o=e.input.charCodeAt(++e.position);i.push(e.input.slice(n,e.position))}o!==0&&P(e),x.call(yt,r)?yt[r](e,r,i):j(e,`unknown document directive \"`+r+`\"`)}if(F(e,!0,-1),e.lineIndent===0&&e.input.charCodeAt(e.position)===45&&e.input.charCodeAt(e.position+1)===45&&e.input.charCodeAt(e.position+2)===45?(e.position+=3,F(e,!0,-1)):a&&A(e,`directives end mark is expected`),R(e,e.lineIndent-1,C,!1,!0),F(e,!0,-1),e.checkLineBreaks&&it.test(e.input.slice(t,e.position))&&j(e,`non-ASCII line breaks are interpreted as content`),e.documents.push(e.result),e.position===e.lineStart&&I(e)){e.input.charCodeAt(e.position)===46&&(e.position+=3,F(e,!0,-1));return}if(e.position<e.length-1)A(e,`end of the stream or a document separator is expected`);else return}function Mt(e,t){e=String(e),t||={},e.length!==0&&(e.charCodeAt(e.length-1)!==10&&e.charCodeAt(e.length-1)!==13&&(e+=`\n`),e.charCodeAt(0)===65279&&(e=e.slice(1)));var n=new _t(e,t),r=e.indexOf(`\\0`);for(r!==-1&&(n.position=r,A(n,`null byte is not allowed in input`)),n.input+=`\\0`;n.input.charCodeAt(n.position)===32;)n.lineIndent+=1,n.position+=1;for(;n.position<n.length-1;)jt(n);return n.documents}function Nt(e,t,n){typeof t==`object`&&t&&n===void 0&&(n=t,t=null);var r=Mt(e,n);if(typeof t!=`function`)return r;for(var i=0,a=r.length;i<a;i+=1)t(r[i])}function Pt(e,t){var n=Mt(e,t);if(n.length!==0){if(n.length===1)return n[0];throw new l(`expected a single document in the stream, but found more`)}}var Ft={loadAll:Nt,load:Pt},It=Object.prototype.toString,Lt=Object.prototype.hasOwnProperty,z=65279,Rt=9,B=10,zt=13,Bt=32,Vt=33,Ht=34,V=35,Ut=37,Wt=38,Gt=39,Kt=42,qt=44,Jt=45,H=58,Yt=61,Xt=62,Zt=63,Qt=64,$t=91,en=93,tn=96,nn=123,rn=124,an=125,U={};U[0]=`\\\\0`,U[7]=`\\\\a`,U[8]=`\\\\b`,U[9]=`\\\\t`,U[10]=`\\\\n`,U[11]=`\\\\v`,U[12]=`\\\\f`,U[13]=`\\\\r`,U[27]=`\\\\e`,U[34]=`\\\\\"`,U[92]=`\\\\\\\\`,U[133]=`\\\\N`,U[160]=`\\\\_`,U[8232]=`\\\\L`,U[8233]=`\\\\P`;var on=[`y`,`Y`,`yes`,`Yes`,`YES`,`on`,`On`,`ON`,`n`,`N`,`no`,`No`,`NO`,`off`,`Off`,`OFF`],sn=/^[-+]?[0-9_]+(?::[0-9_]+)+(?:\\.[0-9_]*)?$/;function cn(e,t){var n,r,i,a,o,s,c;if(t===null)return{};for(n={},r=Object.keys(t),i=0,a=r.length;i<a;i+=1)o=r[i],s=String(t[o]),o.slice(0,2)===`!!`&&(o=`tag:yaml.org,2002:`+o.slice(2)),c=e.compiledTypeMap.fallback[o],c&&Lt.call(c.styleAliases,s)&&(s=c.styleAliases[s]),n[o]=s;return n}function ln(e){var t=e.toString(16).toUpperCase(),n,r;if(e<=255)n=`x`,r=2;else if(e<=65535)n=`u`,r=4;else if(e<=4294967295)n=`U`,r=8;else throw new l(`code point within a string may not be greater than 0xFFFFFFFF`);return`\\\\`+n+o.repeat(`0`,r-t.length)+t}var un=1,W=2;function dn(e){this.schema=e.schema||Qe,this.indent=Math.max(1,e.indent||2),this.noArrayIndent=e.noArrayIndent||!1,this.skipInvalid=e.skipInvalid||!1,this.flowLevel=o.isNothing(e.flowLevel)?-1:e.flowLevel,this.styleMap=cn(this.schema,e.styles||null),this.sortKeys=e.sortKeys||!1,this.lineWidth=e.lineWidth||80,this.noRefs=e.noRefs||!1,this.noCompatMode=e.noCompatMode||!1,this.condenseFlow=e.condenseFlow||!1,this.quotingType=e.quotingType===`\"`?W:un,this.forceQuotes=e.forceQuotes||!1,this.replacer=typeof e.replacer==`function`?e.replacer:null,this.implicitTypes=this.schema.compiledImplicit,this.explicitTypes=this.schema.compiledExplicit,this.tag=null,this.result=``,this.duplicates=[],this.usedDuplicates=null}function fn(e,t){for(var n=o.repeat(` `,t),r=0,i=-1,a=``,s,c=e.length;r<c;)i=e.indexOf(`\n`,r),i===-1?(s=e.slice(r),r=c):(s=e.slice(r,i+1),r=i+1),s.length&&s!==`\n`&&(a+=n),a+=s;return a}function G(e,t){return`\n`+o.repeat(` `,e.indent*t)}function pn(e,t){var n,r,i;for(n=0,r=e.implicitTypes.length;n<r;n+=1)if(i=e.implicitTypes[n],i.resolve(t))return!0;return!1}function K(e){return e===Bt||e===Rt}function q(e){return 32<=e&&e<=126||161<=e&&e<=55295&&e!==8232&&e!==8233||57344<=e&&e<=65533&&e!==z||65536<=e&&e<=1114111}function mn(e){return q(e)&&e!==z&&e!==zt&&e!==B}function hn(e,t,n){var r=mn(e),i=r&&!K(e);return(n?r:r&&e!==qt&&e!==$t&&e!==en&&e!==nn&&e!==an)&&e!==V&&!(t===H&&!i)||mn(t)&&!K(t)&&e===V||t===H&&i}function gn(e){return q(e)&&e!==z&&!K(e)&&e!==Jt&&e!==Zt&&e!==H&&e!==qt&&e!==$t&&e!==en&&e!==nn&&e!==an&&e!==V&&e!==Wt&&e!==Kt&&e!==Vt&&e!==rn&&e!==Yt&&e!==Xt&&e!==Gt&&e!==Ht&&e!==Ut&&e!==Qt&&e!==tn}function _n(e){return!K(e)&&e!==H}function J(e,t){var n=e.charCodeAt(t),r;return n>=55296&&n<=56319&&t+1<e.length&&(r=e.charCodeAt(t+1),r>=56320&&r<=57343)?(n-55296)*1024+r-56320+65536:n}function vn(e){return/^\\n* /.test(e)}var yn=1,Y=2,bn=3,xn=4,X=5;function Sn(e,t,n,r,i,a,o,s){var c,l=0,u=null,d=!1,f=!1,p=r!==-1,m=-1,h=gn(J(e,0))&&_n(J(e,e.length-1));if(t||o)for(c=0;c<e.length;l>=65536?c+=2:c++){if(l=J(e,c),!q(l))return X;h&&=hn(l,u,s),u=l}else{for(c=0;c<e.length;l>=65536?c+=2:c++){if(l=J(e,c),l===B)d=!0,p&&(f||=c-m-1>r&&e[m+1]!==` `,m=c);else if(!q(l))return X;h&&=hn(l,u,s),u=l}f||=p&&c-m-1>r&&e[m+1]!==` `}return!d&&!f?h&&!o&&!i(e)?yn:a===W?X:Y:n>9&&vn(e)?X:o?a===W?X:Y:f?xn:bn}function Cn(e,t,n,r,i){e.dump=function(){if(t.length===0)return e.quotingType===W?`\"\"`:`''`;if(!e.noCompatMode&&(on.indexOf(t)!==-1||sn.test(t)))return e.quotingType===W?`\"`+t+`\"`:`'`+t+`'`;var a=e.indent*Math.max(1,n),o=e.lineWidth===-1?-1:Math.max(Math.min(e.lineWidth,40),e.lineWidth-a),s=r||e.flowLevel>-1&&n>=e.flowLevel;function c(t){return pn(e,t)}switch(Sn(t,s,e.indent,o,c,e.quotingType,e.forceQuotes&&!r,i)){case yn:return t;case Y:return`'`+t.replace(/'/g,`''`)+`'`;case bn:return`|`+wn(t,e.indent)+Tn(fn(t,a));case xn:return`>`+wn(t,e.indent)+Tn(fn(En(t,o),a));case X:return`\"`+Dn(t)+`\"`;default:throw new l(`impossible error: invalid scalar style`)}}()}function wn(e,t){var n=vn(e)?String(t):``,r=e[e.length-1]===`\n`;return n+(r&&(e[e.length-2]===`\n`||e===`\n`)?`+`:r?``:`-`)+`\n`}function Tn(e){return e[e.length-1]===`\n`?e.slice(0,-1):e}function En(e,t){for(var n=/(\\n+)([^\\n]*)/g,r=function(){var r=e.indexOf(`\n`);return r=r===-1?e.length:r,n.lastIndex=r,Z(e.slice(0,r),t)}(),i=e[0]===`\n`||e[0]===` `,a,o;o=n.exec(e);){var s=o[1],c=o[2];a=c[0]===` `,r+=s+(!i&&!a&&c!==``?`\n`:``)+Z(c,t),i=a}return r}function Z(e,t){if(e===``||e[0]===` `)return e;for(var n=/ [^ ]/g,r,i=0,a,o=0,s=0,c=``;r=n.exec(e);)s=r.index,s-i>t&&(a=o>i?o:s,c+=`\n`+e.slice(i,a),i=a+1),o=s;return c+=`\n`,e.length-i>t&&o>i?c+=e.slice(i,o)+`\n`+e.slice(o+1):c+=e.slice(i),c.slice(1)}function Dn(e){for(var t=``,n=0,r,i=0;i<e.length;n>=65536?i+=2:i++)n=J(e,i),r=U[n],!r&&q(n)?(t+=e[i],n>=65536&&(t+=e[i+1])):t+=r||ln(n);return t}function On(e,t,n){var r=``,i=e.tag,a,o,s;for(a=0,o=n.length;a<o;a+=1)s=n[a],e.replacer&&(s=e.replacer.call(n,String(a),s)),(Q(e,t,s,!1,!1)||s===void 0&&Q(e,t,null,!1,!1))&&(r!==``&&(r+=`,`+(e.condenseFlow?``:` `)),r+=e.dump);e.tag=i,e.dump=`[`+r+`]`}function kn(e,t,n,r){var i=``,a=e.tag,o,s,c;for(o=0,s=n.length;o<s;o+=1)c=n[o],e.replacer&&(c=e.replacer.call(n,String(o),c)),(Q(e,t+1,c,!0,!0,!1,!0)||c===void 0&&Q(e,t+1,null,!0,!0,!1,!0))&&((!r||i!==``)&&(i+=G(e,t)),e.dump&&B===e.dump.charCodeAt(0)?i+=`-`:i+=`- `,i+=e.dump);e.tag=a,e.dump=i||`[]`}function An(e,t,n){var r=``,i=e.tag,a=Object.keys(n),o,s,c,l,u;for(o=0,s=a.length;o<s;o+=1)u=``,r!==``&&(u+=`, `),e.condenseFlow&&(u+=`\"`),c=a[o],l=n[c],e.replacer&&(l=e.replacer.call(n,c,l)),Q(e,t,c,!1,!1)&&(e.dump.length>1024&&(u+=`? `),u+=e.dump+(e.condenseFlow?`\"`:``)+`:`+(e.condenseFlow?``:` `),Q(e,t,l,!1,!1)&&(u+=e.dump,r+=u));e.tag=i,e.dump=`{`+r+`}`}function jn(e,t,n,r){var i=``,a=e.tag,o=Object.keys(n),s,c,u,d,f,p;if(e.sortKeys===!0)o.sort();else if(typeof e.sortKeys==`function`)o.sort(e.sortKeys);else if(e.sortKeys)throw new l(`sortKeys must be a boolean or a function`);for(s=0,c=o.length;s<c;s+=1)p=``,(!r||i!==``)&&(p+=G(e,t)),u=o[s],d=n[u],e.replacer&&(d=e.replacer.call(n,u,d)),Q(e,t+1,u,!0,!0,!0)&&(f=e.tag!==null&&e.tag!==`?`||e.dump&&e.dump.length>1024,f&&(e.dump&&B===e.dump.charCodeAt(0)?p+=`?`:p+=`? `),p+=e.dump,f&&(p+=G(e,t)),Q(e,t+1,d,!0,f)&&(e.dump&&B===e.dump.charCodeAt(0)?p+=`:`:p+=`: `,p+=e.dump,i+=p));e.tag=a,e.dump=i||`{}`}function Mn(e,t,n){var r,i=n?e.explicitTypes:e.implicitTypes,a,o,s,c;for(a=0,o=i.length;a<o;a+=1)if(s=i[a],(s.instanceOf||s.predicate)&&(!s.instanceOf||typeof t==`object`&&t instanceof s.instanceOf)&&(!s.predicate||s.predicate(t))){if(n?s.multi&&s.representName?e.tag=s.representName(t):e.tag=s.tag:e.tag=`?`,s.represent){if(c=e.styleMap[s.tag]||s.defaultStyle,It.call(s.represent)===`[object Function]`)r=s.represent(t,c);else if(Lt.call(s.represent,c))r=s.represent[c](t,c);else throw new l(`!<`+s.tag+`> tag resolver accepts not \"`+c+`\" style`);e.dump=r}return!0}return!1}function Q(e,t,n,r,i,a,o){e.tag=null,e.dump=n,Mn(e,n,!1)||Mn(e,n,!0);var s=It.call(e.dump),c=r,u;r&&=e.flowLevel<0||e.flowLevel>t;var d=s===`[object Object]`||s===`[object Array]`,f,p;if(d&&(f=e.duplicates.indexOf(n),p=f!==-1),(e.tag!==null&&e.tag!==`?`||p||e.indent!==2&&t>0)&&(i=!1),p&&e.usedDuplicates[f])e.dump=`*ref_`+f;else{if(d&&p&&!e.usedDuplicates[f]&&(e.usedDuplicates[f]=!0),s===`[object Object]`)r&&Object.keys(e.dump).length!==0?(jn(e,t,e.dump,i),p&&(e.dump=`&ref_`+f+e.dump)):(An(e,t,e.dump),p&&(e.dump=`&ref_`+f+` `+e.dump));else if(s===`[object Array]`)r&&e.dump.length!==0?(e.noArrayIndent&&!o&&t>0?kn(e,t-1,e.dump,i):kn(e,t,e.dump,i),p&&(e.dump=`&ref_`+f+e.dump)):(On(e,t,e.dump),p&&(e.dump=`&ref_`+f+` `+e.dump));else if(s===`[object String]`)e.tag!==`?`&&Cn(e,e.dump,t,a,c);else if(s===`[object Undefined]`)return!1;else{if(e.skipInvalid)return!1;throw new l(`unacceptable kind of an object to dump `+s)}e.tag!==null&&e.tag!==`?`&&(u=encodeURI(e.tag[0]===`!`?e.tag.slice(1):e.tag).replace(/!/g,`%21`),u=e.tag[0]===`!`?`!`+u:u.slice(0,18)===`tag:yaml.org,2002:`?`!!`+u.slice(18):`!<`+u+`>`,e.dump=u+` `+e.dump)}return!0}function Nn(e,t){var n=[],r=[],i,a;for($(e,n,r),i=0,a=r.length;i<a;i+=1)t.duplicates.push(n[r[i]]);t.usedDuplicates=Array(a)}function $(e,t,n){var r,i,a;if(typeof e==`object`&&e)if(i=t.indexOf(e),i!==-1)n.indexOf(i)===-1&&n.push(i);else if(t.push(e),Array.isArray(e))for(i=0,a=e.length;i<a;i+=1)$(e[i],t,n);else for(r=Object.keys(e),i=0,a=r.length;i<a;i+=1)$(e[r[i]],t,n)}function Pn(e,t){t||={};var n=new dn(t);n.noRefs||Nn(e,n);var r=e;return n.replacer&&(r=n.replacer.call({\"\":r},``,r)),Q(n,0,r,!0,!0)?n.dump+`\n`:``}var Fn={dump:Pn},In=Ft.load;Ft.loadAll;var Ln=Fn.dump;export{In as n,Ln as t};","import{n as e,t}from\"./_chunks/_format.mjs\";import{n,t as r}from\"./_chunks/libs/js-yaml.mjs\";function i(t,r){let i=n(t,r);return e(t,i,r),i}function a(e,n){let i=t(e,{preserveIndentation:!1}),a=r(e,{indent:typeof i.indent==`string`?i.indent.length:i.indent,...n});return i.whitespace.start+a.trim()+i.whitespace.end}export{i as parseYAML,a as stringifyYAML};","/*!\n* Copyright (c) Squirrel Chat et al., All rights reserved.\n* SPDX-License-Identifier: BSD-3-Clause\n*\n* Redistribution and use in source and binary forms, with or without\n* modification, are permitted provided that the following conditions are met:\n*\n* 1. Redistributions of source code must retain the above copyright notice, this\n*    list of conditions and the following disclaimer.\n* 2. Redistributions in binary form must reproduce the above copyright notice,\n*    this list of conditions and the following disclaimer in the\n*    documentation and/or other materials provided with the distribution.\n* 3. Neither the name of the copyright holder nor the names of its contributors\n*    may be used to endorse or promote products derived from this software without\n*    specific prior written permission.\n*\n* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS \"AS IS\" AND\n* ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED\n* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE\n* DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE\n* FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL\n* DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR\n* SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER\n* CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,\n* OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE\n* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n*/\nfunction e(e,t){let n=e.slice(0,t).split(/\\r\\n|\\n|\\r/g);return[n.length,n.pop().length+1]}function t(e,t,n){let r=e.split(/\\r\\n|\\n|\\r/g),i=``,a=(Math.log10(t+1)|0)+1;for(let e=t-1;e<=t+1;e++){let o=r[e-1];o&&(i+=e.toString().padEnd(a,` `),i+=`:  `,i+=o,i+=`\n`,e===t&&(i+=` `.repeat(a+n+2),i+=`^\n`))}return i}var n=class extends Error{line;column;codeblock;constructor(n,r){let[i,a]=e(r.toml,r.ptr),o=t(r.toml,i,a);super(`Invalid TOML document: ${n}\\n\\n${o}`,r),this.line=i,this.column=a,this.codeblock=o}};\n/*!\n* Copyright (c) Squirrel Chat et al., All rights reserved.\n* SPDX-License-Identifier: BSD-3-Clause\n*\n* Redistribution and use in source and binary forms, with or without\n* modification, are permitted provided that the following conditions are met:\n*\n* 1. Redistributions of source code must retain the above copyright notice, this\n*    list of conditions and the following disclaimer.\n* 2. Redistributions in binary form must reproduce the above copyright notice,\n*    this list of conditions and the following disclaimer in the\n*    documentation and/or other materials provided with the distribution.\n* 3. Neither the name of the copyright holder nor the names of its contributors\n*    may be used to endorse or promote products derived from this software without\n*    specific prior written permission.\n*\n* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS \"AS IS\" AND\n* ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED\n* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE\n* DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE\n* FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL\n* DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR\n* SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER\n* CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,\n* OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE\n* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n*/\nfunction r(e,t){let n=0;for(;e[t-++n]===`\\\\`;);return--n&&n%2}function i(e,t=0,n=e.length){let r=e.indexOf(`\n`,t);return e[r-1]===`\\r`&&r--,r<=n?r:-1}function a(e,t){for(let r=t;r<e.length;r++){let i=e[r];if(i===`\n`)return r;if(i===`\\r`&&e[r+1]===`\n`)return r+1;if(i<` `&&i!==`\t`||i===``)throw new n(`control characters are not allowed in comments`,{toml:e,ptr:t})}return e.length}function o(e,t,n,r){let i;for(;(i=e[t])===` `||i===`\t`||!n&&(i===`\n`||i===`\\r`&&e[t+1]===`\n`);)t++;return r||i!==`#`?t:o(e,a(e,t),n)}function s(e,t,r,a,o=!1){if(!a)return t=i(e,t),t<0?e.length:t;for(let n=t;n<e.length;n++){let t=e[n];if(t===`#`)n=i(e,n);else if(t===r)return n+1;else if(t===a||o&&(t===`\n`||t===`\\r`&&e[n+1]===`\n`))return n}throw new n(`cannot find end of structure`,{toml:e,ptr:t})}function c(e,t){let n=e[t],i=n===e[t+1]&&e[t+1]===e[t+2]?e.slice(t,t+3):n;t+=i.length-1;do t=e.indexOf(i,++t);while(t>-1&&n!==`'`&&r(e,t));return t>-1&&(t+=i.length,i.length>1&&(e[t]===n&&t++,e[t]===n&&t++)),t}\n/*!\n* Copyright (c) Squirrel Chat et al., All rights reserved.\n* SPDX-License-Identifier: BSD-3-Clause\n*\n* Redistribution and use in source and binary forms, with or without\n* modification, are permitted provided that the following conditions are met:\n*\n* 1. Redistributions of source code must retain the above copyright notice, this\n*    list of conditions and the following disclaimer.\n* 2. Redistributions in binary form must reproduce the above copyright notice,\n*    this list of conditions and the following disclaimer in the\n*    documentation and/or other materials provided with the distribution.\n* 3. Neither the name of the copyright holder nor the names of its contributors\n*    may be used to endorse or promote products derived from this software without\n*    specific prior written permission.\n*\n* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS \"AS IS\" AND\n* ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED\n* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE\n* DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE\n* FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL\n* DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR\n* SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER\n* CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,\n* OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE\n* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n*/\nlet l=/^(\\d{4}-\\d{2}-\\d{2})?[T ]?(?:(\\d{2}):\\d{2}(?::\\d{2}(?:\\.\\d+)?)?)?(Z|[-+]\\d{2}:\\d{2})?$/i;var u=class e extends Date{#e=!1;#t=!1;#n=null;constructor(e){let t=!0,n=!0,r=`Z`;if(typeof e==`string`){let i=e.match(l);i?(i[1]||(t=!1,e=`0000-01-01T${e}`),n=!!i[2],n&&e[10]===` `&&(e=e.replace(` `,`T`)),i[2]&&+i[2]>23?e=``:(r=i[3]||null,e=e.toUpperCase(),!r&&n&&(e+=`Z`))):e=``}super(e),isNaN(this.getTime())||(this.#e=t,this.#t=n,this.#n=r)}isDateTime(){return this.#e&&this.#t}isLocal(){return!this.#e||!this.#t||!this.#n}isDate(){return this.#e&&!this.#t}isTime(){return this.#t&&!this.#e}isValid(){return this.#e||this.#t}toISOString(){let e=super.toISOString();if(this.isDate())return e.slice(0,10);if(this.isTime())return e.slice(11,23);if(this.#n===null)return e.slice(0,-1);if(this.#n===`Z`)return e;let t=this.#n.slice(1,3)*60+ +this.#n.slice(4,6);return t=this.#n[0]===`-`?t:-t,new Date(this.getTime()-t*6e4).toISOString().slice(0,-1)+this.#n}static wrapAsOffsetDateTime(t,n=`Z`){let r=new e(t);return r.#n=n,r}static wrapAsLocalDateTime(t){let n=new e(t);return n.#n=null,n}static wrapAsLocalDate(t){let n=new e(t);return n.#t=!1,n.#n=null,n}static wrapAsLocalTime(t){let n=new e(t);return n.#e=!1,n.#n=null,n}};\n/*!\n* Copyright (c) Squirrel Chat et al., All rights reserved.\n* SPDX-License-Identifier: BSD-3-Clause\n*\n* Redistribution and use in source and binary forms, with or without\n* modification, are permitted provided that the following conditions are met:\n*\n* 1. Redistributions of source code must retain the above copyright notice, this\n*    list of conditions and the following disclaimer.\n* 2. Redistributions in binary form must reproduce the above copyright notice,\n*    this list of conditions and the following disclaimer in the\n*    documentation and/or other materials provided with the distribution.\n* 3. Neither the name of the copyright holder nor the names of its contributors\n*    may be used to endorse or promote products derived from this software without\n*    specific prior written permission.\n*\n* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS \"AS IS\" AND\n* ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED\n* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE\n* DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE\n* FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL\n* DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR\n* SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER\n* CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,\n* OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE\n* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n*/\nlet d=/^((0x[0-9a-fA-F](_?[0-9a-fA-F])*)|(([+-]|0[ob])?\\d(_?\\d)*))$/,f=/^[+-]?\\d(_?\\d)*(\\.\\d(_?\\d)*)?([eE][+-]?\\d(_?\\d)*)?$/,p=/^[+-]?0[0-9_]/,m=/^[0-9a-f]{2,8}$/i,h={b:`\\b`,t:`\t`,n:`\n`,f:`\\f`,r:`\\r`,e:`\\x1B`,'\"':`\"`,\"\\\\\":`\\\\`};function g(e,t=0,r=e.length){let i=e[t]===`'`,a=e[t++]===e[t]&&e[t]===e[t+1];a&&(r-=2,e[t+=2]===`\\r`&&t++,e[t]===`\n`&&t++);let s=0,c,l=``,u=t;for(;t<r-1;){let r=e[t++];if(r===`\n`||r===`\\r`&&e[t]===`\n`){if(!a)throw new n(`newlines are not allowed in strings`,{toml:e,ptr:t-1})}else if(r<` `&&r!==`\t`||r===``)throw new n(`control characters are not allowed in strings`,{toml:e,ptr:t-1});if(c){if(c=!1,r===`x`||r===`u`||r===`U`){let i=e.slice(t,t+=r===`x`?2:r===`u`?4:8);if(!m.test(i))throw new n(`invalid unicode escape`,{toml:e,ptr:s});try{l+=String.fromCodePoint(parseInt(i,16))}catch{throw new n(`invalid unicode escape`,{toml:e,ptr:s})}}else if(a&&(r===`\n`||r===` `||r===`\t`||r===`\\r`)){if(t=o(e,t-1,!0),e[t]!==`\n`&&e[t]!==`\\r`)throw new n(`invalid escape: only line-ending whitespace may be escaped`,{toml:e,ptr:s});t=o(e,t)}else if(r in h)l+=h[r];else throw new n(`unrecognized escape sequence`,{toml:e,ptr:s});u=t}else !i&&r===`\\\\`&&(s=t-1,c=!0,l+=e.slice(u,s))}return l+e.slice(u,r-1)}function _(e,t,r,i){if(e===`true`)return!0;if(e===`false`)return!1;if(e===`-inf`)return-1/0;if(e===`inf`||e===`+inf`)return 1/0;if(e===`nan`||e===`+nan`||e===`-nan`)return NaN;if(e===`-0`)return i?0n:0;let a=d.test(e);if(a||f.test(e)){if(p.test(e))throw new n(`leading zeroes are not allowed`,{toml:t,ptr:r});e=e.replace(/_/g,``);let o=+e;if(isNaN(o))throw new n(`invalid number`,{toml:t,ptr:r});if(a){if((a=!Number.isSafeInteger(o))&&!i)throw new n(`integer value cannot be represented losslessly`,{toml:t,ptr:r});(a||i===!0)&&(o=BigInt(e))}return o}let o=new u(e);if(!o.isValid())throw new n(`invalid value`,{toml:t,ptr:r});return o}\n/*!\n* Copyright (c) Squirrel Chat et al., All rights reserved.\n* SPDX-License-Identifier: BSD-3-Clause\n*\n* Redistribution and use in source and binary forms, with or without\n* modification, are permitted provided that the following conditions are met:\n*\n* 1. Redistributions of source code must retain the above copyright notice, this\n*    list of conditions and the following disclaimer.\n* 2. Redistributions in binary form must reproduce the above copyright notice,\n*    this list of conditions and the following disclaimer in the\n*    documentation and/or other materials provided with the distribution.\n* 3. Neither the name of the copyright holder nor the names of its contributors\n*    may be used to endorse or promote products derived from this software without\n*    specific prior written permission.\n*\n* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS \"AS IS\" AND\n* ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED\n* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE\n* DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE\n* FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL\n* DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR\n* SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER\n* CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,\n* OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE\n* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n*/\nfunction v(e,t,n){let r=e.slice(t,n),i=r.indexOf(`#`);return i>-1&&(a(e,i),r=r.slice(0,i)),[r.trimEnd(),i]}function y(e,t,r,i,a){if(i===0)throw new n(`document contains excessively nested structures. aborting.`,{toml:e,ptr:t});let l=e[t];if(l===`[`||l===`{`){let[s,c]=l===`[`?C(e,t,i,a):S(e,t,i,a);if(r){if(c=o(e,c),e[c]===`,`)c++;else if(e[c]!==r)throw new n(`expected comma or end of structure`,{toml:e,ptr:c})}return[s,c]}let u;if(l===`\"`||l===`'`){u=c(e,t);let i=g(e,t,u);if(r){if(u=o(e,u),e[u]&&e[u]!==`,`&&e[u]!==r&&e[u]!==`\n`&&e[u]!==`\\r`)throw new n(`unexpected character encountered`,{toml:e,ptr:u});u+=+(e[u]===`,`)}return[i,u]}u=s(e,t,`,`,r);let d=v(e,t,u-+(e[u-1]===`,`));if(!d[0])throw new n(`incomplete key-value declaration: no value specified`,{toml:e,ptr:t});return r&&d[1]>-1&&(u=o(e,t+d[1]),u+=+(e[u]===`,`)),[_(d[0],e,t,a),u]}\n/*!\n* Copyright (c) Squirrel Chat et al., All rights reserved.\n* SPDX-License-Identifier: BSD-3-Clause\n*\n* Redistribution and use in source and binary forms, with or without\n* modification, are permitted provided that the following conditions are met:\n*\n* 1. Redistributions of source code must retain the above copyright notice, this\n*    list of conditions and the following disclaimer.\n* 2. Redistributions in binary form must reproduce the above copyright notice,\n*    this list of conditions and the following disclaimer in the\n*    documentation and/or other materials provided with the distribution.\n* 3. Neither the name of the copyright holder nor the names of its contributors\n*    may be used to endorse or promote products derived from this software without\n*    specific prior written permission.\n*\n* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS \"AS IS\" AND\n* ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED\n* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE\n* DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE\n* FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL\n* DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR\n* SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER\n* CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,\n* OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE\n* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n*/\nlet b=/^[a-zA-Z0-9-_]+[ \\t]*$/;function x(e,t,r=`=`){let a=t-1,s=[],l=e.indexOf(r,t);if(l<0)throw new n(`incomplete key-value: cannot find end of key`,{toml:e,ptr:t});do{let o=e[t=++a];if(o!==` `&&o!==`\t`)if(o===`\"`||o===`'`){if(o===e[t+1]&&o===e[t+2])throw new n(`multiline strings are not allowed in keys`,{toml:e,ptr:t});let u=c(e,t);if(u<0)throw new n(`unfinished string encountered`,{toml:e,ptr:t});a=e.indexOf(`.`,u);let d=e.slice(u,a<0||a>l?l:a),f=i(d);if(f>-1)throw new n(`newlines are not allowed in keys`,{toml:e,ptr:t+a+f});if(d.trimStart())throw new n(`found extra tokens after the string part`,{toml:e,ptr:u});if(l<u&&(l=e.indexOf(r,u),l<0))throw new n(`incomplete key-value: cannot find end of key`,{toml:e,ptr:t});s.push(g(e,t,u))}else{a=e.indexOf(`.`,t);let r=e.slice(t,a<0||a>l?l:a);if(!b.test(r))throw new n(`only letter, numbers, dashes and underscores are allowed in keys`,{toml:e,ptr:t});s.push(r.trimEnd())}}while(a+1&&a<l);return[s,o(e,l+1,!0,!0)]}function S(e,t,r,i){let o={},s=new Set,c;for(t++;(c=e[t++])!==`}`&&c;)if(c===`,`)throw new n(`expected value, found comma`,{toml:e,ptr:t-1});else if(c===`#`)t=a(e,t);else if(c!==` `&&c!==`\t`&&c!==`\n`&&c!==`\\r`){let a,c=o,l=!1,[u,d]=x(e,t-1);for(let r=0;r<u.length;r++){if(r&&(c=l?c[a]:c[a]={}),a=u[r],(l=Object.hasOwn(c,a))&&(typeof c[a]!=`object`||s.has(c[a])))throw new n(`trying to redefine an already defined value`,{toml:e,ptr:t});!l&&a===`__proto__`&&Object.defineProperty(c,a,{enumerable:!0,configurable:!0,writable:!0})}if(l)throw new n(`trying to redefine an already defined value`,{toml:e,ptr:t});let[f,p]=y(e,d,`}`,r-1,i);s.add(f),c[a]=f,t=p}if(!c)throw new n(`unfinished table encountered`,{toml:e,ptr:t});return[o,t]}function C(e,t,r,i){let o=[],s;for(t++;(s=e[t++])!==`]`&&s;)if(s===`,`)throw new n(`expected value, found comma`,{toml:e,ptr:t-1});else if(s===`#`)t=a(e,t);else if(s!==` `&&s!==`\t`&&s!==`\n`&&s!==`\\r`){let n=y(e,t-1,`]`,r-1,i);o.push(n[0]),t=n[1]}if(!s)throw new n(`unfinished array encountered`,{toml:e,ptr:t});return[o,t]}\n/*!\n* Copyright (c) Squirrel Chat et al., All rights reserved.\n* SPDX-License-Identifier: BSD-3-Clause\n*\n* Redistribution and use in source and binary forms, with or without\n* modification, are permitted provided that the following conditions are met:\n*\n* 1. Redistributions of source code must retain the above copyright notice, this\n*    list of conditions and the following disclaimer.\n* 2. Redistributions in binary form must reproduce the above copyright notice,\n*    this list of conditions and the following disclaimer in the\n*    documentation and/or other materials provided with the distribution.\n* 3. Neither the name of the copyright holder nor the names of its contributors\n*    may be used to endorse or promote products derived from this software without\n*    specific prior written permission.\n*\n* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS \"AS IS\" AND\n* ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED\n* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE\n* DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE\n* FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL\n* DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR\n* SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER\n* CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,\n* OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE\n* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n*/\nfunction w(e,t,n,r){let i=t,a=n,o,s=!1,c;for(let t=0;t<e.length;t++){if(t){if(i=s?i[o]:i[o]={},a=(c=a[o]).c,r===0&&(c.t===1||c.t===2))return null;if(c.t===2){let e=i.length-1;i=i[e],a=a[e].c}}if(o=e[t],(s=Object.hasOwn(i,o))&&a[o]?.t===0&&a[o]?.d)return null;s||(o===`__proto__`&&(Object.defineProperty(i,o,{enumerable:!0,configurable:!0,writable:!0}),Object.defineProperty(a,o,{enumerable:!0,configurable:!0,writable:!0})),a[o]={t:t<e.length-1&&r===2?3:r,d:!1,i:0,c:{}})}if(c=a[o],c.t!==r&&!(r===1&&c.t===3)||(r===2&&(c.d||(c.d=!0,i[o]=[]),i[o].push(i={}),c.c[c.i++]=c={t:1,d:!1,i:0,c:{}}),c.d))return null;if(c.d=!0,r===1)i=s?i[o]:i[o]={};else if(r===0&&s)return null;return[o,i,c.c]}function T(e,{maxDepth:t=1e3,integersAsBigInt:r}={}){let i={},a={},s=i,c=a;for(let l=o(e,0);l<e.length;){if(e[l]===`[`){let t=e[++l]===`[`,r=x(e,l+=+t,`]`);if(t){if(e[r[1]-1]!==`]`)throw new n(`expected end of table declaration`,{toml:e,ptr:r[1]-1});r[1]++}let o=w(r[0],i,a,t?2:1);if(!o)throw new n(`trying to redefine an already defined table or value`,{toml:e,ptr:l});c=o[2],s=o[1],l=r[1]}else{let i=x(e,l),a=w(i[0],s,c,0);if(!a)throw new n(`trying to redefine an already defined table or value`,{toml:e,ptr:l});let o=y(e,i[1],void 0,t,r);a[1][a[0]]=o[0],l=o[1]}if(l=o(e,l,!0),e[l]&&e[l]!==`\n`&&e[l]!==`\\r`)throw new n(`each key-value declaration must be followed by an end-of-line`,{toml:e,ptr:l});l=o(e,l)}return i}\n/*!\n* Copyright (c) Squirrel Chat et al., All rights reserved.\n* SPDX-License-Identifier: BSD-3-Clause\n*\n* Redistribution and use in source and binary forms, with or without\n* modification, are permitted provided that the following conditions are met:\n*\n* 1. Redistributions of source code must retain the above copyright notice, this\n*    list of conditions and the following disclaimer.\n* 2. Redistributions in binary form must reproduce the above copyright notice,\n*    this list of conditions and the following disclaimer in the\n*    documentation and/or other materials provided with the distribution.\n* 3. Neither the name of the copyright holder nor the names of its contributors\n*    may be used to endorse or promote products derived from this software without\n*    specific prior written permission.\n*\n* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS \"AS IS\" AND\n* ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED\n* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE\n* DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE\n* FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL\n* DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR\n* SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER\n* CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,\n* OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE\n* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n*/\nlet E=/^[a-z0-9-_]+$/i;function D(e){let t=typeof e;if(t===`object`){if(Array.isArray(e))return`array`;if(e instanceof Date)return`date`}return t}function O(e){for(let t=0;t<e.length;t++)if(D(e[t])!==`object`)return!1;return e.length!=0}function k(e){return JSON.stringify(e).replace(/\\x7f/g,`\\\\u007f`)}function A(e,t,n,r){if(n===0)throw Error(`Could not stringify the object: maximum object depth exceeded`);if(t===`number`)return isNaN(e)?`nan`:e===1/0?`inf`:e===-1/0?`-inf`:r&&Number.isInteger(e)?e.toFixed(1):e.toString();if(t===`bigint`||t===`boolean`)return e.toString();if(t===`string`)return k(e);if(t===`date`){if(isNaN(e.getTime()))throw TypeError(`cannot serialize invalid date`);return e.toISOString()}if(t===`object`)return j(e,n,r);if(t===`array`)return M(e,n,r)}function j(e,t,n){let r=Object.keys(e);if(r.length===0)return`{}`;let i=`{ `;for(let a=0;a<r.length;a++){let o=r[a];a&&(i+=`, `),i+=E.test(o)?o:k(o),i+=` = `,i+=A(e[o],D(e[o]),t-1,n)}return i+` }`}function M(e,t,n){if(e.length===0)return`[]`;let r=`[ `;for(let i=0;i<e.length;i++){if(i&&(r+=`, `),e[i]===null||e[i]===void 0)throw TypeError(`arrays cannot contain null or undefined values`);r+=A(e[i],D(e[i]),t-1,n)}return r+` ]`}function N(e,t,n,r){if(n===0)throw Error(`Could not stringify the object: maximum object depth exceeded`);let i=``;for(let a=0;a<e.length;a++)i+=`${i&&`\n`}[[${t}]]\\n`,i+=P(0,e[a],t,n,r);return i}function P(e,t,n,r,i){if(r===0)throw Error(`Could not stringify the object: maximum object depth exceeded`);let a=``,o=``,s=Object.keys(t);for(let e=0;e<s.length;e++){let c=s[e];if(t[c]!==null&&t[c]!==void 0){let e=D(t[c]);if(e===`symbol`||e===`function`)throw TypeError(`cannot serialize values of type '${e}'`);let s=E.test(c)?c:k(c);if(e===`array`&&O(t[c]))o+=(o&&`\n`)+N(t[c],n?`${n}.${s}`:s,r-1,i);else if(e===`object`){let e=n?`${n}.${s}`:s;o+=(o&&`\n`)+P(e,t[c],e,r-1,i)}else a+=s,a+=` = `,a+=A(t[c],e,r,i),a+=`\n`}}return e&&(a||!o)&&(a=a?`[${e}]\\n${a}`:`[${e}]`),a&&o?`${a}\\n${o}`:a||o}function F(e,{maxDepth:t=1e3,numbersAsFloat:n=!1}={}){if(D(e)!==`object`)throw TypeError(`stringify can only be called with an object`);let r=P(0,e,``,t,n);return r[r.length-1]===`\n`?r:r+`\n`}export{T as n,F as t};","import{n as e,t}from\"./_chunks/_format.mjs\";import{n,t as r}from\"./_chunks/libs/smol-toml.mjs\";function i(t){let r=n(t);return e(t,r,{preserveIndentation:!1}),r}function a(e){let n=t(e,{preserveIndentation:!1}),i=r(e);return n.whitespace.start+i+n.whitespace.end}export{i as parseTOML,a as stringifyTOML};","import\"./_chunks/rolldown-runtime.mjs\";import\"./_chunks/libs/json5.mjs\";import{parseJSON5 as e,stringifyJSON5 as t}from\"./json5.mjs\";import\"./_chunks/libs/jsonc-parser.mjs\";import{n,t as r}from\"./_chunks/json.mjs\";import{parseJSONC as i,stringifyJSONC as a}from\"./jsonc.mjs\";import\"./_chunks/libs/js-yaml.mjs\";import{parseYAML as o,stringifyYAML as s}from\"./yaml.mjs\";import{parseTOML as c,stringifyTOML as l}from\"./toml.mjs\";import\"./_chunks/libs/ini.mjs\";import{parseINI as u,stringifyINI as d}from\"./ini.mjs\";export{u as parseINI,r as parseJSON,e as parseJSON5,i as parseJSONC,c as parseTOML,o as parseYAML,d as stringifyINI,n as stringifyJSON,t as stringifyJSON5,a as stringifyJSONC,l as stringifyTOML,s as stringifyYAML};","import { promises, statSync } from \"node:fs\";\nimport { dirname, isAbsolute, join, normalize, resolve } from \"pathe\";\nimport { parseJSON, parseJSON5, parseJSONC, parseYAML, stringifyJSON, stringifyJSON5, stringifyJSONC, stringifyYAML } from \"confbox\";\nimport { resolveModulePath } from \"exsolve\";\nimport { fileURLToPath } from \"node:url\";\nimport { readFile, writeFile } from \"node:fs/promises\";\nimport { parseINI, stringifyINI } from \"confbox/ini\";\nconst defaultFindOptions = {\n\tstartingFrom: \".\",\n\trootPattern: /^node_modules$/,\n\treverse: false,\n\ttest: (filePath) => {\n\t\ttry {\n\t\t\tif (statSync(filePath).isFile()) return true;\n\t\t} catch {}\n\t}\n};\nasync function findFile(filename, _options = {}) {\n\tconst filenames = Array.isArray(filename) ? filename : [filename];\n\tconst options = {\n\t\t...defaultFindOptions,\n\t\t..._options\n\t};\n\tconst basePath = resolve(options.startingFrom);\n\tconst leadingSlash = basePath[0] === \"/\";\n\tconst segments = basePath.split(\"/\").filter(Boolean);\n\tif (filenames.includes(segments.at(-1)) && await options.test(basePath)) return basePath;\n\tif (leadingSlash) segments[0] = \"/\" + segments[0];\n\tlet root = segments.findIndex((r) => r.match(options.rootPattern));\n\tif (root === -1) root = 0;\n\tif (options.reverse) for (let index = root + 1; index <= segments.length; index++) for (const filename of filenames) {\n\t\tconst filePath = join(...segments.slice(0, index), filename);\n\t\tif (await options.test(filePath)) return filePath;\n\t}\n\telse for (let index = segments.length; index > root; index--) for (const filename of filenames) {\n\t\tconst filePath = join(...segments.slice(0, index), filename);\n\t\tif (await options.test(filePath)) return filePath;\n\t}\n\tthrow new Error(`Cannot find matching ${filename} in ${options.startingFrom} or parent directories`);\n}\nfunction findNearestFile(filename, options = {}) {\n\treturn findFile(filename, options);\n}\nfunction findFarthestFile(filename, options = {}) {\n\treturn findFile(filename, {\n\t\t...options,\n\t\treverse: true\n\t});\n}\nfunction _resolvePath(id, opts = {}) {\n\tif (id instanceof URL || id.startsWith(\"file://\")) return normalize(fileURLToPath(id));\n\tif (isAbsolute(id)) return normalize(id);\n\treturn resolveModulePath(id, {\n\t\t...opts,\n\t\tfrom: opts.from || opts.parent || opts.url\n\t});\n}\nconst FileCache$1 = /* @__PURE__ */ new Map();\nfunction defineTSConfig(tsconfig) {\n\treturn tsconfig;\n}\nasync function readTSConfig(id, options = {}) {\n\tconst resolvedPath = await resolveTSConfig(id, options);\n\tconst cache = options.cache && typeof options.cache !== \"boolean\" ? options.cache : FileCache$1;\n\tif (options.cache && cache.has(resolvedPath)) return cache.get(resolvedPath);\n\tconst parsed = parseJSONC(await promises.readFile(resolvedPath, \"utf8\"));\n\tcache.set(resolvedPath, parsed);\n\treturn parsed;\n}\nasync function writeTSConfig(path, tsconfig) {\n\tawait promises.writeFile(path, stringifyJSONC(tsconfig));\n}\nasync function resolveTSConfig(id = process.cwd(), options = {}) {\n\treturn findNearestFile(\"tsconfig.json\", {\n\t\t...options,\n\t\tstartingFrom: _resolvePath(id, options)\n\t});\n}\nconst lockFiles = [\n\t\"yarn.lock\",\n\t\"package-lock.json\",\n\t\"pnpm-lock.yaml\",\n\t\"npm-shrinkwrap.json\",\n\t\"bun.lockb\",\n\t\"bun.lock\",\n\t\"deno.lock\"\n];\nconst packageFiles = [\n\t\"package.json\",\n\t\"package.json5\",\n\t\"package.yaml\"\n];\nconst workspaceFiles = [\n\t\"pnpm-workspace.yaml\",\n\t\"lerna.json\",\n\t\"turbo.json\",\n\t\"rush.json\",\n\t\"deno.json\",\n\t\"deno.jsonc\"\n];\nconst FileCache = /* @__PURE__ */ new Map();\nfunction definePackageJSON(pkg) {\n\treturn pkg;\n}\nasync function findPackage(id = process.cwd(), options = {}) {\n\treturn findNearestFile(packageFiles, {\n\t\t...options,\n\t\tstartingFrom: _resolvePath(id, options)\n\t});\n}\nasync function readPackage(id, options = {}) {\n\tconst resolvedPath = await findPackage(id, options);\n\tconst cache = options.cache && typeof options.cache !== \"boolean\" ? options.cache : FileCache;\n\tif (options.cache && cache.has(resolvedPath)) return cache.get(resolvedPath);\n\tconst blob = await promises.readFile(resolvedPath, \"utf8\");\n\tlet parsed;\n\tif (resolvedPath.endsWith(\".json5\")) parsed = parseJSON5(blob);\n\telse if (resolvedPath.endsWith(\".yaml\")) parsed = parseYAML(blob);\n\telse try {\n\t\tparsed = parseJSON(blob);\n\t} catch {\n\t\tparsed = parseJSONC(blob);\n\t}\n\tcache.set(resolvedPath, parsed);\n\treturn parsed;\n}\nasync function writePackage(path, pkg) {\n\tlet content;\n\tif (path.endsWith(\".json5\")) content = stringifyJSON5(pkg);\n\telse if (path.endsWith(\".yaml\")) content = stringifyYAML(pkg);\n\telse content = stringifyJSON(pkg);\n\tawait promises.writeFile(path, content);\n}\nasync function readPackageJSON(id, options = {}) {\n\tconst resolvedPath = await resolvePackageJSON(id, options);\n\tconst cache = options.cache && typeof options.cache !== \"boolean\" ? options.cache : FileCache;\n\tif (options.cache && cache.has(resolvedPath)) return cache.get(resolvedPath);\n\tconst blob = await promises.readFile(resolvedPath, \"utf8\");\n\tlet parsed;\n\ttry {\n\t\tparsed = parseJSON(blob);\n\t} catch {\n\t\tparsed = parseJSONC(blob);\n\t}\n\tcache.set(resolvedPath, parsed);\n\treturn parsed;\n}\nasync function writePackageJSON(path, pkg) {\n\tawait promises.writeFile(path, stringifyJSON(pkg));\n}\nasync function resolvePackageJSON(id = process.cwd(), options = {}) {\n\treturn findNearestFile(\"package.json\", {\n\t\t...options,\n\t\tstartingFrom: _resolvePath(id, options)\n\t});\n}\nasync function resolveLockfile(id = process.cwd(), options = {}) {\n\treturn findNearestFile(lockFiles, {\n\t\t...options,\n\t\tstartingFrom: _resolvePath(id, options)\n\t});\n}\nconst workspaceTests = {\n\tworkspaceFile: (opts) => findFile(workspaceFiles, opts).then((r) => dirname(r)),\n\tgitConfig: (opts) => findFile(\".git/config\", opts).then((r) => resolve(r, \"../..\")),\n\tlockFile: (opts) => findFile(lockFiles, opts).then((r) => dirname(r)),\n\tpackageJson: (opts) => findFile(packageFiles, opts).then((r) => dirname(r))\n};\nasync function findWorkspaceDir(id = process.cwd(), options = {}) {\n\tconst startingFrom = _resolvePath(id, options);\n\tconst tests = options.tests || [\n\t\t\"workspaceFile\",\n\t\t\"gitConfig\",\n\t\t\"lockFile\",\n\t\t\"packageJson\"\n\t];\n\tfor (const testName of tests) {\n\t\tconst test = workspaceTests[testName];\n\t\tif (options[testName] === false || !test) continue;\n\t\tconst direction = options[testName] || (testName === \"gitConfig\" ? \"closest\" : \"furthest\");\n\t\tconst detected = await test({\n\t\t\t...options,\n\t\t\tstartingFrom,\n\t\t\treverse: direction === \"furthest\"\n\t\t}).catch(() => {});\n\t\tif (detected) return detected;\n\t}\n\tthrow new Error(`Cannot detect workspace root from ${id}`);\n}\nasync function updatePackage(id, callback, options = {}) {\n\tconst resolvedPath = await findPackage(id, options);\n\tconst pkg = await readPackage(id, options);\n\tawait writePackage(resolvedPath, await callback(new Proxy(pkg, { get(target, prop) {\n\t\tif (typeof prop === \"string\" && objectKeys.has(prop) && !Object.hasOwn(target, prop)) target[prop] = {};\n\t\treturn Reflect.get(target, prop);\n\t} })) || pkg);\n}\nfunction sortPackage(pkg) {\n\tconst sorted = {};\n\tconst originalKeys = Object.keys(pkg);\n\tconst knownKeysPresent = defaultFieldOrder.filter((key) => Object.hasOwn(pkg, key));\n\tfor (const key of originalKeys) {\n\t\tconst currentIndex = knownKeysPresent.indexOf(key);\n\t\tif (currentIndex === -1) {\n\t\t\tsorted[key] = pkg[key];\n\t\t\tcontinue;\n\t\t}\n\t\tfor (let i = 0; i <= currentIndex; i++) {\n\t\t\tconst knownKey = knownKeysPresent[i];\n\t\t\tif (!Object.hasOwn(sorted, knownKey)) sorted[knownKey] = pkg[knownKey];\n\t\t}\n\t}\n\tfor (const key of [...dependencyKeys, \"scripts\"]) {\n\t\tconst value = sorted[key];\n\t\tif (isObject(value)) sorted[key] = sortObject(value);\n\t}\n\treturn sorted;\n}\nfunction normalizePackage(pkg) {\n\tconst normalized = sortPackage(pkg);\n\tfor (const key of dependencyKeys) {\n\t\tif (!Object.hasOwn(normalized, key)) continue;\n\t\tconst value = normalized[key];\n\t\tif (!isObject(value)) delete normalized[key];\n\t}\n\treturn normalized;\n}\nfunction isObject(value) {\n\treturn typeof value === \"object\" && value !== null && !Array.isArray(value);\n}\nfunction sortObject(obj) {\n\treturn Object.fromEntries(Object.entries(obj).sort(([a], [b]) => a.localeCompare(b)));\n}\nconst dependencyKeys = [\n\t\"dependencies\",\n\t\"devDependencies\",\n\t\"optionalDependencies\",\n\t\"peerDependencies\"\n];\nconst objectKeys = new Set([\n\t\"typesVersions\",\n\t\"scripts\",\n\t\"resolutions\",\n\t\"overrides\",\n\t\"dependencies\",\n\t\"devDependencies\",\n\t\"dependenciesMeta\",\n\t\"peerDependencies\",\n\t\"peerDependenciesMeta\",\n\t\"optionalDependencies\",\n\t\"engines\",\n\t\"publishConfig\"\n]);\nconst defaultFieldOrder = [\n\t\"$schema\",\n\t\"name\",\n\t\"version\",\n\t\"private\",\n\t\"description\",\n\t\"keywords\",\n\t\"homepage\",\n\t\"bugs\",\n\t\"repository\",\n\t\"funding\",\n\t\"license\",\n\t\"author\",\n\t\"sideEffects\",\n\t\"type\",\n\t\"imports\",\n\t\"exports\",\n\t\"main\",\n\t\"module\",\n\t\"browser\",\n\t\"types\",\n\t\"typesVersions\",\n\t\"typings\",\n\t\"bin\",\n\t\"man\",\n\t\"files\",\n\t\"workspaces\",\n\t\"scripts\",\n\t\"resolutions\",\n\t\"overrides\",\n\t\"dependencies\",\n\t\"devDependencies\",\n\t\"dependenciesMeta\",\n\t\"peerDependencies\",\n\t\"peerDependenciesMeta\",\n\t\"optionalDependencies\",\n\t\"bundledDependencies\",\n\t\"bundleDependencies\",\n\t\"packageManager\",\n\t\"engines\",\n\t\"publishConfig\"\n];\nfunction defineGitConfig(config) {\n\treturn config;\n}\nasync function resolveGitConfig(dir, opts) {\n\treturn findNearestFile(\".git/config\", {\n\t\t...opts,\n\t\tstartingFrom: dir\n\t});\n}\nasync function readGitConfig(dir, opts) {\n\treturn parseGitConfig(await readFile(await resolveGitConfig(dir, opts), \"utf8\"));\n}\nasync function writeGitConfig(path, config) {\n\tawait writeFile(path, stringifyGitConfig(config));\n}\nfunction parseGitConfig(ini) {\n\treturn parseINI(ini.replaceAll(/^\\[(\\w+) \"(.+)\"\\]$/gm, \"[$1.$2]\"));\n}\nfunction stringifyGitConfig(config) {\n\treturn stringifyINI(config).replaceAll(/^\\[(\\w+)\\.(\\w+)\\]$/gm, \"[$1 \\\"$2\\\"]\");\n}\nexport { defineGitConfig, definePackageJSON, defineTSConfig, findFarthestFile, findFile, findNearestFile, findPackage, findWorkspaceDir, normalizePackage, parseGitConfig, readGitConfig, readPackage, readPackageJSON, readTSConfig, resolveGitConfig, resolveLockfile, resolvePackageJSON, resolveTSConfig, sortPackage, stringifyGitConfig, updatePackage, writeGitConfig, writePackage, writePackageJSON, writeTSConfig };\n","const fs = require('fs')\nconst path = require('path')\nconst os = require('os')\nconst crypto = require('crypto')\n\n// Array of tips to display randomly\nconst TIPS = [\n  '◈ encrypted .env [www.dotenvx.com]',\n  '◈ secrets for agents [www.dotenvx.com]',\n  '⌁ auth for agents [www.vestauth.com]',\n  '⌘ custom filepath { path: \\'/custom/path/.env\\' }',\n  '⌘ enable debugging { debug: true }',\n  '⌘ override existing { override: true }',\n  '⌘ suppress logs { quiet: true }',\n  '⌘ multiple files { path: [\\'.env.local\\', \\'.env\\'] }'\n]\n\n// Get a random tip from the tips array\nfunction _getRandomTip () {\n  return TIPS[Math.floor(Math.random() * TIPS.length)]\n}\n\nfunction parseBoolean (value) {\n  if (typeof value === 'string') {\n    return !['false', '0', 'no', 'off', ''].includes(value.toLowerCase())\n  }\n  return Boolean(value)\n}\n\nfunction supportsAnsi () {\n  return process.stdout.isTTY // && process.env.TERM !== 'dumb'\n}\n\nfunction dim (text) {\n  return supportsAnsi() ? `\\x1b[2m${text}\\x1b[0m` : text\n}\n\nconst LINE = /(?:^|^)\\s*(?:export\\s+)?([\\w.-]+)(?:\\s*=\\s*?|:\\s+?)(\\s*'(?:\\\\'|[^'])*'|\\s*\"(?:\\\\\"|[^\"])*\"|\\s*`(?:\\\\`|[^`])*`|[^#\\r\\n]+)?\\s*(?:#.*)?(?:$|$)/mg\n\n// Parse src into an Object\nfunction parse (src) {\n  const obj = {}\n\n  // Convert buffer to string\n  let lines = src.toString()\n\n  // Convert line breaks to same format\n  lines = lines.replace(/\\r\\n?/mg, '\\n')\n\n  let match\n  while ((match = LINE.exec(lines)) != null) {\n    const key = match[1]\n\n    // Default undefined or null to empty string\n    let value = (match[2] || '')\n\n    // Remove whitespace\n    value = value.trim()\n\n    // Check if double quoted\n    const maybeQuote = value[0]\n\n    // Remove surrounding quotes\n    value = value.replace(/^(['\"`])([\\s\\S]*)\\1$/mg, '$2')\n\n    // Expand newlines if double quoted\n    if (maybeQuote === '\"') {\n      value = value.replace(/\\\\n/g, '\\n')\n      value = value.replace(/\\\\r/g, '\\r')\n    }\n\n    // Add to object\n    obj[key] = value\n  }\n\n  return obj\n}\n\nfunction _parseVault (options) {\n  options = options || {}\n\n  const vaultPath = _vaultPath(options)\n  options.path = vaultPath // parse .env.vault\n  const result = DotenvModule.configDotenv(options)\n  if (!result.parsed) {\n    const err = new Error(`MISSING_DATA: Cannot parse ${vaultPath} for an unknown reason`)\n    err.code = 'MISSING_DATA'\n    throw err\n  }\n\n  // handle scenario for comma separated keys - for use with key rotation\n  // example: DOTENV_KEY=\"dotenv://:key_1234@dotenvx.com/vault/.env.vault?environment=prod,dotenv://:key_7890@dotenvx.com/vault/.env.vault?environment=prod\"\n  const keys = _dotenvKey(options).split(',')\n  const length = keys.length\n\n  let decrypted\n  for (let i = 0; i < length; i++) {\n    try {\n      // Get full key\n      const key = keys[i].trim()\n\n      // Get instructions for decrypt\n      const attrs = _instructions(result, key)\n\n      // Decrypt\n      decrypted = DotenvModule.decrypt(attrs.ciphertext, attrs.key)\n\n      break\n    } catch (error) {\n      // last key\n      if (i + 1 >= length) {\n        throw error\n      }\n      // try next key\n    }\n  }\n\n  // Parse decrypted .env string\n  return DotenvModule.parse(decrypted)\n}\n\nfunction _warn (message) {\n  console.error(`⚠ ${message}`)\n}\n\nfunction _debug (message) {\n  console.log(`┆ ${message}`)\n}\n\nfunction _log (message) {\n  console.log(`◇ ${message}`)\n}\n\nfunction _dotenvKey (options) {\n  // prioritize developer directly setting options.DOTENV_KEY\n  if (options && options.DOTENV_KEY && options.DOTENV_KEY.length > 0) {\n    return options.DOTENV_KEY\n  }\n\n  // secondary infra already contains a DOTENV_KEY environment variable\n  if (process.env.DOTENV_KEY && process.env.DOTENV_KEY.length > 0) {\n    return process.env.DOTENV_KEY\n  }\n\n  // fallback to empty string\n  return ''\n}\n\nfunction _instructions (result, dotenvKey) {\n  // Parse DOTENV_KEY. Format is a URI\n  let uri\n  try {\n    uri = new URL(dotenvKey)\n  } catch (error) {\n    if (error.code === 'ERR_INVALID_URL') {\n      const err = new Error('INVALID_DOTENV_KEY: Wrong format. Must be in valid uri format like dotenv://:key_1234@dotenvx.com/vault/.env.vault?environment=development')\n      err.code = 'INVALID_DOTENV_KEY'\n      throw err\n    }\n\n    throw error\n  }\n\n  // Get decrypt key\n  const key = uri.password\n  if (!key) {\n    const err = new Error('INVALID_DOTENV_KEY: Missing key part')\n    err.code = 'INVALID_DOTENV_KEY'\n    throw err\n  }\n\n  // Get environment\n  const environment = uri.searchParams.get('environment')\n  if (!environment) {\n    const err = new Error('INVALID_DOTENV_KEY: Missing environment part')\n    err.code = 'INVALID_DOTENV_KEY'\n    throw err\n  }\n\n  // Get ciphertext payload\n  const environmentKey = `DOTENV_VAULT_${environment.toUpperCase()}`\n  const ciphertext = result.parsed[environmentKey] // DOTENV_VAULT_PRODUCTION\n  if (!ciphertext) {\n    const err = new Error(`NOT_FOUND_DOTENV_ENVIRONMENT: Cannot locate environment ${environmentKey} in your .env.vault file.`)\n    err.code = 'NOT_FOUND_DOTENV_ENVIRONMENT'\n    throw err\n  }\n\n  return { ciphertext, key }\n}\n\nfunction _vaultPath (options) {\n  let possibleVaultPath = null\n\n  if (options && options.path && options.path.length > 0) {\n    if (Array.isArray(options.path)) {\n      for (const filepath of options.path) {\n        if (fs.existsSync(filepath)) {\n          possibleVaultPath = filepath.endsWith('.vault') ? filepath : `${filepath}.vault`\n        }\n      }\n    } else {\n      possibleVaultPath = options.path.endsWith('.vault') ? options.path : `${options.path}.vault`\n    }\n  } else {\n    possibleVaultPath = path.resolve(process.cwd(), '.env.vault')\n  }\n\n  if (fs.existsSync(possibleVaultPath)) {\n    return possibleVaultPath\n  }\n\n  return null\n}\n\nfunction _resolveHome (envPath) {\n  return envPath[0] === '~' ? path.join(os.homedir(), envPath.slice(1)) : envPath\n}\n\nfunction _configVault (options) {\n  const debug = parseBoolean(process.env.DOTENV_CONFIG_DEBUG || (options && options.debug))\n  const quiet = parseBoolean(process.env.DOTENV_CONFIG_QUIET || (options && options.quiet))\n\n  if (debug || !quiet) {\n    _log('loading env from encrypted .env.vault')\n  }\n\n  const parsed = DotenvModule._parseVault(options)\n\n  let processEnv = process.env\n  if (options && options.processEnv != null) {\n    processEnv = options.processEnv\n  }\n\n  DotenvModule.populate(processEnv, parsed, options)\n\n  return { parsed }\n}\n\nfunction configDotenv (options) {\n  const dotenvPath = path.resolve(process.cwd(), '.env')\n  let encoding = 'utf8'\n  let processEnv = process.env\n  if (options && options.processEnv != null) {\n    processEnv = options.processEnv\n  }\n  let debug = parseBoolean(processEnv.DOTENV_CONFIG_DEBUG || (options && options.debug))\n  let quiet = parseBoolean(processEnv.DOTENV_CONFIG_QUIET || (options && options.quiet))\n\n  if (options && options.encoding) {\n    encoding = options.encoding\n  } else {\n    if (debug) {\n      _debug('no encoding is specified (UTF-8 is used by default)')\n    }\n  }\n\n  let optionPaths = [dotenvPath] // default, look for .env\n  if (options && options.path) {\n    if (!Array.isArray(options.path)) {\n      optionPaths = [_resolveHome(options.path)]\n    } else {\n      optionPaths = [] // reset default\n      for (const filepath of options.path) {\n        optionPaths.push(_resolveHome(filepath))\n      }\n    }\n  }\n\n  // Build the parsed data in a temporary object (because we need to return it).  Once we have the final\n  // parsed data, we will combine it with process.env (or options.processEnv if provided).\n  let lastError\n  const parsedAll = {}\n  for (const path of optionPaths) {\n    try {\n      // Specifying an encoding returns a string instead of a buffer\n      const parsed = DotenvModule.parse(fs.readFileSync(path, { encoding }))\n\n      DotenvModule.populate(parsedAll, parsed, options)\n    } catch (e) {\n      if (debug) {\n        _debug(`failed to load ${path} ${e.message}`)\n      }\n      lastError = e\n    }\n  }\n\n  const populated = DotenvModule.populate(processEnv, parsedAll, options)\n\n  // handle user settings DOTENV_CONFIG_ options inside .env file(s)\n  debug = parseBoolean(processEnv.DOTENV_CONFIG_DEBUG || debug)\n  quiet = parseBoolean(processEnv.DOTENV_CONFIG_QUIET || quiet)\n\n  if (debug || !quiet) {\n    const keysCount = Object.keys(populated).length\n    const shortPaths = []\n    for (const filePath of optionPaths) {\n      try {\n        const relative = path.relative(process.cwd(), filePath)\n        shortPaths.push(relative)\n      } catch (e) {\n        if (debug) {\n          _debug(`failed to load ${filePath} ${e.message}`)\n        }\n        lastError = e\n      }\n    }\n\n    _log(`injected env (${keysCount}) from ${shortPaths.join(',')} ${dim(`// tip: ${_getRandomTip()}`)}`)\n  }\n\n  if (lastError) {\n    return { parsed: parsedAll, error: lastError }\n  } else {\n    return { parsed: parsedAll }\n  }\n}\n\n// Populates process.env from .env file\nfunction config (options) {\n  // fallback to original dotenv if DOTENV_KEY is not set\n  if (_dotenvKey(options).length === 0) {\n    return DotenvModule.configDotenv(options)\n  }\n\n  const vaultPath = _vaultPath(options)\n\n  // dotenvKey exists but .env.vault file does not exist\n  if (!vaultPath) {\n    _warn(`you set DOTENV_KEY but you are missing a .env.vault file at ${vaultPath}`)\n\n    return DotenvModule.configDotenv(options)\n  }\n\n  return DotenvModule._configVault(options)\n}\n\nfunction decrypt (encrypted, keyStr) {\n  const key = Buffer.from(keyStr.slice(-64), 'hex')\n  let ciphertext = Buffer.from(encrypted, 'base64')\n\n  const nonce = ciphertext.subarray(0, 12)\n  const authTag = ciphertext.subarray(-16)\n  ciphertext = ciphertext.subarray(12, -16)\n\n  try {\n    const aesgcm = crypto.createDecipheriv('aes-256-gcm', key, nonce)\n    aesgcm.setAuthTag(authTag)\n    return `${aesgcm.update(ciphertext)}${aesgcm.final()}`\n  } catch (error) {\n    const isRange = error instanceof RangeError\n    const invalidKeyLength = error.message === 'Invalid key length'\n    const decryptionFailed = error.message === 'Unsupported state or unable to authenticate data'\n\n    if (isRange || invalidKeyLength) {\n      const err = new Error('INVALID_DOTENV_KEY: It must be 64 characters long (or more)')\n      err.code = 'INVALID_DOTENV_KEY'\n      throw err\n    } else if (decryptionFailed) {\n      const err = new Error('DECRYPTION_FAILED: Please check your DOTENV_KEY')\n      err.code = 'DECRYPTION_FAILED'\n      throw err\n    } else {\n      throw error\n    }\n  }\n}\n\n// Populate process.env with parsed values\nfunction populate (processEnv, parsed, options = {}) {\n  const debug = Boolean(options && options.debug)\n  const override = Boolean(options && options.override)\n  const populated = {}\n\n  if (typeof parsed !== 'object') {\n    const err = new Error('OBJECT_REQUIRED: Please check the processEnv argument being passed to populate')\n    err.code = 'OBJECT_REQUIRED'\n    throw err\n  }\n\n  // Set process.env\n  for (const key of Object.keys(parsed)) {\n    if (Object.prototype.hasOwnProperty.call(processEnv, key)) {\n      if (override === true) {\n        processEnv[key] = parsed[key]\n        populated[key] = parsed[key]\n      }\n\n      if (debug) {\n        if (override === true) {\n          _debug(`\"${key}\" is already defined and WAS overwritten`)\n        } else {\n          _debug(`\"${key}\" is already defined and was NOT overwritten`)\n        }\n      }\n    } else {\n      processEnv[key] = parsed[key]\n      populated[key] = parsed[key]\n    }\n  }\n\n  return populated\n}\n\nconst DotenvModule = {\n  configDotenv,\n  _configVault,\n  _parseVault,\n  config,\n  decrypt,\n  parse,\n  populate\n}\n\nmodule.exports.configDotenv = DotenvModule.configDotenv\nmodule.exports._configVault = DotenvModule._configVault\nmodule.exports._parseVault = DotenvModule._parseVault\nmodule.exports.config = DotenvModule.config\nmodule.exports.decrypt = DotenvModule.decrypt\nmodule.exports.parse = DotenvModule.parse\nmodule.exports.populate = DotenvModule.populate\n\nmodule.exports = DotenvModule\n","import { createHash } from \"node:crypto\";\n//#region \\0rolldown/runtime.js\nvar __defProp = Object.defineProperty;\nvar __exportAll = (all, no_symbols) => {\n\tlet target = {};\n\tfor (var name in all) __defProp(target, name, {\n\t\tget: all[name],\n\t\tenumerable: true\n\t});\n\tif (!no_symbols) __defProp(target, Symbol.toStringTag, { value: \"Module\" });\n\treturn target;\n};\n//#endregion\n//#region node_modules/.pnpm/ohash@2.0.11/node_modules/ohash/dist/shared/ohash.D__AXeF1.mjs\nfunction serialize(o) {\n\treturn typeof o == \"string\" ? `'${o}'` : new c().serialize(o);\n}\nconst c = /* @__PURE__ */ function() {\n\tclass o {\n\t\t#t = /* @__PURE__ */ new Map();\n\t\tcompare(t, r) {\n\t\t\tconst e = typeof t, n = typeof r;\n\t\t\treturn e === \"string\" && n === \"string\" ? t.localeCompare(r) : e === \"number\" && n === \"number\" ? t - r : String.prototype.localeCompare.call(this.serialize(t, true), this.serialize(r, true));\n\t\t}\n\t\tserialize(t, r) {\n\t\t\tif (t === null) return \"null\";\n\t\t\tswitch (typeof t) {\n\t\t\t\tcase \"string\": return r ? t : `'${t}'`;\n\t\t\t\tcase \"bigint\": return `${t}n`;\n\t\t\t\tcase \"object\": return this.$object(t);\n\t\t\t\tcase \"function\": return this.$function(t);\n\t\t\t}\n\t\t\treturn String(t);\n\t\t}\n\t\tserializeObject(t) {\n\t\t\tconst r = Object.prototype.toString.call(t);\n\t\t\tif (r !== \"[object Object]\") return this.serializeBuiltInType(r.length < 10 ? `unknown:${r}` : r.slice(8, -1), t);\n\t\t\tconst e = t.constructor, n = e === Object || e === void 0 ? \"\" : e.name;\n\t\t\tif (n !== \"\" && globalThis[n] === e) return this.serializeBuiltInType(n, t);\n\t\t\tif (typeof t.toJSON == \"function\") {\n\t\t\t\tconst i = t.toJSON();\n\t\t\t\treturn n + (i !== null && typeof i == \"object\" ? this.$object(i) : `(${this.serialize(i)})`);\n\t\t\t}\n\t\t\treturn this.serializeObjectEntries(n, Object.entries(t));\n\t\t}\n\t\tserializeBuiltInType(t, r) {\n\t\t\tconst e = this[\"$\" + t];\n\t\t\tif (e) return e.call(this, r);\n\t\t\tif (typeof r?.entries == \"function\") return this.serializeObjectEntries(t, r.entries());\n\t\t\tthrow new Error(`Cannot serialize ${t}`);\n\t\t}\n\t\tserializeObjectEntries(t, r) {\n\t\t\tconst e = Array.from(r).sort((i, a) => this.compare(i[0], a[0]));\n\t\t\tlet n = `${t}{`;\n\t\t\tfor (let i = 0; i < e.length; i++) {\n\t\t\t\tconst [a, l] = e[i];\n\t\t\t\tn += `${this.serialize(a, true)}:${this.serialize(l)}`, i < e.length - 1 && (n += \",\");\n\t\t\t}\n\t\t\treturn n + \"}\";\n\t\t}\n\t\t$object(t) {\n\t\t\tlet r = this.#t.get(t);\n\t\t\treturn r === void 0 && (this.#t.set(t, `#${this.#t.size}`), r = this.serializeObject(t), this.#t.set(t, r)), r;\n\t\t}\n\t\t$function(t) {\n\t\t\tconst r = Function.prototype.toString.call(t);\n\t\t\treturn r.slice(-15) === \"[native code] }\" ? `${t.name || \"\"}()[native]` : `${t.name}(${t.length})${r.replace(/\\s*\\n\\s*/g, \"\")}`;\n\t\t}\n\t\t$Array(t) {\n\t\t\tlet r = \"[\";\n\t\t\tfor (let e = 0; e < t.length; e++) r += this.serialize(t[e]), e < t.length - 1 && (r += \",\");\n\t\t\treturn r + \"]\";\n\t\t}\n\t\t$Date(t) {\n\t\t\ttry {\n\t\t\t\treturn `Date(${t.toISOString()})`;\n\t\t\t} catch {\n\t\t\t\treturn \"Date(null)\";\n\t\t\t}\n\t\t}\n\t\t$ArrayBuffer(t) {\n\t\t\treturn `ArrayBuffer[${new Uint8Array(t).join(\",\")}]`;\n\t\t}\n\t\t$Set(t) {\n\t\t\treturn `Set${this.$Array(Array.from(t).sort((r, e) => this.compare(r, e)))}`;\n\t\t}\n\t\t$Map(t) {\n\t\t\treturn this.serializeObjectEntries(\"Map\", t.entries());\n\t\t}\n\t}\n\tfor (const s of [\n\t\t\"Error\",\n\t\t\"RegExp\",\n\t\t\"URL\"\n\t]) o.prototype[\"$\" + s] = function(t) {\n\t\treturn `${s}(${t})`;\n\t};\n\tfor (const s of [\n\t\t\"Int8Array\",\n\t\t\"Uint8Array\",\n\t\t\"Uint8ClampedArray\",\n\t\t\"Int16Array\",\n\t\t\"Uint16Array\",\n\t\t\"Int32Array\",\n\t\t\"Uint32Array\",\n\t\t\"Float32Array\",\n\t\t\"Float64Array\"\n\t]) o.prototype[\"$\" + s] = function(t) {\n\t\treturn `${s}[${t.join(\",\")}]`;\n\t};\n\tfor (const s of [\"BigInt64Array\", \"BigUint64Array\"]) o.prototype[\"$\" + s] = function(t) {\n\t\treturn `${s}[${t.join(\"n,\")}${t.length > 0 ? \"n\" : \"\"}]`;\n\t};\n\treturn o;\n}();\n//#endregion\n//#region node_modules/.pnpm/ohash@2.0.11/node_modules/ohash/dist/crypto/node/index.mjs\nconst e = globalThis.process?.getBuiltinModule?.(\"crypto\")?.hash, r = \"sha256\", s = \"base64url\";\nfunction digest(t) {\n\tif (e) return e(r, t, s);\n\tconst o = createHash(r).update(t);\n\treturn globalThis.process?.versions?.webcontainer ? o.digest().toString(s) : o.digest(s);\n}\n//#endregion\n//#region node_modules/.pnpm/ohash@2.0.11/node_modules/ohash/dist/index.mjs\nvar dist_exports = /* @__PURE__ */ __exportAll({ digest: () => digest });\n//#endregion\n//#region node_modules/.pnpm/ohash@2.0.11/node_modules/ohash/dist/utils/index.mjs\nvar utils_exports = /* @__PURE__ */ __exportAll({ diff: () => diff });\nfunction diff(obj1, obj2) {\n\treturn _diff(_toHashedObject(obj1), _toHashedObject(obj2));\n}\nfunction _diff(h1, h2) {\n\tconst diffs = [];\n\tconst allProps = /* @__PURE__ */ new Set([...Object.keys(h1.props || {}), ...Object.keys(h2.props || {})]);\n\tif (h1.props && h2.props) for (const prop of allProps) {\n\t\tconst p1 = h1.props[prop];\n\t\tconst p2 = h2.props[prop];\n\t\tif (p1 && p2) diffs.push(..._diff(h1.props?.[prop], h2.props?.[prop]));\n\t\telse if (p1 || p2) diffs.push(new DiffEntry((p2 || p1).key, p1 ? \"removed\" : \"added\", p2, p1));\n\t}\n\tif (allProps.size === 0 && h1.hash !== h2.hash) diffs.push(new DiffEntry((h2 || h1).key, \"changed\", h2, h1));\n\treturn diffs;\n}\nfunction _toHashedObject(obj, key = \"\") {\n\tif (obj && typeof obj !== \"object\") return new DiffHashedObject(key, obj, serialize(obj));\n\tconst props = {};\n\tconst hashes = [];\n\tfor (const _key in obj) {\n\t\tprops[_key] = _toHashedObject(obj[_key], key ? `${key}.${_key}` : _key);\n\t\thashes.push(props[_key].hash);\n\t}\n\treturn new DiffHashedObject(key, obj, `{${hashes.join(\":\")}}`, props);\n}\nvar DiffEntry = class {\n\tconstructor(key, type, newValue, oldValue) {\n\t\tthis.key = key;\n\t\tthis.type = type;\n\t\tthis.newValue = newValue;\n\t\tthis.oldValue = oldValue;\n\t}\n\ttoString() {\n\t\treturn this.toJSON();\n\t}\n\ttoJSON() {\n\t\tswitch (this.type) {\n\t\t\tcase \"added\": return `Added   \\`${this.key}\\``;\n\t\t\tcase \"removed\": return `Removed \\`${this.key}\\``;\n\t\t\tcase \"changed\": return `Changed \\`${this.key}\\` from \\`${this.oldValue?.toString() || \"-\"}\\` to \\`${this.newValue.toString()}\\``;\n\t\t}\n\t}\n};\nvar DiffHashedObject = class {\n\tconstructor(key, value, hash, props) {\n\t\tthis.key = key;\n\t\tthis.value = value;\n\t\tthis.hash = hash;\n\t\tthis.props = props;\n\t}\n\ttoString() {\n\t\tif (this.props) return `{${Object.keys(this.props).join(\",\")}}`;\n\t\telse return JSON.stringify(this.value);\n\t}\n\ttoJSON() {\n\t\tconst k = this.key || \".\";\n\t\tif (this.props) return `${k}({${Object.keys(this.props).join(\",\")}})`;\n\t\treturn `${k}(${this.value})`;\n\t}\n};\n//#endregion\nexport { dist_exports as n, utils_exports as t };\n","import { t as debounce } from \"./_chunks/libs/perfect-debounce.mjs\";\nimport { existsSync, readFileSync, statSync } from \"node:fs\";\nimport * as nodeUtil from \"node:util\";\nimport { basename, dirname, extname, join, normalize, resolve } from \"pathe\";\nimport { readFile, rm } from \"node:fs/promises\";\nimport { pathToFileURL } from \"node:url\";\nimport { homedir } from \"node:os\";\nimport { resolveModulePath } from \"exsolve\";\nimport * as rc9 from \"rc9\";\nimport { defu } from \"defu\";\nimport { findWorkspaceDir, readPackageJSON } from \"pkg-types\";\n//#region src/dotenv.ts\n/**\n* Load and interpolate environment variables into `process.env`.\n* If you need more control (or access to the values), consider using `loadDotenv` instead\n*\n*/\nasync function setupDotenv(options) {\n\tconst targetEnvironment = options.env ?? process.env;\n\tconst environment = await loadDotenv({\n\t\tcwd: options.cwd,\n\t\tfileName: options.fileName ?? \".env\",\n\t\tenv: targetEnvironment,\n\t\tinterpolate: options.interpolate ?? true,\n\t\texpandFileReferences: options.expandFileReferences ?? false\n\t});\n\tconst dotenvVars = getDotEnvVars(targetEnvironment);\n\tfor (const key in environment) {\n\t\tif (key.startsWith(\"_\")) continue;\n\t\tif (targetEnvironment[key] === void 0 || dotenvVars.has(key)) targetEnvironment[key] = environment[key];\n\t}\n\treturn environment;\n}\n/** Load environment variables into an object. */\nasync function loadDotenv(options) {\n\tconst environment = Object.create(null);\n\tconst cwd = resolve(options.cwd || \".\");\n\tconst _fileName = options.fileName || \".env\";\n\tconst dotenvFiles = typeof _fileName === \"string\" ? [_fileName] : _fileName;\n\tconst dotenvVars = getDotEnvVars(options.env || {});\n\tObject.assign(environment, options.env);\n\tfor (const file of dotenvFiles) {\n\t\tconst dotenvFile = resolve(cwd, file);\n\t\tif (!statSync(dotenvFile, { throwIfNoEntry: false })?.isFile()) continue;\n\t\tconst parsed = await readEnvFile(dotenvFile);\n\t\tfor (const key in parsed) {\n\t\t\tif (key in environment && !dotenvVars.has(key)) continue;\n\t\t\tenvironment[key] = parsed[key];\n\t\t\tdotenvVars.add(key);\n\t\t}\n\t}\n\tif (options.expandFileReferences) {\n\t\tfor (const key in environment) if (key.endsWith(\"_FILE\")) {\n\t\t\tconst targetKey = key.slice(0, -5);\n\t\t\tif (environment[targetKey] === void 0) {\n\t\t\t\tconst filePath = environment[key];\n\t\t\t\tif (filePath && statSync(filePath, { throwIfNoEntry: false })?.isFile()) {\n\t\t\t\t\tenvironment[targetKey] = readFileSync(filePath, \"utf8\").trim();\n\t\t\t\t\tdotenvVars.add(targetKey);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\tif (options.interpolate) interpolate(environment);\n\treturn environment;\n}\nlet _parseEnv = nodeUtil.parseEnv;\nasync function readEnvFile(path) {\n\tconst src = readFileSync(path, \"utf8\");\n\tif (!_parseEnv) try {\n\t\tconst dotenv = await import(\"dotenv\");\n\t\t_parseEnv = (src) => dotenv.parse(src);\n\t} catch {\n\t\tthrow new Error(\"Failed to parse .env file: `node:util.parseEnv` is not available and `dotenv` package is not installed. Please upgrade your runtime or install `dotenv` as a dependency.\");\n\t}\n\treturn _parseEnv(src);\n}\nfunction interpolate(target, source = {}, parse = (v) => v) {\n\tfunction getValue(key) {\n\t\treturn source[key] === void 0 ? target[key] : source[key];\n\t}\n\tfunction interpolate(value, parents = []) {\n\t\tif (typeof value !== \"string\") return value;\n\t\treturn parse((value.match(/(.?\\${?(?:[\\w:]+)?}?)/g) || []).reduce((newValue, match) => {\n\t\t\tconst parts = /(.?)\\${?([\\w:]+)?}?/g.exec(match) || [];\n\t\t\tconst prefix = parts[1];\n\t\t\tlet value, replacePart;\n\t\t\tif (prefix === \"\\\\\") {\n\t\t\t\treplacePart = parts[0] || \"\";\n\t\t\t\tvalue = replacePart.replace(String.raw`\\$`, \"$\");\n\t\t\t} else {\n\t\t\t\tconst key = parts[2];\n\t\t\t\treplacePart = (parts[0] || \"\").slice(prefix.length);\n\t\t\t\tif (parents.includes(key)) {\n\t\t\t\t\tconsole.warn(`Please avoid recursive environment variables ( loop: ${parents.join(\" > \")} > ${key} )`);\n\t\t\t\t\treturn \"\";\n\t\t\t\t}\n\t\t\t\tvalue = getValue(key);\n\t\t\t\tvalue = interpolate(value, [...parents, key]);\n\t\t\t}\n\t\t\treturn value === void 0 ? newValue : newValue.replace(replacePart, value);\n\t\t}, value));\n\t}\n\tfor (const key in target) target[key] = interpolate(getValue(key));\n}\nfunction getDotEnvVars(targetEnvironment) {\n\tconst globalRegistry = globalThis.__c12_dotenv_vars__ ||= /* @__PURE__ */ new Map();\n\tif (!globalRegistry.has(targetEnvironment)) globalRegistry.set(targetEnvironment, /* @__PURE__ */ new Set());\n\treturn globalRegistry.get(targetEnvironment);\n}\n//#endregion\n//#region src/loader.ts\nconst _normalize = (p) => p?.replace(/\\\\/g, \"/\");\nlet importCounter = 0;\nconst ASYNC_LOADERS = {\n\t\".yaml\": () => import(\"confbox/yaml\").then((r) => r.parseYAML),\n\t\".yml\": () => import(\"confbox/yaml\").then((r) => r.parseYAML),\n\t\".jsonc\": () => import(\"confbox/jsonc\").then((r) => r.parseJSONC),\n\t\".json5\": () => import(\"confbox/json5\").then((r) => r.parseJSON5),\n\t\".toml\": () => import(\"confbox/toml\").then((r) => r.parseTOML)\n};\nconst SUPPORTED_EXTENSIONS = Object.freeze([\n\t\".js\",\n\t\".ts\",\n\t\".mjs\",\n\t\".cjs\",\n\t\".mts\",\n\t\".cts\",\n\t\".json\",\n\t\".jsonc\",\n\t\".json5\",\n\t\".yaml\",\n\t\".yml\",\n\t\".toml\"\n]);\nasync function loadConfig(options) {\n\toptions.cwd = resolve(process.cwd(), options.cwd || \".\");\n\toptions.name = options.name || \"config\";\n\toptions.envName = options.envName ?? process.env.NODE_ENV;\n\toptions.configFile = options.configFile ?? (options.name === \"config\" ? \"config\" : `${options.name}.config`);\n\toptions.rcFile = options.rcFile ?? `.${options.name}rc`;\n\tif (options.extend !== false) options.extend = {\n\t\textendKey: \"extends\",\n\t\t...options.extend\n\t};\n\tconst _merger = options.merger || defu;\n\tconst r = {\n\t\tconfig: {},\n\t\tcwd: options.cwd,\n\t\tconfigFile: resolve(options.cwd, options.configFile),\n\t\tlayers: [],\n\t\t_configFile: void 0\n\t};\n\tconst rawConfigs = {\n\t\toverrides: options.overrides,\n\t\tmain: void 0,\n\t\trc: void 0,\n\t\tpackageJson: void 0,\n\t\tdefaultConfig: options.defaultConfig\n\t};\n\tif (options.dotenv) await setupDotenv({\n\t\tcwd: options.cwd,\n\t\t...options.dotenv === true ? {} : options.dotenv\n\t});\n\tconst _mainConfig = await resolveConfig(\".\", options);\n\tif (_mainConfig.configFile) {\n\t\trawConfigs.main = _mainConfig.config;\n\t\tr.configFile = _mainConfig.configFile;\n\t\tr._configFile = _mainConfig._configFile;\n\t}\n\tif (_mainConfig.meta) r.meta = _mainConfig.meta;\n\tif (options.rcFile) {\n\t\tconst rcSources = [];\n\t\trcSources.push(rc9.read({\n\t\t\tname: options.rcFile,\n\t\t\tdir: options.cwd\n\t\t}));\n\t\tif (options.globalRc) {\n\t\t\tconst workspaceDir = await findWorkspaceDir(options.cwd).catch(() => {});\n\t\t\tif (workspaceDir) rcSources.push(rc9.read({\n\t\t\t\tname: options.rcFile,\n\t\t\t\tdir: workspaceDir\n\t\t\t}));\n\t\t\trcSources.push(rc9.readUser({\n\t\t\t\tname: options.rcFile,\n\t\t\t\tdir: options.cwd\n\t\t\t}));\n\t\t}\n\t\trawConfigs.rc = _merger({}, ...rcSources);\n\t}\n\tif (options.packageJson) {\n\t\tconst keys = (Array.isArray(options.packageJson) ? options.packageJson : [typeof options.packageJson === \"string\" ? options.packageJson : options.name]).filter((t) => t && typeof t === \"string\");\n\t\tconst pkgJsonFile = await readPackageJSON(options.cwd).catch(() => {});\n\t\trawConfigs.packageJson = _merger({}, ...keys.map((key) => pkgJsonFile?.[key]));\n\t}\n\tconst configs = {};\n\tfor (const key in rawConfigs) {\n\t\tconst value = rawConfigs[key];\n\t\tconfigs[key] = await (typeof value === \"function\" ? value({\n\t\t\tconfigs,\n\t\t\trawConfigs\n\t\t}) : value);\n\t}\n\tif (Array.isArray(configs.main)) r.config = configs.main;\n\telse {\n\t\tr.config = _merger(configs.overrides, configs.main, configs.rc, configs.packageJson, configs.defaultConfig);\n\t\tif (options.extend) {\n\t\t\tawait extendConfig(r.config, options);\n\t\t\tr.layers = r.config._layers;\n\t\t\tdelete r.config._layers;\n\t\t\tr.config = _merger(r.config, ...r.layers.map((e) => e.config));\n\t\t}\n\t}\n\tr.layers = [...[\n\t\tconfigs.overrides && {\n\t\t\tconfig: configs.overrides,\n\t\t\tconfigFile: void 0,\n\t\t\tcwd: void 0\n\t\t},\n\t\t{\n\t\t\tconfig: configs.main,\n\t\t\tconfigFile: options.configFile,\n\t\t\tcwd: options.cwd\n\t\t},\n\t\tconfigs.rc && {\n\t\t\tconfig: configs.rc,\n\t\t\tconfigFile: options.rcFile\n\t\t},\n\t\tconfigs.packageJson && {\n\t\t\tconfig: configs.packageJson,\n\t\t\tconfigFile: \"package.json\"\n\t\t}\n\t].filter((l) => l && l.config), ...r.layers];\n\tif (options.defaults) r.config = _merger(r.config, options.defaults);\n\tif (options.omit$Keys) {\n\t\tfor (const key in r.config) if (key.startsWith(\"$\")) delete r.config[key];\n\t}\n\tif (options.configFileRequired && !r._configFile) throw new Error(`Required config (${r.configFile}) cannot be resolved.`);\n\treturn r;\n}\nasync function extendConfig(config, options) {\n\tconfig._layers = config._layers || [];\n\tif (!options.extend) return;\n\tlet keys = options.extend.extendKey;\n\tif (typeof keys === \"string\") keys = [keys];\n\tconst extendSources = [];\n\tfor (const key of keys) {\n\t\textendSources.push(...(Array.isArray(config[key]) ? config[key] : [config[key]]).filter(Boolean));\n\t\tdelete config[key];\n\t}\n\tfor (let extendSource of extendSources) {\n\t\tconst originalExtendSource = extendSource;\n\t\tlet sourceOptions = {};\n\t\tif (extendSource.source) {\n\t\t\tsourceOptions = extendSource.options || {};\n\t\t\textendSource = extendSource.source;\n\t\t}\n\t\tif (Array.isArray(extendSource)) {\n\t\t\tsourceOptions = extendSource[1] || {};\n\t\t\textendSource = extendSource[0];\n\t\t}\n\t\tif (typeof extendSource !== \"string\") {\n\t\t\tconsole.warn(`Cannot extend config from \\`${JSON.stringify(originalExtendSource)}\\` in ${options.cwd}`);\n\t\t\tcontinue;\n\t\t}\n\t\tconst _config = await resolveConfig(extendSource, options, sourceOptions);\n\t\tif (!_config.config) {\n\t\t\tconsole.warn(`Cannot extend config from \\`${extendSource}\\` in ${options.cwd}`);\n\t\t\tcontinue;\n\t\t}\n\t\tawait extendConfig(_config.config, {\n\t\t\t...options,\n\t\t\tcwd: _config.cwd\n\t\t});\n\t\tconfig._layers.push(_config);\n\t\tif (_config.config._layers) {\n\t\t\tconfig._layers.push(..._config.config._layers);\n\t\t\tdelete _config.config._layers;\n\t\t}\n\t}\n}\nconst GIGET_PREFIXES = [\n\t\"gh:\",\n\t\"github:\",\n\t\"gitlab:\",\n\t\"bitbucket:\",\n\t\"https://\",\n\t\"http://\"\n];\nconst NPM_PACKAGE_RE = /^(@[\\da-z~-][\\d._a-z~-]*\\/)?[\\da-z~-][\\d._a-z~-]*($|\\/.*)/;\nasync function resolveConfig(source, options, sourceOptions = {}) {\n\tif (options.resolve) {\n\t\tconst res = await options.resolve(source, options);\n\t\tif (res) return res;\n\t}\n\tconst _merger = options.merger || defu;\n\tconst customProviderKeys = Object.keys(sourceOptions.giget?.providers || {}).map((key) => `${key}:`);\n\tconst gigetPrefixes = customProviderKeys.length > 0 ? [...new Set([...customProviderKeys, ...GIGET_PREFIXES])] : GIGET_PREFIXES;\n\tif (options.giget !== false && gigetPrefixes.some((prefix) => source.startsWith(prefix))) {\n\t\tconst { downloadTemplate } = await import(\"giget\").catch((error) => {\n\t\t\tthrow new Error(`Extending config from \\`${source}\\` requires \\`giget\\` peer dependency to be installed.\\n\\nInstall it with: \\`npx nypm i giget\\``, { cause: error });\n\t\t});\n\t\tconst { digest } = await import(\"./_chunks/libs/ohash.mjs\").then((n) => n.n);\n\t\tconst cloneName = source.replace(/\\W+/g, \"_\").split(\"_\").splice(0, 3).join(\"_\") + \"_\" + digest(source).slice(0, 10).replace(/[-_]/g, \"\");\n\t\tlet cloneDir;\n\t\tconst localNodeModules = resolve(options.cwd, \"node_modules\");\n\t\tconst parentDir = dirname(options.cwd);\n\t\tif (basename(parentDir) === \".c12\") cloneDir = join(parentDir, cloneName);\n\t\telse if (existsSync(localNodeModules)) cloneDir = join(localNodeModules, \".c12\", cloneName);\n\t\telse cloneDir = process.env.XDG_CACHE_HOME ? resolve(process.env.XDG_CACHE_HOME, \"c12\", cloneName) : resolve(homedir(), \".cache/c12\", cloneName);\n\t\tif (existsSync(cloneDir) && !sourceOptions.install) await rm(cloneDir, { recursive: true });\n\t\tsource = (await downloadTemplate(source, {\n\t\t\tdir: cloneDir,\n\t\t\tinstall: sourceOptions.install,\n\t\t\tforce: sourceOptions.install,\n\t\t\tauth: sourceOptions.auth,\n\t\t\t...options.giget,\n\t\t\t...sourceOptions.giget\n\t\t})).dir;\n\t}\n\tif (NPM_PACKAGE_RE.test(source)) source = tryResolve(source, options) || source;\n\tconst ext = extname(source);\n\tconst isDir = _isDirectory(resolve(options.cwd, source)) ?? (!ext || ext === basename(source));\n\tconst cwd = resolve(options.cwd, isDir ? source : dirname(source));\n\tif (isDir) source = options.configFile;\n\tconst res = {\n\t\tconfig: void 0,\n\t\tconfigFile: void 0,\n\t\tcwd,\n\t\tsource,\n\t\tsourceOptions\n\t};\n\tres.configFile = tryResolve(resolve(cwd, source), options) || tryResolve(resolve(cwd, \".config\", source.replace(/\\.config$/, \"\")), options) || tryResolve(resolve(cwd, \".config\", source), options) || source;\n\tif (!existsSync(res.configFile)) return res;\n\tres._configFile = res.configFile;\n\tconst configFileExt = extname(res.configFile) || \"\";\n\tif (configFileExt in ASYNC_LOADERS) res.config = (await ASYNC_LOADERS[configFileExt]())(await readFile(res.configFile, \"utf8\"));\n\telse {\n\t\tconst _resolveModule = options.resolveModule || ((mod) => mod.default || mod);\n\t\tif (options.import) res.config = _resolveModule(await options.import(res.configFile));\n\t\telse {\n\t\t\tconst _configURL = pathToFileURL(res.configFile);\n\t\t\t_configURL.search = `_${++importCounter}`;\n\t\t\tres.config = await import(_configURL.href).then(_resolveModule, async (error) => {\n\t\t\t\tconst { createJiti } = await import(\"jiti\").catch(() => {\n\t\t\t\t\tthrow new Error(`Failed to load config file \\`${res.configFile}\\`: ${error?.message}.  Hint install \\`jiti\\` for compatibility.`, { cause: error });\n\t\t\t\t});\n\t\t\t\tconst jiti = createJiti(join(options.cwd || \".\", options.configFile || \"/\"), {\n\t\t\t\t\tinteropDefault: true,\n\t\t\t\t\tmoduleCache: false,\n\t\t\t\t\textensions: [...SUPPORTED_EXTENSIONS]\n\t\t\t\t});\n\t\t\t\toptions.import = (id) => jiti.import(id);\n\t\t\t\treturn _resolveModule(await options.import(res.configFile));\n\t\t\t});\n\t\t}\n\t}\n\tif (typeof res.config === \"function\") res.config = await res.config(options.context);\n\tif (options.envName) {\n\t\tconst envConfig = {\n\t\t\t...res.config[\"$\" + options.envName],\n\t\t\t...res.config.$env?.[options.envName]\n\t\t};\n\t\tif (Object.keys(envConfig).length > 0) res.config = _merger(envConfig, res.config);\n\t}\n\tres.meta = defu(res.sourceOptions.meta, res.config.$meta);\n\tdelete res.config.$meta;\n\tif (res.sourceOptions.overrides) res.config = _merger(res.sourceOptions.overrides, res.config);\n\tres.configFile = _normalize(res.configFile);\n\tres.source = _normalize(res.source);\n\treturn res;\n}\nfunction tryResolve(id, options) {\n\tconst res = resolveModulePath(id, {\n\t\ttry: true,\n\t\tfrom: pathToFileURL(join(options.cwd || \".\", options.configFile || \"/\")),\n\t\tsuffixes: [\"\", \"/index\"],\n\t\textensions: SUPPORTED_EXTENSIONS,\n\t\tcache: false\n\t});\n\treturn res ? normalize(res) : void 0;\n}\n/** Returns `true`/`false` if the path exists, `null` if it doesn't. */\nfunction _isDirectory(path) {\n\ttry {\n\t\treturn statSync(path).isDirectory();\n\t} catch {\n\t\treturn null;\n\t}\n}\n//#endregion\n//#region src/types.ts\nfunction createDefineConfig() {\n\treturn (input) => input;\n}\n//#endregion\n//#region src/watch.ts\nconst eventMap = {\n\tadd: \"created\",\n\tchange: \"updated\",\n\tunlink: \"removed\"\n};\nasync function watchConfig(options) {\n\tlet config = await loadConfig(options);\n\tconst configName = options.name || \"config\";\n\tconst configFileName = options.configFile ?? (options.name === \"config\" ? \"config\" : `${options.name}.config`);\n\tconst watchingFiles = [...new Set((config.layers || []).filter((l) => l.cwd).flatMap((l) => [\n\t\t...SUPPORTED_EXTENSIONS.flatMap((ext) => [\n\t\t\tresolve(l.cwd, configFileName + ext),\n\t\t\tresolve(l.cwd, \".config\", configFileName + ext),\n\t\t\tresolve(l.cwd, \".config\", configFileName.replace(/\\.config$/, \"\") + ext)\n\t\t]),\n\t\tl.source && resolve(l.cwd, l.source),\n\t\toptions.rcFile && resolve(l.cwd, typeof options.rcFile === \"string\" ? options.rcFile : `.${configName}rc`),\n\t\toptions.packageJson && resolve(l.cwd, \"package.json\")\n\t]).filter(Boolean))];\n\tconst watch = await import(\"chokidar\").then((r) => r.watch || r.default || r);\n\tconst { diff } = await import(\"./_chunks/libs/ohash.mjs\").then((n) => n.t);\n\tconst _fswatcher = watch(watchingFiles, {\n\t\tignoreInitial: true,\n\t\t...options.chokidarOptions\n\t});\n\tconst onChange = async (event, path) => {\n\t\tconst type = eventMap[event];\n\t\tif (!type) return;\n\t\tif (options.onWatch) await options.onWatch({\n\t\t\ttype,\n\t\t\tpath\n\t\t});\n\t\tconst oldConfig = config;\n\t\ttry {\n\t\t\tconfig = await loadConfig(options);\n\t\t} catch (error) {\n\t\t\tconsole.warn(`Failed to load config ${path}\\n${error}`);\n\t\t\treturn;\n\t\t}\n\t\tconst changeCtx = {\n\t\t\tnewConfig: config,\n\t\t\toldConfig,\n\t\t\tgetDiff: () => diff(oldConfig.config, config.config)\n\t\t};\n\t\tif (options.acceptHMR) {\n\t\t\tif (await options.acceptHMR(changeCtx)) return;\n\t\t}\n\t\tif (options.onUpdate) await options.onUpdate(changeCtx);\n\t};\n\tif (options.debounce === false) _fswatcher.on(\"all\", onChange);\n\telse _fswatcher.on(\"all\", debounce(onChange, options.debounce ?? 100));\n\tconst utils = {\n\t\twatchingFiles,\n\t\tunwatch: async () => {\n\t\t\tawait _fswatcher.close();\n\t\t}\n\t};\n\treturn new Proxy(utils, { get(_, prop) {\n\t\tif (prop in utils) return utils[prop];\n\t\treturn config[prop];\n\t} });\n}\n//#endregion\nexport { SUPPORTED_EXTENSIONS, createDefineConfig, loadConfig, loadDotenv, setupDotenv, watchConfig };\n","import { withTag } from \"@kidd-cli/utils/tag\";\nimport { err, ok, toError } from \"@kidd-cli/utils/fp\";\nimport { loadConfig as loadConfig$1 } from \"c12\";\nimport { attemptAsync } from \"es-toolkit\";\nimport { validate } from \"@kidd-cli/utils/validate\";\nimport { z } from \"zod\";\n//#region src/utils/compile.ts\n/**\n* All supported cross-compilation targets with human-readable labels.\n*\n* This is the single source of truth — the {@link CompileTarget} union type\n* and the Zod validation schema are both derived from this array.\n*\n* Targets marked `default: true` are compiled when no explicit targets are configured,\n* covering ~95% of developer environments.\n*/\nconst compileTargets = [\n\t{\n\t\ttarget: \"darwin-arm64\",\n\t\tlabel: \"macOS Apple Silicon\",\n\t\tdefault: true\n\t},\n\t{\n\t\ttarget: \"darwin-x64\",\n\t\tlabel: \"macOS Intel\",\n\t\tdefault: true\n\t},\n\t{\n\t\ttarget: \"linux-arm64\",\n\t\tlabel: \"Linux ARM64\",\n\t\tdefault: false\n\t},\n\t{\n\t\ttarget: \"linux-x64\",\n\t\tlabel: \"Linux x64\",\n\t\tdefault: true\n\t},\n\t{\n\t\ttarget: \"linux-x64-musl\",\n\t\tlabel: \"Linux x64 (musl)\",\n\t\tdefault: false\n\t},\n\t{\n\t\ttarget: \"windows-arm64\",\n\t\tlabel: \"Windows ARM64\",\n\t\tdefault: false\n\t},\n\t{\n\t\ttarget: \"windows-x64\",\n\t\tlabel: \"Windows x64\",\n\t\tdefault: true\n\t}\n];\n//#endregion\n//#region src/utils/schema.ts\n/**\n* @private\n*/\nconst compileTargetValues = compileTargets.map((entry) => entry.target);\n/**\n* @private\n*/\nconst CompileTargetSchema = z.enum(compileTargetValues);\n/**\n* @private\n*/\nconst BuildOptionsSchema = z.object({\n\tclean: z.boolean().optional(),\n\tdefine: z.record(z.string(), z.string()).optional(),\n\texternal: z.array(z.string()).optional(),\n\tminify: z.boolean().optional(),\n\tout: z.string().optional(),\n\tsourcemap: z.boolean().optional(),\n\ttarget: z.string().optional()\n}).strict();\n/**\n* @private\n*/\nconst CompileOptionsSchema = z.object({\n\tautoloadDotenv: z.boolean().optional(),\n\tname: z.string().optional(),\n\tout: z.string().optional(),\n\ttargets: z.array(CompileTargetSchema).optional()\n}).strict();\n/**\n* Zod schema validating the {@link KiddConfig} shape.\n*/\nconst KiddConfigSchema = z.object({\n\tbuild: BuildOptionsSchema.optional(),\n\tcommands: z.string().optional(),\n\tcompile: z.union([z.boolean(), CompileOptionsSchema]).optional(),\n\tentry: z.string().optional(),\n\tinclude: z.array(z.string()).optional()\n}).strict();\n/**\n* Validate arbitrary data against the {@link KiddConfigSchema}.\n*\n* @param data - The unknown value to validate.\n* @returns A Result tuple - `[null, KiddConfig]` on success or `[Error, null]` on failure.\n*/\nfunction validateConfig(data) {\n\treturn validate({\n\t\tschema: KiddConfigSchema,\n\t\tparams: data,\n\t\tcreateError: ({ message }) => /* @__PURE__ */ new Error(`Invalid kidd config:\\n  ${message}`)\n\t});\n}\n//#endregion\n//#region src/utils/loader.ts\n/**\n* Load and validate a `kidd.config.ts` file using c12.\n*\n* Searches for a config file named `kidd` (e.g. `kidd.config.ts`, `kidd.config.mts`)\n* in the given working directory, validates it against the build config schema,\n* and returns a tagged config object.\n*\n* @param options - Optional loader configuration.\n* @returns A Result tuple - `[null, LoadConfigResult]` on success or `[Error, null]` on failure.\n*/\nasync function loadConfig(options) {\n\tconst { cwd, defaults, overrides } = options ?? {};\n\tconst [loadError, loaded] = await attemptAsync(() => loadConfig$1({\n\t\tcwd,\n\t\tdefaults,\n\t\tname: \"kidd\",\n\t\toverrides\n\t}));\n\tif (loadError) return err(`Failed to load kidd config: ${toError(loadError).message}`);\n\tif (!loaded) return err(\"Failed to load kidd config: no configuration was returned\");\n\tconst [validateError, config] = validateConfig(loaded.config);\n\tif (validateError) return err(validateError);\n\treturn ok({\n\t\tconfig: withTag(config, \"KiddConfig\"),\n\t\tconfigFile: loaded.configFile\n\t});\n}\n//#endregion\nexport { KiddConfigSchema, compileTargets, loadConfig, validateConfig };\n\n//# sourceMappingURL=utils.js.map","import { n as isContextError, t as createContext } from \"./create-context-BhqTipOB.js\";\nimport { basename, extname, join, resolve } from \"node:path\";\nimport * as clack from \"@clack/prompts\";\nimport { updateSettings } from \"@clack/prompts\";\nimport { P, attempt, attemptAsync, err, isNil, isPlainObject, isString, match, ok } from \"@kidd-cli/utils/fp\";\nimport yargs from \"yargs\";\nimport { hideBin } from \"yargs/helpers\";\nimport { z } from \"zod\";\nimport { writeFileSync } from \"node:fs\";\nimport { tmpdir } from \"node:os\";\nimport { match as match$1 } from \"ts-pattern\";\nimport { hasTag, withTag } from \"@kidd-cli/utils/tag\";\nimport { readdir } from \"node:fs/promises\";\nimport { path } from \"@kidd-cli/utils/node\";\nimport { validate } from \"@kidd-cli/utils/validate\";\n//#region \\0rolldown/runtime.js\nvar __defProp = Object.defineProperty;\nvar __exportAll = (all, no_symbols) => {\n\tlet target = {};\n\tfor (var name in all) __defProp(target, name, {\n\t\tget: all[name],\n\t\tenumerable: true\n\t});\n\tif (!no_symbols) __defProp(target, Symbol.toStringTag, { value: \"Module\" });\n\treturn target;\n};\n//#endregion\n//#region src/lib/crash.ts\n/**\n* Register global process handlers for uncaught exceptions and unhandled rejections.\n*\n* Converts raw runtime crashes into clean fatal error messages with debug logs.\n* Without these handlers, compiled Bun binaries show raw stack traces with\n* internal bundle line numbers that are meaningless to users.\n*\n* @param _name - The CLI name (reserved for future per-CLI log directories).\n*/\nfunction registerCrashHandlers(_name) {\n\tprocess.on(\"uncaughtException\", handleUnexpectedError);\n\tprocess.on(\"unhandledRejection\", handleUnexpectedError);\n}\n/**\n* Handle a CLI error by logging the message and exiting with the appropriate code.\n*\n* ContextErrors are intentional user-facing errors (from `ctx.fail()`) and are\n* displayed cleanly without a crash log. All other errors are delegated to\n* {@link handleUnexpectedError} which writes a debug log to the OS temp directory.\n*\n* @param error - The caught error value.\n*/\nfunction exitOnError(error) {\n\tif (isContextError(error)) {\n\t\tclack.log.error(error.message);\n\t\tprocess.exit(error.exitCode);\n\t\treturn;\n\t}\n\thandleUnexpectedError(error);\n}\n/**\n* Handle an unexpected (non-ContextError) error by writing a crash log and exiting.\n*\n* Resolves the error to an Error instance, writes a debug log to `/tmp`,\n* prints a clean message, and exits with the default exit code.\n*\n* @private\n* @param error - The caught error value.\n*/\nfunction handleUnexpectedError(error) {\n\tconst resolved = match(error).with(P.instanceOf(Error), (e) => e).otherwise((e) => new Error(String(e)));\n\tconst logPath = writeCrashLog(resolved);\n\tclack.log.error(resolved.message);\n\tif (logPath) clack.log.message(`Debug log: ${logPath}`);\n\tprocess.exit(1);\n}\n/**\n* Format the error cause as a log line, or return an empty array when absent.\n*\n* @private\n* @param cause - The error's `cause` value, if any.\n* @returns An array with zero or one formatted cause line.\n*/\nfunction formatCause(cause) {\n\tif (cause === void 0) return [];\n\treturn [`Cause: ${String(cause)}`];\n}\n/**\n* Write a crash log to the OS temp directory.\n*\n* Includes the error message, stack trace, and basic environment info.\n* Silently returns `undefined` if the write fails — crash logging must\n* never itself cause a crash.\n*\n* @private\n* @param error - The error to log.\n* @returns The path to the written log file, or `undefined` on failure.\n*/\nfunction writeCrashLog(error) {\n\tconst now = (/* @__PURE__ */ new Date()).toISOString();\n\tconst filename = `kidd-crash-${now.replaceAll(\":\", \"-\")}.log`;\n\tconst logPath = join(tmpdir(), filename);\n\tconst lines = [\n\t\t\"Kidd Crash Log\",\n\t\t`Timestamp: ${now}`,\n\t\t`Node: ${process.version}`,\n\t\t`Platform: ${process.platform} ${process.arch}`,\n\t\t`CWD: ${process.cwd()}`,\n\t\t\"\",\n\t\t`Error: ${error.message}`,\n\t\t\"\",\n\t\terror.stack ?? \"(no stack trace)\",\n\t\t\"\",\n\t\t...formatCause(error.cause)\n\t];\n\tconst [writeError] = attempt(() => writeFileSync(logPath, lines.join(\"\\n\"), \"utf8\"));\n\tif (writeError) return;\n\treturn logPath;\n}\n//#endregion\n//#region src/lib/debug.ts\n/**\n* Check whether debug mode is enabled via the `KIDD_DEBUG` or `DEBUG`\n* environment variables.\n*\n* `KIDD_DEBUG` takes precedence; `DEBUG` is honored when `KIDD_DEBUG` is unset.\n*\n* Truthy values: `\"true\"`, `\"1\"`\n* Falsy values: `\"false\"`, `\"0\"`, `undefined`, `null`\n*\n* @returns `true` when `KIDD_DEBUG` or `DEBUG` is set to a truthy value.\n*/\nfunction isDebug() {\n\tconst value = process.env.KIDD_DEBUG ?? process.env.DEBUG;\n\treturn value === \"true\" || value === \"1\";\n}\n//#endregion\n//#region src/autoload.ts\nconst VALID_EXTENSIONS = new Set([\n\t\".ts\",\n\t\".js\",\n\t\".mjs\",\n\t\".tsx\",\n\t\".jsx\"\n]);\nconst INDEX_NAME = \"index\";\n/**\n* Scan a directory for command files and produce a CommandMap.\n*\n* @param options - Autoload configuration (directory override, etc.).\n* @returns A promise resolving to a CommandMap built from the directory tree.\n*/\nasync function autoload(options) {\n\tconst dir = resolveDir(options);\n\treturn resolveCommandMapFromEntries(dir, await readdir(dir, { withFileTypes: true }));\n}\n/**\n* Resolve the target directory from autoload options.\n*\n* @private\n* @param options - Optional autoload configuration.\n* @returns The resolved absolute directory path.\n*/\nfunction resolveDir(options) {\n\tif (options && isString(options.dir)) return resolve(options.dir);\n\treturn resolve(\"./commands\");\n}\n/**\n* Scan a subdirectory and assemble it as a parent command with subcommands.\n*\n* If the directory contains an `index.ts`/`index.js`, that becomes the parent\n* handler. Otherwise a handler-less group command is created that demands a\n* subcommand.\n*\n* @private\n* @param dir - Absolute path to the subdirectory.\n* @returns A tuple of [name, Command] or undefined if the directory is empty.\n*/\nasync function resolveDirCommand(dir) {\n\tconst dirName = basename(dir);\n\tconst dirEntries = await readdir(dir, { withFileTypes: true });\n\tconst subCommands = await resolveCommandMapFromEntries(dir, dirEntries);\n\tconst indexFile = findIndexInEntries(dirEntries);\n\tif (indexFile) {\n\t\tconst parentCommand = await importCommand(join(dir, indexFile.name));\n\t\tif (parentCommand) return [parentCommand.name ?? dirName, withTag({\n\t\t\t...parentCommand,\n\t\t\tcommands: subCommands\n\t\t}, \"Command\")];\n\t}\n\tif (Object.keys(subCommands).length === 0) return;\n\treturn [dirName, withTag({ commands: subCommands }, \"Command\")];\n}\n/**\n* Build a CommandMap from pre-read directory entries.\n*\n* Shared by both `autoload` and `resolveDirCommand` to avoid duplicating\n* the file/dir fan-out and result-filtering logic.\n*\n* @private\n* @param dir - Absolute path to the directory the entries belong to.\n* @param entries - Pre-read directory entries for that directory.\n* @returns A CommandMap built from the entries.\n*/\nasync function resolveCommandMapFromEntries(dir, entries) {\n\tconst fileEntries = entries.filter(isCommandFile);\n\tconst dirEntries = entries.filter(isCommandDir);\n\tconst fileResults = await Promise.all(fileEntries.map(async (entry) => {\n\t\tconst cmd = await importCommand(join(dir, entry.name));\n\t\tif (!cmd) return;\n\t\treturn [cmd.name ?? deriveCommandName(entry), cmd];\n\t}));\n\tconst dirResults = await Promise.all(dirEntries.map((entry) => resolveDirCommand(join(dir, entry.name))));\n\tconst validPairs = [...fileResults, ...dirResults].filter((pair) => pair !== void 0);\n\treturn Object.fromEntries(deduplicateCommandPairs(validPairs));\n}\n/**\n* Find the index file (index.ts or index.js) in pre-read directory entries.\n*\n* @private\n* @param entries - Pre-read directory entries.\n* @returns The index file's Dirent or undefined.\n*/\nfunction findIndexInEntries(entries) {\n\treturn entries.find((entry) => entry.isFile() && !entry.name.endsWith(\".d.ts\") && !entry.name.endsWith(\".d.tsx\") && VALID_EXTENSIONS.has(extname(entry.name)) && basename(entry.name, extname(entry.name)) === INDEX_NAME);\n}\n/**\n* Dynamically import a file and validate that its default export is a Command.\n*\n* Converts the absolute filesystem path to a `file://` URL before passing to\n* `import()` so resolution works on Windows (where backslash paths are not\n* valid ESM specifiers).\n*\n* @private\n* @param filePath - Absolute path to the file to import.\n* @returns The Command if valid, or undefined.\n*/\nasync function importCommand(filePath) {\n\tconst specifier = path.toImportUrl(filePath);\n\ttry {\n\t\tconst mod = await import(specifier);\n\t\tif (isCommandExport(mod)) return mod.default;\n\t\treturn;\n\t} catch (error) {\n\t\tif (isDebug()) console.warn(`[kidd] failed to import command from ${specifier}:`, error);\n\t\treturn;\n\t}\n}\n/**\n* Check whether a module's default export is a Command object.\n*\n* ES module namespace objects have a null prototype, so isPlainObject\n* rejects them. We only need to verify the namespace is a non-null\n* object with a default export that is a plain Command object.\n*\n* @private\n* @param mod - The imported module to inspect.\n* @returns True when the module has a Command as its default export.\n*/\nfunction isCommandExport(mod) {\n\treturn match$1(mod).when((value) => typeof value === \"object\" && value !== null && Object.hasOwn(value, \"default\"), (value) => {\n\t\tconst def = value.default;\n\t\treturn isPlainObject(def) && hasTag(def, \"Command\");\n\t}).otherwise(() => false);\n}\n/**\n* Derive a command name from a directory entry by stripping its extension.\n*\n* @private\n* @param entry - The directory entry to derive the name from.\n* @returns The file name without its extension.\n*/\nfunction deriveCommandName(entry) {\n\treturn basename(entry.name, extname(entry.name));\n}\n/**\n* Predicate: entry is a command file (.ts/.js, not index, not _/. prefixed).\n*\n* @private\n* @param entry - The directory entry to check.\n* @returns True when the entry is a valid command file.\n*/\nfunction isCommandFile(entry) {\n\tif (!entry.isFile()) return false;\n\tif (entry.name.startsWith(\"_\") || entry.name.startsWith(\".\")) return false;\n\tif (entry.name.endsWith(\".d.ts\") || entry.name.endsWith(\".d.tsx\")) return false;\n\tif (!VALID_EXTENSIONS.has(extname(entry.name))) return false;\n\treturn deriveCommandName(entry) !== INDEX_NAME;\n}\n/**\n* Predicate: entry is a scannable command directory (not _/. prefixed).\n*\n* @private\n* @param entry - The directory entry to check.\n* @returns True when the entry is a valid command directory.\n*/\nfunction isCommandDir(entry) {\n\tif (!entry.isDirectory()) return false;\n\treturn !entry.name.startsWith(\"_\") && !entry.name.startsWith(\".\");\n}\n/**\n* Deduplicate command pairs by name, keeping the first occurrence.\n*\n* When multiple commands resolve to the same name (e.g. via explicit `name`\n* overrides), this ensures a deterministic first-wins policy and emits a\n* warning for every collision so the user can fix the conflict.\n*\n* @private\n* @param pairs - The resolved [name, Command] tuples.\n* @returns Deduplicated pairs with only the first occurrence of each name.\n*/\nfunction deduplicateCommandPairs(pairs) {\n\tconst { result } = pairs.reduce((acc, pair) => {\n\t\tconst [name] = pair;\n\t\tif (acc.seen.has(name)) {\n\t\t\tconsole.warn(`[kidd] duplicate command name \"${name}\" — first definition wins, later definition ignored`);\n\t\t\treturn acc;\n\t\t}\n\t\treturn {\n\t\t\tresult: [...acc.result, pair],\n\t\t\tseen: new Set([...acc.seen, name])\n\t\t};\n\t}, {\n\t\tresult: [],\n\t\tseen: /* @__PURE__ */ new Set()\n\t});\n\treturn result;\n}\n//#endregion\n//#region src/command.ts\n/**\n* Check whether a value is a structured {@link CommandsConfig} object.\n*\n* Discriminates from a plain `CommandMap` by checking for the `path` (string)\n* key — which cannot appear on a valid `CommandMap` whose values are tagged\n* `Command` objects.\n*\n* @param value - The value to test.\n* @returns `true` when `value` is a `CommandsConfig`.\n*/\nfunction isCommandsConfig(value) {\n\tif (typeof value !== \"object\" || value === null || value instanceof Promise) return false;\n\treturn Object.hasOwn(value, \"path\") && typeof value.path === \"string\";\n}\n/**\n* Define a CLI command with typed options, positionals, config, and handler.\n*\n* The `const TMiddleware` generic preserves the middleware tuple as a literal type,\n* enabling TypeScript to extract and intersect `Variables` from each middleware\n* element onto the handler's `ctx` type.\n*\n* When `def.commands` is a structured {@link CommandsConfig}, the factory\n* normalizes it into a flat `commands` field on the output `Command` object\n* so downstream consumers never need to handle the grouped form.\n*\n* @param def - Command definition including description, options, positionals, middleware, and handler.\n* @returns A resolved Command object for registration in the command map.\n*/\nfunction command(def) {\n\tconst resolved = {\n\t\t...def,\n\t\tdeprecated: resolveValue$1(def.deprecated),\n\t\tdescription: resolveValue$1(def.description),\n\t\thidden: resolveValue$1(def.hidden)\n\t};\n\treturn match(resolved.commands).when(isCommandsConfig, (cfg) => {\n\t\tconst { commands: innerCommands } = cfg;\n\t\treturn withTag({\n\t\t\t...resolved,\n\t\t\tcommands: innerCommands\n\t\t}, \"Command\");\n\t}).otherwise(() => withTag({ ...resolved }, \"Command\"));\n}\n/**\n* Resolve a {@link Resolvable} value by invoking it if it is a function,\n* or returning the value directly.\n*\n* @private\n* @param value - A static value or zero-argument factory function.\n* @returns The resolved value, or `undefined` when the input is `undefined`.\n*/\nfunction resolveValue$1(value) {\n\tif (typeof value === \"function\") return value();\n\treturn value;\n}\n//#endregion\n//#region src/runtime/args/zod.ts\n/**\n* Type guard that checks whether a value is a zod object schema.\n*\n* @param args - The value to check.\n* @returns True when args is a ZodObject.\n*/\nfunction isZodSchema(args) {\n\treturn typeof args === \"object\" && args !== null && Object.hasOwn(args, \"_def\") && typeof args._def === \"object\" && args._def !== null && args._def.type === \"object\";\n}\n/**\n* Convert an entire zod object schema into a record of yargs options.\n*\n* @param schema - The zod object schema.\n* @returns A record mapping field names to yargs option definitions.\n*/\nfunction zodSchemaToYargsOptions(schema) {\n\treturn mapSchemaShape(schema, (fieldSchema) => buildZodFieldOption(fieldSchema, resolveZodYargsType));\n}\n/**\n* Extract positional metadata from a zod object schema.\n*\n* Returns an ordered array of positional names with their required/optional status.\n* Key order from `Object.keys(schema.shape)` determines positional order.\n*\n* @param schema - The zod object schema for positionals.\n* @returns An ordered array of positional metadata.\n*/\nfunction zodSchemaToPositionalMeta(schema) {\n\treturn getShapeEntries(schema).map(([key, fieldSchema]) => {\n\t\tconst { isOptional } = unwrapZodType(fieldSchema);\n\t\treturn {\n\t\t\tisOptional,\n\t\t\tname: key\n\t\t};\n\t});\n}\n/**\n* Convert a zod object schema into a record of yargs positional options.\n*\n* Each field in the schema becomes a positional argument. Positionals support\n* `string`, `number`, and `boolean` types — other types fall back to `string`.\n*\n* @param schema - The zod object schema for positionals.\n* @returns A record mapping field names to yargs positional option definitions.\n*/\nfunction zodSchemaToYargsPositionals(schema) {\n\treturn mapSchemaShape(schema, (fieldSchema) => buildZodFieldOption(fieldSchema, resolvePositionalType));\n}\n/**\n* Extract typed shape entries from a zod object schema.\n*\n* @private\n* @param schema - The zod object schema.\n* @returns An array of [key, fieldSchema] pairs.\n*/\nfunction getShapeEntries(schema) {\n\tconst shape = schema.shape;\n\treturn Object.entries(shape);\n}\n/**\n* Map every field in a zod object schema through a converter, returning a record.\n*\n* @private\n* @param schema - The zod object schema.\n* @param converter - A function converting a single zod field schema to a yargs option.\n* @returns A record mapping field names to converted option definitions.\n*/\nfunction mapSchemaShape(schema, converter) {\n\treturn Object.fromEntries(getShapeEntries(schema).map(([key, fieldSchema]) => [key, converter(fieldSchema)]));\n}\n/**\n* Extract a default value from a zod definition, falling back to the provided value.\n*\n* @private\n* @param def - The zod definition to inspect.\n* @param fallback - Value to return when no default is defined.\n* @returns The resolved default value.\n*/\nfunction resolveDefaultValue(def, fallback) {\n\tif (def.defaultValue !== void 0) return def.defaultValue;\n\treturn fallback;\n}\n/**\n* Unwrap a ZodOptional type, recursing into the inner type.\n*\n* @private\n* @param options - The unwrap options containing def, current type, and default value.\n* @returns Unwrapped type information.\n*/\nfunction unwrapOptional(options) {\n\tconst { def, current, defaultValue } = options;\n\tif (def.innerType) return unwrapZodTypeRecursive({\n\t\tcurrent: def.innerType,\n\t\tdefaultValue,\n\t\tisOptional: true\n\t});\n\treturn {\n\t\tdefaultValue,\n\t\tinner: current,\n\t\tisOptional: true\n\t};\n}\n/**\n* Unwrap a ZodDefault type, resolving its default value and recursing.\n*\n* @private\n* @param options - The unwrap options containing def, current type, and default value.\n* @returns Unwrapped type information with the resolved default.\n*/\nfunction unwrapDefault(options) {\n\tconst { def, current, defaultValue } = options;\n\tconst newDefault = resolveDefaultValue(def, defaultValue);\n\tif (def.innerType) return unwrapZodTypeRecursive({\n\t\tcurrent: def.innerType,\n\t\tdefaultValue: newDefault,\n\t\tisOptional: true\n\t});\n\treturn {\n\t\tdefaultValue: newDefault,\n\t\tinner: current,\n\t\tisOptional: true\n\t};\n}\n/**\n* Recursively unwrap optional and default wrappers from a zod type.\n*\n* @private\n* @param options - The recursive unwrap options containing current type, optionality flag, and default value.\n* @returns The fully unwrapped type information.\n*/\nfunction unwrapZodTypeRecursive(options) {\n\tconst { current, isOptional, defaultValue } = options;\n\tconst def = current._def;\n\tif (def.type === \"optional\") return unwrapOptional({\n\t\tcurrent,\n\t\tdef,\n\t\tdefaultValue\n\t});\n\tif (def.type === \"default\") return unwrapDefault({\n\t\tcurrent,\n\t\tdef,\n\t\tdefaultValue\n\t});\n\treturn {\n\t\tdefaultValue,\n\t\tinner: current,\n\t\tisOptional\n\t};\n}\n/**\n* Unwrap a zod schema to extract its base type, optionality, and default value.\n*\n* @private\n* @param schema - The zod type to unwrap.\n* @returns The unwrapped type information.\n*/\nfunction unwrapZodType(schema) {\n\treturn unwrapZodTypeRecursive({\n\t\tcurrent: schema,\n\t\tdefaultValue: void 0,\n\t\tisOptional: false\n\t});\n}\n/**\n* Map a zod type name to a yargs option type string.\n*\n* @private\n* @param typeName - The zod type name (e.g. 'string', 'number').\n* @returns The corresponding yargs type.\n*/\nfunction resolveZodYargsType(typeName) {\n\treturn match$1(typeName).with(\"string\", () => \"string\").with(\"number\", () => \"number\").with(\"boolean\", () => \"boolean\").with(\"array\", () => \"array\").otherwise(() => \"string\");\n}\n/**\n* Map a type name to a valid yargs positional type.\n*\n* Positionals support `'string'`, `'number'`, and `'boolean'`.\n* All other types fall back to `'string'`. Used for both Zod and\n* yargs-native positional definitions.\n*\n* @param typeName - The type name to resolve.\n* @returns A positional-compatible type.\n*/\nfunction resolvePositionalType(typeName) {\n\treturn match$1(typeName).with(\"number\", () => \"number\").with(\"boolean\", () => \"boolean\").otherwise(() => \"string\");\n}\n/**\n* Extract enum choices from a zod definition when it represents a ZodEnum.\n*\n* @private\n* @param def - The zod definition to inspect.\n* @returns An object with `choices` if the def is an enum, otherwise empty.\n*/\nfunction resolveEnumChoices(def) {\n\tif (def.type === \"enum\" && def.entries) return { choices: Object.values(def.entries) };\n\treturn {};\n}\n/**\n* Build a base yargs option from a zod schema's description and default.\n*\n* @private\n* @param inner - The unwrapped zod schema instance.\n* @param defaultValue - The resolved default value.\n* @returns A partial yargs option object.\n*/\nfunction buildBaseOption(inner, defaultValue) {\n\tconst { description } = inner;\n\tconst base = {};\n\tif (description) base.describe = description;\n\tif (defaultValue !== void 0) base.default = defaultValue;\n\treturn base;\n}\n/**\n* Convert a single zod field schema into a yargs option or positional definition.\n*\n* Accepts a type resolver to support both full options (string/number/boolean/array)\n* and positionals (string/number only).\n*\n* @private\n* @param schema - A single zod field type.\n* @param typeResolver - Function to map zod type name to a yargs-compatible type.\n* @returns A yargs option/positional object.\n*/\nfunction buildZodFieldOption(schema, typeResolver) {\n\tconst { inner, isOptional, defaultValue } = unwrapZodType(schema);\n\tconst innerDef = inner._def;\n\tconst base = {\n\t\t...buildBaseOption(inner, defaultValue),\n\t\t...resolveEnumChoices(innerDef),\n\t\ttype: typeResolver(innerDef.type)\n\t};\n\tif (!isOptional) return {\n\t\t...base,\n\t\tdemandOption: true\n\t};\n\treturn base;\n}\n//#endregion\n//#region src/runtime/args/parser.ts\n/**\n* Create an args parser that cleans and validates raw parsed arguments.\n*\n* Captures both option and positional definitions in a closure and returns an\n* ArgsParser whose `parse` method strips yargs-internal keys and validates\n* against a merged zod schema when one is defined.\n*\n* @param defs - The option and positional definitions from the command.\n* @returns An ArgsParser with a parse method.\n*/\nfunction createArgsParser(defs) {\n\tconst mergedSchema = buildMergedSchema(defs.options, defs.positionals);\n\treturn { parse(rawArgs) {\n\t\treturn validateArgs(mergedSchema, cleanParsedArgs(rawArgs));\n\t} };\n}\n/**\n* Build a merged Zod schema from options and positionals definitions.\n*\n* When both are Zod schemas, merges them into a single schema for validation.\n* When only one is a Zod schema, returns that schema with `.passthrough()` so\n* yargs-native keys from the other side are preserved. When neither is Zod,\n* returns undefined (no validation).\n*\n* @private\n* @param options - Option definitions (flags).\n* @param positionals - Positional argument definitions.\n* @returns A merged Zod schema or undefined.\n*/\nfunction buildMergedSchema(options, positionals) {\n\tconst optionsIsZod = options && isZodSchema(options);\n\tconst positionalsIsZod = positionals && isZodSchema(positionals);\n\tif (optionsIsZod && positionalsIsZod) return options.merge(positionals);\n\tif (optionsIsZod) return options.passthrough();\n\tif (positionalsIsZod) return positionals.passthrough();\n}\n/**\n* Strip yargs-internal keys (`_`, `$0`) and camelCase-duplicated hyphenated keys\n* from a parsed argv record, returning only user-defined arguments.\n*\n* @private\n* @param argv - Raw parsed argv from yargs.\n* @returns A cleaned record containing only user-defined arguments.\n*/\nfunction cleanParsedArgs(argv) {\n\treturn Object.fromEntries(Object.entries(argv).filter(([key]) => key !== \"_\" && key !== \"$0\" && !key.includes(\"-\")));\n}\n/**\n* Validate parsed arguments against a zod schema when one is defined.\n*\n* When no zod schema is present, the parsed args are returned as-is.\n* When a zod schema is present, validation is performed and a Result error\n* is returned on failure.\n*\n* @private\n* @param schema - The merged zod schema or undefined.\n* @param parsedArgs - The cleaned parsed arguments.\n* @returns A Result containing validated arguments (zod-parsed when applicable).\n*/\nfunction validateArgs(schema, parsedArgs) {\n\tif (!schema) return ok(parsedArgs);\n\treturn validate({\n\t\tschema,\n\t\tparams: parsedArgs,\n\t\tcreateError: ({ message }) => /* @__PURE__ */ new Error(`Invalid arguments:\\n  ${message}`)\n\t});\n}\n//#endregion\n//#region src/runtime/args/register.ts\n/**\n* Register option and positional definitions on a yargs builder.\n*\n* Accepts `options` (flags) and `positionals` as either zod object schemas or\n* records of yargs-native arg definitions. Options are registered via\n* `builder.option()` and positionals via `builder.positional()`.\n*\n* @param params - Builder instance, option definitions, and positional definitions.\n* @returns Nothing; mutates the yargs builder in place.\n*/\nfunction registerCommandArgs({ builder, options, positionals }) {\n\tif (positionals) registerArgsDef({\n\t\tbuilder,\n\t\tdef: positionals,\n\t\tregister: (b, key, opt) => b.positional(key, opt),\n\t\ttoYargsNative: yargsArgDefToPositional,\n\t\ttoZod: zodSchemaToYargsPositionals\n\t});\n\tif (options) registerArgsDef({\n\t\tbuilder,\n\t\tdef: options,\n\t\tregister: (b, key, opt) => b.option(key, opt),\n\t\ttoYargsNative: yargsArgDefToOption,\n\t\ttoZod: zodSchemaToYargsOptions\n\t});\n}\n/**\n* Register an `ArgsDef` (Zod or yargs-native) on a yargs builder.\n*\n* @private\n* @param params - Registration parameters including the builder, definition, and converters.\n*/\nfunction registerArgsDef(params) {\n\tconst { builder, def, register, toZod, toYargsNative } = params;\n\tif (isZodSchema(def)) {\n\t\tconst opts = toZod(def);\n\t\tObject.entries(opts).map(([key, opt]) => register(builder, key, opt));\n\t} else Object.entries(def).map(([key, argDef]) => register(builder, key, toYargsNative(argDef)));\n}\n/**\n* Convert a yargs-native arg definition into a yargs option object.\n*\n* @private\n* @param def - The yargs arg definition.\n* @returns A yargs option object.\n*/\nfunction yargsArgDefToOption(def) {\n\treturn {\n\t\talias: def.alias,\n\t\tchoices: def.choices,\n\t\tdefault: def.default,\n\t\tdemandOption: def.required ?? false,\n\t\tdeprecated: resolveValue(def.deprecated),\n\t\tdescribe: def.description,\n\t\tgroup: def.group,\n\t\thidden: resolveValue(def.hidden) ?? false,\n\t\ttype: def.type\n\t};\n}\n/**\n* Convert a yargs-native arg definition into a yargs positional option object.\n*\n* @private\n* @param def - The yargs arg definition for a positional.\n* @returns A yargs positional option object.\n*/\nfunction yargsArgDefToPositional(def) {\n\treturn {\n\t\tchoices: def.choices,\n\t\tdefault: def.default,\n\t\tdemandOption: def.required ?? false,\n\t\tdescribe: def.description,\n\t\ttype: resolvePositionalType(def.type)\n\t};\n}\n/**\n* Resolve a {@link Resolvable} value by invoking it if it is a function,\n* or returning the value directly.\n*\n* @private\n* @param value - A static value or zero-argument factory function.\n* @returns The resolved value, or `undefined` when the input is `undefined`.\n*/\nfunction resolveValue(value) {\n\tif (typeof value === \"function\") return value();\n\treturn value;\n}\n//#endregion\n//#region src/runtime/sort-commands.ts\n/**\n* Validate that every name in the order array exists in the provided command names.\n*\n* @param params - The order array and available command names to validate against.\n* @returns A Result tuple — `[null, void]` on success or `[Error, null]` on failure.\n*/\nfunction validateCommandOrder(params) {\n\tconst { order, commandNames } = params;\n\tconst seen = /* @__PURE__ */ new Set();\n\tconst duplicates = order.filter((name) => {\n\t\tif (seen.has(name)) return true;\n\t\tseen.add(name);\n\t\treturn false;\n\t});\n\tif (duplicates.length > 0) return err(`Invalid command order: duplicate command(s) ${[...new Set(duplicates)].map((n) => `\"${n}\"`).join(\", \")}`);\n\tconst nameSet = new Set(commandNames);\n\tconst invalid = order.filter((name) => !nameSet.has(name));\n\tif (invalid.length > 0) return err(`Invalid command order: unknown command(s) ${invalid.map((n) => `\"${n}\"`).join(\", \")}`);\n\treturn ok();\n}\n/**\n* Sort command entries with ordered names first (in specified order),\n* remaining names alphabetically.\n*\n* @param params - The command entries and optional order array.\n* @returns Sorted array of `[name, Command]` entries.\n*/\nfunction sortCommandEntries(params) {\n\tconst { entries, order } = params;\n\tif (!order || order.length === 0) return [...entries].toSorted(([a], [b]) => a.localeCompare(b));\n\tconst entryMap = new Map(entries);\n\tconst ordered = order.filter((name) => entryMap.has(name)).map((name) => [name, entryMap.get(name)]);\n\tconst orderedSet = new Set(order);\n\tconst remaining = entries.filter(([name]) => !orderedSet.has(name)).toSorted(([a], [b]) => a.localeCompare(b));\n\treturn [...ordered, ...remaining];\n}\n//#endregion\n//#region src/runtime/register.ts\n/**\n* Type guard that checks whether a value is a Command object.\n*\n* @param value - The value to test.\n* @returns True when the value has `[TAG] === 'Command'`.\n*/\nfunction isCommand(value) {\n\treturn hasTag(value, \"Command\");\n}\n/**\n* Register all commands from a CommandMap on a yargs instance.\n*\n* Iterates over the command map, filters for valid Command objects,\n* validates the order array, sorts entries, and recursively registers\n* each command (including subcommands) on the provided yargs Argv instance.\n*\n* @param options - Registration options including the command map, yargs instance, and resolution ref.\n*/\nfunction registerCommands(options) {\n\tconst { instance, commands, resolved, parentPath, order, errorRef } = options;\n\tconst commandEntries = Object.entries(commands).filter((pair) => isCommand(pair[1])).map(([key, entry]) => [entry.name ?? key, entry]);\n\tif (order && order.length > 0) {\n\t\tconst [validationError] = validateCommandOrder({\n\t\t\tcommandNames: commandEntries.map(([name]) => name),\n\t\t\torder\n\t\t});\n\t\tif (validationError && errorRef) {\n\t\t\terrorRef.error = validationError;\n\t\t\treturn;\n\t\t}\n\t}\n\tsortCommandEntries({\n\t\tentries: commandEntries,\n\t\torder\n\t}).map(([name, entry]) => registerSingleCommand({\n\t\tbuilder: instance,\n\t\tcmd: entry,\n\t\terrorRef,\n\t\tinstance,\n\t\tname,\n\t\tparentPath,\n\t\tresolved\n\t}));\n}\n/**\n* Register a single resolved command (and its subcommands) with yargs.\n*\n* Sets up the yargs command handler, wires argument definitions, and\n* recursively registers any nested subcommands. On match, stores the\n* resolved handler and command path in the shared ref.\n*\n* @private\n* @param options - Command registration context.\n*/\nfunction registerSingleCommand(options) {\n\tconst { instance, name, cmd, resolved, parentPath, errorRef } = options;\n\tconst commandSpec = formatCommandSpec(formatCommandString(name, cmd.positionals), cmd.aliases);\n\tconst builder = (yargsBuilder) => {\n\t\tif (cmd.strict !== void 0) yargsBuilder.strict(cmd.strict);\n\t\tregisterCommandArgs({\n\t\t\tbuilder: yargsBuilder,\n\t\t\toptions: cmd.options,\n\t\t\tpositionals: cmd.positionals\n\t\t});\n\t\tif (cmd.commands) {\n\t\t\tconst subCommands = Object.entries(cmd.commands).filter((pair) => isCommand(pair[1])).map(([key, entry]) => [entry.name ?? key, entry]);\n\t\t\tconst subOrder = cmd.help?.order;\n\t\t\tif (subOrder && subOrder.length > 0) {\n\t\t\t\tconst [validationError] = validateCommandOrder({\n\t\t\t\t\tcommandNames: subCommands.map(([n]) => n),\n\t\t\t\t\torder: subOrder\n\t\t\t\t});\n\t\t\t\tif (validationError && errorRef) {\n\t\t\t\t\terrorRef.error = validationError;\n\t\t\t\t\treturn yargsBuilder;\n\t\t\t\t}\n\t\t\t}\n\t\t\tsortCommandEntries({\n\t\t\t\tentries: subCommands,\n\t\t\t\torder: subOrder\n\t\t\t}).map(([subName, subEntry]) => registerSingleCommand({\n\t\t\t\tbuilder: yargsBuilder,\n\t\t\t\tcmd: subEntry,\n\t\t\t\terrorRef,\n\t\t\t\tinstance: yargsBuilder,\n\t\t\t\tname: subName,\n\t\t\t\tparentPath: [...parentPath, name],\n\t\t\t\tresolved\n\t\t\t}));\n\t\t\tif (cmd.handler || cmd.render) yargsBuilder.demandCommand(0);\n\t\t\telse yargsBuilder.demandCommand(1, \"You must specify a subcommand.\");\n\t\t}\n\t\treturn yargsBuilder;\n\t};\n\tconst handler = () => {\n\t\tresolved.ref = {\n\t\t\tcommandPath: [...parentPath, name],\n\t\t\thandler: cmd.handler,\n\t\t\tmiddleware: cmd.middleware ?? [],\n\t\t\toptions: cmd.options,\n\t\t\tpositionals: cmd.positionals,\n\t\t\trender: cmd.render\n\t\t};\n\t};\n\tif (cmd.hidden === true) instance.command(commandSpec, false, builder, handler, [], cmd.deprecated);\n\telse instance.command(commandSpec, cmd.description ?? \"\", builder, handler, [], cmd.deprecated);\n}\n/**\n* Build a yargs command string with positional placeholders.\n*\n* Normalizes both Zod and yargs-native positional definitions to a common\n* intermediate representation, then formats each as `<name>` (required) or\n* `[name]` (optional).\n*\n* @private\n* @param name - The base command name.\n* @param positionals - Optional positional definitions (Zod schema or yargs-native record).\n* @returns The command string with positional placeholders appended.\n*/\nfunction formatCommandString(name, positionals) {\n\tif (!positionals) return name;\n\tconst meta = extractPositionalMeta(positionals);\n\treturn match$1(meta.length).with(0, () => name).otherwise(() => [name, ...meta.map(formatPlaceholder)].join(\" \"));\n}\n/**\n* Normalize an `ArgsDef` into an ordered array of positional metadata.\n*\n* Handles both Zod schemas (via `zodSchemaToPositionalMeta`) and yargs-native\n* records (via `Object.entries` with `required` check).\n*\n* @private\n* @param positionals - The positional definitions.\n* @returns An ordered array of positional metadata.\n*/\nfunction extractPositionalMeta(positionals) {\n\tif (isZodSchema(positionals)) return zodSchemaToPositionalMeta(positionals);\n\treturn Object.entries(positionals).map(([key, def]) => ({\n\t\tisOptional: def.required !== true,\n\t\tname: key\n\t}));\n}\n/**\n* Format a positional metadata entry as a yargs placeholder string.\n*\n* @private\n* @param meta - The positional metadata.\n* @returns `<name>` for required positionals, `[name]` for optional ones.\n*/\nfunction formatPlaceholder(meta) {\n\tif (meta.isOptional) return `[${meta.name}]`;\n\treturn `<${meta.name}>`;\n}\n/**\n* Build the first argument to `yargs.command()`.\n*\n* Returns a plain string when there are no aliases, or a `[commandString, ...aliases]`\n* array when aliases are present — both forms are accepted by yargs.\n*\n* @private\n* @param commandString - The primary command string (may include positional placeholders).\n* @param aliases - Optional alternative names for the command.\n* @returns A string or string array suitable for `yargs.command()`.\n*/\nfunction formatCommandSpec(commandString, aliases) {\n\treturn match$1(aliases).with(void 0, () => commandString).otherwise((a) => match$1(a.length).with(0, () => commandString).otherwise(() => [commandString, ...a]));\n}\n//#endregion\n//#region src/runtime/runner.ts\n/**\n* Create a runner that executes root and command middleware chains.\n*\n* Root middleware wraps the command middleware chain, which in turn wraps\n* the command handler — producing a nested onion lifecycle:\n*\n* ```\n* root middleware start →\n*   command middleware start →\n*     handler\n*   command middleware end\n* root middleware end\n* ```\n*\n* @param rootMiddleware - Root-level middleware from `cli({ middleware })`.\n* @returns A MiddlewareExecutor with an execute method.\n*/\nfunction createMiddlewareExecutor(rootMiddleware) {\n\treturn { async execute({ ctx, handler, middleware }) {\n\t\tconst commandHandler = async (innerCtx) => {\n\t\t\tawait runMiddlewareChain(middleware, innerCtx, handler);\n\t\t};\n\t\tawait runMiddlewareChain(rootMiddleware, ctx, commandHandler);\n\t} };\n}\n/**\n* Execute a middleware chain followed by a final handler.\n*\n* Runs each middleware in order, passing `ctx` and a `next` callback.\n* When all middleware have called `next()`, the final handler is invoked.\n* A middleware can short-circuit by not calling `next()`.\n*\n* @private\n* @param middlewares - Ordered array of middleware to execute.\n* @param ctx - The context object threaded through middleware and handler.\n* @param finalHandler - The command handler to invoke after all middleware.\n*/\nasync function runMiddlewareChain(middlewares, ctx, finalHandler) {\n\tasync function executeChain(index) {\n\t\tif (index >= middlewares.length) {\n\t\t\tawait finalHandler(ctx);\n\t\t\treturn;\n\t\t}\n\t\tconst mw = middlewares[index];\n\t\tif (mw) await mw.handler(ctx, () => executeChain(index + 1));\n\t}\n\tawait executeChain(0);\n}\n//#endregion\n//#region src/runtime/runtime.ts\n/**\n* Create a runtime that orchestrates middleware execution.\n*\n* Captures middleware in a closure alongside a runner.\n* The returned `runtime.execute` method handles arg parsing, context creation,\n* and middleware chain execution for each command invocation.\n*\n* @param options - Runtime configuration including name, version, and middleware.\n* @returns A ResultAsync containing the runtime or an error.\n*/\nasync function createRuntime(options) {\n\tconst runner = createMiddlewareExecutor(options.middleware ?? []);\n\treturn ok({ async execute(command) {\n\t\tconst [argsError, validatedArgs] = createArgsParser({\n\t\t\toptions: command.options,\n\t\t\tpositionals: command.positionals\n\t\t}).parse(command.rawArgs);\n\t\tif (argsError) return err(argsError);\n\t\tconst ctx = createContext({\n\t\t\targs: validatedArgs,\n\t\t\targv: options.argv,\n\t\t\tdisplay: options.display,\n\t\t\tlog: options.log,\n\t\t\tmeta: {\n\t\t\t\tcommand: [...command.commandPath],\n\t\t\t\tdirs: options.dirs,\n\t\t\t\tname: options.name,\n\t\t\t\tversion: options.version\n\t\t\t},\n\t\t\tprompts: options.prompts,\n\t\t\tstatus: options.status\n\t\t});\n\t\tconst finalHandler = command.render ?? command.handler ?? (async () => {});\n\t\tconst [execError] = await attemptAsync(() => runner.execute({\n\t\t\tctx,\n\t\t\thandler: finalHandler,\n\t\t\tmiddleware: command.middleware\n\t\t}));\n\t\tif (execError) return err(execError);\n\t\treturn ok();\n\t} });\n}\n//#endregion\n//#region src/cli.ts\nvar cli_exports = /* @__PURE__ */ __exportAll({\n\tcli: () => cli,\n\tdefault: () => cli\n});\n/**\n* Bootstrap and run the CLI application.\n*\n* Parses argv, resolves the matched command, loads config, runs the\n* middleware chain, and invokes the command handler.\n*\n* @param options - CLI configuration including name, version, commands, and middleware.\n*/\nasync function cli(options) {\n\tregisterCrashHandlers(options.name);\n\tconst [uncaughtError, result] = await attemptAsync(async () => {\n\t\tconst [versionError, version] = resolveVersion(options.version);\n\t\tif (versionError) return versionError;\n\t\tconst rawTokens = hideBin(process.argv);\n\t\tconst program = yargs(rawTokens).scriptName(options.name).version(version).alias(\"version\", \"v\").strict(options.strict !== false).help().alias(\"help\", \"h\").option(\"cwd\", {\n\t\t\tdescribe: \"Set the working directory\",\n\t\t\tglobal: true,\n\t\t\ttype: \"string\"\n\t\t});\n\t\tif (options.description) program.usage(options.description);\n\t\tconst footer = extractFooter(options.help);\n\t\tif (footer) program.epilogue(footer);\n\t\tconst resolved = { ref: void 0 };\n\t\tconst errorRef = { error: void 0 };\n\t\tconst resolvedCmds = await resolveCommands(options.commands);\n\t\tif (resolvedCmds) {\n\t\t\tregisterCommands({\n\t\t\t\tcommands: resolvedCmds.commands,\n\t\t\t\terrorRef,\n\t\t\t\tinstance: program,\n\t\t\t\torder: options.help?.order,\n\t\t\t\tparentPath: [],\n\t\t\t\tresolved\n\t\t\t});\n\t\t\tif (errorRef.error) return errorRef.error;\n\t\t}\n\t\tconst argv = await program.parseAsync();\n\t\tapplyCwd(argv);\n\t\tif (!resolved.ref) {\n\t\t\tshowNoCommandHelp({\n\t\t\t\targv,\n\t\t\t\tcommands: resolvedCmds,\n\t\t\t\thelp: options.help,\n\t\t\t\tprogram\n\t\t\t});\n\t\t\treturn;\n\t\t}\n\t\tconst dirs = resolveDirs(options.name, options.dirs);\n\t\tapplyDisplayGlobals(options.display);\n\t\tconst [runtimeError, runtime] = await createRuntime({\n\t\t\targv: [String(argv.$0), ...rawTokens],\n\t\t\tdirs,\n\t\t\tdisplay: options.display,\n\t\t\tlog: options.log,\n\t\t\tmiddleware: options.middleware,\n\t\t\tname: options.name,\n\t\t\tprompts: options.prompts,\n\t\t\tstatus: options.status,\n\t\t\tversion\n\t\t});\n\t\tif (runtimeError) return runtimeError;\n\t\tconst [executeError] = await runtime.execute({\n\t\t\tcommandPath: resolved.ref.commandPath,\n\t\t\thandler: resolved.ref.handler,\n\t\t\tmiddleware: resolved.ref.middleware,\n\t\t\toptions: resolved.ref.options,\n\t\t\tpositionals: resolved.ref.positionals,\n\t\t\trawArgs: argv,\n\t\t\trender: resolved.ref.render\n\t\t});\n\t\treturn executeError;\n\t});\n\tif (uncaughtError) {\n\t\texitOnError(uncaughtError);\n\t\treturn;\n\t}\n\tif (result) exitOnError(result);\n}\nconst VERSION_ERROR = /* @__PURE__ */ new Error(\"No CLI version available. Either pass `version` to cli() or build with the kidd bundler.\");\nconst VersionSchema = z.string().trim().min(1);\n/**\n* Resolve the CLI version from an explicit value or the compile-time constant.\n*\n* Resolution order:\n* 1. Explicit version string passed to `cli()`\n* 2. `__KIDD_VERSION__` injected by the kidd bundler at build time\n*\n* Returns an error when neither source provides a non-empty version.\n*\n* @private\n* @param explicit - The version string from `CliOptions.version`, if provided.\n* @returns A Result tuple with the resolved version string or an Error.\n*/\nfunction resolveVersion(explicit) {\n\tif (explicit !== void 0) {\n\t\tconst parsed = VersionSchema.safeParse(explicit);\n\t\tif (parsed.success) return ok(parsed.data);\n\t\treturn err(VERSION_ERROR);\n\t}\n\tif (typeof __KIDD_VERSION__ === \"string\") {\n\t\tconst parsed = VersionSchema.safeParse(__KIDD_VERSION__);\n\t\tif (parsed.success) return ok(parsed.data);\n\t}\n\treturn err(VERSION_ERROR);\n}\n/**\n* Resolve the commands option to a {@link ResolvedCommands}.\n*\n* Accepts a directory string (triggers autoload), a static CommandMap,\n* a Promise<CommandMap>, a structured {@link CommandsConfig},\n* or undefined (loads `kidd.config.ts` and autoloads from its `commands` field,\n* falling back to `'./commands'`).\n*\n* @private\n* @param commands - The commands option from CliOptions.\n* @returns Resolved commands with optional order, or undefined.\n*/\nasync function resolveCommands(commands) {\n\treturn match(commands).when(isString, async (dir) => ({ commands: await autoload({ dir }) })).with(P.instanceOf(Promise), async (p) => ({ commands: await p })).when(isCommandsConfig, (cfg) => resolveCommandsConfig(cfg)).when(isPlainObject, (cmds) => ({ commands: cmds })).otherwise(() => resolveCommandsFromConfig());\n}\n/**\n* Resolve a structured {@link CommandsConfig} into a flat command map.\n*\n* When `path` is provided, autoloads from that directory. Otherwise uses the\n* inline `commands` map (resolved if it is a promise).\n*\n* @private\n* @param config - The structured commands configuration.\n* @returns Resolved commands.\n*/\nasync function resolveCommandsConfig(config) {\n\tconst { path, commands: innerCommands } = config;\n\treturn { commands: await match(innerCommands).when(() => isString(path), async () => autoload({ dir: path })).with(P.instanceOf(Promise), async (p) => p).when(isPlainObject, (cmds) => cmds).otherwise(() => ({})) };\n}\n/**\n* Load `kidd.config.ts` and autoload commands from its `commands` field.\n*\n* Falls back to `'./commands'` when the config file is missing, fails to load,\n* or does not specify a `commands` field.\n*\n* @private\n* @returns A CommandMap autoloaded from the configured commands directory.\n*/\nasync function resolveCommandsFromConfig() {\n\tconst DEFAULT_COMMANDS_DIR = \"./commands\";\n\tconst { loadConfig } = await import(\"@kidd-cli/config/utils\");\n\tconst [configError, configResult] = await loadConfig();\n\tif (configError || !configResult) return { commands: await autoload({ dir: DEFAULT_COMMANDS_DIR }) };\n\treturn { commands: await autoload({ dir: configResult.config.commands ?? DEFAULT_COMMANDS_DIR }) };\n}\n/**\n* Change the process working directory when `--cwd` is provided.\n*\n* Resolves the value to an absolute path and calls `process.chdir()` so\n* that all downstream `process.cwd()` calls reflect the override.\n*\n* @private\n* @param argv - The parsed argv record from yargs.\n*/\nfunction applyCwd(argv) {\n\tif (isString(argv.cwd)) process.chdir(resolve(argv.cwd));\n}\n/**\n* Show help output when no command was matched.\n*\n* Prints the header (if configured) above the yargs help text. Skipped when\n* `--help` was explicitly passed, since yargs already handles that case.\n*\n* @private\n* @param params - The argv, commands, help options, and yargs program instance.\n*/\nfunction showNoCommandHelp({ argv, commands, help, program }) {\n\tif (!commands) return;\n\tif (argv.help) return;\n\tconst header = extractHeader(help);\n\tif (header) {\n\t\tconsole.log(header);\n\t\tconsole.log();\n\t}\n\tprogram.showHelp(\"log\");\n}\n/**\n* Extract the header string from help options.\n*\n* @private\n* @param help - The help options, possibly undefined.\n* @returns The header string or undefined.\n*/\nfunction extractHeader(help) {\n\tif (!help) return;\n\treturn help.header;\n}\n/**\n* Extract the footer string from help options.\n*\n* @private\n* @param help - The help options, possibly undefined.\n* @returns The footer string or undefined.\n*/\nfunction extractFooter(help) {\n\tif (!help) return;\n\treturn help.footer;\n}\n/**\n* Resolve directory config into a {@link ResolvedDirs} with defaults.\n*\n* Both `local` and `global` default to `.<name>` when not provided.\n*\n* @private\n* @param name - The CLI name used to derive defaults.\n* @param dirs - Optional user-provided directory overrides.\n* @returns Resolved dirs with both local and global guaranteed.\n*/\nfunction resolveDirs(name, dirs) {\n\tconst defaultDir = `.${name}`;\n\tif (isNil(dirs)) return {\n\t\tglobal: defaultDir,\n\t\tlocal: defaultDir\n\t};\n\treturn {\n\t\tglobal: match(dirs.global).with(P.nullish, () => defaultDir).when(isEmptyString, () => defaultDir).otherwise((v) => v),\n\t\tlocal: match(dirs.local).with(P.nullish, () => defaultDir).when(isEmptyString, () => defaultDir).otherwise((v) => v)\n\t};\n}\n/**\n* Check whether a value is an empty string (after trimming whitespace).\n*\n* @private\n* @param value - The value to check.\n* @returns True when the value is an empty or whitespace-only string.\n*/\nfunction isEmptyString(value) {\n\treturn value.trim().length === 0;\n}\n/**\n* Apply display config settings that can only be set globally via clack's `updateSettings()`.\n*\n* Only `aliases` and `messages` require global application. All other\n* display config values (including `guide`) are injected per-call by the\n* context factories.\n*\n* @private\n* @param display - The display config from CliOptions, if any.\n*/\nfunction applyDisplayGlobals(display) {\n\tif (display === void 0) return;\n\tconst hasAliases = display.aliases !== void 0;\n\tconst hasMessages = display.messages !== void 0;\n\tif (!hasAliases && !hasMessages) return;\n\tupdateSettings({\n\t\taliases: display.aliases,\n\t\tmessages: display.messages\n\t});\n}\n//#endregion\nexport { autoload as i, cli_exports as n, command as r, cli as t };\n\n//# sourceMappingURL=cli-9sfQca7V.js.map","import { withTag } from \"@kidd-cli/utils/tag\";\n//#region src/context/decorate.ts\n/**\n* Add a typed, immutable property to a context instance.\n*\n* Middleware authors use this to extend ctx with custom properties.\n* Pair with module augmentation on CommandContext for type safety:\n*\n* ```ts\n* declare module '@kidd-cli/core' {\n*   interface CommandContext {\n*     readonly github: HttpClient\n*   }\n* }\n* ```\n*\n* **Note:** This function mutates the context object via\n* `Object.defineProperty`. The added property is non-writable and\n* non-configurable, making it effectively frozen after assignment.\n* Mutation is intentional here — the context is assembled incrementally\n* across middleware, and copying the entire object on each decoration\n* would break the single-reference threading model used by the runner.\n*\n* @param ctx - The context instance to decorate (mutated in place).\n* @param key - The property name.\n* @param value - The property value (frozen after assignment).\n* @returns The same ctx reference, now carrying the new property.\n*/\nfunction decorateContext(ctx, key, value) {\n\tObject.defineProperty(ctx, key, {\n\t\tconfigurable: false,\n\t\tenumerable: true,\n\t\tvalue,\n\t\twritable: false\n\t});\n\treturn ctx;\n}\n//#endregion\n//#region src/middleware.ts\n/**\n* Create a typed middleware that runs before command handlers.\n*\n* Use the generic parameter to declare context variables the middleware provides.\n* The handler's `ctx` type in downstream commands will include these variables.\n*\n* @param handler - The middleware function receiving ctx and next.\n* @returns A Middleware object for use in the cli() or command() middleware stack.\n*\n* @example\n* ```ts\n* const loadUser = middleware<{ Variables: { user: User } }>(async (ctx, next) => {\n*   decorateContext(ctx, 'user', await fetchUser())\n*   await next()\n* })\n* ```\n*/\nfunction middleware(handler) {\n\treturn withTag({ handler }, \"Middleware\");\n}\n//#endregion\nexport { decorateContext as n, middleware as t };\n\n//# sourceMappingURL=middleware-BlwaZw6v.js.map","import { i as autoload, r as command, t as cli } from \"./cli-9sfQca7V.js\";\nimport { n as decorateContext, t as middleware } from \"./middleware-BlwaZw6v.js\";\nimport { c as useScreenContext } from \"./store-key-fUtc4MNq.js\";\nimport { n as renderToString, r as screen, t as render } from \"./render-BsTEEL-N.js\";\nimport { defineConfig } from \"@kidd-cli/config\";\n//#region src/compose.ts\n/**\n* Compose multiple middleware into a single middleware.\n*\n* Executes each middleware in order, threading `next()` through the chain.\n* The final `next()` call from the last composed middleware continues to\n* the downstream middleware or command handler.\n*\n* The returned middleware's type merges all `Variables` from the input tuple,\n* so downstream handlers see the combined context.\n*\n* @param middlewares - An ordered tuple of middleware to compose.\n* @returns A single Middleware whose Variables is the intersection of all input Variables.\n*\n* @example\n* ```ts\n* const combined = compose([auth({ strategies: [auth.env()] }), auth.require()])\n* ```\n*/\nfunction compose(middlewares) {\n\treturn middleware((ctx, next) => executeChain(middlewares, 0, ctx, next));\n}\n/**\n* Recursively execute middleware in order, calling next() after the last one.\n*\n* @private\n* @param middlewares - The middleware array.\n* @param index - Current position in the array.\n* @param ctx - The context object.\n* @param next - The downstream next function.\n*/\nasync function executeChain(middlewares, index, ctx, next) {\n\tif (index >= middlewares.length) {\n\t\tawait next();\n\t\treturn;\n\t}\n\tconst mw = middlewares[index];\n\tif (mw === void 0) {\n\t\tawait next();\n\t\treturn;\n\t}\n\tawait mw.handler(ctx, () => executeChain(middlewares, index + 1, ctx, next));\n}\n//#endregion\nexport { autoload, cli, command, compose, decorateContext, defineConfig, middleware, render, renderToString, screen, useScreenContext };\n\n//# sourceMappingURL=index.js.map","import { middleware } from '@kidd-cli/core'\n\nimport { reportCrash, writeFatalToStderr } from '../lib/crash-reporter.ts'\n\n/**\n * Create an error boundary middleware that catches unhandled exceptions\n * from command handlers, writes a crash log, and exits with a fatal message.\n *\n * Must be registered as the **first** middleware in the `cli()` stack so\n * it wraps the entire handler chain.\n *\n * @returns A kidd-cli Middleware instance\n */\nexport function errorBoundary(): ReturnType<typeof middleware> {\n  return middleware(async (ctx, next) => {\n    try {\n      await next()\n    } catch (error) {\n      const commandPath = ctx.meta.command.join(' ')\n      const result = reportCrash({\n        error,\n        source: 'middleware',\n        command: commandPath || undefined,\n        args: ctx.args as Record<string, unknown>,\n        version: ctx.meta.version,\n      })\n\n      writeFatalToStderr(result)\n      process.exit(1)\n    }\n  })\n}\n","// oxlint-disable-next-line import/no-unassigned-import -- side-effect: installs globalThis.require for ESM compat\nimport './shims/require.ts'\nimport { cli } from '@kidd-cli/core'\n\nimport build from './commands/build.ts'\nimport check from './commands/check.ts'\nimport cleanCmd from './commands/clean.ts'\nimport dev from './commands/dev.ts'\nimport diff from './commands/diff.ts'\nimport draft from './commands/draft.ts'\nimport dump from './commands/dump.ts'\nimport serve from './commands/serve.ts'\nimport setup from './commands/setup.ts'\nimport sync from './commands/sync.ts'\nimport templates from './commands/templates.ts'\nimport { reportCrash, writeFatalToStderr } from './lib/crash-reporter.ts'\nimport { errorBoundary } from './middleware/error-boundary.ts'\n\ndeclare const __KIDD_VERSION__: string\n\n// oxlint-disable-next-line jest/require-hook -- CLI entry point, not a test file\nprocess.on('uncaughtException', (error) => {\n  handleProcessCrash({ error, source: 'uncaughtException' })\n})\n\n// oxlint-disable-next-line jest/require-hook -- CLI entry point, not a test file\nprocess.on('unhandledRejection', (reason) => {\n  handleProcessCrash({ error: reason, source: 'unhandledRejection' })\n})\n\nawait cli({\n  name: 'ciderpress',\n  version: __KIDD_VERSION__,\n  description: 'CLI for building and serving documentation',\n  middleware: [errorBoundary()],\n  commands: {\n    build,\n    check,\n    clean: cleanCmd,\n    dev,\n    diff,\n    draft,\n    dump,\n    serve,\n    setup,\n    sync,\n    templates,\n  },\n  help: {\n    order: [\n      'setup',\n      'dev',\n      'build',\n      'serve',\n      'sync',\n      'check',\n      'diff',\n      'draft',\n      'templates',\n      'clean',\n      'dump',\n    ],\n  },\n})\n\n/**\n * Handle a process-level crash (uncaughtException / unhandledRejection).\n *\n * @private\n * @param params - The caught error and which process event caught it\n */\nfunction handleProcessCrash(params: {\n  readonly error: unknown\n  readonly source: 'uncaughtException' | 'unhandledRejection'\n}): void {\n  const result = reportCrash({\n    error: params.error,\n    source: params.source,\n    version: resolveVersion(),\n  })\n\n  writeFatalToStderr(result)\n  process.exit(1)\n}\n\n/**\n * Resolve the CLI version string at runtime, falling back to 'unknown' if the\n * bundler constant is not available (e.g. in process-level crash handlers).\n *\n * @private\n * @returns The version string\n */\nfunction resolveVersion(): string {\n  if (typeof __KIDD_VERSION__ === 'string') {\n    return __KIDD_VERSION__\n  }\n  return 'unknown'\n}\n"],"x_google_ignoreList":[1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,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,103,104,105,106,107,108,125,126,127,128,129,130,131,132,133,134,135,136,137,138,139,140,141,142,143,144,145,146,147,148,149,150,151,152],"mappings":";;q/HAYA,WAAW,UAAY,EAAc,OAAO,KAAK,IAAI,CCHrD,SAASA,GAAQ,EAAO,CAEvB,OADI,aAAiB,MAAc,EACxB,MAAM,OAAO,EAAM,CAAC,CAIhC,SAAS,GAAG,EAAO,CAClB,MAAO,CAAC,KAAM,EAAM,CAYrB,SAAS,GAAI,EAAO,CACnB,MAAO,CAACA,GAAQ,EAAM,CAAE,KAAK,oBC7BktC,SAASC,GAAE,GAAG,EAAE,CA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