oh-my-agent 20.24.0 → 20.25.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/bin/cli-main.js +4 -4
- package/package.json +1 -1
package/bin/cli-main.js
CHANGED
|
@@ -24,7 +24,7 @@ Expecting one of '${r.join("', '")}'`);if(this._lifeCycleHooks[e])this._lifeCycl
|
|
|
24
24
|
`),this.outputHelp({error:!0});let r=t||{},n=r.exitCode||1,i=r.code||"commander.error";this._exit(n,i,e)}_parseOptionsEnv(){this.options.forEach((e)=>{if(e.envVar&&e.envVar in zr.env){let t=e.attributeName();if(this.getOptionValue(t)===void 0||["default","config","env"].includes(this.getOptionValueSource(t)))if(e.required||e.optional)this.emit(`optionEnv:${e.name()}`,zr.env[e.envVar]);else this.emit(`optionEnv:${e.name()}`)}})}_parseOptionsImplied(){let e=new uK(this.options),t=(r)=>this.getOptionValue(r)!==void 0&&!["default","implied"].includes(this.getOptionValueSource(r));this.options.filter((r)=>r.implied!==void 0&&t(r.attributeName())&&e.valueFromOption(this.getOptionValue(r.attributeName()),r)).forEach((r)=>{Object.keys(r.implied).filter((n)=>!t(n)).forEach((n)=>{this.setOptionValueWithSource(n,r.implied[n],"implied")})})}missingArgument(e){let t=`error: missing required argument '${e}'`;this.error(t,{code:"commander.missingArgument"})}optionMissingArgument(e){let t=`error: option '${e.flags}' argument missing`;this.error(t,{code:"commander.optionMissingArgument"})}missingMandatoryOptionValue(e){let t=`error: required option '${e.flags}' not specified`;this.error(t,{code:"commander.missingMandatoryOptionValue"})}_conflictingOption(e,t){let r=(o)=>{let s=o.attributeName(),a=this.getOptionValue(s),c=this.options.find((u)=>u.negate&&s===u.attributeName()),l=this.options.find((u)=>!u.negate&&s===u.attributeName());if(c&&(c.presetArg===void 0&&a===!1||c.presetArg!==void 0&&a===c.presetArg))return c;return l||o},n=(o)=>{let s=r(o),a=s.attributeName();if(this.getOptionValueSource(a)==="env")return`environment variable '${s.envVar}'`;return`option '${s.flags}'`},i=`error: ${n(e)} cannot be used with ${n(t)}`;this.error(i,{code:"commander.conflictingOption"})}unknownOption(e){if(this._allowUnknownOption)return;let t="";if(e.startsWith("--")&&this._showSuggestionAfterError){let n=[],i=this;do{let o=i.createHelp().visibleOptions(i).filter((s)=>s.long).map((s)=>s.long);n=n.concat(o),i=i.parent}while(i&&!i._enablePositionalOptions);t=pK(e,n)}let r=`error: unknown option '${e}'${t}`;this.error(r,{code:"commander.unknownOption"})}_excessArguments(e){if(this._allowExcessArguments)return;let t=this.registeredArguments.length,r=t===1?"":"s",n=e.length,i=this.parent?` for '${this.name()}'`:"",o=e.join(", "),s=`error: too many arguments${i}. Expected ${t} argument${r} but got ${n}: ${o}.`;this.error(s,{code:"commander.excessArguments"})}unknownCommand(){let e=this.args[0],t="";if(this._showSuggestionAfterError){let n=[];this.createHelp().visibleCommands(this).forEach((i)=>{if(n.push(i.name()),i.alias())n.push(i.alias())}),t=pK(e,n)}let r=`error: unknown command '${e}'${t}`;this.error(r,{code:"commander.unknownCommand"})}version(e,t,r){if(e===void 0)return this._version;this._version=e,t=t||"-V, --version",r=r||"output the version number";let n=this.createOption(t,r);return this._versionOptionName=n.attributeName(),this._registerOption(n),this.on("option:"+n.name(),()=>{this._outputConfiguration.writeOut(`${e}
|
|
25
25
|
`),this._exit(0,"commander.version",e)}),this}description(e,t){if(e===void 0&&t===void 0)return this._description;if(this._description=e,t)this._argsDescription=t;return this}summary(e){if(e===void 0)return this._summary;return this._summary=e,this}alias(e){if(e===void 0)return this._aliases[0];let t=this;if(this.commands.length!==0&&this.commands[this.commands.length-1]._executableHandler)t=this.commands[this.commands.length-1];if(e===t._name)throw Error("Command alias can't be the same as its name");let r=this.parent?._findCommand(e);if(r){let n=[r.name()].concat(r.aliases()).join("|");throw Error(`cannot add alias '${e}' to command '${this.name()}' as already have command '${n}'`)}return t._aliases.push(e),this}aliases(e){if(e===void 0)return this._aliases;return e.forEach((t)=>this.alias(t)),this}usage(e){if(e===void 0){if(this._usage)return this._usage;let t=this.registeredArguments.map((r)=>rT(r));return[].concat(this.options.length||this._helpOption!==null?"[options]":[],this.commands.length?"[command]":[],this.registeredArguments.length?t:[]).join(" ")}return this._usage=e,this}name(e){if(e===void 0)return this._name;return this._name=e,this}helpGroup(e){if(e===void 0)return this._helpGroupHeading??"";return this._helpGroupHeading=e,this}commandsGroup(e){if(e===void 0)return this._defaultCommandGroup??"";return this._defaultCommandGroup=e,this}optionsGroup(e){if(e===void 0)return this._defaultOptionGroup??"";return this._defaultOptionGroup=e,this}_initOptionGroup(e){if(this._defaultOptionGroup&&!e.helpGroupHeading)e.helpGroup(this._defaultOptionGroup)}_initCommandGroup(e){if(this._defaultCommandGroup&&!e.helpGroup())e.helpGroup(this._defaultCommandGroup)}nameFromFilename(e){return this._name=U4.basename(e,U4.extname(e)),this}executableDir(e){if(e===void 0)return this._executableDir;return this._executableDir=e,this}helpInformation(e){let t=this.createHelp(),r=this._getOutputContext(e);t.prepareContext({error:r.error,helpWidth:r.helpWidth,outputHasColors:r.hasColors});let n=t.formatHelp(this,t);if(r.hasColors)return n;return this._outputConfiguration.stripColor(n)}_getOutputContext(e){e=e||{};let t=!!e.error,r,n,i;if(t)r=(s)=>this._outputConfiguration.writeErr(s),n=this._outputConfiguration.getErrHasColors(),i=this._outputConfiguration.getErrHelpWidth();else r=(s)=>this._outputConfiguration.writeOut(s),n=this._outputConfiguration.getOutHasColors(),i=this._outputConfiguration.getOutHelpWidth();return{error:t,write:(s)=>{if(!n)s=this._outputConfiguration.stripColor(s);return r(s)},hasColors:n,helpWidth:i}}outputHelp(e){let t;if(typeof e==="function")t=e,e=void 0;let r=this._getOutputContext(e),n={error:r.error,write:r.write,command:this};this._getCommandAndAncestors().reverse().forEach((o)=>o.emit("beforeAllHelp",n)),this.emit("beforeHelp",n);let i=this.helpInformation({error:r.error});if(t){if(i=t(i),typeof i!=="string"&&!Buffer.isBuffer(i))throw Error("outputHelp callback must return a string or a Buffer")}if(r.write(i),this._getHelpOption()?.long)this.emit(this._getHelpOption().long);this.emit("afterHelp",n),this._getCommandAndAncestors().forEach((o)=>o.emit("afterAllHelp",n))}helpOption(e,t){if(typeof e==="boolean"){if(e){if(this._helpOption===null)this._helpOption=void 0;if(this._defaultOptionGroup)this._initOptionGroup(this._getHelpOption())}else this._helpOption=null;return this}if(this._helpOption=this.createOption(e??"-h, --help",t??"display help for command"),e||t)this._initOptionGroup(this._helpOption);return this}_getHelpOption(){if(this._helpOption===void 0)this.helpOption(void 0,void 0);return this._helpOption}addHelpOption(e){return this._helpOption=e,this._initOptionGroup(e),this}help(e){this.outputHelp(e);let t=Number(zr.exitCode??0);if(t===0&&e&&typeof e!=="function"&&e.error)t=1;this._exit(t,"commander.help","(outputHelp)")}addHelpText(e,t){let r=["beforeAll","before","after","afterAll"];if(!r.includes(e))throw Error(`Unexpected value for position to addHelpText.
|
|
26
26
|
Expecting one of '${r.join("', '")}'`);let n=`${e}Help`;return this.on(n,(i)=>{let o;if(typeof t==="function")o=t({error:i.error,command:i.command});else o=t;if(o)i.write(`${o}
|
|
27
|
-
`)}),this}_outputHelpIfRequested(e){let t=this._getHelpOption();if(t&&e.find((n)=>t.is(n)))this.outputHelp(),this._exit(0,"commander.helpDisplayed","(outputHelp)")}}});var Ren;var e3=v(()=>{nT();S9e();hk();lK();dK();Ren=new o5});var H4;var gk=v(()=>{H4={name:"oh-my-agent",version:"20.24.0",description:"Agent skills and specialist teams for Claude Code, Codex, Cursor and other coding agents. Load one skill or install domain presets, project hooks and parallel workflows with test gates.",type:"module",bin:{"oh-my-agent":"./bin/cli.js",oma:"./bin/cli.js"},files:["bin","assets/serena"],keywords:["oh-my-agent","antigravity",".agents","agent","skills","agent-skills","multi-agent","orchestrator","claude","claude-code","codex","opencode","copilot","cursor","chatgpt","pm","frontend","backend","mobile","qa","debug","terraform","database","workflow","bug-fixing"],author:"our.first.fluke <our.first.fluke@gmail.com>",contributors:["gracefullight <gracefullight.dev@gmail.com>","gahyun-git <go4it.gh@gmail.com>"],license:"MIT",funding:[{type:"github",url:"https://github.com/sponsors/first-fluke"},{type:"buymeacoffee",url:"https://buymeacoffee.com/firstfluke"}],scripts:{"sync:readme":"node ./scripts/sync-readme.mjs","generate:skill-data":"node ./scripts/generate-skill-data.mjs",build:"bun run generate:skill-data && bun run sync:readme && bun build cli.ts --outfile bin/cli-main.js --target node --minify --external @napi-rs/keyring --external jsonc-parser && node ./scripts/write-bin-entry.mjs && bun run check:bundle",dev:"bun run generate:skill-data && bun run cli.ts",lint:"biome check .","lint:fix":"biome check --write --unsafe .","check:boundaries":"node ./scripts/check-boundaries.mjs","check:bundle":"node ./scripts/check-bundle.mjs","check:emit-drift":"node ./scripts/check-emit-drift.mjs","check:repo-archive":"node ./scripts/check-repo-archive.mjs",test:"vitest run","test:coverage":"vitest run --coverage",prepublishOnly:"bun run build"},dependencies:{"@clack/prompts":"^1.7.0","@dagrejs/dagre":"^3.1.1","@date-fns/tz":"^1.5.0","@napi-rs/keyring":"^1.3.0",axios:"^1.18.1","better-sqlite3":"^13.0.2",chokidar:"^5.0.0",commander:"^15.0.0","date-fns":"^4.4.0",eld:"^2.0.3","fast-xml-parser":"^5.10.1","jsonc-parser":"^3.3.1",minimatch:"^10.2.6","p-map":"^7.0.6",picocolors:"^1.1.1","puppeteer-core":"^25.4.0",remark:"^15.0.1","remark-frontmatter":"^5.0.0","remark-gfm":"^4.0.1","remark-parse":"^11.0.0","smol-toml":"^1.7.1",unified:"^11.0.5",ws:"^8.21.1",yaml:"^2.9.0",zod:"^4.4.3"},optionalDependencies:{pptxgenjs:"^4.0.1"},devDependencies:{"@babel/parser":"7.29.3","@biomejs/biome":"^2.5.6","@types/better-sqlite3":"^7.6.13","@types/mdast":"^4.0.4","@types/node":"^26.1.2","@types/ws":"^8.18.1","@vitest/coverage-v8":"^4.1.10",typescript:"^7.0.2",vitest:"^4.1.10"},repository:{type:"git",url:"https://github.com/first-fluke/oh-my-agent"},homepage:"https://firstfluke.com/oh-my-agent",bugs:{url:"https://github.com/first-fluke/oh-my-agent/issues"},antigravity:{skillsPath:".agents/skills",skills:["oma-architecture","oma-brainstorm","oma-coordination","oma-pm","oma-frontend","oma-backend","oma-db","oma-mobile","oma-qa","oma-debug","oma-orchestration","oma-dev-workflow","oma-tf-infra","oma-scm","oma-pdf","oma-recap"]}}});import{homedir as E9e}from"node:os";import{isAbsolute as hEt,join as gEt,resolve as yEt}from"node:path";function $9e(e,t){let r=Array.from(e).some((n)=>{let i=n.charCodeAt(0);return i<32||i===127});if(!hEt(e)||r)throw Error(`${t} must be an absolute path without control characters`);return yEt(e)}function Yr(e=process.env,t=E9e()){return $9e(e.OMA_HOME||gEt(t,".oma"),"OMA_HOME")}function Cs(e=process.env,t=E9e()){return e.OMA_STATE_HOME===void 0?Yr(e,t):$9e(e.OMA_STATE_HOME,"OMA_STATE_HOME")}var sT=()=>{};import{homedir as vEt}from"node:os";import{join as yk}from"node:path";function $c(e=process.env,t=vEt()){let r=Yr(e,t),n=yk(r,"state");return{home:r,definitions:yk(r,".agents"),state:n,serena:yk(n,"serena"),schedule:yk(r,"schedule"),backup:yk(r,"backup")}}var gi=v(()=>{sT();sT()});import*as s5 from"node:fs";import{homedir as bEt}from"node:os";import*as Fl from"node:path";function _9e(e){if(aT)throw Error("install context already set in this process");aT=e}function R9e(){if(aT===null)throw Error("install context not set — entry point must call setInstallContext()");return aT}function G4(){return R9e().installRoot}function ti(){return R9e().mode}function wt(){try{return ti()}catch{return"project"}}function v6(){try{return G4()}catch{return process.cwd()}}function cT(e,t,r=bEt()){return t==="project"&&Fl.resolve(e)===Fl.resolve(r)}function T9e(e){if(e.global===!0||process.env.OMA_INSTALL_GLOBAL==="1"){let r=Yr();return kEt(r),{installRoot:r,mode:"global"}}return{installRoot:process.cwd(),mode:"project"}}function kEt(e){if(!Fl.isAbsolute(e))throw Error("OMA_HOME must be absolute path");for(let n of C9e)if(e===n||e.startsWith(n+Fl.sep))throw Error(`OMA_HOME=${e} is forbidden (system path ${n})`);let t,r=Fl.resolve(e);try{while(!s5.existsSync(r)){let n=Fl.dirname(r);if(n===r)break;r=n}if(t=s5.realpathSync(r),!s5.statSync(t).isDirectory())throw Error("nearest existing ancestor is not a directory")}catch(n){let i=n instanceof Error?n.message:String(n);throw Error(`OMA_HOME=${e}: ${i}`)}for(let n of C9e)if(t===n||t.startsWith(n+Fl.sep))throw Error(`OMA_HOME=${e} is forbidden (system path ${n})`);try{s5.accessSync(t,s5.constants.W_OK)}catch{throw Error(`OMA_HOME=${e} is not writable`)}}var aT=null,C9e;var yi=v(()=>{gi();C9e=["/etc","/usr","/bin","/boot","/sys","/proc"]});import{join as $Et}from"node:path";function r3(e){return e.endsWith("/")?e:`${e}/`}function $2(e,t){let r=t.split("/").filter((n)=>n.length>0);return $Et(e,...r)}var dr=".agents",t3,jn,t1,Ken,Jen,Yen,CEt=".antigravitycli",I9e,_Et=".migration-backup",REt="docs/plans",TEt=".qwen/tmp",PEt,IEt,OEt,MEt,DEt,jEt,LEt,mK;var Xr=v(()=>{t3=`${dr}/skills`,jn=`${dr}/results`,t1=`${dr}/state`,Ken=`${t1}/sessions`,Jen=`${t1}/retry`,Yen=`${t1}/archive`,I9e=`${dr}/backup`;PEt=r3(jn),IEt=r3(t1),OEt=r3(CEt),MEt=r3(I9e),DEt=r3(_Et),jEt=r3(REt),LEt=r3(TEt),mK=[".agents/oma-config.local.cue",".agents/oma-config.local.yaml",OEt,PEt,IEt,MEt,jEt,DEt,LEt]});var Zr="first-fluke/oh-my-agent",Kt,zl,hK,NEt,FEt,W4,ri;var C2=v(()=>{Xr();Kt=t3,zl=["antigravity","claude","codex","commandcode","cursor","grok","kimi","kiro","qwen"],hK=["pi","opencode"],NEt=["copilot","hermes"],FEt=["zcode"],W4=[...zl,...hK,...NEt,...FEt].sort(),ri={antigravity:{projectPath:".gemini/antigravity-cli/skills",homePath:".gemini/antigravity-cli/skills",requiresHomeConsent:!0},claude:{projectPath:".claude/skills",homePath:".claude/skills"},codex:{projectPath:".codex/skills",homePath:".codex/skills"},commandcode:{projectPath:".commandcode/skills",homePath:".commandcode/skills",optIn:!0},copilot:{projectPath:".github/skills",homePath:".copilot/skills"},cursor:{projectPath:".cursor/skills",homePath:".cursor/skills"},hermes:{projectPath:".hermes/skills/oma",homePath:".hermes/skills/oma",requiresHomeConsent:!0},kimi:{projectPath:".kimi-code/skills",homePath:".kimi-code/skills",requiresHomeConsent:!0,optIn:!0},kiro:{projectPath:".kiro/skills",homePath:".kiro/skills",optIn:!0},opencode:{projectPath:".opencode/skills",homePath:".opencode/skills"},qwen:{projectPath:".qwen/skills",homePath:".qwen/skills"}}});function pe(e,t="Output as JSON"){return e.option("--json",t).option("--output <format>","Output format (text/json)",(r)=>{let n=r.trim().toLowerCase();if(!vk.includes(n))throw Error(`Invalid output format: ${r}. Expected one of ${vk.join(", ")}`);return n})}function zEt(e){if(e?.json)return"json";let t=e?.output?.trim().toLowerCase();if(t&&vk.includes(t))return t;if(process.env[D9e]?.trim().toLowerCase()==="json")return"json";return"text"}function fe(e){return zEt(e)==="json"}function j9e(e){let t=e.at(-1);return t instanceof o5?t:null}function BEt(e){let t=j9e(e);if(t)return t.opts();let r=e.at(-1);return r&&typeof r==="object"?r:{}}function UEt(e){if(e instanceof Error)return e.message;return String(e)}function r1(e){throw Error(e)}function yK(e,t){for(let r of e){let n=r.charCodeAt(0);if(n>=0&&n<=31||n===127)r1(`${t} must not contain control characters`)}}function HEt(e,t){if(yK(e,t),/[?#%]/.test(e))r1(`${t} must not contain ?, #, or %`);if(e.includes(".."))r1(`${t} must not contain '..'`)}function GEt(e,t){yK(e,t);try{new URL(e)}catch{r1(`${t} must be a valid absolute URL`)}}function gK(e,t,r="text"){if(typeof e==="string"){if(r==="identifier"){HEt(e,t);return}if(r==="url"){GEt(e,t);return}yK(e,t);return}if(Array.isArray(e))for(let[n,i]of e.entries())gK(i,`${t}[${n}]`,r)}function M9e(e){let t=e.toLowerCase();if(t==="url"||t.endsWith("url"))return"url";if(t.includes("id")||t.includes("type")||t.includes("vendor")||t.includes("session"))return"identifier";return"text"}function WEt(e){let t=e.vendor;if(typeof t==="string"){if(t.split(",").map((o)=>o.trim()).filter(Boolean).filter((o)=>!W4.includes(o)).length>0)r1(`vendor must be one of ${W4.join(", ")}`)}let r=e.output;if(typeof r==="string"&&!vk.includes(r))r1(`output must be one of ${vk.join(", ")}`)}function VEt(e){let t=e.processedArgs??e.args??[];(e.registeredArguments??[]).forEach((i,o)=>{let s=i.name?.()||String(o),a=t[o];if(gK(a,s,M9e(s)),s==="agent-type"&&typeof a==="string"&&!O9e.includes(a))r1(`agent-type must be one of ${O9e.join(", ")}`)});let n=e.opts();WEt(n);for(let[i,o]of Object.entries(n))gK(o,i,M9e(i))}function qEt(e){return(e.registeredArguments??[]).map((t)=>({name:t.name?.()||"",required:!!t.required,variadic:!!t.variadic}))}function KEt(e){return e.options.map((t)=>({flags:t.flags,long:t.long||void 0,short:t.short||void 0,description:t.description||"",required:!!t.required||!!t.mandatory,optional:!!t.optional,defaultValue:t.defaultValue}))}function L9e(e){let t=[],r=e;while(r?.parent)t.unshift(r.name()),r=r.parent;return t.join(" ")}function JEt(e){return e.options.some((t)=>t.long==="--json"||t.long==="--output")}function YEt(e){return e.options.some((t)=>t.long==="--dry-run")}function N9e(e){return{name:e.name(),path:L9e(e),summary:e.summary()||void 0,description:e.description(),arguments:qEt(e),options:KEt(e),supportsJsonOutput:JEt(e),supportsDryRun:YEt(e),subcommands:e.commands.filter((t)=>!t._hidden).map((t)=>N9e(t))}}function XEt(e,t){if(!t?.trim())return e;let r=t.trim(),n=[...e.commands];while(n.length>0){let i=n.shift();if(!i)continue;if(i.name()===r||L9e(i)===r)return i;n.push(...i.commands)}return null}function F9e(e,t){let r=XEt(e,t);if(!r)r1(`Unknown command: ${t}`);let n={name:e.name(),version:e.version(),description:e.description(),env:{[D9e]:"Set to json to force machine-readable output on commands that support it."},command:N9e(r)};console.log(JSON.stringify(n,null,2))}function Y(e,t={}){return async(...r)=>{let n=j9e(r);if(n&&r.length>=2)r[r.length-2]=n.optsWithGlobals();let i=BEt(r);try{if(n)VEt(n);await e(...r)}catch(o){let s=UEt(o);if(t.supportsJsonOutput&&fe(i))console.log(JSON.stringify({error:s},null,2));else console.error(s);let a=o&&typeof o==="object"&&"exitCode"in o?o.exitCode:void 0;process.exitCode=typeof a==="number"&&Number.isInteger(a)&&a>0&&a<=255?a:1}}}var D9e="OH_MY_AG_OUTPUT_FORMAT",vk,O9e;var Ct=v(()=>{e3();C2();vk=["text","json"],O9e=["backend","frontend","mobile","qa","debug","pm"]});var pa,a5;var vK=v(()=>{pa={domain:[{name:"oma-architecture",desc:"Evaluate system boundaries and architectural tradeoffs. Use for architecture decisions, design reviews, and ADRs."},{name:"oma-backend",desc:"Implement server APIs, authentication, and application data access. Schema modeling and query tuning use oma-db."},{name:"oma-db",desc:"Design schemas and migrations, tune queries, or plan vector retrieval and database operations. Application API implementation uses oma-backend."},{name:"oma-frontend",desc:"Implement or modify web UI in React, Next.js, or Angular. Use for components, pages, styles, forms, and frontend state or data flows."},{name:"oma-mobile",desc:"Implement Flutter, React Native, native Swift, or native Kotlin Android apps. Use for mobile screens, widgets, platform integrations, and application data flows."}],design:[{name:"oma-design",desc:"Define or review a visual system, DESIGN.md, or redesign direction. Use for typography, layout, color, motion, and interaction design decisions."}],coordination:[{name:"oma-brainstorm",desc:"Explore goals, constraints, and alternative approaches before choosing a design. Use when the user requests ideation or design exploration."},{name:"oma-coordination",desc:"Coordinate assigned specialist tasks and handoffs manually. Use when supervising a multi-agent project step by step."},{name:"oma-orchestration",desc:"Dispatch and supervise parallel specialist agents with durable task state. Use when automated multi-agent execution is requested."},{name:"oma-pm",desc:"Turn product requirements into scoped tasks with dependencies and acceptance criteria. Use for implementation planning and prioritization."},{name:"oma-qa",desc:"Review changes for correctness, security, accessibility, and performance. Use for scoped quality reviews or verification plans; bug fixes use oma-debug."}],utility:[{name:"oma-academic-writing",desc:"Draft and revise academic prose against a rubric, evidence, and citation requirements. Use for essays, reports, literature reviews, or academic style audits."},{name:"oma-debug",desc:"Diagnose a reproducible failure, fix its cause, and verify the regression. Use for crashes, incorrect behavior, and failing tests."},{name:"oma-docs",desc:"Check documentation references, sync docs to code changes, and detect translation drift. Use for documentation maintenance in a repository."},{name:"oma-explanation",desc:"Create an offline HTML explanation of a code change (diff, PR, branch) or of a topic, system, or question. Use when a visual walkthrough document is requested."},{name:"oma-hwp",desc:"Convert Hangul HWP, HWPX, or HWPML documents to Markdown with kordoc. Use for text, table, and image extraction from these formats."},{name:"oma-image",desc:"Generate raster images or reference-guided variations through the OMA image CLI. Use for image assets or explicit vendor comparisons; pixel editing uses an editor."},{name:"oma-market",desc:"Research customer pain points, trends, and competitors through the OMA market engine. Use for market discovery or voice-of-customer analysis."},{name:"oma-pdf",desc:"Extract PDF text, headings, tables, and images into Markdown using opendataloader-pdf. Use for PDF parsing, not PDF layout creation."},{name:"oma-recap",desc:"Summarize AI conversation histories for a specified date or period. Use for daily work recaps and cross-tool activity summaries."},{name:"oma-refactor",desc:"Restructure existing code while preserving observable behavior. Use for targeted technical debt or hotspot work with characterization tests."},{name:"oma-scholar",desc:"Search academic literature and generate, validate, or compare Knows paper sidecars. Use for claim/evidence analysis and literature synthesis."},{name:"oma-scm",desc:"Manage Git branches, merges, conflicts, commits, and release baselines. Use for repository history and change-management operations."},{name:"oma-search",desc:"Find external documentation, web sources, or remote code with citations. Local code navigation uses the configured code tools."},{name:"oma-security",desc:"Scan application source, agent skills, and MCP components; run penetration tests against scoped web test deployments, validate findings, and configure scan gates. Use oma-qa for broad quality reviews and domain skills for remediation."},{name:"oma-skill-creation",desc:"Create or revise OMA skills and their references. Use for skill routing, execution contracts, conditional loading, and authoring validation."},{name:"oma-slide",desc:"Create, import, revise, or export presentation decks through the OMA slide CLI or the ppt-master route. Use for HTML slides, editable PPTX, and PDF, PNG, or PPTX deck delivery."},{name:"oma-translation",desc:"Translate or revise localized UI strings and prose while preserving meaning, terminology, placeholders, and structure."},{name:"oma-video",desc:"Create videos through the OMA video CLI, or analyze and edit existing clips with media tools. Use for frame extraction, visual analysis, silence cuts, dubbing assembly, scripts, and composition; audio-only work uses oma-voice."},{name:"oma-voice",desc:"Generate or transcribe speech with Voicebox, or process existing audio locally. Use for narration, transcripts, timed speech, and loudness conversion; video editing uses oma-video."}],infrastructure:[{name:"oma-dev-workflow",desc:"Configure development tasks, git hooks, CI/CD, or release automation. Use when creating or fixing a repository development workflow."},{name:"oma-observability",desc:"Design or troubleshoot telemetry, SLOs, and incident diagnostics. Route to the relevant signal, system boundary, or vendor guide."},{name:"oma-tf-infra",desc:"Create or review Terraform infrastructure and plans. Use for cloud resources, IAM, networking, state management, and infrastructure changes."}]},a5={security:["oma-security","oma-architecture","oma-qa","oma-debug","oma-refactor","oma-scm"],fullstack:["oma-architecture","oma-brainstorm","oma-design","oma-frontend","oma-backend","oma-mobile","oma-db","oma-pm","oma-qa","oma-debug","oma-scm","oma-tf-infra","oma-dev-workflow"],"fullstack-web":["oma-architecture","oma-brainstorm","oma-design","oma-frontend","oma-backend","oma-db","oma-pm","oma-qa","oma-debug","oma-scm","oma-dev-workflow"],"fullstack-mobile":["oma-architecture","oma-brainstorm","oma-design","oma-mobile","oma-backend","oma-db","oma-pm","oma-qa","oma-debug","oma-scm","oma-dev-workflow"],frontend:["oma-architecture","oma-brainstorm","oma-design","oma-frontend","oma-pm","oma-qa","oma-debug","oma-scm"],backend:["oma-architecture","oma-brainstorm","oma-backend","oma-db","oma-pm","oma-qa","oma-debug","oma-scm","oma-dev-workflow"],mobile:["oma-architecture","oma-brainstorm","oma-mobile","oma-pm","oma-qa","oma-debug","oma-scm"],devops:["oma-architecture","oma-brainstorm","oma-tf-infra","oma-dev-workflow","oma-observability","oma-pm","oma-qa","oma-debug","oma-scm"],research:["oma-scholar","oma-market","oma-pdf","oma-hwp","oma-academic-writing","oma-search","oma-translation","oma-scm"],content:["oma-design","oma-image","oma-voice","oma-academic-writing","oma-translation","oma-scm"],all:[...pa.domain,...pa.design,...pa.coordination,...pa.utility,...pa.infrastructure].map((e)=>e.name)}});var fa=v(()=>{Xr();vK();C2()});function ne(e,t,r){function n(a,c){if(!a._zod)Object.defineProperty(a,"_zod",{value:{def:c,constr:s,traits:new Set},enumerable:!1});if(a._zod.traits.has(e))return;a._zod.traits.add(e),t(a,c);let l=s.prototype,u=Object.keys(l);for(let d=0;d<u.length;d++){let p=u[d];if(!(p in a))a[p]=l[p].bind(a)}}let i=r?.Parent??Object;class o extends i{}Object.defineProperty(o,"name",{value:e});function s(a){var c;let l=r?.Parent?new o:this;n(l,a),(c=l._zod).deferred??(c.deferred=[]);for(let u of l._zod.deferred)u();return l}return Object.defineProperty(s,"init",{value:n}),Object.defineProperty(s,Symbol.hasInstance,{value:(a)=>{if(r?.Parent&&a instanceof r.Parent)return!0;return a?._zod?.traits?.has(e)}}),Object.defineProperty(s,"name",{value:e}),s}function _2(e){if(e)Object.assign(b6,e);return b6}var z9e,ctn,V4,bk,b6;var n3=v(()=>{ctn=Symbol("zod_brand");V4=class V4 extends Error{constructor(){super("Encountered Promise during synchronous parse. Use .parseAsync() instead.")}};bk=class bk extends Error{constructor(e){super(`Encountered unidirectional transform during encode: ${e}`);this.name="ZodEncodeError"}};(z9e=globalThis).__zod_globalConfig??(z9e.__zod_globalConfig={});b6=globalThis.__zod_globalConfig});function uT(e){let t=Object.values(e).filter((n)=>typeof n==="number");return Object.entries(e).filter(([n,i])=>t.indexOf(+n)===-1).map(([n,i])=>i)}function kK(e,t="|"){return e.map((r)=>SK(r)).join(t)}function wk(e,t){if(typeof t==="bigint")return t.toString();return t}function dT(e){return{get value(){{let r=e();return Object.defineProperty(this,"value",{value:r}),r}throw Error("cached value already set")}}}function pT(e){return e===null||e===void 0}function fT(e){let t=e.startsWith("^")?1:0,r=e.endsWith("$")?e.length-1:e.length;return e.slice(t,r)}function U9e(e,t){let r=e/t,n=Math.round(r),i=Number.EPSILON*Math.max(Math.abs(r),1);if(Math.abs(r-n)<i)return 0;return r-n}function gr(e,t,r){let n=void 0;Object.defineProperty(e,t,{get(){if(n===B9e)return;if(n===void 0)n=B9e,n=r();return n},set(i){Object.defineProperty(e,t,{value:i})},configurable:!0})}function i3(e,t,r){Object.defineProperty(e,t,{value:r,writable:!0,enumerable:!0,configurable:!0})}function n1(...e){let t={};for(let r of e){let n=Object.getOwnPropertyDescriptors(r);Object.assign(t,n)}return Object.defineProperties({},t)}function wK(e){return JSON.stringify(e)}function H9e(e){return e.toLowerCase().trim().replace(/[^\w\s-]/g,"").replace(/[\s_-]+/g,"-").replace(/^-+|-+$/g,"")}function kk(e){return typeof e==="object"&&e!==null&&!Array.isArray(e)}function o3(e){if(kk(e)===!1)return!1;let t=e.constructor;if(t===void 0)return!0;if(typeof t!=="function")return!0;let r=t.prototype;if(kk(r)===!1)return!1;if(Object.prototype.hasOwnProperty.call(r,"isPrototypeOf")===!1)return!1;return!0}function AK(e){if(o3(e))return{...e};if(Array.isArray(e))return[...e];if(e instanceof Map)return new Map(e);if(e instanceof Set)return new Set(e);return e}function i1(e){return e.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}function c5(e,t,r){let n=new e._zod.constr(t??e._zod.def);if(!t||r?.parent)n._zod.parent=e;return n}function Ve(e){let t=e;if(!t)return{};if(typeof t==="string")return{error:()=>t};if(t?.message!==void 0){if(t?.error!==void 0)throw Error("Cannot specify both `message` and `error` params");t.error=t.message}if(delete t.message,typeof t.error==="string")return{...t,error:()=>t.error};return t}function SK(e){if(typeof e==="bigint")return e.toString()+"n";if(typeof e==="string")return`"${e}"`;return`${e}`}function V9e(e){return Object.keys(e).filter((t)=>e[t]._zod.optin==="optional"&&e[t]._zod.optout==="optional")}function ZEt(e,t){let r=e._zod.def,n=r.checks;if(n&&n.length>0)throw Error(".pick() cannot be used on object schemas containing refinements");let o=n1(e._zod.def,{get shape(){let s={};for(let a in t){if(!(a in r.shape))throw Error(`Unrecognized key: "${a}"`);if(!t[a])continue;s[a]=r.shape[a]}return i3(this,"shape",s),s},checks:[]});return c5(e,o)}function QEt(e,t){let r=e._zod.def,n=r.checks;if(n&&n.length>0)throw Error(".omit() cannot be used on object schemas containing refinements");let o=n1(e._zod.def,{get shape(){let s={...e._zod.def.shape};for(let a in t){if(!(a in r.shape))throw Error(`Unrecognized key: "${a}"`);if(!t[a])continue;delete s[a]}return i3(this,"shape",s),s},checks:[]});return c5(e,o)}function e$t(e,t){if(!o3(t))throw Error("Invalid input to extend: expected a plain object");let r=e._zod.def.checks;if(r&&r.length>0){let o=e._zod.def.shape;for(let s in t)if(Object.getOwnPropertyDescriptor(o,s)!==void 0)throw Error("Cannot overwrite keys on object schemas containing refinements. Use `.safeExtend()` instead.")}let i=n1(e._zod.def,{get shape(){let o={...e._zod.def.shape,...t};return i3(this,"shape",o),o}});return c5(e,i)}function t$t(e,t){if(!o3(t))throw Error("Invalid input to safeExtend: expected a plain object");let r=n1(e._zod.def,{get shape(){let n={...e._zod.def.shape,...t};return i3(this,"shape",n),n}});return c5(e,r)}function r$t(e,t){if(e._zod.def.checks?.length)throw Error(".merge() cannot be used on object schemas containing refinements. Use .safeExtend() instead.");let r=n1(e._zod.def,{get shape(){let n={...e._zod.def.shape,...t._zod.def.shape};return i3(this,"shape",n),n},get catchall(){return t._zod.def.catchall},checks:t._zod.def.checks??[]});return c5(e,r)}function n$t(e,t,r){let i=t._zod.def.checks;if(i&&i.length>0)throw Error(".partial() cannot be used on object schemas containing refinements");let s=n1(t._zod.def,{get shape(){let a=t._zod.def.shape,c={...a};if(r)for(let l in r){if(!(l in a))throw Error(`Unrecognized key: "${l}"`);if(!r[l])continue;c[l]=e?new e({type:"optional",innerType:a[l]}):a[l]}else for(let l in a)c[l]=e?new e({type:"optional",innerType:a[l]}):a[l];return i3(this,"shape",c),c},checks:[]});return c5(t,s)}function i$t(e,t,r){let n=n1(t._zod.def,{get shape(){let i=t._zod.def.shape,o={...i};if(r)for(let s in r){if(!(s in o))throw Error(`Unrecognized key: "${s}"`);if(!r[s])continue;o[s]=new e({type:"nonoptional",innerType:i[s]})}else for(let s in i)o[s]=new e({type:"nonoptional",innerType:i[s]});return i3(this,"shape",o),o}});return c5(t,n)}function s3(e,t=0){if(e.aborted===!0)return!0;for(let r=t;r<e.issues.length;r++)if(e.issues[r]?.continue!==!0)return!0;return!1}function K9e(e,t=0){if(e.aborted===!0)return!0;for(let r=t;r<e.issues.length;r++)if(e.issues[r]?.continue===!1)return!0;return!1}function o1(e,t){return t.map((r)=>{var n;return(n=r).path??(n.path=[]),r.path.unshift(e),r})}function lT(e){return typeof e==="string"?e:e?.message}function Bl(e,t,r){let n=e.message?e.message:lT(e.inst?._zod.def?.error?.(e))??lT(t?.error?.(e))??lT(r.customError?.(e))??lT(r.localeError?.(e))??"Invalid input",{inst:i,continue:o,input:s,...a}=e;if(a.path??(a.path=[]),a.message=n,t?.reportInput)a.input=s;return a}function mT(e){if(Array.isArray(e))return"array";if(typeof e==="string")return"string";return"unknown"}function J9e(e){let t=typeof e;switch(t){case"number":return Number.isNaN(e)?"nan":"number";case"object":{if(e===null)return"null";if(Array.isArray(e))return"array";let r=e;if(r&&Object.getPrototypeOf(r)!==Object.prototype&&"constructor"in r&&r.constructor)return r.constructor.name}}return t}function a3(...e){let[t,r,n]=e;if(typeof t==="string")return{message:t,code:"custom",input:r,inst:n};return{...t}}var B9e,xK,G9e,W9e,q9e;var Ul=v(()=>{n3();B9e=Symbol("evaluating");xK="captureStackTrace"in Error?Error.captureStackTrace:(...e)=>{};G9e=dT(()=>{if(b6.jitless)return!1;if(typeof navigator<"u"&&navigator?.userAgent?.includes("Cloudflare"))return!1;try{return new Function(""),!0}catch(e){return!1}});W9e=new Set(["string","number","symbol"]);q9e={safeint:[Number.MIN_SAFE_INTEGER,Number.MAX_SAFE_INTEGER],int32:[-2147483648,2147483647],uint32:[0,4294967295],float32:[-340282346638528860000000000000000000000,340282346638528860000000000000000000000],float64:[-Number.MAX_VALUE,Number.MAX_VALUE]}});function X9e(e,t=(r)=>r.message){let r={},n=[];for(let i of e.issues)if(i.path.length>0)r[i.path[0]]=r[i.path[0]]||[],r[i.path[0]].push(t(i));else n.push(t(i));return{formErrors:n,fieldErrors:r}}function Z9e(e,t=(r)=>r.message){let r={_errors:[]},n=(i,o=[])=>{for(let s of i.issues)if(s.code==="invalid_union"&&s.errors.length)s.errors.map((a)=>n({issues:a},[...o,...s.path]));else if(s.code==="invalid_key")n({issues:s.issues},[...o,...s.path]);else if(s.code==="invalid_element")n({issues:s.issues},[...o,...s.path]);else{let a=[...o,...s.path];if(a.length===0)r._errors.push(t(s));else{let c=r,l=0;while(l<a.length){let u=a[l];if(l!==a.length-1)c[u]=c[u]||{_errors:[]};else c[u]=c[u]||{_errors:[]},c[u]._errors.push(t(s));c=c[u],l++}}}};return n(e),r}var Y9e=(e,t)=>{e.name="$ZodError",Object.defineProperty(e,"_zod",{value:e._zod,enumerable:!1}),Object.defineProperty(e,"issues",{value:t,enumerable:!1}),e.message=JSON.stringify(t,wk,2),Object.defineProperty(e,"toString",{value:()=>e.message,enumerable:!1})},hT,EK;var $K=v(()=>{n3();Ul();hT=ne("$ZodError",Y9e),EK=ne("$ZodError",Y9e,{Parent:Error})});var gT=(e)=>(t,r,n,i)=>{let o=n?{...n,async:!1}:{async:!1},s=t._zod.run({value:r,issues:[]},o);if(s instanceof Promise)throw new V4;if(s.issues.length){let a=new(i?.Err??e)(s.issues.map((c)=>Bl(c,o,_2())));throw xK(a,i?.callee),a}return s.value},yT=(e)=>async(t,r,n,i)=>{let o=n?{...n,async:!0}:{async:!0},s=t._zod.run({value:r,issues:[]},o);if(s instanceof Promise)s=await s;if(s.issues.length){let a=new(i?.Err??e)(s.issues.map((c)=>Bl(c,o,_2())));throw xK(a,i?.callee),a}return s.value},xk=(e)=>(t,r,n)=>{let i=n?{...n,async:!1}:{async:!1},o=t._zod.run({value:r,issues:[]},i);if(o instanceof Promise)throw new V4;return o.issues.length?{success:!1,error:new(e??hT)(o.issues.map((s)=>Bl(s,i,_2())))}:{success:!0,data:o.value}},Q9e,Ak=(e)=>async(t,r,n)=>{let i=n?{...n,async:!0}:{async:!0},o=t._zod.run({value:r,issues:[]},i);if(o instanceof Promise)o=await o;return o.issues.length?{success:!1,error:new e(o.issues.map((s)=>Bl(s,i,_2())))}:{success:!0,data:o.value}},eye,tye=(e)=>(t,r,n)=>{let i=n?{...n,direction:"backward"}:{direction:"backward"};return gT(e)(t,r,i)},rye=(e)=>(t,r,n)=>gT(e)(t,r,n),nye=(e)=>async(t,r,n)=>{let i=n?{...n,direction:"backward"}:{direction:"backward"};return yT(e)(t,r,i)},iye=(e)=>async(t,r,n)=>yT(e)(t,r,n),oye=(e)=>(t,r,n)=>{let i=n?{...n,direction:"backward"}:{direction:"backward"};return xk(e)(t,r,i)},sye=(e)=>(t,r,n)=>xk(e)(t,r,n),aye=(e)=>async(t,r,n)=>{let i=n?{...n,direction:"backward"}:{direction:"backward"};return Ak(e)(t,r,i)},cye=(e)=>async(t,r,n)=>Ak(e)(t,r,n);var CK=v(()=>{n3();$K();Ul();Q9e=xk(EK),eye=Ak(EK)});function vye(){return new RegExp(s$t,"u")}function _ye(e){return typeof e.precision==="number"?e.precision===-1?"(?:[01]\\d|2[0-3]):[0-5]\\d":e.precision===0?"(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d":`(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d\\.\\d{${e.precision}}`:"(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?"}function Rye(e){return new RegExp(`^${_ye(e)}$`)}function Tye(e){let t=_ye({precision:e.precision}),r=["Z"];if(e.local)r.push("");if(e.offset)r.push("([+-](?:[01]\\d|2[0-3]):[0-5]\\d)");let n=`${t}(?:${r.join("|")})`;return new RegExp(`^${$ye}T(?:${n})$`)}var lye,uye,dye,pye,fye,mye,hye,gye,_K=(e)=>{if(!e)return/^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$/;return new RegExp(`^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-${e}[0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12})$`)},yye,s$t="^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$",bye,kye,wye,xye,Aye,RK,Sye,Eye,$ye="(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))",Cye,Pye=(e)=>{let t=e?`[\\s\\S]{${e?.minimum??0},${e?.maximum??""}}`:"[\\s\\S]*";return new RegExp(`^${t}$`)},Iye,TK,Oye,Mye,Dye,jye;var bT=v(()=>{lye=/^[cC][0-9a-z]{6,}$/,uye=/^[0-9a-z]+$/,dye=/^[0-9A-HJKMNP-TV-Za-hjkmnp-tv-z]{26}$/,pye=/^[0-9a-vA-V]{20}$/,fye=/^[A-Za-z0-9]{27}$/,mye=/^[a-zA-Z0-9_-]{21}$/,hye=/^P(?:(\d+W)|(?!.*W)(?=\d|T\d)(\d+Y)?(\d+M)?(\d+D)?(T(?=\d)(\d+H)?(\d+M)?(\d+([.,]\d+)?S)?)?)$/,gye=/^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$/,yye=/^(?!\.)(?!.*\.\.)([A-Za-z0-9_'+\-\.]*)[A-Za-z0-9_+-]@([A-Za-z0-9][A-Za-z0-9\-]*\.)+[A-Za-z]{2,}$/;bye=/^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])$/,kye=/^(([0-9a-fA-F]{1,4}:){7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:))$/,wye=/^((25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\/([0-9]|[1-2][0-9]|3[0-2])$/,xye=/^(([0-9a-fA-F]{1,4}:){7}[0-9a-fA-F]{1,4}|::|([0-9a-fA-F]{1,4})?::([0-9a-fA-F]{1,4}:?){0,6})\/(12[0-8]|1[01][0-9]|[1-9]?[0-9])$/,Aye=/^$|^(?:[0-9a-zA-Z+/]{4})*(?:(?:[0-9a-zA-Z+/]{2}==)|(?:[0-9a-zA-Z+/]{3}=))?$/,RK=/^[A-Za-z0-9_-]*$/,Sye=/^https?$/,Eye=/^\+[1-9]\d{6,14}$/,Cye=new RegExp(`^${$ye}$`);Iye=/^-?\d+$/,TK=/^-?\d+(?:\.\d+)?$/,Oye=/^(?:true|false)$/i,Mye=/^null$/i,Dye=/^[^A-Z]*$/,jye=/^[^a-z]*$/});var es,Lye,PK,IK,Nye,Fye,zye,Bye,Uye,Sk,Hye,Gye,Wye,Vye,qye,Kye,Jye;var kT=v(()=>{n3();bT();Ul();es=ne("$ZodCheck",(e,t)=>{var r;e._zod??(e._zod={}),e._zod.def=t,(r=e._zod).onattach??(r.onattach=[])}),Lye={number:"number",bigint:"bigint",object:"date"},PK=ne("$ZodCheckLessThan",(e,t)=>{es.init(e,t);let r=Lye[typeof t.value];e._zod.onattach.push((n)=>{let i=n._zod.bag,o=(t.inclusive?i.maximum:i.exclusiveMaximum)??Number.POSITIVE_INFINITY;if(t.value<o)if(t.inclusive)i.maximum=t.value;else i.exclusiveMaximum=t.value}),e._zod.check=(n)=>{if(t.inclusive?n.value<=t.value:n.value<t.value)return;n.issues.push({origin:r,code:"too_big",maximum:typeof t.value==="object"?t.value.getTime():t.value,input:n.value,inclusive:t.inclusive,inst:e,continue:!t.abort})}}),IK=ne("$ZodCheckGreaterThan",(e,t)=>{es.init(e,t);let r=Lye[typeof t.value];e._zod.onattach.push((n)=>{let i=n._zod.bag,o=(t.inclusive?i.minimum:i.exclusiveMinimum)??Number.NEGATIVE_INFINITY;if(t.value>o)if(t.inclusive)i.minimum=t.value;else i.exclusiveMinimum=t.value}),e._zod.check=(n)=>{if(t.inclusive?n.value>=t.value:n.value>t.value)return;n.issues.push({origin:r,code:"too_small",minimum:typeof t.value==="object"?t.value.getTime():t.value,input:n.value,inclusive:t.inclusive,inst:e,continue:!t.abort})}}),Nye=ne("$ZodCheckMultipleOf",(e,t)=>{es.init(e,t),e._zod.onattach.push((r)=>{var n;(n=r._zod.bag).multipleOf??(n.multipleOf=t.value)}),e._zod.check=(r)=>{if(typeof r.value!==typeof t.value)throw Error("Cannot mix number and bigint in multiple_of check.");if(typeof r.value==="bigint"?r.value%t.value===BigInt(0):U9e(r.value,t.value)===0)return;r.issues.push({origin:typeof r.value,code:"not_multiple_of",divisor:t.value,input:r.value,inst:e,continue:!t.abort})}}),Fye=ne("$ZodCheckNumberFormat",(e,t)=>{es.init(e,t),t.format=t.format||"float64";let r=t.format?.includes("int"),n=r?"int":"number",[i,o]=q9e[t.format];e._zod.onattach.push((s)=>{let a=s._zod.bag;if(a.format=t.format,a.minimum=i,a.maximum=o,r)a.pattern=Iye}),e._zod.check=(s)=>{let a=s.value;if(r){if(!Number.isInteger(a)){s.issues.push({expected:n,format:t.format,code:"invalid_type",continue:!1,input:a,inst:e});return}if(!Number.isSafeInteger(a)){if(a>0)s.issues.push({input:a,code:"too_big",maximum:Number.MAX_SAFE_INTEGER,note:"Integers must be within the safe integer range.",inst:e,origin:n,inclusive:!0,continue:!t.abort});else s.issues.push({input:a,code:"too_small",minimum:Number.MIN_SAFE_INTEGER,note:"Integers must be within the safe integer range.",inst:e,origin:n,inclusive:!0,continue:!t.abort});return}}if(a<i)s.issues.push({origin:"number",input:a,code:"too_small",minimum:i,inclusive:!0,inst:e,continue:!t.abort});if(a>o)s.issues.push({origin:"number",input:a,code:"too_big",maximum:o,inclusive:!0,inst:e,continue:!t.abort})}}),zye=ne("$ZodCheckMaxLength",(e,t)=>{var r;es.init(e,t),(r=e._zod.def).when??(r.when=(n)=>{let i=n.value;return!pT(i)&&i.length!==void 0}),e._zod.onattach.push((n)=>{let i=n._zod.bag.maximum??Number.POSITIVE_INFINITY;if(t.maximum<i)n._zod.bag.maximum=t.maximum}),e._zod.check=(n)=>{let i=n.value;if(i.length<=t.maximum)return;let s=mT(i);n.issues.push({origin:s,code:"too_big",maximum:t.maximum,inclusive:!0,input:i,inst:e,continue:!t.abort})}}),Bye=ne("$ZodCheckMinLength",(e,t)=>{var r;es.init(e,t),(r=e._zod.def).when??(r.when=(n)=>{let i=n.value;return!pT(i)&&i.length!==void 0}),e._zod.onattach.push((n)=>{let i=n._zod.bag.minimum??Number.NEGATIVE_INFINITY;if(t.minimum>i)n._zod.bag.minimum=t.minimum}),e._zod.check=(n)=>{let i=n.value;if(i.length>=t.minimum)return;let s=mT(i);n.issues.push({origin:s,code:"too_small",minimum:t.minimum,inclusive:!0,input:i,inst:e,continue:!t.abort})}}),Uye=ne("$ZodCheckLengthEquals",(e,t)=>{var r;es.init(e,t),(r=e._zod.def).when??(r.when=(n)=>{let i=n.value;return!pT(i)&&i.length!==void 0}),e._zod.onattach.push((n)=>{let i=n._zod.bag;i.minimum=t.length,i.maximum=t.length,i.length=t.length}),e._zod.check=(n)=>{let i=n.value,o=i.length;if(o===t.length)return;let s=mT(i),a=o>t.length;n.issues.push({origin:s,...a?{code:"too_big",maximum:t.length}:{code:"too_small",minimum:t.length},inclusive:!0,exact:!0,input:n.value,inst:e,continue:!t.abort})}}),Sk=ne("$ZodCheckStringFormat",(e,t)=>{var r,n;if(es.init(e,t),e._zod.onattach.push((i)=>{let o=i._zod.bag;if(o.format=t.format,t.pattern)o.patterns??(o.patterns=new Set),o.patterns.add(t.pattern)}),t.pattern)(r=e._zod).check??(r.check=(i)=>{if(t.pattern.lastIndex=0,t.pattern.test(i.value))return;i.issues.push({origin:"string",code:"invalid_format",format:t.format,input:i.value,...t.pattern?{pattern:t.pattern.toString()}:{},inst:e,continue:!t.abort})});else(n=e._zod).check??(n.check=()=>{})}),Hye=ne("$ZodCheckRegex",(e,t)=>{Sk.init(e,t),e._zod.check=(r)=>{if(t.pattern.lastIndex=0,t.pattern.test(r.value))return;r.issues.push({origin:"string",code:"invalid_format",format:"regex",input:r.value,pattern:t.pattern.toString(),inst:e,continue:!t.abort})}}),Gye=ne("$ZodCheckLowerCase",(e,t)=>{t.pattern??(t.pattern=Dye),Sk.init(e,t)}),Wye=ne("$ZodCheckUpperCase",(e,t)=>{t.pattern??(t.pattern=jye),Sk.init(e,t)}),Vye=ne("$ZodCheckIncludes",(e,t)=>{es.init(e,t);let r=i1(t.includes),n=new RegExp(typeof t.position==="number"?`^.{${t.position}}${r}`:r);t.pattern=n,e._zod.onattach.push((i)=>{let o=i._zod.bag;o.patterns??(o.patterns=new Set),o.patterns.add(n)}),e._zod.check=(i)=>{if(i.value.includes(t.includes,t.position))return;i.issues.push({origin:"string",code:"invalid_format",format:"includes",includes:t.includes,input:i.value,inst:e,continue:!t.abort})}}),qye=ne("$ZodCheckStartsWith",(e,t)=>{es.init(e,t);let r=new RegExp(`^${i1(t.prefix)}.*`);t.pattern??(t.pattern=r),e._zod.onattach.push((n)=>{let i=n._zod.bag;i.patterns??(i.patterns=new Set),i.patterns.add(r)}),e._zod.check=(n)=>{if(n.value.startsWith(t.prefix))return;n.issues.push({origin:"string",code:"invalid_format",format:"starts_with",prefix:t.prefix,input:n.value,inst:e,continue:!t.abort})}}),Kye=ne("$ZodCheckEndsWith",(e,t)=>{es.init(e,t);let r=new RegExp(`.*${i1(t.suffix)}$`);t.pattern??(t.pattern=r),e._zod.onattach.push((n)=>{let i=n._zod.bag;i.patterns??(i.patterns=new Set),i.patterns.add(r)}),e._zod.check=(n)=>{if(n.value.endsWith(t.suffix))return;n.issues.push({origin:"string",code:"invalid_format",format:"ends_with",suffix:t.suffix,input:n.value,inst:e,continue:!t.abort})}}),Jye=ne("$ZodCheckOverwrite",(e,t)=>{es.init(e,t),e._zod.check=(r)=>{r.value=t.tx(r.value)}})});class OK{constructor(e=[]){if(this.content=[],this.indent=0,this)this.args=e}indented(e){this.indent+=1,e(this),this.indent-=1}write(e){if(typeof e==="function"){e(this,{execution:"sync"}),e(this,{execution:"async"});return}let r=e.split(`
|
|
27
|
+
`)}),this}_outputHelpIfRequested(e){let t=this._getHelpOption();if(t&&e.find((n)=>t.is(n)))this.outputHelp(),this._exit(0,"commander.helpDisplayed","(outputHelp)")}}});var Ren;var e3=v(()=>{nT();S9e();hk();lK();dK();Ren=new o5});var H4;var gk=v(()=>{H4={name:"oh-my-agent",version:"20.25.0",description:"Agent skills and specialist teams for Claude Code, Codex, Cursor and other coding agents. Load one skill or install domain presets, project hooks and parallel workflows with test gates.",type:"module",bin:{"oh-my-agent":"./bin/cli.js",oma:"./bin/cli.js"},files:["bin","assets/serena"],keywords:["oh-my-agent","antigravity",".agents","agent","skills","agent-skills","multi-agent","orchestrator","claude","claude-code","codex","opencode","copilot","cursor","chatgpt","pm","frontend","backend","mobile","qa","debug","terraform","database","workflow","bug-fixing"],author:"our.first.fluke <our.first.fluke@gmail.com>",contributors:["gracefullight <gracefullight.dev@gmail.com>","gahyun-git <go4it.gh@gmail.com>"],license:"MIT",funding:[{type:"github",url:"https://github.com/sponsors/first-fluke"},{type:"buymeacoffee",url:"https://buymeacoffee.com/firstfluke"}],scripts:{"sync:readme":"node ./scripts/sync-readme.mjs","generate:skill-data":"node ./scripts/generate-skill-data.mjs",build:"bun run generate:skill-data && bun run sync:readme && bun build cli.ts --outfile bin/cli-main.js --target node --minify --external @napi-rs/keyring --external jsonc-parser && node ./scripts/write-bin-entry.mjs && bun run check:bundle",dev:"bun run generate:skill-data && bun run cli.ts",lint:"biome check .","lint:fix":"biome check --write --unsafe .","check:boundaries":"node ./scripts/check-boundaries.mjs","check:bundle":"node ./scripts/check-bundle.mjs","check:emit-drift":"node ./scripts/check-emit-drift.mjs","check:repo-archive":"node ./scripts/check-repo-archive.mjs",test:"vitest run","test:coverage":"vitest run --coverage",prepublishOnly:"bun run build"},dependencies:{"@clack/prompts":"^1.7.0","@dagrejs/dagre":"^3.1.1","@date-fns/tz":"^1.5.0","@napi-rs/keyring":"^1.3.0",axios:"^1.18.1","better-sqlite3":"^13.0.2",chokidar:"^5.0.0",commander:"^15.0.0","date-fns":"^4.4.0",eld:"^2.0.3","fast-xml-parser":"^5.10.1","jsonc-parser":"^3.3.1",minimatch:"^10.2.6","p-map":"^7.0.6",picocolors:"^1.1.1","puppeteer-core":"^25.4.0",remark:"^15.0.1","remark-frontmatter":"^5.0.0","remark-gfm":"^4.0.1","remark-parse":"^11.0.0","smol-toml":"^1.7.1",unified:"^11.0.5",ws:"^8.21.1",yaml:"^2.9.0",zod:"^4.4.3"},optionalDependencies:{pptxgenjs:"^4.0.1"},devDependencies:{"@babel/parser":"7.29.3","@biomejs/biome":"^2.5.6","@types/better-sqlite3":"^7.6.13","@types/mdast":"^4.0.4","@types/node":"^26.1.2","@types/ws":"^8.18.1","@vitest/coverage-v8":"^4.1.10",typescript:"^7.0.2",vitest:"^4.1.10"},repository:{type:"git",url:"https://github.com/first-fluke/oh-my-agent"},homepage:"https://firstfluke.com/oh-my-agent",bugs:{url:"https://github.com/first-fluke/oh-my-agent/issues"},antigravity:{skillsPath:".agents/skills",skills:["oma-architecture","oma-brainstorm","oma-coordination","oma-pm","oma-frontend","oma-backend","oma-db","oma-mobile","oma-qa","oma-debug","oma-orchestration","oma-dev-workflow","oma-tf-infra","oma-scm","oma-pdf","oma-recap"]}}});import{homedir as E9e}from"node:os";import{isAbsolute as hEt,join as gEt,resolve as yEt}from"node:path";function $9e(e,t){let r=Array.from(e).some((n)=>{let i=n.charCodeAt(0);return i<32||i===127});if(!hEt(e)||r)throw Error(`${t} must be an absolute path without control characters`);return yEt(e)}function Yr(e=process.env,t=E9e()){return $9e(e.OMA_HOME||gEt(t,".oma"),"OMA_HOME")}function Cs(e=process.env,t=E9e()){return e.OMA_STATE_HOME===void 0?Yr(e,t):$9e(e.OMA_STATE_HOME,"OMA_STATE_HOME")}var sT=()=>{};import{homedir as vEt}from"node:os";import{join as yk}from"node:path";function $c(e=process.env,t=vEt()){let r=Yr(e,t),n=yk(r,"state");return{home:r,definitions:yk(r,".agents"),state:n,serena:yk(n,"serena"),schedule:yk(r,"schedule"),backup:yk(r,"backup")}}var gi=v(()=>{sT();sT()});import*as s5 from"node:fs";import{homedir as bEt}from"node:os";import*as Fl from"node:path";function _9e(e){if(aT)throw Error("install context already set in this process");aT=e}function R9e(){if(aT===null)throw Error("install context not set — entry point must call setInstallContext()");return aT}function G4(){return R9e().installRoot}function ti(){return R9e().mode}function wt(){try{return ti()}catch{return"project"}}function v6(){try{return G4()}catch{return process.cwd()}}function cT(e,t,r=bEt()){return t==="project"&&Fl.resolve(e)===Fl.resolve(r)}function T9e(e){if(e.global===!0||process.env.OMA_INSTALL_GLOBAL==="1"){let r=Yr();return kEt(r),{installRoot:r,mode:"global"}}return{installRoot:process.cwd(),mode:"project"}}function kEt(e){if(!Fl.isAbsolute(e))throw Error("OMA_HOME must be absolute path");for(let n of C9e)if(e===n||e.startsWith(n+Fl.sep))throw Error(`OMA_HOME=${e} is forbidden (system path ${n})`);let t,r=Fl.resolve(e);try{while(!s5.existsSync(r)){let n=Fl.dirname(r);if(n===r)break;r=n}if(t=s5.realpathSync(r),!s5.statSync(t).isDirectory())throw Error("nearest existing ancestor is not a directory")}catch(n){let i=n instanceof Error?n.message:String(n);throw Error(`OMA_HOME=${e}: ${i}`)}for(let n of C9e)if(t===n||t.startsWith(n+Fl.sep))throw Error(`OMA_HOME=${e} is forbidden (system path ${n})`);try{s5.accessSync(t,s5.constants.W_OK)}catch{throw Error(`OMA_HOME=${e} is not writable`)}}var aT=null,C9e;var yi=v(()=>{gi();C9e=["/etc","/usr","/bin","/boot","/sys","/proc"]});import{join as $Et}from"node:path";function r3(e){return e.endsWith("/")?e:`${e}/`}function $2(e,t){let r=t.split("/").filter((n)=>n.length>0);return $Et(e,...r)}var dr=".agents",t3,jn,t1,Ken,Jen,Yen,CEt=".antigravitycli",I9e,_Et=".migration-backup",REt="docs/plans",TEt=".qwen/tmp",PEt,IEt,OEt,MEt,DEt,jEt,LEt,mK;var Xr=v(()=>{t3=`${dr}/skills`,jn=`${dr}/results`,t1=`${dr}/state`,Ken=`${t1}/sessions`,Jen=`${t1}/retry`,Yen=`${t1}/archive`,I9e=`${dr}/backup`;PEt=r3(jn),IEt=r3(t1),OEt=r3(CEt),MEt=r3(I9e),DEt=r3(_Et),jEt=r3(REt),LEt=r3(TEt),mK=[".agents/oma-config.local.cue",".agents/oma-config.local.yaml",OEt,PEt,IEt,MEt,jEt,DEt,LEt]});var Zr="first-fluke/oh-my-agent",Kt,zl,hK,NEt,FEt,W4,ri;var C2=v(()=>{Xr();Kt=t3,zl=["antigravity","claude","codex","commandcode","cursor","grok","kimi","kiro","qwen"],hK=["pi","opencode"],NEt=["copilot","hermes"],FEt=["zcode"],W4=[...zl,...hK,...NEt,...FEt].sort(),ri={antigravity:{projectPath:".gemini/antigravity-cli/skills",homePath:".gemini/antigravity-cli/skills",requiresHomeConsent:!0},claude:{projectPath:".claude/skills",homePath:".claude/skills"},codex:{projectPath:".codex/skills",homePath:".codex/skills"},commandcode:{projectPath:".commandcode/skills",homePath:".commandcode/skills",optIn:!0},copilot:{projectPath:".github/skills",homePath:".copilot/skills"},cursor:{projectPath:".cursor/skills",homePath:".cursor/skills"},hermes:{projectPath:".hermes/skills/oma",homePath:".hermes/skills/oma",requiresHomeConsent:!0},kimi:{projectPath:".kimi-code/skills",homePath:".kimi-code/skills",requiresHomeConsent:!0,optIn:!0},kiro:{projectPath:".kiro/skills",homePath:".kiro/skills",optIn:!0},opencode:{projectPath:".opencode/skills",homePath:".opencode/skills"},qwen:{projectPath:".qwen/skills",homePath:".qwen/skills"}}});function pe(e,t="Output as JSON"){return e.option("--json",t).option("--output <format>","Output format (text/json)",(r)=>{let n=r.trim().toLowerCase();if(!vk.includes(n))throw Error(`Invalid output format: ${r}. Expected one of ${vk.join(", ")}`);return n})}function zEt(e){if(e?.json)return"json";let t=e?.output?.trim().toLowerCase();if(t&&vk.includes(t))return t;if(process.env[D9e]?.trim().toLowerCase()==="json")return"json";return"text"}function fe(e){return zEt(e)==="json"}function j9e(e){let t=e.at(-1);return t instanceof o5?t:null}function BEt(e){let t=j9e(e);if(t)return t.opts();let r=e.at(-1);return r&&typeof r==="object"?r:{}}function UEt(e){if(e instanceof Error)return e.message;return String(e)}function r1(e){throw Error(e)}function yK(e,t){for(let r of e){let n=r.charCodeAt(0);if(n>=0&&n<=31||n===127)r1(`${t} must not contain control characters`)}}function HEt(e,t){if(yK(e,t),/[?#%]/.test(e))r1(`${t} must not contain ?, #, or %`);if(e.includes(".."))r1(`${t} must not contain '..'`)}function GEt(e,t){yK(e,t);try{new URL(e)}catch{r1(`${t} must be a valid absolute URL`)}}function gK(e,t,r="text"){if(typeof e==="string"){if(r==="identifier"){HEt(e,t);return}if(r==="url"){GEt(e,t);return}yK(e,t);return}if(Array.isArray(e))for(let[n,i]of e.entries())gK(i,`${t}[${n}]`,r)}function M9e(e){let t=e.toLowerCase();if(t==="url"||t.endsWith("url"))return"url";if(t.includes("id")||t.includes("type")||t.includes("vendor")||t.includes("session"))return"identifier";return"text"}function WEt(e){let t=e.vendor;if(typeof t==="string"){if(t.split(",").map((o)=>o.trim()).filter(Boolean).filter((o)=>!W4.includes(o)).length>0)r1(`vendor must be one of ${W4.join(", ")}`)}let r=e.output;if(typeof r==="string"&&!vk.includes(r))r1(`output must be one of ${vk.join(", ")}`)}function VEt(e){let t=e.processedArgs??e.args??[];(e.registeredArguments??[]).forEach((i,o)=>{let s=i.name?.()||String(o),a=t[o];if(gK(a,s,M9e(s)),s==="agent-type"&&typeof a==="string"&&!O9e.includes(a))r1(`agent-type must be one of ${O9e.join(", ")}`)});let n=e.opts();WEt(n);for(let[i,o]of Object.entries(n))gK(o,i,M9e(i))}function qEt(e){return(e.registeredArguments??[]).map((t)=>({name:t.name?.()||"",required:!!t.required,variadic:!!t.variadic}))}function KEt(e){return e.options.map((t)=>({flags:t.flags,long:t.long||void 0,short:t.short||void 0,description:t.description||"",required:!!t.required||!!t.mandatory,optional:!!t.optional,defaultValue:t.defaultValue}))}function L9e(e){let t=[],r=e;while(r?.parent)t.unshift(r.name()),r=r.parent;return t.join(" ")}function JEt(e){return e.options.some((t)=>t.long==="--json"||t.long==="--output")}function YEt(e){return e.options.some((t)=>t.long==="--dry-run")}function N9e(e){return{name:e.name(),path:L9e(e),summary:e.summary()||void 0,description:e.description(),arguments:qEt(e),options:KEt(e),supportsJsonOutput:JEt(e),supportsDryRun:YEt(e),subcommands:e.commands.filter((t)=>!t._hidden).map((t)=>N9e(t))}}function XEt(e,t){if(!t?.trim())return e;let r=t.trim(),n=[...e.commands];while(n.length>0){let i=n.shift();if(!i)continue;if(i.name()===r||L9e(i)===r)return i;n.push(...i.commands)}return null}function F9e(e,t){let r=XEt(e,t);if(!r)r1(`Unknown command: ${t}`);let n={name:e.name(),version:e.version(),description:e.description(),env:{[D9e]:"Set to json to force machine-readable output on commands that support it."},command:N9e(r)};console.log(JSON.stringify(n,null,2))}function Y(e,t={}){return async(...r)=>{let n=j9e(r);if(n&&r.length>=2)r[r.length-2]=n.optsWithGlobals();let i=BEt(r);try{if(n)VEt(n);await e(...r)}catch(o){let s=UEt(o);if(t.supportsJsonOutput&&fe(i))console.log(JSON.stringify({error:s},null,2));else console.error(s);let a=o&&typeof o==="object"&&"exitCode"in o?o.exitCode:void 0;process.exitCode=typeof a==="number"&&Number.isInteger(a)&&a>0&&a<=255?a:1}}}var D9e="OH_MY_AG_OUTPUT_FORMAT",vk,O9e;var Ct=v(()=>{e3();C2();vk=["text","json"],O9e=["backend","frontend","mobile","qa","debug","pm"]});var pa,a5;var vK=v(()=>{pa={domain:[{name:"oma-architecture",desc:"Evaluate system boundaries and architectural tradeoffs. Use for architecture decisions, design reviews, and ADRs."},{name:"oma-backend",desc:"Implement server APIs, authentication, and application data access. Schema modeling and query tuning use oma-db."},{name:"oma-db",desc:"Design schemas and migrations, tune queries, or plan vector retrieval and database operations. Application API implementation uses oma-backend."},{name:"oma-frontend",desc:"Implement or modify web UI in React, Next.js, or Angular. Use for components, pages, styles, forms, and frontend state or data flows."},{name:"oma-mobile",desc:"Implement Flutter, React Native, native Swift, or native Kotlin Android apps. Use for mobile screens, widgets, platform integrations, and application data flows."}],design:[{name:"oma-design",desc:"Define or review a visual system, DESIGN.md, or redesign direction. Use for typography, layout, color, motion, and interaction design decisions."}],coordination:[{name:"oma-brainstorm",desc:"Explore goals, constraints, and alternative approaches before choosing a design. Use when the user requests ideation or design exploration."},{name:"oma-coordination",desc:"Coordinate assigned specialist tasks and handoffs manually. Use when supervising a multi-agent project step by step."},{name:"oma-orchestration",desc:"Dispatch and supervise parallel specialist agents with durable task state. Use when automated multi-agent execution is requested."},{name:"oma-pm",desc:"Turn product requirements into scoped tasks with dependencies and acceptance criteria. Use for implementation planning and prioritization."},{name:"oma-qa",desc:"Review changes for correctness, security, accessibility, and performance. Use for scoped quality reviews or verification plans; bug fixes use oma-debug."}],utility:[{name:"oma-academic-writing",desc:"Draft and revise academic prose against a rubric, evidence, and citation requirements. Use for essays, reports, literature reviews, or academic style audits."},{name:"oma-debug",desc:"Diagnose a reproducible failure, fix its cause, and verify the regression. Use for crashes, incorrect behavior, and failing tests."},{name:"oma-docs",desc:"Check documentation references, sync docs to code changes, and detect translation drift. Use for documentation maintenance in a repository."},{name:"oma-explanation",desc:"Create an offline HTML explanation of a code change (diff, PR, branch) or of a topic, system, or question. Use when a visual walkthrough document is requested."},{name:"oma-hwp",desc:"Convert Hangul HWP, HWPX, or HWPML documents to Markdown with kordoc. Use for text, table, and image extraction from these formats."},{name:"oma-image",desc:"Generate raster images or reference-guided variations through the OMA image CLI. Use for image assets or explicit vendor comparisons; pixel editing uses an editor."},{name:"oma-market",desc:"Research customer pain points, trends, and competitors through the OMA market engine. Use for market discovery or voice-of-customer analysis."},{name:"oma-pdf",desc:"Extract PDF text, headings, tables, and images into Markdown using opendataloader-pdf. Use for PDF parsing, not PDF layout creation."},{name:"oma-recap",desc:"Summarize AI conversation histories for a specified date or period. Use for daily work recaps and cross-tool activity summaries."},{name:"oma-refactor",desc:"Restructure existing code while preserving observable behavior. Use for targeted technical debt or hotspot work with characterization tests."},{name:"oma-scholar",desc:"Search academic literature and generate, validate, or compare Knows paper sidecars. Use for claim/evidence analysis and literature synthesis."},{name:"oma-scm",desc:"Manage Git branches, merges, conflicts, commits, and release baselines. Use for repository history and change-management operations."},{name:"oma-search",desc:"Find external documentation, web sources, or remote code with citations. Local code navigation uses the configured code tools."},{name:"oma-security",desc:"Scan application source, agent skills, and MCP components; run penetration tests against scoped web test deployments, validate findings, and configure scan gates. Use oma-qa for broad quality reviews and domain skills for remediation."},{name:"oma-skill-creation",desc:"Create or revise OMA skills and their references. Use for skill routing, execution contracts, conditional loading, and authoring validation."},{name:"oma-slide",desc:"Create, import, revise, or export presentation decks through the OMA slide CLI or the ppt-master route. Use for HTML slides, editable PPTX, and PDF, PNG, or PPTX deck delivery."},{name:"oma-translation",desc:"Translate or revise localized UI strings and prose while preserving meaning, terminology, placeholders, and structure."},{name:"oma-video",desc:"Create videos through the OMA video CLI, or analyze and edit existing clips with media tools. Use for frame extraction, visual analysis, silence cuts, dubbing assembly, scripts, and composition; audio-only work uses oma-voice."},{name:"oma-voice",desc:"Generate or transcribe speech with Voicebox, or process existing audio locally. Use for narration, transcripts, timed speech, and loudness conversion; video editing uses oma-video."}],infrastructure:[{name:"oma-dev-workflow",desc:"Configure development tasks, git hooks, CI/CD, or release automation. Use when creating or fixing a repository development workflow."},{name:"oma-observability",desc:"Design or troubleshoot telemetry, SLOs, and incident diagnostics. Route to the relevant signal, system boundary, or vendor guide."},{name:"oma-tf-infra",desc:"Create or review Terraform infrastructure and plans. Use for cloud resources, IAM, networking, state management, and infrastructure changes."}]},a5={security:["oma-security","oma-architecture","oma-qa","oma-debug","oma-refactor","oma-scm"],fullstack:["oma-architecture","oma-brainstorm","oma-design","oma-frontend","oma-backend","oma-mobile","oma-db","oma-pm","oma-qa","oma-debug","oma-scm","oma-tf-infra","oma-dev-workflow"],"fullstack-web":["oma-architecture","oma-brainstorm","oma-design","oma-frontend","oma-backend","oma-db","oma-pm","oma-qa","oma-debug","oma-scm","oma-dev-workflow"],"fullstack-mobile":["oma-architecture","oma-brainstorm","oma-design","oma-mobile","oma-backend","oma-db","oma-pm","oma-qa","oma-debug","oma-scm","oma-dev-workflow"],frontend:["oma-architecture","oma-brainstorm","oma-design","oma-frontend","oma-pm","oma-qa","oma-debug","oma-scm"],backend:["oma-architecture","oma-brainstorm","oma-backend","oma-db","oma-pm","oma-qa","oma-debug","oma-scm","oma-dev-workflow"],mobile:["oma-architecture","oma-brainstorm","oma-mobile","oma-pm","oma-qa","oma-debug","oma-scm"],devops:["oma-architecture","oma-brainstorm","oma-tf-infra","oma-dev-workflow","oma-observability","oma-pm","oma-qa","oma-debug","oma-scm"],research:["oma-scholar","oma-market","oma-pdf","oma-hwp","oma-academic-writing","oma-search","oma-translation","oma-scm"],content:["oma-design","oma-image","oma-voice","oma-academic-writing","oma-translation","oma-scm"],all:[...pa.domain,...pa.design,...pa.coordination,...pa.utility,...pa.infrastructure].map((e)=>e.name)}});var fa=v(()=>{Xr();vK();C2()});function ne(e,t,r){function n(a,c){if(!a._zod)Object.defineProperty(a,"_zod",{value:{def:c,constr:s,traits:new Set},enumerable:!1});if(a._zod.traits.has(e))return;a._zod.traits.add(e),t(a,c);let l=s.prototype,u=Object.keys(l);for(let d=0;d<u.length;d++){let p=u[d];if(!(p in a))a[p]=l[p].bind(a)}}let i=r?.Parent??Object;class o extends i{}Object.defineProperty(o,"name",{value:e});function s(a){var c;let l=r?.Parent?new o:this;n(l,a),(c=l._zod).deferred??(c.deferred=[]);for(let u of l._zod.deferred)u();return l}return Object.defineProperty(s,"init",{value:n}),Object.defineProperty(s,Symbol.hasInstance,{value:(a)=>{if(r?.Parent&&a instanceof r.Parent)return!0;return a?._zod?.traits?.has(e)}}),Object.defineProperty(s,"name",{value:e}),s}function _2(e){if(e)Object.assign(b6,e);return b6}var z9e,ctn,V4,bk,b6;var n3=v(()=>{ctn=Symbol("zod_brand");V4=class V4 extends Error{constructor(){super("Encountered Promise during synchronous parse. Use .parseAsync() instead.")}};bk=class bk extends Error{constructor(e){super(`Encountered unidirectional transform during encode: ${e}`);this.name="ZodEncodeError"}};(z9e=globalThis).__zod_globalConfig??(z9e.__zod_globalConfig={});b6=globalThis.__zod_globalConfig});function uT(e){let t=Object.values(e).filter((n)=>typeof n==="number");return Object.entries(e).filter(([n,i])=>t.indexOf(+n)===-1).map(([n,i])=>i)}function kK(e,t="|"){return e.map((r)=>SK(r)).join(t)}function wk(e,t){if(typeof t==="bigint")return t.toString();return t}function dT(e){return{get value(){{let r=e();return Object.defineProperty(this,"value",{value:r}),r}throw Error("cached value already set")}}}function pT(e){return e===null||e===void 0}function fT(e){let t=e.startsWith("^")?1:0,r=e.endsWith("$")?e.length-1:e.length;return e.slice(t,r)}function U9e(e,t){let r=e/t,n=Math.round(r),i=Number.EPSILON*Math.max(Math.abs(r),1);if(Math.abs(r-n)<i)return 0;return r-n}function gr(e,t,r){let n=void 0;Object.defineProperty(e,t,{get(){if(n===B9e)return;if(n===void 0)n=B9e,n=r();return n},set(i){Object.defineProperty(e,t,{value:i})},configurable:!0})}function i3(e,t,r){Object.defineProperty(e,t,{value:r,writable:!0,enumerable:!0,configurable:!0})}function n1(...e){let t={};for(let r of e){let n=Object.getOwnPropertyDescriptors(r);Object.assign(t,n)}return Object.defineProperties({},t)}function wK(e){return JSON.stringify(e)}function H9e(e){return e.toLowerCase().trim().replace(/[^\w\s-]/g,"").replace(/[\s_-]+/g,"-").replace(/^-+|-+$/g,"")}function kk(e){return typeof e==="object"&&e!==null&&!Array.isArray(e)}function o3(e){if(kk(e)===!1)return!1;let t=e.constructor;if(t===void 0)return!0;if(typeof t!=="function")return!0;let r=t.prototype;if(kk(r)===!1)return!1;if(Object.prototype.hasOwnProperty.call(r,"isPrototypeOf")===!1)return!1;return!0}function AK(e){if(o3(e))return{...e};if(Array.isArray(e))return[...e];if(e instanceof Map)return new Map(e);if(e instanceof Set)return new Set(e);return e}function i1(e){return e.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}function c5(e,t,r){let n=new e._zod.constr(t??e._zod.def);if(!t||r?.parent)n._zod.parent=e;return n}function Ve(e){let t=e;if(!t)return{};if(typeof t==="string")return{error:()=>t};if(t?.message!==void 0){if(t?.error!==void 0)throw Error("Cannot specify both `message` and `error` params");t.error=t.message}if(delete t.message,typeof t.error==="string")return{...t,error:()=>t.error};return t}function SK(e){if(typeof e==="bigint")return e.toString()+"n";if(typeof e==="string")return`"${e}"`;return`${e}`}function V9e(e){return Object.keys(e).filter((t)=>e[t]._zod.optin==="optional"&&e[t]._zod.optout==="optional")}function ZEt(e,t){let r=e._zod.def,n=r.checks;if(n&&n.length>0)throw Error(".pick() cannot be used on object schemas containing refinements");let o=n1(e._zod.def,{get shape(){let s={};for(let a in t){if(!(a in r.shape))throw Error(`Unrecognized key: "${a}"`);if(!t[a])continue;s[a]=r.shape[a]}return i3(this,"shape",s),s},checks:[]});return c5(e,o)}function QEt(e,t){let r=e._zod.def,n=r.checks;if(n&&n.length>0)throw Error(".omit() cannot be used on object schemas containing refinements");let o=n1(e._zod.def,{get shape(){let s={...e._zod.def.shape};for(let a in t){if(!(a in r.shape))throw Error(`Unrecognized key: "${a}"`);if(!t[a])continue;delete s[a]}return i3(this,"shape",s),s},checks:[]});return c5(e,o)}function e$t(e,t){if(!o3(t))throw Error("Invalid input to extend: expected a plain object");let r=e._zod.def.checks;if(r&&r.length>0){let o=e._zod.def.shape;for(let s in t)if(Object.getOwnPropertyDescriptor(o,s)!==void 0)throw Error("Cannot overwrite keys on object schemas containing refinements. Use `.safeExtend()` instead.")}let i=n1(e._zod.def,{get shape(){let o={...e._zod.def.shape,...t};return i3(this,"shape",o),o}});return c5(e,i)}function t$t(e,t){if(!o3(t))throw Error("Invalid input to safeExtend: expected a plain object");let r=n1(e._zod.def,{get shape(){let n={...e._zod.def.shape,...t};return i3(this,"shape",n),n}});return c5(e,r)}function r$t(e,t){if(e._zod.def.checks?.length)throw Error(".merge() cannot be used on object schemas containing refinements. Use .safeExtend() instead.");let r=n1(e._zod.def,{get shape(){let n={...e._zod.def.shape,...t._zod.def.shape};return i3(this,"shape",n),n},get catchall(){return t._zod.def.catchall},checks:t._zod.def.checks??[]});return c5(e,r)}function n$t(e,t,r){let i=t._zod.def.checks;if(i&&i.length>0)throw Error(".partial() cannot be used on object schemas containing refinements");let s=n1(t._zod.def,{get shape(){let a=t._zod.def.shape,c={...a};if(r)for(let l in r){if(!(l in a))throw Error(`Unrecognized key: "${l}"`);if(!r[l])continue;c[l]=e?new e({type:"optional",innerType:a[l]}):a[l]}else for(let l in a)c[l]=e?new e({type:"optional",innerType:a[l]}):a[l];return i3(this,"shape",c),c},checks:[]});return c5(t,s)}function i$t(e,t,r){let n=n1(t._zod.def,{get shape(){let i=t._zod.def.shape,o={...i};if(r)for(let s in r){if(!(s in o))throw Error(`Unrecognized key: "${s}"`);if(!r[s])continue;o[s]=new e({type:"nonoptional",innerType:i[s]})}else for(let s in i)o[s]=new e({type:"nonoptional",innerType:i[s]});return i3(this,"shape",o),o}});return c5(t,n)}function s3(e,t=0){if(e.aborted===!0)return!0;for(let r=t;r<e.issues.length;r++)if(e.issues[r]?.continue!==!0)return!0;return!1}function K9e(e,t=0){if(e.aborted===!0)return!0;for(let r=t;r<e.issues.length;r++)if(e.issues[r]?.continue===!1)return!0;return!1}function o1(e,t){return t.map((r)=>{var n;return(n=r).path??(n.path=[]),r.path.unshift(e),r})}function lT(e){return typeof e==="string"?e:e?.message}function Bl(e,t,r){let n=e.message?e.message:lT(e.inst?._zod.def?.error?.(e))??lT(t?.error?.(e))??lT(r.customError?.(e))??lT(r.localeError?.(e))??"Invalid input",{inst:i,continue:o,input:s,...a}=e;if(a.path??(a.path=[]),a.message=n,t?.reportInput)a.input=s;return a}function mT(e){if(Array.isArray(e))return"array";if(typeof e==="string")return"string";return"unknown"}function J9e(e){let t=typeof e;switch(t){case"number":return Number.isNaN(e)?"nan":"number";case"object":{if(e===null)return"null";if(Array.isArray(e))return"array";let r=e;if(r&&Object.getPrototypeOf(r)!==Object.prototype&&"constructor"in r&&r.constructor)return r.constructor.name}}return t}function a3(...e){let[t,r,n]=e;if(typeof t==="string")return{message:t,code:"custom",input:r,inst:n};return{...t}}var B9e,xK,G9e,W9e,q9e;var Ul=v(()=>{n3();B9e=Symbol("evaluating");xK="captureStackTrace"in Error?Error.captureStackTrace:(...e)=>{};G9e=dT(()=>{if(b6.jitless)return!1;if(typeof navigator<"u"&&navigator?.userAgent?.includes("Cloudflare"))return!1;try{return new Function(""),!0}catch(e){return!1}});W9e=new Set(["string","number","symbol"]);q9e={safeint:[Number.MIN_SAFE_INTEGER,Number.MAX_SAFE_INTEGER],int32:[-2147483648,2147483647],uint32:[0,4294967295],float32:[-340282346638528860000000000000000000000,340282346638528860000000000000000000000],float64:[-Number.MAX_VALUE,Number.MAX_VALUE]}});function X9e(e,t=(r)=>r.message){let r={},n=[];for(let i of e.issues)if(i.path.length>0)r[i.path[0]]=r[i.path[0]]||[],r[i.path[0]].push(t(i));else n.push(t(i));return{formErrors:n,fieldErrors:r}}function Z9e(e,t=(r)=>r.message){let r={_errors:[]},n=(i,o=[])=>{for(let s of i.issues)if(s.code==="invalid_union"&&s.errors.length)s.errors.map((a)=>n({issues:a},[...o,...s.path]));else if(s.code==="invalid_key")n({issues:s.issues},[...o,...s.path]);else if(s.code==="invalid_element")n({issues:s.issues},[...o,...s.path]);else{let a=[...o,...s.path];if(a.length===0)r._errors.push(t(s));else{let c=r,l=0;while(l<a.length){let u=a[l];if(l!==a.length-1)c[u]=c[u]||{_errors:[]};else c[u]=c[u]||{_errors:[]},c[u]._errors.push(t(s));c=c[u],l++}}}};return n(e),r}var Y9e=(e,t)=>{e.name="$ZodError",Object.defineProperty(e,"_zod",{value:e._zod,enumerable:!1}),Object.defineProperty(e,"issues",{value:t,enumerable:!1}),e.message=JSON.stringify(t,wk,2),Object.defineProperty(e,"toString",{value:()=>e.message,enumerable:!1})},hT,EK;var $K=v(()=>{n3();Ul();hT=ne("$ZodError",Y9e),EK=ne("$ZodError",Y9e,{Parent:Error})});var gT=(e)=>(t,r,n,i)=>{let o=n?{...n,async:!1}:{async:!1},s=t._zod.run({value:r,issues:[]},o);if(s instanceof Promise)throw new V4;if(s.issues.length){let a=new(i?.Err??e)(s.issues.map((c)=>Bl(c,o,_2())));throw xK(a,i?.callee),a}return s.value},yT=(e)=>async(t,r,n,i)=>{let o=n?{...n,async:!0}:{async:!0},s=t._zod.run({value:r,issues:[]},o);if(s instanceof Promise)s=await s;if(s.issues.length){let a=new(i?.Err??e)(s.issues.map((c)=>Bl(c,o,_2())));throw xK(a,i?.callee),a}return s.value},xk=(e)=>(t,r,n)=>{let i=n?{...n,async:!1}:{async:!1},o=t._zod.run({value:r,issues:[]},i);if(o instanceof Promise)throw new V4;return o.issues.length?{success:!1,error:new(e??hT)(o.issues.map((s)=>Bl(s,i,_2())))}:{success:!0,data:o.value}},Q9e,Ak=(e)=>async(t,r,n)=>{let i=n?{...n,async:!0}:{async:!0},o=t._zod.run({value:r,issues:[]},i);if(o instanceof Promise)o=await o;return o.issues.length?{success:!1,error:new e(o.issues.map((s)=>Bl(s,i,_2())))}:{success:!0,data:o.value}},eye,tye=(e)=>(t,r,n)=>{let i=n?{...n,direction:"backward"}:{direction:"backward"};return gT(e)(t,r,i)},rye=(e)=>(t,r,n)=>gT(e)(t,r,n),nye=(e)=>async(t,r,n)=>{let i=n?{...n,direction:"backward"}:{direction:"backward"};return yT(e)(t,r,i)},iye=(e)=>async(t,r,n)=>yT(e)(t,r,n),oye=(e)=>(t,r,n)=>{let i=n?{...n,direction:"backward"}:{direction:"backward"};return xk(e)(t,r,i)},sye=(e)=>(t,r,n)=>xk(e)(t,r,n),aye=(e)=>async(t,r,n)=>{let i=n?{...n,direction:"backward"}:{direction:"backward"};return Ak(e)(t,r,i)},cye=(e)=>async(t,r,n)=>Ak(e)(t,r,n);var CK=v(()=>{n3();$K();Ul();Q9e=xk(EK),eye=Ak(EK)});function vye(){return new RegExp(s$t,"u")}function _ye(e){return typeof e.precision==="number"?e.precision===-1?"(?:[01]\\d|2[0-3]):[0-5]\\d":e.precision===0?"(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d":`(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d\\.\\d{${e.precision}}`:"(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?"}function Rye(e){return new RegExp(`^${_ye(e)}$`)}function Tye(e){let t=_ye({precision:e.precision}),r=["Z"];if(e.local)r.push("");if(e.offset)r.push("([+-](?:[01]\\d|2[0-3]):[0-5]\\d)");let n=`${t}(?:${r.join("|")})`;return new RegExp(`^${$ye}T(?:${n})$`)}var lye,uye,dye,pye,fye,mye,hye,gye,_K=(e)=>{if(!e)return/^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$/;return new RegExp(`^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-${e}[0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12})$`)},yye,s$t="^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$",bye,kye,wye,xye,Aye,RK,Sye,Eye,$ye="(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))",Cye,Pye=(e)=>{let t=e?`[\\s\\S]{${e?.minimum??0},${e?.maximum??""}}`:"[\\s\\S]*";return new RegExp(`^${t}$`)},Iye,TK,Oye,Mye,Dye,jye;var bT=v(()=>{lye=/^[cC][0-9a-z]{6,}$/,uye=/^[0-9a-z]+$/,dye=/^[0-9A-HJKMNP-TV-Za-hjkmnp-tv-z]{26}$/,pye=/^[0-9a-vA-V]{20}$/,fye=/^[A-Za-z0-9]{27}$/,mye=/^[a-zA-Z0-9_-]{21}$/,hye=/^P(?:(\d+W)|(?!.*W)(?=\d|T\d)(\d+Y)?(\d+M)?(\d+D)?(T(?=\d)(\d+H)?(\d+M)?(\d+([.,]\d+)?S)?)?)$/,gye=/^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$/,yye=/^(?!\.)(?!.*\.\.)([A-Za-z0-9_'+\-\.]*)[A-Za-z0-9_+-]@([A-Za-z0-9][A-Za-z0-9\-]*\.)+[A-Za-z]{2,}$/;bye=/^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])$/,kye=/^(([0-9a-fA-F]{1,4}:){7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:))$/,wye=/^((25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\/([0-9]|[1-2][0-9]|3[0-2])$/,xye=/^(([0-9a-fA-F]{1,4}:){7}[0-9a-fA-F]{1,4}|::|([0-9a-fA-F]{1,4})?::([0-9a-fA-F]{1,4}:?){0,6})\/(12[0-8]|1[01][0-9]|[1-9]?[0-9])$/,Aye=/^$|^(?:[0-9a-zA-Z+/]{4})*(?:(?:[0-9a-zA-Z+/]{2}==)|(?:[0-9a-zA-Z+/]{3}=))?$/,RK=/^[A-Za-z0-9_-]*$/,Sye=/^https?$/,Eye=/^\+[1-9]\d{6,14}$/,Cye=new RegExp(`^${$ye}$`);Iye=/^-?\d+$/,TK=/^-?\d+(?:\.\d+)?$/,Oye=/^(?:true|false)$/i,Mye=/^null$/i,Dye=/^[^A-Z]*$/,jye=/^[^a-z]*$/});var es,Lye,PK,IK,Nye,Fye,zye,Bye,Uye,Sk,Hye,Gye,Wye,Vye,qye,Kye,Jye;var kT=v(()=>{n3();bT();Ul();es=ne("$ZodCheck",(e,t)=>{var r;e._zod??(e._zod={}),e._zod.def=t,(r=e._zod).onattach??(r.onattach=[])}),Lye={number:"number",bigint:"bigint",object:"date"},PK=ne("$ZodCheckLessThan",(e,t)=>{es.init(e,t);let r=Lye[typeof t.value];e._zod.onattach.push((n)=>{let i=n._zod.bag,o=(t.inclusive?i.maximum:i.exclusiveMaximum)??Number.POSITIVE_INFINITY;if(t.value<o)if(t.inclusive)i.maximum=t.value;else i.exclusiveMaximum=t.value}),e._zod.check=(n)=>{if(t.inclusive?n.value<=t.value:n.value<t.value)return;n.issues.push({origin:r,code:"too_big",maximum:typeof t.value==="object"?t.value.getTime():t.value,input:n.value,inclusive:t.inclusive,inst:e,continue:!t.abort})}}),IK=ne("$ZodCheckGreaterThan",(e,t)=>{es.init(e,t);let r=Lye[typeof t.value];e._zod.onattach.push((n)=>{let i=n._zod.bag,o=(t.inclusive?i.minimum:i.exclusiveMinimum)??Number.NEGATIVE_INFINITY;if(t.value>o)if(t.inclusive)i.minimum=t.value;else i.exclusiveMinimum=t.value}),e._zod.check=(n)=>{if(t.inclusive?n.value>=t.value:n.value>t.value)return;n.issues.push({origin:r,code:"too_small",minimum:typeof t.value==="object"?t.value.getTime():t.value,input:n.value,inclusive:t.inclusive,inst:e,continue:!t.abort})}}),Nye=ne("$ZodCheckMultipleOf",(e,t)=>{es.init(e,t),e._zod.onattach.push((r)=>{var n;(n=r._zod.bag).multipleOf??(n.multipleOf=t.value)}),e._zod.check=(r)=>{if(typeof r.value!==typeof t.value)throw Error("Cannot mix number and bigint in multiple_of check.");if(typeof r.value==="bigint"?r.value%t.value===BigInt(0):U9e(r.value,t.value)===0)return;r.issues.push({origin:typeof r.value,code:"not_multiple_of",divisor:t.value,input:r.value,inst:e,continue:!t.abort})}}),Fye=ne("$ZodCheckNumberFormat",(e,t)=>{es.init(e,t),t.format=t.format||"float64";let r=t.format?.includes("int"),n=r?"int":"number",[i,o]=q9e[t.format];e._zod.onattach.push((s)=>{let a=s._zod.bag;if(a.format=t.format,a.minimum=i,a.maximum=o,r)a.pattern=Iye}),e._zod.check=(s)=>{let a=s.value;if(r){if(!Number.isInteger(a)){s.issues.push({expected:n,format:t.format,code:"invalid_type",continue:!1,input:a,inst:e});return}if(!Number.isSafeInteger(a)){if(a>0)s.issues.push({input:a,code:"too_big",maximum:Number.MAX_SAFE_INTEGER,note:"Integers must be within the safe integer range.",inst:e,origin:n,inclusive:!0,continue:!t.abort});else s.issues.push({input:a,code:"too_small",minimum:Number.MIN_SAFE_INTEGER,note:"Integers must be within the safe integer range.",inst:e,origin:n,inclusive:!0,continue:!t.abort});return}}if(a<i)s.issues.push({origin:"number",input:a,code:"too_small",minimum:i,inclusive:!0,inst:e,continue:!t.abort});if(a>o)s.issues.push({origin:"number",input:a,code:"too_big",maximum:o,inclusive:!0,inst:e,continue:!t.abort})}}),zye=ne("$ZodCheckMaxLength",(e,t)=>{var r;es.init(e,t),(r=e._zod.def).when??(r.when=(n)=>{let i=n.value;return!pT(i)&&i.length!==void 0}),e._zod.onattach.push((n)=>{let i=n._zod.bag.maximum??Number.POSITIVE_INFINITY;if(t.maximum<i)n._zod.bag.maximum=t.maximum}),e._zod.check=(n)=>{let i=n.value;if(i.length<=t.maximum)return;let s=mT(i);n.issues.push({origin:s,code:"too_big",maximum:t.maximum,inclusive:!0,input:i,inst:e,continue:!t.abort})}}),Bye=ne("$ZodCheckMinLength",(e,t)=>{var r;es.init(e,t),(r=e._zod.def).when??(r.when=(n)=>{let i=n.value;return!pT(i)&&i.length!==void 0}),e._zod.onattach.push((n)=>{let i=n._zod.bag.minimum??Number.NEGATIVE_INFINITY;if(t.minimum>i)n._zod.bag.minimum=t.minimum}),e._zod.check=(n)=>{let i=n.value;if(i.length>=t.minimum)return;let s=mT(i);n.issues.push({origin:s,code:"too_small",minimum:t.minimum,inclusive:!0,input:i,inst:e,continue:!t.abort})}}),Uye=ne("$ZodCheckLengthEquals",(e,t)=>{var r;es.init(e,t),(r=e._zod.def).when??(r.when=(n)=>{let i=n.value;return!pT(i)&&i.length!==void 0}),e._zod.onattach.push((n)=>{let i=n._zod.bag;i.minimum=t.length,i.maximum=t.length,i.length=t.length}),e._zod.check=(n)=>{let i=n.value,o=i.length;if(o===t.length)return;let s=mT(i),a=o>t.length;n.issues.push({origin:s,...a?{code:"too_big",maximum:t.length}:{code:"too_small",minimum:t.length},inclusive:!0,exact:!0,input:n.value,inst:e,continue:!t.abort})}}),Sk=ne("$ZodCheckStringFormat",(e,t)=>{var r,n;if(es.init(e,t),e._zod.onattach.push((i)=>{let o=i._zod.bag;if(o.format=t.format,t.pattern)o.patterns??(o.patterns=new Set),o.patterns.add(t.pattern)}),t.pattern)(r=e._zod).check??(r.check=(i)=>{if(t.pattern.lastIndex=0,t.pattern.test(i.value))return;i.issues.push({origin:"string",code:"invalid_format",format:t.format,input:i.value,...t.pattern?{pattern:t.pattern.toString()}:{},inst:e,continue:!t.abort})});else(n=e._zod).check??(n.check=()=>{})}),Hye=ne("$ZodCheckRegex",(e,t)=>{Sk.init(e,t),e._zod.check=(r)=>{if(t.pattern.lastIndex=0,t.pattern.test(r.value))return;r.issues.push({origin:"string",code:"invalid_format",format:"regex",input:r.value,pattern:t.pattern.toString(),inst:e,continue:!t.abort})}}),Gye=ne("$ZodCheckLowerCase",(e,t)=>{t.pattern??(t.pattern=Dye),Sk.init(e,t)}),Wye=ne("$ZodCheckUpperCase",(e,t)=>{t.pattern??(t.pattern=jye),Sk.init(e,t)}),Vye=ne("$ZodCheckIncludes",(e,t)=>{es.init(e,t);let r=i1(t.includes),n=new RegExp(typeof t.position==="number"?`^.{${t.position}}${r}`:r);t.pattern=n,e._zod.onattach.push((i)=>{let o=i._zod.bag;o.patterns??(o.patterns=new Set),o.patterns.add(n)}),e._zod.check=(i)=>{if(i.value.includes(t.includes,t.position))return;i.issues.push({origin:"string",code:"invalid_format",format:"includes",includes:t.includes,input:i.value,inst:e,continue:!t.abort})}}),qye=ne("$ZodCheckStartsWith",(e,t)=>{es.init(e,t);let r=new RegExp(`^${i1(t.prefix)}.*`);t.pattern??(t.pattern=r),e._zod.onattach.push((n)=>{let i=n._zod.bag;i.patterns??(i.patterns=new Set),i.patterns.add(r)}),e._zod.check=(n)=>{if(n.value.startsWith(t.prefix))return;n.issues.push({origin:"string",code:"invalid_format",format:"starts_with",prefix:t.prefix,input:n.value,inst:e,continue:!t.abort})}}),Kye=ne("$ZodCheckEndsWith",(e,t)=>{es.init(e,t);let r=new RegExp(`.*${i1(t.suffix)}$`);t.pattern??(t.pattern=r),e._zod.onattach.push((n)=>{let i=n._zod.bag;i.patterns??(i.patterns=new Set),i.patterns.add(r)}),e._zod.check=(n)=>{if(n.value.endsWith(t.suffix))return;n.issues.push({origin:"string",code:"invalid_format",format:"ends_with",suffix:t.suffix,input:n.value,inst:e,continue:!t.abort})}}),Jye=ne("$ZodCheckOverwrite",(e,t)=>{es.init(e,t),e._zod.check=(r)=>{r.value=t.tx(r.value)}})});class OK{constructor(e=[]){if(this.content=[],this.indent=0,this)this.args=e}indented(e){this.indent+=1,e(this),this.indent-=1}write(e){if(typeof e==="function"){e(this,{execution:"sync"}),e(this,{execution:"async"});return}let r=e.split(`
|
|
28
28
|
`).filter((o)=>o),n=Math.min(...r.map((o)=>o.length-o.trimStart().length)),i=r.map((o)=>o.slice(n)).map((o)=>" ".repeat(this.indent*2)+o);for(let o of i)this.content.push(o)}compile(){let e=Function,t=this?.args,n=[...(this?.content??[""]).map((i)=>` ${i}`)];return new e(...t,n.join(`
|
|
29
29
|
`))}}var Xye;var MK=v(()=>{Xye={major:4,minor:4,patch:3}});function E0e(e){if(e==="")return!0;if(/\s/.test(e))return!1;if(e.length%4!==0)return!1;try{return atob(e),!0}catch{return!1}}function a$t(e){if(!RK.test(e))return!1;let t=e.replace(/[-_]/g,(n)=>n==="-"?"+":"/"),r=t.padEnd(Math.ceil(t.length/4)*4,"=");return E0e(r)}function c$t(e,t=null){try{let r=e.split(".");if(r.length!==3)return!1;let[n]=r;if(!n)return!1;let i=JSON.parse(atob(n));if("typ"in i&&i?.typ!=="JWT")return!1;if(!i.alg)return!1;if(t&&(!("alg"in i)||i.alg!==t))return!1;return!0}catch{return!1}}function Zye(e,t,r){if(e.issues.length)t.issues.push(...o1(r,e.issues));t.value[r]=e.value}function xT(e,t,r,n,i,o){let s=r in n;if(e.issues.length){if(i&&o&&!s)return;t.issues.push(...o1(r,e.issues))}if(!s&&!i){if(!e.issues.length)t.issues.push({code:"invalid_type",expected:"nonoptional",input:void 0,path:[r]});return}if(e.value===void 0){if(s)t.value[r]=void 0}else t.value[r]=e.value}function j0e(e){let t=Object.keys(e.shape);for(let n of t)if(!e.shape?.[n]?._zod?.traits?.has("$ZodType"))throw Error(`Invalid element at key "${n}": expected a Zod schema`);let r=V9e(e.shape);return{...e,keys:t,keySet:new Set(t),numKeys:t.length,optionalKeys:new Set(r)}}function L0e(e,t,r,n,i,o){let s=[],a=i.keySet,c=i.catchall._zod,l=c.def.type,u=c.optin==="optional",d=c.optout==="optional";for(let p in t){if(p==="__proto__")continue;if(a.has(p))continue;if(l==="never"){s.push(p);continue}let f=c.run({value:t[p],issues:[]},n);if(f instanceof Promise)e.push(f.then((m)=>xT(m,r,p,t,u,d)));else xT(f,r,p,t,u,d)}if(s.length)r.issues.push({code:"unrecognized_keys",keys:s,input:t,inst:o});if(!e.length)return r;return Promise.all(e).then(()=>r)}function Qye(e,t,r,n){for(let o of e)if(o.issues.length===0)return t.value=o.value,t;let i=e.filter((o)=>!s3(o));if(i.length===1)return t.value=i[0].value,i[0];return t.issues.push({code:"invalid_union",input:t.value,inst:r,errors:e.map((o)=>o.issues.map((s)=>Bl(s,n,_2())))}),t}function DK(e,t){if(e===t)return{valid:!0,data:e};if(e instanceof Date&&t instanceof Date&&+e===+t)return{valid:!0,data:e};if(o3(e)&&o3(t)){let r=Object.keys(t),n=Object.keys(e).filter((o)=>r.indexOf(o)!==-1),i={...e,...t};for(let o of n){let s=DK(e[o],t[o]);if(!s.valid)return{valid:!1,mergeErrorPath:[o,...s.mergeErrorPath]};i[o]=s.data}return{valid:!0,data:i}}if(Array.isArray(e)&&Array.isArray(t)){if(e.length!==t.length)return{valid:!1,mergeErrorPath:[]};let r=[];for(let n=0;n<e.length;n++){let i=e[n],o=t[n],s=DK(i,o);if(!s.valid)return{valid:!1,mergeErrorPath:[n,...s.mergeErrorPath]};r.push(s.data)}return{valid:!0,data:r}}return{valid:!1,mergeErrorPath:[]}}function e0e(e,t,r){let n=new Map,i;for(let a of t.issues)if(a.code==="unrecognized_keys"){i??(i=a);for(let c of a.keys){if(!n.has(c))n.set(c,{});n.get(c).l=!0}}else e.issues.push(a);for(let a of r.issues)if(a.code==="unrecognized_keys")for(let c of a.keys){if(!n.has(c))n.set(c,{});n.get(c).r=!0}else e.issues.push(a);let o=[...n].filter(([,a])=>a.l&&a.r).map(([a])=>a);if(o.length&&i)e.issues.push({...i,keys:o});if(s3(e))return e;let s=DK(t.value,r.value);if(!s.valid)throw Error(`Unmergable intersection. Error path: ${JSON.stringify(s.mergeErrorPath)}`);return e.value=s.data,e}function t0e(e,t){if(t===void 0&&(e.issues.length||e.fallback))return{issues:[],value:void 0};return e}function r0e(e,t){if(e.value===void 0)e.value=t.defaultValue;return e}function n0e(e,t){if(!e.issues.length&&e.value===void 0)e.issues.push({code:"invalid_type",expected:"nonoptional",input:e.value,inst:t});return e}function wT(e,t,r){if(e.issues.length)return e.aborted=!0,e;return t._zod.run({value:e.value,issues:e.issues,fallback:e.fallback},r)}function i0e(e){return e.value=Object.freeze(e.value),e}function o0e(e,t,r,n){if(!e){let i={code:"custom",input:r,inst:n,path:[...n._zod.def.path??[]],continue:!n._zod.def.abort};if(n._zod.def.params)i.params=n._zod.def.params;t.issues.push(a3(i))}}var Tn,AT,Ln,s0e,a0e,c0e,l0e,u0e,d0e,p0e,f0e,m0e,h0e,g0e,y0e,v0e,b0e,k0e,w0e,x0e,A0e,S0e,$0e,C0e,_0e,R0e,jK,T0e,P0e,I0e,O0e,M0e,D0e,l$t,N0e,F0e,z0e,B0e,U0e,H0e,G0e,LK,W0e,V0e,q0e,K0e,J0e,Y0e,X0e,Z0e,Q0e,e8e;var t8e=v(()=>{kT();n3();CK();bT();Ul();MK();Ul();Tn=ne("$ZodType",(e,t)=>{var r;e??(e={}),e._zod.def=t,e._zod.bag=e._zod.bag||{},e._zod.version=Xye;let n=[...e._zod.def.checks??[]];if(e._zod.traits.has("$ZodCheck"))n.unshift(e);for(let i of n)for(let o of i._zod.onattach)o(e);if(n.length===0)(r=e._zod).deferred??(r.deferred=[]),e._zod.deferred?.push(()=>{e._zod.run=e._zod.parse});else{let i=(s,a,c)=>{let l=s3(s),u;for(let d of a){if(d._zod.def.when){if(K9e(s))continue;if(!d._zod.def.when(s))continue}else if(l)continue;let p=s.issues.length,f=d._zod.check(s);if(f instanceof Promise&&c?.async===!1)throw new V4;if(u||f instanceof Promise)u=(u??Promise.resolve()).then(async()=>{if(await f,s.issues.length===p)return;if(!l)l=s3(s,p)});else{if(s.issues.length===p)continue;if(!l)l=s3(s,p)}}if(u)return u.then(()=>s);return s},o=(s,a,c)=>{if(s3(s))return s.aborted=!0,s;let l=i(a,n,c);if(l instanceof Promise){if(c.async===!1)throw new V4;return l.then((u)=>e._zod.parse(u,c))}return e._zod.parse(l,c)};e._zod.run=(s,a)=>{if(a.skipChecks)return e._zod.parse(s,a);if(a.direction==="backward"){let l=e._zod.parse({value:s.value,issues:[]},{...a,skipChecks:!0});if(l instanceof Promise)return l.then((u)=>o(u,s,a));return o(l,s,a)}let c=e._zod.parse(s,a);if(c instanceof Promise){if(a.async===!1)throw new V4;return c.then((l)=>i(l,n,a))}return i(c,n,a)}}gr(e,"~standard",()=>({validate:(i)=>{try{let o=Q9e(e,i);return o.success?{value:o.data}:{issues:o.error?.issues}}catch(o){return eye(e,i).then((s)=>s.success?{value:s.data}:{issues:s.error?.issues})}},vendor:"zod",version:1}))}),AT=ne("$ZodString",(e,t)=>{Tn.init(e,t),e._zod.pattern=[...e?._zod.bag?.patterns??[]].pop()??Pye(e._zod.bag),e._zod.parse=(r,n)=>{if(t.coerce)try{r.value=String(r.value)}catch(i){}if(typeof r.value==="string")return r;return r.issues.push({expected:"string",code:"invalid_type",input:r.value,inst:e}),r}}),Ln=ne("$ZodStringFormat",(e,t)=>{Sk.init(e,t),AT.init(e,t)}),s0e=ne("$ZodGUID",(e,t)=>{t.pattern??(t.pattern=gye),Ln.init(e,t)}),a0e=ne("$ZodUUID",(e,t)=>{if(t.version){let n={v1:1,v2:2,v3:3,v4:4,v5:5,v6:6,v7:7,v8:8}[t.version];if(n===void 0)throw Error(`Invalid UUID version: "${t.version}"`);t.pattern??(t.pattern=_K(n))}else t.pattern??(t.pattern=_K());Ln.init(e,t)}),c0e=ne("$ZodEmail",(e,t)=>{t.pattern??(t.pattern=yye),Ln.init(e,t)}),l0e=ne("$ZodURL",(e,t)=>{Ln.init(e,t),e._zod.check=(r)=>{try{let n=r.value.trim();if(!t.normalize&&t.protocol?.source===Sye.source){if(!/^https?:\/\//i.test(n)){r.issues.push({code:"invalid_format",format:"url",note:"Invalid URL format",input:r.value,inst:e,continue:!t.abort});return}}let i=new URL(n);if(t.hostname){if(t.hostname.lastIndex=0,!t.hostname.test(i.hostname))r.issues.push({code:"invalid_format",format:"url",note:"Invalid hostname",pattern:t.hostname.source,input:r.value,inst:e,continue:!t.abort})}if(t.protocol){if(t.protocol.lastIndex=0,!t.protocol.test(i.protocol.endsWith(":")?i.protocol.slice(0,-1):i.protocol))r.issues.push({code:"invalid_format",format:"url",note:"Invalid protocol",pattern:t.protocol.source,input:r.value,inst:e,continue:!t.abort})}if(t.normalize)r.value=i.href;else r.value=n;return}catch(n){r.issues.push({code:"invalid_format",format:"url",input:r.value,inst:e,continue:!t.abort})}}}),u0e=ne("$ZodEmoji",(e,t)=>{t.pattern??(t.pattern=vye()),Ln.init(e,t)}),d0e=ne("$ZodNanoID",(e,t)=>{t.pattern??(t.pattern=mye),Ln.init(e,t)}),p0e=ne("$ZodCUID",(e,t)=>{t.pattern??(t.pattern=lye),Ln.init(e,t)}),f0e=ne("$ZodCUID2",(e,t)=>{t.pattern??(t.pattern=uye),Ln.init(e,t)}),m0e=ne("$ZodULID",(e,t)=>{t.pattern??(t.pattern=dye),Ln.init(e,t)}),h0e=ne("$ZodXID",(e,t)=>{t.pattern??(t.pattern=pye),Ln.init(e,t)}),g0e=ne("$ZodKSUID",(e,t)=>{t.pattern??(t.pattern=fye),Ln.init(e,t)}),y0e=ne("$ZodISODateTime",(e,t)=>{t.pattern??(t.pattern=Tye(t)),Ln.init(e,t)}),v0e=ne("$ZodISODate",(e,t)=>{t.pattern??(t.pattern=Cye),Ln.init(e,t)}),b0e=ne("$ZodISOTime",(e,t)=>{t.pattern??(t.pattern=Rye(t)),Ln.init(e,t)}),k0e=ne("$ZodISODuration",(e,t)=>{t.pattern??(t.pattern=hye),Ln.init(e,t)}),w0e=ne("$ZodIPv4",(e,t)=>{t.pattern??(t.pattern=bye),Ln.init(e,t),e._zod.bag.format="ipv4"}),x0e=ne("$ZodIPv6",(e,t)=>{t.pattern??(t.pattern=kye),Ln.init(e,t),e._zod.bag.format="ipv6",e._zod.check=(r)=>{try{new URL(`http://[${r.value}]`)}catch{r.issues.push({code:"invalid_format",format:"ipv6",input:r.value,inst:e,continue:!t.abort})}}}),A0e=ne("$ZodCIDRv4",(e,t)=>{t.pattern??(t.pattern=wye),Ln.init(e,t)}),S0e=ne("$ZodCIDRv6",(e,t)=>{t.pattern??(t.pattern=xye),Ln.init(e,t),e._zod.check=(r)=>{let n=r.value.split("/");try{if(n.length!==2)throw Error();let[i,o]=n;if(!o)throw Error();let s=Number(o);if(`${s}`!==o)throw Error();if(s<0||s>128)throw Error();new URL(`http://[${i}]`)}catch{r.issues.push({code:"invalid_format",format:"cidrv6",input:r.value,inst:e,continue:!t.abort})}}});$0e=ne("$ZodBase64",(e,t)=>{t.pattern??(t.pattern=Aye),Ln.init(e,t),e._zod.bag.contentEncoding="base64",e._zod.check=(r)=>{if(E0e(r.value))return;r.issues.push({code:"invalid_format",format:"base64",input:r.value,inst:e,continue:!t.abort})}});C0e=ne("$ZodBase64URL",(e,t)=>{t.pattern??(t.pattern=RK),Ln.init(e,t),e._zod.bag.contentEncoding="base64url",e._zod.check=(r)=>{if(a$t(r.value))return;r.issues.push({code:"invalid_format",format:"base64url",input:r.value,inst:e,continue:!t.abort})}}),_0e=ne("$ZodE164",(e,t)=>{t.pattern??(t.pattern=Eye),Ln.init(e,t)});R0e=ne("$ZodJWT",(e,t)=>{Ln.init(e,t),e._zod.check=(r)=>{if(c$t(r.value,t.alg))return;r.issues.push({code:"invalid_format",format:"jwt",input:r.value,inst:e,continue:!t.abort})}}),jK=ne("$ZodNumber",(e,t)=>{Tn.init(e,t),e._zod.pattern=e._zod.bag.pattern??TK,e._zod.parse=(r,n)=>{if(t.coerce)try{r.value=Number(r.value)}catch(s){}let i=r.value;if(typeof i==="number"&&!Number.isNaN(i)&&Number.isFinite(i))return r;let o=typeof i==="number"?Number.isNaN(i)?"NaN":!Number.isFinite(i)?"Infinity":void 0:void 0;return r.issues.push({expected:"number",code:"invalid_type",input:i,inst:e,...o?{received:o}:{}}),r}}),T0e=ne("$ZodNumberFormat",(e,t)=>{Fye.init(e,t),jK.init(e,t)}),P0e=ne("$ZodBoolean",(e,t)=>{Tn.init(e,t),e._zod.pattern=Oye,e._zod.parse=(r,n)=>{if(t.coerce)try{r.value=Boolean(r.value)}catch(o){}let i=r.value;if(typeof i==="boolean")return r;return r.issues.push({expected:"boolean",code:"invalid_type",input:i,inst:e}),r}}),I0e=ne("$ZodNull",(e,t)=>{Tn.init(e,t),e._zod.pattern=Mye,e._zod.values=new Set([null]),e._zod.parse=(r,n)=>{let i=r.value;if(i===null)return r;return r.issues.push({expected:"null",code:"invalid_type",input:i,inst:e}),r}}),O0e=ne("$ZodUnknown",(e,t)=>{Tn.init(e,t),e._zod.parse=(r)=>r}),M0e=ne("$ZodNever",(e,t)=>{Tn.init(e,t),e._zod.parse=(r,n)=>(r.issues.push({expected:"never",code:"invalid_type",input:r.value,inst:e}),r)});D0e=ne("$ZodArray",(e,t)=>{Tn.init(e,t),e._zod.parse=(r,n)=>{let i=r.value;if(!Array.isArray(i))return r.issues.push({expected:"array",code:"invalid_type",input:i,inst:e}),r;r.value=Array(i.length);let o=[];for(let s=0;s<i.length;s++){let a=i[s],c=t.element._zod.run({value:a,issues:[]},n);if(c instanceof Promise)o.push(c.then((l)=>Zye(l,r,s)));else Zye(c,r,s)}if(o.length)return Promise.all(o).then(()=>r);return r}});l$t=ne("$ZodObject",(e,t)=>{if(Tn.init(e,t),!Object.getOwnPropertyDescriptor(t,"shape")?.get){let a=t.shape;Object.defineProperty(t,"shape",{get:()=>{let c={...a};return Object.defineProperty(t,"shape",{value:c}),c}})}let n=dT(()=>j0e(t));gr(e._zod,"propValues",()=>{let a=t.shape,c={};for(let l in a){let u=a[l]._zod;if(u.values){c[l]??(c[l]=new Set);for(let d of u.values)c[l].add(d)}}return c});let i=kk,o=t.catchall,s;e._zod.parse=(a,c)=>{s??(s=n.value);let l=a.value;if(!i(l))return a.issues.push({expected:"object",code:"invalid_type",input:l,inst:e}),a;a.value={};let u=[],d=s.shape;for(let p of s.keys){let f=d[p],m=f._zod.optin==="optional",h=f._zod.optout==="optional",g=f._zod.run({value:l[p],issues:[]},c);if(g instanceof Promise)u.push(g.then((y)=>xT(y,a,p,l,m,h)));else xT(g,a,p,l,m,h)}if(!o)return u.length?Promise.all(u).then(()=>a):a;return L0e(u,l,a,c,n.value,e)}}),N0e=ne("$ZodObjectJIT",(e,t)=>{l$t.init(e,t);let r=e._zod.parse,n=dT(()=>j0e(t)),i=(p)=>{let f=new OK(["shape","payload","ctx"]),m=n.value,h=(k)=>{let w=wK(k);return`shape[${w}]._zod.run({ value: input[${w}], issues: [] }, ctx)`};f.write("const input = payload.value;");let g=Object.create(null),y=0;for(let k of m.keys)g[k]=`key_${y++}`;f.write("const newResult = {};");for(let k of m.keys){let w=g[k],A=wK(k),x=p[k],E=x?._zod?.optin==="optional",S=x?._zod?.optout==="optional";if(f.write(`const ${w} = ${h(k)};`),E&&S)f.write(`
|
|
30
30
|
if (${w}.issues.length) {
|
|
@@ -501,8 +501,8 @@ ${t}`}var Os=v(()=>{Lt();gt()});import{createHash as PQ}from"node:crypto";functi
|
|
|
501
501
|
|
|
502
502
|
`)}catch{return r.join(`
|
|
503
503
|
|
|
504
|
-
`)}}function OQ(e,t){let r=["oma-config.cue","oma-config.yaml"].map((s)=>ux(t,Q3.join(".agents",s))).filter((s)=>s!==null).sort((s,a)=>a.length-s.length)[0];if(!r)return"";let n=Q3.join(Q3.dirname(r),"agents");if(!D1.existsSync(n))return"";let i=iu(e)??e,o;try{o=D1.readdirSync(n).filter((s)=>s.endsWith(".md")).find((s)=>{let a=s.replace(/\.md$/,"");return a===e||iu(a)===i})}catch{return""}if(!o)return"";try{let{body:s}=Mr(D1.readFileSync(Q3.join(n,o),"utf-8"));return s.trim()}catch{return""}}var U_e=v(()=>{Os();C9();ZI()});function A5(e=process.env){let t=e.OMA_RUNTIME_VENDOR?.trim().toLowerCase();if(t&&H_e.has(t))return t;if(Object.keys(e).some((r)=>r.startsWith("CLAUDE_CODE_")))return"claude";if(e.CLAUDECODE==="1")return"claude";if(e.CODEX_THREAD_ID||e.CODEX_CI)return"codex";if(Object.keys(e).some((r)=>r.startsWith("ANTIGRAVITY_"))||e.ANTIGRAVITY_IDE==="1")return"antigravity";if(Object.keys(e).some((r)=>r.startsWith("QWEN_CODE_"))||e.QWEN_CODE==="1")return"qwen";if(e.GROK_WORKSPACE_ROOT||e.GROK_SESSION_ID||e.GROK_BUILD)return"grok";if(e.KIRO_SESSION_ID||e.KIRO_CHAT_LOG_FILE||e.KIRO_HOME)return"kiro";if(e.PI_CODING_AGENT==="true"||e.PI_CODING_AGENT==="1")return"pi";if(e.CURSOR_AGENT==="1"||e.CURSOR_CLI==="1"||typeof e.CURSOR_TRACE_ID==="string")return"cursor";return"unknown"}function j1(e,t,r=process.env){let n=A5(r),i=(t??(n==="unknown"?e??"claude":n)).trim().toLowerCase();if(!H_e.has(i))throw new On(`Unsupported auto dispatch vendor "${i}". Set default_cli to a supported CLI vendor.`);return i}var H_e;var L1=v(()=>{sd();H_e=new Set(["claude","codex","cursor","antigravity","qwen","grok","kimi","kiro","opencode","pi"])});function R9(e,t,r=process.env){let n=A5(r),i=t??r.OMA_RUNTIME_VENDOR??(["codex","claude","qwen"].includes(n)?n:e.default_cli??"codex");if(i!=="codex"&&i!=="claude"&&i!=="qwen")throw new Uo("The free preset supports codex, claude and qwen only. Select one with --vendor or default_cli.");return i}function ou(e,t=process.env){if(e.free!==void 0&&!G(e.free))throw new Uo("free must be a configuration object.");let r=e.free??{};if(Object.keys(r).some((c)=>!["base_url","api_key_env","model"].includes(c)))throw new Uo("Unknown free setting. Use base_url, api_key_env and model; keep API keys in environment variables.");for(let c of Object.values(r))if(typeof c!=="string"||!c.trim())throw new Uo("FreeLLMAPI settings must be non-empty strings.");let n=t.FREELLM_BASE_URL??r.base_url??"http://127.0.0.1:31415/v1",i;try{i=new URL(n)}catch{throw new Uo("FreeLLMAPI base_url must be an absolute HTTP(S) URL.")}if(!["http:","https:"].includes(i.protocol)||i.username||i.password||i.search||i.hash)throw new Uo("FreeLLMAPI base_url must be HTTP(S), without credentials, query parameters or fragments.");let o=i.href.replace(/\/+$/,""),s=r.api_key_env??"FREELLM_API_KEY";if(!/^[A-Za-z_][A-Za-z0-9_]*$/.test(s))throw new Uo("free.api_key_env must be an environment variable name.");let a=t.FREELLM_MODEL??r.model??"auto";if(!a.trim()||/[\r\n\0]/.test(a))throw new Uo("FreeLLMAPI model must be a non-empty model ID.");return{baseUrl:o.endsWith("/v1")?o:`${o}/v1`,apiKeyEnv:s,model:a}}function fx(e,t=process.env){let r=t[e.apiKeyEnv]?.trim()||(e.apiKeyEnv==="FREELLM_API_KEY"?t.FREELLMAPI_API_KEY?.trim():void 0);if(!r)throw new Uo(`FreeLLMAPI requires ${e.apiKeyEnv}${e.apiKeyEnv==="FREELLM_API_KEY"?" (or FREELLMAPI_API_KEY)":""}. No vendor fallback was attempted.`);if(/[\r\n\0]/.test(r))throw new Uo("FreeLLMAPI API key contains invalid characters.");return r}async function T9(e,t=process.env,r){let n=fx(e,t),i;try{i=await fetch(`${e.baseUrl}/models`,{headers:{Authorization:`Bearer ${n}`},signal:r?AbortSignal.any([r,AbortSignal.timeout(5000)]):AbortSignal.timeout(5000),redirect:"error"})}catch{throw new Uo(`Cannot reach FreeLLMAPI at ${e.baseUrl}. Start the server or check free.base_url.`)}if(await i.body?.cancel(),!i.ok)throw new Uo(`FreeLLMAPI readiness check returned HTTP ${i.status}. Check the unified API key and server configuration.`)}var Uo;var N1=v(()=>{L1();gt();Uo=class Uo extends Error{constructor(e){super(e);this.name="FreeProviderError"}}});var MQ;var G_e=v(()=>{MQ=new Map([["anthropic/claude-opus-4-7",{cli:"claude",cli_model:"claude-opus-4-7",supports:{effort:{type:"cli-session",auto_default:"high"},apply_patch:!1,task_budget:!0,prompt_cache:!0,computer_use:!1,native_dispatch_from:["claude"],api_only:!1},pricing_note:"$5/$25 per Mtok (reference only; not subscription cost)",auth_hint:"Requires Claude Max subscription ($200/mo)",subscription_tier:"claude_max"}],["anthropic/claude-sonnet-4-6",{cli:"claude",cli_model:"claude-sonnet-4-6",supports:{effort:{type:"cli-session",auto_default:"high"},apply_patch:!1,task_budget:!0,prompt_cache:!0,computer_use:!1,native_dispatch_from:["claude"],api_only:!1},auth_hint:"Requires Claude Pro or Max subscription"}],["anthropic/claude-haiku-4-5",{cli:"claude",cli_model:"claude-haiku-4-5",supports:{effort:{type:"cli-session",auto_default:"high"},apply_patch:!1,task_budget:!1,prompt_cache:!0,computer_use:!1,native_dispatch_from:["claude"],api_only:!1},auth_hint:"Requires Claude Pro or Max subscription"}],["openai/gpt-5.5",{cli:"codex",cli_model:"gpt-5.5",supports:{effort:{type:"granular",levels:["none","low","medium","high","xhigh"]},apply_patch:!0,task_budget:!1,prompt_cache:!1,computer_use:!0,native_dispatch_from:["codex"],api_only:!1},pricing_note:"$5/$30 per Mtok (reference only; improved token efficiency vs 5.4)",auth_hint:"Requires ChatGPT Plus or Pro subscription (default Codex CLI model)"}],["openai/gpt-5.4",{cli:"codex",cli_model:"gpt-5.4",supports:{effort:{type:"granular",levels:["none","low","medium","high","xhigh"]},apply_patch:!0,task_budget:!1,prompt_cache:!1,computer_use:!0,native_dispatch_from:["codex"],api_only:!1},auth_hint:"Requires ChatGPT Plus or Pro subscription"}],["openai/gpt-5.4-pro",{cli:"codex",cli_model:"gpt-5.4-pro",supports:{effort:{type:"granular",levels:["none","low","medium","high","xhigh"]},apply_patch:!0,task_budget:!1,prompt_cache:!1,computer_use:!0,native_dispatch_from:["codex"],api_only:!1},pricing_note:"$30/$180 per Mtok (reference only; use for special cases)",auth_hint:"Requires ChatGPT Pro subscription ($200/mo)",subscription_tier:"chatgpt_pro"}],["openai/gpt-5.4-mini",{cli:"codex",cli_model:"gpt-5.4-mini",supports:{effort:{type:"granular",levels:["none","low","medium","high","xhigh"]},apply_patch:!0,task_budget:!1,prompt_cache:!1,computer_use:!1,native_dispatch_from:["codex"],api_only:!1},pricing_note:"Uses only 30% Codex quota; recommended for official subagents",auth_hint:"Requires ChatGPT Plus subscription"}],["openai/gpt-5.3-codex",{cli:"codex",cli_model:"gpt-5.3-codex",supports:{effort:{type:"granular",levels:["none","low","medium","high","xhigh"]},apply_patch:!0,task_budget:!1,prompt_cache:!1,computer_use:!1,native_dispatch_from:["codex"],api_only:!1},auth_hint:"Requires ChatGPT Plus or Pro subscription"}],["antigravity/gemini-3.1-pro",{cli:"antigravity",cli_model:"Gemini 3.1 Pro (High)",supports:{effort:{type:"granular",levels:["low","high"]},apply_patch:!1,task_budget:!1,prompt_cache:!0,computer_use:!1,native_dispatch_from:["antigravity"],api_only:!1},auth_hint:"Requires Antigravity CLI sign-in (Google AI Pro tier)",subscription_tier:"google_ai_pro"}],["antigravity/gemini-3.6-flash",{cli:"antigravity",cli_model:"Gemini 3.6 Flash (Medium)",supports:{effort:{type:"granular",levels:["low","medium","high"]},apply_patch:!1,task_budget:!1,prompt_cache:!0,computer_use:!1,native_dispatch_from:["antigravity"],api_only:!1},auth_hint:"Requires Antigravity CLI sign-in (Google AI Pro tier)",subscription_tier:"google_ai_pro"}],["cursor/composer-2.5",{cli:"cursor",cli_model:"composer-2.5",supports:{effort:null,apply_patch:!1,task_budget:!1,prompt_cache:!1,computer_use:!1,native_dispatch_from:["cursor"],api_only:!1},auth_hint:"Requires Cursor Pro or Pro Student subscription"}],["cursor/composer-2.5-fast",{cli:"cursor",cli_model:"composer-2.5-fast",supports:{effort:null,apply_patch:!1,task_budget:!1,prompt_cache:!1,computer_use:!1,native_dispatch_from:["cursor"],api_only:!1},auth_hint:"Requires Cursor Pro or Pro Student subscription"}],["cursor/composer-2",{cli:"cursor",cli_model:"composer-2",supports:{effort:null,apply_patch:!1,task_budget:!1,prompt_cache:!1,computer_use:!1,native_dispatch_from:["cursor"],api_only:!1},auth_hint:"Requires Cursor Pro or Pro Student subscription"}],["cursor/composer-2-fast",{cli:"cursor",cli_model:"composer-2-fast",supports:{effort:null,apply_patch:!1,task_budget:!1,prompt_cache:!1,computer_use:!1,native_dispatch_from:["cursor"],api_only:!1},auth_hint:"Requires Cursor Pro or Pro Student subscription"}],["cursor/auto",{cli:"cursor",cli_model:"auto",supports:{effort:null,apply_patch:!1,task_budget:!1,prompt_cache:!1,computer_use:!1,native_dispatch_from:["cursor"],api_only:!1},auth_hint:"Requires Cursor Pro or Pro Student subscription (auto routing; quota-friendly)"}],["kiro/claude-sonnet-4-5",{cli:"kiro",cli_model:"anthropic.claude-sonnet-4-5-20251001-v1:0",supports:{effort:null,apply_patch:!1,task_budget:!1,prompt_cache:!1,computer_use:!1,native_dispatch_from:["kiro"],api_only:!1},auth_hint:"Requires AWS Builder ID or IAM Identity Center (Kiro CLI)"}],["kiro/claude-haiku-3-5",{cli:"kiro",cli_model:"anthropic.claude-haiku-3-5-20241022-v1:0",supports:{effort:null,apply_patch:!1,task_budget:!1,prompt_cache:!1,computer_use:!1,native_dispatch_from:["kiro"],api_only:!1},auth_hint:"Requires AWS Builder ID or IAM Identity Center (Kiro CLI)"}],["kiro/auto",{cli:"kiro",cli_model:"auto",supports:{effort:null,apply_patch:!1,task_budget:!1,prompt_cache:!1,computer_use:!1,native_dispatch_from:["kiro"],api_only:!1},auth_hint:"Requires AWS Builder ID or IAM Identity Center (Kiro CLI — auto model selection)"}],["qwen/qwen3.6-plus",{cli:"qwen",cli_model:"qwen3.6-plus",supports:{effort:{type:"binary-thinking"},apply_patch:!1,task_budget:!1,prompt_cache:!1,computer_use:!1,native_dispatch_from:[],api_only:!1},pricing_note:"1M context, enhanced agentic coding (released 2026-04)",auth_hint:"Requires Qwen Code subscription or Bailian Coding Plan API key"}],["qwen/qwen3-coder-plus",{cli:"qwen",cli_model:"qwen3-coder-plus",supports:{effort:{type:"binary-thinking"},apply_patch:!1,task_budget:!1,prompt_cache:!1,computer_use:!1,native_dispatch_from:[],api_only:!1},auth_hint:"Requires Qwen Code subscription (API key re-authentication required; OAuth deprecated 2026-04-15)"}],["qwen/qwen3-coder-next",{cli:"qwen",cli_model:"qwen3-coder-next",supports:{effort:{type:"binary-thinking"},apply_patch:!1,task_budget:!1,prompt_cache:!1,computer_use:!1,native_dispatch_from:[],api_only:!1},auth_hint:"Requires Qwen Code subscription (API key re-authentication required; OAuth deprecated 2026-04-15)"}]])});var W_e;var V_e=v(()=>{W_e=["claude","codex","cursor","antigravity","qwen","kiro","kimi","opencode"]});var iVt,oVt,q_e,sVt,aVt,QI;var DQ=v(()=>{Ki();C2();V_e();iVt=et(W_e),oVt=et([...zl,"opencode"]),q_e=et(["none","low","medium","high","xhigh"]),sVt=et(["none","dynamic","fixed"]),aVt=l3([ye({type:nn("granular"),levels:Me(q_e)}),ye({type:nn("cli-session"),auto_default:q_e}),ye({type:nn("thinking-budget"),modes:Me(sVt)}),ye({type:nn("binary-thinking")}),zve()]),QI=ye({cli:oVt,cli_model:W().min(1),supports:ye({effort:aVt,apply_patch:yr(),task_budget:yr(),prompt_cache:yr(),computer_use:yr(),native_dispatch_from:Me(iVt),api_only:yr()}),pricing_note:W().optional(),auth_hint:W().min(1),subscription_tier:W().optional()})});function P9(e){let t=br(e)?.models;return t&&typeof t==="object"&&!Array.isArray(t)?t:void 0}function jQ(e){let t=P9(e);if(!t)return new Map;let r=new Map;for(let[n,i]of Object.entries(t)){let o=QI.safeParse(i);if(!o.success)continue;let s=o.data;if(s.supports.api_only)continue;r.set(n,s)}return r}var LQ=v(()=>{kr();DQ()});function cVt(){let e=new Map;for(let[t,r]of MQ){if(r.supports.api_only)continue;e.set(t,r)}return e}function tO(){if(eO!==null)return eO;return lVt()}function lVt(e){let t=new Map(K_e),r=jQ(e);for(let[n,i]of r){if(K_e.has(n))console.warn(`[model-registry] User override for slug "${n}"`);t.set(n,i)}return eO=t,eO}function S5(e,t){if(t&&Object.hasOwn(t,e)){let r=t[e],n=QI.safeParse(r);if(n.success){let i=n.data;if(i.supports.api_only)console.warn(`[model-registry] User inline model "${e}": api_only=true is not supported in CLI-only mode — falling back to core registry.`);else{if(tO().has(e))console.warn(`[model-registry] User inline model "${e}" overrides a core registry entry.`);return i}}else console.warn(`[model-registry] User inline model "${e}" failed validation — falling back to core registry. Errors: ${n.error.issues.map((i)=>i.message).join("; ")}`)}return tO().get(e)}function I9(e){if(e in rO)return rO[e];if(e.startsWith("opencode-"))return"opencode";return}function uVt(e){let t=`${e}/`;return Array.from(MQ.keys()).filter((r)=>r.startsWith(t)).sort()}function Y_e(e,t){let r=t?`for agent "${t}"`:"",n=e.split("/"),i=n[0]??"",o=n.slice(1).join("/"),s=i?rO[i]:void 0,a=[`Unknown model slug "${e}"${r?` ${r}`:""}.`,""];if(s&&o){let c=uVt(i);if(a.push(`This looks like an OpenRouter slug for ${i} (CLI: ${s}).`,`If your ${s} CLI accepts this model, register it in .agents/oma-config.yaml (or .agents/oma-config.cue):`,"","models:",` ${e}:`,` cli: ${s}`,` cli_model: ${o} # confirm via \`${s} --help\``," supports:",` native_dispatch_from: [${s}]`,""),c.length>0)a.push(`Built-in ${i} slugs you can use without a models: block:`,...c.map((l)=>` - ${l}`),"");a.push("Browse all OpenRouter models: https://openrouter.ai/models")}else{let c=Object.entries(rO).map(([l,u])=>`${l} (${u})`).join(", ");a.push(`Owner "${i??"<missing>"}" is not bundled with a forkable CLI.`,`Supported owners: ${c}.`,"",`If "${i??"<missing>"}" has a CLI you can shell out to, register it manually:`,"models:",` ${e}:`," cli: <your-cli-binary>",` cli_model: ${o||"<model-name>"}`," supports:"," native_dispatch_from: [<your-cli-binary>]")}return a.join(`
|
|
505
|
-
`)}var eO=null,K_e,J_e,rO;var eh=v(()=>{G_e();DQ();LQ();LQ();K_e=cVt();J_e=new Proxy({},{get(e,t,r){let n=tO(),i=Reflect.get(n,t,n);if(typeof i==="function")return i.bind(n);return i},has(e,t){return Reflect.has(tO(),t)}});rO={anthropic:"claude",openai:"codex",antigravity:"antigravity",cursor:"cursor",qwen:"qwen",kiro:"kiro",opencode:"opencode"}});function dVt(){for(let[e,t]of Object.entries(yo))for(let r of X_e){let n=t.agent_defaults[r];if(!n)throw Error(`[built-in-presets] Preset "${e}" is missing agent_defaults for "${r}". All ${X_e.length} canonical agent roles are required for built-in presets.`);if(!S5(n.model))throw Error(`[built-in-presets] Preset "${e}" agent "${r}" references unknown model slug "${n.model}". Add it to the model registry or update the preset.`)}}var yo,E5,X_e;var th=v(()=>{eh();yo={antigravity:{description:"Antigravity CLI (agy) — nominal Gemini 3.1 Pro for impl/architecture, Gemini 3.6 Flash for orchestration & explore (agy 1.0 has no `--model` flag, so the model is selected by agy's own config)",agent_defaults:{orchestrator:{model:"antigravity/gemini-3.6-flash"},architecture:{model:"antigravity/gemini-3.1-pro"},qa:{model:"antigravity/gemini-3.1-pro"},pm:{model:"antigravity/gemini-3.6-flash"},backend:{model:"antigravity/gemini-3.1-pro"},frontend:{model:"antigravity/gemini-3.1-pro"},mobile:{model:"antigravity/gemini-3.1-pro"},db:{model:"antigravity/gemini-3.1-pro"},debug:{model:"antigravity/gemini-3.1-pro"},refactor:{model:"antigravity/gemini-3.1-pro"},docs:{model:"antigravity/gemini-3.6-flash"},"tf-infra":{model:"antigravity/gemini-3.1-pro"},explore:{model:"antigravity/gemini-3.6-flash"}}},claude:{description:"Claude — Max subscription holders",agent_defaults:{orchestrator:{model:"anthropic/claude-sonnet-4-6"},architecture:{model:"anthropic/claude-opus-4-7"},qa:{model:"anthropic/claude-sonnet-4-6"},pm:{model:"anthropic/claude-sonnet-4-6"},backend:{model:"anthropic/claude-sonnet-4-6"},frontend:{model:"anthropic/claude-sonnet-4-6"},mobile:{model:"anthropic/claude-sonnet-4-6"},db:{model:"anthropic/claude-sonnet-4-6"},debug:{model:"anthropic/claude-sonnet-4-6"},refactor:{model:"anthropic/claude-sonnet-4-6"},docs:{model:"anthropic/claude-sonnet-4-6"},"tf-infra":{model:"anthropic/claude-sonnet-4-6"},explore:{model:"anthropic/claude-haiku-4-5"}}},codex:{description:"Codex — ChatGPT Plus/Pro",agent_defaults:{orchestrator:{model:"openai/gpt-5.5",effort:"medium"},architecture:{model:"openai/gpt-5.5",effort:"high"},qa:{model:"openai/gpt-5.5",effort:"high"},pm:{model:"openai/gpt-5.5",effort:"medium"},backend:{model:"openai/gpt-5.5",effort:"high"},frontend:{model:"openai/gpt-5.5",effort:"high"},mobile:{model:"openai/gpt-5.5",effort:"high"},db:{model:"openai/gpt-5.5",effort:"high"},debug:{model:"openai/gpt-5.5",effort:"high"},refactor:{model:"openai/gpt-5.5",effort:"high"},docs:{model:"openai/gpt-5.5",effort:"medium"},"tf-infra":{model:"openai/gpt-5.5",effort:"high"},explore:{model:"openai/gpt-5.4-mini",effort:"low"}}},qwen:{description:"Qwen Code — native subagents support per-agent model selection; Qwen has no --effort, only binary --thinking",agent_defaults:{orchestrator:{model:"qwen/qwen3-coder-next",thinking:!1},architecture:{model:"qwen/qwen3.6-plus",thinking:!0},qa:{model:"qwen/qwen3.6-plus",thinking:!0},pm:{model:"qwen/qwen3-coder-next",thinking:!1},backend:{model:"qwen/qwen3.6-plus",thinking:!0},frontend:{model:"qwen/qwen3.6-plus",thinking:!0},mobile:{model:"qwen/qwen3.6-plus",thinking:!0},db:{model:"qwen/qwen3.6-plus",thinking:!0},debug:{model:"qwen/qwen3.6-plus",thinking:!0},refactor:{model:"qwen/qwen3.6-plus",thinking:!0},docs:{model:"qwen/qwen3-coder-next",thinking:!1},"tf-infra":{model:"qwen/qwen3.6-plus",thinking:!0},explore:{model:"qwen/qwen3-coder-next",thinking:!1}}},kiro:{description:"Kiro CLI — AWS Bedrock via CodeWhisperer/Q; sonnet for impl/architecture, haiku for explore/orchestration",agent_defaults:{orchestrator:{model:"kiro/claude-haiku-3-5"},architecture:{model:"kiro/claude-sonnet-4-5"},qa:{model:"kiro/claude-sonnet-4-5"},pm:{model:"kiro/claude-haiku-3-5"},backend:{model:"kiro/claude-sonnet-4-5"},frontend:{model:"kiro/claude-sonnet-4-5"},mobile:{model:"kiro/claude-sonnet-4-5"},db:{model:"kiro/claude-sonnet-4-5"},debug:{model:"kiro/claude-sonnet-4-5"},refactor:{model:"kiro/claude-sonnet-4-5"},docs:{model:"kiro/claude-haiku-3-5"},"tf-infra":{model:"kiro/claude-sonnet-4-5"},explore:{model:"kiro/claude-haiku-3-5"}}},cursor:{description:"Cursor — Cursor Pro / Pro Student",agent_defaults:{orchestrator:{model:"cursor/composer-2.5-fast"},architecture:{model:"cursor/composer-2.5"},qa:{model:"cursor/composer-2.5-fast"},pm:{model:"cursor/composer-2.5-fast"},backend:{model:"cursor/composer-2.5"},frontend:{model:"cursor/composer-2.5"},mobile:{model:"cursor/composer-2.5"},db:{model:"cursor/composer-2.5"},debug:{model:"cursor/composer-2.5"},refactor:{model:"cursor/composer-2.5"},docs:{model:"cursor/composer-2.5-fast"},"tf-infra":{model:"cursor/composer-2.5"},explore:{model:"cursor/composer-2.5-fast"}}},mixed:{description:"Mixed — role-optimal vendors per agent (Claude for orchestration/QA/PM, Codex for impl/explore)",agent_defaults:{orchestrator:{model:"anthropic/claude-sonnet-4-6"},architecture:{model:"anthropic/claude-opus-4-7"},qa:{model:"anthropic/claude-sonnet-4-6"},pm:{model:"anthropic/claude-sonnet-4-6"},backend:{model:"openai/gpt-5.5",effort:"high"},frontend:{model:"openai/gpt-5.5",effort:"high"},mobile:{model:"openai/gpt-5.5",effort:"high"},db:{model:"openai/gpt-5.5",effort:"high"},debug:{model:"openai/gpt-5.5",effort:"high"},refactor:{model:"openai/gpt-5.5",effort:"high"},docs:{model:"anthropic/claude-sonnet-4-6"},"tf-infra":{model:"openai/gpt-5.5",effort:"high"},explore:{model:"openai/gpt-5.4-mini",effort:"low"}}}},E5={"claude-only":"claude","codex-only":"codex",gemini:"antigravity","qwen-only":"qwen","cursor-only":"cursor"},X_e=["orchestrator","architecture","qa","pm","backend","frontend","mobile","db","debug","refactor","docs","tf-infra","explore"];dVt()});function pVt(e,t){let r=S5(e,t);if(r?.cli)return r.cli;let n=e.split("/")[0]??e;return I9(n)??n}function ad(e){let t=[],r=/[^\s"']+|"([^"]*)"|'([^']*)'/g,n=r.exec(e);while(n!==null){if(n[1]!==void 0)t.push(n[1]);else if(n[2]!==void 0)t.push(n[2]);else if(n[0])t.push(n[0]);n=r.exec(e)}return t}function fVt(e,t){if(e.model_preset==="auto")return;let r=E5[e.model_preset]??e.model_preset,n=yo[r],i=e.custom_presets?.[r],o;if(n)o=n;else if(i)if(i.extends){let s=E5[i.extends]??i.extends,a=yo[s]??e.custom_presets?.[s];o=a?{...a,agent_defaults:{...a.agent_defaults,...i.agent_defaults}}:i}else o=i;return o?.agent_defaults[t]??o?.agent_defaults.orchestrator}function oi(e,t){let r=process.cwd(),n=B_e(r),i=br(r),o=i?.agents,s=i?.default_cli;if(i?.model_preset==="free")return ou(i),{vendor:R9(i,t),config:n};let a=e.replace(/-agent$/i,""),c=[e,a,...Z3[e]??[],...Z3[a]??[]],l=c.find((f)=>f&&o?.[f]),u=l?o?.[l]:void 0;if(!u&&i){let f=c.find((m)=>lx.has(m))??a;u=fVt(i,f)}let d=u?pVt(u.model,i?.models):void 0;return{vendor:(t||d||(i?.model_preset==="auto"?j1(s):s||"claude")).toLowerCase(),config:n}}function zc(e,t){if(t!==void 0)return t;let r={claude:"-p",qwen:"-p",codex:null,cursor:null,opencode:null};if(Object.hasOwn(r,e))return r[e];return"-p"}var Z_e=v(()=>{L1();kr();N1();th();eh();C9();ZI()});var Ms=v(()=>{C9();ZI();U_e();IQ();Z_e()});function Q_e(e){let t=e.indexOf("/");if(t===-1)return e;let r=e.slice(0,t);if(mVt.has(r))return e;throw new On(`Model "${e}" cannot be dispatched via pi: "${r}" is a CLI-proprietary owner, not an LLM provider pi proxies to. Use a real-provider preset (claude, codex, or mixed) when dispatching agents through pi.`)}function eRe(e){if(e.thinking===!1)return"off";if(e.thinking===!0&&e.effort===void 0)return"high";switch(e.effort){case"none":return"off";case"low":return"low";case"medium":return"medium";case"high":return"high";case"xhigh":return"xhigh";default:return null}}var mVt;var NQ=v(()=>{sd();mVt=new Set(["anthropic","openai","google"])});function tRe(e,t,r,n){if(n.has(t))throw new On(`Circular extends chain detected at preset "${t}". Chain: ${[...n].join(" → ")} → ${t}`);n.add(t);let i=yo[t];if(i)return{description:e.description,agent_defaults:{...i.agent_defaults,...e.agent_defaults}};let o=r.custom_presets?.[t];if(o){let s=o;if(o.extends)s=tRe(o,o.extends,r,n);return{description:e.description,agent_defaults:{...s.agent_defaults,...e.agent_defaults}}}throw new On(`Preset "${t}" referenced in 'extends' is not a built-in preset and not found in custom_presets.`)}function mx(e,t,r,n=process.env){let i=t.model_preset;if(i==="free"){let w=ou(t,n);return{cli:R9(t,r,n),cliModel:w.model,freeProvider:w}}if(!i)throw new On("'model_preset' is missing from .agents/oma-config.yaml (or .agents/oma-config.cue). Run 'oma install --preset <name>' to set one.");let o=E5[i]??i,s=yo[o],a=t.custom_presets?.[o],c;if(i==="auto")c={description:"Use the current vendor's agent configuration",agent_defaults:{}};else if(s){if(o!==i)console.warn(`[resolve-agent-plan] Preset alias "${i}" redirected to "${o}". Update your config to use the canonical key.`);c=s}else if(a)if(a.extends)c=tRe(a,a.extends,t,new Set([o]));else c=a;else{let w=["auto","free",...Object.keys(yo)].join(", ");throw new On(`Unknown model_preset "${i}". Built-in presets: ${w}. Custom presets defined: ${Object.keys(t.custom_presets??{}).join(", ")||"(none)"}.`)}let l=e.replace(/-agent$/i,""),u=iu(e)??(t.agents?.[l]?l:e),d=c.agent_defaults[u]??c.agent_defaults.orchestrator,p=t.agents?.[u];if(i==="auto"&&!p)return{cli:j1(t.default_cli,r,n)};let f=p?{...d,...p}:d;if(!f||!d&&i!=="auto")throw new On(`Preset "${o}" has no agent_defaults for "${e}" and no orchestrator fallback. Custom presets without 'extends' must define every canonical agent role.`);if(p&&JSON.stringify(p)===JSON.stringify(d))console.debug(`[resolve-agent-plan] ${e}: override is identical to preset entry (no-op).`);let m=S5(f.model,t.models);if(!m)throw new On(Y_e(f.model,e));if(m.supports.api_only)throw new On(`Model "${f.model}" has api_only: true. CLI dispatch is not supported. Use a supported model.`);let h=r??n.OMA_RUNTIME_VENDOR?.trim().toLowerCase(),g=m.cli,y;if(h==="pi")g="pi",y=Q_e(f.model);else if(h)if(m.supports.native_dispatch_from.includes(h))g=h;else console.warn(`[resolve-agent-plan] ${e} agent: "${h}" is not in native_dispatch_from [${m.supports.native_dispatch_from.join(", ")}]. Falling back to external subprocess.`);let b=f.effort;if(g!=="pi"&&m.supports.effort?.type==="cli-session"&&b!==void 0)console.warn(`[resolve-agent-plan] effort field is ignored for Claude CLI (cli-session model). Remove 'effort' from agents.${e} in .agents/oma-config.yaml (or .agents/oma-config.cue).`),b=void 0;let k={cli:g,cliModel:y??m.cli_model,spec:m};if(b!==void 0)k.effort=b;if(f.thinking!==void 0)k.thinking=f.thinking;if(f.memory!==void 0)k.memory=f.memory;return k}function F1(e,t,r=process.env){let n=process.cwd(),i=Xa(n,r);return mx(e,i,t,r)}var hx=v(()=>{Ms();th();eh();N1();sd();X3();L1();NQ()});function rh(e,t){return e.replace(/\.agents\/(?=(?:skills|workflows|rules|agents|config|hooks|protocols)\/|oma-config\.|mcp\.json)/g,()=>`${t}/`)}import{readFileSync as hVt}from"node:fs";function nO(e){let t;try{t=JSON.parse(hVt(e.variantPath,"utf-8"))}catch(r){return console.warn(`[oma] Skipping malformed ${e.kind} variant ${e.variantPath}: ${r instanceof Error?r.message:String(r)}`),null}try{e.validate(t)}catch(r){return console.warn(`[oma] Skipping unsafe ${e.kind} variant ${e.variantPath}: ${r instanceof Error?r.message:String(r)}`),null}return t}var FQ=()=>{};import{existsSync as iO,mkdirSync as gVt,readdirSync as yVt,readFileSync as vVt}from"node:fs";import{join as z1}from"node:path";function wVt(e){return"maxTurns"}function xVt(e){return"timeoutMins"}function AVt(e){return e!=="opencode"&&e!=="qwen"}function nh(e){return JSON.stringify(e)}function SVt(e){return`"""
|
|
504
|
+
`)}}function OQ(e,t){let r=["oma-config.cue","oma-config.yaml"].map((s)=>ux(t,Q3.join(".agents",s))).filter((s)=>s!==null).sort((s,a)=>a.length-s.length)[0];if(!r)return"";let n=Q3.join(Q3.dirname(r),"agents");if(!D1.existsSync(n))return"";let i=iu(e)??e,o;try{o=D1.readdirSync(n).filter((s)=>s.endsWith(".md")).find((s)=>{let a=s.replace(/\.md$/,"");return a===e||iu(a)===i})}catch{return""}if(!o)return"";try{let{body:s}=Mr(D1.readFileSync(Q3.join(n,o),"utf-8"));return s.trim()}catch{return""}}var U_e=v(()=>{Os();C9();ZI()});function A5(e=process.env){let t=e.OMA_RUNTIME_VENDOR?.trim().toLowerCase();if(t&&H_e.has(t))return t;if(Object.keys(e).some((r)=>r.startsWith("CLAUDE_CODE_")))return"claude";if(e.CLAUDECODE==="1")return"claude";if(e.CODEX_THREAD_ID||e.CODEX_CI)return"codex";if(Object.keys(e).some((r)=>r.startsWith("ANTIGRAVITY_"))||e.ANTIGRAVITY_IDE==="1")return"antigravity";if(Object.keys(e).some((r)=>r.startsWith("QWEN_CODE_"))||e.QWEN_CODE==="1")return"qwen";if(e.GROK_WORKSPACE_ROOT||e.GROK_SESSION_ID||e.GROK_BUILD)return"grok";if(e.KIRO_SESSION_ID||e.KIRO_CHAT_LOG_FILE||e.KIRO_HOME)return"kiro";if(e.PI_CODING_AGENT==="true"||e.PI_CODING_AGENT==="1")return"pi";if(e.CURSOR_AGENT==="1"||e.CURSOR_CLI==="1"||typeof e.CURSOR_TRACE_ID==="string")return"cursor";return"unknown"}function j1(e,t,r=process.env){let n=A5(r),i=(t??(n==="unknown"?e??"claude":n)).trim().toLowerCase();if(!H_e.has(i))throw new On(`Unsupported auto dispatch vendor "${i}". Set default_cli to a supported CLI vendor.`);return i}var H_e;var L1=v(()=>{sd();H_e=new Set(["claude","codex","cursor","antigravity","qwen","grok","kimi","kiro","opencode","pi"])});function R9(e,t,r=process.env){let n=A5(r),i=t??r.OMA_RUNTIME_VENDOR??(["codex","claude","qwen"].includes(n)?n:e.default_cli??"codex");if(i!=="codex"&&i!=="claude"&&i!=="qwen")throw new Uo("The free preset supports codex, claude and qwen only. Select one with --vendor or default_cli.");return i}function ou(e,t=process.env){if(e.free!==void 0&&!G(e.free))throw new Uo("free must be a configuration object.");let r=e.free??{};if(Object.keys(r).some((c)=>!["base_url","api_key_env","model"].includes(c)))throw new Uo("Unknown free setting. Use base_url, api_key_env and model; keep API keys in environment variables.");for(let c of Object.values(r))if(typeof c!=="string"||!c.trim())throw new Uo("FreeLLMAPI settings must be non-empty strings.");let n=t.FREELLM_BASE_URL??r.base_url??"http://127.0.0.1:31415/v1",i;try{i=new URL(n)}catch{throw new Uo("FreeLLMAPI base_url must be an absolute HTTP(S) URL.")}if(!["http:","https:"].includes(i.protocol)||i.username||i.password||i.search||i.hash)throw new Uo("FreeLLMAPI base_url must be HTTP(S), without credentials, query parameters or fragments.");let o=i.href.replace(/\/+$/,""),s=r.api_key_env??"FREELLM_API_KEY";if(!/^[A-Za-z_][A-Za-z0-9_]*$/.test(s))throw new Uo("free.api_key_env must be an environment variable name.");let a=t.FREELLM_MODEL??r.model??"auto";if(!a.trim()||/[\r\n\0]/.test(a))throw new Uo("FreeLLMAPI model must be a non-empty model ID.");return{baseUrl:o.endsWith("/v1")?o:`${o}/v1`,apiKeyEnv:s,model:a}}function fx(e,t=process.env){let r=t[e.apiKeyEnv]?.trim()||(e.apiKeyEnv==="FREELLM_API_KEY"?t.FREELLMAPI_API_KEY?.trim():void 0);if(!r)throw new Uo(`FreeLLMAPI requires ${e.apiKeyEnv}${e.apiKeyEnv==="FREELLM_API_KEY"?" (or FREELLMAPI_API_KEY)":""}. No vendor fallback was attempted.`);if(/[\r\n\0]/.test(r))throw new Uo("FreeLLMAPI API key contains invalid characters.");return r}async function T9(e,t=process.env,r){let n=fx(e,t),i;try{i=await fetch(`${e.baseUrl}/models`,{headers:{Authorization:`Bearer ${n}`},signal:r?AbortSignal.any([r,AbortSignal.timeout(5000)]):AbortSignal.timeout(5000),redirect:"error"})}catch{throw new Uo(`Cannot reach FreeLLMAPI at ${e.baseUrl}. Start the server or check free.base_url.`)}if(await i.body?.cancel(),!i.ok)throw new Uo(`FreeLLMAPI readiness check returned HTTP ${i.status}. Check the unified API key and server configuration.`)}var Uo;var N1=v(()=>{L1();gt();Uo=class Uo extends Error{constructor(e){super(e);this.name="FreeProviderError"}}});var MQ;var G_e=v(()=>{MQ=new Map([["anthropic/claude-opus-4-7",{cli:"claude",cli_model:"claude-opus-4-7",supports:{effort:{type:"cli-session",auto_default:"high"},apply_patch:!1,task_budget:!0,prompt_cache:!0,computer_use:!1,native_dispatch_from:["claude"],api_only:!1},pricing_note:"$5/$25 per Mtok (reference only; not subscription cost)",auth_hint:"Requires Claude Max subscription ($200/mo)",subscription_tier:"claude_max"}],["anthropic/claude-sonnet-4-6",{cli:"claude",cli_model:"claude-sonnet-4-6",supports:{effort:{type:"cli-session",auto_default:"high"},apply_patch:!1,task_budget:!0,prompt_cache:!0,computer_use:!1,native_dispatch_from:["claude"],api_only:!1},auth_hint:"Requires Claude Pro or Max subscription"}],["anthropic/claude-haiku-4-5",{cli:"claude",cli_model:"claude-haiku-4-5",supports:{effort:{type:"cli-session",auto_default:"high"},apply_patch:!1,task_budget:!1,prompt_cache:!0,computer_use:!1,native_dispatch_from:["claude"],api_only:!1},auth_hint:"Requires Claude Pro or Max subscription"}],["openai/gpt-5.5",{cli:"codex",cli_model:"gpt-5.5",supports:{effort:{type:"granular",levels:["none","low","medium","high","xhigh"]},apply_patch:!0,task_budget:!1,prompt_cache:!1,computer_use:!0,native_dispatch_from:["codex"],api_only:!1},pricing_note:"$5/$30 per Mtok (reference only; improved token efficiency vs 5.4)",auth_hint:"Requires ChatGPT Plus or Pro subscription (default Codex CLI model)"}],["openai/gpt-5.4",{cli:"codex",cli_model:"gpt-5.4",supports:{effort:{type:"granular",levels:["none","low","medium","high","xhigh"]},apply_patch:!0,task_budget:!1,prompt_cache:!1,computer_use:!0,native_dispatch_from:["codex"],api_only:!1},auth_hint:"Requires ChatGPT Plus or Pro subscription"}],["openai/gpt-5.4-pro",{cli:"codex",cli_model:"gpt-5.4-pro",supports:{effort:{type:"granular",levels:["none","low","medium","high","xhigh"]},apply_patch:!0,task_budget:!1,prompt_cache:!1,computer_use:!0,native_dispatch_from:["codex"],api_only:!1},pricing_note:"$30/$180 per Mtok (reference only; use for special cases)",auth_hint:"Requires ChatGPT Pro subscription ($200/mo)",subscription_tier:"chatgpt_pro"}],["openai/gpt-5.4-mini",{cli:"codex",cli_model:"gpt-5.4-mini",supports:{effort:{type:"granular",levels:["none","low","medium","high","xhigh"]},apply_patch:!0,task_budget:!1,prompt_cache:!1,computer_use:!1,native_dispatch_from:["codex"],api_only:!1},pricing_note:"Uses only 30% Codex quota; recommended for official subagents",auth_hint:"Requires ChatGPT Plus subscription"}],["openai/gpt-5.3-codex",{cli:"codex",cli_model:"gpt-5.3-codex",supports:{effort:{type:"granular",levels:["none","low","medium","high","xhigh"]},apply_patch:!0,task_budget:!1,prompt_cache:!1,computer_use:!1,native_dispatch_from:["codex"],api_only:!1},auth_hint:"Requires ChatGPT Plus or Pro subscription"}],["antigravity/gemini-4-argon",{cli:"antigravity",cli_model:"Gemini 4 Argon (High)",supports:{effort:{type:"granular",levels:["low","medium","high"]},apply_patch:!1,task_budget:!1,prompt_cache:!0,computer_use:!1,native_dispatch_from:["antigravity"],api_only:!1},auth_hint:"Requires Antigravity CLI sign-in (Google AI Pro tier)",subscription_tier:"google_ai_pro"}],["antigravity/gemini-3.8-flash",{cli:"antigravity",cli_model:"Gemini 3.8 Flash (Medium)",supports:{effort:{type:"granular",levels:["low","medium","high"]},apply_patch:!1,task_budget:!1,prompt_cache:!0,computer_use:!1,native_dispatch_from:["antigravity"],api_only:!1},auth_hint:"Requires Antigravity CLI sign-in (Google AI Pro tier)",subscription_tier:"google_ai_pro"}],["cursor/composer-2.5",{cli:"cursor",cli_model:"composer-2.5",supports:{effort:null,apply_patch:!1,task_budget:!1,prompt_cache:!1,computer_use:!1,native_dispatch_from:["cursor"],api_only:!1},auth_hint:"Requires Cursor Pro or Pro Student subscription"}],["cursor/composer-2.5-fast",{cli:"cursor",cli_model:"composer-2.5-fast",supports:{effort:null,apply_patch:!1,task_budget:!1,prompt_cache:!1,computer_use:!1,native_dispatch_from:["cursor"],api_only:!1},auth_hint:"Requires Cursor Pro or Pro Student subscription"}],["cursor/composer-2",{cli:"cursor",cli_model:"composer-2",supports:{effort:null,apply_patch:!1,task_budget:!1,prompt_cache:!1,computer_use:!1,native_dispatch_from:["cursor"],api_only:!1},auth_hint:"Requires Cursor Pro or Pro Student subscription"}],["cursor/composer-2-fast",{cli:"cursor",cli_model:"composer-2-fast",supports:{effort:null,apply_patch:!1,task_budget:!1,prompt_cache:!1,computer_use:!1,native_dispatch_from:["cursor"],api_only:!1},auth_hint:"Requires Cursor Pro or Pro Student subscription"}],["cursor/auto",{cli:"cursor",cli_model:"auto",supports:{effort:null,apply_patch:!1,task_budget:!1,prompt_cache:!1,computer_use:!1,native_dispatch_from:["cursor"],api_only:!1},auth_hint:"Requires Cursor Pro or Pro Student subscription (auto routing; quota-friendly)"}],["kiro/claude-sonnet-4-5",{cli:"kiro",cli_model:"anthropic.claude-sonnet-4-5-20251001-v1:0",supports:{effort:null,apply_patch:!1,task_budget:!1,prompt_cache:!1,computer_use:!1,native_dispatch_from:["kiro"],api_only:!1},auth_hint:"Requires AWS Builder ID or IAM Identity Center (Kiro CLI)"}],["kiro/claude-haiku-3-5",{cli:"kiro",cli_model:"anthropic.claude-haiku-3-5-20241022-v1:0",supports:{effort:null,apply_patch:!1,task_budget:!1,prompt_cache:!1,computer_use:!1,native_dispatch_from:["kiro"],api_only:!1},auth_hint:"Requires AWS Builder ID or IAM Identity Center (Kiro CLI)"}],["kiro/auto",{cli:"kiro",cli_model:"auto",supports:{effort:null,apply_patch:!1,task_budget:!1,prompt_cache:!1,computer_use:!1,native_dispatch_from:["kiro"],api_only:!1},auth_hint:"Requires AWS Builder ID or IAM Identity Center (Kiro CLI — auto model selection)"}],["qwen/qwen3.6-plus",{cli:"qwen",cli_model:"qwen3.6-plus",supports:{effort:{type:"binary-thinking"},apply_patch:!1,task_budget:!1,prompt_cache:!1,computer_use:!1,native_dispatch_from:[],api_only:!1},pricing_note:"1M context, enhanced agentic coding (released 2026-04)",auth_hint:"Requires Qwen Code subscription or Bailian Coding Plan API key"}],["qwen/qwen3-coder-plus",{cli:"qwen",cli_model:"qwen3-coder-plus",supports:{effort:{type:"binary-thinking"},apply_patch:!1,task_budget:!1,prompt_cache:!1,computer_use:!1,native_dispatch_from:[],api_only:!1},auth_hint:"Requires Qwen Code subscription (API key re-authentication required; OAuth deprecated 2026-04-15)"}],["qwen/qwen3-coder-next",{cli:"qwen",cli_model:"qwen3-coder-next",supports:{effort:{type:"binary-thinking"},apply_patch:!1,task_budget:!1,prompt_cache:!1,computer_use:!1,native_dispatch_from:[],api_only:!1},auth_hint:"Requires Qwen Code subscription (API key re-authentication required; OAuth deprecated 2026-04-15)"}]])});var W_e;var V_e=v(()=>{W_e=["claude","codex","cursor","antigravity","qwen","kiro","kimi","opencode"]});var iVt,oVt,q_e,sVt,aVt,QI;var DQ=v(()=>{Ki();C2();V_e();iVt=et(W_e),oVt=et([...zl,"opencode"]),q_e=et(["none","low","medium","high","xhigh"]),sVt=et(["none","dynamic","fixed"]),aVt=l3([ye({type:nn("granular"),levels:Me(q_e)}),ye({type:nn("cli-session"),auto_default:q_e}),ye({type:nn("thinking-budget"),modes:Me(sVt)}),ye({type:nn("binary-thinking")}),zve()]),QI=ye({cli:oVt,cli_model:W().min(1),supports:ye({effort:aVt,apply_patch:yr(),task_budget:yr(),prompt_cache:yr(),computer_use:yr(),native_dispatch_from:Me(iVt),api_only:yr()}),pricing_note:W().optional(),auth_hint:W().min(1),subscription_tier:W().optional()})});function P9(e){let t=br(e)?.models;return t&&typeof t==="object"&&!Array.isArray(t)?t:void 0}function jQ(e){let t=P9(e);if(!t)return new Map;let r=new Map;for(let[n,i]of Object.entries(t)){let o=QI.safeParse(i);if(!o.success)continue;let s=o.data;if(s.supports.api_only)continue;r.set(n,s)}return r}var LQ=v(()=>{kr();DQ()});function cVt(){let e=new Map;for(let[t,r]of MQ){if(r.supports.api_only)continue;e.set(t,r)}return e}function tO(){if(eO!==null)return eO;return lVt()}function lVt(e){let t=new Map(K_e),r=jQ(e);for(let[n,i]of r){if(K_e.has(n))console.warn(`[model-registry] User override for slug "${n}"`);t.set(n,i)}return eO=t,eO}function S5(e,t){if(t&&Object.hasOwn(t,e)){let r=t[e],n=QI.safeParse(r);if(n.success){let i=n.data;if(i.supports.api_only)console.warn(`[model-registry] User inline model "${e}": api_only=true is not supported in CLI-only mode — falling back to core registry.`);else{if(tO().has(e))console.warn(`[model-registry] User inline model "${e}" overrides a core registry entry.`);return i}}else console.warn(`[model-registry] User inline model "${e}" failed validation — falling back to core registry. Errors: ${n.error.issues.map((i)=>i.message).join("; ")}`)}return tO().get(e)}function I9(e){if(e in rO)return rO[e];if(e.startsWith("opencode-"))return"opencode";return}function uVt(e){let t=`${e}/`;return Array.from(MQ.keys()).filter((r)=>r.startsWith(t)).sort()}function Y_e(e,t){let r=t?`for agent "${t}"`:"",n=e.split("/"),i=n[0]??"",o=n.slice(1).join("/"),s=i?rO[i]:void 0,a=[`Unknown model slug "${e}"${r?` ${r}`:""}.`,""];if(s&&o){let c=uVt(i);if(a.push(`This looks like an OpenRouter slug for ${i} (CLI: ${s}).`,`If your ${s} CLI accepts this model, register it in .agents/oma-config.yaml (or .agents/oma-config.cue):`,"","models:",` ${e}:`,` cli: ${s}`,` cli_model: ${o} # confirm via \`${s} --help\``," supports:",` native_dispatch_from: [${s}]`,""),c.length>0)a.push(`Built-in ${i} slugs you can use without a models: block:`,...c.map((l)=>` - ${l}`),"");a.push("Browse all OpenRouter models: https://openrouter.ai/models")}else{let c=Object.entries(rO).map(([l,u])=>`${l} (${u})`).join(", ");a.push(`Owner "${i??"<missing>"}" is not bundled with a forkable CLI.`,`Supported owners: ${c}.`,"",`If "${i??"<missing>"}" has a CLI you can shell out to, register it manually:`,"models:",` ${e}:`," cli: <your-cli-binary>",` cli_model: ${o||"<model-name>"}`," supports:"," native_dispatch_from: [<your-cli-binary>]")}return a.join(`
|
|
505
|
+
`)}var eO=null,K_e,J_e,rO;var eh=v(()=>{G_e();DQ();LQ();LQ();K_e=cVt();J_e=new Proxy({},{get(e,t,r){let n=tO(),i=Reflect.get(n,t,n);if(typeof i==="function")return i.bind(n);return i},has(e,t){return Reflect.has(tO(),t)}});rO={anthropic:"claude",openai:"codex",antigravity:"antigravity",cursor:"cursor",qwen:"qwen",kiro:"kiro",opencode:"opencode"}});function dVt(){for(let[e,t]of Object.entries(yo))for(let r of X_e){let n=t.agent_defaults[r];if(!n)throw Error(`[built-in-presets] Preset "${e}" is missing agent_defaults for "${r}". All ${X_e.length} canonical agent roles are required for built-in presets.`);if(!S5(n.model))throw Error(`[built-in-presets] Preset "${e}" agent "${r}" references unknown model slug "${n.model}". Add it to the model registry or update the preset.`)}}var yo,E5,X_e;var th=v(()=>{eh();yo={antigravity:{description:"Antigravity CLI (agy) — nominal Gemini 4 Argon for impl/architecture, Gemini 3.8 Flash for orchestration & explore (agy 1.0 has no `--model` flag, so the model is selected by agy's own config)",agent_defaults:{orchestrator:{model:"antigravity/gemini-3.8-flash"},architecture:{model:"antigravity/gemini-4-argon"},qa:{model:"antigravity/gemini-4-argon"},pm:{model:"antigravity/gemini-3.8-flash"},backend:{model:"antigravity/gemini-4-argon"},frontend:{model:"antigravity/gemini-4-argon"},mobile:{model:"antigravity/gemini-4-argon"},db:{model:"antigravity/gemini-4-argon"},debug:{model:"antigravity/gemini-4-argon"},refactor:{model:"antigravity/gemini-4-argon"},docs:{model:"antigravity/gemini-3.8-flash"},"tf-infra":{model:"antigravity/gemini-4-argon"},explore:{model:"antigravity/gemini-3.8-flash"}}},claude:{description:"Claude — Max subscription holders",agent_defaults:{orchestrator:{model:"anthropic/claude-sonnet-4-6"},architecture:{model:"anthropic/claude-opus-4-7"},qa:{model:"anthropic/claude-sonnet-4-6"},pm:{model:"anthropic/claude-sonnet-4-6"},backend:{model:"anthropic/claude-sonnet-4-6"},frontend:{model:"anthropic/claude-sonnet-4-6"},mobile:{model:"anthropic/claude-sonnet-4-6"},db:{model:"anthropic/claude-sonnet-4-6"},debug:{model:"anthropic/claude-sonnet-4-6"},refactor:{model:"anthropic/claude-sonnet-4-6"},docs:{model:"anthropic/claude-sonnet-4-6"},"tf-infra":{model:"anthropic/claude-sonnet-4-6"},explore:{model:"anthropic/claude-haiku-4-5"}}},codex:{description:"Codex — ChatGPT Plus/Pro",agent_defaults:{orchestrator:{model:"openai/gpt-5.5",effort:"medium"},architecture:{model:"openai/gpt-5.5",effort:"high"},qa:{model:"openai/gpt-5.5",effort:"high"},pm:{model:"openai/gpt-5.5",effort:"medium"},backend:{model:"openai/gpt-5.5",effort:"high"},frontend:{model:"openai/gpt-5.5",effort:"high"},mobile:{model:"openai/gpt-5.5",effort:"high"},db:{model:"openai/gpt-5.5",effort:"high"},debug:{model:"openai/gpt-5.5",effort:"high"},refactor:{model:"openai/gpt-5.5",effort:"high"},docs:{model:"openai/gpt-5.5",effort:"medium"},"tf-infra":{model:"openai/gpt-5.5",effort:"high"},explore:{model:"openai/gpt-5.4-mini",effort:"low"}}},qwen:{description:"Qwen Code — native subagents support per-agent model selection; Qwen has no --effort, only binary --thinking",agent_defaults:{orchestrator:{model:"qwen/qwen3-coder-next",thinking:!1},architecture:{model:"qwen/qwen3.6-plus",thinking:!0},qa:{model:"qwen/qwen3.6-plus",thinking:!0},pm:{model:"qwen/qwen3-coder-next",thinking:!1},backend:{model:"qwen/qwen3.6-plus",thinking:!0},frontend:{model:"qwen/qwen3.6-plus",thinking:!0},mobile:{model:"qwen/qwen3.6-plus",thinking:!0},db:{model:"qwen/qwen3.6-plus",thinking:!0},debug:{model:"qwen/qwen3.6-plus",thinking:!0},refactor:{model:"qwen/qwen3.6-plus",thinking:!0},docs:{model:"qwen/qwen3-coder-next",thinking:!1},"tf-infra":{model:"qwen/qwen3.6-plus",thinking:!0},explore:{model:"qwen/qwen3-coder-next",thinking:!1}}},kiro:{description:"Kiro CLI — AWS Bedrock via CodeWhisperer/Q; sonnet for impl/architecture, haiku for explore/orchestration",agent_defaults:{orchestrator:{model:"kiro/claude-haiku-3-5"},architecture:{model:"kiro/claude-sonnet-4-5"},qa:{model:"kiro/claude-sonnet-4-5"},pm:{model:"kiro/claude-haiku-3-5"},backend:{model:"kiro/claude-sonnet-4-5"},frontend:{model:"kiro/claude-sonnet-4-5"},mobile:{model:"kiro/claude-sonnet-4-5"},db:{model:"kiro/claude-sonnet-4-5"},debug:{model:"kiro/claude-sonnet-4-5"},refactor:{model:"kiro/claude-sonnet-4-5"},docs:{model:"kiro/claude-haiku-3-5"},"tf-infra":{model:"kiro/claude-sonnet-4-5"},explore:{model:"kiro/claude-haiku-3-5"}}},cursor:{description:"Cursor — Cursor Pro / Pro Student",agent_defaults:{orchestrator:{model:"cursor/composer-2.5-fast"},architecture:{model:"cursor/composer-2.5"},qa:{model:"cursor/composer-2.5-fast"},pm:{model:"cursor/composer-2.5-fast"},backend:{model:"cursor/composer-2.5"},frontend:{model:"cursor/composer-2.5"},mobile:{model:"cursor/composer-2.5"},db:{model:"cursor/composer-2.5"},debug:{model:"cursor/composer-2.5"},refactor:{model:"cursor/composer-2.5"},docs:{model:"cursor/composer-2.5-fast"},"tf-infra":{model:"cursor/composer-2.5"},explore:{model:"cursor/composer-2.5-fast"}}},mixed:{description:"Mixed — role-optimal vendors per agent (Claude for orchestration/QA/PM, Codex for impl/explore)",agent_defaults:{orchestrator:{model:"anthropic/claude-sonnet-4-6"},architecture:{model:"anthropic/claude-opus-4-7"},qa:{model:"anthropic/claude-sonnet-4-6"},pm:{model:"anthropic/claude-sonnet-4-6"},backend:{model:"openai/gpt-5.5",effort:"high"},frontend:{model:"openai/gpt-5.5",effort:"high"},mobile:{model:"openai/gpt-5.5",effort:"high"},db:{model:"openai/gpt-5.5",effort:"high"},debug:{model:"openai/gpt-5.5",effort:"high"},refactor:{model:"openai/gpt-5.5",effort:"high"},docs:{model:"anthropic/claude-sonnet-4-6"},"tf-infra":{model:"openai/gpt-5.5",effort:"high"},explore:{model:"openai/gpt-5.4-mini",effort:"low"}}}},E5={"claude-only":"claude","codex-only":"codex",gemini:"antigravity","qwen-only":"qwen","cursor-only":"cursor"},X_e=["orchestrator","architecture","qa","pm","backend","frontend","mobile","db","debug","refactor","docs","tf-infra","explore"];dVt()});function pVt(e,t){let r=S5(e,t);if(r?.cli)return r.cli;let n=e.split("/")[0]??e;return I9(n)??n}function ad(e){let t=[],r=/[^\s"']+|"([^"]*)"|'([^']*)'/g,n=r.exec(e);while(n!==null){if(n[1]!==void 0)t.push(n[1]);else if(n[2]!==void 0)t.push(n[2]);else if(n[0])t.push(n[0]);n=r.exec(e)}return t}function fVt(e,t){if(e.model_preset==="auto")return;let r=E5[e.model_preset]??e.model_preset,n=yo[r],i=e.custom_presets?.[r],o;if(n)o=n;else if(i)if(i.extends){let s=E5[i.extends]??i.extends,a=yo[s]??e.custom_presets?.[s];o=a?{...a,agent_defaults:{...a.agent_defaults,...i.agent_defaults}}:i}else o=i;return o?.agent_defaults[t]??o?.agent_defaults.orchestrator}function oi(e,t){let r=process.cwd(),n=B_e(r),i=br(r),o=i?.agents,s=i?.default_cli;if(i?.model_preset==="free")return ou(i),{vendor:R9(i,t),config:n};let a=e.replace(/-agent$/i,""),c=[e,a,...Z3[e]??[],...Z3[a]??[]],l=c.find((f)=>f&&o?.[f]),u=l?o?.[l]:void 0;if(!u&&i){let f=c.find((m)=>lx.has(m))??a;u=fVt(i,f)}let d=u?pVt(u.model,i?.models):void 0;return{vendor:(t||d||(i?.model_preset==="auto"?j1(s):s||"claude")).toLowerCase(),config:n}}function zc(e,t){if(t!==void 0)return t;let r={claude:"-p",qwen:"-p",codex:null,cursor:null,opencode:null};if(Object.hasOwn(r,e))return r[e];return"-p"}var Z_e=v(()=>{L1();kr();N1();th();eh();C9();ZI()});var Ms=v(()=>{C9();ZI();U_e();IQ();Z_e()});function Q_e(e){let t=e.indexOf("/");if(t===-1)return e;let r=e.slice(0,t);if(mVt.has(r))return e;throw new On(`Model "${e}" cannot be dispatched via pi: "${r}" is a CLI-proprietary owner, not an LLM provider pi proxies to. Use a real-provider preset (claude, codex, or mixed) when dispatching agents through pi.`)}function eRe(e){if(e.thinking===!1)return"off";if(e.thinking===!0&&e.effort===void 0)return"high";switch(e.effort){case"none":return"off";case"low":return"low";case"medium":return"medium";case"high":return"high";case"xhigh":return"xhigh";default:return null}}var mVt;var NQ=v(()=>{sd();mVt=new Set(["anthropic","openai","google"])});function tRe(e,t,r,n){if(n.has(t))throw new On(`Circular extends chain detected at preset "${t}". Chain: ${[...n].join(" → ")} → ${t}`);n.add(t);let i=yo[t];if(i)return{description:e.description,agent_defaults:{...i.agent_defaults,...e.agent_defaults}};let o=r.custom_presets?.[t];if(o){let s=o;if(o.extends)s=tRe(o,o.extends,r,n);return{description:e.description,agent_defaults:{...s.agent_defaults,...e.agent_defaults}}}throw new On(`Preset "${t}" referenced in 'extends' is not a built-in preset and not found in custom_presets.`)}function mx(e,t,r,n=process.env){let i=t.model_preset;if(i==="free"){let w=ou(t,n);return{cli:R9(t,r,n),cliModel:w.model,freeProvider:w}}if(!i)throw new On("'model_preset' is missing from .agents/oma-config.yaml (or .agents/oma-config.cue). Run 'oma install --preset <name>' to set one.");let o=E5[i]??i,s=yo[o],a=t.custom_presets?.[o],c;if(i==="auto")c={description:"Use the current vendor's agent configuration",agent_defaults:{}};else if(s){if(o!==i)console.warn(`[resolve-agent-plan] Preset alias "${i}" redirected to "${o}". Update your config to use the canonical key.`);c=s}else if(a)if(a.extends)c=tRe(a,a.extends,t,new Set([o]));else c=a;else{let w=["auto","free",...Object.keys(yo)].join(", ");throw new On(`Unknown model_preset "${i}". Built-in presets: ${w}. Custom presets defined: ${Object.keys(t.custom_presets??{}).join(", ")||"(none)"}.`)}let l=e.replace(/-agent$/i,""),u=iu(e)??(t.agents?.[l]?l:e),d=c.agent_defaults[u]??c.agent_defaults.orchestrator,p=t.agents?.[u];if(i==="auto"&&!p)return{cli:j1(t.default_cli,r,n)};let f=p?{...d,...p}:d;if(!f||!d&&i!=="auto")throw new On(`Preset "${o}" has no agent_defaults for "${e}" and no orchestrator fallback. Custom presets without 'extends' must define every canonical agent role.`);if(p&&JSON.stringify(p)===JSON.stringify(d))console.debug(`[resolve-agent-plan] ${e}: override is identical to preset entry (no-op).`);let m=S5(f.model,t.models);if(!m)throw new On(Y_e(f.model,e));if(m.supports.api_only)throw new On(`Model "${f.model}" has api_only: true. CLI dispatch is not supported. Use a supported model.`);let h=r??n.OMA_RUNTIME_VENDOR?.trim().toLowerCase(),g=m.cli,y;if(h==="pi")g="pi",y=Q_e(f.model);else if(h)if(m.supports.native_dispatch_from.includes(h))g=h;else console.warn(`[resolve-agent-plan] ${e} agent: "${h}" is not in native_dispatch_from [${m.supports.native_dispatch_from.join(", ")}]. Falling back to external subprocess.`);let b=f.effort;if(g!=="pi"&&m.supports.effort?.type==="cli-session"&&b!==void 0)console.warn(`[resolve-agent-plan] effort field is ignored for Claude CLI (cli-session model). Remove 'effort' from agents.${e} in .agents/oma-config.yaml (or .agents/oma-config.cue).`),b=void 0;let k={cli:g,cliModel:y??m.cli_model,spec:m};if(b!==void 0)k.effort=b;if(f.thinking!==void 0)k.thinking=f.thinking;if(f.memory!==void 0)k.memory=f.memory;return k}function F1(e,t,r=process.env){let n=process.cwd(),i=Xa(n,r);return mx(e,i,t,r)}var hx=v(()=>{Ms();th();eh();N1();sd();X3();L1();NQ()});function rh(e,t){return e.replace(/\.agents\/(?=(?:skills|workflows|rules|agents|config|hooks|protocols)\/|oma-config\.|mcp\.json)/g,()=>`${t}/`)}import{readFileSync as hVt}from"node:fs";function nO(e){let t;try{t=JSON.parse(hVt(e.variantPath,"utf-8"))}catch(r){return console.warn(`[oma] Skipping malformed ${e.kind} variant ${e.variantPath}: ${r instanceof Error?r.message:String(r)}`),null}try{e.validate(t)}catch(r){return console.warn(`[oma] Skipping unsafe ${e.kind} variant ${e.variantPath}: ${r instanceof Error?r.message:String(r)}`),null}return t}var FQ=()=>{};import{existsSync as iO,mkdirSync as gVt,readdirSync as yVt,readFileSync as vVt}from"node:fs";import{join as z1}from"node:path";function wVt(e){return"maxTurns"}function xVt(e){return"timeoutMins"}function AVt(e){return e!=="opencode"&&e!=="qwen"}function nh(e){return JSON.stringify(e)}function SVt(e){return`"""
|
|
506
506
|
${e.replaceAll('"""',"\\\"\\\"\\\"").trim()}
|
|
507
507
|
"""`}function $Vt(e){let t=e.indexOf(EVt),r=e.indexOf(rRe);if(t===-1||r===-1||r<t)return e;let n=r+rRe.length,i=e.slice(n).replace(/^\n/,"");return e.slice(0,t)+i}function nRe(e,t){return e.replace("Follow the vendor-specific execution protocol:",`Follow \`${t}\`:`)}function CVt(e){let t=z1(e,".agents","agents");if(!iO(t))return[];return yVt(t,{withFileTypes:!0}).filter((r)=>r.isFile()&&r.name.endsWith(".md")).map((r)=>{let n=r.name,i=n.replace(".md",""),o=vVt(z1(t,n),"utf-8"),{frontmatter:s,body:a}=Mr(o);return{agentKey:i,entry:n,frontmatter:s,body:a}})}function _Vt(e,t,r,n,i,o=".agents"){let{agentKey:s,entry:a,frontmatter:c,body:l}=e,u=bVt[n]||{},d=r.tools||c.tools||t.toolsDefault,f=(Array.isArray(d)?d:String(d||"").split(",").map((x)=>x.trim()).filter(Boolean)).map((x)=>u[x.toLowerCase()]||x),m=Array.isArray(t.toolsDefault)?f:f.join(", "),h=Array.isArray(m)?m.length>0:m.trim().length>0,g=r.model||c.model||t.modelDefault,y={name:c.name||s,description:r.description||c.description,tools:h?m:void 0,model:(n==="opencode"||n==="qwen")&&g==="inherit"?void 0:g};if(t.maxTurnsDefault||r.maxTurns||c.maxTurns)y[wVt(n)]=r.maxTurns||c.maxTurns||t.maxTurnsDefault;if(r.effort)if(n==="opencode")y.variant=r.effort;else y.effort=r.effort;if(r.kind)y.kind=r.kind;if(r.temperature!==void 0)y.temperature=r.temperature;if(r.timeoutMins!==void 0)y[xVt(n)]=r.timeoutMins;if(r.mcpServers)y.mcpServers=r.mcpServers;if(c.skills&&AVt(n))y.skills=c.skills;if(r.extra)Object.assign(y,r.extra);if(n==="opencode")y.mode="subagent";let b=rh(i==="Simple"?$Vt(l):l,o),k=t.protocolPath?.replace(/^\.agents\//,`${o}/`),w=`<!-- Generated by oh-my-agent CLI. Source: ${o}/agents/${a} -->
|
|
508
508
|
${nRe(b,k)}`,A=PVt(y,n);return{fileName:a,content:E9(A,w)}}function RVt(e,t,r,n=".agents"){let{agentKey:i,entry:o,frontmatter:s,body:a}=e,c=s.name||i,l=String(r.description||s.description||c),u=String(r.model||s.model||t.modelDefault),d=r.effort||t.effortDefault||"medium",p=typeof r.extra?.sandbox_mode==="string"?r.extra.sandbox_mode:"workspace-write",f=nRe(rh(a,n),t.protocolPath?.replace(/^\.agents\//,`${n}/`)),m=Array.isArray(s.skills)?s.skills.map((g)=>String(g)).filter(Boolean):[],h=[`# Generated by oh-my-agent CLI. Source: ${n}/agents/${o}`,`name = ${nh(c)}`,`description = ${nh(l)}`,`model = ${nh(u)}`,`model_reasoning_effort = ${nh(d)}`,`sandbox_mode = ${nh(p)}`,`developer_instructions = ${SVt(f)}`];for(let g of m)h.push(""),h.push("[[skills.config]]"),h.push(`path = ${nh(`${n}/skills/${g}/SKILL.md`)}`),h.push("enabled = true");if(r.mcpServers&&Object.keys(r.mcpServers).length>0){h.push(""),h.push("[mcp_servers]");for(let[g,y]of Object.entries(r.mcpServers))h.push(`${g} = ${nh(String(y))}`)}return{fileName:`${i}.toml`,content:`${h.join(`
|
|
@@ -1057,7 +1057,7 @@ ${c}`:`${a}${c}`;try{if(l.length===0)return Ier(n),[`CLAUDE.md removed (OMA bloc
|
|
|
1057
1057
|
`:Uee(l);return Zt(n,u),[`CLAUDE.md: OMA block replaced with @AGENTS.md import (Claude Code >= ${JM} reads AGENTS.md)`]}catch{return[]}}}}var Mer="<!-- OMA:START",HDe="<!-- OMA:END -->",GDe;var WDe=v(()=>{HO();Zte();ni();Ea();GDe=Der()});var VDe=()=>{};function V(e,t){jer(Boolean(e),!1,!0,"ok","Expected value to be truthy",t)}function jer(e,t,r,n,i,o){if(!e)throw o instanceof Error?o:new qDe(o||i,t,r,n,!o)}var qDe;var Mt=v(()=>{VDe();qDe=class qDe extends Error{name="Assertion";code="ERR_ASSERTION";constructor(e,t,r,n,i){super(e);if(Error.captureStackTrace)Error.captureStackTrace(this,this.constructor);this.actual=t,this.expected=r,this.generated=i,this.operator=n}}});function Ih(e,t){let r=t||Ler,n=typeof r.includeImageAlt==="boolean"?r.includeImageAlt:!0,i=typeof r.includeHtml==="boolean"?r.includeHtml:!0;return JDe(e,n,i)}function JDe(e,t,r){if(Ner(e)){if("value"in e)return e.type==="html"&&!r?"":e.value;if(t&&"alt"in e&&e.alt)return e.alt;if("children"in e)return KDe(e.children,t,r)}if(Array.isArray(e))return KDe(e,t,r);return""}function KDe(e,t,r){let n=[],i=-1;while(++i<e.length)n[i]=JDe(e[i],t,r);return n.join("")}function Ner(e){return Boolean(e&&typeof e==="object")}var Ler;var YDe=v(()=>{Ler={}});var XM=v(()=>{YDe()});var Qte;var XDe=v(()=>{Qte={AElig:"Æ",AMP:"&",Aacute:"Á",Abreve:"Ă",Acirc:"Â",Acy:"А",Afr:"\uD835\uDD04",Agrave:"À",Alpha:"Α",Amacr:"Ā",And:"⩓",Aogon:"Ą",Aopf:"\uD835\uDD38",ApplyFunction:"",Aring:"Å",Ascr:"\uD835\uDC9C",Assign:"≔",Atilde:"Ã",Auml:"Ä",Backslash:"∖",Barv:"⫧",Barwed:"⌆",Bcy:"Б",Because:"∵",Bernoullis:"ℬ",Beta:"Β",Bfr:"\uD835\uDD05",Bopf:"\uD835\uDD39",Breve:"˘",Bscr:"ℬ",Bumpeq:"≎",CHcy:"Ч",COPY:"©",Cacute:"Ć",Cap:"⋒",CapitalDifferentialD:"ⅅ",Cayleys:"ℭ",Ccaron:"Č",Ccedil:"Ç",Ccirc:"Ĉ",Cconint:"∰",Cdot:"Ċ",Cedilla:"¸",CenterDot:"·",Cfr:"ℭ",Chi:"Χ",CircleDot:"⊙",CircleMinus:"⊖",CirclePlus:"⊕",CircleTimes:"⊗",ClockwiseContourIntegral:"∲",CloseCurlyDoubleQuote:"”",CloseCurlyQuote:"’",Colon:"∷",Colone:"⩴",Congruent:"≡",Conint:"∯",ContourIntegral:"∮",Copf:"ℂ",Coproduct:"∐",CounterClockwiseContourIntegral:"∳",Cross:"⨯",Cscr:"\uD835\uDC9E",Cup:"⋓",CupCap:"≍",DD:"ⅅ",DDotrahd:"⤑",DJcy:"Ђ",DScy:"Ѕ",DZcy:"Џ",Dagger:"‡",Darr:"↡",Dashv:"⫤",Dcaron:"Ď",Dcy:"Д",Del:"∇",Delta:"Δ",Dfr:"\uD835\uDD07",DiacriticalAcute:"´",DiacriticalDot:"˙",DiacriticalDoubleAcute:"˝",DiacriticalGrave:"`",DiacriticalTilde:"˜",Diamond:"⋄",DifferentialD:"ⅆ",Dopf:"\uD835\uDD3B",Dot:"¨",DotDot:"⃜",DotEqual:"≐",DoubleContourIntegral:"∯",DoubleDot:"¨",DoubleDownArrow:"⇓",DoubleLeftArrow:"⇐",DoubleLeftRightArrow:"⇔",DoubleLeftTee:"⫤",DoubleLongLeftArrow:"⟸",DoubleLongLeftRightArrow:"⟺",DoubleLongRightArrow:"⟹",DoubleRightArrow:"⇒",DoubleRightTee:"⊨",DoubleUpArrow:"⇑",DoubleUpDownArrow:"⇕",DoubleVerticalBar:"∥",DownArrow:"↓",DownArrowBar:"⤓",DownArrowUpArrow:"⇵",DownBreve:"̑",DownLeftRightVector:"⥐",DownLeftTeeVector:"⥞",DownLeftVector:"↽",DownLeftVectorBar:"⥖",DownRightTeeVector:"⥟",DownRightVector:"⇁",DownRightVectorBar:"⥗",DownTee:"⊤",DownTeeArrow:"↧",Downarrow:"⇓",Dscr:"\uD835\uDC9F",Dstrok:"Đ",ENG:"Ŋ",ETH:"Ð",Eacute:"É",Ecaron:"Ě",Ecirc:"Ê",Ecy:"Э",Edot:"Ė",Efr:"\uD835\uDD08",Egrave:"È",Element:"∈",Emacr:"Ē",EmptySmallSquare:"◻",EmptyVerySmallSquare:"▫",Eogon:"Ę",Eopf:"\uD835\uDD3C",Epsilon:"Ε",Equal:"⩵",EqualTilde:"≂",Equilibrium:"⇌",Escr:"ℰ",Esim:"⩳",Eta:"Η",Euml:"Ë",Exists:"∃",ExponentialE:"ⅇ",Fcy:"Ф",Ffr:"\uD835\uDD09",FilledSmallSquare:"◼",FilledVerySmallSquare:"▪",Fopf:"\uD835\uDD3D",ForAll:"∀",Fouriertrf:"ℱ",Fscr:"ℱ",GJcy:"Ѓ",GT:">",Gamma:"Γ",Gammad:"Ϝ",Gbreve:"Ğ",Gcedil:"Ģ",Gcirc:"Ĝ",Gcy:"Г",Gdot:"Ġ",Gfr:"\uD835\uDD0A",Gg:"⋙",Gopf:"\uD835\uDD3E",GreaterEqual:"≥",GreaterEqualLess:"⋛",GreaterFullEqual:"≧",GreaterGreater:"⪢",GreaterLess:"≷",GreaterSlantEqual:"⩾",GreaterTilde:"≳",Gscr:"\uD835\uDCA2",Gt:"≫",HARDcy:"Ъ",Hacek:"ˇ",Hat:"^",Hcirc:"Ĥ",Hfr:"ℌ",HilbertSpace:"ℋ",Hopf:"ℍ",HorizontalLine:"─",Hscr:"ℋ",Hstrok:"Ħ",HumpDownHump:"≎",HumpEqual:"≏",IEcy:"Е",IJlig:"IJ",IOcy:"Ё",Iacute:"Í",Icirc:"Î",Icy:"И",Idot:"İ",Ifr:"ℑ",Igrave:"Ì",Im:"ℑ",Imacr:"Ī",ImaginaryI:"ⅈ",Implies:"⇒",Int:"∬",Integral:"∫",Intersection:"⋂",InvisibleComma:"",InvisibleTimes:"",Iogon:"Į",Iopf:"\uD835\uDD40",Iota:"Ι",Iscr:"ℐ",Itilde:"Ĩ",Iukcy:"І",Iuml:"Ï",Jcirc:"Ĵ",Jcy:"Й",Jfr:"\uD835\uDD0D",Jopf:"\uD835\uDD41",Jscr:"\uD835\uDCA5",Jsercy:"Ј",Jukcy:"Є",KHcy:"Х",KJcy:"Ќ",Kappa:"Κ",Kcedil:"Ķ",Kcy:"К",Kfr:"\uD835\uDD0E",Kopf:"\uD835\uDD42",Kscr:"\uD835\uDCA6",LJcy:"Љ",LT:"<",Lacute:"Ĺ",Lambda:"Λ",Lang:"⟪",Laplacetrf:"ℒ",Larr:"↞",Lcaron:"Ľ",Lcedil:"Ļ",Lcy:"Л",LeftAngleBracket:"⟨",LeftArrow:"←",LeftArrowBar:"⇤",LeftArrowRightArrow:"⇆",LeftCeiling:"⌈",LeftDoubleBracket:"⟦",LeftDownTeeVector:"⥡",LeftDownVector:"⇃",LeftDownVectorBar:"⥙",LeftFloor:"⌊",LeftRightArrow:"↔",LeftRightVector:"⥎",LeftTee:"⊣",LeftTeeArrow:"↤",LeftTeeVector:"⥚",LeftTriangle:"⊲",LeftTriangleBar:"⧏",LeftTriangleEqual:"⊴",LeftUpDownVector:"⥑",LeftUpTeeVector:"⥠",LeftUpVector:"↿",LeftUpVectorBar:"⥘",LeftVector:"↼",LeftVectorBar:"⥒",Leftarrow:"⇐",Leftrightarrow:"⇔",LessEqualGreater:"⋚",LessFullEqual:"≦",LessGreater:"≶",LessLess:"⪡",LessSlantEqual:"⩽",LessTilde:"≲",Lfr:"\uD835\uDD0F",Ll:"⋘",Lleftarrow:"⇚",Lmidot:"Ŀ",LongLeftArrow:"⟵",LongLeftRightArrow:"⟷",LongRightArrow:"⟶",Longleftarrow:"⟸",Longleftrightarrow:"⟺",Longrightarrow:"⟹",Lopf:"\uD835\uDD43",LowerLeftArrow:"↙",LowerRightArrow:"↘",Lscr:"ℒ",Lsh:"↰",Lstrok:"Ł",Lt:"≪",Map:"⤅",Mcy:"М",MediumSpace:" ",Mellintrf:"ℳ",Mfr:"\uD835\uDD10",MinusPlus:"∓",Mopf:"\uD835\uDD44",Mscr:"ℳ",Mu:"Μ",NJcy:"Њ",Nacute:"Ń",Ncaron:"Ň",Ncedil:"Ņ",Ncy:"Н",NegativeMediumSpace:"",NegativeThickSpace:"",NegativeThinSpace:"",NegativeVeryThinSpace:"",NestedGreaterGreater:"≫",NestedLessLess:"≪",NewLine:`
|
|
1058
1058
|
`,Nfr:"\uD835\uDD11",NoBreak:"",NonBreakingSpace:" ",Nopf:"ℕ",Not:"⫬",NotCongruent:"≢",NotCupCap:"≭",NotDoubleVerticalBar:"∦",NotElement:"∉",NotEqual:"≠",NotEqualTilde:"≂̸",NotExists:"∄",NotGreater:"≯",NotGreaterEqual:"≱",NotGreaterFullEqual:"≧̸",NotGreaterGreater:"≫̸",NotGreaterLess:"≹",NotGreaterSlantEqual:"⩾̸",NotGreaterTilde:"≵",NotHumpDownHump:"≎̸",NotHumpEqual:"≏̸",NotLeftTriangle:"⋪",NotLeftTriangleBar:"⧏̸",NotLeftTriangleEqual:"⋬",NotLess:"≮",NotLessEqual:"≰",NotLessGreater:"≸",NotLessLess:"≪̸",NotLessSlantEqual:"⩽̸",NotLessTilde:"≴",NotNestedGreaterGreater:"⪢̸",NotNestedLessLess:"⪡̸",NotPrecedes:"⊀",NotPrecedesEqual:"⪯̸",NotPrecedesSlantEqual:"⋠",NotReverseElement:"∌",NotRightTriangle:"⋫",NotRightTriangleBar:"⧐̸",NotRightTriangleEqual:"⋭",NotSquareSubset:"⊏̸",NotSquareSubsetEqual:"⋢",NotSquareSuperset:"⊐̸",NotSquareSupersetEqual:"⋣",NotSubset:"⊂⃒",NotSubsetEqual:"⊈",NotSucceeds:"⊁",NotSucceedsEqual:"⪰̸",NotSucceedsSlantEqual:"⋡",NotSucceedsTilde:"≿̸",NotSuperset:"⊃⃒",NotSupersetEqual:"⊉",NotTilde:"≁",NotTildeEqual:"≄",NotTildeFullEqual:"≇",NotTildeTilde:"≉",NotVerticalBar:"∤",Nscr:"\uD835\uDCA9",Ntilde:"Ñ",Nu:"Ν",OElig:"Œ",Oacute:"Ó",Ocirc:"Ô",Ocy:"О",Odblac:"Ő",Ofr:"\uD835\uDD12",Ograve:"Ò",Omacr:"Ō",Omega:"Ω",Omicron:"Ο",Oopf:"\uD835\uDD46",OpenCurlyDoubleQuote:"“",OpenCurlyQuote:"‘",Or:"⩔",Oscr:"\uD835\uDCAA",Oslash:"Ø",Otilde:"Õ",Otimes:"⨷",Ouml:"Ö",OverBar:"‾",OverBrace:"⏞",OverBracket:"⎴",OverParenthesis:"⏜",PartialD:"∂",Pcy:"П",Pfr:"\uD835\uDD13",Phi:"Φ",Pi:"Π",PlusMinus:"±",Poincareplane:"ℌ",Popf:"ℙ",Pr:"⪻",Precedes:"≺",PrecedesEqual:"⪯",PrecedesSlantEqual:"≼",PrecedesTilde:"≾",Prime:"″",Product:"∏",Proportion:"∷",Proportional:"∝",Pscr:"\uD835\uDCAB",Psi:"Ψ",QUOT:'"',Qfr:"\uD835\uDD14",Qopf:"ℚ",Qscr:"\uD835\uDCAC",RBarr:"⤐",REG:"®",Racute:"Ŕ",Rang:"⟫",Rarr:"↠",Rarrtl:"⤖",Rcaron:"Ř",Rcedil:"Ŗ",Rcy:"Р",Re:"ℜ",ReverseElement:"∋",ReverseEquilibrium:"⇋",ReverseUpEquilibrium:"⥯",Rfr:"ℜ",Rho:"Ρ",RightAngleBracket:"⟩",RightArrow:"→",RightArrowBar:"⇥",RightArrowLeftArrow:"⇄",RightCeiling:"⌉",RightDoubleBracket:"⟧",RightDownTeeVector:"⥝",RightDownVector:"⇂",RightDownVectorBar:"⥕",RightFloor:"⌋",RightTee:"⊢",RightTeeArrow:"↦",RightTeeVector:"⥛",RightTriangle:"⊳",RightTriangleBar:"⧐",RightTriangleEqual:"⊵",RightUpDownVector:"⥏",RightUpTeeVector:"⥜",RightUpVector:"↾",RightUpVectorBar:"⥔",RightVector:"⇀",RightVectorBar:"⥓",Rightarrow:"⇒",Ropf:"ℝ",RoundImplies:"⥰",Rrightarrow:"⇛",Rscr:"ℛ",Rsh:"↱",RuleDelayed:"⧴",SHCHcy:"Щ",SHcy:"Ш",SOFTcy:"Ь",Sacute:"Ś",Sc:"⪼",Scaron:"Š",Scedil:"Ş",Scirc:"Ŝ",Scy:"С",Sfr:"\uD835\uDD16",ShortDownArrow:"↓",ShortLeftArrow:"←",ShortRightArrow:"→",ShortUpArrow:"↑",Sigma:"Σ",SmallCircle:"∘",Sopf:"\uD835\uDD4A",Sqrt:"√",Square:"□",SquareIntersection:"⊓",SquareSubset:"⊏",SquareSubsetEqual:"⊑",SquareSuperset:"⊐",SquareSupersetEqual:"⊒",SquareUnion:"⊔",Sscr:"\uD835\uDCAE",Star:"⋆",Sub:"⋐",Subset:"⋐",SubsetEqual:"⊆",Succeeds:"≻",SucceedsEqual:"⪰",SucceedsSlantEqual:"≽",SucceedsTilde:"≿",SuchThat:"∋",Sum:"∑",Sup:"⋑",Superset:"⊃",SupersetEqual:"⊇",Supset:"⋑",THORN:"Þ",TRADE:"™",TSHcy:"Ћ",TScy:"Ц",Tab:"\t",Tau:"Τ",Tcaron:"Ť",Tcedil:"Ţ",Tcy:"Т",Tfr:"\uD835\uDD17",Therefore:"∴",Theta:"Θ",ThickSpace:" ",ThinSpace:" ",Tilde:"∼",TildeEqual:"≃",TildeFullEqual:"≅",TildeTilde:"≈",Topf:"\uD835\uDD4B",TripleDot:"⃛",Tscr:"\uD835\uDCAF",Tstrok:"Ŧ",Uacute:"Ú",Uarr:"↟",Uarrocir:"⥉",Ubrcy:"Ў",Ubreve:"Ŭ",Ucirc:"Û",Ucy:"У",Udblac:"Ű",Ufr:"\uD835\uDD18",Ugrave:"Ù",Umacr:"Ū",UnderBar:"_",UnderBrace:"⏟",UnderBracket:"⎵",UnderParenthesis:"⏝",Union:"⋃",UnionPlus:"⊎",Uogon:"Ų",Uopf:"\uD835\uDD4C",UpArrow:"↑",UpArrowBar:"⤒",UpArrowDownArrow:"⇅",UpDownArrow:"↕",UpEquilibrium:"⥮",UpTee:"⊥",UpTeeArrow:"↥",Uparrow:"⇑",Updownarrow:"⇕",UpperLeftArrow:"↖",UpperRightArrow:"↗",Upsi:"ϒ",Upsilon:"Υ",Uring:"Ů",Uscr:"\uD835\uDCB0",Utilde:"Ũ",Uuml:"Ü",VDash:"⊫",Vbar:"⫫",Vcy:"В",Vdash:"⊩",Vdashl:"⫦",Vee:"⋁",Verbar:"‖",Vert:"‖",VerticalBar:"∣",VerticalLine:"|",VerticalSeparator:"❘",VerticalTilde:"≀",VeryThinSpace:" ",Vfr:"\uD835\uDD19",Vopf:"\uD835\uDD4D",Vscr:"\uD835\uDCB1",Vvdash:"⊪",Wcirc:"Ŵ",Wedge:"⋀",Wfr:"\uD835\uDD1A",Wopf:"\uD835\uDD4E",Wscr:"\uD835\uDCB2",Xfr:"\uD835\uDD1B",Xi:"Ξ",Xopf:"\uD835\uDD4F",Xscr:"\uD835\uDCB3",YAcy:"Я",YIcy:"Ї",YUcy:"Ю",Yacute:"Ý",Ycirc:"Ŷ",Ycy:"Ы",Yfr:"\uD835\uDD1C",Yopf:"\uD835\uDD50",Yscr:"\uD835\uDCB4",Yuml:"Ÿ",ZHcy:"Ж",Zacute:"Ź",Zcaron:"Ž",Zcy:"З",Zdot:"Ż",ZeroWidthSpace:"",Zeta:"Ζ",Zfr:"ℨ",Zopf:"ℤ",Zscr:"\uD835\uDCB5",aacute:"á",abreve:"ă",ac:"∾",acE:"∾̳",acd:"∿",acirc:"â",acute:"´",acy:"а",aelig:"æ",af:"",afr:"\uD835\uDD1E",agrave:"à",alefsym:"ℵ",aleph:"ℵ",alpha:"α",amacr:"ā",amalg:"⨿",amp:"&",and:"∧",andand:"⩕",andd:"⩜",andslope:"⩘",andv:"⩚",ang:"∠",ange:"⦤",angle:"∠",angmsd:"∡",angmsdaa:"⦨",angmsdab:"⦩",angmsdac:"⦪",angmsdad:"⦫",angmsdae:"⦬",angmsdaf:"⦭",angmsdag:"⦮",angmsdah:"⦯",angrt:"∟",angrtvb:"⊾",angrtvbd:"⦝",angsph:"∢",angst:"Å",angzarr:"⍼",aogon:"ą",aopf:"\uD835\uDD52",ap:"≈",apE:"⩰",apacir:"⩯",ape:"≊",apid:"≋",apos:"'",approx:"≈",approxeq:"≊",aring:"å",ascr:"\uD835\uDCB6",ast:"*",asymp:"≈",asympeq:"≍",atilde:"ã",auml:"ä",awconint:"∳",awint:"⨑",bNot:"⫭",backcong:"≌",backepsilon:"϶",backprime:"‵",backsim:"∽",backsimeq:"⋍",barvee:"⊽",barwed:"⌅",barwedge:"⌅",bbrk:"⎵",bbrktbrk:"⎶",bcong:"≌",bcy:"б",bdquo:"„",becaus:"∵",because:"∵",bemptyv:"⦰",bepsi:"϶",bernou:"ℬ",beta:"β",beth:"ℶ",between:"≬",bfr:"\uD835\uDD1F",bigcap:"⋂",bigcirc:"◯",bigcup:"⋃",bigodot:"⨀",bigoplus:"⨁",bigotimes:"⨂",bigsqcup:"⨆",bigstar:"★",bigtriangledown:"▽",bigtriangleup:"△",biguplus:"⨄",bigvee:"⋁",bigwedge:"⋀",bkarow:"⤍",blacklozenge:"⧫",blacksquare:"▪",blacktriangle:"▴",blacktriangledown:"▾",blacktriangleleft:"◂",blacktriangleright:"▸",blank:"␣",blk12:"▒",blk14:"░",blk34:"▓",block:"█",bne:"=⃥",bnequiv:"≡⃥",bnot:"⌐",bopf:"\uD835\uDD53",bot:"⊥",bottom:"⊥",bowtie:"⋈",boxDL:"╗",boxDR:"╔",boxDl:"╖",boxDr:"╓",boxH:"═",boxHD:"╦",boxHU:"╩",boxHd:"╤",boxHu:"╧",boxUL:"╝",boxUR:"╚",boxUl:"╜",boxUr:"╙",boxV:"║",boxVH:"╬",boxVL:"╣",boxVR:"╠",boxVh:"╫",boxVl:"╢",boxVr:"╟",boxbox:"⧉",boxdL:"╕",boxdR:"╒",boxdl:"┐",boxdr:"┌",boxh:"─",boxhD:"╥",boxhU:"╨",boxhd:"┬",boxhu:"┴",boxminus:"⊟",boxplus:"⊞",boxtimes:"⊠",boxuL:"╛",boxuR:"╘",boxul:"┘",boxur:"└",boxv:"│",boxvH:"╪",boxvL:"╡",boxvR:"╞",boxvh:"┼",boxvl:"┤",boxvr:"├",bprime:"‵",breve:"˘",brvbar:"¦",bscr:"\uD835\uDCB7",bsemi:"⁏",bsim:"∽",bsime:"⋍",bsol:"\\",bsolb:"⧅",bsolhsub:"⟈",bull:"•",bullet:"•",bump:"≎",bumpE:"⪮",bumpe:"≏",bumpeq:"≏",cacute:"ć",cap:"∩",capand:"⩄",capbrcup:"⩉",capcap:"⩋",capcup:"⩇",capdot:"⩀",caps:"∩︀",caret:"⁁",caron:"ˇ",ccaps:"⩍",ccaron:"č",ccedil:"ç",ccirc:"ĉ",ccups:"⩌",ccupssm:"⩐",cdot:"ċ",cedil:"¸",cemptyv:"⦲",cent:"¢",centerdot:"·",cfr:"\uD835\uDD20",chcy:"ч",check:"✓",checkmark:"✓",chi:"χ",cir:"○",cirE:"⧃",circ:"ˆ",circeq:"≗",circlearrowleft:"↺",circlearrowright:"↻",circledR:"®",circledS:"Ⓢ",circledast:"⊛",circledcirc:"⊚",circleddash:"⊝",cire:"≗",cirfnint:"⨐",cirmid:"⫯",cirscir:"⧂",clubs:"♣",clubsuit:"♣",colon:":",colone:"≔",coloneq:"≔",comma:",",commat:"@",comp:"∁",compfn:"∘",complement:"∁",complexes:"ℂ",cong:"≅",congdot:"⩭",conint:"∮",copf:"\uD835\uDD54",coprod:"∐",copy:"©",copysr:"℗",crarr:"↵",cross:"✗",cscr:"\uD835\uDCB8",csub:"⫏",csube:"⫑",csup:"⫐",csupe:"⫒",ctdot:"⋯",cudarrl:"⤸",cudarrr:"⤵",cuepr:"⋞",cuesc:"⋟",cularr:"↶",cularrp:"⤽",cup:"∪",cupbrcap:"⩈",cupcap:"⩆",cupcup:"⩊",cupdot:"⊍",cupor:"⩅",cups:"∪︀",curarr:"↷",curarrm:"⤼",curlyeqprec:"⋞",curlyeqsucc:"⋟",curlyvee:"⋎",curlywedge:"⋏",curren:"¤",curvearrowleft:"↶",curvearrowright:"↷",cuvee:"⋎",cuwed:"⋏",cwconint:"∲",cwint:"∱",cylcty:"⌭",dArr:"⇓",dHar:"⥥",dagger:"†",daleth:"ℸ",darr:"↓",dash:"‐",dashv:"⊣",dbkarow:"⤏",dblac:"˝",dcaron:"ď",dcy:"д",dd:"ⅆ",ddagger:"‡",ddarr:"⇊",ddotseq:"⩷",deg:"°",delta:"δ",demptyv:"⦱",dfisht:"⥿",dfr:"\uD835\uDD21",dharl:"⇃",dharr:"⇂",diam:"⋄",diamond:"⋄",diamondsuit:"♦",diams:"♦",die:"¨",digamma:"ϝ",disin:"⋲",div:"÷",divide:"÷",divideontimes:"⋇",divonx:"⋇",djcy:"ђ",dlcorn:"⌞",dlcrop:"⌍",dollar:"$",dopf:"\uD835\uDD55",dot:"˙",doteq:"≐",doteqdot:"≑",dotminus:"∸",dotplus:"∔",dotsquare:"⊡",doublebarwedge:"⌆",downarrow:"↓",downdownarrows:"⇊",downharpoonleft:"⇃",downharpoonright:"⇂",drbkarow:"⤐",drcorn:"⌟",drcrop:"⌌",dscr:"\uD835\uDCB9",dscy:"ѕ",dsol:"⧶",dstrok:"đ",dtdot:"⋱",dtri:"▿",dtrif:"▾",duarr:"⇵",duhar:"⥯",dwangle:"⦦",dzcy:"џ",dzigrarr:"⟿",eDDot:"⩷",eDot:"≑",eacute:"é",easter:"⩮",ecaron:"ě",ecir:"≖",ecirc:"ê",ecolon:"≕",ecy:"э",edot:"ė",ee:"ⅇ",efDot:"≒",efr:"\uD835\uDD22",eg:"⪚",egrave:"è",egs:"⪖",egsdot:"⪘",el:"⪙",elinters:"⏧",ell:"ℓ",els:"⪕",elsdot:"⪗",emacr:"ē",empty:"∅",emptyset:"∅",emptyv:"∅",emsp13:" ",emsp14:" ",emsp:" ",eng:"ŋ",ensp:" ",eogon:"ę",eopf:"\uD835\uDD56",epar:"⋕",eparsl:"⧣",eplus:"⩱",epsi:"ε",epsilon:"ε",epsiv:"ϵ",eqcirc:"≖",eqcolon:"≕",eqsim:"≂",eqslantgtr:"⪖",eqslantless:"⪕",equals:"=",equest:"≟",equiv:"≡",equivDD:"⩸",eqvparsl:"⧥",erDot:"≓",erarr:"⥱",escr:"ℯ",esdot:"≐",esim:"≂",eta:"η",eth:"ð",euml:"ë",euro:"€",excl:"!",exist:"∃",expectation:"ℰ",exponentiale:"ⅇ",fallingdotseq:"≒",fcy:"ф",female:"♀",ffilig:"ffi",fflig:"ff",ffllig:"ffl",ffr:"\uD835\uDD23",filig:"fi",fjlig:"fj",flat:"♭",fllig:"fl",fltns:"▱",fnof:"ƒ",fopf:"\uD835\uDD57",forall:"∀",fork:"⋔",forkv:"⫙",fpartint:"⨍",frac12:"½",frac13:"⅓",frac14:"¼",frac15:"⅕",frac16:"⅙",frac18:"⅛",frac23:"⅔",frac25:"⅖",frac34:"¾",frac35:"⅗",frac38:"⅜",frac45:"⅘",frac56:"⅚",frac58:"⅝",frac78:"⅞",frasl:"⁄",frown:"⌢",fscr:"\uD835\uDCBB",gE:"≧",gEl:"⪌",gacute:"ǵ",gamma:"γ",gammad:"ϝ",gap:"⪆",gbreve:"ğ",gcirc:"ĝ",gcy:"г",gdot:"ġ",ge:"≥",gel:"⋛",geq:"≥",geqq:"≧",geqslant:"⩾",ges:"⩾",gescc:"⪩",gesdot:"⪀",gesdoto:"⪂",gesdotol:"⪄",gesl:"⋛︀",gesles:"⪔",gfr:"\uD835\uDD24",gg:"≫",ggg:"⋙",gimel:"ℷ",gjcy:"ѓ",gl:"≷",glE:"⪒",gla:"⪥",glj:"⪤",gnE:"≩",gnap:"⪊",gnapprox:"⪊",gne:"⪈",gneq:"⪈",gneqq:"≩",gnsim:"⋧",gopf:"\uD835\uDD58",grave:"`",gscr:"ℊ",gsim:"≳",gsime:"⪎",gsiml:"⪐",gt:">",gtcc:"⪧",gtcir:"⩺",gtdot:"⋗",gtlPar:"⦕",gtquest:"⩼",gtrapprox:"⪆",gtrarr:"⥸",gtrdot:"⋗",gtreqless:"⋛",gtreqqless:"⪌",gtrless:"≷",gtrsim:"≳",gvertneqq:"≩︀",gvnE:"≩︀",hArr:"⇔",hairsp:" ",half:"½",hamilt:"ℋ",hardcy:"ъ",harr:"↔",harrcir:"⥈",harrw:"↭",hbar:"ℏ",hcirc:"ĥ",hearts:"♥",heartsuit:"♥",hellip:"…",hercon:"⊹",hfr:"\uD835\uDD25",hksearow:"⤥",hkswarow:"⤦",hoarr:"⇿",homtht:"∻",hookleftarrow:"↩",hookrightarrow:"↪",hopf:"\uD835\uDD59",horbar:"―",hscr:"\uD835\uDCBD",hslash:"ℏ",hstrok:"ħ",hybull:"⁃",hyphen:"‐",iacute:"í",ic:"",icirc:"î",icy:"и",iecy:"е",iexcl:"¡",iff:"⇔",ifr:"\uD835\uDD26",igrave:"ì",ii:"ⅈ",iiiint:"⨌",iiint:"∭",iinfin:"⧜",iiota:"℩",ijlig:"ij",imacr:"ī",image:"ℑ",imagline:"ℐ",imagpart:"ℑ",imath:"ı",imof:"⊷",imped:"Ƶ",in:"∈",incare:"℅",infin:"∞",infintie:"⧝",inodot:"ı",int:"∫",intcal:"⊺",integers:"ℤ",intercal:"⊺",intlarhk:"⨗",intprod:"⨼",iocy:"ё",iogon:"į",iopf:"\uD835\uDD5A",iota:"ι",iprod:"⨼",iquest:"¿",iscr:"\uD835\uDCBE",isin:"∈",isinE:"⋹",isindot:"⋵",isins:"⋴",isinsv:"⋳",isinv:"∈",it:"",itilde:"ĩ",iukcy:"і",iuml:"ï",jcirc:"ĵ",jcy:"й",jfr:"\uD835\uDD27",jmath:"ȷ",jopf:"\uD835\uDD5B",jscr:"\uD835\uDCBF",jsercy:"ј",jukcy:"є",kappa:"κ",kappav:"ϰ",kcedil:"ķ",kcy:"к",kfr:"\uD835\uDD28",kgreen:"ĸ",khcy:"х",kjcy:"ќ",kopf:"\uD835\uDD5C",kscr:"\uD835\uDCC0",lAarr:"⇚",lArr:"⇐",lAtail:"⤛",lBarr:"⤎",lE:"≦",lEg:"⪋",lHar:"⥢",lacute:"ĺ",laemptyv:"⦴",lagran:"ℒ",lambda:"λ",lang:"⟨",langd:"⦑",langle:"⟨",lap:"⪅",laquo:"«",larr:"←",larrb:"⇤",larrbfs:"⤟",larrfs:"⤝",larrhk:"↩",larrlp:"↫",larrpl:"⤹",larrsim:"⥳",larrtl:"↢",lat:"⪫",latail:"⤙",late:"⪭",lates:"⪭︀",lbarr:"⤌",lbbrk:"❲",lbrace:"{",lbrack:"[",lbrke:"⦋",lbrksld:"⦏",lbrkslu:"⦍",lcaron:"ľ",lcedil:"ļ",lceil:"⌈",lcub:"{",lcy:"л",ldca:"⤶",ldquo:"“",ldquor:"„",ldrdhar:"⥧",ldrushar:"⥋",ldsh:"↲",le:"≤",leftarrow:"←",leftarrowtail:"↢",leftharpoondown:"↽",leftharpoonup:"↼",leftleftarrows:"⇇",leftrightarrow:"↔",leftrightarrows:"⇆",leftrightharpoons:"⇋",leftrightsquigarrow:"↭",leftthreetimes:"⋋",leg:"⋚",leq:"≤",leqq:"≦",leqslant:"⩽",les:"⩽",lescc:"⪨",lesdot:"⩿",lesdoto:"⪁",lesdotor:"⪃",lesg:"⋚︀",lesges:"⪓",lessapprox:"⪅",lessdot:"⋖",lesseqgtr:"⋚",lesseqqgtr:"⪋",lessgtr:"≶",lesssim:"≲",lfisht:"⥼",lfloor:"⌊",lfr:"\uD835\uDD29",lg:"≶",lgE:"⪑",lhard:"↽",lharu:"↼",lharul:"⥪",lhblk:"▄",ljcy:"љ",ll:"≪",llarr:"⇇",llcorner:"⌞",llhard:"⥫",lltri:"◺",lmidot:"ŀ",lmoust:"⎰",lmoustache:"⎰",lnE:"≨",lnap:"⪉",lnapprox:"⪉",lne:"⪇",lneq:"⪇",lneqq:"≨",lnsim:"⋦",loang:"⟬",loarr:"⇽",lobrk:"⟦",longleftarrow:"⟵",longleftrightarrow:"⟷",longmapsto:"⟼",longrightarrow:"⟶",looparrowleft:"↫",looparrowright:"↬",lopar:"⦅",lopf:"\uD835\uDD5D",loplus:"⨭",lotimes:"⨴",lowast:"∗",lowbar:"_",loz:"◊",lozenge:"◊",lozf:"⧫",lpar:"(",lparlt:"⦓",lrarr:"⇆",lrcorner:"⌟",lrhar:"⇋",lrhard:"⥭",lrm:"",lrtri:"⊿",lsaquo:"‹",lscr:"\uD835\uDCC1",lsh:"↰",lsim:"≲",lsime:"⪍",lsimg:"⪏",lsqb:"[",lsquo:"‘",lsquor:"‚",lstrok:"ł",lt:"<",ltcc:"⪦",ltcir:"⩹",ltdot:"⋖",lthree:"⋋",ltimes:"⋉",ltlarr:"⥶",ltquest:"⩻",ltrPar:"⦖",ltri:"◃",ltrie:"⊴",ltrif:"◂",lurdshar:"⥊",luruhar:"⥦",lvertneqq:"≨︀",lvnE:"≨︀",mDDot:"∺",macr:"¯",male:"♂",malt:"✠",maltese:"✠",map:"↦",mapsto:"↦",mapstodown:"↧",mapstoleft:"↤",mapstoup:"↥",marker:"▮",mcomma:"⨩",mcy:"м",mdash:"—",measuredangle:"∡",mfr:"\uD835\uDD2A",mho:"℧",micro:"µ",mid:"∣",midast:"*",midcir:"⫰",middot:"·",minus:"−",minusb:"⊟",minusd:"∸",minusdu:"⨪",mlcp:"⫛",mldr:"…",mnplus:"∓",models:"⊧",mopf:"\uD835\uDD5E",mp:"∓",mscr:"\uD835\uDCC2",mstpos:"∾",mu:"μ",multimap:"⊸",mumap:"⊸",nGg:"⋙̸",nGt:"≫⃒",nGtv:"≫̸",nLeftarrow:"⇍",nLeftrightarrow:"⇎",nLl:"⋘̸",nLt:"≪⃒",nLtv:"≪̸",nRightarrow:"⇏",nVDash:"⊯",nVdash:"⊮",nabla:"∇",nacute:"ń",nang:"∠⃒",nap:"≉",napE:"⩰̸",napid:"≋̸",napos:"ʼn",napprox:"≉",natur:"♮",natural:"♮",naturals:"ℕ",nbsp:" ",nbump:"≎̸",nbumpe:"≏̸",ncap:"⩃",ncaron:"ň",ncedil:"ņ",ncong:"≇",ncongdot:"⩭̸",ncup:"⩂",ncy:"н",ndash:"–",ne:"≠",neArr:"⇗",nearhk:"⤤",nearr:"↗",nearrow:"↗",nedot:"≐̸",nequiv:"≢",nesear:"⤨",nesim:"≂̸",nexist:"∄",nexists:"∄",nfr:"\uD835\uDD2B",ngE:"≧̸",nge:"≱",ngeq:"≱",ngeqq:"≧̸",ngeqslant:"⩾̸",nges:"⩾̸",ngsim:"≵",ngt:"≯",ngtr:"≯",nhArr:"⇎",nharr:"↮",nhpar:"⫲",ni:"∋",nis:"⋼",nisd:"⋺",niv:"∋",njcy:"њ",nlArr:"⇍",nlE:"≦̸",nlarr:"↚",nldr:"‥",nle:"≰",nleftarrow:"↚",nleftrightarrow:"↮",nleq:"≰",nleqq:"≦̸",nleqslant:"⩽̸",nles:"⩽̸",nless:"≮",nlsim:"≴",nlt:"≮",nltri:"⋪",nltrie:"⋬",nmid:"∤",nopf:"\uD835\uDD5F",not:"¬",notin:"∉",notinE:"⋹̸",notindot:"⋵̸",notinva:"∉",notinvb:"⋷",notinvc:"⋶",notni:"∌",notniva:"∌",notnivb:"⋾",notnivc:"⋽",npar:"∦",nparallel:"∦",nparsl:"⫽⃥",npart:"∂̸",npolint:"⨔",npr:"⊀",nprcue:"⋠",npre:"⪯̸",nprec:"⊀",npreceq:"⪯̸",nrArr:"⇏",nrarr:"↛",nrarrc:"⤳̸",nrarrw:"↝̸",nrightarrow:"↛",nrtri:"⋫",nrtrie:"⋭",nsc:"⊁",nsccue:"⋡",nsce:"⪰̸",nscr:"\uD835\uDCC3",nshortmid:"∤",nshortparallel:"∦",nsim:"≁",nsime:"≄",nsimeq:"≄",nsmid:"∤",nspar:"∦",nsqsube:"⋢",nsqsupe:"⋣",nsub:"⊄",nsubE:"⫅̸",nsube:"⊈",nsubset:"⊂⃒",nsubseteq:"⊈",nsubseteqq:"⫅̸",nsucc:"⊁",nsucceq:"⪰̸",nsup:"⊅",nsupE:"⫆̸",nsupe:"⊉",nsupset:"⊃⃒",nsupseteq:"⊉",nsupseteqq:"⫆̸",ntgl:"≹",ntilde:"ñ",ntlg:"≸",ntriangleleft:"⋪",ntrianglelefteq:"⋬",ntriangleright:"⋫",ntrianglerighteq:"⋭",nu:"ν",num:"#",numero:"№",numsp:" ",nvDash:"⊭",nvHarr:"⤄",nvap:"≍⃒",nvdash:"⊬",nvge:"≥⃒",nvgt:">⃒",nvinfin:"⧞",nvlArr:"⤂",nvle:"≤⃒",nvlt:"<⃒",nvltrie:"⊴⃒",nvrArr:"⤃",nvrtrie:"⊵⃒",nvsim:"∼⃒",nwArr:"⇖",nwarhk:"⤣",nwarr:"↖",nwarrow:"↖",nwnear:"⤧",oS:"Ⓢ",oacute:"ó",oast:"⊛",ocir:"⊚",ocirc:"ô",ocy:"о",odash:"⊝",odblac:"ő",odiv:"⨸",odot:"⊙",odsold:"⦼",oelig:"œ",ofcir:"⦿",ofr:"\uD835\uDD2C",ogon:"˛",ograve:"ò",ogt:"⧁",ohbar:"⦵",ohm:"Ω",oint:"∮",olarr:"↺",olcir:"⦾",olcross:"⦻",oline:"‾",olt:"⧀",omacr:"ō",omega:"ω",omicron:"ο",omid:"⦶",ominus:"⊖",oopf:"\uD835\uDD60",opar:"⦷",operp:"⦹",oplus:"⊕",or:"∨",orarr:"↻",ord:"⩝",order:"ℴ",orderof:"ℴ",ordf:"ª",ordm:"º",origof:"⊶",oror:"⩖",orslope:"⩗",orv:"⩛",oscr:"ℴ",oslash:"ø",osol:"⊘",otilde:"õ",otimes:"⊗",otimesas:"⨶",ouml:"ö",ovbar:"⌽",par:"∥",para:"¶",parallel:"∥",parsim:"⫳",parsl:"⫽",part:"∂",pcy:"п",percnt:"%",period:".",permil:"‰",perp:"⊥",pertenk:"‱",pfr:"\uD835\uDD2D",phi:"φ",phiv:"ϕ",phmmat:"ℳ",phone:"☎",pi:"π",pitchfork:"⋔",piv:"ϖ",planck:"ℏ",planckh:"ℎ",plankv:"ℏ",plus:"+",plusacir:"⨣",plusb:"⊞",pluscir:"⨢",plusdo:"∔",plusdu:"⨥",pluse:"⩲",plusmn:"±",plussim:"⨦",plustwo:"⨧",pm:"±",pointint:"⨕",popf:"\uD835\uDD61",pound:"£",pr:"≺",prE:"⪳",prap:"⪷",prcue:"≼",pre:"⪯",prec:"≺",precapprox:"⪷",preccurlyeq:"≼",preceq:"⪯",precnapprox:"⪹",precneqq:"⪵",precnsim:"⋨",precsim:"≾",prime:"′",primes:"ℙ",prnE:"⪵",prnap:"⪹",prnsim:"⋨",prod:"∏",profalar:"⌮",profline:"⌒",profsurf:"⌓",prop:"∝",propto:"∝",prsim:"≾",prurel:"⊰",pscr:"\uD835\uDCC5",psi:"ψ",puncsp:" ",qfr:"\uD835\uDD2E",qint:"⨌",qopf:"\uD835\uDD62",qprime:"⁗",qscr:"\uD835\uDCC6",quaternions:"ℍ",quatint:"⨖",quest:"?",questeq:"≟",quot:'"',rAarr:"⇛",rArr:"⇒",rAtail:"⤜",rBarr:"⤏",rHar:"⥤",race:"∽̱",racute:"ŕ",radic:"√",raemptyv:"⦳",rang:"⟩",rangd:"⦒",range:"⦥",rangle:"⟩",raquo:"»",rarr:"→",rarrap:"⥵",rarrb:"⇥",rarrbfs:"⤠",rarrc:"⤳",rarrfs:"⤞",rarrhk:"↪",rarrlp:"↬",rarrpl:"⥅",rarrsim:"⥴",rarrtl:"↣",rarrw:"↝",ratail:"⤚",ratio:"∶",rationals:"ℚ",rbarr:"⤍",rbbrk:"❳",rbrace:"}",rbrack:"]",rbrke:"⦌",rbrksld:"⦎",rbrkslu:"⦐",rcaron:"ř",rcedil:"ŗ",rceil:"⌉",rcub:"}",rcy:"р",rdca:"⤷",rdldhar:"⥩",rdquo:"”",rdquor:"”",rdsh:"↳",real:"ℜ",realine:"ℛ",realpart:"ℜ",reals:"ℝ",rect:"▭",reg:"®",rfisht:"⥽",rfloor:"⌋",rfr:"\uD835\uDD2F",rhard:"⇁",rharu:"⇀",rharul:"⥬",rho:"ρ",rhov:"ϱ",rightarrow:"→",rightarrowtail:"↣",rightharpoondown:"⇁",rightharpoonup:"⇀",rightleftarrows:"⇄",rightleftharpoons:"⇌",rightrightarrows:"⇉",rightsquigarrow:"↝",rightthreetimes:"⋌",ring:"˚",risingdotseq:"≓",rlarr:"⇄",rlhar:"⇌",rlm:"",rmoust:"⎱",rmoustache:"⎱",rnmid:"⫮",roang:"⟭",roarr:"⇾",robrk:"⟧",ropar:"⦆",ropf:"\uD835\uDD63",roplus:"⨮",rotimes:"⨵",rpar:")",rpargt:"⦔",rppolint:"⨒",rrarr:"⇉",rsaquo:"›",rscr:"\uD835\uDCC7",rsh:"↱",rsqb:"]",rsquo:"’",rsquor:"’",rthree:"⋌",rtimes:"⋊",rtri:"▹",rtrie:"⊵",rtrif:"▸",rtriltri:"⧎",ruluhar:"⥨",rx:"℞",sacute:"ś",sbquo:"‚",sc:"≻",scE:"⪴",scap:"⪸",scaron:"š",sccue:"≽",sce:"⪰",scedil:"ş",scirc:"ŝ",scnE:"⪶",scnap:"⪺",scnsim:"⋩",scpolint:"⨓",scsim:"≿",scy:"с",sdot:"⋅",sdotb:"⊡",sdote:"⩦",seArr:"⇘",searhk:"⤥",searr:"↘",searrow:"↘",sect:"§",semi:";",seswar:"⤩",setminus:"∖",setmn:"∖",sext:"✶",sfr:"\uD835\uDD30",sfrown:"⌢",sharp:"♯",shchcy:"щ",shcy:"ш",shortmid:"∣",shortparallel:"∥",shy:"",sigma:"σ",sigmaf:"ς",sigmav:"ς",sim:"∼",simdot:"⩪",sime:"≃",simeq:"≃",simg:"⪞",simgE:"⪠",siml:"⪝",simlE:"⪟",simne:"≆",simplus:"⨤",simrarr:"⥲",slarr:"←",smallsetminus:"∖",smashp:"⨳",smeparsl:"⧤",smid:"∣",smile:"⌣",smt:"⪪",smte:"⪬",smtes:"⪬︀",softcy:"ь",sol:"/",solb:"⧄",solbar:"⌿",sopf:"\uD835\uDD64",spades:"♠",spadesuit:"♠",spar:"∥",sqcap:"⊓",sqcaps:"⊓︀",sqcup:"⊔",sqcups:"⊔︀",sqsub:"⊏",sqsube:"⊑",sqsubset:"⊏",sqsubseteq:"⊑",sqsup:"⊐",sqsupe:"⊒",sqsupset:"⊐",sqsupseteq:"⊒",squ:"□",square:"□",squarf:"▪",squf:"▪",srarr:"→",sscr:"\uD835\uDCC8",ssetmn:"∖",ssmile:"⌣",sstarf:"⋆",star:"☆",starf:"★",straightepsilon:"ϵ",straightphi:"ϕ",strns:"¯",sub:"⊂",subE:"⫅",subdot:"⪽",sube:"⊆",subedot:"⫃",submult:"⫁",subnE:"⫋",subne:"⊊",subplus:"⪿",subrarr:"⥹",subset:"⊂",subseteq:"⊆",subseteqq:"⫅",subsetneq:"⊊",subsetneqq:"⫋",subsim:"⫇",subsub:"⫕",subsup:"⫓",succ:"≻",succapprox:"⪸",succcurlyeq:"≽",succeq:"⪰",succnapprox:"⪺",succneqq:"⪶",succnsim:"⋩",succsim:"≿",sum:"∑",sung:"♪",sup1:"¹",sup2:"²",sup3:"³",sup:"⊃",supE:"⫆",supdot:"⪾",supdsub:"⫘",supe:"⊇",supedot:"⫄",suphsol:"⟉",suphsub:"⫗",suplarr:"⥻",supmult:"⫂",supnE:"⫌",supne:"⊋",supplus:"⫀",supset:"⊃",supseteq:"⊇",supseteqq:"⫆",supsetneq:"⊋",supsetneqq:"⫌",supsim:"⫈",supsub:"⫔",supsup:"⫖",swArr:"⇙",swarhk:"⤦",swarr:"↙",swarrow:"↙",swnwar:"⤪",szlig:"ß",target:"⌖",tau:"τ",tbrk:"⎴",tcaron:"ť",tcedil:"ţ",tcy:"т",tdot:"⃛",telrec:"⌕",tfr:"\uD835\uDD31",there4:"∴",therefore:"∴",theta:"θ",thetasym:"ϑ",thetav:"ϑ",thickapprox:"≈",thicksim:"∼",thinsp:" ",thkap:"≈",thksim:"∼",thorn:"þ",tilde:"˜",times:"×",timesb:"⊠",timesbar:"⨱",timesd:"⨰",tint:"∭",toea:"⤨",top:"⊤",topbot:"⌶",topcir:"⫱",topf:"\uD835\uDD65",topfork:"⫚",tosa:"⤩",tprime:"‴",trade:"™",triangle:"▵",triangledown:"▿",triangleleft:"◃",trianglelefteq:"⊴",triangleq:"≜",triangleright:"▹",trianglerighteq:"⊵",tridot:"◬",trie:"≜",triminus:"⨺",triplus:"⨹",trisb:"⧍",tritime:"⨻",trpezium:"⏢",tscr:"\uD835\uDCC9",tscy:"ц",tshcy:"ћ",tstrok:"ŧ",twixt:"≬",twoheadleftarrow:"↞",twoheadrightarrow:"↠",uArr:"⇑",uHar:"⥣",uacute:"ú",uarr:"↑",ubrcy:"ў",ubreve:"ŭ",ucirc:"û",ucy:"у",udarr:"⇅",udblac:"ű",udhar:"⥮",ufisht:"⥾",ufr:"\uD835\uDD32",ugrave:"ù",uharl:"↿",uharr:"↾",uhblk:"▀",ulcorn:"⌜",ulcorner:"⌜",ulcrop:"⌏",ultri:"◸",umacr:"ū",uml:"¨",uogon:"ų",uopf:"\uD835\uDD66",uparrow:"↑",updownarrow:"↕",upharpoonleft:"↿",upharpoonright:"↾",uplus:"⊎",upsi:"υ",upsih:"ϒ",upsilon:"υ",upuparrows:"⇈",urcorn:"⌝",urcorner:"⌝",urcrop:"⌎",uring:"ů",urtri:"◹",uscr:"\uD835\uDCCA",utdot:"⋰",utilde:"ũ",utri:"▵",utrif:"▴",uuarr:"⇈",uuml:"ü",uwangle:"⦧",vArr:"⇕",vBar:"⫨",vBarv:"⫩",vDash:"⊨",vangrt:"⦜",varepsilon:"ϵ",varkappa:"ϰ",varnothing:"∅",varphi:"ϕ",varpi:"ϖ",varpropto:"∝",varr:"↕",varrho:"ϱ",varsigma:"ς",varsubsetneq:"⊊︀",varsubsetneqq:"⫋︀",varsupsetneq:"⊋︀",varsupsetneqq:"⫌︀",vartheta:"ϑ",vartriangleleft:"⊲",vartriangleright:"⊳",vcy:"в",vdash:"⊢",vee:"∨",veebar:"⊻",veeeq:"≚",vellip:"⋮",verbar:"|",vert:"|",vfr:"\uD835\uDD33",vltri:"⊲",vnsub:"⊂⃒",vnsup:"⊃⃒",vopf:"\uD835\uDD67",vprop:"∝",vrtri:"⊳",vscr:"\uD835\uDCCB",vsubnE:"⫋︀",vsubne:"⊊︀",vsupnE:"⫌︀",vsupne:"⊋︀",vzigzag:"⦚",wcirc:"ŵ",wedbar:"⩟",wedge:"∧",wedgeq:"≙",weierp:"℘",wfr:"\uD835\uDD34",wopf:"\uD835\uDD68",wp:"℘",wr:"≀",wreath:"≀",wscr:"\uD835\uDCCC",xcap:"⋂",xcirc:"◯",xcup:"⋃",xdtri:"▽",xfr:"\uD835\uDD35",xhArr:"⟺",xharr:"⟷",xi:"ξ",xlArr:"⟸",xlarr:"⟵",xmap:"⟼",xnis:"⋻",xodot:"⨀",xopf:"\uD835\uDD69",xoplus:"⨁",xotime:"⨂",xrArr:"⟹",xrarr:"⟶",xscr:"\uD835\uDCCD",xsqcup:"⨆",xuplus:"⨄",xutri:"△",xvee:"⋁",xwedge:"⋀",yacute:"ý",yacy:"я",ycirc:"ŷ",ycy:"ы",yen:"¥",yfr:"\uD835\uDD36",yicy:"ї",yopf:"\uD835\uDD6A",yscr:"\uD835\uDCCE",yucy:"ю",yuml:"ÿ",zacute:"ź",zcaron:"ž",zcy:"з",zdot:"ż",zeetrf:"ℨ",zeta:"ζ",zfr:"\uD835\uDD37",zhcy:"ж",zigrarr:"⇝",zopf:"\uD835\uDD6B",zscr:"\uD835\uDCCF",zwj:"",zwnj:""}});function dy(e){return Fer.call(Qte,e)?Qte[e]:!1}var Fer;var ZM=v(()=>{XDe();Fer={}.hasOwnProperty});var R;var ZDe=v(()=>{R={carriageReturn:-5,lineFeed:-4,carriageReturnLineFeed:-3,horizontalTab:-2,virtualSpace:-1,eof:null,nul:0,soh:1,stx:2,etx:3,eot:4,enq:5,ack:6,bel:7,bs:8,ht:9,lf:10,vt:11,ff:12,cr:13,so:14,si:15,dle:16,dc1:17,dc2:18,dc3:19,dc4:20,nak:21,syn:22,etb:23,can:24,em:25,sub:26,esc:27,fs:28,gs:29,rs:30,us:31,space:32,exclamationMark:33,quotationMark:34,numberSign:35,dollarSign:36,percentSign:37,ampersand:38,apostrophe:39,leftParenthesis:40,rightParenthesis:41,asterisk:42,plusSign:43,comma:44,dash:45,dot:46,slash:47,digit0:48,digit1:49,digit2:50,digit3:51,digit4:52,digit5:53,digit6:54,digit7:55,digit8:56,digit9:57,colon:58,semicolon:59,lessThan:60,equalsTo:61,greaterThan:62,questionMark:63,atSign:64,uppercaseA:65,uppercaseB:66,uppercaseC:67,uppercaseD:68,uppercaseE:69,uppercaseF:70,uppercaseG:71,uppercaseH:72,uppercaseI:73,uppercaseJ:74,uppercaseK:75,uppercaseL:76,uppercaseM:77,uppercaseN:78,uppercaseO:79,uppercaseP:80,uppercaseQ:81,uppercaseR:82,uppercaseS:83,uppercaseT:84,uppercaseU:85,uppercaseV:86,uppercaseW:87,uppercaseX:88,uppercaseY:89,uppercaseZ:90,leftSquareBracket:91,backslash:92,rightSquareBracket:93,caret:94,underscore:95,graveAccent:96,lowercaseA:97,lowercaseB:98,lowercaseC:99,lowercaseD:100,lowercaseE:101,lowercaseF:102,lowercaseG:103,lowercaseH:104,lowercaseI:105,lowercaseJ:106,lowercaseK:107,lowercaseL:108,lowercaseM:109,lowercaseN:110,lowercaseO:111,lowercaseP:112,lowercaseQ:113,lowercaseR:114,lowercaseS:115,lowercaseT:116,lowercaseU:117,lowercaseV:118,lowercaseW:119,lowercaseX:120,lowercaseY:121,lowercaseZ:122,leftCurlyBrace:123,verticalBar:124,rightCurlyBrace:125,tilde:126,del:127,byteOrderMarker:65279,replacementCharacter:65533}});var de;var QDe=v(()=>{de={attentionSideAfter:2,attentionSideBefore:1,atxHeadingOpeningFenceSizeMax:6,autolinkDomainSizeMax:63,autolinkSchemeSizeMax:32,cdataOpeningString:"CDATA[",characterGroupPunctuation:2,characterGroupWhitespace:1,characterReferenceDecimalSizeMax:7,characterReferenceHexadecimalSizeMax:6,characterReferenceNamedSizeMax:31,codeFencedSequenceSizeMin:3,contentTypeContent:"content",contentTypeDocument:"document",contentTypeFlow:"flow",contentTypeString:"string",contentTypeText:"text",hardBreakPrefixSizeMin:2,htmlBasic:6,htmlCdata:5,htmlComment:2,htmlComplete:7,htmlDeclaration:4,htmlInstruction:3,htmlRawSizeMax:8,htmlRaw:1,linkResourceDestinationBalanceMax:32,linkReferenceSizeMax:999,listItemValueSizeMax:10,numericBaseDecimal:10,numericBaseHexadecimal:16,tabSize:4,thematicBreakMarkerCountMin:3,v8MaxSafeChunkSize:1e4}});var D;var eje=v(()=>{D={data:"data",whitespace:"whitespace",lineEnding:"lineEnding",lineEndingBlank:"lineEndingBlank",linePrefix:"linePrefix",lineSuffix:"lineSuffix",atxHeading:"atxHeading",atxHeadingSequence:"atxHeadingSequence",atxHeadingText:"atxHeadingText",autolink:"autolink",autolinkEmail:"autolinkEmail",autolinkMarker:"autolinkMarker",autolinkProtocol:"autolinkProtocol",characterEscape:"characterEscape",characterEscapeValue:"characterEscapeValue",characterReference:"characterReference",characterReferenceMarker:"characterReferenceMarker",characterReferenceMarkerNumeric:"characterReferenceMarkerNumeric",characterReferenceMarkerHexadecimal:"characterReferenceMarkerHexadecimal",characterReferenceValue:"characterReferenceValue",codeFenced:"codeFenced",codeFencedFence:"codeFencedFence",codeFencedFenceSequence:"codeFencedFenceSequence",codeFencedFenceInfo:"codeFencedFenceInfo",codeFencedFenceMeta:"codeFencedFenceMeta",codeFlowValue:"codeFlowValue",codeIndented:"codeIndented",codeText:"codeText",codeTextData:"codeTextData",codeTextPadding:"codeTextPadding",codeTextSequence:"codeTextSequence",content:"content",definition:"definition",definitionDestination:"definitionDestination",definitionDestinationLiteral:"definitionDestinationLiteral",definitionDestinationLiteralMarker:"definitionDestinationLiteralMarker",definitionDestinationRaw:"definitionDestinationRaw",definitionDestinationString:"definitionDestinationString",definitionLabel:"definitionLabel",definitionLabelMarker:"definitionLabelMarker",definitionLabelString:"definitionLabelString",definitionMarker:"definitionMarker",definitionTitle:"definitionTitle",definitionTitleMarker:"definitionTitleMarker",definitionTitleString:"definitionTitleString",emphasis:"emphasis",emphasisSequence:"emphasisSequence",emphasisText:"emphasisText",escapeMarker:"escapeMarker",hardBreakEscape:"hardBreakEscape",hardBreakTrailing:"hardBreakTrailing",htmlFlow:"htmlFlow",htmlFlowData:"htmlFlowData",htmlText:"htmlText",htmlTextData:"htmlTextData",image:"image",label:"label",labelText:"labelText",labelLink:"labelLink",labelImage:"labelImage",labelMarker:"labelMarker",labelImageMarker:"labelImageMarker",labelEnd:"labelEnd",link:"link",paragraph:"paragraph",reference:"reference",referenceMarker:"referenceMarker",referenceString:"referenceString",resource:"resource",resourceDestination:"resourceDestination",resourceDestinationLiteral:"resourceDestinationLiteral",resourceDestinationLiteralMarker:"resourceDestinationLiteralMarker",resourceDestinationRaw:"resourceDestinationRaw",resourceDestinationString:"resourceDestinationString",resourceMarker:"resourceMarker",resourceTitle:"resourceTitle",resourceTitleMarker:"resourceTitleMarker",resourceTitleString:"resourceTitleString",setextHeading:"setextHeading",setextHeadingText:"setextHeadingText",setextHeadingLine:"setextHeadingLine",setextHeadingLineSequence:"setextHeadingLineSequence",strong:"strong",strongSequence:"strongSequence",strongText:"strongText",thematicBreak:"thematicBreak",thematicBreakSequence:"thematicBreakSequence",blockQuote:"blockQuote",blockQuotePrefix:"blockQuotePrefix",blockQuoteMarker:"blockQuoteMarker",blockQuotePrefixWhitespace:"blockQuotePrefixWhitespace",listOrdered:"listOrdered",listUnordered:"listUnordered",listItemIndent:"listItemIndent",listItemMarker:"listItemMarker",listItemPrefix:"listItemPrefix",listItemPrefixWhitespace:"listItemPrefixWhitespace",listItemValue:"listItemValue",chunkDocument:"chunkDocument",chunkContent:"chunkContent",chunkFlow:"chunkFlow",chunkText:"chunkText",chunkString:"chunkString"}});var J2;var tje=v(()=>{J2={ht:"\t",lf:`
|
|
1059
1059
|
`,cr:"\r",space:" ",exclamationMark:"!",quotationMark:'"',numberSign:"#",dollarSign:"$",percentSign:"%",ampersand:"&",apostrophe:"'",leftParenthesis:"(",rightParenthesis:")",asterisk:"*",plusSign:"+",comma:",",dash:"-",dot:".",slash:"/",digit0:"0",digit1:"1",digit2:"2",digit3:"3",digit4:"4",digit5:"5",digit6:"6",digit7:"7",digit8:"8",digit9:"9",colon:":",semicolon:";",lessThan:"<",equalsTo:"=",greaterThan:">",questionMark:"?",atSign:"@",uppercaseA:"A",uppercaseB:"B",uppercaseC:"C",uppercaseD:"D",uppercaseE:"E",uppercaseF:"F",uppercaseG:"G",uppercaseH:"H",uppercaseI:"I",uppercaseJ:"J",uppercaseK:"K",uppercaseL:"L",uppercaseM:"M",uppercaseN:"N",uppercaseO:"O",uppercaseP:"P",uppercaseQ:"Q",uppercaseR:"R",uppercaseS:"S",uppercaseT:"T",uppercaseU:"U",uppercaseV:"V",uppercaseW:"W",uppercaseX:"X",uppercaseY:"Y",uppercaseZ:"Z",leftSquareBracket:"[",backslash:"\\",rightSquareBracket:"]",caret:"^",underscore:"_",graveAccent:"`",lowercaseA:"a",lowercaseB:"b",lowercaseC:"c",lowercaseD:"d",lowercaseE:"e",lowercaseF:"f",lowercaseG:"g",lowercaseH:"h",lowercaseI:"i",lowercaseJ:"j",lowercaseK:"k",lowercaseL:"l",lowercaseM:"m",lowercaseN:"n",lowercaseO:"o",lowercaseP:"p",lowercaseQ:"q",lowercaseR:"r",lowercaseS:"s",lowercaseT:"t",lowercaseU:"u",lowercaseV:"v",lowercaseW:"w",lowercaseX:"x",lowercaseY:"y",lowercaseZ:"z",leftCurlyBrace:"{",verticalBar:"|",rightCurlyBrace:"}",tilde:"~",replacementCharacter:"�"}});var ut=v(()=>{ZDe();QDe();eje();tje()});function Ii(e,t,r,n){let i=e.length,o=0,s;if(t<0)t=-t>i?0:i+t;else t=t>i?i:t;if(r=r>0?r:0,n.length<de.v8MaxSafeChunkSize)s=Array.from(n),s.unshift(t,r),e.splice(...s);else{if(r)e.splice(t,r);while(o<n.length)s=n.slice(o,o+de.v8MaxSafeChunkSize),s.unshift(t,0),e.splice(...s),o+=de.v8MaxSafeChunkSize,t+=de.v8MaxSafeChunkSize}}function _a(e,t){if(e.length>0)return Ii(e,e.length,0,t),e;return t}var xd=v(()=>{ut()});function QM(e){let t={},r=-1;while(++r<e.length)zer(t,e[r]);return t}function zer(e,t){let r;for(r in t){let i=(rje.call(e,r)?e[r]:void 0)||(e[r]={}),o=t[r],s;if(o)for(s in o){if(!rje.call(i,s))i[s]=[];let a=o[s];Ber(i[s],Array.isArray(a)?a:a?[a]:[])}}}function Ber(e,t){let r=-1,n=[];while(++r<t.length)(t[r].add==="after"?e:n).push(t[r]);Ii(e,0,0,n)}var rje;var ere=v(()=>{xd();rje={}.hasOwnProperty});function eD(e,t){let r=Number.parseInt(e,t);if(r<R.ht||r===R.vt||r>R.cr&&r<R.space||r>R.tilde&&r<160||r>55295&&r<57344||r>64975&&r<65008||(r&65535)===65535||(r&65535)===65534||r>1114111)return J2.replacementCharacter;return String.fromCodePoint(r)}var tre=v(()=>{ut()});function Bs(e){return e.replace(/[\t\n\r ]+/g,J2.space).replace(/^ | $/g,"").toLowerCase().toUpperCase()}var py=v(()=>{ut()});function Oh(e){return e!==null&&(e<R.space||e===R.del)}function ke(e){return e!==null&&e<R.horizontalTab}function Gt(e){return e!==null&&(e<R.nul||e===R.space)}function Ke(e){return e===R.horizontalTab||e===R.virtualSpace||e===R.space}function Z1(e){return t;function t(r){return r!==null&&r>-1&&e.test(String.fromCharCode(r))}}var wo,xo,nje,aA,ije,oje,Mh,L5;var ar=v(()=>{ut();wo=Z1(/[A-Za-z]/),xo=Z1(/[\dA-Za-z]/),nje=Z1(/[#-'*+\--9=?A-Z^-~]/);aA=Z1(/\d/),ije=Z1(/[\dA-Fa-f]/),oje=Z1(/[!-/:-@[-`{-~]/);Mh=Z1(/\p{P}|\p{S}/u),L5=Z1(/\s/)});function Ze(e,t,r,n){let i=n?n-1:Number.POSITIVE_INFINITY,o=0;return s;function s(c){if(Ke(c))return e.enter(r),a(c);return t(c)}function a(c){if(Ke(c)&&o++<i)return e.consume(c),a;return e.exit(r),t(c)}}var Oi=v(()=>{ar()});function Uer(e){let t=e.attempt(this.parser.constructs.contentInitial,n,i),r;return t;function n(a){if(V(a===R.eof||ke(a),"expected eol or eof"),a===R.eof){e.consume(a);return}return e.enter(D.lineEnding),e.consume(a),e.exit(D.lineEnding),Ze(e,t,D.linePrefix)}function i(a){return V(a!==R.eof&&!ke(a),"expected anything other than a line ending or EOF"),e.enter(D.paragraph),o(a)}function o(a){let c=e.enter(D.chunkText,{contentType:de.contentTypeText,previous:r});if(r)r.next=c;return r=c,s(a)}function s(a){if(a===R.eof){e.exit(D.chunkText),e.exit(D.paragraph),e.consume(a);return}if(ke(a))return e.consume(a),e.exit(D.chunkText),o;return e.consume(a),s}}var sje;var aje=v(()=>{Mt();Oi();ar();ut();sje={tokenize:Uer}});function Her(e){let t=this,r=[],n=0,i,o,s;return a;function a(k){if(n<r.length){let w=r[n];return t.containerState=w[1],V(w[0].continuation,"expected `continuation` to be defined on container construct"),e.attempt(w[0].continuation,c,l)(k)}return l(k)}function c(k){if(V(t.containerState,"expected `containerState` to be defined after continuation"),n++,t.containerState._closeFlow){if(t.containerState._closeFlow=void 0,i)b();let w=t.events.length,A=w,x;while(A--)if(t.events[A][0]==="exit"&&t.events[A][1].type===D.chunkFlow){x=t.events[A][1].end;break}V(x,"could not find previous flow chunk"),y(n);let E=w;while(E<t.events.length)t.events[E][1].end={...x},E++;return Ii(t.events,A+1,0,t.events.slice(w)),t.events.length=E,l(k)}return a(k)}function l(k){if(n===r.length){if(!i)return p(k);if(i.currentConstruct&&i.currentConstruct.concrete)return m(k);t.interrupt=Boolean(i.currentConstruct&&!i._gfmTableDynamicInterruptHack)}return t.containerState={},e.check(cje,u,d)(k)}function u(k){if(i)b();return y(n),p(k)}function d(k){return t.parser.lazy[t.now().line]=n!==r.length,s=t.now().offset,m(k)}function p(k){return t.containerState={},e.attempt(cje,f,m)(k)}function f(k){return V(t.currentConstruct,"expected `currentConstruct` to be defined on tokenizer"),V(t.containerState,"expected `containerState` to be defined on tokenizer"),n++,r.push([t.currentConstruct,t.containerState]),p(k)}function m(k){if(k===R.eof){if(i)b();y(0),e.consume(k);return}return i=i||t.parser.flow(t.now()),e.enter(D.chunkFlow,{_tokenizer:i,contentType:de.contentTypeFlow,previous:o}),h(k)}function h(k){if(k===R.eof){g(e.exit(D.chunkFlow),!0),y(0),e.consume(k);return}if(ke(k))return e.consume(k),g(e.exit(D.chunkFlow)),n=0,t.interrupt=void 0,a;return e.consume(k),h}function g(k,w){V(i,"expected `childFlow` to be defined when continuing");let A=t.sliceStream(k);if(w)A.push(null);if(k.previous=o,o)o.next=k;if(o=k,i.defineSkip(k.start),i.write(A),t.parser.lazy[k.start.line]){let x=i.events.length;while(x--)if(i.events[x][1].start.offset<s&&(!i.events[x][1].end||i.events[x][1].end.offset>s))return;let E=t.events.length,S=E,_,C;while(S--)if(t.events[S][0]==="exit"&&t.events[S][1].type===D.chunkFlow){if(_){C=t.events[S][1].end;break}_=!0}V(C,"could not find previous flow chunk"),y(n),x=E;while(x<t.events.length)t.events[x][1].end={...C},x++;Ii(t.events,S+1,0,t.events.slice(E)),t.events.length=x}}function y(k){let w=r.length;while(w-- >k){let A=r[w];t.containerState=A[1],V(A[0].exit,"expected `exit` to be defined on container construct"),A[0].exit.call(t,e)}r.length=k}function b(){V(t.containerState,"expected `containerState` to be defined when closing flow"),V(i,"expected `childFlow` to be defined when closing it"),i.write([R.eof]),o=void 0,i=void 0,t.containerState._closeFlow=void 0}}function Ger(e,t,r){return V(this.parser.constructs.disable.null,"expected `disable.null` to be populated"),Ze(e,e.attempt(this.parser.constructs.document,t,r),D.linePrefix,this.parser.constructs.disable.null.includes("codeIndented")?void 0:de.tabSize)}var lje,cje;var uje=v(()=>{Mt();Oi();ar();xd();ut();lje={tokenize:Her},cje={tokenize:Ger}});function Ad(e){if(e===R.eof||Gt(e)||L5(e))return de.characterGroupWhitespace;if(Mh(e))return de.characterGroupPunctuation}var tD=v(()=>{ar();ut()});function Q1(e,t,r){let n=[],i=-1;while(++i<e.length){let o=e[i].resolveAll;if(o&&!n.includes(o))t=o(t,r),n.push(o)}return t}function Wer(e,t){let r=-1,n,i,o,s,a,c,l,u;while(++r<e.length)if(e[r][0]==="enter"&&e[r][1].type==="attentionSequence"&&e[r][1]._close){n=r;while(n--)if(e[n][0]==="exit"&&e[n][1].type==="attentionSequence"&&e[n][1]._open&&t.sliceSerialize(e[n][1]).charCodeAt(0)===t.sliceSerialize(e[r][1]).charCodeAt(0)){if((e[n][1]._close||e[r][1]._open)&&(e[r][1].end.offset-e[r][1].start.offset)%3&&!((e[n][1].end.offset-e[n][1].start.offset+e[r][1].end.offset-e[r][1].start.offset)%3))continue;c=e[n][1].end.offset-e[n][1].start.offset>1&&e[r][1].end.offset-e[r][1].start.offset>1?2:1;let d={...e[n][1].end},p={...e[r][1].start};if(dje(d,-c),dje(p,c),s={type:c>1?D.strongSequence:D.emphasisSequence,start:d,end:{...e[n][1].end}},a={type:c>1?D.strongSequence:D.emphasisSequence,start:{...e[r][1].start},end:p},o={type:c>1?D.strongText:D.emphasisText,start:{...e[n][1].end},end:{...e[r][1].start}},i={type:c>1?D.strong:D.emphasis,start:{...s.start},end:{...a.end}},e[n][1].end={...s.start},e[r][1].start={...a.end},l=[],e[n][1].end.offset-e[n][1].start.offset)l=_a(l,[["enter",e[n][1],t],["exit",e[n][1],t]]);if(l=_a(l,[["enter",i,t],["enter",s,t],["exit",s,t],["enter",o,t]]),V(t.parser.constructs.insideSpan.null,"expected `insideSpan` to be populated"),l=_a(l,Q1(t.parser.constructs.insideSpan.null,e.slice(n+1,r),t)),l=_a(l,[["exit",o,t],["enter",a,t],["exit",a,t],["exit",i,t]]),e[r][1].end.offset-e[r][1].start.offset)u=2,l=_a(l,[["enter",e[r][1],t],["exit",e[r][1],t]]);else u=0;Ii(e,n-1,r-n+3,l),r=n+l.length-u-2;break}}r=-1;while(++r<e.length)if(e[r][1].type==="attentionSequence")e[r][1].type="data";return e}function Ver(e,t){let r=this.parser.constructs.attentionMarkers.null,n=this.previous,i=Ad(n),o;return s;function s(c){return V(c===R.asterisk||c===R.underscore,"expected asterisk or underscore"),o=c,e.enter("attentionSequence"),a(c)}function a(c){if(c===o)return e.consume(c),a;let l=e.exit("attentionSequence"),u=Ad(c);V(r,"expected `attentionMarkers` to be populated");let d=!u||u===de.characterGroupPunctuation&&i||r.includes(c),p=!i||i===de.characterGroupPunctuation&&u||r.includes(n);return l._open=Boolean(o===R.asterisk?d:d&&(i||!p)),l._close=Boolean(o===R.asterisk?p:p&&(u||!d)),t(c)}}function dje(e,t){e.column+=t,e.offset+=t,e._bufferIndex+=t}var cA;var pje=v(()=>{Mt();xd();tD();ut();cA={name:"attention",resolveAll:Wer,tokenize:Ver}});function qer(e,t,r){let n=0;return i;function i(f){return V(f===R.lessThan,"expected `<`"),e.enter(D.autolink),e.enter(D.autolinkMarker),e.consume(f),e.exit(D.autolinkMarker),e.enter(D.autolinkProtocol),o}function o(f){if(wo(f))return e.consume(f),s;if(f===R.atSign)return r(f);return l(f)}function s(f){if(f===R.plusSign||f===R.dash||f===R.dot||xo(f))return n=1,a(f);return l(f)}function a(f){if(f===R.colon)return e.consume(f),n=0,c;if((f===R.plusSign||f===R.dash||f===R.dot||xo(f))&&n++<de.autolinkSchemeSizeMax)return e.consume(f),a;return n=0,l(f)}function c(f){if(f===R.greaterThan)return e.exit(D.autolinkProtocol),e.enter(D.autolinkMarker),e.consume(f),e.exit(D.autolinkMarker),e.exit(D.autolink),t;if(f===R.eof||f===R.space||f===R.lessThan||Oh(f))return r(f);return e.consume(f),c}function l(f){if(f===R.atSign)return e.consume(f),u;if(nje(f))return e.consume(f),l;return r(f)}function u(f){return xo(f)?d(f):r(f)}function d(f){if(f===R.dot)return e.consume(f),n=0,u;if(f===R.greaterThan)return e.exit(D.autolinkProtocol).type=D.autolinkEmail,e.enter(D.autolinkMarker),e.consume(f),e.exit(D.autolinkMarker),e.exit(D.autolink),t;return p(f)}function p(f){if((f===R.dash||xo(f))&&n++<de.autolinkDomainSizeMax){let m=f===R.dash?p:d;return e.consume(f),m}return r(f)}}var rre;var fje=v(()=>{Mt();ar();ut();rre={name:"autolink",tokenize:qer}});function Ker(e,t,r){return n;function n(o){return Ke(o)?Ze(e,i,D.linePrefix)(o):i(o)}function i(o){return o===R.eof||ke(o)?t(o):r(o)}}var N5;var rD=v(()=>{Oi();ar();ut();N5={partial:!0,tokenize:Ker}});function Jer(e,t,r){let n=this;return i;function i(s){if(s===R.greaterThan){let a=n.containerState;if(V(a,"expected `containerState` to be defined in container"),!a.open)e.enter(D.blockQuote,{_container:!0}),a.open=!0;return e.enter(D.blockQuotePrefix),e.enter(D.blockQuoteMarker),e.consume(s),e.exit(D.blockQuoteMarker),o}return r(s)}function o(s){if(Ke(s))return e.enter(D.blockQuotePrefixWhitespace),e.consume(s),e.exit(D.blockQuotePrefixWhitespace),e.exit(D.blockQuotePrefix),t;return e.exit(D.blockQuotePrefix),t(s)}}function Yer(e,t,r){let n=this;return i;function i(s){if(Ke(s))return V(n.parser.constructs.disable.null,"expected `disable.null` to be populated"),Ze(e,o,D.linePrefix,n.parser.constructs.disable.null.includes("codeIndented")?void 0:de.tabSize)(s);return o(s)}function o(s){return e.attempt(nD,t,r)(s)}}function Xer(e){e.exit(D.blockQuote)}var nD;var mje=v(()=>{Mt();Oi();ar();ut();nD={continuation:{tokenize:Yer},exit:Xer,name:"blockQuote",tokenize:Jer}});function Zer(e,t,r){return n;function n(o){return V(o===R.backslash,"expected `\\`"),e.enter(D.characterEscape),e.enter(D.escapeMarker),e.consume(o),e.exit(D.escapeMarker),i}function i(o){if(oje(o))return e.enter(D.characterEscapeValue),e.consume(o),e.exit(D.characterEscapeValue),e.exit(D.characterEscape),t;return r(o)}}var iD;var hje=v(()=>{Mt();ar();ut();iD={name:"characterEscape",tokenize:Zer}});function Qer(e,t,r){let n=this,i=0,o,s;return a;function a(d){return V(d===R.ampersand,"expected `&`"),e.enter(D.characterReference),e.enter(D.characterReferenceMarker),e.consume(d),e.exit(D.characterReferenceMarker),c}function c(d){if(d===R.numberSign)return e.enter(D.characterReferenceMarkerNumeric),e.consume(d),e.exit(D.characterReferenceMarkerNumeric),l;return e.enter(D.characterReferenceValue),o=de.characterReferenceNamedSizeMax,s=xo,u(d)}function l(d){if(d===R.uppercaseX||d===R.lowercaseX)return e.enter(D.characterReferenceMarkerHexadecimal),e.consume(d),e.exit(D.characterReferenceMarkerHexadecimal),e.enter(D.characterReferenceValue),o=de.characterReferenceHexadecimalSizeMax,s=ije,u;return e.enter(D.characterReferenceValue),o=de.characterReferenceDecimalSizeMax,s=aA,u(d)}function u(d){if(d===R.semicolon&&i){let p=e.exit(D.characterReferenceValue);if(s===xo&&!dy(n.sliceSerialize(p)))return r(d);return e.enter(D.characterReferenceMarker),e.consume(d),e.exit(D.characterReferenceMarker),e.exit(D.characterReference),t}if(s(d)&&i++<o)return e.consume(d),u;return r(d)}}var oD;var gje=v(()=>{Mt();ZM();ar();ut();oD={name:"characterReference",tokenize:Qer}});function etr(e,t,r){let n=this,i={partial:!0,tokenize:A},o=0,s=0,a;return c;function c(x){return l(x)}function l(x){V(x===R.graveAccent||x===R.tilde,"expected `` ` `` or `~`");let E=n.events[n.events.length-1];return o=E&&E[1].type===D.linePrefix?E[2].sliceSerialize(E[1],!0).length:0,a=x,e.enter(D.codeFenced),e.enter(D.codeFencedFence),e.enter(D.codeFencedFenceSequence),u(x)}function u(x){if(x===a)return s++,e.consume(x),u;if(s<de.codeFencedSequenceSizeMin)return r(x);return e.exit(D.codeFencedFenceSequence),Ke(x)?Ze(e,d,D.whitespace)(x):d(x)}function d(x){if(x===R.eof||ke(x))return e.exit(D.codeFencedFence),n.interrupt?t(x):e.check(yje,h,w)(x);return e.enter(D.codeFencedFenceInfo),e.enter(D.chunkString,{contentType:de.contentTypeString}),p(x)}function p(x){if(x===R.eof||ke(x))return e.exit(D.chunkString),e.exit(D.codeFencedFenceInfo),d(x);if(Ke(x))return e.exit(D.chunkString),e.exit(D.codeFencedFenceInfo),Ze(e,f,D.whitespace)(x);if(x===R.graveAccent&&x===a)return r(x);return e.consume(x),p}function f(x){if(x===R.eof||ke(x))return d(x);return e.enter(D.codeFencedFenceMeta),e.enter(D.chunkString,{contentType:de.contentTypeString}),m(x)}function m(x){if(x===R.eof||ke(x))return e.exit(D.chunkString),e.exit(D.codeFencedFenceMeta),d(x);if(x===R.graveAccent&&x===a)return r(x);return e.consume(x),m}function h(x){return V(ke(x),"expected eol"),e.attempt(i,w,g)(x)}function g(x){return V(ke(x),"expected eol"),e.enter(D.lineEnding),e.consume(x),e.exit(D.lineEnding),y}function y(x){return o>0&&Ke(x)?Ze(e,b,D.linePrefix,o+1)(x):b(x)}function b(x){if(x===R.eof||ke(x))return e.check(yje,h,w)(x);return e.enter(D.codeFlowValue),k(x)}function k(x){if(x===R.eof||ke(x))return e.exit(D.codeFlowValue),b(x);return e.consume(x),k}function w(x){return e.exit(D.codeFenced),t(x)}function A(x,E,S){let _=0;return C;function C(B){return V(ke(B),"expected eol"),x.enter(D.lineEnding),x.consume(B),x.exit(D.lineEnding),T}function T(B){return V(n.parser.constructs.disable.null,"expected `disable.null` to be populated"),x.enter(D.codeFencedFence),Ke(B)?Ze(x,M,D.linePrefix,n.parser.constructs.disable.null.includes("codeIndented")?void 0:de.tabSize)(B):M(B)}function M(B){if(B===a)return x.enter(D.codeFencedFenceSequence),L(B);return S(B)}function L(B){if(B===a)return _++,x.consume(B),L;if(_>=s)return x.exit(D.codeFencedFenceSequence),Ke(B)?Ze(x,O,D.whitespace)(B):O(B);return S(B)}function O(B){if(B===R.eof||ke(B))return x.exit(D.codeFencedFence),E(B);return S(B)}}}function ttr(e,t,r){let n=this;return i;function i(s){if(s===R.eof)return r(s);return V(ke(s),"expected eol"),e.enter(D.lineEnding),e.consume(s),e.exit(D.lineEnding),o}function o(s){return n.parser.lazy[n.now().line]?r(s):t(s)}}var yje,sD;var vje=v(()=>{Mt();Oi();ar();ut();yje={partial:!0,tokenize:ttr},sD={concrete:!0,name:"codeFenced",tokenize:etr}});function ntr(e,t,r){let n=this;return i;function i(l){return V(Ke(l)),e.enter(D.codeIndented),Ze(e,o,D.linePrefix,de.tabSize+1)(l)}function o(l){let u=n.events[n.events.length-1];return u&&u[1].type===D.linePrefix&&u[2].sliceSerialize(u[1],!0).length>=de.tabSize?s(l):r(l)}function s(l){if(l===R.eof)return c(l);if(ke(l))return e.attempt(rtr,s,c)(l);return e.enter(D.codeFlowValue),a(l)}function a(l){if(l===R.eof||ke(l))return e.exit(D.codeFlowValue),s(l);return e.consume(l),a}function c(l){return e.exit(D.codeIndented),t(l)}}function itr(e,t,r){let n=this;return i;function i(s){if(n.parser.lazy[n.now().line])return r(s);if(ke(s))return e.enter(D.lineEnding),e.consume(s),e.exit(D.lineEnding),i;return Ze(e,o,D.linePrefix,de.tabSize+1)(s)}function o(s){let a=n.events[n.events.length-1];return a&&a[1].type===D.linePrefix&&a[2].sliceSerialize(a[1],!0).length>=de.tabSize?t(s):ke(s)?i(s):r(s)}}var lA,rtr;var bje=v(()=>{Mt();Oi();ar();ut();lA={name:"codeIndented",tokenize:ntr},rtr={partial:!0,tokenize:itr}});function otr(e){let t=e.length-4,r=3,n,i;if((e[r][1].type===D.lineEnding||e[r][1].type==="space")&&(e[t][1].type===D.lineEnding||e[t][1].type==="space")){n=r;while(++n<t)if(e[n][1].type===D.codeTextData){e[r][1].type=D.codeTextPadding,e[t][1].type=D.codeTextPadding,r+=2,t-=2;break}}n=r-1,t++;while(++n<=t)if(i===void 0){if(n!==t&&e[n][1].type!==D.lineEnding)i=n}else if(n===t||e[n][1].type===D.lineEnding){if(e[i][1].type=D.codeTextData,n!==i+2)e[i][1].end=e[n-1][1].end,e.splice(i+2,n-i-2),t-=n-i-2,n=i+2;i=void 0}return e}function kje(e){return e!==R.graveAccent||this.events[this.events.length-1][1].type===D.characterEscape}function str(e,t,r){let n=this,i=0,o,s;return a;function a(p){return V(p===R.graveAccent,"expected `` ` ``"),V(kje.call(n,n.previous),"expected correct previous"),e.enter(D.codeText),e.enter(D.codeTextSequence),c(p)}function c(p){if(p===R.graveAccent)return e.consume(p),i++,c;return e.exit(D.codeTextSequence),l(p)}function l(p){if(p===R.eof)return r(p);if(p===R.space)return e.enter("space"),e.consume(p),e.exit("space"),l;if(p===R.graveAccent)return s=e.enter(D.codeTextSequence),o=0,d(p);if(ke(p))return e.enter(D.lineEnding),e.consume(p),e.exit(D.lineEnding),l;return e.enter(D.codeTextData),u(p)}function u(p){if(p===R.eof||p===R.space||p===R.graveAccent||ke(p))return e.exit(D.codeTextData),l(p);return e.consume(p),u}function d(p){if(p===R.graveAccent)return e.consume(p),o++,d;if(o===i)return e.exit(D.codeTextSequence),e.exit(D.codeText),t(p);return s.type=D.codeTextData,u(p)}}var nre;var wje=v(()=>{Mt();ar();ut();nre={name:"codeText",previous:kje,resolve:otr,tokenize:str}});class ire{constructor(e){this.left=e?[...e]:[],this.right=[]}get(e){if(e<0||e>=this.left.length+this.right.length)throw RangeError("Cannot access index `"+e+"` in a splice buffer of size `"+(this.left.length+this.right.length)+"`");if(e<this.left.length)return this.left[e];return this.right[this.right.length-e+this.left.length-1]}get length(){return this.left.length+this.right.length}shift(){return this.setCursor(0),this.right.pop()}slice(e,t){let r=t===null||t===void 0?Number.POSITIVE_INFINITY:t;if(r<this.left.length)return this.left.slice(e,r);if(e>this.left.length)return this.right.slice(this.right.length-r+this.left.length,this.right.length-e+this.left.length).reverse();return this.left.slice(e).concat(this.right.slice(this.right.length-r+this.left.length).reverse())}splice(e,t,r){let n=t||0;this.setCursor(Math.trunc(e));let i=this.right.splice(this.right.length-n,Number.POSITIVE_INFINITY);if(r)uA(this.left,r);return i.reverse()}pop(){return this.setCursor(Number.POSITIVE_INFINITY),this.left.pop()}push(e){this.setCursor(Number.POSITIVE_INFINITY),this.left.push(e)}pushMany(e){this.setCursor(Number.POSITIVE_INFINITY),uA(this.left,e)}unshift(e){this.setCursor(0),this.right.push(e)}unshiftMany(e){this.setCursor(0),uA(this.right,e.reverse())}setCursor(e){if(e===this.left.length||e>this.left.length&&this.right.length===0||e<0&&this.left.length===0)return;if(e<this.left.length){let t=this.left.splice(e,Number.POSITIVE_INFINITY);uA(this.right,t.reverse())}else{let t=this.right.splice(this.left.length+this.right.length-e,Number.POSITIVE_INFINITY);uA(this.left,t.reverse())}}}function uA(e,t){let r=0;if(t.length<de.v8MaxSafeChunkSize)e.push(...t);else while(r<t.length)e.push(...t.slice(r,r+de.v8MaxSafeChunkSize)),r+=de.v8MaxSafeChunkSize}var xje=v(()=>{ut()});function aD(e){let t={},r=-1,n,i,o,s,a,c,l,u=new ire(e);while(++r<u.length){while(r in t)r=t[r];if(n=u.get(r),r&&n[1].type===D.chunkFlow&&u.get(r-1)[1].type===D.listItemPrefix){if(V(n[1]._tokenizer,"expected `_tokenizer` on subtokens"),c=n[1]._tokenizer.events,o=0,o<c.length&&c[o][1].type===D.lineEndingBlank)o+=2;if(o<c.length&&c[o][1].type===D.content)while(++o<c.length){if(c[o][1].type===D.content)break;if(c[o][1].type===D.chunkText)c[o][1]._isInFirstContentOfListItem=!0,o++}}if(n[0]==="enter"){if(n[1].contentType)Object.assign(t,atr(u,r)),r=t[r],l=!0}else if(n[1]._container){o=r,i=void 0;while(o--)if(s=u.get(o),s[1].type===D.lineEnding||s[1].type===D.lineEndingBlank){if(s[0]==="enter"){if(i)u.get(i)[1].type=D.lineEndingBlank;s[1].type=D.lineEnding,i=o}}else if(s[1].type===D.linePrefix||s[1].type===D.listItemIndent);else break;if(i)n[1].end={...u.get(i)[1].start},a=u.slice(i,r),a.unshift(n),u.splice(i,r-i+1,a)}}return Ii(e,0,Number.POSITIVE_INFINITY,u.slice(0)),!l}function atr(e,t){let r=e.get(t)[1],n=e.get(t)[2],i=t-1,o=[];V(r.contentType,"expected `contentType` on subtokens");let s=r._tokenizer;if(!s){if(s=n.parser[r.contentType](r.start),r._contentTypeTextTrailing)s._contentTypeTextTrailing=!0}let a=s.events,c=[],l={},u,d,p=-1,f=r,m=0,h=0,g=[h];while(f){while(e.get(++i)[1]!==f);if(V(!d||f.previous===d,"expected previous to match"),V(!d||d.next===f,"expected next to match"),o.push(i),!f._tokenizer){if(u=n.sliceStream(f),!f.next)u.push(R.eof);if(d)s.defineSkip(f.start);if(f._isInFirstContentOfListItem)s._gfmTasklistFirstContentOfListItem=!0;if(s.write(u),f._isInFirstContentOfListItem)s._gfmTasklistFirstContentOfListItem=void 0}d=f,f=f.next}f=r;while(++p<a.length)if(a[p][0]==="exit"&&a[p-1][0]==="enter"&&a[p][1].type===a[p-1][1].type&&a[p][1].start.line!==a[p][1].end.line)V(f,"expected a current token"),h=p+1,g.push(h),f._tokenizer=void 0,f.previous=void 0,f=f.next;if(s.events=[],f)f._tokenizer=void 0,f.previous=void 0,V(!f.next,"expected no next token");else g.pop();p=g.length;while(p--){let y=a.slice(g[p],g[p+1]),b=o.pop();V(b!==void 0,"expected a start position when splicing"),c.push([b,b+y.length-1]),e.splice(b,2,y)}c.reverse(),p=-1;while(++p<c.length)l[m+c[p][0]]=m+c[p][1],m+=c[p][1]-c[p][0]-1;return l}var ore=v(()=>{Mt();xd();ut();xje()});function ltr(e){return aD(e),e}function utr(e,t){let r;return n;function n(a){return V(a!==R.eof&&!ke(a),"expected no eof or eol"),e.enter(D.content),r=e.enter(D.chunkContent,{contentType:de.contentTypeContent}),i(a)}function i(a){if(a===R.eof)return o(a);if(ke(a))return e.check(ctr,s,o)(a);return e.consume(a),i}function o(a){return e.exit(D.chunkContent),e.exit(D.content),t(a)}function s(a){return V(ke(a),"expected eol"),e.consume(a),e.exit(D.chunkContent),V(r,"expected previous token"),r.next=e.enter(D.chunkContent,{contentType:de.contentTypeContent,previous:r}),r=r.next,i}}function dtr(e,t,r){let n=this;return i;function i(s){return V(ke(s),"expected a line ending"),e.exit(D.chunkContent),e.enter(D.lineEnding),e.consume(s),e.exit(D.lineEnding),Ze(e,o,D.linePrefix)}function o(s){if(s===R.eof||ke(s))return r(s);V(n.parser.constructs.disable.null,"expected `disable.null` to be populated");let a=n.events[n.events.length-1];if(!n.parser.constructs.disable.null.includes("codeIndented")&&a&&a[1].type===D.linePrefix&&a[2].sliceSerialize(a[1],!0).length>=de.tabSize)return t(s);return e.interrupt(n.parser.constructs.flow,r,t)(s)}}var sre,ctr;var Aje=v(()=>{Mt();Oi();ar();ore();ut();sre={resolve:ltr,tokenize:utr},ctr={partial:!0,tokenize:dtr}});function cD(e,t,r,n,i,o,s,a,c){let l=c||Number.POSITIVE_INFINITY,u=0;return d;function d(y){if(y===R.lessThan)return e.enter(n),e.enter(i),e.enter(o),e.consume(y),e.exit(o),p;if(y===R.eof||y===R.space||y===R.rightParenthesis||Oh(y))return r(y);return e.enter(n),e.enter(s),e.enter(a),e.enter(D.chunkString,{contentType:de.contentTypeString}),h(y)}function p(y){if(y===R.greaterThan)return e.enter(o),e.consume(y),e.exit(o),e.exit(i),e.exit(n),t;return e.enter(a),e.enter(D.chunkString,{contentType:de.contentTypeString}),f(y)}function f(y){if(y===R.greaterThan)return e.exit(D.chunkString),e.exit(a),p(y);if(y===R.eof||y===R.lessThan||ke(y))return r(y);return e.consume(y),y===R.backslash?m:f}function m(y){if(y===R.lessThan||y===R.greaterThan||y===R.backslash)return e.consume(y),f;return f(y)}function h(y){if(!u&&(y===R.eof||y===R.rightParenthesis||Gt(y)))return e.exit(D.chunkString),e.exit(a),e.exit(s),e.exit(n),t(y);if(u<l&&y===R.leftParenthesis)return e.consume(y),u++,h;if(y===R.rightParenthesis)return e.consume(y),u--,h;if(y===R.eof||y===R.space||y===R.leftParenthesis||Oh(y))return r(y);return e.consume(y),y===R.backslash?g:h}function g(y){if(y===R.leftParenthesis||y===R.rightParenthesis||y===R.backslash)return e.consume(y),h;return h(y)}}var are=v(()=>{ar();ut()});function lD(e,t,r,n,i,o){let s=this,a=0,c;return l;function l(f){return V(f===R.leftSquareBracket,"expected `[`"),e.enter(n),e.enter(i),e.consume(f),e.exit(i),e.enter(o),u}function u(f){if(a>de.linkReferenceSizeMax||f===R.eof||f===R.leftSquareBracket||f===R.rightSquareBracket&&!c||f===R.caret&&!a&&"_hiddenFootnoteSupport"in s.parser.constructs)return r(f);if(f===R.rightSquareBracket)return e.exit(o),e.enter(i),e.consume(f),e.exit(i),e.exit(n),t;if(ke(f))return e.enter(D.lineEnding),e.consume(f),e.exit(D.lineEnding),u;return e.enter(D.chunkString,{contentType:de.contentTypeString}),d(f)}function d(f){if(f===R.eof||f===R.leftSquareBracket||f===R.rightSquareBracket||ke(f)||a++>de.linkReferenceSizeMax)return e.exit(D.chunkString),u(f);if(e.consume(f),!c)c=!Ke(f);return f===R.backslash?p:d}function p(f){if(f===R.leftSquareBracket||f===R.backslash||f===R.rightSquareBracket)return e.consume(f),a++,d;return d(f)}}var cre=v(()=>{Mt();ar();ut()});function uD(e,t,r,n,i,o){let s;return a;function a(p){if(p===R.quotationMark||p===R.apostrophe||p===R.leftParenthesis)return e.enter(n),e.enter(i),e.consume(p),e.exit(i),s=p===R.leftParenthesis?R.rightParenthesis:p,c;return r(p)}function c(p){if(p===s)return e.enter(i),e.consume(p),e.exit(i),e.exit(n),t;return e.enter(o),l(p)}function l(p){if(p===s)return e.exit(o),c(s);if(p===R.eof)return r(p);if(ke(p))return e.enter(D.lineEnding),e.consume(p),e.exit(D.lineEnding),Ze(e,l,D.linePrefix);return e.enter(D.chunkString,{contentType:de.contentTypeString}),u(p)}function u(p){if(p===s||p===R.eof||ke(p))return e.exit(D.chunkString),l(p);return e.consume(p),p===R.backslash?d:u}function d(p){if(p===s||p===R.backslash)return e.consume(p),u;return u(p)}}var lre=v(()=>{Oi();ar();ut()});function Dh(e,t){let r;return n;function n(i){if(ke(i))return e.enter(D.lineEnding),e.consume(i),e.exit(D.lineEnding),r=!0,n;if(Ke(i))return Ze(e,n,r?D.linePrefix:D.lineSuffix)(i);return t(i)}}var ure=v(()=>{Oi();ar();ut()});function ftr(e,t,r){let n=this,i;return o;function o(f){return e.enter(D.definition),s(f)}function s(f){return V(f===R.leftSquareBracket,"expected `[`"),lD.call(n,e,a,r,D.definitionLabel,D.definitionLabelMarker,D.definitionLabelString)(f)}function a(f){if(i=Bs(n.sliceSerialize(n.events[n.events.length-1][1]).slice(1,-1)),f===R.colon)return e.enter(D.definitionMarker),e.consume(f),e.exit(D.definitionMarker),c;return r(f)}function c(f){return Gt(f)?Dh(e,l)(f):l(f)}function l(f){return cD(e,u,r,D.definitionDestination,D.definitionDestinationLiteral,D.definitionDestinationLiteralMarker,D.definitionDestinationRaw,D.definitionDestinationString)(f)}function u(f){return e.attempt(ptr,d,d)(f)}function d(f){return Ke(f)?Ze(e,p,D.whitespace)(f):p(f)}function p(f){if(f===R.eof||ke(f))return e.exit(D.definition),n.parser.defined.push(i),t(f);return r(f)}}function mtr(e,t,r){return n;function n(a){return Gt(a)?Dh(e,i)(a):r(a)}function i(a){return uD(e,o,r,D.definitionTitle,D.definitionTitleMarker,D.definitionTitleString)(a)}function o(a){return Ke(a)?Ze(e,s,D.whitespace)(a):s(a)}function s(a){return a===R.eof||ke(a)?t(a):r(a)}}var dre,ptr;var Sje=v(()=>{Mt();are();cre();Oi();lre();ure();ar();py();ut();dre={name:"definition",tokenize:ftr},ptr={partial:!0,tokenize:mtr}});function htr(e,t,r){return n;function n(o){return V(o===R.backslash,"expected `\\`"),e.enter(D.hardBreakEscape),e.consume(o),i}function i(o){if(ke(o))return e.exit(D.hardBreakEscape),t(o);return r(o)}}var pre;var Eje=v(()=>{Mt();ar();ut();pre={name:"hardBreakEscape",tokenize:htr}});function gtr(e,t){let r=e.length-2,n=3,i,o;if(e[n][1].type===D.whitespace)n+=2;if(r-2>n&&e[r][1].type===D.whitespace)r-=2;if(e[r][1].type===D.atxHeadingSequence&&(n===r-1||r-4>n&&e[r-2][1].type===D.whitespace))r-=n+1===r?2:4;if(r>n)i={type:D.atxHeadingText,start:e[n][1].start,end:e[r][1].end},o={type:D.chunkText,start:e[n][1].start,end:e[r][1].end,contentType:de.contentTypeText},Ii(e,n,r-n+1,[["enter",i,t],["enter",o,t],["exit",o,t],["exit",i,t]]);return e}function ytr(e,t,r){let n=0;return i;function i(u){return e.enter(D.atxHeading),o(u)}function o(u){return V(u===R.numberSign,"expected `#`"),e.enter(D.atxHeadingSequence),s(u)}function s(u){if(u===R.numberSign&&n++<de.atxHeadingOpeningFenceSizeMax)return e.consume(u),s;if(u===R.eof||Gt(u))return e.exit(D.atxHeadingSequence),a(u);return r(u)}function a(u){if(u===R.numberSign)return e.enter(D.atxHeadingSequence),c(u);if(u===R.eof||ke(u))return e.exit(D.atxHeading),t(u);if(Ke(u))return Ze(e,a,D.whitespace)(u);return e.enter(D.atxHeadingText),l(u)}function c(u){if(u===R.numberSign)return e.consume(u),c;return e.exit(D.atxHeadingSequence),a(u)}function l(u){if(u===R.eof||u===R.numberSign||Gt(u))return e.exit(D.atxHeadingText),a(u);return e.consume(u),l}}var fre;var $je=v(()=>{Mt();Oi();ar();xd();ut();fre={name:"headingAtx",resolve:gtr,tokenize:ytr}});var Cje,mre;var _je=v(()=>{Cje=["address","article","aside","base","basefont","blockquote","body","caption","center","col","colgroup","dd","details","dialog","dir","div","dl","dt","fieldset","figcaption","figure","footer","form","frame","frameset","h1","h2","h3","h4","h5","h6","head","header","hr","html","iframe","legend","li","link","main","menu","menuitem","nav","noframes","ol","optgroup","option","p","param","search","section","summary","table","tbody","td","tfoot","th","thead","title","tr","track","ul"],mre=["pre","script","style","textarea"]});function ktr(e){let t=e.length;while(t--)if(e[t][0]==="enter"&&e[t][1].type===D.htmlFlow)break;if(t>1&&e[t-2][1].type===D.linePrefix)e[t][1].start=e[t-2][1].start,e[t+1][1].start=e[t-2][1].start,e.splice(t-2,2);return e}function wtr(e,t,r){let n=this,i,o,s,a,c;return l;function l(j){return u(j)}function u(j){return V(j===R.lessThan,"expected `<`"),e.enter(D.htmlFlow),e.enter(D.htmlFlowData),e.consume(j),d}function d(j){if(j===R.exclamationMark)return e.consume(j),p;if(j===R.slash)return e.consume(j),o=!0,h;if(j===R.questionMark)return e.consume(j),i=de.htmlInstruction,n.interrupt?t:P;if(wo(j))return V(j!==null),e.consume(j),s=String.fromCharCode(j),g;return r(j)}function p(j){if(j===R.dash)return e.consume(j),i=de.htmlComment,f;if(j===R.leftSquareBracket)return e.consume(j),i=de.htmlCdata,a=0,m;if(wo(j))return e.consume(j),i=de.htmlDeclaration,n.interrupt?t:P;return r(j)}function f(j){if(j===R.dash)return e.consume(j),n.interrupt?t:P;return r(j)}function m(j){let X=de.cdataOpeningString;if(j===X.charCodeAt(a++)){if(e.consume(j),a===X.length)return n.interrupt?t:M;return m}return r(j)}function h(j){if(wo(j))return V(j!==null),e.consume(j),s=String.fromCharCode(j),g;return r(j)}function g(j){if(j===R.eof||j===R.slash||j===R.greaterThan||Gt(j)){let X=j===R.slash,Z=s.toLowerCase();if(!X&&!o&&mre.includes(Z))return i=de.htmlRaw,n.interrupt?t(j):M(j);if(Cje.includes(s.toLowerCase())){if(i=de.htmlBasic,X)return e.consume(j),y;return n.interrupt?t(j):M(j)}return i=de.htmlComplete,n.interrupt&&!n.parser.lazy[n.now().line]?r(j):o?b(j):k(j)}if(j===R.dash||xo(j))return e.consume(j),s+=String.fromCharCode(j),g;return r(j)}function y(j){if(j===R.greaterThan)return e.consume(j),n.interrupt?t:M;return r(j)}function b(j){if(Ke(j))return e.consume(j),b;return C(j)}function k(j){if(j===R.slash)return e.consume(j),C;if(j===R.colon||j===R.underscore||wo(j))return e.consume(j),w;if(Ke(j))return e.consume(j),k;return C(j)}function w(j){if(j===R.dash||j===R.dot||j===R.colon||j===R.underscore||xo(j))return e.consume(j),w;return A(j)}function A(j){if(j===R.equalsTo)return e.consume(j),x;if(Ke(j))return e.consume(j),A;return k(j)}function x(j){if(j===R.eof||j===R.lessThan||j===R.equalsTo||j===R.greaterThan||j===R.graveAccent)return r(j);if(j===R.quotationMark||j===R.apostrophe)return e.consume(j),c=j,E;if(Ke(j))return e.consume(j),x;return S(j)}function E(j){if(j===c)return e.consume(j),c=null,_;if(j===R.eof||ke(j))return r(j);return e.consume(j),E}function S(j){if(j===R.eof||j===R.quotationMark||j===R.apostrophe||j===R.slash||j===R.lessThan||j===R.equalsTo||j===R.greaterThan||j===R.graveAccent||Gt(j))return A(j);return e.consume(j),S}function _(j){if(j===R.slash||j===R.greaterThan||Ke(j))return k(j);return r(j)}function C(j){if(j===R.greaterThan)return e.consume(j),T;return r(j)}function T(j){if(j===R.eof||ke(j))return M(j);if(Ke(j))return e.consume(j),T;return r(j)}function M(j){if(j===R.dash&&i===de.htmlComment)return e.consume(j),z;if(j===R.lessThan&&i===de.htmlRaw)return e.consume(j),I;if(j===R.greaterThan&&i===de.htmlDeclaration)return e.consume(j),F;if(j===R.questionMark&&i===de.htmlInstruction)return e.consume(j),P;if(j===R.rightSquareBracket&&i===de.htmlCdata)return e.consume(j),K;if(ke(j)&&(i===de.htmlBasic||i===de.htmlComplete))return e.exit(D.htmlFlowData),e.check(vtr,J,L)(j);if(j===R.eof||ke(j))return e.exit(D.htmlFlowData),L(j);return e.consume(j),M}function L(j){return e.check(btr,O,J)(j)}function O(j){return V(ke(j)),e.enter(D.lineEnding),e.consume(j),e.exit(D.lineEnding),B}function B(j){if(j===R.eof||ke(j))return L(j);return e.enter(D.htmlFlowData),M(j)}function z(j){if(j===R.dash)return e.consume(j),P;return M(j)}function I(j){if(j===R.slash)return e.consume(j),s="",N;return M(j)}function N(j){if(j===R.greaterThan){let X=s.toLowerCase();if(mre.includes(X))return e.consume(j),F;return M(j)}if(wo(j)&&s.length<de.htmlRawSizeMax)return V(j!==null),e.consume(j),s+=String.fromCharCode(j),N;return M(j)}function K(j){if(j===R.rightSquareBracket)return e.consume(j),P;return M(j)}function P(j){if(j===R.greaterThan)return e.consume(j),F;if(j===R.dash&&i===de.htmlComment)return e.consume(j),P;return M(j)}function F(j){if(j===R.eof||ke(j))return e.exit(D.htmlFlowData),J(j);return e.consume(j),F}function J(j){return e.exit(D.htmlFlow),t(j)}}function xtr(e,t,r){let n=this;return i;function i(s){if(ke(s))return e.enter(D.lineEnding),e.consume(s),e.exit(D.lineEnding),o;return r(s)}function o(s){return n.parser.lazy[n.now().line]?r(s):t(s)}}function Atr(e,t,r){return n;function n(i){return V(ke(i),"expected a line ending"),e.enter(D.lineEnding),e.consume(i),e.exit(D.lineEnding),e.attempt(N5,t,r)}}var hre,vtr,btr;var Rje=v(()=>{Mt();ar();_je();ut();rD();hre={concrete:!0,name:"htmlFlow",resolveTo:ktr,tokenize:wtr},vtr={partial:!0,tokenize:Atr},btr={partial:!0,tokenize:xtr}});function Str(e,t,r){let n=this,i,o,s;return a;function a(P){return V(P===R.lessThan,"expected `<`"),e.enter(D.htmlText),e.enter(D.htmlTextData),e.consume(P),c}function c(P){if(P===R.exclamationMark)return e.consume(P),l;if(P===R.slash)return e.consume(P),A;if(P===R.questionMark)return e.consume(P),k;if(wo(P))return e.consume(P),S;return r(P)}function l(P){if(P===R.dash)return e.consume(P),u;if(P===R.leftSquareBracket)return e.consume(P),o=0,m;if(wo(P))return e.consume(P),b;return r(P)}function u(P){if(P===R.dash)return e.consume(P),f;return r(P)}function d(P){if(P===R.eof)return r(P);if(P===R.dash)return e.consume(P),p;if(ke(P))return s=d,I(P);return e.consume(P),d}function p(P){if(P===R.dash)return e.consume(P),f;return d(P)}function f(P){return P===R.greaterThan?z(P):P===R.dash?p(P):d(P)}function m(P){let F=de.cdataOpeningString;if(P===F.charCodeAt(o++))return e.consume(P),o===F.length?h:m;return r(P)}function h(P){if(P===R.eof)return r(P);if(P===R.rightSquareBracket)return e.consume(P),g;if(ke(P))return s=h,I(P);return e.consume(P),h}function g(P){if(P===R.rightSquareBracket)return e.consume(P),y;return h(P)}function y(P){if(P===R.greaterThan)return z(P);if(P===R.rightSquareBracket)return e.consume(P),y;return h(P)}function b(P){if(P===R.eof||P===R.greaterThan)return z(P);if(ke(P))return s=b,I(P);return e.consume(P),b}function k(P){if(P===R.eof)return r(P);if(P===R.questionMark)return e.consume(P),w;if(ke(P))return s=k,I(P);return e.consume(P),k}function w(P){return P===R.greaterThan?z(P):k(P)}function A(P){if(wo(P))return e.consume(P),x;return r(P)}function x(P){if(P===R.dash||xo(P))return e.consume(P),x;return E(P)}function E(P){if(ke(P))return s=E,I(P);if(Ke(P))return e.consume(P),E;return z(P)}function S(P){if(P===R.dash||xo(P))return e.consume(P),S;if(P===R.slash||P===R.greaterThan||Gt(P))return _(P);return r(P)}function _(P){if(P===R.slash)return e.consume(P),z;if(P===R.colon||P===R.underscore||wo(P))return e.consume(P),C;if(ke(P))return s=_,I(P);if(Ke(P))return e.consume(P),_;return z(P)}function C(P){if(P===R.dash||P===R.dot||P===R.colon||P===R.underscore||xo(P))return e.consume(P),C;return T(P)}function T(P){if(P===R.equalsTo)return e.consume(P),M;if(ke(P))return s=T,I(P);if(Ke(P))return e.consume(P),T;return _(P)}function M(P){if(P===R.eof||P===R.lessThan||P===R.equalsTo||P===R.greaterThan||P===R.graveAccent)return r(P);if(P===R.quotationMark||P===R.apostrophe)return e.consume(P),i=P,L;if(ke(P))return s=M,I(P);if(Ke(P))return e.consume(P),M;return e.consume(P),O}function L(P){if(P===i)return e.consume(P),i=void 0,B;if(P===R.eof)return r(P);if(ke(P))return s=L,I(P);return e.consume(P),L}function O(P){if(P===R.eof||P===R.quotationMark||P===R.apostrophe||P===R.lessThan||P===R.equalsTo||P===R.graveAccent)return r(P);if(P===R.slash||P===R.greaterThan||Gt(P))return _(P);return e.consume(P),O}function B(P){if(P===R.slash||P===R.greaterThan||Gt(P))return _(P);return r(P)}function z(P){if(P===R.greaterThan)return e.consume(P),e.exit(D.htmlTextData),e.exit(D.htmlText),t;return r(P)}function I(P){return V(s,"expected return state"),V(ke(P),"expected eol"),e.exit(D.htmlTextData),e.enter(D.lineEnding),e.consume(P),e.exit(D.lineEnding),N}function N(P){return V(n.parser.constructs.disable.null,"expected `disable.null` to be populated"),Ke(P)?Ze(e,K,D.linePrefix,n.parser.constructs.disable.null.includes("codeIndented")?void 0:de.tabSize)(P):K(P)}function K(P){return e.enter(D.htmlTextData),s(P)}}var gre;var Tje=v(()=>{Mt();Oi();ar();ut();gre={name:"htmlText",tokenize:Str}});function _tr(e){let t=-1,r=[];while(++t<e.length){let n=e[t][1];if(r.push(e[t]),n.type===D.labelImage||n.type===D.labelLink||n.type===D.labelEnd){let i=n.type===D.labelImage?4:2;n.type=D.data,t+=i}}if(e.length!==r.length)Ii(e,0,e.length,r);return e}function Rtr(e,t){let r=e.length,n=0,i,o,s,a;while(r--)if(i=e[r][1],o){if(i.type===D.link||i.type===D.labelLink&&i._inactive)break;if(e[r][0]==="enter"&&i.type===D.labelLink)i._inactive=!0}else if(s){if(e[r][0]==="enter"&&(i.type===D.labelImage||i.type===D.labelLink)&&!i._balanced){if(o=r,i.type!==D.labelLink){n=2;break}}}else if(i.type===D.labelEnd)s=r;V(o!==void 0,"`open` is supposed to be found"),V(s!==void 0,"`close` is supposed to be found");let c={type:e[o][1].type===D.labelLink?D.link:D.image,start:{...e[o][1].start},end:{...e[e.length-1][1].end}},l={type:D.label,start:{...e[o][1].start},end:{...e[s][1].end}},u={type:D.labelText,start:{...e[o+n+2][1].end},end:{...e[s-2][1].start}};return a=[["enter",c,t],["enter",l,t]],a=_a(a,e.slice(o+1,o+n+3)),a=_a(a,[["enter",u,t]]),V(t.parser.constructs.insideSpan.null,"expected `insideSpan.null` to be populated"),a=_a(a,Q1(t.parser.constructs.insideSpan.null,e.slice(o+n+4,s-3),t)),a=_a(a,[["exit",u,t],e[s-2],e[s-1],["exit",l,t]]),a=_a(a,e.slice(s+1)),a=_a(a,[["exit",c,t]]),Ii(e,o,e.length,a),e}function Ttr(e,t,r){let n=this,i=n.events.length,o,s;while(i--)if((n.events[i][1].type===D.labelImage||n.events[i][1].type===D.labelLink)&&!n.events[i][1]._balanced){o=n.events[i][1];break}return a;function a(p){if(V(p===R.rightSquareBracket,"expected `]`"),!o)return r(p);if(o._inactive)return d(p);return s=n.parser.defined.includes(Bs(n.sliceSerialize({start:o.end,end:n.now()}))),e.enter(D.labelEnd),e.enter(D.labelMarker),e.consume(p),e.exit(D.labelMarker),e.exit(D.labelEnd),c}function c(p){if(p===R.leftParenthesis)return e.attempt(Etr,u,s?u:d)(p);if(p===R.leftSquareBracket)return e.attempt($tr,u,s?l:d)(p);return s?u(p):d(p)}function l(p){return e.attempt(Ctr,u,d)(p)}function u(p){return t(p)}function d(p){return o._balanced=!0,r(p)}}function Ptr(e,t,r){return n;function n(d){return V(d===R.leftParenthesis,"expected left paren"),e.enter(D.resource),e.enter(D.resourceMarker),e.consume(d),e.exit(D.resourceMarker),i}function i(d){return Gt(d)?Dh(e,o)(d):o(d)}function o(d){if(d===R.rightParenthesis)return u(d);return cD(e,s,a,D.resourceDestination,D.resourceDestinationLiteral,D.resourceDestinationLiteralMarker,D.resourceDestinationRaw,D.resourceDestinationString,de.linkResourceDestinationBalanceMax)(d)}function s(d){return Gt(d)?Dh(e,c)(d):u(d)}function a(d){return r(d)}function c(d){if(d===R.quotationMark||d===R.apostrophe||d===R.leftParenthesis)return uD(e,l,r,D.resourceTitle,D.resourceTitleMarker,D.resourceTitleString)(d);return u(d)}function l(d){return Gt(d)?Dh(e,u)(d):u(d)}function u(d){if(d===R.rightParenthesis)return e.enter(D.resourceMarker),e.consume(d),e.exit(D.resourceMarker),e.exit(D.resource),t;return r(d)}}function Itr(e,t,r){let n=this;return i;function i(a){return V(a===R.leftSquareBracket,"expected left bracket"),lD.call(n,e,o,s,D.reference,D.referenceMarker,D.referenceString)(a)}function o(a){return n.parser.defined.includes(Bs(n.sliceSerialize(n.events[n.events.length-1][1]).slice(1,-1)))?t(a):r(a)}function s(a){return r(a)}}function Otr(e,t,r){return n;function n(o){return V(o===R.leftSquareBracket,"expected left bracket"),e.enter(D.reference),e.enter(D.referenceMarker),e.consume(o),e.exit(D.referenceMarker),i}function i(o){if(o===R.rightSquareBracket)return e.enter(D.referenceMarker),e.consume(o),e.exit(D.referenceMarker),e.exit(D.reference),t;return r(o)}}var jh,Etr,$tr,Ctr;var dD=v(()=>{Mt();are();cre();lre();ure();ar();xd();py();ut();jh={name:"labelEnd",resolveAll:_tr,resolveTo:Rtr,tokenize:Ttr},Etr={tokenize:Ptr},$tr={tokenize:Itr},Ctr={tokenize:Otr}});function Mtr(e,t,r){let n=this;return i;function i(a){return V(a===R.exclamationMark,"expected `!`"),e.enter(D.labelImage),e.enter(D.labelImageMarker),e.consume(a),e.exit(D.labelImageMarker),o}function o(a){if(a===R.leftSquareBracket)return e.enter(D.labelMarker),e.consume(a),e.exit(D.labelMarker),e.exit(D.labelImage),s;return r(a)}function s(a){return a===R.caret&&"_hiddenFootnoteSupport"in n.parser.constructs?r(a):t(a)}}var yre;var Pje=v(()=>{Mt();ut();dD();yre={name:"labelStartImage",resolveAll:jh.resolveAll,tokenize:Mtr}});function Dtr(e,t,r){let n=this;return i;function i(s){return V(s===R.leftSquareBracket,"expected `[`"),e.enter(D.labelLink),e.enter(D.labelMarker),e.consume(s),e.exit(D.labelMarker),e.exit(D.labelLink),o}function o(s){return s===R.caret&&"_hiddenFootnoteSupport"in n.parser.constructs?r(s):t(s)}}var vre;var Ije=v(()=>{Mt();ut();dD();vre={name:"labelStartLink",resolveAll:jh.resolveAll,tokenize:Dtr}});function jtr(e,t){return r;function r(n){return V(ke(n),"expected eol"),e.enter(D.lineEnding),e.consume(n),e.exit(D.lineEnding),Ze(e,t,D.linePrefix)}}var dA;var Oje=v(()=>{Mt();Oi();ar();ut();dA={name:"lineEnding",tokenize:jtr}});function Ltr(e,t,r){let n=0,i;return o;function o(l){return e.enter(D.thematicBreak),s(l)}function s(l){return V(l===R.asterisk||l===R.dash||l===R.underscore,"expected `*`, `-`, or `_`"),i=l,a(l)}function a(l){if(l===i)return e.enter(D.thematicBreakSequence),c(l);if(n>=de.thematicBreakMarkerCountMin&&(l===R.eof||ke(l)))return e.exit(D.thematicBreak),t(l);return r(l)}function c(l){if(l===i)return e.consume(l),n++,c;return e.exit(D.thematicBreakSequence),Ke(l)?Ze(e,a,D.whitespace)(l):a(l)}}var Lh;var bre=v(()=>{Mt();Oi();ar();ut();Lh={name:"thematicBreak",tokenize:Ltr}});function ztr(e,t,r){let n=this,i=n.events[n.events.length-1],o=i&&i[1].type===D.linePrefix?i[2].sliceSerialize(i[1],!0).length:0,s=0;return a;function a(f){V(n.containerState,"expected state");let m=n.containerState.type||(f===R.asterisk||f===R.plusSign||f===R.dash?D.listUnordered:D.listOrdered);if(m===D.listUnordered?!n.containerState.marker||f===n.containerState.marker:aA(f)){if(!n.containerState.type)n.containerState.type=m,e.enter(m,{_container:!0});if(m===D.listUnordered)return e.enter(D.listItemPrefix),f===R.asterisk||f===R.dash?e.check(Lh,r,l)(f):l(f);if(!n.interrupt||f===R.digit1)return e.enter(D.listItemPrefix),e.enter(D.listItemValue),c(f)}return r(f)}function c(f){if(V(n.containerState,"expected state"),aA(f)&&++s<de.listItemValueSizeMax)return e.consume(f),c;if((!n.interrupt||s<2)&&(n.containerState.marker?f===n.containerState.marker:f===R.rightParenthesis||f===R.dot))return e.exit(D.listItemValue),l(f);return r(f)}function l(f){return V(n.containerState,"expected state"),V(f!==R.eof,"eof (`null`) is not a marker"),e.enter(D.listItemMarker),e.consume(f),e.exit(D.listItemMarker),n.containerState.marker=n.containerState.marker||f,e.check(N5,n.interrupt?r:u,e.attempt(Ntr,p,d))}function u(f){return V(n.containerState,"expected state"),n.containerState.initialBlankLine=!0,o++,p(f)}function d(f){if(Ke(f))return e.enter(D.listItemPrefixWhitespace),e.consume(f),e.exit(D.listItemPrefixWhitespace),p;return r(f)}function p(f){return V(n.containerState,"expected state"),n.containerState.size=o+n.sliceSerialize(e.exit(D.listItemPrefix),!0).length,t(f)}}function Btr(e,t,r){let n=this;return V(n.containerState,"expected state"),n.containerState._closeFlow=void 0,e.check(N5,i,o);function i(a){return V(n.containerState,"expected state"),V(typeof n.containerState.size==="number","expected size"),n.containerState.furtherBlankLines=n.containerState.furtherBlankLines||n.containerState.initialBlankLine,Ze(e,t,D.listItemIndent,n.containerState.size+1)(a)}function o(a){if(V(n.containerState,"expected state"),n.containerState.furtherBlankLines||!Ke(a))return n.containerState.furtherBlankLines=void 0,n.containerState.initialBlankLine=void 0,s(a);return n.containerState.furtherBlankLines=void 0,n.containerState.initialBlankLine=void 0,e.attempt(Ftr,t,s)(a)}function s(a){return V(n.containerState,"expected state"),n.containerState._closeFlow=!0,n.interrupt=void 0,V(n.parser.constructs.disable.null,"expected `disable.null` to be populated"),Ze(e,e.attempt(Us,t,r),D.linePrefix,n.parser.constructs.disable.null.includes("codeIndented")?void 0:de.tabSize)(a)}}function Utr(e,t,r){let n=this;return V(n.containerState,"expected state"),V(typeof n.containerState.size==="number","expected size"),Ze(e,i,D.listItemIndent,n.containerState.size+1);function i(o){V(n.containerState,"expected state");let s=n.events[n.events.length-1];return s&&s[1].type===D.listItemIndent&&s[2].sliceSerialize(s[1],!0).length===n.containerState.size?t(o):r(o)}}function Htr(e){V(this.containerState,"expected state"),V(typeof this.containerState.type==="string","expected type"),e.exit(this.containerState.type)}function Gtr(e,t,r){let n=this;return V(n.parser.constructs.disable.null,"expected `disable.null` to be populated"),Ze(e,i,D.listItemPrefixWhitespace,n.parser.constructs.disable.null.includes("codeIndented")?void 0:de.tabSize+1);function i(o){let s=n.events[n.events.length-1];return!Ke(o)&&s&&s[1].type===D.listItemPrefixWhitespace?t(o):r(o)}}var Us,Ntr,Ftr;var Mje=v(()=>{Mt();Oi();ar();ut();rD();bre();Us={continuation:{tokenize:Btr},exit:Htr,name:"list",tokenize:ztr},Ntr={partial:!0,tokenize:Gtr},Ftr={partial:!0,tokenize:Utr}});function Wtr(e,t){let r=e.length,n,i,o;while(r--)if(e[r][0]==="enter"){if(e[r][1].type===D.content){n=r;break}if(e[r][1].type===D.paragraph)i=r}else{if(e[r][1].type===D.content)e.splice(r,1);if(!o&&e[r][1].type===D.definition)o=r}V(i!==void 0,"expected a `text` index to be found"),V(n!==void 0,"expected a `text` index to be found"),V(e[n][2]===t,"enter context should be same"),V(e[e.length-1][2]===t,"enter context should be same");let s={type:D.setextHeading,start:{...e[n][1].start},end:{...e[e.length-1][1].end}};if(e[i][1].type=D.setextHeadingText,o)e.splice(i,0,["enter",s,t]),e.splice(o+1,0,["exit",e[n][1],t]),e[n][1].end={...e[o][1].end};else e[n][1]=s;return e.push(["exit",s,t]),e}function Vtr(e,t,r){let n=this,i;return o;function o(l){let u=n.events.length,d;V(l===R.dash||l===R.equalsTo,"expected `=` or `-`");while(u--)if(n.events[u][1].type!==D.lineEnding&&n.events[u][1].type!==D.linePrefix&&n.events[u][1].type!==D.content){d=n.events[u][1].type===D.paragraph;break}if(!n.parser.lazy[n.now().line]&&(n.interrupt||d))return e.enter(D.setextHeadingLine),i=l,s(l);return r(l)}function s(l){return e.enter(D.setextHeadingLineSequence),a(l)}function a(l){if(l===i)return e.consume(l),a;return e.exit(D.setextHeadingLineSequence),Ke(l)?Ze(e,c,D.lineSuffix)(l):c(l)}function c(l){if(l===R.eof||ke(l))return e.exit(D.setextHeadingLine),t(l);return r(l)}}var pD;var Dje=v(()=>{Mt();Oi();ar();ut();pD={name:"setextUnderline",resolveTo:Wtr,tokenize:Vtr}});var fD=v(()=>{pje();fje();rD();mje();hje();gje();vje();bje();wje();Aje();Sje();Eje();$je();Rje();Tje();dD();Pje();Ije();Oje();Mje();Dje();bre()});function qtr(e){let t=this,r=e.attempt(N5,n,e.attempt(this.parser.constructs.flowInitial,i,Ze(e,e.attempt(this.parser.constructs.flow,i,e.attempt(sre,i)),D.linePrefix)));return r;function n(o){if(V(o===R.eof||ke(o),"expected eol or eof"),o===R.eof){e.consume(o);return}return e.enter(D.lineEndingBlank),e.consume(o),e.exit(D.lineEndingBlank),t.currentConstruct=void 0,r}function i(o){if(V(o===R.eof||ke(o),"expected eol or eof"),o===R.eof){e.consume(o);return}return e.enter(D.lineEnding),e.consume(o),e.exit(D.lineEnding),t.currentConstruct=void 0,r}}var jje;var Lje=v(()=>{Mt();fD();Oi();ar();ut();jje={tokenize:qtr}});function Bje(e){return{resolveAll:Uje(e==="text"?Ktr:void 0),tokenize:t};function t(r){let n=this,i=this.parser.constructs[e],o=r.attempt(i,s,a);return s;function s(u){return l(u)?o(u):a(u)}function a(u){if(u===R.eof){r.consume(u);return}return r.enter(D.data),r.consume(u),c}function c(u){if(l(u))return r.exit(D.data),o(u);return r.consume(u),c}function l(u){if(u===R.eof)return!0;let d=i[u],p=-1;if(d){V(Array.isArray(d),"expected `disable.null` to be populated");while(++p<d.length){let f=d[p];if(!f.previous||f.previous.call(n,n.previous))return!0}}return!1}}}function Uje(e){return t;function t(r,n){let i=-1,o;while(++i<=r.length)if(o===void 0){if(r[i]&&r[i][1].type===D.data)o=i,i++}else if(!r[i]||r[i][1].type!==D.data){if(i!==o+2)r[o][1].end=r[i-1][1].end,r.splice(o+2,i-o-2),i=o+2;o=void 0}return e?e(r,n):r}}function Ktr(e,t){let r=0;while(++r<=e.length)if((r===e.length||e[r][1].type===D.lineEnding)&&e[r-1][1].type===D.data){let n=e[r-1][1],i=t.sliceStream(n),o=i.length,s=-1,a=0,c;while(o--){let l=i[o];if(typeof l==="string"){s=l.length;while(l.charCodeAt(s-1)===R.space)a++,s--;if(s)break;s=-1}else if(l===R.horizontalTab)c=!0,a++;else if(l===R.virtualSpace);else{o++;break}}if(t._contentTypeTextTrailing&&r===e.length)a=0;if(a){let l={type:r===e.length||c||a<de.hardBreakPrefixSizeMin?D.lineSuffix:D.hardBreakTrailing,start:{_bufferIndex:o?s:n.start._bufferIndex+s,_index:n.start._index+o,line:n.end.line,column:n.end.column-a,offset:n.end.offset-a},end:{...n.end}};if(n.end={...l.start},n.start.offset===n.end.offset)Object.assign(n,l);else e.splice(r,0,["enter",l,t],["exit",l,t]),r+=2}r++}return e}var Nje,Fje,zje;var kre=v(()=>{Mt();ut();Nje={resolveAll:Uje()},Fje=Bje("string"),zje=Bje("text")});var wre={};Nl(wre,{attentionMarkers:()=>rrr,contentInitial:()=>Ytr,disable:()=>nrr,document:()=>Jtr,flow:()=>Ztr,flowInitial:()=>Xtr,insideSpan:()=>trr,string:()=>Qtr,text:()=>err});var Jtr,Ytr,Xtr,Ztr,Qtr,err,trr,rrr,nrr;var Hje=v(()=>{fD();ut();kre();Jtr={[R.asterisk]:Us,[R.plusSign]:Us,[R.dash]:Us,[R.digit0]:Us,[R.digit1]:Us,[R.digit2]:Us,[R.digit3]:Us,[R.digit4]:Us,[R.digit5]:Us,[R.digit6]:Us,[R.digit7]:Us,[R.digit8]:Us,[R.digit9]:Us,[R.greaterThan]:nD},Ytr={[R.leftSquareBracket]:dre},Xtr={[R.horizontalTab]:lA,[R.virtualSpace]:lA,[R.space]:lA},Ztr={[R.numberSign]:fre,[R.asterisk]:Lh,[R.dash]:[pD,Lh],[R.lessThan]:hre,[R.equalsTo]:pD,[R.underscore]:Lh,[R.graveAccent]:sD,[R.tilde]:sD},Qtr={[R.ampersand]:oD,[R.backslash]:iD},err={[R.carriageReturn]:dA,[R.lineFeed]:dA,[R.carriageReturnLineFeed]:dA,[R.exclamationMark]:yre,[R.ampersand]:oD,[R.asterisk]:cA,[R.lessThan]:[rre,gre],[R.leftSquareBracket]:vre,[R.backslash]:[pre,iD],[R.rightSquareBracket]:jh,[R.underscore]:cA,[R.graveAccent]:nre},trr={null:[cA,Nje]},rrr={null:[R.asterisk,R.underscore]},nrr={null:[]}});function Wje(e,t,r){let n={_bufferIndex:-1,_index:0,line:r&&r.line||1,column:r&&r.column||1,offset:r&&r.offset||0},i={},o=[],s=[],a=[],c=!0,l={attempt:_(E),check:_(S),consume:w,enter:A,exit:x,interrupt:_(S,{interrupt:!0})},u={code:R.eof,containerState:{},defineSkip:y,events:[],now:g,parser:e,previous:R.eof,sliceSerialize:m,sliceStream:h,write:f},d=t.tokenize.call(u,l),p;if(t.resolveAll)o.push(t);return u;function f(L){if(s=_a(s,L),b(),s[s.length-1]!==R.eof)return[];return C(t,0),u.events=Q1(o,u.events,u),u.events}function m(L,O){return orr(h(L),O)}function h(L){return irr(s,L)}function g(){let{_bufferIndex:L,_index:O,line:B,column:z,offset:I}=n;return{_bufferIndex:L,_index:O,line:B,column:z,offset:I}}function y(L){i[L.line]=L.column,M(),Nh("position: define skip: `%j`",n)}function b(){let L;while(n._index<s.length){let O=s[n._index];if(typeof O==="string"){if(L=n._index,n._bufferIndex<0)n._bufferIndex=0;while(n._index===L&&n._bufferIndex<O.length)k(O.charCodeAt(n._bufferIndex))}else k(O)}}function k(L){V(c===!0,"expected character to be consumed"),c=void 0,Nh("main: passing `%s` to %s",L,d&&d.name),p=L,V(typeof d==="function","expected state"),d=d(L)}function w(L){if(V(L===p,"expected given code to equal expected code"),Nh("consume: `%s`",L),V(c===void 0,"expected code to not have been consumed: this might be because `return x(code)` instead of `return x` was used"),V(L===null?u.events.length===0||u.events[u.events.length-1][0]==="exit":u.events[u.events.length-1][0]==="enter","expected last token to be open"),ke(L))n.line++,n.column=1,n.offset+=L===R.carriageReturnLineFeed?2:1,M(),Nh("position: after eol: `%j`",n);else if(L!==R.virtualSpace)n.column++,n.offset++;if(n._bufferIndex<0)n._index++;else if(n._bufferIndex++,n._bufferIndex===s[n._index].length)n._bufferIndex=-1,n._index++;u.previous=L,c=!0}function A(L,O){let B=O||{};return B.type=L,B.start=g(),V(typeof L==="string","expected string type"),V(L.length>0,"expected non-empty string"),Nh("enter: `%s`",L),u.events.push(["enter",B,u]),a.push(B),B}function x(L){V(typeof L==="string","expected string type"),V(L.length>0,"expected non-empty string");let O=a.pop();return V(O,"cannot close w/o open tokens"),O.end=g(),V(L===O.type,"expected exit token to match current token"),V(!(O.start._index===O.end._index&&O.start._bufferIndex===O.end._bufferIndex),"expected non-empty token (`"+L+"`)"),Nh("exit: `%s`",O.type),u.events.push(["exit",O,u]),O}function E(L,O){C(L,O.from)}function S(L,O){O.restore()}function _(L,O){return B;function B(z,I,N){let K,P,F,J;return Array.isArray(z)?X(z):("tokenize"in z)?X([z]):j(z);function j(ae){return _e;function _e(Ye){let Be=Ye!==null&&ae[Ye],Se=Ye!==null&&ae.null,Ie=[...Array.isArray(Be)?Be:Be?[Be]:[],...Array.isArray(Se)?Se:Se?[Se]:[]];return X(Ie)(Ye)}}function X(ae){if(K=ae,P=0,ae.length===0)return V(N,"expected `bogusState` to be given"),N;return Z(ae[P])}function Z(ae){return _e;function _e(Ye){if(J=T(),F=ae,!ae.partial)u.currentConstruct=ae;if(V(u.parser.constructs.disable.null,"expected `disable.null` to be populated"),ae.name&&u.parser.constructs.disable.null.includes(ae.name))return Ee(Ye);return ae.tokenize.call(O?Object.assign(Object.create(u),O):u,l,te,Ee)(Ye)}}function te(ae){return V(ae===p,"expected code"),c=!0,L(F,J),I}function Ee(ae){if(V(ae===p,"expected code"),c=!0,J.restore(),++P<K.length)return Z(K[P]);return N}}}function C(L,O){if(L.resolveAll&&!o.includes(L))o.push(L);if(L.resolve)Ii(u.events,O,u.events.length-O,L.resolve(u.events.slice(O),u));if(L.resolveTo)u.events=L.resolveTo(u.events,u);V(L.partial||u.events.length===0||u.events[u.events.length-1][0]==="exit","expected last token to end")}function T(){let L=g(),{previous:O,currentConstruct:B}=u,z=u.events.length,I=Array.from(a);return{from:z,restore:N};function N(){n=L,u.previous=O,u.currentConstruct=B,u.events.length=z,a=I,M(),Nh("position: restore: `%j`",n)}}function M(){if(n.line in i&&n.column<2)n.column=i[n.line],n.offset+=i[n.line]-1}}function irr(e,t){let r=t.start._index,n=t.start._bufferIndex,i=t.end._index,o=t.end._bufferIndex,s;if(r===i)V(o>-1,"expected non-negative end buffer index"),V(n>-1,"expected non-negative start buffer index"),s=[e[r].slice(n,o)];else{if(s=e.slice(r,i),n>-1){let a=s[0];if(typeof a==="string")s[0]=a.slice(n);else V(n===0,"expected `startBufferIndex` to be `0`"),s.shift()}if(o>0)s.push(e[i].slice(0,o))}return s}function orr(e,t){let r=-1,n=[],i;while(++r<e.length){let o=e[r],s;if(typeof o==="string")s=o;else switch(o){case R.carriageReturn:{s=J2.cr;break}case R.lineFeed:{s=J2.lf;break}case R.carriageReturnLineFeed:{s=J2.cr+J2.lf;break}case R.horizontalTab:{s=t?J2.space:J2.ht;break}case R.virtualSpace:{if(!t&&i)continue;s=J2.space;break}default:V(typeof o==="number","expected number"),s=String.fromCharCode(o)}i=o===R.horizontalTab,n.push(s)}return n.join("")}var Gje,Nh;var Vje=v(()=>{Mt();ar();xd();ut();Gje=be(X6(),1),Nh=Gje.default("micromark")});function xre(e){let n={constructs:QM([wre,...(e||{}).extensions||[]]),content:i(sje),defined:[],document:i(lje),flow:i(jje),lazy:{},string:i(Fje),text:i(zje)};return n;function i(o){return s;function s(a){return Wje(n,o,a)}}}var qje=v(()=>{ere();aje();uje();Lje();kre();Hje();Vje()});function Are(e){while(!aD(e));return e}var Kje=v(()=>{ore()});function Sre(){let e=1,t="",r=!0,n;return i;function i(o,s,a){let c=[],l,u,d,p,f;if(o=t+(typeof o==="string"?o.toString():new TextDecoder(s||void 0).decode(o)),d=0,t="",r){if(o.charCodeAt(0)===R.byteOrderMarker)d++;r=void 0}while(d<o.length){if(Jje.lastIndex=d,l=Jje.exec(o),p=l&&l.index!==void 0?l.index:o.length,f=o.charCodeAt(p),!l){t=o.slice(d);break}if(f===R.lf&&d===p&&n)c.push(R.carriageReturnLineFeed),n=void 0;else{if(n)c.push(R.carriageReturn),n=void 0;if(d<p)c.push(o.slice(d,p)),e+=p-d;switch(f){case R.nul:{c.push(R.replacementCharacter),e++;break}case R.ht:{u=Math.ceil(e/de.tabSize)*de.tabSize,c.push(R.horizontalTab);while(e++<u)c.push(R.virtualSpace);break}case R.lf:{c.push(R.lineFeed),e=1;break}default:n=!0,e=1}}d=p+1}if(a){if(n)c.push(R.carriageReturn);if(t)c.push(t);c.push(R.eof)}return c}}var Jje;var Yje=v(()=>{ut();Jje=/[\0\t\n\r]/g});var Xje=v(()=>{qje();Kje();Yje()});function Zje(e){return e.replace(srr,arr)}function arr(e,t,r){if(t)return t;if(r.charCodeAt(0)===R.numberSign){let i=r.charCodeAt(1),o=i===R.lowercaseX||i===R.uppercaseX;return eD(r.slice(o?2:1),o?de.numericBaseHexadecimal:de.numericBaseDecimal)}return dy(r)||e}var srr;var Qje=v(()=>{ZM();tre();ut();srr=/\\([!-/:-@[-`{-~])|&(#(?:\d{1,7}|x[\da-f]{1,6})|[\da-z]{1,31});/gi});function ef(e){if(!e||typeof e!=="object")return"";if("position"in e||"type"in e)return eLe(e.position);if("start"in e||"end"in e)return eLe(e);if("line"in e||"column"in e)return Ere(e);return""}function Ere(e){return tLe(e&&e.line)+":"+tLe(e&&e.column)}function eLe(e){return Ere(e&&e.start)+"-"+Ere(e&&e.end)}function tLe(e){return e&&typeof e==="number"?e:1}var $re=()=>{};function Cre(e,t,r){if(t&&typeof t==="object")r=t,t=void 0;return crr(r)(Are(xre(r).document().write(Sre()(e,t,!0))))}function crr(e){let t={transforms:[],canContainEols:["emphasis","fragment","heading","paragraph","strong"],enter:{autolink:o(Ae),autolinkProtocol:_,autolinkEmail:_,atxHeading:o(Ft),blockQuote:o(Ye),characterEscape:_,characterReference:_,codeFenced:o(Be),codeFencedFenceInfo:s,codeFencedFenceMeta:s,codeIndented:o(Be,s),codeText:o(Se,s),codeTextData:_,data:_,codeFlowValue:_,definition:o(Ie),definitionDestinationString:s,definitionLabelString:s,definitionTitleString:s,emphasis:o(Dt),hardBreakEscape:o(ze),hardBreakTrailing:o(ze),htmlFlow:o(Fr,s),htmlFlowData:_,htmlText:o(Fr,s),htmlTextData:_,image:o(he),label:s,link:o(Ae),listItem:o($t),listItemValue:p,listOrdered:o(We,d),listUnordered:o(We),paragraph:o(we),reference:j,referenceString:s,resourceDestinationString:s,resourceTitleString:s,setextHeading:o(Ft),strong:o(jt),thematicBreak:o(zt)},exit:{atxHeading:c(),atxHeadingSequence:A,autolink:c(),autolinkEmail:_e,autolinkProtocol:ae,blockQuote:c(),characterEscapeValue:C,characterReferenceMarkerHexadecimal:Z,characterReferenceMarkerNumeric:Z,characterReferenceValue:te,characterReference:Ee,codeFenced:c(g),codeFencedFence:h,codeFencedFenceInfo:f,codeFencedFenceMeta:m,codeFlowValue:C,codeIndented:c(y),codeText:c(B),codeTextData:C,data:C,definition:c(),definitionDestinationString:w,definitionLabelString:b,definitionTitleString:k,emphasis:c(),hardBreakEscape:c(M),hardBreakTrailing:c(M),htmlFlow:c(L),htmlFlowData:C,htmlText:c(O),htmlTextData:C,image:c(I),label:K,labelText:N,lineEnding:T,link:c(z),listItem:c(),listOrdered:c(),listUnordered:c(),paragraph:c(),referenceString:X,resourceDestinationString:P,resourceTitleString:F,resource:J,setextHeading:c(S),setextHeadingLineSequence:E,setextHeadingText:x,strong:c(),thematicBreak:c()}};iLe(t,(e||{}).mdastExtensions||[]);let r={};return n;function n(Q){let ee={type:"root",children:[]},xe={stack:[ee],tokenStack:[],config:t,enter:a,exit:l,buffer:s,resume:u,data:r},ct=[],or=-1;while(++or<Q.length)if(Q[or][1].type===D.listOrdered||Q[or][1].type===D.listUnordered)if(Q[or][0]==="enter")ct.push(or);else{let hi=ct.pop();V(typeof hi==="number","expected list to be open"),or=i(Q,hi,or)}or=-1;while(++or<Q.length){let hi=t[Q[or][0]];if(nLe.call(hi,Q[or][1].type))hi[Q[or][1].type].call(Object.assign({sliceSerialize:Q[or][2].sliceSerialize},xe),Q[or][1])}if(xe.tokenStack.length>0){let hi=xe.tokenStack[xe.tokenStack.length-1];(hi[1]||rLe).call(xe,void 0,hi[0])}ee.position={start:tf(Q.length>0?Q[0][1].start:{line:1,column:1,offset:0}),end:tf(Q.length>0?Q[Q.length-2][1].end:{line:1,column:1,offset:0})},or=-1;while(++or<t.transforms.length)ee=t.transforms[or](ee)||ee;return ee}function i(Q,ee,xe){let ct=ee-1,or=-1,hi=!1,ua,Oe,Rn,Wa;while(++ct<=xe){let da=Q[ct];switch(da[1].type){case D.listUnordered:case D.listOrdered:case D.blockQuote:{if(da[0]==="enter")or++;else or--;Wa=void 0;break}case D.lineEndingBlank:{if(da[0]==="enter"){if(ua&&!Wa&&!or&&!Rn)Rn=ct;Wa=void 0}break}case D.linePrefix:case D.listItemValue:case D.listItemMarker:case D.listItemPrefix:case D.listItemPrefixWhitespace:break;default:Wa=void 0}if(!or&&da[0]==="enter"&&da[1].type===D.listItemPrefix||or===-1&&da[0]==="exit"&&(da[1].type===D.listUnordered||da[1].type===D.listOrdered)){if(ua){let $s=ct;Oe=void 0;while($s--){let Vi=Q[$s];if(Vi[1].type===D.lineEnding||Vi[1].type===D.lineEndingBlank){if(Vi[0]==="exit")continue;if(Oe)Q[Oe][1].type=D.lineEndingBlank,hi=!0;Vi[1].type=D.lineEnding,Oe=$s}else if(Vi[1].type===D.linePrefix||Vi[1].type===D.blockQuotePrefix||Vi[1].type===D.blockQuotePrefixWhitespace||Vi[1].type===D.blockQuoteMarker||Vi[1].type===D.listItemIndent);else break}if(Rn&&(!Oe||Rn<Oe))ua._spread=!0;ua.end=Object.assign({},Oe?Q[Oe][1].start:da[1].end),Q.splice(Oe||ct,0,["exit",ua,da[2]]),ct++,xe++}if(da[1].type===D.listItemPrefix){let $s={type:"listItem",_spread:!1,start:Object.assign({},da[1].start),end:void 0};ua=$s,Q.splice(ct,0,["enter",$s,da[2]]),ct++,xe++,Rn=void 0,Wa=!0}}}return Q[ee][1]._spread=hi,xe}function o(Q,ee){return xe;function xe(ct){if(a.call(this,Q(ct),ct),ee)ee.call(this,ct)}}function s(){this.stack.push({type:"fragment",children:[]})}function a(Q,ee,xe){let ct=this.stack[this.stack.length-1];V(ct,"expected `parent`"),V("children"in ct,"expected `parent`"),ct.children.push(Q),this.stack.push(Q),this.tokenStack.push([ee,xe||void 0]),Q.position={start:tf(ee.start),end:void 0}}function c(Q){return ee;function ee(xe){if(Q)Q.call(this,xe);l.call(this,xe)}}function l(Q,ee){let xe=this.stack.pop();V(xe,"expected `node`");let ct=this.tokenStack.pop();if(!ct)throw Error("Cannot close `"+Q.type+"` ("+ef({start:Q.start,end:Q.end})+"): it’s not open");else if(ct[0].type!==Q.type)if(ee)ee.call(this,Q,ct[0]);else(ct[1]||rLe).call(this,Q,ct[0]);V(xe.type!=="fragment","unexpected fragment `exit`ed"),V(xe.position,"expected `position` to be defined"),xe.position.end=tf(Q.end)}function u(){return Ih(this.stack.pop())}function d(){this.data.expectingFirstListItemValue=!0}function p(Q){if(this.data.expectingFirstListItemValue){let ee=this.stack[this.stack.length-2];V(ee,"expected nodes on stack"),V(ee.type==="list","expected list on stack"),ee.start=Number.parseInt(this.sliceSerialize(Q),de.numericBaseDecimal),this.data.expectingFirstListItemValue=void 0}}function f(){let Q=this.resume(),ee=this.stack[this.stack.length-1];V(ee,"expected node on stack"),V(ee.type==="code","expected code on stack"),ee.lang=Q}function m(){let Q=this.resume(),ee=this.stack[this.stack.length-1];V(ee,"expected node on stack"),V(ee.type==="code","expected code on stack"),ee.meta=Q}function h(){if(this.data.flowCodeInside)return;this.buffer(),this.data.flowCodeInside=!0}function g(){let Q=this.resume(),ee=this.stack[this.stack.length-1];V(ee,"expected node on stack"),V(ee.type==="code","expected code on stack"),ee.value=Q.replace(/^(\r?\n|\r)|(\r?\n|\r)$/g,""),this.data.flowCodeInside=void 0}function y(){let Q=this.resume(),ee=this.stack[this.stack.length-1];V(ee,"expected node on stack"),V(ee.type==="code","expected code on stack"),ee.value=Q.replace(/(\r?\n|\r)$/g,"")}function b(Q){let ee=this.resume(),xe=this.stack[this.stack.length-1];V(xe,"expected node on stack"),V(xe.type==="definition","expected definition on stack"),xe.label=ee,xe.identifier=Bs(this.sliceSerialize(Q)).toLowerCase()}function k(){let Q=this.resume(),ee=this.stack[this.stack.length-1];V(ee,"expected node on stack"),V(ee.type==="definition","expected definition on stack"),ee.title=Q}function w(){let Q=this.resume(),ee=this.stack[this.stack.length-1];V(ee,"expected node on stack"),V(ee.type==="definition","expected definition on stack"),ee.url=Q}function A(Q){let ee=this.stack[this.stack.length-1];if(V(ee,"expected node on stack"),V(ee.type==="heading","expected heading on stack"),!ee.depth){let xe=this.sliceSerialize(Q).length;V(xe===1||xe===2||xe===3||xe===4||xe===5||xe===6,"expected `depth` between `1` and `6`"),ee.depth=xe}}function x(){this.data.setextHeadingSlurpLineEnding=!0}function E(Q){let ee=this.stack[this.stack.length-1];V(ee,"expected node on stack"),V(ee.type==="heading","expected heading on stack"),ee.depth=this.sliceSerialize(Q).codePointAt(0)===R.equalsTo?1:2}function S(){this.data.setextHeadingSlurpLineEnding=void 0}function _(Q){let ee=this.stack[this.stack.length-1];V(ee,"expected node on stack"),V("children"in ee,"expected parent on stack");let xe=ee.children,ct=xe[xe.length-1];if(!ct||ct.type!=="text")ct=$r(),ct.position={start:tf(Q.start),end:void 0},xe.push(ct);this.stack.push(ct)}function C(Q){let ee=this.stack.pop();V(ee,"expected a `node` to be on the stack"),V("value"in ee,"expected a `literal` to be on the stack"),V(ee.position,"expected `node` to have an open position"),ee.value+=this.sliceSerialize(Q),ee.position.end=tf(Q.end)}function T(Q){let ee=this.stack[this.stack.length-1];if(V(ee,"expected `node`"),this.data.atHardBreak){V("children"in ee,"expected `parent`");let xe=ee.children[ee.children.length-1];V(xe.position,"expected tail to have a starting position"),xe.position.end=tf(Q.end),this.data.atHardBreak=void 0;return}if(!this.data.setextHeadingSlurpLineEnding&&t.canContainEols.includes(ee.type))_.call(this,Q),C.call(this,Q)}function M(){this.data.atHardBreak=!0}function L(){let Q=this.resume(),ee=this.stack[this.stack.length-1];V(ee,"expected node on stack"),V(ee.type==="html","expected html on stack"),ee.value=Q}function O(){let Q=this.resume(),ee=this.stack[this.stack.length-1];V(ee,"expected node on stack"),V(ee.type==="html","expected html on stack"),ee.value=Q}function B(){let Q=this.resume(),ee=this.stack[this.stack.length-1];V(ee,"expected node on stack"),V(ee.type==="inlineCode","expected inline code on stack"),ee.value=Q}function z(){let Q=this.stack[this.stack.length-1];if(V(Q,"expected node on stack"),V(Q.type==="link","expected link on stack"),this.data.inReference){let ee=this.data.referenceType||"shortcut";Q.type+="Reference",Q.referenceType=ee,delete Q.url,delete Q.title}else delete Q.identifier,delete Q.label;this.data.referenceType=void 0}function I(){let Q=this.stack[this.stack.length-1];if(V(Q,"expected node on stack"),V(Q.type==="image","expected image on stack"),this.data.inReference){let ee=this.data.referenceType||"shortcut";Q.type+="Reference",Q.referenceType=ee,delete Q.url,delete Q.title}else delete Q.identifier,delete Q.label;this.data.referenceType=void 0}function N(Q){let ee=this.sliceSerialize(Q),xe=this.stack[this.stack.length-2];V(xe,"expected ancestor on stack"),V(xe.type==="image"||xe.type==="link","expected image or link on stack"),xe.label=Zje(ee),xe.identifier=Bs(ee).toLowerCase()}function K(){let Q=this.stack[this.stack.length-1];V(Q,"expected node on stack"),V(Q.type==="fragment","expected fragment on stack");let ee=this.resume(),xe=this.stack[this.stack.length-1];if(V(xe,"expected node on stack"),V(xe.type==="image"||xe.type==="link","expected image or link on stack"),this.data.inReference=!0,xe.type==="link"){let ct=Q.children;xe.children=ct}else xe.alt=ee}function P(){let Q=this.resume(),ee=this.stack[this.stack.length-1];V(ee,"expected node on stack"),V(ee.type==="image"||ee.type==="link","expected image or link on stack"),ee.url=Q}function F(){let Q=this.resume(),ee=this.stack[this.stack.length-1];V(ee,"expected node on stack"),V(ee.type==="image"||ee.type==="link","expected image or link on stack"),ee.title=Q}function J(){this.data.inReference=void 0}function j(){this.data.referenceType="collapsed"}function X(Q){let ee=this.resume(),xe=this.stack[this.stack.length-1];V(xe,"expected node on stack"),V(xe.type==="image"||xe.type==="link","expected image reference or link reference on stack"),xe.label=ee,xe.identifier=Bs(this.sliceSerialize(Q)).toLowerCase(),this.data.referenceType="full"}function Z(Q){V(Q.type==="characterReferenceMarkerNumeric"||Q.type==="characterReferenceMarkerHexadecimal"),this.data.characterReferenceType=Q.type}function te(Q){let ee=this.sliceSerialize(Q),xe=this.data.characterReferenceType,ct;if(xe)ct=eD(ee,xe===D.characterReferenceMarkerNumeric?de.numericBaseDecimal:de.numericBaseHexadecimal),this.data.characterReferenceType=void 0;else{let hi=dy(ee);V(hi!==!1,"expected reference to decode"),ct=hi}let or=this.stack[this.stack.length-1];V(or,"expected `node`"),V("value"in or,"expected `node.value`"),or.value+=ct}function Ee(Q){let ee=this.stack.pop();V(ee,"expected `node`"),V(ee.position,"expected `node.position`"),ee.position.end=tf(Q.end)}function ae(Q){C.call(this,Q);let ee=this.stack[this.stack.length-1];V(ee,"expected node on stack"),V(ee.type==="link","expected link on stack"),ee.url=this.sliceSerialize(Q)}function _e(Q){C.call(this,Q);let ee=this.stack[this.stack.length-1];V(ee,"expected node on stack"),V(ee.type==="link","expected link on stack"),ee.url="mailto:"+this.sliceSerialize(Q)}function Ye(){return{type:"blockquote",children:[]}}function Be(){return{type:"code",lang:null,meta:null,value:""}}function Se(){return{type:"inlineCode",value:""}}function Ie(){return{type:"definition",identifier:"",label:null,title:null,url:""}}function Dt(){return{type:"emphasis",children:[]}}function Ft(){return{type:"heading",depth:0,children:[]}}function ze(){return{type:"break"}}function Fr(){return{type:"html",value:""}}function he(){return{type:"image",title:null,url:"",alt:null}}function Ae(){return{type:"link",title:null,url:"",children:[]}}function We(Q){return{type:"list",ordered:Q.type==="listOrdered",start:null,spread:Q._spread,children:[]}}function $t(Q){return{type:"listItem",spread:Q._spread,checked:null,children:[]}}function we(){return{type:"paragraph",children:[]}}function jt(){return{type:"strong",children:[]}}function $r(){return{type:"text",value:""}}function zt(){return{type:"thematicBreak"}}}function tf(e){return{line:e.line,column:e.column,offset:e.offset}}function iLe(e,t){let r=-1;while(++r<t.length){let n=t[r];if(Array.isArray(n))iLe(e,n);else lrr(e,n)}}function lrr(e,t){let r;for(r in t)if(nLe.call(t,r))switch(r){case"canContainEols":{let n=t[r];if(n)e[r].push(...n);break}case"transforms":{let n=t[r];if(n)e[r].push(...n);break}case"enter":case"exit":{let n=t[r];if(n)Object.assign(e[r],n);break}}}function rLe(e,t){if(e)throw Error("Cannot close `"+e.type+"` ("+ef({start:e.start,end:e.end})+"): a different token (`"+t.type+"`, "+ef({start:t.start,end:t.end})+") is open");else throw Error("Cannot close document, a token (`"+t.type+"`, "+ef({start:t.start,end:t.end})+") is still open")}var nLe;var oLe=v(()=>{Mt();XM();Xje();tre();Qje();py();ut();ZM();$re();nLe={}.hasOwnProperty});var sLe=v(()=>{oLe()});function rf(e){let t=this;t.parser=r;function r(n){return Cre(n,{...t.data("settings"),...e,extensions:t.data("micromarkExtensions")||[],mdastExtensions:t.data("fromMarkdownExtensions")||[]})}}var aLe=v(()=>{sLe()});var mD=v(()=>{aLe()});function _re(e){if(e)throw e}var gLe=q(function(LAn,hLe){var hD=Object.prototype.hasOwnProperty,mLe=Object.prototype.toString,{defineProperty:cLe,getOwnPropertyDescriptor:lLe}=Object,uLe=function(t){if(typeof Array.isArray==="function")return Array.isArray(t);return mLe.call(t)==="[object Array]"},dLe=function(t){if(!t||mLe.call(t)!=="[object Object]")return!1;var r=hD.call(t,"constructor"),n=t.constructor&&t.constructor.prototype&&hD.call(t.constructor.prototype,"isPrototypeOf");if(t.constructor&&!r&&!n)return!1;var i;for(i in t);return typeof i>"u"||hD.call(t,i)},pLe=function(t,r){if(cLe&&r.name==="__proto__")cLe(t,r.name,{enumerable:!0,configurable:!0,value:r.newValue,writable:!0});else t[r.name]=r.newValue},fLe=function(t,r){if(r==="__proto__"){if(!hD.call(t,r))return;else if(lLe)return lLe(t,r).value}return t[r]};hLe.exports=function e(){var t,r,n,i,o,s,a=arguments[0],c=1,l=arguments.length,u=!1;if(typeof a==="boolean")u=a,a=arguments[1]||{},c=2;if(a==null||typeof a!=="object"&&typeof a!=="function")a={};for(;c<l;++c)if(t=arguments[c],t!=null){for(r in t)if(n=fLe(a,r),i=fLe(t,r),a!==i){if(u&&i&&(dLe(i)||(o=uLe(i)))){if(o)o=!1,s=n&&uLe(n)?n:[];else s=n&&dLe(n)?n:{};pLe(a,{name:r,newValue:e(u,s,i)})}else if(typeof i<"u")pLe(a,{name:r,newValue:i})}}return a}});function pA(e){if(typeof e!=="object"||e===null)return!1;let t=Object.getPrototypeOf(e);return(t===null||t===Object.prototype||Object.getPrototypeOf(t)===null)&&!(Symbol.toStringTag in e)&&!(Symbol.iterator in e)}function Rre(){let e=[],t={run:r,use:n};return t;function r(...i){let o=-1,s=i.pop();if(typeof s!=="function")throw TypeError("Expected function as last argument, not "+s);a(null,...i);function a(c,...l){let u=e[++o],d=-1;if(c){s(c);return}while(++d<i.length)if(l[d]===null||l[d]===void 0)l[d]=i[d];if(i=l,u)yLe(u,a)(...l);else s(null,...l)}}function n(i){if(typeof i!=="function")throw TypeError("Expected `middelware` to be a function, not "+i);return e.push(i),t}}function yLe(e,t){let r;return n;function n(...s){let a=e.length>s.length,c;if(a)s.push(i);try{c=e.apply(this,s)}catch(l){let u=l;if(a&&r)throw u;return i(u)}if(!a)if(c&&c.then&&typeof c.then==="function")c.then(o,i);else if(c instanceof Error)i(c);else o(c)}function i(s,...a){if(!r)r=!0,t(s,...a)}function o(s){i(null,s)}}var vLe=()=>{};var as;var bLe=v(()=>{$re();as=class as extends Error{constructor(e,t,r){super();if(typeof t==="string")r=t,t=void 0;let n="",i={},o=!1;if(t)if("line"in t&&"column"in t)i={place:t};else if("start"in t&&"end"in t)i={place:t};else if("type"in t)i={ancestors:[t],place:t.position};else i={...t};if(typeof e==="string")n=e;else if(!i.cause&&e)o=!0,n=e.message,i.cause=e;if(!i.ruleId&&!i.source&&typeof r==="string"){let a=r.indexOf(":");if(a===-1)i.ruleId=r;else i.source=r.slice(0,a),i.ruleId=r.slice(a+1)}if(!i.place&&i.ancestors&&i.ancestors){let a=i.ancestors[i.ancestors.length-1];if(a)i.place=a.position}let s=i.place&&"start"in i.place?i.place.start:i.place;this.ancestors=i.ancestors||void 0,this.cause=i.cause||void 0,this.column=s?s.column:void 0,this.fatal=void 0,this.file="",this.message=n,this.line=s?s.line:void 0,this.name=ef(i.place)||"1:1",this.place=i.place||void 0,this.reason=this.message,this.ruleId=i.ruleId||void 0,this.source=i.source||void 0,this.stack=o&&i.cause&&typeof i.cause.stack==="string"?i.cause.stack:"",this.actual=void 0,this.expected=void 0,this.note=void 0,this.url=void 0}};as.prototype.file="";as.prototype.name="";as.prototype.reason="";as.prototype.message="";as.prototype.stack="";as.prototype.column=void 0;as.prototype.line=void 0;as.prototype.ancestors=void 0;as.prototype.cause=void 0;as.prototype.fatal=void 0;as.prototype.place=void 0;as.prototype.ruleId=void 0;as.prototype.source=void 0});var kLe=v(()=>{bLe()});import{default as mu}from"node:path";var wLe=()=>{};import{default as xLe}from"node:process";var ALe=()=>{};function gD(e){return Boolean(e!==null&&typeof e==="object"&&"href"in e&&e.href&&"protocol"in e&&e.protocol&&e.auth===void 0)}import{fileURLToPath as SLe}from"node:url";var ELe=()=>{};class yD{constructor(e){let t;if(!e)t={};else if(gD(e))t={path:e};else if(typeof e==="string"||urr(e))t={value:e};else t=e;this.cwd="cwd"in t?"":xLe.cwd(),this.data={},this.history=[],this.messages=[],this.value,this.map,this.result,this.stored;let r=-1;while(++r<Tre.length){let i=Tre[r];if(i in t&&t[i]!==void 0&&t[i]!==null)this[i]=i==="history"?[...t[i]]:t[i]}let n;for(n in t)if(!Tre.includes(n))this[n]=t[n]}get basename(){return typeof this.path==="string"?mu.basename(this.path):void 0}set basename(e){Ire(e,"basename"),Pre(e,"basename"),this.path=mu.join(this.dirname||"",e)}get dirname(){return typeof this.path==="string"?mu.dirname(this.path):void 0}set dirname(e){$Le(this.basename,"dirname"),this.path=mu.join(e||"",this.basename)}get extname(){return typeof this.path==="string"?mu.extname(this.path):void 0}set extname(e){if(Pre(e,"extname"),$Le(this.dirname,"extname"),e){if(e.codePointAt(0)!==46)throw Error("`extname` must start with `.`");if(e.includes(".",1))throw Error("`extname` cannot contain multiple dots")}this.path=mu.join(this.dirname,this.stem+(e||""))}get path(){return this.history[this.history.length-1]}set path(e){if(gD(e))e=SLe(e);if(Ire(e,"path"),this.path!==e)this.history.push(e)}get stem(){return typeof this.path==="string"?mu.basename(this.path,this.extname):void 0}set stem(e){Ire(e,"stem"),Pre(e,"stem"),this.path=mu.join(this.dirname||"",e+(this.extname||""))}fail(e,t,r){let n=this.message(e,t,r);throw n.fatal=!0,n}info(e,t,r){let n=this.message(e,t,r);return n.fatal=void 0,n}message(e,t,r){let n=new as(e,t,r);if(this.path)n.name=this.path+":"+n.name,n.file=this.path;return n.fatal=!1,this.messages.push(n),n}toString(e){if(this.value===void 0)return"";if(typeof this.value==="string")return this.value;return new TextDecoder(e||void 0).decode(this.value)}}function Pre(e,t){if(e&&e.includes(mu.sep))throw Error("`"+t+"` cannot be a path: did not expect `"+mu.sep+"`")}function Ire(e,t){if(!e)throw Error("`"+t+"` cannot be empty")}function $Le(e,t){if(!e)throw Error("Setting `"+t+"` requires `path` to be set too")}function urr(e){return Boolean(e&&typeof e==="object"&&"byteLength"in e&&"byteOffset"in e)}var Tre;var CLe=v(()=>{kLe();wLe();ALe();ELe();Tre=["history","path","basename","stem","extname","dirname"]});var _Le=v(()=>{CLe()});var RLe=function(e){let n=this.constructor.prototype,i=n[e],o=function(){return i.apply(o,arguments)};return Object.setPrototypeOf(o,n),o};function Ore(e,t){if(typeof t!=="function")throw TypeError("Cannot `"+e+"` without `parser`")}function Mre(e,t){if(typeof t!=="function")throw TypeError("Cannot `"+e+"` without `compiler`")}function Dre(e,t){if(t)throw Error("Cannot call `"+e+"` on a frozen processor.\nCreate a new processor first, by calling it: use `processor()` instead of `processor`.")}function TLe(e){if(!pA(e)||typeof e.type!=="string")throw TypeError("Expected node, got `"+e+"`")}function PLe(e,t,r){if(!r)throw Error("`"+e+"` finished async. Use `"+t+"` instead")}function vD(e){return prr(e)?e:new yD(e)}function prr(e){return Boolean(e&&typeof e==="object"&&"message"in e&&"messages"in e)}function frr(e){return typeof e==="string"||mrr(e)}function mrr(e){return Boolean(e&&typeof e==="object"&&"byteLength"in e&&"byteOffset"in e)}var bD,drr,jre,Fh;var ILe=v(()=>{Mt();vLe();_Le();bD=be(gLe(),1),drr={}.hasOwnProperty;jre=class jre extends RLe{constructor(){super("copy");this.Compiler=void 0,this.Parser=void 0,this.attachers=[],this.compiler=void 0,this.freezeIndex=-1,this.frozen=void 0,this.namespace={},this.parser=void 0,this.transformers=Rre()}copy(){let e=new jre,t=-1;while(++t<this.attachers.length){let r=this.attachers[t];e.use(...r)}return e.data(bD.default(!0,{},this.namespace)),e}data(e,t){if(typeof e==="string"){if(arguments.length===2)return Dre("data",this.frozen),this.namespace[e]=t,this;return drr.call(this.namespace,e)&&this.namespace[e]||void 0}if(e)return Dre("data",this.frozen),this.namespace=e,this;return this.namespace}freeze(){if(this.frozen)return this;let e=this;while(++this.freezeIndex<this.attachers.length){let[t,...r]=this.attachers[this.freezeIndex];if(r[0]===!1)continue;if(r[0]===!0)r[0]=void 0;let n=t.call(e,...r);if(typeof n==="function")this.transformers.use(n)}return this.frozen=!0,this.freezeIndex=Number.POSITIVE_INFINITY,this}parse(e){this.freeze();let t=vD(e),r=this.parser||this.Parser;return Ore("parse",r),r(String(t),t)}process(e,t){let r=this;return this.freeze(),Ore("process",this.parser||this.Parser),Mre("process",this.compiler||this.Compiler),t?n(void 0,t):new Promise(n);function n(i,o){let s=vD(e),a=r.parse(s);r.run(a,s,function(l,u,d){if(l||!u||!d)return c(l);let p=u,f=r.stringify(p,d);if(frr(f))d.value=f;else d.result=f;c(l,d)});function c(l,u){if(l||!u)o(l);else if(i)i(u);else V(t,"`done` is defined if `resolve` is not"),t(void 0,u)}}}processSync(e){let t=!1,r;return this.freeze(),Ore("processSync",this.parser||this.Parser),Mre("processSync",this.compiler||this.Compiler),this.process(e,n),PLe("processSync","process",t),V(r,"we either bailed on an error or have a tree"),r;function n(i,o){t=!0,_re(i),r=o}}run(e,t,r){TLe(e),this.freeze();let n=this.transformers;if(!r&&typeof t==="function")r=t,t=void 0;return r?i(void 0,r):new Promise(i);function i(o,s){V(typeof t!=="function","`file` can’t be a `done` anymore, we checked");let a=vD(t);n.run(e,a,c);function c(l,u,d){let p=u||e;if(l)s(l);else if(o)o(p);else V(r,"`done` is defined if `resolve` is not"),r(void 0,p,d)}}}runSync(e,t){let r=!1,n;return this.run(e,t,i),PLe("runSync","run",r),V(n,"we either bailed on an error or have a tree"),n;function i(o,s){_re(o),n=s,r=!0}}stringify(e,t){this.freeze();let r=vD(t),n=this.compiler||this.Compiler;return Mre("stringify",n),TLe(e),n(e,r)}use(e,...t){let r=this.attachers,n=this.namespace;if(Dre("use",this.frozen),e===null||e===void 0);else if(typeof e==="function")a(e,t);else if(typeof e==="object")if(Array.isArray(e))s(e);else o(e);else throw TypeError("Expected usable value, not `"+e+"`");return this;function i(c){if(typeof c==="function")a(c,[]);else if(typeof c==="object")if(Array.isArray(c)){let[l,...u]=c;a(l,u)}else o(c);else throw TypeError("Expected usable value, not `"+c+"`")}function o(c){if(!("plugins"in c)&&!("settings"in c))throw Error("Expected usable value but received an empty preset, which is probably a mistake: presets typically come with `plugins` and sometimes with `settings`, but this has neither");if(s(c.plugins),c.settings)n.settings=bD.default(!0,n.settings,c.settings)}function s(c){let l=-1;if(c===null||c===void 0);else if(Array.isArray(c))while(++l<c.length){let u=c[l];i(u)}else throw TypeError("Expected a list of plugins, not `"+c+"`")}function a(c,l){let u=-1,d=-1;while(++u<r.length)if(r[u][0]===c){d=u;break}if(d===-1)r.push([c,...l]);else if(l.length>0){let[p,...f]=l,m=r[d][1];if(pA(m)&&pA(p))p=bD.default(!0,m,p);r[d]=[c,p,...f]}}}};Fh=new jre().freeze()});var kD=v(()=>{ILe()});import{createHash as hrr}from"node:crypto";import{existsSync as zh,lstatSync as sf,mkdirSync as grr,readdirSync as wD,readFileSync as nf,realpathSync as Fre,unlinkSync as OLe,writeFileSync as MLe}from"node:fs";import{basename as of,dirname as xD,extname as yrr,isAbsolute as zLe,join as fy,relative as hy,resolve as Sd,sep as AD}from"node:path";function brr(e){let t=[],r=(n)=>{if(["link","image","definition"].includes(n.type)){let i=n.position?.start.offset,o=n.position?.end.offset;if(i!==void 0&&o!==void 0){if(e[i]==="!")i++;let s=0;for(;i<o;i++){if(e[i]==="\\"){i++;continue}if(e[i]==="[")s++;if(e[i]==="]"&&--s===0){i++;break}}if(e[i]==="("||e[i]===":"){i++;while(/\s/.test(e[i]??"")&&i<o)i++;let a=i,c=e[i]==="<";if(c)i++;s=0;for(;i<o;i++){let l=e[i];if(l==="\\"){i++;continue}if(c){if(l===">"){i++;break}}else if(l==="(")s++;else if(l===")"){if(s===0)break;s--}else if(/\s/.test(l??"")&&s===0)break}if(i>a)t.push({start:a,end:i})}}}if("children"in n)for(let i of n.children)r(i)};return r(vrr.parse(e)),t.sort((n,i)=>i.start-n.start)}function mA(e,t){let r=hy(e,t);return r!==".."&&!r.startsWith(`..${AD}`)&&!zLe(r)}function Ao(e,t){let r=Sd(e,t);if(zLe(t)||!mA(e,r))throw Error("Path must stay inside the project");let n=e;for(let i of hy(e,r).split(AD).filter(Boolean)){n=fy(n,i);try{if(sf(n).isSymbolicLink())throw Error("Symlink paths are not migrated")}catch(o){if(o.code!=="ENOENT")throw o;break}}return r}function my(e,t,r,n){let i;try{if(i=Ao(e,t),!zh(i))return[];if(!sf(i).isDirectory())return n(t,"Expected a directory"),[]}catch(s){return n(t,s.message),[]}let o=[];try{for(let s of wD(i,{withFileTypes:!0}).sort((a,c)=>a.name.localeCompare(c.name))){let a=`${t}/${s.name}`;if(s.isSymbolicLink())n(a,"Symlink paths are not migrated");else if(s.isFile())o.push(a);else if(s.isDirectory()&&r)o.push(...my(e,a,!0,n))}}catch(s){n(t,`Cannot read directory: ${s.message}`)}return o}function krr(e){let t=new Set,r=[],n=xD(N3()),i=(u,d)=>{if(!u||/[\n\r\0]/.test(u))return;let p=Sd(d,u);try{p=Fre(p)}catch{}if(mA(e,p))t.add(p)},o=new Set(["artifacts","inputs","outputs","evidence","required_artifacts","requiredArtifacts"]),s=new Set(["path","file","artifactPath","reportPath","planPath","taskFile"]),a=(u,d)=>{if(typeof u==="string")i(u,d);else if(Array.isArray(u))for(let p of u)a(p,d);else if(u&&typeof u==="object"){for(let[p,f]of Object.entries(u))if(typeof f==="string"&&(p.includes("/")||/^[a-f0-9]{64}$/.test(f)))i(p,d);c(u,d)}},c=(u,d)=>{if(Array.isArray(u))for(let p of u)c(p,d);else if(u&&typeof u==="object"){for(let[p,f]of Object.entries(u))if(o.has(p))a(f,d);else if(s.has(p)&&typeof f==="string")i(f,d);else if(f&&typeof f==="object")c(f,d)}},l=(u)=>{try{if(mA(e,u))Ao(e,hy(e,u));if(mA(n,u)){if(zh(n)&&sf(n).isSymbolicLink())throw Error("Symlink profile directory");Ao(n,hy(n,u))}if(!zh(u))return;if(sf(u).isSymbolicLink())throw Error("Symlink evidence directory");for(let d of wD(u,{withFileTypes:!0})){let p=fy(u,d.name);if(d.isSymbolicLink())r.push(`Cannot inspect symlink evidence: ${p}`);else if(d.isDirectory())l(p);else if(d.isFile()&&d.name.endsWith(".json")){let f=JSON.parse(nf(p,"utf8")),m=f&&typeof f==="object"&&"artifactRoot"in f&&typeof f.artifactRoot==="string"?Sd(f.artifactRoot):e;try{m=Fre(m)}catch{}c(f,m)}}}catch(d){r.push(`Cannot inspect evidence at ${u}: ${d.message}`)}};for(let u of new Set([fy(e,".agents/state/agent-runs"),fy(e,".agents/state/agent-plans"),hn(e,"agent-runs"),hn(e,"agent-plans")]))l(u);try{if(zh(n)){if(sf(n).isSymbolicLink())throw Error("Symlink profile directory");for(let u of wD(n,{withFileTypes:!0})){if(!/^(0|[1-9][0-9]{0,9})$/.test(u.name))continue;if(u.isSymbolicLink()){r.push(`Cannot inspect symlink profile: ${fy(n,u.name)}`);continue}if(!u.isDirectory())continue;for(let d of["agent-runs","agent-plans"])l(fy(n,u.name,"projects",mn(e).projectId,d))}}}catch(u){r.push(`Cannot inspect other profiles: ${u.message}`)}return{bound:(u)=>{let d=Sd(e,u);return[...t].some((p)=>d===p||p!==e&&d.startsWith(`${p}${AD}`))},uncertain:r}}function wrr(e,t){let r=yrr(e.desired),i=`${e.desired.slice(0,e.desired.length-r.length)}--from-${e.qualifier}`;if(!t(`${i}${r}`))return`${i}${r}`;let o=hrr("sha256").update(e.content).digest("hex").slice(0,12),s=`${i}-${o}${r}`,a=2;while(t(s))s=`${i}-${o}-${a++}${r}`;return s}function NLe(e){return e.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}function FLe(e,t,r,n,i,o){let s=(p)=>{let f=n.get(p);if(f)return f;for(let[m,h]of i)if(p===m||p.startsWith(`${m}/`))return`${h}${p.slice(m.length)}`;return p},a=(p)=>{let f=p.startsWith("<")&&p.endsWith(">"),m=f?p.slice(1,-1):p;if(/^(?:[a-z][a-z\d+.-]*:|\/\/|#)/i.test(m))return p;let h=m.search(/[?#]/),g=h<0?m:m.slice(0,h),y=h<0?"":m.slice(h),b;try{b=g.replace(/\\([!"#$%&'()*+,\-./:;<=>?@[\\\]^_`{|}~])/g,"$1").split("/").map(decodeURIComponent).join("/")}catch{return p}let k=b.startsWith("/"),w=k?Sd(o,b.slice(1)):Sd(o,xD(t),b);if(!mA(o,w))return p;let A=LLe(hy(o,w)),x=s(A);if(x===A&&t===r)return p;let E=k?`/${x}`:LLe(hy(xD(Sd(o,r)),Sd(o,x)))||".";if(b.endsWith("/")&&!E.endsWith("/"))E+="/";if(g.includes("%"))E=E.split("/").map((S)=>encodeURIComponent(S)).join("/");return E+=y,f?`<${E}>`:E},c=e;for(let{start:p,end:f}of brr(e))c=c.slice(0,p)+a(e.slice(p,f))+c.slice(f);let l=(p)=>{let f=p;for(let[m,h]of[...n].sort((g,y)=>y[0].length-g[0].length))f=f.replace(new RegExp(`(^|[^A-Za-z0-9_.-])${NLe(m)}(?=$|[^A-Za-z0-9_./-]|\\.(?:\\s|$))`,"g"),(g,y)=>`${y}${h}`);for(let[m,h]of i)f=f.replace(new RegExp(`(^|[^A-Za-z0-9_.-])${NLe(m)}(?=$|[/\\s\`'"<>)}\\]])`,"g"),(g,y)=>`${y}${h}`);return f},u=0,d="";for(let p of c.matchAll(/\b[a-z][a-z\d+.-]*:\/\/[^\s<>"'`]+/gi))d+=l(c.slice(u,p.index)),d+=p[0],u=(p.index??0)+p[0].length;return d+=l(c.slice(u)),c=d,c}function Nre(e,t,r,n,i,o){let s=0,a="";for(let c of e.matchAll(/<!--\s*oma-docs:ignore-start\s*-->[\s\S]*?<!--\s*oma-docs:ignore-end\s*-->/gi))a+=FLe(e.slice(s,c.index),t,r,n,i,o),a+=c[0],s=(c.index??0)+c[0].length;return a+FLe(e.slice(s),t,r,n,i,o)}function SD(e,t={}){let r=Fre(Sd(e)),n={dryRun:t.dryRun===!0,moved:[],rewritten:[],skipped:[],conflicts:[],actions:[]},i=(x,E)=>{if(!n.skipped.some((S)=>S.path===x&&S.reason===E))n.skipped.push({path:x,reason:E})},o=krr(r),s=(x)=>{if(Lre(x))return i(x,"UI DESIGN.md is preserved"),!0;if(o.uncertain.length>0)return i(x,`Evidence bindings could not be established: ${o.uncertain.join("; ")}`),!0;if(o.bound(x))return i(x,"Referenced by an execution receipt, claim, or pinned plan; preserve the original path and bytes"),!0;return!1},a=[],c=(x,E,S)=>{if(s(x))return;try{let _=Ao(r,x);Ao(r,E),a.push({from:x,desired:E,qualifier:S,content:nf(_),mode:sf(_).mode})}catch(_){i(x,_.message)}};for(let x of DLe)for(let E of my(r,x.path,!0,i))c(E,`docs/decisions${E.slice(x.path.length)}`,x.qualifier);for(let x of jLe)for(let E of my(r,x.path,!1,i))if(/^result-.*\.md$/.test(of(E)))c(E,`.agents/results/${of(E)}`,x.qualifier);let l=new Set(my(r,".agents/results/architecture",!1,i));for(let x of[...l].filter((E)=>/^adr-.*\.md$/i.test(of(E)))){let E=[...[".archify.json",".archify.html"].map((_)=>({path:`${x.slice(0,-3)}${_}`,suffix:_,keepMarkdownExtension:!1})),...[".archify.json",".archify.html"].map((_)=>({path:`${x}${_}`,suffix:_,keepMarkdownExtension:!0}))].filter(({path:_})=>l.has(_)),S=[x,...E.map(({path:_})=>_)];if(S.map(s).some(Boolean)){for(let _ of S)i(_,"ADR and its companion files are preserved together because one is protected");continue}c(x,`docs/decisions/${of(x)}`,"architecture");for(let _ of E){c(_.path,`docs/decisions/${of(_.path)}`,"architecture");let C=a.at(-1);if(C?.from===_.path)C.companion={source:x,suffix:_.suffix,keepMarkdownExtension:_.keepMarkdownExtension}}}let u=new Set([...my(r,"docs",!0,i).filter(fA),...jLe.flatMap((x)=>my(r,x.path,!1,i).filter(fA)),...[...l].filter(fA),...wD(r).filter((x)=>/^(?:README(?:[._-].*)?|AGENTS|DESIGN)\.md$/i.test(x))]),d=new Map;for(let x of u){if(!o.bound(x)&&!Lre(x))continue;try{d.set(x,nf(Ao(r,x),"utf8"))}catch(E){i(x,E.message)}}let p=new Set,f;do{f=!1;for(let x of a){if(p.has(x.from))continue;let E=new Map([[x.from,x.desired]]);if(x.from.startsWith(".agents/state/memories/result-")){let S=`.serena/memories/${of(x.from)}`;try{if(!zh(Ao(r,S)))E.set(S,x.desired)}catch{}}for(let[S,_]of d){if(Nre(_,S,S,E,new Map,r)===_)continue;let C=x.companion?.source??x.from;for(let T of a){if((T.companion?.source??T.from)!==C||p.has(T.from))continue;if(p.add(T.from),i(T.from,`Referenced by protected Markdown ${S}; preserve the original path and bytes`),fA(T.from))d.set(T.from,T.content.toString("utf8"))}f=!0;break}}}while(f);for(let x=a.length-1;x>=0;x--)if(p.has(a[x]?.from??""))a.splice(x,1);let m=new Map,h=new Set,g=(x)=>{let E=Ao(r,x);return h.has(x)||zh(E)};for(let x of a)try{if(x.companion){let _=m.get(x.companion.source);if(!_){i(x.from,"ADR companion remains with its deferred document");continue}x.desired=`${x.companion.keepMarkdownExtension?_:_.slice(0,-3)}${x.companion.suffix}`}let E=g(x.desired),S=E?wrr(x,g):x.desired;if(m.set(x.from,S),h.add(S),E)n.conflicts.push({from:x.from,to:S})}catch(E){i(x.from,E.message)}let y=new Map;for(let x of DLe)if([...m.keys()].some((E)=>E.startsWith(`${x.path}/`))&&!n.skipped.some(({path:E})=>E===x.path||E.startsWith(`${x.path}/`)))y.set(x.path,"docs/decisions");let b=new Map(m);for(let[x,E]of m){if(!x.startsWith(".agents/state/memories/result-"))continue;let S=`.serena/memories/${of(x)}`;try{if(!zh(Ao(r,S)))b.set(S,E)}catch{}}let k=new Map,w=new Map;for(let x of a){let E=m.get(x.from);if(!E)continue;let S=x.content.toString("utf8"),_=fA(x.from)?Nre(S,x.from,E,b,y,r):void 0;if(_!==void 0&&_!==S)k.set(E,_)}let A=new Set([...m.keys(),...m.values()]);for(let x of[...u].sort()){if(A.has(x)||Lre(x))continue;let E;try{let _=Ao(r,x);if(!sf(_).isFile())continue;E=nf(_,"utf8")}catch(_){i(x,_.message);continue}let S=Nre(E,x,x,b,y,r);if(S!==E&&!s(x))k.set(x,S),w.set(x,{content:E,mode:sf(Ao(r,x)).mode})}if(!n.dryRun){let x=[],E=[],S=[];try{for(let _ of a){let C=m.get(_.from);if(!C)continue;let T=Ao(r,_.from);if(!nf(T).equals(_.content))throw Error(`Source changed during migration: ${_.from}`);let M=Ao(r,C);grr(xD(M),{recursive:!0}),Ao(r,C);let L=k.has(C)?Buffer.from(k.get(C)??""):_.content;MLe(M,L,{flag:"wx",mode:_.mode}),x.push({candidate:_,to:C,content:L})}for(let[_,C]of w){let T=Ao(r,_);if(nf(T,"utf8")!==C.content)throw Error(`Reference file changed during migration: ${_}`);Zt(T,k.get(_)??C.content,{mode:C.mode}),E.push(_)}for(let{candidate:_}of x)OLe(Ao(r,_.from)),S.push(_)}catch(_){let C=[];for(let M of S)try{MLe(Ao(r,M.from),M.content,{flag:"wx",mode:M.mode})}catch(L){C.push(`Original could not be restored: ${M.from}: ${L.message}`)}for(let M of E.reverse()){let L=w.get(M);if(!L)continue;try{let O=Ao(r,M);if(nf(O,"utf8")!==k.get(M))throw Error("Reference file changed concurrently");Zt(O,L.content,{mode:L.mode})}catch(O){C.push(`Reference could not be restored: ${M}: ${O.message}`)}}if(C.length===0)for(let{to:M,content:L}of x.reverse())try{let O=Ao(r,M);if(!nf(O).equals(L))throw Error("Destination changed concurrently");OLe(O)}catch(O){C.push(`Canonical copy retained: ${M}: ${O.message}`)}let T=`Migration deferred; ${_.message}${C.length?`; ${C.join("; ")}`:"; original files and references restored"}`;for(let M of a)if(m.has(M.from))i(M.from,T);for(let M of n.skipped)n.actions.push(`deferred ${M.path}: ${M.reason}`);return n}}for(let[x,E]of m)n.moved.push({from:x,to:E}),n.actions.push(`moved ${x} → ${E}`);for(let x of k.keys())n.rewritten.push(x),n.actions.push(`updated references in ${x}`);for(let x of n.skipped)n.actions.push(`deferred ${x.path}: ${x.reason}`);return n}var DLe,jLe,LLe=(e)=>e.split(AD).join("/"),fA=(e)=>/\.md$/i.test(e),Lre=(e)=>of(e).toUpperCase()==="DESIGN.MD",vrr;var zre=v(()=>{mD();kD();ya();D5();ni();DLe=[{path:"docs/design-docs",qualifier:"design-docs"},{path:"docs/plans/designs",qualifier:"plan-designs"}],jLe=[{path:".agents/state/memories",qualifier:"state-memories"},{path:".serena/memories",qualifier:"serena-memories"}],vrr=Fh().use(rf)});var BLe;var ULe=v(()=>{zre();BLe={name:"032-artifact-layout",requiresReconcile:!1,up(e){return SD(e).actions}}});function gy(e,t=cM){return Bre(e,t).actions}function Bre(e,t=cM,r=xrr){let n=[],i=[],o=!1;for(let s of r){let a;try{a=s.up(e,t)}catch(c){let l=c instanceof Error?c.message:String(c);if(i.push({name:s.name,error:l}),console.warn(`${HLe.default.yellow("⚠")} Migration ${s.name} failed: ${l}. The remaining migrations still ran; re-run the command after fixing the cause.`),s.requiresReconcile!==!1)o=!0;continue}if(n.push(...a),a.length>0&&s.requiresReconcile!==!1)o=!0}return{actions:n,requiresReconcile:o,failures:i}}var HLe,xrr;var Ure=v(()=>{Ea();Ea();jIe();UIe();VIe();JIe();ZIe();iOe();hOe();kOe();AOe();COe();ROe();DOe();LOe();HOe();WOe();eMe();oMe();dMe();fMe();hMe();xMe();EMe();_Me();DMe();LMe();BMe();ODe();jDe();zDe();WDe();ULe();HLe=be(Re(),1),xrr=[DIe,BIe,WIe,KIe,XIe,nOe,mOe,bOe,xOe,$Oe,_Oe,MOe,jOe,UOe,GOe,QOe,iMe,uMe,pMe,mMe,wMe,SMe,CMe,MMe,jMe,zMe,IDe,DDe,FDe,GDe,BLe]});import{readFileSync as Arr}from"node:fs";function ED(e={}){if(e.yes)return!0;if(process.env.OMA_YES==="1"||process.env.OMA_YES==="true")return!0;return!1}function Hre(e={}){if(ED(e))return!0;if(process.env.CI==="true"||process.env.CI==="1")return!0;return!1}function Gre(e=()=>Arr("/proc/version","utf-8")){if(process.platform!=="linux")return!1;try{return/microsoft|wsl/i.test(e())}catch{return!1}}var Wre=()=>{};import{execSync as Vre}from"node:child_process";function Bh(){try{return Vre("gh --version",{stdio:"ignore"}),!0}catch{return!1}}function F5(){try{return Vre("gh auth status",{stdio:"ignore"}),!0}catch{return!1}}function Uh(){try{return Vre(`gh api user/starred/${Zr}`,{stdio:"ignore"}),!0}catch{return!1}}function GLe(){return Bh()&&F5()&&Uh()}var yy=v(()=>{js()});import{execFileSync as Srr}from"node:child_process";async function WLe(e,t){if(ti()==="global"&&e)ue.info(af.default.dim("Skipped GitHub star prompt (--global + --yes)."));else if(!Bh()||!F5()){if(e||!t)ue.info(`${af.default.yellow("⭐")} Enjoying oh-my-agent? Star it on GitHub: ${af.default.cyan(`https://github.com/${Zr}`)}`)}else if(!Uh()){let r;if(e)r=!0;else if(t)r=!1;else r=await kn({message:`${af.default.yellow("⭐")} Star ${af.default.cyan(Zr)} on GitHub? It helps a lot!`});if(!lt(r)&&r)try{Srr("gh",["api","-X","PUT",`/user/starred/${Zr}`],{stdio:"ignore"}),ue.success(`Starred ${af.default.cyan(Zr)}! Thank you! \uD83C\uDF1F`)}catch{ue.warn(`Could not star automatically. Try: ${af.default.dim(`gh api --method PUT /user/starred/${Zr}`)}`)}}}var af;var VLe=v(()=>{Bt();yy();yi();js();af=be(Re(),1)});import*as gA from"node:fs";import{dirname as Err,join as $D,relative as $rr,resolve as hA,sep as Crr}from"node:path";function qLe(e,t,r){let n=hA(e,".agents","agents"),i=hA(e,".agents","workflows"),o=$D(e,".agents","skills"),s=new Set(a5.all??[]),a=(h)=>$rr(e,h).replaceAll("\\","/"),c=new Map,l=(h)=>{let g=c.get(h);if(g)return g;let y;try{y={text:gA.readFileSync(h,"utf8")}}catch(b){let k=b.code;y={missing:k==="ENOENT"||k==="ENOTDIR"}}return c.set(h,y),y},u=(h)=>$D(o,h,"SKILL.md"),d=(h)=>l(u(h)).text!==void 0,p={selectedSkills:[...t],installedSkills:[],unavailableSelectedSkills:t.filter((h)=>!d(h)),workflows:[]};try{p.installedSkills=gA.readdirSync(o).filter((h)=>!h.startsWith("_")&&qre.test(h)&&d(h)).sort()}catch{p.inventoryIssue=`Could not list ${a(o)}`}let f=new Map;for(let[h,g]of Object.entries(Z3)){f.set(h,h);for(let y of g)f.set(y,h)}try{for(let h of gA.readdirSync(n))if(h.endsWith(".md")){let g=h.slice(0,-3);f.set(g,g)}}catch{}let m=(h,g)=>h.startsWith(`${g}${Crr}`);for(let h of[...new Set(r)].sort()){let g=new Set,y=new Set,b=new Set,k=(A)=>{if(A=hA(A),b.has(A))return;if(b.size>=_rr){y.add("document inspection limit reached");return}b.add(A);let{text:x}=l(A);if(x===void 0){y.add(a(A));return}let E=x.replace(/^ {0,3}(`{3,}|~{3,})[^\n]*\n[\s\S]*?^ {0,3}\1[^\n]*(?:\n|$)/gm,"");for(let _ of E.matchAll(/\.agents\/skills\/([A-Za-z0-9_][A-Za-z0-9_-]*)\/([A-Za-z0-9_./-]+\.[A-Za-z0-9]+)\b/g)){let C=_[1];if(C!=="_shared"&&(_[2]==="SKILL.md"||s.has(C)))g.add(C)}if(m(A,n)){let _=/^---\r?\n([\s\S]*?)\r?\n---/.exec(x);try{if(!_?.[1])throw Error("missing frontmatter");let C=tt(_[1]);if(!C||typeof C!=="object")throw Error("invalid frontmatter");if(C.skills!==void 0&&!Array.isArray(C.skills))throw Error("invalid skills");for(let T of C.skills??[]){if(typeof T!=="string"||!qre.test(T))throw Error("invalid skill name");g.add(T)}}catch{y.add(`${a(A)} (invalid agent frontmatter)`)}}let S=new Set;for(let _ of E.matchAll(/\.agents\/(?:workflows|agents)\/[A-Za-z0-9_./-]+\.md\b/g))S.add(_[0]);for(let _ of E.matchAll(/\]\(([^)\s]+\.md(?:#[^)\s]*)?)\)|`((?:\.{1,2}\/)[A-Za-z0-9_./-]+\.md(?:#[^`\s]*)?)`/g)){let C=(_[1]??_[2]??"").split("#")[0]??"";if(C&&!/[{}<>*?]/.test(C)&&!/^[a-z]+:/i.test(C))S.add(C)}for(let _ of S){let C=_.startsWith(".agents/")?hA(e,_):hA(Err(A),_);if(m(C,i)||m(C,n))k(C)}for(let _ of x.matchAll(/\bsubagent_type\s*[:=]\s*["']?([a-z][a-z0-9-]*)|\boma\s+agent\s+spawn\s+["']?([a-z][a-z0-9-]*)/g)){let C=_[1]??_[2]??"";if(C==="general-purpose")continue;let T=f.get(C)??f.get(C.replace(/-agent$/,""))??C;k($D(n,`${T}.md`))}};if(qre.test(h))k($D(i,`${h}.md`));else y.add("invalid workflow filename");let w=[];for(let A of g){let x=u(A),E=l(x);if(E.text===void 0)if(E.missing)w.push(A);else y.add(a(x))}p.workflows.push({name:h,referencedSkills:[...g].sort(),missingSkills:w.sort(),unreadableFiles:[...y].sort(),availability:uh(e,h)})}return p}function KLe(e,t={}){let r=new Set(e.unavailableSelectedSkills),n=[`Selected skills: ${e.selectedSkills.length}`,...e.selectedSkills.map((s)=>r.has(s)?`! ${s} (SKILL.md missing or unreadable)`:`✓ ${s}`),e.inventoryIssue?`Installed skill manifests: not assessed (${e.inventoryIssue})`:`Installed skill manifests: ${e.installedSkills.length} (selected and retained)`],i=e.workflows.filter((s)=>s.missingSkills.length||s.unreadableFiles.length);n.push(e.workflows.length?`Workflow referenced skill manifests: ${e.workflows.length-i.length}/${e.workflows.length} complete`:"Workflow referenced skill manifests: no workflow files found");let o=e.workflows.filter((s)=>!s.availability.available);n.push(`Exposed workflows: ${e.workflows.length-o.length}/${e.workflows.length} have valid required skill manifests`);for(let s of o){let a=s.availability;n.push(`/${s.name} disabled: ${a.issue??`install or repair required skills ${a.missingRequired.join(", ")}`}`)}for(let s of e.workflows)if(s.availability.missingConditional.length)n.push(`/${s.name} conditional skills (add when using that branch): ${s.availability.missingConditional.join(", ")}`);for(let s of i){let a=[...s.missingSkills.length?[`missing ${s.missingSkills.join(", ")}`]:[],...s.unreadableFiles.length?[`not assessed: ${s.unreadableFiles.join(", ")}`]:[]];n.push(`/${s.name}: ${a.join("; ")}`)}if(n.push("Static manifest references only, including conditional branches; resource contents, tools and execution are not verified."),r.size||i.length||o.length||e.inventoryIssue){let s=t.global?"oma doctor --global":"oma doctor",a=t.global?"oma --global install":"oma install",c=t.global?"oma --global link":"oma link";n.push(`Run ${s} from this install root to inspect missing or unreadable manifests.`,`Use ${a} and Select individually to add required skills without expanding to All. After repairing manifests manually, run ${c} to refresh workflow commands.`)}return n}var qre,_rr=128;var JLe=v(()=>{Lt();fa();C9();kO();qre=/^[A-Za-z0-9_][A-Za-z0-9_-]*$/});import{existsSync as Rrr,readFileSync as Trr,writeFileSync as Prr}from"node:fs";function yA(e,t){let r=Rc(e,[[["mcp","devtools_browsers"],[...new Set(t)]]]);if(r.warning)ue.warn(r.warning);if(!r.entries.length)return;let{path:n}=r,i=sr(Rrr(n)?Trr(n,"utf-8"):"");if(i.errors.length)throw Error(`Invalid YAML in ${n}: ${i.errors[0]?.message}`);let o=i.get("mcp");if(o!=null&&!$i(o))throw Error(`Expected mcp to be a mapping in ${n}`);if(!$i(o))i.set("mcp",i.createNode({}));for(let[s,a]of r.entries)i.setIn(s,a);if(Prr(n,i.toString()),r.notice)ue.info(r.notice)}var Kre=v(()=>{Bt();Lt();ha()});var YLe=v(()=>{Kre()});import{existsSync as cf,readdirSync as Irr,readFileSync as vA,writeFileSync as CD}from"node:fs";import{join as vy}from"node:path";function Jre(e){let t=vy(e,"docs"),r;if(cf(t)){r=["en"];for(let n of Irr(t)){let i=n.match(/^README\.(.+)\.md$/);if(i?.[1])r.push(i[1])}}else r=[...Mrr];return r.map((n)=>({value:n,label:Orr[n]??n}))}function XLe(e){return["oma-config.cue","oma-config.yaml"].some((t)=>cf(vy(e,".agents",t)))}function Yre(e){if(!XLe(e))return null;try{let t=Pn(e).config.language;return typeof t==="string"&&/^[A-Za-z-]+$/.test(t)?t:null}catch{return null}}function _D(e){if(!XLe(e))return null;try{return Xa(e).model_preset??null}catch{return null}}function ZLe(e,t,r,n){let i=vy(e,".agents","oma-config.cue"),o=[];if(cf(i)){let a=vA(i,"utf-8"),c=a,l=[];for(let[u,d]of[["language",t],["model_preset",r]]){let p=new RegExp(`^([\\t ]*${u}:[\\t ]*)"[^"]*"([\\t ]*(?:\\/\\/[^\\n]*)?)$`,"m");if(p.test(c))c=c.replace(p,(f,m,h)=>`${m}"${d}"${h}`);else l.push([[u],d])}if(c!==a)CD(i,c);if(l.length)jrr(e,l);for(let[u,d]of[["language",t],["model_preset",r]])if(!l.some(([p])=>p[0]===u))o.push([[u],d])}let s=vy(e,".agents","oma-config.yaml");if(cf(s)){let a=vA(s,"utf-8");if(a=a.replace(/^language:\s*.+$/m,`language: ${t}`),/^model_preset:/m.test(a))a=a.replace(/^model_preset:\s*.+$/m,`model_preset: ${r}`);else a=a.replace(/^(language:\s*.+)$/m,`$1
|
|
1060
|
-
model_preset: ${r}`);if(CD(s,a),!cf(i))o.push([["language"],t],[["model_preset"],r])}Drr(e,o),wee(e,n)}function Drr(e,t){if(!t.length)return;let[r,n]=k3,i=vy(e,".agents",r),o=vy(e,".agents",n);if(cf(i)){let c=vA(i,"utf-8"),l=t.filter(([u])=>new RegExp(`^[\\t ]*${u[0]}[\\t ]*:`,"m").test(c));if(l.length)ue.warn(`${i} sets ${l.map(([u])=>u[0]).join(", ")}, which outranks the shared config: set ${l.map(([u,d])=>`${u[0]}: "${String(d)}"`).join(", ")} there for the choice to take effect.`);return}if(!cf(o))return;let s=sr(vA(o,"utf-8"));if(s.errors.length||!$i(s.contents))return;let a=t.filter(([c,l])=>s.hasIn(c)&&s.getIn(c)!==l);if(!a.length)return;for(let[c,l]of a)s.setIn(c,l);CD(o,s.toString()),ue.info(`${o} (local, gitignored) also set ${a.map(([c])=>c.join(".")).join(", ")}, which outranks the shared config; updated it so the choice takes effect.`)}function jrr(e,t){let r;try{r=Rc(e,t)}catch(i){if(!(i instanceof ho))throw i;ue.warn(`Not saved: ${i.message}`);return}if(r.warning)ue.warn(r.warning);if(!r.entries.length)return;let n=sr(cf(r.path)?vA(r.path,"utf-8"):"");if(n.errors.length||n.contents!=null&&!$i(n.contents))throw Error(`Invalid configuration in ${r.path}`);for(let[i,o]of r.entries)n.setIn(i,o);CD(r.path,n.toString()),ue.info(r.notice??`Saved ${r.entries.map(([i])=>i.join(".")).join(", ")} to ${r.path}.`)}var Orr,Mrr;var RD=v(()=>{Bt();Lt();X3();js();ha();Orr={en:"English",ko:"한국어",ja:"日本語",zh:"中文",vi:"Tiếng Việt",de:"Deutsch",es:"Español",fr:"Français",nl:"Nederlands",pl:"Polski",pt:"Português",ru:"Русский",th:"ไทย"},Mrr=["en","de","es","fr","ja","ko","nl","pl","pt","ru","th","vi","zh"]});import{existsSync as eNe,readFileSync as Lrr,writeFileSync as Nrr}from"node:fs";import{join as tNe}from"node:path";function Xre(e){if(e==null)return{};if(!$i(e))throw Error("Expected provider settings to be a mapping.");return e.toJSON()}function QLe(e,t,r){if(!eNe(tNe(e,".agents","oma-config.cue")))return Xre(t.get(r,!0));try{let{config:n}=Pn(e,process.env,{searchParents:!1});return n[r]??{}}catch{return Xre(t.get(r,!0))}}function rNe(e,t=tNe(e,".agents","oma-config.yaml")){let r=sr(eNe(t)?Lrr(t,"utf8"):"");if(r.errors.length||r.contents!=null&&!$i(r.contents))throw Error(`Invalid configuration in ${t}`);return{path:t,doc:r}}async function nNe(e,t,r,n={}){let{doc:i}=rNe(e),o=X4.parse(QLe(e,i,"providers")),s=X4.parse({web:n.webSearch,code_intelligence:n.codeIntelligence,semantic_memory:n.semanticMemory}),a={providers:{web:s.web??o.web??TD.web,code_intelligence:s.code_intelligence??o.code_intelligence??TD.code_intelligence,semantic_memory:s.semantic_memory??o.semantic_memory??TD.semantic_memory}},c=Pc();if(s.web)c.resolve(s.web,"web");let l=(u)=>{if(lt(u))r(),Yt("Cancelled."),process.exit(0);return u};if(!t&&!s.code_intelligence)a.providers.code_intelligence=l(await T2({message:"Code intelligence provider?",initialValue:a.providers.code_intelligence,options:[{value:"serena",label:"Serena",hint:"default — language server code navigation"},{value:"gortex",label:"Gortex",hint:"experimental — requires a separately installed Gortex"}]}));if(!t&&!s.semantic_memory)a.providers.semantic_memory=l(await T2({message:"Semantic memory provider?",initialValue:a.providers.semantic_memory,options:[{value:"agentmemory",label:"Agent Memory",hint:"default — shared memory installed and started automatically"},{value:"honcho",label:"Honcho",hint:"experimental — requires a running Honcho server"},{value:"none",label:"None",hint:"keep only local workflow evidence"}]}));if(!t&&!s.web){let u=c.list("web").map((d)=>({value:d.id,label:d.label,hint:d.id==="native"?"default — use the agent's native search":"requires an API key"}));if(!u.some((d)=>d.value===a.providers.web))u.push({value:a.providers.web,label:a.providers.web,hint:"saved provider — not registered"});a.providers.web=l(await T2({message:"Web search provider?",initialValue:a.providers.web,options:u}))}if(a.providers.semantic_memory==="honcho"){let u=Tc.parse(QLe(e,i,"honcho")),d=n.honchoUrl??u.base_url??"http://127.0.0.1:8000",p=n.honchoWorkspace??u.workspace_id??"oma";if(!t&&!n.honchoUrl)d=l(await S3({message:"Honcho server URL?",initialValue:d,validate:(f)=>Tc.shape.base_url.safeParse(f).success?void 0:"Enter a valid URL."}));if(!t&&!n.honchoWorkspace)p=l(await S3({message:"Honcho workspace ID?",initialValue:p,validate:(f)=>f&&Tc.shape.workspace_id.safeParse(f).success?void 0:"Use 1–128 letters, digits, underscores or hyphens."}));a.honcho=Tc.parse({...u,base_url:d,workspace_id:p,recall_mode:u.recall_mode??"messages"})}else if(n.honchoUrl!==void 0||n.honchoWorkspace!==void 0)throw Error("Honcho connection options require --semantic-memory honcho.");return a}function iNe(e,t){let r=[...Object.entries(t.providers).map(([s,a])=>[["providers",s],a,TD[s]]),...Object.entries(t.honcho??{}).map(([s,a])=>[["honcho",s],a])],n=Rc(e,r);if(n.warning)ue.warn(n.warning);if(!n.entries.length)return;let{path:i,doc:o}=rNe(e,n.path);X4.parse(Xre(o.get("providers",!0)));for(let[s,a]of n.entries)o.setIn(s,a);if(Nrr(i,o.toString()),n.notice)ue.info(n.notice)}function oNe(e){if(e.providers.web==="brave")ue.info('Brave Search selected. Set BRAVE_SEARCH_API_KEY or run `oma vault store brave-search` for hidden key input. Test with `oma search web "your query"`; `oma doctor` checks credential availability without making a search request.');if(e.providers.web==="exa")ue.info('Exa selected. Set EXA_API_KEY or run `oma vault store exa-search` for hidden key input. Test with `oma search web "your query"`; `oma doctor` checks credential availability without making a search request.');if(e.providers.code_intelligence==="gortex")ue.info("Gortex selected. Install the latest Gortex separately and choose repositories to track; then run `oma doctor`. Serena setup was skipped.");if(e.providers.semantic_memory==="honcho")ue.info("Honcho selected. Start your Honcho server separately. For local embedding credentials run `oma memory keys --kind embedding`; for server authentication run `oma memory keys --kind connection`. Run `oma memory status` to check access. New connections use message recall without inferred representations.")}var TD;var Zre=v(()=>{Bt();Lt();w3();ha();Ci();TD={web:"native",code_intelligence:"serena",semantic_memory:"agentmemory"}});import{existsSync as Frr}from"node:fs";import{join as zrr}from"node:path";function Qre(){let e=Cwe({onInstallStart:()=>ue.info("Checking/installing CUE binary for typed configuration…")});if(e.status==="installed")ue.success(sNe.default.green("Installed CUE binary"));else if(e.status==="install-failed")ue.warn("CUE binary not found — install via 'brew install cue' (macOS) or see https://cuelang.org/docs/install/")}function aNe(e,t){let r=Frr(zrr(e,".agents","oma-config.cue"));if(r)Qre();return yA(e,t.devToolsBrowsers),ZLe(e,t.language,t.modelPreset,t.vendors),iNe(e,t.providers),{cueChecked:r}}var sNe;var cNe=v(()=>{Bt();AY();YLe();RD();Zre();sNe=be(Re(),1)});async function bA(e,t,r){if(e)return r??[];let n=r??Brr,i=await A3({message:"Select browser MCP servers (Space to select, Enter to continue):",options:[{value:"aside",label:"Aside",hint:"aside mcp (automatically installs Aside if missing)"},{value:"chrome",label:"Chrome DevTools MCP",hint:"npx -y chrome-devtools-mcp@latest --no-usage-statistics --isolated"},{value:"firefox",label:"Firefox DevTools MCP",hint:"npx -y @mozilla/firefox-devtools-mcp@latest --autoProfile"}],initialValues:n,required:!1});if(lt(i))t(),Yt("Cancelled."),process.exit(0);return i??n}var Brr;var ene=v(()=>{Bt();Brr=["aside"]});function Hrr(e){return e.filter((t)=>Urr.includes(t))}function Grr(e,t){return e??"auto"}async function lNe(e,t,r,n){let i=Jre(e),o=Yre(t),s=i.some((c)=>c.value===o)?o:"en",a=r?s:await T2({message:"Response language?",options:i,initialValue:s});if(lt(a))n(),Yt("Cancelled."),process.exit(0);return a}async function uNe(e,t,r,n){let i=[{value:"auto",label:"Auto (recommended)",hint:"Use the current CLI's native agent configuration"},{value:"free",label:"FreeLLMAPI",hint:"Local API gateway (requires FREELLM_API_KEY and a running server)"},{value:"claude",label:"Claude Code",hint:"Claude Max subscription holders"},{value:"codex",label:"Codex",hint:"ChatGPT Plus/Pro subscription holders"},{value:"cursor",label:"Cursor Agent",hint:"Cursor editor with built-in agent"},{value:"qwen",label:"Qwen Code",hint:"Qwen Code subscription holders"},{value:"antigravity",label:"Antigravity CLI (agy)",hint:"Gemini 3.1 Pro impl + Gemini 3.5 Flash orchestration"},{value:"mixed",label:"Mixed (cross-vendor)",hint:"Claude orchestrator + cross-vendor subagents"}],o=_D(e),s=Grr(o,t);if(r)return s;if(Hrr(t).length===0){ue.info(kA.default.dim("Auto follows the current CLI's agent configuration. Choose a fixed preset only to pin models or route agents across vendors."));let c=await kn({message:`Pick a cross-vendor model preset? (otherwise defaults to '${s}')`,initialValue:!1});if(lt(c))n(),Yt("Cancelled."),process.exit(0);if(!c)return s}if(!i.some((c)=>c.value===s))i.unshift({value:s,label:s,hint:"Current custom preset"});let a=await T2({message:"Model preset?",options:i,initialValue:s});if(lt(a))n(),Yt("Cancelled."),process.exit(0);return a}async function dNe(e,t){let r=process.platform!=="win32"&&!process.env.CI,n=[{value:"claude",label:"Claude Code",hint:"hooks + settings"},{value:"codex",label:"Codex",hint:"hooks + plugin"},{value:"commandcode",label:"Command Code",hint:"hooks + skills + .commandcode/agents/"},{value:"copilot",label:"GitHub Copilot",hint:"skill symlinks + .github/prompts/ wrappers"},{value:"cursor",label:"Cursor",hint:".cursor/rules/ export + prompt hooks"},{value:"grok",label:"Grok",hint:"hooks + project MCP + .grok/agents/"},{value:"kiro",label:"Kiro CLI",hint:"hooks + Serena MCP + .kiro/agents/"},{value:"opencode",label:"OpenCode",hint:"in-process plugin bridge — .opencode/plugins/oma/, .opencode/agents/"},{value:"pi",label:"pi (Earendil)",hint:"extension bridge + browser MCP via pi-mcp-adapter"},...r?[{value:"antigravity",label:"Antigravity CLI (agy)",hint:"hooks + HUD + Serena MCP — HOME-shared (~/.gemini/antigravity-cli/)"},{value:"hermes",label:"Hermes Agent",hint:"skills + browser MCP — HOME-shared (no per-project isolation)"},{value:"kimi",label:"Kimi Code CLI",hint:"hooks + skills — HOME-shared (~/.kimi-code/) + project Serena MCP"}]:[],{value:"qwen",label:"Qwen Code",hint:"hooks + settings"},{value:"zcode",label:"ZCode",hint:"workflow slash-commands + browser MCP"}],i={claude:"claude",codex:"codex",cursor:"cursor",qwen:"qwen",antigravity:"antigravity"},o=n.filter((u)=>{if(Ex(u.value))return!1;let d=ri[u.value];if(d?.optIn)return!1;if(d?.requiresHomeConsent&&!r)return!1;return!0}).map((u)=>u.value),s=_D(e),a=s?i[s]:void 0,c=a&&n.some((u)=>u.value===a)?[a]:o,l=t?c:await A3({message:"CLI tools to configure (deselect all to skip):",options:n,initialValues:c,required:!1});if(lt(l))Yt("Cancelled."),process.exit(0);return l}async function pNe(e){let t=e?"all":await T2({message:"What type of project?",options:[{value:"all",label:"All",hint:"Install everything"},{value:"fullstack",label:"Fullstack",hint:"Web + Mobile + Infra (kitchen sink)"},{value:"fullstack-web",label:"Fullstack Web",hint:"Frontend + Backend + DB (no mobile/infra)"},{value:"fullstack-mobile",label:"Fullstack Mobile",hint:"Mobile + Backend + DB"},{value:"frontend",label:"Frontend",hint:"React/Next.js"},{value:"backend",label:"Backend",hint:"Python, Node.js, Rust, ..."},{value:"mobile",label:"Mobile",hint:"Flutter/Dart"},{value:"devops",label:"DevOps",hint:"Terraform + CI/CD + Observability"},{value:"research",label:"Research",hint:"Scholar + Market + PDF/HWP + Writer"},{value:"content",label:"Content",hint:"Image + Voice + Design + Writer"},{value:"custom",label:"Custom",hint:"Choose skills"}]});if(lt(t))Yt("Cancelled."),process.exit(0);let r;if(t==="custom"){let n=W1(),i=await A3({message:"Select skills:",options:n.map((o)=>({value:o.name,label:o.name,hint:o.desc})),required:!0});if(lt(i))Yt("Cancelled."),process.exit(0);r=i}else r=a5[t]??[];return r}async function fNe(e,t){let r={};if(e?.includes("oma-backend")){let n=t?"python":await T2({message:"Backend language?",options:[{value:"python",label:"\uD83D\uDC0D Python",hint:"FastAPI/SQLAlchemy (default)"},{value:"node",label:"\uD83D\uDFE2 Node.js",hint:"NestJS/Hono + Prisma/Drizzle"},{value:"rust",label:"\uD83E\uDD80 Rust",hint:"Axum/Actix-web"},{value:"other",label:"\uD83D\uDD27 Other / Auto-detect",hint:"Configure later with /stack-set"}],initialValue:"python"});if(lt(n))Yt("Cancelled."),process.exit(0);let i=n||"python";if(i!=="other")r["oma-backend"]=i}return r}async function mNe(e,t,r){let n=Object.keys(ri),i=e.filter((s)=>n.includes(s)),o=[];for(let s of i){if(G1(s)){if(t){ue.info(kA.default.dim(`Skipped ${s} export (HOME write requires -y opt-in).`));continue}let a=await kn({message:`${s} export writes to HOME (${kA.default.cyan(ch(s))}). Proceed?`,initialValue:!1});if(lt(a))r(),Yt("Cancelled."),process.exit(0);if(!a){ue.info(kA.default.dim(`Skipped ${s} export.`));continue}}o.push(s)}return o}var kA,Urr;var hNe=v(()=>{Bt();js();RD();ene();kA=be(Re(),1),Urr=["claude","codex","cursor","qwen","antigravity"]});function gNe(e){if(e===void 0)return;if(!Object.hasOwn(a5,e))throw Error(`Unknown skill preset ${JSON.stringify(e)}. Choose one of: ${Object.keys(a5).join(", ")}`);return[...a5[e]??[]]}var yNe=v(()=>{fa()});import{existsSync as Wrr,lstatSync as Vrr,readdirSync as qrr,readlinkSync as Krr,unlinkSync as Jrr}from"node:fs";import{join as Yrr,resolve as Xrr}from"node:path";function tne(e){if(!Wrr(e))return;let t;try{t=qrr(e,{withFileTypes:!0,encoding:"utf-8"})}catch{return}for(let r of t){if(!r.isSymbolicLink())continue;let n=Yrr(e,r.name),i;try{i=Krr(n)}catch{continue}let o=Xrr(e,i),s;try{Vrr(o),s=!0}catch{s=!1}if(!s)try{Jrr(n),console.log(`cleaned broken symlink: ${n}`)}catch{}}}var rne=()=>{};import{existsSync as Zrr,rmSync as Qrr}from"node:fs";import{homedir as enr}from"node:os";import{join as PD}from"node:path";async function ID(e={}){let t=gNe(e.preset),r=Hre(e),n=ED(e);if(process.platform!=="win32"&&typeof process.geteuid==="function"&&process.geteuid()===0&&typeof process.env.SUDO_USER==="string"&&process.env.SUDO_USER.length>0)Yt("Refusing to install under sudo. Re-run as the target user (without sudo) — oma writes to your HOME and runs as your user."),process.exit(1);if(ti()==="global"&&(process.env.CI==="true"||process.env.CI==="1"))ue.warn("Running `oma install --global` in CI. This will modify the CI user's HOME. Proceeding because --yes / non-interactive mode is set.");let o=G4(),s=[];if(ti()==="global"){let l=await v9({env:{...process.env,OMA_HOME:o}});if(y9(l))throw Error(`Global home migration needs attention before installation: ${[...l.conflicts,...l.deferred].join("; ")}`);s.push(...l.deferred)}let a=_1(o);if(!a.ok)Yt(`Another oma install/update is running (pid=${a.held.pid}). If none is running it crashed — remove ${s9(o)}, or wait ~${G3/1000}s for it to auto-clear.`),process.exit(1);let c=a9(a.release);try{if(ti()==="global")lh(o);console.clear(),fn(En.default.bgMagenta(En.default.white(" \uD83D\uDEF8 oh-my-agent ")));for(let _ of s)ue.info(`Global home migration deferred: ${_}`);if(r)ue.info(En.default.dim("Non-interactive mode — using defaults."));if(ti()==="project"&&process.cwd()===enr())if(r)Yt("Refusing to install in HOME without --global. Re-run with --global, or cd to a project directory first."),process.exit(1);else{let _=await kn({message:"You're running oma in your HOME directory without --global. This will scatter files in ~/. Are you sure?",initialValue:!1});if(lt(_)||!_)Yt("Cancelled."),process.exit(0)}if(ti()==="global"&&Gre())ue.info(En.default.dim("WSL detected: your $HOME ("+o+") is the WSL Linux home and is distinct from your Windows %USERPROFILE%. oma will install only to the WSL HOME. If you want a Windows-side install, re-run this command from PowerShell."));if(ti()==="global"){if(!r){let C=await kn({message:`You're about to install oh-my-agent globally to ${o}/.agents/. This will modify ~/.claude/, ~/.codex/, etc. Proceed?`,initialValue:!1});if(lt(C)||!C)Yt("Cancelled."),process.exit(0)}if(xO(o)!=="global"&&!r){le(["This is your first global install of oh-my-agent.","Scope:",` - SSOT: ${PD(o,".agents")}/ (all skills, workflows, rules)`," - Vendor configs: ~/.claude/, ~/.codex/, ~/.gemini/, ~/.qwen/ (symlinks + settings)",` - Lock file: ${s9(o)}`,"Existing per-project installs are not affected."].join(`
|
|
1060
|
+
model_preset: ${r}`);if(CD(s,a),!cf(i))o.push([["language"],t],[["model_preset"],r])}Drr(e,o),wee(e,n)}function Drr(e,t){if(!t.length)return;let[r,n]=k3,i=vy(e,".agents",r),o=vy(e,".agents",n);if(cf(i)){let c=vA(i,"utf-8"),l=t.filter(([u])=>new RegExp(`^[\\t ]*${u[0]}[\\t ]*:`,"m").test(c));if(l.length)ue.warn(`${i} sets ${l.map(([u])=>u[0]).join(", ")}, which outranks the shared config: set ${l.map(([u,d])=>`${u[0]}: "${String(d)}"`).join(", ")} there for the choice to take effect.`);return}if(!cf(o))return;let s=sr(vA(o,"utf-8"));if(s.errors.length||!$i(s.contents))return;let a=t.filter(([c,l])=>s.hasIn(c)&&s.getIn(c)!==l);if(!a.length)return;for(let[c,l]of a)s.setIn(c,l);CD(o,s.toString()),ue.info(`${o} (local, gitignored) also set ${a.map(([c])=>c.join(".")).join(", ")}, which outranks the shared config; updated it so the choice takes effect.`)}function jrr(e,t){let r;try{r=Rc(e,t)}catch(i){if(!(i instanceof ho))throw i;ue.warn(`Not saved: ${i.message}`);return}if(r.warning)ue.warn(r.warning);if(!r.entries.length)return;let n=sr(cf(r.path)?vA(r.path,"utf-8"):"");if(n.errors.length||n.contents!=null&&!$i(n.contents))throw Error(`Invalid configuration in ${r.path}`);for(let[i,o]of r.entries)n.setIn(i,o);CD(r.path,n.toString()),ue.info(r.notice??`Saved ${r.entries.map(([i])=>i.join(".")).join(", ")} to ${r.path}.`)}var Orr,Mrr;var RD=v(()=>{Bt();Lt();X3();js();ha();Orr={en:"English",ko:"한국어",ja:"日本語",zh:"中文",vi:"Tiếng Việt",de:"Deutsch",es:"Español",fr:"Français",nl:"Nederlands",pl:"Polski",pt:"Português",ru:"Русский",th:"ไทย"},Mrr=["en","de","es","fr","ja","ko","nl","pl","pt","ru","th","vi","zh"]});import{existsSync as eNe,readFileSync as Lrr,writeFileSync as Nrr}from"node:fs";import{join as tNe}from"node:path";function Xre(e){if(e==null)return{};if(!$i(e))throw Error("Expected provider settings to be a mapping.");return e.toJSON()}function QLe(e,t,r){if(!eNe(tNe(e,".agents","oma-config.cue")))return Xre(t.get(r,!0));try{let{config:n}=Pn(e,process.env,{searchParents:!1});return n[r]??{}}catch{return Xre(t.get(r,!0))}}function rNe(e,t=tNe(e,".agents","oma-config.yaml")){let r=sr(eNe(t)?Lrr(t,"utf8"):"");if(r.errors.length||r.contents!=null&&!$i(r.contents))throw Error(`Invalid configuration in ${t}`);return{path:t,doc:r}}async function nNe(e,t,r,n={}){let{doc:i}=rNe(e),o=X4.parse(QLe(e,i,"providers")),s=X4.parse({web:n.webSearch,code_intelligence:n.codeIntelligence,semantic_memory:n.semanticMemory}),a={providers:{web:s.web??o.web??TD.web,code_intelligence:s.code_intelligence??o.code_intelligence??TD.code_intelligence,semantic_memory:s.semantic_memory??o.semantic_memory??TD.semantic_memory}},c=Pc();if(s.web)c.resolve(s.web,"web");let l=(u)=>{if(lt(u))r(),Yt("Cancelled."),process.exit(0);return u};if(!t&&!s.code_intelligence)a.providers.code_intelligence=l(await T2({message:"Code intelligence provider?",initialValue:a.providers.code_intelligence,options:[{value:"serena",label:"Serena",hint:"default — language server code navigation"},{value:"gortex",label:"Gortex",hint:"experimental — requires a separately installed Gortex"}]}));if(!t&&!s.semantic_memory)a.providers.semantic_memory=l(await T2({message:"Semantic memory provider?",initialValue:a.providers.semantic_memory,options:[{value:"agentmemory",label:"Agent Memory",hint:"default — shared memory installed and started automatically"},{value:"honcho",label:"Honcho",hint:"experimental — requires a running Honcho server"},{value:"none",label:"None",hint:"keep only local workflow evidence"}]}));if(!t&&!s.web){let u=c.list("web").map((d)=>({value:d.id,label:d.label,hint:d.id==="native"?"default — use the agent's native search":"requires an API key"}));if(!u.some((d)=>d.value===a.providers.web))u.push({value:a.providers.web,label:a.providers.web,hint:"saved provider — not registered"});a.providers.web=l(await T2({message:"Web search provider?",initialValue:a.providers.web,options:u}))}if(a.providers.semantic_memory==="honcho"){let u=Tc.parse(QLe(e,i,"honcho")),d=n.honchoUrl??u.base_url??"http://127.0.0.1:8000",p=n.honchoWorkspace??u.workspace_id??"oma";if(!t&&!n.honchoUrl)d=l(await S3({message:"Honcho server URL?",initialValue:d,validate:(f)=>Tc.shape.base_url.safeParse(f).success?void 0:"Enter a valid URL."}));if(!t&&!n.honchoWorkspace)p=l(await S3({message:"Honcho workspace ID?",initialValue:p,validate:(f)=>f&&Tc.shape.workspace_id.safeParse(f).success?void 0:"Use 1–128 letters, digits, underscores or hyphens."}));a.honcho=Tc.parse({...u,base_url:d,workspace_id:p,recall_mode:u.recall_mode??"messages"})}else if(n.honchoUrl!==void 0||n.honchoWorkspace!==void 0)throw Error("Honcho connection options require --semantic-memory honcho.");return a}function iNe(e,t){let r=[...Object.entries(t.providers).map(([s,a])=>[["providers",s],a,TD[s]]),...Object.entries(t.honcho??{}).map(([s,a])=>[["honcho",s],a])],n=Rc(e,r);if(n.warning)ue.warn(n.warning);if(!n.entries.length)return;let{path:i,doc:o}=rNe(e,n.path);X4.parse(Xre(o.get("providers",!0)));for(let[s,a]of n.entries)o.setIn(s,a);if(Nrr(i,o.toString()),n.notice)ue.info(n.notice)}function oNe(e){if(e.providers.web==="brave")ue.info('Brave Search selected. Set BRAVE_SEARCH_API_KEY or run `oma vault store brave-search` for hidden key input. Test with `oma search web "your query"`; `oma doctor` checks credential availability without making a search request.');if(e.providers.web==="exa")ue.info('Exa selected. Set EXA_API_KEY or run `oma vault store exa-search` for hidden key input. Test with `oma search web "your query"`; `oma doctor` checks credential availability without making a search request.');if(e.providers.code_intelligence==="gortex")ue.info("Gortex selected. Install the latest Gortex separately and choose repositories to track; then run `oma doctor`. Serena setup was skipped.");if(e.providers.semantic_memory==="honcho")ue.info("Honcho selected. Start your Honcho server separately. For local embedding credentials run `oma memory keys --kind embedding`; for server authentication run `oma memory keys --kind connection`. Run `oma memory status` to check access. New connections use message recall without inferred representations.")}var TD;var Zre=v(()=>{Bt();Lt();w3();ha();Ci();TD={web:"native",code_intelligence:"serena",semantic_memory:"agentmemory"}});import{existsSync as Frr}from"node:fs";import{join as zrr}from"node:path";function Qre(){let e=Cwe({onInstallStart:()=>ue.info("Checking/installing CUE binary for typed configuration…")});if(e.status==="installed")ue.success(sNe.default.green("Installed CUE binary"));else if(e.status==="install-failed")ue.warn("CUE binary not found — install via 'brew install cue' (macOS) or see https://cuelang.org/docs/install/")}function aNe(e,t){let r=Frr(zrr(e,".agents","oma-config.cue"));if(r)Qre();return yA(e,t.devToolsBrowsers),ZLe(e,t.language,t.modelPreset,t.vendors),iNe(e,t.providers),{cueChecked:r}}var sNe;var cNe=v(()=>{Bt();AY();YLe();RD();Zre();sNe=be(Re(),1)});async function bA(e,t,r){if(e)return r??[];let n=r??Brr,i=await A3({message:"Select browser MCP servers (Space to select, Enter to continue):",options:[{value:"aside",label:"Aside",hint:"aside mcp (automatically installs Aside if missing)"},{value:"chrome",label:"Chrome DevTools MCP",hint:"npx -y chrome-devtools-mcp@latest --no-usage-statistics --isolated"},{value:"firefox",label:"Firefox DevTools MCP",hint:"npx -y @mozilla/firefox-devtools-mcp@latest --autoProfile"}],initialValues:n,required:!1});if(lt(i))t(),Yt("Cancelled."),process.exit(0);return i??n}var Brr;var ene=v(()=>{Bt();Brr=["aside"]});function Hrr(e){return e.filter((t)=>Urr.includes(t))}function Grr(e,t){return e??"auto"}async function lNe(e,t,r,n){let i=Jre(e),o=Yre(t),s=i.some((c)=>c.value===o)?o:"en",a=r?s:await T2({message:"Response language?",options:i,initialValue:s});if(lt(a))n(),Yt("Cancelled."),process.exit(0);return a}async function uNe(e,t,r,n){let i=[{value:"auto",label:"Auto (recommended)",hint:"Use the current CLI's native agent configuration"},{value:"free",label:"FreeLLMAPI",hint:"Local API gateway (requires FREELLM_API_KEY and a running server)"},{value:"claude",label:"Claude Code",hint:"Claude Max subscription holders"},{value:"codex",label:"Codex",hint:"ChatGPT Plus/Pro subscription holders"},{value:"cursor",label:"Cursor Agent",hint:"Cursor editor with built-in agent"},{value:"qwen",label:"Qwen Code",hint:"Qwen Code subscription holders"},{value:"antigravity",label:"Antigravity CLI (agy)",hint:"Gemini 4 Argon impl + Gemini 3.8 Flash orchestration"},{value:"mixed",label:"Mixed (cross-vendor)",hint:"Claude orchestrator + cross-vendor subagents"}],o=_D(e),s=Grr(o,t);if(r)return s;if(Hrr(t).length===0){ue.info(kA.default.dim("Auto follows the current CLI's agent configuration. Choose a fixed preset only to pin models or route agents across vendors."));let c=await kn({message:`Pick a cross-vendor model preset? (otherwise defaults to '${s}')`,initialValue:!1});if(lt(c))n(),Yt("Cancelled."),process.exit(0);if(!c)return s}if(!i.some((c)=>c.value===s))i.unshift({value:s,label:s,hint:"Current custom preset"});let a=await T2({message:"Model preset?",options:i,initialValue:s});if(lt(a))n(),Yt("Cancelled."),process.exit(0);return a}async function dNe(e,t){let r=process.platform!=="win32"&&!process.env.CI,n=[{value:"claude",label:"Claude Code",hint:"hooks + settings"},{value:"codex",label:"Codex",hint:"hooks + plugin"},{value:"commandcode",label:"Command Code",hint:"hooks + skills + .commandcode/agents/"},{value:"copilot",label:"GitHub Copilot",hint:"skill symlinks + .github/prompts/ wrappers"},{value:"cursor",label:"Cursor",hint:".cursor/rules/ export + prompt hooks"},{value:"grok",label:"Grok",hint:"hooks + project MCP + .grok/agents/"},{value:"kiro",label:"Kiro CLI",hint:"hooks + Serena MCP + .kiro/agents/"},{value:"opencode",label:"OpenCode",hint:"in-process plugin bridge — .opencode/plugins/oma/, .opencode/agents/"},{value:"pi",label:"pi (Earendil)",hint:"extension bridge + browser MCP via pi-mcp-adapter"},...r?[{value:"antigravity",label:"Antigravity CLI (agy)",hint:"hooks + HUD + Serena MCP — HOME-shared (~/.gemini/antigravity-cli/)"},{value:"hermes",label:"Hermes Agent",hint:"skills + browser MCP — HOME-shared (no per-project isolation)"},{value:"kimi",label:"Kimi Code CLI",hint:"hooks + skills — HOME-shared (~/.kimi-code/) + project Serena MCP"}]:[],{value:"qwen",label:"Qwen Code",hint:"hooks + settings"},{value:"zcode",label:"ZCode",hint:"workflow slash-commands + browser MCP"}],i={claude:"claude",codex:"codex",cursor:"cursor",qwen:"qwen",antigravity:"antigravity"},o=n.filter((u)=>{if(Ex(u.value))return!1;let d=ri[u.value];if(d?.optIn)return!1;if(d?.requiresHomeConsent&&!r)return!1;return!0}).map((u)=>u.value),s=_D(e),a=s?i[s]:void 0,c=a&&n.some((u)=>u.value===a)?[a]:o,l=t?c:await A3({message:"CLI tools to configure (deselect all to skip):",options:n,initialValues:c,required:!1});if(lt(l))Yt("Cancelled."),process.exit(0);return l}async function pNe(e){let t=e?"all":await T2({message:"What type of project?",options:[{value:"all",label:"All",hint:"Install everything"},{value:"fullstack",label:"Fullstack",hint:"Web + Mobile + Infra (kitchen sink)"},{value:"fullstack-web",label:"Fullstack Web",hint:"Frontend + Backend + DB (no mobile/infra)"},{value:"fullstack-mobile",label:"Fullstack Mobile",hint:"Mobile + Backend + DB"},{value:"frontend",label:"Frontend",hint:"React/Next.js"},{value:"backend",label:"Backend",hint:"Python, Node.js, Rust, ..."},{value:"mobile",label:"Mobile",hint:"Flutter/Dart"},{value:"devops",label:"DevOps",hint:"Terraform + CI/CD + Observability"},{value:"research",label:"Research",hint:"Scholar + Market + PDF/HWP + Writer"},{value:"content",label:"Content",hint:"Image + Voice + Design + Writer"},{value:"custom",label:"Custom",hint:"Choose skills"}]});if(lt(t))Yt("Cancelled."),process.exit(0);let r;if(t==="custom"){let n=W1(),i=await A3({message:"Select skills:",options:n.map((o)=>({value:o.name,label:o.name,hint:o.desc})),required:!0});if(lt(i))Yt("Cancelled."),process.exit(0);r=i}else r=a5[t]??[];return r}async function fNe(e,t){let r={};if(e?.includes("oma-backend")){let n=t?"python":await T2({message:"Backend language?",options:[{value:"python",label:"\uD83D\uDC0D Python",hint:"FastAPI/SQLAlchemy (default)"},{value:"node",label:"\uD83D\uDFE2 Node.js",hint:"NestJS/Hono + Prisma/Drizzle"},{value:"rust",label:"\uD83E\uDD80 Rust",hint:"Axum/Actix-web"},{value:"other",label:"\uD83D\uDD27 Other / Auto-detect",hint:"Configure later with /stack-set"}],initialValue:"python"});if(lt(n))Yt("Cancelled."),process.exit(0);let i=n||"python";if(i!=="other")r["oma-backend"]=i}return r}async function mNe(e,t,r){let n=Object.keys(ri),i=e.filter((s)=>n.includes(s)),o=[];for(let s of i){if(G1(s)){if(t){ue.info(kA.default.dim(`Skipped ${s} export (HOME write requires -y opt-in).`));continue}let a=await kn({message:`${s} export writes to HOME (${kA.default.cyan(ch(s))}). Proceed?`,initialValue:!1});if(lt(a))r(),Yt("Cancelled."),process.exit(0);if(!a){ue.info(kA.default.dim(`Skipped ${s} export.`));continue}}o.push(s)}return o}var kA,Urr;var hNe=v(()=>{Bt();js();RD();ene();kA=be(Re(),1),Urr=["claude","codex","cursor","qwen","antigravity"]});function gNe(e){if(e===void 0)return;if(!Object.hasOwn(a5,e))throw Error(`Unknown skill preset ${JSON.stringify(e)}. Choose one of: ${Object.keys(a5).join(", ")}`);return[...a5[e]??[]]}var yNe=v(()=>{fa()});import{existsSync as Wrr,lstatSync as Vrr,readdirSync as qrr,readlinkSync as Krr,unlinkSync as Jrr}from"node:fs";import{join as Yrr,resolve as Xrr}from"node:path";function tne(e){if(!Wrr(e))return;let t;try{t=qrr(e,{withFileTypes:!0,encoding:"utf-8"})}catch{return}for(let r of t){if(!r.isSymbolicLink())continue;let n=Yrr(e,r.name),i;try{i=Krr(n)}catch{continue}let o=Xrr(e,i),s;try{Vrr(o),s=!0}catch{s=!1}if(!s)try{Jrr(n),console.log(`cleaned broken symlink: ${n}`)}catch{}}}var rne=()=>{};import{existsSync as Zrr,rmSync as Qrr}from"node:fs";import{homedir as enr}from"node:os";import{join as PD}from"node:path";async function ID(e={}){let t=gNe(e.preset),r=Hre(e),n=ED(e);if(process.platform!=="win32"&&typeof process.geteuid==="function"&&process.geteuid()===0&&typeof process.env.SUDO_USER==="string"&&process.env.SUDO_USER.length>0)Yt("Refusing to install under sudo. Re-run as the target user (without sudo) — oma writes to your HOME and runs as your user."),process.exit(1);if(ti()==="global"&&(process.env.CI==="true"||process.env.CI==="1"))ue.warn("Running `oma install --global` in CI. This will modify the CI user's HOME. Proceeding because --yes / non-interactive mode is set.");let o=G4(),s=[];if(ti()==="global"){let l=await v9({env:{...process.env,OMA_HOME:o}});if(y9(l))throw Error(`Global home migration needs attention before installation: ${[...l.conflicts,...l.deferred].join("; ")}`);s.push(...l.deferred)}let a=_1(o);if(!a.ok)Yt(`Another oma install/update is running (pid=${a.held.pid}). If none is running it crashed — remove ${s9(o)}, or wait ~${G3/1000}s for it to auto-clear.`),process.exit(1);let c=a9(a.release);try{if(ti()==="global")lh(o);console.clear(),fn(En.default.bgMagenta(En.default.white(" \uD83D\uDEF8 oh-my-agent ")));for(let _ of s)ue.info(`Global home migration deferred: ${_}`);if(r)ue.info(En.default.dim("Non-interactive mode — using defaults."));if(ti()==="project"&&process.cwd()===enr())if(r)Yt("Refusing to install in HOME without --global. Re-run with --global, or cd to a project directory first."),process.exit(1);else{let _=await kn({message:"You're running oma in your HOME directory without --global. This will scatter files in ~/. Are you sure?",initialValue:!1});if(lt(_)||!_)Yt("Cancelled."),process.exit(0)}if(ti()==="global"&&Gre())ue.info(En.default.dim("WSL detected: your $HOME ("+o+") is the WSL Linux home and is distinct from your Windows %USERPROFILE%. oma will install only to the WSL HOME. If you want a Windows-side install, re-run this command from PowerShell."));if(ti()==="global"){if(!r){let C=await kn({message:`You're about to install oh-my-agent globally to ${o}/.agents/. This will modify ~/.claude/, ~/.codex/, etc. Proceed?`,initialValue:!1});if(lt(C)||!C)Yt("Cancelled."),process.exit(0)}if(xO(o)!=="global"&&!r){le(["This is your first global install of oh-my-agent.","Scope:",` - SSOT: ${PD(o,".agents")}/ (all skills, workflows, rules)`," - Vendor configs: ~/.claude/, ~/.codex/, ~/.gemini/, ~/.qwen/ (symlinks + settings)",` - Lock file: ${s9(o)}`,"Existing per-project installs are not affected."].join(`
|
|
1061
1061
|
`));let C=await kn({message:"Proceed with the global install?",initialValue:!1});if(lt(C)||!C)Yt("Cancelled."),process.exit(0)}}let l=gy(o,{vendors:[]});if(l.length>0)le(l.map((_)=>`${En.default.green("✓")} ${_}`).join(`
|
|
1062
1062
|
`),"Migration");if(!r)await CTe(o);let u=Oc();u.start("Downloading...");let d,p,f;try{let _=await J9();d=_.dir,p=_.cleanup,f=_.warnings??[]}catch(_){u.stop("Download failed"),ue.error(_ instanceof Error?_.message:String(_)),process.exit(1)}u.stop("Downloaded!");for(let _ of f)ue.warn(_);let m=await lNe(d,o,r,p),h=await dNe(o,r),g=await nNe(o,r,p,e),y=await bA(r,p,m5(o));await NO(y);let b=await uNe(o,h,r,p),k=t??await pNe(r),w=await fNe(k,r),A=await mNe(h,r,p),x=h.filter((_)=>_!=="hermes"||A.includes("hermes"));u.start("Installing skills...");let E=null,S=!1;try{try{let L=[".claude/skills",".codex/skills",".gemini/skills",".github/skills",".qwen/skills"];for(let I of L)tne(PD(o,I));Rx(d,o),yee(d,o),vee(d,o),gee(d,o),bee(d,o),kee(d,o,!1);for(let I of k??[])u.message(`Installing ${En.default.cyan(I)}...`),_x(d,I,o,w[I]);u.stop("Skills installed!");let O=PD(o,".agents","eval");if(Zrr(O))Qrr(O,{recursive:!0,force:!0});if({cueChecked:S}=aNe(o,{language:m,modelPreset:b,vendors:x,devToolsBrowsers:y,providers:g}),Fn(o).semantic_memory==="agentmemory"){u.start("Preparing shared memory...");let I=await SI({onProgress:(N)=>u.message(N)});u.stop(I.state==="disabled"?"Shared memory disabled by OMA_NO_AGENTMEMORY.":"Shared memory ready!")}u.start("Installing vendor adaptations..."),E=wh({root:o,vendorFilter:x,quiet:!0,telemetry:I6(o),refreshSymlinks:!1}),u.stop("Vendor adaptations installed!");let B=await ph(d);if(B)await Mx(o,B);let z=gy(o,{vendors:h});if(g.providers.code_intelligence==="gortex")hh(o,x,{global:ti()==="global"});if(z.length>0)le(z.map((I)=>`${En.default.green("✓")} ${I}`).join(`
|
|
1063
1063
|
`),"Migration")}finally{p()}let _=C5(o,A,k),C=pd(o),T=qLe(o,k,C);if(fd(o,A,C),le([...KLe(T,{global:ti()==="global"}),"",En.default.dim(`Location: ${PD(o,Kt)}`),..._.created.length>0?["",En.default.cyan("Symlinks:"),..._.created.map((L)=>`${En.default.green("→")} ${L}`)]:[],..._.skipped.length>0?["",En.default.dim("Skipped:"),..._.skipped.map((L)=>En.default.dim(` ${L}`))]:[]].join(`
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "oh-my-agent",
|
|
3
|
-
"version": "20.
|
|
3
|
+
"version": "20.25.0",
|
|
4
4
|
"description": "Agent skills and specialist teams for Claude Code, Codex, Cursor and other coding agents. Load one skill or install domain presets, project hooks and parallel workflows with test gates.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"bin": {
|